Check-in [5ca0868dd9]
Not logged in

Many hyperlinks are disabled.
Use anonymous login to enable hyperlinks.

Overview
Comment:reorder handling of tkvlc repeat option
Timelines: family | ancestors | descendants | both | trunk
Files: files | file ages | folders
SHA1: 5ca0868dd9f01b9d5e063c55ddfab16b9bfa45de
User & Date: chw 2019-02-04 20:43:51.563
Context
2019-02-04
20:51
improve touchscreen calibration check-in: 095a223dbd user: chw tags: trunk
20:43
reorder handling of tkvlc repeat option check-in: 5ca0868dd9 user: chw tags: trunk
2019-02-03
21:48
add missing file to .../tcl/Android.mk check-in: 0b6e3bf5dd user: chw tags: trunk
Changes
Unified Diff Ignore Whitespace Patch
Changes to undroid/tkvlc/generic/tkvlc.c.
228
229
230
231
232
233
234


























235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
 *	Many since Tcl code is evaluated.
 *
 *----------------------------------------------------------------------
 */

static void DoEventCallback(libVLCData *p, libVLCEvent *e)
{


























  if (p->nCmdObjs > 0 && p->cmdObjs != NULL) {
    Tcl_Interp *interp = p->interp;
    Tcl_InterpState state;
    int i, ret, nCmdObjs;
    Tcl_Obj **cmdObjs, *list;
    const char *evname;

    if (p->repeat && (e->type == EV_STATE_CHANGED)) {
      if (libvlc_media_player_get_state(p->media_player) == libvlc_Ended) {
	if (p->file_name != NULL) {
	  char *filename = Tcl_GetString(p->file_name);
	  libvlc_media_t *media;

	  media = libvlc_media_new_path(p->vlc_inst, filename);
	  if (media != NULL) {
	    libvlc_media_player_set_media(p->media_player, media);
	    if (libvlc_major >= 3 && libvlc_media_parse_with_options) {
	      int status =
		libvlc_media_parse_with_options(media,
						libvlc_media_parse_local, -1);

	      if (status < 0) {
		libvlc_media_release(media);
	      }
	    } else {
	      libvlc_media_parse(media);
	    }
	    libvlc_media_player_play(p->media_player);
	    libvlc_media_release(media);
	  }
	}
      }
    }
    Tcl_Preserve(p);
    Tcl_Preserve(interp);
    state = Tcl_SaveInterpState(interp, TCL_OK);
    nCmdObjs = p->nCmdObjs;
    cmdObjs = p->cmdObjs;
    p->nCmdObjs = 0;
    p->cmdObjs = NULL;







>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>







<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<







228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267


























268
269
270
271
272
273
274
 *	Many since Tcl code is evaluated.
 *
 *----------------------------------------------------------------------
 */

static void DoEventCallback(libVLCData *p, libVLCEvent *e)
{
  if (p->repeat && (e->type == EV_STATE_CHANGED)) {
    if (libvlc_media_player_get_state(p->media_player) == libvlc_Ended) {
      if (p->file_name != NULL) {
	char *filename = Tcl_GetString(p->file_name);
	libvlc_media_t *media;

	media = libvlc_media_new_path(p->vlc_inst, filename);
	if (media != NULL) {
	  libvlc_media_player_set_media(p->media_player, media);
	  if (libvlc_major >= 3 && libvlc_media_parse_with_options) {
	    int status =
	      libvlc_media_parse_with_options(media,
					      libvlc_media_parse_local, -1);

	    if (status < 0) {
	      libvlc_media_release(media);
	    }
	  } else {
	    libvlc_media_parse(media);
	  }
	  libvlc_media_player_play(p->media_player);
	  libvlc_media_release(media);
	}
      }
    }
  }
  if (p->nCmdObjs > 0 && p->cmdObjs != NULL) {
    Tcl_Interp *interp = p->interp;
    Tcl_InterpState state;
    int i, ret, nCmdObjs;
    Tcl_Obj **cmdObjs, *list;
    const char *evname;



























    Tcl_Preserve(p);
    Tcl_Preserve(interp);
    state = Tcl_SaveInterpState(interp, TCL_OK);
    nCmdObjs = p->nCmdObjs;
    cmdObjs = p->cmdObjs;
    p->nCmdObjs = 0;
    p->cmdObjs = NULL;