mirror of
https://gitlab.freedesktop.org/gstreamer/gstreamer.git
synced 2024-09-08 13:18:52 +00:00
audio: add more macros
This commit is contained in:
parent
85a3e7c98c
commit
17dd31b0f4
2 changed files with 19 additions and 0 deletions
|
@ -273,6 +273,9 @@ struct _GstAudioInfo {
|
||||||
|
|
||||||
#define GST_AUDIO_INFO_FORMAT(i) (GST_AUDIO_FORMAT_INFO_FORMAT((i)->finfo))
|
#define GST_AUDIO_INFO_FORMAT(i) (GST_AUDIO_FORMAT_INFO_FORMAT((i)->finfo))
|
||||||
#define GST_AUDIO_INFO_NAME(i) (GST_AUDIO_FORMAT_INFO_NAME((i)->finfo))
|
#define GST_AUDIO_INFO_NAME(i) (GST_AUDIO_FORMAT_INFO_NAME((i)->finfo))
|
||||||
|
#define GST_AUDIO_INFO_WIDTH(i) (GST_AUDIO_FORMAT_INFO_WIDTH((i)->finfo))
|
||||||
|
#define GST_AUDIO_INFO_DEPTH(i) (GST_AUDIO_FORMAT_INFO_DEPTH((i)->finfo))
|
||||||
|
#define GST_AUDIO_INFO_BPS(info) (GST_AUDIO_INFO_DEPTH(info) >> 3)
|
||||||
|
|
||||||
#define GST_AUDIO_INFO_FLAGS(info) ((info)->flags)
|
#define GST_AUDIO_INFO_FLAGS(info) ((info)->flags)
|
||||||
#define GST_AUDIO_INFO_IS_UNPOSITIONED(info) ((info)->flags & GST_AUDIO_FLAG_UNPOSITIONED)
|
#define GST_AUDIO_INFO_IS_UNPOSITIONED(info) ((info)->flags & GST_AUDIO_FLAG_UNPOSITIONED)
|
||||||
|
@ -293,6 +296,14 @@ GstCaps * gst_audio_info_to_caps (GstAudioInfo *info);
|
||||||
#define GST_AUDIO_RATE_RANGE "(int) [ 1, max ]"
|
#define GST_AUDIO_RATE_RANGE "(int) [ 1, max ]"
|
||||||
#define GST_AUDIO_CHANNELS_RANGE "(int) [ 1, max ]"
|
#define GST_AUDIO_CHANNELS_RANGE "(int) [ 1, max ]"
|
||||||
|
|
||||||
|
#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"
|
||||||
|
#else
|
||||||
|
# define GST_AUDIO_NE(s) G_STRINGIFY(s)"_BE"
|
||||||
|
# define GST_AUDIO_OE(s) G_STRINGIFY(s)"_LE"
|
||||||
|
#endif
|
||||||
|
|
||||||
#define GST_AUDIO_FORMATS_ALL " { S8, U8, " \
|
#define GST_AUDIO_FORMATS_ALL " { S8, U8, " \
|
||||||
"S16_LE, S16_BE, U16_LE, U16_BE, " \
|
"S16_LE, S16_BE, U16_LE, U16_BE, " \
|
||||||
"S24_LE, S24_BE, U24_LE, U24_BE, " \
|
"S24_LE, S24_BE, U24_LE, U24_BE, " \
|
||||||
|
|
|
@ -62,6 +62,14 @@ struct _GstAudioFilter {
|
||||||
gpointer _gst_reserved[GST_PADDING];
|
gpointer _gst_reserved[GST_PADDING];
|
||||||
};
|
};
|
||||||
|
|
||||||
|
#define GST_AUDIO_FILTER_INFO(filter) (&GST_AUDIO_FILTER_CAST(filter)->info)
|
||||||
|
|
||||||
|
#define GST_AUDIO_FILTER_FORMAT(filter) (GST_AUDIO_INFO_FORMAT(GST_AUDIO_FILTER_INFO(filter)))
|
||||||
|
#define GST_AUDIO_FILTER_RATE(filter) (GST_AUDIO_INFO_RATE(GST_AUDIO_FILTER_INFO(filter)))
|
||||||
|
#define GST_AUDIO_FILTER_CHANNELS(filter) (GST_AUDIO_INFO_CHANNELS(GST_AUDIO_FILTER_INFO(filter)))
|
||||||
|
#define GST_AUDIO_FILTER_BPF(filter) (GST_AUDIO_INFO_BPF(GST_AUDIO_FILTER_INFO(filter)))
|
||||||
|
#define GST_AUDIO_FILTER_BPS(filter) (GST_AUDIO_INFO_BPS(GST_AUDIO_FILTER_INFO(filter)))
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* GstAudioFilterClass:
|
* GstAudioFilterClass:
|
||||||
* @basetransformclass: parent class
|
* @basetransformclass: parent class
|
||||||
|
|
Loading…
Reference in a new issue