Commit graph

77 commits

Author SHA1 Message Date
Arun Raghavan
f092c9cb3d opus: Fix incorrect fall-through condition in property getter 2015-04-03 11:47:09 +05:30
Luis de Bethencourt
fb758d019c opusenc: fall through switch statement
Adding a comment makes coverity happy and quells the issue.

CID 1291629
2015-03-24 15:14:05 +00:00
Sebastian Dröge
9dd671abe3 opusenc: Set output format immediately after creating the encoder instance
We know the caps by then, there's no need to wait until we actually receive
the first buffer.
2015-03-23 13:15:30 +01:00
Sebastian Dröge
948fbe154f opusenc: Remove another unused variable 2015-03-23 13:13:35 +01:00
Sebastian Dröge
42b5cc8938 opusenc: Remove useless headers and header_sent variables from the instance struct
They are only used inside a single function.
2015-03-23 13:12:25 +01:00
Vincent Penquerc'h
22d9c9f763 opusenc: replace cbr and constrained-vbr properties with an enum
It was deemed confusing before.

https://bugzilla.gnome.org/show_bug.cgi?id=744909
2015-03-12 14:04:20 +00:00
Sebastian Dröge
0a20954769 opusenc: Remove g_warnings() for the deprecated audio property
Otherwise there are g_warnings() already when just using gst-inspect or
dumping a pipeline graph.
2015-02-18 17:47:50 +02:00
Vincent Penquerc'h
5c44bceeb3 opusenc: change audio property to audio-type
This is now an enum with values generic (default) and voice.

https://bugzilla.gnome.org/show_bug.cgi?id=740891
2015-01-29 13:23:57 +00:00
Thiago Santos
4c883e4ad2 opusenc: plug ref leak of template caps
the pad template caps is already a new ref. No need to copy.
2014-12-17 22:13:17 -03:00
Vincent Penquerc'h
23029acf46 opusenc: update output segment stop time to match clipped samples
This will let oggmux generate a granpos on the last page that properly
represents the clipped samples at the end of the stream.
2014-10-30 14:41:44 +00:00
Sebastian Rasmussen
a9493a3985 opusenc: Unref pad template caps after usage
Fixes https://bugzilla.gnome.org/show_bug.cgi?id=734517
2014-08-11 15:31:45 +03:00
Miguel París Díaz
93ba600ba9 opusenc: Use aux vars to minimize critical region
This avoid dead lock between gst_audio_encoder_finish_frame() and
gst_opus_enc_get_property().
Also, now bytes var is set into protected section.

https://bugzilla.gnome.org/show_bug.cgi?id=729882
2014-05-26 09:23:42 +02:00
Vincent Penquerc'h
585a6c4add opusenc: increase max payload size to 4000 bytes
1275 is the maximum size of a frame, but the encoder may return
up to 3 frames, and we need a few extra bytes for TOC, etc. We
use 4000, which is a bit more, and suggested in the libopus docs.
2013-12-27 14:29:46 +00:00
Tim-Philipp Müller
32893dd95e opusenc: fix crash when setting "cbr" property when encoder is not running yet
https://bugzilla.gnome.org/show_bug.cgi?id=692698
2013-01-28 14:12:56 +00:00
Thijs Vermeir
05dfea2689 opus: use appropriate printf format for gsize 2012-12-18 16:56:28 +01:00
Tim-Philipp Müller
9e1b75fda3 Fix FSF address
https://bugzilla.gnome.org/show_bug.cgi?id=687520
2012-11-04 00:09:59 +00:00
Tim-Philipp Müller
32ba17cd0f Use gst_element_class_set_static_metadata()
where possible. Avoids some string copies. Also re-indent
some stuff. Also some indent fixes here and there.
2012-10-17 17:46:34 +01:00
Mark Nauwelaerts
578861abea replace gst_element_class_set_details_simple with gst_element_class_set_metadata 2012-09-14 17:27:49 +02:00
Peter Korsgaard
b04e61d8a4 opus + jpegformat: unbreak non-debug build
opus + jpegformat plugin builds fail when gstreamer is configured with
--disable-gst-debug as they are checking the GST_DISABLE_DEBUG symbol
instead of GST_DISABLE_GST_DEBUG.

Signed-off-by: Peter Korsgaard <jacmet@sunsite.dk>

