docs: add some more audio macros

This commit is contained in:
Tim-Philipp Müller 2013-04-17 09:23:20 +01:00
parent 26fb72cf65
commit e96ca66c36
2 changed files with 35 additions and 0 deletions

View file

@ -155,7 +155,15 @@ GST_AUDIO_INFO_LAYOUT
GST_FRAMES_TO_CLOCK_TIME
GST_CLOCK_TIME_TO_FRAMES
GST_AUDIO_NE
GST_AUDIO_OE
GST_AUDIO_RATE_RANGE
GST_AUDIO_CHANNELS_RANGE
GST_AUDIO_FORMATS_ALL
GST_AUDIO_CAPS_MAKE
GST_AUDIO_DEF_RATE
GST_AUDIO_DEF_CHANNELS
GST_AUDIO_DEF_FORMAT
gst_audio_buffer_clip
<SUBSECTION Standard>
GST_TYPE_BUFFER_FORMAT

View file

@ -273,9 +273,31 @@ const GstAudioFormatInfo *
void gst_audio_format_fill_silence (const GstAudioFormatInfo *info,
gpointer dest, gsize length);
/**
* GST_AUDIO_RATE_RANGE:
*
* Maximum range of allowed sample rates, for use in template caps strings.
*/
#define GST_AUDIO_RATE_RANGE "(int) [ 1, max ]"
/**
* GST_AUDIO_CHANNELS_RANGE:
*
* Maximum range of allowed channels, for use in template caps strings.
*/
#define GST_AUDIO_CHANNELS_RANGE "(int) [ 1, max ]"
/**
* GST_AUDIO_NE:
* @s: format string without endianness marker
*
* Turns audio format string @s into the format string for native endianness.
*/
/**
* GST_AUDIO_OE:
* @s: format string without endianness marker
*
* Turns audio format string @s into the format string for other endianness.
*/
#if G_BYTE_ORDER == G_LITTLE_ENDIAN
# define GST_AUDIO_NE(s) G_STRINGIFY(s)"LE"
# define GST_AUDIO_OE(s) G_STRINGIFY(s)"BE"
@ -284,6 +306,11 @@ void gst_audio_format_fill_silence (const GstAudioFormatInfo *info
# define GST_AUDIO_OE(s) G_STRINGIFY(s)"LE"
#endif
/**
* GST_AUDIO_FORMATS_ALL:
*
* List of all audio formats, for use in template caps strings.
*/
#define GST_AUDIO_FORMATS_ALL " { S8, U8, " \
"S16LE, S16BE, U16LE, U16BE, " \
"S24_32LE, S24_32BE, U24_32LE, U24_32BE, " \