Commit graph

84 commits

Author SHA1 Message Date
Stéphane Cerveau
74346080ba vorbis: avoid duplicate symbols
Use TREMOR define to avoid duplicate symbols
of ivodebis and vorbis plugins when
static linking GStreamer.

Rearrange debug category init.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gst-plugins-base/-/merge_requests/1116>
2021-04-21 12:40:53 +02:00
Stéphane Cerveau
2a8adec5f2 vorbis: allow per feature registration
Split plugin into features including
dynamic types which can be indiviually
registered during a static build.

More details here:

https://gitlab.freedesktop.org/gstreamer/gst-build/-/merge_requests/199
https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/661

Part-of: <https://gitlab.freedesktop.org/gstreamer/gst-plugins-base/-/merge_requests/1029>
2021-03-16 17:58:59 +00:00
Tim-Philipp Müller
72bafd442f vorbis: drop unneeded check for vorbis_synthesis_restart()
This was added in 1.0.1 more than 16 years ago, I think we
can safely assume this is always present now. Also in tremor.

While at it, bump vorbis requirement to 1.3.1 from 2010.
2019-12-09 07:33:55 +00:00
Mathieu Duponchelle
e0fadd6fdd docstrings: port ulinks to markdown links 2019-08-23 18:28:16 +02:00
Tim-Philipp Müller
50aa1622e1 vorbisdec: fix leak of header buffers
handle_header_buffer() does no take ownership of
the buffer passed.

Fixes leaks in various unit tests.
2019-03-06 09:14:46 +00:00
Sebastian Dröge
55ec47f555 vorbisdec: Initialize decoder directly once we have the 3 headers
... instead of waiting for the first non-header buffer.

Also drop non-identification headers arriving after initialization or
before the identification header. We don't do anything with them and
they would just accumulate.

https://bugzilla.gnome.org/show_bug.cgi?id=796980
2018-09-21 11:48:40 +03:00
Sebastian Dröge
0619168e2a vorbisdec: Always handle in-band header packets once the first non-header packet arrives
And clean up any old pending headers if we receive a new identification
header, or if we receive a new set of headers via caps.

Otherwise it might happen that we receive one or more header but not
all, and then afterwards all headers again, and libvorbis does not like
getting headers passed multiple times and would error out.

It only makes sense to pass the very latest headers to the decoder at
the time we can actually make use of them.

https://bugzilla.gnome.org/show_bug.cgi?id=796980
2018-08-28 17:47:09 +03:00
Edward Hervey
aab5cccc34 vorbisdec: Improve "new headers while initialized" handling
If new headers arrive after we are initialized, we need to make
sure that they are indeed valid.

A vorbis bitstream always begins with three header packets and must
be in order.

Also some streams have unframed (invalid?) headers that might
confuse and disrupt the decoding process.

Therefore if ever we see new headers, we accumulate them and once
we get a non-header packet we check them to make sure that:
* We have at least 3 headers
* They are the expected ones (identification, comments and setup)
* They are in order
* Any other "header" is ignored

If those conditions are met, we reset and reconfigure the decoder

https://bugzilla.gnome.org/show_bug.cgi?id=784530
2018-02-13 08:41:29 +01:00
Thibault Saunier
099ac9faf2 docs: Convert gtkdoc comments to markdown
Modernizing the documentation, making it simpler to read an
modify and allowing us to possibly switch to hotdoc in the
future.
2017-03-10 18:19:17 -03:00
Edward Hervey
e575be6dc6 vorbisdec: Reset decoder in more situations
This is a followup commit to b95725c37e