https://bugzilla.gnome.org/show_bug.cgi?id=683850
2012-09-12 09:13:30 +01:00
Mark Nauwelaerts
2816380e7c opusenc: port to the new GLib thread API 2012-09-11 15:12:55 +02:00
Tim-Philipp Müller
489b102a43 gst_tag_list_free -> gst_tag_list_unref 2012-08-04 16:31:30 +01:00
Vincent Penquerc'h
742f26326f opusenc: add missing mutex unlock on error path 2012-06-15 10:39:48 +01:00
Vincent Penquerc'h
76ec96a364 opus: set author to myself, and update copyright notices
because as slomo noted, in fact pretty much all the code in there is mine.
2012-06-15 10:39:41 +01:00
Mark Nauwelaerts
af14e951c1 opusenc: fixup merge 2012-03-30 17:09:34 +02:00
Sebastian Dröge
e74c1d2414 ext: Update for GstAudioEncoder API changes 2012-03-30 12:22:48 +02:00
Sebastian Dröge
860ccd414d Merge remote-tracking branch 'origin/0.10'
Conflicts:
	NEWS
	RELEASE
	common
	configure.ac
	docs/libs/gst-plugins-bad-libs-sections.txt
	docs/plugins/gst-plugins-bad-plugins.args
	docs/plugins/gst-plugins-bad-plugins.hierarchy
	docs/plugins/gst-plugins-bad-plugins.interfaces
	docs/plugins/inspect/plugin-adpcmdec.xml
	docs/plugins/inspect/plugin-adpcmenc.xml
	docs/plugins/inspect/plugin-assrender.xml
	docs/plugins/inspect/plugin-audiovisualizers.xml
	docs/plugins/inspect/plugin-autoconvert.xml
	docs/plugins/inspect/plugin-bayer.xml
	docs/plugins/inspect/plugin-bz2.xml
	docs/plugins/inspect/plugin-camerabin2.xml
	docs/plugins/inspect/plugin-celt.xml
	docs/plugins/inspect/plugin-dataurisrc.xml
	docs/plugins/inspect/plugin-debugutilsbad.xml
	docs/plugins/inspect/plugin-dtmf.xml
	docs/plugins/inspect/plugin-dtsdec.xml
	docs/plugins/inspect/plugin-dvbsuboverlay.xml
	docs/plugins/inspect/plugin-dvdspu.xml
	docs/plugins/inspect/plugin-faac.xml
	docs/plugins/inspect/plugin-faad.xml
	docs/plugins/inspect/plugin-gsm.xml
	docs/plugins/inspect/plugin-h264parse.xml
	docs/plugins/inspect/plugin-mms.xml
	docs/plugins/inspect/plugin-modplug.xml
	docs/plugins/inspect/plugin-mpeg2enc.xml
	docs/plugins/inspect/plugin-mpegdemux2.xml
	docs/plugins/inspect/plugin-mpegtsdemux.xml
	docs/plugins/inspect/plugin-mpegvideoparse.xml
	docs/plugins/inspect/plugin-mplex.xml
	docs/plugins/inspect/plugin-pcapparse.xml
	docs/plugins/inspect/plugin-rawparse.xml
	docs/plugins/inspect/plugin-rtpmux.xml
	docs/plugins/inspect/plugin-rtpvp8.xml
	docs/plugins/inspect/plugin-scaletempo.xml
	docs/plugins/inspect/plugin-schro.xml
	docs/plugins/inspect/plugin-sdp.xml
	docs/plugins/inspect/plugin-segmentclip.xml
	docs/plugins/inspect/plugin-shm.xml
	docs/plugins/inspect/plugin-videomaxrate.xml
	docs/plugins/inspect/plugin-videoparsersbad.xml
	docs/plugins/inspect/plugin-vp8.xml
	docs/plugins/inspect/plugin-y4mdec.xml
	ext/celt/gstceltdec.c
	ext/dts/gstdtsdec.c
	ext/modplug/gstmodplug.cc
	ext/opus/gstopusenc.c
	gst-libs/gst/video/gstbasevideocodec.c
	gst-libs/gst/video/gstbasevideocodec.h
	gst-libs/gst/video/gstbasevideodecoder.c
	gst-libs/gst/video/gstbasevideodecoder.h
	gst-libs/gst/video/gstbasevideoencoder.c
	gst-libs/gst/video/gstbasevideoencoder.h
	gst/adpcmdec/Makefile.am
	gst/audiovisualizers/gstbaseaudiovisualizer.c
	gst/h264parse/gsth264parse.c
	gst/mpegdemux/mpegtsparse.c
	gst/mpegtsdemux/mpegtsbase.c
	gst/mpegtsdemux/mpegtspacketizer.c
	gst/mpegtsdemux/mpegtsparse.c
	gst/mpegtsdemux/tsdemux.c
	gst/mpegtsdemux/tsdemux.h
	gst/mxf/mxfdemux.c
	gst/rawparse/gstaudioparse.c
	gst/videoparsers/gsth263parse.c
	gst/videoparsers/gsth264parse.c
	sys/d3dvideosink/d3dvideosink.c
	sys/decklink/gstdecklinksink.cpp
	sys/dvb/gstdvbsrc.c
	sys/shm/gstshmsrc.c
	sys/vdpau/h264/gstvdph264dec.c
	sys/vdpau/mpeg/gstvdpmpegdec.c
	tests/examples/opencv/gst_element_print_properties.c
	win32/common/config.h
