summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorWim Taymans <wim.taymans@collabora.co.uk>2011-08-24 14:13:33 +0200
committerWim Taymans <wim.taymans@collabora.co.uk>2011-08-24 14:13:33 +0200
commit0a1874461a21426826f3fe2e8655d7b6147b000f (patch)
tree8ef1e70432e3f3c9b7540eb3fe75b678d7e947fb
parent1bb83435fda91a4612b383194f56ef24c4c0b299 (diff)
downloadgstreamer-plugins-base-0a1874461a21426826f3fe2e8655d7b6147b000f.tar.gz
audio: rename UNPOSITIONED to DEFAULT_POSITIONS
Rename the UNPOSITIONED flag to the DEFAULT_POSITIONS flag because that is really what the resulting GstAudioInfo will contain as the chanel mappings.
-rw-r--r--gst-libs/gst/audio/audio.c3
-rw-r--r--gst-libs/gst/audio/audio.h10
-rw-r--r--gst/audioconvert/audioconvert.c3
-rw-r--r--gst/audioconvert/gstchannelmix.c2
4 files changed, 8 insertions, 10 deletions
diff --git a/gst-libs/gst/audio/audio.c b/gst-libs/gst/audio/audio.c
index 2753a62ee..2416c58e6 100644
--- a/gst-libs/gst/audio/audio.c
+++ b/gst-libs/gst/audio/audio.c
@@ -324,7 +324,8 @@ gst_audio_info_from_caps (GstAudioInfo * info, const GstCaps * caps)
info->position[i] = g_value_get_enum (pos_val_entry);
}
} else {
- info->flags |= GST_AUDIO_FLAG_UNPOSITIONED;
+ info->flags |= GST_AUDIO_FLAG_DEFAULT_POSITIONS;
+ /* FIXME, set default positions */
}
return TRUE;
diff --git a/gst-libs/gst/audio/audio.h b/gst-libs/gst/audio/audio.h
index f5a3d1e63..e0b1bbdeb 100644
--- a/gst-libs/gst/audio/audio.h
+++ b/gst-libs/gst/audio/audio.h
@@ -242,14 +242,14 @@ void gst_audio_format_fill_silence (const GstAudioFormatInfo *info
/**
* GstAudioFlags:
* @GST_AUDIO_FLAG_NONE: no valid flag
- * @GST_AUDIO_FLAG_UNPOSITIONED: unpositioned audio layout, position array
- * contains the default layout.
+ * @GST_AUDIO_FLAG_DEFAULT_POSITIONS: position array
+ * contains the default layout for the number of channels.
*
* Extra audio flags
*/
typedef enum {
- GST_AUDIO_FLAG_NONE = 0,
- GST_AUDIO_FLAG_UNPOSITIONED = (1 << 0)
+ GST_AUDIO_FLAG_NONE = 0,
+ GST_AUDIO_FLAG_DEFAULT_POSITIONS = (1 << 0)
} GstAudioFlags;
/**
@@ -283,7 +283,7 @@ struct _GstAudioInfo {
#define GST_AUDIO_INFO_BPS(info) (GST_AUDIO_INFO_DEPTH(info) >> 3)
#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_HAS_DEFAULT_POSITIONS(info) ((info)->flags & GST_AUDIO_FLAG_DEFAULT_POSITIONS)
#define GST_AUDIO_INFO_RATE(info) ((info)->rate)
#define GST_AUDIO_INFO_CHANNELS(info) ((info)->channels)
diff --git a/gst/audioconvert/audioconvert.c b/gst/audioconvert/audioconvert.c
index 69829a15a..509a85a66 100644
--- a/gst/audioconvert/audioconvert.c
+++ b/gst/audioconvert/audioconvert.c
@@ -608,9 +608,6 @@ audio_convert_prepare_context (AudioConvertCtx * ctx, GstAudioInfo * in,
/* first clean the existing context */
audio_convert_clean_context (ctx);
- g_return_val_if_fail (GST_AUDIO_INFO_IS_UNPOSITIONED (in) ==
- GST_AUDIO_INFO_IS_UNPOSITIONED (out), FALSE);
-
ctx->in = *in;
ctx->out = *out;
diff --git a/gst/audioconvert/gstchannelmix.c b/gst/audioconvert/gstchannelmix.c
index f4b350ade..a68f2c1ac 100644
--- a/gst/audioconvert/gstchannelmix.c
+++ b/gst/audioconvert/gstchannelmix.c
@@ -584,7 +584,7 @@ gst_channel_mix_fill_matrix (AudioConvertCtx * this)
gst_channel_mix_fill_identical (this);
- if (!GST_AUDIO_INFO_IS_UNPOSITIONED (&this->in)) {
+ if (!GST_AUDIO_INFO_HAS_DEFAULT_POSITIONS (&this->in)) {
gst_channel_mix_fill_compatible (this);
gst_channel_mix_fill_others (this);
gst_channel_mix_fill_normalize (this);