Using appsrc with infrequent buffers

Adam Goodwin adam.goodwin.nz at gmail.com
Tue Sep 10 08:10:20 PDT 2013


Hi again, (sorry to keep asking for help so much :/).

I've still got my H264 streams going from cameras into a matroskamux (and
one stream being sent over RTP). At the moment I'm working with only one
v4l2src, because this seems to work stably for me, so there's only one
video stream.

I've now added an appsrc which I've hooked up to the a subtitle pad on the
matroskamux. I haven't put together the subtitle retrieval at the playback
side of things, but the appsrc seems to be working when I push buffers
(none of my error checks come back with anything).

However:

My video doesn't seem to be sent over RTP unless I type a line of text into
my application - which causes the appsrc to push a buffer (with the text
forming a subtitle). Once I've typed a line, I start to see video in my RTP
receiver application. However, it quickly comes to a stop again until I
type more. So it appears the pipeline doesn't like it when appsrc isn't
contributing.

As well as this, if I play my resulting MKV in VLC, the playback is
completely messed up. Whole sections of video are missing (or maybe sped up
so much that they're essentially skipped), and the progress bar skips
around all over the place. Despite this, I did see my appsrc subtitles
displayed by VLC a few times. So it suggests to me that there are timing
issues in the pipeline, and that it's not necessarily anything to do with
the appsrc related stuff (although it was adding the appsrc that triggered
these issues, which are somewhat similar to those I was having when a
second camera is introduced). Is it possible that the matroskamux is having
issues with multiple input streams?

I've essentially followed the example here for the appsrc related stuff,
http://gstreamer.freedesktop.org/data/doc/gstreamer/head/manual/html/section-data-spoof.html,
and I've set the "do-timestamp property" so that the appsrc handles
timestamping for me. ("min-latency" is set to 0 and max is left at the
default). I've also set "is-live" to true, and the caps of the appsrc are
"text/x-raw, format=utf8". The only other difference I can think of is that
I don't use the "need-data" callback to push data. I just do it when the
user enters a line.

So I was hoping someone might know something about the misbehaviour of the
pipeline, which is helped if I get appsrc to push a buffer rather than
doing nothing. Is it a known thing that appsrc has to frequently push data
for a pipeline to work smoothly? And, It's a long shot, but maybe there's
some ideas out there about the myriad other issues I'm having? Again,
apologies that I'm not giving much helpful information - it's just with
these kinds of issues I have no idea where to start debugging or even what
information is relevant.

I can provide my source code if anyone's willing to go that far to help.
Anyway, thanks in advance if there's any advice on offer.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.freedesktop.org/archives/gstreamer-devel/attachments/20130911/47c7d404/attachment.html>


More information about the gstreamer-devel mailing list