appsrc usage (push and pull mode)
Sebastian Dröge
sebastian at centricular.com
Sun Oct 27 22:42:39 CET 2013
On Mo, 2013-10-21 at 07:46 -0700, distran wrote:
> [...]
> Questions:
> - In "push" mode - how often is actually "push-buffer" signal invoked?
> What, if there are a lot of "higher priority events"? How precisely can we
> control the rate with which "push-buffer" signal is emitted (for the
> pipeline it is usually required to send frames with approximately specified
> rate)?
push-buffer is an action signal, you invoke/emit it and not appsrc. It
happens as often as you do that. And will block if the appsrc buffer
queue is filled until downstream handles another buffer.
> - What is the difference between g_signal_emit_by_name (app->appsrc,
> "push-buffer", buffer, &ret); and using directly ret =
> gst_app_src_push_buffer(app->src, buffer); ?
None at all
> - In both modes function, that emits "push-buffer" signal is invoked
> somewhat automatically (in "pull" mode, when we receive "need-data" signal,
> and in "push" mode when there are no higher priority events). Is it possible
> to directly emit "push-buffer" signal when we have our frame ready to emit?
> (as I said before, in my architecture I have an element, that generates
> frames constantly with a certain frame rate. Would it be possible to emit
> "push-buffer" every time frame is generated? What are the drawbacks of such
> solution? - I tried emitting "push-buffer" signal directly from producer
> thread and it seems to work well).
Yes, that's exactly what you should do. Start a thread and from that
thread push buffers to appsrc as fast as possible.
--
Sebastian Dröge <sebastian at centricular.com>
Centricular Ltd - http://www.centricular.com
Expertise, Straight from the Source
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 966 bytes
Desc: This is a digitally signed message part
URL: <http://lists.freedesktop.org/archives/gstreamer-devel/attachments/20131027/7296938b/attachment.pgp>
More information about the gstreamer-devel
mailing list