Commit graph

201 commits

Author SHA1 Message Date
Vincent Penquerc'h
30e29b6fdb mad: helpfully bodge the last buffer to let mad decode the last frame
If http://www.mars.org/mailman/public/mad-dev/2001-May/000262.html is
to be believed, the last buffer must be followed by a number of 0 bytes
in order for the last frame to be decoded (at least in some cases).
Doing so seems to work here, fixing a missing 1152 samples when using
mp3parse before mad (not using mp3parse would yield the correct amount
of samples, if there's extra non-MP3 data after (eg, tag data)).
2011-12-22 15:23:54 +00:00
Mark Nauwelaerts
260824b278 mad: port to audiodecoder 2011-12-14 17:37:47 +01:00
Vincent Penquerc'h
213ce049ad various: fix pad template ref leaks
https://bugzilla.gnome.org/show_bug.cgi?id=662664
2011-11-28 13:10:01 +00:00
Tim-Philipp Müller
56bd24365a mad: remove id3tag dependency used by in practice unreachable legacy code
The mad mp3 decoder element shouldn't parse tags at all really, but we
have so far kept this code around for backwards-compatibility reasons
for people building manual pipelines for some reason. However, as it
turns out that code has never actually worked in 0.10 in practice,
since it only gets executed if mad_frame_decode() returns LOSTSYNC,
which doesn't actually seem to happen any more though because of the
preceding mad_header_decode(), which will discover and report the
sync loss if it runs into a tag and make mad_frame_decode() try to
resync right away.

Discovered this while trying to make it use gst_tag_list_from_id3v2_tag().
2011-09-13 19:40:12 +01:00
Stefan Kost
d229a538dc mad: use signed when caluculating the delta
Avoids a <0 check for an unsigned variable.
2011-05-20 13:31:14 +03:00
Sebastian Dröge
1e0d2d67b4 mad: Post bitrate tag whenever the bitrate changes
Also send the layer/mode/emphasis/bitrate tags as an event too.
2011-05-14 12:05:56 +02:00
Tim-Philipp Müller
65565c8a1e mad: build the mad plugin even if libid3tag is not available
ID3 tags are usually handled by id3demux, and should be handled
by id3demux. Tag handling in mad based on libid3tag is very basic
and mostly unnecessary really, so just build this plugin without
ID3 tag support if libid3tag is not available.
2011-03-11 18:37:10 +00:00
Stefan Kost
b3c04da6c3 index: remove conditional index support
Index support cannot be disabled since commit
4bfb1fe70c
in core, which removed the configure flags to disable index.
2011-02-21 11:05:31 +02:00
Stefan Kost
2b9048ede9 formatting: trim trailing whitespace 2011-02-17 18:06:51 +02:00
Stefan Kost
9424c553b9 index: use delta frame flags instead of 0 or none 2011-02-17 18:05:58 +02:00
Sebastian Dröge
3dae13383d mad: If gst_pad_alloc_buffer() returns a buffer with the wrong size allocate a new one
Fixes bug #635461.
2010-12-16 10:32:37 +01:00
Edward Hervey
2a84e4332a mad: Remove dead assignments 2010-11-25 19:51:40 +01:00
Stefan Kost
26cd4ee3a0 various: canonicalize property names 2010-10-19 12:24:13 +03:00
Stefan Kost
3bb4b5069e various (ext): add a missing G_PARAM_STATIC_STRINGS flags 2010-10-19 10:06:33 +03:00
Mark Nauwelaerts
7bba22772e mad: support reverse playback 2010-10-04 10:33:28 +02:00
Sebastian Dröge
c88c88de0d build: Add all kinds of compiler warning flags and fix the resulting warnings 2010-03-24 11:27:40 +01:00
Benjamin Otte
9850bd814f gst_element_class_set_details => gst_element_class_set_details_simple 2010-03-18 15:53:14 +01:00
Stefan Kost
30a4d82edd mad: add missing include to fix the build 2009-10-07 14:05:08 +03:00
Tim-Philipp Müller
78ed09615b mad, id3mux: (re)move broken, unmaintained and unloved id3mux element
It will be reborn with a shiny new code base under its hood in -bad.
See #581756 and #565764.
2009-06-05 21:04:07 +01:00
Edward Hervey
88db06cb65 mad: Add duration of incoming/outgoing buffers in debug statements 2009-05-06 13:17:35 +02:00
Edward Hervey
2ff7c811f8 mad: Remove dead assignment and variables given values which are never read. 2009-04-19 14:02:44 +02:00
Zaheer Merali
45163cdf71 mad: remove log line added in error 2009-02-19 19:10:53 +00:00
Zaheer Merali
a2b0e47739 mad: just flush data when seeing BADDATAPTR instead of going into error state 2009-02-19 19:08:10 +00:00
Wim Taymans
26209707d9 ext/mad/gstmad.*: track discont on incomming buffers and set discont on outgoing buffers.
Original commit message from CVS:
* ext/mad/gstmad.c: (gst_mad_src_event), (gst_mad_chain),
(gst_mad_change_state):
* ext/mad/gstmad.h:
track discont on incomming buffers and set discont on outgoing
buffers.
Pass unknown events upstreams instead of dropping them.
2008-10-08 13:59:57 +00:00
Sameer Naik
ffc4369fb5 ext/mad/gstmad.*: Fix compilation with --disable-index. Fixes bug #554142.
Original commit message from CVS:
Patch by: Sameer Naik <sameer dot subscriptions at damagehead dot com>
* ext/mad/gstmad.c: (gst_mad_class_init), (gst_mad_dispose),
(gst_mad_src_event), (gst_mad_chain):
* ext/mad/gstmad.h:
Fix compilation with --disable-index. Fixes bug #554142.
2008-09-28 17:31:37 +00:00
Stefan Kost
c49cf83ee3 Add missing elements to docs. Restore alphabetical order in section file. Document mad (it was included in docs alrea...
Original commit message from CVS:
* docs/plugins/gst-plugins-ugly-plugins-docs.sgml:
* docs/plugins/gst-plugins-ugly-plugins-sections.txt:
* ext/a52dec/gsta52dec.c:
* ext/amrnb/amrnbdec.c:
* ext/amrnb/amrnbenc.c:
* ext/amrnb/amrnbparse.c:
* ext/lame/gstlame.c:
* ext/mad/gstmad.c:
* ext/sidplay/gstsiddec.cc:
* gst/asfdemux/gstrtspwms.c:
* gst/mpegaudioparse/gstxingmux.c:
* gst/realmedia/rademux.c:
* gst/realmedia/rdtmanager.c:
* gst/realmedia/rtspreal.c:
* gst/synaesthesia/gstsynaesthesia.c:
Add missing elements to docs. Restore alphabetical order in section
file. Document mad (it was included in docs already).
Fix doc-markup: use convinience syntax for examples
(produces valid docbook), add several refsec2 when we have several
titles. Fix some types.
2008-06-13 06:57:21 +00:00
Edward Hervey
6385946841 ext/mad/gstmad.c: Fix inconsistent use of rate and channels.
Original commit message from CVS:
* ext/mad/gstmad.c: (gst_mad_convert_src), (gst_mad_chain):
Fix inconsistent use of rate and channels.
Fixes #533581
2008-05-19 15:07:07 +00:00
Edward Hervey
130c46902a Always let FLUSH_START events flow downstream.
Original commit message from CVS:
* ext/mad/gstmad.c: (gst_mad_sink_event):
* gst/mpegaudioparse/gstmpegaudioparse.c:
(gst_mp3parse_sink_event):
Always let FLUSH_START events flow downstream.
2008-05-10 00:44:00 +00:00
Sebastian Dröge
71f6199a90 Push EOS, FLUSH_STOP and NEWSEGMENT immediately instead of dropping and leaking them.
Original commit message from CVS:
* ext/mad/gstmad.c: (gst_mad_sink_event):
* gst/mpegaudioparse/gstmpegaudioparse.c:
(gst_mp3parse_sink_event):
Push EOS, FLUSH_STOP and NEWSEGMENT immediately instead
of dropping and leaking them.
2008-02-27 15:23:51 +00:00
Sebastian Dröge
b6529e9d60 Cache all events except EOS if we still have to send a NEWSEGMENT event. This will let TAG events be forwarded until ...
Original commit message from CVS:
* ext/mad/gstmad.c: (gst_mad_dispose), (gst_mad_sink_event),
(gst_mad_chain):
* ext/mad/gstmad.h:
* gst/mpegaudioparse/gstmpegaudioparse.c: (gst_mp3parse_dispose),
(gst_mp3parse_sink_event), (gst_mp3parse_emit_frame):
* gst/mpegaudioparse/gstmpegaudioparse.h:
Cache all events except EOS if we still have to send a NEWSEGMENT
event. This will let TAG events be forwarded until after decodebin
to an encoder for example as decodebin only links the pads
after NEWSEGMENT. Fixes bug #518933.
2008-02-27 13:18:57 +00:00
Stefan Kost
c41fa79420 ext/mad/gstmad.c: Chain up at the end of the function.
Original commit message from CVS:
* ext/mad/gstmad.c:
Chain up at the end of the function.
2008-01-21 12:43:37 +00:00
Tim-Philipp Müller
d9e1dfe230 ext/mad/gstmad.c: Call g_type_class_ref() from a thread-safe context and not from the streaming thread to avoid GLib ...
Original commit message from CVS:
* ext/mad/gstmad.c: (GST_TYPE_MAD_MODE),
(GST_TYPE_MAD_EMPHASIS), (GST_TAG_EMPHASIS), (CHECK_HEADER):
Call g_type_class_ref() from a thread-safe context and not
from the streaming thread to avoid GLib screwing up (see
bug #349410 and #493432). Comment out unused code.
2008-01-10 17:24:09 +00:00
Sebastian Dröge
d7f415e09f Make sure that the Xing TOC starts with 0 and the entries are increasing over time. Otherwise it's broken and should ...
Original commit message from CVS:
* ext/mad/gstmad.c: (mpg123_parse_xing_header):
* gst/mpegaudioparse/gstmpegaudioparse.c:
(gst_mp3parse_handle_first_frame):
Make sure that the Xing TOC starts with 0 and the entries
are increasing over time. Otherwise it's broken and should
be skipped. Fixes bug #507821.
2008-01-08 19:42:38 +00:00
Sebastian Dröge
fe592fc65b Use the new buffer clipping function from gstaudio here and require gst-plugins-base CVS.
Original commit message from CVS:
* configure.ac:
* ext/mad/gstmad.c: (gst_mad_chain):
Use the new buffer clipping function from gstaudio here and
require gst-plugins-base CVS.
2007-07-24 05:05:29 +00:00
Sebastian Dröge
b55c8a16b9 ext/mad/gstmad.c: Fix buffer clipping to correctly clip to the segment stop.
Original commit message from CVS:
* ext/mad/gstmad.c: (clip_outgoing_buffer):
Fix buffer clipping to correctly clip to the segment stop.
2007-07-16 09:14:18 +00:00
Sebastian Dröge
68bbfd4fd3 ext/mad/gstmad.*: Implement buffer clipping and use GST_BOILERPLATE instead of manual
Original commit message from CVS:
* ext/mad/gstmad.c: (_do_init), (gst_mad_init), (index_seek),
(normal_seek), (gst_mad_sink_event), (clip_outgoing_buffer),
(gst_mad_chain), (gst_mad_change_state):
* ext/mad/gstmad.h:
Implement buffer clipping and use GST_BOILERPLATE instead of manual
GType magic. Part one of bug #308312.
2007-07-13 15:46:13 +00:00
Stefan Kost
bebdf0837e docs/plugins/: Add new docs. Scan c++ files too.
Original commit message from CVS:
* docs/plugins/Makefile.am:
* docs/plugins/gst-plugins-ugly-plugins-docs.sgml:
* docs/plugins/gst-plugins-ugly-plugins-sections.txt:
* docs/plugins/inspect/plugin-a52dec.xml:
* docs/plugins/inspect/plugin-amrnb.xml:
* docs/plugins/inspect/plugin-asf.xml:
* docs/plugins/inspect/plugin-dvdlpcmdec.xml:
* docs/plugins/inspect/plugin-dvdsub.xml:
* docs/plugins/inspect/plugin-iec958.xml:
* docs/plugins/inspect/plugin-lame.xml:
* docs/plugins/inspect/plugin-mad.xml:
* docs/plugins/inspect/plugin-mpeg2dec.xml:
* docs/plugins/inspect/plugin-mpegaudioparse.xml:
* docs/plugins/inspect/plugin-mpegstream.xml:
Add new docs. Scan c++ files too.
* ext/amrnb/amrnbdec.c: (gst_amrnbdec_base_init),
(gst_amrnbdec_event):
* ext/amrnb/amrnbenc.c: (gst_amrnbenc_base_init):
* ext/amrnb/amrnbparse.c: (gst_amrnbparse_base_init),
(gst_amrnbparse_loop):
Add documentation headers.
* ext/mad/gstmad.c:
* ext/mad/gstmad.h:
Refactor for docs.
2007-07-03 11:55:45 +00:00
Julien Moutte
92730cb1ca ext/mad/gstmad.c: Generate a perfect stream and try to adapt to incoming timestamps lack of precision up to half a fr...
Original commit message from CVS:
2007-03-27  Julien MOUTTE  <julien@moutte.net>

* ext/mad/gstmad.c: (gst_mad_chain): Generate a perfect
stream and try to adapt to incoming timestamps lack of
precision up to half a frame. This allows generating
a perfect stream even with muxed formats like FLV where
the timestamps are stored in milliseconds.
2007-03-27 12:02:49 +00:00
Jan Schmidt
b3bed8b0da ext/mad/gstmad.c: When handling seeks, don't convert -1 start or stop values to a bogus byte position - pass them ups...
Original commit message from CVS:
* ext/mad/gstmad.c: (gst_mad_convert_sink), (gst_mad_convert_src):
When handling seeks, don't convert -1 start or stop values to a bogus
byte position - pass them upstream as -1.
2007-03-12 17:26:13 +00:00
Tim-Philipp Müller
03f40e53fd Printf format fixes.
Original commit message from CVS:
* ext/dvdread/dvdreadsrc.c: (gst_dvd_read_src_goto_title),
(gst_dvd_read_src_handle_seek_event):
* ext/mad/gstid3tag.c: (gst_id3_tag_chain):
* ext/mad/gstmad.c: (gst_mad_src_query), (gst_mad_chain):
* ext/sidplay/gstsiddec.cc:
* gst/asfdemux/gstasfdemux.c: (gst_asf_demux_parse_data):
* gst/realmedia/rmdemux.c: (gst_rmdemux_loop),
(gst_rmdemux_parse_packet):
Printf format fixes.
2006-10-05 17:07:52 +00:00
Michal Benes
092e714778 ext/mad/gstmad.c: Fix timestamping in mad by only activating a new timestamp when the previous frame has been decoded...
Original commit message from CVS:
Patch by: Michal Benes <michal dot benes at itonis dot tv>
* ext/mad/gstmad.c: (gst_mad_chain):
Fix timestamping in mad by only activating a new timestamp when the
previous frame has been decoded. Fixes #350723.
Also clean up some of the non fatal warnings when the input buffer is
too small to decode a header.
2006-08-16 10:34:57 +00:00
Michael Dominic K
7a9ac30688 ext/mad/gstmad.c: Send newsegment event before calling gst_pad_alloc_buffer_and_set_caps(), makes mad behave better i...
Original commit message from CVS:
Patch by: Michael Dominic K.  < mdk at mdk org pl>
* ext/mad/gstmad.c: (gst_mad_chain):
Send newsegment event before calling
gst_pad_alloc_buffer_and_set_caps(), makes mad behave better
in connection with pad blocking (#342594). While we're at it,
do some minor clean-ups.
2006-06-17 19:35:41 +00:00
Lutz Müller
2f20ba90fd ext/mad/gstmad.c: Make mad the second element to support the highly useful
Original commit message from CVS:
Patch by: Lutz Müller <lutz at topfrose de>
* ext/mad/gstmad.c: (gst_mad_init), (gst_mad_src_query):
Make mad the second element to support the highly useful
FORMATS query (#340594)
2006-05-04 08:24:52 +00:00
Stefan Kost
8c5e23f9cb Define GstElementDetails as const and also static (when defined as global)
Original commit message from CVS:
* ext/mad/gstid3tag.c:
* ext/mad/gstmad.c:
* gst/ac3parse/gstac3parse.c:
* gst/dvdlpcmdec/gstdvdlpcmdec.c:
* gst/synaesthesia/gstsynaesthesia.c:
Define GstElementDetails as const and also static (when defined as
global)
2006-04-25 21:47:03 +00:00
Tim-Philipp Müller
84d42edc7f ext/mad/gstmad.c: .. and DEFAULT queries should work too. Use magic gst util scale functions in some places.
Original commit message from CVS:
* ext/mad/gstmad.c: (gst_mad_convert_sink), (gst_mad_convert_src),
(gst_mad_src_query), (gst_mad_chain):
.. and DEFAULT queries should work too. Use magic gst util scale
functions in some places.
2006-04-21 20:37:43 +00:00
Tim-Philipp Müller
bb88d43290 ext/mad/gstmad.c: Fix duration query in BYTES format (#336824).
Original commit message from CVS:
* ext/mad/gstmad.c: (gst_mad_src_query):
Fix duration query in BYTES format (#336824).
2006-04-21 19:31:47 +00:00
Sébastien Moutte
800c1bf33c ext/mad/gstmad.c: move GstIndexEntry *entry variable declaration before the first instruction
Original commit message from CVS:
* ext/mad/gstmad.c: (index_seek):
move GstIndexEntry *entry variable declaration before
the first instruction
* ext/mad/gstmad.c:
remove debug macros with variable number of parameter by using
GST_DEBUG for WIN32
* gst/dvdsub/gstdvdsubdec.c: (gst_dvd_sub_dec_parse_subpic):
use gst_guint64_to_gdouble for conversions
* gst/mpegstream/gstmpegdemux.c: (gst_mpeg_demux_sync_stream_to_time):
replace __FUNCTION__ which is not supported by MSVC by the current function name
* gst/mpegstream/gstmpegdemux.c: (gst_mpeg_demux_reset):
remove LL suffix by using G_GINT64_CONSTANT
* gst/mpegstream/gstmpegparse.c: (gst_mpeg_parse_parse_packhead),(gst_mpeg_parse_get_rate):
use gst_guint64_to_gdouble for conversions
* gst/mpegstream/gstmpegparse.h:
remove LL suffix by using G_GINT64_CONSTANT
* win32/vs6:
add project files for tagac3parse, asfdemux, dvdlpcmdec, dvdsub, iec958, lame,
mad, mpegaudioparse, mpegstream, realmedia, synaesthesia
2006-04-09 18:09:40 +00:00
Stefan Kost
d398763d01 Fix #337365 (g_type_class_ref <-> g_type_class_peek_parent)
Original commit message from CVS:
* ext/amrnb/amrnbdec.c: (gst_amrnbdec_class_init):
* ext/amrnb/amrnbenc.c: (gst_amrnbenc_class_init):
* ext/amrnb/amrnbparse.c: (gst_amrnbparse_class_init):
* ext/mad/gstmad.c: (gst_mad_class_init):
* ext/mpeg2dec/gstmpeg2dec.c: (gst_mpeg2dec_class_init):
* gst/ac3parse/gstac3parse.c: (gst_ac3parse_class_init):
* gst/asfdemux/gstasfmux.c: (gst_asfmux_class_init):
* gst/dvdlpcmdec/gstdvdlpcmdec.c: (gst_dvdlpcmdec_class_init):
* gst/iec958/ac3iec.c: (ac3iec_class_init):
* gst/mpegaudioparse/gstmpegaudioparse.c:
(gst_mp3parse_class_init):
* gst/mpegstream/gstdvddemux.c: (gst_dvd_demux_class_init):
* gst/mpegstream/gstmpegclock.c: (gst_mpeg_clock_class_init):
* gst/mpegstream/gstrfc2250enc.c: (gst_rfc2250_enc_class_init):
* gst/realmedia/rmdemux.c: (gst_rmdemux_class_init):
* gst/synaesthesia/gstsynaesthesia.c:
(gst_synaesthesia_class_init):
Fix #337365 (g_type_class_ref <-> g_type_class_peek_parent)
2006-04-08 21:42:19 +00:00
Tim-Philipp Müller
5ed66b9e38 ext/mad/gstmad.c: Include AUDIO_CODEC tag with tags posted if input is not framed (#334258). Use _scale() util functi...
Original commit message from CVS:
* ext/mad/gstmad.c: (gst_mad_convert_sink), (gst_mad_update_info),
(gst_mad_sink_event), (gst_mad_change_state):
Include AUDIO_CODEC tag with tags posted if input is not
framed (#334258). Use _scale() util functions in more places.
2006-03-14 19:41:17 +00:00
Jon Trowbridge
a2ac615910 ext/mad/gstmad.c: Port fixes for bugs 314771, 308772, 140237, and 302625
Original commit message from CVS:
* ext/mad/gstmad.c: (gst_mad_init), (scale), (gst_mad_update_info),
(gst_mad_sink_event), (gst_mad_check_caps_reset), (gst_mad_chain),
(gst_mad_change_state):
Port fixes for bugs 314771, 308772, 140237, and 302625
from 0.8 (Patch by Jonathan Matthew, Fixes #329575)
Use GST_EVENT_FLUSH_STOP to clear data from the current input
buffer, to avoid using it for any future decoding.
2006-02-16 09:50:43 +00:00