Commit 6f2c07b9 authored by gbazin's avatar gbazin

* src/input/demux.c, src/misc/objects.c: demux2 has the VLC_OBJECT_DEMUX type.

* src/input/input.c: input_StopThread() sets b_die on demux2 as well.
parent 0c336413
...@@ -41,14 +41,15 @@ ...@@ -41,14 +41,15 @@
#define VLC_OBJECT_INPUT (-7) #define VLC_OBJECT_INPUT (-7)
#define VLC_OBJECT_DECODER (-8) #define VLC_OBJECT_DECODER (-8)
#define VLC_OBJECT_VOUT (-9) #define VLC_OBJECT_VOUT (-9)
#define VLC_OBJECT_AOUT (-10) #define VLC_OBJECT_AOUT (-10)
#define VLC_OBJECT_SOUT (-11) #define VLC_OBJECT_SOUT (-11)
#define VLC_OBJECT_HTTPD (-12) #define VLC_OBJECT_HTTPD (-12)
#define VLC_OBJECT_PACKETIZER (-13) #define VLC_OBJECT_PACKETIZER (-13)
#define VLC_OBJECT_ENCODER (-14) #define VLC_OBJECT_ENCODER (-14)
#define VLC_OBJECT_DIALOGS (-15) #define VLC_OBJECT_DIALOGS (-15)
#define VLC_OBJECT_VLM (-16) #define VLC_OBJECT_VLM (-16)
#define VLC_OBJECT_ANNOUNCE (-17) #define VLC_OBJECT_ANNOUNCE (-17)
#define VLC_OBJECT_DEMUX (-18)
#define VLC_OBJECT_GENERIC (-666) #define VLC_OBJECT_GENERIC (-666)
......
...@@ -171,7 +171,7 @@ static void SeekOffset( input_thread_t *p_input, int64_t i_pos ) ...@@ -171,7 +171,7 @@ static void SeekOffset( input_thread_t *p_input, int64_t i_pos )
demux_t *__demux2_New( vlc_object_t *p_obj, demux_t *__demux2_New( vlc_object_t *p_obj,
char *psz_mrl, stream_t *s, es_out_t *out ) char *psz_mrl, stream_t *s, es_out_t *out )
{ {
demux_t *p_demux = vlc_object_create( p_obj, sizeof( demux_t ) ); demux_t *p_demux = vlc_object_create( p_obj, VLC_OBJECT_DEMUX );
char *psz_dup = strdup( psz_mrl ? psz_mrl : "" ); char *psz_dup = strdup( psz_mrl ? psz_mrl : "" );
char *psz = strchr( psz_dup, ':' ); char *psz = strchr( psz_dup, ':' );
......
...@@ -340,9 +340,22 @@ input_thread_t *__input_CreateThread( vlc_object_t *p_parent, ...@@ -340,9 +340,22 @@ input_thread_t *__input_CreateThread( vlc_object_t *p_parent,
*****************************************************************************/ *****************************************************************************/
void input_StopThread( input_thread_t *p_input ) void input_StopThread( input_thread_t *p_input )
{ {
demux_t *p_demux;
/* Make the thread exit from a possible vlc_cond_wait() */ /* Make the thread exit from a possible vlc_cond_wait() */
vlc_mutex_lock( &p_input->stream.stream_lock ); vlc_mutex_lock( &p_input->stream.stream_lock );
/* Request thread destruction */ /* Request thread destruction */
/* Temporary demux2 hack */
p_demux = (demux_t *)vlc_object_find( p_input, VLC_OBJECT_DEMUX,
FIND_CHILD );
if( p_demux )
{
p_demux->b_die = 1;
vlc_object_release( p_demux );
}
p_input->b_die = 1; p_input->b_die = 1;
vlc_cond_signal( &p_input->stream.stream_wait ); vlc_cond_signal( &p_input->stream.stream_wait );
......
...@@ -128,6 +128,10 @@ void * __vlc_object_create( vlc_object_t *p_this, int i_type ) ...@@ -128,6 +128,10 @@ void * __vlc_object_create( vlc_object_t *p_this, int i_type )
i_size = sizeof(input_thread_t); i_size = sizeof(input_thread_t);
psz_type = "input"; psz_type = "input";
break; break;
case VLC_OBJECT_DEMUX:
i_size = sizeof(demux_t);
psz_type = "demux";
break;
case VLC_OBJECT_DECODER: case VLC_OBJECT_DECODER:
i_size = sizeof(decoder_t); i_size = sizeof(decoder_t);
psz_type = "decoder"; psz_type = "decoder";
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment