gst_discoverer_info_get_video_streams
gst_discoverer_audio_info_get_bitrate
gst_discoverer_audio_info_get_channels
+gst_discoverer_audio_info_get_channel_mask
gst_discoverer_audio_info_get_depth
gst_discoverer_audio_info_get_language
gst_discoverer_audio_info_get_max_bitrate
ret = gst_discoverer_audio_info_new ();
ret->channels = ptr->channels;
+ ret->channel_mask = ptr->channel_mask;
ret->sample_rate = ptr->sample_rate;
ret->depth = ptr->depth;
ret->bitrate = ptr->bitrate;
AUDIO_INFO_ACCESSOR_CODE (channels, guint, 0);
/**
+ * gst_discoverer_audio_info_get_channel_mask:
+ * @info: a #GstDiscovererAudioInfo
+ *
+ * Returns: the channel-mask of the stream, refer to
+ * gst_audio_channel_positions_from_mask() for more
+ * information.
+ *
+ * Since: 1.14
+ */
+
+AUDIO_INFO_ACCESSOR_CODE (channel_mask, guint64, G_MAXUINT64);
+
+/**
* gst_discoverer_audio_info_get_sample_rate:
* @info: a #GstDiscovererAudioInfo
*
if (g_str_has_prefix (name, "audio/")) {
GstDiscovererAudioInfo *info;
const gchar *format_str;
+ guint64 channel_mask;
info = (GstDiscovererAudioInfo *) make_info (parent,
GST_TYPE_DISCOVERER_AUDIO_INFO, caps);
if (gst_structure_get_int (caps_st, "channels", &tmp))
info->channels = (guint) tmp;
+ if (gst_structure_get (caps_st, "channel-mask", GST_TYPE_BITMASK,
+ &channel_mask, NULL)) {
+ info->channel_mask = channel_mask;
+ } else if (info->channels) {
+ info->channel_mask = gst_audio_channel_get_fallback_mask (info->channels);
+ }
+
/* FIXME: we only want to extract depth if raw audio is what's in the
* container (i.e. not if there is a decoder involved) */
format_str = gst_structure_get_string (caps_st, "format");
static GVariant *
_serialize_audio_stream_info (GstDiscovererAudioInfo * ainfo)
{
- return g_variant_new ("(uuuuums)",
+ return g_variant_new ("(uuuuumst)",
ainfo->channels,
ainfo->sample_rate,
- ainfo->bitrate, ainfo->max_bitrate, ainfo->depth, ainfo->language);
+ ainfo->bitrate, ainfo->max_bitrate, ainfo->depth, ainfo->language,
+ ainfo->channel_mask);
}
static GVariant *
if (str)
ainfo->language = g_strdup (str);
+ GET_FROM_TUPLE (specific, uint64, 6, &ainfo->channel_mask);
+
g_variant_unref (specific);
}
guint gst_discoverer_audio_info_get_channels(const GstDiscovererAudioInfo* info);
GST_EXPORT
+guint64 gst_discoverer_audio_info_get_channel_mask(const GstDiscovererAudioInfo* info);
+
+GST_EXPORT
guint gst_discoverer_audio_info_get_sample_rate(const GstDiscovererAudioInfo* info);
GST_EXPORT
* Boston, MA 02110-1301, USA.
*/
+#include "gstdiscoverer.h"
+
struct _GstDiscovererStreamInfo {
GObject parent;
struct _GstDiscovererAudioInfo {
GstDiscovererStreamInfo parent;
+ guint64 channel_mask;
guint channels;
guint sample_rate;
guint depth;
gst_codec_utils_opus_parse_header
gst_discoverer_audio_info_get_bitrate
gst_discoverer_audio_info_get_channels
+ gst_discoverer_audio_info_get_channel_mask
gst_discoverer_audio_info_get_depth
gst_discoverer_audio_info_get_language
gst_discoverer_audio_info_get_max_bitrate