Question on passing a buffer larger than the pixel size

Nicolas Dufresne nicolas.dufresne at collabora.com
Mon Nov 9 05:41:48 PST 2015


Le lundi 09 novembre 2015 à 11:01 +0000, James Hughes a écrit :
> I have tried videobox, videoscale etc, but these all result in the
> encoder encoding at 1088. Is there any way to use buffer sizes at
> 1088 but with actual image dimensions at 1080?

The encoder should implement a propose_allocation method, offering a
pool (I guess GstVideoPool if none exist already) that is pre
-configured with the required alignement (see GstVideoAlignement
structure). Then on reception of buffers, it is requires to check the
alignment of the buffer. This check can be tricky, you can check the
GstMemory sizes, the GstVideoMeta offsets and figure-out if they are
large enough, or you could check that the buffer is from a pool and
read-back the alignment form there. The second method is not a catch
all, but it's much easier to implement. If the alignment isn't correct,
create an internal pool with the appropriate alignement and copy (see
gst_video_frame_copy).

Nicolas
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 181 bytes
Desc: This is a digitally signed message part
URL: <http://lists.freedesktop.org/archives/gstreamer-devel/attachments/20151109/791be219/attachment.sig>


More information about the gstreamer-devel mailing list