Filesrc dont play when connect to audiomixer dinamicaly.

Dmitry Pozhidaev dm.pozhidaev at gmail.com
Tue Nov 10 01:16:54 PST 2015


when I can get "time_already_playing"?
for sample it is correct?

gint64 l_tmp;
gst_element_query_position((QGst::ElementPtr)m_pipeline_ptr,
GST_FORMAT_TIME, &l_tmp);

i use qtgstreamer

2015-11-10 12:07 GMT+03:00 Tim Müller <tim at centricular.com>:

> On Mon, 2015-11-09 at 23:07 -0800, _dmp wrote:
>
> Hi,
>
> > I wish to dynamically connect filesrc to play the file to an existing
> > conveyer but I have no play wav file at all.
> >
> > So static pipeline looks like this:
> >
> > alsasrc ! audiomixer ! alsasink
> >
> > I dinamically create bin and connect his to audiomixer
> >
> > fileplaybin:  filesrc ! wavparse ! capsfilter ->to "audiomixer"
> >
> > I connect the probe to the point "capsfilter:src", to expect EOS (to
> > control the end of file playback).
> > Immediately after the start "fileplaybin" I get the EOS and the file
> > does not play.
> > If I connect "fileplaybin" to "alsasink"(I mean clean connect without
> > "alsasrc" and "audiomixer") - file is played normally. The problem is
> > in the dynamic connection chains "filesrc" to an existing pipeline.
> > What could be the problem and where do I look?
>
> wavparse will create a GstSegment + timestamps starting from 0.
>
> It doesn't know that your other branch (alsasrc ! audiomixer !
> alsasink) has been playing for a while already.
>
> So if after some time you hook up that wavparse branch to audiomixer,
> audiomixer will see timestamps (converted to running time) which are
> already in the past from its perspective, so it will just throw away
> all input buffers (or some, if you haven't playing that long yet).
>
> You can use
>
>   gst_pad_set_offset (pad, time_already_playing);
>
> to shift the timeline of the newly-added branch.
>
> Cheers
>  -Tim
>
> --
> Tim Müller, Centricular Ltd - http://www.centricular.com
>
>
> _______________________________________________
> gstreamer-devel mailing list
> gstreamer-devel at lists.freedesktop.org
> http://lists.freedesktop.org/mailman/listinfo/gstreamer-devel
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.freedesktop.org/archives/gstreamer-devel/attachments/20151110/b2e865d8/attachment.html>


More information about the gstreamer-devel mailing list