[gst-devel] gstreamer gstbasetransform

Michael Smith msmith at xiph.org
Sun Jan 31 00:54:28 CET 2010


On Sat, Jan 30, 2010 at 2:43 AM, Federico Paganini
<black_eagle85 at hotmail.com> wrote:
> Hi,
>
> I briefly explain to you my problem. For my thesis i am developing a
> gstreamer plug-in that encrypt an mpeg4 video with DES in CBC mode. The
> encryption is made frame by frame and because a frame doesn't contain an
> exact number of DES BLOCK SIZE(64 bit) i must padding the final bytes of the
> frame. Because i use padding the dimension of the frame in output is greater
> than that in input. For this reason i must allocate an output buffer of a
> precise size. So in the trasform function of my plug in i have tried to call
> this function: gst_base_transform_prepare_output_buffer( base, inbuf,
> newSize, inbuf->caps,&outbuf ); but when i try to compile i have this
> error:error: implicit declaration of function
> ‘gst_base_transform_prepare_output_buffer’ nevertheless i have done the
> include of gstbasetransform.h.
> I would be very happy if you can say to me how i must to  allocate an output
> buffer that is larger than input.

For what you're doing, you probably don't want to make your element a
subclass of GstBaseTransform at all - instead you should directly
subclass GstElement. You can use gst_pad_alloc_buffer() or
gst_buffer_new_and_alloc() to allocate your output buffer with any
size you want.

Mike




More information about the gstreamer-devel mailing list