2012-03-29 17:41:53 +02:00
Mark Nauwelaerts
8b39a2eb0c opus: port to updated 0.11 2012-03-07 17:18:48 +01:00
Mark Nauwelaerts
228d8808fe opusenc: only request and process 1 frame at a time
... since it is specified in _finish_frame that input buffer may be invalidated
after calling it, and is as such not reliably available for further encoding.

Also, requesting or allowing several frames is only useful if subclass intends
to process these "in 1 run" (as in, 1 output buffer), not for having another
(inner) loop in subclass where the baseclass one will do just fine.
2012-03-07 13:03:14 +01:00
Mark Nauwelaerts
db0aa7f056 opusenc: configure baseclass requested samples really in samples
... as opposed to bytes.
2012-03-07 13:03:14 +01:00
Wim Taymans
3cf47f7a98 audioencoders: chain up to parent event handler 2012-02-27 13:13:14 +01:00
Wim Taymans
1119f6ee41 Merge branch 'master' into 0.11
Conflicts:
	ext/chromaprint/gstchromaprint.c
	ext/mpeg2enc/Makefile.am
	ext/voaacenc/gstvoaacenc.c
	gst/dvbsuboverlay/gstdvbsuboverlay.c
	gst/mpegtsdemux/mpegtsbase.c
	gst/sdp/gstsdpdemux.c
	gst/videoparsers/gsth264parse.c
	sys/d3dvideosink/d3dvideosink.c
	tests/examples/camerabin/gst-camera-perf.c
	tests/examples/camerabin/gst-camerabin-test.c
	tests/examples/camerabin2/gst-camerabin2-test.c
	tests/examples/mxf/mxfdemux-structure.c
	tests/examples/scaletempo/demo-main.c
2012-02-10 16:46:50 +01:00
Vincent Penquerc'h
8147669971 plenty: fixup glib deprecations 2012-01-27 15:47:07 +00:00
Sebastian Dröge
a01a4ea2d3 Merge branch 'master' into 0.11
Conflicts:
	gst/mpegtsdemux/tsdemux.c
	gst/videoparsers/gsth264parse.c
	tests/check/elements/camerabin2.c
2012-01-10 15:50:37 +01:00
Vincent Penquerc'h
1f543ec0ad opusenc: fix slist leak 2012-01-10 13:38:50 +00:00
Vincent Penquerc'h
9d675bfa8d opusenc: fix caps leak 2012-01-10 13:38:42 +00:00
Edward Hervey
f70a623418 Merge remote-tracking branch 'origin/master' into 0.11-premerge
Conflicts:
	docs/libs/Makefile.am
	ext/kate/gstkatetiger.c
	ext/opus/gstopusdec.c
	ext/xvid/gstxvidenc.c
	gst-libs/gst/basecamerabinsrc/Makefile.am
	gst-libs/gst/basecamerabinsrc/gstbasecamerasrc.c
	gst-libs/gst/basecamerabinsrc/gstbasecamerasrc.h
	gst-libs/gst/video/gstbasevideocodec.c
	gst-libs/gst/video/gstbasevideocodec.h
	gst-libs/gst/video/gstbasevideodecoder.c
	gst-libs/gst/video/gstbasevideoencoder.c
	gst/asfmux/gstasfmux.c
	gst/audiovisualizers/gstwavescope.c
	gst/camerabin2/gstcamerabin2.c
	gst/debugutils/gstcompare.c
	gst/frei0r/gstfrei0rmixer.c
	gst/mpegpsmux/mpegpsmux.c
	gst/mpegtsmux/mpegtsmux.c
	gst/mxf/mxfmux.c
	gst/videomeasure/gstvideomeasure_ssim.c
	gst/videoparsers/gsth264parse.c
	gst/videoparsers/gstmpeg4videoparse.c
