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.
This commit is contained in:
Wim Taymans 2011-08-24 16:40:43 +02:00
parent 0a1874461a
commit 24ea19935f
2 changed files with 7 additions and 7 deletions

View file

@ -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;
};

View file

@ -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;
};