for (i = 0; i < max_pos; i++) {
pos_val_entry = gst_value_array_get_value (pos_val_arr, i);
info->position[i] = g_value_get_enum (pos_val_entry);
+
+ /* the unpositioned flag is set as soon as one of the channels has an
+ * explicit NONE positioning */
+ if (info->position[i] == GST_AUDIO_CHANNEL_POSITION_NONE)
+ info->flags |= GST_AUDIO_FLAG_UNPOSITIONED;
}
} else {
info->flags |= GST_AUDIO_FLAG_DEFAULT_POSITIONS;
* @GST_AUDIO_FLAG_NONE: no valid flag
* @GST_AUDIO_FLAG_DEFAULT_POSITIONS: position array
* contains the default layout for the number of channels.
+ * @GST_AUDIO_FLAG_UNPOSITIONED: the position array explicitly
+ * contains unpositioned channels.
*
* Extra audio flags
*/
typedef enum {
GST_AUDIO_FLAG_NONE = 0,
- GST_AUDIO_FLAG_DEFAULT_POSITIONS = (1 << 0)
+ GST_AUDIO_FLAG_DEFAULT_POSITIONS = (1 << 0),
+ GST_AUDIO_FLAG_UNPOSITIONED = (1 << 1)
} GstAudioFlags;
/**
#define GST_AUDIO_INFO_FLAGS(info) ((info)->flags)
#define GST_AUDIO_INFO_HAS_DEFAULT_POSITIONS(info) ((info)->flags & GST_AUDIO_FLAG_DEFAULT_POSITIONS)
+#define GST_AUDIO_INFO_IS_UNPOSITIONED(info) ((info)->flags & GST_AUDIO_FLAG_UNPOSITIONED)
#define GST_AUDIO_INFO_RATE(info) ((info)->rate)
#define GST_AUDIO_INFO_CHANNELS(info) ((info)->channels)