From: Michael R. <mr...@us...> - 2002-11-17 17:41:49
|
Update of /cvsroot/xine/xine-lib/src/xine-engine In directory usw-pr-cvs1:/tmp/cvs-serv21603 Modified Files: xine.c xine_internal.h Log Message: bring eject back: always keep the last input plugin class that supports ejecting Index: xine.c =================================================================== RCS file: /cvsroot/xine/xine-lib/src/xine-engine/xine.c,v retrieving revision 1.192 retrieving revision 1.193 diff -u -r1.192 -r1.193 --- xine.c 14 Nov 2002 19:45:01 -0000 1.192 +++ xine.c 17 Nov 2002 17:41:45 -0000 1.193 @@ -317,7 +317,6 @@ pthread_mutex_init (&stream->first_frame_lock, NULL); pthread_cond_init (&stream->first_frame_reached, NULL); - /* * event queues */ @@ -406,9 +405,10 @@ free(input_source); return 0; } - stream->input_class = stream->input_plugin->input_class; + if (stream->input_plugin->input_class->eject_media) + stream->eject_class = stream->input_plugin->input_class; stream->meta_info[XINE_META_INFO_INPUT_PLUGIN] - = strdup (stream->input_class->get_identifier (stream->input_class)); + = strdup (stream->input_plugin->input_class->get_identifier (stream->input_plugin->input_class)); free(input_source); #ifdef LOG @@ -572,9 +572,10 @@ stream->err = XINE_ERROR_NO_INPUT_PLUGIN; return 0; } - stream->input_class = stream->input_plugin->input_class; + if (stream->input_plugin->input_class->eject_media) + stream->eject_class = stream->input_plugin->input_class; stream->meta_info[XINE_META_INFO_INPUT_PLUGIN] - = strdup (stream->input_class->get_identifier (stream->input_class)); + = strdup (stream->input_plugin->input_class->get_identifier (stream->input_plugin->input_class)); #ifdef LOG printf ("xine: input plugin %s found\n", @@ -763,16 +764,16 @@ int status; - if (!stream->input_class) + if (!stream->eject_class) return 0; pthread_mutex_lock (&stream->frontend_lock); status = 0; if ((stream->status == XINE_STATUS_STOP) - && stream->input_class && stream->input_class->eject_media) { + && stream->eject_class && stream->eject_class->eject_media) { - status = stream->input_class->eject_media (stream->input_class); + status = stream->eject_class->eject_media (stream->eject_class); } pthread_mutex_unlock (&stream->frontend_lock); Index: xine_internal.h =================================================================== RCS file: /cvsroot/xine/xine-lib/src/xine-engine/xine_internal.h,v retrieving revision 1.111 retrieving revision 1.112 diff -u -r1.111 -r1.112 --- xine_internal.h 31 Oct 2002 16:58:25 -0000 1.111 +++ xine_internal.h 17 Nov 2002 17:41:45 -0000 1.112 @@ -135,7 +135,7 @@ int status; input_plugin_t *input_plugin; - input_class_t *input_class; /* eject */ + input_class_t *eject_class; int content_detection_method; demux_plugin_t *demux_plugin; |