Playbin with a passthrough sink.
Nox Deleo
noxdeleo at googlemail.com
Fri Jan 4 08:57:38 PST 2013
Some progress...interaudiosink/src worked ok at first (some latency
issues), but then weird stuff happened when the playbin got to the second
track (it looped a sped up section of the track). Guess that's why they're
in plugins-bad. So anyway I went with appsink/appsrc (appsrc stream-type
set to "stream", with "is-live" set to true, and format as
GST_FORMAT_TIME), and everything seems to work perfectly except that I'm
getting small regular underflows on the pulsesink I'm using to monitor the
output. It sounds like a clicking a few times a second at a regular
interval. I've set the appsink to "emit-signals, and as soon as a
preroll/regular sample comes in, I push it straight into the appsrc. The
appsink "sync" property is set to true. The interesting thing is that the
underflows became irregular after the track had been playing a while,
eventually stopping altogether.
On 3 January 2013 20:28, Nox Deleo <noxdeleo at googlemail.com> wrote:
> Thanks for the suggestions and the clarification...don't know why I didn't
> twig to use appsink/src etc before.
>
>
> On 3 January 2013 20:05, Tim-Philipp Müller <t.i.m at zen.co.uk> wrote:
>
>> On Thu, 2013-01-03 at 18:24 +0000, Nox Deleo wrote:
>>
>> > I'm trying to use playbin in an unconventional way at the moment.
>> > Because of its built in functionality, it's ideal for me to use as a
>> > source that spits out raw audio from a continuous playlist without
>> > having to reinvent the wheel with different parts. I'm trying to get a
>> > ghost pad on the outer layer of playbin that I can hook into the rest
>> > of my pipeline, rather than playbin's 'playsink' being the end of the
>> > graph.
>> >
>> > Looking at a debug graph, it looks like I would have to add ghost pads
>> > to the 'audio-sink' element I specify, all the way up through a
>> > GstBin, a GstPlaySink to the PlayBin itself. This is a pretty ugly
>> > hack, and I don't really like the idea of messing with playbin
>> > internals, so I'm wondering if anyone knows a better way of doing
>> > this?
>>
>> You could use appsink elements to extract the data and then feed them to
>> another pipeline (set sync=true on the sinks to make them sync against
>> the clock).
>>
>> You might possibly also find the inter{audio,video}sink elements useful
>> (in combination with an inter{audios,video}src in another pipeline.
>>
>> > Also, out of interest, is there any reason why I can't link a pad
>> > embedded in several layers of bins to another outside of these? It
>> > complains about 'no common ancestor' at the moment, but I'm just
>> > curious as to the reason.
>>
>> Not sure what you're doing with ghost pads tbh, it just sounds wrong.
>> You can supply your own sink element, or a bin containing other elements
>> and ending in a sink (then you need to create a ghost pad for the bin
>> that points to the first element in the chain inside it). But just
>> adding ghostpads won't achieve anything.
>>
>> No common ancestore usually either means you're trying to link an
>> element that's not inside a pipeline/bin yet, or they're not at the same
>> level inside the bin/pipeline hierarchy (the reasons ghostpads exist, so
>> you can expose pads from inside a bin at the one-up bin level).
>>
>> Cheers
>> -Tim
>>
>>
>> _______________________________________________
>> 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/20130104/373196ec/attachment.html>
More information about the gstreamer-devel
mailing list