diff options
author | Sebastian Dröge <sebastian@centricular.com> | 2015-11-02 18:02:55 +0200 |
---|---|---|
committer | Sebastian Dröge <sebastian@centricular.com> | 2015-11-03 20:35:41 +0200 |
commit | ecf7c7742c0c8de5a34af9caae6cabefd20e57c9 (patch) | |
tree | 722981f44618a5bde925ba4555a4cb361cf38de1 /gst/mpegtsdemux | |
parent | 8a837c6715c43b146b2a57e276bbdedb53adc14e (diff) | |
download | gstreamer-plugins-bad-ecf7c7742c0c8de5a34af9caae6cabefd20e57c9.tar.gz |
tsdemux/mux: Add support for GstAudioClippingMeta for Opus
https://bugzilla.gnome.org/show_bug.cgi?id=757153
Diffstat (limited to 'gst/mpegtsdemux')
-rw-r--r-- | gst/mpegtsdemux/Makefile.am | 2 | ||||
-rw-r--r-- | gst/mpegtsdemux/tsdemux.c | 13 |
2 files changed, 7 insertions, 8 deletions
diff --git a/gst/mpegtsdemux/Makefile.am b/gst/mpegtsdemux/Makefile.am index 028373165..f0475c68d 100644 --- a/gst/mpegtsdemux/Makefile.am +++ b/gst/mpegtsdemux/Makefile.am @@ -15,7 +15,7 @@ libgstmpegtsdemux_la_LIBADD = \ $(top_builddir)/gst-libs/gst/mpegts/libgstmpegts-$(GST_API_VERSION).la \ $(top_builddir)/gst-libs/gst/codecparsers/libgstcodecparsers-$(GST_API_VERSION).la \ $(GST_PLUGINS_BASE_LIBS) -lgsttag-$(GST_API_VERSION) \ - -lgstpbutils-@GST_API_VERSION@ \ + -lgstpbutils-@GST_API_VERSION@ -lgstaudio-$(GST_API_VERSION) \ $(GST_BASE_LIBS) $(GST_LIBS) $(LIBM) libgstmpegtsdemux_la_LDFLAGS = $(GST_PLUGIN_LDFLAGS) libgstmpegtsdemux_la_LIBTOOLFLAGS = $(GST_PLUGIN_LIBTOOLFLAGS) diff --git a/gst/mpegtsdemux/tsdemux.c b/gst/mpegtsdemux/tsdemux.c index 3c61a33d2..bcc3018c7 100644 --- a/gst/mpegtsdemux/tsdemux.c +++ b/gst/mpegtsdemux/tsdemux.c @@ -38,6 +38,7 @@ #include <gst/tag/tag.h> #include <gst/pbutils/pbutils.h> #include <gst/base/base.h> +#include <gst/audio/audio.h> #include "mpegtsbase.h" #include "tsdemux.h" @@ -2363,13 +2364,11 @@ parse_opus_access_unit (TSDemuxStream * stream) if (start_trim_flag) { if (!gst_byte_reader_get_uint16_be (&reader, &start_trim)) goto error; - start_trim >>= 3; } if (end_trim_flag) { if (!gst_byte_reader_get_uint16_be (&reader, &end_trim)) goto error; - end_trim >>= 3; } if (control_extension_flag) { @@ -2393,13 +2392,13 @@ parse_opus_access_unit (TSDemuxStream * stream) goto error; buffer = gst_buffer_new_wrapped (packet_data, packet_size); - gst_buffer_list_add (buffer_list, buffer); - /* FIXME: Do something with start_trim and end_trim */ - if (start_trim != 0 || end_trim != 0) - GST_FIXME - ("Handling of Opus start_trim (%u) and end_trim (%u) not implemented", + if (start_trim != 0 || end_trim != 0) { + gst_buffer_add_audio_clipping_meta (buffer, GST_FORMAT_DEFAULT, start_trim, end_trim); + } + + gst_buffer_list_add (buffer_list, buffer); } while (gst_byte_reader_get_remaining (&reader) > 0); g_free (stream->data); |