From 24ea19935fcb6186329c5774de41323f0c1f7454 Mon Sep 17 00:00:00 2001 From: Wim Taymans Date: Wed, 24 Aug 2011 16:40:43 +0200 Subject: [PATCH] audio/video: add format of the pack functions Replace the unpack_size with an unpack_format, which is more descriptive of the kind of data the unpack function will create. --- gst-libs/gst/audio/audio.h | 7 ++++--- gst-libs/gst/video/video.h | 7 +++---- 2 files changed, 7 insertions(+), 7 deletions(-) diff --git a/gst-libs/gst/audio/audio.h b/gst-libs/gst/audio/audio.h index e0b1bbd..9bff91d 100644 --- a/gst-libs/gst/audio/audio.h +++ b/gst-libs/gst/audio/audio.h @@ -167,7 +167,7 @@ typedef enum * Unpacks @length samples from the given data of format @info. * The samples will be unpacked into @dest which each channel * interleaved. @dest should at least be big enough to hold @length * - * channels * unpack_size bytes. + * channels * size(unpack_format) bytes. */ typedef void (*GstAudioFormatUnpack) (GstAudioFormatInfo *info, gpointer dest, const gpointer data, gint length); @@ -194,7 +194,7 @@ typedef void (*GstAudioFormatPack) (GstAudioFormatInfo *info, const gp * @width: amount of bits used for one sample * @depth: amount of valid bits in @width * @silence: @width/8 bytes with 1 silent sample - * @unpack_size: number of bytes for the unpack functions + * @unpack_format: the format of the unpacked samples * @unpack_func: function to unpack samples * @pack_func: function to pack samples * @@ -208,7 +208,8 @@ struct _GstAudioFormatInfo { gint width; gint depth; guint8 silence[8]; - guint unpack_size; + + GstAudioFormat unpack_format; GstAudioFormatUnpack unpack_func; GstAudioFormatPack pack_func; }; diff --git a/gst-libs/gst/video/video.h b/gst-libs/gst/video/video.h index e4e5252..594ab84 100644 --- a/gst-libs/gst/video/video.h +++ b/gst-libs/gst/video/video.h @@ -177,7 +177,7 @@ typedef enum * Unpacks @width pixels from the given planes and strides containing data of * format @info. The pixels will be unpacked into @dest which each component * interleaved. @dest should at least be big enough to hold @width * - * n_components * unpack_size bytes. + * n_components * size(unpack_format) bytes. */ typedef void (*GstVideoFormatUnpack) (GstVideoFormatInfo *info, gpointer dest, const gpointer data[GST_VIDEO_MAX_PLANES], @@ -226,8 +226,7 @@ typedef void (*GstVideoFormatPack) (GstVideoFormatInfo *info, const gp * GST_VIDEO_SUB_SCALE to scale a width. * @h_sub: subsampling factor of the height for the component. Use * GST_VIDEO_SUB_SCALE to scale a height. - * @unpack_size: the size in bytes of each component item in the unpacked - * format. + * @unpack_format: the format of the unpacked pixels. * @unpack_func: an unpack function for this format * @pack_func: an pack function for this format * @@ -248,7 +247,7 @@ struct _GstVideoFormatInfo { guint w_sub[GST_VIDEO_MAX_COMPONENTS]; guint h_sub[GST_VIDEO_MAX_COMPONENTS]; - guint unpack_size; + GstVideoFormat unpack_format; GstVideoFormatUnpack unpack_func; GstVideoFormatPack pack_func; }; -- 2.7.4