[gst-devel] multithreads multiproblems

yuri noferini yurix at picsi.it
Thu Mar 10 07:05:31 CET 2005


hi again guys,

first a small info about what i'm doing:
i'd like to have a small app capable to transcode A/V from some format
to an a priori defined set of formats
for example, the input should be an A/V stream from a dv camera and from
it, i want an mpeg2 audio/video file, an avi with mpeg4 video and mpeg3
audio....so on.
Further, i want be able to use different sources for audio and video:
video from a file, sound from an other.

i choose this setup:

AudioSourceThread
|
|
+------>AudioEncoder-------+
			   |
			   |
			   AviMuxerThread
			   |
			   |
+------->VideoEncoder------+
|
|
VideoSourceThread

because i want that the same audioencoder ,for example, could be  linked
to many Muxer, i use this schema for the encoding thread

queue----encoder---tee

same for video encoding thread.


at the same time, i want different encodings for video and audio both.
so i use this :

AudioSourceThread
|
|
+------>AudioEncoder0-------+
|
|
+------->AudioEncoder1------+
|
|
+------->AudioEncoder2------+

where audiosource is something like that:

filesrc---decodebin______tee---osssink(just for debug)

where "_______" rapresents part of the chain created and linked at
runtime.

at this moment the app runs with one encoder for video and audio, but
with strange behaviour : 
when it starts i can see the video output on a sdlvideosink, but the
audio stopped to play on a osssink after a couple of seconds and restart
just after the video finish.
at the end,however, i get an avi file as expected.
the following is the output with gstdebug=*:3 at the audio stop:


WARN  (0x81981e0 - 308462:36:04.001644000)  GST_SCHEDULING(14325)
gstpad.c(3178):_invent_event: needed to invent a DISCONT 0x805f028 (no
time) for audio_enc at mpeg3:src => audio_tee at mpeg3:sink
WARN  (0x81ae840 - 308462:36:04.002116000)  GST_SCHEDULING(14325)
gstpad.c(3178):_invent_event: needed to invent a DISCONT 0x805ef70 (no
time) for av_mux at file:src => av_sink at file:sink
WARN  (0x81c1fa8 - 308462:36:04.036218000)  GST_SCHEDULING(14325)
gstpad.c(3178):_invent_event: needed to invent a DISCONT 0x805ef70 (no
time) for id3demux0:src => mad0:sink
WARN  (0x81c1fa8 - 308462:36:04.036438000)             mad(14325)
gstmad.c(948):gst_mad_handle_event: Failed to retrieve sample position




-- 
yuri noferini <yurix at picsi.it>




More information about the gstreamer-devel mailing list