Is there any function where I can process my encoded frame under GstVideoEncoderClass ?
Sebastian Dröge
sebastian at centricular.com
Mon Feb 15 22:22:11 UTC 2016
On Do, 2016-02-11 at 05:08 -0800, ssshukla26 wrote:
> Hi,
>
> I know how *handle_frame* function of GstVideoEncoderClass works.
>
> But is there a way to implement the following use case of mine ?
>
> 1) I start encoding process of an incoming frame in *handle_frame*
> function 2) I fill this encoded frame data to the output buffer in
> some "*other*" function and then the frames are pushed downstream as
> it is. ! "*like a bottom half serving to an interrupt call*"
>
> I need some insight on this cause my hardware encoder driver is made
> in such a way that I have to make two threads, one to get the
> responses from encoder and second thread to do the processing of the
> responses in first come first serve fashion.
>
> So if there is any way to process encoded frames under a function
> instead of
> *handle_frame* function please let me know "*which function and how
> to do
> it*" ! If not, can anyone just reply "NO" just to make my doubt
> clear.
Take a look at the existing hardware encoders based on GstVideoEncoder,
or most of the decoders based on GstVideoDecoder.
You can take the input from the video codec frame, and then at a later
time fill the output buffer in the frame and call
gst_video_encoder_finish_frame() on it once you're done. handle_frame()
and finish_frame() can even be in different threads, as is done in gst-
omx and the Android MediaCodec elements for example.
--
Sebastian Dröge, Centricular Ltd · http://www.centricular.com
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 949 bytes
Desc: This is a digitally signed message part
URL: <https://lists.freedesktop.org/archives/gstreamer-devel/attachments/20160216/5c0a6dee/attachment.sig>
More information about the gstreamer-devel
mailing list