I am wondering that streamsynchronizer is only for 1-video and 1-audio and 1-text
Sebastian Dröge
slomo at circular-chaos.org
Mon Oct 7 04:52:23 PDT 2013
On Mo, 2013-10-07 at 03:38 -0700, HoonHee Lee wrote:
> I am trying to play multiple stream with streamsynchronizer and
> streamid-demuxer (https://bugzilla.gnome.org/show_bug.cgi?id=707605)
>
> [...]
>
>
> Without streamsynchronizer, this test-code working fine with creating
> sine.ogg and pink.ogg
> When I tried to use streamsynchronizer, there is a blocking issue with this
> function.
>
> static gboolean
> gst_stream_synchronizer_sink_event (GstPad * pad, GstObject * parent,
> GstEvent * event)
> {
> ...
> switch (GST_EVENT_TYPE (event)) {
> case GST_EVENT_STREAM_START:
> {
> ...
> for (l = self->streams; l; l = l->next) {
> GstStream *ostream = l->data;
>
> *all_wait* = all_wait && ostream->wait && (!have_group_id
> || ostream->group_id == group_id);
> if (!all_wait)
> break;
> }
> ...
> case GST_EVENT_SEGMENT:{
> ...
> if (stream) {
> if (stream->wait) {
> *GST_DEBUG_OBJECT (pad, "Stream %d is waiting",
> stream->stream_number);*
> g_cond_wait (&stream->stream_finish_cond, &self->lock);
> stream = gst_pad_get_element_private (pad);
> if (stream)
> stream->wait = FALSE;
> }
> }
> ...
> }
>
> When second stream-start event is coming, In GST_EVENT_STREAM_START,
> "all_wait" is not set as TRUE,
> so, in GST_EVENT_SEGMENT, stream->wait is not set FALSE and then "Stream %d
> is waiting" message is printed and waiting continuously.
>
> I am wondering that streamsynchronizer is only for 1-video and 1-audio and
> 1-text not multiple streams such as 2-audio stream.
It works for multiple audio/video/subtitle streams too. The problem for
you here is that streamsynchronizer detects that a stream is changing
(i.e. the same sinkpad of it gets a new stream). Then it waits for all
other streams (the other sinkpads) to finish first.
A stream change is detected by streamsynchronizer by looking at the
group ids of the stream-start event. (Or if no group id is set, in which
case your code should be fixed, it will compare the sequence numbers of
the stream-start event).
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 836 bytes
Desc: This is a digitally signed message part
URL: <http://lists.freedesktop.org/archives/gstreamer-devel/attachments/20131007/82b3c788/attachment-0001.pgp>
More information about the gstreamer-devel
mailing list