* Resetting the decoder should only happen when we get a new initialization
header (0x01) and not on the other headers
* The initialized variable only gets set to TRUE once all headers have
been parsed. Also check if the vorbis_info struct has been properly resetted
also. Failure to do that would cause vorbisdec to error if it got
two initialization header in a row (the first would configure the underlying
library and the second one would error out because it's already initialized)

https://bugzilla.gnome.org/show_bug.cgi?id=779515
2017-03-03 10:56:22 +01:00
Jochen Henneberg
b95725c37e vorbisdec: reset decoder on vorbis headers update
if the vorbis encoder receives new headers it must be
reset and re-initialized to continue decoding, e. g.
for live streams
2017-02-27 19:17:58 +02:00
Vineeth TM
44b70ca3a1 base: use new gst_element_class_add_static_pad_template()
https://bugzilla.gnome.org/show_bug.cgi?id=763075
2016-03-24 14:25:41 +02:00
Jan Schmidt
797a0ca376 vorbisdec: Re-init on new caps
If we get new input caps, then reset the decoder
ready for new headers and fresh data. Makes
chained oggs work when reusing the decoder.
2015-11-11 01:33:55 +11:00
Thiago Santos
065968c3fc vorbisdec: use default pad accept-caps handling
Avoids useless check of downstream caps when handling an
accept-caps query
2015-08-15 13:44:35 -03:00
Tim-Philipp Müller
ec5c93f169 docs: update element example pipelines
- gst-launch -> gst-launch-1.0
- use autoaudiosink and audiovideosink more often
- review pipeline examples and descriptions
2015-05-10 11:38:19 +01:00
Sebastian Dröge
90eb93c2ef Don't compare booleans for equality to TRUE and FALSE
TRUE is 1, but every other non-zero value is also considered true. Comparing
for equality with TRUE would only consider 1 but not the others.
2014-12-01 09:51:12 +01:00
Tim-Philipp Müller
bcb8068e27 docs: remove outdated and pointless 'Last reviewed' lines from docs
They are very confusing for people, and more often than not
also just not very accurate. Seeing 'last reviewed: 2005' in
your docs is not very confidence-inspiring. Let's just remove
those comments.
2014-04-26 23:28:57 +01:00
Andoni Morales Alastruey
35b3d805ed vorbis: prefix get_copy_sample_func and fix duplicated symbols 2013-05-03 14:30:03 +02:00
Thijs Vermeir
dc9f19cbba vorbis: fix unused variable 2012-12-18 15:34:42 +01:00
Sebastian Dröge
c09f503f72 Revert "vorbisdec: Fix GType name conflict if tremor and libvorbis decoder are used in the same process"
This reverts commit 858392f88a.

A similar, cleaner fix was already in place.
2012-11-13 16:11:42 +01:00
Sebastian Dröge
858392f88a vorbisdec: Fix GType name conflict if tremor and libvorbis decoder are used in the same process 2012-11-13 15:41:34 +01:00
Tim-Philipp Müller
5f59b4f7ee Fix FSF address
https://bugzilla.gnome.org/show_bug.cgi?id=687520
2012-11-03 23:05:09 +00:00
Sebastian Dröge
754d0fca25 ivorbisdec: Rename debug category to prevent symbol conflict when using static linking 2012-10-09 13:10:38 +02:00
Mark Nauwelaerts
c629a44162 replace gst_tag_list_free with gst_tag_list_unref 2012-09-14 17:53:21 +02:00
Sebastian Dröge
99d73c94e9 tag: Update for taglist/tag event API changes 2012-07-28 00:35:02 +02:00
Sebastian Dröge
5d830cfbd8 vorbis: Update for audio base classes API changes 2012-07-23 10:30:40 +02:00
Sebastian Dröge
a69d6ddb74 vorbisdec: Error out if handling a header packet failed instead of just finishing the frame 2012-06-02 17:16:13 +02:00
Tim-Philipp Müller
3c6a3ad629 Use new gst_element_class_set_static_metadata() 2012-04-10 00:45:16 +01:00
Wim Taymans
df5253b22c update for memory api changes 2012-03-15 13:32:08 +01:00
Tim-Philipp Müller
c9308a73ca vorbisdec: fix up for 0.11 after merge 2012-03-08 20:49:46 +00:00
Tim-Philipp Müller
29c266ccff Merge remote-tracking branch 'origin/master' into 0.11
Conflicts:
	common
	docs/libs/gst-plugins-base-libs.types
	ext/pango/gsttextoverlay.c
	ext/vorbis/gstvorbisdec.c
	gst/playback/gstplaysink.c
	gst/playback/gstplaysinkconvertbin.c
	sys/ximage/ximagesink.c
	sys/xvimage/xvimagesink.c
2012-03-08 20:31:34 +00:00
Mark Nauwelaerts
600b91e878 vorbisdec: simplify tag handling using base class helper 2012-03-06 16:17:55 +01:00
Wim Taymans
a7c80a9c87 vorbisdec: remove old code 2012-02-15 13:32:05 +01:00
Sebastian Dröge
2fe94cad44 vorbis: Use new audio encoder/decoder base class API for srcpad caps 2012-02-01 16:27:47 +01:00
Wim Taymans
fcdc385aa1 port to new map API 2012-01-25 12:30:53 +01:00
Sebastian Dröge
68c0790817 Merge branch 'master' into 0.11
Conflicts:
	gst-libs/gst/interfaces/propertyprobe.c
	sys/xvimage/xvimagesink.c
2012-01-25 11:50:54 +01:00
Reynaldo H. Verdejo Pinochet
87bb5dddb2 Fix wrong access to undefined struct member
For the USE_TREMOLO case, GstVorbisDec doesn't have
a vb member. Besides, Tremolo's vorbis_dsp_synthesis()
expects a vorbis_dsp_state to be passed as first
argument. Not a vorbis_block.
2012-01-13 14:50:49 -03:00
Reynaldo H. Verdejo Pinochet
22e6c28284 Fix TREMELO -> TREMOLO typo 2012-01-13 14:47:13 -03:00
Mark Nauwelaerts
08a6621b2d vorbisdec: use right channel variable even more 2012-01-06 16:15:45 +01:00
Wim Taymans
f8ae2a0d5b vorbisdec: use right channel variable 2012-01-05 12:32:06 +01:00
Sebastian Dröge
9c60505900 vorbis: Port to the new multichannel caps 2012-01-05 10:34:24 +01:00
Tim-Philipp Müller
177525f89f Merge remote-tracking branch 'origin/master' into 0.11
Conflicts:
	gst-libs/gst/netbuffer/gstnetbuffer.c
	gst/ffmpegcolorspace/avcodec.h
	gst/ffmpegcolorspace/gstffmpegcodecmap.c
	gst/ffmpegcolorspace/imgconvert.c
	gst/ffmpegcolorspace/imgconvert_template.h
	gst/ffmpegcolorspace/mem.c
	gst/playback/README
	gst/playback/gstplaybasebin.c
	gst/playback/gstplaybasebin.h
	gst/playback/gstplaybin.c
	sys/v4l/v4lmjpegsrc_calls.c
	sys/v4l/videodev_mjpeg.h
	tests/check/elements/gnomevfssink.c
2011-12-02 11:10:17 +00:00
Piotr Fusik
14644457b0 various: typo fixes
Fix typos in code and docs. Fixes. #658984
2011-12-02 12:03:27 +01:00
Vincent Penquerc'h
96374054ac various: fix pad template leaks
https://bugzilla.gnome.org/show_bug.cgi?id=662664
2011-11-28 13:09:02 +00:00
Tim-Philipp Müller
e8fb8cb523 Fix some more printf format warnings 2011-11-22 01:21:04 +00:00
Wim Taymans
a5fa136c0b update for tag API removal 2011-11-02 12:11:16 +01:00
Tim-Philipp Müller
5ee51e47a1 ext, gst, gst-libs, tests: update for tag list API changes 2011-10-31 14:22:39 +00:00
Wim Taymans
016d036137 Merge branch 'master' into 0.11
Conflicts:
	configure.ac
	gst-libs/gst/audio/gstbaseaudiosink.c
	gst/audioconvert/channelmixtest.c
	gst/playback/gstplaybasebin.c
	gst/playback/gstsubtitleoverlay.c
	tests/examples/Makefile.am
	tests/examples/audio/Makefile.am
2011-10-27 15:44:58 +02:00
Vincent Penquerc'h
1f900dc20d vorbisdec: do not try to read past the buffer array
https://bugzilla.gnome.org/show_bug.cgi?id=662108
2011-10-19 16:45:06 +02:00
Mark Nauwelaerts
43928e33e6 vorbisdec: only finish header packet frame if received in-stream
... rather than scaring audiodecoder with a frame extracted from caps.

Fixes #662108 (partially).
2011-10-19 16:44:44 +02:00