2011-12-30 11:41:17 +01:00
Vincent Penquerc'h
3498912d7b opus: fix bad merge (stray unmap, undeclared var) 2011-12-15 16:42:20 +00:00
Vincent Penquerc'h
f40ccb3811 opusenc: add upstream negotiation for multistream ability
This will help elements that cannot deal with multistream,
such as the RTP payloader.

The caps now do not include a "streams" field anymore, but
a "multistream" boolean, since we have no real use for knowing
the exact amount of streams.

https://bugzilla.gnome.org/show_bug.cgi?id=665078
2011-12-10 10:39:11 +00:00
Vincent Penquerc'h
554c64ae95 opus: include streams count in caps
https://bugzilla.gnome.org/show_bug.cgi?id=665078
2011-12-09 15:04:20 +00:00
Vincent Penquerc'h
b48b3c2c86 opus: properly create channel mapping tables
There are two of them, unintuitively enough; the one passed
to the encoder should not be the one that gets written to the
file. The former maps the input to an ordering which puts
paired channels first, while the latter moves the channels
to Vorbis order. So add code to calculate both, and we now
have properly paired channels where appropriate.

https://bugzilla.gnome.org/show_bug.cgi?id=665078
2011-12-09 15:04:20 +00:00
Vincent Penquerc'h
7521b597f4 various: fix pad template ref leaks
https://bugzilla.gnome.org/show_bug.cgi?id=662664
2011-11-28 13:08:27 +00:00
Tim-Philipp Müller
77361e2919 Merge remote-tracking branch 'origin/master' into 0.11
Conflicts:
	ext/opus/gstopusdec.c
	ext/opus/gstopusparse.c
	gst-libs/gst/video/gstbasevideodecoder.c
	gst-libs/gst/video/gstbasevideodecoder.h
2011-11-26 15:37:25 +00:00
Danilo Cesar Lemes de Paula
43190ea0f8 opusenc: Fixing "Unused var" compiling error for opus codec
https://bugzilla.gnome.org/show_bug.cgi?id=664815
2011-11-25 15:32:12 +00:00
Vincent Penquerc'h
631f42eee8 opusenc: only use mono streams for > 2 channels
I'm getting odd results with packing streams into stereo
streams, and using only mono streams is enough in all cases.
2011-11-25 15:31:59 +00:00
Vincent Penquerc'h
65079e3ada opus: add some more debug information about channel mapping 2011-11-25 15:31:59 +00:00
Vincent Penquerc'h
f78c83a0b6 opusenc: do not cause the decoder to apply the channel mapping again
Since we already reorder channels, we do not want to write that
reordering in the header, or the decoder will do it again.
2011-11-25 15:31:59 +00:00
Edward Hervey
b78b980d72 Merge remote-tracking branch 'origin/master' into 0.11
Conflicts:
	ext/faac/gstfaac.c
	ext/opus/gstopusdec.c
	ext/opus/gstopusenc.c
	gst/audiovisualizers/gstspacescope.c
	gst/colorspace/colorspace.c
2011-11-25 12:48:58 +01:00
Vincent Penquerc'h
0ca385a970 opus: multichannel support 2011-11-24 13:40:34 +00:00
Vincent Penquerc'h
5da03cd2a4 opus: switch to multistream API
It's very similar to the basic API, and is a superset ot it,
which will allow encoding and decoding more than 2 channels.
2011-11-24 13:40:34 +00:00
Vincent Penquerc'h
f1477522de opusenc: remove useless setup field 2011-11-24 13:40:34 +00:00