diff --git a/ChangeLog b/ChangeLog index ed5ebed6bb6beb4cfb81a7b8995697309a97556a..132f68953bdfc0130eed93326cb5f9504bd73283 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,159 +1,150 @@ -=== release 1.6.2 === +=== release 1.7.1 === -2015-12-14 Sebastian Dröge <slomo@coaxion.net> +2015-12-24 Sebastian Dröge <slomo@coaxion.net> * configure.ac: - releasing 1.6.2 + releasing 1.7.1 -2015-12-14 19:12:53 +0100 Sebastian Dröge <sebastian@centricular.com> +2015-12-24 12:22:32 +0100 Sebastian Dröge <sebastian@centricular.com> + * po/cs.po: + * po/de.po: * po/el.po: * po/hu.po: + * po/nb.po: + * po/nl.po: + * po/pl.po: + * po/ru.po: + * po/sr.po: * po/sv.po: * po/uk.po: + * po/vi.po: + * po/zh_CN.po: po: Update translations -2015-12-14 14:15:00 +0100 Thomas Roos <thomas.roos@industronic.de> +2015-12-21 09:57:33 -0300 Thiago Santos <thiagoss@osg.samsung.com> - * sys/directsound/gstdirectsoundsink.c: - directsoundsink: Fix handling of the mute property - - set mute value at startup - - correct set and get mute functions - https://bugzilla.gnome.org/show_bug.cgi?id=755106 + * gst/isomp4/qtdemux.c: + * gst/isomp4/qtdemux.h: + qtdemux: drop flushes from our own offset seek + Prevents downstream from receiving flushes for a seek only in + upstream. Those seeks are only to start reading from the right + offset when skipping or returning to qt atoms. + https://bugzilla.gnome.org/show_bug.cgi?id=758928 -2015-12-01 18:20:23 +0100 Wim Taymans <wtaymans@redhat.com> +2015-11-11 16:53:19 +0100 Thibault Saunier <tsaunier@gnome.org> - * sys/v4l2/gstv4l2bufferpool.c: - v4l2bufferpool: don't block when resurecting a buffer - When we are resurecting a buffer, don't block. instead let us copy a - buffer. + * gst/matroska/matroska-demux.c: + matroskademux: Always set the channel mask for PCM streams + Just use the gst_audio_channel_get_fallback_mask function for now as + the specification is too complicated and nobody implements it. -2015-12-11 11:23:13 +0100 Thomas Roos <thomas.roos@industronic.de> +2015-12-21 11:37:26 +0100 Thomas Roos <thomas.roos@industronic.de> * sys/directsound/gstdirectsoundsink.c: - directsoundsink: Check the return value of GetStatus() too to decide if there was an error - If GetStatus() fails, the status itself won't be very meaningful but we also - have to look at its return value. This fixes blocking pipelines when removing - sound devices or during other errors, where we wouldn't notice the error and - then wait forever. - https://bugzilla.gnome.org/show_bug.cgi?id=734098 - -2015-11-15 17:16:29 -0800 Josep Torra <n770galaxy@gmail.com> + directsoundsink: Fix sleep for buffer-time lower than 200000 + https://bugzilla.gnome.org/show_bug.cgi?id=748680 - * gst/rtp/gstrtpgstdepay.c: - rtpgstdepay: Properly handle backward compat for event deserialization - Actual code is checking for a NULL terminator and a ';' terminator, - for backward compat, in a chained way that cause all events being rejected. - The proper condition is to reject the events when terminator isn't - in ['\0', ';'] set. - https://bugzilla.gnome.org/show_bug.cgi?id=758151 - -2015-11-15 17:11:02 -0800 Josep Torra <n770galaxy@gmail.com> - - * tests/check/elements/rtp-payloading.c: - tests: rtp-payloading: Test for handling of custom events in rtpgst - Add a simple test that checks proper serialization/deserialization - of custom events with rtpgstpay and rtpgstdepay. - -2015-12-09 12:24:09 +0200 Sebastian Dröge <sebastian@centricular.com> +2015-12-21 12:31:19 +0100 Sebastian Dröge <sebastian@centricular.com> - * gst/rtpmanager/gstrtpjitterbuffer.c: - rtpjitterbuffer: Fix packet dropping after a big discont - We would queue 5 consective packets before considering a reset and a proper - discont here. Instead of expecting the next output packet to have the current - seqnum (i.e. the fifth), expect it to have the first seqnum. Otherwise we're - going to drop all queued up packets. - -2015-11-18 16:10:11 +0100 Michael Olbrich <m.olbrich@pengutronix.de> + * configure.ac: + configure: Use -Bsymbolic-functions if available + While this is more useful for libraries, some of our plugins with multiple + files and some internal API can also benefit from this. - * gst/avi/gstavimux.c: - avimux: don't crash if we never got audio caps before stopping - auds.blockalign is set once the first caps arrive. If - gst_avi_mux_stop_file() is called before this happens then auds.blockalign - is zero and gst_avi_mux_audsink_set_fields() cause a crash: - [...] - avipad->parent.hdr.rate = avipad->auds.av_bps / avipad->auds.blockalign; - [...] - https://bugzilla.gnome.org/show_bug.cgi?id=758912 +2015-12-18 15:34:52 +0000 William Manley <will@williammanley.net> -2015-12-01 00:03:21 -0300 Thiago Santos <thiagoss@osg.samsung.com> + * gst/debugutils/progressreport.c: + * gst/debugutils/progressreport.h: + progressreport: add support for using format=buffers with do-query=false + This is useful for investigating and debugging pipelines which are + producing buffers at a slower/faster rate than you would expect. + https://bugzilla.gnome.org/show_bug.cgi?id=759635 - * gst/wavparse/gstwavparse.c: - wavparse: flush upstream when seeking in pull mode - Makes sure upstream will unblock and return the thread so that - seeking can continue - https://bugzilla.gnome.org/show_bug.cgi?id=758861 +2015-12-18 15:49:43 -0500 Nicolas Dufresne <nicolas.dufresne@collabora.com> -2015-11-18 19:07:53 +0200 Sebastian Dröge <sebastian@centricular.com> + * sys/v4l2/gstv4l2object.c: + v4l2object: Update formats table + This change add all the new RGB based format. Those format removes the + ambiguity with the ALPHA channel. Some other missing multiplanar format + has been added with some additional cleanup. - * gst/isomp4/qtdemux.c: - qtdemux: Cast to signed integers to prevent unsigned compare between negative and positive numbers - This fixes seeking if the first entries in the samples table are negative. The - binary search would always fail on this as the array would not be sorted if - interpreting the negative numbers as huge positive numbers. This caused us to - always output buffers from the beginning after a seek instead of close to the - seek position. - Also add a case to the comparison function for equality. +2015-12-18 05:17:15 +1100 Jan Schmidt <jan@centricular.com> -2015-11-11 14:10:53 +0900 Vineeth TM <vineeth.tm@samsung.com> + * gst/isomp4/gstqtmux.c: + qtmux: Don't write invalid edit list start time. + Avoid writing a negative number as a large positive + integer in an edit list when the first_ts is smaller + than the first_dts - which can happen when the first + packet received has a PTS but no DTS. + https://bugzilla.gnome.org/show_bug.cgi?id=759615 - * gst/multifile/gstsplitmuxpartreader.c: - splitmuxpartreader: Fix GCond leak - inactive_cond is not being cleared resulting in memory leak. - https://bugzilla.gnome.org/show_bug.cgi?id=757924 +2015-12-04 23:16:45 +1100 Jan Schmidt <jan@centricular.com> -2015-11-05 18:39:33 +0530 Nirbheek Chauhan <nirbheek@centricular.com> + * gst/multifile/gstsplitmuxsink.c: + splitmuxsink: Only update running time when it increases. + Don't increment running time from every buffer. The correct + logic to only increment when running time advances is a + little further down, so delete this left-over line. - * ext/pulse/pulsedeviceprovider.c: - pulse: Don't leak caps and structures in the device provider +2015-11-18 11:01:20 +0100 Thibault Saunier <tsaunier@gnome.org> -2015-08-12 13:35:40 +0200 Philippe Normand <philn@igalia.com> + * gst/matroska/matroska-mux.c: + matroska-mux: Implement prores support + https://bugzilla.gnome.org/show_bug.cgi?id=758258 - * gst/isomp4/qtdemux.c: - * gst/isomp4/qtdemux.h: - qtdemux: support for cenc auxiliary info parsing outside of moof box - When the cenc aux info index is out of moof boundaries, keep track of - it and parse the beginning of the mdat box, before the first sample. - https://bugzilla.gnome.org/show_bug.cgi?id=755614 +2015-11-18 16:20:38 +1100 Jan Schmidt <jan@centricular.com> -2015-11-03 22:01:07 +0530 Arun Raghavan <git@arunraghavan.net> + * gst/matroska/matroska-demux.c: + * gst/matroska/matroska-ids.h: + matroska-demux: Play ProRes video streams + Generate video/x-prores caps for ProRes video streams. + Every frame needs an 8 byte header prepended, as described in + http://wiki.multimedia.cx/index.php?title=Apple_ProRes#Frame_layout + so do that in a post-processing callback. + https://bugzilla.gnome.org/show_bug.cgi?id=758258 - * sys/v4l2/gstv4l2.c: - v4l2: Set O_CLOEXEC on the device fd - This is needed to make sure that child processes don't inherit the video - device fd which can cause problems with some drivers. +2015-12-18 10:18:09 +0530 Ravi Kiran K N <ravi.kiran@samsung.com> -2015-10-21 11:16:01 +0100 Tim-Philipp Müller <tim@centricular.com> + * ext/dv/gstdvdec.h: + dvdec: Remove unused fields + Remove unused fields frame_len and space + https://bugzilla.gnome.org/show_bug.cgi?id=759614 - * gst/flv/gstflvmux.c: - flvmux: fix writing of creation time - Don't write time as e.g. 11:9:42 +2015-12-17 16:03:04 +0100 Vincent Dehors <vincent.dehors@openwide.fr> -2015-09-22 22:59:16 +0200 Havard Graff <havard.graff@gmail.com> + * gst/rtp/gstrtpj2kdepay.c: + rtpj2kdepay: Push one JPEG2000 frame per buffer, not a buffer list with multiple buffers + https://bugzilla.gnome.org/show_bug.cgi?id=758943 - * gst/flv/gstflvmux.c: - * tests/check/elements/flvmux.c: - flvmux: GST_BUFFER_OFFSETs should be GST_BUFFER_OFFSET_NONE - Or else flvdemux don't understand it - https://bugzilla.gnome.org/show_bug.cgi?id=754435 +2015-12-16 11:43:58 +0000 Luis de Bethencourt <luisbg@osg.samsung.com> -2015-09-02 10:44:59 +0200 Havard Graff <havard.graff@gmail.com> + * ext/raw1394/gstdv1394src.c: + * ext/raw1394/gsthdv1394src.c: + dv1394: log error if failed to set socket status flag + Log an error message if failed to set write or read socket as + non-blocking. + CID 1139608 + CID 1139609 - * gst/flv/gstflvmux.c: - * tests/check/elements/flvmux.c: - flvmux: use time segment and copy timestamps when streamable - Add a basic test using speex data to verify timestamping. - https://bugzilla.gnome.org/show_bug.cgi?id=754435 +2015-12-15 17:10:00 +0000 Dave Craig <davecraig@unbalancedaudio.com> -=== release 1.6.1 === + * gst/audioparsers/gstaacparse.c: + * gst/audioparsers/gstac3parse.c: + * gst/audioparsers/gstamrparse.c: + * gst/audioparsers/gstdcaparse.c: + * gst/audioparsers/gstflacparse.c: + * gst/audioparsers/gstmpegaudioparse.c: + * gst/audioparsers/gstsbcparse.c: + * gst/audioparsers/gstwavpackparse.c: + audioparsers: Check for NULL return value of gst_pad_get_current_caps() + https://bugzilla.gnome.org/show_bug.cgi?id=759503 -2015-10-30 16:40:55 +0200 Sebastian Dröge <sebastian@centricular.com> +2015-12-16 09:35:53 +0100 Sebastian Dröge <sebastian@centricular.com> - * ChangeLog: - * NEWS: - * RELEASE: - * configure.ac: * docs/plugins/gst-plugins-good-plugins.args: + * docs/plugins/gst-plugins-good-plugins.hierarchy: + * docs/plugins/gst-plugins-good-plugins.interfaces: * docs/plugins/inspect/plugin-1394.xml: * docs/plugins/inspect/plugin-aasink.xml: * docs/plugins/inspect/plugin-alaw.xml: @@ -220,181 +211,1207 @@ * docs/plugins/inspect/plugin-wavparse.xml: * docs/plugins/inspect/plugin-ximagesrc.xml: * docs/plugins/inspect/plugin-y4menc.xml: - * gst-plugins-good.doap: - * win32/common/config.h: - Release 1.6.1 + docs: update to git -2015-10-30 16:27:32 +0200 Sebastian Dröge <sebastian@centricular.com> +2015-12-15 14:27:22 -0500 Nicolas Dufresne <nicolas.dufresne@collabora.com> - * po/af.po: - * po/az.po: - * po/bg.po: - * po/ca.po: - * po/da.po: - * po/el.po: - * po/en_GB.po: - * po/eo.po: - * po/es.po: - * po/eu.po: - * po/fi.po: - * po/fr.po: - * po/gl.po: - * po/hr.po: - * po/hu.po: - * po/id.po: - * po/it.po: - * po/ja.po: - * po/lt.po: - * po/lv.po: - * po/mt.po: - * po/nb.po: - * po/or.po: - * po/pt_BR.po: - * po/ro.po: - * po/sk.po: - * po/sl.po: - * po/sq.po: - * po/sr.po: - * po/sv.po: - * po/tr.po: - * po/uk.po: - * po/zh_HK.po: - * po/zh_TW.po: - Update .po files + * ext/vpx/Makefile.am: + vpx: Add missing headers in Makefile.am + This fixes distcheck. + https://bugzilla.gnome.org/show_bug.cgi?id=755510 -2015-10-30 14:28:04 +0200 Sebastian Dröge <sebastian@centricular.com> +2015-09-24 12:57:00 +0530 Prashant Gotarne <ps.gotarne@samsung.com> - * po/cs.po: - * po/de.po: - * po/nl.po: - * po/pl.po: - * po/ru.po: - * po/vi.po: - * po/zh_CN.po: - po: Update translations + * ext/vpx/Makefile.am: + * ext/vpx/gstvp8enc.c: + * ext/vpx/gstvp8enc.h: + * ext/vpx/gstvp9enc.c: + * ext/vpx/gstvp9enc.h: + * ext/vpx/gstvpxenc.c: + * ext/vpx/gstvpxenc.h: + vpx: created common baseclass GstVPXEnc + GstVP8Enc and GstVP9Enc has almost 80% code in common. + created common baseclass GstVPXEnc for GstVP8Enc and GstVP9Enc + https://bugzilla.gnome.org/show_bug.cgi?id=755510 -2015-10-28 23:47:30 +0530 Nirbheek Chauhan <nirbheek@centricular.com> +2015-12-15 12:57:53 -0500 Nicolas Dufresne <nicolas.dufresne@collabora.com> - * sys/v4l2/gstv4l2deviceprovider.c: - v4l2: fix double-unref in the v4l2 device provider + * ext/vpx/gstvp9dec.c: + * ext/vpx/gstvpxdec.c: + * ext/vpx/gstvpxdec.h: + vpxdec: Remove unneeded add video_meta + This also remove copies for VP8, which was not correctly in place + in previous related patch. + +2015-12-15 09:49:24 +0530 Prashant Gotarne <ps.gotarne@samsung.com> + + * ext/vpx/Makefile.am: + * ext/vpx/gstvp8dec.c: + * ext/vpx/gstvp8dec.h: + * ext/vpx/gstvp9dec.c: + * ext/vpx/gstvp9dec.h: + * ext/vpx/gstvpxdec.c: + * ext/vpx/gstvpxdec.h: + vpx: created common base class GstVPXdec for vpx decoders + Base class for the vp8dec and vp9dec. + https://bugzilla.gnome.org/show_bug.cgi?id=755510 + +2015-06-10 09:17:08 -0400 Xavier Claessens <xavier.claessens@collabora.com> + + * configure.ac: + * ext/soup/gstsouphttpsrc.c: + * ext/soup/gstsouphttpsrc.h: + souphttpsrc: Add GTlsInteraction property + https://bugzilla.gnome.org/show_bug.cgi?id=750709 + +2015-12-14 09:05:06 -0500 Evan Callaway <evan.callaway@ipconfigure.com> + + * gst/rtsp/gstrtspsrc.c: + rtspsrc: Retry connection if tunneling needs authentication + Leverage response from gst_rtsp_connection_connect_with_response to + determine if the connection should be retried using authentication. If + so, add the appropriate authentication headers based upon the response + and retry the connection. + https://bugzilla.gnome.org/show_bug.cgi?id=749596 + +2015-12-14 14:19:05 +0000 Luis de Bethencourt <luisbg@osg.samsung.com> + + * gst/rtsp/gstrtspsrc.c: + rtspsrc: check port-range format + The string could exist but with a wrong format, in that case we still want + to reset the values of client_port_range.min and max like we do if there is + no string. + CID 1139593 + +2015-12-14 14:55:12 +0100 Thomas Roos <thomas.roos@industronic.de> + + * sys/directsound/gstdirectsoundsink.c: + directsoundsink: Check device property and fail if device can't be found + Don't use default if a specific device is set but it can't be found. + https://bugzilla.gnome.org/show_bug.cgi?id=759452 + +2015-12-14 14:15:00 +0100 Thomas Roos <thomas.roos@industronic.de> + + * sys/directsound/gstdirectsoundsink.c: + directsoundsink: Fix handling of the mute property + - set mute value at startup + - correct set and get mute functions + https://bugzilla.gnome.org/show_bug.cgi?id=755106 + +2015-12-11 11:23:13 +0100 Thomas Roos <thomas.roos@industronic.de> + + * sys/directsound/gstdirectsoundsink.c: + directsoundsink: Check the return value of GetStatus() too to decide if there was an error + If GetStatus() fails, the status itself won't be very meaningful but we also + have to look at its return value. This fixes blocking pipelines when removing + sound devices or during other errors, where we wouldn't notice the error and + then wait forever. + https://bugzilla.gnome.org/show_bug.cgi?id=734098 + +2015-12-10 17:41:46 +0000 Luis de Bethencourt <luisbg@osg.samsung.com> + + * gst/isomp4/atoms.c: + * gst/isomp4/atoms.h: + * gst/isomp4/gstqtmux.c: + isomp4: remove unused parameters in build_*_extension + AtomTRAK parameter is not used by build_mov_alac_extension(), + build_jp2h_extension(), or build_mov_alac_extension() and can be + removed. + +2015-12-10 15:11:07 +0000 Luis de Bethencourt <luisbg@osg.samsung.com> + + * gst/isomp4/gstqtmux.c: + isomp4: replace variable only used once + Replace has_shift variable with value since it is only use once. + +2015-12-09 12:24:09 +0200 Sebastian Dröge <sebastian@centricular.com> + + * gst/rtpmanager/gstrtpjitterbuffer.c: + rtpjitterbuffer: Fix packet dropping after a big discont + We would queue 5 consective packets before considering a reset and a proper + discont here. Instead of expecting the next output packet to have the current + seqnum (i.e. the fifth), expect it to have the first seqnum. Otherwise we're + going to drop all queued up packets. + +2015-12-09 11:49:02 +0530 Ravi Kiran K N <ravi.kiran@samsung.com> + + * gst/interleave/interleave.h: + interleave: Remove unsed field + Remove unused field collect_event in interleave. + https://bugzilla.gnome.org/show_bug.cgi?id=759226 + +2015-12-07 16:33:14 +0100 Edward Hervey <edward@centricular.com> + + * gst/isomp4/qtdemux.c: + qtdemux: Stop pushing data as soon as possible in push-mode + When working in push-mode, we attempt to push out everything currently + buffered in the adapter. + This has two pitfalls: + * We could stop earlier (the moment we get a non-ok or non-not-linked) + * We return the last combined flow return, which might be completely + different from the previous combined flow return + +2015-12-07 09:08:09 -0500 Nicolas Dufresne <nicolas.dufresne@collabora.co.uk> + + * autogen.sh: + * common: + Automatic update of common submodule + From b319909 to 86e4663 + +2015-12-07 14:41:51 +0200 Sebastian Dröge <sebastian@centricular.com> + + * gst/rtpmanager/rtpsession.c: + rtpsession: Add a warning if an empty RTCP packet is tried to be sent + https://bugzilla.gnome.org/show_bug.cgi?id=759119 + +2015-11-30 19:20:13 -0500 Nicolas Dufresne <nicolas.dufresne@collabora.com> + + * configure.ac: + * ext/vpx/gstvp8dec.c: + * ext/vpx/gstvp8dec.h: + * ext/vpx/gstvp9dec.c: + * ext/vpx/gstvp9dec.h: + vpxdec: Use GstMemory to avoid copies + With the VPX decoders it's not simple to use downstream buffer pool, + because we don't know the image size and alignment when buffers get + allocated. We can though use GstAllocator (for downstream, or the system + allocator) to avoid a copy before pushing if downstream supports + GstVideoMeta. This would still cause a copy for sink that requires + specialized memory and does not have a GstAllocator for that, though + it will greatly improve performance for sink like glimagesink and + cluttersink. To avoid allocating for every buffer, we also use a + internal buffer pool. + https://bugzilla.gnome.org/show_bug.cgi?id=745372 + +2015-11-30 08:42:35 +0100 Edward Hervey <edward@centricular.com> + + * gst/audioparsers/gstaacparse.c: + aacparse: Avoid over-skipping when checking LOAS config + There might be multiple LOAS config in a row in a full frame. The first + one might be a multi-layer config (which we can't properly parse yet)... + but then followed by a valid (single-layer) one. + The code was previously skipping whole frames (instead of just the LOAS + config we failed to read) resulting in multiple frames (seen up to 6s in + some situation) being dropped before finally getting the configuration. + https://bugzilla.gnome.org/show_bug.cgi?id=758826 + +2015-11-25 17:08:56 +0100 Edward Hervey <edward@centricular.com> + + * gst/avi/gstavidemux.c: + avidemux: Properly set SPARSE stream flags for subpicture/subtitle + And while we're at it, also detect 'DXSA' as being a variant fourcc + of 'DXSB' for XSUB + +2015-11-30 21:23:52 -0800 Reynaldo H. Verdejo Pinochet <reynaldo@osg.samsung.com> + + * tests/check/elements/souphttpsrc.c: + tests: souphttpsrc: grammar fix + +2015-11-30 21:01:17 -0800 Reynaldo H. Verdejo Pinochet <reynaldo@osg.samsung.com> + + * tests/check/elements/souphttpsrc.c: + tests: souphttpsrc: switch shoutcast stream provider + Fixes failing ICY test. Previous provider has + streaming disabled outside UK. + https://bugzilla.gnome.org/show_bug.cgi?id=758114 + +2015-11-18 16:10:11 +0100 Michael Olbrich <m.olbrich@pengutronix.de> + + * gst/avi/gstavimux.c: + avimux: don't crash if we never got audio caps before stopping + auds.blockalign is set once the first caps arrive. If + gst_avi_mux_stop_file() is called before this happens then auds.blockalign + is zero and gst_avi_mux_audsink_set_fields() cause a crash: + [...] + avipad->parent.hdr.rate = avipad->auds.av_bps / avipad->auds.blockalign; + [...] + https://bugzilla.gnome.org/show_bug.cgi?id=758912 + +2015-12-01 18:20:23 +0100 Wim Taymans <wtaymans@redhat.com> + + * sys/v4l2/gstv4l2bufferpool.c: + v4l2bufferpool: don't block when resurecting a buffer + When we are resurecting a buffer, don't block. instead let us copy a + buffer. + +2015-12-01 00:30:08 -0300 Thiago Santos <thiagoss@osg.samsung.com> + + * gst/wavparse/gstwavparse.c: + wavparse: remove extra variable to improve readability + Makes it easier to see that the event is being replaced/unrefed + +2015-12-01 00:22:36 -0300 Thiago Santos <thiagoss@osg.samsung.com> + + * gst/wavparse/gstwavparse.c: + wavparse: respect seqnum in seek events + Propagate the original seek seqnum to events originated from + seeking to make sure they have the same value + +2015-12-01 00:03:21 -0300 Thiago Santos <thiagoss@osg.samsung.com> + + * gst/wavparse/gstwavparse.c: + wavparse: flush upstream when seeking in pull mode + Makes sure upstream will unblock and return the thread so that + seeking can continue + https://bugzilla.gnome.org/show_bug.cgi?id=758861 + +2015-11-27 09:27:29 +0100 Anton Bondarenko <antonbo@axis.com> + + * gst/rtp/gstrtph264pay.c: + rtph264pay: add "send SPS/PPS with every key frame" mode + It's not enough to have timeout or event based SPS/PPS information sent + in RTP packets. There are some scenarios when key frames may appear + more frequently than once a second, in which case the minimum timeout + for "config-interval" of 1 second for sending SPS/PPS is not sufficient. + It might also be desirable in general to make sure the SPS/PPS is + available with every keyframe (packet loss aside), so receivers can + actually pick up decoding immediately from the first keyframe if + SPS/PPS is not signaled out of band. + This patch adds the possibility to send SPS/PPS with every key frame. This + mode can be enabled by setting "config-interval" property to -1. In this + case the payloader will add SPS and PPS before every key (IDR) frame. + https://bugzilla.gnome.org/show_bug.cgi?id=757892 + +2015-11-27 09:03:51 +0100 Tim-Philipp Müller <tim@centricular.com> + + * gst/rtp/gstrtph264pay.c: + * gst/rtp/gstrtph264pay.h: + * tests/check/elements/rtp-payloading.c: + rtph264pay: change config-interval property type from uint to int + This way we can use -1 as special value, which is nicer than MAXUINT. + This is backwards compatible even with the GValue API, as shown by + a unit test. + https://bugzilla.gnome.org/show_bug.cgi?id=757892 + +2015-11-26 21:46:11 +0000 Luis de Bethencourt <luisbg@osg.samsung.com> + + * gst/isomp4/qtdemux.c: + qtdemux: add support for Opus + Add support for demuxing Opus encapsulated in MP4 files, based on the + following spec: https://www.opus-codec.org/docs/opus_in_isobmff.html + https://bugzilla.gnome.org/show_bug.cgi?id=742643 + +2015-11-25 22:48:32 +0000 Luis de Bethencourt <luisbg@osg.samsung.com> + + * gst/isomp4/qtdemux.c: + qtdemux: use macro for codec_name + Use _codec() macro instead of duplicating code. + +2015-03-25 16:32:55 +0100 Philipp Zabel <p.zabel@pengutronix.de> + + * sys/v4l2/gstv4l2videodec.c: + v4l2: videodec: choose format from caps + https://bugzilla.gnome.org/show_bug.cgi?id=733827 + +2015-03-27 15:02:33 +0100 Philipp Zabel <p.zabel@pengutronix.de> + + * sys/v4l2/gstv4l2object.c: + * sys/v4l2/gstv4l2object.h: + v4l2: add gst_v4l2_object_probe_caps + Add a variant of gst_v4l2_object_get_caps that bypasses the probed_caps cache. + https://bugzilla.gnome.org/show_bug.cgi?id=733827 + +2015-11-19 17:20:55 -0500 Nicolas Dufresne <nicolas.dufresne@collabora.com> + + * sys/v4l2/gstv4l2.c: + v4l2-probe: Skip devices without supported formats + +2015-11-13 12:35:59 -0500 Nicolas Dufresne <nicolas.dufresne@collabora.com> + + * configure.ac: + * sys/v4l2/gstv4l2.c: + v4l2: Track /dev/video* to triggered required probe + If something in /dev/video* get added, removed or replaced, we need to + probe the devices again in order to ensure the dynamic devices are up to + date. + https://bugzilla.gnome.org/show_bug.cgi?id=758085 + +2015-11-25 14:51:40 +1100 Alessandro Decina <alessandro.d@gmail.com> + + * gst/rtpmanager/rtpsession.c: + rtpmanager: rtpsession: don't send empty RTCP packets + generate_rtcp can produce empty packets when reduced size RTCP is turned on. + Skip them since it doesn't make sense to push them and they cause errors with + elements that expect RTCP packets to contain data (like srtpenc). + +2015-11-24 10:57:28 -0300 Thiago Santos <thiagoss@osg.samsung.com> + + * gst/isomp4/qtdemux.c: + qtdemux: restore the segment on case of soft reset + When seeking back to restore the mdat position a flush is pushed + through and it resets downstream segment information. Make sure + that after the flush (that does a soft reset) a segment will + be pushed again + Fixes regressions spotted at + https://ci.gstreamer.net/job/GStreamer-master-validate/2100/ + +2015-11-20 12:44:22 +0000 Graham Leggett <minfrin@sharp.fm> + + * gst/multifile/gstmultifilesink.c: + multifilesink: fix spelling of variable + https://bugzilla.gnome.org/show_bug.cgi?id=758390 + +2015-11-20 11:05:51 +0000 Luis de Bethencourt <luisbg@osg.samsung.com> + + * gst/isomp4/fourcc.h: + * gst/isomp4/qtdemux.c: + qtdemux: unite duplicate FourCC + Unite in fourcc.h the FourCCs that are used twice or more in qtdemux + +2015-11-19 15:33:45 -0500 Nicolas Dufresne <nicolas.dufresne@collabora.com> + + * sys/v4l2/gstv4l2transform.c: + * sys/v4l2/gstv4l2videodec.c: + v4l2: Fix capture/output-io-mode properties + There was some miss-match in the implementation. This makes it + concistent, though functionally it worked, except the video decoder + output-io-mode getter. + +2015-11-19 19:48:06 +0000 Luis de Bethencourt <luisbg@osg.samsung.com> + + * gst/isomp4/atoms.c: + atoms: remove unused argument of build_mov_wave_extension() + AtomTrak * trak argument of build_move_wave_extension() isn't used. + Removing it. + +2015-11-19 19:28:20 +0000 Luis de Bethencourt <luisbg@osg.samsung.com> + + * gst/isomp4/fourcc.h: + * gst/isomp4/qtdemux.c: + qtdemux: remove duplicate FourCC + Use the available FourCCs in fourcc.h instead of duplicating them. + +2015-11-19 18:36:39 +0000 Luis de Bethencourt <luisbg@osg.samsung.com> + + * gst/isomp4/atoms.c: + * gst/isomp4/fourcc.h: + * gst/isomp4/gstqtmux.c: + isomp4: centralize all FourCC + 10 FourCCs generated with GST_MAKE_FOURCC() in gstqtmux.c and atoms.c + already exist in fourcc.h. Don't duplicate these and use them directly. + Plus moving 6 to fourcc.h, to centralize them all. + +2015-11-19 17:32:12 +0000 Luis de Bethencourt <luisbg@osg.samsung.com> + + * gst/matroska/webm-mux.c: + matroska/webmmux: fix outdated example launch lines + Update gst-launch-0.10 lines to gst-launch-1.0 + +2015-11-16 13:26:50 +0000 Luis de Bethencourt <luisbg@osg.samsung.com> + + * gst/isomp4/atoms.c: + * gst/isomp4/atoms.h: + * gst/isomp4/fourcc.h: + * gst/isomp4/gstqtmux.c: + * gst/isomp4/gstqtmuxmap.c: + isomp4: add support for Opus in mp4mpux + Add support for muxing MP4 files containing Opus. Based on the spec + detailed here: + https://www.opus-codec.org/docs/opus_in_isobmff.html + https://bugzilla.gnome.org/show_bug.cgi?id=742643 + +2015-11-18 19:10:56 +0200 Sebastian Dröge <sebastian@centricular.com> + + * gst/isomp4/qtdemux.c: + qtdemux: Replace tabs with spaces + +2015-11-18 19:07:53 +0200 Sebastian Dröge <sebastian@centricular.com> + + * gst/isomp4/qtdemux.c: + qtdemux: Cast to signed integers to prevent unsigned compare between negative and positive numbers + This fixes seeking if the first entries in the samples table are negative. The + binary search would always fail on this as the array would not be sorted if + interpreting the negative numbers as huge positive numbers. This caused us to + always output buffers from the beginning after a seek instead of close to the + seek position. + Also add a case to the comparison function for equality. + +2015-11-18 16:01:48 +0000 Luis de Bethencourt <luisbg@osg.samsung.com> + + * gst/matroska/matroska-mux.c: + matroskamux: remove duplicate check + We want 1 or 2 streamheaders, the check if (bufarr->len != 1 && + bufarr->len != 2) is enough. Not need to check if bufarr->len is <= 0 or + > 255. + +2015-11-18 14:48:36 +0900 Vineeth TM <vineeth.tm@samsung.com> + + * ext/soup/gstsouphttpclientsink.c: + souphttpclientsink: Fix error leak and handle error + g_thread_try_new allows for possiblity of failures. In case it fails, + error is not handled and leaked. + https://bugzilla.gnome.org/show_bug.cgi?id=758260 + +2015-11-15 17:16:29 -0800 Josep Torra <n770galaxy@gmail.com> + + * gst/rtp/gstrtpgstdepay.c: + rtpgstdepay: Properly handle backward compat for event deserialization + Actual code is checking for a NULL terminator and a ';' terminator, + for backward compat, in a chained way that cause all events being rejected. + The proper condition is to reject the events when terminator isn't + in ['\0', ';'] set. + https://bugzilla.gnome.org/show_bug.cgi?id=758151 + +2015-11-15 17:11:02 -0800 Josep Torra <n770galaxy@gmail.com> + + * tests/check/elements/rtp-payloading.c: + tests: rtp-payloading: Test for handling of custom events in rtpgst + Add a simple test that checks proper serialization/deserialization + of custom events with rtpgstpay and rtpgstdepay. + +2015-11-16 16:23:43 -0500 Nicolas Dufresne <nicolas.dufresne@collabora.com> + + * ext/vpx/gstvp8dec.c: + * ext/vpx/gstvp9dec.c: + vpxdec: Use threads on multi-core systems + This adds an automatic mode to the threads property of vpxdec in order to + use as many threads as there is CPU on the platform. This brings back + GStreamer VPX decoding performance closer to what is achieved by other + players, including Chromium. + https://bugzilla.gnome.org/show_bug.cgi?id=758195 + +2015-11-16 10:58:32 -0300 Thiago Santos <thiagoss@osg.samsung.com> + + * gst/isomp4/qtdemux.c: + qtdemux: only send initial gaps for non-fragmented streams + It would be unusual to have the header segment with an 'edts' atom + indicating gaps at the beginning when handling fragmented streams. + The header usually doesn't contain any timestamping information, this + should come from the playlist/manifest and the segments with media + in those scenarios. + https://bugzilla.gnome.org/show_bug.cgi?id=758171 + +2015-11-17 09:41:34 -0300 Thiago Santos <thiagoss@osg.samsung.com> + + * gst/isomp4/qtdemux.c: + Revert "Revert "qtdemux: respect qt segments in push-mode for empty starts"" + This reverts commit d842ff288a9d01214a046becbfd9cbff3a4acea0. + This was reverted by accident + +2015-11-17 12:39:05 +0200 Sebastian Dröge <sebastian@centricular.com> + + * gst/udp/gstudpsrc.c: + * gst/udp/gstudpsrc.h: + udpsrc: Add "loop" property for enabling/disabling multicast loopback + On POSIX, IP_MULTICAST_LOOP is a setting for the sender socket. On Windows it + is a setting for the receiver socket. As such we will need it on udpsrc too to + allow filtering out our own multicast packets. + +2015-11-16 13:52:05 +0200 Sebastian Dröge <sebastian@centricular.com> + + * gst/isomp4/qtdemux.c: + Revert "qtdemux: respect qt segments in push-mode for empty starts" + This reverts commit 142d8e2d23e5602e7382977af1043d621625f8c8. + +2015-11-16 16:56:04 +0900 Vineeth TM <vineeth.tm@samsung.com> + + * gst/isomp4/qtdemux.c: + qtdemux: Fix string memory leak + The string got using g_strdup_printf will be allocated memory + and should be freed after use. + https://bugzilla.gnome.org/show_bug.cgi?id=758161 + +2015-11-14 21:51:11 -0800 Reynaldo H. Verdejo Pinochet <reynaldo@osg.samsung.com> + + * sys/v4l2/gstv4l2object.c: + v4l2/object: remove unnecessary NULL check before g_free() + +2015-11-14 21:45:29 -0800 Reynaldo H. Verdejo Pinochet <reynaldo@osg.samsung.com> + + * sys/oss/gstosssrc.c: + osssrc: remove unnecessary NULL check before g_free() + +2015-11-14 21:43:24 -0800 Reynaldo H. Verdejo Pinochet <reynaldo@osg.samsung.com> + + * sys/sunaudio/gstsunaudiosrc.c: + sunaudiosrc: remove unnecessary NULL checks before g_free() + +2015-11-14 21:36:30 -0800 Reynaldo H. Verdejo Pinochet <reynaldo@osg.samsung.com> + + * gst/wavparse/gstwavparse.c: + wavparse: remove unnecessary NULL checks before g_free() + +2015-11-14 21:31:08 -0800 Reynaldo H. Verdejo Pinochet <reynaldo@osg.samsung.com> + + * gst/matroska/matroska-mux.c: + matroskamux: remove unnecessary NULL checks before g_free() + +2015-11-14 21:26:21 -0800 Reynaldo H. Verdejo Pinochet <reynaldo@osg.samsung.com> + + * gst/matroska/matroska-read-common.c: + matroska/read-common: remove unnecessary NULL checks before g_free() + +2015-11-14 20:43:10 -0800 Reynaldo H. Verdejo Pinochet <reynaldo@osg.samsung.com> + + * gst/isomp4/atoms.c: + isomp4/atoms: remove unnecessary NULL checks before g_free() + +2015-11-14 20:35:54 -0800 Reynaldo H. Verdejo Pinochet <reynaldo@osg.samsung.com> + + * gst/rtp/gstrtptheorapay.c: + rtp/theorapay: remove unnecessary NULL checks before g_free() + +2015-11-14 20:33:54 -0800 Reynaldo H. Verdejo Pinochet <reynaldo@osg.samsung.com> + + * gst/rtp/gstrtpvorbispay.c: + rtp/vorbispay: remove unnecessary NULL checks before g_free() + +2015-11-14 20:31:34 -0800 Reynaldo H. Verdejo Pinochet <reynaldo@osg.samsung.com> + + * gst/rtp/gstrtpjpegpay.c: + rtp/jpegpay: remove unnecessary NULL checks before g_free() + +2015-11-14 20:27:04 -0800 Reynaldo H. Verdejo Pinochet <reynaldo@osg.samsung.com> + + * gst/rtp/gstrtpgstpay.c: + rtpgstpay: remove unnecessary NULL checks before g_free() + +2015-11-14 20:22:09 -0800 Reynaldo H. Verdejo Pinochet <reynaldo@osg.samsung.com> + + * gst/rtsp/gstrtspsrc.c: + rtspsrc: remove unnecessary NULL checks before g_free() + +2015-11-14 20:14:25 -0800 Reynaldo H. Verdejo Pinochet <reynaldo@osg.samsung.com> + + * gst/flx/gstflxdec.c: + flxdec: remove unnecessary NULL check before g_free() + +2015-11-14 20:09:54 -0800 Reynaldo H. Verdejo Pinochet <reynaldo@osg.samsung.com> + + * gst/effectv/gstop.c: + effectv/optv: remove unnecessary NULL checks before g_free() + +2015-11-14 20:05:03 -0800 Reynaldo H. Verdejo Pinochet <reynaldo@osg.samsung.com> + + * gst/effectv/gstshagadelic.c: + effectv/shagadelictv: remove unnecessary NULL checks before g_free() + +2015-11-14 20:01:43 -0800 Reynaldo H. Verdejo Pinochet <reynaldo@osg.samsung.com> + + * gst/effectv/gstripple.c: + effectv/ripple: remove unnecessary NULL checks before g_free() + +2015-11-14 19:56:57 -0800 Reynaldo H. Verdejo Pinochet <reynaldo@osg.samsung.com> + + * gst/effectv/gstradioac.c: + effectv/radioac: remove unnecessary NULL checks before g_free() + +2015-11-14 19:52:12 -0800 Reynaldo H. Verdejo Pinochet <reynaldo@osg.samsung.com> + + * gst/effectv/gststreak.c: + effectv/streak: remove unnecessary NULL check before g_free() + +2015-11-14 17:04:55 -0800 Reynaldo H. Verdejo Pinochet <reynaldo@osg.samsung.com> + + * ext/shout2/gstshout2.c: + shout2: remove unnecessary NULL checks before g_free() + +2015-11-14 16:57:13 -0800 Reynaldo H. Verdejo Pinochet <reynaldo@osg.samsung.com> + + * ext/vpx/gstvp9enc.c: + vp9enc: remove unnecessary NULL check before g_free() + +2015-11-14 16:54:42 -0800 Reynaldo H. Verdejo Pinochet <reynaldo@osg.samsung.com> + + * ext/vpx/gstvp8enc.c: + vp8enc: remove unnecessary NULL check before g_free() + +2015-11-14 16:20:33 -0800 Reynaldo H. Verdejo Pinochet <reynaldo@osg.samsung.com> + + * ext/soup/gstsouphttpsrc.c: + souphttpsrc: remove unnecessary NULL checks before g_free() + +2015-11-13 13:34:02 +0100 Aurélien Zanelli <aurelien.zanelli@parrot.com> + + * sys/v4l2/gstv4l2object.c: + v4l2object: add support of NV16, NV61 and NV24 formats + Mapped respectively to V4L2_PIX_FMT_NV16/V4L2_PIX_FMT_NV16M, + V4L2_PIX_FMT_NV61,V4L2_PIX_FMT_NV61M and V4L2_PIX_FMT_NV24 v4l2 formats. + https://bugzilla.gnome.org/show_bug.cgi?id=758058 + +2015-11-11 14:10:53 +0900 Vineeth TM <vineeth.tm@samsung.com> + + * gst/multifile/gstsplitmuxpartreader.c: + splitmuxpartreader: Fix GCond leak + inactive_cond is not being cleared resulting in memory leak. + https://bugzilla.gnome.org/show_bug.cgi?id=757924 + +2015-08-06 12:44:20 +0900 Vineeth TM <vineeth.tm@samsung.com> + + * ext/jpeg/gstjpegdec.c: + jpegdec: fix output state memory leak + When jpeg_finish_decompress is called, output state reference is being created. + But if there is any failures in finishing decompress, it jumps to setjmp, + and at that point state was not referenced. Resulting in leak of output state. + Hence adding another setjmp after output state is referenced. + Similarly adding another setjmp to unmap the frame in case error happens before + finish_decompress + https://bugzilla.gnome.org/show_bug.cgi?id=753087 + +2015-08-10 11:23:45 -0300 Thiago Santos <thiagoss@osg.samsung.com> + + * gst/isomp4/qtdemux.c: + qtdemux: respect qt segments in push-mode for empty starts + In push-mode it is hard to support qt segments overall but it is + possible to support when the file isn't heavily edited but just contain + a segment to indicate a gap at the beginning. This also allows properly + timestamping data that has negative DTS in push-mode. + It is relevant to support those for 2 scenarios: + 1) fragmented streaming + 2) HTTP playback of 'regular' mp4 + https://bugzilla.gnome.org/show_bug.cgi?id=753484 + +2015-11-05 18:39:33 +0530 Nirbheek Chauhan <nirbheek@centricular.com> + + * ext/pulse/pulsedeviceprovider.c: + pulse: Don't leak caps and structures in the device provider + +2015-11-04 19:01:20 +0530 Arun Raghavan <arun@centricular.com> + + * gst/rtpmanager/rtpsession.c: + rtpmanager: Document properties that are expressed in bits per second + This changed in 928cd110bcea5d143cab3ea747991851d52ecbad and + 73c0c2920f9aca96982a4de0c20b3417aa148b81 but was not documented. + https://bugzilla.gnome.org/show_bug.cgi?id=747863 + +2015-11-04 18:51:32 +0530 Arun Raghavan <arun@centricular.com> + + * gst/rtpmanager/gstrtpsession.c: + * gst/rtpmanager/rtpsession.c: + rtpmanager: Trivial gst-indent fixes + +2015-08-12 13:35:40 +0200 Philippe Normand <philn@igalia.com> + + * gst/isomp4/qtdemux.c: + * gst/isomp4/qtdemux.h: + qtdemux: support for cenc auxiliary info parsing outside of moof box + When the cenc aux info index is out of moof boundaries, keep track of + it and parse the beginning of the mdat box, before the first sample. + https://bugzilla.gnome.org/show_bug.cgi?id=755614 + +2015-11-03 20:33:10 +0200 Sebastian Dröge <sebastian@centricular.com> + + * gst/matroska/matroska-demux.c: + matroskademux: Use codecutils helpers for creating Opus caps + Also fix up codec data with values from the container. + https://bugzilla.gnome.org/show_bug.cgi?id=757152 + +2015-11-03 14:51:48 +0200 Sebastian Dröge <sebastian@centricular.com> + + * gst/matroska/matroska-demux.c: + matroskademux: There is no multistream field for Opus anymore + https://bugzilla.gnome.org/show_bug.cgi?id=757152 + +2015-11-03 12:42:52 +0200 Sebastian Dröge <sebastian@centricular.com> + + * gst/matroska/matroska-mux.c: + * gst/matroska/webm-mux.c: + matroska/webmmux: Support Opus in webmmux and VP9 in matroskamux + https://bugzilla.gnome.org/show_bug.cgi?id=729950 + +2015-11-03 12:40:15 +0200 Sebastian Dröge <sebastian@centricular.com> + + * gst/matroska/matroska-demux.c: + matroskademux: Parse and handle CodecDelay, SeekPreroll and DiscardPadding + https://bugzilla.gnome.org/show_bug.cgi?id=727305 + +2015-11-03 12:18:19 +0200 Sebastian Dröge <sebastian@centricular.com> + + * gst/matroska/matroska-ids.h: + * gst/matroska/matroska-mux.c: + matroskamux: Write CodecDelay, DiscardPadding and SeekPreroll for Opus + And also adjust timestamps and durations according to the codec delay, both + should include it for whatever reason. + https://bugzilla.gnome.org/show_bug.cgi?id=727305 + +2015-11-03 11:49:54 +0200 Sebastian Dröge <sebastian@centricular.com> + + * gst/matroska/matroska-mux.c: + matroskamux: Opus headers are not in-band + https://bugzilla.gnome.org/show_bug.cgi?id=727305 + +2015-11-03 22:01:07 +0530 Arun Raghavan <git@arunraghavan.net> + + * sys/v4l2/gstv4l2.c: + v4l2: Set O_CLOEXEC on the device fd + This is needed to make sure that child processes don't inherit the video + device fd which can cause problems with some drivers. + +2015-11-03 14:46:30 +0000 Luis de Bethencourt <luisbg@osg.samsung.com> + + * gst/rtpmanager/gstrtpjitterbuffer.c: + rtpmanager: switch G_GINT64_FORMAT for GST_STIME_ARGS + No need to use G_GINT64_FORMAT for potentially negative values of + GstClockTimeDiff. Since 1.6 these can be handled with GST_STIME_ARGS. + Plus it creates more readable values in the logs. + https://bugzilla.gnome.org/show_bug.cgi?id=757480 + +2015-11-03 14:26:29 +0000 Luis de Bethencourt <luisbg@osg.samsung.com> + + * gst/rtpmanager/rtpsource.c: + rtpmanager: use GST_STIME_ARGS for GstClockTimeDiff + No need to manually handle negative values of diff, GST_STIME_ARGS does + exactly this. + +2015-11-02 16:53:15 +0000 Luis de Bethencourt <luisbg@osg.samsung.com> + + * gst/videomixer/videomixer2.c: + videomixer: use GST_STIME_ARGS for GstClockTimeDiff + No need to manually handle negative values of diff, GST_STIME_ARGS does + exactly this. + +2015-11-02 16:43:46 +0000 Luis de Bethencourt <luisbg@osg.samsung.com> + + * gst/deinterlace/gstdeinterlace.c: + deinterlace: use GST_STIME_ARGS for GstClockTimeDiff + No need to manually handle negative values of diff, GST_STIME_ARGS is + available for this. + +2015-10-30 10:05:37 +0530 Ravi Kiran K N <ravi.kiran@samsung.com> + + * gst/audiofx/audiochebband.c: + audiochebband: Fix typo in example pipeline + Fix typo in example pipeline. + https://bugzilla.gnome.org/show_bug.cgi?id=757340 + +2015-10-28 23:47:30 +0530 Nirbheek Chauhan <nirbheek@centricular.com> + + * sys/v4l2/gstv4l2deviceprovider.c: + v4l2: fix double-unref in the v4l2 device provider + +2015-10-27 10:48:00 +0100 Nicola Murino <nicola.murino@gmail.com> + + * gst/matroska/matroska-ids.c: + matroskamux: don't drop JPEG frames that only have PTS but no DTS set + For the MS/VfW codec ids, we want to write DTS timestamps instead + of PTS because that's what everyone else seems to do (and it's also + how it is in AVI). So for those input formats we use the buffer DTS + instead of the PTS. However, if there's no DTS set but only the PTS + then just take the PTS instead of dropping the input buffer. This + is useful especially for I-frame only codecs like JPEG and huffyuv, + but should also be fine as fallback in general. + Fixes regression with input JPEG frames that only have PTS set on them. + https://bugzilla.gnome.org/show_bug.cgi?id=756967 + +2015-10-24 23:57:38 +0200 George Kiagiadakis <george.kiagiadakis@collabora.com> + + * tests/check/elements/splitmux.c: + tests/check/splitmux: test that the release_pad vfunc of splitmuxsink actually releases pads + https://bugzilla.gnome.org/show_bug.cgi?id=753622 + +2015-10-24 23:57:29 +0200 George Kiagiadakis <george.kiagiadakis@collabora.com> + + * gst/multifile/gstsplitmuxsink.c: + splitmuxsink: do not destroy the multiqueue & muxer when going to NULL + Instead, delay it until all request pads have been released. This is + because the release_pad() vfunc requires the multiqueue and muxer to + be there in order to release their request pads as well. If those + elements are destroyed earlier, release_pad() does not work, no + pads are released and some resources are leaked. + https://bugzilla.gnome.org/show_bug.cgi?id=753622 + +2015-10-20 15:28:10 +0300 Sebastian Dröge <sebastian@centricular.com> + + * gst/matroska/matroska-demux.c: + matroskademux: Read buffer timestamp *after* actually setting it + https://bugzilla.gnome.org/show_bug.cgi?id=756809 + +2015-10-24 17:14:07 +0300 Sebastian Dröge <sebastian@centricular.com> + + * gst/audiofx/gstscaletempo.c: + * gst/audiofx/gstscaletempo.h: + scaletempo: Fix handling of rate < 0 + We have to reverse all samples in a buffer before processing them to properly + have continuous data from one buffer to another. As a result we will have a + negative applied rate and a rate of 1.0. + Also make sure that input buffers are correctly clipped to the segment, + otherwise our calculations are going to go wrong. + Also copy over the segment event's sequence number to the output segment while + we're at it. + https://bugzilla.gnome.org/show_bug.cgi?id=757033 + +2015-10-19 18:04:56 -0300 Thiago Santos <thiagoss@osg.samsung.com> + + * gst/deinterlace/gstdeinterlace.c: + deinterlace: break as soon as non-interlaced if found + It looks for a non-interlaced entry on the filter caps, break + as soon as one is found to avoid wasting cpu + +2015-10-19 17:50:28 -0300 Thiago Santos <thiagoss@osg.samsung.com> + + * gst/deinterlace/gstdeinterlace.c: + deinterlace: implement accept-caps + Implement accept-caps handler to avoid doing a full caps query + downstream to handle it. + This commit implements accept-caps as a simplification of the _getcaps + function, so it exposes the same limitations that getcaps would. + For example, not accepting renegotiation to caps with capsfeatures when + it was last configured to a caps that it has to deinterlace. + +2015-10-19 17:06:28 -0300 Thiago Santos <thiagoss@osg.samsung.com> + + * tests/check/elements/deinterlace.c: + tests: deinterlace: fix small typo in comment + +2015-10-26 00:41:28 +1100 Jan Schmidt <jan@centricular.com> + + * tests/files/Makefile.am: + check: Dist splitvideo0[012].ogg test files. + +2015-10-23 20:16:17 +0300 Sebastian Dröge <sebastian@centricular.com> + + * gst/audiofx/gstscaletempo.c: + * gst/audiofx/gstscaletempo.h: + scaletempo: Add support for F64 + +2015-10-22 17:40:38 -0700 Mischa Spiegelmock <mspiegelmock@gmail.com> + + * docs/plugins/inspect/plugin-rtp.xml: + * gst/multipart/multipartdemux.c: + * gst/rtp/README: + * gst/rtp/gstrtpvp8pay.c: + * gst/rtpmanager/gstrtprtxreceive.c: + * gst/udp/gstudpsrc.c: + docs: Minor fixes in various places + https://bugzilla.gnome.org/show_bug.cgi?id=756996 + +2015-10-21 17:43:31 +0100 Luis de Bethencourt <luisbg@osg.samsung.com> + + * gst/goom/plugin_info.c: + goom: remove compiler trick + After commit 2cb6cfed22166b262ae50cb58f3ff11dd8ba91f9 there is no need to + trick the compiler anymore about the usage of variable cpuFlavour. + +2015-10-21 14:35:02 +0100 Tim-Philipp Müller <tim@centricular.com> + + * common: + Automatic update of common submodule + From b99800a to b319909 + +2015-10-21 17:41:38 +0530 Ravi Kiran K N <ravi.kiran@samsung.com> + + * gst/audiofx/audiofxbaseiirfilter.h: + audiofx: remove unused variable + Remove unsued variable have_coeffs in audiofxbaseiirfilter + https://bugzilla.gnome.org/show_bug.cgi?id=756905 + +2015-10-20 17:29:42 +0300 Sebastian Dröge <sebastian@centricular.com> + + * configure.ac: + Use new GST_ENABLE_EXTRA_CHECKS #define + https://bugzilla.gnome.org/show_bug.cgi?id=756870 + +2015-10-21 14:25:55 +0300 Sebastian Dröge <sebastian@centricular.com> + + * README: + * common: + Automatic update of common submodule + From 9aed1d7 to b99800a + +2015-10-21 11:53:09 +0100 Tim-Philipp Müller <tim@centricular.com> + + * gst/flv/gstflvdemux.c: + flvdemux: relax creation time parsing + Parse wrong timestamps like we used to write as well, + e.g. 10:9:42, and the hour might be without a leading + zero in any case. + +2015-10-21 11:45:35 +0100 Tim-Philipp Müller <tim@centricular.com> + + * gst/flv/gstflvdemux.c: + flvdemux: fix indentation + +2015-10-21 11:44:50 +0100 Tim-Philipp Müller <tim@centricular.com> + + * gst/flv/gstflvdemux.c: + flvdemux: extract both creation date and time + Before we only extracted the date part. + +2015-10-21 11:16:01 +0100 Tim-Philipp Müller <tim@centricular.com> + + * gst/flv/gstflvmux.c: + flvmux: fix writing of creation time + Don't write time as e.g. 11:9:42 + +2015-10-13 12:42:56 -0300 Thiago Santos <thiagoss@osg.samsung.com> + + * gst/rtp/gstrtpj2kpay.c: + rtpj2kpay: update fragment offset + It was always being set to 0, making the resulting stream broken + for the receiver + https://bugzilla.gnome.org/show_bug.cgi?id=756422 + +2015-10-19 15:36:37 +0300 Ryan Hendrickson <ryan.hendrickson@alum.mit.edu> + + * gst/isomp4/gstqtmux.c: + qtmux: Don't unconditionally use strnlen() + It's not available on older OSX and we can as well use memchr() here. + https://bugzilla.gnome.org/show_bug.cgi?id=756154 + +2015-10-19 17:38:32 +0900 Vineeth TM <vineeth.tm@samsung.com> + + * gst/auparse/gstauparse.c: + auparse: Fix event memory leak + Free the event after being handled to prevent memory leak. + https://bugzilla.gnome.org/show_bug.cgi?id=756799 + +2015-10-19 09:14:19 +0100 Tim-Philipp Müller <tim@centricular.com> + + * gst/isomp4/gstqtmuxmap.c: + qtmux: unify raw audio caps into a single caps structure + +2015-10-14 15:42:50 -0700 Reynaldo H. Verdejo Pinochet <reynaldo@osg.samsung.com> + + * gst/isomp4/qtdemux.c: + qtdemux: add support for FFV1 coded streams in mov + https://bugzilla.gnome.org/show_bug.cgi?id=752495 + +2015-10-14 15:53:26 +0300 Sebastian Dröge <sebastian@centricular.com> + + * ext/soup/gstsouphttpsrc.c: + souphttpsrc: EOS immediately if we have an empty seek segment + https://bugzilla.gnome.org/show_bug.cgi?id=748316 + +2015-10-14 10:43:19 +0300 Stavros Vagionitis <stavrosv@digisoft.tv> + + * ext/soup/gstsouphttpsrc.c: + souphttpsrc: Make non-inclusive segment boundaries inclusive + The problem is that the filesrc and souphttpsrc are behaving + differently regarding the calculation of the segment boundaries. The + filesrc is using a non-inclusive boundaries, while the souphttpsrc + uses inclusive. Currently the hlsdemux calculates the boundaries as + inclusive, so for this reason there is no problem with the souphttpsrc, + but there is an issue in the filesrc. + The GstSegment is non-inclusive, so the proposed solution is to use + non-inclusive boundaries in the hlsdemux in order to be consistent. + Make the change in the hlsdemux, will break the souphttpsrc, which + will expect inclusive boundaries, but the hlsdemux will offer + non-inclusive. This change makes sure that the non-inclusive + boundaries are converted to inclusive. + https://bugzilla.gnome.org/show_bug.cgi?id=748316 + +2015-10-11 22:07:54 +0000 Graham Leggett <minfrin@sharp.fm> + + * ext/soup/gstsouphttpclientsink.c: + * ext/soup/gstsouphttpclientsink.h: + souphttpclientsink: Add the retry and retry-delay properties + These allow a failed request to be retried after the given number of seconds + instead of failing the pipeline. Take account of the Retry-After header if + present. Add retries parameter that controls the number of times an HTTP + request will be retried before failing. + https://bugzilla.gnome.org/show_bug.cgi?id=756318 + +2015-10-14 12:03:15 +0200 Guillaume Desmottes <guillaume.desmottes@collabora.co.uk> + + * gst/isomp4/qtdemux.c: + qtdemux: fix caps leak + If the QtDemuxStream are re-used they may already have caps which used + to be leaked. + Reproduced using the + validate.dash.playback.seek_forward.dash_exMPD_BIP_TC1 validate + scenario. + https://bugzilla.gnome.org/show_bug.cgi?id=756561 + +2015-10-14 09:29:50 +0900 Vineeth TM <vineeth.tm@samsung.com> + + * gst/isomp4/qtdemux.c: + qtdemux: Fix taglist memory leak + Free the stream and its sub items instead of just the stream + https://bugzilla.gnome.org/show_bug.cgi?id=756544 + +2015-10-11 12:06:26 +0100 Thibault Saunier <tsaunier@gnome.org> + + * gst/isomp4/gstqtmux.c: + * gst/isomp4/gstqtmuxmap.c: + qtmux: Allow negotiating to S8 as a raw format but stop making it best choice + Negotiation to audio/x-raw,format=S8 was not possible because S8 does + not have a bit order so we ended up doing `if (!entry.fourcc) goto refuse_caps;` + https://bugzilla.gnome.org/show_bug.cgi?id=756387 + +2015-10-11 09:18:40 +0100 Thibault Saunier <tsaunier@gnome.org> + + * gst/isomp4/gstqtmux.c: + * gst/isomp4/gstqtmuxmap.c: + qtmux: Add prores support + https://bugzilla.gnome.org/show_bug.cgi?id=756388 + +2015-10-12 18:56:32 +0100 Tim-Philipp Müller <tim@centricular.com> + + * tests/check/Makefile.am: + tests: add GST_PLUGINS_BASE_LIBS for flvdemux check + So it pulls in the right libgsttag-1.0. + +2015-10-11 22:27:47 +0100 Julien Isorce <j.isorce@samsung.com> + + * gst/goom/Makefile.am: + * gst/goom/gstaudiovisualizer.c: + * gst/goom/gstaudiovisualizer.h: + * gst/goom/gstgoom.h: + * gst/goom2k1/Makefile.am: + * gst/goom2k1/gstaudiovisualizer.c: + * gst/goom2k1/gstaudiovisualizer.h: + * gst/goom2k1/gstgoom.h: + goom/goom2k1: remove obsolete left over files + They now use the new GstAudioVisualizer base class + from gst-plugins-base/gst-libs/gst/pbutils + Also fixed undefined reference to gst_audio_visualizer_get_type + Added GST_PLUGINS_BASE_LIBS to Makefile.am and re-order LIBADD. + https://bugzilla.gnome.org/show_bug.cgi?id=742875 + +2015-10-12 10:48:23 +0900 Vineeth TM <vineeth.tm@samsung.com> + + * gst/audioparsers/gstmpegaudioparse.c: + mpegaudioparse: Fix buffer memory leak during failures + mapped buffer is not being unmapped during failures + https://bugzilla.gnome.org/show_bug.cgi?id=756231 + +2015-10-12 11:18:51 +0900 Vineeth TM <vineeth.tm@samsung.com> + + * ext/soup/gstsouphttpclientsink.c: + souphttpclientsink: Check if soup message is created + If soup message is not created then the same should not be passed + on, which is resulting in segfault. Hence throwing a warning message + and returning + https://bugzilla.gnome.org/show_bug.cgi?id=755326 + +2015-10-12 11:15:15 +0900 Vineeth TM <vineeth.tm@samsung.com> + + * ext/soup/gstsouphttpclientsink.c: + souphttpclientsink: Check if location being set is valid + Adding a check in set_property to find if the location uri is valid + and printing warning if not valid. + https://bugzilla.gnome.org/show_bug.cgi?id=755326 + +2015-10-12 11:09:30 +0900 Vineeth TM <vineeth.tm@samsung.com> + + * ext/soup/gstsouphttpclientsink.c: + souphttpclientsink: Fix memory leaks during failures + freeing streamheader_buffers and sent_buffers during failure cases. + https://bugzilla.gnome.org/show_bug.cgi?id=755326 + +2015-10-12 11:03:17 +0900 Vineeth TM <vineeth.tm@samsung.com> + + * ext/soup/gstsouphttpclientsink.c: + souphttpclientsink: Replace redundant free_buffer_list function + Removing free_buffer_list and replacing it with already available function + g_list_free_full + https://bugzilla.gnome.org/show_bug.cgi?id=755326 -2015-10-27 10:48:00 +0100 Nicola Murino <nicola.murino@gmail.com> +2015-10-11 16:40:01 +0200 Edward Hervey <bilboed@bilboed.com> - * gst/matroska/matroska-ids.c: - matroskamux: don't drop JPEG frames that only have PTS but no DTS set - For the MS/VfW codec ids, we want to write DTS timestamps instead - of PTS because that's what everyone else seems to do (and it's also - how it is in AVI). So for those input formats we use the buffer DTS - instead of the PTS. However, if there's no DTS set but only the PTS - then just take the PTS instead of dropping the input buffer. This - is useful especially for I-frame only codecs like JPEG and huffyuv, - but should also be fine as fallback in general. - Fixes regression with input JPEG frames that only have PTS set on them. - https://bugzilla.gnome.org/show_bug.cgi?id=756967 + * tests/check/Makefile.am: + check: Don't forget base CFLAGS for flvdemux check + elements/flvdemux.c:25:25: fatal error: gst/tag/tag.h: No such file or directory -2015-10-11 12:06:26 +0100 Thibault Saunier <tsaunier@gnome.org> +2015-10-11 11:37:51 +0100 Sebastian Dröge <sebastian@centricular.com> - * gst/isomp4/gstqtmux.c: - * gst/isomp4/gstqtmuxmap.c: - qtmux: Allow negotiating to S8 as a raw format but stop making it best choice - Negotiation to audio/x-raw,format=S8 was not possible because S8 does - not have a bit order so we ended up doing `if (!entry.fourcc) goto refuse_caps;` - https://bugzilla.gnome.org/show_bug.cgi?id=756387 + * gst/matroska/ebml-write.c: + * gst/matroska/ebml-write.h: + * gst/matroska/matroska-mux.c: + * gst/matroska/matroska-mux.h: + matroskamux: Create a TIME segment when creating streamable output + Related to https://bugzilla.gnome.org/show_bug.cgi?id=754435 which + does the same for flvmux. -2015-10-11 09:18:40 +0100 Thibault Saunier <tsaunier@gnome.org> +2015-09-23 13:50:52 +0200 Havard Graff <havard.graff@gmail.com> - * gst/isomp4/gstqtmux.c: - * gst/isomp4/gstqtmuxmap.c: - qtmux: Add prores support - https://bugzilla.gnome.org/show_bug.cgi?id=756388 + * gst/flv/Makefile.am: + * gst/flv/gstflvdemux.c: + * tests/check/Makefile.am: + * tests/check/elements/flvdemux.c: + flvdemux: output speex vorbiscomment as a GstTagList + This is what speexdec expects. + https://bugzilla.gnome.org/show_bug.cgi?id=755478 -2015-10-24 23:57:38 +0200 George Kiagiadakis <george.kiagiadakis@collabora.com> +2015-09-22 22:59:16 +0200 Havard Graff <havard.graff@gmail.com> - * tests/check/elements/splitmux.c: - tests/check/splitmux: test that the release_pad vfunc of splitmuxsink actually releases pads - https://bugzilla.gnome.org/show_bug.cgi?id=753622 + * gst/flv/gstflvmux.c: + * tests/check/elements/flvmux.c: + flvmux: GST_BUFFER_OFFSETs should be GST_BUFFER_OFFSET_NONE + Or else flvdemux don't understand it + https://bugzilla.gnome.org/show_bug.cgi?id=754435 -2015-10-24 23:57:29 +0200 George Kiagiadakis <george.kiagiadakis@collabora.com> +2015-09-02 10:44:59 +0200 Havard Graff <havard.graff@gmail.com> - * gst/multifile/gstsplitmuxsink.c: - splitmuxsink: do not destroy the multiqueue & muxer when going to NULL - Instead, delay it until all request pads have been released. This is - because the release_pad() vfunc requires the multiqueue and muxer to - be there in order to release their request pads as well. If those - elements are destroyed earlier, release_pad() does not work, no - pads are released and some resources are leaked. - https://bugzilla.gnome.org/show_bug.cgi?id=753622 + * gst/flv/gstflvmux.c: + * tests/check/elements/flvmux.c: + flvmux: use time segment and copy timestamps when streamable + Add a basic test using speex data to verify timestamping. + https://bugzilla.gnome.org/show_bug.cgi?id=754435 -2015-10-27 17:32:22 +0200 Sebastian Dröge <sebastian@centricular.com> +2015-09-23 13:14:03 +0200 Havard Graff <havard.graff@gmail.com> - * gst/audiofx/gstscaletempo.c: - scaletempo: F64 support is only available in GIT master at this point + * gst/flv/gstflvdemux.c: + flvdemux: speex is also always 16KHz + This is just a cosmetic change for the logs, since the right caps + for Speex is being set elsewhere. + https://bugzilla.gnome.org/show_bug.cgi?id=755479 -2015-10-24 17:14:07 +0300 Sebastian Dröge <sebastian@centricular.com> +2015-07-14 15:19:44 +0200 Stian Selnes <stian@pexip.com> - * gst/audiofx/gstscaletempo.c: - * gst/audiofx/gstscaletempo.h: - scaletempo: Fix handling of rate < 0 - We have to reverse all samples in a buffer before processing them to properly - have continuous data from one buffer to another. As a result we will have a - negative applied rate and a rate of 1.0. - Also make sure that input buffers are correctly clipped to the segment, - otherwise our calculations are going to go wrong. - Also copy over the segment event's sequence number to the output segment while - we're at it. - https://bugzilla.gnome.org/show_bug.cgi?id=757033 + * gst/rtpmanager/gstrtpsession.c: + * gst/rtpmanager/rtpsession.c: + rtpmanager: Add 'source-stats' to stats and notify + Add statitics from each rtp source to the rtp session property. + 'source-stats' is a GValueArray where each element is a GstStructure of + stats for one rtp source. + The availability of new stats is signaled via g_object_notify. + https://bugzilla.gnome.org/show_bug.cgi?id=752669 -2015-10-26 00:41:28 +1100 Jan Schmidt <jan@centricular.com> +2015-06-05 17:20:33 +0200 Sebastian Dröge <sebastian@centricular.com> - * tests/files/Makefile.am: - check: Dist splitvideo0[012].ogg test files. + * gst/rtpmanager/rtpsession.c: + * gst/rtpmanager/rtpsession.h: + rtpsession: Implement sending of reduced size RTCP packets + https://bugzilla.gnome.org/show_bug.cgi?id=750456 -2015-10-13 12:42:56 -0300 Thiago Santos <thiagoss@osg.samsung.com> +2015-10-08 15:01:13 +0530 Ravi Kiran K N <ravi.kiran@samsung.com> - * gst/rtp/gstrtpj2kpay.c: - rtpj2kpay: update fragment offset - It was always being set to 0, making the resulting stream broken - for the receiver - https://bugzilla.gnome.org/show_bug.cgi?id=756422 + * gst/audiofx/audiodynamic.h: + audiofx: Remove unused variable + Remove unused variable 'degree' in audiodynamic + https://bugzilla.gnome.org/show_bug.cgi?id=756234 -2015-10-19 15:36:37 +0300 Ryan Hendrickson <ryan.hendrickson@alum.mit.edu> +2015-10-08 14:44:07 +0900 Vineeth TM <vineeth.tm@samsung.com> - * gst/isomp4/gstqtmux.c: - qtmux: Don't unconditionally use strnlen() - It's not available on older OSX and we can as well use memchr() here. - https://bugzilla.gnome.org/show_bug.cgi?id=756154 + * gst/isomp4/qtdemux.c: + qtdemux: Fix memory leak for corrupted file + Free brands before overriding them. + https://bugzilla.gnome.org/show_bug.cgi?id=756226 -2015-10-12 10:48:23 +0900 Vineeth TM <vineeth.tm@samsung.com> +2015-10-08 11:44:04 +0900 Vineeth TM <vineeth.tm@samsung.com> - * gst/audioparsers/gstmpegaudioparse.c: - mpegaudioparse: Fix buffer memory leak during failures - mapped buffer is not being unmapped during failures - https://bugzilla.gnome.org/show_bug.cgi?id=756231 + * ext/gdk_pixbuf/gstgdkpixbufdec.c: + gdkpixbufdec: Fix pixbuf_loader leak during failures + https://bugzilla.gnome.org/show_bug.cgi?id=756219 -2015-10-19 17:38:32 +0900 Vineeth TM <vineeth.tm@samsung.com> +2015-10-07 23:23:45 +0100 Sebastian Dröge <sebastian@centricular.com> - * gst/auparse/gstauparse.c: - auparse: Fix event memory leak - Free the event after being handled to prevent memory leak. - https://bugzilla.gnome.org/show_bug.cgi?id=756799 + * gst/rtpmanager/gstrtpbin.c: + rtpbin: Add missing break -2015-10-14 12:03:15 +0200 Guillaume Desmottes <guillaume.desmottes@collabora.co.uk> +2015-10-07 13:03:02 +0200 Miguel ParÃs DÃaz <mparisdiaz@gmail.com> - * gst/isomp4/qtdemux.c: - qtdemux: fix caps leak - If the QtDemuxStream are re-used they may already have caps which used - to be leaked. - Reproduced using the - validate.dash.playback.seek_forward.dash_exMPD_BIP_TC1 validate - scenario. - https://bugzilla.gnome.org/show_bug.cgi?id=756561 + * gst/rtpmanager/gstrtpjitterbuffer.c: + * gst/rtpmanager/rtpsource.c: + * gst/rtpmanager/rtpsource.h: + * gst/rtpmanager/rtpstats.c: + * gst/rtpmanager/rtpstats.h: + rtpmanager: Take into account packet rate for max-dropout and max-misorder calculations + https://bugzilla.gnome.org/show_bug.cgi?id=751311 -2015-10-14 09:29:50 +0900 Vineeth TM <vineeth.tm@samsung.com> +2015-10-07 13:02:12 +0200 Miguel ParÃs DÃaz <mparisdiaz@gmail.com> - * gst/isomp4/qtdemux.c: - qtdemux: Fix taglist memory leak - Free the stream and its sub items instead of just the stream - https://bugzilla.gnome.org/show_bug.cgi?id=756544 + * gst/rtpmanager/gstrtpbin.c: + * gst/rtpmanager/gstrtpbin.h: + * gst/rtpmanager/gstrtpjitterbuffer.c: + * gst/rtpmanager/gstrtpsession.c: + * gst/rtpmanager/rtpsession.c: + * gst/rtpmanager/rtpsession.h: + * gst/rtpmanager/rtpsource.c: + * gst/rtpmanager/rtpsource.h: + rtpmanager: add "max-dropout-time" and "max-misorder-time" props + https://bugzilla.gnome.org/show_bug.cgi?id=751311 2015-10-07 17:14:57 +0900 Vineeth TM <vineeth.tm@samsung.com> @@ -421,6 +1438,66 @@ is not freed. Freeing the cache when the state changes from PAUSED to READY. https://bugzilla.gnome.org/show_bug.cgi?id=754212 +2015-08-31 21:10:16 -0400 Olivier Crête <olivier.crete@collabora.com> + + * gst/rtpmanager/gstrtpmux.c: + rtpmux: Use default upstream event handling + https://bugzilla.gnome.org/show_bug.cgi?id=752694 + +2015-08-31 21:05:03 -0400 Olivier Crête <olivier.crete@collabora.com> + + * gst/rtpmanager/gstrtpmux.c: + * gst/rtpmanager/gstrtpmux.h: + rtpmux: As 0xFFFFFFFF is a valid ssrc, check if it has been set + https://bugzilla.gnome.org/show_bug.cgi?id=752694 + +2015-07-22 09:47:22 +0200 Havard Graff <havard.graff@gmail.com> + + * gst/rtpmanager/gstrtpmux.c: + * gst/rtpmanager/gstrtpmux.h: + * tests/check/elements/rtpmux.c: + gstrtpmux: allow the ssrc-property to decide ssrc on outgoing buffers + By not doing this, the muxer is not effectively a rtpmuxer, rather a + funnel, since it should be a single stream that exists the muxer. + If not specified, take the first ssrc seen on a sinkpad, allowing upstream + to decide ssrc in "passthrough" with only one sinkpad. + Also, let downstream ssrc overrule internal configured one + We hence has the following order for determining the ssrc used by + rtpmux: + 0. Suggestion from GstRTPCollision event + 1. Downstream caps + 2. ssrc-Property + 3. (First) upstream caps containing ssrc + 4. Randomly generated + https://bugzilla.gnome.org/show_bug.cgi?id=752694 + +2015-10-02 22:42:20 +0300 Sebastian Dröge <sebastian@centricular.com> + + * gst/udp/gstudpsrc.c: + udpsrc: Fixup last commit + +2015-10-02 22:21:45 +0300 Sebastian Dröge <sebastian@centricular.com> + + * configure.ac: + * gst/udp/gstudpsrc.c: + Update GLib dependency to 2.40.0 + +2015-06-30 16:56:19 +0200 Miguel ParÃs DÃaz <mparisdiaz@gmail.com> + + * gst/rtpmanager/rtpstats.c: + * gst/rtpmanager/rtpstats.h: + rtpstats: add utility for calculating RTP packet rate + +2015-08-10 18:14:39 -0300 Thiago Santos <thiagoss@osg.samsung.com> + + * gst/isomp4/qtdemux.c: + qtdemux: handle empty segments in seeking adjust + If seeking targets an empty segment skip it as there is no media + offset to get from it. Instead look for the next one. + This doesn't make seeking in push-mode work if you seek to an + empty segment but at least won't get you to wrong offsets. + https://bugzilla.gnome.org/show_bug.cgi?id=753484 + 2015-04-17 14:25:43 +0200 George Kiagiadakis <george.kiagiadakis@collabora.com> * gst/multifile/gstsplitmuxsink.c: @@ -458,6 +1535,146 @@ in the meantime. https://bugzilla.gnome.org/show_bug.cgi?id=753624 +2015-09-16 16:03:02 +0900 Vineeth T M <vineeth.tm@samsung.com> + + * gst/avi/gstavidemux.c: + avidemux: Reverse playback does not consider segment.start + During reverse playback, the media should stop playing at segment.start + This does not happen, and avidemux continues to process data even when + current timestamp is less that segment.start. + https://bugzilla.gnome.org/show_bug.cgi?id=755094 + +2015-09-23 12:39:35 +0900 Manasa Athreya <manasa.athreya@lge.com> + + * gst/isomp4/qtdemux.c: + qtdemux: Check multi trex to find track id in mp4 mpeg-dash stream + If stream has more than one trex box which is not matched to actual + track id, it makes qtdemux crashed. + Author : Manasa Athreya (manasa.athreya@lge.com) + https://bugzilla.gnome.org/show_bug.cgi?id=754864 + +2015-09-04 14:24:45 +0530 Ravi Kiran K N <ravi.kiran@samsung.com> + + * gst/smpte/gstsmpte.c: + smpte: get size, stride info using VideoInfo + Use VideoInfo data to get size stride and + offset, instead of hard coded macros. + https://bugzilla.gnome.org/show_bug.cgi?id=754558 + +2015-09-04 14:18:50 +0530 Ravi Kiran K N <ravi.kiran@samsung.com> + + * gst/smpte/gstsmpte.c: + smpte: free mask + Free the memory allocated to 'mask' to avoid + memory leak. + https://bugzilla.gnome.org/show_bug.cgi?id=754555 + +2015-08-20 11:02:58 +0900 Vineeth TM <vineeth.tm@samsung.com> + + * tests/examples/equalizer/demo.c: + * tests/icles/equalizer-test.c: + * tests/icles/gdkpixbufoverlay-test.c: + * tests/icles/gdkpixbufsink-test.c: + * tests/icles/test-oss4.c: + * tests/icles/videocrop-test.c: + gstreamer: good: tests: Fix memory leaks when context parse fails. + When g_option_context_parse fails, context and error variables are not getting free'd + which results in memory leaks. Free'ing the same. + And replacing g_error_free with g_clear_error, which checks if the error being passed + https://bugzilla.gnome.org/show_bug.cgi?id=753853 + +2015-10-02 16:18:15 +0900 Hyunjun Ko <zzoon.ko@samsung.com> + + * gst/rtpmanager/rtpsource.c: + rtpsource: doesn't handle probation and rtp gap in case of sender + https://bugzilla.gnome.org/show_bug.cgi?id=754548 + +2015-10-02 16:16:32 +0900 Hyunjun Ko <zzoon.ko@samsung.com> + + * docs/plugins/gst-plugins-good-plugins.signals: + * gst/rtpmanager/gstrtpbin.c: + * gst/rtpmanager/gstrtpbin.h: + * gst/rtpmanager/gstrtpsession.c: + * gst/rtpmanager/gstrtpsession.h: + * gst/rtpmanager/rtpsession.c: + * gst/rtpmanager/rtpsession.h: + rtpmanager: add new on-new-sender-ssrc, on-sender-ssrc-active signals + Allows for applications to get internal source's RTP statistics. + (eg. sender sources for a server/client) + https://bugzilla.gnome.org/show_bug.cgi?id=746747 + +2015-10-02 14:17:48 +1000 Jan Schmidt <jan@centricular.com> + + * sys/ximage/gstximagesrc.c: + ximagesrc: Gather and coalesce all damaged areas before retrieving. + These days the xserver seems to give us the same damage regions + over and over for entire windows, and we retrieve them multiple + times, which gives time for more damage to appear. Instead, just + quickly gather all damaged areas into a region list and copy + out once. + +2015-10-01 16:24:32 +0100 Luis de Bethencourt <luisbg@osg.samsung.com> + + * gst/goom2k1/Makefile.am: + * gst/goom2k1/gstgoom.h: + goom2k1: use the new audiovisualizer base class + Rebase to have goom using the GstAudioVisualizer base class in + gst-plugins-base/gst-libs/gst/pbutils + https://bugzilla.gnome.org/show_bug.cgi?id=742875 + +2015-10-01 16:16:08 +0100 Luis de Bethencourt <luisbg@osg.samsung.com> + + * gst/goom/Makefile.am: + * gst/goom/gstgoom.h: + goom: use the new audiovisualizer base class + Rebase to have goom using the GstAudioVisualizer base class in + gst-plugins-base/gst-libs/gst/pbutils + https://bugzilla.gnome.org/show_bug.cgi?id=742875 + +2015-09-30 17:35:33 -0300 Thiago Santos <thiagoss@osg.samsung.com> + + * gst/interleave/deinterleave.c: + * tests/check/elements/deinterleave.c: + deinterleave: implement accept-caps + Avoid using default accept-caps handler that will query downstream + and is more expensive. Just check if the caps is compatible with + the template and check if the channels are the same. + +2015-09-30 09:35:39 -0300 Thiago Santos <thiagoss@osg.samsung.com> + + * tests/check/elements/deinterleave.c: + tests: deinterleave: also check for caps query results + +2015-09-30 12:30:59 -0300 Thiago Santos <thiagoss@osg.samsung.com> + + * gst/interleave/deinterleave.c: + deinterleave: use the caps query filter + It was being ignored and would lead to wrong results if the + element doing the query would rely on the intersection being made. + +2015-09-30 10:00:31 -0300 Thiago Santos <thiagoss@osg.samsung.com> + + * gst/interleave/deinterleave.c: + deinterleave: implement a caps query handler for the sinkpad + It was missing and apparently code relied on having it there + for not allowing a change in the number of channels + +2015-09-30 09:05:03 -0300 Thiago Santos <thiagoss@osg.samsung.com> + + * gst/interleave/deinterleave.c: + deinterleave: fix caps leak + Caps from the pad template are being leaked. In any case it is + from a static pad template and will 'leak' in the end, just doing + the cleanup for the good practice. + +2015-09-29 11:15:01 +0100 Tim-Philipp Müller <tim@centricular.com> + + * tests/check/Makefile.am: + * tests/check/elements/.gitignore: + * tests/check/elements/gdkpixbufoverlay.c: + tests: gdkpixbufoverlay: add minimal unit test + https://bugzilla.gnome.org/show_bug.cgi?id=755773 + 2015-09-29 11:12:48 +0100 Tim-Philipp Müller <tim@centricular.com> * ext/gdk_pixbuf/gstgdkpixbufoverlay.c: @@ -495,6 +1712,54 @@ rate and channels on src caps. https://bugzilla.gnome.org/show_bug.cgi?id=755611 +2015-09-18 00:58:23 +1000 Jan Schmidt <thaytan@noraisin.net> + + * ext/gdk_pixbuf/gstgdkpixbufsink.c: + * gst/rtpmanager/gstrtpbin.c: + * gst/rtpmanager/gstrtpsession.c: + Fix some compiler warnings when building with G_DISABLE_ASSERT + Touches rtpmanager and gdkpixbufsink + +2015-08-18 14:30:57 +0100 Chris Bass <floobleflam@gmail.com> + + * gst/isomp4/fourcc.h: + * gst/isomp4/qtdemux.c: + * gst/isomp4/qtdemux_types.c: + qtdemux: support timed-text subtitle tracks. + https://bugzilla.gnome.org/show_bug.cgi?id=752818 + +2015-09-26 00:12:46 +0200 Sebastian Dröge <sebastian@centricular.com> + + * gst/matroska/matroska-demux.c: + * gst/matroska/matroska-parse.c: + * gst/rtpmanager/gstrtpjitterbuffer.c: + gst: Don't use deprecated gst_segment_to_position() + +2015-09-21 13:47:21 +0200 Sebastian Dröge <sebastian@centricular.com> + + * gst/rtpmanager/gstrtpbin.c: + * gst/rtpmanager/gstrtpbin.h: + * gst/rtpmanager/gstrtpjitterbuffer.c: + * gst/rtsp/gstrtspsrc.c: + * gst/rtsp/gstrtspsrc.h: + rtpbin/rtpjitterbuffer/rtspsrc: Add property to set maximum ms between RTCP SR RTP time and last observed RTP time + https://bugzilla.gnome.org/show_bug.cgi?id=755125 + +2015-09-16 19:28:11 +0200 Sebastian Dröge <sebastian@centricular.com> + + * gst/rtpmanager/gstrtpbin.c: + * gst/rtpmanager/gstrtpbin.h: + * gst/rtpmanager/gstrtpsession.c: + rtpbin/session: Allow RTCP sync to happen based on capture time or send time + Send time is the previous behaviour and the default, but there are use cases + where you want to synchronize based on the capture time. + https://bugzilla.gnome.org/show_bug.cgi?id=755125 + +2015-09-25 23:51:09 +0200 Sebastian Dröge <sebastian@centricular.com> + + * configure.ac: + Back to development + === release 1.6.0 === 2015-09-25 23:15:55 +0200 Sebastian Dröge <sebastian@centricular.com> diff --git a/Makefile.in b/Makefile.in index 74c66e29fce624fe97a6436f6b9ab52f52a8fb51..8a0171045d8ef5a7e96db67d45a84a56872d848b 100644 --- a/Makefile.in +++ b/Makefile.in @@ -490,6 +490,8 @@ VALGRIND_PATH = @VALGRIND_PATH@ VERSION = @VERSION@ VPX_130_CFLAGS = @VPX_130_CFLAGS@ VPX_130_LIBS = @VPX_130_LIBS@ +VPX_140_CFLAGS = @VPX_140_CFLAGS@ +VPX_140_LIBS = @VPX_140_LIBS@ VPX_CFLAGS = @VPX_CFLAGS@ VPX_LIBS = @VPX_LIBS@ WARNING_CFLAGS = @WARNING_CFLAGS@ @@ -1198,6 +1200,9 @@ release: dist @if [ -d ../www/data/src ]; then \ mv -v $(PACKAGE)-$(VERSION).tar.xz ../www/data/src/$(PACKAGE)/ ; \ mv -v $(PACKAGE)-$(VERSION).tar.xz.sha256sum ../www/data/src/$(PACKAGE)/ ; \ + elif [ -d ../../www/data/src ]; then \ + mv -v $(PACKAGE)-$(VERSION).tar.xz ../../www/data/src/$(PACKAGE)/ ; \ + mv -v $(PACKAGE)-$(VERSION).tar.xz.sha256sum ../../www/data/src/$(PACKAGE)/ ; \ fi @echo "=================================================================================================" diff --git a/NEWS b/NEWS index be30e41ae955bc0b0156bb4818fe195e3d04562c..a4bffc6a6b39e333d483a6aba06776ce566a8e7d 100644 --- a/NEWS +++ b/NEWS @@ -1,37 +1,2 @@ -This is GStreamer 1.6.2 - -The GStreamer team is proud to announce the second bugfix release in the stable -1.6 release series of your favourite cross-platform multimedia framework! - -This release only contains bugfixes and it is safe to update from 1.6.0 and -1.6.1. For a full list of bugfixes see Bugzilla: - https://bugzilla.gnome.org/buglist.cgi?bug_status=RESOLVED&bug_status=VERIFIED&limit=0&list_id=83309&order=bug_id&product=GStreamer&resolution=FIXED&target_milestone=1.6.2 - -See http://gstreamer.freedesktop.org/releases/1.6/ for the latest version of this document. - -Major bugfixes - -- Crashes in gst-libav with sinks that did not provide a buffer pool - but supported video metadata were fixed. This affected d3dvideosink - and some 3rd party sinks. Also related fixes for crashes when a downstream - buffer pool failed allocation. -- Big GL performance improvement on iOS by a factor of 2 by using Apple's sync - extension. -- Deadlocks in the DirectSound elements on Windows, and the behaviour of its - mute property were fixed. -- The Direct3D video sink does not crash anymore when minimizing the window -- The library soname generation on Android >= 6.0 was fixed, which previously - caused GStreamer to fail to load there. -- File related elements have large-file (>2GB) support on Android now. -- gst-libav was updated to ffmpeg 2.8.3. -- Deserialization of custom events in the GDP depayloader was fixed. -- Missing OpenGL context initialization in the Qt/QML video sink was fixed in - certain situations. -- Interoperability with some broken RTSP servers using HTTP tunnel was - improved. -- Various compilation fixes for Windows. -- Various smaller memory leak and other fixes in different places. -- and many, many more: - https://bugzilla.gnome.org/buglist.cgi?bug_status=RESOLVED&bug_status=VERIFIED&limit=0&list_id=83309&order=bug_id&product=GStreamer&resolution=FIXED&target_milestone=1.6.2 - +This is GStreamer 1.7.1 diff --git a/README b/README index f175b1bcd0ed8a543aabcb81e631bac3afb7b3b5..fa53f95de1fac1040b6a17321bc87b015b1dc279 100644 --- a/README +++ b/README @@ -1,4 +1,4 @@ -GStreamer 1.5.x development series +GStreamer 1.7.x development series WHAT IT IS ---------- diff --git a/RELEASE b/RELEASE index 60563e3af921bfc236bb91b5110445f6a45f3803..7fe6af7b717f36659d3a446be47a4fd92156a69a 100644 --- a/RELEASE +++ b/RELEASE @@ -1,19 +1,17 @@ -Release notes for GStreamer Good Plugins 1.6.2 +Release notes for GStreamer Good Plugins 1.7.1 -The GStreamer team is proud to announce the second bugfix release in the stable -1.6 release series of your favourite cross-platform multimedia framework! +The GStreamer team is pleased to announce the first release of the unstable +1.7 release series. The 1.7 release series is adding new features on top of +the 1.0, 1.2, 1.4 and 1.6 series and is part of the API and ABI-stable 1.x release +series of the GStreamer multimedia framework. The unstable 1.7 release series +will lead to the stable 1.8 release series in the next weeks. Any newly added +API can still change until that point. - -This release only contains bugfixes and it is safe to update from 1.6.0 and 1.6.1. For a -full list of bugfixes see Bugzilla. - - - -See http://gstreamer.freedesktop.org/releases/1.6/ -for the full release notes. +Binaries for Android, iOS, Mac OS X and Windows will be provided separately +during the unstable 1.7 release series. @@ -60,14 +58,56 @@ contains a set of codecs plugins based on libav (formerly gst-ffmpeg) Bugs fixed in this release - * 757961 : baseparse: do not overwrite header buffer timestamps - * 734098 : directsoundsink: gst_element_set_state blocked when plugout a usb audio device - * 755106 : directsoundsink: mute property doesn't work - * 755614 : qtdemux: support for cenc auxiliary info parsing outside of moof box - * 757924 : splitmuxpartreader: Fix GCond leak - * 758151 : rtpgstdepay does not deserialize custom events - * 758861 : wavparse: deadlock under some conditions - * 758912 : avimux: don't crash if we never got audio caps before stopping + * 727305 : matroskademux: complete support for A_OPUS (SeekPreRoll, CodecDelay and DiscardPadding) + * 729950 : matroskamux: support video/x-vp9. webmmux: support audio/x-opus + * 734659 : qtdemux: Does not properly update base time for non-flushing seeks + * 745372 : vpxdec: Should try to avoid copies at output + * 746747 : rtpsession: Also report internal sources in on-new-ssrc and on-ssrc-active + * 748680 : directsoundsink: fix sleep for buffer-time lower than 200000 + * 750456 : rtpsession: Implement sending of reduced size RTCP packets + * 750709 : souphttpsrc: add tls-interaction property + * 751311 : rtp: Dynamic dropout / reorder limits + * 752669 : rtpsession: Expose RTPSource stats through stats property + * 752694 : rtpmux: allow the ssrc-property to decide ssrc on outgoing buffers + * 752818 : qtdemux: add support for XML timed-text subtitles + * 753087 : jpegdec: fix output state memory leak + * 753484 : qtdemux: support edit lists partially in push-mode + * 753853 : gstreamer: good: Fix memory leaks when context parse fails. + * 754435 : flvmux: use time segment and copy timestamps when streamable + * 754548 : rtpsource: In case of sender, doesn't need to think about probation and rtp gap. + * 754555 : smpte: Memory leak + * 754558 : smpte: Use video info data instead of macro + * 754864 : qtdemux: check multi trex to find track id in mp4 (DASH) stream. + * 755094 : avidemux: Reverse playback does not consider segment.start + * 755125 : rtp: RTCP mapping between NTP and RTP time could be capture or send time based + * 755326 : souphttpclientsink: Fix memory leaks and segfault crash + * 755478 : flvdemux: output speex vorbiscomment as a GstTagList + * 755479 : flvdemux: speex is also always 16KHz + * 755510 : vpx: create base class for vpx encoders and decoders + * 756219 : gdkpixbufdec: Fix pixbuf_loader leak during failures + * 756226 : qtdemux: fix memory leak for corrupted file + * 756231 : mpegaudioparse: Fix buffer memory leak + * 756234 : audiofx: Remove unused variable + * 756318 : souphttpclientsink: Add " retry " for request failures + * 756905 : audiofx: remove unused variable + * 757340 : audiochebband: Fix typo in example pipeline + * 757892 : rtph264pay: add config-interval option to send PPS/SPS before every key frame + * 758058 : v4l2object: add support of NV16, NV61 and NV24 formats + * 758085 : v4l2: Track /dev/video* to triggered required probe + * 758161 : qtdemux: Fix string memory leak + * 758171 : qtdemux: Seeking in dashdemux broken since edit list changes + * 758195 : vpxdec: Use more threads by default + * 758258 : matroska: Missing support for prores video + * 758260 : souphttpclientsink: Fix error leak and handle error + * 758390 : multifilesink: fix spelling on multi_file_sink_next_type variable + * 758826 : aacparse: Avoid over-skipping when checking LOAS config + * 758928 : qtdemux: letting flushes pass downstream on upstream offset seeks + * 759226 : interleave: Remove unsed field + * 759452 : directsoundsink: check device property, don't use default if a specific device is set + * 759614 : dvdec: Remove unused fields + * 759615 : DTS > PTS creates invalid mp4 files + * 759635 : progressreport: Add support for using format=buffers with do-query=false + * 758114 : tests: souphttpsrc test_icy_stream:0: Assertion 'caps != NULL' failed ==== Download ==== @@ -104,16 +144,50 @@ subscribe to the gstreamer-devel list. Contributors to this release + * Alessandro Decina + * Anton Bondarenko * Arun Raghavan + * Aurélien Zanelli + * Chris Bass + * Dave Craig + * Edward Hervey + * Evan Callaway + * George Kiagiadakis + * Graham Leggett + * Guillaume Desmottes + * Guillaume Marquebielle * Havard Graff + * Hyunjun Ko + * Jan Schmidt * Josep Torra + * Julien Isorce + * Luis de Bethencourt + * Manasa Athreya * Michael Olbrich + * Miguel ParÃs DÃaz + * Mischa Spiegelmock + * Nicola Murino + * Nicolas Dufresne * Nirbheek Chauhan + * Olivier Crête + * Philipp Zabel * Philippe Normand + * Prashant Gotarne + * Ramiro Polla + * Ravi Kiran K N + * Reynaldo H. Verdejo Pinochet + * Ryan Hendrickson * Sebastian Dröge + * Stavros Vagionitis + * Stian Selnes * Thiago Santos + * Thibault Saunier * Thomas Roos * Tim-Philipp Müller + * Vincent Dehors + * Vineeth T M * Vineeth TM + * William Manley * Wim Taymans + * Xavier Claessens  \ No newline at end of file diff --git a/autogen.sh b/autogen.sh index f7c047f28986bf0f8ad985c28f16c5da5c1321bd..3d821a8c9afadfde8b224df4c7314b01c217df39 100755 --- a/autogen.sh +++ b/autogen.sh @@ -37,7 +37,11 @@ fi if test ! \( -x .git/hooks/pre-commit -a -L .git/hooks/pre-commit \); then rm -f .git/hooks/pre-commit - ln -s ../../common/hooks/pre-commit.hook .git/hooks/pre-commit + if ! ln -s ../../common/hooks/pre-commit.hook .git/hooks/pre-commit 2> /dev/null + then + echo "Failed to create commit hook symlink, copying instead ..." + cp common/hooks/pre-commit.hook .git/hooks/pre-commit + fi fi # GNU gettext automake support doesn't get along with git. diff --git a/common/Makefile.in b/common/Makefile.in index 9d9647f1e21ce554f98961f4e3f252aef19cd6cd..78be58ff5de4f3148348ce9ebfd01258ee89e2bb 100644 --- a/common/Makefile.in +++ b/common/Makefile.in @@ -450,6 +450,8 @@ VALGRIND_PATH = @VALGRIND_PATH@ VERSION = @VERSION@ VPX_130_CFLAGS = @VPX_130_CFLAGS@ VPX_130_LIBS = @VPX_130_LIBS@ +VPX_140_CFLAGS = @VPX_140_CFLAGS@ +VPX_140_LIBS = @VPX_140_LIBS@ VPX_CFLAGS = @VPX_CFLAGS@ VPX_LIBS = @VPX_LIBS@ WARNING_CFLAGS = @WARNING_CFLAGS@ diff --git a/common/check.mak b/common/check.mak index 8a90b5dd1b9b6a8c064aa87cbb46318d2b186811..25a16e61aab2b22672ca66023503a3206ab5db87 100644 --- a/common/check.mak +++ b/common/check.mak @@ -57,7 +57,7 @@ LOOPS ?= 10 --show-possibly-lost=no \ --leak-resolution=high --num-callers=20 \ ./$* 2>&1 | tee $$valgrind_log ; \ - if grep "==" $$valgrind_log > /dev/null 2>&1; then \ + if grep "^==" $$valgrind_log > /dev/null 2>&1; then \ rm $$valgrind_log; \ exit 1; \ fi ; \ diff --git a/common/gst.supp b/common/gst.supp index 81f98a99c9f0afe059abbf4ef22c127f3a48cbda..2740e9ab7ebe01ec5b1333f9fd21b6e82c1ccd1c 100644 --- a/common/gst.supp +++ b/common/gst.supp @@ -3976,7 +3976,6 @@ { closures aren't valgrind friendly (bgo#739850) Memcheck:Leak - match-leak-kinds: possible fun:calloc ... fun:g_cclosure_new @@ -3985,7 +3984,6 @@ { closures aren't valgrind friendly (bgo#739850) Memcheck:Leak - match-leak-kinds: possible fun:malloc ... fun:g_closure_add_invalidate_notifier @@ -3994,7 +3992,6 @@ { closures aren't valgrind friendly (bgo#739850) Memcheck:Leak - match-leak-kinds: possible fun:calloc ... fun:g_closure_new_simple @@ -4020,3 +4017,12 @@ Memcheck:Addr8 fun:do_lookup_x } + +{ + <quark tables are leaked on purpose when they are expanded, observed with glib 2.46 and gst-rtsp-server tests> + Memcheck:Leak + fun:malloc + ... + fun:g_quark_init + fun:glib_init_ctor +} diff --git a/common/m4/Makefile.in b/common/m4/Makefile.in index f787529c739e8895b1ead8c421f851d9160240b5..670e903fc4c4ae1c5ddce960eae51c390152d1ca 100644 --- a/common/m4/Makefile.in +++ b/common/m4/Makefile.in @@ -390,6 +390,8 @@ VALGRIND_PATH = @VALGRIND_PATH@ VERSION = @VERSION@ VPX_130_CFLAGS = @VPX_130_CFLAGS@ VPX_130_LIBS = @VPX_130_LIBS@ +VPX_140_CFLAGS = @VPX_140_CFLAGS@ +VPX_140_LIBS = @VPX_140_LIBS@ VPX_CFLAGS = @VPX_CFLAGS@ VPX_LIBS = @VPX_LIBS@ WARNING_CFLAGS = @WARNING_CFLAGS@ diff --git a/common/m4/gst-args.m4 b/common/m4/gst-args.m4 index b478c824c226e7c4c0d6391f093e26a2b58220eb..062812379ba6dae55e94cf8a3ce2fb5ec0248e97 100644 --- a/common/m4/gst-args.m4 +++ b/common/m4/gst-args.m4 @@ -358,3 +358,29 @@ AC_DEFUN([AG_GST_ARG_DISABLE_FATAL_WARNINGS], fi ]) ]) + +dnl Enable extra checks by default only for development versions +AC_DEFUN([AG_GST_ARG_ENABLE_EXTRA_CHECKS], +[ + AC_ARG_ENABLE(extra-check, + AC_HELP_STRING([--enable-extra-checks], + [Enable extra runtime checks]), + [ + case "${enableval}" in + yes) EXTRA_CHECKS=yes ;; + no) EXTRA_CHECKS=no ;; + *) AC_MSG_ERROR(bad value ${enableval} for --enable-extra-checks) ;; + esac + ], + [ + if test "x`expr $PACKAGE_VERSION_MINOR % 2`" = "x1" -a "x`expr $PACKAGE_VERSION_MICRO '<' 90`" = "x1"; then + EXTRA_CHECKS=yes + else + EXTRA_CHECKS=no + fi + ]) + + if test "x$EXTRA_CHECKS" = "xyes"; then + AC_DEFINE(GST_ENABLE_EXTRA_CHECKS, 1, [Define if extra runtime checks should be enabled]) + fi +]) diff --git a/common/m4/gst-error.m4 b/common/m4/gst-error.m4 index d6487cc3ffa32440ef4a26e432ec5eb5a76c8101..006758804c7f3bc9691e57f322db1d44e8165d62 100644 --- a/common/m4/gst-error.m4 +++ b/common/m4/gst-error.m4 @@ -52,31 +52,6 @@ AC_DEFUN([AG_GST_SET_ERROR_CFLAGS], if test "x$1" != "xno" then AS_COMPILER_FLAG(-Werror, ERROR_CFLAGS="$ERROR_CFLAGS -Werror") - - dnl if -Werror isn't suported, try -errwarn=%all (Sun Forte case) - if test "x$ERROR_CFLAGS" = "x" - then - AS_COMPILER_FLAG([-errwarn=%all], [ - ERROR_CFLAGS="-errwarn=%all" - dnl try -errwarn=%all,no%E_EMPTY_DECLARATION, - dnl no%E_STATEMENT_NOT_REACHED,no%E_ARGUEMENT_MISMATCH, - dnl no%E_MACRO_REDEFINED (Sun Forte case) - dnl For Forte we need disable "empty declaration" warning produced by un-needed semicolon - dnl "statement not reached" disabled because there is g_assert_not_reached () in some places - dnl "macro redefined" because of gst/gettext.h - dnl FIXME: is it really supposed to be 'ARGUEMENT' and not 'ARGUMENT'? - for f in 'no%E_EMPTY_DECLARATION' \ - 'no%E_STATEMENT_NOT_REACHED' \ - 'no%E_ARGUEMENT_MISMATCH' \ - 'no%E_MACRO_REDEFINED' \ - 'no%E_LOOP_NOT_ENTERED_AT_TOP' - do - AS_COMPILER_FLAG([-errwarn=%all,$f], [ - ERROR_CFLAGS="$ERROR_CFLAGS,$f" - ]) - done - ]) - fi fi if test "x$2" != "x" @@ -142,28 +117,6 @@ AC_DEFUN([AG_GST_SET_ERROR_CXXFLAGS], AS_CXX_COMPILER_FLAG([-fno-strict-aliasing], ERROR_CXXFLAGS="$ERROR_CXXFLAGS -fno-strict-aliasing") ]) - else - dnl if -Werror isn't suported, try -errwarn=%all - AS_CXX_COMPILER_FLAG([-errwarn=%all], ERROR_CXXFLAGS="$ERROR_CXXFLAGS -errwarn=%all") - if test "x$ERROR_CXXFLAGS" != "x"; then - dnl try -errwarn=%all,no%E_EMPTY_DECLARATION, - dnl no%E_STATEMENT_NOT_REACHED,no%E_ARGUEMENT_MISMATCH, - dnl no%E_MACRO_REDEFINED (Sun Forte case) - dnl For Forte we need disable "empty declaration" warning produced by un-needed semicolon - dnl "statement not reached" disabled because there is g_assert_not_reached () in some places - dnl "macro redefined" because of gst/gettext.h - dnl FIXME: is it really supposed to be 'ARGUEMENT' and not 'ARGUMENT'? - dnl FIXME: do any of these work with the c++ compiler? if not, why - dnl do we check at all? - for f in 'no%E_EMPTY_DECLARATION' \ - 'no%E_STATEMENT_NOT_REACHED' \ - 'no%E_ARGUEMENT_MISMATCH' \ - 'no%E_MACRO_REDEFINED' \ - 'no%E_LOOP_NOT_ENTERED_AT_TOP' - do - AS_CXX_COMPILER_FLAG([-errwarn=%all,$f], [ERROR_CXXFLAGS="$ERROR_CXXFLAGS,$f"]) - done - fi fi fi @@ -227,28 +180,6 @@ AC_DEFUN([AG_GST_SET_ERROR_OBJCFLAGS], AS_OBJC_COMPILER_FLAG([-fno-strict-aliasing], ERROR_OBJCFLAGS="$ERROR_OBJCFLAGS -fno-strict-aliasing") ]) - else - dnl if -Werror isn't suported, try -errwarn=%all - AS_OBJC_COMPILER_FLAG([-errwarn=%all], ERROR_OBJCFLAGS="$ERROR_OBJCFLAGS -errwarn=%all") - if test "x$ERROR_OBJCFLAGS" != "x"; then - dnl try -errwarn=%all,no%E_EMPTY_DECLARATION, - dnl no%E_STATEMENT_NOT_REACHED,no%E_ARGUEMENT_MISMATCH, - dnl no%E_MACRO_REDEFINED (Sun Forte case) - dnl For Forte we need disable "empty declaration" warning produced by un-needed semicolon - dnl "statement not reached" disabled because there is g_assert_not_reached () in some places - dnl "macro redefined" because of gst/gettext.h - dnl FIXME: is it really supposed to be 'ARGUEMENT' and not 'ARGUMENT'? - dnl FIXME: do any of these work with the c++ compiler? if not, why - dnl do we check at all? - for f in 'no%E_EMPTY_DECLARATION' \ - 'no%E_STATEMENT_NOT_REACHED' \ - 'no%E_ARGUEMENT_MISMATCH' \ - 'no%E_MACRO_REDEFINED' \ - 'no%E_LOOP_NOT_ENTERED_AT_TOP' - do - AS_OBJC_COMPILER_FLAG([-errwarn=%all,$f], [ERROR_OBJCFLAGS="$ERROR_OBJCFLAGS,$f"]) - done - fi fi fi diff --git a/common/m4/gst-glib2.m4 b/common/m4/gst-glib2.m4 index 5b9cd8beda470c8b3e919a4a0cec8f3fd7cd8fd2..5b72507f5d2fbcf76bb1d47d3be6af128be83762 100644 --- a/common/m4/gst-glib2.m4 +++ b/common/m4/gst-glib2.m4 @@ -51,18 +51,9 @@ AC_DEFUN([AG_GST_GLIB_CHECK], fi AC_ARG_ENABLE(glib-asserts, - AS_HELP_STRING([--enable-glib-asserts[=@<:@no/auto/yes@:>@]], + AS_HELP_STRING([--enable-glib-asserts[=@<:@no/yes@:>@]], [Enable GLib assertion]),[enable_glib_assertions=$enableval], - [enable_glib_assertions=auto]) - - if test "x$enable_glib_assertions" = "xauto"; then - dnl Enable assertions only for development versions - if test "x`expr $PACKAGE_VERSION_MINOR % 2`" = "x1" -a "x`expr $PACKAGE_VERSION_MICRO '<' 90`" = "x1"; then - enable_glib_assertions=yes - else - enable_glib_assertions=no - fi - fi + [enable_glib_assertions=yes]) if test "x$enable_glib_assertions" = "xno"; then GLIB_EXTRA_CFLAGS="$GLIB_EXTRA_CFLAGS -DG_DISABLE_ASSERT" diff --git a/common/m4/gst-package-release-datetime.m4 b/common/m4/gst-package-release-datetime.m4 index bc885e37f3cc22e220d05e104d616aca8f837ca4..4cf44e6b5f4e1beaab9767a5ec13df229ac4c95b 100644 --- a/common/m4/gst-package-release-datetime.m4 +++ b/common/m4/gst-package-release-datetime.m4 @@ -27,14 +27,16 @@ dnl =========================================================================== AC_DEFUN([AG_GST_SET_PACKAGE_RELEASE_DATETIME], [ dnl AG_GST_SET_PACKAGE_RELEASE_DATETIME() - dnl AG_GST_SET_PACKAGE_RELEASE_DATETIME([yes]...) + dnl AG_GST_SET_PACKAGE_RELEASE_DATETIME([no]...) if test "x$1" = "xno" -o "x$1" = "x"; then GST_PACKAGE_RELEASE_DATETIME=`date -u "+%Y-%m-%dT%H:%MZ"` elif test "x$1" = "xyes"; then - dnl AG_GST_SET_PACKAGE_RELEASE_DATETIME([no], ["YYYY-MM-DD"]) - dnl AG_GST_SET_PACKAGE_RELEASE_DATETIME([no], [DOAP-FILE], [RELEASE-VERSION]) - if ( echo $1 | grep '^20[1-9][0-9]-[0-1][0-9]-[0-3][0-9]' >/dev/null ) ; then - GST_PACKAGE_RELEASE_DATETIME=$1 + dnl AG_GST_SET_PACKAGE_RELEASE_DATETIME([yes], [YYYY-MM-DD]) + dnl AG_GST_SET_PACKAGE_RELEASE_DATETIME([yes], [DOAP-FILE], [RELEASE-VERSION]) +changequote(<<, >>)dnl + if ( echo $2 | grep '^20[1-9][0-9]-[0-1][0-9]-[0-3][0-9]' >/dev/null ) ; then +changequote([, ])dnl + GST_PACKAGE_RELEASE_DATETIME=$2 else dnl we assume the .doap file contains the date as YYYY-MM-DD YYYY_MM_DD=`sh "${srcdir}/common/extract-release-date-from-doap-file" $3 $2`; @@ -47,7 +49,9 @@ AC_DEFUN([AG_GST_SET_PACKAGE_RELEASE_DATETIME], fi fi dnl AG_GST_SET_PACKAGE_RELEASE_DATETIME([YYYY-MM-DD]) +changequote(<<, >>)dnl elif ( echo $1 | grep '^20[1-9][0-9]-[0-1][0-9]-[0-3][0-9]' >/dev/null ) ; then +changequote([, ])dnl GST_PACKAGE_RELEASE_DATETIME=$1 else AC_MSG_WARN([SET_PACKAGE_RELEASE_DATETIME: invalid first argument]) diff --git a/common/release.mak b/common/release.mak index 715657b3dfa6ccc421fd78cdfeb50f240def39c3..c84c2f1a2160255d9707227086135ac3311004e3 100644 --- a/common/release.mak +++ b/common/release.mak @@ -14,6 +14,9 @@ release: dist @if [ -d ../www/data/src ]; then \ mv -v $(PACKAGE)-$(VERSION).tar.xz ../www/data/src/$(PACKAGE)/ ; \ mv -v $(PACKAGE)-$(VERSION).tar.xz.sha256sum ../www/data/src/$(PACKAGE)/ ; \ + elif [ -d ../../www/data/src ]; then \ + mv -v $(PACKAGE)-$(VERSION).tar.xz ../../www/data/src/$(PACKAGE)/ ; \ + mv -v $(PACKAGE)-$(VERSION).tar.xz.sha256sum ../../www/data/src/$(PACKAGE)/ ; \ fi @echo "=================================================================================================" diff --git a/config.h.in b/config.h.in index 09bdbda587658f3532eb39ff81c7fe8d0d8e4505..0d626a35d63d365e828496f9e3384efdd6c393ec 100644 --- a/config.h.in +++ b/config.h.in @@ -40,6 +40,9 @@ /* GStreamer API Version */ #undef GST_API_VERSION +/* Define if extra runtime checks should be enabled */ +#undef GST_ENABLE_EXTRA_CHECKS + /* Defined if gcov is enabled to force a rebuild due to config.h changing */ #undef GST_GCOV_ENABLED @@ -61,6 +64,9 @@ /* Define if static plugins should be built */ #undef GST_PLUGIN_BUILD_STATIC +/* Define if Video4Linux probe shall be run at plugin load */ +#undef GST_V4L2_ENABLE_PROBE + /* Define to enable aalib ASCII Art library (used by aasink). */ #undef HAVE_AALIB @@ -341,6 +347,9 @@ /* Define to enable VPX decoder (used by vpx). */ #undef HAVE_VPX +/* Defined if the VPX library version is 1.4 or bigger */ +#undef HAVE_VPX_1_4 + /* Define to enable Win32 WaveForm (used by waveformsink). */ #undef HAVE_WAVEFORM diff --git a/configure b/configure index a592e9c56ac6c3d9b64d099870da88f986237a84..903c72ab21fb1be913ded9e3f7e2a77f9a5a8228 100755 --- a/configure +++ b/configure @@ -1,6 +1,6 @@ #! /bin/sh # Guess values for system-dependent variables and create Makefiles. -# Generated by GNU Autoconf 2.69 for GStreamer Good Plug-ins 1.6.2. +# Generated by GNU Autoconf 2.69 for GStreamer Good Plug-ins 1.7.1. # # Report bugs to <http://bugzilla.gnome.org/enter_bug.cgi?product=GStreamer>. # @@ -591,8 +591,8 @@ MAKEFLAGS= # Identity of this package. PACKAGE_NAME='GStreamer Good Plug-ins' PACKAGE_TARNAME='gst-plugins-good' -PACKAGE_VERSION='1.6.2' -PACKAGE_STRING='GStreamer Good Plug-ins 1.6.2' +PACKAGE_VERSION='1.7.1' +PACKAGE_STRING='GStreamer Good Plug-ins 1.7.1' PACKAGE_BUGREPORT='http://bugzilla.gnome.org/enter_bug.cgi?product=GStreamer' PACKAGE_URL='' @@ -661,6 +661,8 @@ WAVPACK_LIBS WAVPACK_CFLAGS USE_VPX_FALSE USE_VPX_TRUE +VPX_140_LIBS +VPX_140_CFLAGS VPX_130_LIBS VPX_130_CFLAGS VPX_LIBS @@ -1207,6 +1209,7 @@ enable_rpath with_libiconv_prefix with_libintl_prefix enable_fatal_warnings +enable_extra_check enable_debug enable_profiling enable_valgrind @@ -1225,6 +1228,7 @@ enable_gtk_doc_pdf enable_gobject_cast_checks enable_glib_asserts enable_orc +enable_Bsymbolic enable_static_plugins with_default_audiosink with_default_audiosrc @@ -1284,6 +1288,7 @@ enable_osx_video enable_gst_v4l2 with_gudev with_libv4l2 +enable_v4l2_probe enable_x enable_aalib with_aalib_prefix @@ -1402,6 +1407,8 @@ VPX_CFLAGS VPX_LIBS VPX_130_CFLAGS VPX_130_LIBS +VPX_140_CFLAGS +VPX_140_LIBS WAVPACK_CFLAGS WAVPACK_LIBS' @@ -1954,7 +1961,7 @@ if test "$ac_init_help" = "long"; then # Omit some internal or obsolete options to make the list less imposing. # This message is too long to be a string in the A/UX 3.1 sh. cat <<_ACEOF -\`configure' configures GStreamer Good Plug-ins 1.6.2 to adapt to many kinds of systems. +\`configure' configures GStreamer Good Plug-ins 1.7.1 to adapt to many kinds of systems. Usage: $0 [OPTION]... [VAR=VALUE]... @@ -2027,7 +2034,7 @@ fi if test -n "$ac_init_help"; then case $ac_init_help in - short | recursive ) echo "Configuration of GStreamer Good Plug-ins 1.6.2:";; + short | recursive ) echo "Configuration of GStreamer Good Plug-ins 1.7.1:";; esac cat <<\_ACEOF @@ -2053,6 +2060,7 @@ Optional Features: --disable-rpath do not hardcode runtime library paths --disable-fatal-warnings Don't turn compiler warnings into fatal errors + --enable-extra-checks Enable extra runtime checks --disable-debug disable addition of -g debugging info --enable-profiling adds -pg to compiler commandline, for profiling --disable-valgrind disable run-time valgrind detection @@ -2066,9 +2074,10 @@ Optional Features: --enable-gtk-doc-pdf build documentation in pdf format [[default=no]] --enable-gobject-cast-checks=[no/auto/yes] Enable GObject cast checks - --enable-glib-asserts=[no/auto/yes] + --enable-glib-asserts=[no/yes] Enable GLib assertion --enable-orc use Orc if installed + --disable-Bsymbolic avoid linking with -Bsymbolic --enable-static-plugins build static plugins [default=no] --disable-alpha disable dependency-less alpha plugin --disable-apetag disable dependency-less apetag plugin @@ -2121,6 +2130,7 @@ Optional Features: --disable-osx_audio disable OSX audio: osxaudio --disable-osx_video disable OSX video: osxvideosink --disable-gst_v4l2 disable Video 4 Linux 2: video4linux2 + --enable-v4l2-probe enable V4L2 plugin to probe devices [default=no] --disable-x disable X libraries and plugins: ximagesrc --disable-aalib disable aalib ASCII Art library: aasink --disable-aalibtest do not try to compile and run a test AALIB program @@ -2320,6 +2330,10 @@ Some influential environment variables: C compiler flags for VPX_130, overriding pkg-config VPX_130_LIBS linker flags for VPX_130, overriding pkg-config + VPX_140_CFLAGS + C compiler flags for VPX_140, overriding pkg-config + VPX_140_LIBS + linker flags for VPX_140, overriding pkg-config WAVPACK_CFLAGS C compiler flags for WAVPACK, overriding pkg-config WAVPACK_LIBS @@ -2391,7 +2405,7 @@ fi test -n "$ac_init_help" && exit $ac_status if $ac_init_version; then cat <<\_ACEOF -GStreamer Good Plug-ins configure 1.6.2 +GStreamer Good Plug-ins configure 1.7.1 generated by GNU Autoconf 2.69 Copyright (C) 2012 Free Software Foundation, Inc. @@ -3202,7 +3216,7 @@ cat >config.log <<_ACEOF This file contains any messages produced by compilers while running configure, to aid debugging if configure makes a mistake. -It was created by GStreamer Good Plug-ins $as_me 1.6.2, which was +It was created by GStreamer Good Plug-ins $as_me 1.7.1, which was generated by GNU Autoconf 2.69. Invocation command line was $ $0 $@ @@ -4184,7 +4198,7 @@ fi # Define the identity of the package. PACKAGE='gst-plugins-good' - VERSION='1.6.2' + VERSION='1.7.1' cat >>confdefs.h <<_ACEOF @@ -4395,9 +4409,9 @@ fi - PACKAGE_VERSION_MAJOR=$(echo 1.6.2 | cut -d'.' -f1) - PACKAGE_VERSION_MINOR=$(echo 1.6.2 | cut -d'.' -f2) - PACKAGE_VERSION_MICRO=$(echo 1.6.2 | cut -d'.' -f3) + PACKAGE_VERSION_MAJOR=$(echo 1.7.1 | cut -d'.' -f1) + PACKAGE_VERSION_MINOR=$(echo 1.7.1 | cut -d'.' -f2) + PACKAGE_VERSION_MICRO=$(echo 1.7.1 | cut -d'.' -f3) @@ -4408,7 +4422,7 @@ fi { $as_echo "$as_me:${as_lineno-$LINENO}: checking nano version" >&5 $as_echo_n "checking nano version... " >&6; } - NANO=$(echo 1.6.2 | cut -d'.' -f4) + NANO=$(echo 1.7.1 | cut -d'.' -f4) if test x"$NANO" = x || test "x$NANO" = "x0" ; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: 0 (release)" >&5 @@ -9064,10 +9078,10 @@ fi done - GST_CURRENT=602 + GST_CURRENT=701 GST_REVISION=0 - GST_AGE=602 - GST_LIBVERSION=602:0:602 + GST_AGE=701 + GST_LIBVERSION=701:0:701 @@ -13392,8 +13406,8 @@ CC="$lt_save_CC" -GST_REQ=1.6.2 -GSTPB_REQ=1.6.2 +GST_REQ=1.7.1 +GSTPB_REQ=1.7.1 @@ -15445,6 +15459,33 @@ fi + # Check whether --enable-extra-check was given. +if test "${enable_extra_check+set}" = set; then : + enableval=$enable_extra_check; + case "${enableval}" in + yes) EXTRA_CHECKS=yes ;; + no) EXTRA_CHECKS=no ;; + *) as_fn_error $? "bad value ${enableval} for --enable-extra-checks" "$LINENO" 5 ;; + esac + +else + + if test "x`expr $PACKAGE_VERSION_MINOR % 2`" = "x1" -a "x`expr $PACKAGE_VERSION_MICRO '<' 90`" = "x1"; then + EXTRA_CHECKS=yes + else + EXTRA_CHECKS=no + fi + +fi + + + if test "x$EXTRA_CHECKS" = "xyes"; then + +$as_echo "#define GST_ENABLE_EXTRA_CHECKS 1" >>confdefs.h + + fi + + # Check whether --enable-debug was given. if test "${enable_debug+set}" = set; then : @@ -24068,7 +24109,7 @@ fi -GLIB_REQ=2.32.0 +GLIB_REQ=2.40.0 @@ -24209,18 +24250,10 @@ fi if test "${enable_glib_asserts+set}" = set; then : enableval=$enable_glib_asserts; enable_glib_assertions=$enableval else - enable_glib_assertions=auto + enable_glib_assertions=yes fi - if test "x$enable_glib_assertions" = "xauto"; then - if test "x`expr $PACKAGE_VERSION_MINOR % 2`" = "x1" -a "x`expr $PACKAGE_VERSION_MICRO '<' 90`" = "x1"; then - enable_glib_assertions=yes - else - enable_glib_assertions=no - fi - fi - if test "x$enable_glib_assertions" = "xno"; then GLIB_EXTRA_CFLAGS="$GLIB_EXTRA_CFLAGS -DG_DISABLE_ASSERT" fi @@ -25418,6 +25451,41 @@ else fi +# Check whether --enable-Bsymbolic was given. +if test "${enable_Bsymbolic+set}" = set; then : + enableval=$enable_Bsymbolic; +else + SAVED_LDFLAGS="${LDFLAGS}" SAVED_LIBS="${LIBS}" + { $as_echo "$as_me:${as_lineno-$LINENO}: checking for -Bsymbolic-functions linker flag" >&5 +$as_echo_n "checking for -Bsymbolic-functions linker flag... " >&6; } + LDFLAGS=-Wl,-Bsymbolic-functions + LIBS= + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ + +int +main () +{ +return 0 + ; + return 0; +} +_ACEOF +if ac_fn_c_try_link "$LINENO"; then : + { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 +$as_echo "yes" >&6; } + enable_Bsymbolic=yes +else + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 +$as_echo "no" >&6; } + enable_Bsymbolic=no +fi +rm -f core conftest.err conftest.$ac_objext \ + conftest$ac_exeext conftest.$ac_ext + LDFLAGS="${SAVED_LDFLAGS}" LIBS="${SAVED_LIBS}" +fi + + GST_LICENSE="LGPL" @@ -25474,8 +25542,8 @@ $as_echo "$as_me: Using $PLUGINDIR as the plugin install location" >&6;} if test "xyes" = "xno" -o "xyes" = "x"; then GST_PACKAGE_RELEASE_DATETIME=`date -u "+%Y-%m-%dT%H:%MZ"` elif test "xyes" = "xyes"; then - if ( echo yes | grep '^201-90-9-0-10-9-0-30-9' >/dev/null ) ; then - GST_PACKAGE_RELEASE_DATETIME=yes + if ( echo "${srcdir}/gst-plugins-good.doap" | grep '^20[1-9][0-9]-[0-1][0-9]-[0-3][0-9]' >/dev/null ) ; then + GST_PACKAGE_RELEASE_DATETIME= "${srcdir}/gst-plugins-good.doap" else YYYY_MM_DD=`sh "${srcdir}/common/extract-release-date-from-doap-file" $PACKAGE_VERSION_MAJOR.$PACKAGE_VERSION_MINOR.$PACKAGE_VERSION_MICRO "${srcdir}/gst-plugins-good.doap" `; if test "x$YYYY_MM_DD" != "x"; then @@ -25486,7 +25554,7 @@ $as_echo "$as_me: Using $PLUGINDIR as the plugin install location" >&6;} GST_PACKAGE_RELEASE_DATETIME="" fi fi - elif ( echo yes | grep '^201-90-9-0-10-9-0-30-9' >/dev/null ) ; then + elif ( echo yes | grep '^20[1-9][0-9]-[0-1][0-9]-[0-3][0-9]' >/dev/null ) ; then GST_PACKAGE_RELEASE_DATETIME=yes else { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: SET_PACKAGE_RELEASE_DATETIME: invalid first argument" >&5 @@ -25513,8 +25581,8 @@ _ACEOF if test "xno" = "xno" -o "xno" = "x"; then GST_PACKAGE_RELEASE_DATETIME=`date -u "+%Y-%m-%dT%H:%MZ"` elif test "xno" = "xyes"; then - if ( echo no | grep '^201-90-9-0-10-9-0-30-9' >/dev/null ) ; then - GST_PACKAGE_RELEASE_DATETIME=no + if ( echo | grep '^20[1-9][0-9]-[0-1][0-9]-[0-3][0-9]' >/dev/null ) ; then + GST_PACKAGE_RELEASE_DATETIME= else YYYY_MM_DD=`sh "${srcdir}/common/extract-release-date-from-doap-file" `; if test "x$YYYY_MM_DD" != "x"; then @@ -25525,7 +25593,7 @@ _ACEOF GST_PACKAGE_RELEASE_DATETIME="" fi fi - elif ( echo no | grep '^201-90-9-0-10-9-0-30-9' >/dev/null ) ; then + elif ( echo no | grep '^20[1-9][0-9]-[0-1][0-9]-[0-3][0-9]' >/dev/null ) ; then GST_PACKAGE_RELEASE_DATETIME=no else { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: SET_PACKAGE_RELEASE_DATETIME: invalid first argument" >&5 @@ -25829,93 +25897,6 @@ rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext { $as_echo "$as_me:${as_lineno-$LINENO}: result: $flag_ok" >&5 $as_echo "$flag_ok" >&6; } - - if test "x$ERROR_CFLAGS" = "x" - then - - { $as_echo "$as_me:${as_lineno-$LINENO}: checking to see if compiler understands -errwarn=%all" >&5 -$as_echo_n "checking to see if compiler understands -errwarn=%all... " >&6; } - - save_CFLAGS="$CFLAGS" - CFLAGS="$CFLAGS -errwarn=%all" - - cat confdefs.h - <<_ACEOF >conftest.$ac_ext -/* end confdefs.h. */ - -int -main () -{ - - ; - return 0; -} -_ACEOF -if ac_fn_c_try_compile "$LINENO"; then : - flag_ok=yes -else - flag_ok=no -fi -rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext - CFLAGS="$save_CFLAGS" - - if test "X$flag_ok" = Xyes ; then - - ERROR_CFLAGS="-errwarn=%all" - for f in 'no%E_EMPTY_DECLARATION' \ - 'no%E_STATEMENT_NOT_REACHED' \ - 'no%E_ARGUEMENT_MISMATCH' \ - 'no%E_MACRO_REDEFINED' \ - 'no%E_LOOP_NOT_ENTERED_AT_TOP' - do - - { $as_echo "$as_me:${as_lineno-$LINENO}: checking to see if compiler understands -errwarn=%all,$f" >&5 -$as_echo_n "checking to see if compiler understands -errwarn=%all,$f... " >&6; } - - save_CFLAGS="$CFLAGS" - CFLAGS="$CFLAGS -errwarn=%all,$f" - - cat confdefs.h - <<_ACEOF >conftest.$ac_ext -/* end confdefs.h. */ - -int -main () -{ - - ; - return 0; -} -_ACEOF -if ac_fn_c_try_compile "$LINENO"; then : - flag_ok=yes -else - flag_ok=no -fi -rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext - CFLAGS="$save_CFLAGS" - - if test "X$flag_ok" = Xyes ; then - - ERROR_CFLAGS="$ERROR_CFLAGS,$f" - - true - else - - true - fi - { $as_echo "$as_me:${as_lineno-$LINENO}: result: $flag_ok" >&5 -$as_echo "$flag_ok" >&6; } - - done - - true - else - - true - fi - { $as_echo "$as_me:${as_lineno-$LINENO}: result: $flag_ok" >&5 -$as_echo "$flag_ok" >&6; } - - fi fi if test "x @@ -26271,122 +26252,6 @@ $as_echo "$flag_ok" >&6; } fi - else - - - - { $as_echo "$as_me:${as_lineno-$LINENO}: checking to see if c++ compiler understands -errwarn=%all" >&5 -$as_echo_n "checking to see if c++ compiler understands -errwarn=%all... " >&6; } - - save_CPPFLAGS="$CPPFLAGS" - CPPFLAGS="$CPPFLAGS -errwarn=%all" - - ac_ext=cpp -ac_cpp='$CXXCPP $CPPFLAGS' -ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5' -ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' -ac_compiler_gnu=$ac_cv_cxx_compiler_gnu - - - cat confdefs.h - <<_ACEOF >conftest.$ac_ext -/* end confdefs.h. */ - -int -main () -{ - - ; - return 0; -} -_ACEOF -if ac_fn_cxx_try_compile "$LINENO"; then : - flag_ok=yes -else - flag_ok=no -fi -rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext - CPPFLAGS="$save_CPPFLAGS" - - if test "X$flag_ok" = Xyes ; then - ERROR_CXXFLAGS="$ERROR_CXXFLAGS -errwarn=%all" - true - else - - true - fi - - ac_ext=c -ac_cpp='$CPP $CPPFLAGS' -ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' -ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' -ac_compiler_gnu=$ac_cv_c_compiler_gnu - - - { $as_echo "$as_me:${as_lineno-$LINENO}: result: $flag_ok" >&5 -$as_echo "$flag_ok" >&6; } - - if test "x$ERROR_CXXFLAGS" != "x"; then - for f in 'no%E_EMPTY_DECLARATION' \ - 'no%E_STATEMENT_NOT_REACHED' \ - 'no%E_ARGUEMENT_MISMATCH' \ - 'no%E_MACRO_REDEFINED' \ - 'no%E_LOOP_NOT_ENTERED_AT_TOP' - do - - - - { $as_echo "$as_me:${as_lineno-$LINENO}: checking to see if c++ compiler understands -errwarn=%all,$f" >&5 -$as_echo_n "checking to see if c++ compiler understands -errwarn=%all,$f... " >&6; } - - save_CPPFLAGS="$CPPFLAGS" - CPPFLAGS="$CPPFLAGS -errwarn=%all,$f" - - ac_ext=cpp -ac_cpp='$CXXCPP $CPPFLAGS' -ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5' -ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' -ac_compiler_gnu=$ac_cv_cxx_compiler_gnu - - - cat confdefs.h - <<_ACEOF >conftest.$ac_ext -/* end confdefs.h. */ - -int -main () -{ - - ; - return 0; -} -_ACEOF -if ac_fn_cxx_try_compile "$LINENO"; then : - flag_ok=yes -else - flag_ok=no -fi -rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext - CPPFLAGS="$save_CPPFLAGS" - - if test "X$flag_ok" = Xyes ; then - ERROR_CXXFLAGS="$ERROR_CXXFLAGS,$f" - true - else - - true - fi - - ac_ext=c -ac_cpp='$CPP $CPPFLAGS' -ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' -ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' -ac_compiler_gnu=$ac_cv_c_compiler_gnu - - - { $as_echo "$as_me:${as_lineno-$LINENO}: result: $flag_ok" >&5 -$as_echo "$flag_ok" >&6; } - - done - fi fi fi @@ -26707,122 +26572,6 @@ $as_echo "$flag_ok" >&6; } fi - else - - - - { $as_echo "$as_me:${as_lineno-$LINENO}: checking to see if Objective C compiler understands -errwarn=%all" >&5 -$as_echo_n "checking to see if Objective C compiler understands -errwarn=%all... " >&6; } - - save_CPPFLAGS="$CPPFLAGS" - CPPFLAGS="$CPPFLAGS -errwarn=%all" - - ac_ext=m -ac_cpp='$OBJCPP $CPPFLAGS' -ac_compile='$OBJC -c $OBJCFLAGS $CPPFLAGS conftest.$ac_ext >&5' -ac_link='$OBJC -o conftest$ac_exeext $OBJCFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' -ac_compiler_gnu=$ac_cv_objc_compiler_gnu - - - cat confdefs.h - <<_ACEOF >conftest.$ac_ext -/* end confdefs.h. */ - -int -main () -{ - - ; - return 0; -} -_ACEOF -if ac_fn_objc_try_compile "$LINENO"; then : - flag_ok=yes -else - flag_ok=no -fi -rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext - CPPFLAGS="$save_CPPFLAGS" - - if test "X$flag_ok" = Xyes ; then - ERROR_OBJCFLAGS="$ERROR_OBJCFLAGS -errwarn=%all" - true - else - - true - fi - - ac_ext=c -ac_cpp='$CPP $CPPFLAGS' -ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' -ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' -ac_compiler_gnu=$ac_cv_c_compiler_gnu - - - { $as_echo "$as_me:${as_lineno-$LINENO}: result: $flag_ok" >&5 -$as_echo "$flag_ok" >&6; } - - if test "x$ERROR_OBJCFLAGS" != "x"; then - for f in 'no%E_EMPTY_DECLARATION' \ - 'no%E_STATEMENT_NOT_REACHED' \ - 'no%E_ARGUEMENT_MISMATCH' \ - 'no%E_MACRO_REDEFINED' \ - 'no%E_LOOP_NOT_ENTERED_AT_TOP' - do - - - - { $as_echo "$as_me:${as_lineno-$LINENO}: checking to see if Objective C compiler understands -errwarn=%all,$f" >&5 -$as_echo_n "checking to see if Objective C compiler understands -errwarn=%all,$f... " >&6; } - - save_CPPFLAGS="$CPPFLAGS" - CPPFLAGS="$CPPFLAGS -errwarn=%all,$f" - - ac_ext=m -ac_cpp='$OBJCPP $CPPFLAGS' -ac_compile='$OBJC -c $OBJCFLAGS $CPPFLAGS conftest.$ac_ext >&5' -ac_link='$OBJC -o conftest$ac_exeext $OBJCFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' -ac_compiler_gnu=$ac_cv_objc_compiler_gnu - - - cat confdefs.h - <<_ACEOF >conftest.$ac_ext -/* end confdefs.h. */ - -int -main () -{ - - ; - return 0; -} -_ACEOF -if ac_fn_objc_try_compile "$LINENO"; then : - flag_ok=yes -else - flag_ok=no -fi -rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext - CPPFLAGS="$save_CPPFLAGS" - - if test "X$flag_ok" = Xyes ; then - ERROR_OBJCFLAGS="$ERROR_OBJCFLAGS,$f" - true - else - - true - fi - - ac_ext=c -ac_cpp='$CPP $CPPFLAGS' -ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' -ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' -ac_compiler_gnu=$ac_cv_c_compiler_gnu - - - { $as_echo "$as_me:${as_lineno-$LINENO}: result: $flag_ok" >&5 -$as_echo "$flag_ok" >&6; } - - done - fi fi fi @@ -30048,6 +29797,17 @@ fi fi fi +# Check whether --enable-v4l2-probe was given. +if test "${enable_v4l2_probe+set}" = set; then : + enableval=$enable_v4l2_probe; +fi + +if test "x$enable_v4l2_probe" = xyes; then + +$as_echo "#define GST_V4L2_ENABLE_PROBE 1" >>confdefs.h + +fi + echo { $as_echo "$as_me:${as_lineno-$LINENO}: *** checking feature: X libraries and plugins ***" >&5 $as_echo "$as_me: *** checking feature: X libraries and plugins ***" >&6;} @@ -33587,12 +33347,12 @@ if test -n "$PKG_CONFIG"; then pkg_cv_SOUP_CFLAGS="$SOUP_CFLAGS" else if test -n "$PKG_CONFIG" && \ - { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"libsoup-2.4 >= 2.40\""; } >&5 - ($PKG_CONFIG --exists --print-errors "libsoup-2.4 >= 2.40") 2>&5 + { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"libsoup-2.4 >= 2.48\""; } >&5 + ($PKG_CONFIG --exists --print-errors "libsoup-2.4 >= 2.48") 2>&5 ac_status=$? $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 test $ac_status = 0; }; then - pkg_cv_SOUP_CFLAGS=`$PKG_CONFIG --cflags "libsoup-2.4 >= 2.40" 2>/dev/null` + pkg_cv_SOUP_CFLAGS=`$PKG_CONFIG --cflags "libsoup-2.4 >= 2.48" 2>/dev/null` else pkg_failed=yes fi @@ -33605,12 +33365,12 @@ if test -n "$PKG_CONFIG"; then pkg_cv_SOUP_LIBS="$SOUP_LIBS" else if test -n "$PKG_CONFIG" && \ - { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"libsoup-2.4 >= 2.40\""; } >&5 - ($PKG_CONFIG --exists --print-errors "libsoup-2.4 >= 2.40") 2>&5 + { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"libsoup-2.4 >= 2.48\""; } >&5 + ($PKG_CONFIG --exists --print-errors "libsoup-2.4 >= 2.48") 2>&5 ac_status=$? $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 test $ac_status = 0; }; then - pkg_cv_SOUP_LIBS=`$PKG_CONFIG --libs "libsoup-2.4 >= 2.40" 2>/dev/null` + pkg_cv_SOUP_LIBS=`$PKG_CONFIG --libs "libsoup-2.4 >= 2.48" 2>/dev/null` else pkg_failed=yes fi @@ -33629,9 +33389,9 @@ else _pkg_short_errors_supported=no fi if test $_pkg_short_errors_supported = yes; then - SOUP_PKG_ERRORS=`$PKG_CONFIG --short-errors --errors-to-stdout --print-errors "libsoup-2.4 >= 2.40"` + SOUP_PKG_ERRORS=`$PKG_CONFIG --short-errors --errors-to-stdout --print-errors "libsoup-2.4 >= 2.48"` else - SOUP_PKG_ERRORS=`$PKG_CONFIG --errors-to-stdout --print-errors "libsoup-2.4 >= 2.40"` + SOUP_PKG_ERRORS=`$PKG_CONFIG --errors-to-stdout --print-errors "libsoup-2.4 >= 2.48"` fi # Put the nasty error message in config.log where it belongs echo "$SOUP_PKG_ERRORS" >&5 @@ -34500,6 +34260,83 @@ fi fi + + +pkg_failed=no +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for VPX_140" >&5 +$as_echo_n "checking for VPX_140... " >&6; } + +if test -n "$PKG_CONFIG"; then + if test -n "$VPX_140_CFLAGS"; then + pkg_cv_VPX_140_CFLAGS="$VPX_140_CFLAGS" + else + if test -n "$PKG_CONFIG" && \ + { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"vpx >= 1.4.0\""; } >&5 + ($PKG_CONFIG --exists --print-errors "vpx >= 1.4.0") 2>&5 + ac_status=$? + $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 + test $ac_status = 0; }; then + pkg_cv_VPX_140_CFLAGS=`$PKG_CONFIG --cflags "vpx >= 1.4.0" 2>/dev/null` +else + pkg_failed=yes +fi + fi +else + pkg_failed=untried +fi +if test -n "$PKG_CONFIG"; then + if test -n "$VPX_140_LIBS"; then + pkg_cv_VPX_140_LIBS="$VPX_140_LIBS" + else + if test -n "$PKG_CONFIG" && \ + { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"vpx >= 1.4.0\""; } >&5 + ($PKG_CONFIG --exists --print-errors "vpx >= 1.4.0") 2>&5 + ac_status=$? + $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 + test $ac_status = 0; }; then + pkg_cv_VPX_140_LIBS=`$PKG_CONFIG --libs "vpx >= 1.4.0" 2>/dev/null` +else + pkg_failed=yes +fi + fi +else + pkg_failed=untried +fi + + + +if test $pkg_failed = yes; then + +if $PKG_CONFIG --atleast-pkgconfig-version 0.20; then + _pkg_short_errors_supported=yes +else + _pkg_short_errors_supported=no +fi + if test $_pkg_short_errors_supported = yes; then + VPX_140_PKG_ERRORS=`$PKG_CONFIG --short-errors --errors-to-stdout --print-errors "vpx >= 1.4.0"` + else + VPX_140_PKG_ERRORS=`$PKG_CONFIG --errors-to-stdout --print-errors "vpx >= 1.4.0"` + fi + # Put the nasty error message in config.log where it belongs + echo "$VPX_140_PKG_ERRORS" >&5 + + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 +$as_echo "no" >&6; } + true +elif test $pkg_failed = untried; then + true +else + VPX_140_CFLAGS=$pkg_cv_VPX_140_CFLAGS + VPX_140_LIBS=$pkg_cv_VPX_140_LIBS + { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 +$as_echo "yes" >&6; } + + +$as_echo "#define HAVE_VPX_1_4 1" >>confdefs.h + + +fi + LIBS="$OLD_LIBS" CFLAGS="$OLD_CFLAGS" fi @@ -35258,6 +35095,9 @@ GST_CFLAGS="-I\$(top_srcdir)/gst-libs $GST_CFLAGS $GLIB_EXTRA_CFLAGS \$(GST_OPTI GST_ALL_LDFLAGS="-no-undefined" +if test "x${enable_Bsymbolic}" = "xyes"; then + GST_ALL_LDFLAGS="$GST_ALL_LDFLAGS -Wl,-Bsymbolic-functions" +fi GST_PLUGIN_LDFLAGS="-module -avoid-version -export-symbols-regex '^_*gst_plugin_.*' $GST_ALL_LDFLAGS" @@ -36407,7 +36247,7 @@ cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1 # report actual input values of CONFIG_FILES etc. instead of their # values after options handling. ac_log=" -This file was extended by GStreamer Good Plug-ins $as_me 1.6.2, which was +This file was extended by GStreamer Good Plug-ins $as_me 1.7.1, which was generated by GNU Autoconf 2.69. Invocation command line was CONFIG_FILES = $CONFIG_FILES @@ -36473,7 +36313,7 @@ _ACEOF cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1 ac_cs_config="`$as_echo "$ac_configure_args" | sed 's/^ //; s/[\\""\`\$]/\\\\&/g'`" ac_cs_version="\\ -GStreamer Good Plug-ins config.status 1.6.2 +GStreamer Good Plug-ins config.status 1.7.1 configured by $0, generated by GNU Autoconf 2.69, with options \\"\$ac_cs_config\\" diff --git a/configure.ac b/configure.ac index 4f893c9ea5b7528ed1eea2f5ed22ab37ce7c7618..5c10e7370f7e838fc5392e52f8b23a83c5dd198e 100644 --- a/configure.ac +++ b/configure.ac @@ -5,7 +5,7 @@ dnl please read gstreamer/docs/random/autotools before changing this file dnl initialize autoconf dnl releases only do -Wall, git and prerelease does -Werror too dnl use a three digit version number for releases, and four for git/pre -AC_INIT([GStreamer Good Plug-ins],[1.6.2],[http://bugzilla.gnome.org/enter_bug.cgi?product=GStreamer],[gst-plugins-good]) +AC_INIT([GStreamer Good Plug-ins],[1.7.1],[http://bugzilla.gnome.org/enter_bug.cgi?product=GStreamer],[gst-plugins-good]) AG_GST_INIT @@ -43,11 +43,11 @@ AC_DEFINE_UNQUOTED(GST_API_VERSION, "$GST_API_VERSION", [GStreamer API Version]) AG_GST_LIBTOOL_PREPARE -AS_LIBTOOL(GST, 602, 0, 602) +AS_LIBTOOL(GST, 701, 0, 701) dnl *** required versions of GStreamer stuff *** -GST_REQ=1.6.2 -GSTPB_REQ=1.6.2 +GST_REQ=1.7.1 +GSTPB_REQ=1.7.1 dnl *** autotools stuff **** @@ -66,6 +66,7 @@ AG_GST_GETTEXT([gst-plugins-good-$GST_API_VERSION]) dnl *** check for arguments to configure *** AG_GST_ARG_DISABLE_FATAL_WARNINGS +AG_GST_ARG_ENABLE_EXTRA_CHECKS AG_GST_ARG_DEBUG AG_GST_ARG_PROFILING @@ -203,7 +204,7 @@ dnl *** checks for dependency libraries *** dnl GLib -GLIB_REQ=2.32.0 +GLIB_REQ=2.40.0 AG_GST_GLIB_CHECK([$GLIB_REQ]) dnl Orc @@ -250,6 +251,21 @@ fi AM_CONDITIONAL(HAVE_GTK, test "x$HAVE_GTK" = "xyes") AM_CONDITIONAL(HAVE_GTK_X11, test "x$HAVE_GTK_X11" = "xyes") +dnl Check for -Bsymbolic-functions linker flag used to avoid +dnl intra-library PLT jumps, if available. +AC_ARG_ENABLE(Bsymbolic, + [AS_HELP_STRING([--disable-Bsymbolic],[avoid linking with -Bsymbolic])],, + [SAVED_LDFLAGS="${LDFLAGS}" SAVED_LIBS="${LIBS}" + AC_MSG_CHECKING([for -Bsymbolic-functions linker flag]) + LDFLAGS=-Wl,-Bsymbolic-functions + LIBS= + AC_TRY_LINK([], [return 0], + AC_MSG_RESULT(yes) + enable_Bsymbolic=yes, + AC_MSG_RESULT(no) + enable_Bsymbolic=no) + LDFLAGS="${SAVED_LDFLAGS}" LIBS="${SAVED_LIBS}"]) + dnl *** set variables based on configure arguments *** dnl set license and copyright notice @@ -554,6 +570,17 @@ if test x$HAVE_GST_V4L2 = xyes; then fi fi +dnl Allow enabling v4l2 device probing +AC_ARG_ENABLE( + v4l2-probe, + AC_HELP_STRING( + [--enable-v4l2-probe], + [enable V4L2 plugin to probe devices @<:@default=no@:>@])) +if test "x$enable_v4l2_probe" = xyes; then + AC_DEFINE(GST_V4L2_ENABLE_PROBE, 1, + [Define if Video4Linux probe shall be run at plugin load]) +fi + dnl Check for X11 translit(dnm, m, l) AM_CONDITIONAL(USE_X, true) AG_GST_CHECK_FEATURE(X, [X libraries and plugins], @@ -742,7 +769,7 @@ AG_GST_CHECK_FEATURE(SHOUT2, [Shoutcast/Icecast client library], shout2, [ dnl *** soup *** translit(dnm, m, l) AM_CONDITIONAL(USE_SOUP, true) AG_GST_CHECK_FEATURE(SOUP, [soup http client plugin (2.4)], souphttpsrc, [ - PKG_CHECK_MODULES(SOUP, libsoup-2.4 >= 2.40, [HAVE_SOUP="yes"], [HAVE_SOUP="no"]) + PKG_CHECK_MODULES(SOUP, libsoup-2.4 >= 2.48, [HAVE_SOUP="yes"], [HAVE_SOUP="no"]) AC_SUBST(SOUP_CFLAGS) AC_SUBST(SOUP_LIBS) ]) @@ -802,6 +829,11 @@ AG_GST_CHECK_FEATURE(VPX, [VPX decoder], vpx, [ AC_DEFINE(HAVE_VP9_DECODER, 1, [Defined if the VP9 decoder is available]) ]) ], [true]) + + PKG_CHECK_MODULES(VPX_140, vpx >= 1.4.0, [ + AC_DEFINE(HAVE_VPX_1_4, 1, [Defined if the VPX library version is 1.4 or bigger]) + ], [true]) + LIBS="$OLD_LIBS" CFLAGS="$OLD_CFLAGS" fi @@ -928,6 +960,9 @@ AC_SUBST(GST_LIBS) dnl LDFLAGS really should only contain flags, not libs - they get added before dnl whatevertarget_LIBS and -L flags here affect the rest of the linking GST_ALL_LDFLAGS="-no-undefined" +if test "x${enable_Bsymbolic}" = "xyes"; then + GST_ALL_LDFLAGS="$GST_ALL_LDFLAGS -Wl,-Bsymbolic-functions" +fi AC_SUBST(GST_ALL_LDFLAGS) dnl this really should only contain flags, not libs - they get added before diff --git a/docs/Makefile.in b/docs/Makefile.in index 9d8ea807f736954a6000a73a8755184da65b5524..c181621f974d31083ad69b24040b3dbd899f2645 100644 --- a/docs/Makefile.in +++ b/docs/Makefile.in @@ -449,6 +449,8 @@ VALGRIND_PATH = @VALGRIND_PATH@ VERSION = @VERSION@ VPX_130_CFLAGS = @VPX_130_CFLAGS@ VPX_130_LIBS = @VPX_130_LIBS@ +VPX_140_CFLAGS = @VPX_140_CFLAGS@ +VPX_140_LIBS = @VPX_140_LIBS@ VPX_CFLAGS = @VPX_CFLAGS@ VPX_LIBS = @VPX_LIBS@ WARNING_CFLAGS = @WARNING_CFLAGS@ diff --git a/docs/plugins/Makefile.in b/docs/plugins/Makefile.in index 4e0c8b93dc5c607e4ed35b043f5a4b990ecb2425..2a881a42409361af3830efee9a4f16f25d048eca 100644 --- a/docs/plugins/Makefile.in +++ b/docs/plugins/Makefile.in @@ -409,6 +409,8 @@ VALGRIND_PATH = @VALGRIND_PATH@ VERSION = @VERSION@ VPX_130_CFLAGS = @VPX_130_CFLAGS@ VPX_130_LIBS = @VPX_130_LIBS@ +VPX_140_CFLAGS = @VPX_140_CFLAGS@ +VPX_140_LIBS = @VPX_140_LIBS@ VPX_CFLAGS = @VPX_CFLAGS@ VPX_LIBS = @VPX_LIBS@ WARNING_CFLAGS = @WARNING_CFLAGS@ diff --git a/docs/plugins/gst-plugins-good-plugins.args b/docs/plugins/gst-plugins-good-plugins.args index 7959c85cffd74f609611aea7ed8f5db40bc8629f..bfd30ad565d39ced96a80e78d3b3edf5ec57bc6f 100644 --- a/docs/plugins/gst-plugins-good-plugins.args +++ b/docs/plugins/gst-plugins-good-plugins.args @@ -608,6 +608,16 @@ <DEFAULT>"0.0.0.0"</DEFAULT> </ARG> +<ARG> +<NAME>GstUDPSrc::loop</NAME> +<TYPE>gboolean</TYPE> +<RANGE></RANGE> +<FLAGS>rw</FLAGS> +<NICK>Multicast Loopback</NICK> +<BLURB>Used for setting the multicast loop parameter. TRUE = enable, FALSE = disable.</BLURB> +<DEFAULT>TRUE</DEFAULT> +</ARG> + <ARG> <NAME>GstSMPTE::border</NAME> <TYPE>gint</TYPE> @@ -995,7 +1005,17 @@ <FLAGS>rw</FLAGS> <NICK>User Agent</NICK> <BLURB>The User-Agent string to send to the server.</BLURB> -<DEFAULT>"GStreamer/1.6.2"</DEFAULT> +<DEFAULT>"GStreamer/1.7.1"</DEFAULT> +</ARG> + +<ARG> +<NAME>GstRTSPSrc::max-rtcp-rtp-time-diff</NAME> +<TYPE>gint</TYPE> +<RANGE>>= G_MAXULONG</RANGE> +<FLAGS>rw</FLAGS> +<NICK>Max RTCP RTP Time Diff</NICK> +<BLURB>Maximum amount of time in ms that the RTP time in RTCP SRs is allowed to be ahead (-1 disabled).</BLURB> +<DEFAULT>1000</DEFAULT> </ARG> <ARG> @@ -3568,6 +3588,16 @@ <DEFAULT>NULL</DEFAULT> </ARG> +<ARG> +<NAME>GstSoupHTTPSrc::tls-interaction</NAME> +<TYPE>GTlsInteraction*</TYPE> +<RANGE></RANGE> +<FLAGS>rw</FLAGS> +<NICK>TLS interaction</NICK> +<BLURB>A GTlsInteraction object to be used when the connection or certificate database need to interact with the user.</BLURB> +<DEFAULT></DEFAULT> +</ARG> + <ARG> <NAME>GstRTPDVPay::mode</NAME> <TYPE>GstDVPayMode</TYPE> @@ -3590,11 +3620,11 @@ <ARG> <NAME>GstRtpH264Pay::config-interval</NAME> -<TYPE>guint</TYPE> -<RANGE><= 3600</RANGE> +<TYPE>gint</TYPE> +<RANGE>[G_MAXULONG,3600]</RANGE> <FLAGS>rw</FLAGS> <NICK>SPS PPS Send Interval</NICK> -<BLURB>Send SPS and PPS Insertion Interval in seconds (sprop parameter sets will be multiplexed in the data stream when detected.) (0 = disabled).</BLURB> +<BLURB>Send SPS and PPS Insertion Interval in seconds (sprop parameter sets will be multiplexed in the data stream when detected.) (0 = disabled, -1 = send with every IDR frame).</BLURB> <DEFAULT>0</DEFAULT> </ARG> @@ -20448,6 +20478,46 @@ <DEFAULT>NTP time based on realtime clock</DEFAULT> </ARG> +<ARG> +<NAME>GstRtpBin::max-dropout-time</NAME> +<TYPE>guint</TYPE> +<RANGE></RANGE> +<FLAGS>rw</FLAGS> +<NICK>Max dropout time</NICK> +<BLURB>The maximum time (milliseconds) of missing packets tolerated.</BLURB> +<DEFAULT>60000</DEFAULT> +</ARG> + +<ARG> +<NAME>GstRtpBin::max-misorder-time</NAME> +<TYPE>guint</TYPE> +<RANGE></RANGE> +<FLAGS>rw</FLAGS> +<NICK>Max misorder time</NICK> +<BLURB>The maximum time (milliseconds) of misordered packets tolerated.</BLURB> +<DEFAULT>2000</DEFAULT> +</ARG> + +<ARG> +<NAME>GstRtpBin::max-rtcp-rtp-time-diff</NAME> +<TYPE>gint</TYPE> +<RANGE>>= G_MAXULONG</RANGE> +<FLAGS>rw</FLAGS> +<NICK>Max RTCP RTP Time Diff</NICK> +<BLURB>Maximum amount of time in ms that the RTP time in RTCP SRs is allowed to be ahead (-1 disabled).</BLURB> +<DEFAULT>1000</DEFAULT> +</ARG> + +<ARG> +<NAME>GstRtpBin::rtcp-sync-send-time</NAME> +<TYPE>gboolean</TYPE> +<RANGE></RANGE> +<FLAGS>rw</FLAGS> +<NICK>RTCP Sync Send Time</NICK> +<BLURB>Use send time or capture time for RTCP sync (TRUE = send time, FALSE = capture time).</BLURB> +<DEFAULT>TRUE</DEFAULT> +</ARG> + <ARG> <NAME>GstRtpJitterBuffer::do-lost</NAME> <TYPE>gboolean</TYPE> @@ -20608,6 +20678,36 @@ <DEFAULT>TRUE</DEFAULT> </ARG> +<ARG> +<NAME>GstRtpJitterBuffer::max-dropout-time</NAME> +<TYPE>guint</TYPE> +<RANGE></RANGE> +<FLAGS>rw</FLAGS> +<NICK>Max dropout time</NICK> +<BLURB>The maximum time (milliseconds) of missing packets tolerated.</BLURB> +<DEFAULT>60000</DEFAULT> +</ARG> + +<ARG> +<NAME>GstRtpJitterBuffer::max-misorder-time</NAME> +<TYPE>guint</TYPE> +<RANGE></RANGE> +<FLAGS>rw</FLAGS> +<NICK>Max misorder time</NICK> +<BLURB>The maximum time (milliseconds) of misordered packets tolerated.</BLURB> +<DEFAULT>2000</DEFAULT> +</ARG> + +<ARG> +<NAME>GstRtpJitterBuffer::max-rtcp-rtp-time-diff</NAME> +<TYPE>gint</TYPE> +<RANGE>>= G_MAXULONG</RANGE> +<FLAGS>rw</FLAGS> +<NICK>Max RTCP RTP Time Diff</NICK> +<BLURB>Maximum amount of time in ms that the RTP time in RTCP SRs is allowed to be ahead (-1 disabled).</BLURB> +<DEFAULT>1000</DEFAULT> +</ARG> + <ARG> <NAME>GstRtpSession::bandwidth</NAME> <TYPE>gdouble</TYPE> @@ -20748,6 +20848,36 @@ <DEFAULT>NTP time based on realtime clock</DEFAULT> </ARG> +<ARG> +<NAME>GstRtpSession::max-dropout-time</NAME> +<TYPE>guint</TYPE> +<RANGE></RANGE> +<FLAGS>rw</FLAGS> +<NICK>Max dropout time</NICK> +<BLURB>The maximum time (milliseconds) of missing packets tolerated.</BLURB> +<DEFAULT>60000</DEFAULT> +</ARG> + +<ARG> +<NAME>GstRtpSession::max-misorder-time</NAME> +<TYPE>guint</TYPE> +<RANGE></RANGE> +<FLAGS>rw</FLAGS> +<NICK>Max misorder time</NICK> +<BLURB>The maximum time (milliseconds) of misordered packets tolerated.</BLURB> +<DEFAULT>2000</DEFAULT> +</ARG> + +<ARG> +<NAME>GstRtpSession::rtcp-sync-send-time</NAME> +<TYPE>gboolean</TYPE> +<RANGE></RANGE> +<FLAGS>rw</FLAGS> +<NICK>RTCP Sync Send Time</NICK> +<BLURB>Use send time or capture time for RTCP sync (TRUE = send time, FALSE = capture time).</BLURB> +<DEFAULT>TRUE</DEFAULT> +</ARG> + <ARG> <NAME>GstRtpRtxSend::max-size-time</NAME> <TYPE>guint</TYPE> @@ -22168,6 +22298,26 @@ <DEFAULT>SOUP_LOGGER_LOG_NONE</DEFAULT> </ARG> +<ARG> +<NAME>GstSoupHttpClientSink::retries</NAME> +<TYPE>gint</TYPE> +<RANGE>>= G_MAXULONG</RANGE> +<FLAGS>rw</FLAGS> +<NICK>Retries</NICK> +<BLURB>Maximum number of retries, zero to disable, -1 to retry forever.</BLURB> +<DEFAULT>0</DEFAULT> +</ARG> + +<ARG> +<NAME>GstSoupHttpClientSink::retry-delay</NAME> +<TYPE>gint</TYPE> +<RANGE>>= 1</RANGE> +<FLAGS>rw</FLAGS> +<NICK>Retry Delay</NICK> +<BLURB>Delay in seconds between retries after a failure.</BLURB> +<DEFAULT>5</DEFAULT> +</ARG> + <ARG> <NAME>GstWavParse::ignore-length</NAME> <TYPE>gboolean</TYPE> @@ -22854,7 +23004,7 @@ <RANGE></RANGE> <FLAGS>rw</FLAGS> <NICK>SSRC</NICK> -<BLURB>The SSRC of the packets (-1 == random).</BLURB> +<BLURB>The SSRC of the packets (default == random).</BLURB> <DEFAULT>4294967295</DEFAULT> </ARG> diff --git a/docs/plugins/gst-plugins-good-plugins.hierarchy b/docs/plugins/gst-plugins-good-plugins.hierarchy index 7f4bd0fe42b289400f42b8e7f757f1d514fd5a25..a472847918114526c3323330e582e8b79c5bdbf2 100644 --- a/docs/plugins/gst-plugins-good-plugins.hierarchy +++ b/docs/plugins/gst-plugins-good-plugins.hierarchy @@ -33,9 +33,8 @@ GObject GstMuLawEnc GstSpeexEnc GstWavpackEnc - GstAudioVisualizer-ExtGoom + GstAudioVisualizer-BaseExtLibvisual GstGoom - GstAudioVisualizer-ExtGoom2k1 GstGoom2k1 GstAviDemux GstAviMux @@ -288,13 +287,15 @@ GObject GstVideoDecoder GstJpegDec GstPngDec - GstVP8Dec - GstVP9Dec + GstVPXDec + GstVP8Dec + GstVP9Dec GstVideoEncoder GstJpegEnc GstPngEnc - GstVP8Enc - GstVP9Enc + GstVPXEnc + GstVP8Enc + GstVP9Enc GstY4mEncode GstVideoMixer2 GstWavEnc @@ -307,6 +308,7 @@ GObject GstPluginFeature GstDeviceProviderFactory GstElementFactory + GstTracerFactory GstTypeFindFactory GstRegistry GstTask @@ -314,8 +316,6 @@ GObject GSocket GTlsDatabase GTlsInteraction - GUdevClient - GUdevDevice GdkPixbuf GstColorBalanceChannel GstTunerChannel diff --git a/docs/plugins/gst-plugins-good-plugins.interfaces b/docs/plugins/gst-plugins-good-plugins.interfaces index fc7edd0ebe06e5becd4af9b0bee2da0bcb467c1b..768122738164cac6f956931662c4821515a91c82 100644 --- a/docs/plugins/gst-plugins-good-plugins.interfaces +++ b/docs/plugins/gst-plugins-good-plugins.interfaces @@ -89,6 +89,7 @@ GstV4l2Src GstURIHandler GstImplementsInterface GstTuner GstColorBalance GstVide GstV4l2Src GstURIHandler GstTuner GstColorBalance GstVideoOrientation GstVP8Enc GstPreset GstTagSetter GstVP9Enc GstPreset GstTagSetter +GstVPXEnc GstPreset GstTagSetter GstVideoBalance GstColorBalance GstVideoBalance GstImplementsInterface GstColorBalance GstVideoEncoder GstPreset diff --git a/docs/plugins/gst-plugins-good-plugins.signals b/docs/plugins/gst-plugins-good-plugins.signals index ea2a04ba0060869f154bb4e612bcce3cf2096507..169f54e69b6f6888bdd1c84c10153e75997f86a3 100644 --- a/docs/plugins/gst-plugins-good-plugins.signals +++ b/docs/plugins/gst-plugins-good-plugins.signals @@ -348,6 +348,24 @@ GstRtpBin *gstrtpbin guint arg1 </SIGNAL> +<SIGNAL> +<NAME>GstRtpBin::on-new-sender-ssrc</NAME> +<RETURNS>void</RETURNS> +<FLAGS>l</FLAGS> +GstRtpBin *gstrtpbin +guint arg1 +guint arg2 +</SIGNAL> + +<SIGNAL> +<NAME>GstRtpBin::on-sender-ssrc-active</NAME> +<RETURNS>void</RETURNS> +<FLAGS>l</FLAGS> +GstRtpBin *gstrtpbin +guint arg1 +guint arg2 +</SIGNAL> + <SIGNAL> <NAME>GstRtpJitterBuffer::clear-pt-map</NAME> <RETURNS>void</RETURNS> @@ -506,6 +524,22 @@ GstRtpSession *gstrtpsession guint arg1 </SIGNAL> +<SIGNAL> +<NAME>GstRtpSession::on-new-sender-ssrc</NAME> +<RETURNS>void</RETURNS> +<FLAGS>l</FLAGS> +GstRtpSession *gstrtpsession +guint arg1 +</SIGNAL> + +<SIGNAL> +<NAME>GstRtpSession::on-sender-ssrc-active</NAME> +<RETURNS>void</RETURNS> +<FLAGS>l</FLAGS> +GstRtpSession *gstrtpsession +guint arg1 +</SIGNAL> + <SIGNAL> <NAME>GstRtpSsrcDemux::clear-ssrc</NAME> <RETURNS>void</RETURNS> diff --git a/docs/plugins/html/gst-plugins-good-plugins-1.0.devhelp2 b/docs/plugins/html/gst-plugins-good-plugins-1.0.devhelp2 index 47170715879377bdc11943f32272c889807037b3..9a4f0752c3bdffef157da303c163944aba61fdd6 100644 --- a/docs/plugins/html/gst-plugins-good-plugins-1.0.devhelp2 +++ b/docs/plugins/html/gst-plugins-good-plugins-1.0.devhelp2 @@ -753,6 +753,10 @@ <keyword type="property" name="The “do-retransmission†property" link="gst-plugins-good-plugins-rtpbin.html#GstRtpBin--do-retransmission"/> <keyword type="property" name="The “rtp-profile†property" link="gst-plugins-good-plugins-rtpbin.html#GstRtpBin--rtp-profile"/> <keyword type="property" name="The “ntp-time-source†property" link="gst-plugins-good-plugins-rtpbin.html#GstRtpBin--ntp-time-source"/> + <keyword type="property" name="The “max-dropout-time†property" link="gst-plugins-good-plugins-rtpbin.html#GstRtpBin--max-dropout-time"/> + <keyword type="property" name="The “max-misorder-time†property" link="gst-plugins-good-plugins-rtpbin.html#GstRtpBin--max-misorder-time"/> + <keyword type="property" name="The “max-rtcp-rtp-time-diff†property" link="gst-plugins-good-plugins-rtpbin.html#GstRtpBin--max-rtcp-rtp-time-diff"/> + <keyword type="property" name="The “rtcp-sync-send-time†property" link="gst-plugins-good-plugins-rtpbin.html#GstRtpBin--rtcp-sync-send-time"/> <keyword type="signal" name="The “clear-pt-map†signal" link="gst-plugins-good-plugins-rtpbin.html#GstRtpBin-clear-pt-map"/> <keyword type="signal" name="The “get-internal-session†signal" link="gst-plugins-good-plugins-rtpbin.html#GstRtpBin-get-internal-session"/> <keyword type="signal" name="The “on-bye-ssrc†signal" link="gst-plugins-good-plugins-rtpbin.html#GstRtpBin-on-bye-ssrc"/> @@ -775,6 +779,8 @@ <keyword type="signal" name="The “request-rtcp-encoder†signal" link="gst-plugins-good-plugins-rtpbin.html#GstRtpBin-request-rtcp-encoder"/> <keyword type="signal" name="The “request-rtp-decoder†signal" link="gst-plugins-good-plugins-rtpbin.html#GstRtpBin-request-rtp-decoder"/> <keyword type="signal" name="The “request-rtp-encoder†signal" link="gst-plugins-good-plugins-rtpbin.html#GstRtpBin-request-rtp-encoder"/> + <keyword type="signal" name="The “on-new-sender-ssrc†signal" link="gst-plugins-good-plugins-rtpbin.html#GstRtpBin-on-new-sender-ssrc"/> + <keyword type="signal" name="The “on-sender-ssrc-active†signal" link="gst-plugins-good-plugins-rtpbin.html#GstRtpBin-on-sender-ssrc-active"/> <keyword type="struct" name="struct GstRtpH261Depay" link="gst-plugins-good-plugins-rtph261depay.html#GstRtpH261Depay-struct"/> <keyword type="struct" name="struct GstRtpH261Pay" link="gst-plugins-good-plugins-rtph261pay.html#GstRtpH261Pay-struct"/> <keyword type="struct" name="struct GstRtpL16Depay" link="gst-plugins-good-plugins-rtpL16depay.html#GstRtpL16Depay-struct"/> @@ -820,6 +826,7 @@ <keyword type="property" name="The “tls-interaction†property" link="gst-plugins-good-plugins-rtspsrc.html#GstRTSPSrc--tls-interaction"/> <keyword type="property" name="The “ntp-time-source†property" link="gst-plugins-good-plugins-rtspsrc.html#GstRTSPSrc--ntp-time-source"/> <keyword type="property" name="The “user-agent†property" link="gst-plugins-good-plugins-rtspsrc.html#GstRTSPSrc--user-agent"/> + <keyword type="property" name="The “max-rtcp-rtp-time-diff†property" link="gst-plugins-good-plugins-rtspsrc.html#GstRTSPSrc--max-rtcp-rtp-time-diff"/> <keyword type="signal" name="The “handle-request†signal" link="gst-plugins-good-plugins-rtspsrc.html#GstRTSPSrc-handle-request"/> <keyword type="signal" name="The “on-sdp†signal" link="gst-plugins-good-plugins-rtspsrc.html#GstRTSPSrc-on-sdp"/> <keyword type="signal" name="The “select-stream†signal" link="gst-plugins-good-plugins-rtspsrc.html#GstRTSPSrc-select-stream"/> @@ -843,6 +850,10 @@ <keyword type="property" name="The “do-retransmission†property" link="gst-plugins-good-plugins-rtpbin.html#GstRtpBin--do-retransmission"/> <keyword type="property" name="The “rtp-profile†property" link="gst-plugins-good-plugins-rtpbin.html#GstRtpBin--rtp-profile"/> <keyword type="property" name="The “ntp-time-source†property" link="gst-plugins-good-plugins-rtpbin.html#GstRtpBin--ntp-time-source"/> + <keyword type="property" name="The “max-dropout-time†property" link="gst-plugins-good-plugins-rtpbin.html#GstRtpBin--max-dropout-time"/> + <keyword type="property" name="The “max-misorder-time†property" link="gst-plugins-good-plugins-rtpbin.html#GstRtpBin--max-misorder-time"/> + <keyword type="property" name="The “max-rtcp-rtp-time-diff†property" link="gst-plugins-good-plugins-rtpbin.html#GstRtpBin--max-rtcp-rtp-time-diff"/> + <keyword type="property" name="The “rtcp-sync-send-time†property" link="gst-plugins-good-plugins-rtpbin.html#GstRtpBin--rtcp-sync-send-time"/> <keyword type="signal" name="The “clear-pt-map†signal" link="gst-plugins-good-plugins-rtpbin.html#GstRtpBin-clear-pt-map"/> <keyword type="signal" name="The “get-internal-session†signal" link="gst-plugins-good-plugins-rtpbin.html#GstRtpBin-get-internal-session"/> <keyword type="signal" name="The “on-bye-ssrc†signal" link="gst-plugins-good-plugins-rtpbin.html#GstRtpBin-on-bye-ssrc"/> @@ -865,6 +876,8 @@ <keyword type="signal" name="The “request-rtcp-encoder†signal" link="gst-plugins-good-plugins-rtpbin.html#GstRtpBin-request-rtcp-encoder"/> <keyword type="signal" name="The “request-rtp-decoder†signal" link="gst-plugins-good-plugins-rtpbin.html#GstRtpBin-request-rtp-decoder"/> <keyword type="signal" name="The “request-rtp-encoder†signal" link="gst-plugins-good-plugins-rtpbin.html#GstRtpBin-request-rtp-encoder"/> + <keyword type="signal" name="The “on-new-sender-ssrc†signal" link="gst-plugins-good-plugins-rtpbin.html#GstRtpBin-on-new-sender-ssrc"/> + <keyword type="signal" name="The “on-sender-ssrc-active†signal" link="gst-plugins-good-plugins-rtpbin.html#GstRtpBin-on-sender-ssrc-active"/> <keyword type="struct" name="struct GstRTPDec" link="gst-plugins-good-plugins-rtpdec.html#GstRTPDec-struct"/> <keyword type="property" name="The “latency†property" link="gst-plugins-good-plugins-rtpdec.html#GstRTPDec--latency"/> <keyword type="signal" name="The “clear-pt-map†signal" link="gst-plugins-good-plugins-rtpdec.html#GstRTPDec-clear-pt-map"/> @@ -906,6 +919,9 @@ <keyword type="property" name="The “rtx-min-retry-timeout†property" link="gst-plugins-good-plugins-rtpjitterbuffer.html#GstRtpJitterBuffer--rtx-min-retry-timeout"/> <keyword type="property" name="The “rtx-max-retries†property" link="gst-plugins-good-plugins-rtpjitterbuffer.html#GstRtpJitterBuffer--rtx-max-retries"/> <keyword type="property" name="The “rtx-next-seqnum†property" link="gst-plugins-good-plugins-rtpjitterbuffer.html#GstRtpJitterBuffer--rtx-next-seqnum"/> + <keyword type="property" name="The “max-dropout-time†property" link="gst-plugins-good-plugins-rtpjitterbuffer.html#GstRtpJitterBuffer--max-dropout-time"/> + <keyword type="property" name="The “max-misorder-time†property" link="gst-plugins-good-plugins-rtpjitterbuffer.html#GstRtpJitterBuffer--max-misorder-time"/> + <keyword type="property" name="The “max-rtcp-rtp-time-diff†property" link="gst-plugins-good-plugins-rtpjitterbuffer.html#GstRtpJitterBuffer--max-rtcp-rtp-time-diff"/> <keyword type="signal" name="The “clear-pt-map†signal" link="gst-plugins-good-plugins-rtpjitterbuffer.html#GstRtpJitterBuffer-clear-pt-map"/> <keyword type="signal" name="The “handle-sync†signal" link="gst-plugins-good-plugins-rtpjitterbuffer.html#GstRtpJitterBuffer-handle-sync"/> <keyword type="signal" name="The “on-npt-stop†signal" link="gst-plugins-good-plugins-rtpjitterbuffer.html#GstRtpJitterBuffer-on-npt-stop"/> @@ -957,6 +973,9 @@ <keyword type="property" name="The “stats†property" link="gst-plugins-good-plugins-rtpsession.html#GstRtpSession--stats"/> <keyword type="property" name="The “rtp-profile†property" link="gst-plugins-good-plugins-rtpsession.html#GstRtpSession--rtp-profile"/> <keyword type="property" name="The “ntp-time-source†property" link="gst-plugins-good-plugins-rtpsession.html#GstRtpSession--ntp-time-source"/> + <keyword type="property" name="The “max-dropout-time†property" link="gst-plugins-good-plugins-rtpsession.html#GstRtpSession--max-dropout-time"/> + <keyword type="property" name="The “max-misorder-time†property" link="gst-plugins-good-plugins-rtpsession.html#GstRtpSession--max-misorder-time"/> + <keyword type="property" name="The “rtcp-sync-send-time†property" link="gst-plugins-good-plugins-rtpsession.html#GstRtpSession--rtcp-sync-send-time"/> <keyword type="signal" name="The “clear-pt-map†signal" link="gst-plugins-good-plugins-rtpsession.html#GstRtpSession-clear-pt-map"/> <keyword type="signal" name="The “on-bye-ssrc†signal" link="gst-plugins-good-plugins-rtpsession.html#GstRtpSession-on-bye-ssrc"/> <keyword type="signal" name="The “on-bye-timeout†signal" link="gst-plugins-good-plugins-rtpsession.html#GstRtpSession-on-bye-timeout"/> @@ -968,6 +987,8 @@ <keyword type="signal" name="The “on-ssrc-validated†signal" link="gst-plugins-good-plugins-rtpsession.html#GstRtpSession-on-ssrc-validated"/> <keyword type="signal" name="The “on-timeout†signal" link="gst-plugins-good-plugins-rtpsession.html#GstRtpSession-on-timeout"/> <keyword type="signal" name="The “request-pt-map†signal" link="gst-plugins-good-plugins-rtpsession.html#GstRtpSession-request-pt-map"/> + <keyword type="signal" name="The “on-new-sender-ssrc†signal" link="gst-plugins-good-plugins-rtpsession.html#GstRtpSession-on-new-sender-ssrc"/> + <keyword type="signal" name="The “on-sender-ssrc-active†signal" link="gst-plugins-good-plugins-rtpsession.html#GstRtpSession-on-sender-ssrc-active"/> <keyword type="struct" name="struct GstRtpSsrcDemux" link="gst-plugins-good-plugins-rtpssrcdemux.html#GstRtpSsrcDemux-struct"/> <keyword type="signal" name="The “clear-ssrc†signal" link="gst-plugins-good-plugins-rtpssrcdemux.html#GstRtpSsrcDemux-clear-ssrc"/> <keyword type="signal" name="The “new-ssrc-pad†signal" link="gst-plugins-good-plugins-rtpssrcdemux.html#GstRtpSsrcDemux-new-ssrc-pad"/> @@ -1007,6 +1028,7 @@ <keyword type="property" name="The “tls-interaction†property" link="gst-plugins-good-plugins-rtspsrc.html#GstRTSPSrc--tls-interaction"/> <keyword type="property" name="The “ntp-time-source†property" link="gst-plugins-good-plugins-rtspsrc.html#GstRTSPSrc--ntp-time-source"/> <keyword type="property" name="The “user-agent†property" link="gst-plugins-good-plugins-rtspsrc.html#GstRTSPSrc--user-agent"/> + <keyword type="property" name="The “max-rtcp-rtp-time-diff†property" link="gst-plugins-good-plugins-rtspsrc.html#GstRTSPSrc--max-rtcp-rtp-time-diff"/> <keyword type="signal" name="The “handle-request†signal" link="gst-plugins-good-plugins-rtspsrc.html#GstRTSPSrc-handle-request"/> <keyword type="signal" name="The “on-sdp†signal" link="gst-plugins-good-plugins-rtspsrc.html#GstRTSPSrc-on-sdp"/> <keyword type="signal" name="The “select-stream†signal" link="gst-plugins-good-plugins-rtspsrc.html#GstRTSPSrc-select-stream"/> @@ -1072,6 +1094,7 @@ <keyword type="property" name="The “ssl-use-system-ca-file†property" link="gst-plugins-good-plugins-souphttpsrc.html#GstSoupHTTPSrc--ssl-use-system-ca-file"/> <keyword type="property" name="The “tls-database†property" link="gst-plugins-good-plugins-souphttpsrc.html#GstSoupHTTPSrc--tls-database"/> <keyword type="property" name="The “method†property" link="gst-plugins-good-plugins-souphttpsrc.html#GstSoupHTTPSrc--method"/> + <keyword type="property" name="The “tls-interaction†property" link="gst-plugins-good-plugins-souphttpsrc.html#GstSoupHTTPSrc--tls-interaction"/> <keyword type="struct" name="struct GstSpectrum" link="gst-plugins-good-plugins-spectrum.html#GstSpectrum-struct"/> <keyword type="property" name="The “bands†property" link="gst-plugins-good-plugins-spectrum.html#GstSpectrum--bands"/> <keyword type="property" name="The “interval†property" link="gst-plugins-good-plugins-spectrum.html#GstSpectrum--interval"/> @@ -1127,6 +1150,7 @@ <keyword type="property" name="The “socket†property" link="gst-plugins-good-plugins-udpsrc.html#GstUDPSrc--socket"/> <keyword type="property" name="The “used-socket†property" link="gst-plugins-good-plugins-udpsrc.html#GstUDPSrc--used-socket"/> <keyword type="property" name="The “address†property" link="gst-plugins-good-plugins-udpsrc.html#GstUDPSrc--address"/> + <keyword type="property" name="The “loop†property" link="gst-plugins-good-plugins-udpsrc.html#GstUDPSrc--loop"/> <keyword type="struct" name="struct GstV4l2Radio" link="gst-plugins-good-plugins-v4l2radio.html#GstV4l2Radio-struct"/> <keyword type="property" name="The “device†property" link="gst-plugins-good-plugins-v4l2radio.html#GstV4l2Radio--device"/> <keyword type="property" name="The “frequency†property" link="gst-plugins-good-plugins-v4l2radio.html#GstV4l2Radio--frequency"/> diff --git a/docs/plugins/html/gst-plugins-good-plugins-audiochebband.html b/docs/plugins/html/gst-plugins-good-plugins-audiochebband.html index 834cfda6d41d4862286be7f575f5f93ac39535f9..0628e325e5dab49da7d70b52818ea225360e9b51 100644 --- a/docs/plugins/html/gst-plugins-good-plugins-audiochebband.html +++ b/docs/plugins/html/gst-plugins-good-plugins-audiochebband.html @@ -126,7 +126,7 @@ a cutoff frequency at a quarter of the sampling rate. <td class="listing_lines" align="right"><pre>1 2 3</pre></td> - <td class="listing_code"><pre class="programlisting">gst<span class="gtkdoc opt">-</span>launch<span class="gtkdoc opt">-</span><span class="number">1.0</span> audiotestsrc freq<span class="gtkdoc opt">=</span><span class="number">1500</span> <span class="gtkdoc opt">!</span> audioconvert <span class="gtkdoc opt">!</span> audiochebband mode<span class="gtkdoc opt">=</span>band<span class="gtkdoc opt">-</span>pass lower<span class="gtkdoc opt">-</span>frequency<span class="gtkdoc opt">=</span><span class="number">1000</span> upper<span class="gtkdoc opt">-</span>frequenc<span class="gtkdoc opt">=</span><span class="number">6000</span> poles<span class="gtkdoc opt">=</span><span class="number">4</span> <span class="gtkdoc opt">!</span> audioconvert <span class="gtkdoc opt">!</span> alsasink + <td class="listing_code"><pre class="programlisting">gst<span class="gtkdoc opt">-</span>launch<span class="gtkdoc opt">-</span><span class="number">1.0</span> audiotestsrc freq<span class="gtkdoc opt">=</span><span class="number">1500</span> <span class="gtkdoc opt">!</span> audioconvert <span class="gtkdoc opt">!</span> audiochebband mode<span class="gtkdoc opt">=</span>band<span class="gtkdoc opt">-</span>pass lower<span class="gtkdoc opt">-</span>frequency<span class="gtkdoc opt">=</span><span class="number">1000</span> upper<span class="gtkdoc opt">-</span>frequency<span class="gtkdoc opt">=</span><span class="number">6000</span> poles<span class="gtkdoc opt">=</span><span class="number">4</span> <span class="gtkdoc opt">!</span> audioconvert <span class="gtkdoc opt">!</span> alsasink gst<span class="gtkdoc opt">-</span>launch<span class="gtkdoc opt">-</span><span class="number">1.0</span> filesrc location<span class="gtkdoc opt">=</span><span class="string">"melo1.ogg"</span> <span class="gtkdoc opt">!</span> oggdemux <span class="gtkdoc opt">!</span> vorbisdec <span class="gtkdoc opt">!</span> audioconvert <span class="gtkdoc opt">!</span> audiochebband mode<span class="gtkdoc opt">=</span>band<span class="gtkdoc opt">-</span>reject lower<span class="gtkdoc opt">-</span>frequency<span class="gtkdoc opt">=</span><span class="number">1000</span> upper<span class="gtkdoc opt">-</span>frequency<span class="gtkdoc opt">=</span><span class="number">4000</span> ripple<span class="gtkdoc opt">=</span><span class="number">0.2</span> <span class="gtkdoc opt">!</span> audioconvert <span class="gtkdoc opt">!</span> alsasink gst<span class="gtkdoc opt">-</span>launch<span class="gtkdoc opt">-</span><span class="number">1.0</span> audiotestsrc wave<span class="gtkdoc opt">=</span>white<span class="gtkdoc opt">-</span>noise <span class="gtkdoc opt">!</span> audioconvert <span class="gtkdoc opt">!</span> audiochebband mode<span class="gtkdoc opt">=</span>band<span class="gtkdoc opt">-</span>pass lower<span class="gtkdoc opt">-</span>frequency<span class="gtkdoc opt">=</span><span class="number">1000</span> upper<span class="gtkdoc opt">-</span>frequency<span class="gtkdoc opt">=</span><span class="number">4000</span> type<span class="gtkdoc opt">=</span><span class="number">2</span> <span class="gtkdoc opt">!</span> audioconvert <span class="gtkdoc opt">!</span> alsasink</pre></td> </tr> diff --git a/docs/plugins/html/gst-plugins-good-plugins-avidemux.html b/docs/plugins/html/gst-plugins-good-plugins-avidemux.html index 46c94cab083b908c85410b3d245ca8ff2bf63923..d1de2a660136ce69148953f396592edc6681b35a 100644 --- a/docs/plugins/html/gst-plugins-good-plugins-avidemux.html +++ b/docs/plugins/html/gst-plugins-good-plugins-avidemux.html @@ -558,10 +558,6 @@ right decoder elements/plugins installed. </tr> <tr> <td><p><span class="term"></span></p></td> -<td> video/x-raw, format=(string)YVU9, framerate=(fraction)[ 0/1, 2147483647/1 ], width=(int)[ 1, 2147483647 ], height=(int)[ 1, 2147483647 ]</td> -</tr> -<tr> -<td><p><span class="term"></span></p></td> <td> video/x-zlib, framerate=(fraction)[ 0/1, 2147483647/1 ], width=(int)[ 1, 2147483647 ], height=(int)[ 1, 2147483647 ]</td> </tr> <tr> diff --git a/docs/plugins/html/gst-plugins-good-plugins-gdkpixbufsink.html b/docs/plugins/html/gst-plugins-good-plugins-gdkpixbufsink.html index 98293509053a2ca69c54e522a2a4183138592584..bc5d21002d1dc4a541bed99cbb4c696c4d22ff28 100644 --- a/docs/plugins/html/gst-plugins-good-plugins-gdkpixbufsink.html +++ b/docs/plugins/html/gst-plugins-good-plugins-gdkpixbufsink.html @@ -44,7 +44,7 @@ <tbody> <tr> <td class="property_type"> -<span class="type">GdkPixbuf</span> *</td> +<a href="http://library.gnome.org/devel/gdk-pixbuf/unstable/gdk-pixbuf-The-GdkPixbuf-Structure.html#GdkPixbuf"><span class="type">GdkPixbuf</span></a> *</td> <td class="property_name"><a class="link" href="gst-plugins-good-plugins-gdkpixbufsink.html#GstGdkPixbufSink--last-pixbuf" title="The “last-pixbuf†property">last-pixbuf</a></td> <td class="property_flags">Read</td> </tr> @@ -158,7 +158,7 @@ <a name="gst-plugins-good-plugins-gdkpixbufsink.property-details"></a><h2>Property Details</h2> <div class="refsect2"> <a name="GstGdkPixbufSink--last-pixbuf"></a><h3>The <code class="literal">“last-pixbufâ€</code> property</h3> -<pre class="programlisting"> “last-pixbuf†<span class="type">GdkPixbuf</span> *</pre> +<pre class="programlisting"> “last-pixbuf†<a href="http://library.gnome.org/devel/gdk-pixbuf/unstable/gdk-pixbuf-The-GdkPixbuf-Structure.html#GdkPixbuf"><span class="type">GdkPixbuf</span></a> *</pre> <p>Last GdkPixbuf object rendered.</p> <p>Flags: Read</p> </div> diff --git a/docs/plugins/html/gst-plugins-good-plugins-goom.html b/docs/plugins/html/gst-plugins-good-plugins-goom.html index d0a2bc6364d0ffcd906fa8b8e43dcae53b11799c..2b21cdc4a8dd2b0a491a8495c6942caf899572c7 100644 --- a/docs/plugins/html/gst-plugins-good-plugins-goom.html +++ b/docs/plugins/html/gst-plugins-good-plugins-goom.html @@ -51,7 +51,7 @@ <span class="lineart">╰──</span> <a href="https://developer.gnome.org/gobject/unstable/gobject-The-Base-Object-Type.html#GInitiallyUnowned">GInitiallyUnowned</a> <span class="lineart">╰──</span> <a href="http://gstreamer.freedesktop.org/data/doc/gstreamer/head/gstreamer/html/GstObject.html">GstObject</a> <span class="lineart">╰──</span> <a href="http://gstreamer.freedesktop.org/data/doc/gstreamer/head/gstreamer/html/GstElement.html">GstElement</a> - <span class="lineart">╰──</span> GstAudioVisualizer-ExtGoom + <span class="lineart">╰──</span> GstAudioVisualizer-BaseExtLibvisual <span class="lineart">╰──</span> GstGoom </pre> </div> diff --git a/docs/plugins/html/gst-plugins-good-plugins-goom2k1.html b/docs/plugins/html/gst-plugins-good-plugins-goom2k1.html index a3e04c57afaed374340b4c8d1936ad75ab746106..8acd41b7d56f52bc334c2a971d6886d42aa90744 100644 --- a/docs/plugins/html/gst-plugins-good-plugins-goom2k1.html +++ b/docs/plugins/html/gst-plugins-good-plugins-goom2k1.html @@ -51,7 +51,7 @@ <span class="lineart">╰──</span> <a href="https://developer.gnome.org/gobject/unstable/gobject-The-Base-Object-Type.html#GInitiallyUnowned">GInitiallyUnowned</a> <span class="lineart">╰──</span> <a href="http://gstreamer.freedesktop.org/data/doc/gstreamer/head/gstreamer/html/GstObject.html">GstObject</a> <span class="lineart">╰──</span> <a href="http://gstreamer.freedesktop.org/data/doc/gstreamer/head/gstreamer/html/GstElement.html">GstElement</a> - <span class="lineart">╰──</span> GstAudioVisualizer-ExtGoom2k1 + <span class="lineart">╰──</span> GstAudioVisualizer-BaseExtLibvisual <span class="lineart">╰──</span> GstGoom2k1 </pre> </div> diff --git a/docs/plugins/html/gst-plugins-good-plugins-matroskamux.html b/docs/plugins/html/gst-plugins-good-plugins-matroskamux.html index ea874596e15fc5ad3d1d0131560df1b2c2ec24ff..ec47bbf6b95f64f02a3ab2ea871176e699f673c5 100644 --- a/docs/plugins/html/gst-plugins-good-plugins-matroskamux.html +++ b/docs/plugins/html/gst-plugins-good-plugins-matroskamux.html @@ -362,10 +362,18 @@ GstMatroskaMux implements </tr> <tr> <td><p><span class="term"></span></p></td> +<td> video/x-vp9, width=(int)[ 16, 4096 ], height=(int)[ 16, 4096 ]</td> +</tr> +<tr> +<td><p><span class="term"></span></p></td> <td> video/x-raw, format=(string){ YUY2, I420, YV12, UYVY, AYUV, GRAY8, BGR, RGB }, width=(int)[ 16, 4096 ], height=(int)[ 16, 4096 ]</td> </tr> <tr> <td><p><span class="term"></span></p></td> +<td> video/x-prores, width=(int)[ 16, 4096 ], height=(int)[ 16, 4096 ]</td> +</tr> +<tr> +<td><p><span class="term"></span></p></td> <td> video/x-wmv, wmvversion=(int)[ 1, 3 ], width=(int)[ 16, 4096 ], height=(int)[ 16, 4096 ]</td> </tr> </tbody> diff --git a/docs/plugins/html/gst-plugins-good-plugins-mj2mux.html b/docs/plugins/html/gst-plugins-good-plugins-mj2mux.html index 4d4b3b01fb1e7759fc24024a82e011f9489550d9..5e885fcc7f27c71cccc1d380e577b3adba533981 100644 --- a/docs/plugins/html/gst-plugins-good-plugins-mj2mux.html +++ b/docs/plugins/html/gst-plugins-good-plugins-mj2mux.html @@ -237,11 +237,7 @@ and muxes it into an mj2 file. </tr> <tr> <td><p><span class="term">details</span></p></td> -<td>audio/x-raw, format=(string){ S8, U8 }, layout=(string)interleaved, channels=(int)[ 1, 2 ], rate=(int)[ 1, 2147483647 ]</td> -</tr> -<tr> -<td><p><span class="term"></span></p></td> -<td> audio/x-raw, format=(string){ S16LE, S16BE }, layout=(string)interleaved, channels=(int)[ 1, 2 ], rate=(int)[ 1, 2147483647 ]</td> +<td>audio/x-raw, format=(string){ S16LE, S16BE, S8, U8 }, layout=(string)interleaved, channels=(int)[ 1, 2 ], rate=(int)[ 1, 2147483647 ]</td> </tr> </tbody> </table></div> diff --git a/docs/plugins/html/gst-plugins-good-plugins-mp4mux.html b/docs/plugins/html/gst-plugins-good-plugins-mp4mux.html index e00baa9932e67c55c3f6247370a508613b1c4ece..74258bc46ba38a7531de9cfe53ba4ec27b1d981b 100644 --- a/docs/plugins/html/gst-plugins-good-plugins-mp4mux.html +++ b/docs/plugins/html/gst-plugins-good-plugins-mp4mux.html @@ -250,6 +250,10 @@ and muxes it into an mp4 file. <td><p><span class="term"></span></p></td> <td> audio/x-alac, channels=(int)[ 1, 2 ], rate=(int)[ 1, 2147483647 ]</td> </tr> +<tr> +<td><p><span class="term"></span></p></td> +<td> audio/x-opus, channel-mapping-family=(int)[ 0, 255 ], channels=(int)[ 1, 8 ], rate=(int)[ 1, 2147483647 ]</td> +</tr> </tbody> </table></div> <div class="variablelist"><table border="0" class="variablelist"> diff --git a/docs/plugins/html/gst-plugins-good-plugins-plugin-1394.html b/docs/plugins/html/gst-plugins-good-plugins-plugin-1394.html index 13ade60c5f506aa4040ae1d4f2010654e8940843..5d2a61f67c76a6706b3c7dcdf4181aa25dfefc46 100644 --- a/docs/plugins/html/gst-plugins-good-plugins-plugin-1394.html +++ b/docs/plugins/html/gst-plugins-good-plugins-plugin-1394.html @@ -42,7 +42,7 @@ </tr> <tr> <td><p><span class="term">version</span></p></td> -<td>1.6.2</td> +<td>1.7.1</td> </tr> <tr> <td><p><span class="term">run-time license</span></p></td> diff --git a/docs/plugins/html/gst-plugins-good-plugins-plugin-aasink.html b/docs/plugins/html/gst-plugins-good-plugins-plugin-aasink.html index 41744c6f057fa64b169184e9bcfd7fde44f6d2dd..8a67b6fdc17e99e4bffb45d7d3ae4b1f521c08d0 100644 --- a/docs/plugins/html/gst-plugins-good-plugins-plugin-aasink.html +++ b/docs/plugins/html/gst-plugins-good-plugins-plugin-aasink.html @@ -42,7 +42,7 @@ </tr> <tr> <td><p><span class="term">version</span></p></td> -<td>1.6.2</td> +<td>1.7.1</td> </tr> <tr> <td><p><span class="term">run-time license</span></p></td> diff --git a/docs/plugins/html/gst-plugins-good-plugins-plugin-alaw.html b/docs/plugins/html/gst-plugins-good-plugins-plugin-alaw.html index 53599545135a34ae50f8b6941b75408e9158d6f6..7c0d8e302c6832afd80338045bee00fec25a5110 100644 --- a/docs/plugins/html/gst-plugins-good-plugins-plugin-alaw.html +++ b/docs/plugins/html/gst-plugins-good-plugins-plugin-alaw.html @@ -42,7 +42,7 @@ </tr> <tr> <td><p><span class="term">version</span></p></td> -<td>1.6.2</td> +<td>1.7.1</td> </tr> <tr> <td><p><span class="term">run-time license</span></p></td> diff --git a/docs/plugins/html/gst-plugins-good-plugins-plugin-alpha.html b/docs/plugins/html/gst-plugins-good-plugins-plugin-alpha.html index 806bcb86c735a1c80ca4a1e54241cf336c3a2f7c..af48d0da0f0376b9af53b24c8cc001ac445ce126 100644 --- a/docs/plugins/html/gst-plugins-good-plugins-plugin-alpha.html +++ b/docs/plugins/html/gst-plugins-good-plugins-plugin-alpha.html @@ -42,7 +42,7 @@ </tr> <tr> <td><p><span class="term">version</span></p></td> -<td>1.6.2</td> +<td>1.7.1</td> </tr> <tr> <td><p><span class="term">run-time license</span></p></td> diff --git a/docs/plugins/html/gst-plugins-good-plugins-plugin-alphacolor.html b/docs/plugins/html/gst-plugins-good-plugins-plugin-alphacolor.html index bc19ec538d98ba96efa673c7798a8d4f408f5e04..a200714edcf6349e3d96154cd1c77a4c0098c9f9 100644 --- a/docs/plugins/html/gst-plugins-good-plugins-plugin-alphacolor.html +++ b/docs/plugins/html/gst-plugins-good-plugins-plugin-alphacolor.html @@ -42,7 +42,7 @@ </tr> <tr> <td><p><span class="term">version</span></p></td> -<td>1.6.2</td> +<td>1.7.1</td> </tr> <tr> <td><p><span class="term">run-time license</span></p></td> diff --git a/docs/plugins/html/gst-plugins-good-plugins-plugin-apetag.html b/docs/plugins/html/gst-plugins-good-plugins-plugin-apetag.html index a604ca0d05286635058d43219152b5849e9d4a03..0d34fdd8bd7b4c1c2536068e1ae9561f77177887 100644 --- a/docs/plugins/html/gst-plugins-good-plugins-plugin-apetag.html +++ b/docs/plugins/html/gst-plugins-good-plugins-plugin-apetag.html @@ -42,7 +42,7 @@ </tr> <tr> <td><p><span class="term">version</span></p></td> -<td>1.6.2</td> +<td>1.7.1</td> </tr> <tr> <td><p><span class="term">run-time license</span></p></td> diff --git a/docs/plugins/html/gst-plugins-good-plugins-plugin-audiofx.html b/docs/plugins/html/gst-plugins-good-plugins-plugin-audiofx.html index 10261546f5baa8a44e087f7e9f9a2c179c8eca85..cef51a3a6fcfd1cc932c52f2b24e15c686e2249b 100644 --- a/docs/plugins/html/gst-plugins-good-plugins-plugin-audiofx.html +++ b/docs/plugins/html/gst-plugins-good-plugins-plugin-audiofx.html @@ -42,7 +42,7 @@ </tr> <tr> <td><p><span class="term">version</span></p></td> -<td>1.6.2</td> +<td>1.7.1</td> </tr> <tr> <td><p><span class="term">run-time license</span></p></td> diff --git a/docs/plugins/html/gst-plugins-good-plugins-plugin-audioparsers.html b/docs/plugins/html/gst-plugins-good-plugins-plugin-audioparsers.html index 9e1d9b990720f3854a79d1f8e41c201e959f8e41..e38157468c4ad9516c32aefb5c286c55dced6bf7 100644 --- a/docs/plugins/html/gst-plugins-good-plugins-plugin-audioparsers.html +++ b/docs/plugins/html/gst-plugins-good-plugins-plugin-audioparsers.html @@ -42,7 +42,7 @@ </tr> <tr> <td><p><span class="term">version</span></p></td> -<td>1.6.2</td> +<td>1.7.1</td> </tr> <tr> <td><p><span class="term">run-time license</span></p></td> diff --git a/docs/plugins/html/gst-plugins-good-plugins-plugin-auparse.html b/docs/plugins/html/gst-plugins-good-plugins-plugin-auparse.html index 809eeaaf2be7c44da03e9b4b8870d4f1a3d5e07d..2f75ab2f3b68865e26dddaa11c4809e4bfe02152 100644 --- a/docs/plugins/html/gst-plugins-good-plugins-plugin-auparse.html +++ b/docs/plugins/html/gst-plugins-good-plugins-plugin-auparse.html @@ -42,7 +42,7 @@ </tr> <tr> <td><p><span class="term">version</span></p></td> -<td>1.6.2</td> +<td>1.7.1</td> </tr> <tr> <td><p><span class="term">run-time license</span></p></td> diff --git a/docs/plugins/html/gst-plugins-good-plugins-plugin-autodetect.html b/docs/plugins/html/gst-plugins-good-plugins-plugin-autodetect.html index 4f1bdb41dbbee466274b96e59e4b5bdb7dd4cfc1..2175954a5ed3c053a4669133abff16469c6e2517 100644 --- a/docs/plugins/html/gst-plugins-good-plugins-plugin-autodetect.html +++ b/docs/plugins/html/gst-plugins-good-plugins-plugin-autodetect.html @@ -42,7 +42,7 @@ </tr> <tr> <td><p><span class="term">version</span></p></td> -<td>1.6.2</td> +<td>1.7.1</td> </tr> <tr> <td><p><span class="term">run-time license</span></p></td> diff --git a/docs/plugins/html/gst-plugins-good-plugins-plugin-avi.html b/docs/plugins/html/gst-plugins-good-plugins-plugin-avi.html index 51a8a9fa02f0022ba3e352dadb638e61bd798f8d..78342b16210bf01cab71698165633da37490a487 100644 --- a/docs/plugins/html/gst-plugins-good-plugins-plugin-avi.html +++ b/docs/plugins/html/gst-plugins-good-plugins-plugin-avi.html @@ -42,7 +42,7 @@ </tr> <tr> <td><p><span class="term">version</span></p></td> -<td>1.6.2</td> +<td>1.7.1</td> </tr> <tr> <td><p><span class="term">run-time license</span></p></td> diff --git a/docs/plugins/html/gst-plugins-good-plugins-plugin-cacasink.html b/docs/plugins/html/gst-plugins-good-plugins-plugin-cacasink.html index 00a1a37ce4b5c02d77c0dc7fb3f4ecd31cef1afb..f71bd0792cd4917efcff57760a98d6dad650f806 100644 --- a/docs/plugins/html/gst-plugins-good-plugins-plugin-cacasink.html +++ b/docs/plugins/html/gst-plugins-good-plugins-plugin-cacasink.html @@ -42,7 +42,7 @@ </tr> <tr> <td><p><span class="term">version</span></p></td> -<td>1.6.2</td> +<td>1.7.1</td> </tr> <tr> <td><p><span class="term">run-time license</span></p></td> diff --git a/docs/plugins/html/gst-plugins-good-plugins-plugin-cairo.html b/docs/plugins/html/gst-plugins-good-plugins-plugin-cairo.html index 6e39ead27ff13787acb2ccc6959119e9ab7ca0f8..cc0d3f0692adc1a1576b32cd66fea4626088a814 100644 --- a/docs/plugins/html/gst-plugins-good-plugins-plugin-cairo.html +++ b/docs/plugins/html/gst-plugins-good-plugins-plugin-cairo.html @@ -42,7 +42,7 @@ </tr> <tr> <td><p><span class="term">version</span></p></td> -<td>1.6.2</td> +<td>1.7.1</td> </tr> <tr> <td><p><span class="term">run-time license</span></p></td> diff --git a/docs/plugins/html/gst-plugins-good-plugins-plugin-cutter.html b/docs/plugins/html/gst-plugins-good-plugins-plugin-cutter.html index 49dfe58dc80ba350981b63eb2063e487f71a865d..6f1e5f6b66097e7d4d30058af3c92b73db30cae2 100644 --- a/docs/plugins/html/gst-plugins-good-plugins-plugin-cutter.html +++ b/docs/plugins/html/gst-plugins-good-plugins-plugin-cutter.html @@ -42,7 +42,7 @@ </tr> <tr> <td><p><span class="term">version</span></p></td> -<td>1.6.2</td> +<td>1.7.1</td> </tr> <tr> <td><p><span class="term">run-time license</span></p></td> diff --git a/docs/plugins/html/gst-plugins-good-plugins-plugin-debug.html b/docs/plugins/html/gst-plugins-good-plugins-plugin-debug.html index 840e58e3fcc52c02ab2d970f8cfcb13e3d05d37e..b9f486659766fbaccd8688b179220868f63cac66 100644 --- a/docs/plugins/html/gst-plugins-good-plugins-plugin-debug.html +++ b/docs/plugins/html/gst-plugins-good-plugins-plugin-debug.html @@ -42,7 +42,7 @@ </tr> <tr> <td><p><span class="term">version</span></p></td> -<td>1.6.2</td> +<td>1.7.1</td> </tr> <tr> <td><p><span class="term">run-time license</span></p></td> diff --git a/docs/plugins/html/gst-plugins-good-plugins-plugin-deinterlace.html b/docs/plugins/html/gst-plugins-good-plugins-plugin-deinterlace.html index 6fa4c39ecf63aa63ce888ed3ec2945e102757721..a0c13d32d50ce9581017a6b9baefcfbf4b5b8681 100644 --- a/docs/plugins/html/gst-plugins-good-plugins-plugin-deinterlace.html +++ b/docs/plugins/html/gst-plugins-good-plugins-plugin-deinterlace.html @@ -42,7 +42,7 @@ </tr> <tr> <td><p><span class="term">version</span></p></td> -<td>1.6.2</td> +<td>1.7.1</td> </tr> <tr> <td><p><span class="term">run-time license</span></p></td> diff --git a/docs/plugins/html/gst-plugins-good-plugins-plugin-dtmf.html b/docs/plugins/html/gst-plugins-good-plugins-plugin-dtmf.html index b0ca2667abc92f84336784d02c03af2089951ad0..f5aceaae74cf011f0d6e1d4ae8f62d09f8f83e76 100644 --- a/docs/plugins/html/gst-plugins-good-plugins-plugin-dtmf.html +++ b/docs/plugins/html/gst-plugins-good-plugins-plugin-dtmf.html @@ -42,7 +42,7 @@ </tr> <tr> <td><p><span class="term">version</span></p></td> -<td>1.6.2</td> +<td>1.7.1</td> </tr> <tr> <td><p><span class="term">run-time license</span></p></td> diff --git a/docs/plugins/html/gst-plugins-good-plugins-plugin-dv.html b/docs/plugins/html/gst-plugins-good-plugins-plugin-dv.html index cab807e3a673252707d39bebde02c5d72704677b..0eac0f0dcc3ae13ca7734809b60d220dcc1c2ce1 100644 --- a/docs/plugins/html/gst-plugins-good-plugins-plugin-dv.html +++ b/docs/plugins/html/gst-plugins-good-plugins-plugin-dv.html @@ -42,7 +42,7 @@ </tr> <tr> <td><p><span class="term">version</span></p></td> -<td>1.6.2</td> +<td>1.7.1</td> </tr> <tr> <td><p><span class="term">run-time license</span></p></td> diff --git a/docs/plugins/html/gst-plugins-good-plugins-plugin-effectv.html b/docs/plugins/html/gst-plugins-good-plugins-plugin-effectv.html index 9879f35f0acda4387e9174a289315ea9d758de8b..125c995c7767d44e2269736506ee2146552dc4b1 100644 --- a/docs/plugins/html/gst-plugins-good-plugins-plugin-effectv.html +++ b/docs/plugins/html/gst-plugins-good-plugins-plugin-effectv.html @@ -42,7 +42,7 @@ </tr> <tr> <td><p><span class="term">version</span></p></td> -<td>1.6.2</td> +<td>1.7.1</td> </tr> <tr> <td><p><span class="term">run-time license</span></p></td> diff --git a/docs/plugins/html/gst-plugins-good-plugins-plugin-equalizer.html b/docs/plugins/html/gst-plugins-good-plugins-plugin-equalizer.html index 3ad9d36719c328d01bd63c882c203f1646449a81..2031d5c8692dff4775ce2d447437abd4a8697d70 100644 --- a/docs/plugins/html/gst-plugins-good-plugins-plugin-equalizer.html +++ b/docs/plugins/html/gst-plugins-good-plugins-plugin-equalizer.html @@ -42,7 +42,7 @@ </tr> <tr> <td><p><span class="term">version</span></p></td> -<td>1.6.2</td> +<td>1.7.1</td> </tr> <tr> <td><p><span class="term">run-time license</span></p></td> diff --git a/docs/plugins/html/gst-plugins-good-plugins-plugin-flac.html b/docs/plugins/html/gst-plugins-good-plugins-plugin-flac.html index 2a48d0e39f2da4433dfc99ad2aefc97e5f511890..85540f8a1b9c0416ec23487e39d0df35c9466530 100644 --- a/docs/plugins/html/gst-plugins-good-plugins-plugin-flac.html +++ b/docs/plugins/html/gst-plugins-good-plugins-plugin-flac.html @@ -42,7 +42,7 @@ </tr> <tr> <td><p><span class="term">version</span></p></td> -<td>1.6.2</td> +<td>1.7.1</td> </tr> <tr> <td><p><span class="term">run-time license</span></p></td> diff --git a/docs/plugins/html/gst-plugins-good-plugins-plugin-flv.html b/docs/plugins/html/gst-plugins-good-plugins-plugin-flv.html index 7b82b6a440fa8d8bf4c7ef95b25ca6f1100217c7..ab20074bd084004570daf8d5605a5fac68d1b7f1 100644 --- a/docs/plugins/html/gst-plugins-good-plugins-plugin-flv.html +++ b/docs/plugins/html/gst-plugins-good-plugins-plugin-flv.html @@ -42,7 +42,7 @@ </tr> <tr> <td><p><span class="term">version</span></p></td> -<td>1.6.2</td> +<td>1.7.1</td> </tr> <tr> <td><p><span class="term">run-time license</span></p></td> diff --git a/docs/plugins/html/gst-plugins-good-plugins-plugin-flxdec.html b/docs/plugins/html/gst-plugins-good-plugins-plugin-flxdec.html index a75c97c2e0926eab6e467ce7f03d594f10e9a20b..f991d7d4d66ecbc15c58eece778cb3f1570e1cf9 100644 --- a/docs/plugins/html/gst-plugins-good-plugins-plugin-flxdec.html +++ b/docs/plugins/html/gst-plugins-good-plugins-plugin-flxdec.html @@ -42,7 +42,7 @@ </tr> <tr> <td><p><span class="term">version</span></p></td> -<td>1.6.2</td> +<td>1.7.1</td> </tr> <tr> <td><p><span class="term">run-time license</span></p></td> diff --git a/docs/plugins/html/gst-plugins-good-plugins-plugin-gdkpixbuf.html b/docs/plugins/html/gst-plugins-good-plugins-plugin-gdkpixbuf.html index 934fc0a574e06615f5c10aa170d0fb0c1ff61cff..4b26ed5168871940ae4a93b9302e26512a954bad 100644 --- a/docs/plugins/html/gst-plugins-good-plugins-plugin-gdkpixbuf.html +++ b/docs/plugins/html/gst-plugins-good-plugins-plugin-gdkpixbuf.html @@ -42,7 +42,7 @@ </tr> <tr> <td><p><span class="term">version</span></p></td> -<td>1.6.2</td> +<td>1.7.1</td> </tr> <tr> <td><p><span class="term">run-time license</span></p></td> diff --git a/docs/plugins/html/gst-plugins-good-plugins-plugin-goom.html b/docs/plugins/html/gst-plugins-good-plugins-plugin-goom.html index ec541ebe28e6d8f03b503f3b3fc3c6bdef296b6d..a27e3b0f5c181f9f36328ac5db0f552ec056e115 100644 --- a/docs/plugins/html/gst-plugins-good-plugins-plugin-goom.html +++ b/docs/plugins/html/gst-plugins-good-plugins-plugin-goom.html @@ -42,7 +42,7 @@ </tr> <tr> <td><p><span class="term">version</span></p></td> -<td>1.6.2</td> +<td>1.7.1</td> </tr> <tr> <td><p><span class="term">run-time license</span></p></td> diff --git a/docs/plugins/html/gst-plugins-good-plugins-plugin-goom2k1.html b/docs/plugins/html/gst-plugins-good-plugins-plugin-goom2k1.html index 54cd3107f1550a7c1debf735117fa169ae9b807c..260cca543d4db48d3f538da84ec37b3fb4d69c01 100644 --- a/docs/plugins/html/gst-plugins-good-plugins-plugin-goom2k1.html +++ b/docs/plugins/html/gst-plugins-good-plugins-plugin-goom2k1.html @@ -42,7 +42,7 @@ </tr> <tr> <td><p><span class="term">version</span></p></td> -<td>1.6.2</td> +<td>1.7.1</td> </tr> <tr> <td><p><span class="term">run-time license</span></p></td> diff --git a/docs/plugins/html/gst-plugins-good-plugins-plugin-icydemux.html b/docs/plugins/html/gst-plugins-good-plugins-plugin-icydemux.html index 088a41fc3529421d1f3ae6d679805342f530dd83..abe12fe984fb451dfe5ad23e4c16828c6f99dbad 100644 --- a/docs/plugins/html/gst-plugins-good-plugins-plugin-icydemux.html +++ b/docs/plugins/html/gst-plugins-good-plugins-plugin-icydemux.html @@ -42,7 +42,7 @@ </tr> <tr> <td><p><span class="term">version</span></p></td> -<td>1.6.2</td> +<td>1.7.1</td> </tr> <tr> <td><p><span class="term">run-time license</span></p></td> diff --git a/docs/plugins/html/gst-plugins-good-plugins-plugin-id3demux.html b/docs/plugins/html/gst-plugins-good-plugins-plugin-id3demux.html index a65275b85622532822f2b2bc816897523bd1361d..d0a8c98f2d0bee81e1dfbcc2b161be35ead0b20d 100644 --- a/docs/plugins/html/gst-plugins-good-plugins-plugin-id3demux.html +++ b/docs/plugins/html/gst-plugins-good-plugins-plugin-id3demux.html @@ -42,7 +42,7 @@ </tr> <tr> <td><p><span class="term">version</span></p></td> -<td>1.6.2</td> +<td>1.7.1</td> </tr> <tr> <td><p><span class="term">run-time license</span></p></td> diff --git a/docs/plugins/html/gst-plugins-good-plugins-plugin-imagefreeze.html b/docs/plugins/html/gst-plugins-good-plugins-plugin-imagefreeze.html index 03b0be49eba3ca9adb4addb1ed91dd2bb692c196..406eeb55109130fc61e1cca597e956486b4fe6c4 100644 --- a/docs/plugins/html/gst-plugins-good-plugins-plugin-imagefreeze.html +++ b/docs/plugins/html/gst-plugins-good-plugins-plugin-imagefreeze.html @@ -42,7 +42,7 @@ </tr> <tr> <td><p><span class="term">version</span></p></td> -<td>1.6.2</td> +<td>1.7.1</td> </tr> <tr> <td><p><span class="term">run-time license</span></p></td> diff --git a/docs/plugins/html/gst-plugins-good-plugins-plugin-interleave.html b/docs/plugins/html/gst-plugins-good-plugins-plugin-interleave.html index 14adb31e4fc73e868d3e2a64cd289ead0232fdb1..bfa8d5053d2aaa7db6a7e9252833ee2f069fad1c 100644 --- a/docs/plugins/html/gst-plugins-good-plugins-plugin-interleave.html +++ b/docs/plugins/html/gst-plugins-good-plugins-plugin-interleave.html @@ -42,7 +42,7 @@ </tr> <tr> <td><p><span class="term">version</span></p></td> -<td>1.6.2</td> +<td>1.7.1</td> </tr> <tr> <td><p><span class="term">run-time license</span></p></td> diff --git a/docs/plugins/html/gst-plugins-good-plugins-plugin-isomp4.html b/docs/plugins/html/gst-plugins-good-plugins-plugin-isomp4.html index 24a8dd383ecd2dae3e40ce1477308cec36fb5da0..0cb2523d25d7aa409b3ff4f73f8e8f518b1208a6 100644 --- a/docs/plugins/html/gst-plugins-good-plugins-plugin-isomp4.html +++ b/docs/plugins/html/gst-plugins-good-plugins-plugin-isomp4.html @@ -42,7 +42,7 @@ </tr> <tr> <td><p><span class="term">version</span></p></td> -<td>1.6.2</td> +<td>1.7.1</td> </tr> <tr> <td><p><span class="term">run-time license</span></p></td> diff --git a/docs/plugins/html/gst-plugins-good-plugins-plugin-jack.html b/docs/plugins/html/gst-plugins-good-plugins-plugin-jack.html index 79c1d8a55ce3f2e0f3ecee95c0818ac7632a98ae..8c2fa11b37a3a91b85ef1feecf4e9bbbc5481af2 100644 --- a/docs/plugins/html/gst-plugins-good-plugins-plugin-jack.html +++ b/docs/plugins/html/gst-plugins-good-plugins-plugin-jack.html @@ -42,7 +42,7 @@ </tr> <tr> <td><p><span class="term">version</span></p></td> -<td>1.6.2</td> +<td>1.7.1</td> </tr> <tr> <td><p><span class="term">run-time license</span></p></td> diff --git a/docs/plugins/html/gst-plugins-good-plugins-plugin-jpeg.html b/docs/plugins/html/gst-plugins-good-plugins-plugin-jpeg.html index aff77143d4ba1e05ca104cbdeca87d1f943d7dae..74e72f666657e4d7f477addc443b6ec5524708d6 100644 --- a/docs/plugins/html/gst-plugins-good-plugins-plugin-jpeg.html +++ b/docs/plugins/html/gst-plugins-good-plugins-plugin-jpeg.html @@ -42,7 +42,7 @@ </tr> <tr> <td><p><span class="term">version</span></p></td> -<td>1.6.2</td> +<td>1.7.1</td> </tr> <tr> <td><p><span class="term">run-time license</span></p></td> diff --git a/docs/plugins/html/gst-plugins-good-plugins-plugin-level.html b/docs/plugins/html/gst-plugins-good-plugins-plugin-level.html index 5e34de6ae2c93190666946f9b6e798fec9fbfbab..47b6339f4d43516c86f29010fb49bb863af74f11 100644 --- a/docs/plugins/html/gst-plugins-good-plugins-plugin-level.html +++ b/docs/plugins/html/gst-plugins-good-plugins-plugin-level.html @@ -42,7 +42,7 @@ </tr> <tr> <td><p><span class="term">version</span></p></td> -<td>1.6.2</td> +<td>1.7.1</td> </tr> <tr> <td><p><span class="term">run-time license</span></p></td> diff --git a/docs/plugins/html/gst-plugins-good-plugins-plugin-matroska.html b/docs/plugins/html/gst-plugins-good-plugins-plugin-matroska.html index f6195d99a852779c2b17e5c3baff6d8d8db88b07..4ee00938136c7d7dadfc13b129aba1b0fd0d2062 100644 --- a/docs/plugins/html/gst-plugins-good-plugins-plugin-matroska.html +++ b/docs/plugins/html/gst-plugins-good-plugins-plugin-matroska.html @@ -42,7 +42,7 @@ </tr> <tr> <td><p><span class="term">version</span></p></td> -<td>1.6.2</td> +<td>1.7.1</td> </tr> <tr> <td><p><span class="term">run-time license</span></p></td> diff --git a/docs/plugins/html/gst-plugins-good-plugins-plugin-mulaw.html b/docs/plugins/html/gst-plugins-good-plugins-plugin-mulaw.html index f56a07bdd2ff8f928e427b5e6f974479961a495a..0d8106c03266270ff29785f33e65af46ccb6c3ac 100644 --- a/docs/plugins/html/gst-plugins-good-plugins-plugin-mulaw.html +++ b/docs/plugins/html/gst-plugins-good-plugins-plugin-mulaw.html @@ -42,7 +42,7 @@ </tr> <tr> <td><p><span class="term">version</span></p></td> -<td>1.6.2</td> +<td>1.7.1</td> </tr> <tr> <td><p><span class="term">run-time license</span></p></td> diff --git a/docs/plugins/html/gst-plugins-good-plugins-plugin-multifile.html b/docs/plugins/html/gst-plugins-good-plugins-plugin-multifile.html index acb6eb0befae0ff56ea53be80c1a3d81ba13991c..d8faedc2829992a8de34650b4835e4def7a87c6d 100644 --- a/docs/plugins/html/gst-plugins-good-plugins-plugin-multifile.html +++ b/docs/plugins/html/gst-plugins-good-plugins-plugin-multifile.html @@ -42,7 +42,7 @@ </tr> <tr> <td><p><span class="term">version</span></p></td> -<td>1.6.2</td> +<td>1.7.1</td> </tr> <tr> <td><p><span class="term">run-time license</span></p></td> diff --git a/docs/plugins/html/gst-plugins-good-plugins-plugin-multipart.html b/docs/plugins/html/gst-plugins-good-plugins-plugin-multipart.html index 0b12739d39cce6635a4cad8cea0a7b6dcac91a0b..dc766bcc1561e2959f672843e15f1b490aa10b58 100644 --- a/docs/plugins/html/gst-plugins-good-plugins-plugin-multipart.html +++ b/docs/plugins/html/gst-plugins-good-plugins-plugin-multipart.html @@ -42,7 +42,7 @@ </tr> <tr> <td><p><span class="term">version</span></p></td> -<td>1.6.2</td> +<td>1.7.1</td> </tr> <tr> <td><p><span class="term">run-time license</span></p></td> diff --git a/docs/plugins/html/gst-plugins-good-plugins-plugin-navigationtest.html b/docs/plugins/html/gst-plugins-good-plugins-plugin-navigationtest.html index 7db9165194045e176504d6c8c5afd4651ea9bcf0..33ee76d533209007f9843aa70238b14a09a9c17b 100644 --- a/docs/plugins/html/gst-plugins-good-plugins-plugin-navigationtest.html +++ b/docs/plugins/html/gst-plugins-good-plugins-plugin-navigationtest.html @@ -42,7 +42,7 @@ </tr> <tr> <td><p><span class="term">version</span></p></td> -<td>1.6.2</td> +<td>1.7.1</td> </tr> <tr> <td><p><span class="term">run-time license</span></p></td> diff --git a/docs/plugins/html/gst-plugins-good-plugins-plugin-oss4.html b/docs/plugins/html/gst-plugins-good-plugins-plugin-oss4.html index ded0202ff85ed89bdf3c17d79c97894a04abf7fa..5e24fd19ff2c71c9339a2380f89d4cd8400690b2 100644 --- a/docs/plugins/html/gst-plugins-good-plugins-plugin-oss4.html +++ b/docs/plugins/html/gst-plugins-good-plugins-plugin-oss4.html @@ -42,7 +42,7 @@ </tr> <tr> <td><p><span class="term">version</span></p></td> -<td>1.6.2</td> +<td>1.7.1</td> </tr> <tr> <td><p><span class="term">run-time license</span></p></td> diff --git a/docs/plugins/html/gst-plugins-good-plugins-plugin-ossaudio.html b/docs/plugins/html/gst-plugins-good-plugins-plugin-ossaudio.html index 3bd95a8ebb81c64d04ab7f319b28081faf1bac3f..beaa40d05a90d7b8f7280f76f426cd8b48ba0728 100644 --- a/docs/plugins/html/gst-plugins-good-plugins-plugin-ossaudio.html +++ b/docs/plugins/html/gst-plugins-good-plugins-plugin-ossaudio.html @@ -42,7 +42,7 @@ </tr> <tr> <td><p><span class="term">version</span></p></td> -<td>1.6.2</td> +<td>1.7.1</td> </tr> <tr> <td><p><span class="term">run-time license</span></p></td> diff --git a/docs/plugins/html/gst-plugins-good-plugins-plugin-png.html b/docs/plugins/html/gst-plugins-good-plugins-plugin-png.html index cfbc419aa9d846f464cccbf4d036026c9da1830d..2b47f6b5da2bc36df049dd1b9212c1068d35dacd 100644 --- a/docs/plugins/html/gst-plugins-good-plugins-plugin-png.html +++ b/docs/plugins/html/gst-plugins-good-plugins-plugin-png.html @@ -42,7 +42,7 @@ </tr> <tr> <td><p><span class="term">version</span></p></td> -<td>1.6.2</td> +<td>1.7.1</td> </tr> <tr> <td><p><span class="term">run-time license</span></p></td> diff --git a/docs/plugins/html/gst-plugins-good-plugins-plugin-pulseaudio.html b/docs/plugins/html/gst-plugins-good-plugins-plugin-pulseaudio.html index fe414ab84ec07a22cc4824e2a9313b8cf4d8dc26..ce1e54328ac6005eed08d00b11dcac5c40176193 100644 --- a/docs/plugins/html/gst-plugins-good-plugins-plugin-pulseaudio.html +++ b/docs/plugins/html/gst-plugins-good-plugins-plugin-pulseaudio.html @@ -42,7 +42,7 @@ </tr> <tr> <td><p><span class="term">version</span></p></td> -<td>1.6.2</td> +<td>1.7.1</td> </tr> <tr> <td><p><span class="term">run-time license</span></p></td> diff --git a/docs/plugins/html/gst-plugins-good-plugins-plugin-replaygain.html b/docs/plugins/html/gst-plugins-good-plugins-plugin-replaygain.html index 86bc6f98a170c6cc144c64ba6f754965dad42ad9..d5c18d9a87222a890b1b13fdd9f54c6e9bceee57 100644 --- a/docs/plugins/html/gst-plugins-good-plugins-plugin-replaygain.html +++ b/docs/plugins/html/gst-plugins-good-plugins-plugin-replaygain.html @@ -42,7 +42,7 @@ </tr> <tr> <td><p><span class="term">version</span></p></td> -<td>1.6.2</td> +<td>1.7.1</td> </tr> <tr> <td><p><span class="term">run-time license</span></p></td> diff --git a/docs/plugins/html/gst-plugins-good-plugins-plugin-rtp.html b/docs/plugins/html/gst-plugins-good-plugins-plugin-rtp.html index 3b1b9ba8e184060f9df473cc06b7478ab792fbb7..c264e6ecd73102c00723769f9ac04731345dce2b 100644 --- a/docs/plugins/html/gst-plugins-good-plugins-plugin-rtp.html +++ b/docs/plugins/html/gst-plugins-good-plugins-plugin-rtp.html @@ -42,7 +42,7 @@ </tr> <tr> <td><p><span class="term">version</span></p></td> -<td>1.6.2</td> +<td>1.7.1</td> </tr> <tr> <td><p><span class="term">run-time license</span></p></td> @@ -377,7 +377,7 @@ </tr> <tr> <td><p><span class="term">rtpvp8pay</span></p></td> -<td>Puts VP8 video in RTP packets)</td> +<td>Puts VP8 video in RTP packets</td> </tr> <tr> <td><p><span class="term">rtpvrawdepay</span></p></td> diff --git a/docs/plugins/html/gst-plugins-good-plugins-plugin-rtpmanager.html b/docs/plugins/html/gst-plugins-good-plugins-plugin-rtpmanager.html index 4f8c76223a68a9581c4f22c6a8c3675884158dee..d4c6d8fcb2c9a9874b3585d523e439b190b9dae4 100644 --- a/docs/plugins/html/gst-plugins-good-plugins-plugin-rtpmanager.html +++ b/docs/plugins/html/gst-plugins-good-plugins-plugin-rtpmanager.html @@ -42,7 +42,7 @@ </tr> <tr> <td><p><span class="term">version</span></p></td> -<td>1.6.2</td> +<td>1.7.1</td> </tr> <tr> <td><p><span class="term">run-time license</span></p></td> diff --git a/docs/plugins/html/gst-plugins-good-plugins-plugin-rtsp.html b/docs/plugins/html/gst-plugins-good-plugins-plugin-rtsp.html index 741f39dc16b68ccf43898448e155de96c41b742c..fbac22a275a521cd98dde61cff223c47cbbc4ffd 100644 --- a/docs/plugins/html/gst-plugins-good-plugins-plugin-rtsp.html +++ b/docs/plugins/html/gst-plugins-good-plugins-plugin-rtsp.html @@ -42,7 +42,7 @@ </tr> <tr> <td><p><span class="term">version</span></p></td> -<td>1.6.2</td> +<td>1.7.1</td> </tr> <tr> <td><p><span class="term">run-time license</span></p></td> diff --git a/docs/plugins/html/gst-plugins-good-plugins-plugin-shapewipe.html b/docs/plugins/html/gst-plugins-good-plugins-plugin-shapewipe.html index 1428ef94cd592cbe5563eca0bfe703ed8ec9cd34..aa0cd0fbb6f83eaa2aba3e13f5722635bb3d6bec 100644 --- a/docs/plugins/html/gst-plugins-good-plugins-plugin-shapewipe.html +++ b/docs/plugins/html/gst-plugins-good-plugins-plugin-shapewipe.html @@ -42,7 +42,7 @@ </tr> <tr> <td><p><span class="term">version</span></p></td> -<td>1.6.2</td> +<td>1.7.1</td> </tr> <tr> <td><p><span class="term">run-time license</span></p></td> diff --git a/docs/plugins/html/gst-plugins-good-plugins-plugin-shout2send.html b/docs/plugins/html/gst-plugins-good-plugins-plugin-shout2send.html index 50921a81456d24c39544859773c5cc821846585e..44b4f80a68b13518c4b151d264126ec3485888a2 100644 --- a/docs/plugins/html/gst-plugins-good-plugins-plugin-shout2send.html +++ b/docs/plugins/html/gst-plugins-good-plugins-plugin-shout2send.html @@ -42,7 +42,7 @@ </tr> <tr> <td><p><span class="term">version</span></p></td> -<td>1.6.2</td> +<td>1.7.1</td> </tr> <tr> <td><p><span class="term">run-time license</span></p></td> diff --git a/docs/plugins/html/gst-plugins-good-plugins-plugin-smpte.html b/docs/plugins/html/gst-plugins-good-plugins-plugin-smpte.html index 41e3880ae3b8600d123400158537d712a0183cfa..b586c7b5f1d9a3eb594aeca4ce06fd09da642591 100644 --- a/docs/plugins/html/gst-plugins-good-plugins-plugin-smpte.html +++ b/docs/plugins/html/gst-plugins-good-plugins-plugin-smpte.html @@ -42,7 +42,7 @@ </tr> <tr> <td><p><span class="term">version</span></p></td> -<td>1.6.2</td> +<td>1.7.1</td> </tr> <tr> <td><p><span class="term">run-time license</span></p></td> diff --git a/docs/plugins/html/gst-plugins-good-plugins-plugin-soup.html b/docs/plugins/html/gst-plugins-good-plugins-plugin-soup.html index 496c27178c54c39ff645d9a2c7fc50c41855442d..29adaeaba5afbc9c3959b4fa5fd279eb0b0ad449 100644 --- a/docs/plugins/html/gst-plugins-good-plugins-plugin-soup.html +++ b/docs/plugins/html/gst-plugins-good-plugins-plugin-soup.html @@ -42,7 +42,7 @@ </tr> <tr> <td><p><span class="term">version</span></p></td> -<td>1.6.2</td> +<td>1.7.1</td> </tr> <tr> <td><p><span class="term">run-time license</span></p></td> diff --git a/docs/plugins/html/gst-plugins-good-plugins-plugin-spectrum.html b/docs/plugins/html/gst-plugins-good-plugins-plugin-spectrum.html index ba59396edd447fbce4814d8fd0aa7925219b2d40..89de0ebefba9c1b38b21cda67bea3707b7da9f4a 100644 --- a/docs/plugins/html/gst-plugins-good-plugins-plugin-spectrum.html +++ b/docs/plugins/html/gst-plugins-good-plugins-plugin-spectrum.html @@ -42,7 +42,7 @@ </tr> <tr> <td><p><span class="term">version</span></p></td> -<td>1.6.2</td> +<td>1.7.1</td> </tr> <tr> <td><p><span class="term">run-time license</span></p></td> diff --git a/docs/plugins/html/gst-plugins-good-plugins-plugin-speex.html b/docs/plugins/html/gst-plugins-good-plugins-plugin-speex.html index b011204d1ffa0bda1c19e993ca3e5044e256a711..e5b34d46e508a298914dd740665e4e636ec2d515 100644 --- a/docs/plugins/html/gst-plugins-good-plugins-plugin-speex.html +++ b/docs/plugins/html/gst-plugins-good-plugins-plugin-speex.html @@ -42,7 +42,7 @@ </tr> <tr> <td><p><span class="term">version</span></p></td> -<td>1.6.2</td> +<td>1.7.1</td> </tr> <tr> <td><p><span class="term">run-time license</span></p></td> diff --git a/docs/plugins/html/gst-plugins-good-plugins-plugin-taglib.html b/docs/plugins/html/gst-plugins-good-plugins-plugin-taglib.html index 884156636558459647af9b2a069b1deb4d4c22f4..c7e14283626fd90b5a5329913e27cde2bc8fccc1 100644 --- a/docs/plugins/html/gst-plugins-good-plugins-plugin-taglib.html +++ b/docs/plugins/html/gst-plugins-good-plugins-plugin-taglib.html @@ -42,7 +42,7 @@ </tr> <tr> <td><p><span class="term">version</span></p></td> -<td>1.6.2</td> +<td>1.7.1</td> </tr> <tr> <td><p><span class="term">run-time license</span></p></td> diff --git a/docs/plugins/html/gst-plugins-good-plugins-plugin-udp.html b/docs/plugins/html/gst-plugins-good-plugins-plugin-udp.html index 188dc4c75e35b39a94c8d1a33a7f347daa729da6..866aec304ca43c63de65b5c61154c5036a62279d 100644 --- a/docs/plugins/html/gst-plugins-good-plugins-plugin-udp.html +++ b/docs/plugins/html/gst-plugins-good-plugins-plugin-udp.html @@ -42,7 +42,7 @@ </tr> <tr> <td><p><span class="term">version</span></p></td> -<td>1.6.2</td> +<td>1.7.1</td> </tr> <tr> <td><p><span class="term">run-time license</span></p></td> diff --git a/docs/plugins/html/gst-plugins-good-plugins-plugin-video4linux2.html b/docs/plugins/html/gst-plugins-good-plugins-plugin-video4linux2.html index 6efa928cb5e804b23afc69e638e0d96fa969a7c6..403f6451fb2ed8d951698b1353dbd333e7c07865 100644 --- a/docs/plugins/html/gst-plugins-good-plugins-plugin-video4linux2.html +++ b/docs/plugins/html/gst-plugins-good-plugins-plugin-video4linux2.html @@ -42,7 +42,7 @@ </tr> <tr> <td><p><span class="term">version</span></p></td> -<td>1.6.2</td> +<td>1.7.1</td> </tr> <tr> <td><p><span class="term">run-time license</span></p></td> diff --git a/docs/plugins/html/gst-plugins-good-plugins-plugin-videobox.html b/docs/plugins/html/gst-plugins-good-plugins-plugin-videobox.html index 47cf8bcb00e2e589a72df5a946b0873764181ac2..ee4f75722732c01f087eabb83119883fa33bd47a 100644 --- a/docs/plugins/html/gst-plugins-good-plugins-plugin-videobox.html +++ b/docs/plugins/html/gst-plugins-good-plugins-plugin-videobox.html @@ -42,7 +42,7 @@ </tr> <tr> <td><p><span class="term">version</span></p></td> -<td>1.6.2</td> +<td>1.7.1</td> </tr> <tr> <td><p><span class="term">run-time license</span></p></td> diff --git a/docs/plugins/html/gst-plugins-good-plugins-plugin-videocrop.html b/docs/plugins/html/gst-plugins-good-plugins-plugin-videocrop.html index d23ec239d0c03c535ceb7207bca429f7a6cd0e12..ce4e4332aa200ead2df4c7db1bbbddeca9146961 100644 --- a/docs/plugins/html/gst-plugins-good-plugins-plugin-videocrop.html +++ b/docs/plugins/html/gst-plugins-good-plugins-plugin-videocrop.html @@ -42,7 +42,7 @@ </tr> <tr> <td><p><span class="term">version</span></p></td> -<td>1.6.2</td> +<td>1.7.1</td> </tr> <tr> <td><p><span class="term">run-time license</span></p></td> diff --git a/docs/plugins/html/gst-plugins-good-plugins-plugin-videofilter.html b/docs/plugins/html/gst-plugins-good-plugins-plugin-videofilter.html index 3bb264b8de8fecaece994bbcbe6676e98b3a4300..1b9db8bd9980562a979bd02e0e23decb41bfe7cf 100644 --- a/docs/plugins/html/gst-plugins-good-plugins-plugin-videofilter.html +++ b/docs/plugins/html/gst-plugins-good-plugins-plugin-videofilter.html @@ -42,7 +42,7 @@ </tr> <tr> <td><p><span class="term">version</span></p></td> -<td>1.6.2</td> +<td>1.7.1</td> </tr> <tr> <td><p><span class="term">run-time license</span></p></td> diff --git a/docs/plugins/html/gst-plugins-good-plugins-plugin-videomixer.html b/docs/plugins/html/gst-plugins-good-plugins-plugin-videomixer.html index 2484aa1ca6fcb40f0da20ba9cb5acaa70bc455c7..a77937e3b4e461e5889e4e9f78c9cfcb42d73e7b 100644 --- a/docs/plugins/html/gst-plugins-good-plugins-plugin-videomixer.html +++ b/docs/plugins/html/gst-plugins-good-plugins-plugin-videomixer.html @@ -42,7 +42,7 @@ </tr> <tr> <td><p><span class="term">version</span></p></td> -<td>1.6.2</td> +<td>1.7.1</td> </tr> <tr> <td><p><span class="term">run-time license</span></p></td> diff --git a/docs/plugins/html/gst-plugins-good-plugins-plugin-vpx.html b/docs/plugins/html/gst-plugins-good-plugins-plugin-vpx.html index a093670af4953732201c4c3762a2d4e7124d9d3d..99c3c074680ea8cdba3bd6ba375aeb58d651e642 100644 --- a/docs/plugins/html/gst-plugins-good-plugins-plugin-vpx.html +++ b/docs/plugins/html/gst-plugins-good-plugins-plugin-vpx.html @@ -42,7 +42,7 @@ </tr> <tr> <td><p><span class="term">version</span></p></td> -<td>1.6.2</td> +<td>1.7.1</td> </tr> <tr> <td><p><span class="term">run-time license</span></p></td> diff --git a/docs/plugins/html/gst-plugins-good-plugins-plugin-wavenc.html b/docs/plugins/html/gst-plugins-good-plugins-plugin-wavenc.html index 6062646270975bf4b0f1c4865f3f81caffe6297a..1e33f2b8f3b925f3a80d507fc40fc3eafc08f4fa 100644 --- a/docs/plugins/html/gst-plugins-good-plugins-plugin-wavenc.html +++ b/docs/plugins/html/gst-plugins-good-plugins-plugin-wavenc.html @@ -42,7 +42,7 @@ </tr> <tr> <td><p><span class="term">version</span></p></td> -<td>1.6.2</td> +<td>1.7.1</td> </tr> <tr> <td><p><span class="term">run-time license</span></p></td> diff --git a/docs/plugins/html/gst-plugins-good-plugins-plugin-wavpack.html b/docs/plugins/html/gst-plugins-good-plugins-plugin-wavpack.html index cb3c1f3fcf70d471fbfa534bbf43ff790071cc42..e03a278bb6c2c1c06314ff4fed374bcffcdd791b 100644 --- a/docs/plugins/html/gst-plugins-good-plugins-plugin-wavpack.html +++ b/docs/plugins/html/gst-plugins-good-plugins-plugin-wavpack.html @@ -42,7 +42,7 @@ </tr> <tr> <td><p><span class="term">version</span></p></td> -<td>1.6.2</td> +<td>1.7.1</td> </tr> <tr> <td><p><span class="term">run-time license</span></p></td> diff --git a/docs/plugins/html/gst-plugins-good-plugins-plugin-wavparse.html b/docs/plugins/html/gst-plugins-good-plugins-plugin-wavparse.html index eb44b77a804359ec42dfe1949d7fd13099bf43b4..76bca056db85a3a02a560be3e330b423e359e35a 100644 --- a/docs/plugins/html/gst-plugins-good-plugins-plugin-wavparse.html +++ b/docs/plugins/html/gst-plugins-good-plugins-plugin-wavparse.html @@ -42,7 +42,7 @@ </tr> <tr> <td><p><span class="term">version</span></p></td> -<td>1.6.2</td> +<td>1.7.1</td> </tr> <tr> <td><p><span class="term">run-time license</span></p></td> diff --git a/docs/plugins/html/gst-plugins-good-plugins-plugin-ximagesrc.html b/docs/plugins/html/gst-plugins-good-plugins-plugin-ximagesrc.html index e7e33afa5f1b4a201ed2d69d512febbe010a6822..4a6759ea64e67e0d5c4e06b65a460988956cf634 100644 --- a/docs/plugins/html/gst-plugins-good-plugins-plugin-ximagesrc.html +++ b/docs/plugins/html/gst-plugins-good-plugins-plugin-ximagesrc.html @@ -42,7 +42,7 @@ </tr> <tr> <td><p><span class="term">version</span></p></td> -<td>1.6.2</td> +<td>1.7.1</td> </tr> <tr> <td><p><span class="term">run-time license</span></p></td> diff --git a/docs/plugins/html/gst-plugins-good-plugins-plugin-y4menc.html b/docs/plugins/html/gst-plugins-good-plugins-plugin-y4menc.html index 7f5ff855e888ebbbb92938df7571c0265afbda9d..b4ca6b8a456682d3ea5130f47255050352f9ce1d 100644 --- a/docs/plugins/html/gst-plugins-good-plugins-plugin-y4menc.html +++ b/docs/plugins/html/gst-plugins-good-plugins-plugin-y4menc.html @@ -42,7 +42,7 @@ </tr> <tr> <td><p><span class="term">version</span></p></td> -<td>1.6.2</td> +<td>1.7.1</td> </tr> <tr> <td><p><span class="term">run-time license</span></p></td> diff --git a/docs/plugins/html/gst-plugins-good-plugins-qtmux.html b/docs/plugins/html/gst-plugins-good-plugins-qtmux.html index 769166e81366ea1adcde0e668ef9a2987e1bad3a..bbe80bc6bdb119680920d9ae2f50b7c86546491d 100644 --- a/docs/plugins/html/gst-plugins-good-plugins-qtmux.html +++ b/docs/plugins/html/gst-plugins-good-plugins-qtmux.html @@ -248,15 +248,7 @@ Records a video stream captured from a v4l2 device and muxes it into a qt file. </tr> <tr> <td><p><span class="term">details</span></p></td> -<td>audio/x-raw, format=(string){ S32LE, S32BE, S24LE, S24BE }, layout=(string)interleaved, channels=(int)[ 1, 2 ], rate=(int)[ 1, 2147483647 ]</td> -</tr> -<tr> -<td><p><span class="term"></span></p></td> -<td> audio/x-raw, format=(string){ S8, U8 }, layout=(string)interleaved, channels=(int)[ 1, 2 ], rate=(int)[ 1, 2147483647 ]</td> -</tr> -<tr> -<td><p><span class="term"></span></p></td> -<td> audio/x-raw, format=(string){ S16LE, S16BE }, layout=(string)interleaved, channels=(int)[ 1, 2 ], rate=(int)[ 1, 2147483647 ]</td> +<td>audio/x-raw, format=(string){ S32LE, S32BE, S24LE, S24BE, S16LE, S16BE, S8, U8 }, layout=(string)interleaved, channels=(int)[ 1, 2 ], rate=(int)[ 1, 2147483647 ]</td> </tr> <tr> <td><p><span class="term"></span></p></td> diff --git a/docs/plugins/html/gst-plugins-good-plugins-rtpbin.html b/docs/plugins/html/gst-plugins-good-plugins-rtpbin.html index 4966cfcc44c959c1cb630f16c670459f2ba47c0a..3803d4b8e73d9f07a36910331ed0d21f9490218d 100644 --- a/docs/plugins/html/gst-plugins-good-plugins-rtpbin.html +++ b/docs/plugins/html/gst-plugins-good-plugins-rtpbin.html @@ -120,6 +120,26 @@ <td class="property_name"><a class="link" href="gst-plugins-good-plugins-rtpbin.html#GstRtpBin--ntp-time-source" title="The “ntp-time-source†property">ntp-time-source</a></td> <td class="property_flags">Read / Write</td> </tr> +<tr> +<td class="property_type"><a href="https://developer.gnome.org/glib/unstable/glib-Basic-Types.html#guint"><span class="type">guint</span></a></td> +<td class="property_name"><a class="link" href="gst-plugins-good-plugins-rtpbin.html#GstRtpBin--max-dropout-time" title="The “max-dropout-time†property">max-dropout-time</a></td> +<td class="property_flags">Read / Write</td> +</tr> +<tr> +<td class="property_type"><a href="https://developer.gnome.org/glib/unstable/glib-Basic-Types.html#guint"><span class="type">guint</span></a></td> +<td class="property_name"><a class="link" href="gst-plugins-good-plugins-rtpbin.html#GstRtpBin--max-misorder-time" title="The “max-misorder-time†property">max-misorder-time</a></td> +<td class="property_flags">Read / Write</td> +</tr> +<tr> +<td class="property_type"><a href="https://developer.gnome.org/glib/unstable/glib-Basic-Types.html#gint"><span class="type">gint</span></a></td> +<td class="property_name"><a class="link" href="gst-plugins-good-plugins-rtpbin.html#GstRtpBin--max-rtcp-rtp-time-diff" title="The “max-rtcp-rtp-time-diff†property">max-rtcp-rtp-time-diff</a></td> +<td class="property_flags">Read / Write</td> +</tr> +<tr> +<td class="property_type"><a href="https://developer.gnome.org/glib/unstable/glib-Basic-Types.html#gboolean"><span class="type">gboolean</span></a></td> +<td class="property_name"><a class="link" href="gst-plugins-good-plugins-rtpbin.html#GstRtpBin--rtcp-sync-send-time" title="The “rtcp-sync-send-time†property">rtcp-sync-send-time</a></td> +<td class="property_flags">Read / Write</td> +</tr> </tbody> </table></div> </div> @@ -250,6 +270,16 @@ <td class="signal_name"><a class="link" href="gst-plugins-good-plugins-rtpbin.html#GstRtpBin-request-rtp-encoder" title="The “request-rtp-encoder†signal">request-rtp-encoder</a></td> <td class="signal_flags"><a href="https://developer.gnome.org/gobject/unstable/gobject-Signals.html#G-SIGNAL-RUN-LAST:CAPS">Run Last</a></td> </tr> +<tr> +<td class="signal_type"><span class="returnvalue">void</span></td> +<td class="signal_name"><a class="link" href="gst-plugins-good-plugins-rtpbin.html#GstRtpBin-on-new-sender-ssrc" title="The “on-new-sender-ssrc†signal">on-new-sender-ssrc</a></td> +<td class="signal_flags"><a href="https://developer.gnome.org/gobject/unstable/gobject-Signals.html#G-SIGNAL-RUN-LAST:CAPS">Run Last</a></td> +</tr> +<tr> +<td class="signal_type"><span class="returnvalue">void</span></td> +<td class="signal_name"><a class="link" href="gst-plugins-good-plugins-rtpbin.html#GstRtpBin-on-sender-ssrc-active" title="The “on-sender-ssrc-active†signal">on-sender-ssrc-active</a></td> +<td class="signal_flags"><a href="https://developer.gnome.org/gobject/unstable/gobject-Signals.html#G-SIGNAL-RUN-LAST:CAPS">Run Last</a></td> +</tr> </tbody> </table></div> </div> @@ -857,6 +887,39 @@ profile can be changed afterwards on a per-session basis.</p> <p>Flags: Read / Write</p> <p>Default value: NTP time based on realtime clock</p> </div> +<hr> +<div class="refsect2"> +<a name="GstRtpBin--max-dropout-time"></a><h3>The <code class="literal">“max-dropout-timeâ€</code> property</h3> +<pre class="programlisting"> “max-dropout-time†<a href="https://developer.gnome.org/glib/unstable/glib-Basic-Types.html#guint"><span class="type">guint</span></a></pre> +<p>The maximum time (milliseconds) of missing packets tolerated.</p> +<p>Flags: Read / Write</p> +<p>Default value: 60000</p> +</div> +<hr> +<div class="refsect2"> +<a name="GstRtpBin--max-misorder-time"></a><h3>The <code class="literal">“max-misorder-timeâ€</code> property</h3> +<pre class="programlisting"> “max-misorder-time†<a href="https://developer.gnome.org/glib/unstable/glib-Basic-Types.html#guint"><span class="type">guint</span></a></pre> +<p>The maximum time (milliseconds) of misordered packets tolerated.</p> +<p>Flags: Read / Write</p> +<p>Default value: 2000</p> +</div> +<hr> +<div class="refsect2"> +<a name="GstRtpBin--max-rtcp-rtp-time-diff"></a><h3>The <code class="literal">“max-rtcp-rtp-time-diffâ€</code> property</h3> +<pre class="programlisting"> “max-rtcp-rtp-time-diff†<a href="https://developer.gnome.org/glib/unstable/glib-Basic-Types.html#gint"><span class="type">gint</span></a></pre> +<p>Maximum amount of time in ms that the RTP time in RTCP SRs is allowed to be ahead (-1 disabled).</p> +<p>Flags: Read / Write</p> +<p>Allowed values: >= G_MAXULONG</p> +<p>Default value: 1000</p> +</div> +<hr> +<div class="refsect2"> +<a name="GstRtpBin--rtcp-sync-send-time"></a><h3>The <code class="literal">“rtcp-sync-send-timeâ€</code> property</h3> +<pre class="programlisting"> “rtcp-sync-send-time†<a href="https://developer.gnome.org/glib/unstable/glib-Basic-Types.html#gboolean"><span class="type">gboolean</span></a></pre> +<p>Use send time or capture time for RTCP sync (TRUE = send time, FALSE = capture time).</p> +<p>Flags: Read / Write</p> +<p>Default value: TRUE</p> +</div> </div> <div class="refsect1"> <a name="gst-plugins-good-plugins-rtpbin.signal-details"></a><h2>Signal Details</h2> @@ -1153,9 +1216,8 @@ user_function (<a class="link" href="gst-plugins-good-plugins-rtpbin.html#GstRtp <a href="https://developer.gnome.org/glib/unstable/glib-Basic-Types.html#guint"><span class="type">guint</span></a> session, <a href="https://developer.gnome.org/glib/unstable/glib-Basic-Types.html#guint"><span class="type">guint</span></a> ssrc, <a href="https://developer.gnome.org/glib/unstable/glib-Basic-Types.html#gpointer"><span class="type">gpointer</span></a> user_data)</pre> -<p>Notify of a SSRC that is active, i.e., sending RTCP.</p> <div class="refsect3"> -<a name="id-1.2.129.13.9.5"></a><h4>Parameters</h4> +<a name="id-1.2.129.13.9.4"></a><h4>Parameters</h4> <div class="informaltable"><table width="100%" border="0"> <colgroup> <col width="150px" class="parameters_name"> @@ -1175,7 +1237,7 @@ user_function (<a class="link" href="gst-plugins-good-plugins-rtpbin.html#GstRtp </tr> <tr> <td class="parameter_name"><p>ssrc</p></td> -<td class="parameter_description"><p>the SSRC</p></td> +<td class="parameter_description"><p>the sender SSRC</p></td> <td class="parameter_annotations"> </td> </tr> <tr> @@ -1187,6 +1249,7 @@ user_function (<a class="link" href="gst-plugins-good-plugins-rtpbin.html#GstRtp </table></div> </div> <p>Flags: <a href="https://developer.gnome.org/gobject/unstable/gobject-Signals.html#G-SIGNAL-RUN-LAST:CAPS">Run Last</a></p> +<p class="since">Since: 1.8</p> </div> <hr> <div class="refsect2"> @@ -1783,6 +1846,59 @@ element will be added to the bin if not previously added.</p> <p>Flags: <a href="https://developer.gnome.org/gobject/unstable/gobject-Signals.html#G-SIGNAL-RUN-LAST:CAPS">Run Last</a></p> <p class="since">Since: 1.4</p> </div> +<hr> +<div class="refsect2"> +<a name="GstRtpBin-on-new-sender-ssrc"></a><h3>The <code class="literal">“on-new-sender-ssrcâ€</code> signal</h3> +<pre class="programlisting"><span class="returnvalue">void</span> +user_function (<a class="link" href="gst-plugins-good-plugins-rtpbin.html#GstRtpBin"><span class="type">GstRtpBin</span></a> *rtpbin, + <a href="https://developer.gnome.org/glib/unstable/glib-Basic-Types.html#guint"><span class="type">guint</span></a> session, + <a href="https://developer.gnome.org/glib/unstable/glib-Basic-Types.html#guint"><span class="type">guint</span></a> ssrc, + <a href="https://developer.gnome.org/glib/unstable/glib-Basic-Types.html#gpointer"><span class="type">gpointer</span></a> user_data)</pre> +<div class="refsect3"> +<a name="id-1.2.129.13.24.4"></a><h4>Parameters</h4> +<div class="informaltable"><table width="100%" border="0"> +<colgroup> +<col width="150px" class="parameters_name"> +<col class="parameters_description"> +<col width="200px" class="parameters_annotations"> +</colgroup> +<tbody> +<tr> +<td class="parameter_name"><p>rtpbin</p></td> +<td class="parameter_description"><p>the object which received the signal</p></td> +<td class="parameter_annotations"> </td> +</tr> +<tr> +<td class="parameter_name"><p>session</p></td> +<td class="parameter_description"><p>the session</p></td> +<td class="parameter_annotations"> </td> +</tr> +<tr> +<td class="parameter_name"><p>ssrc</p></td> +<td class="parameter_description"><p>the sender SSRC</p></td> +<td class="parameter_annotations"> </td> +</tr> +<tr> +<td class="parameter_name"><p>user_data</p></td> +<td class="parameter_description"><p>user data set when the signal handler was connected.</p></td> +<td class="parameter_annotations"> </td> +</tr> +</tbody> +</table></div> +</div> +<p>Flags: <a href="https://developer.gnome.org/gobject/unstable/gobject-Signals.html#G-SIGNAL-RUN-LAST:CAPS">Run Last</a></p> +<p class="since">Since: 1.8</p> +</div> +<hr> +<div class="refsect2"> +<a name="GstRtpBin-on-sender-ssrc-active"></a><h3>The <code class="literal">“on-sender-ssrc-activeâ€</code> signal</h3> +<pre class="programlisting"><span class="returnvalue">void</span> +user_function (<a class="link" href="gst-plugins-good-plugins-rtpbin.html#GstRtpBin"><span class="type">GstRtpBin</span></a> *gstrtpbin, + <a href="https://developer.gnome.org/glib/unstable/glib-Basic-Types.html#guint"><span class="type">guint</span></a> arg1, + <a href="https://developer.gnome.org/glib/unstable/glib-Basic-Types.html#guint"><span class="type">guint</span></a> arg2, + <a href="https://developer.gnome.org/glib/unstable/glib-Basic-Types.html#gpointer"><span class="type">gpointer</span></a> user_data)</pre> +<p>Flags: <a href="https://developer.gnome.org/gobject/unstable/gobject-Signals.html#G-SIGNAL-RUN-LAST:CAPS">Run Last</a></p> +</div> </div> <div class="refsect1"> <a name="gst-plugins-good-plugins-rtpbin.see-also"></a><h2>See Also</h2> diff --git a/docs/plugins/html/gst-plugins-good-plugins-rtpjitterbuffer.html b/docs/plugins/html/gst-plugins-good-plugins-rtpjitterbuffer.html index 67813977599368f3669f9d9dcb194576abe07474..1e60b7232a62ed3590757d2b237fd97d892be1d9 100644 --- a/docs/plugins/html/gst-plugins-good-plugins-rtpjitterbuffer.html +++ b/docs/plugins/html/gst-plugins-good-plugins-rtpjitterbuffer.html @@ -124,6 +124,21 @@ <td class="property_name"><a class="link" href="gst-plugins-good-plugins-rtpjitterbuffer.html#GstRtpJitterBuffer--rtx-next-seqnum" title="The “rtx-next-seqnum†property">rtx-next-seqnum</a></td> <td class="property_flags">Read / Write</td> </tr> +<tr> +<td class="property_type"><a href="https://developer.gnome.org/glib/unstable/glib-Basic-Types.html#guint"><span class="type">guint</span></a></td> +<td class="property_name"><a class="link" href="gst-plugins-good-plugins-rtpjitterbuffer.html#GstRtpJitterBuffer--max-dropout-time" title="The “max-dropout-time†property">max-dropout-time</a></td> +<td class="property_flags">Read / Write</td> +</tr> +<tr> +<td class="property_type"><a href="https://developer.gnome.org/glib/unstable/glib-Basic-Types.html#guint"><span class="type">guint</span></a></td> +<td class="property_name"><a class="link" href="gst-plugins-good-plugins-rtpjitterbuffer.html#GstRtpJitterBuffer--max-misorder-time" title="The “max-misorder-time†property">max-misorder-time</a></td> +<td class="property_flags">Read / Write</td> +</tr> +<tr> +<td class="property_type"><a href="https://developer.gnome.org/glib/unstable/glib-Basic-Types.html#gint"><span class="type">gint</span></a></td> +<td class="property_name"><a class="link" href="gst-plugins-good-plugins-rtpjitterbuffer.html#GstRtpJitterBuffer--max-rtcp-rtp-time-diff" title="The “max-rtcp-rtp-time-diff†property">max-rtcp-rtp-time-diff</a></td> +<td class="property_flags">Read / Write</td> +</tr> </tbody> </table></div> </div> @@ -554,6 +569,34 @@ The expected time is calculated using the dts of N and the packet spacing.</p> <p>Default value: TRUE</p> <p class="since">Since: 1.6</p> </div> +<hr> +<div class="refsect2"> +<a name="GstRtpJitterBuffer--max-dropout-time"></a><h3>The <code class="literal">“max-dropout-timeâ€</code> property</h3> +<pre class="programlisting"> “max-dropout-time†<a href="https://developer.gnome.org/glib/unstable/glib-Basic-Types.html#guint"><span class="type">guint</span></a></pre> +<p>The maximum time (milliseconds) of missing packets tolerated.</p> +<p>Flags: Read / Write</p> +<p>Default value: 60000</p> +</div> +<hr> +<div class="refsect2"> +<a name="GstRtpJitterBuffer--max-misorder-time"></a><h3>The <code class="literal">“max-misorder-timeâ€</code> property</h3> +<pre class="programlisting"> “max-misorder-time†<a href="https://developer.gnome.org/glib/unstable/glib-Basic-Types.html#guint"><span class="type">guint</span></a></pre> +<p>The maximum time (milliseconds) of misordered packets tolerated.</p> +<p>Flags: Read / Write</p> +<p>Default value: 2000</p> +</div> +<hr> +<div class="refsect2"> +<a name="GstRtpJitterBuffer--max-rtcp-rtp-time-diff"></a><h3>The <code class="literal">“max-rtcp-rtp-time-diffâ€</code> property</h3> +<pre class="programlisting"> “max-rtcp-rtp-time-diff†<a href="https://developer.gnome.org/glib/unstable/glib-Basic-Types.html#gint"><span class="type">gint</span></a></pre> +<p>The maximum amount of time in ms that the RTP time in the RTCP SRs +is allowed to be ahead of the last RTP packet we received. Use +-1 to disable ignoring of RTCP packets.</p> +<p>Flags: Read / Write</p> +<p>Allowed values: >= G_MAXULONG</p> +<p>Default value: 1000</p> +<p class="since">Since: 1.8</p> +</div> </div> <div class="refsect1"> <a name="gst-plugins-good-plugins-rtpjitterbuffer.signal-details"></a><h2>Signal Details</h2> diff --git a/docs/plugins/html/gst-plugins-good-plugins-rtpmux.html b/docs/plugins/html/gst-plugins-good-plugins-rtpmux.html index 8705aeaf0a34637ad292ab701d7dac3213c1d5ba..588535ee48a082b3bd924983dde8cdc80fdf5aa8 100644 --- a/docs/plugins/html/gst-plugins-good-plugins-rtpmux.html +++ b/docs/plugins/html/gst-plugins-good-plugins-rtpmux.html @@ -234,7 +234,7 @@ so they can be sent on the same port. <div class="refsect2"> <a name="GstRTPMux--ssrc"></a><h3>The <code class="literal">“ssrcâ€</code> property</h3> <pre class="programlisting"> “ssrc†<a href="https://developer.gnome.org/glib/unstable/glib-Basic-Types.html#guint"><span class="type">guint</span></a></pre> -<p>The SSRC of the packets (-1 == random).</p> +<p>The SSRC of the packets (default == random).</p> <p>Flags: Read / Write</p> <p>Default value: 4294967295</p> </div> diff --git a/docs/plugins/html/gst-plugins-good-plugins-rtpsession.html b/docs/plugins/html/gst-plugins-good-plugins-rtpsession.html index b1e1bee6dc9a23a661aafaa67cf5226ae61858ce..be717e3538f6f826c01ced47cbc5fbb8fd29f506 100644 --- a/docs/plugins/html/gst-plugins-good-plugins-rtpsession.html +++ b/docs/plugins/html/gst-plugins-good-plugins-rtpsession.html @@ -116,6 +116,21 @@ <td class="property_name"><a class="link" href="gst-plugins-good-plugins-rtpsession.html#GstRtpSession--ntp-time-source" title="The “ntp-time-source†property">ntp-time-source</a></td> <td class="property_flags">Read / Write</td> </tr> +<tr> +<td class="property_type"><a href="https://developer.gnome.org/glib/unstable/glib-Basic-Types.html#guint"><span class="type">guint</span></a></td> +<td class="property_name"><a class="link" href="gst-plugins-good-plugins-rtpsession.html#GstRtpSession--max-dropout-time" title="The “max-dropout-time†property">max-dropout-time</a></td> +<td class="property_flags">Read / Write</td> +</tr> +<tr> +<td class="property_type"><a href="https://developer.gnome.org/glib/unstable/glib-Basic-Types.html#guint"><span class="type">guint</span></a></td> +<td class="property_name"><a class="link" href="gst-plugins-good-plugins-rtpsession.html#GstRtpSession--max-misorder-time" title="The “max-misorder-time†property">max-misorder-time</a></td> +<td class="property_flags">Read / Write</td> +</tr> +<tr> +<td class="property_type"><a href="https://developer.gnome.org/glib/unstable/glib-Basic-Types.html#gboolean"><span class="type">gboolean</span></a></td> +<td class="property_name"><a class="link" href="gst-plugins-good-plugins-rtpsession.html#GstRtpSession--rtcp-sync-send-time" title="The “rtcp-sync-send-time†property">rtcp-sync-send-time</a></td> +<td class="property_flags">Read / Write</td> +</tr> </tbody> </table></div> </div> @@ -184,6 +199,16 @@ <td class="signal_name"><a class="link" href="gst-plugins-good-plugins-rtpsession.html#GstRtpSession-request-pt-map" title="The “request-pt-map†signal">request-pt-map</a></td> <td class="signal_flags"><a href="https://developer.gnome.org/gobject/unstable/gobject-Signals.html#G-SIGNAL-RUN-LAST:CAPS">Run Last</a></td> </tr> +<tr> +<td class="signal_type"><span class="returnvalue">void</span></td> +<td class="signal_name"><a class="link" href="gst-plugins-good-plugins-rtpsession.html#GstRtpSession-on-new-sender-ssrc" title="The “on-new-sender-ssrc†signal">on-new-sender-ssrc</a></td> +<td class="signal_flags"><a href="https://developer.gnome.org/gobject/unstable/gobject-Signals.html#G-SIGNAL-RUN-LAST:CAPS">Run Last</a></td> +</tr> +<tr> +<td class="signal_type"><span class="returnvalue">void</span></td> +<td class="signal_name"><a class="link" href="gst-plugins-good-plugins-rtpsession.html#GstRtpSession-on-sender-ssrc-active" title="The “on-sender-ssrc-active†signal">on-sender-ssrc-active</a></td> +<td class="signal_flags"><a href="https://developer.gnome.org/gobject/unstable/gobject-Signals.html#G-SIGNAL-RUN-LAST:CAPS">Run Last</a></td> +</tr> </tbody> </table></div> </div> @@ -639,6 +664,30 @@ keep (see <a href="http://gstreamer.freedesktop.org/data/doc/gstreamer/head/gstr <p>Flags: Read / Write</p> <p>Default value: NTP time based on realtime clock</p> </div> +<hr> +<div class="refsect2"> +<a name="GstRtpSession--max-dropout-time"></a><h3>The <code class="literal">“max-dropout-timeâ€</code> property</h3> +<pre class="programlisting"> “max-dropout-time†<a href="https://developer.gnome.org/glib/unstable/glib-Basic-Types.html#guint"><span class="type">guint</span></a></pre> +<p>The maximum time (milliseconds) of missing packets tolerated.</p> +<p>Flags: Read / Write</p> +<p>Default value: 60000</p> +</div> +<hr> +<div class="refsect2"> +<a name="GstRtpSession--max-misorder-time"></a><h3>The <code class="literal">“max-misorder-timeâ€</code> property</h3> +<pre class="programlisting"> “max-misorder-time†<a href="https://developer.gnome.org/glib/unstable/glib-Basic-Types.html#guint"><span class="type">guint</span></a></pre> +<p>The maximum time (milliseconds) of misordered packets tolerated.</p> +<p>Flags: Read / Write</p> +<p>Default value: 2000</p> +</div> +<hr> +<div class="refsect2"> +<a name="GstRtpSession--rtcp-sync-send-time"></a><h3>The <code class="literal">“rtcp-sync-send-timeâ€</code> property</h3> +<pre class="programlisting"> “rtcp-sync-send-time†<a href="https://developer.gnome.org/glib/unstable/glib-Basic-Types.html#gboolean"><span class="type">gboolean</span></a></pre> +<p>Use send time or capture time for RTCP sync (TRUE = send time, FALSE = capture time).</p> +<p>Flags: Read / Write</p> +<p>Default value: TRUE</p> +</div> </div> <div class="refsect1"> <a name="gst-plugins-good-plugins-rtpsession.signal-details"></a><h2>Signal Details</h2> @@ -825,9 +874,37 @@ user_function (<a class="link" href="gst-plugins-good-plugins-rtpsession.html#Gs <div class="refsect2"> <a name="GstRtpSession-on-ssrc-active"></a><h3>The <code class="literal">“on-ssrc-activeâ€</code> signal</h3> <pre class="programlisting"><span class="returnvalue">void</span> -user_function (<a class="link" href="gst-plugins-good-plugins-rtpsession.html#GstRtpSession"><span class="type">GstRtpSession</span></a> *gstrtpsession, - <a href="https://developer.gnome.org/glib/unstable/glib-Basic-Types.html#guint"><span class="type">guint</span></a> arg1, +user_function (<a class="link" href="gst-plugins-good-plugins-rtpsession.html#GstRtpSession"><span class="type">GstRtpSession</span></a> *sess, + <a href="https://developer.gnome.org/glib/unstable/glib-Basic-Types.html#guint"><span class="type">guint</span></a> ssrc, <a href="https://developer.gnome.org/glib/unstable/glib-Basic-Types.html#gpointer"><span class="type">gpointer</span></a> user_data)</pre> +<p>Notify of a SSRC that is active, i.e., sending RTCP.</p> +<div class="refsect3"> +<a name="id-1.2.146.12.7.5"></a><h4>Parameters</h4> +<div class="informaltable"><table width="100%" border="0"> +<colgroup> +<col width="150px" class="parameters_name"> +<col class="parameters_description"> +<col width="200px" class="parameters_annotations"> +</colgroup> +<tbody> +<tr> +<td class="parameter_name"><p>sess</p></td> +<td class="parameter_description"><p>the object which received the signal</p></td> +<td class="parameter_annotations"> </td> +</tr> +<tr> +<td class="parameter_name"><p>ssrc</p></td> +<td class="parameter_description"><p>the SSRC</p></td> +<td class="parameter_annotations"> </td> +</tr> +<tr> +<td class="parameter_name"><p>user_data</p></td> +<td class="parameter_description"><p>user data set when the signal handler was connected.</p></td> +<td class="parameter_annotations"> </td> +</tr> +</tbody> +</table></div> +</div> <p>Flags: <a href="https://developer.gnome.org/gobject/unstable/gobject-Signals.html#G-SIGNAL-RUN-LAST:CAPS">Run Last</a></p> </div> <hr> @@ -960,6 +1037,80 @@ user_function (<a class="link" href="gst-plugins-good-plugins-rtpsession.html#Gs </div> <p>Flags: <a href="https://developer.gnome.org/gobject/unstable/gobject-Signals.html#G-SIGNAL-RUN-LAST:CAPS">Run Last</a></p> </div> +<hr> +<div class="refsect2"> +<a name="GstRtpSession-on-new-sender-ssrc"></a><h3>The <code class="literal">“on-new-sender-ssrcâ€</code> signal</h3> +<pre class="programlisting"><span class="returnvalue">void</span> +user_function (<a class="link" href="gst-plugins-good-plugins-rtpsession.html#GstRtpSession"><span class="type">GstRtpSession</span></a> *sess, + <a href="https://developer.gnome.org/glib/unstable/glib-Basic-Types.html#guint"><span class="type">guint</span></a> ssrc, + <a href="https://developer.gnome.org/glib/unstable/glib-Basic-Types.html#gpointer"><span class="type">gpointer</span></a> user_data)</pre> +<div class="refsect3"> +<a name="id-1.2.146.12.13.4"></a><h4>Parameters</h4> +<div class="informaltable"><table width="100%" border="0"> +<colgroup> +<col width="150px" class="parameters_name"> +<col class="parameters_description"> +<col width="200px" class="parameters_annotations"> +</colgroup> +<tbody> +<tr> +<td class="parameter_name"><p>sess</p></td> +<td class="parameter_description"><p>the object which received the signal</p></td> +<td class="parameter_annotations"> </td> +</tr> +<tr> +<td class="parameter_name"><p>ssrc</p></td> +<td class="parameter_description"><p>the sender SSRC</p></td> +<td class="parameter_annotations"> </td> +</tr> +<tr> +<td class="parameter_name"><p>user_data</p></td> +<td class="parameter_description"><p>user data set when the signal handler was connected.</p></td> +<td class="parameter_annotations"> </td> +</tr> +</tbody> +</table></div> +</div> +<p>Flags: <a href="https://developer.gnome.org/gobject/unstable/gobject-Signals.html#G-SIGNAL-RUN-LAST:CAPS">Run Last</a></p> +<p class="since">Since: 1.8</p> +</div> +<hr> +<div class="refsect2"> +<a name="GstRtpSession-on-sender-ssrc-active"></a><h3>The <code class="literal">“on-sender-ssrc-activeâ€</code> signal</h3> +<pre class="programlisting"><span class="returnvalue">void</span> +user_function (<a class="link" href="gst-plugins-good-plugins-rtpsession.html#GstRtpSession"><span class="type">GstRtpSession</span></a> *sess, + <a href="https://developer.gnome.org/glib/unstable/glib-Basic-Types.html#guint"><span class="type">guint</span></a> ssrc, + <a href="https://developer.gnome.org/glib/unstable/glib-Basic-Types.html#gpointer"><span class="type">gpointer</span></a> user_data)</pre> +<div class="refsect3"> +<a name="id-1.2.146.12.14.4"></a><h4>Parameters</h4> +<div class="informaltable"><table width="100%" border="0"> +<colgroup> +<col width="150px" class="parameters_name"> +<col class="parameters_description"> +<col width="200px" class="parameters_annotations"> +</colgroup> +<tbody> +<tr> +<td class="parameter_name"><p>sess</p></td> +<td class="parameter_description"><p>the object which received the signal</p></td> +<td class="parameter_annotations"> </td> +</tr> +<tr> +<td class="parameter_name"><p>ssrc</p></td> +<td class="parameter_description"><p>the sender SSRC</p></td> +<td class="parameter_annotations"> </td> +</tr> +<tr> +<td class="parameter_name"><p>user_data</p></td> +<td class="parameter_description"><p>user data set when the signal handler was connected.</p></td> +<td class="parameter_annotations"> </td> +</tr> +</tbody> +</table></div> +</div> +<p>Flags: <a href="https://developer.gnome.org/gobject/unstable/gobject-Signals.html#G-SIGNAL-RUN-LAST:CAPS">Run Last</a></p> +<p class="since">Since: 1.8</p> +</div> </div> <div class="refsect1"> <a name="gst-plugins-good-plugins-rtpsession.see-also"></a><h2>See Also</h2> diff --git a/docs/plugins/html/gst-plugins-good-plugins-rtspsrc.html b/docs/plugins/html/gst-plugins-good-plugins-rtspsrc.html index 17997d0e0e5bc09c8e0b788accd85124be2be58f..85c299ac1461c0e191218aa8cd38c7dd56837ddc 100644 --- a/docs/plugins/html/gst-plugins-good-plugins-rtspsrc.html +++ b/docs/plugins/html/gst-plugins-good-plugins-rtspsrc.html @@ -226,6 +226,11 @@ <td class="property_name"><a class="link" href="gst-plugins-good-plugins-rtspsrc.html#GstRTSPSrc--user-agent" title="The “user-agent†property">user-agent</a></td> <td class="property_flags">Read / Write</td> </tr> +<tr> +<td class="property_type"><a href="https://developer.gnome.org/glib/unstable/glib-Basic-Types.html#gint"><span class="type">gint</span></a></td> +<td class="property_name"><a class="link" href="gst-plugins-good-plugins-rtspsrc.html#GstRTSPSrc--max-rtcp-rtp-time-diff" title="The “max-rtcp-rtp-time-diff†property">max-rtcp-rtp-time-diff</a></td> +<td class="property_flags">Read / Write</td> +</tr> </tbody> </table></div> </div> @@ -683,7 +688,16 @@ keep alive and then this property needs to be set to FALSE.</p> <pre class="programlisting"> “user-agent†<a href="https://developer.gnome.org/glib/unstable/glib-Basic-Types.html#gchar"><span class="type">gchar</span></a> *</pre> <p>The User-Agent string to send to the server.</p> <p>Flags: Read / Write</p> -<p>Default value: "GStreamer/1.6.2"</p> +<p>Default value: "GStreamer/1.7.1"</p> +</div> +<hr> +<div class="refsect2"> +<a name="GstRTSPSrc--max-rtcp-rtp-time-diff"></a><h3>The <code class="literal">“max-rtcp-rtp-time-diffâ€</code> property</h3> +<pre class="programlisting"> “max-rtcp-rtp-time-diff†<a href="https://developer.gnome.org/glib/unstable/glib-Basic-Types.html#gint"><span class="type">gint</span></a></pre> +<p>Maximum amount of time in ms that the RTP time in RTCP SRs is allowed to be ahead (-1 disabled).</p> +<p>Flags: Read / Write</p> +<p>Allowed values: >= G_MAXULONG</p> +<p>Default value: 1000</p> </div> </div> <div class="refsect1"> diff --git a/docs/plugins/html/gst-plugins-good-plugins-scaletempo.html b/docs/plugins/html/gst-plugins-good-plugins-scaletempo.html index 5f1e98cdccd155fdb2db9b87d659e6523a40a194..2c271ee6350af635574d8ad89c434bf5cbce96cd 100644 --- a/docs/plugins/html/gst-plugins-good-plugins-scaletempo.html +++ b/docs/plugins/html/gst-plugins-good-plugins-scaletempo.html @@ -199,6 +199,10 @@ the algoritm looks. </tr> <tr> <td><p><span class="term"></span></p></td> +<td> audio/x-raw, format=(string)F64LE, rate=(int)[ 1, 2147483647 ], channels=(int)[ 1, 2147483647 ]</td> +</tr> +<tr> +<td><p><span class="term"></span></p></td> <td> audio/x-raw, format=(string)S16LE, rate=(int)[ 1, 2147483647 ], channels=(int)[ 1, 2147483647 ]</td> </tr> </tbody> @@ -227,6 +231,10 @@ the algoritm looks. </tr> <tr> <td><p><span class="term"></span></p></td> +<td> audio/x-raw, format=(string)F64LE, rate=(int)[ 1, 2147483647 ], channels=(int)[ 1, 2147483647 ]</td> +</tr> +<tr> +<td><p><span class="term"></span></p></td> <td> audio/x-raw, format=(string)S16LE, rate=(int)[ 1, 2147483647 ], channels=(int)[ 1, 2147483647 ]</td> </tr> </tbody> diff --git a/docs/plugins/html/gst-plugins-good-plugins-souphttpsrc.html b/docs/plugins/html/gst-plugins-good-plugins-souphttpsrc.html index 5741c138b0947d0bda1ec5834251340f4cdd7bd9..92a5fc271c6df8b2362c0e5970fe1ec4a9c1a403 100644 --- a/docs/plugins/html/gst-plugins-good-plugins-souphttpsrc.html +++ b/docs/plugins/html/gst-plugins-good-plugins-souphttpsrc.html @@ -164,6 +164,12 @@ <td class="property_name"><a class="link" href="gst-plugins-good-plugins-souphttpsrc.html#GstSoupHTTPSrc--method" title="The “method†property">method</a></td> <td class="property_flags">Read / Write</td> </tr> +<tr> +<td class="property_type"> +<a href="https://developer.gnome.org/gio/unstable/GTlsInteraction.html"><span class="type">GTlsInteraction</span></a> *</td> +<td class="property_name"><a class="link" href="gst-plugins-good-plugins-souphttpsrc.html#GstSoupHTTPSrc--tls-interaction" title="The “tls-interaction†property">tls-interaction</a></td> +<td class="property_flags">Read / Write</td> +</tr> </tbody> </table></div> </div> @@ -443,6 +449,13 @@ GstSoupHTTPSrc implements <p>Flags: Read / Write</p> <p>Default value: NULL</p> </div> +<hr> +<div class="refsect2"> +<a name="GstSoupHTTPSrc--tls-interaction"></a><h3>The <code class="literal">“tls-interactionâ€</code> property</h3> +<pre class="programlisting"> “tls-interaction†<a href="https://developer.gnome.org/gio/unstable/GTlsInteraction.html"><span class="type">GTlsInteraction</span></a> *</pre> +<p>A GTlsInteraction object to be used when the connection or certificate database need to interact with the user.</p> +<p>Flags: Read / Write</p> +</div> </div> </div> <div class="footer"> diff --git a/docs/plugins/html/gst-plugins-good-plugins-udpsrc.html b/docs/plugins/html/gst-plugins-good-plugins-udpsrc.html index f213185a101150ef12d4d22f0ad6ddb397e37897..d642c1f5e436a1dd443146e31d318d059d2ac8c3 100644 --- a/docs/plugins/html/gst-plugins-good-plugins-udpsrc.html +++ b/docs/plugins/html/gst-plugins-good-plugins-udpsrc.html @@ -120,6 +120,11 @@ <td class="property_name"><a class="link" href="gst-plugins-good-plugins-udpsrc.html#GstUDPSrc--address" title="The “address†property">address</a></td> <td class="property_flags">Read / Write</td> </tr> +<tr> +<td class="property_type"><a href="https://developer.gnome.org/glib/unstable/glib-Basic-Types.html#gboolean"><span class="type">gboolean</span></a></td> +<td class="property_name"><a class="link" href="gst-plugins-good-plugins-udpsrc.html#GstUDPSrc--loop" title="The “loop†property">loop</a></td> +<td class="property_flags">Read / Write</td> +</tr> </tbody> </table></div> </div> @@ -166,7 +171,7 @@ property to the IP address of the multicast group.</p> property, udpsrc will then not allocate a socket itself but use the provided one.</p> <p>The <a class="link" href="gst-plugins-good-plugins-udpsrc.html#GstUDPSrc--caps" title="The “caps†property"><span class="type">“capsâ€</span></a> property is mainly used to give a type to the UDP packet -so that they can be autoplugged in GStreamer pipelines. This is very usefull +so that they can be autoplugged in GStreamer pipelines. This is very useful for RTP implementations where the contents of the UDP packets is transfered out-of-bounds using SDP or other means.</p> <p>The <a class="link" href="gst-plugins-good-plugins-udpsrc.html#GstUDPSrc--buffer-size" title="The “buffer-size†property"><span class="type">“buffer-sizeâ€</span></a> property is used to change the default kernel @@ -420,6 +425,14 @@ above mentioned pipeline should dump data packets to the console. <p>Flags: Read / Write</p> <p>Default value: "0.0.0.0"</p> </div> +<hr> +<div class="refsect2"> +<a name="GstUDPSrc--loop"></a><h3>The <code class="literal">“loopâ€</code> property</h3> +<pre class="programlisting"> “loop†<a href="https://developer.gnome.org/glib/unstable/glib-Basic-Types.html#gboolean"><span class="type">gboolean</span></a></pre> +<p>Used for setting the multicast loop parameter. TRUE = enable, FALSE = disable.</p> +<p>Flags: Read / Write</p> +<p>Default value: TRUE</p> +</div> </div> <div class="refsect1"> <a name="gst-plugins-good-plugins-udpsrc.see-also"></a><h2>See Also</h2> diff --git a/docs/plugins/html/gst-plugins-good-plugins-v4l2sink.html b/docs/plugins/html/gst-plugins-good-plugins-v4l2sink.html index 31d363ab63be1bc5da33ebd89ce36d0b4c46daf8..dee69620be968e1ea0b5dd3ca11eb45e09804c9a 100644 --- a/docs/plugins/html/gst-plugins-good-plugins-v4l2sink.html +++ b/docs/plugins/html/gst-plugins-good-plugins-v4l2sink.html @@ -265,7 +265,7 @@ GstV4l2Sink implements </tr> <tr> <td><p><span class="term"></span></p></td> -<td> video/x-h264, stream-format=(string)byte-stream, alignment=(string)au</td> +<td> video/x-h264, stream-format=(string){ byte-stream, avc }, alignment=(string)au</td> </tr> <tr> <td><p><span class="term"></span></p></td> @@ -277,7 +277,7 @@ GstV4l2Sink implements </tr> <tr> <td><p><span class="term"></span></p></td> -<td> video/x-raw, format=(string){ RGB15, RGB16, BGR, RGB, BGRx, BGRA, xRGB, ARGB, GRAY8, YVU9, YV12, YUY2, UYVY, Y42B, Y41B, NV12_64Z32, YUV9, I420, YVYU, NV21, NV12 }, width=(int)[ 1, 32768 ], height=(int)[ 1, 32768 ], framerate=(fraction)[ 0/1, 2147483647/1 ]</td> +<td> video/x-raw, format=(string){ RGB16, BGR, RGB, GRAY8, GRAY16_LE, GRAY16_BE, YVU9, YV12, YUY2, YVYU, UYVY, Y42B, Y41B, YUV9, NV12_64Z32, NV24, NV61, NV16, NV21, NV12, I420, BGRA, BGRx, ARGB, xRGB, BGR15, RGB15 }, width=(int)[ 1, 32768 ], height=(int)[ 1, 32768 ], framerate=(fraction)[ 0/1, 2147483647/1 ]</td> </tr> <tr> <td><p><span class="term"></span></p></td> @@ -287,6 +287,10 @@ GstV4l2Sink implements <td><p><span class="term"></span></p></td> <td> video/x-vp8</td> </tr> +<tr> +<td><p><span class="term"></span></p></td> +<td> video/x-wmv, wmvversion=(int)3, format=(string)WVC1</td> +</tr> </tbody> </table></div> </div> diff --git a/docs/plugins/html/gst-plugins-good-plugins-v4l2src.html b/docs/plugins/html/gst-plugins-good-plugins-v4l2src.html index 8d35db99ee3d1874b06a0e6939c50d5be6db41a3..fbb4a5616b41f6e947254f5977a36e4f2fbd2abf 100644 --- a/docs/plugins/html/gst-plugins-good-plugins-v4l2src.html +++ b/docs/plugins/html/gst-plugins-good-plugins-v4l2src.html @@ -241,7 +241,7 @@ GstV4l2Src implements </tr> <tr> <td><p><span class="term"></span></p></td> -<td> video/x-h264, stream-format=(string)byte-stream, alignment=(string)au</td> +<td> video/x-h264, stream-format=(string){ byte-stream, avc }, alignment=(string)au</td> </tr> <tr> <td><p><span class="term"></span></p></td> @@ -253,7 +253,7 @@ GstV4l2Src implements </tr> <tr> <td><p><span class="term"></span></p></td> -<td> video/x-raw, format=(string){ RGB15, RGB16, BGR, RGB, BGRx, BGRA, xRGB, ARGB, GRAY8, YVU9, YV12, YUY2, UYVY, Y42B, Y41B, NV12_64Z32, YUV9, I420, YVYU, NV21, NV12 }, width=(int)[ 1, 32768 ], height=(int)[ 1, 32768 ], framerate=(fraction)[ 0/1, 2147483647/1 ]</td> +<td> video/x-raw, format=(string){ RGB16, BGR, RGB, GRAY8, GRAY16_LE, GRAY16_BE, YVU9, YV12, YUY2, YVYU, UYVY, Y42B, Y41B, YUV9, NV12_64Z32, NV24, NV61, NV16, NV21, NV12, I420, BGRA, BGRx, ARGB, xRGB, BGR15, RGB15 }, width=(int)[ 1, 32768 ], height=(int)[ 1, 32768 ], framerate=(fraction)[ 0/1, 2147483647/1 ]</td> </tr> <tr> <td><p><span class="term"></span></p></td> @@ -263,6 +263,10 @@ GstV4l2Src implements <td><p><span class="term"></span></p></td> <td> video/x-vp8</td> </tr> +<tr> +<td><p><span class="term"></span></p></td> +<td> video/x-wmv, wmvversion=(int)3, format=(string)WVC1</td> +</tr> </tbody> </table></div> </div> diff --git a/docs/plugins/html/gst-plugins-good-plugins-vp8dec.html b/docs/plugins/html/gst-plugins-good-plugins-vp8dec.html index e4215c21660c12dcfe14ca6a90fcb5941467816f..dd9408dc51c72b28d759052ee7c9e2877f49c228 100644 --- a/docs/plugins/html/gst-plugins-good-plugins-vp8dec.html +++ b/docs/plugins/html/gst-plugins-good-plugins-vp8dec.html @@ -90,7 +90,8 @@ <span class="lineart">╰──</span> <a href="http://gstreamer.freedesktop.org/data/doc/gstreamer/head/gstreamer/html/GstObject.html">GstObject</a> <span class="lineart">╰──</span> <a href="http://gstreamer.freedesktop.org/data/doc/gstreamer/head/gstreamer/html/GstElement.html">GstElement</a> <span class="lineart">╰──</span> <a href="http://gstreamer.freedesktop.org/data/doc/gstreamer/head/gst-plugins-base-libs/html/gst-plugins-base-libs-GstVideoDecoder.html#GstVideoDecoder">GstVideoDecoder</a> - <span class="lineart">╰──</span> GstVP8Dec + <span class="lineart">╰──</span> GstVPXDec + <span class="lineart">╰──</span> GstVP8Dec </pre> </div> <div class="refsect1"> diff --git a/docs/plugins/html/gst-plugins-good-plugins-vp8enc.html b/docs/plugins/html/gst-plugins-good-plugins-vp8enc.html index ad2dfe28907cb811c71552f1bce192410c4e1142..4ee469a11cad4374e784e828b3f2bcc2dec2f062 100644 --- a/docs/plugins/html/gst-plugins-good-plugins-vp8enc.html +++ b/docs/plugins/html/gst-plugins-good-plugins-vp8enc.html @@ -290,7 +290,8 @@ <span class="lineart">╰──</span> <a href="http://gstreamer.freedesktop.org/data/doc/gstreamer/head/gstreamer/html/GstObject.html">GstObject</a> <span class="lineart">╰──</span> <a href="http://gstreamer.freedesktop.org/data/doc/gstreamer/head/gstreamer/html/GstElement.html">GstElement</a> <span class="lineart">╰──</span> <a href="http://gstreamer.freedesktop.org/data/doc/gstreamer/head/gst-plugins-base-libs/html/gst-plugins-base-libs-GstVideoEncoder.html#GstVideoEncoder">GstVideoEncoder</a> - <span class="lineart">╰──</span> GstVP8Enc + <span class="lineart">╰──</span> GstVPXEnc + <span class="lineart">╰──</span> GstVP8Enc </pre> </div> <div class="refsect1"> diff --git a/docs/plugins/html/gst-plugins-good-plugins-webmmux.html b/docs/plugins/html/gst-plugins-good-plugins-webmmux.html index e0ac4b10a9cb90d8480c40d0dd56a582a2f10eb1..916e3ec9a6fa69b47c4240b0944599b07285be81 100644 --- a/docs/plugins/html/gst-plugins-good-plugins-webmmux.html +++ b/docs/plugins/html/gst-plugins-good-plugins-webmmux.html @@ -75,7 +75,7 @@ GstWebMMux implements 2 3 4</pre></td> - <td class="listing_code"><pre class="programlisting">gst<span class="gtkdoc opt">-</span>launch<span class="gtkdoc opt">-</span><span class="number">0.10</span> webmmux name<span class="gtkdoc opt">=</span>mux <span class="gtkdoc opt">!</span> filesink location<span class="gtkdoc opt">=</span>newfile<span class="gtkdoc opt">.</span>webm \ + <td class="listing_code"><pre class="programlisting">gst<span class="gtkdoc opt">-</span>launch<span class="gtkdoc opt">-</span><span class="number">1.0</span> webmmux name<span class="gtkdoc opt">=</span>mux <span class="gtkdoc opt">!</span> filesink location<span class="gtkdoc opt">=</span>newfile<span class="gtkdoc opt">.</span>webm \ uridecodebin uri<span class="gtkdoc opt">=</span>file<span class="gtkdoc opt">:</span><span class="gtkdoc slc">///path/to/somefile.ogv name=demux \</span> demux<span class="gtkdoc opt">. !</span> videoconvert <span class="gtkdoc opt">!</span> vp8enc <span class="gtkdoc opt">!</span> queue <span class="gtkdoc opt">!</span> mux<span class="gtkdoc opt">.</span>video_0 \ demux<span class="gtkdoc opt">. !</span> progressreport <span class="gtkdoc opt">!</span> audioconvert <span class="gtkdoc opt">!</span> audiorate <span class="gtkdoc opt">!</span> vorbisenc <span class="gtkdoc opt">!</span> queue <span class="gtkdoc opt">!</span> mux<span class="gtkdoc opt">.</span>audio_0</pre></td> @@ -91,7 +91,7 @@ GstWebMMux implements <td class="listing_lines" align="right"><pre>1 2 3</pre></td> - <td class="listing_code"><pre class="programlisting">gst<span class="gtkdoc opt">-</span>launch<span class="gtkdoc opt">-</span><span class="number">0.10</span> webmmux name<span class="gtkdoc opt">=</span>mux <span class="gtkdoc opt">!</span> filesink location<span class="gtkdoc opt">=</span>test<span class="gtkdoc opt">.</span>webm \ + <td class="listing_code"><pre class="programlisting">gst<span class="gtkdoc opt">-</span>launch<span class="gtkdoc opt">-</span><span class="number">1.0</span> webmmux name<span class="gtkdoc opt">=</span>mux <span class="gtkdoc opt">!</span> filesink location<span class="gtkdoc opt">=</span>test<span class="gtkdoc opt">.</span>webm \ videotestsrc num<span class="gtkdoc opt">-</span>buffers<span class="gtkdoc opt">=</span><span class="number">250</span> <span class="gtkdoc opt">!</span> video<span class="gtkdoc opt">/</span>x<span class="gtkdoc opt">-</span>raw<span class="gtkdoc opt">,</span>framerate<span class="gtkdoc opt">=</span><span class="number">25</span><span class="gtkdoc opt">/</span><span class="number">1</span> <span class="gtkdoc opt">!</span> videoconvert <span class="gtkdoc opt">!</span> vp8enc <span class="gtkdoc opt">!</span> queue <span class="gtkdoc opt">!</span> mux<span class="gtkdoc opt">.</span>video_0 \ audiotestsrc samplesperbuffer<span class="gtkdoc opt">=</span><span class="number">44100</span> num<span class="gtkdoc opt">-</span>buffers<span class="gtkdoc opt">=</span><span class="number">10</span> <span class="gtkdoc opt">!</span> audio<span class="gtkdoc opt">/</span>x<span class="gtkdoc opt">-</span>raw<span class="gtkdoc opt">,</span>rate<span class="gtkdoc opt">=</span><span class="number">44100</span> <span class="gtkdoc opt">!</span> vorbisenc <span class="gtkdoc opt">!</span> queue <span class="gtkdoc opt">!</span> mux<span class="gtkdoc opt">.</span>audio_0</pre></td> </tr> @@ -152,6 +152,10 @@ GstWebMMux implements <td><p><span class="term">details</span></p></td> <td>audio/x-vorbis, channels=(int)[ 1, 2147483647 ], rate=(int)[ 1, 2147483647 ]</td> </tr> +<tr> +<td><p><span class="term"></span></p></td> +<td> audio/x-opus, channels=(int)[ 1, 2147483647 ], rate=(int)[ 1, 2147483647 ]</td> +</tr> </tbody> </table></div> <div class="variablelist"><table border="0" class="variablelist"> diff --git a/docs/plugins/html/index.html b/docs/plugins/html/index.html index ca98af4bc9ab632607b1ae31369381f2e4f9736a..2e206a36ac28ccf6c28d0d4d3f529bb0a12d3014 100644 --- a/docs/plugins/html/index.html +++ b/docs/plugins/html/index.html @@ -15,7 +15,7 @@ <div> <div><table class="navigation" id="top" width="100%" cellpadding="2" cellspacing="0"><tr><th valign="middle"><p class="title">GStreamer Good Plugins 1.0 Plugins Reference Manual</p></th></tr></table></div> <div><p class="releaseinfo"> - for GStreamer Good Plugins 1.0 (1.6.2) + for GStreamer Good Plugins 1.0 (1.7.1) The latest version of this documentation can be found on-line at <a class="ulink" href="http://gstreamer.freedesktop.org/data/doc/gstreamer/head/gst-plugins-good/html/" target="_top">http://gstreamer.freedesktop.org/data/doc/gstreamer/head/gst-plugins-good/html/</a>. </p></div> diff --git a/docs/plugins/html/index.sgml b/docs/plugins/html/index.sgml index 069dbfd6dbc3f67bea4fdade256d03012b534072..671dc4842bda79f7ab50e1900d79dda4e39c3703 100644 --- a/docs/plugins/html/index.sgml +++ b/docs/plugins/html/index.sgml @@ -1520,6 +1520,10 @@ <ANCHOR id="GstRtpBin--do-retransmission" href="gst-plugins-good-plugins-1.0/gst-plugins-good-plugins-rtpbin.html#GstRtpBin--do-retransmission"> <ANCHOR id="GstRtpBin--rtp-profile" href="gst-plugins-good-plugins-1.0/gst-plugins-good-plugins-rtpbin.html#GstRtpBin--rtp-profile"> <ANCHOR id="GstRtpBin--ntp-time-source" href="gst-plugins-good-plugins-1.0/gst-plugins-good-plugins-rtpbin.html#GstRtpBin--ntp-time-source"> +<ANCHOR id="GstRtpBin--max-dropout-time" href="gst-plugins-good-plugins-1.0/gst-plugins-good-plugins-rtpbin.html#GstRtpBin--max-dropout-time"> +<ANCHOR id="GstRtpBin--max-misorder-time" href="gst-plugins-good-plugins-1.0/gst-plugins-good-plugins-rtpbin.html#GstRtpBin--max-misorder-time"> +<ANCHOR id="GstRtpBin--max-rtcp-rtp-time-diff" href="gst-plugins-good-plugins-1.0/gst-plugins-good-plugins-rtpbin.html#GstRtpBin--max-rtcp-rtp-time-diff"> +<ANCHOR id="GstRtpBin--rtcp-sync-send-time" href="gst-plugins-good-plugins-1.0/gst-plugins-good-plugins-rtpbin.html#GstRtpBin--rtcp-sync-send-time"> <ANCHOR id="gst-plugins-good-plugins-rtpbin.signal-details" href="gst-plugins-good-plugins-1.0/gst-plugins-good-plugins-rtpbin.html#gst-plugins-good-plugins-rtpbin.signal-details"> <ANCHOR id="GstRtpBin-clear-pt-map" href="gst-plugins-good-plugins-1.0/gst-plugins-good-plugins-rtpbin.html#GstRtpBin-clear-pt-map"> <ANCHOR id="GstRtpBin-get-internal-session" href="gst-plugins-good-plugins-1.0/gst-plugins-good-plugins-rtpbin.html#GstRtpBin-get-internal-session"> @@ -1543,6 +1547,8 @@ <ANCHOR id="GstRtpBin-request-rtcp-encoder" href="gst-plugins-good-plugins-1.0/gst-plugins-good-plugins-rtpbin.html#GstRtpBin-request-rtcp-encoder"> <ANCHOR id="GstRtpBin-request-rtp-decoder" href="gst-plugins-good-plugins-1.0/gst-plugins-good-plugins-rtpbin.html#GstRtpBin-request-rtp-decoder"> <ANCHOR id="GstRtpBin-request-rtp-encoder" href="gst-plugins-good-plugins-1.0/gst-plugins-good-plugins-rtpbin.html#GstRtpBin-request-rtp-encoder"> +<ANCHOR id="GstRtpBin-on-new-sender-ssrc" href="gst-plugins-good-plugins-1.0/gst-plugins-good-plugins-rtpbin.html#GstRtpBin-on-new-sender-ssrc"> +<ANCHOR id="GstRtpBin-on-sender-ssrc-active" href="gst-plugins-good-plugins-1.0/gst-plugins-good-plugins-rtpbin.html#GstRtpBin-on-sender-ssrc-active"> <ANCHOR id="gst-plugins-good-plugins-rtpbin.see-also" href="gst-plugins-good-plugins-1.0/gst-plugins-good-plugins-rtpbin.html#gst-plugins-good-plugins-rtpbin.see-also"> <ANCHOR id="gst-plugins-good-plugins-rtpbvdepay" href="gst-plugins-good-plugins-1.0/gst-plugins-good-plugins-rtpbvdepay.html"> <ANCHOR id="gst-plugins-good-plugins-rtpbvdepay.description" href="gst-plugins-good-plugins-1.0/gst-plugins-good-plugins-rtpbvdepay.html#gst-plugins-good-plugins-rtpbvdepay.description"> @@ -1667,6 +1673,7 @@ <ANCHOR id="GstRTSPSrc--tls-interaction" href="gst-plugins-good-plugins-1.0/gst-plugins-good-plugins-rtspsrc.html#GstRTSPSrc--tls-interaction"> <ANCHOR id="GstRTSPSrc--ntp-time-source" href="gst-plugins-good-plugins-1.0/gst-plugins-good-plugins-rtspsrc.html#GstRTSPSrc--ntp-time-source"> <ANCHOR id="GstRTSPSrc--user-agent" href="gst-plugins-good-plugins-1.0/gst-plugins-good-plugins-rtspsrc.html#GstRTSPSrc--user-agent"> +<ANCHOR id="GstRTSPSrc--max-rtcp-rtp-time-diff" href="gst-plugins-good-plugins-1.0/gst-plugins-good-plugins-rtspsrc.html#GstRTSPSrc--max-rtcp-rtp-time-diff"> <ANCHOR id="gst-plugins-good-plugins-rtspsrc.signal-details" href="gst-plugins-good-plugins-1.0/gst-plugins-good-plugins-rtspsrc.html#gst-plugins-good-plugins-rtspsrc.signal-details"> <ANCHOR id="GstRTSPSrc-handle-request" href="gst-plugins-good-plugins-1.0/gst-plugins-good-plugins-rtspsrc.html#GstRTSPSrc-handle-request"> <ANCHOR id="GstRTSPSrc-on-sdp" href="gst-plugins-good-plugins-1.0/gst-plugins-good-plugins-rtspsrc.html#GstRTSPSrc-on-sdp"> @@ -1710,6 +1717,10 @@ <ANCHOR id="GstRtpBin--do-retransmission" href="gst-plugins-good-plugins-1.0/gst-plugins-good-plugins-rtpbin.html#GstRtpBin--do-retransmission"> <ANCHOR id="GstRtpBin--rtp-profile" href="gst-plugins-good-plugins-1.0/gst-plugins-good-plugins-rtpbin.html#GstRtpBin--rtp-profile"> <ANCHOR id="GstRtpBin--ntp-time-source" href="gst-plugins-good-plugins-1.0/gst-plugins-good-plugins-rtpbin.html#GstRtpBin--ntp-time-source"> +<ANCHOR id="GstRtpBin--max-dropout-time" href="gst-plugins-good-plugins-1.0/gst-plugins-good-plugins-rtpbin.html#GstRtpBin--max-dropout-time"> +<ANCHOR id="GstRtpBin--max-misorder-time" href="gst-plugins-good-plugins-1.0/gst-plugins-good-plugins-rtpbin.html#GstRtpBin--max-misorder-time"> +<ANCHOR id="GstRtpBin--max-rtcp-rtp-time-diff" href="gst-plugins-good-plugins-1.0/gst-plugins-good-plugins-rtpbin.html#GstRtpBin--max-rtcp-rtp-time-diff"> +<ANCHOR id="GstRtpBin--rtcp-sync-send-time" href="gst-plugins-good-plugins-1.0/gst-plugins-good-plugins-rtpbin.html#GstRtpBin--rtcp-sync-send-time"> <ANCHOR id="gst-plugins-good-plugins-rtpbin.signal-details" href="gst-plugins-good-plugins-1.0/gst-plugins-good-plugins-rtpbin.html#gst-plugins-good-plugins-rtpbin.signal-details"> <ANCHOR id="GstRtpBin-clear-pt-map" href="gst-plugins-good-plugins-1.0/gst-plugins-good-plugins-rtpbin.html#GstRtpBin-clear-pt-map"> <ANCHOR id="GstRtpBin-get-internal-session" href="gst-plugins-good-plugins-1.0/gst-plugins-good-plugins-rtpbin.html#GstRtpBin-get-internal-session"> @@ -1733,6 +1744,8 @@ <ANCHOR id="GstRtpBin-request-rtcp-encoder" href="gst-plugins-good-plugins-1.0/gst-plugins-good-plugins-rtpbin.html#GstRtpBin-request-rtcp-encoder"> <ANCHOR id="GstRtpBin-request-rtp-decoder" href="gst-plugins-good-plugins-1.0/gst-plugins-good-plugins-rtpbin.html#GstRtpBin-request-rtp-decoder"> <ANCHOR id="GstRtpBin-request-rtp-encoder" href="gst-plugins-good-plugins-1.0/gst-plugins-good-plugins-rtpbin.html#GstRtpBin-request-rtp-encoder"> +<ANCHOR id="GstRtpBin-on-new-sender-ssrc" href="gst-plugins-good-plugins-1.0/gst-plugins-good-plugins-rtpbin.html#GstRtpBin-on-new-sender-ssrc"> +<ANCHOR id="GstRtpBin-on-sender-ssrc-active" href="gst-plugins-good-plugins-1.0/gst-plugins-good-plugins-rtpbin.html#GstRtpBin-on-sender-ssrc-active"> <ANCHOR id="gst-plugins-good-plugins-rtpbin.see-also" href="gst-plugins-good-plugins-1.0/gst-plugins-good-plugins-rtpbin.html#gst-plugins-good-plugins-rtpbin.see-also"> <ANCHOR id="gst-plugins-good-plugins-rtpdec" href="gst-plugins-good-plugins-1.0/gst-plugins-good-plugins-rtpdec.html"> <ANCHOR id="gst-plugins-good-plugins-rtpdec.properties" href="gst-plugins-good-plugins-1.0/gst-plugins-good-plugins-rtpdec.html#gst-plugins-good-plugins-rtpdec.properties"> @@ -1831,6 +1844,9 @@ <ANCHOR id="GstRtpJitterBuffer--rtx-min-retry-timeout" href="gst-plugins-good-plugins-1.0/gst-plugins-good-plugins-rtpjitterbuffer.html#GstRtpJitterBuffer--rtx-min-retry-timeout"> <ANCHOR id="GstRtpJitterBuffer--rtx-max-retries" href="gst-plugins-good-plugins-1.0/gst-plugins-good-plugins-rtpjitterbuffer.html#GstRtpJitterBuffer--rtx-max-retries"> <ANCHOR id="GstRtpJitterBuffer--rtx-next-seqnum" href="gst-plugins-good-plugins-1.0/gst-plugins-good-plugins-rtpjitterbuffer.html#GstRtpJitterBuffer--rtx-next-seqnum"> +<ANCHOR id="GstRtpJitterBuffer--max-dropout-time" href="gst-plugins-good-plugins-1.0/gst-plugins-good-plugins-rtpjitterbuffer.html#GstRtpJitterBuffer--max-dropout-time"> +<ANCHOR id="GstRtpJitterBuffer--max-misorder-time" href="gst-plugins-good-plugins-1.0/gst-plugins-good-plugins-rtpjitterbuffer.html#GstRtpJitterBuffer--max-misorder-time"> +<ANCHOR id="GstRtpJitterBuffer--max-rtcp-rtp-time-diff" href="gst-plugins-good-plugins-1.0/gst-plugins-good-plugins-rtpjitterbuffer.html#GstRtpJitterBuffer--max-rtcp-rtp-time-diff"> <ANCHOR id="gst-plugins-good-plugins-rtpjitterbuffer.signal-details" href="gst-plugins-good-plugins-1.0/gst-plugins-good-plugins-rtpjitterbuffer.html#gst-plugins-good-plugins-rtpjitterbuffer.signal-details"> <ANCHOR id="GstRtpJitterBuffer-clear-pt-map" href="gst-plugins-good-plugins-1.0/gst-plugins-good-plugins-rtpjitterbuffer.html#GstRtpJitterBuffer-clear-pt-map"> <ANCHOR id="GstRtpJitterBuffer-handle-sync" href="gst-plugins-good-plugins-1.0/gst-plugins-good-plugins-rtpjitterbuffer.html#GstRtpJitterBuffer-handle-sync"> @@ -1981,6 +1997,9 @@ <ANCHOR id="GstRtpSession--stats" href="gst-plugins-good-plugins-1.0/gst-plugins-good-plugins-rtpsession.html#GstRtpSession--stats"> <ANCHOR id="GstRtpSession--rtp-profile" href="gst-plugins-good-plugins-1.0/gst-plugins-good-plugins-rtpsession.html#GstRtpSession--rtp-profile"> <ANCHOR id="GstRtpSession--ntp-time-source" href="gst-plugins-good-plugins-1.0/gst-plugins-good-plugins-rtpsession.html#GstRtpSession--ntp-time-source"> +<ANCHOR id="GstRtpSession--max-dropout-time" href="gst-plugins-good-plugins-1.0/gst-plugins-good-plugins-rtpsession.html#GstRtpSession--max-dropout-time"> +<ANCHOR id="GstRtpSession--max-misorder-time" href="gst-plugins-good-plugins-1.0/gst-plugins-good-plugins-rtpsession.html#GstRtpSession--max-misorder-time"> +<ANCHOR id="GstRtpSession--rtcp-sync-send-time" href="gst-plugins-good-plugins-1.0/gst-plugins-good-plugins-rtpsession.html#GstRtpSession--rtcp-sync-send-time"> <ANCHOR id="gst-plugins-good-plugins-rtpsession.signal-details" href="gst-plugins-good-plugins-1.0/gst-plugins-good-plugins-rtpsession.html#gst-plugins-good-plugins-rtpsession.signal-details"> <ANCHOR id="GstRtpSession-clear-pt-map" href="gst-plugins-good-plugins-1.0/gst-plugins-good-plugins-rtpsession.html#GstRtpSession-clear-pt-map"> <ANCHOR id="GstRtpSession-on-bye-ssrc" href="gst-plugins-good-plugins-1.0/gst-plugins-good-plugins-rtpsession.html#GstRtpSession-on-bye-ssrc"> @@ -1993,6 +2012,8 @@ <ANCHOR id="GstRtpSession-on-ssrc-validated" href="gst-plugins-good-plugins-1.0/gst-plugins-good-plugins-rtpsession.html#GstRtpSession-on-ssrc-validated"> <ANCHOR id="GstRtpSession-on-timeout" href="gst-plugins-good-plugins-1.0/gst-plugins-good-plugins-rtpsession.html#GstRtpSession-on-timeout"> <ANCHOR id="GstRtpSession-request-pt-map" href="gst-plugins-good-plugins-1.0/gst-plugins-good-plugins-rtpsession.html#GstRtpSession-request-pt-map"> +<ANCHOR id="GstRtpSession-on-new-sender-ssrc" href="gst-plugins-good-plugins-1.0/gst-plugins-good-plugins-rtpsession.html#GstRtpSession-on-new-sender-ssrc"> +<ANCHOR id="GstRtpSession-on-sender-ssrc-active" href="gst-plugins-good-plugins-1.0/gst-plugins-good-plugins-rtpsession.html#GstRtpSession-on-sender-ssrc-active"> <ANCHOR id="gst-plugins-good-plugins-rtpsession.see-also" href="gst-plugins-good-plugins-1.0/gst-plugins-good-plugins-rtpsession.html#gst-plugins-good-plugins-rtpsession.see-also"> <ANCHOR id="gst-plugins-good-plugins-rtpssrcdemux" href="gst-plugins-good-plugins-1.0/gst-plugins-good-plugins-rtpssrcdemux.html"> <ANCHOR id="gst-plugins-good-plugins-rtpssrcdemux.signals" href="gst-plugins-good-plugins-1.0/gst-plugins-good-plugins-rtpssrcdemux.html#gst-plugins-good-plugins-rtpssrcdemux.signals"> @@ -2053,6 +2074,7 @@ <ANCHOR id="GstRTSPSrc--tls-interaction" href="gst-plugins-good-plugins-1.0/gst-plugins-good-plugins-rtspsrc.html#GstRTSPSrc--tls-interaction"> <ANCHOR id="GstRTSPSrc--ntp-time-source" href="gst-plugins-good-plugins-1.0/gst-plugins-good-plugins-rtspsrc.html#GstRTSPSrc--ntp-time-source"> <ANCHOR id="GstRTSPSrc--user-agent" href="gst-plugins-good-plugins-1.0/gst-plugins-good-plugins-rtspsrc.html#GstRTSPSrc--user-agent"> +<ANCHOR id="GstRTSPSrc--max-rtcp-rtp-time-diff" href="gst-plugins-good-plugins-1.0/gst-plugins-good-plugins-rtspsrc.html#GstRTSPSrc--max-rtcp-rtp-time-diff"> <ANCHOR id="gst-plugins-good-plugins-rtspsrc.signal-details" href="gst-plugins-good-plugins-1.0/gst-plugins-good-plugins-rtspsrc.html#gst-plugins-good-plugins-rtspsrc.signal-details"> <ANCHOR id="GstRTSPSrc-handle-request" href="gst-plugins-good-plugins-1.0/gst-plugins-good-plugins-rtspsrc.html#GstRTSPSrc-handle-request"> <ANCHOR id="GstRTSPSrc-on-sdp" href="gst-plugins-good-plugins-1.0/gst-plugins-good-plugins-rtspsrc.html#GstRTSPSrc-on-sdp"> @@ -2202,6 +2224,7 @@ <ANCHOR id="GstSoupHTTPSrc--ssl-use-system-ca-file" href="gst-plugins-good-plugins-1.0/gst-plugins-good-plugins-souphttpsrc.html#GstSoupHTTPSrc--ssl-use-system-ca-file"> <ANCHOR id="GstSoupHTTPSrc--tls-database" href="gst-plugins-good-plugins-1.0/gst-plugins-good-plugins-souphttpsrc.html#GstSoupHTTPSrc--tls-database"> <ANCHOR id="GstSoupHTTPSrc--method" href="gst-plugins-good-plugins-1.0/gst-plugins-good-plugins-souphttpsrc.html#GstSoupHTTPSrc--method"> +<ANCHOR id="GstSoupHTTPSrc--tls-interaction" href="gst-plugins-good-plugins-1.0/gst-plugins-good-plugins-souphttpsrc.html#GstSoupHTTPSrc--tls-interaction"> <ANCHOR id="gst-plugins-good-plugins-spectrum" href="gst-plugins-good-plugins-1.0/gst-plugins-good-plugins-spectrum.html"> <ANCHOR id="gst-plugins-good-plugins-spectrum.properties" href="gst-plugins-good-plugins-1.0/gst-plugins-good-plugins-spectrum.html#gst-plugins-good-plugins-spectrum.properties"> <ANCHOR id="GstSpectrum" href="gst-plugins-good-plugins-1.0/gst-plugins-good-plugins-spectrum.html#GstSpectrum"> @@ -2357,6 +2380,7 @@ <ANCHOR id="GstUDPSrc--socket" href="gst-plugins-good-plugins-1.0/gst-plugins-good-plugins-udpsrc.html#GstUDPSrc--socket"> <ANCHOR id="GstUDPSrc--used-socket" href="gst-plugins-good-plugins-1.0/gst-plugins-good-plugins-udpsrc.html#GstUDPSrc--used-socket"> <ANCHOR id="GstUDPSrc--address" href="gst-plugins-good-plugins-1.0/gst-plugins-good-plugins-udpsrc.html#GstUDPSrc--address"> +<ANCHOR id="GstUDPSrc--loop" href="gst-plugins-good-plugins-1.0/gst-plugins-good-plugins-udpsrc.html#GstUDPSrc--loop"> <ANCHOR id="gst-plugins-good-plugins-udpsrc.see-also" href="gst-plugins-good-plugins-1.0/gst-plugins-good-plugins-udpsrc.html#gst-plugins-good-plugins-udpsrc.see-also"> <ANCHOR id="gst-plugins-good-plugins-v4l2radio" href="gst-plugins-good-plugins-1.0/gst-plugins-good-plugins-v4l2radio.html"> <ANCHOR id="gst-plugins-good-plugins-v4l2radio.properties" href="gst-plugins-good-plugins-1.0/gst-plugins-good-plugins-v4l2radio.html#gst-plugins-good-plugins-v4l2radio.properties"> diff --git a/docs/plugins/inspect/plugin-1394.xml b/docs/plugins/inspect/plugin-1394.xml index cd14ff7f26bfe3483f7f4843ce88a1f677130acd..4352b5321b5e87d8559b9e46428d61dba78f6538 100644 --- a/docs/plugins/inspect/plugin-1394.xml +++ b/docs/plugins/inspect/plugin-1394.xml @@ -3,7 +3,7 @@ <description>Source for video data via IEEE1394 interface</description> <filename>../../ext/raw1394/.libs/libgst1394.so</filename> <basename>libgst1394.so</basename> - <version>1.6.2</version> + <version>1.7.1</version> <license>LGPL</license> <source>gst-plugins-good</source> <package>GStreamer Good Plug-ins source release</package> diff --git a/docs/plugins/inspect/plugin-aasink.xml b/docs/plugins/inspect/plugin-aasink.xml index d46997a832ec20aa75c08da343af7b50abbe8876..e432d0ebd298b73052969b7b825f8413ae72f876 100644 --- a/docs/plugins/inspect/plugin-aasink.xml +++ b/docs/plugins/inspect/plugin-aasink.xml @@ -3,7 +3,7 @@ <description>ASCII Art video sink</description> <filename>../../ext/aalib/.libs/libgstaasink.so</filename> <basename>libgstaasink.so</basename> - <version>1.6.2</version> + <version>1.7.1</version> <license>LGPL</license> <source>gst-plugins-good</source> <package>GStreamer Good Plug-ins source release</package> diff --git a/docs/plugins/inspect/plugin-alaw.xml b/docs/plugins/inspect/plugin-alaw.xml index 8733e45ae7aa342d967e8b73a7b7ca040e7d21bd..75e59132d9073b766309d78c6b5ea378a1ee0983 100644 --- a/docs/plugins/inspect/plugin-alaw.xml +++ b/docs/plugins/inspect/plugin-alaw.xml @@ -3,7 +3,7 @@ <description>ALaw audio conversion routines</description> <filename>../../gst/law/.libs/libgstalaw.so</filename> <basename>libgstalaw.so</basename> - <version>1.6.2</version> + <version>1.7.1</version> <license>LGPL</license> <source>gst-plugins-good</source> <package>GStreamer Good Plug-ins source release</package> diff --git a/docs/plugins/inspect/plugin-alpha.xml b/docs/plugins/inspect/plugin-alpha.xml index 6da9153cb5866a6d7cb7c01dff1744858a73d34c..cb9f1c3bb808d9a854d7ad40e033a80ac33c0dd7 100644 --- a/docs/plugins/inspect/plugin-alpha.xml +++ b/docs/plugins/inspect/plugin-alpha.xml @@ -3,7 +3,7 @@ <description>adds an alpha channel to video - constant or via chroma-keying</description> <filename>../../gst/alpha/.libs/libgstalpha.so</filename> <basename>libgstalpha.so</basename> - <version>1.6.2</version> + <version>1.7.1</version> <license>LGPL</license> <source>gst-plugins-good</source> <package>GStreamer Good Plug-ins source release</package> diff --git a/docs/plugins/inspect/plugin-alphacolor.xml b/docs/plugins/inspect/plugin-alphacolor.xml index 2aac441365c2d61d0c3e88273f3d7583b095615e..a49bbcaa5d8604a1842d3580caee6440b8e37048 100644 --- a/docs/plugins/inspect/plugin-alphacolor.xml +++ b/docs/plugins/inspect/plugin-alphacolor.xml @@ -3,7 +3,7 @@ <description>RGBA from/to AYUV colorspace conversion preserving the alpha channel</description> <filename>../../gst/alpha/.libs/libgstalphacolor.so</filename> <basename>libgstalphacolor.so</basename> - <version>1.6.2</version> + <version>1.7.1</version> <license>LGPL</license> <source>gst-plugins-good</source> <package>GStreamer Good Plug-ins source release</package> diff --git a/docs/plugins/inspect/plugin-apetag.xml b/docs/plugins/inspect/plugin-apetag.xml index e5149aee75736342c56e5da80e31107b381adc5a..8d3ebfdee0ccd224f2a2e23e3d6287b1576694fc 100644 --- a/docs/plugins/inspect/plugin-apetag.xml +++ b/docs/plugins/inspect/plugin-apetag.xml @@ -3,7 +3,7 @@ <description>APEv1/2 tag reader</description> <filename>../../gst/apetag/.libs/libgstapetag.so</filename> <basename>libgstapetag.so</basename> - <version>1.6.2</version> + <version>1.7.1</version> <license>LGPL</license> <source>gst-plugins-good</source> <package>GStreamer Good Plug-ins source release</package> diff --git a/docs/plugins/inspect/plugin-audiofx.xml b/docs/plugins/inspect/plugin-audiofx.xml index 374cac88312f037a8cb46b39e671299cf3f30c97..9be69dfc18d68f356186d9521efc8f27b16712a3 100644 --- a/docs/plugins/inspect/plugin-audiofx.xml +++ b/docs/plugins/inspect/plugin-audiofx.xml @@ -3,7 +3,7 @@ <description>Audio effects plugin</description> <filename>../../gst/audiofx/.libs/libgstaudiofx.so</filename> <basename>libgstaudiofx.so</basename> - <version>1.6.2</version> + <version>1.7.1</version> <license>LGPL</license> <source>gst-plugins-good</source> <package>GStreamer Good Plug-ins source release</package> @@ -272,13 +272,13 @@ <name>sink</name> <direction>sink</direction> <presence>always</presence> - <details>audio/x-raw, format=(string)F32LE, rate=(int)[ 1, 2147483647 ], channels=(int)[ 1, 2147483647 ]; audio/x-raw, format=(string)S16LE, rate=(int)[ 1, 2147483647 ], channels=(int)[ 1, 2147483647 ]</details> + <details>audio/x-raw, format=(string)F32LE, rate=(int)[ 1, 2147483647 ], channels=(int)[ 1, 2147483647 ]; audio/x-raw, format=(string)F64LE, rate=(int)[ 1, 2147483647 ], channels=(int)[ 1, 2147483647 ]; audio/x-raw, format=(string)S16LE, rate=(int)[ 1, 2147483647 ], channels=(int)[ 1, 2147483647 ]</details> </caps> <caps> <name>src</name> <direction>source</direction> <presence>always</presence> - <details>audio/x-raw, format=(string)F32LE, rate=(int)[ 1, 2147483647 ], channels=(int)[ 1, 2147483647 ]; audio/x-raw, format=(string)S16LE, rate=(int)[ 1, 2147483647 ], channels=(int)[ 1, 2147483647 ]</details> + <details>audio/x-raw, format=(string)F32LE, rate=(int)[ 1, 2147483647 ], channels=(int)[ 1, 2147483647 ]; audio/x-raw, format=(string)F64LE, rate=(int)[ 1, 2147483647 ], channels=(int)[ 1, 2147483647 ]; audio/x-raw, format=(string)S16LE, rate=(int)[ 1, 2147483647 ], channels=(int)[ 1, 2147483647 ]</details> </caps> </pads> </element> diff --git a/docs/plugins/inspect/plugin-audioparsers.xml b/docs/plugins/inspect/plugin-audioparsers.xml index 327b3eb118b3cf58abfd50f27bd60c9b771e1390..00274decc4208c6be2751fe7f0ac1dd7f0c64a2d 100644 --- a/docs/plugins/inspect/plugin-audioparsers.xml +++ b/docs/plugins/inspect/plugin-audioparsers.xml @@ -3,7 +3,7 @@ <description>Parsers for various audio formats</description> <filename>../../gst/audioparsers/.libs/libgstaudioparsers.so</filename> <basename>libgstaudioparsers.so</basename> - <version>1.6.2</version> + <version>1.7.1</version> <license>LGPL</license> <source>gst-plugins-good</source> <package>GStreamer Good Plug-ins source release</package> diff --git a/docs/plugins/inspect/plugin-auparse.xml b/docs/plugins/inspect/plugin-auparse.xml index b17ed26c32e604ae6b032f8497950bdfaadf10b9..bffb04cace971cd779c76658e9732e8d022bee19 100644 --- a/docs/plugins/inspect/plugin-auparse.xml +++ b/docs/plugins/inspect/plugin-auparse.xml @@ -3,7 +3,7 @@ <description>parses au streams</description> <filename>../../gst/auparse/.libs/libgstauparse.so</filename> <basename>libgstauparse.so</basename> - <version>1.6.2</version> + <version>1.7.1</version> <license>LGPL</license> <source>gst-plugins-good</source> <package>GStreamer Good Plug-ins source release</package> diff --git a/docs/plugins/inspect/plugin-autodetect.xml b/docs/plugins/inspect/plugin-autodetect.xml index a615c7a50c9b62fb7910c312102ee2080e8a928c..e6373841f3f8fa151ecdc92f25e0c6bbbfd5fdb7 100644 --- a/docs/plugins/inspect/plugin-autodetect.xml +++ b/docs/plugins/inspect/plugin-autodetect.xml @@ -3,7 +3,7 @@ <description>Plugin contains auto-detection plugins for video/audio in- and outputs</description> <filename>../../gst/autodetect/.libs/libgstautodetect.so</filename> <basename>libgstautodetect.so</basename> - <version>1.6.2</version> + <version>1.7.1</version> <license>LGPL</license> <source>gst-plugins-good</source> <package>GStreamer Good Plug-ins source release</package> diff --git a/docs/plugins/inspect/plugin-avi.xml b/docs/plugins/inspect/plugin-avi.xml index 20379a9cbbec849df06d5569d27dc2c617278cad..aec863bae09022bfef2ea36374753d8774ebb764 100644 --- a/docs/plugins/inspect/plugin-avi.xml +++ b/docs/plugins/inspect/plugin-avi.xml @@ -3,7 +3,7 @@ <description>AVI stream handling</description> <filename>../../gst/avi/.libs/libgstavi.so</filename> <basename>libgstavi.so</basename> - <version>1.6.2</version> + <version>1.7.1</version> <license>LGPL</license> <source>gst-plugins-good</source> <package>GStreamer Good Plug-ins source release</package> @@ -44,7 +44,7 @@ <name>video_%u</name> <direction>source</direction> <presence>sometimes</presence> - <details>video/mpeg, mpegversion=(int)4, systemstream=(boolean)false, framerate=(fraction)[ 0/1, 2147483647/1 ], width=(int)[ 1, 2147483647 ], height=(int)[ 1, 2147483647 ]; video/x-asus, asusversion=(int)1, framerate=(fraction)[ 0/1, 2147483647/1 ], width=(int)[ 1, 2147483647 ], height=(int)[ 1, 2147483647 ]; video/x-asus, asusversion=(int)2, framerate=(fraction)[ 0/1, 2147483647/1 ], width=(int)[ 1, 2147483647 ], height=(int)[ 1, 2147483647 ]; video/x-cirrus-logic-accupak, framerate=(fraction)[ 0/1, 2147483647/1 ], width=(int)[ 1, 2147483647 ], height=(int)[ 1, 2147483647 ]; video/x-camstudio, framerate=(fraction)[ 0/1, 2147483647/1 ], width=(int)[ 1, 2147483647 ], height=(int)[ 1, 2147483647 ]; video/x-compressed-yuv, framerate=(fraction)[ 0/1, 2147483647/1 ], width=(int)[ 1, 2147483647 ], height=(int)[ 1, 2147483647 ]; video/x-raw, format=(string){ RGB8P, BGR, BGRx }, framerate=(fraction)[ 0/1, 2147483647/1 ], width=(int)[ 1, 2147483647 ], height=(int)[ 1, 2147483647 ]; video/x-divx, divxversion=(int)3, framerate=(fraction)[ 0/1, 2147483647/1 ], width=(int)[ 1, 2147483647 ], height=(int)[ 1, 2147483647 ]; video/x-divx, divxversion=(int)4, framerate=(fraction)[ 0/1, 2147483647/1 ], width=(int)[ 1, 2147483647 ], height=(int)[ 1, 2147483647 ]; video/x-truemotion, trueversion=(int)1, framerate=(fraction)[ 0/1, 2147483647/1 ], width=(int)[ 1, 2147483647 ], height=(int)[ 1, 2147483647 ]; video/x-dv, systemstream=(boolean)false, dvversion=(int)25, framerate=(fraction)[ 0/1, 2147483647/1 ], width=(int)[ 1, 2147483647 ], height=(int)[ 1, 2147483647 ]; video/x-dv, systemstream=(boolean)false, dvversion=(int)50, framerate=(fraction)[ 0/1, 2147483647/1 ], width=(int)[ 1, 2147483647 ], height=(int)[ 1, 2147483647 ]; video/x-divx, divxversion=(int)5, framerate=(fraction)[ 0/1, 2147483647/1 ], width=(int)[ 1, 2147483647 ], height=(int)[ 1, 2147483647 ]; video/mpeg, mpegversion=(int)4, systemstream=(boolean)false, framerate=(fraction)[ 0/1, 2147483647/1 ], width=(int)[ 1, 2147483647 ], height=(int)[ 1, 2147483647 ]; video/x-flash-video, flvversion=(int)1, framerate=(fraction)[ 0/1, 2147483647/1 ], width=(int)[ 1, 2147483647 ], height=(int)[ 1, 2147483647 ]; video/x-vp6-flash, framerate=(fraction)[ 0/1, 2147483647/1 ], width=(int)[ 1, 2147483647 ], height=(int)[ 1, 2147483647 ]; video/x-h263, variant=(string)itu, framerate=(fraction)[ 0/1, 2147483647/1 ], width=(int)[ 1, 2147483647 ], height=(int)[ 1, 2147483647 ]; video/x-h263, variant=(string)lucent, framerate=(fraction)[ 0/1, 2147483647/1 ], width=(int)[ 1, 2147483647 ], height=(int)[ 1, 2147483647 ]; video/x-h264, variant=(string)itu, framerate=(fraction)[ 0/1, 2147483647/1 ], width=(int)[ 1, 2147483647 ], height=(int)[ 1, 2147483647 ]; video/x-huffyuv, framerate=(fraction)[ 0/1, 2147483647/1 ], width=(int)[ 1, 2147483647 ], height=(int)[ 1, 2147483647 ]; video/x-intel-h263, variant=(string)intel, framerate=(fraction)[ 0/1, 2147483647/1 ], width=(int)[ 1, 2147483647 ], height=(int)[ 1, 2147483647 ]; video/x-raw, format=(string)I420, framerate=(fraction)[ 0/1, 2147483647/1 ], width=(int)[ 1, 2147483647 ], height=(int)[ 1, 2147483647 ]; video/x-indeo, indeoversion=(int)3, framerate=(fraction)[ 0/1, 2147483647/1 ], width=(int)[ 1, 2147483647 ], height=(int)[ 1, 2147483647 ]; video/x-indeo, indeoversion=(int)4, framerate=(fraction)[ 0/1, 2147483647/1 ], width=(int)[ 1, 2147483647 ], height=(int)[ 1, 2147483647 ]; video/x-indeo, indeoversion=(int)5, framerate=(fraction)[ 0/1, 2147483647/1 ], width=(int)[ 1, 2147483647 ], height=(int)[ 1, 2147483647 ]; video/x-h263, variant=(string)lead, framerate=(fraction)[ 0/1, 2147483647/1 ], width=(int)[ 1, 2147483647 ], height=(int)[ 1, 2147483647 ]; video/x-h264, variant=(string)lead, framerate=(fraction)[ 0/1, 2147483647/1 ], width=(int)[ 1, 2147483647 ], height=(int)[ 1, 2147483647 ]; video/x-h263, variant=(string)microsoft, framerate=(fraction)[ 0/1, 2147483647/1 ], width=(int)[ 1, 2147483647 ], height=(int)[ 1, 2147483647 ]; video/mpeg, mpegversion=(int)4, systemstream=(boolean)false, framerate=(fraction)[ 0/1, 2147483647/1 ], width=(int)[ 1, 2147483647 ], height=(int)[ 1, 2147483647 ]; image/jpeg, framerate=(fraction)[ 0/1, 2147483647/1 ], width=(int)[ 1, 2147483647 ], height=(int)[ 1, 2147483647 ]; video/x-msmpeg, msmpegversion=(int)42, framerate=(fraction)[ 0/1, 2147483647/1 ], width=(int)[ 1, 2147483647 ], height=(int)[ 1, 2147483647 ]; video/x-msmpeg, msmpegversion=(int)43, framerate=(fraction)[ 0/1, 2147483647/1 ], width=(int)[ 1, 2147483647 ], height=(int)[ 1, 2147483647 ]; video/mpeg, systemstream=(boolean)false, mpegversion=(int)1, framerate=(fraction)[ 0/1, 2147483647/1 ], width=(int)[ 1, 2147483647 ], height=(int)[ 1, 2147483647 ]; video/mpeg, systemstream=(boolean)false, mpegversion=(int)2, framerate=(fraction)[ 0/1, 2147483647/1 ], width=(int)[ 1, 2147483647 ], height=(int)[ 1, 2147483647 ]; video/x-msmpeg, msmpegversion=(int)41, framerate=(fraction)[ 0/1, 2147483647/1 ], width=(int)[ 1, 2147483647 ], height=(int)[ 1, 2147483647 ]; video/x-mszh, framerate=(fraction)[ 0/1, 2147483647/1 ], width=(int)[ 1, 2147483647 ], height=(int)[ 1, 2147483647 ]; image/png, framerate=(fraction)[ 0/1, 2147483647/1 ], width=(int)[ 1, 2147483647 ], height=(int)[ 1, 2147483647 ]; video/x-rle, layout=(string)microsoft, depth=(int)[ 1, 64 ], framerate=(fraction)[ 0/1, 2147483647/1 ], width=(int)[ 1, 2147483647 ], height=(int)[ 1, 2147483647 ]; video/x-indeo, indeoversion=(int)2, framerate=(fraction)[ 0/1, 2147483647/1 ], width=(int)[ 1, 2147483647 ], height=(int)[ 1, 2147483647 ]; video/sp5x, framerate=(fraction)[ 0/1, 2147483647/1 ], width=(int)[ 1, 2147483647 ], height=(int)[ 1, 2147483647 ]; video/x-truemotion, trueversion=(int)2, framerate=(fraction)[ 0/1, 2147483647/1 ], width=(int)[ 1, 2147483647 ], height=(int)[ 1, 2147483647 ]; video/x-camtasia, framerate=(fraction)[ 0/1, 2147483647/1 ], width=(int)[ 1, 2147483647 ], height=(int)[ 1, 2147483647 ]; video/x-ultimotion, framerate=(fraction)[ 0/1, 2147483647/1 ], width=(int)[ 1, 2147483647 ], height=(int)[ 1, 2147483647 ]; video/x-raw, format=(string)UYVY, framerate=(fraction)[ 0/1, 2147483647/1 ], width=(int)[ 1, 2147483647 ], height=(int)[ 1, 2147483647 ]; video/x-ati-vcr, vcrversion=(int)1, framerate=(fraction)[ 0/1, 2147483647/1 ], width=(int)[ 1, 2147483647 ], height=(int)[ 1, 2147483647 ]; video/x-ati-vcr, vcrversion=(int)2, framerate=(fraction)[ 0/1, 2147483647/1 ], width=(int)[ 1, 2147483647 ], height=(int)[ 1, 2147483647 ]; video/x-h263, variant=(string)vdolive, framerate=(fraction)[ 0/1, 2147483647/1 ], width=(int)[ 1, 2147483647 ], height=(int)[ 1, 2147483647 ]; video/x-h263, variant=(string)vivo, framerate=(fraction)[ 0/1, 2147483647/1 ], width=(int)[ 1, 2147483647 ], height=(int)[ 1, 2147483647 ]; video/x-vmnc, version=(int)1, framerate=(fraction)[ 0/1, 2147483647/1 ], width=(int)[ 1, 2147483647 ], height=(int)[ 1, 2147483647 ]; video/x-vp3, framerate=(fraction)[ 0/1, 2147483647/1 ], width=(int)[ 1, 2147483647 ], height=(int)[ 1, 2147483647 ]; video/x-h264, variant=(string)videosoft, framerate=(fraction)[ 0/1, 2147483647/1 ], width=(int)[ 1, 2147483647 ], height=(int)[ 1, 2147483647 ]; video/x-wmv, wmvversion=(int)1, framerate=(fraction)[ 0/1, 2147483647/1 ], width=(int)[ 1, 2147483647 ], height=(int)[ 1, 2147483647 ]; video/x-wmv, wmvversion=(int)2, framerate=(fraction)[ 0/1, 2147483647/1 ], width=(int)[ 1, 2147483647 ], height=(int)[ 1, 2147483647 ]; video/x-wmv, wmvversion=(int)3, format=(string)WMV3, framerate=(fraction)[ 0/1, 2147483647/1 ], width=(int)[ 1, 2147483647 ], height=(int)[ 1, 2147483647 ]; video/mpeg, mpegversion=(int)4, systemstream=(boolean)false, framerate=(fraction)[ 0/1, 2147483647/1 ], width=(int)[ 1, 2147483647 ], height=(int)[ 1, 2147483647 ]; video/x-xan, wcversion=(int)4, framerate=(fraction)[ 0/1, 2147483647/1 ], width=(int)[ 1, 2147483647 ], height=(int)[ 1, 2147483647 ]; video/x-raw, format=(string)YUY2, framerate=(fraction)[ 0/1, 2147483647/1 ], width=(int)[ 1, 2147483647 ], height=(int)[ 1, 2147483647 ]; video/x-raw, format=(string)YVU9, framerate=(fraction)[ 0/1, 2147483647/1 ], width=(int)[ 1, 2147483647 ], height=(int)[ 1, 2147483647 ]; video/x-zlib, framerate=(fraction)[ 0/1, 2147483647/1 ], width=(int)[ 1, 2147483647 ], height=(int)[ 1, 2147483647 ]; video/x-cinepak, framerate=(fraction)[ 0/1, 2147483647/1 ], width=(int)[ 1, 2147483647 ], height=(int)[ 1, 2147483647 ]; video/x-h264, variant=(string)itu, framerate=(fraction)[ 0/1, 2147483647/1 ], width=(int)[ 1, 2147483647 ], height=(int)[ 1, 2147483647 ]; video/x-msvideocodec, msvideoversion=(int)1, framerate=(fraction)[ 0/1, 2147483647/1 ], width=(int)[ 1, 2147483647 ], height=(int)[ 1, 2147483647 ]; video/x-h263, variant=(string)xirlink, framerate=(fraction)[ 0/1, 2147483647/1 ], width=(int)[ 1, 2147483647 ], height=(int)[ 1, 2147483647 ]; video/x-dirac, framerate=(fraction)[ 0/1, 2147483647/1 ], width=(int)[ 1, 2147483647 ], height=(int)[ 1, 2147483647 ]; video/x-ffv, ffvversion=(int)1, framerate=(fraction)[ 0/1, 2147483647/1 ], width=(int)[ 1, 2147483647 ], height=(int)[ 1, 2147483647 ]; video/x-kmvc, framerate=(fraction)[ 0/1, 2147483647/1 ], width=(int)[ 1, 2147483647 ], height=(int)[ 1, 2147483647 ]; video/x-vp5, framerate=(fraction)[ 0/1, 2147483647/1 ], width=(int)[ 1, 2147483647 ], height=(int)[ 1, 2147483647 ]; video/x-vp6, framerate=(fraction)[ 0/1, 2147483647/1 ], width=(int)[ 1, 2147483647 ], height=(int)[ 1, 2147483647 ]; video/x-vp6-flash, framerate=(fraction)[ 0/1, 2147483647/1 ], width=(int)[ 1, 2147483647 ], height=(int)[ 1, 2147483647 ]; video/x-vp7, framerate=(fraction)[ 0/1, 2147483647/1 ], width=(int)[ 1, 2147483647 ], height=(int)[ 1, 2147483647 ]; video/x-vp8, framerate=(fraction)[ 0/1, 2147483647/1 ], width=(int)[ 1, 2147483647 ], height=(int)[ 1, 2147483647 ]; video/x-mimic, framerate=(fraction)[ 0/1, 2147483647/1 ], width=(int)[ 1, 2147483647 ], height=(int)[ 1, 2147483647 ]; video/x-apple-video, framerate=(fraction)[ 0/1, 2147483647/1 ], width=(int)[ 1, 2147483647 ], height=(int)[ 1, 2147483647 ]; video/x-theora, framerate=(fraction)[ 0/1, 2147483647/1 ], width=(int)[ 1, 2147483647 ], height=(int)[ 1, 2147483647 ]; video/x-fraps, framerate=(fraction)[ 0/1, 2147483647/1 ], width=(int)[ 1, 2147483647 ], height=(int)[ 1, 2147483647 ]; video/x-aasc, framerate=(fraction)[ 0/1, 2147483647/1 ], width=(int)[ 1, 2147483647 ], height=(int)[ 1, 2147483647 ]; video/x-raw, format=(string)YV12, framerate=(fraction)[ 0/1, 2147483647/1 ], width=(int)[ 1, 2147483647 ], height=(int)[ 1, 2147483647 ]; video/x-loco, framerate=(fraction)[ 0/1, 2147483647/1 ], width=(int)[ 1, 2147483647 ], height=(int)[ 1, 2147483647 ]; video/x-zmbv, framerate=(fraction)[ 0/1, 2147483647/1 ], width=(int)[ 1, 2147483647 ], height=(int)[ 1, 2147483647 ]; video/x-raw, format=(string)v210, framerate=(fraction)[ 0/1, 2147483647/1 ], width=(int)[ 1, 2147483647 ], height=(int)[ 1, 2147483647 ]; video/x-raw, format=(string)r210, framerate=(fraction)[ 0/1, 2147483647/1 ], width=(int)[ 1, 2147483647 ], height=(int)[ 1, 2147483647 ]; video/x-dv, systemstream=(boolean)true; video/x-avi-unknown</details> + <details>video/mpeg, mpegversion=(int)4, systemstream=(boolean)false, framerate=(fraction)[ 0/1, 2147483647/1 ], width=(int)[ 1, 2147483647 ], height=(int)[ 1, 2147483647 ]; video/x-asus, asusversion=(int)1, framerate=(fraction)[ 0/1, 2147483647/1 ], width=(int)[ 1, 2147483647 ], height=(int)[ 1, 2147483647 ]; video/x-asus, asusversion=(int)2, framerate=(fraction)[ 0/1, 2147483647/1 ], width=(int)[ 1, 2147483647 ], height=(int)[ 1, 2147483647 ]; video/x-cirrus-logic-accupak, framerate=(fraction)[ 0/1, 2147483647/1 ], width=(int)[ 1, 2147483647 ], height=(int)[ 1, 2147483647 ]; video/x-camstudio, framerate=(fraction)[ 0/1, 2147483647/1 ], width=(int)[ 1, 2147483647 ], height=(int)[ 1, 2147483647 ]; video/x-compressed-yuv, framerate=(fraction)[ 0/1, 2147483647/1 ], width=(int)[ 1, 2147483647 ], height=(int)[ 1, 2147483647 ]; video/x-raw, format=(string){ RGB8P, BGR, BGRx }, framerate=(fraction)[ 0/1, 2147483647/1 ], width=(int)[ 1, 2147483647 ], height=(int)[ 1, 2147483647 ]; video/x-divx, divxversion=(int)3, framerate=(fraction)[ 0/1, 2147483647/1 ], width=(int)[ 1, 2147483647 ], height=(int)[ 1, 2147483647 ]; video/x-divx, divxversion=(int)4, framerate=(fraction)[ 0/1, 2147483647/1 ], width=(int)[ 1, 2147483647 ], height=(int)[ 1, 2147483647 ]; video/x-truemotion, trueversion=(int)1, framerate=(fraction)[ 0/1, 2147483647/1 ], width=(int)[ 1, 2147483647 ], height=(int)[ 1, 2147483647 ]; video/x-dv, systemstream=(boolean)false, dvversion=(int)25, framerate=(fraction)[ 0/1, 2147483647/1 ], width=(int)[ 1, 2147483647 ], height=(int)[ 1, 2147483647 ]; video/x-dv, systemstream=(boolean)false, dvversion=(int)50, framerate=(fraction)[ 0/1, 2147483647/1 ], width=(int)[ 1, 2147483647 ], height=(int)[ 1, 2147483647 ]; video/x-divx, divxversion=(int)5, framerate=(fraction)[ 0/1, 2147483647/1 ], width=(int)[ 1, 2147483647 ], height=(int)[ 1, 2147483647 ]; video/mpeg, mpegversion=(int)4, systemstream=(boolean)false, framerate=(fraction)[ 0/1, 2147483647/1 ], width=(int)[ 1, 2147483647 ], height=(int)[ 1, 2147483647 ]; video/x-flash-video, flvversion=(int)1, framerate=(fraction)[ 0/1, 2147483647/1 ], width=(int)[ 1, 2147483647 ], height=(int)[ 1, 2147483647 ]; video/x-vp6-flash, framerate=(fraction)[ 0/1, 2147483647/1 ], width=(int)[ 1, 2147483647 ], height=(int)[ 1, 2147483647 ]; video/x-h263, variant=(string)itu, framerate=(fraction)[ 0/1, 2147483647/1 ], width=(int)[ 1, 2147483647 ], height=(int)[ 1, 2147483647 ]; video/x-h263, variant=(string)lucent, framerate=(fraction)[ 0/1, 2147483647/1 ], width=(int)[ 1, 2147483647 ], height=(int)[ 1, 2147483647 ]; video/x-h264, variant=(string)itu, framerate=(fraction)[ 0/1, 2147483647/1 ], width=(int)[ 1, 2147483647 ], height=(int)[ 1, 2147483647 ]; video/x-huffyuv, framerate=(fraction)[ 0/1, 2147483647/1 ], width=(int)[ 1, 2147483647 ], height=(int)[ 1, 2147483647 ]; video/x-intel-h263, variant=(string)intel, framerate=(fraction)[ 0/1, 2147483647/1 ], width=(int)[ 1, 2147483647 ], height=(int)[ 1, 2147483647 ]; video/x-raw, format=(string)I420, framerate=(fraction)[ 0/1, 2147483647/1 ], width=(int)[ 1, 2147483647 ], height=(int)[ 1, 2147483647 ]; video/x-indeo, indeoversion=(int)3, framerate=(fraction)[ 0/1, 2147483647/1 ], width=(int)[ 1, 2147483647 ], height=(int)[ 1, 2147483647 ]; video/x-indeo, indeoversion=(int)4, framerate=(fraction)[ 0/1, 2147483647/1 ], width=(int)[ 1, 2147483647 ], height=(int)[ 1, 2147483647 ]; video/x-indeo, indeoversion=(int)5, framerate=(fraction)[ 0/1, 2147483647/1 ], width=(int)[ 1, 2147483647 ], height=(int)[ 1, 2147483647 ]; video/x-h263, variant=(string)lead, framerate=(fraction)[ 0/1, 2147483647/1 ], width=(int)[ 1, 2147483647 ], height=(int)[ 1, 2147483647 ]; video/x-h264, variant=(string)lead, framerate=(fraction)[ 0/1, 2147483647/1 ], width=(int)[ 1, 2147483647 ], height=(int)[ 1, 2147483647 ]; video/x-h263, variant=(string)microsoft, framerate=(fraction)[ 0/1, 2147483647/1 ], width=(int)[ 1, 2147483647 ], height=(int)[ 1, 2147483647 ]; video/mpeg, mpegversion=(int)4, systemstream=(boolean)false, framerate=(fraction)[ 0/1, 2147483647/1 ], width=(int)[ 1, 2147483647 ], height=(int)[ 1, 2147483647 ]; image/jpeg, framerate=(fraction)[ 0/1, 2147483647/1 ], width=(int)[ 1, 2147483647 ], height=(int)[ 1, 2147483647 ]; video/x-msmpeg, msmpegversion=(int)42, framerate=(fraction)[ 0/1, 2147483647/1 ], width=(int)[ 1, 2147483647 ], height=(int)[ 1, 2147483647 ]; video/x-msmpeg, msmpegversion=(int)43, framerate=(fraction)[ 0/1, 2147483647/1 ], width=(int)[ 1, 2147483647 ], height=(int)[ 1, 2147483647 ]; video/mpeg, systemstream=(boolean)false, mpegversion=(int)1, framerate=(fraction)[ 0/1, 2147483647/1 ], width=(int)[ 1, 2147483647 ], height=(int)[ 1, 2147483647 ]; video/mpeg, systemstream=(boolean)false, mpegversion=(int)2, framerate=(fraction)[ 0/1, 2147483647/1 ], width=(int)[ 1, 2147483647 ], height=(int)[ 1, 2147483647 ]; video/x-msmpeg, msmpegversion=(int)41, framerate=(fraction)[ 0/1, 2147483647/1 ], width=(int)[ 1, 2147483647 ], height=(int)[ 1, 2147483647 ]; video/x-mszh, framerate=(fraction)[ 0/1, 2147483647/1 ], width=(int)[ 1, 2147483647 ], height=(int)[ 1, 2147483647 ]; image/png, framerate=(fraction)[ 0/1, 2147483647/1 ], width=(int)[ 1, 2147483647 ], height=(int)[ 1, 2147483647 ]; video/x-rle, layout=(string)microsoft, depth=(int)[ 1, 64 ], framerate=(fraction)[ 0/1, 2147483647/1 ], width=(int)[ 1, 2147483647 ], height=(int)[ 1, 2147483647 ]; video/x-indeo, indeoversion=(int)2, framerate=(fraction)[ 0/1, 2147483647/1 ], width=(int)[ 1, 2147483647 ], height=(int)[ 1, 2147483647 ]; video/sp5x, framerate=(fraction)[ 0/1, 2147483647/1 ], width=(int)[ 1, 2147483647 ], height=(int)[ 1, 2147483647 ]; video/x-truemotion, trueversion=(int)2, framerate=(fraction)[ 0/1, 2147483647/1 ], width=(int)[ 1, 2147483647 ], height=(int)[ 1, 2147483647 ]; video/x-camtasia, framerate=(fraction)[ 0/1, 2147483647/1 ], width=(int)[ 1, 2147483647 ], height=(int)[ 1, 2147483647 ]; video/x-ultimotion, framerate=(fraction)[ 0/1, 2147483647/1 ], width=(int)[ 1, 2147483647 ], height=(int)[ 1, 2147483647 ]; video/x-raw, format=(string)UYVY, framerate=(fraction)[ 0/1, 2147483647/1 ], width=(int)[ 1, 2147483647 ], height=(int)[ 1, 2147483647 ]; video/x-ati-vcr, vcrversion=(int)1, framerate=(fraction)[ 0/1, 2147483647/1 ], width=(int)[ 1, 2147483647 ], height=(int)[ 1, 2147483647 ]; video/x-ati-vcr, vcrversion=(int)2, framerate=(fraction)[ 0/1, 2147483647/1 ], width=(int)[ 1, 2147483647 ], height=(int)[ 1, 2147483647 ]; video/x-h263, variant=(string)vdolive, framerate=(fraction)[ 0/1, 2147483647/1 ], width=(int)[ 1, 2147483647 ], height=(int)[ 1, 2147483647 ]; video/x-h263, variant=(string)vivo, framerate=(fraction)[ 0/1, 2147483647/1 ], width=(int)[ 1, 2147483647 ], height=(int)[ 1, 2147483647 ]; video/x-vmnc, version=(int)1, framerate=(fraction)[ 0/1, 2147483647/1 ], width=(int)[ 1, 2147483647 ], height=(int)[ 1, 2147483647 ]; video/x-vp3, framerate=(fraction)[ 0/1, 2147483647/1 ], width=(int)[ 1, 2147483647 ], height=(int)[ 1, 2147483647 ]; video/x-h264, variant=(string)videosoft, framerate=(fraction)[ 0/1, 2147483647/1 ], width=(int)[ 1, 2147483647 ], height=(int)[ 1, 2147483647 ]; video/x-wmv, wmvversion=(int)1, framerate=(fraction)[ 0/1, 2147483647/1 ], width=(int)[ 1, 2147483647 ], height=(int)[ 1, 2147483647 ]; video/x-wmv, wmvversion=(int)2, framerate=(fraction)[ 0/1, 2147483647/1 ], width=(int)[ 1, 2147483647 ], height=(int)[ 1, 2147483647 ]; video/x-wmv, wmvversion=(int)3, format=(string)WMV3, framerate=(fraction)[ 0/1, 2147483647/1 ], width=(int)[ 1, 2147483647 ], height=(int)[ 1, 2147483647 ]; video/mpeg, mpegversion=(int)4, systemstream=(boolean)false, framerate=(fraction)[ 0/1, 2147483647/1 ], width=(int)[ 1, 2147483647 ], height=(int)[ 1, 2147483647 ]; video/x-xan, wcversion=(int)4, framerate=(fraction)[ 0/1, 2147483647/1 ], width=(int)[ 1, 2147483647 ], height=(int)[ 1, 2147483647 ]; video/x-raw, format=(string)YUY2, framerate=(fraction)[ 0/1, 2147483647/1 ], width=(int)[ 1, 2147483647 ], height=(int)[ 1, 2147483647 ]; video/x-zlib, framerate=(fraction)[ 0/1, 2147483647/1 ], width=(int)[ 1, 2147483647 ], height=(int)[ 1, 2147483647 ]; video/x-cinepak, framerate=(fraction)[ 0/1, 2147483647/1 ], width=(int)[ 1, 2147483647 ], height=(int)[ 1, 2147483647 ]; video/x-h264, variant=(string)itu, framerate=(fraction)[ 0/1, 2147483647/1 ], width=(int)[ 1, 2147483647 ], height=(int)[ 1, 2147483647 ]; video/x-msvideocodec, msvideoversion=(int)1, framerate=(fraction)[ 0/1, 2147483647/1 ], width=(int)[ 1, 2147483647 ], height=(int)[ 1, 2147483647 ]; video/x-h263, variant=(string)xirlink, framerate=(fraction)[ 0/1, 2147483647/1 ], width=(int)[ 1, 2147483647 ], height=(int)[ 1, 2147483647 ]; video/x-dirac, framerate=(fraction)[ 0/1, 2147483647/1 ], width=(int)[ 1, 2147483647 ], height=(int)[ 1, 2147483647 ]; video/x-ffv, ffvversion=(int)1, framerate=(fraction)[ 0/1, 2147483647/1 ], width=(int)[ 1, 2147483647 ], height=(int)[ 1, 2147483647 ]; video/x-kmvc, framerate=(fraction)[ 0/1, 2147483647/1 ], width=(int)[ 1, 2147483647 ], height=(int)[ 1, 2147483647 ]; video/x-vp5, framerate=(fraction)[ 0/1, 2147483647/1 ], width=(int)[ 1, 2147483647 ], height=(int)[ 1, 2147483647 ]; video/x-vp6, framerate=(fraction)[ 0/1, 2147483647/1 ], width=(int)[ 1, 2147483647 ], height=(int)[ 1, 2147483647 ]; video/x-vp6-flash, framerate=(fraction)[ 0/1, 2147483647/1 ], width=(int)[ 1, 2147483647 ], height=(int)[ 1, 2147483647 ]; video/x-vp7, framerate=(fraction)[ 0/1, 2147483647/1 ], width=(int)[ 1, 2147483647 ], height=(int)[ 1, 2147483647 ]; video/x-vp8, framerate=(fraction)[ 0/1, 2147483647/1 ], width=(int)[ 1, 2147483647 ], height=(int)[ 1, 2147483647 ]; video/x-mimic, framerate=(fraction)[ 0/1, 2147483647/1 ], width=(int)[ 1, 2147483647 ], height=(int)[ 1, 2147483647 ]; video/x-apple-video, framerate=(fraction)[ 0/1, 2147483647/1 ], width=(int)[ 1, 2147483647 ], height=(int)[ 1, 2147483647 ]; video/x-theora, framerate=(fraction)[ 0/1, 2147483647/1 ], width=(int)[ 1, 2147483647 ], height=(int)[ 1, 2147483647 ]; video/x-fraps, framerate=(fraction)[ 0/1, 2147483647/1 ], width=(int)[ 1, 2147483647 ], height=(int)[ 1, 2147483647 ]; video/x-aasc, framerate=(fraction)[ 0/1, 2147483647/1 ], width=(int)[ 1, 2147483647 ], height=(int)[ 1, 2147483647 ]; video/x-raw, format=(string)YV12, framerate=(fraction)[ 0/1, 2147483647/1 ], width=(int)[ 1, 2147483647 ], height=(int)[ 1, 2147483647 ]; video/x-loco, framerate=(fraction)[ 0/1, 2147483647/1 ], width=(int)[ 1, 2147483647 ], height=(int)[ 1, 2147483647 ]; video/x-zmbv, framerate=(fraction)[ 0/1, 2147483647/1 ], width=(int)[ 1, 2147483647 ], height=(int)[ 1, 2147483647 ]; video/x-raw, format=(string)v210, framerate=(fraction)[ 0/1, 2147483647/1 ], width=(int)[ 1, 2147483647 ], height=(int)[ 1, 2147483647 ]; video/x-raw, format=(string)r210, framerate=(fraction)[ 0/1, 2147483647/1 ], width=(int)[ 1, 2147483647 ], height=(int)[ 1, 2147483647 ]; video/x-dv, systemstream=(boolean)true; video/x-avi-unknown</details> </caps> </pads> </element> diff --git a/docs/plugins/inspect/plugin-cacasink.xml b/docs/plugins/inspect/plugin-cacasink.xml index 9adfea938b0ce85c3ffc91d1b93f7337c2dd9261..5bf7d1c37fe423f8048e16e584e2e6ea9d4d3d33 100644 --- a/docs/plugins/inspect/plugin-cacasink.xml +++ b/docs/plugins/inspect/plugin-cacasink.xml @@ -3,7 +3,7 @@ <description>Colored ASCII Art video sink</description> <filename>../../ext/libcaca/.libs/libgstcacasink.so</filename> <basename>libgstcacasink.so</basename> - <version>1.6.2</version> + <version>1.7.1</version> <license>LGPL</license> <source>gst-plugins-good</source> <package>GStreamer Good Plug-ins source release</package> diff --git a/docs/plugins/inspect/plugin-cairo.xml b/docs/plugins/inspect/plugin-cairo.xml index be902eefddf0e0ce1d7d25add306183d7d6b4900..fe6980b6b74e5ad7d2f2040b5ba70fa3a9f7c6e0 100644 --- a/docs/plugins/inspect/plugin-cairo.xml +++ b/docs/plugins/inspect/plugin-cairo.xml @@ -3,7 +3,7 @@ <description>Cairo-based elements</description> <filename>../../ext/cairo/.libs/libgstcairo.so</filename> <basename>libgstcairo.so</basename> - <version>1.6.2</version> + <version>1.7.1</version> <license>LGPL</license> <source>gst-plugins-good</source> <package>GStreamer Good Plug-ins source release</package> diff --git a/docs/plugins/inspect/plugin-cutter.xml b/docs/plugins/inspect/plugin-cutter.xml index feb1ee29276288978b29a6fae32b7a28ce4a3ec4..2ac57dac983339b759d827b35e371a4a242bf9ba 100644 --- a/docs/plugins/inspect/plugin-cutter.xml +++ b/docs/plugins/inspect/plugin-cutter.xml @@ -3,7 +3,7 @@ <description>Audio Cutter to split audio into non-silent bits</description> <filename>../../gst/cutter/.libs/libgstcutter.so</filename> <basename>libgstcutter.so</basename> - <version>1.6.2</version> + <version>1.7.1</version> <license>LGPL</license> <source>gst-plugins-good</source> <package>GStreamer Good Plug-ins source release</package> diff --git a/docs/plugins/inspect/plugin-debug.xml b/docs/plugins/inspect/plugin-debug.xml index 9eec6260f8568db8633b3a814b64641717ae3b27..aab3bee8571fbc73ca166c3a6faccbc2a8494a09 100644 --- a/docs/plugins/inspect/plugin-debug.xml +++ b/docs/plugins/inspect/plugin-debug.xml @@ -3,7 +3,7 @@ <description>elements for testing and debugging</description> <filename>../../gst/debugutils/.libs/libgstdebug.so</filename> <basename>libgstdebug.so</basename> - <version>1.6.2</version> + <version>1.7.1</version> <license>LGPL</license> <source>gst-plugins-good</source> <package>GStreamer Good Plug-ins source release</package> diff --git a/docs/plugins/inspect/plugin-deinterlace.xml b/docs/plugins/inspect/plugin-deinterlace.xml index 4b77ed5066d7d7d8bfbe0a8485dd259bc09d46a1..f1484e01ef883f8d117f83074344809b7b8c205f 100644 --- a/docs/plugins/inspect/plugin-deinterlace.xml +++ b/docs/plugins/inspect/plugin-deinterlace.xml @@ -3,7 +3,7 @@ <description>Deinterlacer</description> <filename>../../gst/deinterlace/.libs/libgstdeinterlace.so</filename> <basename>libgstdeinterlace.so</basename> - <version>1.6.2</version> + <version>1.7.1</version> <license>LGPL</license> <source>gst-plugins-good</source> <package>GStreamer Good Plug-ins source release</package> diff --git a/docs/plugins/inspect/plugin-dtmf.xml b/docs/plugins/inspect/plugin-dtmf.xml index 08c3f678e21d058f827e5f1ecde7c0c4adf45268..2c47f2ef1c24f1fe0b4aec04bd53dea5ad09ab63 100644 --- a/docs/plugins/inspect/plugin-dtmf.xml +++ b/docs/plugins/inspect/plugin-dtmf.xml @@ -3,7 +3,7 @@ <description>DTMF plugins</description> <filename>../../gst/dtmf/.libs/libgstdtmf.so</filename> <basename>libgstdtmf.so</basename> - <version>1.6.2</version> + <version>1.7.1</version> <license>LGPL</license> <source>gst-plugins-good</source> <package>GStreamer Good Plug-ins source release</package> diff --git a/docs/plugins/inspect/plugin-dv.xml b/docs/plugins/inspect/plugin-dv.xml index 183cc9b179579273f5f7a45c478f2137a8bb3ac7..54e1991bbb3d7202834a849dbc979a7bfe2dd377 100644 --- a/docs/plugins/inspect/plugin-dv.xml +++ b/docs/plugins/inspect/plugin-dv.xml @@ -3,7 +3,7 @@ <description>DV demuxer and decoder based on libdv (libdv.sf.net)</description> <filename>../../ext/dv/.libs/libgstdv.so</filename> <basename>libgstdv.so</basename> - <version>1.6.2</version> + <version>1.7.1</version> <license>LGPL</license> <source>gst-plugins-good</source> <package>GStreamer Good Plug-ins source release</package> diff --git a/docs/plugins/inspect/plugin-effectv.xml b/docs/plugins/inspect/plugin-effectv.xml index 88e4d0e977e3e932503493f7d8693ab448016469..8b1ac544085b06f0bd21171d6990d3c027b1b8c1 100644 --- a/docs/plugins/inspect/plugin-effectv.xml +++ b/docs/plugins/inspect/plugin-effectv.xml @@ -3,7 +3,7 @@ <description>effect plugins from the effectv project</description> <filename>../../gst/effectv/.libs/libgsteffectv.so</filename> <basename>libgsteffectv.so</basename> - <version>1.6.2</version> + <version>1.7.1</version> <license>LGPL</license> <source>gst-plugins-good</source> <package>GStreamer Good Plug-ins source release</package> diff --git a/docs/plugins/inspect/plugin-equalizer.xml b/docs/plugins/inspect/plugin-equalizer.xml index 73d5768c6aa9fc932238acf9cd9c2f227af0d42f..0d518c8cf9b1d54754cdc44e9b86e39ea0de3a90 100644 --- a/docs/plugins/inspect/plugin-equalizer.xml +++ b/docs/plugins/inspect/plugin-equalizer.xml @@ -3,7 +3,7 @@ <description>GStreamer audio equalizers</description> <filename>../../gst/equalizer/.libs/libgstequalizer.so</filename> <basename>libgstequalizer.so</basename> - <version>1.6.2</version> + <version>1.7.1</version> <license>LGPL</license> <source>gst-plugins-good</source> <package>GStreamer Good Plug-ins source release</package> diff --git a/docs/plugins/inspect/plugin-flac.xml b/docs/plugins/inspect/plugin-flac.xml index a74497b28216bf7145369557dc152e70d360068e..62a17bcf089c468e45d47c45f6b5cc20d4b0fe3b 100644 --- a/docs/plugins/inspect/plugin-flac.xml +++ b/docs/plugins/inspect/plugin-flac.xml @@ -3,7 +3,7 @@ <description>The FLAC Lossless compressor Codec</description> <filename>../../ext/flac/.libs/libgstflac.so</filename> <basename>libgstflac.so</basename> - <version>1.6.2</version> + <version>1.7.1</version> <license>LGPL</license> <source>gst-plugins-good</source> <package>GStreamer Good Plug-ins source release</package> diff --git a/docs/plugins/inspect/plugin-flv.xml b/docs/plugins/inspect/plugin-flv.xml index ceec696f58f579c83766f9b1424763238446efe7..ad45b0d73ef77abe06f21cb33e843068130aeffb 100644 --- a/docs/plugins/inspect/plugin-flv.xml +++ b/docs/plugins/inspect/plugin-flv.xml @@ -3,7 +3,7 @@ <description>FLV muxing and demuxing plugin</description> <filename>../../gst/flv/.libs/libgstflv.so</filename> <basename>libgstflv.so</basename> - <version>1.6.2</version> + <version>1.7.1</version> <license>LGPL</license> <source>gst-plugins-good</source> <package>GStreamer Good Plug-ins source release</package> diff --git a/docs/plugins/inspect/plugin-flxdec.xml b/docs/plugins/inspect/plugin-flxdec.xml index 7d56a166caab0c7d1c1226ac8a2d39d2334cc69e..299d77584425c947ed4d2b95a27e87b0bea75dae 100644 --- a/docs/plugins/inspect/plugin-flxdec.xml +++ b/docs/plugins/inspect/plugin-flxdec.xml @@ -3,7 +3,7 @@ <description>FLC/FLI/FLX video decoder</description> <filename>../../gst/flx/.libs/libgstflxdec.so</filename> <basename>libgstflxdec.so</basename> - <version>1.6.2</version> + <version>1.7.1</version> <license>LGPL</license> <source>gst-plugins-good</source> <package>GStreamer Good Plug-ins source release</package> diff --git a/docs/plugins/inspect/plugin-gdkpixbuf.xml b/docs/plugins/inspect/plugin-gdkpixbuf.xml index 0ee60306d38400f910a8d721ca76c72ece913e8b..c1d7114535872603da96c80ff5542e0538beb400 100644 --- a/docs/plugins/inspect/plugin-gdkpixbuf.xml +++ b/docs/plugins/inspect/plugin-gdkpixbuf.xml @@ -3,7 +3,7 @@ <description>GdkPixbuf-based image decoder, overlay and sink</description> <filename>../../ext/gdk_pixbuf/.libs/libgstgdkpixbuf.so</filename> <basename>libgstgdkpixbuf.so</basename> - <version>1.6.2</version> + <version>1.7.1</version> <license>LGPL</license> <source>gst-plugins-good</source> <package>GStreamer Good Plug-ins source release</package> diff --git a/docs/plugins/inspect/plugin-goom.xml b/docs/plugins/inspect/plugin-goom.xml index ce9b092b2711942ad33e06092871c7f9d537a3aa..00df088659a76395623a40de31065e6f84a62f45 100644 --- a/docs/plugins/inspect/plugin-goom.xml +++ b/docs/plugins/inspect/plugin-goom.xml @@ -3,7 +3,7 @@ <description>GOOM visualization filter</description> <filename>../../gst/goom/.libs/libgstgoom.so</filename> <basename>libgstgoom.so</basename> - <version>1.6.2</version> + <version>1.7.1</version> <license>LGPL</license> <source>gst-plugins-good</source> <package>GStreamer Good Plug-ins source release</package> diff --git a/docs/plugins/inspect/plugin-goom2k1.xml b/docs/plugins/inspect/plugin-goom2k1.xml index 239b1c46e9fd384ec16f57dfe65e23f7404fd5e4..7d0c10814f1a12d45526021f167a1a023d602b10 100644 --- a/docs/plugins/inspect/plugin-goom2k1.xml +++ b/docs/plugins/inspect/plugin-goom2k1.xml @@ -3,7 +3,7 @@ <description>GOOM 2k1 visualization filter</description> <filename>../../gst/goom2k1/.libs/libgstgoom2k1.so</filename> <basename>libgstgoom2k1.so</basename> - <version>1.6.2</version> + <version>1.7.1</version> <license>LGPL</license> <source>gst-plugins-good</source> <package>GStreamer Good Plug-ins source release</package> diff --git a/docs/plugins/inspect/plugin-icydemux.xml b/docs/plugins/inspect/plugin-icydemux.xml index 47a610db945a644f272248fd58cdf44680a34a8e..5f243c12a3ab020212062c4c97a1584dc963941e 100644 --- a/docs/plugins/inspect/plugin-icydemux.xml +++ b/docs/plugins/inspect/plugin-icydemux.xml @@ -3,7 +3,7 @@ <description>Demux ICY tags from a stream</description> <filename>../../gst/icydemux/.libs/libgsticydemux.so</filename> <basename>libgsticydemux.so</basename> - <version>1.6.2</version> + <version>1.7.1</version> <license>LGPL</license> <source>gst-plugins-good</source> <package>GStreamer Good Plug-ins source release</package> diff --git a/docs/plugins/inspect/plugin-id3demux.xml b/docs/plugins/inspect/plugin-id3demux.xml index 88ef546a6120d5731caf0ac79052cc790fceb6b1..8f6af4c55e78e8442eff86b3b9bd3ae6d57083ca 100644 --- a/docs/plugins/inspect/plugin-id3demux.xml +++ b/docs/plugins/inspect/plugin-id3demux.xml @@ -3,7 +3,7 @@ <description>Demux ID3v1 and ID3v2 tags from a file</description> <filename>../../gst/id3demux/.libs/libgstid3demux.so</filename> <basename>libgstid3demux.so</basename> - <version>1.6.2</version> + <version>1.7.1</version> <license>LGPL</license> <source>gst-plugins-good</source> <package>GStreamer Good Plug-ins source release</package> diff --git a/docs/plugins/inspect/plugin-imagefreeze.xml b/docs/plugins/inspect/plugin-imagefreeze.xml index ee7883f9f08835d0d28a4be6d74f08d0d36cc7c8..b63e090c12ea1e95de368ceccdc133a22ba7fcb7 100644 --- a/docs/plugins/inspect/plugin-imagefreeze.xml +++ b/docs/plugins/inspect/plugin-imagefreeze.xml @@ -3,7 +3,7 @@ <description>Still frame stream generator</description> <filename>../../gst/imagefreeze/.libs/libgstimagefreeze.so</filename> <basename>libgstimagefreeze.so</basename> - <version>1.6.2</version> + <version>1.7.1</version> <license>LGPL</license> <source>gst-plugins-good</source> <package>GStreamer Good Plug-ins source release</package> diff --git a/docs/plugins/inspect/plugin-interleave.xml b/docs/plugins/inspect/plugin-interleave.xml index 7a925914b111d152c4a6465c86c6e413692d37ed..3d8d887b6db8791403fdcb9057ed4885183bc766 100644 --- a/docs/plugins/inspect/plugin-interleave.xml +++ b/docs/plugins/inspect/plugin-interleave.xml @@ -3,7 +3,7 @@ <description>Audio interleaver/deinterleaver</description> <filename>../../gst/interleave/.libs/libgstinterleave.so</filename> <basename>libgstinterleave.so</basename> - <version>1.6.2</version> + <version>1.7.1</version> <license>LGPL</license> <source>gst-plugins-good</source> <package>GStreamer Good Plug-ins source release</package> diff --git a/docs/plugins/inspect/plugin-isomp4.xml b/docs/plugins/inspect/plugin-isomp4.xml index 5432f57139a2293e265447aeb31ede223274584d..aa43a0671a63f9c3040045c9044b5a53811dba86 100644 --- a/docs/plugins/inspect/plugin-isomp4.xml +++ b/docs/plugins/inspect/plugin-isomp4.xml @@ -3,7 +3,7 @@ <description>ISO base media file format support (mp4, 3gpp, qt, mj2)</description> <filename>../../gst/isomp4/.libs/libgstisomp4.so</filename> <basename>libgstisomp4.so</basename> - <version>1.6.2</version> + <version>1.7.1</version> <license>LGPL</license> <source>gst-plugins-good</source> <package>GStreamer Good Plug-ins source release</package> @@ -80,7 +80,7 @@ <name>audio_%u</name> <direction>sink</direction> <presence>request</presence> - <details>audio/x-raw, format=(string){ S8, U8 }, layout=(string)interleaved, channels=(int)[ 1, 2 ], rate=(int)[ 1, 2147483647 ]; audio/x-raw, format=(string){ S16LE, S16BE }, layout=(string)interleaved, channels=(int)[ 1, 2 ], rate=(int)[ 1, 2147483647 ]</details> + <details>audio/x-raw, format=(string){ S16LE, S16BE, S8, U8 }, layout=(string)interleaved, channels=(int)[ 1, 2 ], rate=(int)[ 1, 2147483647 ]</details> </caps> <caps> <name>video_%u</name> @@ -107,7 +107,7 @@ <name>audio_%u</name> <direction>sink</direction> <presence>request</presence> - <details>audio/mpeg, mpegversion=(int)1, layer=(int)3, channels=(int)[ 1, 2 ], rate=(int)[ 1, 2147483647 ]; audio/mpeg, mpegversion=(int)4, stream-format=(string)raw, channels=(int)[ 1, 8 ], rate=(int)[ 1, 2147483647 ]; audio/x-ac3, channels=(int)[ 1, 6 ], rate=(int)[ 1, 2147483647 ]; audio/x-alac, channels=(int)[ 1, 2 ], rate=(int)[ 1, 2147483647 ]</details> + <details>audio/mpeg, mpegversion=(int)1, layer=(int)3, channels=(int)[ 1, 2 ], rate=(int)[ 1, 2147483647 ]; audio/mpeg, mpegversion=(int)4, stream-format=(string)raw, channels=(int)[ 1, 8 ], rate=(int)[ 1, 2147483647 ]; audio/x-ac3, channels=(int)[ 1, 6 ], rate=(int)[ 1, 2147483647 ]; audio/x-alac, channels=(int)[ 1, 2 ], rate=(int)[ 1, 2147483647 ]; audio/x-opus, channel-mapping-family=(int)[ 0, 255 ], channels=(int)[ 1, 8 ], rate=(int)[ 1, 2147483647 ]</details> </caps> <caps> <name>subtitle_%u</name> @@ -182,7 +182,7 @@ <name>audio_%u</name> <direction>sink</direction> <presence>request</presence> - <details>audio/x-raw, format=(string){ S32LE, S32BE, S24LE, S24BE }, layout=(string)interleaved, channels=(int)[ 1, 2 ], rate=(int)[ 1, 2147483647 ]; audio/x-raw, format=(string){ S8, U8 }, layout=(string)interleaved, channels=(int)[ 1, 2 ], rate=(int)[ 1, 2147483647 ]; audio/x-raw, format=(string){ S16LE, S16BE }, layout=(string)interleaved, channels=(int)[ 1, 2 ], rate=(int)[ 1, 2147483647 ]; audio/mpeg, mpegversion=(int)1, layer=(int)3, channels=(int)[ 1, 2 ], rate=(int)[ 1, 2147483647 ]; audio/mpeg, mpegversion=(int)4, stream-format=(string)raw, channels=(int)[ 1, 8 ], rate=(int)[ 1, 2147483647 ]; audio/x-adpcm, layout=(string)dvi, block_align=(int)[ 64, 8096 ], channels=(int)[ 1, 2 ], rate=(int)[ 1, 2147483647 ]; audio/x-alaw, channels=(int)[ 1, 2 ], rate=(int)[ 1, 2147483647 ]; audio/x-mulaw, channels=(int)[ 1, 2 ], rate=(int)[ 1, 2147483647 ]; audio/AMR, rate=(int)8000, channels=(int)[ 1, 2 ]; audio/AMR-WB, rate=(int)16000, channels=(int)[ 1, 2 ]; audio/x-alac, channels=(int)[ 1, 2 ], rate=(int)[ 1, 2147483647 ]</details> + <details>audio/x-raw, format=(string){ S32LE, S32BE, S24LE, S24BE, S16LE, S16BE, S8, U8 }, layout=(string)interleaved, channels=(int)[ 1, 2 ], rate=(int)[ 1, 2147483647 ]; audio/mpeg, mpegversion=(int)1, layer=(int)3, channels=(int)[ 1, 2 ], rate=(int)[ 1, 2147483647 ]; audio/mpeg, mpegversion=(int)4, stream-format=(string)raw, channels=(int)[ 1, 8 ], rate=(int)[ 1, 2147483647 ]; audio/x-adpcm, layout=(string)dvi, block_align=(int)[ 64, 8096 ], channels=(int)[ 1, 2 ], rate=(int)[ 1, 2147483647 ]; audio/x-alaw, channels=(int)[ 1, 2 ], rate=(int)[ 1, 2147483647 ]; audio/x-mulaw, channels=(int)[ 1, 2 ], rate=(int)[ 1, 2147483647 ]; audio/AMR, rate=(int)8000, channels=(int)[ 1, 2 ]; audio/AMR-WB, rate=(int)16000, channels=(int)[ 1, 2 ]; audio/x-alac, channels=(int)[ 1, 2 ], rate=(int)[ 1, 2147483647 ]</details> </caps> <caps> <name>subtitle_%u</name> diff --git a/docs/plugins/inspect/plugin-jack.xml b/docs/plugins/inspect/plugin-jack.xml index 773abe61f3aa3d2a9b98e8ab61316b21c5c7675c..accc864a6760de68dbd03b585fc08ac7a3afbc0d 100644 --- a/docs/plugins/inspect/plugin-jack.xml +++ b/docs/plugins/inspect/plugin-jack.xml @@ -3,7 +3,7 @@ <description>JACK audio elements</description> <filename>../../ext/jack/.libs/libgstjack.so</filename> <basename>libgstjack.so</basename> - <version>1.6.2</version> + <version>1.7.1</version> <license>LGPL</license> <source>gst-plugins-good</source> <package>GStreamer Good Plug-ins source release</package> diff --git a/docs/plugins/inspect/plugin-jpeg.xml b/docs/plugins/inspect/plugin-jpeg.xml index 9588eb3463a1d64ea28e65d1760ec51acf63c24b..b527dee853d85aa4fb4792b51d40f010a1d2094a 100644 --- a/docs/plugins/inspect/plugin-jpeg.xml +++ b/docs/plugins/inspect/plugin-jpeg.xml @@ -3,7 +3,7 @@ <description>JPeg plugin library</description> <filename>../../ext/jpeg/.libs/libgstjpeg.so</filename> <basename>libgstjpeg.so</basename> - <version>1.6.2</version> + <version>1.7.1</version> <license>LGPL</license> <source>gst-plugins-good</source> <package>GStreamer Good Plug-ins source release</package> diff --git a/docs/plugins/inspect/plugin-level.xml b/docs/plugins/inspect/plugin-level.xml index 308b5450cb3c4be0b05bfc51a5469ad31e7af0de..8055bbda351eda6a971a65a4df2c94a5327b7c79 100644 --- a/docs/plugins/inspect/plugin-level.xml +++ b/docs/plugins/inspect/plugin-level.xml @@ -3,7 +3,7 @@ <description>Audio level plugin</description> <filename>../../gst/level/.libs/libgstlevel.so</filename> <basename>libgstlevel.so</basename> - <version>1.6.2</version> + <version>1.7.1</version> <license>LGPL</license> <source>gst-plugins-good</source> <package>GStreamer Good Plug-ins source release</package> diff --git a/docs/plugins/inspect/plugin-matroska.xml b/docs/plugins/inspect/plugin-matroska.xml index 382ed4cd2c11649b92deeab6f52833e8fc4c1964..f658fad8ee703fa8f54c4d4344c3f25dd840c415 100644 --- a/docs/plugins/inspect/plugin-matroska.xml +++ b/docs/plugins/inspect/plugin-matroska.xml @@ -3,7 +3,7 @@ <description>Matroska and WebM stream handling</description> <filename>../../gst/matroska/.libs/libgstmatroska.so</filename> <basename>libgstmatroska.so</basename> - <version>1.6.2</version> + <version>1.7.1</version> <license>LGPL</license> <source>gst-plugins-good</source> <package>GStreamer Good Plug-ins source release</package> @@ -65,7 +65,7 @@ <name>video_%u</name> <direction>sink</direction> <presence>request</presence> - <details>video/mpeg, mpegversion=(int){ 1, 2, 4 }, systemstream=(boolean)false, width=(int)[ 16, 4096 ], height=(int)[ 16, 4096 ]; video/x-h264, stream-format=(string)avc, alignment=(string)au, width=(int)[ 16, 4096 ], height=(int)[ 16, 4096 ]; video/x-h265, stream-format=(string)hvc1, alignment=(string)au, width=(int)[ 16, 4096 ], height=(int)[ 16, 4096 ]; video/x-divx, width=(int)[ 16, 4096 ], height=(int)[ 16, 4096 ]; video/x-huffyuv, width=(int)[ 16, 4096 ], height=(int)[ 16, 4096 ]; video/x-dv, width=(int)[ 16, 4096 ], height=(int)[ 16, 4096 ]; video/x-h263, width=(int)[ 16, 4096 ], height=(int)[ 16, 4096 ]; video/x-msmpeg, width=(int)[ 16, 4096 ], height=(int)[ 16, 4096 ]; image/jpeg, width=(int)[ 16, 4096 ], height=(int)[ 16, 4096 ]; video/x-theora; video/x-dirac, width=(int)[ 16, 4096 ], height=(int)[ 16, 4096 ]; video/x-pn-realvideo, rmversion=(int)[ 1, 4 ], width=(int)[ 16, 4096 ], height=(int)[ 16, 4096 ]; video/x-vp8, width=(int)[ 16, 4096 ], height=(int)[ 16, 4096 ]; video/x-raw, format=(string){ YUY2, I420, YV12, UYVY, AYUV, GRAY8, BGR, RGB }, width=(int)[ 16, 4096 ], height=(int)[ 16, 4096 ]; video/x-wmv, wmvversion=(int)[ 1, 3 ], width=(int)[ 16, 4096 ], height=(int)[ 16, 4096 ]</details> + <details>video/mpeg, mpegversion=(int){ 1, 2, 4 }, systemstream=(boolean)false, width=(int)[ 16, 4096 ], height=(int)[ 16, 4096 ]; video/x-h264, stream-format=(string)avc, alignment=(string)au, width=(int)[ 16, 4096 ], height=(int)[ 16, 4096 ]; video/x-h265, stream-format=(string)hvc1, alignment=(string)au, width=(int)[ 16, 4096 ], height=(int)[ 16, 4096 ]; video/x-divx, width=(int)[ 16, 4096 ], height=(int)[ 16, 4096 ]; video/x-huffyuv, width=(int)[ 16, 4096 ], height=(int)[ 16, 4096 ]; video/x-dv, width=(int)[ 16, 4096 ], height=(int)[ 16, 4096 ]; video/x-h263, width=(int)[ 16, 4096 ], height=(int)[ 16, 4096 ]; video/x-msmpeg, width=(int)[ 16, 4096 ], height=(int)[ 16, 4096 ]; image/jpeg, width=(int)[ 16, 4096 ], height=(int)[ 16, 4096 ]; video/x-theora; video/x-dirac, width=(int)[ 16, 4096 ], height=(int)[ 16, 4096 ]; video/x-pn-realvideo, rmversion=(int)[ 1, 4 ], width=(int)[ 16, 4096 ], height=(int)[ 16, 4096 ]; video/x-vp8, width=(int)[ 16, 4096 ], height=(int)[ 16, 4096 ]; video/x-vp9, width=(int)[ 16, 4096 ], height=(int)[ 16, 4096 ]; video/x-raw, format=(string){ YUY2, I420, YV12, UYVY, AYUV, GRAY8, BGR, RGB }, width=(int)[ 16, 4096 ], height=(int)[ 16, 4096 ]; video/x-prores, width=(int)[ 16, 4096 ], height=(int)[ 16, 4096 ]; video/x-wmv, wmvversion=(int)[ 1, 3 ], width=(int)[ 16, 4096 ], height=(int)[ 16, 4096 ]</details> </caps> <caps> <name>src</name> @@ -107,7 +107,7 @@ <name>audio_%u</name> <direction>sink</direction> <presence>request</presence> - <details>audio/x-vorbis, channels=(int)[ 1, 2147483647 ], rate=(int)[ 1, 2147483647 ]</details> + <details>audio/x-vorbis, channels=(int)[ 1, 2147483647 ], rate=(int)[ 1, 2147483647 ]; audio/x-opus, channels=(int)[ 1, 2147483647 ], rate=(int)[ 1, 2147483647 ]</details> </caps> <caps> <name>subtitle_%u</name> diff --git a/docs/plugins/inspect/plugin-mulaw.xml b/docs/plugins/inspect/plugin-mulaw.xml index d8edf1f4f934f7b4c71278713d3b45da7380e45e..3c88705a4626e9f59f65eb68a02a41a3f5b59455 100644 --- a/docs/plugins/inspect/plugin-mulaw.xml +++ b/docs/plugins/inspect/plugin-mulaw.xml @@ -3,7 +3,7 @@ <description>MuLaw audio conversion routines</description> <filename>../../gst/law/.libs/libgstmulaw.so</filename> <basename>libgstmulaw.so</basename> - <version>1.6.2</version> + <version>1.7.1</version> <license>LGPL</license> <source>gst-plugins-good</source> <package>GStreamer Good Plug-ins source release</package> diff --git a/docs/plugins/inspect/plugin-multifile.xml b/docs/plugins/inspect/plugin-multifile.xml index 3fa202be776c22b2ed0248b5ddbd6daee29d5e59..84f923da521a9327efd8f09cca9cb22b385a679a 100644 --- a/docs/plugins/inspect/plugin-multifile.xml +++ b/docs/plugins/inspect/plugin-multifile.xml @@ -3,7 +3,7 @@ <description>Reads/Writes buffers from/to sequentially named files</description> <filename>../../gst/multifile/.libs/libgstmultifile.so</filename> <basename>libgstmultifile.so</basename> - <version>1.6.2</version> + <version>1.7.1</version> <license>LGPL</license> <source>gst-plugins-good</source> <package>GStreamer Good Plug-ins source release</package> diff --git a/docs/plugins/inspect/plugin-multipart.xml b/docs/plugins/inspect/plugin-multipart.xml index d07e3e1e5ed8e17b2294d95b6d48a93a475e7795..bb141552bed6ad27ca514dd2045f6d42d412e05d 100644 --- a/docs/plugins/inspect/plugin-multipart.xml +++ b/docs/plugins/inspect/plugin-multipart.xml @@ -3,7 +3,7 @@ <description>multipart stream manipulation</description> <filename>../../gst/multipart/.libs/libgstmultipart.so</filename> <basename>libgstmultipart.so</basename> - <version>1.6.2</version> + <version>1.7.1</version> <license>LGPL</license> <source>gst-plugins-good</source> <package>GStreamer Good Plug-ins source release</package> diff --git a/docs/plugins/inspect/plugin-navigationtest.xml b/docs/plugins/inspect/plugin-navigationtest.xml index a80a959497b9720f066c317ae9da5d616f2b13a2..6d6e3bcbb770d290d4e2f550c3ac399df0c2ce7d 100644 --- a/docs/plugins/inspect/plugin-navigationtest.xml +++ b/docs/plugins/inspect/plugin-navigationtest.xml @@ -3,7 +3,7 @@ <description>Template for a video filter</description> <filename>../../gst/debugutils/.libs/libgstnavigationtest.so</filename> <basename>libgstnavigationtest.so</basename> - <version>1.6.2</version> + <version>1.7.1</version> <license>LGPL</license> <source>gst-plugins-good</source> <package>GStreamer Good Plug-ins source release</package> diff --git a/docs/plugins/inspect/plugin-oss4.xml b/docs/plugins/inspect/plugin-oss4.xml index e02b9f9378c36532a9bbe5390abf5f8cc28fb234..c4781769a7594a85b543633de24c13bf6f905cc2 100644 --- a/docs/plugins/inspect/plugin-oss4.xml +++ b/docs/plugins/inspect/plugin-oss4.xml @@ -3,7 +3,7 @@ <description>Open Sound System (OSS) version 4 support for GStreamer</description> <filename>../../sys/oss4/.libs/libgstoss4audio.so</filename> <basename>libgstoss4audio.so</basename> - <version>1.6.2</version> + <version>1.7.1</version> <license>LGPL</license> <source>gst-plugins-good</source> <package>GStreamer Good Plug-ins source release</package> diff --git a/docs/plugins/inspect/plugin-ossaudio.xml b/docs/plugins/inspect/plugin-ossaudio.xml index 4fac1649a2915d398985400cc029563436f8add7..672b42663df3377fc3f1d16635b3babc6106581b 100644 --- a/docs/plugins/inspect/plugin-ossaudio.xml +++ b/docs/plugins/inspect/plugin-ossaudio.xml @@ -3,7 +3,7 @@ <description>OSS (Open Sound System) support for GStreamer</description> <filename>../../sys/oss/.libs/libgstossaudio.so</filename> <basename>libgstossaudio.so</basename> - <version>1.6.2</version> + <version>1.7.1</version> <license>LGPL</license> <source>gst-plugins-good</source> <package>GStreamer Good Plug-ins source release</package> diff --git a/docs/plugins/inspect/plugin-png.xml b/docs/plugins/inspect/plugin-png.xml index 783d13902f2a7d5812b4d54f06198e0f91ac494d..6c6d710b9b3fbc483dc70ce41ae7ae846856a5fe 100644 --- a/docs/plugins/inspect/plugin-png.xml +++ b/docs/plugins/inspect/plugin-png.xml @@ -3,7 +3,7 @@ <description>PNG plugin library</description> <filename>../../ext/libpng/.libs/libgstpng.so</filename> <basename>libgstpng.so</basename> - <version>1.6.2</version> + <version>1.7.1</version> <license>LGPL</license> <source>gst-plugins-good</source> <package>GStreamer Good Plug-ins source release</package> diff --git a/docs/plugins/inspect/plugin-pulseaudio.xml b/docs/plugins/inspect/plugin-pulseaudio.xml index c85a9608d11ccd20020c94400ad14648ad1968b2..a632c83f407cd2a7a67e2ea06e6e8eff1beffe12 100644 --- a/docs/plugins/inspect/plugin-pulseaudio.xml +++ b/docs/plugins/inspect/plugin-pulseaudio.xml @@ -3,7 +3,7 @@ <description>PulseAudio plugin library</description> <filename>../../ext/pulse/.libs/libgstpulse.so</filename> <basename>libgstpulse.so</basename> - <version>1.6.2</version> + <version>1.7.1</version> <license>LGPL</license> <source>gst-plugins-good</source> <package>GStreamer Good Plug-ins source release</package> diff --git a/docs/plugins/inspect/plugin-replaygain.xml b/docs/plugins/inspect/plugin-replaygain.xml index 5e7cb5372c0da496d6bd7736d74e0821bc9cefe3..32e8544f7c25a40a069d23ab4bbab3595f9a5e93 100644 --- a/docs/plugins/inspect/plugin-replaygain.xml +++ b/docs/plugins/inspect/plugin-replaygain.xml @@ -3,7 +3,7 @@ <description>ReplayGain volume normalization</description> <filename>../../gst/replaygain/.libs/libgstreplaygain.so</filename> <basename>libgstreplaygain.so</basename> - <version>1.6.2</version> + <version>1.7.1</version> <license>LGPL</license> <source>gst-plugins-good</source> <package>GStreamer Good Plug-ins source release</package> diff --git a/docs/plugins/inspect/plugin-rtp.xml b/docs/plugins/inspect/plugin-rtp.xml index 9f29598672dd3bee7aad6e6c6acf46903a0fe195..266de86d2c8fe70204b93c9ab1d1752b3ab00cc0 100644 --- a/docs/plugins/inspect/plugin-rtp.xml +++ b/docs/plugins/inspect/plugin-rtp.xml @@ -3,7 +3,7 @@ <description>Real-time protocol plugins</description> <filename>../../gst/rtp/.libs/libgstrtp.so</filename> <basename>libgstrtp.so</basename> - <version>1.6.2</version> + <version>1.7.1</version> <license>LGPL</license> <source>gst-plugins-good</source> <package>GStreamer Good Plug-ins source release</package> @@ -1630,7 +1630,7 @@ <name>rtpvp8pay</name> <longname>RTP VP8 payloader</longname> <class>Codec/Payloader/Network/RTP</class> - <description>Puts VP8 video in RTP packets)</description> + <description>Puts VP8 video in RTP packets</description> <author>Sjoerd Simons <sjoerd@luon.net></author> <pads> <caps> diff --git a/docs/plugins/inspect/plugin-rtpmanager.xml b/docs/plugins/inspect/plugin-rtpmanager.xml index 661e0ace4593164452af701cd66b4c41e457c068..9822b338b29d2b189bc0ff9a71392a013543505f 100644 --- a/docs/plugins/inspect/plugin-rtpmanager.xml +++ b/docs/plugins/inspect/plugin-rtpmanager.xml @@ -3,7 +3,7 @@ <description>RTP session management plugin library</description> <filename>../../gst/rtpmanager/.libs/libgstrtpmanager.so</filename> <basename>libgstrtpmanager.so</basename> - <version>1.6.2</version> + <version>1.7.1</version> <license>LGPL</license> <source>gst-plugins-good</source> <package>GStreamer Good Plug-ins source release</package> diff --git a/docs/plugins/inspect/plugin-rtsp.xml b/docs/plugins/inspect/plugin-rtsp.xml index 419a25bd17dfe37796fb0020b54a8eb92be9486e..21c2c115ca666f1c7b1128d35f15e1eec81a5353 100644 --- a/docs/plugins/inspect/plugin-rtsp.xml +++ b/docs/plugins/inspect/plugin-rtsp.xml @@ -3,7 +3,7 @@ <description>transfer data via RTSP</description> <filename>../../gst/rtsp/.libs/libgstrtsp.so</filename> <basename>libgstrtsp.so</basename> - <version>1.6.2</version> + <version>1.7.1</version> <license>LGPL</license> <source>gst-plugins-good</source> <package>GStreamer Good Plug-ins source release</package> diff --git a/docs/plugins/inspect/plugin-shapewipe.xml b/docs/plugins/inspect/plugin-shapewipe.xml index a5c1fe89282a5a2d66392be8dfe259c8df3d0e6d..91e0d501bc967cea8fad016b70262ea46d68b45c 100644 --- a/docs/plugins/inspect/plugin-shapewipe.xml +++ b/docs/plugins/inspect/plugin-shapewipe.xml @@ -3,7 +3,7 @@ <description>Shape Wipe transition filter</description> <filename>../../gst/shapewipe/.libs/libgstshapewipe.so</filename> <basename>libgstshapewipe.so</basename> - <version>1.6.2</version> + <version>1.7.1</version> <license>LGPL</license> <source>gst-plugins-good</source> <package>GStreamer Good Plug-ins source release</package> diff --git a/docs/plugins/inspect/plugin-shout2send.xml b/docs/plugins/inspect/plugin-shout2send.xml index 1dab99252ea9bdf32334c7221607d5abb64188b7..a567c9c79e3ad85fa795bbb8a85637e8ff63dd3c 100644 --- a/docs/plugins/inspect/plugin-shout2send.xml +++ b/docs/plugins/inspect/plugin-shout2send.xml @@ -3,7 +3,7 @@ <description>Sends data to an icecast server using libshout2</description> <filename>../../ext/shout2/.libs/libgstshout2.so</filename> <basename>libgstshout2.so</basename> - <version>1.6.2</version> + <version>1.7.1</version> <license>LGPL</license> <source>gst-plugins-good</source> <package>libshout2</package> diff --git a/docs/plugins/inspect/plugin-smpte.xml b/docs/plugins/inspect/plugin-smpte.xml index ba4dc774419b9d1a7109c2b292f9dfbedddfaccb..b8bed6f67ad239689573fc2711458f7f177002d9 100644 --- a/docs/plugins/inspect/plugin-smpte.xml +++ b/docs/plugins/inspect/plugin-smpte.xml @@ -3,7 +3,7 @@ <description>Apply the standard SMPTE transitions on video images</description> <filename>../../gst/smpte/.libs/libgstsmpte.so</filename> <basename>libgstsmpte.so</basename> - <version>1.6.2</version> + <version>1.7.1</version> <license>LGPL</license> <source>gst-plugins-good</source> <package>GStreamer Good Plug-ins source release</package> diff --git a/docs/plugins/inspect/plugin-soup.xml b/docs/plugins/inspect/plugin-soup.xml index ac80ea1d3633dbb1b6a84001feb382f2be9fdde8..e6bb36de02a39e5f8f3471e94e8dc4b22a2766b2 100644 --- a/docs/plugins/inspect/plugin-soup.xml +++ b/docs/plugins/inspect/plugin-soup.xml @@ -3,7 +3,7 @@ <description>libsoup HTTP client src/sink</description> <filename>../../ext/soup/.libs/libgstsouphttpsrc.so</filename> <basename>libgstsouphttpsrc.so</basename> - <version>1.6.2</version> + <version>1.7.1</version> <license>LGPL</license> <source>gst-plugins-good</source> <package>GStreamer Good Plug-ins source release</package> diff --git a/docs/plugins/inspect/plugin-spectrum.xml b/docs/plugins/inspect/plugin-spectrum.xml index f9398993090cd8dbdac7d54a3559026895678a95..d4e740aafb93100b4326c5ee9e52d2f1912a0318 100644 --- a/docs/plugins/inspect/plugin-spectrum.xml +++ b/docs/plugins/inspect/plugin-spectrum.xml @@ -3,7 +3,7 @@ <description>Run an FFT on the audio signal, output spectrum data</description> <filename>../../gst/spectrum/.libs/libgstspectrum.so</filename> <basename>libgstspectrum.so</basename> - <version>1.6.2</version> + <version>1.7.1</version> <license>LGPL</license> <source>gst-plugins-good</source> <package>GStreamer Good Plug-ins source release</package> diff --git a/docs/plugins/inspect/plugin-speex.xml b/docs/plugins/inspect/plugin-speex.xml index 0353413eb09f1188d7b71fd6f1f71c7a31a31ddb..13364c336132461f33c2844386583d04afbf535b 100644 --- a/docs/plugins/inspect/plugin-speex.xml +++ b/docs/plugins/inspect/plugin-speex.xml @@ -3,7 +3,7 @@ <description>Speex plugin library</description> <filename>../../ext/speex/.libs/libgstspeex.so</filename> <basename>libgstspeex.so</basename> - <version>1.6.2</version> + <version>1.7.1</version> <license>LGPL</license> <source>gst-plugins-good</source> <package>GStreamer Good Plug-ins source release</package> diff --git a/docs/plugins/inspect/plugin-taglib.xml b/docs/plugins/inspect/plugin-taglib.xml index 0db4ab40ede5e42ac439e6b9944f91a875952655..06997aacf87b0ac6f24cccd61c2ad0807f250c30 100644 --- a/docs/plugins/inspect/plugin-taglib.xml +++ b/docs/plugins/inspect/plugin-taglib.xml @@ -3,7 +3,7 @@ <description>Tag writing plug-in based on taglib</description> <filename>../../ext/taglib/.libs/libgsttaglib.so</filename> <basename>libgsttaglib.so</basename> - <version>1.6.2</version> + <version>1.7.1</version> <license>LGPL</license> <source>gst-plugins-good</source> <package>GStreamer Good Plug-ins source release</package> diff --git a/docs/plugins/inspect/plugin-udp.xml b/docs/plugins/inspect/plugin-udp.xml index ed92266bbd7860be5e7edccab691406b63a2fdda..6751e80b24b04a19442c00338ba8fd459bbf98d1 100644 --- a/docs/plugins/inspect/plugin-udp.xml +++ b/docs/plugins/inspect/plugin-udp.xml @@ -3,7 +3,7 @@ <description>transfer data via UDP</description> <filename>../../gst/udp/.libs/libgstudp.so</filename> <basename>libgstudp.so</basename> - <version>1.6.2</version> + <version>1.7.1</version> <license>LGPL</license> <source>gst-plugins-good</source> <package>GStreamer Good Plug-ins source release</package> diff --git a/docs/plugins/inspect/plugin-video4linux2.xml b/docs/plugins/inspect/plugin-video4linux2.xml index 7e6887b7ac3764c36ff2bfe509dbc6675d17a9ec..6fbc5d0389b3cb27c013896c001c567aca102b55 100644 --- a/docs/plugins/inspect/plugin-video4linux2.xml +++ b/docs/plugins/inspect/plugin-video4linux2.xml @@ -3,7 +3,7 @@ <description>elements for Video 4 Linux</description> <filename>../../sys/v4l2/.libs/libgstvideo4linux2.so</filename> <basename>libgstvideo4linux2.so</basename> - <version>1.6.2</version> + <version>1.7.1</version> <license>LGPL</license> <source>gst-plugins-good</source> <package>GStreamer Good Plug-ins source release</package> @@ -29,7 +29,7 @@ <name>sink</name> <direction>sink</direction> <presence>always</presence> - <details>image/jpeg; video/mpeg, mpegversion=(int)4, systemstream=(boolean)false; video/mpeg, mpegversion=(int)2; video/mpegts, systemstream=(boolean)true; video/x-bayer, format=(string){ bggr, gbrg, grbg, rggb }, width=(int)[ 1, 32768 ], height=(int)[ 1, 32768 ], framerate=(fraction)[ 0/1, 2147483647/1 ]; video/x-dv, systemstream=(boolean)true; video/x-h263, variant=(string)itu; video/x-h264, stream-format=(string)byte-stream, alignment=(string)au; video/x-pwc1, width=(int)[ 1, 32768 ], height=(int)[ 1, 32768 ], framerate=(fraction)[ 0/1, 2147483647/1 ]; video/x-pwc2, width=(int)[ 1, 32768 ], height=(int)[ 1, 32768 ], framerate=(fraction)[ 0/1, 2147483647/1 ]; video/x-raw, format=(string){ RGB15, RGB16, BGR, RGB, BGRx, BGRA, xRGB, ARGB, GRAY8, YVU9, YV12, YUY2, UYVY, Y42B, Y41B, NV12_64Z32, YUV9, I420, YVYU, NV21, NV12 }, width=(int)[ 1, 32768 ], height=(int)[ 1, 32768 ], framerate=(fraction)[ 0/1, 2147483647/1 ]; video/x-sonix, width=(int)[ 1, 32768 ], height=(int)[ 1, 32768 ], framerate=(fraction)[ 0/1, 2147483647/1 ]; video/x-vp8</details> + <details>image/jpeg; video/mpeg, mpegversion=(int)4, systemstream=(boolean)false; video/mpeg, mpegversion=(int)2; video/mpegts, systemstream=(boolean)true; video/x-bayer, format=(string){ bggr, gbrg, grbg, rggb }, width=(int)[ 1, 32768 ], height=(int)[ 1, 32768 ], framerate=(fraction)[ 0/1, 2147483647/1 ]; video/x-dv, systemstream=(boolean)true; video/x-h263, variant=(string)itu; video/x-h264, stream-format=(string){ byte-stream, avc }, alignment=(string)au; video/x-pwc1, width=(int)[ 1, 32768 ], height=(int)[ 1, 32768 ], framerate=(fraction)[ 0/1, 2147483647/1 ]; video/x-pwc2, width=(int)[ 1, 32768 ], height=(int)[ 1, 32768 ], framerate=(fraction)[ 0/1, 2147483647/1 ]; video/x-raw, format=(string){ RGB16, BGR, RGB, GRAY8, GRAY16_LE, GRAY16_BE, YVU9, YV12, YUY2, YVYU, UYVY, Y42B, Y41B, YUV9, NV12_64Z32, NV24, NV61, NV16, NV21, NV12, I420, BGRA, BGRx, ARGB, xRGB, BGR15, RGB15 }, width=(int)[ 1, 32768 ], height=(int)[ 1, 32768 ], framerate=(fraction)[ 0/1, 2147483647/1 ]; video/x-sonix, width=(int)[ 1, 32768 ], height=(int)[ 1, 32768 ], framerate=(fraction)[ 0/1, 2147483647/1 ]; video/x-vp8; video/x-wmv, wmvversion=(int)3, format=(string)WVC1</details> </caps> </pads> </element> @@ -44,7 +44,7 @@ <name>src</name> <direction>source</direction> <presence>always</presence> - <details>image/jpeg; video/mpeg, mpegversion=(int)4, systemstream=(boolean)false; video/mpeg, mpegversion=(int)2; video/mpegts, systemstream=(boolean)true; video/x-bayer, format=(string){ bggr, gbrg, grbg, rggb }, width=(int)[ 1, 32768 ], height=(int)[ 1, 32768 ], framerate=(fraction)[ 0/1, 2147483647/1 ]; video/x-dv, systemstream=(boolean)true; video/x-h263, variant=(string)itu; video/x-h264, stream-format=(string)byte-stream, alignment=(string)au; video/x-pwc1, width=(int)[ 1, 32768 ], height=(int)[ 1, 32768 ], framerate=(fraction)[ 0/1, 2147483647/1 ]; video/x-pwc2, width=(int)[ 1, 32768 ], height=(int)[ 1, 32768 ], framerate=(fraction)[ 0/1, 2147483647/1 ]; video/x-raw, format=(string){ RGB15, RGB16, BGR, RGB, BGRx, BGRA, xRGB, ARGB, GRAY8, YVU9, YV12, YUY2, UYVY, Y42B, Y41B, NV12_64Z32, YUV9, I420, YVYU, NV21, NV12 }, width=(int)[ 1, 32768 ], height=(int)[ 1, 32768 ], framerate=(fraction)[ 0/1, 2147483647/1 ]; video/x-sonix, width=(int)[ 1, 32768 ], height=(int)[ 1, 32768 ], framerate=(fraction)[ 0/1, 2147483647/1 ]; video/x-vp8</details> + <details>image/jpeg; video/mpeg, mpegversion=(int)4, systemstream=(boolean)false; video/mpeg, mpegversion=(int)2; video/mpegts, systemstream=(boolean)true; video/x-bayer, format=(string){ bggr, gbrg, grbg, rggb }, width=(int)[ 1, 32768 ], height=(int)[ 1, 32768 ], framerate=(fraction)[ 0/1, 2147483647/1 ]; video/x-dv, systemstream=(boolean)true; video/x-h263, variant=(string)itu; video/x-h264, stream-format=(string){ byte-stream, avc }, alignment=(string)au; video/x-pwc1, width=(int)[ 1, 32768 ], height=(int)[ 1, 32768 ], framerate=(fraction)[ 0/1, 2147483647/1 ]; video/x-pwc2, width=(int)[ 1, 32768 ], height=(int)[ 1, 32768 ], framerate=(fraction)[ 0/1, 2147483647/1 ]; video/x-raw, format=(string){ RGB16, BGR, RGB, GRAY8, GRAY16_LE, GRAY16_BE, YVU9, YV12, YUY2, YVYU, UYVY, Y42B, Y41B, YUV9, NV12_64Z32, NV24, NV61, NV16, NV21, NV12, I420, BGRA, BGRx, ARGB, xRGB, BGR15, RGB15 }, width=(int)[ 1, 32768 ], height=(int)[ 1, 32768 ], framerate=(fraction)[ 0/1, 2147483647/1 ]; video/x-sonix, width=(int)[ 1, 32768 ], height=(int)[ 1, 32768 ], framerate=(fraction)[ 0/1, 2147483647/1 ]; video/x-vp8; video/x-wmv, wmvversion=(int)3, format=(string)WVC1</details> </caps> </pads> </element> diff --git a/docs/plugins/inspect/plugin-videobox.xml b/docs/plugins/inspect/plugin-videobox.xml index 2cd03f321cd7647057881d4d3cd7a861c36d8ac3..eae305946aade8d2acfdc9d21c957d13ebf7ce8b 100644 --- a/docs/plugins/inspect/plugin-videobox.xml +++ b/docs/plugins/inspect/plugin-videobox.xml @@ -3,7 +3,7 @@ <description>resizes a video by adding borders or cropping</description> <filename>../../gst/videobox/.libs/libgstvideobox.so</filename> <basename>libgstvideobox.so</basename> - <version>1.6.2</version> + <version>1.7.1</version> <license>LGPL</license> <source>gst-plugins-good</source> <package>GStreamer Good Plug-ins source release</package> diff --git a/docs/plugins/inspect/plugin-videocrop.xml b/docs/plugins/inspect/plugin-videocrop.xml index af3515d374e639e70f79667e15c566232987a0aa..acf8a7b4b468a5a0c881cb9d08ae1724eadfed85 100644 --- a/docs/plugins/inspect/plugin-videocrop.xml +++ b/docs/plugins/inspect/plugin-videocrop.xml @@ -3,7 +3,7 @@ <description>Crops video into a user-defined region</description> <filename>../../gst/videocrop/.libs/libgstvideocrop.so</filename> <basename>libgstvideocrop.so</basename> - <version>1.6.2</version> + <version>1.7.1</version> <license>LGPL</license> <source>gst-plugins-good</source> <package>GStreamer Good Plug-ins source release</package> diff --git a/docs/plugins/inspect/plugin-videofilter.xml b/docs/plugins/inspect/plugin-videofilter.xml index 870b5a8c3933a8176a9d83e6c4075f56ce78b359..d71307475c22e7bed087b1101e7c3c1a41530e85 100644 --- a/docs/plugins/inspect/plugin-videofilter.xml +++ b/docs/plugins/inspect/plugin-videofilter.xml @@ -3,7 +3,7 @@ <description>Video filters plugin</description> <filename>../../gst/videofilter/.libs/libgstvideofilter.so</filename> <basename>libgstvideofilter.so</basename> - <version>1.6.2</version> + <version>1.7.1</version> <license>LGPL</license> <source>gst-plugins-good</source> <package>GStreamer Good Plug-ins source release</package> diff --git a/docs/plugins/inspect/plugin-videomixer.xml b/docs/plugins/inspect/plugin-videomixer.xml index 1681a72531f3423b27a3046d28dbbdfc0ee63f39..ca01144817005e4b0d49fde569565009c4a1de83 100644 --- a/docs/plugins/inspect/plugin-videomixer.xml +++ b/docs/plugins/inspect/plugin-videomixer.xml @@ -3,7 +3,7 @@ <description>Video mixer</description> <filename>../../gst/videomixer/.libs/libgstvideomixer.so</filename> <basename>libgstvideomixer.so</basename> - <version>1.6.2</version> + <version>1.7.1</version> <license>LGPL</license> <source>gst-plugins-good</source> <package>GStreamer Good Plug-ins source release</package> diff --git a/docs/plugins/inspect/plugin-vpx.xml b/docs/plugins/inspect/plugin-vpx.xml index d07388e428a8e0464c2d47f3f68f8c2784c26791..793ba2e14f4b8a16382ccdb438fa027b8a418bd0 100644 --- a/docs/plugins/inspect/plugin-vpx.xml +++ b/docs/plugins/inspect/plugin-vpx.xml @@ -3,7 +3,7 @@ <description>VP8 plugin</description> <filename>../../ext/vpx/.libs/libgstvpx.so</filename> <basename>libgstvpx.so</basename> - <version>1.6.2</version> + <version>1.7.1</version> <license>LGPL</license> <source>gst-plugins-good</source> <package>GStreamer Good Plug-ins source release</package> diff --git a/docs/plugins/inspect/plugin-wavenc.xml b/docs/plugins/inspect/plugin-wavenc.xml index d58285e7ec42310a10dc16ad3b7349b1353c3024..707f1bfe5b08c0c2564c12990397efa852aac8fb 100644 --- a/docs/plugins/inspect/plugin-wavenc.xml +++ b/docs/plugins/inspect/plugin-wavenc.xml @@ -3,7 +3,7 @@ <description>Encode raw audio into WAV</description> <filename>../../gst/wavenc/.libs/libgstwavenc.so</filename> <basename>libgstwavenc.so</basename> - <version>1.6.2</version> + <version>1.7.1</version> <license>LGPL</license> <source>gst-plugins-good</source> <package>GStreamer Good Plug-ins source release</package> diff --git a/docs/plugins/inspect/plugin-wavpack.xml b/docs/plugins/inspect/plugin-wavpack.xml index 34cafeb3caa610d0d8e97ebc91d112a0f2166f2f..7cf24c9d701f35859b8f455d2f1b2206a0d16579 100644 --- a/docs/plugins/inspect/plugin-wavpack.xml +++ b/docs/plugins/inspect/plugin-wavpack.xml @@ -3,7 +3,7 @@ <description>Wavpack lossless/lossy audio format handling</description> <filename>../../ext/wavpack/.libs/libgstwavpack.so</filename> <basename>libgstwavpack.so</basename> - <version>1.6.2</version> + <version>1.7.1</version> <license>LGPL</license> <source>gst-plugins-good</source> <package>GStreamer Good Plug-ins source release</package> diff --git a/docs/plugins/inspect/plugin-wavparse.xml b/docs/plugins/inspect/plugin-wavparse.xml index 45244bc1e822e6d62d6bd03ea843e46d7f30be09..1cd2daf28ff9b63f5b02098049e87cdda732ece2 100644 --- a/docs/plugins/inspect/plugin-wavparse.xml +++ b/docs/plugins/inspect/plugin-wavparse.xml @@ -3,7 +3,7 @@ <description>Parse a .wav file into raw audio</description> <filename>../../gst/wavparse/.libs/libgstwavparse.so</filename> <basename>libgstwavparse.so</basename> - <version>1.6.2</version> + <version>1.7.1</version> <license>LGPL</license> <source>gst-plugins-good</source> <package>GStreamer Good Plug-ins source release</package> diff --git a/docs/plugins/inspect/plugin-ximagesrc.xml b/docs/plugins/inspect/plugin-ximagesrc.xml index bf0377df12e9d87124f103757150055c5b130ff5..191b531628058522ef0a8a9ce3d80e1ec2de42f6 100644 --- a/docs/plugins/inspect/plugin-ximagesrc.xml +++ b/docs/plugins/inspect/plugin-ximagesrc.xml @@ -3,7 +3,7 @@ <description>X11 video input plugin using standard Xlib calls</description> <filename>../../sys/ximage/.libs/libgstximagesrc.so</filename> <basename>libgstximagesrc.so</basename> - <version>1.6.2</version> + <version>1.7.1</version> <license>LGPL</license> <source>gst-plugins-good</source> <package>GStreamer Good Plug-ins source release</package> diff --git a/docs/plugins/inspect/plugin-y4menc.xml b/docs/plugins/inspect/plugin-y4menc.xml index 37142ec076192189082f67d7225b5ac0219f6dea..6274245bc33e276d089818771d6fc4aea843cea7 100644 --- a/docs/plugins/inspect/plugin-y4menc.xml +++ b/docs/plugins/inspect/plugin-y4menc.xml @@ -3,7 +3,7 @@ <description>Encodes a YUV frame into the yuv4mpeg format (mjpegtools)</description> <filename>../../gst/y4m/.libs/libgsty4menc.so</filename> <basename>libgsty4menc.so</basename> - <version>1.6.2</version> + <version>1.7.1</version> <license>LGPL</license> <source>gst-plugins-good</source> <package>GStreamer Good Plug-ins source release</package> diff --git a/ext/Makefile.in b/ext/Makefile.in index af9201f045193a669a35cdf133eeb0d42594cf64..f2a43705639edec44d3674d8c2e10fba56652c6b 100644 --- a/ext/Makefile.in +++ b/ext/Makefile.in @@ -455,6 +455,8 @@ VALGRIND_PATH = @VALGRIND_PATH@ VERSION = @VERSION@ VPX_130_CFLAGS = @VPX_130_CFLAGS@ VPX_130_LIBS = @VPX_130_LIBS@ +VPX_140_CFLAGS = @VPX_140_CFLAGS@ +VPX_140_LIBS = @VPX_140_LIBS@ VPX_CFLAGS = @VPX_CFLAGS@ VPX_LIBS = @VPX_LIBS@ WARNING_CFLAGS = @WARNING_CFLAGS@ diff --git a/ext/aalib/Makefile.in b/ext/aalib/Makefile.in index 01011447ae6537837a475e4b42208f2aedd18f48..999b7919fd492ab72ac3816d1608ad5ed2b8f638 100644 --- a/ext/aalib/Makefile.in +++ b/ext/aalib/Makefile.in @@ -477,6 +477,8 @@ VALGRIND_PATH = @VALGRIND_PATH@ VERSION = @VERSION@ VPX_130_CFLAGS = @VPX_130_CFLAGS@ VPX_130_LIBS = @VPX_130_LIBS@ +VPX_140_CFLAGS = @VPX_140_CFLAGS@ +VPX_140_LIBS = @VPX_140_LIBS@ VPX_CFLAGS = @VPX_CFLAGS@ VPX_LIBS = @VPX_LIBS@ WARNING_CFLAGS = @WARNING_CFLAGS@ diff --git a/ext/cairo/Makefile.in b/ext/cairo/Makefile.in index 77fb097ecdddcb432839dd3981b6d3160bfd730e..c5156ecec729d5b85392398ee6c159a6b6410478 100644 --- a/ext/cairo/Makefile.in +++ b/ext/cairo/Makefile.in @@ -478,6 +478,8 @@ VALGRIND_PATH = @VALGRIND_PATH@ VERSION = @VERSION@ VPX_130_CFLAGS = @VPX_130_CFLAGS@ VPX_130_LIBS = @VPX_130_LIBS@ +VPX_140_CFLAGS = @VPX_140_CFLAGS@ +VPX_140_LIBS = @VPX_140_LIBS@ VPX_CFLAGS = @VPX_CFLAGS@ VPX_LIBS = @VPX_LIBS@ WARNING_CFLAGS = @WARNING_CFLAGS@ diff --git a/ext/dv/Makefile.in b/ext/dv/Makefile.in index 74b15be14e7eb23bd2623d1e2549ce97c0abbc05..297b31f61e86ceb819a345aa780cd6fe97a248d6 100644 --- a/ext/dv/Makefile.in +++ b/ext/dv/Makefile.in @@ -487,6 +487,8 @@ VALGRIND_PATH = @VALGRIND_PATH@ VERSION = @VERSION@ VPX_130_CFLAGS = @VPX_130_CFLAGS@ VPX_130_LIBS = @VPX_130_LIBS@ +VPX_140_CFLAGS = @VPX_140_CFLAGS@ +VPX_140_LIBS = @VPX_140_LIBS@ VPX_CFLAGS = @VPX_CFLAGS@ VPX_LIBS = @VPX_LIBS@ WARNING_CFLAGS = @WARNING_CFLAGS@ diff --git a/ext/dv/gstdvdec.h b/ext/dv/gstdvdec.h index 8dda7df7edc043f9196c194284f1d8bab0a4ace7..4031ef051eb7ea2dadcda156d7819691109fc2b1 100644 --- a/ext/dv/gstdvdec.h +++ b/ext/dv/gstdvdec.h @@ -61,7 +61,6 @@ struct _GstDVDec { gboolean PAL; gboolean interlaced; gboolean wide; - gint frame_len; /* input caps */ gboolean sink_negotiated; @@ -74,7 +73,6 @@ struct _GstDVDec { gboolean need_par; /* negotiated output */ - dv_color_space_t space; gint bpp; gboolean src_negotiated; diff --git a/ext/flac/Makefile.in b/ext/flac/Makefile.in index c4161303ca51e7cf537116859fcf63ff54412dff..759c66d0ac000b3c3282cd7021c899cbabf25c22 100644 --- a/ext/flac/Makefile.in +++ b/ext/flac/Makefile.in @@ -479,6 +479,8 @@ VALGRIND_PATH = @VALGRIND_PATH@ VERSION = @VERSION@ VPX_130_CFLAGS = @VPX_130_CFLAGS@ VPX_130_LIBS = @VPX_130_LIBS@ +VPX_140_CFLAGS = @VPX_140_CFLAGS@ +VPX_140_LIBS = @VPX_140_LIBS@ VPX_CFLAGS = @VPX_CFLAGS@ VPX_LIBS = @VPX_LIBS@ WARNING_CFLAGS = @WARNING_CFLAGS@ diff --git a/ext/gdk_pixbuf/Makefile.in b/ext/gdk_pixbuf/Makefile.in index 62af39a154eaf59416e2aa07ec5c533435142ed8..27ef876af973cb35aca8cad6942c7c489c895ac1 100644 --- a/ext/gdk_pixbuf/Makefile.in +++ b/ext/gdk_pixbuf/Makefile.in @@ -480,6 +480,8 @@ VALGRIND_PATH = @VALGRIND_PATH@ VERSION = @VERSION@ VPX_130_CFLAGS = @VPX_130_CFLAGS@ VPX_130_LIBS = @VPX_130_LIBS@ +VPX_140_CFLAGS = @VPX_140_CFLAGS@ +VPX_140_LIBS = @VPX_140_LIBS@ VPX_CFLAGS = @VPX_CFLAGS@ VPX_LIBS = @VPX_LIBS@ WARNING_CFLAGS = @WARNING_CFLAGS@ diff --git a/ext/gdk_pixbuf/gstgdkpixbufdec.c b/ext/gdk_pixbuf/gstgdkpixbufdec.c index 02e780ce00eea7c0d7ea168d7991ea3b5c19eb57..36cfbc0274d6d949c728cf49c5ce070fecca8bb0 100644 --- a/ext/gdk_pixbuf/gstgdkpixbufdec.c +++ b/ext/gdk_pixbuf/gstgdkpixbufdec.c @@ -547,6 +547,11 @@ gst_gdk_pixbuf_dec_change_state (GstElement * element, } g_list_free_full (dec->pending_events, (GDestroyNotify) gst_event_unref); dec->pending_events = NULL; + if (dec->pixbuf_loader != NULL) { + gdk_pixbuf_loader_close (dec->pixbuf_loader, NULL); + g_object_unref (G_OBJECT (dec->pixbuf_loader)); + dec->pixbuf_loader = NULL; + } break; default: break; diff --git a/ext/gdk_pixbuf/gstgdkpixbufsink.c b/ext/gdk_pixbuf/gstgdkpixbufsink.c index 5e7937855b05307dbf4bdef326da6e9aab2216e6..0151569e3e56f6bf95294f56f1f62253b1c1cb90 100644 --- a/ext/gdk_pixbuf/gstgdkpixbufsink.c +++ b/ext/gdk_pixbuf/gstgdkpixbufsink.c @@ -229,7 +229,7 @@ gst_gdk_pixbuf_sink_set_caps (GstBaseSink * basesink, GstCaps * caps) GstGdkPixbufSink *sink = GST_GDK_PIXBUF_SINK (basesink); GstVideoInfo info; GstVideoFormat fmt; - gint w, h, s, par_n, par_d; + gint w, h, par_n, par_d; GST_LOG_OBJECT (sink, "caps: %" GST_PTR_FORMAT, caps); @@ -241,12 +241,17 @@ gst_gdk_pixbuf_sink_set_caps (GstBaseSink * basesink, GstCaps * caps) fmt = GST_VIDEO_INFO_FORMAT (&info); w = GST_VIDEO_INFO_WIDTH (&info); h = GST_VIDEO_INFO_HEIGHT (&info); - s = GST_VIDEO_INFO_COMP_PSTRIDE (&info, 0); par_n = GST_VIDEO_INFO_PAR_N (&info); par_d = GST_VIDEO_INFO_PAR_N (&info); - g_assert ((fmt == GST_VIDEO_FORMAT_RGB && s == 3) || - (fmt == GST_VIDEO_FORMAT_RGBA && s == 4)); +#ifndef G_DISABLE_ASSERT + { + gint s; + s = GST_VIDEO_INFO_COMP_PSTRIDE (&info, 0); + g_assert ((fmt == GST_VIDEO_FORMAT_RGB && s == 3) || + (fmt == GST_VIDEO_FORMAT_RGBA && s == 4)); + } +#endif GST_VIDEO_SINK_WIDTH (sink) = w; GST_VIDEO_SINK_HEIGHT (sink) = h; diff --git a/ext/jack/Makefile.in b/ext/jack/Makefile.in index 5afdee95c7d46591ebba973b206f680f062598b6..6de6de49ba14bbbea0d6f7234ec0d7d3d998ee9e 100644 --- a/ext/jack/Makefile.in +++ b/ext/jack/Makefile.in @@ -479,6 +479,8 @@ VALGRIND_PATH = @VALGRIND_PATH@ VERSION = @VERSION@ VPX_130_CFLAGS = @VPX_130_CFLAGS@ VPX_130_LIBS = @VPX_130_LIBS@ +VPX_140_CFLAGS = @VPX_140_CFLAGS@ +VPX_140_LIBS = @VPX_140_LIBS@ VPX_CFLAGS = @VPX_CFLAGS@ VPX_LIBS = @VPX_LIBS@ WARNING_CFLAGS = @WARNING_CFLAGS@ diff --git a/ext/jpeg/Makefile.in b/ext/jpeg/Makefile.in index 1bf94589f5c18be649218cfb78e49482c9f85d68..6ef84b6f81b6738dcde6827919ebecbe252150ea 100644 --- a/ext/jpeg/Makefile.in +++ b/ext/jpeg/Makefile.in @@ -478,6 +478,8 @@ VALGRIND_PATH = @VALGRIND_PATH@ VERSION = @VERSION@ VPX_130_CFLAGS = @VPX_130_CFLAGS@ VPX_130_LIBS = @VPX_130_LIBS@ +VPX_140_CFLAGS = @VPX_140_CFLAGS@ +VPX_140_LIBS = @VPX_140_LIBS@ VPX_CFLAGS = @VPX_CFLAGS@ VPX_LIBS = @VPX_LIBS@ WARNING_CFLAGS = @WARNING_CFLAGS@ diff --git a/ext/jpeg/gstjpegdec.c b/ext/jpeg/gstjpegdec.c index d67f1de77ab6b100551fc68db3d0542f3f967080..edf616e3d6e3849996e790ae0a49d95abff601ca 100644 --- a/ext/jpeg/gstjpegdec.c +++ b/ext/jpeg/gstjpegdec.c @@ -1108,6 +1108,12 @@ gst_jpeg_dec_handle_frame (GstVideoDecoder * bdec, GstVideoCodecFrame * frame) GST_MAP_READWRITE)) goto alloc_failed; + if (setjmp (dec->jerr.setjmp_buffer)) { + code = dec->jerr.pub.msg_code; + gst_video_frame_unmap (&vframe); + goto decode_error; + } + GST_LOG_OBJECT (dec, "width %d, height %d", width, height); if (dec->cinfo.jpeg_color_space == JCS_RGB) { @@ -1141,6 +1147,11 @@ gst_jpeg_dec_handle_frame (GstVideoDecoder * bdec, GstVideoCodecFrame * frame) gst_video_frame_unmap (&vframe); + if (setjmp (dec->jerr.setjmp_buffer)) { + code = dec->jerr.pub.msg_code; + goto decode_error; + } + GST_LOG_OBJECT (dec, "decompressing finished"); jpeg_finish_decompress (&dec->cinfo); diff --git a/ext/libcaca/Makefile.in b/ext/libcaca/Makefile.in index 75fca4e4aa99fecdeebfa4bb51bf3d8d4d8d9055..0b2a467305a107f2fe0f12bcec26778d7296e56e 100644 --- a/ext/libcaca/Makefile.in +++ b/ext/libcaca/Makefile.in @@ -477,6 +477,8 @@ VALGRIND_PATH = @VALGRIND_PATH@ VERSION = @VERSION@ VPX_130_CFLAGS = @VPX_130_CFLAGS@ VPX_130_LIBS = @VPX_130_LIBS@ +VPX_140_CFLAGS = @VPX_140_CFLAGS@ +VPX_140_LIBS = @VPX_140_LIBS@ VPX_CFLAGS = @VPX_CFLAGS@ VPX_LIBS = @VPX_LIBS@ WARNING_CFLAGS = @WARNING_CFLAGS@ diff --git a/ext/libpng/Makefile.in b/ext/libpng/Makefile.in index 84b0d64d8f254e6effe505ed465eacfb33588794..8169de01ee466fa22e1c5819f8ff5d818cf52f86 100644 --- a/ext/libpng/Makefile.in +++ b/ext/libpng/Makefile.in @@ -478,6 +478,8 @@ VALGRIND_PATH = @VALGRIND_PATH@ VERSION = @VERSION@ VPX_130_CFLAGS = @VPX_130_CFLAGS@ VPX_130_LIBS = @VPX_130_LIBS@ +VPX_140_CFLAGS = @VPX_140_CFLAGS@ +VPX_140_LIBS = @VPX_140_LIBS@ VPX_CFLAGS = @VPX_CFLAGS@ VPX_LIBS = @VPX_LIBS@ WARNING_CFLAGS = @WARNING_CFLAGS@ diff --git a/ext/pulse/Makefile.in b/ext/pulse/Makefile.in index 36a1cded2df84d7568bc552e61050e51a08bebe5..ee295e46b24fca00fb713c6055c6a70bb9acd3a1 100644 --- a/ext/pulse/Makefile.in +++ b/ext/pulse/Makefile.in @@ -480,6 +480,8 @@ VALGRIND_PATH = @VALGRIND_PATH@ VERSION = @VERSION@ VPX_130_CFLAGS = @VPX_130_CFLAGS@ VPX_130_LIBS = @VPX_130_LIBS@ +VPX_140_CFLAGS = @VPX_140_CFLAGS@ +VPX_140_LIBS = @VPX_140_LIBS@ VPX_CFLAGS = @VPX_CFLAGS@ VPX_LIBS = @VPX_LIBS@ WARNING_CFLAGS = @WARNING_CFLAGS@ diff --git a/ext/raw1394/Makefile.in b/ext/raw1394/Makefile.in index e856c6bdbfba11a5d00db13c0d2b79b5ddb31334..4e527d93295fe2588ea7ca37b6f45b60988f2fdd 100644 --- a/ext/raw1394/Makefile.in +++ b/ext/raw1394/Makefile.in @@ -484,6 +484,8 @@ VALGRIND_PATH = @VALGRIND_PATH@ VERSION = @VERSION@ VPX_130_CFLAGS = @VPX_130_CFLAGS@ VPX_130_LIBS = @VPX_130_LIBS@ +VPX_140_CFLAGS = @VPX_140_CFLAGS@ +VPX_140_LIBS = @VPX_140_LIBS@ VPX_CFLAGS = @VPX_CFLAGS@ VPX_LIBS = @VPX_LIBS@ WARNING_CFLAGS = @WARNING_CFLAGS@ diff --git a/ext/raw1394/gstdv1394src.c b/ext/raw1394/gstdv1394src.c index 09755ba53b19c2d8d9978498c3c2d4e9a2cc76f0..dbc760726831c665ff7a030a63e55f35146ec02f 100644 --- a/ext/raw1394/gstdv1394src.c +++ b/ext/raw1394/gstdv1394src.c @@ -790,8 +790,12 @@ gst_dv1394src_start (GstBaseSrc * bsrc) READ_SOCKET (src) = control_sock[0]; WRITE_SOCKET (src) = control_sock[1]; - fcntl (READ_SOCKET (src), F_SETFL, O_NONBLOCK); - fcntl (WRITE_SOCKET (src), F_SETFL, O_NONBLOCK); + if (fcntl (READ_SOCKET (src), F_SETFL, O_NONBLOCK) < 0) + GST_ERROR_OBJECT (src, "failed to make read socket non-blocking: %s", + g_strerror (errno)); + if (fcntl (WRITE_SOCKET (src), F_SETFL, O_NONBLOCK) < 0) + GST_ERROR_OBJECT (src, "failed to make write socket non-blocking: %s", + g_strerror (errno)); src->handle = raw1394_new_handle (); diff --git a/ext/raw1394/gsthdv1394src.c b/ext/raw1394/gsthdv1394src.c index f81f70f9dbc2335709f2022c450efc241d1ee385..0b07a3723f0d5586d1349903eb51ad162710760b 100644 --- a/ext/raw1394/gsthdv1394src.c +++ b/ext/raw1394/gsthdv1394src.c @@ -527,8 +527,12 @@ gst_hdv1394src_start (GstBaseSrc * bsrc) READ_SOCKET (src) = control_sock[0]; WRITE_SOCKET (src) = control_sock[1]; - fcntl (READ_SOCKET (src), F_SETFL, O_NONBLOCK); - fcntl (WRITE_SOCKET (src), F_SETFL, O_NONBLOCK); + if (fcntl (READ_SOCKET (src), F_SETFL, O_NONBLOCK) < 0) + GST_ERROR_OBJECT (src, "failed to make read socket non-blocking: %s", + g_strerror (errno)); + if (fcntl (WRITE_SOCKET (src), F_SETFL, O_NONBLOCK) < 0) + GST_ERROR_OBJECT (src, "failed to make write socket non-blocking: %s", + g_strerror (errno)); src->handle = raw1394_new_handle (); diff --git a/ext/shout2/Makefile.in b/ext/shout2/Makefile.in index 171a9a5bba5828dac266ac4d749f36ea5046296b..e0cee844351770cde027c1c61a2cd950f2b8719e 100644 --- a/ext/shout2/Makefile.in +++ b/ext/shout2/Makefile.in @@ -476,6 +476,8 @@ VALGRIND_PATH = @VALGRIND_PATH@ VERSION = @VERSION@ VPX_130_CFLAGS = @VPX_130_CFLAGS@ VPX_130_LIBS = @VPX_130_LIBS@ +VPX_140_CFLAGS = @VPX_140_CFLAGS@ +VPX_140_LIBS = @VPX_140_LIBS@ VPX_CFLAGS = @VPX_CFLAGS@ VPX_LIBS = @VPX_LIBS@ WARNING_CFLAGS = @WARNING_CFLAGS@ diff --git a/ext/shout2/gstshout2.c b/ext/shout2/gstshout2.c index 2384ebc9a591a6402a1df053e6f5ee1523b5a9c2..e154ba87183cdd753b76c301ec3d05d0121cab00 100644 --- a/ext/shout2/gstshout2.c +++ b/ext/shout2/gstshout2.c @@ -688,52 +688,44 @@ gst_shout2send_set_property (GObject * object, guint prop_id, switch (prop_id) { case ARG_IP: - if (shout2send->ip) - g_free (shout2send->ip); + g_free (shout2send->ip); shout2send->ip = g_strdup (g_value_get_string (value)); break; case ARG_PORT: shout2send->port = g_value_get_int (value); break; case ARG_PASSWORD: - if (shout2send->password) - g_free (shout2send->password); + g_free (shout2send->password); shout2send->password = g_strdup (g_value_get_string (value)); break; case ARG_USERNAME: - if (shout2send->username) - g_free (shout2send->username); + g_free (shout2send->username); shout2send->username = g_strdup (g_value_get_string (value)); break; case ARG_PUBLIC: shout2send->ispublic = g_value_get_boolean (value); break; case ARG_STREAMNAME: /* Name of the stream */ - if (shout2send->streamname) - g_free (shout2send->streamname); + g_free (shout2send->streamname); shout2send->streamname = g_strdup (g_value_get_string (value)); break; case ARG_DESCRIPTION: /* Description of the stream */ - if (shout2send->description) - g_free (shout2send->description); + g_free (shout2send->description); shout2send->description = g_strdup (g_value_get_string (value)); break; case ARG_GENRE: /* Genre of the stream */ - if (shout2send->genre) - g_free (shout2send->genre); + g_free (shout2send->genre); shout2send->genre = g_strdup (g_value_get_string (value)); break; case ARG_PROTOCOL: /* protocol to connect with */ shout2send->protocol = g_value_get_enum (value); break; case ARG_MOUNT: /* mountpoint of stream (icecast only) */ - if (shout2send->mount) - g_free (shout2send->mount); + g_free (shout2send->mount); shout2send->mount = g_strdup (g_value_get_string (value)); break; case ARG_URL: /* the stream's homepage URL */ - if (shout2send->url) - g_free (shout2send->url); + g_free (shout2send->url); shout2send->url = g_strdup (g_value_get_string (value)); break; default: diff --git a/ext/soup/Makefile.in b/ext/soup/Makefile.in index b860fdf2fad4f1502b497b02b10c2be07b53e359..8d8aaaf0b1332172b92f5770df1c1bf336aaf4d2 100644 --- a/ext/soup/Makefile.in +++ b/ext/soup/Makefile.in @@ -480,6 +480,8 @@ VALGRIND_PATH = @VALGRIND_PATH@ VERSION = @VERSION@ VPX_130_CFLAGS = @VPX_130_CFLAGS@ VPX_130_LIBS = @VPX_130_LIBS@ +VPX_140_CFLAGS = @VPX_140_CFLAGS@ +VPX_140_LIBS = @VPX_140_LIBS@ VPX_CFLAGS = @VPX_CFLAGS@ VPX_LIBS = @VPX_LIBS@ WARNING_CFLAGS = @WARNING_CFLAGS@ diff --git a/ext/soup/gstsouphttpclientsink.c b/ext/soup/gstsouphttpclientsink.c index b38953fbb2ea0423106566d2bc8c1f37bbeaa06f..108aabfc3b62de18b2d049a441380fa12aa763e8 100644 --- a/ext/soup/gstsouphttpclientsink.c +++ b/ext/soup/gstsouphttpclientsink.c @@ -43,8 +43,6 @@ #include "gstsouphttpclientsink.h" #include "gstsouputils.h" -#include <gst/glib-compat-private.h> - GST_DEBUG_CATEGORY_STATIC (souphttpclientsink_dbg); #define GST_CAT_DEFAULT souphttpclientsink_dbg @@ -72,7 +70,6 @@ static GstFlowReturn gst_soup_http_client_sink_preroll (GstBaseSink * sink, static GstFlowReturn gst_soup_http_client_sink_render (GstBaseSink * sink, GstBuffer * buffer); -static void free_buffer_list (GList * list); static void gst_soup_http_client_sink_reset (GstSoupHttpClientSink * souphttpsink); static void authenticate (SoupSession * session, SoupMessage * msg, @@ -95,7 +92,9 @@ enum PROP_PROXY_PW, PROP_COOKIES, PROP_SESSION, - PROP_SOUP_LOG_LEVEL + PROP_SOUP_LOG_LEVEL, + PROP_RETRY_DELAY, + PROP_RETRIES }; #define DEFAULT_USER_AGENT "GStreamer souphttpclientsink " @@ -171,6 +170,14 @@ gst_soup_http_client_sink_class_init (GstSoupHttpClientSinkClass * klass) g_object_class_install_property (gobject_class, PROP_COOKIES, g_param_spec_boxed ("cookies", "Cookies", "HTTP request cookies", G_TYPE_STRV, G_PARAM_READWRITE | G_PARAM_STATIC_STRINGS)); + g_object_class_install_property (gobject_class, PROP_RETRY_DELAY, + g_param_spec_int ("retry-delay", "Retry Delay", + "Delay in seconds between retries after a failure", 1, G_MAXINT, 5, + G_PARAM_READWRITE | G_PARAM_STATIC_STRINGS)); + g_object_class_install_property (gobject_class, PROP_RETRIES, + g_param_spec_int ("retries", "Retries", + "Maximum number of retries, zero to disable, -1 to retry forever", + -1, G_MAXINT, 0, G_PARAM_READWRITE | G_PARAM_STATIC_STRINGS)); /** * GstSoupHttpClientSink::http-log-level: * @@ -231,6 +238,8 @@ gst_soup_http_client_sink_init (GstSoupHttpClientSink * souphttpsink) souphttpsink->prop_session = NULL; souphttpsink->timeout = 1; souphttpsink->log_level = DEFAULT_SOUP_LOG_LEVEL; + souphttpsink->retry_delay = 5; + souphttpsink->retries = 0; proxy = g_getenv ("http_proxy"); if (proxy && !gst_soup_http_client_sink_set_proxy (souphttpsink, proxy)) { GST_WARNING_OBJECT (souphttpsink, @@ -251,7 +260,12 @@ gst_soup_http_client_sink_reset (GstSoupHttpClientSink * souphttpsink) souphttpsink->reason_phrase = NULL; souphttpsink->status_code = 0; souphttpsink->offset = 0; + souphttpsink->failures = 0; + g_list_free_full (souphttpsink->streamheader_buffers, + (GDestroyNotify) gst_buffer_unref); + g_list_free_full (souphttpsink->sent_buffers, + (GDestroyNotify) gst_buffer_unref); } static gboolean @@ -292,6 +306,14 @@ gst_soup_http_client_sink_set_property (GObject * object, guint property_id, g_free (souphttpsink->location); souphttpsink->location = g_value_dup_string (value); souphttpsink->offset = 0; + if ((souphttpsink->location == NULL) + || !gst_uri_is_valid (souphttpsink->location)) { + GST_WARNING_OBJECT (souphttpsink, + "The location (\"%s\") set, is not a valid uri.", + souphttpsink->location); + g_free (souphttpsink->location); + souphttpsink->location = NULL; + } break; case PROP_USER_AGENT: g_free (souphttpsink->user_agent); @@ -339,6 +361,12 @@ gst_soup_http_client_sink_set_property (GObject * object, guint property_id, case PROP_SOUP_LOG_LEVEL: souphttpsink->log_level = g_value_get_enum (value); break; + case PROP_RETRY_DELAY: + souphttpsink->retry_delay = g_value_get_int (value); + break; + case PROP_RETRIES: + souphttpsink->retries = g_value_get_int (value); + break; default: G_OBJECT_WARN_INVALID_PROPERTY_ID (object, property_id, pspec); break; @@ -394,6 +422,12 @@ gst_soup_http_client_sink_get_property (GObject * object, guint property_id, case PROP_SOUP_LOG_LEVEL: g_value_set_enum (value, souphttpsink->log_level); break; + case PROP_RETRY_DELAY: + g_value_set_int (value, souphttpsink->retry_delay); + break; + case PROP_RETRIES: + g_value_set_int (value, souphttpsink->retries); + break; default: G_OBJECT_WARN_INVALID_PROPERTY_ID (object, property_id, pspec); break; @@ -450,7 +484,8 @@ gst_soup_http_client_sink_set_caps (GstBaseSink * sink, GstCaps * caps) structure = gst_caps_get_structure (caps, 0); value_array = gst_structure_get_value (structure, "streamheader"); if (value_array) { - free_buffer_list (souphttpsink->streamheader_buffers); + g_list_free_full (souphttpsink->streamheader_buffers, + (GDestroyNotify) gst_buffer_unref); souphttpsink->streamheader_buffers = NULL; n = gst_value_array_get_size (value_array); @@ -527,10 +562,17 @@ gst_soup_http_client_sink_start (GstBaseSink * sink) g_mutex_lock (&souphttpsink->mutex); - /* FIXME: error handling */ souphttpsink->thread = g_thread_try_new ("souphttpclientsink-thread", thread_func, souphttpsink, &error); + if (error != NULL) { + GST_DEBUG_OBJECT (souphttpsink, "failed to start thread, %s", + error->message); + g_error_free (error); + g_mutex_unlock (&souphttpsink->mutex); + return FALSE; + } + GST_LOG_OBJECT (souphttpsink, "waiting for main loop thread to start up"); g_cond_wait (&souphttpsink->cond, &souphttpsink->mutex); g_mutex_unlock (&souphttpsink->mutex); @@ -573,8 +615,19 @@ gst_soup_http_client_sink_stop (GstBaseSink * sink) g_object_unref (souphttpsink->session); } + g_mutex_lock (&souphttpsink->mutex); + if (souphttpsink->timer) { + g_source_destroy (souphttpsink->timer); + g_source_unref (souphttpsink->timer); + souphttpsink->timer = NULL; + } + g_mutex_unlock (&souphttpsink->mutex); + if (souphttpsink->loop) { g_main_loop_quit (souphttpsink->loop); + g_mutex_lock (&souphttpsink->mutex); + g_cond_signal (&souphttpsink->cond); + g_mutex_unlock (&souphttpsink->mutex); g_thread_join (souphttpsink->thread); g_main_loop_unref (souphttpsink->loop); souphttpsink->loop = NULL; @@ -626,17 +679,6 @@ gst_soup_http_client_sink_preroll (GstBaseSink * sink, GstBuffer * buffer) return GST_FLOW_OK; } -static void -free_buffer_list (GList * list) -{ - GList *g; - for (g = list; g; g = g_list_next (g)) { - GstBuffer *buffer = g->data; - gst_buffer_unref (buffer); - } - g_list_free (list); -} - static void send_message_locked (GstSoupHttpClientSink * souphttpsink) { @@ -650,12 +692,22 @@ send_message_locked (GstSoupHttpClientSink * souphttpsink) /* If the URI went away, drop all these buffers */ if (souphttpsink->location == NULL) { GST_DEBUG_OBJECT (souphttpsink, "URI went away, dropping queued buffers"); - free_buffer_list (souphttpsink->queued_buffers); + g_list_free_full (souphttpsink->queued_buffers, + (GDestroyNotify) gst_buffer_unref); souphttpsink->queued_buffers = NULL; return; } souphttpsink->message = soup_message_new ("PUT", souphttpsink->location); + if (souphttpsink->message == NULL) { + GST_WARNING_OBJECT (souphttpsink, + "URI could not be parsed while creating message."); + g_list_free_full (souphttpsink->queued_buffers, + (GDestroyNotify) gst_buffer_unref); + souphttpsink->queued_buffers = NULL; + return; + } + soup_message_set_flags (souphttpsink->message, (souphttpsink->automatic_redirect ? 0 : SOUP_MESSAGE_NO_REDIRECT)); @@ -715,7 +767,8 @@ send_message_locked (GstSoupHttpClientSink * souphttpsink) if (n == 0) { GST_DEBUG_OBJECT (souphttpsink, "total size of buffers queued is 0, freeing everything"); - free_buffer_list (souphttpsink->queued_buffers); + g_list_free_full (souphttpsink->queued_buffers, + (GDestroyNotify) gst_buffer_unref); souphttpsink->queued_buffers = NULL; g_object_unref (souphttpsink->message); souphttpsink->message = NULL; @@ -739,6 +792,11 @@ send_message (GstSoupHttpClientSink * souphttpsink) { g_mutex_lock (&souphttpsink->mutex); send_message_locked (souphttpsink); + if (souphttpsink->timer) { + g_source_destroy (souphttpsink->timer); + g_source_unref (souphttpsink->timer); + souphttpsink->timer = NULL; + } g_mutex_unlock (&souphttpsink->mutex); return FALSE; @@ -757,14 +815,48 @@ callback (SoupSession * session, SoupMessage * msg, gpointer user_data) souphttpsink->message = NULL; if (!SOUP_STATUS_IS_SUCCESSFUL (msg->status_code)) { - souphttpsink->status_code = msg->status_code; - souphttpsink->reason_phrase = g_strdup (msg->reason_phrase); + souphttpsink->failures++; + if (souphttpsink->retries && + (souphttpsink->retries < 0 || + souphttpsink->retries >= souphttpsink->failures)) { + guint64 retry_delay; + const char *retry_after = + soup_message_headers_get_one (msg->response_headers, + "Retry-After"); + if (retry_after) { + gchar *end = NULL; + retry_delay = g_ascii_strtoull (retry_after, &end, 10); + if (end || errno) { + retry_delay = souphttpsink->retry_delay; + } else { + retry_delay = MAX (retry_delay, souphttpsink->retry_delay); + } + GST_WARNING_OBJECT (souphttpsink, "Could not write to HTTP URI: " + "status: %d %s (retrying PUT after %" G_GINT64_FORMAT + " seconds with Retry-After: %s)", msg->status_code, + msg->reason_phrase, retry_delay, retry_after); + } else { + retry_delay = souphttpsink->retry_delay; + GST_WARNING_OBJECT (souphttpsink, "Could not write to HTTP URI: " + "status: %d %s (retrying PUT after %" G_GINT64_FORMAT + " seconds)", msg->status_code, msg->reason_phrase, retry_delay); + } + souphttpsink->timer = g_timeout_source_new_seconds (retry_delay); + g_source_set_callback (souphttpsink->timer, (GSourceFunc) (send_message), + souphttpsink, NULL); + g_source_attach (souphttpsink->timer, souphttpsink->context); + } else { + souphttpsink->status_code = msg->status_code; + souphttpsink->reason_phrase = g_strdup (msg->reason_phrase); + } g_mutex_unlock (&souphttpsink->mutex); return; } - free_buffer_list (souphttpsink->sent_buffers); + g_list_free_full (souphttpsink->sent_buffers, + (GDestroyNotify) gst_buffer_unref); souphttpsink->sent_buffers = NULL; + souphttpsink->failures = 0; send_message_locked (souphttpsink); g_mutex_unlock (&souphttpsink->mutex); @@ -778,10 +870,9 @@ gst_soup_http_client_sink_render (GstBaseSink * sink, GstBuffer * buffer) gboolean wake; if (souphttpsink->status_code != 0) { - /* FIXME we should allow a moderate amount of retries. */ GST_ELEMENT_ERROR (souphttpsink, RESOURCE, WRITE, ("Could not write to HTTP URI"), - ("error: %d %s", souphttpsink->status_code, + ("status: %d %s", souphttpsink->status_code, souphttpsink->reason_phrase)); return GST_FLOW_ERROR; } diff --git a/ext/soup/gstsouphttpclientsink.h b/ext/soup/gstsouphttpclientsink.h index a33027523f3c48f9fa44fcb0106ac6b0ed91392c..29c4500169d978a28a041e1a7ebc95dbeda66725 100644 --- a/ext/soup/gstsouphttpclientsink.h +++ b/ext/soup/gstsouphttpclientsink.h @@ -43,6 +43,7 @@ struct _GstSoupHttpClientSink GMainContext *context; GMainLoop *loop; GThread *thread; + GSource *timer; SoupMessage *message; SoupSession *session; GList *queued_buffers; @@ -54,6 +55,7 @@ struct _GstSoupHttpClientSink guint64 offset; int timeout; + gint failures; /* properties */ SoupSession *prop_session; @@ -67,6 +69,8 @@ struct _GstSoupHttpClientSink gboolean automatic_redirect; gchar **cookies; SoupLoggerLogLevel log_level; + gint retry_delay; + gint retries; }; struct _GstSoupHttpClientSinkClass diff --git a/ext/soup/gstsouphttpsrc.c b/ext/soup/gstsouphttpsrc.c index d9ae2e781a01bc7447d7fd8080417f185ca274d8..9c652d865abd7074f8f849cef5a9ae22dc17ec35 100644 --- a/ext/soup/gstsouphttpsrc.c +++ b/ext/soup/gstsouphttpsrc.c @@ -124,7 +124,8 @@ enum PROP_SSL_USE_SYSTEM_CA_FILE, PROP_TLS_DATABASE, PROP_RETRIES, - PROP_METHOD + PROP_METHOD, + PROP_TLS_INTERACTION, }; #define DEFAULT_USER_AGENT "GStreamer souphttpsrc " @@ -136,6 +137,7 @@ enum #define DEFAULT_SSL_CA_FILE NULL #define DEFAULT_SSL_USE_SYSTEM_CA_FILE TRUE #define DEFAULT_TLS_DATABASE NULL +#define DEFAULT_TLS_INTERACTION NULL #define DEFAULT_TIMEOUT 15 #define DEFAULT_RETRIES 3 #define DEFAULT_SOUP_METHOD NULL @@ -380,6 +382,20 @@ gst_soup_http_src_class_init (GstSoupHTTPSrcClass * klass) "TLS database with anchor certificate authorities used to validate the server certificate", G_TYPE_TLS_DATABASE, G_PARAM_READWRITE | G_PARAM_STATIC_STRINGS)); + /** + * GstSoupHTTPSrc::tls-interaction: + * + * A #GTlsInteraction object to be used when the connection or certificate + * database need to interact with the user. This will be used to prompt the + * user for passwords or certificate where necessary. + * + * Since: 1.8 + */ + g_object_class_install_property (gobject_class, PROP_TLS_INTERACTION, + g_param_spec_object ("tls-interaction", "TLS interaction", + "A GTlsInteraction object to be used when the connection or certificate database need to interact with the user.", + G_TYPE_TLS_INTERACTION, G_PARAM_READWRITE | G_PARAM_STATIC_STRINGS)); + /** * GstSoupHTTPSrc::retries: * @@ -484,6 +500,7 @@ gst_soup_http_src_init (GstSoupHTTPSrc * src) src->ssl_strict = DEFAULT_SSL_STRICT; src->ssl_use_system_ca_file = DEFAULT_SSL_USE_SYSTEM_CA_FILE; src->tls_database = DEFAULT_TLS_DATABASE; + src->tls_interaction = DEFAULT_TLS_INTERACTION; src->max_retries = DEFAULT_RETRIES; src->method = DEFAULT_SOUP_METHOD; proxy = g_getenv ("http_proxy"); @@ -520,9 +537,7 @@ gst_soup_http_src_finalize (GObject * gobject) g_mutex_clear (&src->mutex); g_cond_clear (&src->request_finished_cond); g_free (src->location); - if (src->redirection_uri) { - g_free (src->redirection_uri); - } + g_free (src->redirection_uri); g_free (src->user_agent); if (src->proxy != NULL) { soup_uri_free (src->proxy); @@ -544,6 +559,9 @@ gst_soup_http_src_finalize (GObject * gobject) g_object_unref (src->tls_database); g_free (src->method); + if (src->tls_interaction) + g_object_unref (src->tls_interaction); + G_OBJECT_CLASS (parent_class)->finalize (gobject); } @@ -571,8 +589,7 @@ gst_soup_http_src_set_property (GObject * object, guint prop_id, break; } case PROP_USER_AGENT: - if (src->user_agent) - g_free (src->user_agent); + g_free (src->user_agent); src->user_agent = g_value_dup_string (value); break; case PROP_IRADIO_MODE: @@ -600,23 +617,19 @@ gst_soup_http_src_set_property (GObject * object, guint prop_id, gst_base_src_set_live (GST_BASE_SRC (src), g_value_get_boolean (value)); break; case PROP_USER_ID: - if (src->user_id) - g_free (src->user_id); + g_free (src->user_id); src->user_id = g_value_dup_string (value); break; case PROP_USER_PW: - if (src->user_pw) - g_free (src->user_pw); + g_free (src->user_pw); src->user_pw = g_value_dup_string (value); break; case PROP_PROXY_ID: - if (src->proxy_id) - g_free (src->proxy_id); + g_free (src->proxy_id); src->proxy_id = g_value_dup_string (value); break; case PROP_PROXY_PW: - if (src->proxy_pw) - g_free (src->proxy_pw); + g_free (src->proxy_pw); src->proxy_pw = g_value_dup_string (value); break; case PROP_TIMEOUT: @@ -644,8 +657,7 @@ gst_soup_http_src_set_property (GObject * object, guint prop_id, src->ssl_strict = g_value_get_boolean (value); break; case PROP_SSL_CA_FILE: - if (src->ssl_ca_file) - g_free (src->ssl_ca_file); + g_free (src->ssl_ca_file); src->ssl_ca_file = g_value_dup_string (value); break; case PROP_SSL_USE_SYSTEM_CA_FILE: @@ -655,6 +667,10 @@ gst_soup_http_src_set_property (GObject * object, guint prop_id, g_clear_object (&src->tls_database); src->tls_database = g_value_dup_object (value); break; + case PROP_TLS_INTERACTION: + g_clear_object (&src->tls_interaction); + src->tls_interaction = g_value_dup_object (value); + break; case PROP_RETRIES: src->max_retries = g_value_get_int (value); break; @@ -744,6 +760,9 @@ gst_soup_http_src_get_property (GObject * object, guint prop_id, case PROP_TLS_DATABASE: g_value_set_object (value, src->tls_database); break; + case PROP_TLS_INTERACTION: + g_value_set_object (value, src->tls_interaction); + break; case PROP_RETRIES: g_value_set_int (value, src->max_retries); break; @@ -791,14 +810,16 @@ gst_soup_http_src_add_range_header (GstSoupHTTPSrc * src, guint64 offset, guint64 stop_offset) { gchar buf[64]; - gint rc; soup_message_headers_remove (src->msg->request_headers, "Range"); if (offset || stop_offset != -1) { if (stop_offset != -1) { + g_assert (offset != stop_offset); + rc = g_snprintf (buf, sizeof (buf), "bytes=%" G_GUINT64_FORMAT "-%" - G_GUINT64_FORMAT, offset, stop_offset); + G_GUINT64_FORMAT, offset, (stop_offset > 0) ? stop_offset - 1 : + stop_offset); } else { rc = g_snprintf (buf, sizeof (buf), "bytes=%" G_GUINT64_FORMAT "-", offset); @@ -934,14 +955,15 @@ gst_soup_http_src_session_open (GstSoupHTTPSrc * src) SOUP_SESSION_TIMEOUT, src->timeout, SOUP_SESSION_SSL_STRICT, src->ssl_strict, SOUP_SESSION_ADD_FEATURE_BY_TYPE, SOUP_TYPE_PROXY_RESOLVER_DEFAULT, - NULL); + SOUP_SESSION_TLS_INTERACTION, src->tls_interaction, NULL); } else { src->session = soup_session_async_new_with_options (SOUP_SESSION_ASYNC_CONTEXT, src->context, SOUP_SESSION_PROXY_URI, src->proxy, SOUP_SESSION_TIMEOUT, src->timeout, SOUP_SESSION_SSL_STRICT, src->ssl_strict, - SOUP_SESSION_USER_AGENT, src->user_agent, NULL); + SOUP_SESSION_USER_AGENT, src->user_agent, + SOUP_SESSION_TLS_INTERACTION, src->tls_interaction, NULL); } if (!src->session) { @@ -1685,6 +1707,10 @@ gst_soup_http_src_do_request (GstSoupHTTPSrc * src, const gchar * method, GST_LOG_OBJECT (src, "Running request for method: %s", method); if (src->msg && (src->request_position != src->read_position)) { if (src->session_io_status == GST_SOUP_HTTP_SRC_SESSION_IO_STATUS_IDLE) { + /* EOS immediately if we have an empty segment */ + if (src->request_position == src->stop_position) + return GST_FLOW_EOS; + gst_soup_http_src_add_range_header (src, src->request_position, src->stop_position); } else { @@ -1694,10 +1720,14 @@ gst_soup_http_src_do_request (GstSoupHTTPSrc * src, const gchar * method, gst_soup_http_src_cancel_message (src); } } - if (!src->msg) - if (!gst_soup_http_src_build_message (src, method)) { + if (!src->msg) { + /* EOS immediately if we have an empty segment */ + if (src->request_position == src->stop_position) + return GST_FLOW_EOS; + + if (!gst_soup_http_src_build_message (src, method)) return GST_FLOW_ERROR; - } + } src->ret = GST_FLOW_CUSTOM_ERROR; src->outbuf = outbuf; @@ -1709,9 +1739,13 @@ gst_soup_http_src_do_request (GstSoupHTTPSrc * src, const gchar * method, } if (src->retry) { GST_INFO_OBJECT (src, "Reconnecting"); - if (!gst_soup_http_src_build_message (src, method)) { + + /* EOS immediately if we have an empty segment */ + if (src->request_position == src->stop_position) + return GST_FLOW_EOS; + + if (!gst_soup_http_src_build_message (src, method)) return GST_FLOW_ERROR; - } src->retry = FALSE; continue; } diff --git a/ext/soup/gstsouphttpsrc.h b/ext/soup/gstsouphttpsrc.h index ef9539cc7f5a2a1b7f16121ce7621a84cd64fc84..71725817e209646f30c162aa459e0697d66a9daa 100644 --- a/ext/soup/gstsouphttpsrc.h +++ b/ext/soup/gstsouphttpsrc.h @@ -92,6 +92,7 @@ struct _GstSoupHTTPSrc { gchar *ssl_ca_file; gboolean ssl_use_system_ca_file; GTlsDatabase *tls_database; + GTlsInteraction *tls_interaction; /* Shoutcast/icecast metadata extraction handling. */ gboolean iradio_mode; diff --git a/ext/speex/Makefile.in b/ext/speex/Makefile.in index 7c1df31aabbddc33b4f42f06d22625ced09a08e2..48db8d85d140bfc32d4e07866ce348d6b6f132e1 100644 --- a/ext/speex/Makefile.in +++ b/ext/speex/Makefile.in @@ -478,6 +478,8 @@ VALGRIND_PATH = @VALGRIND_PATH@ VERSION = @VERSION@ VPX_130_CFLAGS = @VPX_130_CFLAGS@ VPX_130_LIBS = @VPX_130_LIBS@ +VPX_140_CFLAGS = @VPX_140_CFLAGS@ +VPX_140_LIBS = @VPX_140_LIBS@ VPX_CFLAGS = @VPX_CFLAGS@ VPX_LIBS = @VPX_LIBS@ WARNING_CFLAGS = @WARNING_CFLAGS@ diff --git a/ext/taglib/Makefile.in b/ext/taglib/Makefile.in index a00ec3446d976a4e8e1dc47ae11804b9911d6137..210bfa62874f1bbc5f08ce2d4b046c4d6749c1f3 100644 --- a/ext/taglib/Makefile.in +++ b/ext/taglib/Makefile.in @@ -495,6 +495,8 @@ VALGRIND_PATH = @VALGRIND_PATH@ VERSION = @VERSION@ VPX_130_CFLAGS = @VPX_130_CFLAGS@ VPX_130_LIBS = @VPX_130_LIBS@ +VPX_140_CFLAGS = @VPX_140_CFLAGS@ +VPX_140_LIBS = @VPX_140_LIBS@ VPX_CFLAGS = @VPX_CFLAGS@ VPX_LIBS = @VPX_LIBS@ WARNING_CFLAGS = @WARNING_CFLAGS@ diff --git a/ext/vpx/Makefile.am b/ext/vpx/Makefile.am index 17636385c12c4b31ec31abfb516155d925cd92f7..4453fc0159548dab4f6763819adc137e0ccd7f07 100644 --- a/ext/vpx/Makefile.am +++ b/ext/vpx/Makefile.am @@ -2,6 +2,8 @@ plugin_LTLIBRARIES = \ libgstvpx.la libgstvpx_la_SOURCES = \ + gstvpxdec.c \ + gstvpxenc.c \ gstvp8dec.c \ gstvp8enc.c \ gstvp8utils.c \ @@ -22,6 +24,8 @@ libgstvpx_la_LDFLAGS = $(GST_PLUGIN_LDFLAGS) libgstvpx_la_LIBTOOLFLAGS = $(GST_PLUGIN_LIBTOOLFLAGS) noinst_HEADERS = \ + gstvpxdec.h \ + gstvpxenc.h \ gstvp8dec.h \ gstvp8enc.h \ gstvp9dec.h \ diff --git a/ext/vpx/Makefile.in b/ext/vpx/Makefile.in index 2ca86876af1121df7b77b600f2fa45ebda93fa74..b424d0bfdb1415066f6ed7b61a6b091f81739219 100644 --- a/ext/vpx/Makefile.in +++ b/ext/vpx/Makefile.in @@ -166,7 +166,8 @@ am__DEPENDENCIES_1 = libgstvpx_la_DEPENDENCIES = $(am__DEPENDENCIES_1) \ $(am__DEPENDENCIES_1) $(am__DEPENDENCIES_1) \ $(am__DEPENDENCIES_1) -am_libgstvpx_la_OBJECTS = libgstvpx_la-gstvp8dec.lo \ +am_libgstvpx_la_OBJECTS = libgstvpx_la-gstvpxdec.lo \ + libgstvpx_la-gstvpxenc.lo libgstvpx_la-gstvp8dec.lo \ libgstvpx_la-gstvp8enc.lo libgstvpx_la-gstvp8utils.lo \ libgstvpx_la-gstvp9dec.lo libgstvpx_la-gstvp9enc.lo \ libgstvpx_la-plugin.lo @@ -482,6 +483,8 @@ VALGRIND_PATH = @VALGRIND_PATH@ VERSION = @VERSION@ VPX_130_CFLAGS = @VPX_130_CFLAGS@ VPX_130_LIBS = @VPX_130_LIBS@ +VPX_140_CFLAGS = @VPX_140_CFLAGS@ +VPX_140_LIBS = @VPX_140_LIBS@ VPX_CFLAGS = @VPX_CFLAGS@ VPX_LIBS = @VPX_LIBS@ WARNING_CFLAGS = @WARNING_CFLAGS@ @@ -571,6 +574,8 @@ plugin_LTLIBRARIES = \ libgstvpx.la libgstvpx_la_SOURCES = \ + gstvpxdec.c \ + gstvpxenc.c \ gstvp8dec.c \ gstvp8enc.c \ gstvp8utils.c \ @@ -592,6 +597,8 @@ libgstvpx_la_LIBADD = \ libgstvpx_la_LDFLAGS = $(GST_PLUGIN_LDFLAGS) libgstvpx_la_LIBTOOLFLAGS = $(GST_PLUGIN_LIBTOOLFLAGS) noinst_HEADERS = \ + gstvpxdec.h \ + gstvpxenc.h \ gstvp8dec.h \ gstvp8enc.h \ gstvp9dec.h \ @@ -684,6 +691,8 @@ distclean-compile: @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libgstvpx_la-gstvp8utils.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libgstvpx_la-gstvp9dec.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libgstvpx_la-gstvp9enc.Plo@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libgstvpx_la-gstvpxdec.Plo@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libgstvpx_la-gstvpxenc.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libgstvpx_la-plugin.Plo@am__quote@ .c.o: @@ -710,6 +719,20 @@ distclean-compile: @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(LTCOMPILE) -c -o $@ $< +libgstvpx_la-gstvpxdec.lo: gstvpxdec.c +@am__fastdepCC_TRUE@ $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(libgstvpx_la_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libgstvpx_la_CFLAGS) $(CFLAGS) -MT libgstvpx_la-gstvpxdec.lo -MD -MP -MF $(DEPDIR)/libgstvpx_la-gstvpxdec.Tpo -c -o libgstvpx_la-gstvpxdec.lo `test -f 'gstvpxdec.c' || echo '$(srcdir)/'`gstvpxdec.c +@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/libgstvpx_la-gstvpxdec.Tpo $(DEPDIR)/libgstvpx_la-gstvpxdec.Plo +@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='gstvpxdec.c' object='libgstvpx_la-gstvpxdec.lo' libtool=yes @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CC $(libgstvpx_la_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libgstvpx_la_CFLAGS) $(CFLAGS) -c -o libgstvpx_la-gstvpxdec.lo `test -f 'gstvpxdec.c' || echo '$(srcdir)/'`gstvpxdec.c + +libgstvpx_la-gstvpxenc.lo: gstvpxenc.c +@am__fastdepCC_TRUE@ $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(libgstvpx_la_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libgstvpx_la_CFLAGS) $(CFLAGS) -MT libgstvpx_la-gstvpxenc.lo -MD -MP -MF $(DEPDIR)/libgstvpx_la-gstvpxenc.Tpo -c -o libgstvpx_la-gstvpxenc.lo `test -f 'gstvpxenc.c' || echo '$(srcdir)/'`gstvpxenc.c +@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/libgstvpx_la-gstvpxenc.Tpo $(DEPDIR)/libgstvpx_la-gstvpxenc.Plo +@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='gstvpxenc.c' object='libgstvpx_la-gstvpxenc.lo' libtool=yes @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CC $(libgstvpx_la_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libgstvpx_la_CFLAGS) $(CFLAGS) -c -o libgstvpx_la-gstvpxenc.lo `test -f 'gstvpxenc.c' || echo '$(srcdir)/'`gstvpxenc.c + libgstvpx_la-gstvp8dec.lo: gstvp8dec.c @am__fastdepCC_TRUE@ $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(libgstvpx_la_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libgstvpx_la_CFLAGS) $(CFLAGS) -MT libgstvpx_la-gstvp8dec.lo -MD -MP -MF $(DEPDIR)/libgstvpx_la-gstvp8dec.Tpo -c -o libgstvpx_la-gstvp8dec.lo `test -f 'gstvp8dec.c' || echo '$(srcdir)/'`gstvp8dec.c @am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/libgstvpx_la-gstvp8dec.Tpo $(DEPDIR)/libgstvpx_la-gstvp8dec.Plo diff --git a/ext/vpx/gstvp8dec.c b/ext/vpx/gstvp8dec.c index c86cc4c9d5881b4a8cb4c9eafd873f83762642dd..5b8eadeb6b2f0ef0859eddaacb91a49888e554e4 100644 --- a/ext/vpx/gstvp8dec.c +++ b/ext/vpx/gstvp8dec.c @@ -54,63 +54,12 @@ GST_DEBUG_CATEGORY_STATIC (gst_vp8dec_debug); #define GST_CAT_DEFAULT gst_vp8dec_debug -#define DEFAULT_POST_PROCESSING FALSE -#define DEFAULT_POST_PROCESSING_FLAGS (VP8_DEBLOCK | VP8_DEMACROBLOCK | VP8_MFQE) -#define DEFAULT_DEBLOCKING_LEVEL 4 -#define DEFAULT_NOISE_LEVEL 0 -#define DEFAULT_THREADS 1 +#define VP8_DECODER_VIDEO_TAG "VP8 video" -enum -{ - PROP_0, - PROP_POST_PROCESSING, - PROP_POST_PROCESSING_FLAGS, - PROP_DEBLOCKING_LEVEL, - PROP_NOISE_LEVEL, - PROP_THREADS -}; - -#define C_FLAGS(v) ((guint) v) -#define GST_VP8_DEC_TYPE_POST_PROCESSING_FLAGS (gst_vp8_dec_post_processing_flags_get_type()) -static GType -gst_vp8_dec_post_processing_flags_get_type (void) -{ - static const GFlagsValue values[] = { - {C_FLAGS (VP8_DEBLOCK), "Deblock", "deblock"}, - {C_FLAGS (VP8_DEMACROBLOCK), "Demacroblock", "demacroblock"}, - {C_FLAGS (VP8_ADDNOISE), "Add noise", "addnoise"}, - {C_FLAGS (VP8_MFQE), "Multi-frame quality enhancement", "mfqe"}, - {0, NULL, NULL} - }; - static volatile GType id = 0; - - if (g_once_init_enter ((gsize *) & id)) { - GType _id; - - _id = g_flags_register_static ("GstVP8DecPostProcessingFlags", values); - - g_once_init_leave ((gsize *) & id, _id); - } - - return id; -} - -#undef C_FLAGS - -static void gst_vp8_dec_set_property (GObject * object, guint prop_id, - const GValue * value, GParamSpec * pspec); -static void gst_vp8_dec_get_property (GObject * object, guint prop_id, - GValue * value, GParamSpec * pspec); - -static gboolean gst_vp8_dec_start (GstVideoDecoder * decoder); -static gboolean gst_vp8_dec_stop (GstVideoDecoder * decoder); -static gboolean gst_vp8_dec_set_format (GstVideoDecoder * decoder, - GstVideoCodecState * state); -static gboolean gst_vp8_dec_flush (GstVideoDecoder * decoder); -static GstFlowReturn gst_vp8_dec_handle_frame (GstVideoDecoder * decoder, - GstVideoCodecFrame * frame); -static gboolean gst_vp8_dec_decide_allocation (GstVideoDecoder * decoder, - GstQuery * query); +static void gst_vp8_dec_set_default_format (GstVPXDec * dec, GstVideoFormat fmt, + int width, int height); +static void gst_vp8_dec_handle_resolution_change (GstVPXDec * dec, + vpx_image_t * img, GstVideoFormat fmt); static GstStaticPadTemplate gst_vp8_dec_sink_template = GST_STATIC_PAD_TEMPLATE ("sink", @@ -127,54 +76,22 @@ GST_STATIC_PAD_TEMPLATE ("src", ); #define parent_class gst_vp8_dec_parent_class -G_DEFINE_TYPE (GstVP8Dec, gst_vp8_dec, GST_TYPE_VIDEO_DECODER); +G_DEFINE_TYPE (GstVP8Dec, gst_vp8_dec, GST_TYPE_VPX_DEC); static void gst_vp8_dec_class_init (GstVP8DecClass * klass) { - GObjectClass *gobject_class; GstElementClass *element_class; - GstVideoDecoderClass *base_video_decoder_class; + GstVPXDecClass *vpx_class; - gobject_class = G_OBJECT_CLASS (klass); element_class = GST_ELEMENT_CLASS (klass); - base_video_decoder_class = GST_VIDEO_DECODER_CLASS (klass); - - gobject_class->set_property = gst_vp8_dec_set_property; - gobject_class->get_property = gst_vp8_dec_get_property; - - g_object_class_install_property (gobject_class, PROP_POST_PROCESSING, - g_param_spec_boolean ("post-processing", "Post Processing", - "Enable post processing", DEFAULT_POST_PROCESSING, - G_PARAM_READWRITE | G_PARAM_STATIC_STRINGS)); + vpx_class = GST_VPX_DEC_CLASS (klass); - g_object_class_install_property (gobject_class, PROP_POST_PROCESSING_FLAGS, - g_param_spec_flags ("post-processing-flags", "Post Processing Flags", - "Flags to control post processing", - GST_VP8_DEC_TYPE_POST_PROCESSING_FLAGS, DEFAULT_POST_PROCESSING_FLAGS, - G_PARAM_READWRITE | G_PARAM_STATIC_STRINGS)); - - g_object_class_install_property (gobject_class, PROP_DEBLOCKING_LEVEL, - g_param_spec_uint ("deblocking-level", "Deblocking Level", - "Deblocking level", - 0, 16, DEFAULT_DEBLOCKING_LEVEL, - G_PARAM_READWRITE | G_PARAM_STATIC_STRINGS)); - - g_object_class_install_property (gobject_class, PROP_NOISE_LEVEL, - g_param_spec_uint ("noise-level", "Noise Level", - "Noise level", - 0, 16, DEFAULT_NOISE_LEVEL, - G_PARAM_READWRITE | G_PARAM_STATIC_STRINGS)); - - g_object_class_install_property (gobject_class, PROP_THREADS, - g_param_spec_uint ("threads", "Max Threads", - "Maximum number of decoding threads", - 1, 16, DEFAULT_THREADS, G_PARAM_READWRITE | G_PARAM_STATIC_STRINGS)); + gst_element_class_add_pad_template (element_class, + gst_static_pad_template_get (&gst_vp8_dec_sink_template)); gst_element_class_add_pad_template (element_class, gst_static_pad_template_get (&gst_vp8_dec_src_template)); - gst_element_class_add_pad_template (element_class, - gst_static_pad_template_get (&gst_vp8_dec_sink_template)); gst_element_class_set_static_metadata (element_class, "On2 VP8 Decoder", @@ -182,14 +99,12 @@ gst_vp8_dec_class_init (GstVP8DecClass * klass) "Decode VP8 video streams", "David Schleef <ds@entropywave.com>, " "Sebastian Dröge <sebastian.droege@collabora.co.uk>"); - base_video_decoder_class->start = GST_DEBUG_FUNCPTR (gst_vp8_dec_start); - base_video_decoder_class->stop = GST_DEBUG_FUNCPTR (gst_vp8_dec_stop); - base_video_decoder_class->flush = GST_DEBUG_FUNCPTR (gst_vp8_dec_flush); - base_video_decoder_class->set_format = - GST_DEBUG_FUNCPTR (gst_vp8_dec_set_format); - base_video_decoder_class->handle_frame = - GST_DEBUG_FUNCPTR (gst_vp8_dec_handle_frame); - base_video_decoder_class->decide_allocation = gst_vp8_dec_decide_allocation; + vpx_class->video_codec_tag = VP8_DECODER_VIDEO_TAG; + vpx_class->codec_algo = &vpx_codec_vp8_dx_algo; + vpx_class->set_default_format = + GST_DEBUG_FUNCPTR (gst_vp8_dec_set_default_format); + vpx_class->handle_resolution_change = + GST_DEBUG_FUNCPTR (gst_vp8_dec_handle_resolution_change); GST_DEBUG_CATEGORY_INIT (gst_vp8dec_debug, "vp8dec", 0, "VP8 Decoder"); } @@ -197,437 +112,47 @@ gst_vp8_dec_class_init (GstVP8DecClass * klass) static void gst_vp8_dec_init (GstVP8Dec * gst_vp8_dec) { - GstVideoDecoder *decoder = (GstVideoDecoder *) gst_vp8_dec; - GST_DEBUG_OBJECT (gst_vp8_dec, "gst_vp8_dec_init"); - gst_video_decoder_set_packetized (decoder, TRUE); - gst_vp8_dec->post_processing = DEFAULT_POST_PROCESSING; - gst_vp8_dec->post_processing_flags = DEFAULT_POST_PROCESSING_FLAGS; - gst_vp8_dec->deblocking_level = DEFAULT_DEBLOCKING_LEVEL; - gst_vp8_dec->noise_level = DEFAULT_NOISE_LEVEL; - - gst_video_decoder_set_needs_format (decoder, TRUE); - gst_video_decoder_set_use_default_pad_acceptcaps (decoder, TRUE); - GST_PAD_SET_ACCEPT_TEMPLATE (GST_VIDEO_DECODER_SINK_PAD (decoder)); -} - -static void -gst_vp8_dec_set_property (GObject * object, guint prop_id, - const GValue * value, GParamSpec * pspec) -{ - GstVP8Dec *dec; - - g_return_if_fail (GST_IS_VP8_DEC (object)); - dec = GST_VP8_DEC (object); - - GST_DEBUG_OBJECT (object, "gst_vp8_dec_set_property"); - switch (prop_id) { - case PROP_POST_PROCESSING: - dec->post_processing = g_value_get_boolean (value); - break; - case PROP_POST_PROCESSING_FLAGS: - dec->post_processing_flags = g_value_get_flags (value); - break; - case PROP_DEBLOCKING_LEVEL: - dec->deblocking_level = g_value_get_uint (value); - break; - case PROP_NOISE_LEVEL: - dec->noise_level = g_value_get_uint (value); - break; - case PROP_THREADS: - dec->threads = g_value_get_uint (value); - break; - default: - G_OBJECT_WARN_INVALID_PROPERTY_ID (object, prop_id, pspec); - break; - } } static void -gst_vp8_dec_get_property (GObject * object, guint prop_id, GValue * value, - GParamSpec * pspec) -{ - GstVP8Dec *dec; - - g_return_if_fail (GST_IS_VP8_DEC (object)); - dec = GST_VP8_DEC (object); - - switch (prop_id) { - case PROP_POST_PROCESSING: - g_value_set_boolean (value, dec->post_processing); - break; - case PROP_POST_PROCESSING_FLAGS: - g_value_set_flags (value, dec->post_processing_flags); - break; - case PROP_DEBLOCKING_LEVEL: - g_value_set_uint (value, dec->deblocking_level); - break; - case PROP_NOISE_LEVEL: - g_value_set_uint (value, dec->noise_level); - break; - case PROP_THREADS: - g_value_set_uint (value, dec->threads); - break; - default: - G_OBJECT_WARN_INVALID_PROPERTY_ID (object, prop_id, pspec); - break; - } -} - -static gboolean -gst_vp8_dec_start (GstVideoDecoder * decoder) +gst_vp8_dec_set_default_format (GstVPXDec * dec, GstVideoFormat fmt, int width, + int height) { - GstVP8Dec *gst_vp8_dec = GST_VP8_DEC (decoder); - - GST_DEBUG_OBJECT (gst_vp8_dec, "start"); - gst_vp8_dec->decoder_inited = FALSE; - - return TRUE; -} - -static gboolean -gst_vp8_dec_stop (GstVideoDecoder * base_video_decoder) -{ - GstVP8Dec *gst_vp8_dec = GST_VP8_DEC (base_video_decoder); - - GST_DEBUG_OBJECT (gst_vp8_dec, "stop"); - - if (gst_vp8_dec->output_state) { - gst_video_codec_state_unref (gst_vp8_dec->output_state); - gst_vp8_dec->output_state = NULL; - } - - if (gst_vp8_dec->input_state) { - gst_video_codec_state_unref (gst_vp8_dec->input_state); - gst_vp8_dec->input_state = NULL; - } - - if (gst_vp8_dec->decoder_inited) - vpx_codec_destroy (&gst_vp8_dec->decoder); - gst_vp8_dec->decoder_inited = FALSE; - - return TRUE; -} - -static gboolean -gst_vp8_dec_set_format (GstVideoDecoder * decoder, GstVideoCodecState * state) -{ - GstVP8Dec *gst_vp8_dec = GST_VP8_DEC (decoder); - - GST_DEBUG_OBJECT (gst_vp8_dec, "set_format"); - - if (gst_vp8_dec->decoder_inited) - vpx_codec_destroy (&gst_vp8_dec->decoder); - gst_vp8_dec->decoder_inited = FALSE; - - if (gst_vp8_dec->output_state) { - gst_video_codec_state_unref (gst_vp8_dec->output_state); - gst_vp8_dec->output_state = NULL; - } - - if (gst_vp8_dec->input_state) { - gst_video_codec_state_unref (gst_vp8_dec->input_state); - gst_vp8_dec->input_state = NULL; - } - - gst_vp8_dec->input_state = gst_video_codec_state_ref (state); - - return TRUE; -} - -static gboolean -gst_vp8_dec_flush (GstVideoDecoder * base_video_decoder) -{ - GstVP8Dec *decoder; - - GST_DEBUG_OBJECT (base_video_decoder, "flush"); - - decoder = GST_VP8_DEC (base_video_decoder); - - if (decoder->output_state) { - gst_video_codec_state_unref (decoder->output_state); - decoder->output_state = NULL; - } - - if (decoder->decoder_inited) - vpx_codec_destroy (&decoder->decoder); - decoder->decoder_inited = FALSE; - - return TRUE; -} - -static void -gst_vp8_dec_send_tags (GstVP8Dec * dec) -{ - GstTagList *list; - - list = gst_tag_list_new_empty (); - gst_tag_list_add (list, GST_TAG_MERGE_REPLACE, - GST_TAG_VIDEO_CODEC, "VP8 video", NULL); - - gst_pad_push_event (GST_VIDEO_DECODER_SRC_PAD (dec), - gst_event_new_tag (list)); -} - -static void -gst_vp8_dec_image_to_buffer (GstVP8Dec * dec, const vpx_image_t * img, - GstBuffer * buffer) -{ - int deststride, srcstride, height, width, line, comp; - guint8 *dest, *src; - GstVideoFrame frame; - GstVideoInfo *info = &dec->output_state->info; - - if (!gst_video_frame_map (&frame, info, buffer, GST_MAP_WRITE)) { - GST_ERROR_OBJECT (dec, "Could not map video buffer"); - return; - } - - for (comp = 0; comp < 3; comp++) { - dest = GST_VIDEO_FRAME_COMP_DATA (&frame, comp); - src = img->planes[comp]; - width = GST_VIDEO_FRAME_COMP_WIDTH (&frame, comp) - * GST_VIDEO_FRAME_COMP_PSTRIDE (&frame, comp); - height = GST_VIDEO_FRAME_COMP_HEIGHT (&frame, comp); - deststride = GST_VIDEO_FRAME_COMP_STRIDE (&frame, comp); - srcstride = img->stride[comp]; - - if (srcstride == deststride) { - GST_TRACE_OBJECT (dec, "Stride matches. Comp %d: %d, copying full plane", - comp, srcstride); - memcpy (dest, src, srcstride * height); - } else { - GST_TRACE_OBJECT (dec, "Stride mismatch. Comp %d: %d != %d, copying " - "line by line.", comp, srcstride, deststride); - for (line = 0; line < height; line++) { - memcpy (dest, src, width); - dest += deststride; - src += srcstride; - } - } - } - - gst_video_frame_unmap (&frame); -} - -static GstFlowReturn -open_codec (GstVP8Dec * dec, GstVideoCodecFrame * frame) -{ - int flags = 0; - vpx_codec_stream_info_t stream_info; - vpx_codec_caps_t caps; - vpx_codec_dec_cfg_t cfg; - GstVideoCodecState *state = dec->input_state; - vpx_codec_err_t status; - GstMapInfo minfo; - - memset (&stream_info, 0, sizeof (stream_info)); - memset (&cfg, 0, sizeof (cfg)); - stream_info.sz = sizeof (stream_info); - - if (!gst_buffer_map (frame->input_buffer, &minfo, GST_MAP_READ)) { - GST_ERROR_OBJECT (dec, "Failed to map input buffer"); - return GST_FLOW_ERROR; - } - - status = vpx_codec_peek_stream_info (&vpx_codec_vp8_dx_algo, - minfo.data, minfo.size, &stream_info); - - gst_buffer_unmap (frame->input_buffer, &minfo); - - if (status != VPX_CODEC_OK) { - GST_WARNING_OBJECT (dec, "VPX preprocessing error: %s", - gst_vpx_error_name (status)); - gst_video_decoder_drop_frame (GST_VIDEO_DECODER (dec), frame); - return GST_FLOW_CUSTOM_SUCCESS_1; - } - if (!stream_info.is_kf) { - GST_WARNING_OBJECT (dec, "No keyframe, skipping"); - gst_video_decoder_drop_frame (GST_VIDEO_DECODER (dec), frame); - return GST_FLOW_CUSTOM_SUCCESS_1; - } - + GstVPXDecClass *vpxclass = GST_VPX_DEC_GET_CLASS (dec); g_assert (dec->output_state == NULL); dec->output_state = gst_video_decoder_set_output_state (GST_VIDEO_DECODER (dec), - GST_VIDEO_FORMAT_I420, stream_info.w, stream_info.h, state); + GST_VIDEO_FORMAT_I420, width, height, dec->input_state); gst_video_decoder_negotiate (GST_VIDEO_DECODER (dec)); - gst_vp8_dec_send_tags (dec); - - cfg.w = stream_info.w; - cfg.h = stream_info.h; - cfg.threads = dec->threads; - - caps = vpx_codec_get_caps (&vpx_codec_vp8_dx_algo); - - if (dec->post_processing) { - if (!(caps & VPX_CODEC_CAP_POSTPROC)) { - GST_WARNING_OBJECT (dec, "Decoder does not support post processing"); - } else { - flags |= VPX_CODEC_USE_POSTPROC; - } - } - - status = - vpx_codec_dec_init (&dec->decoder, &vpx_codec_vp8_dx_algo, &cfg, flags); - if (status != VPX_CODEC_OK) { - GST_ELEMENT_ERROR (dec, LIBRARY, INIT, - ("Failed to initialize VP8 decoder"), ("%s", - gst_vpx_error_name (status))); - return GST_FLOW_ERROR; - } - - if ((caps & VPX_CODEC_CAP_POSTPROC) && dec->post_processing) { - vp8_postproc_cfg_t pp_cfg = { 0, }; - - pp_cfg.post_proc_flag = dec->post_processing_flags; - pp_cfg.deblocking_level = dec->deblocking_level; - pp_cfg.noise_level = dec->noise_level; - - status = vpx_codec_control (&dec->decoder, VP8_SET_POSTPROC, &pp_cfg); - if (status != VPX_CODEC_OK) { - GST_WARNING_OBJECT (dec, "Couldn't set postprocessing settings: %s", - gst_vpx_error_name (status)); - } - } - - dec->decoder_inited = TRUE; - - return GST_FLOW_OK; + vpxclass->send_tags (dec); } -static GstFlowReturn -gst_vp8_dec_handle_frame (GstVideoDecoder * decoder, GstVideoCodecFrame * frame) +static void +gst_vp8_dec_handle_resolution_change (GstVPXDec * dec, vpx_image_t * img, + GstVideoFormat fmt) { - GstVP8Dec *dec; - GstFlowReturn ret = GST_FLOW_OK; - vpx_codec_err_t status; - vpx_codec_iter_t iter = NULL; - vpx_image_t *img; - long decoder_deadline = 0; - GstClockTimeDiff deadline; - GstMapInfo minfo; GstVideoInfo *info; GstVideoCodecState *new_output_state; - GST_LOG_OBJECT (decoder, "handle_frame"); - - dec = GST_VP8_DEC (decoder); - - if (!dec->decoder_inited) { - ret = open_codec (dec, frame); - if (ret == GST_FLOW_CUSTOM_SUCCESS_1) - return GST_FLOW_OK; - else if (ret != GST_FLOW_OK) - return ret; - } - - deadline = gst_video_decoder_get_max_decode_time (decoder, frame); - if (deadline < 0) { - decoder_deadline = 1; - } else if (deadline == G_MAXINT64) { - decoder_deadline = 0; - } else { - decoder_deadline = MAX (1, deadline / GST_MSECOND); - } - - if (!gst_buffer_map (frame->input_buffer, &minfo, GST_MAP_READ)) { - GST_ERROR_OBJECT (dec, "Failed to map input buffer"); - return GST_FLOW_ERROR; - } - - status = vpx_codec_decode (&dec->decoder, - minfo.data, minfo.size, NULL, decoder_deadline); - - gst_buffer_unmap (frame->input_buffer, &minfo); - - if (status) { - GST_VIDEO_DECODER_ERROR (decoder, 1, LIBRARY, ENCODE, - ("Failed to decode frame"), ("%s", gst_vpx_error_name (status)), ret); - return ret; - } - - img = vpx_codec_get_frame (&dec->decoder, &iter); - if (img) { - if (img->fmt != VPX_IMG_FMT_I420) { - vpx_img_free (img); - GST_ELEMENT_ERROR (decoder, LIBRARY, ENCODE, - ("Failed to decode frame"), ("Unsupported color format %d", - img->fmt)); - return GST_FLOW_ERROR; + info = &dec->output_state->info; + if (GST_VIDEO_INFO_WIDTH (info) != img->d_w + || GST_VIDEO_INFO_HEIGHT (info) != img->d_h) { + GST_DEBUG_OBJECT (dec, + "Changed output resolution was %d x %d now is got %u x %u (display %u x %u)", + GST_VIDEO_INFO_WIDTH (info), GST_VIDEO_INFO_HEIGHT (info), img->w, + img->h, img->d_w, img->d_h); + + new_output_state = + gst_video_decoder_set_output_state (GST_VIDEO_DECODER (dec), + GST_VIDEO_FORMAT_I420, img->d_w, img->d_h, dec->output_state); + if (dec->output_state) { + gst_video_codec_state_unref (dec->output_state); } - - if (deadline < 0) { - GST_LOG_OBJECT (dec, "Skipping late frame (%f s past deadline)", - (double) -deadline / GST_SECOND); - gst_video_decoder_drop_frame (decoder, frame); - } else { - info = &dec->output_state->info; - if (GST_VIDEO_INFO_WIDTH (info) != img->d_w - || GST_VIDEO_INFO_HEIGHT (info) != img->d_h) { - GST_DEBUG_OBJECT (dec, - "Changed output resolution was %d x %d now is got %u x %u (display %u x %u)", - GST_VIDEO_INFO_WIDTH (info), GST_VIDEO_INFO_HEIGHT (info), img->w, - img->h, img->d_w, img->d_h); - - new_output_state = - gst_video_decoder_set_output_state (GST_VIDEO_DECODER (dec), - GST_VIDEO_FORMAT_I420, img->d_w, img->d_h, dec->output_state); - if (dec->output_state) { - gst_video_codec_state_unref (dec->output_state); - } - dec->output_state = new_output_state; - /* No need to call negotiate() here, it will be automatically called - * by allocate_output_frame() below */ - } - - ret = gst_video_decoder_allocate_output_frame (decoder, frame); - - if (ret == GST_FLOW_OK) { - gst_vp8_dec_image_to_buffer (dec, img, frame->output_buffer); - ret = gst_video_decoder_finish_frame (decoder, frame); - } else { - gst_video_decoder_drop_frame (decoder, frame); - } - } - - vpx_img_free (img); - - while ((img = vpx_codec_get_frame (&dec->decoder, &iter))) { - GST_WARNING_OBJECT (decoder, "Multiple decoded frames... dropping"); - vpx_img_free (img); - } - } else { - /* Invisible frame */ - GST_VIDEO_CODEC_FRAME_SET_DECODE_ONLY (frame); - gst_video_decoder_finish_frame (decoder, frame); + dec->output_state = new_output_state; + /* No need to call negotiate() here, it will be automatically called + * by allocate_output_frame()*/ } - - return ret; -} - -static gboolean -gst_vp8_dec_decide_allocation (GstVideoDecoder * bdec, GstQuery * query) -{ - GstBufferPool *pool; - GstStructure *config; - - if (!GST_VIDEO_DECODER_CLASS (parent_class)->decide_allocation (bdec, query)) - return FALSE; - - g_assert (gst_query_get_n_allocation_pools (query) > 0); - gst_query_parse_nth_allocation_pool (query, 0, &pool, NULL, NULL, NULL); - g_assert (pool != NULL); - - config = gst_buffer_pool_get_config (pool); - if (gst_query_find_allocation_meta (query, GST_VIDEO_META_API_TYPE, NULL)) { - gst_buffer_pool_config_add_option (config, - GST_BUFFER_POOL_OPTION_VIDEO_META); - } - gst_buffer_pool_set_config (pool, config); - gst_object_unref (pool); - - return TRUE; } #endif /* HAVE_VP8_DECODER */ diff --git a/ext/vpx/gstvp8dec.h b/ext/vpx/gstvp8dec.h index 8692f01310f64f3d055144008ba48447edf6c891..fc3b16135cbafbd7efffca2c5db68e3117a0c5bf 100644 --- a/ext/vpx/gstvp8dec.h +++ b/ext/vpx/gstvp8dec.h @@ -31,6 +31,7 @@ #include <gst/gst.h> #include <gst/video/gstvideodecoder.h> +#include <gstvpxdec.h> /* FIXME: Undef HAVE_CONFIG_H because vpx_codec.h uses it, * which causes compilation failures */ @@ -59,28 +60,12 @@ typedef struct _GstVP8DecClass GstVP8DecClass; struct _GstVP8Dec { - GstVideoDecoder base_video_decoder; - - /* < private > */ - vpx_codec_ctx_t decoder; - - /* state */ - gboolean decoder_inited; - - /* properties */ - gboolean post_processing; - enum vp8_postproc_level post_processing_flags; - gint deblocking_level; - gint noise_level; - gint threads; - - GstVideoCodecState *input_state; - GstVideoCodecState *output_state; + GstVPXDec base_vpx_decoder; }; struct _GstVP8DecClass { - GstVideoDecoderClass base_video_decoder_class; + GstVPXDecClass base_vpx_class; }; GType gst_vp8_dec_get_type (void); diff --git a/ext/vpx/gstvp8enc.c b/ext/vpx/gstvp8enc.c index a53819266a46ef70560c51c041eb05e18e3e4192..c7bca12ef769ab8ac41299c76e2f96976997bb3b 100644 --- a/ext/vpx/gstvp8enc.c +++ b/ext/vpx/gstvp8enc.c @@ -93,293 +93,21 @@ gst_vp8_enc_user_data_free (GstVP8EncUserData * user_data) g_slice_free (GstVP8EncUserData, user_data); } -/* From vp8/vp8_cx_iface.c */ -#define DEFAULT_PROFILE 0 - -#define DEFAULT_RC_END_USAGE VPX_VBR -#define DEFAULT_RC_TARGET_BITRATE 256000 -#define DEFAULT_RC_MIN_QUANTIZER 4 -#define DEFAULT_RC_MAX_QUANTIZER 63 - -#define DEFAULT_RC_DROPFRAME_THRESH 0 -#define DEFAULT_RC_RESIZE_ALLOWED 0 -#define DEFAULT_RC_RESIZE_UP_THRESH 30 -#define DEFAULT_RC_RESIZE_DOWN_THRESH 60 -#define DEFAULT_RC_UNDERSHOOT_PCT 100 -#define DEFAULT_RC_OVERSHOOT_PCT 100 -#define DEFAULT_RC_BUF_SZ 6000 -#define DEFAULT_RC_BUF_INITIAL_SZ 4000 -#define DEFAULT_RC_BUF_OPTIMAL_SZ 5000 -#define DEFAULT_RC_2PASS_VBR_BIAS_PCT 50 -#define DEFAULT_RC_2PASS_VBR_MINSECTION_PCT 0 -#define DEFAULT_RC_2PASS_VBR_MAXSECTION_PCT 400 - -#define DEFAULT_KF_MODE VPX_KF_AUTO -#define DEFAULT_KF_MAX_DIST 128 - -#define DEFAULT_MULTIPASS_MODE VPX_RC_ONE_PASS -#define DEFAULT_MULTIPASS_CACHE_FILE "multipass.cache" - -#define DEFAULT_TS_NUMBER_LAYERS 1 -#define DEFAULT_TS_TARGET_BITRATE NULL -#define DEFAULT_TS_RATE_DECIMATOR NULL -#define DEFAULT_TS_PERIODICITY 0 -#define DEFAULT_TS_LAYER_ID NULL - -#define DEFAULT_ERROR_RESILIENT 0 -#define DEFAULT_LAG_IN_FRAMES 0 - -#define DEFAULT_THREADS 0 - -#define DEFAULT_H_SCALING_MODE VP8E_NORMAL -#define DEFAULT_V_SCALING_MODE VP8E_NORMAL -#define DEFAULT_CPU_USED 0 -#define DEFAULT_ENABLE_AUTO_ALT_REF FALSE -#define DEFAULT_DEADLINE VPX_DL_BEST_QUALITY -#define DEFAULT_NOISE_SENSITIVITY 0 -#define DEFAULT_SHARPNESS 0 -#define DEFAULT_STATIC_THRESHOLD 0 -#define DEFAULT_TOKEN_PARTITIONS 0 -#define DEFAULT_ARNR_MAXFRAMES 0 -#define DEFAULT_ARNR_STRENGTH 3 -#define DEFAULT_ARNR_TYPE 3 -#define DEFAULT_TUNING VP8_TUNE_PSNR -#define DEFAULT_CQ_LEVEL 10 -#define DEFAULT_MAX_INTRA_BITRATE_PCT 0 -#define DEFAULT_TIMEBASE_N 0 -#define DEFAULT_TIMEBASE_D 1 - -enum -{ - PROP_0, - PROP_RC_END_USAGE, - PROP_RC_TARGET_BITRATE, - PROP_RC_MIN_QUANTIZER, - PROP_RC_MAX_QUANTIZER, - PROP_RC_DROPFRAME_THRESH, - PROP_RC_RESIZE_ALLOWED, - PROP_RC_RESIZE_UP_THRESH, - PROP_RC_RESIZE_DOWN_THRESH, - PROP_RC_UNDERSHOOT_PCT, - PROP_RC_OVERSHOOT_PCT, - PROP_RC_BUF_SZ, - PROP_RC_BUF_INITIAL_SZ, - PROP_RC_BUF_OPTIMAL_SZ, - PROP_RC_2PASS_VBR_BIAS_PCT, - PROP_RC_2PASS_VBR_MINSECTION_PCT, - PROP_RC_2PASS_VBR_MAXSECTION_PCT, - PROP_KF_MODE, - PROP_KF_MAX_DIST, - PROP_TS_NUMBER_LAYERS, - PROP_TS_TARGET_BITRATE, - PROP_TS_RATE_DECIMATOR, - PROP_TS_PERIODICITY, - PROP_TS_LAYER_ID, - PROP_MULTIPASS_MODE, - PROP_MULTIPASS_CACHE_FILE, - PROP_ERROR_RESILIENT, - PROP_LAG_IN_FRAMES, - PROP_THREADS, - PROP_DEADLINE, - PROP_H_SCALING_MODE, - PROP_V_SCALING_MODE, - PROP_CPU_USED, - PROP_ENABLE_AUTO_ALT_REF, - PROP_NOISE_SENSITIVITY, - PROP_SHARPNESS, - PROP_STATIC_THRESHOLD, - PROP_TOKEN_PARTITIONS, - PROP_ARNR_MAXFRAMES, - PROP_ARNR_STRENGTH, - PROP_ARNR_TYPE, - PROP_TUNING, - PROP_CQ_LEVEL, - PROP_MAX_INTRA_BITRATE_PCT, - PROP_TIMEBASE -}; - -#define GST_VP8_ENC_END_USAGE_TYPE (gst_vp8_enc_end_usage_get_type()) -static GType -gst_vp8_enc_end_usage_get_type (void) -{ - static const GEnumValue values[] = { - {VPX_VBR, "Variable Bit Rate (VBR) mode", "vbr"}, - {VPX_CBR, "Constant Bit Rate (CBR) mode", "cbr"}, - {VPX_CQ, "Constant Quality Mode (CQ) mode", "cq"}, - {0, NULL, NULL} - }; - static volatile GType id = 0; - - if (g_once_init_enter ((gsize *) & id)) { - GType _id; - - _id = g_enum_register_static ("GstVP8EncEndUsage", values); - - g_once_init_leave ((gsize *) & id, _id); - } - - return id; -} - -#define GST_VP8_ENC_MULTIPASS_MODE_TYPE (gst_vp8_enc_multipass_mode_get_type()) -static GType -gst_vp8_enc_multipass_mode_get_type (void) -{ - static const GEnumValue values[] = { - {VPX_RC_ONE_PASS, "One pass encoding (default)", "one-pass"}, - {VPX_RC_FIRST_PASS, "First pass of multipass encoding", "first-pass"}, - {VPX_RC_LAST_PASS, "Last pass of multipass encoding", "last-pass"}, - {0, NULL, NULL} - }; - static volatile GType id = 0; - - if (g_once_init_enter ((gsize *) & id)) { - GType _id; - - _id = g_enum_register_static ("GstVP8EncMultipassMode", values); - - g_once_init_leave ((gsize *) & id, _id); - } - - return id; -} - -#define GST_VP8_ENC_KF_MODE_TYPE (gst_vp8_enc_kf_mode_get_type()) -static GType -gst_vp8_enc_kf_mode_get_type (void) -{ - static const GEnumValue values[] = { - {VPX_KF_AUTO, "Determine optimal placement automatically", "auto"}, - {VPX_KF_DISABLED, "Don't automatically place keyframes", "disabled"}, - {0, NULL, NULL} - }; - static volatile GType id = 0; - - if (g_once_init_enter ((gsize *) & id)) { - GType _id; - - _id = g_enum_register_static ("GstVP8EncKfMode", values); - - g_once_init_leave ((gsize *) & id, _id); - } - - return id; -} - -#define GST_VP8_ENC_TUNING_TYPE (gst_vp8_enc_tuning_get_type()) -static GType -gst_vp8_enc_tuning_get_type (void) -{ - static const GEnumValue values[] = { - {VP8_TUNE_PSNR, "Tune for PSNR", "psnr"}, - {VP8_TUNE_SSIM, "Tune for SSIM", "ssim"}, - {0, NULL, NULL} - }; - static volatile GType id = 0; - - if (g_once_init_enter ((gsize *) & id)) { - GType _id; - - _id = g_enum_register_static ("GstVP8EncTuning", values); - - g_once_init_leave ((gsize *) & id, _id); - } - - return id; -} - -#define GST_VP8_ENC_SCALING_MODE_TYPE (gst_vp8_enc_scaling_mode_get_type()) -static GType -gst_vp8_enc_scaling_mode_get_type (void) -{ - static const GEnumValue values[] = { - {VP8E_NORMAL, "Normal", "normal"}, - {VP8E_FOURFIVE, "4:5", "4:5"}, - {VP8E_THREEFIVE, "3:5", "3:5"}, - {VP8E_ONETWO, "1:2", "1:2"}, - {0, NULL, NULL} - }; - static volatile GType id = 0; - - if (g_once_init_enter ((gsize *) & id)) { - GType _id; - - _id = g_enum_register_static ("GstVP8EncScalingMode", values); - - g_once_init_leave ((gsize *) & id, _id); - } - - return id; -} - -#define GST_VP8_ENC_TOKEN_PARTITIONS_TYPE (gst_vp8_enc_token_partitions_get_type()) -static GType -gst_vp8_enc_token_partitions_get_type (void) -{ - static const GEnumValue values[] = { - {VP8_ONE_TOKENPARTITION, "One token partition", "1"}, - {VP8_TWO_TOKENPARTITION, "Two token partitions", "2"}, - {VP8_FOUR_TOKENPARTITION, "Four token partitions", "4"}, - {VP8_EIGHT_TOKENPARTITION, "Eight token partitions", "8"}, - {0, NULL, NULL} - }; - static volatile GType id = 0; - - if (g_once_init_enter ((gsize *) & id)) { - GType _id; - - _id = g_enum_register_static ("GstVP8EncTokenPartitions", values); - - g_once_init_leave ((gsize *) & id, _id); - } - - return id; -} - -#define GST_VP8_ENC_ER_FLAGS_TYPE (gst_vp8_enc_er_flags_get_type()) -static GType -gst_vp8_enc_er_flags_get_type (void) -{ - static const GFlagsValue values[] = { - {VPX_ERROR_RESILIENT_DEFAULT, "Default error resilience", "default"}, - {VPX_ERROR_RESILIENT_PARTITIONS, - "Allow partitions to be decoded independently", "partitions"}, - {0, NULL, NULL} - }; - static volatile GType id = 0; - - if (g_once_init_enter ((gsize *) & id)) { - GType _id; - - _id = g_flags_register_static ("GstVP8EncErFlags", values); - - g_once_init_leave ((gsize *) & id, _id); - } - - return id; -} - -static void gst_vp8_enc_finalize (GObject * object); -static void gst_vp8_enc_set_property (GObject * object, guint prop_id, - const GValue * value, GParamSpec * pspec); -static void gst_vp8_enc_get_property (GObject * object, guint prop_id, - GValue * value, GParamSpec * pspec); +static vpx_codec_iface_t *gst_vp8_enc_get_algo (GstVPXEnc * enc); +static gboolean gst_vp8_enc_enable_scaling (GstVPXEnc * enc); +static void gst_vp8_enc_set_image_format (GstVPXEnc * enc, vpx_image_t * image); +static GstCaps *gst_vp8_enc_get_new_simple_caps (GstVPXEnc * enc); +static void gst_vp8_enc_set_stream_info (GstVPXEnc * enc, GstCaps * caps, + GstVideoInfo * info); +static void *gst_vp8_enc_process_frame_user_data (GstVPXEnc * enc, + GstVideoCodecFrame * frame); +static GstFlowReturn gst_vp8_enc_handle_invisible_frame_buffer (GstVPXEnc * enc, + void *user_data, GstBuffer * buffer); +static void gst_vp8_enc_set_frame_user_data (GstVPXEnc * enc, + GstVideoCodecFrame * frame, vpx_image_t * image); -static gboolean gst_vp8_enc_start (GstVideoEncoder * encoder); -static gboolean gst_vp8_enc_stop (GstVideoEncoder * encoder); -static gboolean gst_vp8_enc_set_format (GstVideoEncoder * - video_encoder, GstVideoCodecState * state); -static GstFlowReturn gst_vp8_enc_finish (GstVideoEncoder * video_encoder); -static gboolean gst_vp8_enc_flush (GstVideoEncoder * video_encoder); -static GstFlowReturn gst_vp8_enc_drain (GstVideoEncoder * video_encoder); -static GstFlowReturn gst_vp8_enc_handle_frame (GstVideoEncoder * - video_encoder, GstVideoCodecFrame * frame); static GstFlowReturn gst_vp8_enc_pre_push (GstVideoEncoder * encoder, GstVideoCodecFrame * frame); -static gboolean gst_vp8_enc_sink_event (GstVideoEncoder * - video_encoder, GstEvent * event); -static gboolean gst_vp8_enc_propose_allocation (GstVideoEncoder * encoder, - GstQuery * query); static GstStaticPadTemplate gst_vp8_enc_sink_template = GST_STATIC_PAD_TEMPLATE ("sink", @@ -399,24 +127,19 @@ GST_STATIC_PAD_TEMPLATE ("src", ); #define parent_class gst_vp8_enc_parent_class -G_DEFINE_TYPE_WITH_CODE (GstVP8Enc, gst_vp8_enc, GST_TYPE_VIDEO_ENCODER, - G_IMPLEMENT_INTERFACE (GST_TYPE_TAG_SETTER, NULL); - G_IMPLEMENT_INTERFACE (GST_TYPE_PRESET, NULL);); +G_DEFINE_TYPE (GstVP8Enc, gst_vp8_enc, GST_TYPE_VPX_ENC); static void gst_vp8_enc_class_init (GstVP8EncClass * klass) { - GObjectClass *gobject_class; GstElementClass *element_class; GstVideoEncoderClass *video_encoder_class; + GstVPXEncClass *vpx_encoder_class; - gobject_class = G_OBJECT_CLASS (klass); element_class = GST_ELEMENT_CLASS (klass); video_encoder_class = GST_VIDEO_ENCODER_CLASS (klass); + vpx_encoder_class = GST_VPX_ENC_CLASS (klass); - gobject_class->set_property = gst_vp8_enc_set_property; - gobject_class->get_property = gst_vp8_enc_get_property; - gobject_class->finalize = gst_vp8_enc_finalize; gst_element_class_add_pad_template (element_class, gst_static_pad_template_get (&gst_vp8_enc_src_template)); @@ -429,293 +152,18 @@ gst_vp8_enc_class_init (GstVP8EncClass * klass) "Encode VP8 video streams", "David Schleef <ds@entropywave.com>, " "Sebastian Dröge <sebastian.droege@collabora.co.uk>"); - video_encoder_class->start = gst_vp8_enc_start; - video_encoder_class->stop = gst_vp8_enc_stop; - video_encoder_class->handle_frame = gst_vp8_enc_handle_frame; - video_encoder_class->set_format = gst_vp8_enc_set_format; - video_encoder_class->flush = gst_vp8_enc_flush; - video_encoder_class->finish = gst_vp8_enc_finish; video_encoder_class->pre_push = gst_vp8_enc_pre_push; - video_encoder_class->sink_event = gst_vp8_enc_sink_event; - video_encoder_class->propose_allocation = gst_vp8_enc_propose_allocation; - - g_object_class_install_property (gobject_class, PROP_RC_END_USAGE, - g_param_spec_enum ("end-usage", "Rate control mode", - "Rate control mode", - GST_VP8_ENC_END_USAGE_TYPE, DEFAULT_RC_END_USAGE, - (GParamFlags) (G_PARAM_READWRITE | G_PARAM_STATIC_STRINGS))); - - g_object_class_install_property (gobject_class, PROP_RC_TARGET_BITRATE, - g_param_spec_int ("target-bitrate", "Target bitrate", - "Target bitrate (in bits/sec)", - 0, G_MAXINT, DEFAULT_RC_TARGET_BITRATE, - (GParamFlags) (G_PARAM_READWRITE | G_PARAM_STATIC_STRINGS))); - - g_object_class_install_property (gobject_class, PROP_RC_MIN_QUANTIZER, - g_param_spec_int ("min-quantizer", "Minimum Quantizer", - "Minimum Quantizer (best)", - 0, 63, DEFAULT_RC_MIN_QUANTIZER, - (GParamFlags) (G_PARAM_READWRITE | G_PARAM_STATIC_STRINGS))); - - g_object_class_install_property (gobject_class, PROP_RC_MAX_QUANTIZER, - g_param_spec_int ("max-quantizer", "Maximum Quantizer", - "Maximum Quantizer (worst)", - 0, 63, DEFAULT_RC_MAX_QUANTIZER, - (GParamFlags) (G_PARAM_READWRITE | G_PARAM_STATIC_STRINGS))); - - g_object_class_install_property (gobject_class, PROP_RC_DROPFRAME_THRESH, - g_param_spec_int ("dropframe-threshold", "Drop Frame Threshold", - "Temporal resampling threshold (buf %)", - 0, 100, DEFAULT_RC_DROPFRAME_THRESH, - (GParamFlags) (G_PARAM_READWRITE | G_PARAM_STATIC_STRINGS))); - - g_object_class_install_property (gobject_class, PROP_RC_RESIZE_ALLOWED, - g_param_spec_boolean ("resize-allowed", "Resize Allowed", - "Allow spatial resampling", - DEFAULT_RC_RESIZE_ALLOWED, - (GParamFlags) (G_PARAM_READWRITE | G_PARAM_STATIC_STRINGS))); - - g_object_class_install_property (gobject_class, PROP_RC_RESIZE_UP_THRESH, - g_param_spec_int ("resize-up-threshold", "Resize Up Threshold", - "Upscale threshold (buf %)", - 0, 100, DEFAULT_RC_RESIZE_UP_THRESH, - (GParamFlags) (G_PARAM_READWRITE | G_PARAM_STATIC_STRINGS))); - - g_object_class_install_property (gobject_class, PROP_RC_RESIZE_DOWN_THRESH, - g_param_spec_int ("resize-down-threshold", "Resize Down Threshold", - "Downscale threshold (buf %)", - 0, 100, DEFAULT_RC_RESIZE_DOWN_THRESH, - (GParamFlags) (G_PARAM_READWRITE | G_PARAM_STATIC_STRINGS))); - - g_object_class_install_property (gobject_class, PROP_RC_UNDERSHOOT_PCT, - g_param_spec_int ("undershoot", "Undershoot PCT", - "Datarate undershoot (min) target (%)", - 0, 1000, DEFAULT_RC_UNDERSHOOT_PCT, - (GParamFlags) (G_PARAM_READWRITE | G_PARAM_STATIC_STRINGS))); - - g_object_class_install_property (gobject_class, PROP_RC_OVERSHOOT_PCT, - g_param_spec_int ("overshoot", "Overshoot PCT", - "Datarate overshoot (max) target (%)", - 0, 1000, DEFAULT_RC_OVERSHOOT_PCT, - (GParamFlags) (G_PARAM_READWRITE | G_PARAM_STATIC_STRINGS))); - - g_object_class_install_property (gobject_class, PROP_RC_BUF_SZ, - g_param_spec_int ("buffer-size", "Buffer size", - "Client buffer size (ms)", - 0, G_MAXINT, DEFAULT_RC_BUF_SZ, - (GParamFlags) (G_PARAM_READWRITE | G_PARAM_STATIC_STRINGS))); - - g_object_class_install_property (gobject_class, PROP_RC_BUF_INITIAL_SZ, - g_param_spec_int ("buffer-initial-size", "Buffer initial size", - "Initial client buffer size (ms)", - 0, G_MAXINT, DEFAULT_RC_BUF_INITIAL_SZ, - (GParamFlags) (G_PARAM_READWRITE | G_PARAM_STATIC_STRINGS))); - - g_object_class_install_property (gobject_class, PROP_RC_BUF_OPTIMAL_SZ, - g_param_spec_int ("buffer-optimal-size", "Buffer optimal size", - "Optimal client buffer size (ms)", - 0, G_MAXINT, DEFAULT_RC_BUF_OPTIMAL_SZ, - (GParamFlags) (G_PARAM_READWRITE | G_PARAM_STATIC_STRINGS))); - - g_object_class_install_property (gobject_class, PROP_RC_2PASS_VBR_BIAS_PCT, - g_param_spec_int ("twopass-vbr-bias", "2-pass VBR bias", - "CBR/VBR bias (0=CBR, 100=VBR)", - 0, 100, DEFAULT_RC_2PASS_VBR_BIAS_PCT, - (GParamFlags) (G_PARAM_READWRITE | G_PARAM_STATIC_STRINGS))); - - g_object_class_install_property (gobject_class, - PROP_RC_2PASS_VBR_MINSECTION_PCT, - g_param_spec_int ("twopass-vbr-minsection", "2-pass GOP min bitrate", - "GOP minimum bitrate (% target)", 0, G_MAXINT, - DEFAULT_RC_2PASS_VBR_MINSECTION_PCT, - (GParamFlags) (G_PARAM_READWRITE | G_PARAM_STATIC_STRINGS))); - - g_object_class_install_property (gobject_class, - PROP_RC_2PASS_VBR_MAXSECTION_PCT, - g_param_spec_int ("twopass-vbr-maxsection", "2-pass GOP max bitrate", - "GOP maximum bitrate (% target)", 0, G_MAXINT, - DEFAULT_RC_2PASS_VBR_MINSECTION_PCT, - (GParamFlags) (G_PARAM_READWRITE | G_PARAM_STATIC_STRINGS))); - - g_object_class_install_property (gobject_class, PROP_KF_MODE, - g_param_spec_enum ("keyframe-mode", "Keyframe Mode", - "Keyframe placement", - GST_VP8_ENC_KF_MODE_TYPE, DEFAULT_KF_MODE, - (GParamFlags) (G_PARAM_READWRITE | G_PARAM_STATIC_STRINGS))); - - g_object_class_install_property (gobject_class, PROP_KF_MAX_DIST, - g_param_spec_int ("keyframe-max-dist", "Keyframe max distance", - "Maximum distance between keyframes (number of frames)", - 0, G_MAXINT, DEFAULT_KF_MAX_DIST, - (GParamFlags) (G_PARAM_READWRITE | G_PARAM_STATIC_STRINGS))); - - g_object_class_install_property (gobject_class, PROP_MULTIPASS_MODE, - g_param_spec_enum ("multipass-mode", "Multipass Mode", - "Multipass encode mode", - GST_VP8_ENC_MULTIPASS_MODE_TYPE, DEFAULT_MULTIPASS_MODE, - (GParamFlags) (G_PARAM_READWRITE | G_PARAM_STATIC_STRINGS))); - - g_object_class_install_property (gobject_class, PROP_MULTIPASS_CACHE_FILE, - g_param_spec_string ("multipass-cache-file", "Multipass Cache File", - "Multipass cache file. " - "If stream caps reinited, multiple files will be created: " - "file, file.1, file.2, ... and so on.", - DEFAULT_MULTIPASS_CACHE_FILE, - (GParamFlags) (G_PARAM_READWRITE | G_PARAM_STATIC_STRINGS))); - - g_object_class_install_property (gobject_class, PROP_TS_NUMBER_LAYERS, - g_param_spec_int ("temporal-scalability-number-layers", - "Number of coding layers", "Number of coding layers to use", 1, 5, - DEFAULT_TS_NUMBER_LAYERS, - (GParamFlags) (G_PARAM_READWRITE | G_PARAM_STATIC_STRINGS))); - - g_object_class_install_property (gobject_class, PROP_TS_TARGET_BITRATE, - g_param_spec_value_array ("temporal-scalability-target-bitrate", - "Coding layer target bitrates", - "Target bitrates for coding layers (one per layer, decreasing)", - g_param_spec_int ("target-bitrate", "Target bitrate", - "Target bitrate", 0, G_MAXINT, DEFAULT_RC_TARGET_BITRATE, - G_PARAM_READWRITE | G_PARAM_STATIC_STRINGS), - G_PARAM_READWRITE | G_PARAM_STATIC_STRINGS)); - - g_object_class_install_property (gobject_class, PROP_TS_RATE_DECIMATOR, - g_param_spec_value_array ("temporal-scalability-rate-decimator", - "Coding layer rate decimator", - "Rate decimation factors for each layer", - g_param_spec_int ("rate-decimator", "Rate decimator", - "Rate decimator", 0, 1000000000, 0, - G_PARAM_READWRITE | G_PARAM_STATIC_STRINGS), - G_PARAM_READWRITE | G_PARAM_STATIC_STRINGS)); - - g_object_class_install_property (gobject_class, PROP_TS_PERIODICITY, - g_param_spec_int ("temporal-scalability-periodicity", - "Coding layer periodicity", - "Length of sequence that defines layer membership periodicity", 0, 16, - DEFAULT_TS_PERIODICITY, - (GParamFlags) (G_PARAM_READWRITE | G_PARAM_STATIC_STRINGS))); - - g_object_class_install_property (gobject_class, PROP_TS_LAYER_ID, - g_param_spec_value_array ("temporal-scalability-layer-id", - "Coding layer identification", - "Sequence defining coding layer membership", - g_param_spec_int ("layer-id", "Layer ID", "Layer ID", 0, 4, 0, - G_PARAM_READWRITE | G_PARAM_STATIC_STRINGS), - G_PARAM_READWRITE | G_PARAM_STATIC_STRINGS)); - - g_object_class_install_property (gobject_class, PROP_LAG_IN_FRAMES, - g_param_spec_int ("lag-in-frames", "Lag in frames", - "Maximum number of frames to lag", - 0, 25, DEFAULT_LAG_IN_FRAMES, - (GParamFlags) (G_PARAM_READWRITE | G_PARAM_STATIC_STRINGS))); - - g_object_class_install_property (gobject_class, PROP_ERROR_RESILIENT, - g_param_spec_flags ("error-resilient", "Error resilient", - "Error resilience flags", - GST_VP8_ENC_ER_FLAGS_TYPE, DEFAULT_ERROR_RESILIENT, - (GParamFlags) (G_PARAM_READWRITE | G_PARAM_STATIC_STRINGS))); - - g_object_class_install_property (gobject_class, PROP_THREADS, - g_param_spec_int ("threads", "Threads", - "Number of threads to use", - 0, 64, DEFAULT_THREADS, - (GParamFlags) (G_PARAM_READWRITE | G_PARAM_STATIC_STRINGS))); - - g_object_class_install_property (gobject_class, PROP_DEADLINE, - g_param_spec_int64 ("deadline", "Deadline", - "Deadline per frame (usec, 0=disabled)", - 0, G_MAXINT64, DEFAULT_DEADLINE, - (GParamFlags) (G_PARAM_READWRITE | G_PARAM_STATIC_STRINGS))); - - g_object_class_install_property (gobject_class, PROP_H_SCALING_MODE, - g_param_spec_enum ("horizontal-scaling-mode", "Horizontal scaling mode", - "Horizontal scaling mode", - GST_VP8_ENC_SCALING_MODE_TYPE, DEFAULT_H_SCALING_MODE, - (GParamFlags) (G_PARAM_READWRITE | G_PARAM_STATIC_STRINGS))); - - g_object_class_install_property (gobject_class, PROP_V_SCALING_MODE, - g_param_spec_enum ("vertical-scaling-mode", "Vertical scaling mode", - "Vertical scaling mode", - GST_VP8_ENC_SCALING_MODE_TYPE, DEFAULT_V_SCALING_MODE, - (GParamFlags) (G_PARAM_READWRITE | G_PARAM_STATIC_STRINGS))); - - g_object_class_install_property (gobject_class, PROP_CPU_USED, - g_param_spec_int ("cpu-used", "CPU used", - "CPU used", - -16, 16, DEFAULT_CPU_USED, - (GParamFlags) (G_PARAM_READWRITE | G_PARAM_STATIC_STRINGS))); - - g_object_class_install_property (gobject_class, PROP_ENABLE_AUTO_ALT_REF, - g_param_spec_boolean ("auto-alt-ref", "Auto alt reference frames", - "Automatically generate AltRef frames", - DEFAULT_ENABLE_AUTO_ALT_REF, - (GParamFlags) (G_PARAM_READWRITE | G_PARAM_STATIC_STRINGS))); - - g_object_class_install_property (gobject_class, PROP_NOISE_SENSITIVITY, - g_param_spec_int ("noise-sensitivity", "Noise sensitivity", - "Noise sensisivity (frames to blur)", - 0, 6, DEFAULT_NOISE_SENSITIVITY, - (GParamFlags) (G_PARAM_READWRITE | G_PARAM_STATIC_STRINGS))); - - g_object_class_install_property (gobject_class, PROP_SHARPNESS, - g_param_spec_int ("sharpness", "Sharpness", - "Filter sharpness", - 0, 7, DEFAULT_SHARPNESS, - (GParamFlags) (G_PARAM_READWRITE | G_PARAM_STATIC_STRINGS))); - - g_object_class_install_property (gobject_class, PROP_STATIC_THRESHOLD, - g_param_spec_int ("static-threshold", "Static Threshold", - "Motion detection threshold", - 0, G_MAXINT, DEFAULT_STATIC_THRESHOLD, - (GParamFlags) (G_PARAM_READWRITE | G_PARAM_STATIC_STRINGS))); - - g_object_class_install_property (gobject_class, PROP_TOKEN_PARTITIONS, - g_param_spec_enum ("token-partitions", "Token partitions", - "Number of token partitions", - GST_VP8_ENC_TOKEN_PARTITIONS_TYPE, DEFAULT_TOKEN_PARTITIONS, - (GParamFlags) (G_PARAM_READWRITE | G_PARAM_STATIC_STRINGS))); - g_object_class_install_property (gobject_class, PROP_ARNR_MAXFRAMES, - g_param_spec_int ("arnr-maxframes", "AltRef max frames", - "AltRef maximum number of frames", - 0, 15, DEFAULT_ARNR_MAXFRAMES, - (GParamFlags) (G_PARAM_READWRITE | G_PARAM_STATIC_STRINGS))); - - g_object_class_install_property (gobject_class, PROP_ARNR_STRENGTH, - g_param_spec_int ("arnr-strength", "AltRef strength", - "AltRef strength", - 0, 6, DEFAULT_ARNR_STRENGTH, - (GParamFlags) (G_PARAM_READWRITE | G_PARAM_STATIC_STRINGS))); - - g_object_class_install_property (gobject_class, PROP_ARNR_TYPE, - g_param_spec_int ("arnr-type", "AltRef type", - "AltRef type", - 1, 3, DEFAULT_ARNR_TYPE, - (GParamFlags) (G_PARAM_READWRITE | G_PARAM_STATIC_STRINGS | - G_PARAM_DEPRECATED))); - - g_object_class_install_property (gobject_class, PROP_TUNING, - g_param_spec_enum ("tuning", "Tuning", - "Tuning", - GST_VP8_ENC_TUNING_TYPE, DEFAULT_TUNING, - (GParamFlags) (G_PARAM_READWRITE | G_PARAM_STATIC_STRINGS))); - - g_object_class_install_property (gobject_class, PROP_CQ_LEVEL, - g_param_spec_int ("cq-level", "Constrained quality level", - "Constrained quality level", - 0, 63, DEFAULT_CQ_LEVEL, - (GParamFlags) (G_PARAM_READWRITE | G_PARAM_STATIC_STRINGS))); - - g_object_class_install_property (gobject_class, PROP_MAX_INTRA_BITRATE_PCT, - g_param_spec_int ("max-intra-bitrate", "Max Intra bitrate", - "Maximum Intra frame bitrate", - 0, G_MAXINT, DEFAULT_MAX_INTRA_BITRATE_PCT, - (GParamFlags) (G_PARAM_READWRITE | G_PARAM_STATIC_STRINGS))); - - g_object_class_install_property (gobject_class, PROP_TIMEBASE, - gst_param_spec_fraction ("timebase", "Shortest interframe time", - "Fraction of one second that is the shortest interframe time - normally left as zero which will default to the framerate", - 0, 1, G_MAXINT, 1, DEFAULT_TIMEBASE_N, DEFAULT_TIMEBASE_D, - G_PARAM_READWRITE | G_PARAM_STATIC_STRINGS)); + vpx_encoder_class->get_algo = gst_vp8_enc_get_algo; + vpx_encoder_class->enable_scaling = gst_vp8_enc_enable_scaling; + vpx_encoder_class->set_image_format = gst_vp8_enc_set_image_format; + vpx_encoder_class->get_new_vpx_caps = gst_vp8_enc_get_new_simple_caps; + vpx_encoder_class->set_stream_info = gst_vp8_enc_set_stream_info; + vpx_encoder_class->process_frame_user_data = + gst_vp8_enc_process_frame_user_data; + vpx_encoder_class->handle_invisible_frame_buffer = + gst_vp8_enc_handle_invisible_frame_buffer; + vpx_encoder_class->set_frame_user_data = gst_vp8_enc_set_frame_user_data; GST_DEBUG_CATEGORY_INIT (gst_vp8enc_debug, "vp8enc", 0, "VP8 Encoder"); } @@ -724,1346 +172,149 @@ static void gst_vp8_enc_init (GstVP8Enc * gst_vp8_enc) { vpx_codec_err_t status; - - GST_DEBUG_OBJECT (gst_vp8_enc, "init"); - GST_PAD_SET_ACCEPT_TEMPLATE (GST_VIDEO_ENCODER_SINK_PAD (gst_vp8_enc)); - + GstVPXEnc *gst_vpx_enc = GST_VPX_ENC (gst_vp8_enc); + GST_DEBUG_OBJECT (gst_vp8_enc, "gst_vp8_enc_init"); status = - vpx_codec_enc_config_default (&vpx_codec_vp8_cx_algo, &gst_vp8_enc->cfg, - 0); + vpx_codec_enc_config_default (gst_vp8_enc_get_algo (gst_vpx_enc), + &gst_vpx_enc->cfg, 0); if (status != VPX_CODEC_OK) { - GST_ERROR_OBJECT (gst_vp8_enc, + GST_ERROR_OBJECT (gst_vpx_enc, "Failed to get default encoder configuration: %s", gst_vpx_error_name (status)); - gst_vp8_enc->have_default_config = FALSE; - } else { - gst_vp8_enc->have_default_config = TRUE; - } - - gst_vp8_enc->cfg.rc_end_usage = DEFAULT_RC_END_USAGE; - gst_vp8_enc->cfg.rc_target_bitrate = DEFAULT_RC_TARGET_BITRATE / 1000; - gst_vp8_enc->rc_target_bitrate_set = FALSE; - gst_vp8_enc->cfg.rc_min_quantizer = DEFAULT_RC_MIN_QUANTIZER; - gst_vp8_enc->cfg.rc_max_quantizer = DEFAULT_RC_MAX_QUANTIZER; - gst_vp8_enc->cfg.rc_dropframe_thresh = DEFAULT_RC_DROPFRAME_THRESH; - gst_vp8_enc->cfg.rc_resize_allowed = DEFAULT_RC_RESIZE_ALLOWED; - gst_vp8_enc->cfg.rc_resize_up_thresh = DEFAULT_RC_RESIZE_UP_THRESH; - gst_vp8_enc->cfg.rc_resize_down_thresh = DEFAULT_RC_RESIZE_DOWN_THRESH; - gst_vp8_enc->cfg.rc_undershoot_pct = DEFAULT_RC_UNDERSHOOT_PCT; - gst_vp8_enc->cfg.rc_overshoot_pct = DEFAULT_RC_OVERSHOOT_PCT; - gst_vp8_enc->cfg.rc_buf_sz = DEFAULT_RC_BUF_SZ; - gst_vp8_enc->cfg.rc_buf_initial_sz = DEFAULT_RC_BUF_INITIAL_SZ; - gst_vp8_enc->cfg.rc_buf_optimal_sz = DEFAULT_RC_BUF_OPTIMAL_SZ; - gst_vp8_enc->cfg.rc_2pass_vbr_bias_pct = DEFAULT_RC_2PASS_VBR_BIAS_PCT; - gst_vp8_enc->cfg.rc_2pass_vbr_minsection_pct = - DEFAULT_RC_2PASS_VBR_MINSECTION_PCT; - gst_vp8_enc->cfg.rc_2pass_vbr_maxsection_pct = - DEFAULT_RC_2PASS_VBR_MAXSECTION_PCT; - gst_vp8_enc->cfg.kf_mode = DEFAULT_KF_MODE; - gst_vp8_enc->cfg.kf_max_dist = DEFAULT_KF_MAX_DIST; - gst_vp8_enc->cfg.g_pass = DEFAULT_MULTIPASS_MODE; - gst_vp8_enc->multipass_cache_prefix = g_strdup (DEFAULT_MULTIPASS_CACHE_FILE); - gst_vp8_enc->multipass_cache_file = NULL; - gst_vp8_enc->multipass_cache_idx = 0; - gst_vp8_enc->cfg.ts_number_layers = DEFAULT_TS_NUMBER_LAYERS; - gst_vp8_enc->n_ts_target_bitrate = 0; - gst_vp8_enc->n_ts_rate_decimator = 0; - gst_vp8_enc->cfg.ts_periodicity = DEFAULT_TS_PERIODICITY; - gst_vp8_enc->n_ts_layer_id = 0; - gst_vp8_enc->cfg.g_error_resilient = DEFAULT_ERROR_RESILIENT; - gst_vp8_enc->cfg.g_lag_in_frames = DEFAULT_LAG_IN_FRAMES; - gst_vp8_enc->cfg.g_threads = DEFAULT_THREADS; - gst_vp8_enc->deadline = DEFAULT_DEADLINE; - gst_vp8_enc->h_scaling_mode = DEFAULT_H_SCALING_MODE; - gst_vp8_enc->v_scaling_mode = DEFAULT_V_SCALING_MODE; - gst_vp8_enc->cpu_used = DEFAULT_CPU_USED; - gst_vp8_enc->enable_auto_alt_ref = DEFAULT_ENABLE_AUTO_ALT_REF; - gst_vp8_enc->noise_sensitivity = DEFAULT_NOISE_SENSITIVITY; - gst_vp8_enc->sharpness = DEFAULT_SHARPNESS; - gst_vp8_enc->static_threshold = DEFAULT_STATIC_THRESHOLD; - gst_vp8_enc->token_partitions = DEFAULT_TOKEN_PARTITIONS; - gst_vp8_enc->arnr_maxframes = DEFAULT_ARNR_MAXFRAMES; - gst_vp8_enc->arnr_strength = DEFAULT_ARNR_STRENGTH; - gst_vp8_enc->arnr_type = DEFAULT_ARNR_TYPE; - gst_vp8_enc->tuning = DEFAULT_TUNING; - gst_vp8_enc->cq_level = DEFAULT_CQ_LEVEL; - gst_vp8_enc->max_intra_bitrate_pct = DEFAULT_MAX_INTRA_BITRATE_PCT; - gst_vp8_enc->timebase_n = DEFAULT_TIMEBASE_N; - gst_vp8_enc->timebase_d = DEFAULT_TIMEBASE_D; - - gst_vp8_enc->cfg.g_profile = DEFAULT_PROFILE; - - g_mutex_init (&gst_vp8_enc->encoder_lock); -} - -static void -gst_vp8_enc_finalize (GObject * object) -{ - GstVP8Enc *gst_vp8_enc; - - GST_DEBUG_OBJECT (object, "finalize"); - - g_return_if_fail (GST_IS_VP8_ENC (object)); - gst_vp8_enc = GST_VP8_ENC (object); - - g_free (gst_vp8_enc->multipass_cache_prefix); - g_free (gst_vp8_enc->multipass_cache_file); - gst_vp8_enc->multipass_cache_idx = 0; - - - if (gst_vp8_enc->input_state) - gst_video_codec_state_unref (gst_vp8_enc->input_state); - - g_mutex_clear (&gst_vp8_enc->encoder_lock); - - G_OBJECT_CLASS (parent_class)->finalize (object); -} - -static void -gst_vp8_enc_set_property (GObject * object, guint prop_id, - const GValue * value, GParamSpec * pspec) -{ - GstVP8Enc *gst_vp8_enc; - gboolean global = FALSE; - vpx_codec_err_t status; - - g_return_if_fail (GST_IS_VP8_ENC (object)); - gst_vp8_enc = GST_VP8_ENC (object); - - GST_DEBUG_OBJECT (object, "gst_vp8_enc_set_property"); - g_mutex_lock (&gst_vp8_enc->encoder_lock); - switch (prop_id) { - case PROP_RC_END_USAGE: - gst_vp8_enc->cfg.rc_end_usage = g_value_get_enum (value); - global = TRUE; - break; - case PROP_RC_TARGET_BITRATE: - gst_vp8_enc->cfg.rc_target_bitrate = g_value_get_int (value) / 1000; - gst_vp8_enc->rc_target_bitrate_set = TRUE; - global = TRUE; - break; - case PROP_RC_MIN_QUANTIZER: - gst_vp8_enc->cfg.rc_min_quantizer = g_value_get_int (value); - global = TRUE; - break; - case PROP_RC_MAX_QUANTIZER: - gst_vp8_enc->cfg.rc_max_quantizer = g_value_get_int (value); - global = TRUE; - break; - case PROP_RC_DROPFRAME_THRESH: - gst_vp8_enc->cfg.rc_dropframe_thresh = g_value_get_int (value); - global = TRUE; - break; - case PROP_RC_RESIZE_ALLOWED: - gst_vp8_enc->cfg.rc_resize_allowed = g_value_get_boolean (value); - global = TRUE; - break; - case PROP_RC_RESIZE_UP_THRESH: - gst_vp8_enc->cfg.rc_resize_up_thresh = g_value_get_int (value); - global = TRUE; - break; - case PROP_RC_RESIZE_DOWN_THRESH: - gst_vp8_enc->cfg.rc_resize_down_thresh = g_value_get_int (value); - global = TRUE; - break; - case PROP_RC_UNDERSHOOT_PCT: - gst_vp8_enc->cfg.rc_undershoot_pct = g_value_get_int (value); - global = TRUE; - break; - case PROP_RC_OVERSHOOT_PCT: - gst_vp8_enc->cfg.rc_overshoot_pct = g_value_get_int (value); - global = TRUE; - break; - case PROP_RC_BUF_SZ: - gst_vp8_enc->cfg.rc_buf_sz = g_value_get_int (value); - global = TRUE; - break; - case PROP_RC_BUF_INITIAL_SZ: - gst_vp8_enc->cfg.rc_buf_initial_sz = g_value_get_int (value); - global = TRUE; - break; - case PROP_RC_BUF_OPTIMAL_SZ: - gst_vp8_enc->cfg.rc_buf_optimal_sz = g_value_get_int (value); - global = TRUE; - break; - case PROP_RC_2PASS_VBR_BIAS_PCT: - gst_vp8_enc->cfg.rc_2pass_vbr_bias_pct = g_value_get_int (value); - global = TRUE; - break; - case PROP_RC_2PASS_VBR_MINSECTION_PCT: - gst_vp8_enc->cfg.rc_2pass_vbr_minsection_pct = g_value_get_int (value); - global = TRUE; - break; - case PROP_RC_2PASS_VBR_MAXSECTION_PCT: - gst_vp8_enc->cfg.rc_2pass_vbr_maxsection_pct = g_value_get_int (value); - global = TRUE; - break; - case PROP_KF_MODE: - gst_vp8_enc->cfg.kf_mode = g_value_get_enum (value); - global = TRUE; - break; - case PROP_KF_MAX_DIST: - gst_vp8_enc->cfg.kf_max_dist = g_value_get_int (value); - global = TRUE; - break; - case PROP_MULTIPASS_MODE: - gst_vp8_enc->cfg.g_pass = g_value_get_enum (value); - global = TRUE; - break; - case PROP_MULTIPASS_CACHE_FILE: - if (gst_vp8_enc->multipass_cache_prefix) - g_free (gst_vp8_enc->multipass_cache_prefix); - gst_vp8_enc->multipass_cache_prefix = g_value_dup_string (value); - break; - case PROP_TS_NUMBER_LAYERS: - gst_vp8_enc->cfg.ts_number_layers = g_value_get_int (value); - global = TRUE; - break; - case PROP_TS_TARGET_BITRATE:{ - GValueArray *va = g_value_get_boxed (value); - - memset (&gst_vp8_enc->cfg.ts_target_bitrate, 0, - sizeof (gst_vp8_enc->cfg.ts_target_bitrate)); - if (va == NULL) { - gst_vp8_enc->n_ts_target_bitrate = 0; - } else if (va->n_values > VPX_TS_MAX_LAYERS) { - g_warning ("%s: Only %d layers allowed at maximum", - GST_ELEMENT_NAME (gst_vp8_enc), VPX_TS_MAX_LAYERS); - } else { - gint i; - - for (i = 0; i < va->n_values; i++) - gst_vp8_enc->cfg.ts_target_bitrate[i] = - g_value_get_int (g_value_array_get_nth (va, i)); - gst_vp8_enc->n_ts_target_bitrate = va->n_values; - } - global = TRUE; - break; - } - case PROP_TS_RATE_DECIMATOR:{ - GValueArray *va = g_value_get_boxed (value); - - memset (&gst_vp8_enc->cfg.ts_rate_decimator, 0, - sizeof (gst_vp8_enc->cfg.ts_rate_decimator)); - if (va == NULL) { - gst_vp8_enc->n_ts_rate_decimator = 0; - } else if (va->n_values > VPX_TS_MAX_LAYERS) { - g_warning ("%s: Only %d layers allowed at maximum", - GST_ELEMENT_NAME (gst_vp8_enc), VPX_TS_MAX_LAYERS); - } else { - gint i; - - for (i = 0; i < va->n_values; i++) - gst_vp8_enc->cfg.ts_rate_decimator[i] = - g_value_get_int (g_value_array_get_nth (va, i)); - gst_vp8_enc->n_ts_rate_decimator = va->n_values; - } - global = TRUE; - break; - } - case PROP_TS_PERIODICITY: - gst_vp8_enc->cfg.ts_periodicity = g_value_get_int (value); - global = TRUE; - break; - case PROP_TS_LAYER_ID:{ - GValueArray *va = g_value_get_boxed (value); - - memset (&gst_vp8_enc->cfg.ts_layer_id, 0, - sizeof (gst_vp8_enc->cfg.ts_layer_id)); - if (va && va->n_values > VPX_TS_MAX_PERIODICITY) { - g_warning ("%s: Only %d sized layer sequences allowed at maximum", - GST_ELEMENT_NAME (gst_vp8_enc), VPX_TS_MAX_PERIODICITY); - } else if (va) { - gint i; - - for (i = 0; i < va->n_values; i++) - gst_vp8_enc->cfg.ts_layer_id[i] = - g_value_get_int (g_value_array_get_nth (va, i)); - gst_vp8_enc->n_ts_layer_id = va->n_values; - } else { - gst_vp8_enc->n_ts_layer_id = 0; - } - global = TRUE; - break; - } - case PROP_ERROR_RESILIENT: - gst_vp8_enc->cfg.g_error_resilient = g_value_get_flags (value); - global = TRUE; - break; - case PROP_LAG_IN_FRAMES: - gst_vp8_enc->cfg.g_lag_in_frames = g_value_get_int (value); - global = TRUE; - break; - case PROP_THREADS: - gst_vp8_enc->cfg.g_threads = g_value_get_int (value); - global = TRUE; - break; - case PROP_DEADLINE: - gst_vp8_enc->deadline = g_value_get_int64 (value); - break; - case PROP_H_SCALING_MODE: - gst_vp8_enc->h_scaling_mode = g_value_get_enum (value); - if (gst_vp8_enc->inited) { - vpx_scaling_mode_t sm; - - sm.h_scaling_mode = gst_vp8_enc->h_scaling_mode; - sm.v_scaling_mode = gst_vp8_enc->v_scaling_mode; - - status = - vpx_codec_control (&gst_vp8_enc->encoder, VP8E_SET_SCALEMODE, &sm); - if (status != VPX_CODEC_OK) { - GST_WARNING_OBJECT (gst_vp8_enc, - "Failed to set VP8E_SET_SCALEMODE: %s", - gst_vpx_error_name (status)); - } - } - break; - case PROP_V_SCALING_MODE: - gst_vp8_enc->v_scaling_mode = g_value_get_enum (value); - if (gst_vp8_enc->inited) { - vpx_scaling_mode_t sm; - - sm.h_scaling_mode = gst_vp8_enc->h_scaling_mode; - sm.v_scaling_mode = gst_vp8_enc->v_scaling_mode; - - status = - vpx_codec_control (&gst_vp8_enc->encoder, VP8E_SET_SCALEMODE, &sm); - if (status != VPX_CODEC_OK) { - GST_WARNING_OBJECT (gst_vp8_enc, - "Failed to set VP8E_SET_SCALEMODE: %s", - gst_vpx_error_name (status)); - } - } - break; - case PROP_CPU_USED: - gst_vp8_enc->cpu_used = g_value_get_int (value); - if (gst_vp8_enc->inited) { - status = - vpx_codec_control (&gst_vp8_enc->encoder, VP8E_SET_CPUUSED, - gst_vp8_enc->cpu_used); - if (status != VPX_CODEC_OK) { - GST_WARNING_OBJECT (gst_vp8_enc, "Failed to set VP8E_SET_CPUUSED: %s", - gst_vpx_error_name (status)); - } - } - break; - case PROP_ENABLE_AUTO_ALT_REF: - gst_vp8_enc->enable_auto_alt_ref = g_value_get_boolean (value); - if (gst_vp8_enc->inited) { - status = - vpx_codec_control (&gst_vp8_enc->encoder, VP8E_SET_ENABLEAUTOALTREF, - (gst_vp8_enc->enable_auto_alt_ref ? 1 : 0)); - if (status != VPX_CODEC_OK) { - GST_WARNING_OBJECT (gst_vp8_enc, - "Failed to set VP8E_SET_ENABLEAUTOALTREF: %s", - gst_vpx_error_name (status)); - } - } - break; - case PROP_NOISE_SENSITIVITY: - gst_vp8_enc->noise_sensitivity = g_value_get_int (value); - if (gst_vp8_enc->inited) { - status = - vpx_codec_control (&gst_vp8_enc->encoder, - VP8E_SET_NOISE_SENSITIVITY, gst_vp8_enc->noise_sensitivity); - if (status != VPX_CODEC_OK) { - GST_WARNING_OBJECT (gst_vp8_enc, - "Failed to set VP8E_SET_NOISE_SENSITIVITY: %s", - gst_vpx_error_name (status)); - } - } - break; - case PROP_SHARPNESS: - gst_vp8_enc->sharpness = g_value_get_int (value); - if (gst_vp8_enc->inited) { - status = vpx_codec_control (&gst_vp8_enc->encoder, VP8E_SET_SHARPNESS, - gst_vp8_enc->sharpness); - if (status != VPX_CODEC_OK) { - GST_WARNING_OBJECT (gst_vp8_enc, - "Failed to set VP8E_SET_SHARPNESS: %s", - gst_vpx_error_name (status)); - } - } - break; - case PROP_STATIC_THRESHOLD: - gst_vp8_enc->static_threshold = g_value_get_int (value); - if (gst_vp8_enc->inited) { - status = - vpx_codec_control (&gst_vp8_enc->encoder, VP8E_SET_STATIC_THRESHOLD, - gst_vp8_enc->static_threshold); - if (status != VPX_CODEC_OK) { - GST_WARNING_OBJECT (gst_vp8_enc, - "Failed to set VP8E_SET_STATIC_THRESHOLD: %s", - gst_vpx_error_name (status)); - } - } - break; - case PROP_TOKEN_PARTITIONS: - gst_vp8_enc->token_partitions = g_value_get_enum (value); - if (gst_vp8_enc->inited) { - status = - vpx_codec_control (&gst_vp8_enc->encoder, VP8E_SET_TOKEN_PARTITIONS, - gst_vp8_enc->token_partitions); - if (status != VPX_CODEC_OK) { - GST_WARNING_OBJECT (gst_vp8_enc, - "Failed to set VP8E_SET_TOKEN_PARTIONS: %s", - gst_vpx_error_name (status)); - } - } - break; - case PROP_ARNR_MAXFRAMES: - gst_vp8_enc->arnr_maxframes = g_value_get_int (value); - if (gst_vp8_enc->inited) { - status = - vpx_codec_control (&gst_vp8_enc->encoder, VP8E_SET_ARNR_MAXFRAMES, - gst_vp8_enc->arnr_maxframes); - if (status != VPX_CODEC_OK) { - GST_WARNING_OBJECT (gst_vp8_enc, - "Failed to set VP8E_SET_ARNR_MAXFRAMES: %s", - gst_vpx_error_name (status)); - } - } - break; - case PROP_ARNR_STRENGTH: - gst_vp8_enc->arnr_strength = g_value_get_int (value); - if (gst_vp8_enc->inited) { - status = - vpx_codec_control (&gst_vp8_enc->encoder, VP8E_SET_ARNR_STRENGTH, - gst_vp8_enc->arnr_strength); - if (status != VPX_CODEC_OK) { - GST_WARNING_OBJECT (gst_vp8_enc, - "Failed to set VP8E_SET_ARNR_STRENGTH: %s", - gst_vpx_error_name (status)); - } - } - break; - case PROP_ARNR_TYPE: - gst_vp8_enc->arnr_type = g_value_get_int (value); - g_warning ("arnr-type is a no-op since control has been deprecated " - "in libvpx"); - break; - case PROP_TUNING: - gst_vp8_enc->tuning = g_value_get_enum (value); - if (gst_vp8_enc->inited) { - status = vpx_codec_control (&gst_vp8_enc->encoder, VP8E_SET_TUNING, - gst_vp8_enc->tuning); - if (status != VPX_CODEC_OK) { - GST_WARNING_OBJECT (gst_vp8_enc, - "Failed to set VP8E_SET_TUNING: %s", gst_vpx_error_name (status)); - } - } - break; - case PROP_CQ_LEVEL: - gst_vp8_enc->cq_level = g_value_get_int (value); - if (gst_vp8_enc->inited) { - status = vpx_codec_control (&gst_vp8_enc->encoder, VP8E_SET_CQ_LEVEL, - gst_vp8_enc->cq_level); - if (status != VPX_CODEC_OK) { - GST_WARNING_OBJECT (gst_vp8_enc, - "Failed to set VP8E_SET_CQ_LEVEL: %s", - gst_vpx_error_name (status)); - } - } - break; - case PROP_MAX_INTRA_BITRATE_PCT: - gst_vp8_enc->max_intra_bitrate_pct = g_value_get_int (value); - if (gst_vp8_enc->inited) { - status = - vpx_codec_control (&gst_vp8_enc->encoder, - VP8E_SET_MAX_INTRA_BITRATE_PCT, gst_vp8_enc->max_intra_bitrate_pct); - if (status != VPX_CODEC_OK) { - GST_WARNING_OBJECT (gst_vp8_enc, - "Failed to set VP8E_SET_MAX_INTRA_BITRATE_PCT: %s", - gst_vpx_error_name (status)); - } - } - break; - case PROP_TIMEBASE: - gst_vp8_enc->timebase_n = gst_value_get_fraction_numerator (value); - gst_vp8_enc->timebase_d = gst_value_get_fraction_denominator (value); - break; - default: - break; - } - - if (global &&gst_vp8_enc->inited) { - status = - vpx_codec_enc_config_set (&gst_vp8_enc->encoder, &gst_vp8_enc->cfg); - if (status != VPX_CODEC_OK) { - g_mutex_unlock (&gst_vp8_enc->encoder_lock); - GST_ELEMENT_ERROR (gst_vp8_enc, LIBRARY, INIT, - ("Failed to set encoder configuration"), ("%s", - gst_vpx_error_name (status))); - } else { - g_mutex_unlock (&gst_vp8_enc->encoder_lock); - } + gst_vpx_enc->have_default_config = FALSE; } else { - g_mutex_unlock (&gst_vp8_enc->encoder_lock); + gst_vpx_enc->have_default_config = TRUE; } } -static void -gst_vp8_enc_get_property (GObject * object, guint prop_id, GValue * value, - GParamSpec * pspec) +static vpx_codec_iface_t * +gst_vp8_enc_get_algo (GstVPXEnc * enc) { - GstVP8Enc *gst_vp8_enc; - - g_return_if_fail (GST_IS_VP8_ENC (object)); - gst_vp8_enc = GST_VP8_ENC (object); - - g_mutex_lock (&gst_vp8_enc->encoder_lock); - switch (prop_id) { - case PROP_RC_END_USAGE: - g_value_set_enum (value, gst_vp8_enc->cfg.rc_end_usage); - break; - case PROP_RC_TARGET_BITRATE: - g_value_set_int (value, gst_vp8_enc->cfg.rc_target_bitrate * 1000); - break; - case PROP_RC_MIN_QUANTIZER: - g_value_set_int (value, gst_vp8_enc->cfg.rc_min_quantizer); - break; - case PROP_RC_MAX_QUANTIZER: - g_value_set_int (value, gst_vp8_enc->cfg.rc_max_quantizer); - break; - case PROP_RC_DROPFRAME_THRESH: - g_value_set_int (value, gst_vp8_enc->cfg.rc_dropframe_thresh); - break; - case PROP_RC_RESIZE_ALLOWED: - g_value_set_boolean (value, gst_vp8_enc->cfg.rc_resize_allowed); - break; - case PROP_RC_RESIZE_UP_THRESH: - g_value_set_int (value, gst_vp8_enc->cfg.rc_resize_up_thresh); - break; - case PROP_RC_RESIZE_DOWN_THRESH: - g_value_set_int (value, gst_vp8_enc->cfg.rc_resize_down_thresh); - break; - case PROP_RC_UNDERSHOOT_PCT: - g_value_set_int (value, gst_vp8_enc->cfg.rc_undershoot_pct); - break; - case PROP_RC_OVERSHOOT_PCT: - g_value_set_int (value, gst_vp8_enc->cfg.rc_overshoot_pct); - break; - case PROP_RC_BUF_SZ: - g_value_set_int (value, gst_vp8_enc->cfg.rc_buf_sz); - break; - case PROP_RC_BUF_INITIAL_SZ: - g_value_set_int (value, gst_vp8_enc->cfg.rc_buf_initial_sz); - break; - case PROP_RC_BUF_OPTIMAL_SZ: - g_value_set_int (value, gst_vp8_enc->cfg.rc_buf_optimal_sz); - break; - case PROP_RC_2PASS_VBR_BIAS_PCT: - g_value_set_int (value, gst_vp8_enc->cfg.rc_2pass_vbr_bias_pct); - break; - case PROP_RC_2PASS_VBR_MINSECTION_PCT: - g_value_set_int (value, gst_vp8_enc->cfg.rc_2pass_vbr_minsection_pct); - break; - case PROP_RC_2PASS_VBR_MAXSECTION_PCT: - g_value_set_int (value, gst_vp8_enc->cfg.rc_2pass_vbr_maxsection_pct); - break; - case PROP_KF_MODE: - g_value_set_enum (value, gst_vp8_enc->cfg.kf_mode); - break; - case PROP_KF_MAX_DIST: - g_value_set_int (value, gst_vp8_enc->cfg.kf_max_dist); - break; - case PROP_MULTIPASS_MODE: - g_value_set_enum (value, gst_vp8_enc->cfg.g_pass); - break; - case PROP_MULTIPASS_CACHE_FILE: - g_value_set_string (value, gst_vp8_enc->multipass_cache_prefix); - break; - case PROP_TS_NUMBER_LAYERS: - g_value_set_int (value, gst_vp8_enc->cfg.ts_number_layers); - break; - case PROP_TS_TARGET_BITRATE:{ - GValueArray *va; - - if (gst_vp8_enc->n_ts_target_bitrate == 0) { - g_value_set_boxed (value, NULL); - } else { - gint i; - - va = g_value_array_new (gst_vp8_enc->n_ts_target_bitrate); - for (i = 0; i < gst_vp8_enc->n_ts_target_bitrate; i++) { - GValue v = { 0, }; - - g_value_init (&v, G_TYPE_INT); - g_value_set_int (&v, gst_vp8_enc->cfg.ts_target_bitrate[i]); - g_value_array_append (va, &v); - g_value_unset (&v); - } - g_value_set_boxed (value, va); - g_value_array_free (va); - } - break; - } - case PROP_TS_RATE_DECIMATOR:{ - GValueArray *va; - - if (gst_vp8_enc->n_ts_rate_decimator == 0) { - g_value_set_boxed (value, NULL); - } else { - gint i; - - va = g_value_array_new (gst_vp8_enc->n_ts_rate_decimator); - for (i = 0; i < gst_vp8_enc->n_ts_rate_decimator; i++) { - GValue v = { 0, }; - - g_value_init (&v, G_TYPE_INT); - g_value_set_int (&v, gst_vp8_enc->cfg.ts_rate_decimator[i]); - g_value_array_append (va, &v); - g_value_unset (&v); - } - g_value_set_boxed (value, va); - g_value_array_free (va); - } - break; - } - case PROP_TS_PERIODICITY: - g_value_set_int (value, gst_vp8_enc->cfg.ts_periodicity); - break; - case PROP_TS_LAYER_ID:{ - GValueArray *va; - - if (gst_vp8_enc->n_ts_layer_id == 0) { - g_value_set_boxed (value, NULL); - } else { - gint i; - - va = g_value_array_new (gst_vp8_enc->n_ts_layer_id); - for (i = 0; i < gst_vp8_enc->n_ts_layer_id; i++) { - GValue v = { 0, }; - - g_value_init (&v, G_TYPE_INT); - g_value_set_int (&v, gst_vp8_enc->cfg.ts_layer_id[i]); - g_value_array_append (va, &v); - g_value_unset (&v); - } - g_value_set_boxed (value, va); - g_value_array_free (va); - } - break; - } - case PROP_ERROR_RESILIENT: - g_value_set_flags (value, gst_vp8_enc->cfg.g_error_resilient); - break; - case PROP_LAG_IN_FRAMES: - g_value_set_int (value, gst_vp8_enc->cfg.g_lag_in_frames); - break; - case PROP_THREADS: - g_value_set_int (value, gst_vp8_enc->cfg.g_threads); - break; - case PROP_DEADLINE: - g_value_set_int64 (value, gst_vp8_enc->deadline); - break; - case PROP_H_SCALING_MODE: - g_value_set_enum (value, gst_vp8_enc->h_scaling_mode); - break; - case PROP_V_SCALING_MODE: - g_value_set_enum (value, gst_vp8_enc->v_scaling_mode); - break; - case PROP_CPU_USED: - g_value_set_int (value, gst_vp8_enc->cpu_used); - break; - case PROP_ENABLE_AUTO_ALT_REF: - g_value_set_boolean (value, gst_vp8_enc->enable_auto_alt_ref); - break; - case PROP_NOISE_SENSITIVITY: - g_value_set_int (value, gst_vp8_enc->noise_sensitivity); - break; - case PROP_SHARPNESS: - g_value_set_int (value, gst_vp8_enc->sharpness); - break; - case PROP_STATIC_THRESHOLD: - g_value_set_int (value, gst_vp8_enc->static_threshold); - break; - case PROP_TOKEN_PARTITIONS: - g_value_set_enum (value, gst_vp8_enc->token_partitions); - break; - case PROP_ARNR_MAXFRAMES: - g_value_set_int (value, gst_vp8_enc->arnr_maxframes); - break; - case PROP_ARNR_STRENGTH: - g_value_set_int (value, gst_vp8_enc->arnr_strength); - break; - case PROP_ARNR_TYPE: - g_value_set_int (value, gst_vp8_enc->arnr_type); - break; - case PROP_TUNING: - g_value_set_enum (value, gst_vp8_enc->tuning); - break; - case PROP_CQ_LEVEL: - g_value_set_int (value, gst_vp8_enc->cq_level); - break; - case PROP_MAX_INTRA_BITRATE_PCT: - g_value_set_int (value, gst_vp8_enc->max_intra_bitrate_pct); - break; - case PROP_TIMEBASE: - gst_value_set_fraction (value, gst_vp8_enc->timebase_n, - gst_vp8_enc->timebase_d); - break; - default: - G_OBJECT_WARN_INVALID_PROPERTY_ID (object, prop_id, pspec); - break; - } - - g_mutex_unlock (&gst_vp8_enc->encoder_lock); + return &vpx_codec_vp8_cx_algo; } static gboolean -gst_vp8_enc_start (GstVideoEncoder * video_encoder) +gst_vp8_enc_enable_scaling (GstVPXEnc * enc) { - GstVP8Enc *encoder = GST_VP8_ENC (video_encoder); - - GST_DEBUG_OBJECT (video_encoder, "start"); - - if (!encoder->have_default_config) { - GST_ELEMENT_ERROR (encoder, LIBRARY, INIT, - ("Failed to get default encoder configuration"), (NULL)); - return FALSE; - } - return TRUE; } static void -gst_vp8_enc_destroy_encoder (GstVP8Enc * encoder) -{ - g_mutex_lock (&encoder->encoder_lock); - if (encoder->inited) { - vpx_codec_destroy (&encoder->encoder); - encoder->inited = FALSE; - } - - if (encoder->first_pass_cache_content) { - g_byte_array_free (encoder->first_pass_cache_content, TRUE); - encoder->first_pass_cache_content = NULL; - } - - if (encoder->cfg.rc_twopass_stats_in.buf) { - g_free (encoder->cfg.rc_twopass_stats_in.buf); - encoder->cfg.rc_twopass_stats_in.buf = NULL; - encoder->cfg.rc_twopass_stats_in.sz = 0; - } - g_mutex_unlock (&encoder->encoder_lock); -} - -static gboolean -gst_vp8_enc_stop (GstVideoEncoder * video_encoder) +gst_vp8_enc_set_image_format (GstVPXEnc * enc, vpx_image_t * image) { - GstVP8Enc *encoder; - - GST_DEBUG_OBJECT (video_encoder, "stop"); - - encoder = GST_VP8_ENC (video_encoder); - - gst_vp8_enc_destroy_encoder (encoder); - - gst_tag_setter_reset_tags (GST_TAG_SETTER (encoder)); - - g_free (encoder->multipass_cache_file); - encoder->multipass_cache_file = NULL; - encoder->multipass_cache_idx = 0; - - return TRUE; -} - -static gint -gst_vp8_enc_get_downstream_profile (GstVP8Enc * encoder) -{ - GstCaps *allowed; - GstStructure *s; - gint profile = DEFAULT_PROFILE; - - allowed = gst_pad_get_allowed_caps (GST_VIDEO_ENCODER_SRC_PAD (encoder)); - if (allowed) { - allowed = gst_caps_truncate (allowed); - s = gst_caps_get_structure (allowed, 0); - if (gst_structure_has_field (s, "profile")) { - const GValue *v = gst_structure_get_value (s, "profile"); - const gchar *profile_str = NULL; - - if (GST_VALUE_HOLDS_LIST (v) && gst_value_list_get_size (v) > 0) { - profile_str = g_value_get_string (gst_value_list_get_value (v, 0)); - } else if (G_VALUE_HOLDS_STRING (v)) { - profile_str = g_value_get_string (v); - } - - if (profile_str) { - gchar *endptr = NULL; - - profile = g_ascii_strtoull (profile_str, &endptr, 10); - if (*endptr != '\0' || profile < 0 || profile > 3) { - GST_ERROR_OBJECT (encoder, "Invalid profile '%s'", profile_str); - profile = DEFAULT_PROFILE; - } - } - } - gst_caps_unref (allowed); - } - - GST_DEBUG_OBJECT (encoder, "Using profile %d", profile); - - return profile; -} - -static gboolean -gst_vp8_enc_set_format (GstVideoEncoder * video_encoder, - GstVideoCodecState * state) -{ - GstVP8Enc *encoder; - vpx_codec_err_t status; - vpx_image_t *image; - guint8 *data = NULL; - GstCaps *caps; - gboolean ret = TRUE; - GstVideoInfo *info = &state->info; - GstVideoCodecState *output_state; - gchar *profile_str; - GstClockTime latency; - - encoder = GST_VP8_ENC (video_encoder); - GST_DEBUG_OBJECT (video_encoder, "set_format"); - - if (encoder->inited) { - gst_vp8_enc_drain (video_encoder); - g_mutex_lock (&encoder->encoder_lock); - vpx_codec_destroy (&encoder->encoder); - encoder->inited = FALSE; - encoder->multipass_cache_idx++; - } else { - g_mutex_lock (&encoder->encoder_lock); - } - - encoder->cfg.g_profile = gst_vp8_enc_get_downstream_profile (encoder); - - /* Scale default bitrate to our size */ - if (!encoder->rc_target_bitrate_set) - encoder->cfg.rc_target_bitrate = - gst_util_uint64_scale (DEFAULT_RC_TARGET_BITRATE, - GST_VIDEO_INFO_WIDTH (info) * GST_VIDEO_INFO_HEIGHT (info), - 320 * 240 * 1000); - - encoder->cfg.g_w = GST_VIDEO_INFO_WIDTH (info); - encoder->cfg.g_h = GST_VIDEO_INFO_HEIGHT (info); - - if (encoder->timebase_n != 0 && encoder->timebase_d != 0) { - GST_DEBUG_OBJECT (video_encoder, "Using timebase configuration"); - encoder->cfg.g_timebase.num = encoder->timebase_n; - encoder->cfg.g_timebase.den = encoder->timebase_d; - } else { - /* Zero framerate and max-framerate but still need to setup the timebase to avoid - * a divide by zero error. Presuming the lowest common denominator will be RTP - - * VP8 payload draft states clock rate of 90000 which should work for anyone where - * FPS < 90000 (shouldn't be too many cases where it's higher) though wouldn't be optimal. RTP specification - * http://tools.ietf.org/html/draft-ietf-payload-vp8-01 section 6.3.1 */ - encoder->cfg.g_timebase.num = 1; - encoder->cfg.g_timebase.den = 90000; - } - - if (encoder->cfg.g_pass == VPX_RC_FIRST_PASS || - encoder->cfg.g_pass == VPX_RC_LAST_PASS) { - if (!encoder->multipass_cache_prefix) { - GST_ELEMENT_ERROR (encoder, RESOURCE, OPEN_READ, - ("No multipass cache file provided"), (NULL)); - g_mutex_unlock (&encoder->encoder_lock); - return FALSE; - } - - g_free (encoder->multipass_cache_file); - - if (encoder->multipass_cache_idx > 0) - encoder->multipass_cache_file = g_strdup_printf ("%s.%u", - encoder->multipass_cache_prefix, encoder->multipass_cache_idx); - else - encoder->multipass_cache_file = - g_strdup (encoder->multipass_cache_prefix); - } - - if (encoder->cfg.g_pass == VPX_RC_FIRST_PASS) { - if (encoder->first_pass_cache_content != NULL) - g_byte_array_free (encoder->first_pass_cache_content, TRUE); - - encoder->first_pass_cache_content = g_byte_array_sized_new (4096); - - } else if (encoder->cfg.g_pass == VPX_RC_LAST_PASS) { - GError *err = NULL; - - if (encoder->cfg.rc_twopass_stats_in.buf != NULL) { - g_free (encoder->cfg.rc_twopass_stats_in.buf); - encoder->cfg.rc_twopass_stats_in.buf = NULL; - encoder->cfg.rc_twopass_stats_in.sz = 0; - } - - if (!g_file_get_contents (encoder->multipass_cache_file, - (gchar **) & encoder->cfg.rc_twopass_stats_in.buf, - &encoder->cfg.rc_twopass_stats_in.sz, &err)) { - GST_ELEMENT_ERROR (encoder, RESOURCE, OPEN_READ, - ("Failed to read multipass cache file provided"), ("%s", - err->message)); - g_error_free (err); - g_mutex_unlock (&encoder->encoder_lock); - return FALSE; - } - } - - status = vpx_codec_enc_init (&encoder->encoder, &vpx_codec_vp8_cx_algo, - &encoder->cfg, 0); - if (status != VPX_CODEC_OK) { - GST_ELEMENT_ERROR (encoder, LIBRARY, INIT, - ("Failed to initialize encoder"), ("%s", gst_vpx_error_name (status))); - g_mutex_unlock (&encoder->encoder_lock); - return FALSE; - } - - { - vpx_scaling_mode_t sm; - - sm.h_scaling_mode = encoder->h_scaling_mode; - sm.v_scaling_mode = encoder->v_scaling_mode; - - status = vpx_codec_control (&encoder->encoder, VP8E_SET_SCALEMODE, &sm); - if (status != VPX_CODEC_OK) { - GST_WARNING_OBJECT (encoder, "Failed to set VP8E_SET_SCALEMODE: %s", - gst_vpx_error_name (status)); - } - } - - status = - vpx_codec_control (&encoder->encoder, VP8E_SET_CPUUSED, - encoder->cpu_used); - if (status != VPX_CODEC_OK) { - GST_WARNING_OBJECT (encoder, "Failed to set VP8E_SET_CPUUSED: %s", - gst_vpx_error_name (status)); - } - - status = - vpx_codec_control (&encoder->encoder, VP8E_SET_ENABLEAUTOALTREF, - (encoder->enable_auto_alt_ref ? 1 : 0)); - if (status != VPX_CODEC_OK) { - GST_WARNING_OBJECT (encoder, - "Failed to set VP8E_SET_ENABLEAUTOALTREF: %s", - gst_vpx_error_name (status)); - } - status = vpx_codec_control (&encoder->encoder, VP8E_SET_NOISE_SENSITIVITY, - encoder->noise_sensitivity); - if (status != VPX_CODEC_OK) { - GST_WARNING_OBJECT (encoder, - "Failed to set VP8E_SET_NOISE_SENSITIVITY: %s", - gst_vpx_error_name (status)); - } - status = vpx_codec_control (&encoder->encoder, VP8E_SET_SHARPNESS, - encoder->sharpness); - if (status != VPX_CODEC_OK) { - GST_WARNING_OBJECT (encoder, - "Failed to set VP8E_SET_SHARPNESS: %s", gst_vpx_error_name (status)); - } - status = vpx_codec_control (&encoder->encoder, VP8E_SET_STATIC_THRESHOLD, - encoder->static_threshold); - if (status != VPX_CODEC_OK) { - GST_WARNING_OBJECT (encoder, - "Failed to set VP8E_SET_STATIC_THRESHOLD: %s", - gst_vpx_error_name (status)); - } - status = vpx_codec_control (&encoder->encoder, VP8E_SET_TOKEN_PARTITIONS, - encoder->token_partitions); - if (status != VPX_CODEC_OK) { - GST_WARNING_OBJECT (encoder, - "Failed to set VP8E_SET_TOKEN_PARTIONS: %s", - gst_vpx_error_name (status)); - } - status = vpx_codec_control (&encoder->encoder, VP8E_SET_ARNR_MAXFRAMES, - encoder->arnr_maxframes); - if (status != VPX_CODEC_OK) { - GST_WARNING_OBJECT (encoder, - "Failed to set VP8E_SET_ARNR_MAXFRAMES: %s", - gst_vpx_error_name (status)); - } - status = vpx_codec_control (&encoder->encoder, VP8E_SET_ARNR_STRENGTH, - encoder->arnr_strength); - if (status != VPX_CODEC_OK) { - GST_WARNING_OBJECT (encoder, - "Failed to set VP8E_SET_ARNR_STRENGTH: %s", - gst_vpx_error_name (status)); - } - status = vpx_codec_control (&encoder->encoder, VP8E_SET_TUNING, - encoder->tuning); - if (status != VPX_CODEC_OK) { - GST_WARNING_OBJECT (encoder, - "Failed to set VP8E_SET_TUNING: %s", gst_vpx_error_name (status)); - } - status = vpx_codec_control (&encoder->encoder, VP8E_SET_CQ_LEVEL, - encoder->cq_level); - if (status != VPX_CODEC_OK) { - GST_WARNING_OBJECT (encoder, - "Failed to set VP8E_SET_CQ_LEVEL: %s", gst_vpx_error_name (status)); - } - status = vpx_codec_control (&encoder->encoder, VP8E_SET_MAX_INTRA_BITRATE_PCT, - encoder->max_intra_bitrate_pct); - if (status != VPX_CODEC_OK) { - GST_WARNING_OBJECT (encoder, - "Failed to set VP8E_SET_MAX_INTRA_BITRATE_PCT: %s", - gst_vpx_error_name (status)); - } - - if (GST_VIDEO_INFO_FPS_D (info) == 0 || GST_VIDEO_INFO_FPS_N (info) == 0) { - /* FIXME: Assume 25fps for unknown framerates. Better than reporting - * that we introduce no latency while we actually do - */ - latency = gst_util_uint64_scale (encoder->cfg.g_lag_in_frames, - 1 * GST_SECOND, 25); - } else { - latency = gst_util_uint64_scale (encoder->cfg.g_lag_in_frames, - GST_VIDEO_INFO_FPS_D (info) * GST_SECOND, GST_VIDEO_INFO_FPS_N (info)); - } - gst_video_encoder_set_latency (video_encoder, latency, latency); - encoder->inited = TRUE; - - /* Store input state */ - if (encoder->input_state) - gst_video_codec_state_unref (encoder->input_state); - encoder->input_state = gst_video_codec_state_ref (state); - - /* prepare cached image buffer setup */ - image = &encoder->image; - memset (image, 0, sizeof (*image)); - image->fmt = VPX_IMG_FMT_I420; image->bps = 12; image->x_chroma_shift = image->y_chroma_shift = 1; - image->w = image->d_w = GST_VIDEO_INFO_WIDTH (info); - image->h = image->d_h = GST_VIDEO_INFO_HEIGHT (info); - - image->stride[VPX_PLANE_Y] = GST_VIDEO_INFO_COMP_STRIDE (info, 0); - image->stride[VPX_PLANE_U] = GST_VIDEO_INFO_COMP_STRIDE (info, 1); - image->stride[VPX_PLANE_V] = GST_VIDEO_INFO_COMP_STRIDE (info, 2); +} - profile_str = g_strdup_printf ("%d", encoder->cfg.g_profile); +static GstCaps * +gst_vp8_enc_get_new_simple_caps (GstVPXEnc * enc) +{ + GstCaps *caps; + gchar *profile_str = g_strdup_printf ("%d", enc->cfg.g_profile); caps = gst_caps_new_simple ("video/x-vp8", "profile", G_TYPE_STRING, profile_str, NULL); g_free (profile_str); + return caps; +} - { - GstStructure *s; - GstBuffer *stream_hdr, *vorbiscomment; - const GstTagList *iface_tags; - GValue array = { 0, }; - GValue value = { 0, }; - GstMapInfo map; - - s = gst_caps_get_structure (caps, 0); +static void +gst_vp8_enc_set_stream_info (GstVPXEnc * enc, GstCaps * caps, + GstVideoInfo * info) +{ + GstStructure *s; + GstVideoEncoder *video_encoder; + GstBuffer *stream_hdr, *vorbiscomment; + const GstTagList *iface_tags; + GValue array = { 0, }; + GValue value = { 0, }; + guint8 *data = NULL; + GstMapInfo map; + + video_encoder = GST_VIDEO_ENCODER (enc); + s = gst_caps_get_structure (caps, 0); + + /* put buffers in a fixed list */ + g_value_init (&array, GST_TYPE_ARRAY); + g_value_init (&value, GST_TYPE_BUFFER); + + /* Create Ogg stream-info */ + stream_hdr = gst_buffer_new_and_alloc (26); + gst_buffer_map (stream_hdr, &map, GST_MAP_WRITE); + data = map.data; + + GST_WRITE_UINT8 (data, 0x4F); + GST_WRITE_UINT32_BE (data + 1, 0x56503830); /* "VP80" */ + GST_WRITE_UINT8 (data + 5, 0x01); /* stream info header */ + GST_WRITE_UINT8 (data + 6, 1); /* Major version 1 */ + GST_WRITE_UINT8 (data + 7, 0); /* Minor version 0 */ + GST_WRITE_UINT16_BE (data + 8, GST_VIDEO_INFO_WIDTH (info)); + GST_WRITE_UINT16_BE (data + 10, GST_VIDEO_INFO_HEIGHT (info)); + GST_WRITE_UINT24_BE (data + 12, GST_VIDEO_INFO_PAR_N (info)); + GST_WRITE_UINT24_BE (data + 15, GST_VIDEO_INFO_PAR_D (info)); + GST_WRITE_UINT32_BE (data + 18, GST_VIDEO_INFO_FPS_N (info)); + GST_WRITE_UINT32_BE (data + 22, GST_VIDEO_INFO_FPS_D (info)); + + gst_buffer_unmap (stream_hdr, &map); + + GST_BUFFER_FLAG_SET (stream_hdr, GST_BUFFER_FLAG_HEADER); + gst_value_set_buffer (&value, stream_hdr); + gst_value_array_append_value (&array, &value); + g_value_unset (&value); + gst_buffer_unref (stream_hdr); + + iface_tags = gst_tag_setter_get_tag_list (GST_TAG_SETTER (video_encoder)); + if (iface_tags) { + vorbiscomment = + gst_tag_list_to_vorbiscomment_buffer (iface_tags, + (const guint8 *) "OVP80\2 ", 7, + "Encoded with GStreamer vp8enc " PACKAGE_VERSION); + + GST_BUFFER_FLAG_SET (vorbiscomment, GST_BUFFER_FLAG_HEADER); - /* put buffers in a fixed list */ - g_value_init (&array, GST_TYPE_ARRAY); g_value_init (&value, GST_TYPE_BUFFER); - - /* Create Ogg stream-info */ - stream_hdr = gst_buffer_new_and_alloc (26); - gst_buffer_map (stream_hdr, &map, GST_MAP_WRITE); - data = map.data; - - GST_WRITE_UINT8 (data, 0x4F); - GST_WRITE_UINT32_BE (data + 1, 0x56503830); /* "VP80" */ - GST_WRITE_UINT8 (data + 5, 0x01); /* stream info header */ - GST_WRITE_UINT8 (data + 6, 1); /* Major version 1 */ - GST_WRITE_UINT8 (data + 7, 0); /* Minor version 0 */ - GST_WRITE_UINT16_BE (data + 8, GST_VIDEO_INFO_WIDTH (info)); - GST_WRITE_UINT16_BE (data + 10, GST_VIDEO_INFO_HEIGHT (info)); - GST_WRITE_UINT24_BE (data + 12, GST_VIDEO_INFO_PAR_N (info)); - GST_WRITE_UINT24_BE (data + 15, GST_VIDEO_INFO_PAR_D (info)); - GST_WRITE_UINT32_BE (data + 18, GST_VIDEO_INFO_FPS_N (info)); - GST_WRITE_UINT32_BE (data + 22, GST_VIDEO_INFO_FPS_D (info)); - - gst_buffer_unmap (stream_hdr, &map); - - GST_BUFFER_FLAG_SET (stream_hdr, GST_BUFFER_FLAG_HEADER); - gst_value_set_buffer (&value, stream_hdr); + gst_value_set_buffer (&value, vorbiscomment); gst_value_array_append_value (&array, &value); g_value_unset (&value); - gst_buffer_unref (stream_hdr); - - iface_tags = gst_tag_setter_get_tag_list (GST_TAG_SETTER (video_encoder)); - if (iface_tags) { - vorbiscomment = - gst_tag_list_to_vorbiscomment_buffer (iface_tags, - (const guint8 *) "OVP80\2 ", 7, - "Encoded with GStreamer vp8enc " PACKAGE_VERSION); - - GST_BUFFER_FLAG_SET (vorbiscomment, GST_BUFFER_FLAG_HEADER); - - g_value_init (&value, GST_TYPE_BUFFER); - gst_value_set_buffer (&value, vorbiscomment); - gst_value_array_append_value (&array, &value); - g_value_unset (&value); - gst_buffer_unref (vorbiscomment); - } - - gst_structure_set_value (s, "streamheader", &array); - g_value_unset (&array); + gst_buffer_unref (vorbiscomment); } - g_mutex_unlock (&encoder->encoder_lock); - - output_state = - gst_video_encoder_set_output_state (video_encoder, caps, state); - gst_video_codec_state_unref (output_state); - gst_video_encoder_negotiate (GST_VIDEO_ENCODER (encoder)); + gst_structure_set_value (s, "streamheader", &array); + g_value_unset (&array); - return ret; } -static GstFlowReturn -gst_vp8_enc_process (GstVP8Enc * encoder) +static void * +gst_vp8_enc_process_frame_user_data (GstVPXEnc * enc, + GstVideoCodecFrame * frame) { - vpx_codec_iter_t iter = NULL; - const vpx_codec_cx_pkt_t *pkt; - GstVideoEncoder *video_encoder; GstVP8EncUserData *user_data; - GstVideoCodecFrame *frame; - GstFlowReturn ret = GST_FLOW_OK; - - video_encoder = GST_VIDEO_ENCODER (encoder); - - g_mutex_lock (&encoder->encoder_lock); - pkt = vpx_codec_get_cx_data (&encoder->encoder, &iter); - while (pkt != NULL) { - GstBuffer *buffer; - gboolean invisible; - - GST_DEBUG_OBJECT (encoder, "packet %u type %d", (guint) pkt->data.frame.sz, - pkt->kind); - - if (pkt->kind == VPX_CODEC_STATS_PKT - && encoder->cfg.g_pass == VPX_RC_FIRST_PASS) { - GST_LOG_OBJECT (encoder, "handling STATS packet"); - - g_byte_array_append (encoder->first_pass_cache_content, - pkt->data.twopass_stats.buf, pkt->data.twopass_stats.sz); - - frame = gst_video_encoder_get_oldest_frame (video_encoder); - if (frame != NULL) { - buffer = gst_buffer_new (); - GST_BUFFER_FLAG_SET (buffer, GST_BUFFER_FLAG_LIVE); - frame->output_buffer = buffer; - g_mutex_unlock (&encoder->encoder_lock); - ret = gst_video_encoder_finish_frame (video_encoder, frame); - g_mutex_lock (&encoder->encoder_lock); - } - - pkt = vpx_codec_get_cx_data (&encoder->encoder, &iter); - continue; - } else if (pkt->kind != VPX_CODEC_CX_FRAME_PKT) { - GST_LOG_OBJECT (encoder, "non frame pkt: %d", pkt->kind); - pkt = vpx_codec_get_cx_data (&encoder->encoder, &iter); - continue; - } - - invisible = (pkt->data.frame.flags & VPX_FRAME_IS_INVISIBLE) != 0; - frame = gst_video_encoder_get_oldest_frame (video_encoder); - g_assert (frame != NULL); - if ((pkt->data.frame.flags & VPX_FRAME_IS_KEY) != 0) - GST_VIDEO_CODEC_FRAME_SET_SYNC_POINT (frame); - else - GST_VIDEO_CODEC_FRAME_UNSET_SYNC_POINT (frame); - - user_data = gst_video_codec_frame_get_user_data (frame); - - /* FIXME : It would be nice to avoid the memory copy ... */ - buffer = - gst_buffer_new_wrapped (g_memdup (pkt->data.frame.buf, - pkt->data.frame.sz), pkt->data.frame.sz); - - if (user_data->image) - g_slice_free (vpx_image_t, user_data->image); - user_data->image = NULL; - - if (invisible) { - user_data->invisible = g_list_append (user_data->invisible, buffer); - gst_video_codec_frame_unref (frame); - } else { - frame->output_buffer = buffer; - g_mutex_unlock (&encoder->encoder_lock); - ret = gst_video_encoder_finish_frame (video_encoder, frame); - g_mutex_lock (&encoder->encoder_lock); - } - - pkt = vpx_codec_get_cx_data (&encoder->encoder, &iter); - } - g_mutex_unlock (&encoder->encoder_lock); - - return ret; + user_data = gst_video_codec_frame_get_user_data (frame); + if (user_data->image) + g_slice_free (vpx_image_t, user_data->image); + user_data->image = NULL; + return user_data; } -/* This function should be called holding then stream lock*/ static GstFlowReturn -gst_vp8_enc_drain (GstVideoEncoder * video_encoder) +gst_vp8_enc_handle_invisible_frame_buffer (GstVPXEnc * enc, void *user_data, + GstBuffer * buffer) { - GstVP8Enc *encoder; - int flags = 0; - vpx_codec_err_t status; - gint64 deadline; - vpx_codec_pts_t pts; - - encoder = GST_VP8_ENC (video_encoder); - - g_mutex_lock (&encoder->encoder_lock); - deadline = encoder->deadline; - - pts = - gst_util_uint64_scale (encoder->last_pts, - encoder->cfg.g_timebase.den, - encoder->cfg.g_timebase.num * (GstClockTime) GST_SECOND); - - status = vpx_codec_encode (&encoder->encoder, NULL, pts, 0, flags, deadline); - g_mutex_unlock (&encoder->encoder_lock); - - if (status != 0) { - GST_ERROR_OBJECT (encoder, "encode returned %d %s", status, - gst_vpx_error_name (status)); - return GST_FLOW_ERROR; - } - - /* dispatch remaining frames */ - gst_vp8_enc_process (encoder); - - g_mutex_lock (&encoder->encoder_lock); - if (encoder->cfg.g_pass == VPX_RC_FIRST_PASS && encoder->multipass_cache_file) { - GError *err = NULL; - - if (!g_file_set_contents (encoder->multipass_cache_file, - (const gchar *) encoder->first_pass_cache_content->data, - encoder->first_pass_cache_content->len, &err)) { - GST_ELEMENT_ERROR (encoder, RESOURCE, WRITE, (NULL), - ("Failed to write multipass cache file: %s", err->message)); - g_error_free (err); - } - } - g_mutex_unlock (&encoder->encoder_lock); - + GstVP8EncUserData *vp8_user_data = (GstVP8EncUserData *) user_data; + vp8_user_data->invisible = g_list_append (vp8_user_data->invisible, buffer); return GST_FLOW_OK; } -static gboolean -gst_vp8_enc_flush (GstVideoEncoder * video_encoder) -{ - GstVP8Enc *encoder; - - GST_DEBUG_OBJECT (video_encoder, "flush"); - - encoder = GST_VP8_ENC (video_encoder); - - gst_vp8_enc_destroy_encoder (encoder); - if (encoder->input_state) { - gst_video_codec_state_ref (encoder->input_state); - gst_vp8_enc_set_format (video_encoder, encoder->input_state); - gst_video_codec_state_unref (encoder->input_state); - } - - return TRUE; -} - -static GstFlowReturn -gst_vp8_enc_finish (GstVideoEncoder * video_encoder) -{ - GstVP8Enc *encoder; - GstFlowReturn ret; - - GST_DEBUG_OBJECT (video_encoder, "finish"); - - encoder = GST_VP8_ENC (video_encoder); - - if (encoder->inited) { - ret = gst_vp8_enc_drain (video_encoder); - } else { - ret = GST_FLOW_OK; - } - - return ret; -} - -static vpx_image_t * -gst_vp8_enc_buffer_to_image (GstVP8Enc * enc, GstVideoFrame * frame) -{ - vpx_image_t *image = g_slice_new (vpx_image_t); - - memcpy (image, &enc->image, sizeof (*image)); - - image->planes[VPX_PLANE_Y] = GST_VIDEO_FRAME_COMP_DATA (frame, 0); - image->planes[VPX_PLANE_U] = GST_VIDEO_FRAME_COMP_DATA (frame, 1); - image->planes[VPX_PLANE_V] = GST_VIDEO_FRAME_COMP_DATA (frame, 2); - - image->stride[VPX_PLANE_Y] = GST_VIDEO_FRAME_COMP_STRIDE (frame, 0); - image->stride[VPX_PLANE_U] = GST_VIDEO_FRAME_COMP_STRIDE (frame, 1); - image->stride[VPX_PLANE_V] = GST_VIDEO_FRAME_COMP_STRIDE (frame, 2); - - return image; -} - -static GstFlowReturn -gst_vp8_enc_handle_frame (GstVideoEncoder * video_encoder, - GstVideoCodecFrame * frame) +static void +gst_vp8_enc_set_frame_user_data (GstVPXEnc * enc, GstVideoCodecFrame * frame, + vpx_image_t * image) { - GstVP8Enc *encoder; - vpx_codec_err_t status; - int flags = 0; - vpx_image_t *image; GstVP8EncUserData *user_data; - GstVideoFrame vframe; - vpx_codec_pts_t pts; - unsigned long duration; - - GST_DEBUG_OBJECT (video_encoder, "handle_frame"); - - encoder = GST_VP8_ENC (video_encoder); - - GST_DEBUG_OBJECT (video_encoder, "size %d %d", - GST_VIDEO_INFO_WIDTH (&encoder->input_state->info), - GST_VIDEO_INFO_HEIGHT (&encoder->input_state->info)); - - gst_video_frame_map (&vframe, &encoder->input_state->info, - frame->input_buffer, GST_MAP_READ); - image = gst_vp8_enc_buffer_to_image (encoder, &vframe); - user_data = g_slice_new0 (GstVP8EncUserData); user_data->image = image; gst_video_codec_frame_set_user_data (frame, user_data, (GDestroyNotify) gst_vp8_enc_user_data_free); - - if (GST_VIDEO_CODEC_FRAME_IS_FORCE_KEYFRAME (frame)) { - flags |= VPX_EFLAG_FORCE_KF; - } - - g_mutex_lock (&encoder->encoder_lock); - pts = - gst_util_uint64_scale (frame->pts, - encoder->cfg.g_timebase.den, - encoder->cfg.g_timebase.num * (GstClockTime) GST_SECOND); - encoder->last_pts = frame->pts; - - if (frame->duration != GST_CLOCK_TIME_NONE) { - duration = - gst_util_uint64_scale (frame->duration, encoder->cfg.g_timebase.den, - encoder->cfg.g_timebase.num * (GstClockTime) GST_SECOND); - encoder->last_pts += frame->duration; - } else { - duration = 1; - } - - status = vpx_codec_encode (&encoder->encoder, image, - pts, duration, flags, encoder->deadline); - - g_mutex_unlock (&encoder->encoder_lock); - gst_video_frame_unmap (&vframe); - - if (status != 0) { - GST_ELEMENT_ERROR (encoder, LIBRARY, ENCODE, - ("Failed to encode frame"), ("%s", gst_vpx_error_name (status))); - gst_video_codec_frame_set_user_data (frame, NULL, NULL); - return FALSE; - } - gst_video_codec_frame_unref (frame); - return gst_vp8_enc_process (encoder); + return; } static guint64 @@ -2083,6 +334,7 @@ gst_vp8_enc_pre_push (GstVideoEncoder * video_encoder, GstVideoCodecFrame * frame) { GstVP8Enc *encoder; + GstVPXEnc *vpx_enc; GstBuffer *buf; GstFlowReturn ret = GST_FLOW_OK; GstVP8EncUserData *user_data = gst_video_codec_frame_get_user_data (frame); @@ -2093,8 +345,9 @@ gst_vp8_enc_pre_push (GstVideoEncoder * video_encoder, GST_DEBUG_OBJECT (video_encoder, "pre_push"); encoder = GST_VP8_ENC (video_encoder); + vpx_enc = GST_VPX_ENC (encoder); - info = &encoder->input_state->info; + info = &vpx_enc->input_state->info; g_assert (user_data != NULL); @@ -2166,33 +419,4 @@ done: return ret; } -static gboolean -gst_vp8_enc_sink_event (GstVideoEncoder * benc, GstEvent * event) -{ - GstVP8Enc *enc = GST_VP8_ENC (benc); - - /* FIXME : Move this to base encoder class */ - - if (GST_EVENT_TYPE (event) == GST_EVENT_TAG) { - GstTagList *list; - GstTagSetter *setter = GST_TAG_SETTER (enc); - const GstTagMergeMode mode = gst_tag_setter_get_tag_merge_mode (setter); - - gst_event_parse_tag (event, &list); - gst_tag_setter_merge_tags (setter, list, mode); - } - - /* just peeked, baseclass handles the rest */ - return GST_VIDEO_ENCODER_CLASS (parent_class)->sink_event (benc, event); -} - -static gboolean -gst_vp8_enc_propose_allocation (GstVideoEncoder * encoder, GstQuery * query) -{ - gst_query_add_allocation_meta (query, GST_VIDEO_META_API_TYPE, NULL); - - return GST_VIDEO_ENCODER_CLASS (parent_class)->propose_allocation (encoder, - query); -} - #endif /* HAVE_VP8_ENCODER */ diff --git a/ext/vpx/gstvp8enc.h b/ext/vpx/gstvp8enc.h index 3f04646481d5fb746ef5a7da8c7c621ae097a35f..47319e2791e196c6d5e1225350d978efbbb3c0c1 100644 --- a/ext/vpx/gstvp8enc.h +++ b/ext/vpx/gstvp8enc.h @@ -28,8 +28,7 @@ #ifdef HAVE_VP8_ENCODER -#include <gst/gst.h> -#include <gst/video/gstvideoencoder.h> +#include <gstvpxenc.h> /* FIXME: Undef HAVE_CONFIG_H because vpx_codec.h uses it, * which causes compilation failures */ @@ -37,9 +36,6 @@ #undef HAVE_CONFIG_H #endif -#include <vpx/vpx_encoder.h> -#include <vpx/vp8cx.h> - G_BEGIN_DECLS #define GST_TYPE_VP8_ENC \ @@ -58,61 +54,14 @@ typedef struct _GstVP8EncClass GstVP8EncClass; struct _GstVP8Enc { - GstVideoEncoder base_video_encoder; - - /* < private > */ - vpx_codec_ctx_t encoder; - GMutex encoder_lock; - - /* properties */ - vpx_codec_enc_cfg_t cfg; - gboolean have_default_config; - gboolean rc_target_bitrate_set; - gint n_ts_target_bitrate; - gint n_ts_rate_decimator; - gint n_ts_layer_id; - /* Global two-pass options */ - gchar *multipass_cache_file; - gchar *multipass_cache_prefix; - guint multipass_cache_idx; - GByteArray *first_pass_cache_content; - - /* Encode parameter */ - gint64 deadline; + GstVPXEnc base_vpx_encoder; - /* Controls */ - VPX_SCALING_MODE h_scaling_mode; - VPX_SCALING_MODE v_scaling_mode; - int cpu_used; - gboolean enable_auto_alt_ref; - unsigned int noise_sensitivity; - unsigned int sharpness; - unsigned int static_threshold; - vp8e_token_partitions token_partitions; - unsigned int arnr_maxframes; - unsigned int arnr_strength; - unsigned int arnr_type; - vp8e_tuning tuning; - unsigned int cq_level; - unsigned int max_intra_bitrate_pct; - /* Timebase - a value of 0 will use the framerate */ - unsigned int timebase_n; - unsigned int timebase_d; - - /* state */ - gboolean inited; - - vpx_image_t image; - - GstClockTime last_pts; int keyframe_distance; - - GstVideoCodecState *input_state; }; struct _GstVP8EncClass { - GstVideoEncoderClass base_video_encoder_class; + GstVPXEncClass base_vpxenc_class; }; GType gst_vp8_enc_get_type (void); diff --git a/ext/vpx/gstvp9dec.c b/ext/vpx/gstvp9dec.c index 3de5a641257ac292492c28f0d83f4aa7c4d31db7..d08a2f7e8d1d5445e7df6d4a052c7394d52c7aad 100644 --- a/ext/vpx/gstvp9dec.c +++ b/ext/vpx/gstvp9dec.c @@ -54,63 +54,14 @@ GST_DEBUG_CATEGORY_STATIC (gst_vp9dec_debug); #define GST_CAT_DEFAULT gst_vp9dec_debug -#define DEFAULT_POST_PROCESSING FALSE -#define DEFAULT_POST_PROCESSING_FLAGS (VP8_DEBLOCK | VP8_DEMACROBLOCK) -#define DEFAULT_DEBLOCKING_LEVEL 4 -#define DEFAULT_NOISE_LEVEL 0 -#define DEFAULT_THREADS 1 +#define VP9_DECODER_VIDEO_TAG "VP9 video" -enum -{ - PROP_0, - PROP_POST_PROCESSING, - PROP_POST_PROCESSING_FLAGS, - PROP_DEBLOCKING_LEVEL, - PROP_NOISE_LEVEL, - PROP_THREADS -}; - -#define C_FLAGS(v) ((guint) v) -#define GST_VP9_DEC_TYPE_POST_PROCESSING_FLAGS (gst_vp9_dec_post_processing_flags_get_type()) -static GType -gst_vp9_dec_post_processing_flags_get_type (void) -{ - static const GFlagsValue values[] = { - {C_FLAGS (VP8_DEBLOCK), "Deblock", "deblock"}, - {C_FLAGS (VP8_DEMACROBLOCK), "Demacroblock", "demacroblock"}, - {C_FLAGS (VP8_ADDNOISE), "Add noise", "addnoise"}, - {C_FLAGS (VP8_MFQE), "Multi-frame quality enhancement", "mfqe"}, - {0, NULL, NULL} - }; - static volatile GType id = 0; - - if (g_once_init_enter ((gsize *) & id)) { - GType _id; - - _id = g_flags_register_static ("GstVP9DecPostProcessingFlags", values); - - g_once_init_leave ((gsize *) & id, _id); - } - - return id; -} - -#undef C_FLAGS - -static void gst_vp9_dec_set_property (GObject * object, guint prop_id, - const GValue * value, GParamSpec * pspec); -static void gst_vp9_dec_get_property (GObject * object, guint prop_id, - GValue * value, GParamSpec * pspec); - -static gboolean gst_vp9_dec_start (GstVideoDecoder * decoder); -static gboolean gst_vp9_dec_stop (GstVideoDecoder * decoder); -static gboolean gst_vp9_dec_set_format (GstVideoDecoder * decoder, - GstVideoCodecState * state); -static gboolean gst_vp9_dec_flush (GstVideoDecoder * decoder); -static GstFlowReturn gst_vp9_dec_handle_frame (GstVideoDecoder * decoder, - GstVideoCodecFrame * frame); -static gboolean gst_vp9_dec_decide_allocation (GstVideoDecoder * decoder, - GstQuery * query); +static void gst_vp9_dec_set_stream_info (GstVPXDec * dec, + vpx_codec_stream_info_t * stream_info); +static gboolean gst_vp9_dec_get_valid_format (GstVPXDec * dec, + vpx_image_t * img, GstVideoFormat * fmt); +static void gst_vp9_dec_handle_resolution_change (GstVPXDec * dec, + vpx_image_t * img, GstVideoFormat fmt); static GstStaticPadTemplate gst_vp9_dec_sink_template = GST_STATIC_PAD_TEMPLATE ("sink", @@ -127,49 +78,16 @@ GST_STATIC_PAD_TEMPLATE ("src", ); #define parent_class gst_vp9_dec_parent_class -G_DEFINE_TYPE (GstVP9Dec, gst_vp9_dec, GST_TYPE_VIDEO_DECODER); +G_DEFINE_TYPE (GstVP9Dec, gst_vp9_dec, GST_TYPE_VPX_DEC); static void gst_vp9_dec_class_init (GstVP9DecClass * klass) { - GObjectClass *gobject_class; GstElementClass *element_class; - GstVideoDecoderClass *base_video_decoder_class; + GstVPXDecClass *vpx_class; - gobject_class = G_OBJECT_CLASS (klass); element_class = GST_ELEMENT_CLASS (klass); - base_video_decoder_class = GST_VIDEO_DECODER_CLASS (klass); - - gobject_class->set_property = gst_vp9_dec_set_property; - gobject_class->get_property = gst_vp9_dec_get_property; - - g_object_class_install_property (gobject_class, PROP_POST_PROCESSING, - g_param_spec_boolean ("post-processing", "Post Processing", - "Enable post processing", DEFAULT_POST_PROCESSING, - G_PARAM_READWRITE | G_PARAM_STATIC_STRINGS)); - - g_object_class_install_property (gobject_class, PROP_POST_PROCESSING_FLAGS, - g_param_spec_flags ("post-processing-flags", "Post Processing Flags", - "Flags to control post processing", - GST_VP9_DEC_TYPE_POST_PROCESSING_FLAGS, DEFAULT_POST_PROCESSING_FLAGS, - G_PARAM_READWRITE | G_PARAM_STATIC_STRINGS)); - - g_object_class_install_property (gobject_class, PROP_DEBLOCKING_LEVEL, - g_param_spec_uint ("deblocking-level", "Deblocking Level", - "Deblocking level", - 0, 16, DEFAULT_DEBLOCKING_LEVEL, - G_PARAM_READWRITE | G_PARAM_STATIC_STRINGS)); - - g_object_class_install_property (gobject_class, PROP_NOISE_LEVEL, - g_param_spec_uint ("noise-level", "Noise Level", - "Noise level", - 0, 16, DEFAULT_NOISE_LEVEL, - G_PARAM_READWRITE | G_PARAM_STATIC_STRINGS)); - - g_object_class_install_property (gobject_class, PROP_THREADS, - g_param_spec_uint ("threads", "Max Threads", - "Maximum number of decoding threads", - 1, 16, DEFAULT_THREADS, G_PARAM_READWRITE | G_PARAM_STATIC_STRINGS)); + vpx_class = GST_VPX_DEC_CLASS (klass); gst_element_class_add_pad_template (element_class, gst_static_pad_template_get (&gst_vp9_dec_src_template)); @@ -182,14 +100,13 @@ gst_vp9_dec_class_init (GstVP9DecClass * klass) "Decode VP9 video streams", "David Schleef <ds@entropywave.com>, " "Sebastian Dröge <sebastian.droege@collabora.co.uk>"); - base_video_decoder_class->start = GST_DEBUG_FUNCPTR (gst_vp9_dec_start); - base_video_decoder_class->stop = GST_DEBUG_FUNCPTR (gst_vp9_dec_stop); - base_video_decoder_class->flush = GST_DEBUG_FUNCPTR (gst_vp9_dec_flush); - base_video_decoder_class->set_format = - GST_DEBUG_FUNCPTR (gst_vp9_dec_set_format); - base_video_decoder_class->handle_frame = - GST_DEBUG_FUNCPTR (gst_vp9_dec_handle_frame); - base_video_decoder_class->decide_allocation = gst_vp9_dec_decide_allocation; + vpx_class->video_codec_tag = VP9_DECODER_VIDEO_TAG; + vpx_class->codec_algo = &vpx_codec_vp9_dx_algo; + vpx_class->set_stream_info = GST_DEBUG_FUNCPTR (gst_vp9_dec_set_stream_info); + vpx_class->get_frame_format = + GST_DEBUG_FUNCPTR (gst_vp9_dec_get_valid_format); + vpx_class->handle_resolution_change = + GST_DEBUG_FUNCPTR (gst_vp9_dec_handle_resolution_change); GST_DEBUG_CATEGORY_INIT (gst_vp9dec_debug, "vp9dec", 0, "VP9 Decoder"); } @@ -197,442 +114,67 @@ gst_vp9_dec_class_init (GstVP9DecClass * klass) static void gst_vp9_dec_init (GstVP9Dec * gst_vp9_dec) { - GstVideoDecoder *decoder = (GstVideoDecoder *) gst_vp9_dec; - GST_DEBUG_OBJECT (gst_vp9_dec, "gst_vp9_dec_init"); - gst_video_decoder_set_packetized (decoder, TRUE); - gst_vp9_dec->post_processing = DEFAULT_POST_PROCESSING; - gst_vp9_dec->post_processing_flags = DEFAULT_POST_PROCESSING_FLAGS; - gst_vp9_dec->deblocking_level = DEFAULT_DEBLOCKING_LEVEL; - gst_vp9_dec->noise_level = DEFAULT_NOISE_LEVEL; - - gst_video_decoder_set_needs_format (decoder, TRUE); - gst_video_decoder_set_use_default_pad_acceptcaps (decoder, TRUE); - GST_PAD_SET_ACCEPT_TEMPLATE (GST_VIDEO_DECODER_SINK_PAD (decoder)); -} - -static void -gst_vp9_dec_set_property (GObject * object, guint prop_id, - const GValue * value, GParamSpec * pspec) -{ - GstVP9Dec *dec; - - g_return_if_fail (GST_IS_VP9_DEC (object)); - dec = GST_VP9_DEC (object); - - GST_DEBUG_OBJECT (object, "gst_vp9_dec_set_property"); - switch (prop_id) { - case PROP_POST_PROCESSING: - dec->post_processing = g_value_get_boolean (value); - break; - case PROP_POST_PROCESSING_FLAGS: - dec->post_processing_flags = g_value_get_flags (value); - break; - case PROP_DEBLOCKING_LEVEL: - dec->deblocking_level = g_value_get_uint (value); - break; - case PROP_NOISE_LEVEL: - dec->noise_level = g_value_get_uint (value); - break; - case PROP_THREADS: - dec->threads = g_value_get_uint (value); - break; - default: - G_OBJECT_WARN_INVALID_PROPERTY_ID (object, prop_id, pspec); - break; - } } static void -gst_vp9_dec_get_property (GObject * object, guint prop_id, GValue * value, - GParamSpec * pspec) +gst_vp9_dec_set_stream_info (GstVPXDec * dec, + vpx_codec_stream_info_t * stream_info) { - GstVP9Dec *dec; - - g_return_if_fail (GST_IS_VP9_DEC (object)); - dec = GST_VP9_DEC (object); - - switch (prop_id) { - case PROP_POST_PROCESSING: - g_value_set_boolean (value, dec->post_processing); - break; - case PROP_POST_PROCESSING_FLAGS: - g_value_set_flags (value, dec->post_processing_flags); - break; - case PROP_DEBLOCKING_LEVEL: - g_value_set_uint (value, dec->deblocking_level); - break; - case PROP_NOISE_LEVEL: - g_value_set_uint (value, dec->noise_level); - break; - case PROP_THREADS: - g_value_set_uint (value, dec->threads); - break; - default: - G_OBJECT_WARN_INVALID_PROPERTY_ID (object, prop_id, pspec); - break; - } -} - -static gboolean -gst_vp9_dec_start (GstVideoDecoder * decoder) -{ - GstVP9Dec *gst_vp9_dec = GST_VP9_DEC (decoder); - - GST_DEBUG_OBJECT (gst_vp9_dec, "start"); - gst_vp9_dec->decoder_inited = FALSE; - - return TRUE; -} - -static gboolean -gst_vp9_dec_stop (GstVideoDecoder * base_video_decoder) -{ - GstVP9Dec *gst_vp9_dec = GST_VP9_DEC (base_video_decoder); - - GST_DEBUG_OBJECT (gst_vp9_dec, "stop"); - - if (gst_vp9_dec->output_state) { - gst_video_codec_state_unref (gst_vp9_dec->output_state); - gst_vp9_dec->output_state = NULL; - } - - if (gst_vp9_dec->input_state) { - gst_video_codec_state_unref (gst_vp9_dec->input_state); - gst_vp9_dec->input_state = NULL; - } - - if (gst_vp9_dec->decoder_inited) - vpx_codec_destroy (&gst_vp9_dec->decoder); - gst_vp9_dec->decoder_inited = FALSE; - - return TRUE; + /* FIXME: peek_stream_info() does not return valid values, take input caps */ + stream_info->w = dec->input_state->info.width; + stream_info->h = dec->input_state->info.height; + return; } static gboolean -gst_vp9_dec_set_format (GstVideoDecoder * decoder, GstVideoCodecState * state) +gst_vp9_dec_get_valid_format (GstVPXDec * dec, vpx_image_t * img, + GstVideoFormat * fmt) { - GstVP9Dec *gst_vp9_dec = GST_VP9_DEC (decoder); - - GST_DEBUG_OBJECT (gst_vp9_dec, "set_format"); - - if (gst_vp9_dec->decoder_inited) - vpx_codec_destroy (&gst_vp9_dec->decoder); - gst_vp9_dec->decoder_inited = FALSE; - - if (gst_vp9_dec->output_state) { - gst_video_codec_state_unref (gst_vp9_dec->output_state); - gst_vp9_dec->output_state = NULL; - } - - if (gst_vp9_dec->input_state) - gst_video_codec_state_unref (gst_vp9_dec->input_state); - gst_vp9_dec->input_state = gst_video_codec_state_ref (state); - - return TRUE; -} + switch (img->fmt) { + case VPX_IMG_FMT_I420: + *fmt = GST_VIDEO_FORMAT_I420; + return TRUE; -static gboolean -gst_vp9_dec_flush (GstVideoDecoder * base_video_decoder) -{ - GstVP9Dec *decoder; + case VPX_IMG_FMT_YV12: + *fmt = GST_VIDEO_FORMAT_YV12; + return TRUE; - GST_DEBUG_OBJECT (base_video_decoder, "flush"); + case VPX_IMG_FMT_I422: + *fmt = GST_VIDEO_FORMAT_Y42B; + return TRUE; - decoder = GST_VP9_DEC (base_video_decoder); + case VPX_IMG_FMT_I444: + *fmt = GST_VIDEO_FORMAT_Y444; + return TRUE; - if (decoder->output_state) { - gst_video_codec_state_unref (decoder->output_state); - decoder->output_state = NULL; + default: + return FALSE; } - - if (decoder->decoder_inited) - vpx_codec_destroy (&decoder->decoder); - decoder->decoder_inited = FALSE; - - return TRUE; -} - -static void -gst_vp9_dec_send_tags (GstVP9Dec * dec) -{ - GstTagList *list; - - list = gst_tag_list_new_empty (); - gst_tag_list_add (list, GST_TAG_MERGE_REPLACE, - GST_TAG_VIDEO_CODEC, "VP9 video", NULL); - - gst_pad_push_event (GST_VIDEO_DECODER_SRC_PAD (dec), - gst_event_new_tag (list)); } static void -gst_vp9_dec_image_to_buffer (GstVP9Dec * dec, const vpx_image_t * img, - GstBuffer * buffer) +gst_vp9_dec_handle_resolution_change (GstVPXDec * dec, vpx_image_t * img, + GstVideoFormat fmt) { - int deststride, srcstride, height, width, line, comp; - guint8 *dest, *src; - GstVideoFrame frame; - GstVideoInfo *info = &dec->output_state->info; + GstVPXDecClass *vpxclass = GST_VPX_DEC_GET_CLASS (dec); - if (!gst_video_frame_map (&frame, info, buffer, GST_MAP_WRITE)) { - GST_ERROR_OBJECT (dec, "Could not map video buffer"); - return; - } + if (!dec->output_state || dec->output_state->info.finfo->format != fmt || + dec->output_state->info.width != img->d_w || + dec->output_state->info.height != img->d_h) { + gboolean send_tags = !dec->output_state; - for (comp = 0; comp < 3; comp++) { - dest = GST_VIDEO_FRAME_COMP_DATA (&frame, comp); - src = img->planes[comp]; - width = GST_VIDEO_FRAME_COMP_WIDTH (&frame, comp) - * GST_VIDEO_FRAME_COMP_PSTRIDE (&frame, comp); - height = GST_VIDEO_FRAME_COMP_HEIGHT (&frame, comp); - deststride = GST_VIDEO_FRAME_COMP_STRIDE (&frame, comp); - srcstride = img->stride[comp]; + if (dec->output_state) + gst_video_codec_state_unref (dec->output_state); - if (srcstride == deststride) { - GST_TRACE_OBJECT (dec, "Stride matches. Comp %d: %d, copying full plane", - comp, srcstride); - memcpy (dest, src, srcstride * height); - } else { - GST_TRACE_OBJECT (dec, "Stride mismatch. Comp %d: %d != %d, copying " - "line by line.", comp, srcstride, deststride); - for (line = 0; line < height; line++) { - memcpy (dest, src, width); - dest += deststride; - src += srcstride; - } - } - } - - gst_video_frame_unmap (&frame); -} - -static GstFlowReturn -open_codec (GstVP9Dec * dec, GstVideoCodecFrame * frame) -{ - int flags = 0; - vpx_codec_stream_info_t stream_info; - vpx_codec_caps_t caps; - vpx_codec_dec_cfg_t cfg; - vpx_codec_err_t status; - GstMapInfo minfo; + dec->output_state = + gst_video_decoder_set_output_state (GST_VIDEO_DECODER (dec), + fmt, img->d_w, img->d_h, dec->input_state); + gst_video_decoder_negotiate (GST_VIDEO_DECODER (dec)); - memset (&stream_info, 0, sizeof (stream_info)); - memset (&cfg, 0, sizeof (cfg)); - stream_info.sz = sizeof (stream_info); - - if (!gst_buffer_map (frame->input_buffer, &minfo, GST_MAP_READ)) { - GST_ERROR_OBJECT (dec, "Failed to map input buffer"); - return GST_FLOW_ERROR; - } - - status = vpx_codec_peek_stream_info (&vpx_codec_vp9_dx_algo, - minfo.data, minfo.size, &stream_info); - - gst_buffer_unmap (frame->input_buffer, &minfo); - - if (status != VPX_CODEC_OK) { - GST_WARNING_OBJECT (dec, "VPX preprocessing error: %s", - gst_vpx_error_name (status)); - gst_video_decoder_drop_frame (GST_VIDEO_DECODER (dec), frame); - return GST_FLOW_CUSTOM_SUCCESS_1; - } - if (!stream_info.is_kf) { - GST_WARNING_OBJECT (dec, "No keyframe, skipping"); - gst_video_decoder_drop_frame (GST_VIDEO_DECODER (dec), frame); - return GST_FLOW_CUSTOM_SUCCESS_1; + if (send_tags) + vpxclass->send_tags (dec); } - - /* FIXME: peek_stream_info() does not return valid values, take input caps */ - stream_info.w = dec->input_state->info.width; - stream_info.h = dec->input_state->info.height; - - cfg.w = stream_info.w; - cfg.h = stream_info.h; - cfg.threads = dec->threads; - - caps = vpx_codec_get_caps (&vpx_codec_vp9_dx_algo); - - if (dec->post_processing) { - if (!(caps & VPX_CODEC_CAP_POSTPROC)) { - GST_WARNING_OBJECT (dec, "Decoder does not support post processing"); - } else { - flags |= VPX_CODEC_USE_POSTPROC; - } - } - - status = - vpx_codec_dec_init (&dec->decoder, &vpx_codec_vp9_dx_algo, &cfg, flags); - if (status != VPX_CODEC_OK) { - GST_ELEMENT_ERROR (dec, LIBRARY, INIT, - ("Failed to initialize VP9 decoder"), ("%s", - gst_vpx_error_name (status))); - return GST_FLOW_ERROR; - } - - if ((caps & VPX_CODEC_CAP_POSTPROC) && dec->post_processing) { - vp8_postproc_cfg_t pp_cfg = { 0, }; - - pp_cfg.post_proc_flag = dec->post_processing_flags; - pp_cfg.deblocking_level = dec->deblocking_level; - pp_cfg.noise_level = dec->noise_level; - - status = vpx_codec_control (&dec->decoder, VP8_SET_POSTPROC, &pp_cfg); - if (status != VPX_CODEC_OK) { - GST_WARNING_OBJECT (dec, "Couldn't set postprocessing settings: %s", - gst_vpx_error_name (status)); - } - } - - dec->decoder_inited = TRUE; - - return GST_FLOW_OK; -} - -static GstFlowReturn -gst_vp9_dec_handle_frame (GstVideoDecoder * decoder, GstVideoCodecFrame * frame) -{ - GstVP9Dec *dec; - GstFlowReturn ret = GST_FLOW_OK; - vpx_codec_err_t status; - vpx_codec_iter_t iter = NULL; - vpx_image_t *img; - long decoder_deadline = 0; - GstClockTimeDiff deadline; - GstMapInfo minfo; - - GST_DEBUG_OBJECT (decoder, "handle_frame"); - - dec = GST_VP9_DEC (decoder); - - if (!dec->decoder_inited) { - ret = open_codec (dec, frame); - if (ret == GST_FLOW_CUSTOM_SUCCESS_1) - return GST_FLOW_OK; - else if (ret != GST_FLOW_OK) - return ret; - } - - deadline = gst_video_decoder_get_max_decode_time (decoder, frame); - if (deadline < 0) { - decoder_deadline = 1; - } else if (deadline == G_MAXINT64) { - decoder_deadline = 0; - } else { - decoder_deadline = MAX (1, deadline / GST_MSECOND); - } - - if (!gst_buffer_map (frame->input_buffer, &minfo, GST_MAP_READ)) { - GST_ERROR_OBJECT (dec, "Failed to map input buffer"); - return GST_FLOW_ERROR; - } - - status = vpx_codec_decode (&dec->decoder, - minfo.data, minfo.size, NULL, decoder_deadline); - - gst_buffer_unmap (frame->input_buffer, &minfo); - - if (status) { - GST_VIDEO_DECODER_ERROR (decoder, 1, LIBRARY, ENCODE, - ("Failed to decode frame"), ("%s", gst_vpx_error_name (status)), ret); - return ret; - } - - img = vpx_codec_get_frame (&dec->decoder, &iter); - if (img) { - GstVideoFormat fmt; - - switch (img->fmt) { - case VPX_IMG_FMT_I420: - fmt = GST_VIDEO_FORMAT_I420; - break; - case VPX_IMG_FMT_YV12: - fmt = GST_VIDEO_FORMAT_YV12; - break; - case VPX_IMG_FMT_I422: - fmt = GST_VIDEO_FORMAT_Y42B; - break; - case VPX_IMG_FMT_I444: - fmt = GST_VIDEO_FORMAT_Y444; - break; - default: - vpx_img_free (img); - GST_ELEMENT_ERROR (decoder, LIBRARY, ENCODE, - ("Failed to decode frame"), ("Unsupported color format %d", - img->fmt)); - return GST_FLOW_ERROR; - break; - } - - if (!dec->output_state || dec->output_state->info.finfo->format != fmt || - dec->output_state->info.width != img->d_w || - dec->output_state->info.height != img->d_h) { - gboolean send_tags = !dec->output_state; - - if (dec->output_state) - gst_video_codec_state_unref (dec->output_state); - - dec->output_state = - gst_video_decoder_set_output_state (GST_VIDEO_DECODER (dec), - fmt, img->d_w, img->d_h, dec->input_state); - gst_video_decoder_negotiate (GST_VIDEO_DECODER (dec)); - - if (send_tags) - gst_vp9_dec_send_tags (dec); - } - - if (deadline < 0) { - GST_LOG_OBJECT (dec, "Skipping late frame (%f s past deadline)", - (double) -deadline / GST_SECOND); - gst_video_decoder_drop_frame (decoder, frame); - } else { - ret = gst_video_decoder_allocate_output_frame (decoder, frame); - - if (ret == GST_FLOW_OK) { - gst_vp9_dec_image_to_buffer (dec, img, frame->output_buffer); - ret = gst_video_decoder_finish_frame (decoder, frame); - } else { - gst_video_decoder_drop_frame (decoder, frame); - } - } - - vpx_img_free (img); - - while ((img = vpx_codec_get_frame (&dec->decoder, &iter))) { - GST_WARNING_OBJECT (decoder, "Multiple decoded frames... dropping"); - vpx_img_free (img); - } - } else { - /* Invisible frame */ - GST_VIDEO_CODEC_FRAME_SET_DECODE_ONLY (frame); - gst_video_decoder_finish_frame (decoder, frame); - } - - return ret; -} - -static gboolean -gst_vp9_dec_decide_allocation (GstVideoDecoder * bdec, GstQuery * query) -{ - GstBufferPool *pool; - GstStructure *config; - - if (!GST_VIDEO_DECODER_CLASS (parent_class)->decide_allocation (bdec, query)) - return FALSE; - - g_assert (gst_query_get_n_allocation_pools (query) > 0); - gst_query_parse_nth_allocation_pool (query, 0, &pool, NULL, NULL, NULL); - g_assert (pool != NULL); - - config = gst_buffer_pool_get_config (pool); - if (gst_query_find_allocation_meta (query, GST_VIDEO_META_API_TYPE, NULL)) { - gst_buffer_pool_config_add_option (config, - GST_BUFFER_POOL_OPTION_VIDEO_META); - } - gst_buffer_pool_set_config (pool, config); - gst_object_unref (pool); - - return TRUE; } #endif /* HAVE_VP9_DECODER */ diff --git a/ext/vpx/gstvp9dec.h b/ext/vpx/gstvp9dec.h index 8cd69ba0db0c7f778b626fa42c3f8da64d647c74..41332f3cdff968e395e56ec32da7efdc7cfe509b 100644 --- a/ext/vpx/gstvp9dec.h +++ b/ext/vpx/gstvp9dec.h @@ -31,6 +31,7 @@ #include <gst/gst.h> #include <gst/video/gstvideodecoder.h> +#include <gstvpxdec.h> /* FIXME: Undef HAVE_CONFIG_H because vpx_codec.h uses it, * which causes compilation failures */ @@ -59,28 +60,12 @@ typedef struct _GstVP9DecClass GstVP9DecClass; struct _GstVP9Dec { - GstVideoDecoder base_video_decoder; - - /* < private > */ - vpx_codec_ctx_t decoder; - - /* state */ - gboolean decoder_inited; - - /* properties */ - gboolean post_processing; - enum vp8_postproc_level post_processing_flags; - gint deblocking_level; - gint noise_level; - gint threads; - - GstVideoCodecState *input_state; - GstVideoCodecState *output_state; + GstVPXDec base_vpx_decoder; }; struct _GstVP9DecClass { - GstVideoDecoderClass base_video_decoder_class; + GstVPXDecClass base_vpx_class; }; GType gst_vp9_dec_get_type (void); diff --git a/ext/vpx/gstvp9enc.c b/ext/vpx/gstvp9enc.c index e8e347f3fe10e095c2862efbb4720d8b59ebc7ae..b8256ae8d67025eab9d8ecff93887b2710197ccc 100644 --- a/ext/vpx/gstvp9enc.c +++ b/ext/vpx/gstvp9enc.c @@ -69,291 +69,6 @@ GST_DEBUG_CATEGORY_STATIC (gst_vp9enc_debug); #define GST_CAT_DEFAULT gst_vp9enc_debug -/* From vp9/vp9_cx_iface.c */ -#define DEFAULT_PROFILE 0 - -#define DEFAULT_RC_END_USAGE VPX_VBR -#define DEFAULT_RC_TARGET_BITRATE 256000 -#define DEFAULT_RC_MIN_QUANTIZER 4 -#define DEFAULT_RC_MAX_QUANTIZER 63 - -#define DEFAULT_RC_DROPFRAME_THRESH 0 -#define DEFAULT_RC_RESIZE_ALLOWED 0 -#define DEFAULT_RC_RESIZE_UP_THRESH 30 -#define DEFAULT_RC_RESIZE_DOWN_THRESH 60 -#define DEFAULT_RC_UNDERSHOOT_PCT 100 -#define DEFAULT_RC_OVERSHOOT_PCT 100 -#define DEFAULT_RC_BUF_SZ 6000 -#define DEFAULT_RC_BUF_INITIAL_SZ 4000 -#define DEFAULT_RC_BUF_OPTIMAL_SZ 5000 -#define DEFAULT_RC_2PASS_VBR_BIAS_PCT 50 -#define DEFAULT_RC_2PASS_VBR_MINSECTION_PCT 0 -#define DEFAULT_RC_2PASS_VBR_MAXSECTION_PCT 400 - -#define DEFAULT_KF_MODE VPX_KF_AUTO -#define DEFAULT_KF_MAX_DIST 128 - -#define DEFAULT_MULTIPASS_MODE VPX_RC_ONE_PASS -#define DEFAULT_MULTIPASS_CACHE_FILE "multipass.cache" - -#define DEFAULT_TS_NUMBER_LAYERS 1 -#define DEFAULT_TS_TARGET_BITRATE NULL -#define DEFAULT_TS_RATE_DECIMATOR NULL -#define DEFAULT_TS_PERIODICITY 0 -#define DEFAULT_TS_LAYER_ID NULL - -#define DEFAULT_ERROR_RESILIENT 0 -#define DEFAULT_LAG_IN_FRAMES 0 - -#define DEFAULT_THREADS 0 - -#define DEFAULT_H_SCALING_MODE VP8E_NORMAL -#define DEFAULT_V_SCALING_MODE VP8E_NORMAL -#define DEFAULT_CPU_USED 0 -#define DEFAULT_ENABLE_AUTO_ALT_REF FALSE -#define DEFAULT_DEADLINE VPX_DL_BEST_QUALITY -#define DEFAULT_NOISE_SENSITIVITY 0 -#define DEFAULT_SHARPNESS 0 -#define DEFAULT_STATIC_THRESHOLD 0 -#define DEFAULT_TOKEN_PARTITIONS 0 -#define DEFAULT_ARNR_MAXFRAMES 0 -#define DEFAULT_ARNR_STRENGTH 3 -#define DEFAULT_ARNR_TYPE 3 -#define DEFAULT_TUNING VP8_TUNE_PSNR -#define DEFAULT_CQ_LEVEL 10 -#define DEFAULT_MAX_INTRA_BITRATE_PCT 0 -#define DEFAULT_TIMEBASE_N 0 -#define DEFAULT_TIMEBASE_D 1 - -enum -{ - PROP_0, - PROP_RC_END_USAGE, - PROP_RC_TARGET_BITRATE, - PROP_RC_MIN_QUANTIZER, - PROP_RC_MAX_QUANTIZER, - PROP_RC_DROPFRAME_THRESH, - PROP_RC_RESIZE_ALLOWED, - PROP_RC_RESIZE_UP_THRESH, - PROP_RC_RESIZE_DOWN_THRESH, - PROP_RC_UNDERSHOOT_PCT, - PROP_RC_OVERSHOOT_PCT, - PROP_RC_BUF_SZ, - PROP_RC_BUF_INITIAL_SZ, - PROP_RC_BUF_OPTIMAL_SZ, - PROP_RC_2PASS_VBR_BIAS_PCT, - PROP_RC_2PASS_VBR_MINSECTION_PCT, - PROP_RC_2PASS_VBR_MAXSECTION_PCT, - PROP_KF_MODE, - PROP_KF_MAX_DIST, - PROP_TS_NUMBER_LAYERS, - PROP_TS_TARGET_BITRATE, - PROP_TS_RATE_DECIMATOR, - PROP_TS_PERIODICITY, - PROP_TS_LAYER_ID, - PROP_MULTIPASS_MODE, - PROP_MULTIPASS_CACHE_FILE, - PROP_ERROR_RESILIENT, - PROP_LAG_IN_FRAMES, - PROP_THREADS, - PROP_DEADLINE, - PROP_H_SCALING_MODE, - PROP_V_SCALING_MODE, - PROP_CPU_USED, - PROP_ENABLE_AUTO_ALT_REF, - PROP_NOISE_SENSITIVITY, - PROP_SHARPNESS, - PROP_STATIC_THRESHOLD, - PROP_TOKEN_PARTITIONS, - PROP_ARNR_MAXFRAMES, - PROP_ARNR_STRENGTH, - PROP_ARNR_TYPE, - PROP_TUNING, - PROP_CQ_LEVEL, - PROP_MAX_INTRA_BITRATE_PCT, - PROP_TIMEBASE -}; - -#define GST_VP9_ENC_END_USAGE_TYPE (gst_vp9_enc_end_usage_get_type()) -static GType -gst_vp9_enc_end_usage_get_type (void) -{ - static const GEnumValue values[] = { - {VPX_VBR, "Variable Bit Rate (VBR) mode", "vbr"}, - {VPX_CBR, "Constant Bit Rate (CBR) mode", "cbr"}, - {VPX_CQ, "Constant Quality Mode (CQ) mode", "cq"}, - {0, NULL, NULL} - }; - static volatile GType id = 0; - - if (g_once_init_enter ((gsize *) & id)) { - GType _id; - - _id = g_enum_register_static ("GstVP9EncEndUsage", values); - - g_once_init_leave ((gsize *) & id, _id); - } - - return id; -} - -#define GST_VP9_ENC_MULTIPASS_MODE_TYPE (gst_vp9_enc_multipass_mode_get_type()) -static GType -gst_vp9_enc_multipass_mode_get_type (void) -{ - static const GEnumValue values[] = { - {VPX_RC_ONE_PASS, "One pass encoding (default)", "one-pass"}, - {VPX_RC_FIRST_PASS, "First pass of multipass encoding", "first-pass"}, - {VPX_RC_LAST_PASS, "Last pass of multipass encoding", "last-pass"}, - {0, NULL, NULL} - }; - static volatile GType id = 0; - - if (g_once_init_enter ((gsize *) & id)) { - GType _id; - - _id = g_enum_register_static ("GstVP9EncMultipassMode", values); - - g_once_init_leave ((gsize *) & id, _id); - } - - return id; -} - -#define GST_VP9_ENC_KF_MODE_TYPE (gst_vp9_enc_kf_mode_get_type()) -static GType -gst_vp9_enc_kf_mode_get_type (void) -{ - static const GEnumValue values[] = { - {VPX_KF_AUTO, "Determine optimal placement automatically", "auto"}, - {VPX_KF_DISABLED, "Don't automatically place keyframes", "disabled"}, - {0, NULL, NULL} - }; - static volatile GType id = 0; - - if (g_once_init_enter ((gsize *) & id)) { - GType _id; - - _id = g_enum_register_static ("GstVP9EncKfMode", values); - - g_once_init_leave ((gsize *) & id, _id); - } - - return id; -} - -#define GST_VP9_ENC_TUNING_TYPE (gst_vp9_enc_tuning_get_type()) -static GType -gst_vp9_enc_tuning_get_type (void) -{ - static const GEnumValue values[] = { - {VP8_TUNE_PSNR, "Tune for PSNR", "psnr"}, - {VP8_TUNE_SSIM, "Tune for SSIM", "ssim"}, - {0, NULL, NULL} - }; - static volatile GType id = 0; - - if (g_once_init_enter ((gsize *) & id)) { - GType _id; - - _id = g_enum_register_static ("GstVP9EncTuning", values); - - g_once_init_leave ((gsize *) & id, _id); - } - - return id; -} - -#define GST_VP9_ENC_SCALING_MODE_TYPE (gst_vp9_enc_scaling_mode_get_type()) -static GType -gst_vp9_enc_scaling_mode_get_type (void) -{ - static const GEnumValue values[] = { - {VP8E_NORMAL, "Normal", "normal"}, - {VP8E_FOURFIVE, "4:5", "4:5"}, - {VP8E_THREEFIVE, "3:5", "3:5"}, - {VP8E_ONETWO, "1:2", "1:2"}, - {0, NULL, NULL} - }; - static volatile GType id = 0; - - if (g_once_init_enter ((gsize *) & id)) { - GType _id; - - _id = g_enum_register_static ("GstVP9EncScalingMode", values); - - g_once_init_leave ((gsize *) & id, _id); - } - - return id; -} - -#define GST_VP9_ENC_TOKEN_PARTITIONS_TYPE (gst_vp9_enc_token_partitions_get_type()) -static GType -gst_vp9_enc_token_partitions_get_type (void) -{ - static const GEnumValue values[] = { - {VP8_ONE_TOKENPARTITION, "One token partition", "1"}, - {VP8_TWO_TOKENPARTITION, "Two token partitions", "2"}, - {VP8_FOUR_TOKENPARTITION, "Four token partitions", "4"}, - {VP8_EIGHT_TOKENPARTITION, "Eight token partitions", "8"}, - {0, NULL, NULL} - }; - static volatile GType id = 0; - - if (g_once_init_enter ((gsize *) & id)) { - GType _id; - - _id = g_enum_register_static ("GstVP9EncTokenPartitions", values); - - g_once_init_leave ((gsize *) & id, _id); - } - - return id; -} - -#define GST_VP9_ENC_ER_FLAGS_TYPE (gst_vp9_enc_er_flags_get_type()) -static GType -gst_vp9_enc_er_flags_get_type (void) -{ - static const GFlagsValue values[] = { - {VPX_ERROR_RESILIENT_DEFAULT, "Default error resilience", "default"}, - {VPX_ERROR_RESILIENT_PARTITIONS, - "Allow partitions to be decoded independently", "partitions"}, - {0, NULL, NULL} - }; - static volatile GType id = 0; - - if (g_once_init_enter ((gsize *) & id)) { - GType _id; - - _id = g_flags_register_static ("GstVP9EncErFlags", values); - - g_once_init_leave ((gsize *) & id, _id); - } - - return id; -} - -static void gst_vp9_enc_finalize (GObject * object); -static void gst_vp9_enc_set_property (GObject * object, guint prop_id, - const GValue * value, GParamSpec * pspec); -static void gst_vp9_enc_get_property (GObject * object, guint prop_id, - GValue * value, GParamSpec * pspec); - -static gboolean gst_vp9_enc_start (GstVideoEncoder * encoder); -static gboolean gst_vp9_enc_stop (GstVideoEncoder * encoder); -static gboolean gst_vp9_enc_set_format (GstVideoEncoder * - video_encoder, GstVideoCodecState * state); -static GstFlowReturn gst_vp9_enc_finish (GstVideoEncoder * video_encoder); -static gboolean gst_vp9_enc_flush (GstVideoEncoder * video_encoder); -static GstFlowReturn gst_vp9_enc_drain (GstVideoEncoder * video_encoder); -static GstFlowReturn gst_vp9_enc_handle_frame (GstVideoEncoder * - video_encoder, GstVideoCodecFrame * frame); -static gboolean gst_vp9_enc_sink_event (GstVideoEncoder * - video_encoder, GstEvent * event); -static gboolean gst_vp9_enc_propose_allocation (GstVideoEncoder * encoder, - GstQuery * query); /* FIXME: Y42B and Y444 do not work yet it seems */ static GstStaticPadTemplate gst_vp9_enc_sink_template = @@ -372,24 +87,29 @@ GST_STATIC_PAD_TEMPLATE ("src", ); #define parent_class gst_vp9_enc_parent_class -G_DEFINE_TYPE_WITH_CODE (GstVP9Enc, gst_vp9_enc, GST_TYPE_VIDEO_ENCODER, - G_IMPLEMENT_INTERFACE (GST_TYPE_TAG_SETTER, NULL); - G_IMPLEMENT_INTERFACE (GST_TYPE_PRESET, NULL);); +G_DEFINE_TYPE (GstVP9Enc, gst_vp9_enc, GST_TYPE_VPX_ENC); + +static vpx_codec_iface_t *gst_vp9_enc_get_algo (GstVPXEnc * enc); +static gboolean gst_vp9_enc_enable_scaling (GstVPXEnc * enc); +static void gst_vp9_enc_set_image_format (GstVPXEnc * enc, vpx_image_t * image); +static GstCaps *gst_vp9_enc_get_new_simple_caps (GstVPXEnc * enc); +static void gst_vp9_enc_set_stream_info (GstVPXEnc * enc, GstCaps * caps, + GstVideoInfo * info); +static void *gst_vp9_enc_process_frame_user_data (GstVPXEnc * enc, + GstVideoCodecFrame * frame); +static GstFlowReturn gst_vp9_enc_handle_invisible_frame_buffer (GstVPXEnc * enc, + void *user_data, GstBuffer * buffer); +static void gst_vp9_enc_set_frame_user_data (GstVPXEnc * enc, + GstVideoCodecFrame * frame, vpx_image_t * image); static void gst_vp9_enc_class_init (GstVP9EncClass * klass) { - GObjectClass *gobject_class; GstElementClass *element_class; - GstVideoEncoderClass *video_encoder_class; + GstVPXEncClass *vpx_encoder_class; - gobject_class = G_OBJECT_CLASS (klass); element_class = GST_ELEMENT_CLASS (klass); - video_encoder_class = GST_VIDEO_ENCODER_CLASS (klass); - - gobject_class->set_property = gst_vp9_enc_set_property; - gobject_class->get_property = gst_vp9_enc_get_property; - gobject_class->finalize = gst_vp9_enc_finalize; + vpx_encoder_class = GST_VPX_ENC_CLASS (klass); gst_element_class_add_pad_template (element_class, gst_static_pad_template_get (&gst_vp9_enc_src_template)); @@ -402,292 +122,16 @@ gst_vp9_enc_class_init (GstVP9EncClass * klass) "Encode VP9 video streams", "David Schleef <ds@entropywave.com>, " "Sebastian Dröge <sebastian.droege@collabora.co.uk>"); - video_encoder_class->start = gst_vp9_enc_start; - video_encoder_class->stop = gst_vp9_enc_stop; - video_encoder_class->handle_frame = gst_vp9_enc_handle_frame; - video_encoder_class->set_format = gst_vp9_enc_set_format; - video_encoder_class->flush = gst_vp9_enc_flush; - video_encoder_class->finish = gst_vp9_enc_finish; - video_encoder_class->sink_event = gst_vp9_enc_sink_event; - video_encoder_class->propose_allocation = gst_vp9_enc_propose_allocation; - - g_object_class_install_property (gobject_class, PROP_RC_END_USAGE, - g_param_spec_enum ("end-usage", "Rate control mode", - "Rate control mode", - GST_VP9_ENC_END_USAGE_TYPE, DEFAULT_RC_END_USAGE, - (GParamFlags) (G_PARAM_READWRITE | G_PARAM_STATIC_STRINGS))); - - g_object_class_install_property (gobject_class, PROP_RC_TARGET_BITRATE, - g_param_spec_int ("target-bitrate", "Target bitrate", - "Target bitrate (in bits/sec)", - 0, G_MAXINT, DEFAULT_RC_TARGET_BITRATE, - (GParamFlags) (G_PARAM_READWRITE | G_PARAM_STATIC_STRINGS))); - - g_object_class_install_property (gobject_class, PROP_RC_MIN_QUANTIZER, - g_param_spec_int ("min-quantizer", "Minimum Quantizer", - "Minimum Quantizer (best)", - 0, 63, DEFAULT_RC_MIN_QUANTIZER, - (GParamFlags) (G_PARAM_READWRITE | G_PARAM_STATIC_STRINGS))); - - g_object_class_install_property (gobject_class, PROP_RC_MAX_QUANTIZER, - g_param_spec_int ("max-quantizer", "Maximum Quantizer", - "Maximum Quantizer (worst)", - 0, 63, DEFAULT_RC_MAX_QUANTIZER, - (GParamFlags) (G_PARAM_READWRITE | G_PARAM_STATIC_STRINGS))); - - g_object_class_install_property (gobject_class, PROP_RC_DROPFRAME_THRESH, - g_param_spec_int ("dropframe-threshold", "Drop Frame Threshold", - "Temporal resampling threshold (buf %)", - 0, 100, DEFAULT_RC_DROPFRAME_THRESH, - (GParamFlags) (G_PARAM_READWRITE | G_PARAM_STATIC_STRINGS))); - - g_object_class_install_property (gobject_class, PROP_RC_RESIZE_ALLOWED, - g_param_spec_boolean ("resize-allowed", "Resize Allowed", - "Allow spatial resampling", - DEFAULT_RC_RESIZE_ALLOWED, - (GParamFlags) (G_PARAM_READWRITE | G_PARAM_STATIC_STRINGS))); - - g_object_class_install_property (gobject_class, PROP_RC_RESIZE_UP_THRESH, - g_param_spec_int ("resize-up-threshold", "Resize Up Threshold", - "Upscale threshold (buf %)", - 0, 100, DEFAULT_RC_RESIZE_UP_THRESH, - (GParamFlags) (G_PARAM_READWRITE | G_PARAM_STATIC_STRINGS))); - - g_object_class_install_property (gobject_class, PROP_RC_RESIZE_DOWN_THRESH, - g_param_spec_int ("resize-down-threshold", "Resize Down Threshold", - "Downscale threshold (buf %)", - 0, 100, DEFAULT_RC_RESIZE_DOWN_THRESH, - (GParamFlags) (G_PARAM_READWRITE | G_PARAM_STATIC_STRINGS))); - - g_object_class_install_property (gobject_class, PROP_RC_UNDERSHOOT_PCT, - g_param_spec_int ("undershoot", "Undershoot PCT", - "Datarate undershoot (min) target (%)", - 0, 1000, DEFAULT_RC_UNDERSHOOT_PCT, - (GParamFlags) (G_PARAM_READWRITE | G_PARAM_STATIC_STRINGS))); - - g_object_class_install_property (gobject_class, PROP_RC_OVERSHOOT_PCT, - g_param_spec_int ("overshoot", "Overshoot PCT", - "Datarate overshoot (max) target (%)", - 0, 1000, DEFAULT_RC_OVERSHOOT_PCT, - (GParamFlags) (G_PARAM_READWRITE | G_PARAM_STATIC_STRINGS))); - - g_object_class_install_property (gobject_class, PROP_RC_BUF_SZ, - g_param_spec_int ("buffer-size", "Buffer size", - "Client buffer size (ms)", - 0, G_MAXINT, DEFAULT_RC_BUF_SZ, - (GParamFlags) (G_PARAM_READWRITE | G_PARAM_STATIC_STRINGS))); - - g_object_class_install_property (gobject_class, PROP_RC_BUF_INITIAL_SZ, - g_param_spec_int ("buffer-initial-size", "Buffer initial size", - "Initial client buffer size (ms)", - 0, G_MAXINT, DEFAULT_RC_BUF_INITIAL_SZ, - (GParamFlags) (G_PARAM_READWRITE | G_PARAM_STATIC_STRINGS))); - - g_object_class_install_property (gobject_class, PROP_RC_BUF_OPTIMAL_SZ, - g_param_spec_int ("buffer-optimal-size", "Buffer optimal size", - "Optimal client buffer size (ms)", - 0, G_MAXINT, DEFAULT_RC_BUF_OPTIMAL_SZ, - (GParamFlags) (G_PARAM_READWRITE | G_PARAM_STATIC_STRINGS))); - - g_object_class_install_property (gobject_class, PROP_RC_2PASS_VBR_BIAS_PCT, - g_param_spec_int ("twopass-vbr-bias", "2-pass VBR bias", - "CBR/VBR bias (0=CBR, 100=VBR)", - 0, 100, DEFAULT_RC_2PASS_VBR_BIAS_PCT, - (GParamFlags) (G_PARAM_READWRITE | G_PARAM_STATIC_STRINGS))); - - g_object_class_install_property (gobject_class, - PROP_RC_2PASS_VBR_MINSECTION_PCT, - g_param_spec_int ("twopass-vbr-minsection", "2-pass GOP min bitrate", - "GOP minimum bitrate (% target)", 0, G_MAXINT, - DEFAULT_RC_2PASS_VBR_MINSECTION_PCT, - (GParamFlags) (G_PARAM_READWRITE | G_PARAM_STATIC_STRINGS))); - - g_object_class_install_property (gobject_class, - PROP_RC_2PASS_VBR_MAXSECTION_PCT, - g_param_spec_int ("twopass-vbr-maxsection", "2-pass GOP max bitrate", - "GOP maximum bitrate (% target)", 0, G_MAXINT, - DEFAULT_RC_2PASS_VBR_MINSECTION_PCT, - (GParamFlags) (G_PARAM_READWRITE | G_PARAM_STATIC_STRINGS))); - - g_object_class_install_property (gobject_class, PROP_KF_MODE, - g_param_spec_enum ("keyframe-mode", "Keyframe Mode", - "Keyframe placement", - GST_VP9_ENC_KF_MODE_TYPE, DEFAULT_KF_MODE, - (GParamFlags) (G_PARAM_READWRITE | G_PARAM_STATIC_STRINGS))); - - g_object_class_install_property (gobject_class, PROP_KF_MAX_DIST, - g_param_spec_int ("keyframe-max-dist", "Keyframe max distance", - "Maximum distance between keyframes (number of frames)", - 0, G_MAXINT, DEFAULT_KF_MAX_DIST, - (GParamFlags) (G_PARAM_READWRITE | G_PARAM_STATIC_STRINGS))); - - g_object_class_install_property (gobject_class, PROP_MULTIPASS_MODE, - g_param_spec_enum ("multipass-mode", "Multipass Mode", - "Multipass encode mode", - GST_VP9_ENC_MULTIPASS_MODE_TYPE, DEFAULT_MULTIPASS_MODE, - (GParamFlags) (G_PARAM_READWRITE | G_PARAM_STATIC_STRINGS))); - - g_object_class_install_property (gobject_class, PROP_MULTIPASS_CACHE_FILE, - g_param_spec_string ("multipass-cache-file", "Multipass Cache File", - "Multipass cache file. " - "If stream caps reinited, multiple files will be created: " - "file, file.1, file.2, ... and so on.", - DEFAULT_MULTIPASS_CACHE_FILE, - (GParamFlags) (G_PARAM_READWRITE | G_PARAM_STATIC_STRINGS))); - - g_object_class_install_property (gobject_class, PROP_TS_NUMBER_LAYERS, - g_param_spec_int ("temporal-scalability-number-layers", - "Number of coding layers", "Number of coding layers to use", 1, 5, - DEFAULT_TS_NUMBER_LAYERS, - (GParamFlags) (G_PARAM_READWRITE | G_PARAM_STATIC_STRINGS))); - - g_object_class_install_property (gobject_class, PROP_TS_TARGET_BITRATE, - g_param_spec_value_array ("temporal-scalability-target-bitrate", - "Coding layer target bitrates", - "Target bitrates for coding layers (one per layer, decreasing)", - g_param_spec_int ("target-bitrate", "Target bitrate", - "Target bitrate", 0, G_MAXINT, DEFAULT_RC_TARGET_BITRATE, - G_PARAM_READWRITE | G_PARAM_STATIC_STRINGS), - G_PARAM_READWRITE | G_PARAM_STATIC_STRINGS)); - - g_object_class_install_property (gobject_class, PROP_TS_RATE_DECIMATOR, - g_param_spec_value_array ("temporal-scalability-rate-decimator", - "Coding layer rate decimator", - "Rate decimation factors for each layer", - g_param_spec_int ("rate-decimator", "Rate decimator", - "Rate decimator", 0, 1000000000, 0, - G_PARAM_READWRITE | G_PARAM_STATIC_STRINGS), - G_PARAM_READWRITE | G_PARAM_STATIC_STRINGS)); - - g_object_class_install_property (gobject_class, PROP_TS_PERIODICITY, - g_param_spec_int ("temporal-scalability-periodicity", - "Coding layer periodicity", - "Length of sequence that defines layer membership periodicity", 0, 16, - DEFAULT_TS_PERIODICITY, - (GParamFlags) (G_PARAM_READWRITE | G_PARAM_STATIC_STRINGS))); - - g_object_class_install_property (gobject_class, PROP_TS_LAYER_ID, - g_param_spec_value_array ("temporal-scalability-layer-id", - "Coding layer identification", - "Sequence defining coding layer membership", - g_param_spec_int ("layer-id", "Layer ID", "Layer ID", 0, 4, 0, - G_PARAM_READWRITE | G_PARAM_STATIC_STRINGS), - G_PARAM_READWRITE | G_PARAM_STATIC_STRINGS)); - - g_object_class_install_property (gobject_class, PROP_LAG_IN_FRAMES, - g_param_spec_int ("lag-in-frames", "Lag in frames", - "Maximum number of frames to lag", - 0, 25, DEFAULT_LAG_IN_FRAMES, - (GParamFlags) (G_PARAM_READWRITE | G_PARAM_STATIC_STRINGS))); - - g_object_class_install_property (gobject_class, PROP_ERROR_RESILIENT, - g_param_spec_flags ("error-resilient", "Error resilient", - "Error resilience flags", - GST_VP9_ENC_ER_FLAGS_TYPE, DEFAULT_ERROR_RESILIENT, - (GParamFlags) (G_PARAM_READWRITE | G_PARAM_STATIC_STRINGS))); - - g_object_class_install_property (gobject_class, PROP_THREADS, - g_param_spec_int ("threads", "Threads", - "Number of threads to use", - 0, 64, DEFAULT_THREADS, - (GParamFlags) (G_PARAM_READWRITE | G_PARAM_STATIC_STRINGS))); - - g_object_class_install_property (gobject_class, PROP_DEADLINE, - g_param_spec_int64 ("deadline", "Deadline", - "Deadline per frame (usec, 0=disabled)", - 0, G_MAXINT64, DEFAULT_DEADLINE, - (GParamFlags) (G_PARAM_READWRITE | G_PARAM_STATIC_STRINGS))); - - g_object_class_install_property (gobject_class, PROP_H_SCALING_MODE, - g_param_spec_enum ("horizontal-scaling-mode", "Horizontal scaling mode", - "Horizontal scaling mode", - GST_VP9_ENC_SCALING_MODE_TYPE, DEFAULT_H_SCALING_MODE, - (GParamFlags) (G_PARAM_READWRITE | G_PARAM_STATIC_STRINGS))); - - g_object_class_install_property (gobject_class, PROP_V_SCALING_MODE, - g_param_spec_enum ("vertical-scaling-mode", "Vertical scaling mode", - "Vertical scaling mode", - GST_VP9_ENC_SCALING_MODE_TYPE, DEFAULT_V_SCALING_MODE, - (GParamFlags) (G_PARAM_READWRITE | G_PARAM_STATIC_STRINGS))); - - g_object_class_install_property (gobject_class, PROP_CPU_USED, - g_param_spec_int ("cpu-used", "CPU used", - "CPU used", - -16, 16, DEFAULT_CPU_USED, - (GParamFlags) (G_PARAM_READWRITE | G_PARAM_STATIC_STRINGS))); - - g_object_class_install_property (gobject_class, PROP_ENABLE_AUTO_ALT_REF, - g_param_spec_boolean ("auto-alt-ref", "Auto alt reference frames", - "Automatically generate AltRef frames", - DEFAULT_ENABLE_AUTO_ALT_REF, - (GParamFlags) (G_PARAM_READWRITE | G_PARAM_STATIC_STRINGS))); - - g_object_class_install_property (gobject_class, PROP_NOISE_SENSITIVITY, - g_param_spec_int ("noise-sensitivity", "Noise sensitivity", - "Noise sensisivity (frames to blur)", - 0, 6, DEFAULT_NOISE_SENSITIVITY, - (GParamFlags) (G_PARAM_READWRITE | G_PARAM_STATIC_STRINGS))); - - g_object_class_install_property (gobject_class, PROP_SHARPNESS, - g_param_spec_int ("sharpness", "Sharpness", - "Filter sharpness", - 0, 7, DEFAULT_SHARPNESS, - (GParamFlags) (G_PARAM_READWRITE | G_PARAM_STATIC_STRINGS))); - - g_object_class_install_property (gobject_class, PROP_STATIC_THRESHOLD, - g_param_spec_int ("static-threshold", "Static Threshold", - "Motion detection threshold", - 0, G_MAXINT, DEFAULT_STATIC_THRESHOLD, - (GParamFlags) (G_PARAM_READWRITE | G_PARAM_STATIC_STRINGS))); - - g_object_class_install_property (gobject_class, PROP_TOKEN_PARTITIONS, - g_param_spec_enum ("token-partitions", "Token partitions", - "Number of token partitions", - GST_VP9_ENC_TOKEN_PARTITIONS_TYPE, DEFAULT_TOKEN_PARTITIONS, - (GParamFlags) (G_PARAM_READWRITE | G_PARAM_STATIC_STRINGS))); - - g_object_class_install_property (gobject_class, PROP_ARNR_MAXFRAMES, - g_param_spec_int ("arnr-maxframes", "AltRef max frames", - "AltRef maximum number of frames", - 0, 15, DEFAULT_ARNR_MAXFRAMES, - (GParamFlags) (G_PARAM_READWRITE | G_PARAM_STATIC_STRINGS))); - - g_object_class_install_property (gobject_class, PROP_ARNR_STRENGTH, - g_param_spec_int ("arnr-strength", "AltRef strength", - "AltRef strength", - 0, 6, DEFAULT_ARNR_STRENGTH, - (GParamFlags) (G_PARAM_READWRITE | G_PARAM_STATIC_STRINGS))); - - g_object_class_install_property (gobject_class, PROP_ARNR_TYPE, - g_param_spec_int ("arnr-type", "AltRef type", - "AltRef type", - 1, 3, DEFAULT_ARNR_TYPE, - (GParamFlags) (G_PARAM_READWRITE | G_PARAM_STATIC_STRINGS | - G_PARAM_DEPRECATED))); - - g_object_class_install_property (gobject_class, PROP_TUNING, - g_param_spec_enum ("tuning", "Tuning", - "Tuning", - GST_VP9_ENC_TUNING_TYPE, DEFAULT_TUNING, - (GParamFlags) (G_PARAM_READWRITE | G_PARAM_STATIC_STRINGS))); - - g_object_class_install_property (gobject_class, PROP_CQ_LEVEL, - g_param_spec_int ("cq-level", "Constrained quality level", - "Constrained quality level", - 0, 63, DEFAULT_CQ_LEVEL, - (GParamFlags) (G_PARAM_READWRITE | G_PARAM_STATIC_STRINGS))); - - g_object_class_install_property (gobject_class, PROP_MAX_INTRA_BITRATE_PCT, - g_param_spec_int ("max-intra-bitrate", "Max Intra bitrate", - "Maximum Intra frame bitrate", - 0, G_MAXINT, DEFAULT_MAX_INTRA_BITRATE_PCT, - (GParamFlags) (G_PARAM_READWRITE | G_PARAM_STATIC_STRINGS))); - - g_object_class_install_property (gobject_class, PROP_TIMEBASE, - gst_param_spec_fraction ("timebase", "Shortest interframe time", - "Fraction of one second that is the shortest interframe time - normally left as zero which will default to the framerate", - 0, 1, G_MAXINT, 1, DEFAULT_TIMEBASE_N, DEFAULT_TIMEBASE_D, - G_PARAM_READWRITE | G_PARAM_STATIC_STRINGS)); + vpx_encoder_class->get_algo = gst_vp9_enc_get_algo; + vpx_encoder_class->enable_scaling = gst_vp9_enc_enable_scaling; + vpx_encoder_class->set_image_format = gst_vp9_enc_set_image_format; + vpx_encoder_class->get_new_vpx_caps = gst_vp9_enc_get_new_simple_caps; + vpx_encoder_class->set_stream_info = gst_vp9_enc_set_stream_info; + vpx_encoder_class->process_frame_user_data = + gst_vp9_enc_process_frame_user_data; + vpx_encoder_class->handle_invisible_frame_buffer = + gst_vp9_enc_handle_invisible_frame_buffer; + vpx_encoder_class->set_frame_user_data = gst_vp9_enc_set_frame_user_data; GST_DEBUG_CATEGORY_INIT (gst_vp9enc_debug, "vp9enc", 0, "VP9 Encoder"); } @@ -696,1015 +140,37 @@ static void gst_vp9_enc_init (GstVP9Enc * gst_vp9_enc) { vpx_codec_err_t status; - - GST_DEBUG_OBJECT (gst_vp9_enc, "init"); - GST_PAD_SET_ACCEPT_TEMPLATE (GST_VIDEO_ENCODER_SINK_PAD (gst_vp9_enc)); - + GstVPXEnc *gst_vpx_enc = GST_VPX_ENC (gst_vp9_enc); + GST_DEBUG_OBJECT (gst_vp9_enc, "gst_vp9_enc_init"); status = - vpx_codec_enc_config_default (&vpx_codec_vp9_cx_algo, &gst_vp9_enc->cfg, - 0); + vpx_codec_enc_config_default (gst_vp9_enc_get_algo (gst_vpx_enc), + &gst_vpx_enc->cfg, 0); if (status != VPX_CODEC_OK) { - GST_ERROR_OBJECT (gst_vp9_enc, + GST_ERROR_OBJECT (gst_vpx_enc, "Failed to get default encoder configuration: %s", gst_vpx_error_name (status)); - gst_vp9_enc->have_default_config = FALSE; + gst_vpx_enc->have_default_config = FALSE; } else { - gst_vp9_enc->have_default_config = TRUE; + gst_vpx_enc->have_default_config = TRUE; } - - gst_vp9_enc->cfg.rc_end_usage = DEFAULT_RC_END_USAGE; - gst_vp9_enc->cfg.rc_target_bitrate = DEFAULT_RC_TARGET_BITRATE / 1000; - gst_vp9_enc->rc_target_bitrate_set = FALSE; - gst_vp9_enc->cfg.rc_min_quantizer = DEFAULT_RC_MIN_QUANTIZER; - gst_vp9_enc->cfg.rc_max_quantizer = DEFAULT_RC_MAX_QUANTIZER; - gst_vp9_enc->cfg.rc_dropframe_thresh = DEFAULT_RC_DROPFRAME_THRESH; - gst_vp9_enc->cfg.rc_resize_allowed = DEFAULT_RC_RESIZE_ALLOWED; - gst_vp9_enc->cfg.rc_resize_up_thresh = DEFAULT_RC_RESIZE_UP_THRESH; - gst_vp9_enc->cfg.rc_resize_down_thresh = DEFAULT_RC_RESIZE_DOWN_THRESH; - gst_vp9_enc->cfg.rc_undershoot_pct = DEFAULT_RC_UNDERSHOOT_PCT; - gst_vp9_enc->cfg.rc_overshoot_pct = DEFAULT_RC_OVERSHOOT_PCT; - gst_vp9_enc->cfg.rc_buf_sz = DEFAULT_RC_BUF_SZ; - gst_vp9_enc->cfg.rc_buf_initial_sz = DEFAULT_RC_BUF_INITIAL_SZ; - gst_vp9_enc->cfg.rc_buf_optimal_sz = DEFAULT_RC_BUF_OPTIMAL_SZ; - gst_vp9_enc->cfg.rc_2pass_vbr_bias_pct = DEFAULT_RC_2PASS_VBR_BIAS_PCT; - gst_vp9_enc->cfg.rc_2pass_vbr_minsection_pct = - DEFAULT_RC_2PASS_VBR_MINSECTION_PCT; - gst_vp9_enc->cfg.rc_2pass_vbr_maxsection_pct = - DEFAULT_RC_2PASS_VBR_MAXSECTION_PCT; - gst_vp9_enc->cfg.kf_mode = DEFAULT_KF_MODE; - gst_vp9_enc->cfg.kf_max_dist = DEFAULT_KF_MAX_DIST; - gst_vp9_enc->cfg.g_pass = DEFAULT_MULTIPASS_MODE; - gst_vp9_enc->multipass_cache_prefix = g_strdup (DEFAULT_MULTIPASS_CACHE_FILE); - gst_vp9_enc->multipass_cache_file = NULL; - gst_vp9_enc->multipass_cache_idx = 0; - gst_vp9_enc->cfg.ts_number_layers = DEFAULT_TS_NUMBER_LAYERS; - gst_vp9_enc->n_ts_target_bitrate = 0; - gst_vp9_enc->n_ts_rate_decimator = 0; - gst_vp9_enc->cfg.ts_periodicity = DEFAULT_TS_PERIODICITY; - gst_vp9_enc->n_ts_layer_id = 0; - gst_vp9_enc->cfg.g_error_resilient = DEFAULT_ERROR_RESILIENT; - gst_vp9_enc->cfg.g_lag_in_frames = DEFAULT_LAG_IN_FRAMES; - gst_vp9_enc->cfg.g_threads = DEFAULT_THREADS; - gst_vp9_enc->deadline = DEFAULT_DEADLINE; - gst_vp9_enc->h_scaling_mode = DEFAULT_H_SCALING_MODE; - gst_vp9_enc->v_scaling_mode = DEFAULT_V_SCALING_MODE; - gst_vp9_enc->cpu_used = DEFAULT_CPU_USED; - gst_vp9_enc->enable_auto_alt_ref = DEFAULT_ENABLE_AUTO_ALT_REF; - gst_vp9_enc->noise_sensitivity = DEFAULT_NOISE_SENSITIVITY; - gst_vp9_enc->sharpness = DEFAULT_SHARPNESS; - gst_vp9_enc->static_threshold = DEFAULT_STATIC_THRESHOLD; - gst_vp9_enc->token_partitions = DEFAULT_TOKEN_PARTITIONS; - gst_vp9_enc->arnr_maxframes = DEFAULT_ARNR_MAXFRAMES; - gst_vp9_enc->arnr_strength = DEFAULT_ARNR_STRENGTH; - gst_vp9_enc->arnr_type = DEFAULT_ARNR_TYPE; - gst_vp9_enc->tuning = DEFAULT_TUNING; - gst_vp9_enc->cq_level = DEFAULT_CQ_LEVEL; - gst_vp9_enc->max_intra_bitrate_pct = DEFAULT_MAX_INTRA_BITRATE_PCT; - gst_vp9_enc->timebase_n = DEFAULT_TIMEBASE_N; - gst_vp9_enc->timebase_d = DEFAULT_TIMEBASE_D; - - gst_vp9_enc->cfg.g_profile = DEFAULT_PROFILE; - - g_mutex_init (&gst_vp9_enc->encoder_lock); } -static void -gst_vp9_enc_finalize (GObject * object) +static vpx_codec_iface_t * +gst_vp9_enc_get_algo (GstVPXEnc * enc) { - GstVP9Enc *gst_vp9_enc; - - GST_DEBUG_OBJECT (object, "finalize"); - - g_return_if_fail (GST_IS_VP9_ENC (object)); - gst_vp9_enc = GST_VP9_ENC (object); - - g_free (gst_vp9_enc->multipass_cache_prefix); - g_free (gst_vp9_enc->multipass_cache_file); - gst_vp9_enc->multipass_cache_idx = 0; - - if (gst_vp9_enc->input_state) - gst_video_codec_state_unref (gst_vp9_enc->input_state); - - g_mutex_clear (&gst_vp9_enc->encoder_lock); - - G_OBJECT_CLASS (parent_class)->finalize (object); -} - -static void -gst_vp9_enc_set_property (GObject * object, guint prop_id, - const GValue * value, GParamSpec * pspec) -{ - GstVP9Enc *gst_vp9_enc; - gboolean global = FALSE; - vpx_codec_err_t status; - - g_return_if_fail (GST_IS_VP9_ENC (object)); - gst_vp9_enc = GST_VP9_ENC (object); - - GST_DEBUG_OBJECT (object, "gst_vp9_enc_set_property"); - g_mutex_lock (&gst_vp9_enc->encoder_lock); - switch (prop_id) { - case PROP_RC_END_USAGE: - gst_vp9_enc->cfg.rc_end_usage = g_value_get_enum (value); - global = TRUE; - break; - case PROP_RC_TARGET_BITRATE: - gst_vp9_enc->cfg.rc_target_bitrate = g_value_get_int (value) / 1000; - gst_vp9_enc->rc_target_bitrate_set = TRUE; - global = TRUE; - break; - case PROP_RC_MIN_QUANTIZER: - gst_vp9_enc->cfg.rc_min_quantizer = g_value_get_int (value); - global = TRUE; - break; - case PROP_RC_MAX_QUANTIZER: - gst_vp9_enc->cfg.rc_max_quantizer = g_value_get_int (value); - global = TRUE; - break; - case PROP_RC_DROPFRAME_THRESH: - gst_vp9_enc->cfg.rc_dropframe_thresh = g_value_get_int (value); - global = TRUE; - break; - case PROP_RC_RESIZE_ALLOWED: - gst_vp9_enc->cfg.rc_resize_allowed = g_value_get_boolean (value); - global = TRUE; - break; - case PROP_RC_RESIZE_UP_THRESH: - gst_vp9_enc->cfg.rc_resize_up_thresh = g_value_get_int (value); - global = TRUE; - break; - case PROP_RC_RESIZE_DOWN_THRESH: - gst_vp9_enc->cfg.rc_resize_down_thresh = g_value_get_int (value); - global = TRUE; - break; - case PROP_RC_UNDERSHOOT_PCT: - gst_vp9_enc->cfg.rc_undershoot_pct = g_value_get_int (value); - global = TRUE; - break; - case PROP_RC_OVERSHOOT_PCT: - gst_vp9_enc->cfg.rc_overshoot_pct = g_value_get_int (value); - global = TRUE; - break; - case PROP_RC_BUF_SZ: - gst_vp9_enc->cfg.rc_buf_sz = g_value_get_int (value); - global = TRUE; - break; - case PROP_RC_BUF_INITIAL_SZ: - gst_vp9_enc->cfg.rc_buf_initial_sz = g_value_get_int (value); - global = TRUE; - break; - case PROP_RC_BUF_OPTIMAL_SZ: - gst_vp9_enc->cfg.rc_buf_optimal_sz = g_value_get_int (value); - global = TRUE; - break; - case PROP_RC_2PASS_VBR_BIAS_PCT: - gst_vp9_enc->cfg.rc_2pass_vbr_bias_pct = g_value_get_int (value); - global = TRUE; - break; - case PROP_RC_2PASS_VBR_MINSECTION_PCT: - gst_vp9_enc->cfg.rc_2pass_vbr_minsection_pct = g_value_get_int (value); - global = TRUE; - break; - case PROP_RC_2PASS_VBR_MAXSECTION_PCT: - gst_vp9_enc->cfg.rc_2pass_vbr_maxsection_pct = g_value_get_int (value); - global = TRUE; - break; - case PROP_KF_MODE: - gst_vp9_enc->cfg.kf_mode = g_value_get_enum (value); - global = TRUE; - break; - case PROP_KF_MAX_DIST: - gst_vp9_enc->cfg.kf_max_dist = g_value_get_int (value); - global = TRUE; - break; - case PROP_MULTIPASS_MODE: - gst_vp9_enc->cfg.g_pass = g_value_get_enum (value); - global = TRUE; - break; - case PROP_MULTIPASS_CACHE_FILE: - if (gst_vp9_enc->multipass_cache_prefix) - g_free (gst_vp9_enc->multipass_cache_prefix); - gst_vp9_enc->multipass_cache_prefix = g_value_dup_string (value); - break; - case PROP_TS_NUMBER_LAYERS: - gst_vp9_enc->cfg.ts_number_layers = g_value_get_int (value); - global = TRUE; - break; - case PROP_TS_TARGET_BITRATE:{ - GValueArray *va = g_value_get_boxed (value); - - memset (&gst_vp9_enc->cfg.ts_target_bitrate, 0, - sizeof (gst_vp9_enc->cfg.ts_target_bitrate)); - if (va == NULL) { - gst_vp9_enc->n_ts_target_bitrate = 0; - } else { - if (va->n_values > VPX_TS_MAX_LAYERS) { - g_warning ("%s: Only %d layers allowed at maximum", - GST_ELEMENT_NAME (gst_vp9_enc), VPX_TS_MAX_LAYERS); - } else { - gint i; - - for (i = 0; i < va->n_values; i++) - gst_vp9_enc->cfg.ts_target_bitrate[i] = - g_value_get_int (g_value_array_get_nth (va, i)); - gst_vp9_enc->n_ts_target_bitrate = va->n_values; - } - } - global = TRUE; - break; - } - case PROP_TS_RATE_DECIMATOR:{ - GValueArray *va = g_value_get_boxed (value); - - memset (&gst_vp9_enc->cfg.ts_rate_decimator, 0, - sizeof (gst_vp9_enc->cfg.ts_rate_decimator)); - if (va == NULL) { - gst_vp9_enc->n_ts_rate_decimator = 0; - } else if (va->n_values > VPX_TS_MAX_LAYERS) { - g_warning ("%s: Only %d layers allowed at maximum", - GST_ELEMENT_NAME (gst_vp9_enc), VPX_TS_MAX_LAYERS); - } else { - gint i; - - for (i = 0; i < va->n_values; i++) - gst_vp9_enc->cfg.ts_rate_decimator[i] = - g_value_get_int (g_value_array_get_nth (va, i)); - gst_vp9_enc->n_ts_rate_decimator = va->n_values; - } - global = TRUE; - break; - } - case PROP_TS_PERIODICITY: - gst_vp9_enc->cfg.ts_periodicity = g_value_get_int (value); - global = TRUE; - break; - case PROP_TS_LAYER_ID:{ - GValueArray *va = g_value_get_boxed (value); - - memset (&gst_vp9_enc->cfg.ts_layer_id, 0, - sizeof (gst_vp9_enc->cfg.ts_layer_id)); - if (va && va->n_values > VPX_TS_MAX_PERIODICITY) { - g_warning ("%s: Only %d sized layer sequences allowed at maximum", - GST_ELEMENT_NAME (gst_vp9_enc), VPX_TS_MAX_PERIODICITY); - } else if (va) { - gint i; - - for (i = 0; i < va->n_values; i++) - gst_vp9_enc->cfg.ts_layer_id[i] = - g_value_get_int (g_value_array_get_nth (va, i)); - gst_vp9_enc->n_ts_layer_id = va->n_values; - } else { - gst_vp9_enc->n_ts_layer_id = 0; - } - global = TRUE; - break; - } - case PROP_ERROR_RESILIENT: - gst_vp9_enc->cfg.g_error_resilient = g_value_get_flags (value); - global = TRUE; - break; - case PROP_LAG_IN_FRAMES: - gst_vp9_enc->cfg.g_lag_in_frames = g_value_get_int (value); - global = TRUE; - break; - case PROP_THREADS: - gst_vp9_enc->cfg.g_threads = g_value_get_int (value); - global = TRUE; - break; - case PROP_DEADLINE: - gst_vp9_enc->deadline = g_value_get_int64 (value); - break; - case PROP_H_SCALING_MODE: - gst_vp9_enc->h_scaling_mode = g_value_get_enum (value); - if (gst_vp9_enc->inited) { - vpx_scaling_mode_t sm; - - sm.h_scaling_mode = gst_vp9_enc->h_scaling_mode; - sm.v_scaling_mode = gst_vp9_enc->v_scaling_mode; - - status = - vpx_codec_control (&gst_vp9_enc->encoder, VP8E_SET_SCALEMODE, &sm); - if (status != VPX_CODEC_OK) { - GST_WARNING_OBJECT (gst_vp9_enc, - "Failed to set VP8E_SET_SCALEMODE: %s", - gst_vpx_error_name (status)); - } - } - break; - case PROP_V_SCALING_MODE: - gst_vp9_enc->v_scaling_mode = g_value_get_enum (value); - if (gst_vp9_enc->inited) { - vpx_scaling_mode_t sm; - - sm.h_scaling_mode = gst_vp9_enc->h_scaling_mode; - sm.v_scaling_mode = gst_vp9_enc->v_scaling_mode; - - status = - vpx_codec_control (&gst_vp9_enc->encoder, VP8E_SET_SCALEMODE, &sm); - if (status != VPX_CODEC_OK) { - GST_WARNING_OBJECT (gst_vp9_enc, - "Failed to set VP8E_SET_SCALEMODE: %s", - gst_vpx_error_name (status)); - } - } - break; - case PROP_CPU_USED: - gst_vp9_enc->cpu_used = g_value_get_int (value); - if (gst_vp9_enc->inited) { - status = - vpx_codec_control (&gst_vp9_enc->encoder, VP8E_SET_CPUUSED, - gst_vp9_enc->cpu_used); - if (status != VPX_CODEC_OK) { - GST_WARNING_OBJECT (gst_vp9_enc, "Failed to set VP8E_SET_CPUUSED: %s", - gst_vpx_error_name (status)); - } - } - break; - case PROP_ENABLE_AUTO_ALT_REF: - gst_vp9_enc->enable_auto_alt_ref = g_value_get_boolean (value); - if (gst_vp9_enc->inited) { - status = - vpx_codec_control (&gst_vp9_enc->encoder, VP8E_SET_ENABLEAUTOALTREF, - (gst_vp9_enc->enable_auto_alt_ref ? 1 : 0)); - if (status != VPX_CODEC_OK) { - GST_WARNING_OBJECT (gst_vp9_enc, - "Failed to set VP8E_SET_ENABLEAUTOALTREF: %s", - gst_vpx_error_name (status)); - } - } - break; - case PROP_NOISE_SENSITIVITY: - gst_vp9_enc->noise_sensitivity = g_value_get_int (value); - if (gst_vp9_enc->inited) { - status = - vpx_codec_control (&gst_vp9_enc->encoder, - VP8E_SET_NOISE_SENSITIVITY, gst_vp9_enc->noise_sensitivity); - if (status != VPX_CODEC_OK) { - GST_WARNING_OBJECT (gst_vp9_enc, - "Failed to set VP8E_SET_NOISE_SENSITIVITY: %s", - gst_vpx_error_name (status)); - } - } - break; - case PROP_SHARPNESS: - gst_vp9_enc->sharpness = g_value_get_int (value); - if (gst_vp9_enc->inited) { - status = vpx_codec_control (&gst_vp9_enc->encoder, VP8E_SET_SHARPNESS, - gst_vp9_enc->sharpness); - if (status != VPX_CODEC_OK) { - GST_WARNING_OBJECT (gst_vp9_enc, - "Failed to set VP8E_SET_SHARPNESS: %s", - gst_vpx_error_name (status)); - } - } - break; - case PROP_STATIC_THRESHOLD: - gst_vp9_enc->static_threshold = g_value_get_int (value); - if (gst_vp9_enc->inited) { - status = - vpx_codec_control (&gst_vp9_enc->encoder, VP8E_SET_STATIC_THRESHOLD, - gst_vp9_enc->static_threshold); - if (status != VPX_CODEC_OK) { - GST_WARNING_OBJECT (gst_vp9_enc, - "Failed to set VP8E_SET_STATIC_THRESHOLD: %s", - gst_vpx_error_name (status)); - } - } - break; - case PROP_TOKEN_PARTITIONS: - gst_vp9_enc->token_partitions = g_value_get_enum (value); - if (gst_vp9_enc->inited) { - status = - vpx_codec_control (&gst_vp9_enc->encoder, VP8E_SET_TOKEN_PARTITIONS, - gst_vp9_enc->token_partitions); - if (status != VPX_CODEC_OK) { - GST_WARNING_OBJECT (gst_vp9_enc, - "Failed to set VP8E_SET_TOKEN_PARTIONS: %s", - gst_vpx_error_name (status)); - } - } - break; - case PROP_ARNR_MAXFRAMES: - gst_vp9_enc->arnr_maxframes = g_value_get_int (value); - if (gst_vp9_enc->inited) { - status = - vpx_codec_control (&gst_vp9_enc->encoder, VP8E_SET_ARNR_MAXFRAMES, - gst_vp9_enc->arnr_maxframes); - if (status != VPX_CODEC_OK) { - GST_WARNING_OBJECT (gst_vp9_enc, - "Failed to set VP8E_SET_ARNR_MAXFRAMES: %s", - gst_vpx_error_name (status)); - } - } - break; - case PROP_ARNR_STRENGTH: - gst_vp9_enc->arnr_strength = g_value_get_int (value); - if (gst_vp9_enc->inited) { - status = - vpx_codec_control (&gst_vp9_enc->encoder, VP8E_SET_ARNR_STRENGTH, - gst_vp9_enc->arnr_strength); - if (status != VPX_CODEC_OK) { - GST_WARNING_OBJECT (gst_vp9_enc, - "Failed to set VP8E_SET_ARNR_STRENGTH: %s", - gst_vpx_error_name (status)); - } - } - break; - case PROP_ARNR_TYPE: - gst_vp9_enc->arnr_type = g_value_get_int (value); - g_warning ("arnr-type is a no-op since control has been deprecated " - "in libvpx"); - break; - case PROP_TUNING: - gst_vp9_enc->tuning = g_value_get_enum (value); - if (gst_vp9_enc->inited) { - status = vpx_codec_control (&gst_vp9_enc->encoder, VP8E_SET_TUNING, - gst_vp9_enc->tuning); - if (status != VPX_CODEC_OK) { - GST_WARNING_OBJECT (gst_vp9_enc, - "Failed to set VP8E_SET_TUNING: %s", gst_vpx_error_name (status)); - } - } - break; - case PROP_CQ_LEVEL: - gst_vp9_enc->cq_level = g_value_get_int (value); - if (gst_vp9_enc->inited) { - status = vpx_codec_control (&gst_vp9_enc->encoder, VP8E_SET_CQ_LEVEL, - gst_vp9_enc->cq_level); - if (status != VPX_CODEC_OK) { - GST_WARNING_OBJECT (gst_vp9_enc, - "Failed to set VP8E_SET_CQ_LEVEL: %s", - gst_vpx_error_name (status)); - } - } - break; - case PROP_MAX_INTRA_BITRATE_PCT: - gst_vp9_enc->max_intra_bitrate_pct = g_value_get_int (value); - if (gst_vp9_enc->inited) { - status = - vpx_codec_control (&gst_vp9_enc->encoder, - VP8E_SET_MAX_INTRA_BITRATE_PCT, gst_vp9_enc->max_intra_bitrate_pct); - if (status != VPX_CODEC_OK) { - GST_WARNING_OBJECT (gst_vp9_enc, - "Failed to set VP8E_SET_MAX_INTRA_BITRATE_PCT: %s", - gst_vpx_error_name (status)); - } - } - break; - case PROP_TIMEBASE: - gst_vp9_enc->timebase_n = gst_value_get_fraction_numerator (value); - gst_vp9_enc->timebase_d = gst_value_get_fraction_denominator (value); - break; - default: - break; - } - - if (global &&gst_vp9_enc->inited) { - status = - vpx_codec_enc_config_set (&gst_vp9_enc->encoder, &gst_vp9_enc->cfg); - if (status != VPX_CODEC_OK) { - g_mutex_unlock (&gst_vp9_enc->encoder_lock); - GST_ELEMENT_ERROR (gst_vp9_enc, LIBRARY, INIT, - ("Failed to set encoder configuration"), ("%s", - gst_vpx_error_name (status))); - } else { - g_mutex_unlock (&gst_vp9_enc->encoder_lock); - } - } else { - g_mutex_unlock (&gst_vp9_enc->encoder_lock); - } -} - -static void -gst_vp9_enc_get_property (GObject * object, guint prop_id, GValue * value, - GParamSpec * pspec) -{ - GstVP9Enc *gst_vp9_enc; - - g_return_if_fail (GST_IS_VP9_ENC (object)); - gst_vp9_enc = GST_VP9_ENC (object); - - g_mutex_lock (&gst_vp9_enc->encoder_lock); - switch (prop_id) { - case PROP_RC_END_USAGE: - g_value_set_enum (value, gst_vp9_enc->cfg.rc_end_usage); - break; - case PROP_RC_TARGET_BITRATE: - g_value_set_int (value, gst_vp9_enc->cfg.rc_target_bitrate * 1000); - break; - case PROP_RC_MIN_QUANTIZER: - g_value_set_int (value, gst_vp9_enc->cfg.rc_min_quantizer); - break; - case PROP_RC_MAX_QUANTIZER: - g_value_set_int (value, gst_vp9_enc->cfg.rc_max_quantizer); - break; - case PROP_RC_DROPFRAME_THRESH: - g_value_set_int (value, gst_vp9_enc->cfg.rc_dropframe_thresh); - break; - case PROP_RC_RESIZE_ALLOWED: - g_value_set_boolean (value, gst_vp9_enc->cfg.rc_resize_allowed); - break; - case PROP_RC_RESIZE_UP_THRESH: - g_value_set_int (value, gst_vp9_enc->cfg.rc_resize_up_thresh); - break; - case PROP_RC_RESIZE_DOWN_THRESH: - g_value_set_int (value, gst_vp9_enc->cfg.rc_resize_down_thresh); - break; - case PROP_RC_UNDERSHOOT_PCT: - g_value_set_int (value, gst_vp9_enc->cfg.rc_undershoot_pct); - break; - case PROP_RC_OVERSHOOT_PCT: - g_value_set_int (value, gst_vp9_enc->cfg.rc_overshoot_pct); - break; - case PROP_RC_BUF_SZ: - g_value_set_int (value, gst_vp9_enc->cfg.rc_buf_sz); - break; - case PROP_RC_BUF_INITIAL_SZ: - g_value_set_int (value, gst_vp9_enc->cfg.rc_buf_initial_sz); - break; - case PROP_RC_BUF_OPTIMAL_SZ: - g_value_set_int (value, gst_vp9_enc->cfg.rc_buf_optimal_sz); - break; - case PROP_RC_2PASS_VBR_BIAS_PCT: - g_value_set_int (value, gst_vp9_enc->cfg.rc_2pass_vbr_bias_pct); - break; - case PROP_RC_2PASS_VBR_MINSECTION_PCT: - g_value_set_int (value, gst_vp9_enc->cfg.rc_2pass_vbr_minsection_pct); - break; - case PROP_RC_2PASS_VBR_MAXSECTION_PCT: - g_value_set_int (value, gst_vp9_enc->cfg.rc_2pass_vbr_maxsection_pct); - break; - case PROP_KF_MODE: - g_value_set_enum (value, gst_vp9_enc->cfg.kf_mode); - break; - case PROP_KF_MAX_DIST: - g_value_set_int (value, gst_vp9_enc->cfg.kf_max_dist); - break; - case PROP_MULTIPASS_MODE: - g_value_set_enum (value, gst_vp9_enc->cfg.g_pass); - break; - case PROP_MULTIPASS_CACHE_FILE: - g_value_set_string (value, gst_vp9_enc->multipass_cache_prefix); - break; - case PROP_TS_NUMBER_LAYERS: - g_value_set_int (value, gst_vp9_enc->cfg.ts_number_layers); - break; - case PROP_TS_TARGET_BITRATE:{ - GValueArray *va; - - if (gst_vp9_enc->n_ts_target_bitrate == 0) { - g_value_set_boxed (value, NULL); - } else { - gint i; - - va = g_value_array_new (gst_vp9_enc->n_ts_target_bitrate); - for (i = 0; i < gst_vp9_enc->n_ts_target_bitrate; i++) { - GValue v = { 0, }; - - g_value_init (&v, G_TYPE_INT); - g_value_set_int (&v, gst_vp9_enc->cfg.ts_target_bitrate[i]); - g_value_array_append (va, &v); - g_value_unset (&v); - } - g_value_set_boxed (value, va); - g_value_array_free (va); - } - break; - } - case PROP_TS_RATE_DECIMATOR:{ - GValueArray *va; - - if (gst_vp9_enc->n_ts_rate_decimator == 0) { - g_value_set_boxed (value, NULL); - } else { - gint i; - - va = g_value_array_new (gst_vp9_enc->n_ts_rate_decimator); - for (i = 0; i < gst_vp9_enc->n_ts_rate_decimator; i++) { - GValue v = { 0, }; - - g_value_init (&v, G_TYPE_INT); - g_value_set_int (&v, gst_vp9_enc->cfg.ts_rate_decimator[i]); - g_value_array_append (va, &v); - g_value_unset (&v); - } - g_value_set_boxed (value, va); - g_value_array_free (va); - } - break; - } - case PROP_TS_PERIODICITY: - g_value_set_int (value, gst_vp9_enc->cfg.ts_periodicity); - break; - case PROP_TS_LAYER_ID:{ - GValueArray *va; - - if (gst_vp9_enc->n_ts_layer_id == 0) { - g_value_set_boxed (value, NULL); - } else { - gint i; - - va = g_value_array_new (gst_vp9_enc->n_ts_layer_id); - for (i = 0; i < gst_vp9_enc->n_ts_layer_id; i++) { - GValue v = { 0, }; - - g_value_init (&v, G_TYPE_INT); - g_value_set_int (&v, gst_vp9_enc->cfg.ts_layer_id[i]); - g_value_array_append (va, &v); - g_value_unset (&v); - } - g_value_set_boxed (value, va); - g_value_array_free (va); - } - break; - } - case PROP_ERROR_RESILIENT: - g_value_set_flags (value, gst_vp9_enc->cfg.g_error_resilient); - break; - case PROP_LAG_IN_FRAMES: - g_value_set_int (value, gst_vp9_enc->cfg.g_lag_in_frames); - break; - case PROP_THREADS: - g_value_set_int (value, gst_vp9_enc->cfg.g_threads); - break; - case PROP_DEADLINE: - g_value_set_int64 (value, gst_vp9_enc->deadline); - break; - case PROP_H_SCALING_MODE: - g_value_set_enum (value, gst_vp9_enc->h_scaling_mode); - break; - case PROP_V_SCALING_MODE: - g_value_set_enum (value, gst_vp9_enc->v_scaling_mode); - break; - case PROP_CPU_USED: - g_value_set_int (value, gst_vp9_enc->cpu_used); - break; - case PROP_ENABLE_AUTO_ALT_REF: - g_value_set_boolean (value, gst_vp9_enc->enable_auto_alt_ref); - break; - case PROP_NOISE_SENSITIVITY: - g_value_set_int (value, gst_vp9_enc->noise_sensitivity); - break; - case PROP_SHARPNESS: - g_value_set_int (value, gst_vp9_enc->sharpness); - break; - case PROP_STATIC_THRESHOLD: - g_value_set_int (value, gst_vp9_enc->static_threshold); - break; - case PROP_TOKEN_PARTITIONS: - g_value_set_enum (value, gst_vp9_enc->token_partitions); - break; - case PROP_ARNR_MAXFRAMES: - g_value_set_int (value, gst_vp9_enc->arnr_maxframes); - break; - case PROP_ARNR_STRENGTH: - g_value_set_int (value, gst_vp9_enc->arnr_strength); - break; - case PROP_ARNR_TYPE: - g_value_set_int (value, gst_vp9_enc->arnr_type); - break; - case PROP_TUNING: - g_value_set_enum (value, gst_vp9_enc->tuning); - break; - case PROP_CQ_LEVEL: - g_value_set_int (value, gst_vp9_enc->cq_level); - break; - case PROP_MAX_INTRA_BITRATE_PCT: - g_value_set_int (value, gst_vp9_enc->max_intra_bitrate_pct); - break; - case PROP_TIMEBASE: - gst_value_set_fraction (value, gst_vp9_enc->timebase_n, - gst_vp9_enc->timebase_d); - break; - default: - G_OBJECT_WARN_INVALID_PROPERTY_ID (object, prop_id, pspec); - break; - } - - g_mutex_unlock (&gst_vp9_enc->encoder_lock); + return &vpx_codec_vp9_cx_algo; } static gboolean -gst_vp9_enc_start (GstVideoEncoder * video_encoder) +gst_vp9_enc_enable_scaling (GstVPXEnc * enc) { - GstVP9Enc *encoder = GST_VP9_ENC (video_encoder); - - GST_DEBUG_OBJECT (video_encoder, "start"); - - if (!encoder->have_default_config) { - GST_ELEMENT_ERROR (encoder, LIBRARY, INIT, - ("Failed to get default encoder configuration"), (NULL)); - return FALSE; - } - - return TRUE; + return FALSE; } static void -gst_vp9_enc_destroy_encoder (GstVP9Enc * encoder) -{ - g_mutex_lock (&encoder->encoder_lock); - if (encoder->inited) { - vpx_codec_destroy (&encoder->encoder); - encoder->inited = FALSE; - } - - if (encoder->first_pass_cache_content) { - g_byte_array_free (encoder->first_pass_cache_content, TRUE); - encoder->first_pass_cache_content = NULL; - } - - if (encoder->cfg.rc_twopass_stats_in.buf) { - g_free (encoder->cfg.rc_twopass_stats_in.buf); - encoder->cfg.rc_twopass_stats_in.buf = NULL; - encoder->cfg.rc_twopass_stats_in.sz = 0; - } - g_mutex_unlock (&encoder->encoder_lock); -} - -static gboolean -gst_vp9_enc_stop (GstVideoEncoder * video_encoder) -{ - GstVP9Enc *encoder; - - GST_DEBUG_OBJECT (video_encoder, "stop"); - - encoder = GST_VP9_ENC (video_encoder); - - gst_vp9_enc_destroy_encoder (encoder); - - gst_tag_setter_reset_tags (GST_TAG_SETTER (encoder)); - - g_free (encoder->multipass_cache_file); - encoder->multipass_cache_file = NULL; - encoder->multipass_cache_idx = 0; - - return TRUE; -} - -static gint -gst_vp9_enc_get_downstream_profile (GstVP9Enc * encoder) +gst_vp9_enc_set_image_format (GstVPXEnc * enc, vpx_image_t * image) { - GstCaps *allowed; - GstStructure *s; - gint profile = DEFAULT_PROFILE; - - allowed = gst_pad_get_allowed_caps (GST_VIDEO_ENCODER_SRC_PAD (encoder)); - if (allowed) { - allowed = gst_caps_truncate (allowed); - s = gst_caps_get_structure (allowed, 0); - if (gst_structure_has_field (s, "profile")) { - const GValue *v = gst_structure_get_value (s, "profile"); - const gchar *profile_str = NULL; - - if (GST_VALUE_HOLDS_LIST (v) && gst_value_list_get_size (v) > 0) { - profile_str = g_value_get_string (gst_value_list_get_value (v, 0)); - } else if (G_VALUE_HOLDS_STRING (v)) { - profile_str = g_value_get_string (v); - } - - if (profile_str) { - gchar *endptr = NULL; - - profile = g_ascii_strtoull (profile_str, &endptr, 10); - if (*endptr != '\0' || profile < 0 || profile > 3) { - GST_ERROR_OBJECT (encoder, "Invalid profile '%s'", profile_str); - profile = DEFAULT_PROFILE; - } - } - } - gst_caps_unref (allowed); - } - - GST_DEBUG_OBJECT (encoder, "Using profile %d", profile); - - return profile; -} - -static gboolean -gst_vp9_enc_set_format (GstVideoEncoder * video_encoder, - GstVideoCodecState * state) -{ - GstVP9Enc *encoder; - vpx_codec_err_t status; - vpx_image_t *image; - GstCaps *caps; - gboolean ret = TRUE; - GstVideoInfo *info = &state->info; - GstVideoCodecState *output_state; - gchar *profile_str; - GstClockTime latency; - - encoder = GST_VP9_ENC (video_encoder); - GST_DEBUG_OBJECT (video_encoder, "set_format"); - - if (encoder->inited) { - gst_vp9_enc_drain (video_encoder); - g_mutex_lock (&encoder->encoder_lock); - vpx_codec_destroy (&encoder->encoder); - encoder->inited = FALSE; - encoder->multipass_cache_idx++; - } else { - g_mutex_lock (&encoder->encoder_lock); - } - - encoder->cfg.g_profile = gst_vp9_enc_get_downstream_profile (encoder); - - /* Scale default bitrate to our size */ - if (!encoder->rc_target_bitrate_set) - encoder->cfg.rc_target_bitrate = - gst_util_uint64_scale (DEFAULT_RC_TARGET_BITRATE, - GST_VIDEO_INFO_WIDTH (info) * GST_VIDEO_INFO_HEIGHT (info), - 320 * 240 * 1000); - - encoder->cfg.g_w = GST_VIDEO_INFO_WIDTH (info); - encoder->cfg.g_h = GST_VIDEO_INFO_HEIGHT (info); - - if (encoder->timebase_n != 0 && encoder->timebase_d != 0) { - GST_DEBUG_OBJECT (video_encoder, "Using timebase configuration"); - encoder->cfg.g_timebase.num = encoder->timebase_n; - encoder->cfg.g_timebase.den = encoder->timebase_d; - } else { - /* Zero framerate and max-framerate but still need to setup the timebase to avoid - * a divide by zero error. Presuming the lowest common denominator will be RTP - - * VP9 payload draft states clock rate of 90000 which should work for anyone where - * FPS < 90000 (shouldn't be too many cases where it's higher) though wouldn't be optimal. RTP specification - * http://tools.ietf.org/html/draft-ietf-payload-vp9-01 section 6.3.1 */ - encoder->cfg.g_timebase.num = 1; - encoder->cfg.g_timebase.den = 90000; - } - - if (encoder->cfg.g_pass == VPX_RC_FIRST_PASS || - encoder->cfg.g_pass == VPX_RC_LAST_PASS) { - if (!encoder->multipass_cache_prefix) { - GST_ELEMENT_ERROR (encoder, RESOURCE, OPEN_READ, - ("No multipass cache file provided"), (NULL)); - g_mutex_unlock (&encoder->encoder_lock); - return FALSE; - } - - g_free (encoder->multipass_cache_file); - - if (encoder->multipass_cache_idx > 0) - encoder->multipass_cache_file = g_strdup_printf ("%s.%u", - encoder->multipass_cache_prefix, encoder->multipass_cache_idx); - else - encoder->multipass_cache_file = - g_strdup (encoder->multipass_cache_prefix); - } - - if (encoder->cfg.g_pass == VPX_RC_FIRST_PASS) { - if (encoder->first_pass_cache_content != NULL) - g_byte_array_free (encoder->first_pass_cache_content, TRUE); - - encoder->first_pass_cache_content = g_byte_array_sized_new (4096); - - } else if (encoder->cfg.g_pass == VPX_RC_LAST_PASS) { - GError *err = NULL; - - if (encoder->cfg.rc_twopass_stats_in.buf != NULL) { - g_free (encoder->cfg.rc_twopass_stats_in.buf); - encoder->cfg.rc_twopass_stats_in.buf = NULL; - encoder->cfg.rc_twopass_stats_in.sz = 0; - } - - if (!g_file_get_contents (encoder->multipass_cache_file, - (gchar **) & encoder->cfg.rc_twopass_stats_in.buf, - &encoder->cfg.rc_twopass_stats_in.sz, &err)) { - GST_ELEMENT_ERROR (encoder, RESOURCE, OPEN_READ, - ("Failed to read multipass cache file provided"), ("%s", - err->message)); - g_error_free (err); - g_mutex_unlock (&encoder->encoder_lock); - return FALSE; - } - } - - status = vpx_codec_enc_init (&encoder->encoder, &vpx_codec_vp9_cx_algo, - &encoder->cfg, 0); - if (status != VPX_CODEC_OK) { - GST_ELEMENT_ERROR (encoder, LIBRARY, INIT, - ("Failed to initialize encoder"), ("%s", gst_vpx_error_name (status))); - g_mutex_unlock (&encoder->encoder_lock); - return FALSE; - } - - /* FIXME: Disabled for now, does not work with VP9 */ -#if 0 - { - vpx_scaling_mode_t sm; - - sm.h_scaling_mode = encoder->h_scaling_mode; - sm.v_scaling_mode = encoder->v_scaling_mode; - - status = vpx_codec_control (&encoder->encoder, VP8E_SET_SCALEMODE, &sm); - if (status != VPX_CODEC_OK) { - GST_WARNING_OBJECT (encoder, "Failed to set VP8E_SET_SCALEMODE: %s", - gst_vpx_error_name (status)); - } - } -#endif - - status = - vpx_codec_control (&encoder->encoder, VP8E_SET_CPUUSED, - encoder->cpu_used); - if (status != VPX_CODEC_OK) { - GST_WARNING_OBJECT (encoder, "Failed to set VP8E_SET_CPUUSED: %s", - gst_vpx_error_name (status)); - } - - status = - vpx_codec_control (&encoder->encoder, VP8E_SET_ENABLEAUTOALTREF, - (encoder->enable_auto_alt_ref ? 1 : 0)); - if (status != VPX_CODEC_OK) { - GST_WARNING_OBJECT (encoder, - "Failed to set VP8E_SET_ENABLEAUTOALTREF: %s", - gst_vpx_error_name (status)); - } - status = vpx_codec_control (&encoder->encoder, VP8E_SET_NOISE_SENSITIVITY, - encoder->noise_sensitivity); - if (status != VPX_CODEC_OK) { - GST_WARNING_OBJECT (encoder, - "Failed to set VP8E_SET_NOISE_SENSITIVITY: %s", - gst_vpx_error_name (status)); - } - status = vpx_codec_control (&encoder->encoder, VP8E_SET_SHARPNESS, - encoder->sharpness); - if (status != VPX_CODEC_OK) { - GST_WARNING_OBJECT (encoder, - "Failed to set VP8E_SET_SHARPNESS: %s", gst_vpx_error_name (status)); - } - status = vpx_codec_control (&encoder->encoder, VP8E_SET_STATIC_THRESHOLD, - encoder->static_threshold); - if (status != VPX_CODEC_OK) { - GST_WARNING_OBJECT (encoder, - "Failed to set VP8E_SET_STATIC_THRESHOLD: %s", - gst_vpx_error_name (status)); - } - status = vpx_codec_control (&encoder->encoder, VP8E_SET_TOKEN_PARTITIONS, - encoder->token_partitions); - if (status != VPX_CODEC_OK) { - GST_WARNING_OBJECT (encoder, - "Failed to set VP8E_SET_TOKEN_PARTIONS: %s", - gst_vpx_error_name (status)); - } - status = vpx_codec_control (&encoder->encoder, VP8E_SET_ARNR_MAXFRAMES, - encoder->arnr_maxframes); - if (status != VPX_CODEC_OK) { - GST_WARNING_OBJECT (encoder, - "Failed to set VP8E_SET_ARNR_MAXFRAMES: %s", - gst_vpx_error_name (status)); - } - status = vpx_codec_control (&encoder->encoder, VP8E_SET_ARNR_STRENGTH, - encoder->arnr_strength); - if (status != VPX_CODEC_OK) { - GST_WARNING_OBJECT (encoder, - "Failed to set VP8E_SET_ARNR_STRENGTH: %s", - gst_vpx_error_name (status)); - } - status = vpx_codec_control (&encoder->encoder, VP8E_SET_TUNING, - encoder->tuning); - if (status != VPX_CODEC_OK) { - GST_WARNING_OBJECT (encoder, - "Failed to set VP8E_SET_TUNING: %s", gst_vpx_error_name (status)); - } - status = vpx_codec_control (&encoder->encoder, VP8E_SET_CQ_LEVEL, - encoder->cq_level); - if (status != VPX_CODEC_OK) { - GST_WARNING_OBJECT (encoder, - "Failed to set VP8E_SET_CQ_LEVEL: %s", gst_vpx_error_name (status)); - } - status = vpx_codec_control (&encoder->encoder, VP8E_SET_MAX_INTRA_BITRATE_PCT, - encoder->max_intra_bitrate_pct); - if (status != VPX_CODEC_OK) { - GST_WARNING_OBJECT (encoder, - "Failed to set VP8E_SET_MAX_INTRA_BITRATE_PCT: %s", - gst_vpx_error_name (status)); - } - - if (GST_VIDEO_INFO_FPS_D (info) == 0 || GST_VIDEO_INFO_FPS_N (info) == 0) { - /* FIXME: Assume 25fps for unknown framerates. Better than reporting - * that we introduce no latency while we actually do - */ - latency = gst_util_uint64_scale (encoder->cfg.g_lag_in_frames, - 1 * GST_SECOND, 25); - } else { - latency = gst_util_uint64_scale (encoder->cfg.g_lag_in_frames, - GST_VIDEO_INFO_FPS_D (info) * GST_SECOND, GST_VIDEO_INFO_FPS_N (info)); - } - gst_video_encoder_set_latency (video_encoder, latency, latency); - encoder->inited = TRUE; - - /* Store input state */ - if (encoder->input_state) - gst_video_codec_state_unref (encoder->input_state); - encoder->input_state = gst_video_codec_state_ref (state); - - /* prepare cached image buffer setup */ - image = &encoder->image; - memset (image, 0, sizeof (*image)); - - switch (encoder->input_state->info.finfo->format) { + switch (enc->input_state->info.finfo->format) { case GST_VIDEO_FORMAT_I420: image->fmt = VPX_IMG_FMT_I420; image->bps = 12; @@ -1730,297 +196,49 @@ gst_vp9_enc_set_format (GstVideoEncoder * video_encoder, g_assert_not_reached (); break; } - image->w = image->d_w = GST_VIDEO_INFO_WIDTH (info); - image->h = image->d_h = GST_VIDEO_INFO_HEIGHT (info); - - image->stride[VPX_PLANE_Y] = GST_VIDEO_INFO_COMP_STRIDE (info, 0); - image->stride[VPX_PLANE_U] = GST_VIDEO_INFO_COMP_STRIDE (info, 1); - image->stride[VPX_PLANE_V] = GST_VIDEO_INFO_COMP_STRIDE (info, 2); +} - profile_str = g_strdup_printf ("%d", encoder->cfg.g_profile); +static GstCaps * +gst_vp9_enc_get_new_simple_caps (GstVPXEnc * enc) +{ + GstCaps *caps; + gchar *profile_str = g_strdup_printf ("%d", enc->cfg.g_profile); caps = gst_caps_new_simple ("video/x-vp9", "profile", G_TYPE_STRING, profile_str, NULL); g_free (profile_str); - - g_mutex_unlock (&encoder->encoder_lock); - - output_state = - gst_video_encoder_set_output_state (video_encoder, caps, state); - gst_video_codec_state_unref (output_state); - - gst_video_encoder_negotiate (GST_VIDEO_ENCODER (encoder)); - - return ret; + return caps; } -static GstFlowReturn -gst_vp9_enc_process (GstVP9Enc * encoder) +static void +gst_vp9_enc_set_stream_info (GstVPXEnc * enc, GstCaps * caps, + GstVideoInfo * info) { - vpx_codec_iter_t iter = NULL; - const vpx_codec_cx_pkt_t *pkt; - GstVideoEncoder *video_encoder; - GstVideoCodecFrame *frame; - GstFlowReturn ret = GST_FLOW_OK; - - video_encoder = GST_VIDEO_ENCODER (encoder); - - g_mutex_lock (&encoder->encoder_lock); - pkt = vpx_codec_get_cx_data (&encoder->encoder, &iter); - while (pkt != NULL) { - GstBuffer *buffer; - gboolean invisible; - - GST_DEBUG_OBJECT (encoder, "packet %u type %d", (guint) pkt->data.frame.sz, - pkt->kind); - - if (pkt->kind == VPX_CODEC_STATS_PKT - && encoder->cfg.g_pass == VPX_RC_FIRST_PASS) { - GST_LOG_OBJECT (encoder, "handling STATS packet"); - - g_byte_array_append (encoder->first_pass_cache_content, - pkt->data.twopass_stats.buf, pkt->data.twopass_stats.sz); - - frame = gst_video_encoder_get_oldest_frame (video_encoder); - if (frame != NULL) { - buffer = gst_buffer_new (); - GST_BUFFER_FLAG_SET (buffer, GST_BUFFER_FLAG_LIVE); - frame->output_buffer = buffer; - g_mutex_unlock (&encoder->encoder_lock); - ret = gst_video_encoder_finish_frame (video_encoder, frame); - g_mutex_lock (&encoder->encoder_lock); - } - - pkt = vpx_codec_get_cx_data (&encoder->encoder, &iter); - continue; - } else if (pkt->kind != VPX_CODEC_CX_FRAME_PKT) { - GST_LOG_OBJECT (encoder, "non frame pkt: %d", pkt->kind); - pkt = vpx_codec_get_cx_data (&encoder->encoder, &iter); - continue; - } - - invisible = (pkt->data.frame.flags & VPX_FRAME_IS_INVISIBLE) != 0; - frame = gst_video_encoder_get_oldest_frame (video_encoder); - g_assert (frame != NULL); - if ((pkt->data.frame.flags & VPX_FRAME_IS_KEY) != 0) - GST_VIDEO_CODEC_FRAME_SET_SYNC_POINT (frame); - else - GST_VIDEO_CODEC_FRAME_UNSET_SYNC_POINT (frame); - - /* FIXME : It would be nice to avoid the memory copy ... */ - buffer = - gst_buffer_new_wrapped (g_memdup (pkt->data.frame.buf, - pkt->data.frame.sz), pkt->data.frame.sz); - - if (invisible) { - g_mutex_unlock (&encoder->encoder_lock); - ret = gst_pad_push (GST_VIDEO_ENCODER_SRC_PAD (encoder), buffer); - g_mutex_lock (&encoder->encoder_lock); - gst_video_codec_frame_unref (frame); - } else { - frame->output_buffer = buffer; - g_mutex_unlock (&encoder->encoder_lock); - ret = gst_video_encoder_finish_frame (video_encoder, frame); - g_mutex_lock (&encoder->encoder_lock); - } - - pkt = vpx_codec_get_cx_data (&encoder->encoder, &iter); - } - g_mutex_unlock (&encoder->encoder_lock); - - return ret; + return; } -/* This function should be called holding then stream lock*/ -static GstFlowReturn -gst_vp9_enc_drain (GstVideoEncoder * video_encoder) -{ - GstVP9Enc *encoder; - int flags = 0; - vpx_codec_err_t status; - gint64 deadline; - vpx_codec_pts_t pts; - - encoder = GST_VP9_ENC (video_encoder); - - g_mutex_lock (&encoder->encoder_lock); - deadline = encoder->deadline; - - pts = - gst_util_uint64_scale (encoder->last_pts, - encoder->cfg.g_timebase.den, - encoder->cfg.g_timebase.num * (GstClockTime) GST_SECOND); - - status = vpx_codec_encode (&encoder->encoder, NULL, pts, 0, flags, deadline); - g_mutex_unlock (&encoder->encoder_lock); - - if (status != 0) { - GST_ERROR_OBJECT (encoder, "encode returned %d %s", status, - gst_vpx_error_name (status)); - return GST_FLOW_ERROR; - } - - /* dispatch remaining frames */ - gst_vp9_enc_process (encoder); - - g_mutex_lock (&encoder->encoder_lock); - if (encoder->cfg.g_pass == VPX_RC_FIRST_PASS && encoder->multipass_cache_file) { - GError *err = NULL; - - if (!g_file_set_contents (encoder->multipass_cache_file, - (const gchar *) encoder->first_pass_cache_content->data, - encoder->first_pass_cache_content->len, &err)) { - GST_ELEMENT_ERROR (encoder, RESOURCE, WRITE, (NULL), - ("Failed to write multipass cache file: %s", err->message)); - g_error_free (err); - } - } - g_mutex_unlock (&encoder->encoder_lock); - - return GST_FLOW_OK; -} - -static gboolean -gst_vp9_enc_flush (GstVideoEncoder * video_encoder) +static void * +gst_vp9_enc_process_frame_user_data (GstVPXEnc * enc, + GstVideoCodecFrame * frame) { - GstVP9Enc *encoder; - - GST_DEBUG_OBJECT (video_encoder, "flush"); - - encoder = GST_VP9_ENC (video_encoder); - - gst_vp9_enc_destroy_encoder (encoder); - if (encoder->input_state) { - gst_video_codec_state_ref (encoder->input_state); - gst_vp9_enc_set_format (video_encoder, encoder->input_state); - gst_video_codec_state_unref (encoder->input_state); - } - - return TRUE; + return NULL; } static GstFlowReturn -gst_vp9_enc_finish (GstVideoEncoder * video_encoder) +gst_vp9_enc_handle_invisible_frame_buffer (GstVPXEnc * enc, void *user_data, + GstBuffer * buffer) { - GstVP9Enc *encoder; GstFlowReturn ret; - - GST_DEBUG_OBJECT (video_encoder, "finish"); - - encoder = GST_VP9_ENC (video_encoder); - - if (encoder->inited) { - ret = gst_vp9_enc_drain (video_encoder); - } else { - ret = GST_FLOW_OK; - } - + g_mutex_unlock (&enc->encoder_lock); + ret = gst_pad_push (GST_VIDEO_ENCODER_SRC_PAD (enc), buffer); + g_mutex_lock (&enc->encoder_lock); return ret; } -static vpx_image_t * -gst_vp9_enc_buffer_to_image (GstVP9Enc * enc, GstVideoFrame * frame) -{ - vpx_image_t *image = g_slice_new (vpx_image_t); - - memcpy (image, &enc->image, sizeof (*image)); - - image->planes[VPX_PLANE_Y] = GST_VIDEO_FRAME_COMP_DATA (frame, 0); - image->planes[VPX_PLANE_U] = GST_VIDEO_FRAME_COMP_DATA (frame, 1); - image->planes[VPX_PLANE_V] = GST_VIDEO_FRAME_COMP_DATA (frame, 2); - - image->stride[VPX_PLANE_Y] = GST_VIDEO_FRAME_COMP_STRIDE (frame, 0); - image->stride[VPX_PLANE_U] = GST_VIDEO_FRAME_COMP_STRIDE (frame, 1); - image->stride[VPX_PLANE_V] = GST_VIDEO_FRAME_COMP_STRIDE (frame, 2); - - return image; -} - -static GstFlowReturn -gst_vp9_enc_handle_frame (GstVideoEncoder * video_encoder, - GstVideoCodecFrame * frame) -{ - GstVP9Enc *encoder; - vpx_codec_err_t status; - int flags = 0; - vpx_image_t *image; - GstVideoFrame vframe; - vpx_codec_pts_t pts; - unsigned long duration; - - GST_DEBUG_OBJECT (video_encoder, "handle_frame"); - - encoder = GST_VP9_ENC (video_encoder); - - GST_DEBUG_OBJECT (video_encoder, "size %d %d", - GST_VIDEO_INFO_WIDTH (&encoder->input_state->info), - GST_VIDEO_INFO_HEIGHT (&encoder->input_state->info)); - - gst_video_frame_map (&vframe, &encoder->input_state->info, - frame->input_buffer, GST_MAP_READ); - image = gst_vp9_enc_buffer_to_image (encoder, &vframe); - - if (GST_VIDEO_CODEC_FRAME_IS_FORCE_KEYFRAME (frame)) { - flags |= VPX_EFLAG_FORCE_KF; - } - - g_mutex_lock (&encoder->encoder_lock); - pts = - gst_util_uint64_scale (frame->pts, - encoder->cfg.g_timebase.den, - encoder->cfg.g_timebase.num * (GstClockTime) GST_SECOND); - encoder->last_pts = frame->pts; - - if (frame->duration != GST_CLOCK_TIME_NONE) { - duration = - gst_util_uint64_scale (frame->duration, encoder->cfg.g_timebase.den, - encoder->cfg.g_timebase.num * (GstClockTime) GST_SECOND); - encoder->last_pts += frame->duration; - } else { - duration = 1; - } - - status = vpx_codec_encode (&encoder->encoder, image, - pts, duration, flags, encoder->deadline); - - g_mutex_unlock (&encoder->encoder_lock); - gst_video_frame_unmap (&vframe); - - if (status != 0) { - GST_ELEMENT_ERROR (encoder, LIBRARY, ENCODE, - ("Failed to encode frame"), ("%s", gst_vpx_error_name (status))); - return FALSE; - } - gst_video_codec_frame_unref (frame); - return gst_vp9_enc_process (encoder); -} - -static gboolean -gst_vp9_enc_sink_event (GstVideoEncoder * benc, GstEvent * event) -{ - GstVP9Enc *enc = GST_VP9_ENC (benc); - - /* FIXME : Move this to base encoder class */ - - if (GST_EVENT_TYPE (event) == GST_EVENT_TAG) { - GstTagList *list; - GstTagSetter *setter = GST_TAG_SETTER (enc); - const GstTagMergeMode mode = gst_tag_setter_get_tag_merge_mode (setter); - - gst_event_parse_tag (event, &list); - gst_tag_setter_merge_tags (setter, list, mode); - } - - /* just peeked, baseclass handles the rest */ - return GST_VIDEO_ENCODER_CLASS (parent_class)->sink_event (benc, event); -} - -static gboolean -gst_vp9_enc_propose_allocation (GstVideoEncoder * encoder, GstQuery * query) +static void +gst_vp9_enc_set_frame_user_data (GstVPXEnc * enc, GstVideoCodecFrame * frame, + vpx_image_t * image) { - gst_query_add_allocation_meta (query, GST_VIDEO_META_API_TYPE, NULL); - - return GST_VIDEO_ENCODER_CLASS (parent_class)->propose_allocation (encoder, - query); + return; } #endif /* HAVE_VP9_ENCODER */ diff --git a/ext/vpx/gstvp9enc.h b/ext/vpx/gstvp9enc.h index e85a802f189b3b3b3396741fea5c751e3c9148b3..843372b73080f816935351e9ccb62792f5960a72 100644 --- a/ext/vpx/gstvp9enc.h +++ b/ext/vpx/gstvp9enc.h @@ -28,8 +28,7 @@ #ifdef HAVE_VP9_ENCODER -#include <gst/gst.h> -#include <gst/video/gstvideoencoder.h> +#include <gstvpxenc.h> /* FIXME: Undef HAVE_CONFIG_H because vpx_codec.h uses it, * which causes compilation failures */ @@ -37,9 +36,6 @@ #undef HAVE_CONFIG_H #endif -#include <vpx/vpx_encoder.h> -#include <vpx/vp8cx.h> - G_BEGIN_DECLS #define GST_TYPE_VP9_ENC \ @@ -58,59 +54,12 @@ typedef struct _GstVP9EncClass GstVP9EncClass; struct _GstVP9Enc { - GstVideoEncoder base_video_encoder; - - /* < private > */ - vpx_codec_ctx_t encoder; - GMutex encoder_lock; - - /* properties */ - vpx_codec_enc_cfg_t cfg; - gboolean have_default_config; - gboolean rc_target_bitrate_set; - gint n_ts_target_bitrate; - gint n_ts_rate_decimator; - gint n_ts_layer_id; - /* Global two-pass options */ - gchar *multipass_cache_file; - gchar *multipass_cache_prefix; - guint multipass_cache_idx; - GByteArray *first_pass_cache_content; - - /* Encode parameter */ - gint64 deadline; - - /* Controls */ - VPX_SCALING_MODE h_scaling_mode; - VPX_SCALING_MODE v_scaling_mode; - int cpu_used; - gboolean enable_auto_alt_ref; - unsigned int noise_sensitivity; - unsigned int sharpness; - unsigned int static_threshold; - vp8e_token_partitions token_partitions; - unsigned int arnr_maxframes; - unsigned int arnr_strength; - unsigned int arnr_type; - vp8e_tuning tuning; - unsigned int cq_level; - unsigned int max_intra_bitrate_pct; - /* Timebase - a value of 0 will use the framerate */ - unsigned int timebase_n; - unsigned int timebase_d; - - /* state */ - gboolean inited; - - vpx_image_t image; - - GstClockTime last_pts; - GstVideoCodecState *input_state; + GstVPXEnc base_vpx_encoder; }; struct _GstVP9EncClass { - GstVideoEncoderClass base_video_encoder_class; + GstVPXEncClass base_vpxenc_class; }; GType gst_vp9_enc_get_type (void); diff --git a/ext/vpx/gstvpxdec.c b/ext/vpx/gstvpxdec.c new file mode 100644 index 0000000000000000000000000000000000000000..fc75a7bd1d653ac35d540fea71aa849a78bfd1a5 --- /dev/null +++ b/ext/vpx/gstvpxdec.c @@ -0,0 +1,796 @@ +/* VPX + * Copyright (C) 2006 David Schleef <ds@schleef.org> + * Copyright (C) 2008,2009,2010 Entropy Wave Inc + * Copyright (C) 2010-2012 Sebastian Dröge <sebastian.droege@collabora.co.uk> + * + * This library is free software; you can redistribute it and/or + * modify it under the terms of the GNU Library General Public + * License as published by the Free Software Foundation; either + * version 2 of the License, or (at your option) any later version. + * + * This library is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Library General Public License for more details. + * + * You should have received a copy of the GNU Library General Public + * License along with this library; if not, write to the + * Free Software Foundation, Inc., 51 Franklin St, Fifth Floor, + * Boston, MA 02110-1301, USA. + */ +#ifdef HAVE_CONFIG_H +#include "config.h" +#endif + +#if defined(HAVE_VP8_DECODER) || defined(HAVE_VP9_DECODER) + +#include <string.h> + +#include "gstvpxdec.h" +#include "gstvp8utils.h" + +#include <gst/video/gstvideometa.h> +#include <gst/video/gstvideopool.h> + +GST_DEBUG_CATEGORY_STATIC (gst_vpxdec_debug); +#define GST_CAT_DEFAULT gst_vpxdec_debug + +#define DEFAULT_POST_PROCESSING FALSE +#define DEFAULT_POST_PROCESSING_FLAGS (VP8_DEBLOCK | VP8_DEMACROBLOCK | VP8_MFQE) +#define DEFAULT_DEBLOCKING_LEVEL 4 +#define DEFAULT_NOISE_LEVEL 0 +#define DEFAULT_THREADS 0 +#define DEFAULT_VIDEO_CODEC_TAG NULL +#define DEFAULT_CODEC_ALGO NULL + +enum +{ + PROP_0, + PROP_POST_PROCESSING, + PROP_POST_PROCESSING_FLAGS, + PROP_DEBLOCKING_LEVEL, + PROP_NOISE_LEVEL, + PROP_THREADS +}; + +#define C_FLAGS(v) ((guint) v) +#define GST_VPX_DEC_TYPE_POST_PROCESSING_FLAGS (gst_vpx_dec_post_processing_flags_get_type()) +static GType +gst_vpx_dec_post_processing_flags_get_type (void) +{ + static const GFlagsValue values[] = { + {C_FLAGS (VP8_DEBLOCK), "Deblock", "deblock"}, + {C_FLAGS (VP8_DEMACROBLOCK), "Demacroblock", "demacroblock"}, + {C_FLAGS (VP8_ADDNOISE), "Add noise", "addnoise"}, + {C_FLAGS (VP8_MFQE), "Multi-frame quality enhancement", "mfqe"}, + {0, NULL, NULL} + }; + static volatile GType id = 0; + + if (g_once_init_enter ((gsize *) & id)) { + GType _id; + + _id = g_flags_register_static ("GstVPXDecPostProcessingFlags", values); + + g_once_init_leave ((gsize *) & id, _id); + } + + return id; +} + +#undef C_FLAGS + +static void gst_vpx_dec_set_property (GObject * object, guint prop_id, + const GValue * value, GParamSpec * pspec); +static void gst_vpx_dec_get_property (GObject * object, guint prop_id, + GValue * value, GParamSpec * pspec); + +static gboolean gst_vpx_dec_start (GstVideoDecoder * decoder); +static gboolean gst_vpx_dec_stop (GstVideoDecoder * decoder); +static gboolean gst_vpx_dec_set_format (GstVideoDecoder * decoder, + GstVideoCodecState * state); +static gboolean gst_vpx_dec_flush (GstVideoDecoder * decoder); +static GstFlowReturn +gst_vpx_dec_handle_frame (GstVideoDecoder * decoder, + GstVideoCodecFrame * frame); +static gboolean gst_vpx_dec_decide_allocation (GstVideoDecoder * decoder, + GstQuery * query); + +static void gst_vpx_dec_image_to_buffer (GstVPXDec * dec, + const vpx_image_t * img, GstBuffer * buffer); +static GstFlowReturn gst_vpx_dec_open_codec (GstVPXDec * dec, + GstVideoCodecFrame * frame); +static void gst_vpx_dec_default_send_tags (GstVPXDec * dec); +static void gst_vpx_dec_set_stream_info (GstVPXDec * dec, + vpx_codec_stream_info_t * stream_info); +static void gst_vpx_dec_set_default_format (GstVPXDec * dec, GstVideoFormat fmt, + int width, int height); +static gboolean gst_vpx_dec_default_frame_format (GstVPXDec * dec, + vpx_image_t * img, GstVideoFormat * fmt); +static void gst_vpx_dec_handle_resolution_change (GstVPXDec * dec, + vpx_image_t * img, GstVideoFormat fmt); + +#define parent_class gst_vpx_dec_parent_class +G_DEFINE_TYPE (GstVPXDec, gst_vpx_dec, GST_TYPE_VIDEO_DECODER); + +static void +gst_vpx_dec_class_init (GstVPXDecClass * klass) +{ + GObjectClass *gobject_class; + GstVideoDecoderClass *base_video_decoder_class; + + gobject_class = G_OBJECT_CLASS (klass); + base_video_decoder_class = GST_VIDEO_DECODER_CLASS (klass); + + gobject_class->set_property = gst_vpx_dec_set_property; + gobject_class->get_property = gst_vpx_dec_get_property; + + g_object_class_install_property (gobject_class, PROP_POST_PROCESSING, + g_param_spec_boolean ("post-processing", "Post Processing", + "Enable post processing", DEFAULT_POST_PROCESSING, + G_PARAM_READWRITE | G_PARAM_STATIC_STRINGS)); + + g_object_class_install_property (gobject_class, PROP_POST_PROCESSING_FLAGS, + g_param_spec_flags ("post-processing-flags", "Post Processing Flags", + "Flags to control post processing", + GST_VPX_DEC_TYPE_POST_PROCESSING_FLAGS, DEFAULT_POST_PROCESSING_FLAGS, + G_PARAM_READWRITE | G_PARAM_STATIC_STRINGS)); + + g_object_class_install_property (gobject_class, PROP_DEBLOCKING_LEVEL, + g_param_spec_uint ("deblocking-level", "Deblocking Level", + "Deblocking level", + 0, 16, DEFAULT_DEBLOCKING_LEVEL, + G_PARAM_READWRITE | G_PARAM_STATIC_STRINGS)); + + g_object_class_install_property (gobject_class, PROP_NOISE_LEVEL, + g_param_spec_uint ("noise-level", "Noise Level", + "Noise level", + 0, 16, DEFAULT_NOISE_LEVEL, + G_PARAM_READWRITE | G_PARAM_STATIC_STRINGS)); + + g_object_class_install_property (gobject_class, PROP_THREADS, + g_param_spec_uint ("threads", "Max Threads", + "Maximum number of decoding threads", + 0, 16, DEFAULT_THREADS, G_PARAM_READWRITE | G_PARAM_STATIC_STRINGS)); + + base_video_decoder_class->start = GST_DEBUG_FUNCPTR (gst_vpx_dec_start); + base_video_decoder_class->stop = GST_DEBUG_FUNCPTR (gst_vpx_dec_stop); + base_video_decoder_class->flush = GST_DEBUG_FUNCPTR (gst_vpx_dec_flush); + base_video_decoder_class->set_format = + GST_DEBUG_FUNCPTR (gst_vpx_dec_set_format); + base_video_decoder_class->handle_frame = + GST_DEBUG_FUNCPTR (gst_vpx_dec_handle_frame);; + base_video_decoder_class->decide_allocation = + GST_DEBUG_FUNCPTR (gst_vpx_dec_decide_allocation); + + klass->video_codec_tag = DEFAULT_VIDEO_CODEC_TAG; + klass->codec_algo = DEFAULT_CODEC_ALGO; + klass->open_codec = GST_DEBUG_FUNCPTR (gst_vpx_dec_open_codec); + klass->send_tags = GST_DEBUG_FUNCPTR (gst_vpx_dec_default_send_tags); + klass->set_stream_info = NULL; + klass->set_default_format = NULL; + klass->handle_resolution_change = NULL; + klass->get_frame_format = + GST_DEBUG_FUNCPTR (gst_vpx_dec_default_frame_format); + + GST_DEBUG_CATEGORY_INIT (gst_vpxdec_debug, "vpxdec", 0, "VPX Decoder"); +} + +static void +gst_vpx_dec_init (GstVPXDec * gst_vpx_dec) +{ + GstVideoDecoder *decoder = (GstVideoDecoder *) gst_vpx_dec; + + GST_DEBUG_OBJECT (gst_vpx_dec, "gst_vpx_dec_init"); + gst_video_decoder_set_packetized (decoder, TRUE); + gst_vpx_dec->post_processing = DEFAULT_POST_PROCESSING; + gst_vpx_dec->post_processing_flags = DEFAULT_POST_PROCESSING_FLAGS; + gst_vpx_dec->deblocking_level = DEFAULT_DEBLOCKING_LEVEL; + gst_vpx_dec->noise_level = DEFAULT_NOISE_LEVEL; + + gst_video_decoder_set_needs_format (decoder, TRUE); + gst_video_decoder_set_use_default_pad_acceptcaps (decoder, TRUE); + GST_PAD_SET_ACCEPT_TEMPLATE (GST_VIDEO_DECODER_SINK_PAD (decoder)); +} + +static void +gst_vpx_dec_set_property (GObject * object, guint prop_id, + const GValue * value, GParamSpec * pspec) +{ + GstVPXDec *dec; + + g_return_if_fail (GST_IS_VPX_DEC (object)); + dec = GST_VPX_DEC (object); + + GST_DEBUG_OBJECT (object, "gst_vpx_dec_set_property"); + switch (prop_id) { + case PROP_POST_PROCESSING: + dec->post_processing = g_value_get_boolean (value); + break; + case PROP_POST_PROCESSING_FLAGS: + dec->post_processing_flags = g_value_get_flags (value); + break; + case PROP_DEBLOCKING_LEVEL: + dec->deblocking_level = g_value_get_uint (value); + break; + case PROP_NOISE_LEVEL: + dec->noise_level = g_value_get_uint (value); + break; + case PROP_THREADS: + dec->threads = g_value_get_uint (value); + break; + default: + G_OBJECT_WARN_INVALID_PROPERTY_ID (object, prop_id, pspec); + break; + } +} + +static void +gst_vpx_dec_get_property (GObject * object, guint prop_id, GValue * value, + GParamSpec * pspec) +{ + GstVPXDec *dec; + + g_return_if_fail (GST_IS_VPX_DEC (object)); + dec = GST_VPX_DEC (object); + + switch (prop_id) { + case PROP_POST_PROCESSING: + g_value_set_boolean (value, dec->post_processing); + break; + case PROP_POST_PROCESSING_FLAGS: + g_value_set_flags (value, dec->post_processing_flags); + break; + case PROP_DEBLOCKING_LEVEL: + g_value_set_uint (value, dec->deblocking_level); + break; + case PROP_NOISE_LEVEL: + g_value_set_uint (value, dec->noise_level); + break; + case PROP_THREADS: + g_value_set_uint (value, dec->threads); + break; + default: + G_OBJECT_WARN_INVALID_PROPERTY_ID (object, prop_id, pspec); + break; + } +} + +static gboolean +gst_vpx_dec_start (GstVideoDecoder * decoder) +{ + GstVPXDec *gst_vpx_dec = GST_VPX_DEC (decoder); + + GST_DEBUG_OBJECT (gst_vpx_dec, "start"); + gst_vpx_dec->decoder_inited = FALSE; + + return TRUE; +} + +static gboolean +gst_vpx_dec_stop (GstVideoDecoder * base_video_decoder) +{ + GstVPXDec *gst_vpx_dec = GST_VPX_DEC (base_video_decoder); + + GST_DEBUG_OBJECT (gst_vpx_dec, "stop"); + + if (gst_vpx_dec->output_state) { + gst_video_codec_state_unref (gst_vpx_dec->output_state); + gst_vpx_dec->output_state = NULL; + } + + if (gst_vpx_dec->input_state) { + gst_video_codec_state_unref (gst_vpx_dec->input_state); + gst_vpx_dec->input_state = NULL; + } + + if (gst_vpx_dec->decoder_inited) + vpx_codec_destroy (&gst_vpx_dec->decoder); + gst_vpx_dec->decoder_inited = FALSE; + + if (gst_vpx_dec->pool) { + gst_buffer_pool_set_active (gst_vpx_dec->pool, FALSE); + gst_object_unref (gst_vpx_dec->pool); + gst_vpx_dec->pool = NULL; + gst_vpx_dec->buf_size = 0; + } + + return TRUE; +} + +static gboolean +gst_vpx_dec_set_format (GstVideoDecoder * decoder, GstVideoCodecState * state) +{ + GstVPXDec *gst_vpx_dec = GST_VPX_DEC (decoder); + + GST_DEBUG_OBJECT (gst_vpx_dec, "set_format"); + + if (gst_vpx_dec->decoder_inited) + vpx_codec_destroy (&gst_vpx_dec->decoder); + gst_vpx_dec->decoder_inited = FALSE; + + if (gst_vpx_dec->output_state) { + gst_video_codec_state_unref (gst_vpx_dec->output_state); + gst_vpx_dec->output_state = NULL; + } + + if (gst_vpx_dec->input_state) { + gst_video_codec_state_unref (gst_vpx_dec->input_state); + } + + gst_vpx_dec->input_state = gst_video_codec_state_ref (state); + + return TRUE; +} + +static gboolean +gst_vpx_dec_flush (GstVideoDecoder * base_video_decoder) +{ + GstVPXDec *decoder; + + GST_DEBUG_OBJECT (base_video_decoder, "flush"); + + decoder = GST_VPX_DEC (base_video_decoder); + + if (decoder->output_state) { + gst_video_codec_state_unref (decoder->output_state); + decoder->output_state = NULL; + } + + if (decoder->decoder_inited) + vpx_codec_destroy (&decoder->decoder); + decoder->decoder_inited = FALSE; + + return TRUE; +} + +static void +gst_vpx_dec_default_send_tags (GstVPXDec * dec) +{ + GstTagList *list; + GstVPXDecClass *vpxclass = GST_VPX_DEC_GET_CLASS (dec); + + if (vpxclass->video_codec_tag == NULL) + return; + + list = gst_tag_list_new_empty (); + gst_tag_list_add (list, GST_TAG_MERGE_REPLACE, + GST_TAG_VIDEO_CODEC, vpxclass->video_codec_tag, NULL); + + gst_pad_push_event (GST_VIDEO_DECODER_SRC_PAD (dec), + gst_event_new_tag (list)); +} + +#ifdef HAVE_VPX_1_4 +struct Frame +{ + GstMapInfo info; + GstBuffer *buffer; +}; + +static GstBuffer * +gst_vpx_dec_prepare_image (GstVPXDec * dec, const vpx_image_t * img) +{ + gint comp; + GstVideoMeta *vmeta; + GstBuffer *buffer; + struct Frame *frame = img->fb_priv; + GstVideoInfo *info = &dec->output_state->info; + + buffer = gst_buffer_ref (frame->buffer); + + vmeta = gst_buffer_get_video_meta (buffer); + vmeta->format = GST_VIDEO_INFO_FORMAT (info); + vmeta->width = GST_VIDEO_INFO_WIDTH (info); + vmeta->height = GST_VIDEO_INFO_HEIGHT (info); + vmeta->n_planes = GST_VIDEO_INFO_N_PLANES (info); + + for (comp = 0; comp < 4; comp++) { + vmeta->stride[comp] = img->stride[comp]; + vmeta->offset[comp] = + img->planes[comp] ? img->planes[comp] - frame->info.data : 0; + } + + /* FIXME This is a READ/WRITE mapped buffer see bug #754826 */ + + return buffer; +} + +static int +gst_vpx_dec_get_buffer_cb (gpointer priv, gsize min_size, + vpx_codec_frame_buffer_t * fb) +{ + GstVPXDec *dec = priv; + GstBuffer *buffer; + struct Frame *frame; + GstFlowReturn ret; + + if (!dec->pool || dec->buf_size != min_size) { + GstBufferPool *pool; + GstStructure *config; + GstCaps *caps; + GstAllocator *allocator; + GstAllocationParams params; + + if (dec->pool) { + gst_buffer_pool_set_active (dec->pool, FALSE); + gst_object_unref (dec->pool); + dec->pool = NULL; + dec->buf_size = 0; + } + + gst_video_decoder_get_allocator (GST_VIDEO_DECODER (dec), &allocator, + ¶ms); + + if (allocator && + GST_OBJECT_FLAG_IS_SET (allocator, GST_ALLOCATOR_FLAG_CUSTOM_ALLOC)) { + gst_object_unref (allocator); + allocator = NULL; + } + + pool = gst_buffer_pool_new (); + config = gst_buffer_pool_get_config (pool); + gst_buffer_pool_config_set_allocator (config, allocator, ¶ms); + caps = gst_caps_from_string ("video/internal"); + gst_buffer_pool_config_set_params (config, caps, min_size, 2, 0); + gst_caps_unref (caps); + gst_buffer_pool_set_config (pool, config); + + if (allocator) + gst_object_unref (allocator); + + if (!gst_buffer_pool_set_active (pool, TRUE)) { + GST_WARNING ("Failed to create internal pool"); + gst_object_unref (pool); + return -1; + } + + dec->pool = pool; + dec->buf_size = min_size; + } + + ret = gst_buffer_pool_acquire_buffer (dec->pool, &buffer, NULL); + if (ret != GST_FLOW_OK) { + GST_WARNING ("Failed to acquire buffer from internal pool."); + return -1; + } + + /* Add it now, while the buffer is writable */ + gst_buffer_add_video_meta (buffer, GST_VIDEO_FRAME_FLAG_NONE, + GST_VIDEO_FORMAT_ENCODED, 0, 0); + + frame = g_new0 (struct Frame, 1); + if (!gst_buffer_map (buffer, &frame->info, GST_MAP_READWRITE)) { + gst_buffer_unref (buffer); + g_free (frame); + GST_WARNING ("Failed to map buffer from internal pool."); + return -1; + } + + fb->size = frame->info.size; + fb->data = frame->info.data; + frame->buffer = buffer; + fb->priv = frame; + + GST_TRACE_OBJECT (priv, "Allocated buffer %p", frame->buffer); + + return 0; +} + +static int +gst_vpx_dec_release_buffer_cb (gpointer priv, vpx_codec_frame_buffer_t * fb) +{ + struct Frame *frame = fb->priv; + + GST_TRACE_OBJECT (priv, "Release buffer %p", frame->buffer); + + g_assert (frame); + gst_buffer_unmap (frame->buffer, &frame->info); + gst_buffer_unref (frame->buffer); + g_free (frame); + + return 0; +} +#endif + +static void +gst_vpx_dec_image_to_buffer (GstVPXDec * dec, const vpx_image_t * img, + GstBuffer * buffer) +{ + int deststride, srcstride, height, width, line, comp; + guint8 *dest, *src; + GstVideoFrame frame; + GstVideoInfo *info = &dec->output_state->info; + + if (!gst_video_frame_map (&frame, info, buffer, GST_MAP_WRITE)) { + GST_ERROR_OBJECT (dec, "Could not map video buffer"); + return; + } + + for (comp = 0; comp < 3; comp++) { + dest = GST_VIDEO_FRAME_COMP_DATA (&frame, comp); + src = img->planes[comp]; + width = GST_VIDEO_FRAME_COMP_WIDTH (&frame, comp) + * GST_VIDEO_FRAME_COMP_PSTRIDE (&frame, comp); + height = GST_VIDEO_FRAME_COMP_HEIGHT (&frame, comp); + deststride = GST_VIDEO_FRAME_COMP_STRIDE (&frame, comp); + srcstride = img->stride[comp]; + + if (srcstride == deststride) { + GST_TRACE_OBJECT (dec, "Stride matches. Comp %d: %d, copying full plane", + comp, srcstride); + memcpy (dest, src, srcstride * height); + } else { + GST_TRACE_OBJECT (dec, "Stride mismatch. Comp %d: %d != %d, copying " + "line by line.", comp, srcstride, deststride); + for (line = 0; line < height; line++) { + memcpy (dest, src, width); + dest += deststride; + src += srcstride; + } + } + } + + gst_video_frame_unmap (&frame); +} + +static GstFlowReturn +gst_vpx_dec_open_codec (GstVPXDec * dec, GstVideoCodecFrame * frame) +{ + int flags = 0; + vpx_codec_stream_info_t stream_info; + vpx_codec_caps_t caps; + vpx_codec_dec_cfg_t cfg; + vpx_codec_err_t status; + GstMapInfo minfo; + GstVPXDecClass *vpxclass = GST_VPX_DEC_GET_CLASS (dec); + + g_return_val_if_fail (vpxclass->codec_algo != NULL, GST_FLOW_ERROR); + + memset (&stream_info, 0, sizeof (stream_info)); + memset (&cfg, 0, sizeof (cfg)); + stream_info.sz = sizeof (stream_info); + + if (!gst_buffer_map (frame->input_buffer, &minfo, GST_MAP_READ)) { + GST_ERROR_OBJECT (dec, "Failed to map input buffer"); + return GST_FLOW_ERROR; + } + + status = vpx_codec_peek_stream_info (vpxclass->codec_algo, + minfo.data, minfo.size, &stream_info); + + gst_buffer_unmap (frame->input_buffer, &minfo); + + if (status != VPX_CODEC_OK) { + GST_WARNING_OBJECT (dec, "VPX preprocessing error: %s", + gst_vpx_error_name (status)); + gst_video_decoder_drop_frame (GST_VIDEO_DECODER (dec), frame); + return GST_FLOW_CUSTOM_SUCCESS_1; + } + if (!stream_info.is_kf) { + GST_WARNING_OBJECT (dec, "No keyframe, skipping"); + gst_video_decoder_drop_frame (GST_VIDEO_DECODER (dec), frame); + return GST_FLOW_CUSTOM_SUCCESS_1; + } + + gst_vpx_dec_set_stream_info (dec, &stream_info); + gst_vpx_dec_set_default_format (dec, GST_VIDEO_FORMAT_I420, stream_info.w, + stream_info.h); + + cfg.w = stream_info.w; + cfg.h = stream_info.h; + cfg.threads = dec->threads; + + caps = vpx_codec_get_caps (vpxclass->codec_algo); + + if (dec->post_processing) { + if (!(caps & VPX_CODEC_CAP_POSTPROC)) { + GST_WARNING_OBJECT (dec, "Decoder does not support post processing"); + } else { + flags |= VPX_CODEC_USE_POSTPROC; + } + } + + status = + vpx_codec_dec_init (&dec->decoder, vpxclass->codec_algo, &cfg, flags); + if (status != VPX_CODEC_OK) { + GST_ELEMENT_ERROR (dec, LIBRARY, INIT, + ("Failed to initialize VP8 decoder"), ("%s", + gst_vpx_error_name (status))); + return GST_FLOW_ERROR; + } + + if ((caps & VPX_CODEC_CAP_POSTPROC) && dec->post_processing) { + vp8_postproc_cfg_t pp_cfg = { 0, }; + + pp_cfg.post_proc_flag = dec->post_processing_flags; + pp_cfg.deblocking_level = dec->deblocking_level; + pp_cfg.noise_level = dec->noise_level; + + status = vpx_codec_control (&dec->decoder, VP8_SET_POSTPROC, &pp_cfg); + if (status != VPX_CODEC_OK) { + GST_WARNING_OBJECT (dec, "Couldn't set postprocessing settings: %s", + gst_vpx_error_name (status)); + } + } +#ifdef HAVE_VPX_1_4 + vpx_codec_set_frame_buffer_functions (&dec->decoder, + gst_vpx_dec_get_buffer_cb, gst_vpx_dec_release_buffer_cb, dec); +#endif + + dec->decoder_inited = TRUE; + + return GST_FLOW_OK; +} + +static GstFlowReturn +gst_vpx_dec_handle_frame (GstVideoDecoder * decoder, GstVideoCodecFrame * frame) +{ + GstVPXDec *dec; + GstFlowReturn ret = GST_FLOW_OK; + vpx_codec_err_t status; + vpx_codec_iter_t iter = NULL; + vpx_image_t *img; + long decoder_deadline = 0; + GstClockTimeDiff deadline; + GstMapInfo minfo; + GstVPXDecClass *vpxclass; + GstVideoFormat fmt; + + GST_LOG_OBJECT (decoder, "handle_frame"); + + dec = GST_VPX_DEC (decoder); + vpxclass = GST_VPX_DEC_GET_CLASS (dec); + + if (!dec->decoder_inited) { + ret = vpxclass->open_codec (dec, frame); + if (ret == GST_FLOW_CUSTOM_SUCCESS_1) + return GST_FLOW_OK; + else if (ret != GST_FLOW_OK) + return ret; + } + + deadline = gst_video_decoder_get_max_decode_time (decoder, frame); + if (deadline < 0) { + decoder_deadline = 1; + } else if (deadline == G_MAXINT64) { + decoder_deadline = 0; + } else { + decoder_deadline = MAX (1, deadline / GST_MSECOND); + } + + if (!gst_buffer_map (frame->input_buffer, &minfo, GST_MAP_READ)) { + GST_ERROR_OBJECT (dec, "Failed to map input buffer"); + return GST_FLOW_ERROR; + } + + status = vpx_codec_decode (&dec->decoder, + minfo.data, minfo.size, NULL, decoder_deadline); + + gst_buffer_unmap (frame->input_buffer, &minfo); + + if (status) { + GST_VIDEO_DECODER_ERROR (decoder, 1, LIBRARY, ENCODE, + ("Failed to decode frame"), ("%s", gst_vpx_error_name (status)), ret); + return ret; + } + + img = vpx_codec_get_frame (&dec->decoder, &iter); + if (img) { + if (vpxclass->get_frame_format (dec, img, &fmt) == FALSE) { + vpx_img_free (img); + GST_ELEMENT_ERROR (decoder, LIBRARY, ENCODE, + ("Failed to decode frame"), ("Unsupported color format %d", + img->fmt)); + return GST_FLOW_ERROR; + } + + if (deadline < 0) { + GST_LOG_OBJECT (dec, "Skipping late frame (%f s past deadline)", + (double) -deadline / GST_SECOND); + gst_video_decoder_drop_frame (decoder, frame); + } else { + gst_vpx_dec_handle_resolution_change (dec, img, fmt); +#ifdef HAVE_VPX_1_4 + if (img->fb_priv && dec->have_video_meta) { + frame->output_buffer = gst_vpx_dec_prepare_image (dec, img); + ret = gst_video_decoder_finish_frame (decoder, frame); + } else +#endif + { + ret = gst_video_decoder_allocate_output_frame (decoder, frame); + + if (ret == GST_FLOW_OK) { + gst_vpx_dec_image_to_buffer (dec, img, frame->output_buffer); + ret = gst_video_decoder_finish_frame (decoder, frame); + } else { + gst_video_decoder_drop_frame (decoder, frame); + } + } + } + + vpx_img_free (img); + + while ((img = vpx_codec_get_frame (&dec->decoder, &iter))) { + GST_WARNING_OBJECT (decoder, "Multiple decoded frames... dropping"); + vpx_img_free (img); + } + } else { + /* Invisible frame */ + GST_VIDEO_CODEC_FRAME_SET_DECODE_ONLY (frame); + gst_video_decoder_finish_frame (decoder, frame); + } + + return ret; +} + +static gboolean +gst_vpx_dec_decide_allocation (GstVideoDecoder * bdec, GstQuery * query) +{ + GstVPXDec *dec = GST_VPX_DEC (bdec); + GstBufferPool *pool; + GstStructure *config; + + if (!GST_VIDEO_DECODER_CLASS (parent_class)->decide_allocation (bdec, query)) + return FALSE; + + g_assert (gst_query_get_n_allocation_pools (query) > 0); + gst_query_parse_nth_allocation_pool (query, 0, &pool, NULL, NULL, NULL); + g_assert (pool != NULL); + + config = gst_buffer_pool_get_config (pool); + if (gst_query_find_allocation_meta (query, GST_VIDEO_META_API_TYPE, NULL)) { + gst_buffer_pool_config_add_option (config, + GST_BUFFER_POOL_OPTION_VIDEO_META); + dec->have_video_meta = TRUE; + } + gst_buffer_pool_set_config (pool, config); + gst_object_unref (pool); + + return TRUE; +} + +static void +gst_vpx_dec_set_stream_info (GstVPXDec * dec, + vpx_codec_stream_info_t * stream_info) +{ + GstVPXDecClass *vpxclass = GST_VPX_DEC_GET_CLASS (dec); + if (vpxclass->set_stream_info != NULL) { + vpxclass->set_stream_info (dec, stream_info); + } +} + +static void +gst_vpx_dec_set_default_format (GstVPXDec * dec, GstVideoFormat fmt, int width, + int height) +{ + GstVPXDecClass *vpxclass = GST_VPX_DEC_GET_CLASS (dec); + if (vpxclass->set_default_format != NULL) { + vpxclass->set_default_format (dec, fmt, width, height); + } +} + +static gboolean +gst_vpx_dec_default_frame_format (GstVPXDec * dec, vpx_image_t * img, + GstVideoFormat * fmt) +{ + if (img->fmt == VPX_IMG_FMT_I420) { + *fmt = GST_VIDEO_FORMAT_I420; + return TRUE; + } else { + return FALSE; + } + +} + +static void +gst_vpx_dec_handle_resolution_change (GstVPXDec * dec, vpx_image_t * img, + GstVideoFormat fmt) +{ + GstVPXDecClass *vpxclass = GST_VPX_DEC_GET_CLASS (dec); + if (vpxclass->handle_resolution_change != NULL) { + vpxclass->handle_resolution_change (dec, img, fmt); + } +} + +#endif /* HAVE_VP8_DECODER || HAVE_VP9_DECODER */ diff --git a/ext/vpx/gstvpxdec.h b/ext/vpx/gstvpxdec.h new file mode 100644 index 0000000000000000000000000000000000000000..6852f860ace3756276215a6c2b47c0f93a286140 --- /dev/null +++ b/ext/vpx/gstvpxdec.h @@ -0,0 +1,113 @@ +/* VPX + * Copyright (C) 2006 David Schleef <ds@schleef.org> + * Copyright (C) 2008,2009,2010 Entropy Wave Inc + * Copyright (C) 2010 Sebastian Dröge <sebastian.droege@collabora.co.uk> + * + * This library is free software; you can redistribute it and/or + * modify it under the terms of the GNU Library General Public + * License as published by the Free Software Foundation; either + * version 2 of the License, or (at your option) any later version. + * + * This library is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Library General Public License for more details. + * + * You should have received a copy of the GNU Library General Public + * License along with this library; if not, write to the + * Free Software Foundation, Inc., 51 Franklin St, Fifth Floor, + * Boston, MA 02110-1301, USA. + * + */ + +#ifndef __GST_VPX_DEC_H__ +#define __GST_VPX_DEC_H__ + +#ifdef HAVE_CONFIG_H +#include "config.h" +#endif + +#if defined(HAVE_VP8_DECODER) || defined(HAVE_VP9_DECODER) + +#include <gst/gst.h> +#include <gst/video/gstvideodecoder.h> + +/* FIXME: Undef HAVE_CONFIG_H because vpx_codec.h uses it, + * which causes compilation failures */ +#ifdef HAVE_CONFIG_H +#undef HAVE_CONFIG_H +#endif + +#include <vpx/vpx_decoder.h> +#include <vpx/vp8dx.h> + +G_BEGIN_DECLS + +#define GST_TYPE_VPX_DEC \ + (gst_vpx_dec_get_type()) +#define GST_VPX_DEC(obj) \ + (G_TYPE_CHECK_INSTANCE_CAST((obj),GST_TYPE_VPX_DEC,GstVPXDec)) +#define GST_VPX_DEC_CLASS(klass) \ + (G_TYPE_CHECK_CLASS_CAST((klass),GST_TYPE_VPX_DEC,GstVPXDecClass)) +#define GST_IS_VPX_DEC(obj) \ + (G_TYPE_CHECK_INSTANCE_TYPE((obj),GST_TYPE_VPX_DEC)) +#define GST_IS_VPX_DEC_CLASS(obj) \ + (G_TYPE_CHECK_CLASS_TYPE((klass),GST_TYPE_VPX_DEC)) +#define GST_VPX_DEC_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), GST_TYPE_VPX_DEC, GstVPXDecClass)) + +typedef struct _GstVPXDec GstVPXDec; +typedef struct _GstVPXDecClass GstVPXDecClass; + +struct _GstVPXDec +{ + GstVideoDecoder base_video_decoder; + + /* < private > */ + vpx_codec_ctx_t decoder; + + /* state */ + gboolean decoder_inited; + + /* properties */ + gboolean post_processing; + enum vp8_postproc_level post_processing_flags; + gint deblocking_level; + gint noise_level; + gint threads; + + GstVideoCodecState *input_state; + GstVideoCodecState *output_state; + + /* allocation */ + gboolean have_video_meta; + GstBufferPool *pool; + gsize buf_size; +}; + +struct _GstVPXDecClass +{ + GstVideoDecoderClass base_video_decoder_class; + const char* video_codec_tag; + /*supported vpx algo*/ + vpx_codec_iface_t* codec_algo; + /*virtual function to open_codec*/ + GstFlowReturn (*open_codec) (GstVPXDec * dec, GstVideoCodecFrame * frame); + /*virtual function to send tags*/ + void (*send_tags) (GstVPXDec* dec); + /*virtual function to set/correct the stream info*/ + void (*set_stream_info) (GstVPXDec *dec, vpx_codec_stream_info_t *stream_info); + /*virtual function to set default format while opening codec*/ + void (*set_default_format) (GstVPXDec *dec, GstVideoFormat fmt, int width, int height); + /*virtual function to negotiate format while handling frame*/ + void (*handle_resolution_change) (GstVPXDec *dec, vpx_image_t *img, GstVideoFormat fmt); + /*virtual function to check valid format*/ + gboolean (*get_frame_format)(GstVPXDec *dec, vpx_image_t *img, GstVideoFormat* fmt); +}; + +GType gst_vpx_dec_get_type (void); + +G_END_DECLS + +#endif + +#endif /* __GST_VP8_DEC_H__ */ diff --git a/ext/vpx/gstvpxenc.c b/ext/vpx/gstvpxenc.c new file mode 100644 index 0000000000000000000000000000000000000000..e56b7669eafccab4db9711a98c707ba2d140a9c5 --- /dev/null +++ b/ext/vpx/gstvpxenc.c @@ -0,0 +1,1941 @@ +/* VPX + * Copyright (C) 2006 David Schleef <ds@schleef.org> + * Copyright (C) 2010 Entropy Wave Inc + * Copyright (C) 2010-2012 Sebastian Dröge <sebastian.droege@collabora.co.uk> + * + * This library is free software; you can redistribute it and/or + * modify it under the terms of the GNU Library General Public + * License as published by the Free Software Foundation; either + * version 2 of the License, or (at your option) any later version. + * + * This library is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Library General Public License for more details. + * + * You should have received a copy of the GNU Library General Public + * License along with this library; if not, write to the + * Free Software Foundation, Inc., 51 Franklin St, Fifth Floor, + * Boston, MA 02110-1301, USA. + * + */ + +#ifdef HAVE_CONFIG_H +#include "config.h" +#endif + +#if defined(HAVE_VP8_ENCODER) || defined(HAVE_VP9_ENCODER) + +/* glib decided in 2.32 it would be a great idea to deprecated GValueArray without + * providing an alternative + * + * See https://bugzilla.gnome.org/show_bug.cgi?id=667228 + * */ +#define GLIB_DISABLE_DEPRECATION_WARNINGS + +#include <gst/tag/tag.h> +#include <gst/video/video.h> +#include <string.h> + +#include "gstvp8utils.h" +#include "gstvpxenc.h" + +GST_DEBUG_CATEGORY_STATIC (gst_vpxenc_debug); +#define GST_CAT_DEFAULT gst_vpxenc_debug + +/* From vp8/vp8_cx_iface.c and vp9/vp9_cx_iface.c */ +#define DEFAULT_PROFILE 0 + +#define DEFAULT_RC_END_USAGE VPX_VBR +#define DEFAULT_RC_TARGET_BITRATE 256000 +#define DEFAULT_RC_MIN_QUANTIZER 4 +#define DEFAULT_RC_MAX_QUANTIZER 63 + +#define DEFAULT_RC_DROPFRAME_THRESH 0 +#define DEFAULT_RC_RESIZE_ALLOWED 0 +#define DEFAULT_RC_RESIZE_UP_THRESH 30 +#define DEFAULT_RC_RESIZE_DOWN_THRESH 60 +#define DEFAULT_RC_UNDERSHOOT_PCT 100 +#define DEFAULT_RC_OVERSHOOT_PCT 100 +#define DEFAULT_RC_BUF_SZ 6000 +#define DEFAULT_RC_BUF_INITIAL_SZ 4000 +#define DEFAULT_RC_BUF_OPTIMAL_SZ 5000 +#define DEFAULT_RC_2PASS_VBR_BIAS_PCT 50 +#define DEFAULT_RC_2PASS_VBR_MINSECTION_PCT 0 +#define DEFAULT_RC_2PASS_VBR_MAXSECTION_PCT 400 + +#define DEFAULT_KF_MODE VPX_KF_AUTO +#define DEFAULT_KF_MAX_DIST 128 + +#define DEFAULT_MULTIPASS_MODE VPX_RC_ONE_PASS +#define DEFAULT_MULTIPASS_CACHE_FILE "multipass.cache" + +#define DEFAULT_TS_NUMBER_LAYERS 1 +#define DEFAULT_TS_TARGET_BITRATE NULL +#define DEFAULT_TS_RATE_DECIMATOR NULL +#define DEFAULT_TS_PERIODICITY 0 +#define DEFAULT_TS_LAYER_ID NULL + +#define DEFAULT_ERROR_RESILIENT 0 +#define DEFAULT_LAG_IN_FRAMES 0 + +#define DEFAULT_THREADS 0 + +#define DEFAULT_H_SCALING_MODE VP8E_NORMAL +#define DEFAULT_V_SCALING_MODE VP8E_NORMAL +#define DEFAULT_CPU_USED 0 +#define DEFAULT_ENABLE_AUTO_ALT_REF FALSE +#define DEFAULT_DEADLINE VPX_DL_BEST_QUALITY +#define DEFAULT_NOISE_SENSITIVITY 0 +#define DEFAULT_SHARPNESS 0 +#define DEFAULT_STATIC_THRESHOLD 0 +#define DEFAULT_TOKEN_PARTITIONS 0 +#define DEFAULT_ARNR_MAXFRAMES 0 +#define DEFAULT_ARNR_STRENGTH 3 +#define DEFAULT_ARNR_TYPE 3 +#define DEFAULT_TUNING VP8_TUNE_PSNR +#define DEFAULT_CQ_LEVEL 10 +#define DEFAULT_MAX_INTRA_BITRATE_PCT 0 +#define DEFAULT_TIMEBASE_N 0 +#define DEFAULT_TIMEBASE_D 1 + +enum +{ + PROP_0, + PROP_RC_END_USAGE, + PROP_RC_TARGET_BITRATE, + PROP_RC_MIN_QUANTIZER, + PROP_RC_MAX_QUANTIZER, + PROP_RC_DROPFRAME_THRESH, + PROP_RC_RESIZE_ALLOWED, + PROP_RC_RESIZE_UP_THRESH, + PROP_RC_RESIZE_DOWN_THRESH, + PROP_RC_UNDERSHOOT_PCT, + PROP_RC_OVERSHOOT_PCT, + PROP_RC_BUF_SZ, + PROP_RC_BUF_INITIAL_SZ, + PROP_RC_BUF_OPTIMAL_SZ, + PROP_RC_2PASS_VBR_BIAS_PCT, + PROP_RC_2PASS_VBR_MINSECTION_PCT, + PROP_RC_2PASS_VBR_MAXSECTION_PCT, + PROP_KF_MODE, + PROP_KF_MAX_DIST, + PROP_TS_NUMBER_LAYERS, + PROP_TS_TARGET_BITRATE, + PROP_TS_RATE_DECIMATOR, + PROP_TS_PERIODICITY, + PROP_TS_LAYER_ID, + PROP_MULTIPASS_MODE, + PROP_MULTIPASS_CACHE_FILE, + PROP_ERROR_RESILIENT, + PROP_LAG_IN_FRAMES, + PROP_THREADS, + PROP_DEADLINE, + PROP_H_SCALING_MODE, + PROP_V_SCALING_MODE, + PROP_CPU_USED, + PROP_ENABLE_AUTO_ALT_REF, + PROP_NOISE_SENSITIVITY, + PROP_SHARPNESS, + PROP_STATIC_THRESHOLD, + PROP_TOKEN_PARTITIONS, + PROP_ARNR_MAXFRAMES, + PROP_ARNR_STRENGTH, + PROP_ARNR_TYPE, + PROP_TUNING, + PROP_CQ_LEVEL, + PROP_MAX_INTRA_BITRATE_PCT, + PROP_TIMEBASE +}; + + +#define GST_VPX_ENC_END_USAGE_TYPE (gst_vpx_enc_end_usage_get_type()) +static GType +gst_vpx_enc_end_usage_get_type (void) +{ + static const GEnumValue values[] = { + {VPX_VBR, "Variable Bit Rate (VBR) mode", "vbr"}, + {VPX_CBR, "Constant Bit Rate (CBR) mode", "cbr"}, + {VPX_CQ, "Constant Quality Mode (CQ) mode", "cq"}, + {0, NULL, NULL} + }; + static volatile GType id = 0; + + if (g_once_init_enter ((gsize *) & id)) { + GType _id; + + _id = g_enum_register_static ("GstVPXEncEndUsage", values); + + g_once_init_leave ((gsize *) & id, _id); + } + + return id; +} + +#define GST_VPX_ENC_MULTIPASS_MODE_TYPE (gst_vpx_enc_multipass_mode_get_type()) +static GType +gst_vpx_enc_multipass_mode_get_type (void) +{ + static const GEnumValue values[] = { + {VPX_RC_ONE_PASS, "One pass encoding (default)", "one-pass"}, + {VPX_RC_FIRST_PASS, "First pass of multipass encoding", "first-pass"}, + {VPX_RC_LAST_PASS, "Last pass of multipass encoding", "last-pass"}, + {0, NULL, NULL} + }; + static volatile GType id = 0; + + if (g_once_init_enter ((gsize *) & id)) { + GType _id; + + _id = g_enum_register_static ("GstVPXEncMultipassMode", values); + + g_once_init_leave ((gsize *) & id, _id); + } + + return id; +} + +#define GST_VPX_ENC_KF_MODE_TYPE (gst_vpx_enc_kf_mode_get_type()) +static GType +gst_vpx_enc_kf_mode_get_type (void) +{ + static const GEnumValue values[] = { + {VPX_KF_AUTO, "Determine optimal placement automatically", "auto"}, + {VPX_KF_DISABLED, "Don't automatically place keyframes", "disabled"}, + {0, NULL, NULL} + }; + static volatile GType id = 0; + + if (g_once_init_enter ((gsize *) & id)) { + GType _id; + + _id = g_enum_register_static ("GstVPXEncKfMode", values); + + g_once_init_leave ((gsize *) & id, _id); + } + + return id; +} + +#define GST_VPX_ENC_TUNING_TYPE (gst_vpx_enc_tuning_get_type()) +static GType +gst_vpx_enc_tuning_get_type (void) +{ + static const GEnumValue values[] = { + {VP8_TUNE_PSNR, "Tune for PSNR", "psnr"}, + {VP8_TUNE_SSIM, "Tune for SSIM", "ssim"}, + {0, NULL, NULL} + }; + static volatile GType id = 0; + + if (g_once_init_enter ((gsize *) & id)) { + GType _id; + + _id = g_enum_register_static ("GstVPXEncTuning", values); + + g_once_init_leave ((gsize *) & id, _id); + } + + return id; +} + +#define GST_VPX_ENC_SCALING_MODE_TYPE (gst_vpx_enc_scaling_mode_get_type()) +static GType +gst_vpx_enc_scaling_mode_get_type (void) +{ + static const GEnumValue values[] = { + {VP8E_NORMAL, "Normal", "normal"}, + {VP8E_FOURFIVE, "4:5", "4:5"}, + {VP8E_THREEFIVE, "3:5", "3:5"}, + {VP8E_ONETWO, "1:2", "1:2"}, + {0, NULL, NULL} + }; + static volatile GType id = 0; + + if (g_once_init_enter ((gsize *) & id)) { + GType _id; + + _id = g_enum_register_static ("GstVPXEncScalingMode", values); + + g_once_init_leave ((gsize *) & id, _id); + } + + return id; +} + +#define GST_VPX_ENC_TOKEN_PARTITIONS_TYPE (gst_vpx_enc_token_partitions_get_type()) +static GType +gst_vpx_enc_token_partitions_get_type (void) +{ + static const GEnumValue values[] = { + {VP8_ONE_TOKENPARTITION, "One token partition", "1"}, + {VP8_TWO_TOKENPARTITION, "Two token partitions", "2"}, + {VP8_FOUR_TOKENPARTITION, "Four token partitions", "4"}, + {VP8_EIGHT_TOKENPARTITION, "Eight token partitions", "8"}, + {0, NULL, NULL} + }; + static volatile GType id = 0; + + if (g_once_init_enter ((gsize *) & id)) { + GType _id; + + _id = g_enum_register_static ("GstVPXEncTokenPartitions", values); + + g_once_init_leave ((gsize *) & id, _id); + } + + return id; +} + +#define GST_VPX_ENC_ER_FLAGS_TYPE (gst_vpx_enc_er_flags_get_type()) +static GType +gst_vpx_enc_er_flags_get_type (void) +{ + static const GFlagsValue values[] = { + {VPX_ERROR_RESILIENT_DEFAULT, "Default error resilience", "default"}, + {VPX_ERROR_RESILIENT_PARTITIONS, + "Allow partitions to be decoded independently", "partitions"}, + {0, NULL, NULL} + }; + static volatile GType id = 0; + + if (g_once_init_enter ((gsize *) & id)) { + GType _id; + + _id = g_flags_register_static ("GstVPXEncErFlags", values); + + g_once_init_leave ((gsize *) & id, _id); + } + + return id; +} + +static void gst_vpx_enc_finalize (GObject * object); +static void gst_vpx_enc_set_property (GObject * object, guint prop_id, + const GValue * value, GParamSpec * pspec); +static void gst_vpx_enc_get_property (GObject * object, guint prop_id, + GValue * value, GParamSpec * pspec); + +static gboolean gst_vpx_enc_start (GstVideoEncoder * encoder); +static gboolean gst_vpx_enc_stop (GstVideoEncoder * encoder); +static gboolean gst_vpx_enc_set_format (GstVideoEncoder * + video_encoder, GstVideoCodecState * state); +static GstFlowReturn gst_vpx_enc_finish (GstVideoEncoder * video_encoder); +static gboolean gst_vpx_enc_flush (GstVideoEncoder * video_encoder); +static GstFlowReturn gst_vpx_enc_drain (GstVideoEncoder * video_encoder); +static GstFlowReturn gst_vpx_enc_handle_frame (GstVideoEncoder * + video_encoder, GstVideoCodecFrame * frame); +static gboolean gst_vpx_enc_sink_event (GstVideoEncoder * + video_encoder, GstEvent * event); +static gboolean gst_vpx_enc_propose_allocation (GstVideoEncoder * encoder, + GstQuery * query); + +#define parent_class gst_vpx_enc_parent_class +G_DEFINE_TYPE_WITH_CODE (GstVPXEnc, gst_vpx_enc, GST_TYPE_VIDEO_ENCODER, + G_IMPLEMENT_INTERFACE (GST_TYPE_TAG_SETTER, NULL); + G_IMPLEMENT_INTERFACE (GST_TYPE_PRESET, NULL);); + +static void +gst_vpx_enc_class_init (GstVPXEncClass * klass) +{ + GObjectClass *gobject_class; + GstVideoEncoderClass *video_encoder_class; + + gobject_class = G_OBJECT_CLASS (klass); + video_encoder_class = GST_VIDEO_ENCODER_CLASS (klass); + + gobject_class->set_property = gst_vpx_enc_set_property; + gobject_class->get_property = gst_vpx_enc_get_property; + gobject_class->finalize = gst_vpx_enc_finalize; + + video_encoder_class->start = gst_vpx_enc_start; + video_encoder_class->stop = gst_vpx_enc_stop; + video_encoder_class->handle_frame = gst_vpx_enc_handle_frame; + video_encoder_class->set_format = gst_vpx_enc_set_format; + video_encoder_class->flush = gst_vpx_enc_flush; + video_encoder_class->finish = gst_vpx_enc_finish; + video_encoder_class->sink_event = gst_vpx_enc_sink_event; + video_encoder_class->propose_allocation = gst_vpx_enc_propose_allocation; + + g_object_class_install_property (gobject_class, PROP_RC_END_USAGE, + g_param_spec_enum ("end-usage", "Rate control mode", + "Rate control mode", + GST_VPX_ENC_END_USAGE_TYPE, DEFAULT_RC_END_USAGE, + (GParamFlags) (G_PARAM_READWRITE | G_PARAM_STATIC_STRINGS))); + + g_object_class_install_property (gobject_class, PROP_RC_TARGET_BITRATE, + g_param_spec_int ("target-bitrate", "Target bitrate", + "Target bitrate (in bits/sec)", + 0, G_MAXINT, DEFAULT_RC_TARGET_BITRATE, + (GParamFlags) (G_PARAM_READWRITE | G_PARAM_STATIC_STRINGS))); + + g_object_class_install_property (gobject_class, PROP_RC_MIN_QUANTIZER, + g_param_spec_int ("min-quantizer", "Minimum Quantizer", + "Minimum Quantizer (best)", + 0, 63, DEFAULT_RC_MIN_QUANTIZER, + (GParamFlags) (G_PARAM_READWRITE | G_PARAM_STATIC_STRINGS))); + + g_object_class_install_property (gobject_class, PROP_RC_MAX_QUANTIZER, + g_param_spec_int ("max-quantizer", "Maximum Quantizer", + "Maximum Quantizer (worst)", + 0, 63, DEFAULT_RC_MAX_QUANTIZER, + (GParamFlags) (G_PARAM_READWRITE | G_PARAM_STATIC_STRINGS))); + + g_object_class_install_property (gobject_class, PROP_RC_DROPFRAME_THRESH, + g_param_spec_int ("dropframe-threshold", "Drop Frame Threshold", + "Temporal resampling threshold (buf %)", + 0, 100, DEFAULT_RC_DROPFRAME_THRESH, + (GParamFlags) (G_PARAM_READWRITE | G_PARAM_STATIC_STRINGS))); + + g_object_class_install_property (gobject_class, PROP_RC_RESIZE_ALLOWED, + g_param_spec_boolean ("resize-allowed", "Resize Allowed", + "Allow spatial resampling", + DEFAULT_RC_RESIZE_ALLOWED, + (GParamFlags) (G_PARAM_READWRITE | G_PARAM_STATIC_STRINGS))); + + g_object_class_install_property (gobject_class, PROP_RC_RESIZE_UP_THRESH, + g_param_spec_int ("resize-up-threshold", "Resize Up Threshold", + "Upscale threshold (buf %)", + 0, 100, DEFAULT_RC_RESIZE_UP_THRESH, + (GParamFlags) (G_PARAM_READWRITE | G_PARAM_STATIC_STRINGS))); + + g_object_class_install_property (gobject_class, PROP_RC_RESIZE_DOWN_THRESH, + g_param_spec_int ("resize-down-threshold", "Resize Down Threshold", + "Downscale threshold (buf %)", + 0, 100, DEFAULT_RC_RESIZE_DOWN_THRESH, + (GParamFlags) (G_PARAM_READWRITE | G_PARAM_STATIC_STRINGS))); + + g_object_class_install_property (gobject_class, PROP_RC_UNDERSHOOT_PCT, + g_param_spec_int ("undershoot", "Undershoot PCT", + "Datarate undershoot (min) target (%)", + 0, 1000, DEFAULT_RC_UNDERSHOOT_PCT, + (GParamFlags) (G_PARAM_READWRITE | G_PARAM_STATIC_STRINGS))); + + g_object_class_install_property (gobject_class, PROP_RC_OVERSHOOT_PCT, + g_param_spec_int ("overshoot", "Overshoot PCT", + "Datarate overshoot (max) target (%)", + 0, 1000, DEFAULT_RC_OVERSHOOT_PCT, + (GParamFlags) (G_PARAM_READWRITE | G_PARAM_STATIC_STRINGS))); + + g_object_class_install_property (gobject_class, PROP_RC_BUF_SZ, + g_param_spec_int ("buffer-size", "Buffer size", + "Client buffer size (ms)", + 0, G_MAXINT, DEFAULT_RC_BUF_SZ, + (GParamFlags) (G_PARAM_READWRITE | G_PARAM_STATIC_STRINGS))); + + g_object_class_install_property (gobject_class, PROP_RC_BUF_INITIAL_SZ, + g_param_spec_int ("buffer-initial-size", "Buffer initial size", + "Initial client buffer size (ms)", + 0, G_MAXINT, DEFAULT_RC_BUF_INITIAL_SZ, + (GParamFlags) (G_PARAM_READWRITE | G_PARAM_STATIC_STRINGS))); + + g_object_class_install_property (gobject_class, PROP_RC_BUF_OPTIMAL_SZ, + g_param_spec_int ("buffer-optimal-size", "Buffer optimal size", + "Optimal client buffer size (ms)", + 0, G_MAXINT, DEFAULT_RC_BUF_OPTIMAL_SZ, + (GParamFlags) (G_PARAM_READWRITE | G_PARAM_STATIC_STRINGS))); + + g_object_class_install_property (gobject_class, PROP_RC_2PASS_VBR_BIAS_PCT, + g_param_spec_int ("twopass-vbr-bias", "2-pass VBR bias", + "CBR/VBR bias (0=CBR, 100=VBR)", + 0, 100, DEFAULT_RC_2PASS_VBR_BIAS_PCT, + (GParamFlags) (G_PARAM_READWRITE | G_PARAM_STATIC_STRINGS))); + + g_object_class_install_property (gobject_class, + PROP_RC_2PASS_VBR_MINSECTION_PCT, + g_param_spec_int ("twopass-vbr-minsection", "2-pass GOP min bitrate", + "GOP minimum bitrate (% target)", 0, G_MAXINT, + DEFAULT_RC_2PASS_VBR_MINSECTION_PCT, + (GParamFlags) (G_PARAM_READWRITE | G_PARAM_STATIC_STRINGS))); + + g_object_class_install_property (gobject_class, + PROP_RC_2PASS_VBR_MAXSECTION_PCT, + g_param_spec_int ("twopass-vbr-maxsection", "2-pass GOP max bitrate", + "GOP maximum bitrate (% target)", 0, G_MAXINT, + DEFAULT_RC_2PASS_VBR_MINSECTION_PCT, + (GParamFlags) (G_PARAM_READWRITE | G_PARAM_STATIC_STRINGS))); + + g_object_class_install_property (gobject_class, PROP_KF_MODE, + g_param_spec_enum ("keyframe-mode", "Keyframe Mode", + "Keyframe placement", + GST_VPX_ENC_KF_MODE_TYPE, DEFAULT_KF_MODE, + (GParamFlags) (G_PARAM_READWRITE | G_PARAM_STATIC_STRINGS))); + + g_object_class_install_property (gobject_class, PROP_KF_MAX_DIST, + g_param_spec_int ("keyframe-max-dist", "Keyframe max distance", + "Maximum distance between keyframes (number of frames)", + 0, G_MAXINT, DEFAULT_KF_MAX_DIST, + (GParamFlags) (G_PARAM_READWRITE | G_PARAM_STATIC_STRINGS))); + + g_object_class_install_property (gobject_class, PROP_MULTIPASS_MODE, + g_param_spec_enum ("multipass-mode", "Multipass Mode", + "Multipass encode mode", + GST_VPX_ENC_MULTIPASS_MODE_TYPE, DEFAULT_MULTIPASS_MODE, + (GParamFlags) (G_PARAM_READWRITE | G_PARAM_STATIC_STRINGS))); + + g_object_class_install_property (gobject_class, PROP_MULTIPASS_CACHE_FILE, + g_param_spec_string ("multipass-cache-file", "Multipass Cache File", + "Multipass cache file. " + "If stream caps reinited, multiple files will be created: " + "file, file.1, file.2, ... and so on.", + DEFAULT_MULTIPASS_CACHE_FILE, + (GParamFlags) (G_PARAM_READWRITE | G_PARAM_STATIC_STRINGS))); + + g_object_class_install_property (gobject_class, PROP_TS_NUMBER_LAYERS, + g_param_spec_int ("temporal-scalability-number-layers", + "Number of coding layers", "Number of coding layers to use", 1, 5, + DEFAULT_TS_NUMBER_LAYERS, + (GParamFlags) (G_PARAM_READWRITE | G_PARAM_STATIC_STRINGS))); + + g_object_class_install_property (gobject_class, PROP_TS_TARGET_BITRATE, + g_param_spec_value_array ("temporal-scalability-target-bitrate", + "Coding layer target bitrates", + "Target bitrates for coding layers (one per layer, decreasing)", + g_param_spec_int ("target-bitrate", "Target bitrate", + "Target bitrate", 0, G_MAXINT, DEFAULT_RC_TARGET_BITRATE, + G_PARAM_READWRITE | G_PARAM_STATIC_STRINGS), + G_PARAM_READWRITE | G_PARAM_STATIC_STRINGS)); + + g_object_class_install_property (gobject_class, PROP_TS_RATE_DECIMATOR, + g_param_spec_value_array ("temporal-scalability-rate-decimator", + "Coding layer rate decimator", + "Rate decimation factors for each layer", + g_param_spec_int ("rate-decimator", "Rate decimator", + "Rate decimator", 0, 1000000000, 0, + G_PARAM_READWRITE | G_PARAM_STATIC_STRINGS), + G_PARAM_READWRITE | G_PARAM_STATIC_STRINGS)); + + g_object_class_install_property (gobject_class, PROP_TS_PERIODICITY, + g_param_spec_int ("temporal-scalability-periodicity", + "Coding layer periodicity", + "Length of sequence that defines layer membership periodicity", 0, 16, + DEFAULT_TS_PERIODICITY, + (GParamFlags) (G_PARAM_READWRITE | G_PARAM_STATIC_STRINGS))); + + g_object_class_install_property (gobject_class, PROP_TS_LAYER_ID, + g_param_spec_value_array ("temporal-scalability-layer-id", + "Coding layer identification", + "Sequence defining coding layer membership", + g_param_spec_int ("layer-id", "Layer ID", "Layer ID", 0, 4, 0, + G_PARAM_READWRITE | G_PARAM_STATIC_STRINGS), + G_PARAM_READWRITE | G_PARAM_STATIC_STRINGS)); + + g_object_class_install_property (gobject_class, PROP_LAG_IN_FRAMES, + g_param_spec_int ("lag-in-frames", "Lag in frames", + "Maximum number of frames to lag", + 0, 25, DEFAULT_LAG_IN_FRAMES, + (GParamFlags) (G_PARAM_READWRITE | G_PARAM_STATIC_STRINGS))); + + g_object_class_install_property (gobject_class, PROP_ERROR_RESILIENT, + g_param_spec_flags ("error-resilient", "Error resilient", + "Error resilience flags", + GST_VPX_ENC_ER_FLAGS_TYPE, DEFAULT_ERROR_RESILIENT, + (GParamFlags) (G_PARAM_READWRITE | G_PARAM_STATIC_STRINGS))); + + g_object_class_install_property (gobject_class, PROP_THREADS, + g_param_spec_int ("threads", "Threads", + "Number of threads to use", + 0, 64, DEFAULT_THREADS, + (GParamFlags) (G_PARAM_READWRITE | G_PARAM_STATIC_STRINGS))); + + g_object_class_install_property (gobject_class, PROP_DEADLINE, + g_param_spec_int64 ("deadline", "Deadline", + "Deadline per frame (usec, 0=disabled)", + 0, G_MAXINT64, DEFAULT_DEADLINE, + (GParamFlags) (G_PARAM_READWRITE | G_PARAM_STATIC_STRINGS))); + + g_object_class_install_property (gobject_class, PROP_H_SCALING_MODE, + g_param_spec_enum ("horizontal-scaling-mode", "Horizontal scaling mode", + "Horizontal scaling mode", + GST_VPX_ENC_SCALING_MODE_TYPE, DEFAULT_H_SCALING_MODE, + (GParamFlags) (G_PARAM_READWRITE | G_PARAM_STATIC_STRINGS))); + + g_object_class_install_property (gobject_class, PROP_V_SCALING_MODE, + g_param_spec_enum ("vertical-scaling-mode", "Vertical scaling mode", + "Vertical scaling mode", + GST_VPX_ENC_SCALING_MODE_TYPE, DEFAULT_V_SCALING_MODE, + (GParamFlags) (G_PARAM_READWRITE | G_PARAM_STATIC_STRINGS))); + + g_object_class_install_property (gobject_class, PROP_CPU_USED, + g_param_spec_int ("cpu-used", "CPU used", + "CPU used", + -16, 16, DEFAULT_CPU_USED, + (GParamFlags) (G_PARAM_READWRITE | G_PARAM_STATIC_STRINGS))); + + g_object_class_install_property (gobject_class, PROP_ENABLE_AUTO_ALT_REF, + g_param_spec_boolean ("auto-alt-ref", "Auto alt reference frames", + "Automatically generate AltRef frames", + DEFAULT_ENABLE_AUTO_ALT_REF, + (GParamFlags) (G_PARAM_READWRITE | G_PARAM_STATIC_STRINGS))); + + g_object_class_install_property (gobject_class, PROP_NOISE_SENSITIVITY, + g_param_spec_int ("noise-sensitivity", "Noise sensitivity", + "Noise sensisivity (frames to blur)", + 0, 6, DEFAULT_NOISE_SENSITIVITY, + (GParamFlags) (G_PARAM_READWRITE | G_PARAM_STATIC_STRINGS))); + + g_object_class_install_property (gobject_class, PROP_SHARPNESS, + g_param_spec_int ("sharpness", "Sharpness", + "Filter sharpness", + 0, 7, DEFAULT_SHARPNESS, + (GParamFlags) (G_PARAM_READWRITE | G_PARAM_STATIC_STRINGS))); + + g_object_class_install_property (gobject_class, PROP_STATIC_THRESHOLD, + g_param_spec_int ("static-threshold", "Static Threshold", + "Motion detection threshold", + 0, G_MAXINT, DEFAULT_STATIC_THRESHOLD, + (GParamFlags) (G_PARAM_READWRITE | G_PARAM_STATIC_STRINGS))); + + g_object_class_install_property (gobject_class, PROP_TOKEN_PARTITIONS, + g_param_spec_enum ("token-partitions", "Token partitions", + "Number of token partitions", + GST_VPX_ENC_TOKEN_PARTITIONS_TYPE, DEFAULT_TOKEN_PARTITIONS, + (GParamFlags) (G_PARAM_READWRITE | G_PARAM_STATIC_STRINGS))); + + g_object_class_install_property (gobject_class, PROP_ARNR_MAXFRAMES, + g_param_spec_int ("arnr-maxframes", "AltRef max frames", + "AltRef maximum number of frames", + 0, 15, DEFAULT_ARNR_MAXFRAMES, + (GParamFlags) (G_PARAM_READWRITE | G_PARAM_STATIC_STRINGS))); + + g_object_class_install_property (gobject_class, PROP_ARNR_STRENGTH, + g_param_spec_int ("arnr-strength", "AltRef strength", + "AltRef strength", + 0, 6, DEFAULT_ARNR_STRENGTH, + (GParamFlags) (G_PARAM_READWRITE | G_PARAM_STATIC_STRINGS))); + + g_object_class_install_property (gobject_class, PROP_ARNR_TYPE, + g_param_spec_int ("arnr-type", "AltRef type", + "AltRef type", + 1, 3, DEFAULT_ARNR_TYPE, + (GParamFlags) (G_PARAM_READWRITE | G_PARAM_STATIC_STRINGS | + G_PARAM_DEPRECATED))); + + g_object_class_install_property (gobject_class, PROP_TUNING, + g_param_spec_enum ("tuning", "Tuning", + "Tuning", + GST_VPX_ENC_TUNING_TYPE, DEFAULT_TUNING, + (GParamFlags) (G_PARAM_READWRITE | G_PARAM_STATIC_STRINGS))); + + g_object_class_install_property (gobject_class, PROP_CQ_LEVEL, + g_param_spec_int ("cq-level", "Constrained quality level", + "Constrained quality level", + 0, 63, DEFAULT_CQ_LEVEL, + (GParamFlags) (G_PARAM_READWRITE | G_PARAM_STATIC_STRINGS))); + + g_object_class_install_property (gobject_class, PROP_MAX_INTRA_BITRATE_PCT, + g_param_spec_int ("max-intra-bitrate", "Max Intra bitrate", + "Maximum Intra frame bitrate", + 0, G_MAXINT, DEFAULT_MAX_INTRA_BITRATE_PCT, + (GParamFlags) (G_PARAM_READWRITE | G_PARAM_STATIC_STRINGS))); + + g_object_class_install_property (gobject_class, PROP_TIMEBASE, + gst_param_spec_fraction ("timebase", "Shortest interframe time", + "Fraction of one second that is the shortest interframe time - normally left as zero which will default to the framerate", + 0, 1, G_MAXINT, 1, DEFAULT_TIMEBASE_N, DEFAULT_TIMEBASE_D, + G_PARAM_READWRITE | G_PARAM_STATIC_STRINGS)); + + GST_DEBUG_CATEGORY_INIT (gst_vpxenc_debug, "vpxenc", 0, "VPX Encoder"); +} + +static void +gst_vpx_enc_init (GstVPXEnc * gst_vpx_enc) +{ + GST_DEBUG_OBJECT (gst_vpx_enc, "init"); + GST_PAD_SET_ACCEPT_TEMPLATE (GST_VIDEO_ENCODER_SINK_PAD (gst_vpx_enc)); + + gst_vpx_enc->cfg.rc_end_usage = DEFAULT_RC_END_USAGE; + gst_vpx_enc->cfg.rc_target_bitrate = DEFAULT_RC_TARGET_BITRATE / 1000; + gst_vpx_enc->rc_target_bitrate_set = FALSE; + gst_vpx_enc->cfg.rc_min_quantizer = DEFAULT_RC_MIN_QUANTIZER; + gst_vpx_enc->cfg.rc_max_quantizer = DEFAULT_RC_MAX_QUANTIZER; + gst_vpx_enc->cfg.rc_dropframe_thresh = DEFAULT_RC_DROPFRAME_THRESH; + gst_vpx_enc->cfg.rc_resize_allowed = DEFAULT_RC_RESIZE_ALLOWED; + gst_vpx_enc->cfg.rc_resize_up_thresh = DEFAULT_RC_RESIZE_UP_THRESH; + gst_vpx_enc->cfg.rc_resize_down_thresh = DEFAULT_RC_RESIZE_DOWN_THRESH; + gst_vpx_enc->cfg.rc_undershoot_pct = DEFAULT_RC_UNDERSHOOT_PCT; + gst_vpx_enc->cfg.rc_overshoot_pct = DEFAULT_RC_OVERSHOOT_PCT; + gst_vpx_enc->cfg.rc_buf_sz = DEFAULT_RC_BUF_SZ; + gst_vpx_enc->cfg.rc_buf_initial_sz = DEFAULT_RC_BUF_INITIAL_SZ; + gst_vpx_enc->cfg.rc_buf_optimal_sz = DEFAULT_RC_BUF_OPTIMAL_SZ; + gst_vpx_enc->cfg.rc_2pass_vbr_bias_pct = DEFAULT_RC_2PASS_VBR_BIAS_PCT; + gst_vpx_enc->cfg.rc_2pass_vbr_minsection_pct = + DEFAULT_RC_2PASS_VBR_MINSECTION_PCT; + gst_vpx_enc->cfg.rc_2pass_vbr_maxsection_pct = + DEFAULT_RC_2PASS_VBR_MAXSECTION_PCT; + gst_vpx_enc->cfg.kf_mode = DEFAULT_KF_MODE; + gst_vpx_enc->cfg.kf_max_dist = DEFAULT_KF_MAX_DIST; + gst_vpx_enc->cfg.g_pass = DEFAULT_MULTIPASS_MODE; + gst_vpx_enc->multipass_cache_prefix = g_strdup (DEFAULT_MULTIPASS_CACHE_FILE); + gst_vpx_enc->multipass_cache_file = NULL; + gst_vpx_enc->multipass_cache_idx = 0; + gst_vpx_enc->cfg.ts_number_layers = DEFAULT_TS_NUMBER_LAYERS; + gst_vpx_enc->n_ts_target_bitrate = 0; + gst_vpx_enc->n_ts_rate_decimator = 0; + gst_vpx_enc->cfg.ts_periodicity = DEFAULT_TS_PERIODICITY; + gst_vpx_enc->n_ts_layer_id = 0; + gst_vpx_enc->cfg.g_error_resilient = DEFAULT_ERROR_RESILIENT; + gst_vpx_enc->cfg.g_lag_in_frames = DEFAULT_LAG_IN_FRAMES; + gst_vpx_enc->cfg.g_threads = DEFAULT_THREADS; + gst_vpx_enc->deadline = DEFAULT_DEADLINE; + gst_vpx_enc->h_scaling_mode = DEFAULT_H_SCALING_MODE; + gst_vpx_enc->v_scaling_mode = DEFAULT_V_SCALING_MODE; + gst_vpx_enc->cpu_used = DEFAULT_CPU_USED; + gst_vpx_enc->enable_auto_alt_ref = DEFAULT_ENABLE_AUTO_ALT_REF; + gst_vpx_enc->noise_sensitivity = DEFAULT_NOISE_SENSITIVITY; + gst_vpx_enc->sharpness = DEFAULT_SHARPNESS; + gst_vpx_enc->static_threshold = DEFAULT_STATIC_THRESHOLD; + gst_vpx_enc->token_partitions = DEFAULT_TOKEN_PARTITIONS; + gst_vpx_enc->arnr_maxframes = DEFAULT_ARNR_MAXFRAMES; + gst_vpx_enc->arnr_strength = DEFAULT_ARNR_STRENGTH; + gst_vpx_enc->arnr_type = DEFAULT_ARNR_TYPE; + gst_vpx_enc->tuning = DEFAULT_TUNING; + gst_vpx_enc->cq_level = DEFAULT_CQ_LEVEL; + gst_vpx_enc->max_intra_bitrate_pct = DEFAULT_MAX_INTRA_BITRATE_PCT; + gst_vpx_enc->timebase_n = DEFAULT_TIMEBASE_N; + gst_vpx_enc->timebase_d = DEFAULT_TIMEBASE_D; + + gst_vpx_enc->cfg.g_profile = DEFAULT_PROFILE; + + g_mutex_init (&gst_vpx_enc->encoder_lock); +} + +static void +gst_vpx_enc_finalize (GObject * object) +{ + GstVPXEnc *gst_vpx_enc; + + GST_DEBUG_OBJECT (object, "finalize"); + + g_return_if_fail (GST_IS_VPX_ENC (object)); + gst_vpx_enc = GST_VPX_ENC (object); + + g_free (gst_vpx_enc->multipass_cache_prefix); + g_free (gst_vpx_enc->multipass_cache_file); + gst_vpx_enc->multipass_cache_idx = 0; + + + if (gst_vpx_enc->input_state) + gst_video_codec_state_unref (gst_vpx_enc->input_state); + + g_mutex_clear (&gst_vpx_enc->encoder_lock); + + G_OBJECT_CLASS (parent_class)->finalize (object); +} + +static void +gst_vpx_enc_set_property (GObject * object, guint prop_id, + const GValue * value, GParamSpec * pspec) +{ + GstVPXEnc *gst_vpx_enc; + gboolean global = FALSE; + vpx_codec_err_t status; + + g_return_if_fail (GST_IS_VPX_ENC (object)); + gst_vpx_enc = GST_VPX_ENC (object); + + GST_DEBUG_OBJECT (object, "gst_vpx_enc_set_property"); + g_mutex_lock (&gst_vpx_enc->encoder_lock); + switch (prop_id) { + case PROP_RC_END_USAGE: + gst_vpx_enc->cfg.rc_end_usage = g_value_get_enum (value); + global = TRUE; + break; + case PROP_RC_TARGET_BITRATE: + gst_vpx_enc->cfg.rc_target_bitrate = g_value_get_int (value) / 1000; + gst_vpx_enc->rc_target_bitrate_set = TRUE; + global = TRUE; + break; + case PROP_RC_MIN_QUANTIZER: + gst_vpx_enc->cfg.rc_min_quantizer = g_value_get_int (value); + global = TRUE; + break; + case PROP_RC_MAX_QUANTIZER: + gst_vpx_enc->cfg.rc_max_quantizer = g_value_get_int (value); + global = TRUE; + break; + case PROP_RC_DROPFRAME_THRESH: + gst_vpx_enc->cfg.rc_dropframe_thresh = g_value_get_int (value); + global = TRUE; + break; + case PROP_RC_RESIZE_ALLOWED: + gst_vpx_enc->cfg.rc_resize_allowed = g_value_get_boolean (value); + global = TRUE; + break; + case PROP_RC_RESIZE_UP_THRESH: + gst_vpx_enc->cfg.rc_resize_up_thresh = g_value_get_int (value); + global = TRUE; + break; + case PROP_RC_RESIZE_DOWN_THRESH: + gst_vpx_enc->cfg.rc_resize_down_thresh = g_value_get_int (value); + global = TRUE; + break; + case PROP_RC_UNDERSHOOT_PCT: + gst_vpx_enc->cfg.rc_undershoot_pct = g_value_get_int (value); + global = TRUE; + break; + case PROP_RC_OVERSHOOT_PCT: + gst_vpx_enc->cfg.rc_overshoot_pct = g_value_get_int (value); + global = TRUE; + break; + case PROP_RC_BUF_SZ: + gst_vpx_enc->cfg.rc_buf_sz = g_value_get_int (value); + global = TRUE; + break; + case PROP_RC_BUF_INITIAL_SZ: + gst_vpx_enc->cfg.rc_buf_initial_sz = g_value_get_int (value); + global = TRUE; + break; + case PROP_RC_BUF_OPTIMAL_SZ: + gst_vpx_enc->cfg.rc_buf_optimal_sz = g_value_get_int (value); + global = TRUE; + break; + case PROP_RC_2PASS_VBR_BIAS_PCT: + gst_vpx_enc->cfg.rc_2pass_vbr_bias_pct = g_value_get_int (value); + global = TRUE; + break; + case PROP_RC_2PASS_VBR_MINSECTION_PCT: + gst_vpx_enc->cfg.rc_2pass_vbr_minsection_pct = g_value_get_int (value); + global = TRUE; + break; + case PROP_RC_2PASS_VBR_MAXSECTION_PCT: + gst_vpx_enc->cfg.rc_2pass_vbr_maxsection_pct = g_value_get_int (value); + global = TRUE; + break; + case PROP_KF_MODE: + gst_vpx_enc->cfg.kf_mode = g_value_get_enum (value); + global = TRUE; + break; + case PROP_KF_MAX_DIST: + gst_vpx_enc->cfg.kf_max_dist = g_value_get_int (value); + global = TRUE; + break; + case PROP_MULTIPASS_MODE: + gst_vpx_enc->cfg.g_pass = g_value_get_enum (value); + global = TRUE; + break; + case PROP_MULTIPASS_CACHE_FILE: + if (gst_vpx_enc->multipass_cache_prefix) + g_free (gst_vpx_enc->multipass_cache_prefix); + gst_vpx_enc->multipass_cache_prefix = g_value_dup_string (value); + break; + case PROP_TS_NUMBER_LAYERS: + gst_vpx_enc->cfg.ts_number_layers = g_value_get_int (value); + global = TRUE; + break; + case PROP_TS_TARGET_BITRATE:{ + GValueArray *va = g_value_get_boxed (value); + + memset (&gst_vpx_enc->cfg.ts_target_bitrate, 0, + sizeof (gst_vpx_enc->cfg.ts_target_bitrate)); + if (va == NULL) { + gst_vpx_enc->n_ts_target_bitrate = 0; + } else if (va->n_values > VPX_TS_MAX_LAYERS) { + g_warning ("%s: Only %d layers allowed at maximum", + GST_ELEMENT_NAME (gst_vpx_enc), VPX_TS_MAX_LAYERS); + } else { + gint i; + + for (i = 0; i < va->n_values; i++) + gst_vpx_enc->cfg.ts_target_bitrate[i] = + g_value_get_int (g_value_array_get_nth (va, i)); + gst_vpx_enc->n_ts_target_bitrate = va->n_values; + } + global = TRUE; + break; + } + case PROP_TS_RATE_DECIMATOR:{ + GValueArray *va = g_value_get_boxed (value); + + memset (&gst_vpx_enc->cfg.ts_rate_decimator, 0, + sizeof (gst_vpx_enc->cfg.ts_rate_decimator)); + if (va == NULL) { + gst_vpx_enc->n_ts_rate_decimator = 0; + } else if (va->n_values > VPX_TS_MAX_LAYERS) { + g_warning ("%s: Only %d layers allowed at maximum", + GST_ELEMENT_NAME (gst_vpx_enc), VPX_TS_MAX_LAYERS); + } else { + gint i; + + for (i = 0; i < va->n_values; i++) + gst_vpx_enc->cfg.ts_rate_decimator[i] = + g_value_get_int (g_value_array_get_nth (va, i)); + gst_vpx_enc->n_ts_rate_decimator = va->n_values; + } + global = TRUE; + break; + } + case PROP_TS_PERIODICITY: + gst_vpx_enc->cfg.ts_periodicity = g_value_get_int (value); + global = TRUE; + break; + case PROP_TS_LAYER_ID:{ + GValueArray *va = g_value_get_boxed (value); + + memset (&gst_vpx_enc->cfg.ts_layer_id, 0, + sizeof (gst_vpx_enc->cfg.ts_layer_id)); + if (va && va->n_values > VPX_TS_MAX_PERIODICITY) { + g_warning ("%s: Only %d sized layer sequences allowed at maximum", + GST_ELEMENT_NAME (gst_vpx_enc), VPX_TS_MAX_PERIODICITY); + } else if (va) { + gint i; + + for (i = 0; i < va->n_values; i++) + gst_vpx_enc->cfg.ts_layer_id[i] = + g_value_get_int (g_value_array_get_nth (va, i)); + gst_vpx_enc->n_ts_layer_id = va->n_values; + } else { + gst_vpx_enc->n_ts_layer_id = 0; + } + global = TRUE; + break; + } + case PROP_ERROR_RESILIENT: + gst_vpx_enc->cfg.g_error_resilient = g_value_get_flags (value); + global = TRUE; + break; + case PROP_LAG_IN_FRAMES: + gst_vpx_enc->cfg.g_lag_in_frames = g_value_get_int (value); + global = TRUE; + break; + case PROP_THREADS: + gst_vpx_enc->cfg.g_threads = g_value_get_int (value); + global = TRUE; + break; + case PROP_DEADLINE: + gst_vpx_enc->deadline = g_value_get_int64 (value); + break; + case PROP_H_SCALING_MODE: + gst_vpx_enc->h_scaling_mode = g_value_get_enum (value); + if (gst_vpx_enc->inited) { + vpx_scaling_mode_t sm; + + sm.h_scaling_mode = gst_vpx_enc->h_scaling_mode; + sm.v_scaling_mode = gst_vpx_enc->v_scaling_mode; + + status = + vpx_codec_control (&gst_vpx_enc->encoder, VP8E_SET_SCALEMODE, &sm); + if (status != VPX_CODEC_OK) { + GST_WARNING_OBJECT (gst_vpx_enc, + "Failed to set VP8E_SET_SCALEMODE: %s", + gst_vpx_error_name (status)); + } + } + break; + case PROP_V_SCALING_MODE: + gst_vpx_enc->v_scaling_mode = g_value_get_enum (value); + if (gst_vpx_enc->inited) { + vpx_scaling_mode_t sm; + + sm.h_scaling_mode = gst_vpx_enc->h_scaling_mode; + sm.v_scaling_mode = gst_vpx_enc->v_scaling_mode; + + status = + vpx_codec_control (&gst_vpx_enc->encoder, VP8E_SET_SCALEMODE, &sm); + if (status != VPX_CODEC_OK) { + GST_WARNING_OBJECT (gst_vpx_enc, + "Failed to set VP8E_SET_SCALEMODE: %s", + gst_vpx_error_name (status)); + } + } + break; + case PROP_CPU_USED: + gst_vpx_enc->cpu_used = g_value_get_int (value); + if (gst_vpx_enc->inited) { + status = + vpx_codec_control (&gst_vpx_enc->encoder, VP8E_SET_CPUUSED, + gst_vpx_enc->cpu_used); + if (status != VPX_CODEC_OK) { + GST_WARNING_OBJECT (gst_vpx_enc, "Failed to set VP8E_SET_CPUUSED: %s", + gst_vpx_error_name (status)); + } + } + break; + case PROP_ENABLE_AUTO_ALT_REF: + gst_vpx_enc->enable_auto_alt_ref = g_value_get_boolean (value); + if (gst_vpx_enc->inited) { + status = + vpx_codec_control (&gst_vpx_enc->encoder, VP8E_SET_ENABLEAUTOALTREF, + (gst_vpx_enc->enable_auto_alt_ref ? 1 : 0)); + if (status != VPX_CODEC_OK) { + GST_WARNING_OBJECT (gst_vpx_enc, + "Failed to set VP8E_SET_ENABLEAUTOALTREF: %s", + gst_vpx_error_name (status)); + } + } + break; + case PROP_NOISE_SENSITIVITY: + gst_vpx_enc->noise_sensitivity = g_value_get_int (value); + if (gst_vpx_enc->inited) { + status = + vpx_codec_control (&gst_vpx_enc->encoder, + VP8E_SET_NOISE_SENSITIVITY, gst_vpx_enc->noise_sensitivity); + if (status != VPX_CODEC_OK) { + GST_WARNING_OBJECT (gst_vpx_enc, + "Failed to set VP8E_SET_NOISE_SENSITIVITY: %s", + gst_vpx_error_name (status)); + } + } + break; + case PROP_SHARPNESS: + gst_vpx_enc->sharpness = g_value_get_int (value); + if (gst_vpx_enc->inited) { + status = vpx_codec_control (&gst_vpx_enc->encoder, VP8E_SET_SHARPNESS, + gst_vpx_enc->sharpness); + if (status != VPX_CODEC_OK) { + GST_WARNING_OBJECT (gst_vpx_enc, + "Failed to set VP8E_SET_SHARPNESS: %s", + gst_vpx_error_name (status)); + } + } + break; + case PROP_STATIC_THRESHOLD: + gst_vpx_enc->static_threshold = g_value_get_int (value); + if (gst_vpx_enc->inited) { + status = + vpx_codec_control (&gst_vpx_enc->encoder, VP8E_SET_STATIC_THRESHOLD, + gst_vpx_enc->static_threshold); + if (status != VPX_CODEC_OK) { + GST_WARNING_OBJECT (gst_vpx_enc, + "Failed to set VP8E_SET_STATIC_THRESHOLD: %s", + gst_vpx_error_name (status)); + } + } + break; + case PROP_TOKEN_PARTITIONS: + gst_vpx_enc->token_partitions = g_value_get_enum (value); + if (gst_vpx_enc->inited) { + status = + vpx_codec_control (&gst_vpx_enc->encoder, VP8E_SET_TOKEN_PARTITIONS, + gst_vpx_enc->token_partitions); + if (status != VPX_CODEC_OK) { + GST_WARNING_OBJECT (gst_vpx_enc, + "Failed to set VP8E_SET_TOKEN_PARTIONS: %s", + gst_vpx_error_name (status)); + } + } + break; + case PROP_ARNR_MAXFRAMES: + gst_vpx_enc->arnr_maxframes = g_value_get_int (value); + if (gst_vpx_enc->inited) { + status = + vpx_codec_control (&gst_vpx_enc->encoder, VP8E_SET_ARNR_MAXFRAMES, + gst_vpx_enc->arnr_maxframes); + if (status != VPX_CODEC_OK) { + GST_WARNING_OBJECT (gst_vpx_enc, + "Failed to set VP8E_SET_ARNR_MAXFRAMES: %s", + gst_vpx_error_name (status)); + } + } + break; + case PROP_ARNR_STRENGTH: + gst_vpx_enc->arnr_strength = g_value_get_int (value); + if (gst_vpx_enc->inited) { + status = + vpx_codec_control (&gst_vpx_enc->encoder, VP8E_SET_ARNR_STRENGTH, + gst_vpx_enc->arnr_strength); + if (status != VPX_CODEC_OK) { + GST_WARNING_OBJECT (gst_vpx_enc, + "Failed to set VP8E_SET_ARNR_STRENGTH: %s", + gst_vpx_error_name (status)); + } + } + break; + case PROP_ARNR_TYPE: + gst_vpx_enc->arnr_type = g_value_get_int (value); + g_warning ("arnr-type is a no-op since control has been deprecated " + "in libvpx"); + break; + case PROP_TUNING: + gst_vpx_enc->tuning = g_value_get_enum (value); + if (gst_vpx_enc->inited) { + status = vpx_codec_control (&gst_vpx_enc->encoder, VP8E_SET_TUNING, + gst_vpx_enc->tuning); + if (status != VPX_CODEC_OK) { + GST_WARNING_OBJECT (gst_vpx_enc, + "Failed to set VP8E_SET_TUNING: %s", gst_vpx_error_name (status)); + } + } + break; + case PROP_CQ_LEVEL: + gst_vpx_enc->cq_level = g_value_get_int (value); + if (gst_vpx_enc->inited) { + status = vpx_codec_control (&gst_vpx_enc->encoder, VP8E_SET_CQ_LEVEL, + gst_vpx_enc->cq_level); + if (status != VPX_CODEC_OK) { + GST_WARNING_OBJECT (gst_vpx_enc, + "Failed to set VP8E_SET_CQ_LEVEL: %s", + gst_vpx_error_name (status)); + } + } + break; + case PROP_MAX_INTRA_BITRATE_PCT: + gst_vpx_enc->max_intra_bitrate_pct = g_value_get_int (value); + if (gst_vpx_enc->inited) { + status = + vpx_codec_control (&gst_vpx_enc->encoder, + VP8E_SET_MAX_INTRA_BITRATE_PCT, gst_vpx_enc->max_intra_bitrate_pct); + if (status != VPX_CODEC_OK) { + GST_WARNING_OBJECT (gst_vpx_enc, + "Failed to set VP8E_SET_MAX_INTRA_BITRATE_PCT: %s", + gst_vpx_error_name (status)); + } + } + break; + case PROP_TIMEBASE: + gst_vpx_enc->timebase_n = gst_value_get_fraction_numerator (value); + gst_vpx_enc->timebase_d = gst_value_get_fraction_denominator (value); + break; + default: + break; + } + + if (global &&gst_vpx_enc->inited) { + status = + vpx_codec_enc_config_set (&gst_vpx_enc->encoder, &gst_vpx_enc->cfg); + if (status != VPX_CODEC_OK) { + g_mutex_unlock (&gst_vpx_enc->encoder_lock); + GST_ELEMENT_ERROR (gst_vpx_enc, LIBRARY, INIT, + ("Failed to set encoder configuration"), ("%s", + gst_vpx_error_name (status))); + } else { + g_mutex_unlock (&gst_vpx_enc->encoder_lock); + } + } else { + g_mutex_unlock (&gst_vpx_enc->encoder_lock); + } +} + +static void +gst_vpx_enc_get_property (GObject * object, guint prop_id, GValue * value, + GParamSpec * pspec) +{ + GstVPXEnc *gst_vpx_enc; + + g_return_if_fail (GST_IS_VPX_ENC (object)); + gst_vpx_enc = GST_VPX_ENC (object); + + g_mutex_lock (&gst_vpx_enc->encoder_lock); + switch (prop_id) { + case PROP_RC_END_USAGE: + g_value_set_enum (value, gst_vpx_enc->cfg.rc_end_usage); + break; + case PROP_RC_TARGET_BITRATE: + g_value_set_int (value, gst_vpx_enc->cfg.rc_target_bitrate * 1000); + break; + case PROP_RC_MIN_QUANTIZER: + g_value_set_int (value, gst_vpx_enc->cfg.rc_min_quantizer); + break; + case PROP_RC_MAX_QUANTIZER: + g_value_set_int (value, gst_vpx_enc->cfg.rc_max_quantizer); + break; + case PROP_RC_DROPFRAME_THRESH: + g_value_set_int (value, gst_vpx_enc->cfg.rc_dropframe_thresh); + break; + case PROP_RC_RESIZE_ALLOWED: + g_value_set_boolean (value, gst_vpx_enc->cfg.rc_resize_allowed); + break; + case PROP_RC_RESIZE_UP_THRESH: + g_value_set_int (value, gst_vpx_enc->cfg.rc_resize_up_thresh); + break; + case PROP_RC_RESIZE_DOWN_THRESH: + g_value_set_int (value, gst_vpx_enc->cfg.rc_resize_down_thresh); + break; + case PROP_RC_UNDERSHOOT_PCT: + g_value_set_int (value, gst_vpx_enc->cfg.rc_undershoot_pct); + break; + case PROP_RC_OVERSHOOT_PCT: + g_value_set_int (value, gst_vpx_enc->cfg.rc_overshoot_pct); + break; + case PROP_RC_BUF_SZ: + g_value_set_int (value, gst_vpx_enc->cfg.rc_buf_sz); + break; + case PROP_RC_BUF_INITIAL_SZ: + g_value_set_int (value, gst_vpx_enc->cfg.rc_buf_initial_sz); + break; + case PROP_RC_BUF_OPTIMAL_SZ: + g_value_set_int (value, gst_vpx_enc->cfg.rc_buf_optimal_sz); + break; + case PROP_RC_2PASS_VBR_BIAS_PCT: + g_value_set_int (value, gst_vpx_enc->cfg.rc_2pass_vbr_bias_pct); + break; + case PROP_RC_2PASS_VBR_MINSECTION_PCT: + g_value_set_int (value, gst_vpx_enc->cfg.rc_2pass_vbr_minsection_pct); + break; + case PROP_RC_2PASS_VBR_MAXSECTION_PCT: + g_value_set_int (value, gst_vpx_enc->cfg.rc_2pass_vbr_maxsection_pct); + break; + case PROP_KF_MODE: + g_value_set_enum (value, gst_vpx_enc->cfg.kf_mode); + break; + case PROP_KF_MAX_DIST: + g_value_set_int (value, gst_vpx_enc->cfg.kf_max_dist); + break; + case PROP_MULTIPASS_MODE: + g_value_set_enum (value, gst_vpx_enc->cfg.g_pass); + break; + case PROP_MULTIPASS_CACHE_FILE: + g_value_set_string (value, gst_vpx_enc->multipass_cache_prefix); + break; + case PROP_TS_NUMBER_LAYERS: + g_value_set_int (value, gst_vpx_enc->cfg.ts_number_layers); + break; + case PROP_TS_TARGET_BITRATE:{ + GValueArray *va; + + if (gst_vpx_enc->n_ts_target_bitrate == 0) { + g_value_set_boxed (value, NULL); + } else { + gint i; + + va = g_value_array_new (gst_vpx_enc->n_ts_target_bitrate); + for (i = 0; i < gst_vpx_enc->n_ts_target_bitrate; i++) { + GValue v = { 0, }; + + g_value_init (&v, G_TYPE_INT); + g_value_set_int (&v, gst_vpx_enc->cfg.ts_target_bitrate[i]); + g_value_array_append (va, &v); + g_value_unset (&v); + } + g_value_set_boxed (value, va); + g_value_array_free (va); + } + break; + } + case PROP_TS_RATE_DECIMATOR:{ + GValueArray *va; + + if (gst_vpx_enc->n_ts_rate_decimator == 0) { + g_value_set_boxed (value, NULL); + } else { + gint i; + + va = g_value_array_new (gst_vpx_enc->n_ts_rate_decimator); + for (i = 0; i < gst_vpx_enc->n_ts_rate_decimator; i++) { + GValue v = { 0, }; + + g_value_init (&v, G_TYPE_INT); + g_value_set_int (&v, gst_vpx_enc->cfg.ts_rate_decimator[i]); + g_value_array_append (va, &v); + g_value_unset (&v); + } + g_value_set_boxed (value, va); + g_value_array_free (va); + } + break; + } + case PROP_TS_PERIODICITY: + g_value_set_int (value, gst_vpx_enc->cfg.ts_periodicity); + break; + case PROP_TS_LAYER_ID:{ + GValueArray *va; + + if (gst_vpx_enc->n_ts_layer_id == 0) { + g_value_set_boxed (value, NULL); + } else { + gint i; + + va = g_value_array_new (gst_vpx_enc->n_ts_layer_id); + for (i = 0; i < gst_vpx_enc->n_ts_layer_id; i++) { + GValue v = { 0, }; + + g_value_init (&v, G_TYPE_INT); + g_value_set_int (&v, gst_vpx_enc->cfg.ts_layer_id[i]); + g_value_array_append (va, &v); + g_value_unset (&v); + } + g_value_set_boxed (value, va); + g_value_array_free (va); + } + break; + } + case PROP_ERROR_RESILIENT: + g_value_set_flags (value, gst_vpx_enc->cfg.g_error_resilient); + break; + case PROP_LAG_IN_FRAMES: + g_value_set_int (value, gst_vpx_enc->cfg.g_lag_in_frames); + break; + case PROP_THREADS: + g_value_set_int (value, gst_vpx_enc->cfg.g_threads); + break; + case PROP_DEADLINE: + g_value_set_int64 (value, gst_vpx_enc->deadline); + break; + case PROP_H_SCALING_MODE: + g_value_set_enum (value, gst_vpx_enc->h_scaling_mode); + break; + case PROP_V_SCALING_MODE: + g_value_set_enum (value, gst_vpx_enc->v_scaling_mode); + break; + case PROP_CPU_USED: + g_value_set_int (value, gst_vpx_enc->cpu_used); + break; + case PROP_ENABLE_AUTO_ALT_REF: + g_value_set_boolean (value, gst_vpx_enc->enable_auto_alt_ref); + break; + case PROP_NOISE_SENSITIVITY: + g_value_set_int (value, gst_vpx_enc->noise_sensitivity); + break; + case PROP_SHARPNESS: + g_value_set_int (value, gst_vpx_enc->sharpness); + break; + case PROP_STATIC_THRESHOLD: + g_value_set_int (value, gst_vpx_enc->static_threshold); + break; + case PROP_TOKEN_PARTITIONS: + g_value_set_enum (value, gst_vpx_enc->token_partitions); + break; + case PROP_ARNR_MAXFRAMES: + g_value_set_int (value, gst_vpx_enc->arnr_maxframes); + break; + case PROP_ARNR_STRENGTH: + g_value_set_int (value, gst_vpx_enc->arnr_strength); + break; + case PROP_ARNR_TYPE: + g_value_set_int (value, gst_vpx_enc->arnr_type); + break; + case PROP_TUNING: + g_value_set_enum (value, gst_vpx_enc->tuning); + break; + case PROP_CQ_LEVEL: + g_value_set_int (value, gst_vpx_enc->cq_level); + break; + case PROP_MAX_INTRA_BITRATE_PCT: + g_value_set_int (value, gst_vpx_enc->max_intra_bitrate_pct); + break; + case PROP_TIMEBASE: + gst_value_set_fraction (value, gst_vpx_enc->timebase_n, + gst_vpx_enc->timebase_d); + break; + default: + G_OBJECT_WARN_INVALID_PROPERTY_ID (object, prop_id, pspec); + break; + } + + g_mutex_unlock (&gst_vpx_enc->encoder_lock); +} + +static gboolean +gst_vpx_enc_start (GstVideoEncoder * video_encoder) +{ + GstVPXEnc *encoder = GST_VPX_ENC (video_encoder); + + GST_DEBUG_OBJECT (video_encoder, "start"); + + if (!encoder->have_default_config) { + GST_ELEMENT_ERROR (encoder, LIBRARY, INIT, + ("Failed to get default encoder configuration"), (NULL)); + return FALSE; + } + + return TRUE; +} + +static void +gst_vpx_enc_destroy_encoder (GstVPXEnc * encoder) +{ + g_mutex_lock (&encoder->encoder_lock); + if (encoder->inited) { + vpx_codec_destroy (&encoder->encoder); + encoder->inited = FALSE; + } + + if (encoder->first_pass_cache_content) { + g_byte_array_free (encoder->first_pass_cache_content, TRUE); + encoder->first_pass_cache_content = NULL; + } + + if (encoder->cfg.rc_twopass_stats_in.buf) { + g_free (encoder->cfg.rc_twopass_stats_in.buf); + encoder->cfg.rc_twopass_stats_in.buf = NULL; + encoder->cfg.rc_twopass_stats_in.sz = 0; + } + g_mutex_unlock (&encoder->encoder_lock); +} + +static gboolean +gst_vpx_enc_stop (GstVideoEncoder * video_encoder) +{ + GstVPXEnc *encoder; + + GST_DEBUG_OBJECT (video_encoder, "stop"); + + encoder = GST_VPX_ENC (video_encoder); + + gst_vpx_enc_destroy_encoder (encoder); + + gst_tag_setter_reset_tags (GST_TAG_SETTER (encoder)); + + g_free (encoder->multipass_cache_file); + encoder->multipass_cache_file = NULL; + encoder->multipass_cache_idx = 0; + + return TRUE; +} + +static gint +gst_vpx_enc_get_downstream_profile (GstVPXEnc * encoder) +{ + GstCaps *allowed; + GstStructure *s; + gint profile = DEFAULT_PROFILE; + + allowed = gst_pad_get_allowed_caps (GST_VIDEO_ENCODER_SRC_PAD (encoder)); + if (allowed) { + allowed = gst_caps_truncate (allowed); + s = gst_caps_get_structure (allowed, 0); + if (gst_structure_has_field (s, "profile")) { + const GValue *v = gst_structure_get_value (s, "profile"); + const gchar *profile_str = NULL; + + if (GST_VALUE_HOLDS_LIST (v) && gst_value_list_get_size (v) > 0) { + profile_str = g_value_get_string (gst_value_list_get_value (v, 0)); + } else if (G_VALUE_HOLDS_STRING (v)) { + profile_str = g_value_get_string (v); + } + + if (profile_str) { + gchar *endptr = NULL; + + profile = g_ascii_strtoull (profile_str, &endptr, 10); + if (*endptr != '\0' || profile < 0 || profile > 3) { + GST_ERROR_OBJECT (encoder, "Invalid profile '%s'", profile_str); + profile = DEFAULT_PROFILE; + } + } + } + gst_caps_unref (allowed); + } + + GST_DEBUG_OBJECT (encoder, "Using profile %d", profile); + + return profile; +} + +static gboolean +gst_vpx_enc_set_format (GstVideoEncoder * video_encoder, + GstVideoCodecState * state) +{ + GstVPXEnc *encoder; + vpx_codec_err_t status; + vpx_image_t *image; + GstCaps *caps; + gboolean ret = TRUE; + GstVideoInfo *info = &state->info; + GstVideoCodecState *output_state; + GstClockTime latency; + GstVPXEncClass *vpx_enc_class; + + encoder = GST_VPX_ENC (video_encoder); + vpx_enc_class = GST_VPX_ENC_GET_CLASS (encoder); + GST_DEBUG_OBJECT (video_encoder, "set_format"); + + if (encoder->inited) { + gst_vpx_enc_drain (video_encoder); + g_mutex_lock (&encoder->encoder_lock); + vpx_codec_destroy (&encoder->encoder); + encoder->inited = FALSE; + encoder->multipass_cache_idx++; + } else { + g_mutex_lock (&encoder->encoder_lock); + } + + encoder->cfg.g_profile = gst_vpx_enc_get_downstream_profile (encoder); + + /* Scale default bitrate to our size */ + if (!encoder->rc_target_bitrate_set) + encoder->cfg.rc_target_bitrate = + gst_util_uint64_scale (DEFAULT_RC_TARGET_BITRATE, + GST_VIDEO_INFO_WIDTH (info) * GST_VIDEO_INFO_HEIGHT (info), + 320 * 240 * 1000); + + encoder->cfg.g_w = GST_VIDEO_INFO_WIDTH (info); + encoder->cfg.g_h = GST_VIDEO_INFO_HEIGHT (info); + + if (encoder->timebase_n != 0 && encoder->timebase_d != 0) { + GST_DEBUG_OBJECT (video_encoder, "Using timebase configuration"); + encoder->cfg.g_timebase.num = encoder->timebase_n; + encoder->cfg.g_timebase.den = encoder->timebase_d; + } else { + /* Zero framerate and max-framerate but still need to setup the timebase to avoid + * a divide by zero error. Presuming the lowest common denominator will be RTP - + * VP8 payload draft states clock rate of 90000 which should work for anyone where + * FPS < 90000 (shouldn't be too many cases where it's higher) though wouldn't be optimal. RTP specification + * http://tools.ietf.org/html/draft-ietf-payload-vp8-01 section 6.3.1 */ + encoder->cfg.g_timebase.num = 1; + encoder->cfg.g_timebase.den = 90000; + } + + if (encoder->cfg.g_pass == VPX_RC_FIRST_PASS || + encoder->cfg.g_pass == VPX_RC_LAST_PASS) { + if (!encoder->multipass_cache_prefix) { + GST_ELEMENT_ERROR (encoder, RESOURCE, OPEN_READ, + ("No multipass cache file provided"), (NULL)); + g_mutex_unlock (&encoder->encoder_lock); + return FALSE; + } + + g_free (encoder->multipass_cache_file); + + if (encoder->multipass_cache_idx > 0) + encoder->multipass_cache_file = g_strdup_printf ("%s.%u", + encoder->multipass_cache_prefix, encoder->multipass_cache_idx); + else + encoder->multipass_cache_file = + g_strdup (encoder->multipass_cache_prefix); + } + + if (encoder->cfg.g_pass == VPX_RC_FIRST_PASS) { + if (encoder->first_pass_cache_content != NULL) + g_byte_array_free (encoder->first_pass_cache_content, TRUE); + + encoder->first_pass_cache_content = g_byte_array_sized_new (4096); + + } else if (encoder->cfg.g_pass == VPX_RC_LAST_PASS) { + GError *err = NULL; + + if (encoder->cfg.rc_twopass_stats_in.buf != NULL) { + g_free (encoder->cfg.rc_twopass_stats_in.buf); + encoder->cfg.rc_twopass_stats_in.buf = NULL; + encoder->cfg.rc_twopass_stats_in.sz = 0; + } + + if (!g_file_get_contents (encoder->multipass_cache_file, + (gchar **) & encoder->cfg.rc_twopass_stats_in.buf, + &encoder->cfg.rc_twopass_stats_in.sz, &err)) { + GST_ELEMENT_ERROR (encoder, RESOURCE, OPEN_READ, + ("Failed to read multipass cache file provided"), ("%s", + err->message)); + g_error_free (err); + g_mutex_unlock (&encoder->encoder_lock); + return FALSE; + } + } + + status = + vpx_codec_enc_init (&encoder->encoder, vpx_enc_class->get_algo (encoder), + &encoder->cfg, 0); + if (status != VPX_CODEC_OK) { + GST_ELEMENT_ERROR (encoder, LIBRARY, INIT, + ("Failed to initialize encoder"), ("%s", gst_vpx_error_name (status))); + g_mutex_unlock (&encoder->encoder_lock); + return FALSE; + } + + if (vpx_enc_class->enable_scaling (encoder)) { + vpx_scaling_mode_t sm; + + sm.h_scaling_mode = encoder->h_scaling_mode; + sm.v_scaling_mode = encoder->v_scaling_mode; + + status = vpx_codec_control (&encoder->encoder, VP8E_SET_SCALEMODE, &sm); + if (status != VPX_CODEC_OK) { + GST_WARNING_OBJECT (encoder, "Failed to set VP8E_SET_SCALEMODE: %s", + gst_vpx_error_name (status)); + } + } + + status = + vpx_codec_control (&encoder->encoder, VP8E_SET_CPUUSED, + encoder->cpu_used); + if (status != VPX_CODEC_OK) { + GST_WARNING_OBJECT (encoder, "Failed to set VP8E_SET_CPUUSED: %s", + gst_vpx_error_name (status)); + } + + status = + vpx_codec_control (&encoder->encoder, VP8E_SET_ENABLEAUTOALTREF, + (encoder->enable_auto_alt_ref ? 1 : 0)); + if (status != VPX_CODEC_OK) { + GST_WARNING_OBJECT (encoder, + "Failed to set VP8E_SET_ENABLEAUTOALTREF: %s", + gst_vpx_error_name (status)); + } + status = vpx_codec_control (&encoder->encoder, VP8E_SET_NOISE_SENSITIVITY, + encoder->noise_sensitivity); + if (status != VPX_CODEC_OK) { + GST_WARNING_OBJECT (encoder, + "Failed to set VP8E_SET_NOISE_SENSITIVITY: %s", + gst_vpx_error_name (status)); + } + status = vpx_codec_control (&encoder->encoder, VP8E_SET_SHARPNESS, + encoder->sharpness); + if (status != VPX_CODEC_OK) { + GST_WARNING_OBJECT (encoder, + "Failed to set VP8E_SET_SHARPNESS: %s", gst_vpx_error_name (status)); + } + status = vpx_codec_control (&encoder->encoder, VP8E_SET_STATIC_THRESHOLD, + encoder->static_threshold); + if (status != VPX_CODEC_OK) { + GST_WARNING_OBJECT (encoder, + "Failed to set VP8E_SET_STATIC_THRESHOLD: %s", + gst_vpx_error_name (status)); + } + status = vpx_codec_control (&encoder->encoder, VP8E_SET_TOKEN_PARTITIONS, + encoder->token_partitions); + if (status != VPX_CODEC_OK) { + GST_WARNING_OBJECT (encoder, + "Failed to set VP8E_SET_TOKEN_PARTIONS: %s", + gst_vpx_error_name (status)); + } + status = vpx_codec_control (&encoder->encoder, VP8E_SET_ARNR_MAXFRAMES, + encoder->arnr_maxframes); + if (status != VPX_CODEC_OK) { + GST_WARNING_OBJECT (encoder, + "Failed to set VP8E_SET_ARNR_MAXFRAMES: %s", + gst_vpx_error_name (status)); + } + status = vpx_codec_control (&encoder->encoder, VP8E_SET_ARNR_STRENGTH, + encoder->arnr_strength); + if (status != VPX_CODEC_OK) { + GST_WARNING_OBJECT (encoder, + "Failed to set VP8E_SET_ARNR_STRENGTH: %s", + gst_vpx_error_name (status)); + } + status = vpx_codec_control (&encoder->encoder, VP8E_SET_TUNING, + encoder->tuning); + if (status != VPX_CODEC_OK) { + GST_WARNING_OBJECT (encoder, + "Failed to set VP8E_SET_TUNING: %s", gst_vpx_error_name (status)); + } + status = vpx_codec_control (&encoder->encoder, VP8E_SET_CQ_LEVEL, + encoder->cq_level); + if (status != VPX_CODEC_OK) { + GST_WARNING_OBJECT (encoder, + "Failed to set VP8E_SET_CQ_LEVEL: %s", gst_vpx_error_name (status)); + } + status = vpx_codec_control (&encoder->encoder, VP8E_SET_MAX_INTRA_BITRATE_PCT, + encoder->max_intra_bitrate_pct); + if (status != VPX_CODEC_OK) { + GST_WARNING_OBJECT (encoder, + "Failed to set VP8E_SET_MAX_INTRA_BITRATE_PCT: %s", + gst_vpx_error_name (status)); + } + + if (GST_VIDEO_INFO_FPS_D (info) == 0 || GST_VIDEO_INFO_FPS_N (info) == 0) { + /* FIXME: Assume 25fps for unknown framerates. Better than reporting + * that we introduce no latency while we actually do + */ + latency = gst_util_uint64_scale (encoder->cfg.g_lag_in_frames, + 1 * GST_SECOND, 25); + } else { + latency = gst_util_uint64_scale (encoder->cfg.g_lag_in_frames, + GST_VIDEO_INFO_FPS_D (info) * GST_SECOND, GST_VIDEO_INFO_FPS_N (info)); + } + gst_video_encoder_set_latency (video_encoder, latency, latency); + encoder->inited = TRUE; + + /* Store input state */ + if (encoder->input_state) + gst_video_codec_state_unref (encoder->input_state); + encoder->input_state = gst_video_codec_state_ref (state); + + /* prepare cached image buffer setup */ + image = &encoder->image; + memset (image, 0, sizeof (*image)); + + vpx_enc_class->set_image_format (encoder, image); + + image->w = image->d_w = GST_VIDEO_INFO_WIDTH (info); + image->h = image->d_h = GST_VIDEO_INFO_HEIGHT (info); + + image->stride[VPX_PLANE_Y] = GST_VIDEO_INFO_COMP_STRIDE (info, 0); + image->stride[VPX_PLANE_U] = GST_VIDEO_INFO_COMP_STRIDE (info, 1); + image->stride[VPX_PLANE_V] = GST_VIDEO_INFO_COMP_STRIDE (info, 2); + + caps = vpx_enc_class->get_new_vpx_caps (encoder); + + vpx_enc_class->set_stream_info (encoder, caps, info); + + g_mutex_unlock (&encoder->encoder_lock); + + output_state = + gst_video_encoder_set_output_state (video_encoder, caps, state); + gst_video_codec_state_unref (output_state); + + gst_video_encoder_negotiate (GST_VIDEO_ENCODER (encoder)); + + return ret; +} + +static GstFlowReturn +gst_vpx_enc_process (GstVPXEnc * encoder) +{ + vpx_codec_iter_t iter = NULL; + const vpx_codec_cx_pkt_t *pkt; + GstVideoEncoder *video_encoder; + void *user_data; + GstVideoCodecFrame *frame; + GstFlowReturn ret = GST_FLOW_OK; + GstVPXEncClass *vpx_enc_class; + + video_encoder = GST_VIDEO_ENCODER (encoder); + vpx_enc_class = GST_VPX_ENC_GET_CLASS (encoder); + + g_mutex_lock (&encoder->encoder_lock); + pkt = vpx_codec_get_cx_data (&encoder->encoder, &iter); + while (pkt != NULL) { + GstBuffer *buffer; + gboolean invisible; + + GST_DEBUG_OBJECT (encoder, "packet %u type %d", (guint) pkt->data.frame.sz, + pkt->kind); + + if (pkt->kind == VPX_CODEC_STATS_PKT + && encoder->cfg.g_pass == VPX_RC_FIRST_PASS) { + GST_LOG_OBJECT (encoder, "handling STATS packet"); + + g_byte_array_append (encoder->first_pass_cache_content, + pkt->data.twopass_stats.buf, pkt->data.twopass_stats.sz); + + frame = gst_video_encoder_get_oldest_frame (video_encoder); + if (frame != NULL) { + buffer = gst_buffer_new (); + GST_BUFFER_FLAG_SET (buffer, GST_BUFFER_FLAG_LIVE); + frame->output_buffer = buffer; + g_mutex_unlock (&encoder->encoder_lock); + ret = gst_video_encoder_finish_frame (video_encoder, frame); + g_mutex_lock (&encoder->encoder_lock); + } + + pkt = vpx_codec_get_cx_data (&encoder->encoder, &iter); + continue; + } else if (pkt->kind != VPX_CODEC_CX_FRAME_PKT) { + GST_LOG_OBJECT (encoder, "non frame pkt: %d", pkt->kind); + pkt = vpx_codec_get_cx_data (&encoder->encoder, &iter); + continue; + } + + invisible = (pkt->data.frame.flags & VPX_FRAME_IS_INVISIBLE) != 0; + frame = gst_video_encoder_get_oldest_frame (video_encoder); + g_assert (frame != NULL); + if ((pkt->data.frame.flags & VPX_FRAME_IS_KEY) != 0) + GST_VIDEO_CODEC_FRAME_SET_SYNC_POINT (frame); + else + GST_VIDEO_CODEC_FRAME_UNSET_SYNC_POINT (frame); + + /* FIXME : It would be nice to avoid the memory copy ... */ + buffer = + gst_buffer_new_wrapped (g_memdup (pkt->data.frame.buf, + pkt->data.frame.sz), pkt->data.frame.sz); + + user_data = vpx_enc_class->process_frame_user_data (encoder, frame); + + if (invisible) { + ret = + vpx_enc_class->handle_invisible_frame_buffer (encoder, user_data, + buffer); + gst_video_codec_frame_unref (frame); + } else { + frame->output_buffer = buffer; + g_mutex_unlock (&encoder->encoder_lock); + ret = gst_video_encoder_finish_frame (video_encoder, frame); + g_mutex_lock (&encoder->encoder_lock); + } + + pkt = vpx_codec_get_cx_data (&encoder->encoder, &iter); + } + g_mutex_unlock (&encoder->encoder_lock); + + return ret; +} + +/* This function should be called holding then stream lock*/ +static GstFlowReturn +gst_vpx_enc_drain (GstVideoEncoder * video_encoder) +{ + GstVPXEnc *encoder; + int flags = 0; + vpx_codec_err_t status; + gint64 deadline; + vpx_codec_pts_t pts; + + encoder = GST_VPX_ENC (video_encoder); + + g_mutex_lock (&encoder->encoder_lock); + deadline = encoder->deadline; + + pts = + gst_util_uint64_scale (encoder->last_pts, + encoder->cfg.g_timebase.den, + encoder->cfg.g_timebase.num * (GstClockTime) GST_SECOND); + + status = vpx_codec_encode (&encoder->encoder, NULL, pts, 0, flags, deadline); + g_mutex_unlock (&encoder->encoder_lock); + + if (status != 0) { + GST_ERROR_OBJECT (encoder, "encode returned %d %s", status, + gst_vpx_error_name (status)); + return GST_FLOW_ERROR; + } + + /* dispatch remaining frames */ + gst_vpx_enc_process (encoder); + + g_mutex_lock (&encoder->encoder_lock); + if (encoder->cfg.g_pass == VPX_RC_FIRST_PASS && encoder->multipass_cache_file) { + GError *err = NULL; + + if (!g_file_set_contents (encoder->multipass_cache_file, + (const gchar *) encoder->first_pass_cache_content->data, + encoder->first_pass_cache_content->len, &err)) { + GST_ELEMENT_ERROR (encoder, RESOURCE, WRITE, (NULL), + ("Failed to write multipass cache file: %s", err->message)); + g_error_free (err); + } + } + g_mutex_unlock (&encoder->encoder_lock); + + return GST_FLOW_OK; +} + +static gboolean +gst_vpx_enc_flush (GstVideoEncoder * video_encoder) +{ + GstVPXEnc *encoder; + + GST_DEBUG_OBJECT (video_encoder, "flush"); + + encoder = GST_VPX_ENC (video_encoder); + + gst_vpx_enc_destroy_encoder (encoder); + if (encoder->input_state) { + gst_video_codec_state_ref (encoder->input_state); + gst_vpx_enc_set_format (video_encoder, encoder->input_state); + gst_video_codec_state_unref (encoder->input_state); + } + + return TRUE; +} + +static GstFlowReturn +gst_vpx_enc_finish (GstVideoEncoder * video_encoder) +{ + GstVPXEnc *encoder; + GstFlowReturn ret; + + GST_DEBUG_OBJECT (video_encoder, "finish"); + + encoder = GST_VPX_ENC (video_encoder); + + if (encoder->inited) { + ret = gst_vpx_enc_drain (video_encoder); + } else { + ret = GST_FLOW_OK; + } + + return ret; +} + +static vpx_image_t * +gst_vpx_enc_buffer_to_image (GstVPXEnc * enc, GstVideoFrame * frame) +{ + vpx_image_t *image = g_slice_new (vpx_image_t); + + memcpy (image, &enc->image, sizeof (*image)); + + image->planes[VPX_PLANE_Y] = GST_VIDEO_FRAME_COMP_DATA (frame, 0); + image->planes[VPX_PLANE_U] = GST_VIDEO_FRAME_COMP_DATA (frame, 1); + image->planes[VPX_PLANE_V] = GST_VIDEO_FRAME_COMP_DATA (frame, 2); + + image->stride[VPX_PLANE_Y] = GST_VIDEO_FRAME_COMP_STRIDE (frame, 0); + image->stride[VPX_PLANE_U] = GST_VIDEO_FRAME_COMP_STRIDE (frame, 1); + image->stride[VPX_PLANE_V] = GST_VIDEO_FRAME_COMP_STRIDE (frame, 2); + + return image; +} + +static GstFlowReturn +gst_vpx_enc_handle_frame (GstVideoEncoder * video_encoder, + GstVideoCodecFrame * frame) +{ + GstVPXEnc *encoder; + vpx_codec_err_t status; + int flags = 0; + vpx_image_t *image; + GstVideoFrame vframe; + vpx_codec_pts_t pts; + unsigned long duration; + GstVPXEncClass *vpx_enc_class; + + GST_DEBUG_OBJECT (video_encoder, "handle_frame"); + + encoder = GST_VPX_ENC (video_encoder); + vpx_enc_class = GST_VPX_ENC_GET_CLASS (encoder); + + GST_DEBUG_OBJECT (video_encoder, "size %d %d", + GST_VIDEO_INFO_WIDTH (&encoder->input_state->info), + GST_VIDEO_INFO_HEIGHT (&encoder->input_state->info)); + + gst_video_frame_map (&vframe, &encoder->input_state->info, + frame->input_buffer, GST_MAP_READ); + image = gst_vpx_enc_buffer_to_image (encoder, &vframe); + + vpx_enc_class->set_frame_user_data (encoder, frame, image); + + if (GST_VIDEO_CODEC_FRAME_IS_FORCE_KEYFRAME (frame)) { + flags |= VPX_EFLAG_FORCE_KF; + } + + g_mutex_lock (&encoder->encoder_lock); + pts = + gst_util_uint64_scale (frame->pts, + encoder->cfg.g_timebase.den, + encoder->cfg.g_timebase.num * (GstClockTime) GST_SECOND); + encoder->last_pts = frame->pts; + + if (frame->duration != GST_CLOCK_TIME_NONE) { + duration = + gst_util_uint64_scale (frame->duration, encoder->cfg.g_timebase.den, + encoder->cfg.g_timebase.num * (GstClockTime) GST_SECOND); + encoder->last_pts += frame->duration; + } else { + duration = 1; + } + + status = vpx_codec_encode (&encoder->encoder, image, + pts, duration, flags, encoder->deadline); + + g_mutex_unlock (&encoder->encoder_lock); + gst_video_frame_unmap (&vframe); + + if (status != 0) { + GST_ELEMENT_ERROR (encoder, LIBRARY, ENCODE, + ("Failed to encode frame"), ("%s", gst_vpx_error_name (status))); + gst_video_codec_frame_set_user_data (frame, NULL, NULL); + return FALSE; + } + gst_video_codec_frame_unref (frame); + return gst_vpx_enc_process (encoder); +} + +static gboolean +gst_vpx_enc_sink_event (GstVideoEncoder * benc, GstEvent * event) +{ + GstVPXEnc *enc = GST_VPX_ENC (benc); + + /* FIXME : Move this to base encoder class */ + + if (GST_EVENT_TYPE (event) == GST_EVENT_TAG) { + GstTagList *list; + GstTagSetter *setter = GST_TAG_SETTER (enc); + const GstTagMergeMode mode = gst_tag_setter_get_tag_merge_mode (setter); + + gst_event_parse_tag (event, &list); + gst_tag_setter_merge_tags (setter, list, mode); + } + + /* just peeked, baseclass handles the rest */ + return GST_VIDEO_ENCODER_CLASS (parent_class)->sink_event (benc, event); +} + +static gboolean +gst_vpx_enc_propose_allocation (GstVideoEncoder * encoder, GstQuery * query) +{ + gst_query_add_allocation_meta (query, GST_VIDEO_META_API_TYPE, NULL); + + return GST_VIDEO_ENCODER_CLASS (parent_class)->propose_allocation (encoder, + query); +} + +#endif /* HAVE_VP8_ENCODER || HAVE_VP9_ENCODER */ diff --git a/ext/vpx/gstvpxenc.h b/ext/vpx/gstvpxenc.h new file mode 100644 index 0000000000000000000000000000000000000000..fb0192768bd4902ec6f00b2ef31f439025b2a5df --- /dev/null +++ b/ext/vpx/gstvpxenc.h @@ -0,0 +1,140 @@ +/* VP8 + * Copyright (C) 2006 David Schleef <ds@schleef.org> + * Copyright (C) 2010 Entropy Wave Inc + * Copyright (C) 2010 Sebastian Dröge <sebastian.droege@collabora.co.uk> + * + * This library is free software; you can redistribute it and/or + * modify it under the terms of the GNU Library General Public + * License as published by the Free Software Foundation; either + * version 2 of the License, or (at your option) any later version. + * + * This library is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Library General Public License for more details. + * + * You should have received a copy of the GNU Library General Public + * License along with this library; if not, write to the + * Free Software Foundation, Inc., 51 Franklin St, Fifth Floor, + * Boston, MA 02110-1301, USA. + * + */ +#ifndef __GST_VPX_ENC_H__ +#define __GST_VPX_ENC_H__ + +#ifdef HAVE_CONFIG_H +#include "config.h" +#endif + +#if defined(HAVE_VP8_ENCODER) || defined(HAVE_VP9_ENCODER) + +#include <gst/gst.h> +#include <gst/video/gstvideoencoder.h> + +/* FIXME: Undef HAVE_CONFIG_H because vpx_codec.h uses it, + * which causes compilation failures */ +#ifdef HAVE_CONFIG_H +#undef HAVE_CONFIG_H +#endif + +#include <vpx/vpx_encoder.h> +#include <vpx/vp8cx.h> + +G_BEGIN_DECLS + +#define GST_TYPE_VPX_ENC \ + (gst_vpx_enc_get_type()) +#define GST_VPX_ENC(obj) \ + (G_TYPE_CHECK_INSTANCE_CAST((obj),GST_TYPE_VPX_ENC,GstVPXEnc)) +#define GST_VPX_ENC_CLASS(klass) \ + (G_TYPE_CHECK_CLASS_CAST((klass),GST_TYPE_VPX_ENC,GstVPXEncClass)) +#define GST_IS_VPX_ENC(obj) \ + (G_TYPE_CHECK_INSTANCE_TYPE((obj),GST_TYPE_VPX_ENC)) +#define GST_IS_VPX_ENC_CLASS(obj) \ + (G_TYPE_CHECK_CLASS_TYPE((klass),GST_TYPE_VPX_ENC)) +#define GST_VPX_ENC_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), GST_TYPE_VPX_ENC, GstVPXEncClass)) + +typedef struct _GstVPXEnc GstVPXEnc; +typedef struct _GstVPXEncClass GstVPXEncClass; + +struct _GstVPXEnc +{ + GstVideoEncoder base_video_encoder; + + /* < private > */ + vpx_codec_ctx_t encoder; + GMutex encoder_lock; + + /* properties */ + vpx_codec_enc_cfg_t cfg; + gboolean have_default_config; + gboolean rc_target_bitrate_set; + gint n_ts_target_bitrate; + gint n_ts_rate_decimator; + gint n_ts_layer_id; + /* Global two-pass options */ + gchar *multipass_cache_file; + gchar *multipass_cache_prefix; + guint multipass_cache_idx; + GByteArray *first_pass_cache_content; + + /* Encode parameter */ + gint64 deadline; + + /* Controls */ + VPX_SCALING_MODE h_scaling_mode; + VPX_SCALING_MODE v_scaling_mode; + int cpu_used; + gboolean enable_auto_alt_ref; + unsigned int noise_sensitivity; + unsigned int sharpness; + unsigned int static_threshold; + vp8e_token_partitions token_partitions; + unsigned int arnr_maxframes; + unsigned int arnr_strength; + unsigned int arnr_type; + vp8e_tuning tuning; + unsigned int cq_level; + unsigned int max_intra_bitrate_pct; + /* Timebase - a value of 0 will use the framerate */ + unsigned int timebase_n; + unsigned int timebase_d; + + /* state */ + gboolean inited; + + vpx_image_t image; + + GstClockTime last_pts; + + GstVideoCodecState *input_state; +}; + +struct _GstVPXEncClass +{ + GstVideoEncoderClass base_video_encoder_class; + /*virtual function to get supported algo*/ + vpx_codec_iface_t* (*get_algo) (GstVPXEnc *enc); + /*enabled scaling*/ + gboolean (*enable_scaling) (GstVPXEnc *enc); + /*set image format info*/ + void (*set_image_format) (GstVPXEnc *enc, vpx_image_t *image); + /*get new simple caps*/ + GstCaps* (*get_new_vpx_caps) (GstVPXEnc *enc); + /*set stream info*/ + void (*set_stream_info) (GstVPXEnc *enc, GstCaps *caps, GstVideoInfo *info); + /*process user data*/ + void* (*process_frame_user_data) (GstVPXEnc *enc, GstVideoCodecFrame* frame); + /*set frame user data*/ + void (*set_frame_user_data) (GstVPXEnc *enc, GstVideoCodecFrame* frame, vpx_image_t *image); + /*Handle invisible frame*/ + GstFlowReturn (*handle_invisible_frame_buffer) (GstVPXEnc *enc, void* user_data, GstBuffer* buffer); +}; + +GType gst_vpx_enc_get_type (void); + +G_END_DECLS + +#endif + +#endif /* __GST_VPX_ENC_H__ */ diff --git a/ext/wavpack/Makefile.in b/ext/wavpack/Makefile.in index f8271d1b725edbcd9c734950ae48d0c111adc7c1..00aafd9d8c51637fb77fe3cc6c48e6c48945eb56 100644 --- a/ext/wavpack/Makefile.in +++ b/ext/wavpack/Makefile.in @@ -481,6 +481,8 @@ VALGRIND_PATH = @VALGRIND_PATH@ VERSION = @VERSION@ VPX_130_CFLAGS = @VPX_130_CFLAGS@ VPX_130_LIBS = @VPX_130_LIBS@ +VPX_140_CFLAGS = @VPX_140_CFLAGS@ +VPX_140_LIBS = @VPX_140_LIBS@ VPX_CFLAGS = @VPX_CFLAGS@ VPX_LIBS = @VPX_LIBS@ WARNING_CFLAGS = @WARNING_CFLAGS@ diff --git a/gst-plugins-good.doap b/gst-plugins-good.doap index 9f313ae39504aa7e1cc114451ca0301839d4da41..a0f605eb9de46e9f41cf52b1d58f6aa69596eedd 100644 --- a/gst-plugins-good.doap +++ b/gst-plugins-good.doap @@ -32,6 +32,16 @@ the plug-in code, LGPL or LGPL-compatible for the supporting library). </GitRepository> </repository> + <release> + <Version> + <revision>1.7.1</revision> + <branch>master</branch> + <name></name> + <created>2015-12-24</created> + <file-release rdf:resource="http://gstreamer.freedesktop.org/src/gst-plugins-good/gst-plugins-good-1.7.1.tar.xz" /> + </Version> + </release> + <release> <Version> <revision>1.6.2</revision> diff --git a/gst-plugins-good.spec b/gst-plugins-good.spec index de398d3557e10641f03961f8072082f568021f31..9daa75dddbe54f54d43f17115ccae019c400f4ef 100644 --- a/gst-plugins-good.spec +++ b/gst-plugins-good.spec @@ -4,7 +4,7 @@ %define gst_minver 0.11.0 Name: %{gstreamer}-plugins-good -Version: 1.6.2 +Version: 1.7.1 Release: 1.gst Summary: GStreamer plug-ins with good code and licensing diff --git a/gst/Makefile.in b/gst/Makefile.in index 50a8d8ce58bb6bdfa88ee2f58ff611717d188188..7998d2e420cf507cb7eff94386a18f843a40702b 100644 --- a/gst/Makefile.in +++ b/gst/Makefile.in @@ -455,6 +455,8 @@ VALGRIND_PATH = @VALGRIND_PATH@ VERSION = @VERSION@ VPX_130_CFLAGS = @VPX_130_CFLAGS@ VPX_130_LIBS = @VPX_130_LIBS@ +VPX_140_CFLAGS = @VPX_140_CFLAGS@ +VPX_140_LIBS = @VPX_140_LIBS@ VPX_CFLAGS = @VPX_CFLAGS@ VPX_LIBS = @VPX_LIBS@ WARNING_CFLAGS = @WARNING_CFLAGS@ diff --git a/gst/alpha/Makefile.in b/gst/alpha/Makefile.in index 1049b816b694ccc663e826118bd578191ed8fdc9..714bf2380b686a5ef8e3d785a83b24743f206f98 100644 --- a/gst/alpha/Makefile.in +++ b/gst/alpha/Makefile.in @@ -486,6 +486,8 @@ VALGRIND_PATH = @VALGRIND_PATH@ VERSION = @VERSION@ VPX_130_CFLAGS = @VPX_130_CFLAGS@ VPX_130_LIBS = @VPX_130_LIBS@ +VPX_140_CFLAGS = @VPX_140_CFLAGS@ +VPX_140_LIBS = @VPX_140_LIBS@ VPX_CFLAGS = @VPX_CFLAGS@ VPX_LIBS = @VPX_LIBS@ WARNING_CFLAGS = @WARNING_CFLAGS@ diff --git a/gst/apetag/Makefile.in b/gst/apetag/Makefile.in index fb65f06454015ffc2bc10aa21bb6a6a1edb2df56..525265d425d3860be2402f3c7205a98a08a0ea85 100644 --- a/gst/apetag/Makefile.in +++ b/gst/apetag/Makefile.in @@ -476,6 +476,8 @@ VALGRIND_PATH = @VALGRIND_PATH@ VERSION = @VERSION@ VPX_130_CFLAGS = @VPX_130_CFLAGS@ VPX_130_LIBS = @VPX_130_LIBS@ +VPX_140_CFLAGS = @VPX_140_CFLAGS@ +VPX_140_LIBS = @VPX_140_LIBS@ VPX_CFLAGS = @VPX_CFLAGS@ VPX_LIBS = @VPX_LIBS@ WARNING_CFLAGS = @WARNING_CFLAGS@ diff --git a/gst/audiofx/Makefile.in b/gst/audiofx/Makefile.in index 393e06bfde369778ec56d9dfbb6d10ef2f5752f5..a8e19d9a387282d222e3078547f69257c30d5bad 100644 --- a/gst/audiofx/Makefile.in +++ b/gst/audiofx/Makefile.in @@ -523,6 +523,8 @@ VALGRIND_PATH = @VALGRIND_PATH@ VERSION = @VERSION@ VPX_130_CFLAGS = @VPX_130_CFLAGS@ VPX_130_LIBS = @VPX_130_LIBS@ +VPX_140_CFLAGS = @VPX_140_CFLAGS@ +VPX_140_LIBS = @VPX_140_LIBS@ VPX_CFLAGS = @VPX_CFLAGS@ VPX_LIBS = @VPX_LIBS@ WARNING_CFLAGS = @WARNING_CFLAGS@ diff --git a/gst/audiofx/audiochebband.c b/gst/audiofx/audiochebband.c index d295009272fa223b3c59548799e596e6620f8a1f..78febe9e348f0d451cf2f3dac0912a45e785951e 100644 --- a/gst/audiofx/audiochebband.c +++ b/gst/audiofx/audiochebband.c @@ -59,7 +59,7 @@ * <refsect2> * <title>Example launch line</title> * |[ - * gst-launch-1.0 audiotestsrc freq=1500 ! audioconvert ! audiochebband mode=band-pass lower-frequency=1000 upper-frequenc=6000 poles=4 ! audioconvert ! alsasink + * gst-launch-1.0 audiotestsrc freq=1500 ! audioconvert ! audiochebband mode=band-pass lower-frequency=1000 upper-frequency=6000 poles=4 ! audioconvert ! alsasink * gst-launch-1.0 filesrc location="melo1.ogg" ! oggdemux ! vorbisdec ! audioconvert ! audiochebband mode=band-reject lower-frequency=1000 upper-frequency=4000 ripple=0.2 ! audioconvert ! alsasink * gst-launch-1.0 audiotestsrc wave=white-noise ! audioconvert ! audiochebband mode=band-pass lower-frequency=1000 upper-frequency=4000 type=2 ! audioconvert ! alsasink * ]| diff --git a/gst/audiofx/audiodynamic.h b/gst/audiofx/audiodynamic.h index 09f3bc633a82b3f826f11657627084c691537ecf..ff1e4fb945974bdbcccda26da4c78532759cc09b 100644 --- a/gst/audiofx/audiodynamic.h +++ b/gst/audiofx/audiodynamic.h @@ -43,8 +43,6 @@ struct _GstAudioDynamic { GstAudioFilter audiofilter; - gfloat degree; - /* < private > */ GstAudioDynamicProcessFunc process; gint characteristics; diff --git a/gst/audiofx/audiofxbaseiirfilter.h b/gst/audiofx/audiofxbaseiirfilter.h index d0e8b8b5fb92ee9c2c7eb4463741c3e62186a9a9..f78ae317e9f4b0f27df42d7b5862bed2c3d479f1 100644 --- a/gst/audiofx/audiofxbaseiirfilter.h +++ b/gst/audiofx/audiofxbaseiirfilter.h @@ -54,7 +54,6 @@ struct _GstAudioFXBaseIIRFilter /* < private > */ GstAudioFXBaseIIRFilterProcessFunc process; - gboolean have_coeffs; gdouble *a; guint na; gdouble *b; diff --git a/gst/audiofx/gstscaletempo.c b/gst/audiofx/gstscaletempo.c index d1f2f53f52154fa123a7e4bcd76475c5e188aff2..2601bf44888d7c11408e036454e571591e1070bc 100644 --- a/gst/audiofx/gstscaletempo.c +++ b/gst/audiofx/gstscaletempo.c @@ -94,6 +94,7 @@ enum #define SUPPORTED_CAPS \ GST_STATIC_CAPS ( \ GST_AUDIO_CAPS_MAKE (GST_AUDIO_NE (F32)) "; " \ + GST_AUDIO_CAPS_MAKE (GST_AUDIO_NE (F64)) "; " \ GST_AUDIO_CAPS_MAKE (GST_AUDIO_NE (S16)) \ ) @@ -113,40 +114,44 @@ static GstStaticPadTemplate src_template = GST_STATIC_PAD_TEMPLATE ("src", G_DEFINE_TYPE_WITH_CODE (GstScaletempo, gst_scaletempo, GST_TYPE_BASE_TRANSFORM, DEBUG_INIT (0)); -static guint -best_overlap_offset_float (GstScaletempo * st) -{ - gfloat *pw, *po, *ppc, *search_start; - gfloat best_corr = G_MININT; - guint best_off = 0; - gint i, off; - - pw = st->table_window; - po = st->buf_overlap; - po += st->samples_per_frame; - ppc = st->buf_pre_corr; - for (i = st->samples_per_frame; i < st->samples_overlap; i++) { - *ppc++ = *pw++ * *po++; - } - - search_start = (gfloat *) st->buf_queue + st->samples_per_frame; - for (off = 0; off < st->frames_search; off++) { - gfloat corr = 0; - gfloat *ps = search_start; - ppc = st->buf_pre_corr; - for (i = st->samples_per_frame; i < st->samples_overlap; i++) { - corr += *ppc++ * *ps++; - } - if (corr > best_corr) { - best_corr = corr; - best_off = off; - } - search_start += st->samples_per_frame; - } - - return best_off * st->bytes_per_frame; +#define CREATE_BEST_OVERLAP_OFFSET_FLOAT_FUNC(type) \ +static guint \ +best_overlap_offset_##type (GstScaletempo * st) \ +{ \ + g##type *pw, *po, *ppc, *search_start; \ + g##type best_corr = G_MININT; \ + guint best_off = 0; \ + gint i, off; \ + \ + pw = st->table_window; \ + po = st->buf_overlap; \ + po += st->samples_per_frame; \ + ppc = st->buf_pre_corr; \ + for (i = st->samples_per_frame; i < st->samples_overlap; i++) { \ + *ppc++ = *pw++ * *po++; \ + } \ + \ + search_start = (g##type *) st->buf_queue + st->samples_per_frame; \ + for (off = 0; off < st->frames_search; off++) { \ + g##type corr = 0; \ + g##type *ps = search_start; \ + ppc = st->buf_pre_corr; \ + for (i = st->samples_per_frame; i < st->samples_overlap; i++) { \ + corr += *ppc++ * *ps++; \ + } \ + if (corr > best_corr) { \ + best_corr = corr; \ + best_off = off; \ + } \ + search_start += st->samples_per_frame; \ + } \ + \ + return best_off * st->bytes_per_frame; \ } +CREATE_BEST_OVERLAP_OFFSET_FLOAT_FUNC (float); +CREATE_BEST_OVERLAP_OFFSET_FLOAT_FUNC (double); + /* buffer padding for loop optimization: sizeof(gint32) * (loop_size - 1) */ #define UNROLL_PADDING (4*3) static guint @@ -192,20 +197,24 @@ best_overlap_offset_s16 (GstScaletempo * st) return best_off * st->bytes_per_frame; } -static void -output_overlap_float (GstScaletempo * st, gpointer buf_out, guint bytes_off) -{ - gfloat *pout = buf_out; - gfloat *pb = st->table_blend; - gfloat *po = st->buf_overlap; - gfloat *pin = (gfloat *) (st->buf_queue + bytes_off); - gint i; - for (i = 0; i < st->samples_overlap; i++) { - *pout++ = *po - *pb++ * (*po - *pin++); - po++; - } +#define CREATE_OUTPUT_OVERLAP_FLOAT_FUNC(type) \ +static void \ +output_overlap_##type (GstScaletempo * st, gpointer buf_out, guint bytes_off) \ +{ \ + g##type *pout = buf_out; \ + g##type *pb = st->table_blend; \ + g##type *po = st->buf_overlap; \ + g##type *pin = (g##type *) (st->buf_queue + bytes_off); \ + gint i; \ + for (i = 0; i < st->samples_overlap; i++) { \ + *pout++ = *po - *pb++ * (*po - *pin++); \ + po++; \ + } \ } +CREATE_OUTPUT_OVERLAP_FLOAT_FUNC (float); +CREATE_OUTPUT_OVERLAP_FLOAT_FUNC (double); + static void output_overlap_s16 (GstScaletempo * st, gpointer buf_out, guint bytes_off) { @@ -283,12 +292,13 @@ reinit_buffers (GstScaletempo * st) st->bytes_standing = st->bytes_stride - st->bytes_overlap; st->samples_standing = st->bytes_standing / st->bytes_per_sample; st->buf_overlap = g_realloc (st->buf_overlap, st->bytes_overlap); - st->table_blend = g_realloc (st->table_blend, st->samples_overlap * 4); /* sizeof (gint32|gfloat) */ + st->table_blend = + g_realloc (st->table_blend, st->samples_overlap * st->bytes_per_sample); if (st->bytes_overlap > prev_overlap) { memset ((guint8 *) st->buf_overlap + prev_overlap, 0, st->bytes_overlap - prev_overlap); } - if (st->use_int) { + if (st->format == GST_AUDIO_FORMAT_S16) { gint32 *pb = st->table_blend; gint64 blend = 0; for (i = 0; i < frames_overlap; i++) { @@ -299,7 +309,7 @@ reinit_buffers (GstScaletempo * st) blend += 65535; /* 2^16 */ } st->output_overlap = output_overlap_s16; - } else { + } else if (st->format == GST_AUDIO_FORMAT_F32) { gfloat *pb = st->table_blend; gfloat t = (gfloat) frames_overlap; for (i = 0; i < frames_overlap; i++) { @@ -309,6 +319,16 @@ reinit_buffers (GstScaletempo * st) } } st->output_overlap = output_overlap_float; + } else { + gdouble *pb = st->table_blend; + gdouble t = (gdouble) frames_overlap; + for (i = 0; i < frames_overlap; i++) { + gdouble v = i / t; + for (j = 0; j < st->samples_per_frame; j++) { + *pb++ = v; + } + } + st->output_overlap = output_overlap_double; } } @@ -318,11 +338,12 @@ reinit_buffers (GstScaletempo * st) if (st->frames_search < 1) { /* if no search */ st->best_overlap_offset = NULL; } else { - guint bytes_pre_corr = (st->samples_overlap - st->samples_per_frame) * 4; /* sizeof (gint32|gfloat) */ + guint bytes_pre_corr = + (st->samples_overlap - st->samples_per_frame) * st->bytes_per_sample; st->buf_pre_corr = g_realloc (st->buf_pre_corr, bytes_pre_corr + UNROLL_PADDING); st->table_window = g_realloc (st->table_window, bytes_pre_corr); - if (st->use_int) { + if (st->format == GST_AUDIO_FORMAT_S16) { gint64 t = frames_overlap; gint32 n = 8589934588LL / (t * t); /* 4 * (2^31 - 1) / t^2 */ gint32 *pw; @@ -336,7 +357,7 @@ reinit_buffers (GstScaletempo * st) } } st->best_overlap_offset = best_overlap_offset_s16; - } else { + } else if (st->format == GST_AUDIO_FORMAT_F32) { gfloat *pw = st->table_window; for (i = 1; i < frames_overlap; i++) { gfloat v = i * (frames_overlap - i); @@ -345,6 +366,15 @@ reinit_buffers (GstScaletempo * st) } } st->best_overlap_offset = best_overlap_offset_float; + } else { + gdouble *pw = st->table_window; + for (i = 1; i < frames_overlap; i++) { + gdouble v = i * (frames_overlap - i); + for (j = 0; j < st->samples_per_frame; j++) { + *pw++ = v; + } + } + st->best_overlap_offset = best_overlap_offset_double; } } @@ -386,7 +416,7 @@ reinit_buffers (GstScaletempo * st) (gint) (st->bytes_standing / st->bytes_per_frame), (gint) (st->bytes_overlap / st->bytes_per_frame), st->frames_search, (gint) (st->bytes_queue_max / st->bytes_per_frame), - (st->use_int ? "s16" : "float")); + gst_audio_format_to_string (st->format)); st->reinit_buffers = FALSE; } @@ -401,7 +431,19 @@ reverse_buffer (GstScaletempo * st, GstBuffer * inbuf) outbuf = gst_buffer_new_and_alloc (imap.size); gst_buffer_map (outbuf, &omap, GST_MAP_WRITE); - { + if (st->format == GST_AUDIO_FORMAT_F64) { + const gint64 *ip = (const gint64 *) imap.data; + gint64 *op = (gint64 *) (omap.data + omap.size - 8 * st->samples_per_frame); + guint i, n = imap.size / (8 * st->samples_per_frame); + guint j, c = st->samples_per_frame; + + for (i = 0; i < n; i++) { + for (j = 0; j < c; j++) + op[j] = ip[j]; + op -= c; + ip += c; + } + } else { const gint32 *ip = (const gint32 *) imap.data; gint32 *op = (gint32 *) (omap.data + omap.size - 4 * st->samples_per_frame); guint i, n = imap.size / (4 * st->samples_per_frame); @@ -616,8 +658,8 @@ gst_scaletempo_set_caps (GstBaseTransform * trans, GstScaletempo *scaletempo = GST_SCALETEMPO (trans); gint width, bps, nch, rate; - gboolean use_int; GstAudioInfo info; + GstAudioFormat format; if (!gst_audio_info_from_caps (&info, incaps)) return FALSE; @@ -625,7 +667,7 @@ gst_scaletempo_set_caps (GstBaseTransform * trans, nch = GST_AUDIO_INFO_CHANNELS (&info); rate = GST_AUDIO_INFO_RATE (&info); width = GST_AUDIO_INFO_WIDTH (&info); - use_int = GST_AUDIO_INFO_IS_INTEGER (&info); + format = GST_AUDIO_INFO_FORMAT (&info); bps = width / 8; @@ -633,13 +675,12 @@ gst_scaletempo_set_caps (GstBaseTransform * trans, if (rate != scaletempo->sample_rate || nch != scaletempo->samples_per_frame - || bps != scaletempo->bytes_per_sample - || use_int != scaletempo->use_int) { + || bps != scaletempo->bytes_per_sample || format != scaletempo->format) { scaletempo->sample_rate = rate; scaletempo->samples_per_frame = nch; scaletempo->bytes_per_sample = bps; scaletempo->bytes_per_frame = nch * bps; - scaletempo->use_int = use_int; + scaletempo->format = format; scaletempo->reinit_buffers = TRUE; } diff --git a/gst/audiofx/gstscaletempo.h b/gst/audiofx/gstscaletempo.h index a6065b01e576b28165496dbab6ad7dcff951c459..051881d5d949b83f6959d700d2ba5edf9681d9ad 100644 --- a/gst/audiofx/gstscaletempo.h +++ b/gst/audiofx/gstscaletempo.h @@ -49,7 +49,7 @@ struct _GstScaletempo guint ms_search; /* caps */ - gboolean use_int; + GstAudioFormat format; guint samples_per_frame; /* AKA number of channels */ guint bytes_per_sample; guint bytes_per_frame; diff --git a/gst/audioparsers/Makefile.in b/gst/audioparsers/Makefile.in index df9da7bb57bb3f6fbe827600f8dbc6f61945f775..f6ae87723ae053dfb0a3dd764d84b104f0ce9fae 100644 --- a/gst/audioparsers/Makefile.in +++ b/gst/audioparsers/Makefile.in @@ -485,6 +485,8 @@ VALGRIND_PATH = @VALGRIND_PATH@ VERSION = @VERSION@ VPX_130_CFLAGS = @VPX_130_CFLAGS@ VPX_130_LIBS = @VPX_130_LIBS@ +VPX_140_CFLAGS = @VPX_140_CFLAGS@ +VPX_140_LIBS = @VPX_140_LIBS@ VPX_CFLAGS = @VPX_CFLAGS@ VPX_LIBS = @VPX_LIBS@ WARNING_CFLAGS = @WARNING_CFLAGS@ diff --git a/gst/audioparsers/gstaacparse.c b/gst/audioparsers/gstaacparse.c index cd75b7f532f44708ec08c3eab72da9a7e54127d6..2be97c09c687a7f980076ec02d5bda95a26e41bd 100644 --- a/gst/audioparsers/gstaacparse.c +++ b/gst/audioparsers/gstaacparse.c @@ -1302,7 +1302,10 @@ gst_aac_parse_handle_frame (GstBaseParse * parse, /* This is pretty normal when skipping data at the start of * random stream (MPEG-TS capture for example) */ GST_DEBUG_OBJECT (aacparse, "Error reading LOAS config. Skipping."); - *skipsize = map.size; + /* Since we don't fully parse the LOAS config, we don't know for sure + * how much to skip. Just skip 1 to end up to the next marker and + * resume parsing from there */ + *skipsize = 1; goto exit; } @@ -1367,10 +1370,19 @@ gst_aac_parse_pre_push_frame (GstBaseParse * parse, GstBaseParseFrame * frame) GstTagList *taglist; GstCaps *caps; - taglist = gst_tag_list_new_empty (); - /* codec tag */ caps = gst_pad_get_current_caps (GST_BASE_PARSE_SRC_PAD (parse)); + if (caps == NULL) { + if (GST_PAD_IS_FLUSHING (GST_BASE_PARSE_SRC_PAD (parse))) { + GST_INFO_OBJECT (parse, "Src pad is flushing"); + return GST_FLOW_FLUSHING; + } else { + GST_INFO_OBJECT (parse, "Src pad is not negotiated!"); + return GST_FLOW_NOT_NEGOTIATED; + } + } + + taglist = gst_tag_list_new_empty (); gst_pb_utils_add_codec_description_to_tag_list (taglist, GST_TAG_AUDIO_CODEC, caps); gst_caps_unref (caps); diff --git a/gst/audioparsers/gstac3parse.c b/gst/audioparsers/gstac3parse.c index a7b2475a4e48ab0c01570203aa700d5c8cc9e040..875f9cb1b49ae3970412b5c172f80108591292d0 100644 --- a/gst/audioparsers/gstac3parse.c +++ b/gst/audioparsers/gstac3parse.c @@ -786,10 +786,19 @@ gst_ac3_parse_pre_push_frame (GstBaseParse * parse, GstBaseParseFrame * frame) GstTagList *taglist; GstCaps *caps; - taglist = gst_tag_list_new_empty (); - /* codec tag */ caps = gst_pad_get_current_caps (GST_BASE_PARSE_SRC_PAD (parse)); + if (G_UNLIKELY (caps == NULL)) { + if (GST_PAD_IS_FLUSHING (GST_BASE_PARSE_SRC_PAD (parse))) { + GST_INFO_OBJECT (parse, "Src pad is flushing"); + return GST_FLOW_FLUSHING; + } else { + GST_INFO_OBJECT (parse, "Src pad is not negotiated!"); + return GST_FLOW_NOT_NEGOTIATED; + } + } + + taglist = gst_tag_list_new_empty (); gst_pb_utils_add_codec_description_to_tag_list (taglist, GST_TAG_AUDIO_CODEC, caps); gst_caps_unref (caps); diff --git a/gst/audioparsers/gstamrparse.c b/gst/audioparsers/gstamrparse.c index b9501d5d86d6024c5e54a69cbeff2628405585b0..557afc9bfdc699c90074eb18d8b498614e8f1b1f 100644 --- a/gst/audioparsers/gstamrparse.c +++ b/gst/audioparsers/gstamrparse.c @@ -426,10 +426,19 @@ gst_amr_parse_pre_push_frame (GstBaseParse * parse, GstBaseParseFrame * frame) GstTagList *taglist; GstCaps *caps; - taglist = gst_tag_list_new_empty (); - /* codec tag */ caps = gst_pad_get_current_caps (GST_BASE_PARSE_SRC_PAD (parse)); + if (G_UNLIKELY (caps == NULL)) { + if (GST_PAD_IS_FLUSHING (GST_BASE_PARSE_SRC_PAD (parse))) { + GST_INFO_OBJECT (parse, "Src pad is flushing"); + return GST_FLOW_FLUSHING; + } else { + GST_INFO_OBJECT (parse, "Src pad is not negotiated!"); + return GST_FLOW_NOT_NEGOTIATED; + } + } + + taglist = gst_tag_list_new_empty (); gst_pb_utils_add_codec_description_to_tag_list (taglist, GST_TAG_AUDIO_CODEC, caps); gst_caps_unref (caps); diff --git a/gst/audioparsers/gstdcaparse.c b/gst/audioparsers/gstdcaparse.c index cfe97e1eb61ae49250015ad969f75c2875eeb7b6..380932381fdc0771f8849f48224642ebcc77ada4 100644 --- a/gst/audioparsers/gstdcaparse.c +++ b/gst/audioparsers/gstdcaparse.c @@ -565,10 +565,19 @@ gst_dca_parse_pre_push_frame (GstBaseParse * parse, GstBaseParseFrame * frame) GstTagList *taglist; GstCaps *caps; - taglist = gst_tag_list_new_empty (); - /* codec tag */ caps = gst_pad_get_current_caps (GST_BASE_PARSE_SRC_PAD (parse)); + if (G_UNLIKELY (caps == NULL)) { + if (GST_PAD_IS_FLUSHING (GST_BASE_PARSE_SRC_PAD (parse))) { + GST_INFO_OBJECT (parse, "Src pad is flushing"); + return GST_FLOW_FLUSHING; + } else { + GST_INFO_OBJECT (parse, "Src pad is not negotiated!"); + return GST_FLOW_NOT_NEGOTIATED; + } + } + + taglist = gst_tag_list_new_empty (); gst_pb_utils_add_codec_description_to_tag_list (taglist, GST_TAG_AUDIO_CODEC, caps); gst_caps_unref (caps); diff --git a/gst/audioparsers/gstflacparse.c b/gst/audioparsers/gstflacparse.c index bf598c7a221437ff9abbb4fa1f22e2196166266f..6939604939a8f35ba1b41f3e222746303f35487f 100644 --- a/gst/audioparsers/gstflacparse.c +++ b/gst/audioparsers/gstflacparse.c @@ -1708,6 +1708,15 @@ gst_flac_parse_pre_push_frame (GstBaseParse * parse, GstBaseParseFrame * frame) /* codec tag */ caps = gst_pad_get_current_caps (GST_BASE_PARSE_SRC_PAD (parse)); + if (G_UNLIKELY (caps == NULL)) { + if (GST_PAD_IS_FLUSHING (GST_BASE_PARSE_SRC_PAD (parse))) { + GST_INFO_OBJECT (parse, "Src pad is flushing"); + return GST_FLOW_FLUSHING; + } else { + GST_INFO_OBJECT (parse, "Src pad is not negotiated!"); + return GST_FLOW_NOT_NEGOTIATED; + } + } gst_pb_utils_add_codec_description_to_tag_list (flacparse->tags, GST_TAG_AUDIO_CODEC, caps); gst_caps_unref (caps); diff --git a/gst/audioparsers/gstmpegaudioparse.c b/gst/audioparsers/gstmpegaudioparse.c index ba4441d9ce8b31d8309f86ef347819c5b701414d..1a5313af8dc2433d77c72158e20ff1be5766f8f4 100644 --- a/gst/audioparsers/gstmpegaudioparse.c +++ b/gst/audioparsers/gstmpegaudioparse.c @@ -1361,6 +1361,17 @@ gst_mpeg_audio_parse_pre_push_frame (GstBaseParse * parse, /* codec tag */ caps = gst_pad_get_current_caps (GST_BASE_PARSE_SRC_PAD (parse)); + if (G_UNLIKELY (caps == NULL)) { + gst_tag_list_unref (taglist); + + if (GST_PAD_IS_FLUSHING (GST_BASE_PARSE_SRC_PAD (parse))) { + GST_INFO_OBJECT (parse, "Src pad is flushing"); + return GST_FLOW_FLUSHING; + } else { + GST_INFO_OBJECT (parse, "Src pad is not negotiated!"); + return GST_FLOW_NOT_NEGOTIATED; + } + } gst_pb_utils_add_codec_description_to_tag_list (taglist, GST_TAG_AUDIO_CODEC, caps); gst_caps_unref (caps); diff --git a/gst/audioparsers/gstsbcparse.c b/gst/audioparsers/gstsbcparse.c index 4412e2bd3b5a17257a0fcccb860146fe5e8af308..5776511934cde6c093294ccdcbb7cb9ecb9db186 100644 --- a/gst/audioparsers/gstsbcparse.c +++ b/gst/audioparsers/gstsbcparse.c @@ -507,10 +507,19 @@ gst_sbc_parse_pre_push_frame (GstBaseParse * parse, GstBaseParseFrame * frame) GstTagList *taglist; GstCaps *caps; - taglist = gst_tag_list_new_empty (); - /* codec tag */ caps = gst_pad_get_current_caps (GST_BASE_PARSE_SRC_PAD (parse)); + if (G_UNLIKELY (caps == NULL)) { + if (GST_PAD_IS_FLUSHING (GST_BASE_PARSE_SRC_PAD (parse))) { + GST_INFO_OBJECT (parse, "Src pad is flushing"); + return GST_FLOW_FLUSHING; + } else { + GST_INFO_OBJECT (parse, "Src pad is not negotiated!"); + return GST_FLOW_NOT_NEGOTIATED; + } + } + + taglist = gst_tag_list_new_empty (); gst_pb_utils_add_codec_description_to_tag_list (taglist, GST_TAG_AUDIO_CODEC, caps); gst_caps_unref (caps); diff --git a/gst/audioparsers/gstwavpackparse.c b/gst/audioparsers/gstwavpackparse.c index 3c6e27a861b2ffe7cf65c4d152ed755d3d3bc1d1..ce85c5b60cd43d0c1fbcf70e79cb400efa320436 100644 --- a/gst/audioparsers/gstwavpackparse.c +++ b/gst/audioparsers/gstwavpackparse.c @@ -680,10 +680,19 @@ gst_wavpack_parse_pre_push_frame (GstBaseParse * parse, GstTagList *taglist; GstCaps *caps; - taglist = gst_tag_list_new_empty (); - /* codec tag */ caps = gst_pad_get_current_caps (GST_BASE_PARSE_SRC_PAD (parse)); + if (G_UNLIKELY (caps == NULL)) { + if (GST_PAD_IS_FLUSHING (GST_BASE_PARSE_SRC_PAD (parse))) { + GST_INFO_OBJECT (parse, "Src pad is flushing"); + return GST_FLOW_FLUSHING; + } else { + GST_INFO_OBJECT (parse, "Src pad is not negotiated!"); + return GST_FLOW_NOT_NEGOTIATED; + } + } + + taglist = gst_tag_list_new_empty (); gst_pb_utils_add_codec_description_to_tag_list (taglist, GST_TAG_AUDIO_CODEC, caps); gst_caps_unref (caps); diff --git a/gst/auparse/Makefile.in b/gst/auparse/Makefile.in index 99361d21b6e5225a44a8763cc7ff60802fe49293..35870bf24972512e6add379e2887ea17942c8fb3 100644 --- a/gst/auparse/Makefile.in +++ b/gst/auparse/Makefile.in @@ -476,6 +476,8 @@ VALGRIND_PATH = @VALGRIND_PATH@ VERSION = @VERSION@ VPX_130_CFLAGS = @VPX_130_CFLAGS@ VPX_130_LIBS = @VPX_130_LIBS@ +VPX_140_CFLAGS = @VPX_140_CFLAGS@ +VPX_140_LIBS = @VPX_140_LIBS@ VPX_CFLAGS = @VPX_CFLAGS@ VPX_LIBS = @VPX_LIBS@ WARNING_CFLAGS = @WARNING_CFLAGS@ diff --git a/gst/autodetect/Makefile.in b/gst/autodetect/Makefile.in index 470f09866e0e4c263b3bf984c5dd44de2fd4bd24..c7a9984ff23675a47825d4d42666f7a302455c53 100644 --- a/gst/autodetect/Makefile.in +++ b/gst/autodetect/Makefile.in @@ -480,6 +480,8 @@ VALGRIND_PATH = @VALGRIND_PATH@ VERSION = @VERSION@ VPX_130_CFLAGS = @VPX_130_CFLAGS@ VPX_130_LIBS = @VPX_130_LIBS@ +VPX_140_CFLAGS = @VPX_140_CFLAGS@ +VPX_140_LIBS = @VPX_140_LIBS@ VPX_CFLAGS = @VPX_CFLAGS@ VPX_LIBS = @VPX_LIBS@ WARNING_CFLAGS = @WARNING_CFLAGS@ diff --git a/gst/avi/Makefile.in b/gst/avi/Makefile.in index 0566395583f7270a4c0e03045cf310911f7c55f3..390cdcb3944de05c5c9710175210d56aec7da1fc 100644 --- a/gst/avi/Makefile.in +++ b/gst/avi/Makefile.in @@ -478,6 +478,8 @@ VALGRIND_PATH = @VALGRIND_PATH@ VERSION = @VERSION@ VPX_130_CFLAGS = @VPX_130_CFLAGS@ VPX_130_LIBS = @VPX_130_LIBS@ +VPX_140_CFLAGS = @VPX_140_CFLAGS@ +VPX_140_LIBS = @VPX_140_LIBS@ VPX_CFLAGS = @VPX_CFLAGS@ VPX_LIBS = @VPX_LIBS@ WARNING_CFLAGS = @WARNING_CFLAGS@ diff --git a/gst/avi/gstavidemux.c b/gst/avi/gstavidemux.c index aaac6cbaa1ae259a35e16d8c166ec46262ffe40a..4a80cd6036696f187978f5fa0abdc48856b59854 100644 --- a/gst/avi/gstavidemux.c +++ b/gst/avi/gstavidemux.c @@ -2017,6 +2017,7 @@ gst_avi_demux_parse_stream (GstAviDemux * avi, GstBuffer * buf) GstEvent *event; gchar *stream_id; GstMapInfo map; + gboolean sparse = FALSE; element = GST_ELEMENT_CAST (avi); @@ -2284,7 +2285,8 @@ gst_avi_demux_parse_stream (GstAviDemux * avi, GstBuffer * buf) stream->strf.vids, stream->extradata, stream->initdata, &codec_name); /* DXSB is XSUB, and it is placed inside a vids */ - if (!caps || fourcc != GST_MAKE_FOURCC ('D', 'X', 'S', 'B')) { + if (!caps || (fourcc != GST_MAKE_FOURCC ('D', 'X', 'S', 'B') && + fourcc != GST_MAKE_FOURCC ('D', 'X', 'S', 'A'))) { padname = g_strdup_printf ("video_%u", avi->num_v_streams); templ = gst_element_class_get_pad_template (klass, "video_%u"); if (!caps) { @@ -2314,6 +2316,7 @@ gst_avi_demux_parse_stream (GstAviDemux * avi, GstBuffer * buf) templ = gst_element_class_get_pad_template (klass, "subpicture_%u"); tag_name = NULL; avi->num_sp_streams++; + sparse = TRUE; } break; } @@ -2353,6 +2356,7 @@ gst_avi_demux_parse_stream (GstAviDemux * avi, GstBuffer * buf) caps = gst_caps_new_empty_simple ("application/x-subtitle-avi"); tag_name = NULL; avi->num_t_streams++; + sparse = TRUE; break; } default: @@ -2431,6 +2435,8 @@ gst_avi_demux_parse_stream (GstAviDemux * avi, GstBuffer * buf) event = gst_event_new_stream_start (stream_id); if (avi->have_group_id) gst_event_set_group_id (event, avi->group_id); + if (sparse) + gst_event_set_stream_flags (event, GST_STREAM_FLAG_SPARSE); gst_pad_push_event (pad, event); g_free (stream_id); @@ -5186,6 +5192,10 @@ gst_avi_demux_loop_data (GstAviDemux * avi) && (timestamp > avi->segment.stop)) { goto eos_stop; } + } else { + if (keyframe && GST_CLOCK_TIME_IS_VALID (avi->segment.start) + && (timestamp < avi->segment.start)) + goto eos_stop; } GST_LOG ("reading buffer (size=%" G_GUINT64_FORMAT "), stream %d, pos %" diff --git a/gst/cutter/Makefile.in b/gst/cutter/Makefile.in index bf789fadfb9e3f0a57ef5d10cc8fcc41d601dc93..c0f7da374c036863f5fb2eed2502ccec31079737 100644 --- a/gst/cutter/Makefile.in +++ b/gst/cutter/Makefile.in @@ -476,6 +476,8 @@ VALGRIND_PATH = @VALGRIND_PATH@ VERSION = @VERSION@ VPX_130_CFLAGS = @VPX_130_CFLAGS@ VPX_130_LIBS = @VPX_130_LIBS@ +VPX_140_CFLAGS = @VPX_140_CFLAGS@ +VPX_140_LIBS = @VPX_140_LIBS@ VPX_CFLAGS = @VPX_CFLAGS@ VPX_LIBS = @VPX_LIBS@ WARNING_CFLAGS = @WARNING_CFLAGS@ diff --git a/gst/debugutils/Makefile.in b/gst/debugutils/Makefile.in index d8b7435f8bf5094464cc18fe33f34d792e13afff..c51a483ffd1f4238eee44a198d6d69cd108fa624 100644 --- a/gst/debugutils/Makefile.in +++ b/gst/debugutils/Makefile.in @@ -493,6 +493,8 @@ VALGRIND_PATH = @VALGRIND_PATH@ VERSION = @VERSION@ VPX_130_CFLAGS = @VPX_130_CFLAGS@ VPX_130_LIBS = @VPX_130_LIBS@ +VPX_140_CFLAGS = @VPX_140_CFLAGS@ +VPX_140_LIBS = @VPX_140_LIBS@ VPX_CFLAGS = @VPX_CFLAGS@ VPX_LIBS = @VPX_LIBS@ WARNING_CFLAGS = @WARNING_CFLAGS@ diff --git a/gst/debugutils/progressreport.c b/gst/debugutils/progressreport.c index 7dd05dc733f0b8965e55d7298d819fa4bf6b4c9a..1426ca832fcf362a0051d60320786637f38a70f2 100644 --- a/gst/debugutils/progressreport.c +++ b/gst/debugutils/progressreport.c @@ -252,6 +252,9 @@ gst_progress_report_do_query (GstProgressReport * filter, GstFormat format, cur = gst_segment_to_stream_time (&base->segment, format, GST_BUFFER_TIMESTAMP (buf)); total = base->segment.duration; + } else if (format == GST_FORMAT_BUFFERS) { + cur = filter->buffer_count; + total = -1; } else { return FALSE; } @@ -411,6 +414,7 @@ gst_progress_report_transform_ip (GstBaseTransform * trans, GstBuffer * buf) GST_OBJECT_LOCK (filter); need_update = ((cur_time.tv_sec - filter->last_report.tv_sec) >= filter->update_freq); + filter->buffer_count++; GST_OBJECT_UNLOCK (filter); if (need_update) { @@ -432,6 +436,7 @@ gst_progress_report_start (GstBaseTransform * trans) g_get_current_time (&filter->last_report); filter->start_time = filter->last_report; + filter->buffer_count = 0; return TRUE; } diff --git a/gst/debugutils/progressreport.h b/gst/debugutils/progressreport.h index c46ac099dfc642fdc4622e7db9adbf76bb16de19..d99093779be53a6616a470952b332d946603b774 100644 --- a/gst/debugutils/progressreport.h +++ b/gst/debugutils/progressreport.h @@ -50,6 +50,7 @@ struct _GstProgressReport gboolean do_query; GTimeVal start_time; GTimeVal last_report; + gint64 buffer_count; /* Format used for querying. Using a string here because the * format might not be registered yet when the property is set */ diff --git a/gst/deinterlace/Makefile.in b/gst/deinterlace/Makefile.in index 493aaf082131788e6e990ef314432f12b443a5c9..22a90c0538d8d16035514780080c73e27d407e9d 100644 --- a/gst/deinterlace/Makefile.in +++ b/gst/deinterlace/Makefile.in @@ -517,6 +517,8 @@ VALGRIND_PATH = @VALGRIND_PATH@ VERSION = @VERSION@ VPX_130_CFLAGS = @VPX_130_CFLAGS@ VPX_130_LIBS = @VPX_130_LIBS@ +VPX_140_CFLAGS = @VPX_140_CFLAGS@ +VPX_140_LIBS = @VPX_140_LIBS@ VPX_CFLAGS = @VPX_CFLAGS@ VPX_LIBS = @VPX_LIBS@ WARNING_CFLAGS = @WARNING_CFLAGS@ diff --git a/gst/deinterlace/gstdeinterlace.c b/gst/deinterlace/gstdeinterlace.c index 0c46a4229f62e26385ad29be5b075de25677698e..fa0c5f4a00801368f1fb945958d8bb1c4b0a1060 100644 --- a/gst/deinterlace/gstdeinterlace.c +++ b/gst/deinterlace/gstdeinterlace.c @@ -1191,9 +1191,9 @@ gst_deinterlace_update_qos (GstDeinterlace * self, gdouble proportion, GstClockTimeDiff diff, GstClockTime timestamp) { GST_DEBUG_OBJECT (self, - "Updating QoS: proportion %lf, diff %s%" GST_TIME_FORMAT ", timestamp %" - GST_TIME_FORMAT, proportion, (diff < 0) ? "-" : "", - GST_TIME_ARGS (ABS (diff)), GST_TIME_ARGS (timestamp)); + "Updating QoS: proportion %lf, diff %" GST_STIME_FORMAT ", timestamp %" + GST_TIME_FORMAT, proportion, GST_STIME_ARGS (diff), + GST_TIME_ARGS (timestamp)); GST_OBJECT_LOCK (self); self->proportion = proportion; @@ -2123,6 +2123,32 @@ gst_fraction_double (gint * n_out, gint * d_out, gboolean half) return TRUE; } +static gboolean +gst_deinterlace_acceptcaps (GstDeinterlace * self, GstPad * pad, GstCaps * caps) +{ + gboolean ret; + GstCaps *ourcaps; + GstVideoInterlaceMode interlacing_mode; + + interlacing_mode = GST_VIDEO_INFO_INTERLACE_MODE (&self->vinfo); + + if (self->mode == GST_DEINTERLACE_MODE_INTERLACED || + (self->mode == GST_DEINTERLACE_MODE_AUTO && + interlacing_mode != GST_VIDEO_INTERLACE_MODE_PROGRESSIVE)) { + ourcaps = gst_caps_from_string (DEINTERLACE_CAPS); + } else { + ourcaps = gst_pad_get_pad_template_caps (pad); + } + + ret = gst_caps_can_intersect (caps, ourcaps); + gst_caps_unref (ourcaps); + + GST_DEBUG_OBJECT (pad, "accept-caps result:%d for caps %" GST_PTR_FORMAT, + ret, caps); + + return ret; +} + static GstCaps * gst_deinterlace_getcaps (GstDeinterlace * self, GstPad * pad, GstCaps * filter) { @@ -2156,6 +2182,7 @@ gst_deinterlace_getcaps (GstDeinterlace * self, GstPad * pad, GstCaps * filter) if (!interlace_mode || g_strcmp0 (interlace_mode, "progressive") == 0) { filter_interlaced = FALSE; + break; } } } @@ -2675,6 +2702,17 @@ gst_deinterlace_sink_query (GstPad * pad, GstObject * parent, GstQuery * query) res = TRUE; break; } + case GST_QUERY_ACCEPT_CAPS: + { + GstCaps *caps; + gboolean ret; + + gst_query_parse_accept_caps (query, &caps); + ret = gst_deinterlace_acceptcaps (self, pad, caps); + gst_query_set_accept_caps_result (query, ret); + res = TRUE; + break; + } case GST_QUERY_ALLOCATION: if (self->passthrough) res = gst_pad_peer_query (self->srcpad, query); diff --git a/gst/dtmf/Makefile.in b/gst/dtmf/Makefile.in index c2abcb5a09e887e9c61fccafbd440a03550a36a4..8da27fa508c332708d60b38428e9744c5277d631 100644 --- a/gst/dtmf/Makefile.in +++ b/gst/dtmf/Makefile.in @@ -479,6 +479,8 @@ VALGRIND_PATH = @VALGRIND_PATH@ VERSION = @VERSION@ VPX_130_CFLAGS = @VPX_130_CFLAGS@ VPX_130_LIBS = @VPX_130_LIBS@ +VPX_140_CFLAGS = @VPX_140_CFLAGS@ +VPX_140_LIBS = @VPX_140_LIBS@ VPX_CFLAGS = @VPX_CFLAGS@ VPX_LIBS = @VPX_LIBS@ WARNING_CFLAGS = @WARNING_CFLAGS@ diff --git a/gst/effectv/Makefile.in b/gst/effectv/Makefile.in index f58a7ca9b0b72192589c48e68ac6996194d40d2f..f70dfd806b71818d431bf25ede346715d64d7ef1 100644 --- a/gst/effectv/Makefile.in +++ b/gst/effectv/Makefile.in @@ -484,6 +484,8 @@ VALGRIND_PATH = @VALGRIND_PATH@ VERSION = @VERSION@ VPX_130_CFLAGS = @VPX_130_CFLAGS@ VPX_130_LIBS = @VPX_130_LIBS@ +VPX_140_CFLAGS = @VPX_140_CFLAGS@ +VPX_140_LIBS = @VPX_140_LIBS@ VPX_CFLAGS = @VPX_CFLAGS@ VPX_LIBS = @VPX_LIBS@ WARNING_CFLAGS = @WARNING_CFLAGS@ diff --git a/gst/effectv/gstop.c b/gst/effectv/gstop.c index d91a375f50f7da7dfc88b85e08fe0f6bca570986..82da702d42761116e49457602632719bcf7680c9 100644 --- a/gst/effectv/gstop.c +++ b/gst/effectv/gstop.c @@ -275,14 +275,12 @@ gst_optv_set_info (GstVideoFilter * vfilter, GstCaps * incaps, height = GST_VIDEO_INFO_HEIGHT (in_info); for (i = 0; i < 4; i++) { - if (filter->opmap[i]) - g_free (filter->opmap[i]); + g_free (filter->opmap[i]); filter->opmap[i] = g_new (gint8, width * height); } setOpmap (filter->opmap, width, height); - if (filter->diff) - g_free (filter->diff); + g_free (filter->diff); filter->diff = g_new (guint8, width * height); return TRUE; @@ -307,14 +305,12 @@ gst_optv_finalize (GObject * object) gint i; for (i = 0; i < 4; i++) { - if (filter->opmap[i]) - g_free (filter->opmap[i]); + g_free (filter->opmap[i]); filter->opmap[i] = NULL; } } - if (filter->diff) - g_free (filter->diff); + g_free (filter->diff); filter->diff = NULL; G_OBJECT_CLASS (parent_class)->finalize (object); diff --git a/gst/effectv/gstradioac.c b/gst/effectv/gstradioac.c index 244f98f235584b1f2033fce5d1e428b91d0e661f..1af42349b6a347d5f8944ce99b496d2aebf9ac5a 100644 --- a/gst/effectv/gstradioac.c +++ b/gst/effectv/gstradioac.c @@ -439,28 +439,22 @@ gst_radioactv_set_info (GstVideoFilter * vfilter, GstCaps * incaps, filter->buf_margin_right = height - filter->buf_width - filter->buf_margin_left; - if (filter->blurzoombuf) - g_free (filter->blurzoombuf); + g_free (filter->blurzoombuf); filter->blurzoombuf = g_new0 (guint8, filter->buf_area * 2); - if (filter->blurzoomx) - g_free (filter->blurzoomx); + g_free (filter->blurzoomx); filter->blurzoomx = g_new0 (gint, filter->buf_width); - if (filter->blurzoomy) - g_free (filter->blurzoomy); + g_free (filter->blurzoomy); filter->blurzoomy = g_new0 (gint, filter->buf_height); - if (filter->snapframe) - g_free (filter->snapframe); + g_free (filter->snapframe); filter->snapframe = g_new (guint32, width * height); - if (filter->diff) - g_free (filter->diff); + g_free (filter->diff); filter->diff = g_new (guint8, width * height); - if (filter->background) - g_free (filter->background); + g_free (filter->background); filter->background = g_new0 (gint16, width * height); setTable (filter); @@ -490,28 +484,22 @@ gst_radioactv_finalize (GObject * object) { GstRadioacTV *filter = GST_RADIOACTV (object); - if (filter->snapframe) - g_free (filter->snapframe); + g_free (filter->snapframe); filter->snapframe = NULL; - if (filter->blurzoombuf) - g_free (filter->blurzoombuf); + g_free (filter->blurzoombuf); filter->blurzoombuf = NULL; - if (filter->diff) - g_free (filter->diff); + g_free (filter->diff); filter->diff = NULL; - if (filter->background) - g_free (filter->background); + g_free (filter->background); filter->background = NULL; - if (filter->blurzoomx) - g_free (filter->blurzoomx); + g_free (filter->blurzoomx); filter->blurzoomx = NULL; - if (filter->blurzoomy) - g_free (filter->blurzoomy); + g_free (filter->blurzoomy); filter->blurzoomy = NULL; G_OBJECT_CLASS (parent_class)->finalize (object); diff --git a/gst/effectv/gstripple.c b/gst/effectv/gstripple.c index 71b9796e14fee2e7ba7435be42a427ef7351d7bd..f81e4d73b205d16d967a5f98a21b45492cf5a8b9 100644 --- a/gst/effectv/gstripple.c +++ b/gst/effectv/gstripple.c @@ -460,24 +460,20 @@ gst_rippletv_set_info (GstVideoFilter * vfilter, GstCaps * incaps, /* we over allocate the buffers, as the render code does not handle clipping * very well */ - if (filter->map) - g_free (filter->map); + g_free (filter->map); filter->map = g_new0 (gint, (1 + filter->map_h) * filter->map_w * 3); filter->map1 = filter->map; filter->map2 = filter->map + filter->map_w * filter->map_h; filter->map3 = filter->map + filter->map_w * filter->map_h * 2; - if (filter->vtable) - g_free (filter->vtable); + g_free (filter->vtable); filter->vtable = g_new0 (gint8, (1 + filter->map_h) * filter->map_w * 2); - if (filter->background) - g_free (filter->background); + g_free (filter->background); filter->background = g_new0 (gint16, width * (height + 1)); - if (filter->diff) - g_free (filter->diff); + g_free (filter->diff); filter->diff = g_new0 (guint8, width * (height + 1)); GST_OBJECT_UNLOCK (filter); @@ -507,20 +503,16 @@ gst_rippletv_finalize (GObject * object) { GstRippleTV *filter = GST_RIPPLETV (object); - if (filter->map) - g_free (filter->map); + g_free (filter->map); filter->map = NULL; - if (filter->vtable) - g_free (filter->vtable); + g_free (filter->vtable); filter->vtable = NULL; - if (filter->background) - g_free (filter->background); + g_free (filter->background); filter->background = NULL; - if (filter->diff) - g_free (filter->diff); + g_free (filter->diff); filter->diff = NULL; G_OBJECT_CLASS (parent_class)->finalize (object); diff --git a/gst/effectv/gstshagadelic.c b/gst/effectv/gstshagadelic.c index 956e5dd59de2fcfae8c30986de7da5a4fc005454..2564cb330f48910a03e73ffd08a6aa9adb7c95ab 100644 --- a/gst/effectv/gstshagadelic.c +++ b/gst/effectv/gstshagadelic.c @@ -215,12 +215,10 @@ gst_shagadelictv_finalize (GObject * object) { GstShagadelicTV *filter = GST_SHAGADELICTV (object); - if (filter->ripple) - g_free (filter->ripple); + g_free (filter->ripple); filter->ripple = NULL; - if (filter->spiral) - g_free (filter->spiral); + g_free (filter->spiral); filter->spiral = NULL; G_OBJECT_CLASS (parent_class)->finalize (object); diff --git a/gst/effectv/gststreak.c b/gst/effectv/gststreak.c index 6eeb08dc7c7d569a486663958199943a25d144e4..be7149c9524177771d01ea78f2f7b9886ff569d9 100644 --- a/gst/effectv/gststreak.c +++ b/gst/effectv/gststreak.c @@ -151,8 +151,7 @@ gst_streaktv_set_info (GstVideoFilter * vfilter, GstCaps * incaps, width = GST_VIDEO_INFO_WIDTH (in_info); height = GST_VIDEO_INFO_HEIGHT (in_info); - if (filter->planebuffer) - g_free (filter->planebuffer); + g_free (filter->planebuffer); filter->planebuffer = g_new0 (guint32, width * height * 4 * PLANES); diff --git a/gst/equalizer/Makefile.in b/gst/equalizer/Makefile.in index 39cb30d5b7dc12a10c766b1e077652b0da8f7299..c8138de38c5d8850b3c61245805bc17f3572192f 100644 --- a/gst/equalizer/Makefile.in +++ b/gst/equalizer/Makefile.in @@ -482,6 +482,8 @@ VALGRIND_PATH = @VALGRIND_PATH@ VERSION = @VERSION@ VPX_130_CFLAGS = @VPX_130_CFLAGS@ VPX_130_LIBS = @VPX_130_LIBS@ +VPX_140_CFLAGS = @VPX_140_CFLAGS@ +VPX_140_LIBS = @VPX_140_LIBS@ VPX_CFLAGS = @VPX_CFLAGS@ VPX_LIBS = @VPX_LIBS@ WARNING_CFLAGS = @WARNING_CFLAGS@ diff --git a/gst/flv/Makefile.am b/gst/flv/Makefile.am index b396743805acd981fec472b3eddabf4ff735c672..b205999a09b4f0d1f47cc765a95b6504c63aefab 100644 --- a/gst/flv/Makefile.am +++ b/gst/flv/Makefile.am @@ -2,7 +2,7 @@ plugin_LTLIBRARIES = libgstflv.la libgstflv_la_CFLAGS = $(GST_PLUGINS_BASE_CFLAGS) $(GST_BASE_CFLAGS) $(GST_CFLAGS) libgstflv_la_LIBADD = -lgstpbutils-@GST_API_VERSION@ -lgstaudio-@GST_API_VERSION@ \ - -lgstvideo-@GST_API_VERSION@ \ + -lgstvideo-@GST_API_VERSION@ -lgsttag-$(GST_API_VERSION) \ $(GST_PLUGINS_BASE_LIBS) $(GST_BASE_LIBS) $(GST_LIBS) libgstflv_la_LDFLAGS = ${GST_PLUGIN_LDFLAGS} libgstflv_la_SOURCES = gstflvdemux.c gstflvmux.c diff --git a/gst/flv/Makefile.in b/gst/flv/Makefile.in index 74ed9dba573dab2e825a533f56fea363dc974546..64faf93ff3044268ad7de062ff1c6109e32cfe63 100644 --- a/gst/flv/Makefile.in +++ b/gst/flv/Makefile.in @@ -477,6 +477,8 @@ VALGRIND_PATH = @VALGRIND_PATH@ VERSION = @VERSION@ VPX_130_CFLAGS = @VPX_130_CFLAGS@ VPX_130_LIBS = @VPX_130_LIBS@ +VPX_140_CFLAGS = @VPX_140_CFLAGS@ +VPX_140_LIBS = @VPX_140_LIBS@ VPX_CFLAGS = @VPX_CFLAGS@ VPX_LIBS = @VPX_LIBS@ WARNING_CFLAGS = @WARNING_CFLAGS@ @@ -565,7 +567,7 @@ top_srcdir = @top_srcdir@ plugin_LTLIBRARIES = libgstflv.la libgstflv_la_CFLAGS = $(GST_PLUGINS_BASE_CFLAGS) $(GST_BASE_CFLAGS) $(GST_CFLAGS) libgstflv_la_LIBADD = -lgstpbutils-@GST_API_VERSION@ -lgstaudio-@GST_API_VERSION@ \ - -lgstvideo-@GST_API_VERSION@ \ + -lgstvideo-@GST_API_VERSION@ -lgsttag-$(GST_API_VERSION) \ $(GST_PLUGINS_BASE_LIBS) $(GST_BASE_LIBS) $(GST_LIBS) libgstflv_la_LDFLAGS = ${GST_PLUGIN_LDFLAGS} diff --git a/gst/flv/gstflvdemux.c b/gst/flv/gstflvdemux.c index 22bc40b8c3354818ae1f0a52c380eee58e2ff1d5..19765f7353d9bab4c31af8b988c8a357c9706777 100644 --- a/gst/flv/gstflvdemux.c +++ b/gst/flv/gstflvdemux.c @@ -38,12 +38,14 @@ #include "gstflvmux.h" #include <string.h> +#include <stdio.h> #include <gst/base/gstbytereader.h> #include <gst/base/gstbytewriter.h> #include <gst/pbutils/descriptions.h> #include <gst/pbutils/pbutils.h> #include <gst/audio/audio.h> #include <gst/video/video.h> +#include <gst/tag/tag.h> /* FIXME: don't rely on own GstIndex */ #include "gstindex.c" @@ -242,55 +244,74 @@ gst_flv_demux_check_seekability (GstFlvDemux * demux) GST_DEBUG_OBJECT (demux, "upstream seekable: %d", demux->upstream_seekable); } -static void -parse_flv_demux_parse_date_string (GDate * date, const gchar * s) +static GstDateTime * +parse_flv_demux_parse_date_string (const gchar * s) { - g_date_set_parse (date, s); - if (g_date_valid (date)) - return; + static const gchar months[12][4] = { + "Jan", "Feb", "Mar", "Apr", + "May", "Jun", "Jul", "Aug", + "Sep", "Oct", "Nov", "Dec" + }; + GstDateTime *dt = NULL; + gchar **tokens; + guint64 d; + gchar *endptr; + gint i, hh, mm, ss; + gint year = -1, month = -1, day = -1; + gint hour = -1, minute = -1, seconds = -1; /* "Fri Oct 15 15:13:16 2004" needs to be parsed */ - { - static const gchar *months[] = { - "Jan", "Feb", "Mar", "Apr", - "May", "Jun", "Jul", "Aug", - "Sep", "Oct", "Nov", "Dec" - }; - gchar **tokens = g_strsplit (s, " ", -1); - guint64 d; - gchar *endptr; - gint i; - - if (g_strv_length (tokens) != 5) - goto out; - - if (strlen (tokens[1]) != 3) - goto out; - for (i = 0; i < 12; i++) { - if (!strcmp (tokens[1], months[i])) { - break; - } - } - if (i == 12) - goto out; - g_date_set_month (date, i + 1); + tokens = g_strsplit (s, " ", -1); + + if (g_strv_length (tokens) != 5) + goto out; + + /* year */ + d = g_ascii_strtoull (tokens[4], &endptr, 10); + if (d == 0 && *endptr != '\0') + goto out; - d = g_ascii_strtoull (tokens[2], &endptr, 10); - if (d == 0 && *endptr != '\0') - goto out; + year = d; - g_date_set_day (date, d); + /* month */ + if (strlen (tokens[1]) != 3) + goto out; + for (i = 0; i < 12; i++) { + if (!strcmp (tokens[1], months[i])) { + break; + } + } + if (i == 12) + goto out; + + month = i + 1; - d = g_ascii_strtoull (tokens[4], &endptr, 10); - if (d == 0 && *endptr != '\0') - goto out; + /* day */ + d = g_ascii_strtoull (tokens[2], &endptr, 10); + if (d == 0 && *endptr != '\0') + goto out; - g_date_set_year (date, d); + day = d; - out: - if (tokens) - g_strfreev (tokens); + /* time */ + hh = mm = ss = 0; + if (sscanf (tokens[3], "%d:%d:%d", &hh, &mm, &ss) < 2) + goto out; + if (hh >= 0 && hh < 24 && mm >= 0 && mm < 60 && ss >= 0 && ss < 60) { + hour = hh; + minute = mm; + seconds = ss; } + +out: + + if (tokens) + g_strfreev (tokens); + + if (year > 0) + dt = gst_date_time_new (0.0, year, month, day, hour, minute, seconds); + + return dt; } static gboolean @@ -373,16 +394,16 @@ gst_flv_demux_parse_metadata_item (GstFlvDemux * demux, GstByteReader * reader, GST_DEBUG_OBJECT (demux, "%s => (string) %s", tag_name, s); if (!strcmp (tag_name, "creationdate")) { - GDate *date = g_date_new (); + GstDateTime *dt; - parse_flv_demux_parse_date_string (date, s); - if (!g_date_valid (date)) { - GST_DEBUG_OBJECT (demux, "Failed to parse string as date"); + dt = parse_flv_demux_parse_date_string (s); + if (dt == NULL) { + GST_DEBUG_OBJECT (demux, "Failed to parse '%s' into datetime", s); } else { gst_tag_list_add (demux->taglist, GST_TAG_MERGE_REPLACE, - GST_TAG_DATE, date, NULL); + GST_TAG_DATE_TIME, dt, NULL); } - g_date_free (date); + gst_date_time_unref (dt); } else if (!strcmp (tag_name, "creator")) { gst_tag_list_add (demux->taglist, GST_TAG_MERGE_REPLACE, GST_TAG_ARTIST, s, NULL); @@ -749,6 +770,7 @@ gst_flv_demux_audio_negotiate (GstFlvDemux * demux, guint32 codec_tag, GstByteWriter w; GstStructure *structure; GstBuffer *buf; + GstTagList *tags; caps = gst_caps_new_empty_simple ("audio/x-speex"); structure = gst_caps_get_structure (caps, 0); @@ -785,7 +807,9 @@ gst_flv_demux_audio_negotiate (GstFlvDemux * demux, guint32 codec_tag, /* comment part */ g_value_init (&value, GST_TYPE_BUFFER); - buf = gst_buffer_new_wrapped (g_memdup ("No comments", 12), 12); + tags = gst_tag_list_new_empty (); + buf = gst_tag_list_to_vorbiscomment_buffer (tags, NULL, 0, "No comments"); + gst_tag_list_unref (tags); g_value_take_boxed (&value, buf); gst_value_array_append_value (&streamheader, &value); g_value_unset (&value); @@ -1012,7 +1036,7 @@ gst_flv_demux_parse_tag_audio (GstFlvDemux * demux, GstBuffer * buffer) /* codec tags with special rates */ if (codec_tag == 5 || codec_tag == 14) rate = 8000; - else if (codec_tag == 4) + else if ((codec_tag == 4) || (codec_tag == 11)) rate = 16000; GST_LOG_OBJECT (demux, "audio tag with %d channels, %dHz sampling rate, " diff --git a/gst/flx/Makefile.in b/gst/flx/Makefile.in index 410c896da04d32cec44127693d07110c391924d5..979805e6d5b80712181518bee14576e19a5fce18 100644 --- a/gst/flx/Makefile.in +++ b/gst/flx/Makefile.in @@ -477,6 +477,8 @@ VALGRIND_PATH = @VALGRIND_PATH@ VERSION = @VERSION@ VPX_130_CFLAGS = @VPX_130_CFLAGS@ VPX_130_LIBS = @VPX_130_LIBS@ +VPX_140_CFLAGS = @VPX_140_CFLAGS@ +VPX_140_LIBS = @VPX_140_LIBS@ VPX_CFLAGS = @VPX_CFLAGS@ VPX_LIBS = @VPX_LIBS@ WARNING_CFLAGS = @WARNING_CFLAGS@ diff --git a/gst/flx/gstflxdec.c b/gst/flx/gstflxdec.c index 3df4e9b863169b4e5b4ef9e12c649eacdf6c3fd4..71fd880fa8629b4bfc4af39bec0032de435b0b84 100644 --- a/gst/flx/gstflxdec.c +++ b/gst/flx/gstflxdec.c @@ -596,8 +596,7 @@ gst_flxdec_chain (GstPad * pad, GstObject * parent, GstBuffer * buf) break; } - if (chunk) - g_free (chunk); + g_free (chunk); avail = gst_adapter_available (flxdec->adapter); } diff --git a/gst/goom/Makefile.am b/gst/goom/Makefile.am index 1ffa734014f1325f99b5cc3d9663a72a0fde5839..178172fa48fb7210d975056cb7815ace91a1f875 100644 --- a/gst/goom/Makefile.am +++ b/gst/goom/Makefile.am @@ -35,11 +35,10 @@ libgstgoom_la_SOURCES = \ goom.h goom_typedefs.h goom_graphic.h \ goom_config_param.h goom_visual_fx.h goom_filters.h \ goom_tools.h goom_tools.h goom_config.h \ - gstaudiovisualizer.c gstaudiovisualizer.h \ $(ARCH_FILES) libgstgoom_la_CFLAGS = $(GST_PLUGINS_BASE_CFLAGS) $(GST_BASE_CFLAGS) $(GST_CFLAGS) $(GOOM_FILTER_CFLAGS) $(ARCH_CFLAGS) $(ORC_CFLAGS) -libgstgoom_la_LIBADD = $(GST_BASE_LIBS) $(GST_LIBS) -lgstvideo-$(GST_API_VERSION) -lgstaudio-$(GST_API_VERSION) $(LIBM) $(ORC_LIBS) +libgstgoom_la_LIBADD = $(GST_PLUGINS_BASE_LIBS) -lgstpbutils-$(GST_API_VERSION) $(GST_BASE_LIBS) $(GST_LIBS) $(LIBM) $(ORC_LIBS) libgstgoom_la_LDFLAGS = $(GST_PLUGIN_LDFLAGS) libgstgoom_la_LIBTOOLFLAGS = $(GST_PLUGIN_LIBTOOLFLAGS) diff --git a/gst/goom/Makefile.in b/gst/goom/Makefile.in index c822bc16da74a7c8ccda3f7c16eae2f8bf95d1cb..ab2c7cff08699be61d75f34888f24ebda46a5222 100644 --- a/gst/goom/Makefile.in +++ b/gst/goom/Makefile.in @@ -162,7 +162,7 @@ LTLIBRARIES = $(plugin_LTLIBRARIES) am__DEPENDENCIES_1 = libgstgoom_la_DEPENDENCIES = $(am__DEPENDENCIES_1) \ $(am__DEPENDENCIES_1) $(am__DEPENDENCIES_1) \ - $(am__DEPENDENCIES_1) + $(am__DEPENDENCIES_1) $(am__DEPENDENCIES_1) am__libgstgoom_la_SOURCES_DIST = gstgoom.c gstgoom.h drawmethods.c \ drawmethods.h sound_tester.c sound_tester.h mathtools.c \ mathtools.h lines.c lines.h ifs.c ifs.h surf3d.c surf3d.h \ @@ -171,8 +171,8 @@ am__libgstgoom_la_SOURCES_DIST = gstgoom.c gstgoom.h drawmethods.c \ motif_goom2.h plugin_info.c goom_plugin_info.h goom_tools.c \ config_param.c filters.c goom_core.c graphic.c goom.h \ goom_typedefs.h goom_graphic.h goom_config_param.h \ - goom_filters.h goom_tools.h goom_config.h gstaudiovisualizer.c \ - gstaudiovisualizer.h mmx.c xmmx.c mmx.h xmmx.h + goom_filters.h goom_tools.h goom_config.h mmx.c xmmx.c mmx.h \ + xmmx.h am__objects_1 = libgstgoom_la-mmx.lo libgstgoom_la-xmmx.lo @HAVE_CPU_I386_TRUE@am__objects_2 = $(am__objects_1) am_libgstgoom_la_OBJECTS = libgstgoom_la-gstgoom.lo \ @@ -184,7 +184,7 @@ am_libgstgoom_la_OBJECTS = libgstgoom_la-gstgoom.lo \ libgstgoom_la-plugin_info.lo libgstgoom_la-goom_tools.lo \ libgstgoom_la-config_param.lo libgstgoom_la-filters.lo \ libgstgoom_la-goom_core.lo libgstgoom_la-graphic.lo \ - libgstgoom_la-gstaudiovisualizer.lo $(am__objects_2) + $(am__objects_2) libgstgoom_la_OBJECTS = $(am_libgstgoom_la_OBJECTS) AM_V_lt = $(am__v_lt_@AM_V@) am__v_lt_ = $(am__v_lt_@AM_DEFAULT_V@) @@ -495,6 +495,8 @@ VALGRIND_PATH = @VALGRIND_PATH@ VERSION = @VERSION@ VPX_130_CFLAGS = @VPX_130_CFLAGS@ VPX_130_LIBS = @VPX_130_LIBS@ +VPX_140_CFLAGS = @VPX_140_CFLAGS@ +VPX_140_LIBS = @VPX_140_LIBS@ VPX_CFLAGS = @VPX_CFLAGS@ VPX_LIBS = @VPX_LIBS@ WARNING_CFLAGS = @WARNING_CFLAGS@ @@ -608,11 +610,10 @@ libgstgoom_la_SOURCES = \ goom.h goom_typedefs.h goom_graphic.h \ goom_config_param.h goom_visual_fx.h goom_filters.h \ goom_tools.h goom_tools.h goom_config.h \ - gstaudiovisualizer.c gstaudiovisualizer.h \ $(ARCH_FILES) libgstgoom_la_CFLAGS = $(GST_PLUGINS_BASE_CFLAGS) $(GST_BASE_CFLAGS) $(GST_CFLAGS) $(GOOM_FILTER_CFLAGS) $(ARCH_CFLAGS) $(ORC_CFLAGS) -libgstgoom_la_LIBADD = $(GST_BASE_LIBS) $(GST_LIBS) -lgstvideo-$(GST_API_VERSION) -lgstaudio-$(GST_API_VERSION) $(LIBM) $(ORC_LIBS) +libgstgoom_la_LIBADD = $(GST_PLUGINS_BASE_LIBS) -lgstpbutils-$(GST_API_VERSION) $(GST_BASE_LIBS) $(GST_LIBS) $(LIBM) $(ORC_LIBS) libgstgoom_la_LDFLAGS = $(GST_PLUGIN_LDFLAGS) libgstgoom_la_LIBTOOLFLAGS = $(GST_PLUGIN_LIBTOOLFLAGS) EXTRA_DIST = $(PPC_FILES) $(MMX_FILES) @@ -702,7 +703,6 @@ distclean-compile: @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libgstgoom_la-goom_core.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libgstgoom_la-goom_tools.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libgstgoom_la-graphic.Plo@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libgstgoom_la-gstaudiovisualizer.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libgstgoom_la-gstgoom.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libgstgoom_la-ifs.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libgstgoom_la-lines.Plo@am__quote@ @@ -858,13 +858,6 @@ libgstgoom_la-graphic.lo: graphic.c @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CC $(libgstgoom_la_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libgstgoom_la_CFLAGS) $(CFLAGS) -c -o libgstgoom_la-graphic.lo `test -f 'graphic.c' || echo '$(srcdir)/'`graphic.c -libgstgoom_la-gstaudiovisualizer.lo: gstaudiovisualizer.c -@am__fastdepCC_TRUE@ $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(libgstgoom_la_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libgstgoom_la_CFLAGS) $(CFLAGS) -MT libgstgoom_la-gstaudiovisualizer.lo -MD -MP -MF $(DEPDIR)/libgstgoom_la-gstaudiovisualizer.Tpo -c -o libgstgoom_la-gstaudiovisualizer.lo `test -f 'gstaudiovisualizer.c' || echo '$(srcdir)/'`gstaudiovisualizer.c -@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/libgstgoom_la-gstaudiovisualizer.Tpo $(DEPDIR)/libgstgoom_la-gstaudiovisualizer.Plo -@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='gstaudiovisualizer.c' object='libgstgoom_la-gstaudiovisualizer.lo' libtool=yes @AMDEPBACKSLASH@ -@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ -@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CC $(libgstgoom_la_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libgstgoom_la_CFLAGS) $(CFLAGS) -c -o libgstgoom_la-gstaudiovisualizer.lo `test -f 'gstaudiovisualizer.c' || echo '$(srcdir)/'`gstaudiovisualizer.c - libgstgoom_la-mmx.lo: mmx.c @am__fastdepCC_TRUE@ $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(libgstgoom_la_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libgstgoom_la_CFLAGS) $(CFLAGS) -MT libgstgoom_la-mmx.lo -MD -MP -MF $(DEPDIR)/libgstgoom_la-mmx.Tpo -c -o libgstgoom_la-mmx.lo `test -f 'mmx.c' || echo '$(srcdir)/'`mmx.c @am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/libgstgoom_la-mmx.Tpo $(DEPDIR)/libgstgoom_la-mmx.Plo diff --git a/gst/goom/gstaudiovisualizer.c b/gst/goom/gstaudiovisualizer.c deleted file mode 100644 index e643de49aaf81f4da15f1d4d8ccb60403448a92e..0000000000000000000000000000000000000000 --- a/gst/goom/gstaudiovisualizer.c +++ /dev/null @@ -1,1455 +0,0 @@ -/* GStreamer - * Copyright (C) <2011> Stefan Kost <ensonic@users.sf.net> - * Copyright (C) <2015> Luis de Bethencourt <luis@debethencourt.com> - * - * gstaudiovisualizer.c: class for audio visualisation elements - * - * This program is free software; you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation; either version 2 of the License, or - * (at your option) any later version. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with this program; if not, write to the Free Software - * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA. - */ -/** - * SECTION:gstaudiovisualizer - * - * A class for scopes (visualizers). It takes care of re-fitting the audio-rate - * to video-rate and handles renegotiation (downstream video size changes). - * - * It also provides several background shading effects. These effects are - * applied to a previous picture before the render() implementation can draw a - * new frame. - */ - -#ifdef HAVE_CONFIG_H -#include "config.h" -#endif - -#include <string.h> - -#include <gst/video/video.h> -#include <gst/video/gstvideometa.h> -#include <gst/video/gstvideopool.h> - -#include "gstaudiovisualizer.h" - -GST_DEBUG_CATEGORY_STATIC (audio_visualizer_debug); -#define GST_CAT_DEFAULT (audio_visualizer_debug) - -#define DEFAULT_SHADER GST_AUDIO_VISUALIZER_SHADER_FADE -#define DEFAULT_SHADE_AMOUNT 0x000a0a0a - -enum -{ - PROP_0, - PROP_SHADER, - PROP_SHADE_AMOUNT -}; - -static GstBaseTransformClass *parent_class = NULL; - -static void gst_audio_visualizer_class_init (GstAudioVisualizerClass * klass); -static void gst_audio_visualizer_init (GstAudioVisualizer * scope, - GstAudioVisualizerClass * g_class); -static void gst_audio_visualizer_set_property (GObject * object, - guint prop_id, const GValue * value, GParamSpec * pspec); -static void gst_audio_visualizer_get_property (GObject * object, - guint prop_id, GValue * value, GParamSpec * pspec); -static void gst_audio_visualizer_finalize (GObject * object); - -static gboolean gst_audio_visualizer_src_negotiate (GstAudioVisualizer * scope); -static gboolean gst_audio_visualizer_src_setcaps (GstAudioVisualizer * - scope, GstCaps * caps); -static gboolean gst_audio_visualizer_sink_setcaps (GstAudioVisualizer * - scope, GstCaps * caps); - -static GstFlowReturn gst_audio_visualizer_chain (GstPad * pad, - GstObject * parent, GstBuffer * buffer); - -static gboolean gst_audio_visualizer_src_event (GstPad * pad, - GstObject * parent, GstEvent * event); -static gboolean gst_audio_visualizer_sink_event (GstPad * pad, - GstObject * parent, GstEvent * event); - -static gboolean gst_audio_visualizer_src_query (GstPad * pad, - GstObject * parent, GstQuery * query); - -static GstStateChangeReturn gst_audio_visualizer_change_state (GstElement * - element, GstStateChange transition); - -static gboolean gst_audio_visualizer_do_bufferpool (GstAudioVisualizer * scope, - GstCaps * outcaps); - -static gboolean -default_decide_allocation (GstAudioVisualizer * scope, GstQuery * query); - -#define GST_AUDIO_VISUALIZER_GET_PRIVATE(obj) \ - (G_TYPE_INSTANCE_GET_PRIVATE ((obj), GST_TYPE_AUDIO_VISUALIZER, GstAudioVisualizerPrivate)) - -struct _GstAudioVisualizerPrivate -{ - gboolean negotiated; - - GstBufferPool *pool; - gboolean pool_active; - GstAllocator *allocator; - GstAllocationParams params; - GstQuery *query; - - /* pads */ - GstPad *srcpad, *sinkpad; - - GstAudioVisualizerShader shader_type; - GstAudioVisualizerShaderFunc shader; - guint32 shade_amount; - - GstAdapter *adapter; - - GstBuffer *inbuf; - GstBuffer *tempbuf; - GstVideoFrame tempframe; - - guint spf; /* samples per video frame */ - guint64 frame_duration; - - /* QoS stuff *//* with LOCK */ - gdouble proportion; - GstClockTime earliest_time; - - guint dropped; /* frames dropped / not dropped */ - guint processed; - - /* configuration mutex */ - GMutex config_lock; - - GstSegment segment; -}; - -/* shading functions */ - -#define GST_TYPE_AUDIO_VISUALIZER_SHADER (gst_audio_visualizer_shader_get_type()) -static GType -gst_audio_visualizer_shader_get_type (void) -{ - static GType shader_type = 0; - static const GEnumValue shaders[] = { - {GST_AUDIO_VISUALIZER_SHADER_NONE, "None", "none"}, - {GST_AUDIO_VISUALIZER_SHADER_FADE, "Fade", "fade"}, - {GST_AUDIO_VISUALIZER_SHADER_FADE_AND_MOVE_UP, "Fade and move up", - "fade-and-move-up"}, - {GST_AUDIO_VISUALIZER_SHADER_FADE_AND_MOVE_DOWN, "Fade and move down", - "fade-and-move-down"}, - {GST_AUDIO_VISUALIZER_SHADER_FADE_AND_MOVE_LEFT, "Fade and move left", - "fade-and-move-left"}, - {GST_AUDIO_VISUALIZER_SHADER_FADE_AND_MOVE_RIGHT, - "Fade and move right", - "fade-and-move-right"}, - {GST_AUDIO_VISUALIZER_SHADER_FADE_AND_MOVE_HORIZ_OUT, - "Fade and move horizontally out", "fade-and-move-horiz-out"}, - {GST_AUDIO_VISUALIZER_SHADER_FADE_AND_MOVE_HORIZ_IN, - "Fade and move horizontally in", "fade-and-move-horiz-in"}, - {GST_AUDIO_VISUALIZER_SHADER_FADE_AND_MOVE_VERT_OUT, - "Fade and move vertically out", "fade-and-move-vert-out"}, - {GST_AUDIO_VISUALIZER_SHADER_FADE_AND_MOVE_VERT_IN, - "Fade and move vertically in", "fade-and-move-vert-in"}, - {0, NULL, NULL}, - }; - - if (G_UNLIKELY (shader_type == 0)) { - /* TODO: rename when exporting it as a library */ - shader_type = - g_enum_register_static ("GstAudioVisualizerShader-ExtGoom", shaders); - } - return shader_type; -} - -/* we're only supporting GST_VIDEO_FORMAT_xRGB right now) */ -#if G_BYTE_ORDER == G_LITTLE_ENDIAN - -#define SHADE(_d, _s, _i, _r, _g, _b) \ -G_STMT_START { \ - _d[_i * 4 + 0] = (_s[_i * 4 + 0] > _b) ? _s[_i * 4 + 0] - _b : 0; \ - _d[_i * 4 + 1] = (_s[_i * 4 + 1] > _g) ? _s[_i * 4 + 1] - _g : 0; \ - _d[_i * 4 + 2] = (_s[_i * 4 + 2] > _r) ? _s[_i * 4 + 2] - _r : 0; \ - _d[_i * 4 + 3] = 0; \ -} G_STMT_END - -#else /* G_BYTE_ORDER == G_LITTLE_ENDIAN */ - -#define SHADE(_d, _s, _i, _r, _g, _b) \ -G_STMT_START { \ - _d[_i * 4 + 0] = 0; \ - _d[_i * 4 + 1] = (_s[_i * 4 + 1] > _r) ? _s[_i * 4 + 1] - _r : 0; \ - _d[_i * 4 + 2] = (_s[_i * 4 + 2] > _g) ? _s[_i * 4 + 2] - _g : 0; \ - _d[_i * 4 + 3] = (_s[_i * 4 + 3] > _b) ? _s[_i * 4 + 3] - _b : 0; \ -} G_STMT_END - -#endif - -static void -shader_fade (GstAudioVisualizer * scope, const GstVideoFrame * sframe, - GstVideoFrame * dframe) -{ - guint i, j; - guint32 shade_amount = scope->priv->shade_amount; - guint r = (shade_amount >> 16) & 0xff; - guint g = (shade_amount >> 8) & 0xff; - guint b = (shade_amount >> 0) & 0xff; - guint8 *s, *d; - gint ss, ds, width, height; - - s = GST_VIDEO_FRAME_PLANE_DATA (sframe, 0); - ss = GST_VIDEO_FRAME_PLANE_STRIDE (sframe, 0); - d = GST_VIDEO_FRAME_PLANE_DATA (dframe, 0); - ds = GST_VIDEO_FRAME_PLANE_STRIDE (dframe, 0); - - width = GST_VIDEO_FRAME_WIDTH (sframe); - height = GST_VIDEO_FRAME_HEIGHT (sframe); - - for (j = 0; j < height; j++) { - for (i = 0; i < width; i++) { - SHADE (d, s, i, r, g, b); - } - s += ss; - d += ds; - } -} - -static void -shader_fade_and_move_up (GstAudioVisualizer * scope, - const GstVideoFrame * sframe, GstVideoFrame * dframe) -{ - guint i, j; - guint32 shade_amount = scope->priv->shade_amount; - guint r = (shade_amount >> 16) & 0xff; - guint g = (shade_amount >> 8) & 0xff; - guint b = (shade_amount >> 0) & 0xff; - guint8 *s, *d; - gint ss, ds, width, height; - - s = GST_VIDEO_FRAME_PLANE_DATA (sframe, 0); - ss = GST_VIDEO_FRAME_PLANE_STRIDE (sframe, 0); - d = GST_VIDEO_FRAME_PLANE_DATA (dframe, 0); - ds = GST_VIDEO_FRAME_PLANE_STRIDE (dframe, 0); - - width = GST_VIDEO_FRAME_WIDTH (sframe); - height = GST_VIDEO_FRAME_HEIGHT (sframe); - - for (j = 1; j < height; j++) { - s += ss; - for (i = 0; i < width; i++) { - SHADE (d, s, i, r, g, b); - } - d += ds; - } -} - -static void -shader_fade_and_move_down (GstAudioVisualizer * scope, - const GstVideoFrame * sframe, GstVideoFrame * dframe) -{ - guint i, j; - guint32 shade_amount = scope->priv->shade_amount; - guint r = (shade_amount >> 16) & 0xff; - guint g = (shade_amount >> 8) & 0xff; - guint b = (shade_amount >> 0) & 0xff; - guint8 *s, *d; - gint ss, ds, width, height; - - s = GST_VIDEO_FRAME_PLANE_DATA (sframe, 0); - ss = GST_VIDEO_FRAME_PLANE_STRIDE (sframe, 0); - d = GST_VIDEO_FRAME_PLANE_DATA (dframe, 0); - ds = GST_VIDEO_FRAME_PLANE_STRIDE (dframe, 0); - - width = GST_VIDEO_FRAME_WIDTH (sframe); - height = GST_VIDEO_FRAME_HEIGHT (sframe); - - for (j = 1; j < height; j++) { - d += ds; - for (i = 0; i < width; i++) { - SHADE (d, s, i, r, g, b); - } - s += ss; - } -} - -static void -shader_fade_and_move_left (GstAudioVisualizer * scope, - const GstVideoFrame * sframe, GstVideoFrame * dframe) -{ - guint i, j; - guint32 shade_amount = scope->priv->shade_amount; - guint r = (shade_amount >> 16) & 0xff; - guint g = (shade_amount >> 8) & 0xff; - guint b = (shade_amount >> 0) & 0xff; - guint8 *s, *d; - gint ss, ds, width, height; - - s = GST_VIDEO_FRAME_PLANE_DATA (sframe, 0); - ss = GST_VIDEO_FRAME_PLANE_STRIDE (sframe, 0); - d = GST_VIDEO_FRAME_PLANE_DATA (dframe, 0); - ds = GST_VIDEO_FRAME_PLANE_STRIDE (dframe, 0); - - width = GST_VIDEO_FRAME_WIDTH (sframe); - height = GST_VIDEO_FRAME_HEIGHT (sframe); - - width -= 1; - s += 4; - - /* move to the left */ - for (j = 0; j < height; j++) { - for (i = 0; i < width; i++) { - SHADE (d, s, i, r, g, b); - } - d += ds; - s += ss; - } -} - -static void -shader_fade_and_move_right (GstAudioVisualizer * scope, - const GstVideoFrame * sframe, GstVideoFrame * dframe) -{ - guint i, j; - guint32 shade_amount = scope->priv->shade_amount; - guint r = (shade_amount >> 16) & 0xff; - guint g = (shade_amount >> 8) & 0xff; - guint b = (shade_amount >> 0) & 0xff; - guint8 *s, *d; - gint ss, ds, width, height; - - s = GST_VIDEO_FRAME_PLANE_DATA (sframe, 0); - ss = GST_VIDEO_FRAME_PLANE_STRIDE (sframe, 0); - d = GST_VIDEO_FRAME_PLANE_DATA (dframe, 0); - ds = GST_VIDEO_FRAME_PLANE_STRIDE (dframe, 0); - - width = GST_VIDEO_FRAME_WIDTH (sframe); - height = GST_VIDEO_FRAME_HEIGHT (sframe); - - width -= 1; - d += 4; - - /* move to the right */ - for (j = 0; j < height; j++) { - for (i = 0; i < width; i++) { - SHADE (d, s, i, r, g, b); - } - d += ds; - s += ss; - } -} - -static void -shader_fade_and_move_horiz_out (GstAudioVisualizer * scope, - const GstVideoFrame * sframe, GstVideoFrame * dframe) -{ - guint i, j; - guint32 shade_amount = scope->priv->shade_amount; - guint r = (shade_amount >> 16) & 0xff; - guint g = (shade_amount >> 8) & 0xff; - guint b = (shade_amount >> 0) & 0xff; - guint8 *s, *d; - gint ss, ds, width, height; - - s = GST_VIDEO_FRAME_PLANE_DATA (sframe, 0); - ss = GST_VIDEO_FRAME_PLANE_STRIDE (sframe, 0); - d = GST_VIDEO_FRAME_PLANE_DATA (dframe, 0); - ds = GST_VIDEO_FRAME_PLANE_STRIDE (dframe, 0); - - width = GST_VIDEO_FRAME_WIDTH (sframe); - height = GST_VIDEO_FRAME_HEIGHT (sframe); - - /* move upper half up */ - for (j = 0; j < height / 2; j++) { - s += ss; - for (i = 0; i < width; i++) { - SHADE (d, s, i, r, g, b); - } - d += ds; - } - /* move lower half down */ - for (j = 0; j < height / 2; j++) { - d += ds; - for (i = 0; i < width; i++) { - SHADE (d, s, i, r, g, b); - } - s += ss; - } -} - -static void -shader_fade_and_move_horiz_in (GstAudioVisualizer * scope, - const GstVideoFrame * sframe, GstVideoFrame * dframe) -{ - guint i, j; - guint32 shade_amount = scope->priv->shade_amount; - guint r = (shade_amount >> 16) & 0xff; - guint g = (shade_amount >> 8) & 0xff; - guint b = (shade_amount >> 0) & 0xff; - guint8 *s, *d; - gint ss, ds, width, height; - - s = GST_VIDEO_FRAME_PLANE_DATA (sframe, 0); - ss = GST_VIDEO_FRAME_PLANE_STRIDE (sframe, 0); - d = GST_VIDEO_FRAME_PLANE_DATA (dframe, 0); - ds = GST_VIDEO_FRAME_PLANE_STRIDE (dframe, 0); - - width = GST_VIDEO_FRAME_WIDTH (sframe); - height = GST_VIDEO_FRAME_HEIGHT (sframe); - - /* move upper half down */ - for (j = 0; j < height / 2; j++) { - d += ds; - for (i = 0; i < width; i++) { - SHADE (d, s, i, r, g, b); - } - s += ss; - } - /* move lower half up */ - for (j = 0; j < height / 2; j++) { - s += ss; - for (i = 0; i < width; i++) { - SHADE (d, s, i, r, g, b); - } - d += ds; - } -} - -static void -shader_fade_and_move_vert_out (GstAudioVisualizer * scope, - const GstVideoFrame * sframe, GstVideoFrame * dframe) -{ - guint i, j; - guint32 shade_amount = scope->priv->shade_amount; - guint r = (shade_amount >> 16) & 0xff; - guint g = (shade_amount >> 8) & 0xff; - guint b = (shade_amount >> 0) & 0xff; - guint8 *s, *s1, *d, *d1; - gint ss, ds, width, height; - - s = GST_VIDEO_FRAME_PLANE_DATA (sframe, 0); - ss = GST_VIDEO_FRAME_PLANE_STRIDE (sframe, 0); - d = GST_VIDEO_FRAME_PLANE_DATA (dframe, 0); - ds = GST_VIDEO_FRAME_PLANE_STRIDE (dframe, 0); - - width = GST_VIDEO_FRAME_WIDTH (sframe); - height = GST_VIDEO_FRAME_HEIGHT (sframe); - - for (j = 0; j < height; j++) { - /* move left half to the left */ - s1 = s + 1; - for (i = 0; i < width / 2; i++) { - SHADE (d, s1, i, r, g, b); - } - /* move right half to the right */ - d1 = d + 1; - for (; i < width - 1; i++) { - SHADE (d1, s, i, r, g, b); - } - s += ss; - d += ds; - } -} - -static void -shader_fade_and_move_vert_in (GstAudioVisualizer * scope, - const GstVideoFrame * sframe, GstVideoFrame * dframe) -{ - guint i, j; - guint32 shade_amount = scope->priv->shade_amount; - guint r = (shade_amount >> 16) & 0xff; - guint g = (shade_amount >> 8) & 0xff; - guint b = (shade_amount >> 0) & 0xff; - guint8 *s, *s1, *d, *d1; - gint ss, ds, width, height; - - s = GST_VIDEO_FRAME_PLANE_DATA (sframe, 0); - ss = GST_VIDEO_FRAME_PLANE_STRIDE (sframe, 0); - d = GST_VIDEO_FRAME_PLANE_DATA (dframe, 0); - ds = GST_VIDEO_FRAME_PLANE_STRIDE (dframe, 0); - - width = GST_VIDEO_FRAME_WIDTH (sframe); - height = GST_VIDEO_FRAME_HEIGHT (sframe); - - for (j = 0; j < height; j++) { - /* move left half to the right */ - d1 = d + 1; - for (i = 0; i < width / 2; i++) { - SHADE (d1, s, i, r, g, b); - } - /* move right half to the left */ - s1 = s + 1; - for (; i < width - 1; i++) { - SHADE (d, s1, i, r, g, b); - } - s += ss; - d += ds; - } -} - -static void -gst_audio_visualizer_change_shader (GstAudioVisualizer * scope) -{ - GstAudioVisualizerShaderFunc shader; - - switch (scope->priv->shader_type) { - case GST_AUDIO_VISUALIZER_SHADER_NONE: - shader = NULL; - break; - case GST_AUDIO_VISUALIZER_SHADER_FADE: - shader = shader_fade; - break; - case GST_AUDIO_VISUALIZER_SHADER_FADE_AND_MOVE_UP: - shader = shader_fade_and_move_up; - break; - case GST_AUDIO_VISUALIZER_SHADER_FADE_AND_MOVE_DOWN: - shader = shader_fade_and_move_down; - break; - case GST_AUDIO_VISUALIZER_SHADER_FADE_AND_MOVE_LEFT: - shader = shader_fade_and_move_left; - break; - case GST_AUDIO_VISUALIZER_SHADER_FADE_AND_MOVE_RIGHT: - shader = shader_fade_and_move_right; - break; - case GST_AUDIO_VISUALIZER_SHADER_FADE_AND_MOVE_HORIZ_OUT: - shader = shader_fade_and_move_horiz_out; - break; - case GST_AUDIO_VISUALIZER_SHADER_FADE_AND_MOVE_HORIZ_IN: - shader = shader_fade_and_move_horiz_in; - break; - case GST_AUDIO_VISUALIZER_SHADER_FADE_AND_MOVE_VERT_OUT: - shader = shader_fade_and_move_vert_out; - break; - case GST_AUDIO_VISUALIZER_SHADER_FADE_AND_MOVE_VERT_IN: - shader = shader_fade_and_move_vert_in; - break; - default: - GST_ERROR ("invalid shader function"); - shader = NULL; - break; - } - - scope->priv->shader = shader; -} - -/* class */ - -GType -goom_gst_audio_visualizer_get_type (void) -{ - static volatile gsize audio_visualizer_type = 0; - - if (g_once_init_enter (&audio_visualizer_type)) { - static const GTypeInfo audio_visualizer_info = { - sizeof (GstAudioVisualizerClass), - NULL, - NULL, - (GClassInitFunc) gst_audio_visualizer_class_init, - NULL, - NULL, - sizeof (GstAudioVisualizer), - 0, - (GInstanceInitFunc) gst_audio_visualizer_init, - }; - GType _type; - - /* TODO: rename when exporting it as a library */ - _type = g_type_register_static (GST_TYPE_ELEMENT, - "GstAudioVisualizer-ExtGoom", &audio_visualizer_info, - G_TYPE_FLAG_ABSTRACT); - g_once_init_leave (&audio_visualizer_type, _type); - } - return (GType) audio_visualizer_type; -} - -static void -gst_audio_visualizer_class_init (GstAudioVisualizerClass * klass) -{ - GObjectClass *gobject_class = (GObjectClass *) klass; - GstElementClass *element_class = (GstElementClass *) klass; - - g_type_class_add_private (klass, sizeof (GstAudioVisualizerPrivate)); - - parent_class = g_type_class_peek_parent (klass); - - GST_DEBUG_CATEGORY_INIT (audio_visualizer_debug, - "audiovisualizer-goom", 0, "audio visualisation class"); - - gobject_class->set_property = gst_audio_visualizer_set_property; - gobject_class->get_property = gst_audio_visualizer_get_property; - gobject_class->finalize = gst_audio_visualizer_finalize; - - element_class->change_state = - GST_DEBUG_FUNCPTR (gst_audio_visualizer_change_state); - - klass->decide_allocation = GST_DEBUG_FUNCPTR (default_decide_allocation); - - g_object_class_install_property (gobject_class, PROP_SHADER, - g_param_spec_enum ("shader", "shader type", - "Shader function to apply on each frame", - GST_TYPE_AUDIO_VISUALIZER_SHADER, DEFAULT_SHADER, - G_PARAM_READWRITE | GST_PARAM_CONTROLLABLE | G_PARAM_STATIC_STRINGS)); - g_object_class_install_property (gobject_class, PROP_SHADE_AMOUNT, - g_param_spec_uint ("shade-amount", "shade amount", - "Shading color to use (big-endian ARGB)", 0, G_MAXUINT32, - DEFAULT_SHADE_AMOUNT, - G_PARAM_READWRITE | GST_PARAM_CONTROLLABLE | G_PARAM_STATIC_STRINGS)); -} - -static void -gst_audio_visualizer_init (GstAudioVisualizer * scope, - GstAudioVisualizerClass * g_class) -{ - GstPadTemplate *pad_template; - - scope->priv = GST_AUDIO_VISUALIZER_GET_PRIVATE (scope); - - /* create the sink and src pads */ - pad_template = - gst_element_class_get_pad_template (GST_ELEMENT_CLASS (g_class), "sink"); - g_return_if_fail (pad_template != NULL); - scope->priv->sinkpad = gst_pad_new_from_template (pad_template, "sink"); - gst_pad_set_chain_function (scope->priv->sinkpad, - GST_DEBUG_FUNCPTR (gst_audio_visualizer_chain)); - gst_pad_set_event_function (scope->priv->sinkpad, - GST_DEBUG_FUNCPTR (gst_audio_visualizer_sink_event)); - gst_element_add_pad (GST_ELEMENT (scope), scope->priv->sinkpad); - - pad_template = - gst_element_class_get_pad_template (GST_ELEMENT_CLASS (g_class), "src"); - g_return_if_fail (pad_template != NULL); - scope->priv->srcpad = gst_pad_new_from_template (pad_template, "src"); - gst_pad_set_event_function (scope->priv->srcpad, - GST_DEBUG_FUNCPTR (gst_audio_visualizer_src_event)); - gst_pad_set_query_function (scope->priv->srcpad, - GST_DEBUG_FUNCPTR (gst_audio_visualizer_src_query)); - gst_element_add_pad (GST_ELEMENT (scope), scope->priv->srcpad); - - scope->priv->adapter = gst_adapter_new (); - scope->priv->inbuf = gst_buffer_new (); - - /* properties */ - scope->priv->shader_type = DEFAULT_SHADER; - gst_audio_visualizer_change_shader (scope); - scope->priv->shade_amount = DEFAULT_SHADE_AMOUNT; - - /* reset the initial video state */ - gst_video_info_init (&scope->vinfo); - scope->priv->frame_duration = GST_CLOCK_TIME_NONE; - - /* reset the initial state */ - gst_audio_info_init (&scope->ainfo); - gst_video_info_init (&scope->vinfo); - - g_mutex_init (&scope->priv->config_lock); -} - -static void -gst_audio_visualizer_set_property (GObject * object, guint prop_id, - const GValue * value, GParamSpec * pspec) -{ - GstAudioVisualizer *scope = GST_AUDIO_VISUALIZER (object); - - switch (prop_id) { - case PROP_SHADER: - scope->priv->shader_type = g_value_get_enum (value); - gst_audio_visualizer_change_shader (scope); - break; - case PROP_SHADE_AMOUNT: - scope->priv->shade_amount = g_value_get_uint (value); - break; - default: - G_OBJECT_WARN_INVALID_PROPERTY_ID (object, prop_id, pspec); - break; - } -} - -static void -gst_audio_visualizer_get_property (GObject * object, guint prop_id, - GValue * value, GParamSpec * pspec) -{ - GstAudioVisualizer *scope = GST_AUDIO_VISUALIZER (object); - - switch (prop_id) { - case PROP_SHADER: - g_value_set_enum (value, scope->priv->shader_type); - break; - case PROP_SHADE_AMOUNT: - g_value_set_uint (value, scope->priv->shade_amount); - break; - default: - G_OBJECT_WARN_INVALID_PROPERTY_ID (object, prop_id, pspec); - break; - } -} - -static void -gst_audio_visualizer_finalize (GObject * object) -{ - GstAudioVisualizer *scope = GST_AUDIO_VISUALIZER (object); - GstAudioVisualizerPrivate *priv = scope->priv; - - if (priv->adapter) { - g_object_unref (priv->adapter); - priv->adapter = NULL; - } - if (priv->inbuf) { - gst_buffer_unref (priv->inbuf); - priv->inbuf = NULL; - } - if (priv->tempbuf) { - gst_video_frame_unmap (&priv->tempframe); - gst_buffer_unref (priv->tempbuf); - priv->tempbuf = NULL; - } - - g_mutex_clear (&priv->config_lock); - - G_OBJECT_CLASS (parent_class)->finalize (object); -} - -static void -gst_audio_visualizer_reset (GstAudioVisualizer * scope) -{ - GstAudioVisualizerPrivate *priv = scope->priv; - - gst_adapter_clear (priv->adapter); - gst_segment_init (&priv->segment, GST_FORMAT_UNDEFINED); - - GST_OBJECT_LOCK (scope); - priv->proportion = 1.0; - priv->earliest_time = -1; - priv->dropped = 0; - priv->processed = 0; - GST_OBJECT_UNLOCK (scope); -} - -static gboolean -gst_audio_visualizer_sink_setcaps (GstAudioVisualizer * scope, GstCaps * caps) -{ - GstAudioInfo info; - - if (!gst_audio_info_from_caps (&info, caps)) - goto wrong_caps; - - scope->ainfo = info; - - GST_DEBUG_OBJECT (scope, "audio: channels %d, rate %d", - GST_AUDIO_INFO_CHANNELS (&info), GST_AUDIO_INFO_RATE (&info)); - - if (!gst_audio_visualizer_src_negotiate (scope)) { - goto not_negotiated; - } - - return TRUE; - - /* Errors */ -wrong_caps: - { - GST_WARNING_OBJECT (scope, "could not parse caps"); - return FALSE; - } -not_negotiated: - { - GST_WARNING_OBJECT (scope, "failed to negotiate"); - return FALSE; - } -} - -static gboolean -gst_audio_visualizer_src_setcaps (GstAudioVisualizer * scope, GstCaps * caps) -{ - GstVideoInfo info; - GstAudioVisualizerClass *klass; - GstAudioVisualizerPrivate *priv; - gboolean res; - - if (!gst_video_info_from_caps (&info, caps)) - goto wrong_caps; - - klass = GST_AUDIO_VISUALIZER_CLASS (G_OBJECT_GET_CLASS (scope)); - - priv = scope->priv; - - scope->vinfo = info; - - priv->frame_duration = gst_util_uint64_scale_int (GST_SECOND, - GST_VIDEO_INFO_FPS_D (&info), GST_VIDEO_INFO_FPS_N (&info)); - priv->spf = gst_util_uint64_scale_int (GST_AUDIO_INFO_RATE (&scope->ainfo), - GST_VIDEO_INFO_FPS_D (&info), GST_VIDEO_INFO_FPS_N (&info)); - scope->req_spf = priv->spf; - - if (priv->tempbuf) { - gst_video_frame_unmap (&priv->tempframe); - gst_buffer_unref (priv->tempbuf); - } - priv->tempbuf = gst_buffer_new_wrapped (g_malloc0 (scope->vinfo.size), - scope->vinfo.size); - gst_video_frame_map (&priv->tempframe, &scope->vinfo, priv->tempbuf, - GST_MAP_READWRITE); - - if (klass->setup && !klass->setup (scope)) - goto setup_failed; - - GST_DEBUG_OBJECT (scope, "video: dimension %dx%d, framerate %d/%d", - GST_VIDEO_INFO_WIDTH (&info), GST_VIDEO_INFO_HEIGHT (&info), - GST_VIDEO_INFO_FPS_N (&info), GST_VIDEO_INFO_FPS_D (&info)); - GST_DEBUG_OBJECT (scope, "blocks: spf %u, req_spf %u", priv->spf, - scope->req_spf); - - gst_pad_set_caps (priv->srcpad, caps); - - /* find a pool for the negotiated caps now */ - res = gst_audio_visualizer_do_bufferpool (scope, caps); - gst_caps_unref (caps); - - return res; - - /* ERRORS */ -wrong_caps: - { - gst_caps_unref (caps); - GST_DEBUG_OBJECT (scope, "error parsing caps"); - return FALSE; - } - -setup_failed: - { - GST_WARNING_OBJECT (scope, "failed to set up"); - return FALSE; - } -} - -static gboolean -gst_audio_visualizer_src_negotiate (GstAudioVisualizer * scope) -{ - GstCaps *othercaps, *target; - GstStructure *structure; - GstCaps *templ; - gboolean ret; - - templ = gst_pad_get_pad_template_caps (scope->priv->srcpad); - - GST_DEBUG_OBJECT (scope, "performing negotiation"); - - /* see what the peer can do */ - othercaps = gst_pad_peer_query_caps (scope->priv->srcpad, NULL); - if (othercaps) { - target = gst_caps_intersect (othercaps, templ); - gst_caps_unref (othercaps); - gst_caps_unref (templ); - - if (gst_caps_is_empty (target)) - goto no_format; - - target = gst_caps_truncate (target); - } else { - target = templ; - } - - target = gst_caps_make_writable (target); - structure = gst_caps_get_structure (target, 0); - gst_structure_fixate_field_nearest_int (structure, "width", 320); - gst_structure_fixate_field_nearest_int (structure, "height", 200); - gst_structure_fixate_field_nearest_fraction (structure, "framerate", 25, 1); - - target = gst_caps_fixate (target); - - GST_DEBUG_OBJECT (scope, "final caps are %" GST_PTR_FORMAT, target); - - ret = gst_audio_visualizer_src_setcaps (scope, target); - - return ret; - -no_format: - { - gst_caps_unref (target); - return FALSE; - } -} - -/* takes ownership of the pool, allocator and query */ -static gboolean -gst_audio_visualizer_set_allocation (GstAudioVisualizer * scope, - GstBufferPool * pool, GstAllocator * allocator, - GstAllocationParams * params, GstQuery * query) -{ - GstAllocator *oldalloc; - GstBufferPool *oldpool; - GstQuery *oldquery; - GstAudioVisualizerPrivate *priv = scope->priv; - - GST_OBJECT_LOCK (scope); - oldpool = priv->pool; - priv->pool = pool; - priv->pool_active = FALSE; - - oldalloc = priv->allocator; - priv->allocator = allocator; - - oldquery = priv->query; - priv->query = query; - - if (params) - priv->params = *params; - else - gst_allocation_params_init (&priv->params); - GST_OBJECT_UNLOCK (scope); - - if (oldpool) { - GST_DEBUG_OBJECT (scope, "deactivating old pool %p", oldpool); - gst_buffer_pool_set_active (oldpool, FALSE); - gst_object_unref (oldpool); - } - if (oldalloc) { - gst_object_unref (oldalloc); - } - if (oldquery) { - gst_query_unref (oldquery); - } - return TRUE; -} - -static gboolean -gst_audio_visualizer_do_bufferpool (GstAudioVisualizer * scope, - GstCaps * outcaps) -{ - GstQuery *query; - gboolean result = TRUE; - GstBufferPool *pool = NULL; - GstAudioVisualizerClass *klass; - GstAllocator *allocator; - GstAllocationParams params; - - /* not passthrough, we need to allocate */ - /* find a pool for the negotiated caps now */ - GST_DEBUG_OBJECT (scope, "doing allocation query"); - query = gst_query_new_allocation (outcaps, TRUE); - - if (!gst_pad_peer_query (scope->priv->srcpad, query)) { - /* not a problem, we use the query defaults */ - GST_DEBUG_OBJECT (scope, "allocation query failed"); - } - - klass = GST_AUDIO_VISUALIZER_GET_CLASS (scope); - - GST_DEBUG_OBJECT (scope, "calling decide_allocation"); - g_assert (klass->decide_allocation != NULL); - result = klass->decide_allocation (scope, query); - - GST_DEBUG_OBJECT (scope, "ALLOCATION (%d) params: %" GST_PTR_FORMAT, result, - query); - - if (!result) - goto no_decide_allocation; - - /* we got configuration from our peer or the decide_allocation method, - * parse them */ - if (gst_query_get_n_allocation_params (query) > 0) { - gst_query_parse_nth_allocation_param (query, 0, &allocator, ¶ms); - } else { - allocator = NULL; - gst_allocation_params_init (¶ms); - } - - if (gst_query_get_n_allocation_pools (query) > 0) - gst_query_parse_nth_allocation_pool (query, 0, &pool, NULL, NULL, NULL); - - /* now store */ - result = - gst_audio_visualizer_set_allocation (scope, pool, allocator, ¶ms, - query); - - return result; - - /* Errors */ -no_decide_allocation: - { - GST_WARNING_OBJECT (scope, "Subclass failed to decide allocation"); - gst_query_unref (query); - - return result; - } -} - -static gboolean -default_decide_allocation (GstAudioVisualizer * scope, GstQuery * query) -{ - GstCaps *outcaps; - GstBufferPool *pool; - guint size, min, max; - GstAllocator *allocator; - GstAllocationParams params; - GstStructure *config; - gboolean update_allocator; - gboolean update_pool; - - gst_query_parse_allocation (query, &outcaps, NULL); - - /* we got configuration from our peer or the decide_allocation method, - * parse them */ - if (gst_query_get_n_allocation_params (query) > 0) { - /* try the allocator */ - gst_query_parse_nth_allocation_param (query, 0, &allocator, ¶ms); - update_allocator = TRUE; - } else { - allocator = NULL; - gst_allocation_params_init (¶ms); - update_allocator = FALSE; - } - - if (gst_query_get_n_allocation_pools (query) > 0) { - gst_query_parse_nth_allocation_pool (query, 0, &pool, &size, &min, &max); - update_pool = TRUE; - } else { - pool = NULL; - size = GST_VIDEO_INFO_SIZE (&scope->vinfo); - min = max = 0; - update_pool = FALSE; - } - - if (pool == NULL) { - /* we did not get a pool, make one ourselves then */ - pool = gst_video_buffer_pool_new (); - } - - config = gst_buffer_pool_get_config (pool); - gst_buffer_pool_config_set_params (config, outcaps, size, min, max); - gst_buffer_pool_config_set_allocator (config, allocator, ¶ms); - gst_buffer_pool_config_add_option (config, GST_BUFFER_POOL_OPTION_VIDEO_META); - gst_buffer_pool_set_config (pool, config); - - if (update_allocator) - gst_query_set_nth_allocation_param (query, 0, allocator, ¶ms); - else - gst_query_add_allocation_param (query, allocator, ¶ms); - - if (allocator) - gst_object_unref (allocator); - - if (update_pool) - gst_query_set_nth_allocation_pool (query, 0, pool, size, min, max); - else - gst_query_add_allocation_pool (query, pool, size, min, max); - - if (pool) - gst_object_unref (pool); - - return TRUE; -} - -static GstFlowReturn -default_prepare_output_buffer (GstAudioVisualizer * scope, GstBuffer ** outbuf) -{ - GstAudioVisualizerPrivate *priv; - - priv = scope->priv; - - g_assert (priv->pool != NULL); - - /* we can't reuse the input buffer */ - if (!priv->pool_active) { - GST_DEBUG_OBJECT (scope, "setting pool %p active", priv->pool); - if (!gst_buffer_pool_set_active (priv->pool, TRUE)) - goto activate_failed; - priv->pool_active = TRUE; - } - GST_DEBUG_OBJECT (scope, "using pool alloc"); - - return gst_buffer_pool_acquire_buffer (priv->pool, outbuf, NULL); - - /* ERRORS */ -activate_failed: - { - GST_ELEMENT_ERROR (scope, RESOURCE, SETTINGS, - ("failed to activate bufferpool"), ("failed to activate bufferpool")); - return GST_FLOW_ERROR; - } -} - -static GstFlowReturn -gst_audio_visualizer_chain (GstPad * pad, GstObject * parent, - GstBuffer * buffer) -{ - GstFlowReturn ret = GST_FLOW_OK; - GstAudioVisualizer *scope; - GstAudioVisualizerPrivate *priv; - GstAudioVisualizerClass *klass; - GstBuffer *inbuf; - guint64 dist, ts; - guint avail, sbpf; - gpointer adata; - gint bps, channels, rate; - - scope = GST_AUDIO_VISUALIZER (parent); - priv = scope->priv; - klass = GST_AUDIO_VISUALIZER_CLASS (G_OBJECT_GET_CLASS (scope)); - - GST_LOG_OBJECT (scope, "chainfunc called"); - - /* resync on DISCONT */ - if (GST_BUFFER_FLAG_IS_SET (buffer, GST_BUFFER_FLAG_DISCONT)) { - gst_adapter_clear (priv->adapter); - } - - /* Make sure have an output format */ - if (gst_pad_check_reconfigure (priv->srcpad)) { - if (!gst_audio_visualizer_src_negotiate (scope)) { - gst_pad_mark_reconfigure (priv->srcpad); - goto not_negotiated; - } - } - - channels = GST_AUDIO_INFO_CHANNELS (&scope->ainfo); - rate = GST_AUDIO_INFO_RATE (&scope->ainfo); - bps = GST_AUDIO_INFO_BPS (&scope->ainfo); - - if (bps == 0) { - ret = GST_FLOW_NOT_NEGOTIATED; - goto beach; - } - - gst_adapter_push (priv->adapter, buffer); - - g_mutex_lock (&priv->config_lock); - - /* this is what we want */ - sbpf = scope->req_spf * channels * sizeof (gint16); - - inbuf = priv->inbuf; - /* FIXME: the timestamp in the adapter would be different */ - gst_buffer_copy_into (inbuf, buffer, GST_BUFFER_COPY_METADATA, 0, -1); - - /* this is what we have */ - avail = gst_adapter_available (priv->adapter); - GST_LOG_OBJECT (scope, "avail: %u, bpf: %u", avail, sbpf); - while (avail >= sbpf) { - GstBuffer *outbuf; - GstVideoFrame outframe; - - /* get timestamp of the current adapter content */ - ts = gst_adapter_prev_pts (priv->adapter, &dist); - if (GST_CLOCK_TIME_IS_VALID (ts)) { - /* convert bytes to time */ - dist /= bps; - ts += gst_util_uint64_scale_int (dist, GST_SECOND, rate); - } - - /* check for QoS, don't compute buffers that are known to be late */ - if (GST_CLOCK_TIME_IS_VALID (ts)) { - GstClockTime earliest_time; - gdouble proportion; - gint64 qostime; - - qostime = - gst_segment_to_running_time (&priv->segment, GST_FORMAT_TIME, - ts) + priv->frame_duration; - - GST_OBJECT_LOCK (scope); - earliest_time = priv->earliest_time; - proportion = priv->proportion; - GST_OBJECT_UNLOCK (scope); - - if (GST_CLOCK_TIME_IS_VALID (earliest_time) && qostime <= earliest_time) { - GstClockTime stream_time, jitter; - GstMessage *qos_msg; - - GST_DEBUG_OBJECT (scope, - "QoS: skip ts: %" GST_TIME_FORMAT ", earliest: %" GST_TIME_FORMAT, - GST_TIME_ARGS (qostime), GST_TIME_ARGS (earliest_time)); - - ++priv->dropped; - stream_time = gst_segment_to_stream_time (&priv->segment, - GST_FORMAT_TIME, ts); - jitter = GST_CLOCK_DIFF (qostime, earliest_time); - qos_msg = gst_message_new_qos (GST_OBJECT (scope), FALSE, qostime, - stream_time, ts, GST_BUFFER_DURATION (buffer)); - gst_message_set_qos_values (qos_msg, jitter, proportion, 1000000); - gst_message_set_qos_stats (qos_msg, GST_FORMAT_BUFFERS, - priv->processed, priv->dropped); - gst_element_post_message (GST_ELEMENT (scope), qos_msg); - - goto skip; - } - } - - ++priv->processed; - - g_mutex_unlock (&priv->config_lock); - ret = default_prepare_output_buffer (scope, &outbuf); - g_mutex_lock (&priv->config_lock); - /* recheck as the value could have changed */ - sbpf = scope->req_spf * channels * sizeof (gint16); - - /* no buffer allocated, we don't care why. */ - if (ret != GST_FLOW_OK) - break; - - /* sync controlled properties */ - if (GST_CLOCK_TIME_IS_VALID (ts)) - gst_object_sync_values (GST_OBJECT (scope), ts); - - GST_BUFFER_TIMESTAMP (outbuf) = ts; - GST_BUFFER_DURATION (outbuf) = priv->frame_duration; - - /* this can fail as the data size we need could have changed */ - if (!(adata = (gpointer) gst_adapter_map (priv->adapter, sbpf))) - break; - - gst_video_frame_map (&outframe, &scope->vinfo, outbuf, GST_MAP_READWRITE); - - if (priv->shader) { - gst_video_frame_copy (&outframe, &priv->tempframe); - } else { - /* gst_video_frame_clear() or is output frame already cleared */ - gint i; - - for (i = 0; i < scope->vinfo.finfo->n_planes; i++) { - memset (outframe.data[i], 0, outframe.map[i].size); - } - } - - gst_buffer_replace_all_memory (inbuf, - gst_memory_new_wrapped (GST_MEMORY_FLAG_READONLY, adata, sbpf, 0, - sbpf, NULL, NULL)); - - /* call class->render() vmethod */ - if (klass->render) { - if (!klass->render (scope, inbuf, &outframe)) { - ret = GST_FLOW_ERROR; - gst_video_frame_unmap (&outframe); - goto beach; - } else { - /* run various post processing (shading and geometric transformation) */ - /* FIXME: SHADER assumes 32bpp */ - if (priv->shader && GST_VIDEO_INFO_COMP_PSTRIDE (&scope->vinfo, 0) == 4) { - priv->shader (scope, &outframe, &priv->tempframe); - } - } - } - gst_video_frame_unmap (&outframe); - - g_mutex_unlock (&priv->config_lock); - ret = gst_pad_push (priv->srcpad, outbuf); - outbuf = NULL; - g_mutex_lock (&priv->config_lock); - - skip: - /* recheck as the value could have changed */ - sbpf = scope->req_spf * channels * sizeof (gint16); - GST_LOG_OBJECT (scope, "avail: %u, bpf: %u", avail, sbpf); - /* we want to take less or more, depending on spf : req_spf */ - if (avail - sbpf >= sbpf) { - gst_adapter_flush (priv->adapter, sbpf); - gst_adapter_unmap (priv->adapter); - } else if (avail >= sbpf) { - /* just flush a bit and stop */ - gst_adapter_flush (priv->adapter, (avail - sbpf)); - gst_adapter_unmap (priv->adapter); - break; - } - avail = gst_adapter_available (priv->adapter); - - if (ret != GST_FLOW_OK) - break; - } - - g_mutex_unlock (&priv->config_lock); - -beach: - return ret; - - /* ERRORS */ -not_negotiated: - { - GST_DEBUG_OBJECT (scope, "Failed to renegotiate"); - return GST_FLOW_NOT_NEGOTIATED; - } -} - -static gboolean -gst_audio_visualizer_src_event (GstPad * pad, GstObject * parent, - GstEvent * event) -{ - gboolean res; - GstAudioVisualizer *scope; - GstAudioVisualizerPrivate *priv; - - scope = GST_AUDIO_VISUALIZER (parent); - priv = scope->priv; - - switch (GST_EVENT_TYPE (event)) { - case GST_EVENT_QOS: - { - gdouble proportion; - GstClockTimeDiff diff; - GstClockTime timestamp; - - gst_event_parse_qos (event, NULL, &proportion, &diff, ×tamp); - - /* save stuff for the _chain() function */ - GST_OBJECT_LOCK (scope); - priv->proportion = proportion; - if (diff >= 0) - /* we're late, this is a good estimate for next displayable - * frame (see part-qos.txt) */ - priv->earliest_time = timestamp + 2 * diff + priv->frame_duration; - else - priv->earliest_time = timestamp + diff; - GST_OBJECT_UNLOCK (scope); - - res = gst_pad_push_event (priv->sinkpad, event); - break; - } - case GST_EVENT_RECONFIGURE: - /* dont't forward */ - gst_event_unref (event); - res = TRUE; - break; - default: - res = gst_pad_event_default (pad, parent, event); - break; - } - - return res; -} - -static gboolean -gst_audio_visualizer_sink_event (GstPad * pad, GstObject * parent, - GstEvent * event) -{ - gboolean res; - GstAudioVisualizer *scope; - - scope = GST_AUDIO_VISUALIZER (parent); - - switch (GST_EVENT_TYPE (event)) { - case GST_EVENT_CAPS: - { - GstCaps *caps; - - gst_event_parse_caps (event, &caps); - res = gst_audio_visualizer_sink_setcaps (scope, caps); - gst_event_unref (event); - break; - } - case GST_EVENT_FLUSH_STOP: - gst_audio_visualizer_reset (scope); - res = gst_pad_push_event (scope->priv->srcpad, event); - break; - case GST_EVENT_SEGMENT: - { - /* the newsegment values are used to clip the input samples - * and to convert the incomming timestamps to running time so - * we can do QoS */ - gst_event_copy_segment (event, &scope->priv->segment); - - res = gst_pad_push_event (scope->priv->srcpad, event); - break; - } - default: - res = gst_pad_event_default (pad, parent, event); - break; - } - - return res; -} - -static gboolean -gst_audio_visualizer_src_query (GstPad * pad, GstObject * parent, - GstQuery * query) -{ - gboolean res = FALSE; - GstAudioVisualizer *scope; - - scope = GST_AUDIO_VISUALIZER (parent); - - switch (GST_QUERY_TYPE (query)) { - case GST_QUERY_LATENCY: - { - /* We need to send the query upstream and add the returned latency to our - * own */ - GstClockTime min_latency, max_latency; - gboolean us_live; - GstClockTime our_latency; - guint max_samples; - gint rate = GST_AUDIO_INFO_RATE (&scope->ainfo); - - if (rate == 0) - break; - - if ((res = gst_pad_peer_query (scope->priv->sinkpad, query))) { - gst_query_parse_latency (query, &us_live, &min_latency, &max_latency); - - GST_DEBUG_OBJECT (scope, "Peer latency: min %" - GST_TIME_FORMAT " max %" GST_TIME_FORMAT, - GST_TIME_ARGS (min_latency), GST_TIME_ARGS (max_latency)); - - /* the max samples we must buffer buffer */ - max_samples = MAX (scope->req_spf, scope->priv->spf); - our_latency = gst_util_uint64_scale_int (max_samples, GST_SECOND, rate); - - GST_DEBUG_OBJECT (scope, "Our latency: %" GST_TIME_FORMAT, - GST_TIME_ARGS (our_latency)); - - /* we add some latency but only if we need to buffer more than what - * upstream gives us */ - min_latency += our_latency; - if (max_latency != -1) - max_latency += our_latency; - - GST_DEBUG_OBJECT (scope, "Calculated total latency : min %" - GST_TIME_FORMAT " max %" GST_TIME_FORMAT, - GST_TIME_ARGS (min_latency), GST_TIME_ARGS (max_latency)); - - gst_query_set_latency (query, TRUE, min_latency, max_latency); - } - break; - } - default: - res = gst_pad_query_default (pad, parent, query); - break; - } - - return res; -} - -static GstStateChangeReturn -gst_audio_visualizer_change_state (GstElement * element, - GstStateChange transition) -{ - GstStateChangeReturn ret; - GstAudioVisualizer *scope; - - scope = GST_AUDIO_VISUALIZER (element); - - switch (transition) { - case GST_STATE_CHANGE_READY_TO_PAUSED: - gst_audio_visualizer_reset (scope); - break; - default: - break; - } - - ret = GST_ELEMENT_CLASS (parent_class)->change_state (element, transition); - - switch (transition) { - case GST_STATE_CHANGE_PAUSED_TO_READY: - gst_audio_visualizer_set_allocation (scope, NULL, NULL, NULL, NULL); - break; - case GST_STATE_CHANGE_READY_TO_NULL: - break; - default: - break; - } - - return ret; -} diff --git a/gst/goom/gstaudiovisualizer.h b/gst/goom/gstaudiovisualizer.h deleted file mode 100644 index ea8444b618a98d701754fad50b1e4ff48b43a646..0000000000000000000000000000000000000000 --- a/gst/goom/gstaudiovisualizer.h +++ /dev/null @@ -1,105 +0,0 @@ -/* GStreamer - * Copyright (C) <2011> Stefan Kost <ensonic@users.sf.net> - * Copyright (C) <2015> Luis de Bethencourt <luis@debethencourt.com> - * - * gstaudiovisualizer.c: base class for audio visualisation elements - * - * This program is free software; you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation; either version 2 of the License, or - * (at your option) any later version. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with this program; if not, write to the Free Software - * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA. - */ - -#ifndef __GST_AUDIO_VISUALIZER_H__ -#define __GST_AUDIO_VISUALIZER_H__ - -#include <gst/gst.h> -#include <gst/base/gstbasetransform.h> - -#include <gst/video/video.h> -#include <gst/audio/audio.h> -#include <gst/base/gstadapter.h> - -G_BEGIN_DECLS -#define GST_TYPE_AUDIO_VISUALIZER (goom_gst_audio_visualizer_get_type()) -#define GST_AUDIO_VISUALIZER(obj) (G_TYPE_CHECK_INSTANCE_CAST((obj),GST_TYPE_AUDIO_VISUALIZER,GstAudioVisualizer)) -#define GST_AUDIO_VISUALIZER_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST((klass),GST_TYPE_AUDIO_VISUALIZER,GstAudioVisualizerClass)) -#define GST_AUDIO_VISUALIZER_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS((obj),GST_TYPE_AUDIO_VISUALIZER,GstAudioVisualizerClass)) -#define GST_IS_SYNAESTHESIA(obj) (G_TYPE_CHECK_INSTANCE_TYPE((obj),GST_TYPE_AUDIO_VISUALIZER)) -#define GST_IS_SYNAESTHESIA_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE((klass),GST_TYPE_AUDIO_VISUALIZER)) -typedef struct _GstAudioVisualizer GstAudioVisualizer; -typedef struct _GstAudioVisualizerClass GstAudioVisualizerClass; -typedef struct _GstAudioVisualizerPrivate GstAudioVisualizerPrivate; - -typedef void (*GstAudioVisualizerShaderFunc)(GstAudioVisualizer *scope, const GstVideoFrame *s, GstVideoFrame *d); - -/** - * GstAudioVisualizerShader: - * @GST_AUDIO_VISUALIZER_SHADER_NONE: no shading - * @GST_AUDIO_VISUALIZER_SHADER_FADE: plain fading - * @GST_AUDIO_VISUALIZER_SHADER_FADE_AND_MOVE_UP: fade and move up - * @GST_AUDIO_VISUALIZER_SHADER_FADE_AND_MOVE_DOWN: fade and move down - * @GST_AUDIO_VISUALIZER_SHADER_FADE_AND_MOVE_LEFT: fade and move left - * @GST_AUDIO_VISUALIZER_SHADER_FADE_AND_MOVE_RIGHT: fade and move right - * @GST_AUDIO_VISUALIZER_SHADER_FADE_AND_MOVE_HORIZ_OUT: fade and move horizontally out - * @GST_AUDIO_VISUALIZER_SHADER_FADE_AND_MOVE_HORIZ_IN: fade and move horizontally in - * @GST_AUDIO_VISUALIZER_SHADER_FADE_AND_MOVE_VERT_OUT: fade and move vertically out - * @GST_AUDIO_VISUALIZER_SHADER_FADE_AND_MOVE_VERT_IN: fade and move vertically in - * - * Different types of supported background shading functions. - */ -typedef enum { - GST_AUDIO_VISUALIZER_SHADER_NONE, - GST_AUDIO_VISUALIZER_SHADER_FADE, - GST_AUDIO_VISUALIZER_SHADER_FADE_AND_MOVE_UP, - GST_AUDIO_VISUALIZER_SHADER_FADE_AND_MOVE_DOWN, - GST_AUDIO_VISUALIZER_SHADER_FADE_AND_MOVE_LEFT, - GST_AUDIO_VISUALIZER_SHADER_FADE_AND_MOVE_RIGHT, - GST_AUDIO_VISUALIZER_SHADER_FADE_AND_MOVE_HORIZ_OUT, - GST_AUDIO_VISUALIZER_SHADER_FADE_AND_MOVE_HORIZ_IN, - GST_AUDIO_VISUALIZER_SHADER_FADE_AND_MOVE_VERT_OUT, - GST_AUDIO_VISUALIZER_SHADER_FADE_AND_MOVE_VERT_IN -} GstAudioVisualizerShader; - -struct _GstAudioVisualizer -{ - GstElement parent; - - guint req_spf; /* min samples per frame wanted by the subclass */ - - /* video state */ - GstVideoInfo vinfo; - - /* audio state */ - GstAudioInfo ainfo; - - /* <private> */ - GstAudioVisualizerPrivate *priv; -}; - -struct _GstAudioVisualizerClass -{ - GstElementClass parent_class; - - /* virtual function, called whenever the format changes */ - gboolean (*setup) (GstAudioVisualizer * scope); - - /* virtual function for rendering a frame */ - gboolean (*render) (GstAudioVisualizer * scope, GstBuffer * audio, GstVideoFrame * video); - - gboolean (*decide_allocation) (GstAudioVisualizer * scope, GstQuery *query); -}; - -GType goom_gst_audio_visualizer_get_type (void); - -G_END_DECLS -#endif /* __GST_AUDIO_VISUALIZER_H__ */ diff --git a/gst/goom/gstgoom.h b/gst/goom/gstgoom.h index f8cb434d179e2628f117ca4908c1dfbe7ef5b3b8..25975dd744e7f2eafb19b2a81e1b616687110053 100644 --- a/gst/goom/gstgoom.h +++ b/gst/goom/gstgoom.h @@ -21,7 +21,8 @@ #ifndef __GST_GOOM_H__ #define __GST_GOOM_H__ -#include "gstaudiovisualizer.h" +#include <gst/pbutils/gstaudiovisualizer.h> + #include "goom.h" G_BEGIN_DECLS diff --git a/gst/goom/plugin_info.c b/gst/goom/plugin_info.c index 0952dcafb625aa6b7510542b6bacda68004e22bd..96d570c63b3559ed076a6f7fdb6c34f806f9ad7c 100644 --- a/gst/goom/plugin_info.c +++ b/gst/goom/plugin_info.c @@ -106,8 +106,6 @@ setOptimizedMethods (PluginInfo * p) } #endif /* HAVE_CPU_PPC */ #endif - - cpuFlavour = 0; /* trick compiler into thinking variable is used */ } void diff --git a/gst/goom2k1/Makefile.am b/gst/goom2k1/Makefile.am index 3da8ac8cac25fc8da15ce2342bddc892fb76ba56..f6eab4af92bb718db458ca49779077630875ddf3 100644 --- a/gst/goom2k1/Makefile.am +++ b/gst/goom2k1/Makefile.am @@ -3,11 +3,10 @@ plugin_LTLIBRARIES = libgstgoom2k1.la GOOM_FILTER_FILES = filters.c GOOM_FILTER_CFLAGS = -UMMX -UUSE_ASM -noinst_HEADERS = gstgoom.h filters.h goom_core.h goom_tools.h graphic.h lines.h \ - gstaudiovisualizer.h +noinst_HEADERS = gstgoom.h filters.h goom_core.h goom_tools.h graphic.h lines.h libgstgoom2k1_la_SOURCES = gstgoom.c goom_core.c $(GOOM_FILTER_FILES) graphic.c \ - lines.c gstaudiovisualizer.c + lines.c libgstgoom2k1_la_CFLAGS = $(GST_PLUGINS_BASE_CFLAGS) $(GST_BASE_CFLAGS) $(GST_CFLAGS) $(GOOM_FILTER_CFLAGS) \ -Dgst_goom_get_type=gst_goom2k1_get_type \ @@ -24,7 +23,7 @@ libgstgoom2k1_la_CFLAGS = $(GST_PLUGINS_BASE_CFLAGS) $(GST_BASE_CFLAGS) $(GST_CF -DzoomFilterDestroy=zoomFilterDestroy2k1 \ -DzoomFilterNew=zoomFilterNew2k1 -libgstgoom2k1_la_LIBADD = $(GST_BASE_LIBS) $(GST_LIBS) $(LIBM) -lgstvideo-$(GST_API_VERSION) -lgstaudio-$(GST_API_VERSION) +libgstgoom2k1_la_LIBADD = $(GST_PLUGINS_BASE_LIBS) -lgstpbutils-$(GST_API_VERSION) $(GST_BASE_LIBS) $(GST_LIBS) $(LIBM) libgstgoom2k1_la_LDFLAGS = $(GST_PLUGIN_LDFLAGS) libgstgoom2k1_la_LIBTOOLFLAGS = $(GST_PLUGIN_LIBTOOLFLAGS) diff --git a/gst/goom2k1/Makefile.in b/gst/goom2k1/Makefile.in index 3f3586eb7e17dfccb20d66babecf3e23eb5e1bcd..dda4cc572b30098be282a1a3972dc62999615702 100644 --- a/gst/goom2k1/Makefile.in +++ b/gst/goom2k1/Makefile.in @@ -163,12 +163,12 @@ am__installdirs = "$(DESTDIR)$(plugindir)" LTLIBRARIES = $(plugin_LTLIBRARIES) am__DEPENDENCIES_1 = libgstgoom2k1_la_DEPENDENCIES = $(am__DEPENDENCIES_1) \ - $(am__DEPENDENCIES_1) $(am__DEPENDENCIES_1) + $(am__DEPENDENCIES_1) $(am__DEPENDENCIES_1) \ + $(am__DEPENDENCIES_1) am__objects_1 = libgstgoom2k1_la-filters.lo am_libgstgoom2k1_la_OBJECTS = libgstgoom2k1_la-gstgoom.lo \ libgstgoom2k1_la-goom_core.lo $(am__objects_1) \ - libgstgoom2k1_la-graphic.lo libgstgoom2k1_la-lines.lo \ - libgstgoom2k1_la-gstaudiovisualizer.lo + libgstgoom2k1_la-graphic.lo libgstgoom2k1_la-lines.lo libgstgoom2k1_la_OBJECTS = $(am_libgstgoom2k1_la_OBJECTS) AM_V_lt = $(am__v_lt_@AM_V@) am__v_lt_ = $(am__v_lt_@AM_DEFAULT_V@) @@ -480,6 +480,8 @@ VALGRIND_PATH = @VALGRIND_PATH@ VERSION = @VERSION@ VPX_130_CFLAGS = @VPX_130_CFLAGS@ VPX_130_LIBS = @VPX_130_LIBS@ +VPX_140_CFLAGS = @VPX_140_CFLAGS@ +VPX_140_LIBS = @VPX_140_LIBS@ VPX_CFLAGS = @VPX_CFLAGS@ VPX_LIBS = @VPX_LIBS@ WARNING_CFLAGS = @WARNING_CFLAGS@ @@ -568,11 +570,9 @@ top_srcdir = @top_srcdir@ plugin_LTLIBRARIES = libgstgoom2k1.la GOOM_FILTER_FILES = filters.c GOOM_FILTER_CFLAGS = -UMMX -UUSE_ASM -noinst_HEADERS = gstgoom.h filters.h goom_core.h goom_tools.h graphic.h lines.h \ - gstaudiovisualizer.h - +noinst_HEADERS = gstgoom.h filters.h goom_core.h goom_tools.h graphic.h lines.h libgstgoom2k1_la_SOURCES = gstgoom.c goom_core.c $(GOOM_FILTER_FILES) graphic.c \ - lines.c gstaudiovisualizer.c + lines.c libgstgoom2k1_la_CFLAGS = $(GST_PLUGINS_BASE_CFLAGS) $(GST_BASE_CFLAGS) $(GST_CFLAGS) $(GOOM_FILTER_CFLAGS) \ -Dgst_goom_get_type=gst_goom2k1_get_type \ @@ -589,7 +589,7 @@ libgstgoom2k1_la_CFLAGS = $(GST_PLUGINS_BASE_CFLAGS) $(GST_BASE_CFLAGS) $(GST_CF -DzoomFilterDestroy=zoomFilterDestroy2k1 \ -DzoomFilterNew=zoomFilterNew2k1 -libgstgoom2k1_la_LIBADD = $(GST_BASE_LIBS) $(GST_LIBS) $(LIBM) -lgstvideo-$(GST_API_VERSION) -lgstaudio-$(GST_API_VERSION) +libgstgoom2k1_la_LIBADD = $(GST_PLUGINS_BASE_LIBS) -lgstpbutils-$(GST_API_VERSION) $(GST_BASE_LIBS) $(GST_LIBS) $(LIBM) libgstgoom2k1_la_LDFLAGS = $(GST_PLUGIN_LDFLAGS) libgstgoom2k1_la_LIBTOOLFLAGS = $(GST_PLUGIN_LIBTOOLFLAGS) EXTRA_DIST = filters.c @@ -674,7 +674,6 @@ distclean-compile: @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libgstgoom2k1_la-filters.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libgstgoom2k1_la-goom_core.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libgstgoom2k1_la-graphic.Plo@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libgstgoom2k1_la-gstaudiovisualizer.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libgstgoom2k1_la-gstgoom.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libgstgoom2k1_la-lines.Plo@am__quote@ @@ -737,13 +736,6 @@ libgstgoom2k1_la-lines.lo: lines.c @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CC $(libgstgoom2k1_la_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libgstgoom2k1_la_CFLAGS) $(CFLAGS) -c -o libgstgoom2k1_la-lines.lo `test -f 'lines.c' || echo '$(srcdir)/'`lines.c -libgstgoom2k1_la-gstaudiovisualizer.lo: gstaudiovisualizer.c -@am__fastdepCC_TRUE@ $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(libgstgoom2k1_la_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libgstgoom2k1_la_CFLAGS) $(CFLAGS) -MT libgstgoom2k1_la-gstaudiovisualizer.lo -MD -MP -MF $(DEPDIR)/libgstgoom2k1_la-gstaudiovisualizer.Tpo -c -o libgstgoom2k1_la-gstaudiovisualizer.lo `test -f 'gstaudiovisualizer.c' || echo '$(srcdir)/'`gstaudiovisualizer.c -@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/libgstgoom2k1_la-gstaudiovisualizer.Tpo $(DEPDIR)/libgstgoom2k1_la-gstaudiovisualizer.Plo -@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='gstaudiovisualizer.c' object='libgstgoom2k1_la-gstaudiovisualizer.lo' libtool=yes @AMDEPBACKSLASH@ -@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ -@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CC $(libgstgoom2k1_la_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libgstgoom2k1_la_CFLAGS) $(CFLAGS) -c -o libgstgoom2k1_la-gstaudiovisualizer.lo `test -f 'gstaudiovisualizer.c' || echo '$(srcdir)/'`gstaudiovisualizer.c - mostlyclean-libtool: -rm -f *.lo diff --git a/gst/goom2k1/gstaudiovisualizer.c b/gst/goom2k1/gstaudiovisualizer.c deleted file mode 100644 index fbd298d44718a9eb4b3d71c8100c3cf0134316ed..0000000000000000000000000000000000000000 --- a/gst/goom2k1/gstaudiovisualizer.c +++ /dev/null @@ -1,1455 +0,0 @@ -/* GStreamer - * Copyright (C) <2011> Stefan Kost <ensonic@users.sf.net> - * Copyright (C) <2015> Luis de Bethencourt <luis@debethencourt.com> - * - * gstaudiovisualizer.c: class for audio visualisation elements - * - * This program is free software; you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation; either version 2 of the License, or - * (at your option) any later version. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with this program; if not, write to the Free Software - * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA. - */ -/** - * SECTION:gstaudiovisualizer - * - * A class for scopes (visualizers). It takes care of re-fitting the audio-rate - * to video-rate and handles renegotiation (downstream video size changes). - * - * It also provides several background shading effects. These effects are - * applied to a previous picture before the render() implementation can draw a - * new frame. - */ - -#ifdef HAVE_CONFIG_H -#include "config.h" -#endif - -#include <string.h> - -#include <gst/video/video.h> -#include <gst/video/gstvideometa.h> -#include <gst/video/gstvideopool.h> - -#include "gstaudiovisualizer.h" - -GST_DEBUG_CATEGORY_STATIC (audio_visualizer_debug); -#define GST_CAT_DEFAULT (audio_visualizer_debug) - -#define DEFAULT_SHADER GST_AUDIO_VISUALIZER_SHADER_FADE -#define DEFAULT_SHADE_AMOUNT 0x000a0a0a - -enum -{ - PROP_0, - PROP_SHADER, - PROP_SHADE_AMOUNT -}; - -static GstBaseTransformClass *parent_class = NULL; - -static void gst_audio_visualizer_class_init (GstAudioVisualizerClass * klass); -static void gst_audio_visualizer_init (GstAudioVisualizer * scope, - GstAudioVisualizerClass * g_class); -static void gst_audio_visualizer_set_property (GObject * object, - guint prop_id, const GValue * value, GParamSpec * pspec); -static void gst_audio_visualizer_get_property (GObject * object, - guint prop_id, GValue * value, GParamSpec * pspec); -static void gst_audio_visualizer_finalize (GObject * object); - -static gboolean gst_audio_visualizer_src_negotiate (GstAudioVisualizer * scope); -static gboolean gst_audio_visualizer_src_setcaps (GstAudioVisualizer * - scope, GstCaps * caps); -static gboolean gst_audio_visualizer_sink_setcaps (GstAudioVisualizer * - scope, GstCaps * caps); - -static GstFlowReturn gst_audio_visualizer_chain (GstPad * pad, - GstObject * parent, GstBuffer * buffer); - -static gboolean gst_audio_visualizer_src_event (GstPad * pad, - GstObject * parent, GstEvent * event); -static gboolean gst_audio_visualizer_sink_event (GstPad * pad, - GstObject * parent, GstEvent * event); - -static gboolean gst_audio_visualizer_src_query (GstPad * pad, - GstObject * parent, GstQuery * query); - -static GstStateChangeReturn gst_audio_visualizer_change_state (GstElement * - element, GstStateChange transition); - -static gboolean gst_audio_visualizer_do_bufferpool (GstAudioVisualizer * scope, - GstCaps * outcaps); - -static gboolean -default_decide_allocation (GstAudioVisualizer * scope, GstQuery * query); - -#define GST_AUDIO_VISUALIZER_GET_PRIVATE(obj) \ - (G_TYPE_INSTANCE_GET_PRIVATE ((obj), GST_TYPE_AUDIO_VISUALIZER, GstAudioVisualizerPrivate)) - -struct _GstAudioVisualizerPrivate -{ - gboolean negotiated; - - GstBufferPool *pool; - gboolean pool_active; - GstAllocator *allocator; - GstAllocationParams params; - GstQuery *query; - - /* pads */ - GstPad *srcpad, *sinkpad; - - GstAudioVisualizerShader shader_type; - GstAudioVisualizerShaderFunc shader; - guint32 shade_amount; - - GstAdapter *adapter; - - GstBuffer *inbuf; - GstBuffer *tempbuf; - GstVideoFrame tempframe; - - guint spf; /* samples per video frame */ - guint64 frame_duration; - - /* QoS stuff *//* with LOCK */ - gdouble proportion; - GstClockTime earliest_time; - - guint dropped; /* frames dropped / not dropped */ - guint processed; - - /* configuration mutex */ - GMutex config_lock; - - GstSegment segment; -}; - -/* shading functions */ - -#define GST_TYPE_AUDIO_VISUALIZER_SHADER (gst_audio_visualizer_shader_get_type()) -static GType -gst_audio_visualizer_shader_get_type (void) -{ - static GType shader_type = 0; - static const GEnumValue shaders[] = { - {GST_AUDIO_VISUALIZER_SHADER_NONE, "None", "none"}, - {GST_AUDIO_VISUALIZER_SHADER_FADE, "Fade", "fade"}, - {GST_AUDIO_VISUALIZER_SHADER_FADE_AND_MOVE_UP, "Fade and move up", - "fade-and-move-up"}, - {GST_AUDIO_VISUALIZER_SHADER_FADE_AND_MOVE_DOWN, "Fade and move down", - "fade-and-move-down"}, - {GST_AUDIO_VISUALIZER_SHADER_FADE_AND_MOVE_LEFT, "Fade and move left", - "fade-and-move-left"}, - {GST_AUDIO_VISUALIZER_SHADER_FADE_AND_MOVE_RIGHT, - "Fade and move right", - "fade-and-move-right"}, - {GST_AUDIO_VISUALIZER_SHADER_FADE_AND_MOVE_HORIZ_OUT, - "Fade and move horizontally out", "fade-and-move-horiz-out"}, - {GST_AUDIO_VISUALIZER_SHADER_FADE_AND_MOVE_HORIZ_IN, - "Fade and move horizontally in", "fade-and-move-horiz-in"}, - {GST_AUDIO_VISUALIZER_SHADER_FADE_AND_MOVE_VERT_OUT, - "Fade and move vertically out", "fade-and-move-vert-out"}, - {GST_AUDIO_VISUALIZER_SHADER_FADE_AND_MOVE_VERT_IN, - "Fade and move vertically in", "fade-and-move-vert-in"}, - {0, NULL, NULL}, - }; - - if (G_UNLIKELY (shader_type == 0)) { - /* TODO: rename when exporting it as a library */ - shader_type = - g_enum_register_static ("GstAudioVisualizerShader-ExtGoom2k1", shaders); - } - return shader_type; -} - -/* we're only supporting GST_VIDEO_FORMAT_xRGB right now) */ -#if G_BYTE_ORDER == G_LITTLE_ENDIAN - -#define SHADE(_d, _s, _i, _r, _g, _b) \ -G_STMT_START { \ - _d[_i * 4 + 0] = (_s[_i * 4 + 0] > _b) ? _s[_i * 4 + 0] - _b : 0; \ - _d[_i * 4 + 1] = (_s[_i * 4 + 1] > _g) ? _s[_i * 4 + 1] - _g : 0; \ - _d[_i * 4 + 2] = (_s[_i * 4 + 2] > _r) ? _s[_i * 4 + 2] - _r : 0; \ - _d[_i * 4 + 3] = 0; \ -} G_STMT_END - -#else /* G_BYTE_ORDER == G_LITTLE_ENDIAN */ - -#define SHADE(_d, _s, _i, _r, _g, _b) \ -G_STMT_START { \ - _d[_i * 4 + 0] = 0; \ - _d[_i * 4 + 1] = (_s[_i * 4 + 1] > _r) ? _s[_i * 4 + 1] - _r : 0; \ - _d[_i * 4 + 2] = (_s[_i * 4 + 2] > _g) ? _s[_i * 4 + 2] - _g : 0; \ - _d[_i * 4 + 3] = (_s[_i * 4 + 3] > _b) ? _s[_i * 4 + 3] - _b : 0; \ -} G_STMT_END - -#endif - -static void -shader_fade (GstAudioVisualizer * scope, const GstVideoFrame * sframe, - GstVideoFrame * dframe) -{ - guint i, j; - guint32 shade_amount = scope->priv->shade_amount; - guint r = (shade_amount >> 16) & 0xff; - guint g = (shade_amount >> 8) & 0xff; - guint b = (shade_amount >> 0) & 0xff; - guint8 *s, *d; - gint ss, ds, width, height; - - s = GST_VIDEO_FRAME_PLANE_DATA (sframe, 0); - ss = GST_VIDEO_FRAME_PLANE_STRIDE (sframe, 0); - d = GST_VIDEO_FRAME_PLANE_DATA (dframe, 0); - ds = GST_VIDEO_FRAME_PLANE_STRIDE (dframe, 0); - - width = GST_VIDEO_FRAME_WIDTH (sframe); - height = GST_VIDEO_FRAME_HEIGHT (sframe); - - for (j = 0; j < height; j++) { - for (i = 0; i < width; i++) { - SHADE (d, s, i, r, g, b); - } - s += ss; - d += ds; - } -} - -static void -shader_fade_and_move_up (GstAudioVisualizer * scope, - const GstVideoFrame * sframe, GstVideoFrame * dframe) -{ - guint i, j; - guint32 shade_amount = scope->priv->shade_amount; - guint r = (shade_amount >> 16) & 0xff; - guint g = (shade_amount >> 8) & 0xff; - guint b = (shade_amount >> 0) & 0xff; - guint8 *s, *d; - gint ss, ds, width, height; - - s = GST_VIDEO_FRAME_PLANE_DATA (sframe, 0); - ss = GST_VIDEO_FRAME_PLANE_STRIDE (sframe, 0); - d = GST_VIDEO_FRAME_PLANE_DATA (dframe, 0); - ds = GST_VIDEO_FRAME_PLANE_STRIDE (dframe, 0); - - width = GST_VIDEO_FRAME_WIDTH (sframe); - height = GST_VIDEO_FRAME_HEIGHT (sframe); - - for (j = 1; j < height; j++) { - s += ss; - for (i = 0; i < width; i++) { - SHADE (d, s, i, r, g, b); - } - d += ds; - } -} - -static void -shader_fade_and_move_down (GstAudioVisualizer * scope, - const GstVideoFrame * sframe, GstVideoFrame * dframe) -{ - guint i, j; - guint32 shade_amount = scope->priv->shade_amount; - guint r = (shade_amount >> 16) & 0xff; - guint g = (shade_amount >> 8) & 0xff; - guint b = (shade_amount >> 0) & 0xff; - guint8 *s, *d; - gint ss, ds, width, height; - - s = GST_VIDEO_FRAME_PLANE_DATA (sframe, 0); - ss = GST_VIDEO_FRAME_PLANE_STRIDE (sframe, 0); - d = GST_VIDEO_FRAME_PLANE_DATA (dframe, 0); - ds = GST_VIDEO_FRAME_PLANE_STRIDE (dframe, 0); - - width = GST_VIDEO_FRAME_WIDTH (sframe); - height = GST_VIDEO_FRAME_HEIGHT (sframe); - - for (j = 1; j < height; j++) { - d += ds; - for (i = 0; i < width; i++) { - SHADE (d, s, i, r, g, b); - } - s += ss; - } -} - -static void -shader_fade_and_move_left (GstAudioVisualizer * scope, - const GstVideoFrame * sframe, GstVideoFrame * dframe) -{ - guint i, j; - guint32 shade_amount = scope->priv->shade_amount; - guint r = (shade_amount >> 16) & 0xff; - guint g = (shade_amount >> 8) & 0xff; - guint b = (shade_amount >> 0) & 0xff; - guint8 *s, *d; - gint ss, ds, width, height; - - s = GST_VIDEO_FRAME_PLANE_DATA (sframe, 0); - ss = GST_VIDEO_FRAME_PLANE_STRIDE (sframe, 0); - d = GST_VIDEO_FRAME_PLANE_DATA (dframe, 0); - ds = GST_VIDEO_FRAME_PLANE_STRIDE (dframe, 0); - - width = GST_VIDEO_FRAME_WIDTH (sframe); - height = GST_VIDEO_FRAME_HEIGHT (sframe); - - width -= 1; - s += 4; - - /* move to the left */ - for (j = 0; j < height; j++) { - for (i = 0; i < width; i++) { - SHADE (d, s, i, r, g, b); - } - d += ds; - s += ss; - } -} - -static void -shader_fade_and_move_right (GstAudioVisualizer * scope, - const GstVideoFrame * sframe, GstVideoFrame * dframe) -{ - guint i, j; - guint32 shade_amount = scope->priv->shade_amount; - guint r = (shade_amount >> 16) & 0xff; - guint g = (shade_amount >> 8) & 0xff; - guint b = (shade_amount >> 0) & 0xff; - guint8 *s, *d; - gint ss, ds, width, height; - - s = GST_VIDEO_FRAME_PLANE_DATA (sframe, 0); - ss = GST_VIDEO_FRAME_PLANE_STRIDE (sframe, 0); - d = GST_VIDEO_FRAME_PLANE_DATA (dframe, 0); - ds = GST_VIDEO_FRAME_PLANE_STRIDE (dframe, 0); - - width = GST_VIDEO_FRAME_WIDTH (sframe); - height = GST_VIDEO_FRAME_HEIGHT (sframe); - - width -= 1; - d += 4; - - /* move to the right */ - for (j = 0; j < height; j++) { - for (i = 0; i < width; i++) { - SHADE (d, s, i, r, g, b); - } - d += ds; - s += ss; - } -} - -static void -shader_fade_and_move_horiz_out (GstAudioVisualizer * scope, - const GstVideoFrame * sframe, GstVideoFrame * dframe) -{ - guint i, j; - guint32 shade_amount = scope->priv->shade_amount; - guint r = (shade_amount >> 16) & 0xff; - guint g = (shade_amount >> 8) & 0xff; - guint b = (shade_amount >> 0) & 0xff; - guint8 *s, *d; - gint ss, ds, width, height; - - s = GST_VIDEO_FRAME_PLANE_DATA (sframe, 0); - ss = GST_VIDEO_FRAME_PLANE_STRIDE (sframe, 0); - d = GST_VIDEO_FRAME_PLANE_DATA (dframe, 0); - ds = GST_VIDEO_FRAME_PLANE_STRIDE (dframe, 0); - - width = GST_VIDEO_FRAME_WIDTH (sframe); - height = GST_VIDEO_FRAME_HEIGHT (sframe); - - /* move upper half up */ - for (j = 0; j < height / 2; j++) { - s += ss; - for (i = 0; i < width; i++) { - SHADE (d, s, i, r, g, b); - } - d += ds; - } - /* move lower half down */ - for (j = 0; j < height / 2; j++) { - d += ds; - for (i = 0; i < width; i++) { - SHADE (d, s, i, r, g, b); - } - s += ss; - } -} - -static void -shader_fade_and_move_horiz_in (GstAudioVisualizer * scope, - const GstVideoFrame * sframe, GstVideoFrame * dframe) -{ - guint i, j; - guint32 shade_amount = scope->priv->shade_amount; - guint r = (shade_amount >> 16) & 0xff; - guint g = (shade_amount >> 8) & 0xff; - guint b = (shade_amount >> 0) & 0xff; - guint8 *s, *d; - gint ss, ds, width, height; - - s = GST_VIDEO_FRAME_PLANE_DATA (sframe, 0); - ss = GST_VIDEO_FRAME_PLANE_STRIDE (sframe, 0); - d = GST_VIDEO_FRAME_PLANE_DATA (dframe, 0); - ds = GST_VIDEO_FRAME_PLANE_STRIDE (dframe, 0); - - width = GST_VIDEO_FRAME_WIDTH (sframe); - height = GST_VIDEO_FRAME_HEIGHT (sframe); - - /* move upper half down */ - for (j = 0; j < height / 2; j++) { - d += ds; - for (i = 0; i < width; i++) { - SHADE (d, s, i, r, g, b); - } - s += ss; - } - /* move lower half up */ - for (j = 0; j < height / 2; j++) { - s += ss; - for (i = 0; i < width; i++) { - SHADE (d, s, i, r, g, b); - } - d += ds; - } -} - -static void -shader_fade_and_move_vert_out (GstAudioVisualizer * scope, - const GstVideoFrame * sframe, GstVideoFrame * dframe) -{ - guint i, j; - guint32 shade_amount = scope->priv->shade_amount; - guint r = (shade_amount >> 16) & 0xff; - guint g = (shade_amount >> 8) & 0xff; - guint b = (shade_amount >> 0) & 0xff; - guint8 *s, *s1, *d, *d1; - gint ss, ds, width, height; - - s = GST_VIDEO_FRAME_PLANE_DATA (sframe, 0); - ss = GST_VIDEO_FRAME_PLANE_STRIDE (sframe, 0); - d = GST_VIDEO_FRAME_PLANE_DATA (dframe, 0); - ds = GST_VIDEO_FRAME_PLANE_STRIDE (dframe, 0); - - width = GST_VIDEO_FRAME_WIDTH (sframe); - height = GST_VIDEO_FRAME_HEIGHT (sframe); - - for (j = 0; j < height; j++) { - /* move left half to the left */ - s1 = s + 1; - for (i = 0; i < width / 2; i++) { - SHADE (d, s1, i, r, g, b); - } - /* move right half to the right */ - d1 = d + 1; - for (; i < width - 1; i++) { - SHADE (d1, s, i, r, g, b); - } - s += ss; - d += ds; - } -} - -static void -shader_fade_and_move_vert_in (GstAudioVisualizer * scope, - const GstVideoFrame * sframe, GstVideoFrame * dframe) -{ - guint i, j; - guint32 shade_amount = scope->priv->shade_amount; - guint r = (shade_amount >> 16) & 0xff; - guint g = (shade_amount >> 8) & 0xff; - guint b = (shade_amount >> 0) & 0xff; - guint8 *s, *s1, *d, *d1; - gint ss, ds, width, height; - - s = GST_VIDEO_FRAME_PLANE_DATA (sframe, 0); - ss = GST_VIDEO_FRAME_PLANE_STRIDE (sframe, 0); - d = GST_VIDEO_FRAME_PLANE_DATA (dframe, 0); - ds = GST_VIDEO_FRAME_PLANE_STRIDE (dframe, 0); - - width = GST_VIDEO_FRAME_WIDTH (sframe); - height = GST_VIDEO_FRAME_HEIGHT (sframe); - - for (j = 0; j < height; j++) { - /* move left half to the right */ - d1 = d + 1; - for (i = 0; i < width / 2; i++) { - SHADE (d1, s, i, r, g, b); - } - /* move right half to the left */ - s1 = s + 1; - for (; i < width - 1; i++) { - SHADE (d, s1, i, r, g, b); - } - s += ss; - d += ds; - } -} - -static void -gst_audio_visualizer_change_shader (GstAudioVisualizer * scope) -{ - GstAudioVisualizerShaderFunc shader; - - switch (scope->priv->shader_type) { - case GST_AUDIO_VISUALIZER_SHADER_NONE: - shader = NULL; - break; - case GST_AUDIO_VISUALIZER_SHADER_FADE: - shader = shader_fade; - break; - case GST_AUDIO_VISUALIZER_SHADER_FADE_AND_MOVE_UP: - shader = shader_fade_and_move_up; - break; - case GST_AUDIO_VISUALIZER_SHADER_FADE_AND_MOVE_DOWN: - shader = shader_fade_and_move_down; - break; - case GST_AUDIO_VISUALIZER_SHADER_FADE_AND_MOVE_LEFT: - shader = shader_fade_and_move_left; - break; - case GST_AUDIO_VISUALIZER_SHADER_FADE_AND_MOVE_RIGHT: - shader = shader_fade_and_move_right; - break; - case GST_AUDIO_VISUALIZER_SHADER_FADE_AND_MOVE_HORIZ_OUT: - shader = shader_fade_and_move_horiz_out; - break; - case GST_AUDIO_VISUALIZER_SHADER_FADE_AND_MOVE_HORIZ_IN: - shader = shader_fade_and_move_horiz_in; - break; - case GST_AUDIO_VISUALIZER_SHADER_FADE_AND_MOVE_VERT_OUT: - shader = shader_fade_and_move_vert_out; - break; - case GST_AUDIO_VISUALIZER_SHADER_FADE_AND_MOVE_VERT_IN: - shader = shader_fade_and_move_vert_in; - break; - default: - GST_ERROR ("invalid shader function"); - shader = NULL; - break; - } - - scope->priv->shader = shader; -} - -/* class */ - -GType -goom2k1_gst_audio_visualizer_get_type (void) -{ - static volatile gsize audio_visualizer_type = 0; - - if (g_once_init_enter (&audio_visualizer_type)) { - static const GTypeInfo audio_visualizer_info = { - sizeof (GstAudioVisualizerClass), - NULL, - NULL, - (GClassInitFunc) gst_audio_visualizer_class_init, - NULL, - NULL, - sizeof (GstAudioVisualizer), - 0, - (GInstanceInitFunc) gst_audio_visualizer_init, - }; - GType _type; - - /* TODO: rename when exporting it as a library */ - _type = g_type_register_static (GST_TYPE_ELEMENT, - "GstAudioVisualizer-ExtGoom2k1", &audio_visualizer_info, - G_TYPE_FLAG_ABSTRACT); - g_once_init_leave (&audio_visualizer_type, _type); - } - return (GType) audio_visualizer_type; -} - -static void -gst_audio_visualizer_class_init (GstAudioVisualizerClass * klass) -{ - GObjectClass *gobject_class = (GObjectClass *) klass; - GstElementClass *element_class = (GstElementClass *) klass; - - g_type_class_add_private (klass, sizeof (GstAudioVisualizerPrivate)); - - parent_class = g_type_class_peek_parent (klass); - - GST_DEBUG_CATEGORY_INIT (audio_visualizer_debug, - "audiovisualizer-goom2k1", 0, "audio visualisation class"); - - gobject_class->set_property = gst_audio_visualizer_set_property; - gobject_class->get_property = gst_audio_visualizer_get_property; - gobject_class->finalize = gst_audio_visualizer_finalize; - - element_class->change_state = - GST_DEBUG_FUNCPTR (gst_audio_visualizer_change_state); - - klass->decide_allocation = GST_DEBUG_FUNCPTR (default_decide_allocation); - - g_object_class_install_property (gobject_class, PROP_SHADER, - g_param_spec_enum ("shader", "shader type", - "Shader function to apply on each frame", - GST_TYPE_AUDIO_VISUALIZER_SHADER, DEFAULT_SHADER, - G_PARAM_READWRITE | GST_PARAM_CONTROLLABLE | G_PARAM_STATIC_STRINGS)); - g_object_class_install_property (gobject_class, PROP_SHADE_AMOUNT, - g_param_spec_uint ("shade-amount", "shade amount", - "Shading color to use (big-endian ARGB)", 0, G_MAXUINT32, - DEFAULT_SHADE_AMOUNT, - G_PARAM_READWRITE | GST_PARAM_CONTROLLABLE | G_PARAM_STATIC_STRINGS)); -} - -static void -gst_audio_visualizer_init (GstAudioVisualizer * scope, - GstAudioVisualizerClass * g_class) -{ - GstPadTemplate *pad_template; - - scope->priv = GST_AUDIO_VISUALIZER_GET_PRIVATE (scope); - - /* create the sink and src pads */ - pad_template = - gst_element_class_get_pad_template (GST_ELEMENT_CLASS (g_class), "sink"); - g_return_if_fail (pad_template != NULL); - scope->priv->sinkpad = gst_pad_new_from_template (pad_template, "sink"); - gst_pad_set_chain_function (scope->priv->sinkpad, - GST_DEBUG_FUNCPTR (gst_audio_visualizer_chain)); - gst_pad_set_event_function (scope->priv->sinkpad, - GST_DEBUG_FUNCPTR (gst_audio_visualizer_sink_event)); - gst_element_add_pad (GST_ELEMENT (scope), scope->priv->sinkpad); - - pad_template = - gst_element_class_get_pad_template (GST_ELEMENT_CLASS (g_class), "src"); - g_return_if_fail (pad_template != NULL); - scope->priv->srcpad = gst_pad_new_from_template (pad_template, "src"); - gst_pad_set_event_function (scope->priv->srcpad, - GST_DEBUG_FUNCPTR (gst_audio_visualizer_src_event)); - gst_pad_set_query_function (scope->priv->srcpad, - GST_DEBUG_FUNCPTR (gst_audio_visualizer_src_query)); - gst_element_add_pad (GST_ELEMENT (scope), scope->priv->srcpad); - - scope->priv->adapter = gst_adapter_new (); - scope->priv->inbuf = gst_buffer_new (); - - /* properties */ - scope->priv->shader_type = DEFAULT_SHADER; - gst_audio_visualizer_change_shader (scope); - scope->priv->shade_amount = DEFAULT_SHADE_AMOUNT; - - /* reset the initial video state */ - gst_video_info_init (&scope->vinfo); - scope->priv->frame_duration = GST_CLOCK_TIME_NONE; - - /* reset the initial state */ - gst_audio_info_init (&scope->ainfo); - gst_video_info_init (&scope->vinfo); - - g_mutex_init (&scope->priv->config_lock); -} - -static void -gst_audio_visualizer_set_property (GObject * object, guint prop_id, - const GValue * value, GParamSpec * pspec) -{ - GstAudioVisualizer *scope = GST_AUDIO_VISUALIZER (object); - - switch (prop_id) { - case PROP_SHADER: - scope->priv->shader_type = g_value_get_enum (value); - gst_audio_visualizer_change_shader (scope); - break; - case PROP_SHADE_AMOUNT: - scope->priv->shade_amount = g_value_get_uint (value); - break; - default: - G_OBJECT_WARN_INVALID_PROPERTY_ID (object, prop_id, pspec); - break; - } -} - -static void -gst_audio_visualizer_get_property (GObject * object, guint prop_id, - GValue * value, GParamSpec * pspec) -{ - GstAudioVisualizer *scope = GST_AUDIO_VISUALIZER (object); - - switch (prop_id) { - case PROP_SHADER: - g_value_set_enum (value, scope->priv->shader_type); - break; - case PROP_SHADE_AMOUNT: - g_value_set_uint (value, scope->priv->shade_amount); - break; - default: - G_OBJECT_WARN_INVALID_PROPERTY_ID (object, prop_id, pspec); - break; - } -} - -static void -gst_audio_visualizer_finalize (GObject * object) -{ - GstAudioVisualizer *scope = GST_AUDIO_VISUALIZER (object); - GstAudioVisualizerPrivate *priv = scope->priv; - - if (priv->adapter) { - g_object_unref (priv->adapter); - priv->adapter = NULL; - } - if (priv->inbuf) { - gst_buffer_unref (priv->inbuf); - priv->inbuf = NULL; - } - if (priv->tempbuf) { - gst_video_frame_unmap (&priv->tempframe); - gst_buffer_unref (priv->tempbuf); - priv->tempbuf = NULL; - } - - g_mutex_clear (&priv->config_lock); - - G_OBJECT_CLASS (parent_class)->finalize (object); -} - -static void -gst_audio_visualizer_reset (GstAudioVisualizer * scope) -{ - GstAudioVisualizerPrivate *priv = scope->priv; - - gst_adapter_clear (priv->adapter); - gst_segment_init (&priv->segment, GST_FORMAT_UNDEFINED); - - GST_OBJECT_LOCK (scope); - priv->proportion = 1.0; - priv->earliest_time = -1; - priv->dropped = 0; - priv->processed = 0; - GST_OBJECT_UNLOCK (scope); -} - -static gboolean -gst_audio_visualizer_sink_setcaps (GstAudioVisualizer * scope, GstCaps * caps) -{ - GstAudioInfo info; - - if (!gst_audio_info_from_caps (&info, caps)) - goto wrong_caps; - - scope->ainfo = info; - - GST_DEBUG_OBJECT (scope, "audio: channels %d, rate %d", - GST_AUDIO_INFO_CHANNELS (&info), GST_AUDIO_INFO_RATE (&info)); - - if (!gst_audio_visualizer_src_negotiate (scope)) { - goto not_negotiated; - } - - return TRUE; - - /* Errors */ -wrong_caps: - { - GST_WARNING_OBJECT (scope, "could not parse caps"); - return FALSE; - } -not_negotiated: - { - GST_WARNING_OBJECT (scope, "failed to negotiate"); - return FALSE; - } -} - -static gboolean -gst_audio_visualizer_src_setcaps (GstAudioVisualizer * scope, GstCaps * caps) -{ - GstVideoInfo info; - GstAudioVisualizerClass *klass; - GstAudioVisualizerPrivate *priv; - gboolean res; - - if (!gst_video_info_from_caps (&info, caps)) - goto wrong_caps; - - klass = GST_AUDIO_VISUALIZER_CLASS (G_OBJECT_GET_CLASS (scope)); - - priv = scope->priv; - - scope->vinfo = info; - - priv->frame_duration = gst_util_uint64_scale_int (GST_SECOND, - GST_VIDEO_INFO_FPS_D (&info), GST_VIDEO_INFO_FPS_N (&info)); - priv->spf = gst_util_uint64_scale_int (GST_AUDIO_INFO_RATE (&scope->ainfo), - GST_VIDEO_INFO_FPS_D (&info), GST_VIDEO_INFO_FPS_N (&info)); - scope->req_spf = priv->spf; - - if (priv->tempbuf) { - gst_video_frame_unmap (&priv->tempframe); - gst_buffer_unref (priv->tempbuf); - } - priv->tempbuf = gst_buffer_new_wrapped (g_malloc0 (scope->vinfo.size), - scope->vinfo.size); - gst_video_frame_map (&priv->tempframe, &scope->vinfo, priv->tempbuf, - GST_MAP_READWRITE); - - if (klass->setup && !klass->setup (scope)) - goto setup_failed; - - GST_DEBUG_OBJECT (scope, "video: dimension %dx%d, framerate %d/%d", - GST_VIDEO_INFO_WIDTH (&info), GST_VIDEO_INFO_HEIGHT (&info), - GST_VIDEO_INFO_FPS_N (&info), GST_VIDEO_INFO_FPS_D (&info)); - GST_DEBUG_OBJECT (scope, "blocks: spf %u, req_spf %u", priv->spf, - scope->req_spf); - - gst_pad_set_caps (priv->srcpad, caps); - - /* find a pool for the negotiated caps now */ - res = gst_audio_visualizer_do_bufferpool (scope, caps); - gst_caps_unref (caps); - - return res; - - /* ERRORS */ -wrong_caps: - { - gst_caps_unref (caps); - GST_DEBUG_OBJECT (scope, "error parsing caps"); - return FALSE; - } - -setup_failed: - { - GST_WARNING_OBJECT (scope, "failed to set up"); - return FALSE; - } -} - -static gboolean -gst_audio_visualizer_src_negotiate (GstAudioVisualizer * scope) -{ - GstCaps *othercaps, *target; - GstStructure *structure; - GstCaps *templ; - gboolean ret; - - templ = gst_pad_get_pad_template_caps (scope->priv->srcpad); - - GST_DEBUG_OBJECT (scope, "performing negotiation"); - - /* see what the peer can do */ - othercaps = gst_pad_peer_query_caps (scope->priv->srcpad, NULL); - if (othercaps) { - target = gst_caps_intersect (othercaps, templ); - gst_caps_unref (othercaps); - gst_caps_unref (templ); - - if (gst_caps_is_empty (target)) - goto no_format; - - target = gst_caps_truncate (target); - } else { - target = templ; - } - - target = gst_caps_make_writable (target); - structure = gst_caps_get_structure (target, 0); - gst_structure_fixate_field_nearest_int (structure, "width", 320); - gst_structure_fixate_field_nearest_int (structure, "height", 200); - gst_structure_fixate_field_nearest_fraction (structure, "framerate", 25, 1); - - target = gst_caps_fixate (target); - - GST_DEBUG_OBJECT (scope, "final caps are %" GST_PTR_FORMAT, target); - - ret = gst_audio_visualizer_src_setcaps (scope, target); - - return ret; - -no_format: - { - gst_caps_unref (target); - return FALSE; - } -} - -/* takes ownership of the pool, allocator and query */ -static gboolean -gst_audio_visualizer_set_allocation (GstAudioVisualizer * scope, - GstBufferPool * pool, GstAllocator * allocator, - GstAllocationParams * params, GstQuery * query) -{ - GstAllocator *oldalloc; - GstBufferPool *oldpool; - GstQuery *oldquery; - GstAudioVisualizerPrivate *priv = scope->priv; - - GST_OBJECT_LOCK (scope); - oldpool = priv->pool; - priv->pool = pool; - priv->pool_active = FALSE; - - oldalloc = priv->allocator; - priv->allocator = allocator; - - oldquery = priv->query; - priv->query = query; - - if (params) - priv->params = *params; - else - gst_allocation_params_init (&priv->params); - GST_OBJECT_UNLOCK (scope); - - if (oldpool) { - GST_DEBUG_OBJECT (scope, "deactivating old pool %p", oldpool); - gst_buffer_pool_set_active (oldpool, FALSE); - gst_object_unref (oldpool); - } - if (oldalloc) { - gst_object_unref (oldalloc); - } - if (oldquery) { - gst_query_unref (oldquery); - } - return TRUE; -} - -static gboolean -gst_audio_visualizer_do_bufferpool (GstAudioVisualizer * scope, - GstCaps * outcaps) -{ - GstQuery *query; - gboolean result = TRUE; - GstBufferPool *pool = NULL; - GstAudioVisualizerClass *klass; - GstAllocator *allocator; - GstAllocationParams params; - - /* not passthrough, we need to allocate */ - /* find a pool for the negotiated caps now */ - GST_DEBUG_OBJECT (scope, "doing allocation query"); - query = gst_query_new_allocation (outcaps, TRUE); - - if (!gst_pad_peer_query (scope->priv->srcpad, query)) { - /* not a problem, we use the query defaults */ - GST_DEBUG_OBJECT (scope, "allocation query failed"); - } - - klass = GST_AUDIO_VISUALIZER_GET_CLASS (scope); - - GST_DEBUG_OBJECT (scope, "calling decide_allocation"); - g_assert (klass->decide_allocation != NULL); - result = klass->decide_allocation (scope, query); - - GST_DEBUG_OBJECT (scope, "ALLOCATION (%d) params: %" GST_PTR_FORMAT, result, - query); - - if (!result) - goto no_decide_allocation; - - /* we got configuration from our peer or the decide_allocation method, - * parse them */ - if (gst_query_get_n_allocation_params (query) > 0) { - gst_query_parse_nth_allocation_param (query, 0, &allocator, ¶ms); - } else { - allocator = NULL; - gst_allocation_params_init (¶ms); - } - - if (gst_query_get_n_allocation_pools (query) > 0) - gst_query_parse_nth_allocation_pool (query, 0, &pool, NULL, NULL, NULL); - - /* now store */ - result = - gst_audio_visualizer_set_allocation (scope, pool, allocator, ¶ms, - query); - - return result; - - /* Errors */ -no_decide_allocation: - { - GST_WARNING_OBJECT (scope, "Subclass failed to decide allocation"); - gst_query_unref (query); - - return result; - } -} - -static gboolean -default_decide_allocation (GstAudioVisualizer * scope, GstQuery * query) -{ - GstCaps *outcaps; - GstBufferPool *pool; - guint size, min, max; - GstAllocator *allocator; - GstAllocationParams params; - GstStructure *config; - gboolean update_allocator; - gboolean update_pool; - - gst_query_parse_allocation (query, &outcaps, NULL); - - /* we got configuration from our peer or the decide_allocation method, - * parse them */ - if (gst_query_get_n_allocation_params (query) > 0) { - /* try the allocator */ - gst_query_parse_nth_allocation_param (query, 0, &allocator, ¶ms); - update_allocator = TRUE; - } else { - allocator = NULL; - gst_allocation_params_init (¶ms); - update_allocator = FALSE; - } - - if (gst_query_get_n_allocation_pools (query) > 0) { - gst_query_parse_nth_allocation_pool (query, 0, &pool, &size, &min, &max); - update_pool = TRUE; - } else { - pool = NULL; - size = GST_VIDEO_INFO_SIZE (&scope->vinfo); - min = max = 0; - update_pool = FALSE; - } - - if (pool == NULL) { - /* we did not get a pool, make one ourselves then */ - pool = gst_video_buffer_pool_new (); - } - - config = gst_buffer_pool_get_config (pool); - gst_buffer_pool_config_set_params (config, outcaps, size, min, max); - gst_buffer_pool_config_set_allocator (config, allocator, ¶ms); - gst_buffer_pool_config_add_option (config, GST_BUFFER_POOL_OPTION_VIDEO_META); - gst_buffer_pool_set_config (pool, config); - - if (update_allocator) - gst_query_set_nth_allocation_param (query, 0, allocator, ¶ms); - else - gst_query_add_allocation_param (query, allocator, ¶ms); - - if (allocator) - gst_object_unref (allocator); - - if (update_pool) - gst_query_set_nth_allocation_pool (query, 0, pool, size, min, max); - else - gst_query_add_allocation_pool (query, pool, size, min, max); - - if (pool) - gst_object_unref (pool); - - return TRUE; -} - -static GstFlowReturn -default_prepare_output_buffer (GstAudioVisualizer * scope, GstBuffer ** outbuf) -{ - GstAudioVisualizerPrivate *priv; - - priv = scope->priv; - - g_assert (priv->pool != NULL); - - /* we can't reuse the input buffer */ - if (!priv->pool_active) { - GST_DEBUG_OBJECT (scope, "setting pool %p active", priv->pool); - if (!gst_buffer_pool_set_active (priv->pool, TRUE)) - goto activate_failed; - priv->pool_active = TRUE; - } - GST_DEBUG_OBJECT (scope, "using pool alloc"); - - return gst_buffer_pool_acquire_buffer (priv->pool, outbuf, NULL); - - /* ERRORS */ -activate_failed: - { - GST_ELEMENT_ERROR (scope, RESOURCE, SETTINGS, - ("failed to activate bufferpool"), ("failed to activate bufferpool")); - return GST_FLOW_ERROR; - } -} - -static GstFlowReturn -gst_audio_visualizer_chain (GstPad * pad, GstObject * parent, - GstBuffer * buffer) -{ - GstFlowReturn ret = GST_FLOW_OK; - GstAudioVisualizer *scope; - GstAudioVisualizerPrivate *priv; - GstAudioVisualizerClass *klass; - GstBuffer *inbuf; - guint64 dist, ts; - guint avail, sbpf; - gpointer adata; - gint bps, channels, rate; - - scope = GST_AUDIO_VISUALIZER (parent); - priv = scope->priv; - klass = GST_AUDIO_VISUALIZER_CLASS (G_OBJECT_GET_CLASS (scope)); - - GST_LOG_OBJECT (scope, "chainfunc called"); - - /* resync on DISCONT */ - if (GST_BUFFER_FLAG_IS_SET (buffer, GST_BUFFER_FLAG_DISCONT)) { - gst_adapter_clear (priv->adapter); - } - - /* Make sure have an output format */ - if (gst_pad_check_reconfigure (priv->srcpad)) { - if (!gst_audio_visualizer_src_negotiate (scope)) { - gst_pad_mark_reconfigure (priv->srcpad); - goto not_negotiated; - } - } - - channels = GST_AUDIO_INFO_CHANNELS (&scope->ainfo); - rate = GST_AUDIO_INFO_RATE (&scope->ainfo); - bps = GST_AUDIO_INFO_BPS (&scope->ainfo); - - if (bps == 0) { - ret = GST_FLOW_NOT_NEGOTIATED; - goto beach; - } - - gst_adapter_push (priv->adapter, buffer); - - g_mutex_lock (&priv->config_lock); - - /* this is what we want */ - sbpf = scope->req_spf * channels * sizeof (gint16); - - inbuf = priv->inbuf; - /* FIXME: the timestamp in the adapter would be different */ - gst_buffer_copy_into (inbuf, buffer, GST_BUFFER_COPY_METADATA, 0, -1); - - /* this is what we have */ - avail = gst_adapter_available (priv->adapter); - GST_LOG_OBJECT (scope, "avail: %u, bpf: %u", avail, sbpf); - while (avail >= sbpf) { - GstBuffer *outbuf; - GstVideoFrame outframe; - - /* get timestamp of the current adapter content */ - ts = gst_adapter_prev_pts (priv->adapter, &dist); - if (GST_CLOCK_TIME_IS_VALID (ts)) { - /* convert bytes to time */ - dist /= bps; - ts += gst_util_uint64_scale_int (dist, GST_SECOND, rate); - } - - /* check for QoS, don't compute buffers that are known to be late */ - if (GST_CLOCK_TIME_IS_VALID (ts)) { - GstClockTime earliest_time; - gdouble proportion; - gint64 qostime; - - qostime = - gst_segment_to_running_time (&priv->segment, GST_FORMAT_TIME, - ts) + priv->frame_duration; - - GST_OBJECT_LOCK (scope); - earliest_time = priv->earliest_time; - proportion = priv->proportion; - GST_OBJECT_UNLOCK (scope); - - if (GST_CLOCK_TIME_IS_VALID (earliest_time) && qostime <= earliest_time) { - GstClockTime stream_time, jitter; - GstMessage *qos_msg; - - GST_DEBUG_OBJECT (scope, - "QoS: skip ts: %" GST_TIME_FORMAT ", earliest: %" GST_TIME_FORMAT, - GST_TIME_ARGS (qostime), GST_TIME_ARGS (earliest_time)); - - ++priv->dropped; - stream_time = gst_segment_to_stream_time (&priv->segment, - GST_FORMAT_TIME, ts); - jitter = GST_CLOCK_DIFF (qostime, earliest_time); - qos_msg = gst_message_new_qos (GST_OBJECT (scope), FALSE, qostime, - stream_time, ts, GST_BUFFER_DURATION (buffer)); - gst_message_set_qos_values (qos_msg, jitter, proportion, 1000000); - gst_message_set_qos_stats (qos_msg, GST_FORMAT_BUFFERS, - priv->processed, priv->dropped); - gst_element_post_message (GST_ELEMENT (scope), qos_msg); - - goto skip; - } - } - - ++priv->processed; - - g_mutex_unlock (&priv->config_lock); - ret = default_prepare_output_buffer (scope, &outbuf); - g_mutex_lock (&priv->config_lock); - /* recheck as the value could have changed */ - sbpf = scope->req_spf * channels * sizeof (gint16); - - /* no buffer allocated, we don't care why. */ - if (ret != GST_FLOW_OK) - break; - - /* sync controlled properties */ - if (GST_CLOCK_TIME_IS_VALID (ts)) - gst_object_sync_values (GST_OBJECT (scope), ts); - - GST_BUFFER_TIMESTAMP (outbuf) = ts; - GST_BUFFER_DURATION (outbuf) = priv->frame_duration; - - /* this can fail as the data size we need could have changed */ - if (!(adata = (gpointer) gst_adapter_map (priv->adapter, sbpf))) - break; - - gst_video_frame_map (&outframe, &scope->vinfo, outbuf, GST_MAP_READWRITE); - - if (priv->shader) { - gst_video_frame_copy (&outframe, &priv->tempframe); - } else { - /* gst_video_frame_clear() or is output frame already cleared */ - gint i; - - for (i = 0; i < scope->vinfo.finfo->n_planes; i++) { - memset (outframe.data[i], 0, outframe.map[i].size); - } - } - - gst_buffer_replace_all_memory (inbuf, - gst_memory_new_wrapped (GST_MEMORY_FLAG_READONLY, adata, sbpf, 0, - sbpf, NULL, NULL)); - - /* call class->render() vmethod */ - if (klass->render) { - if (!klass->render (scope, inbuf, &outframe)) { - ret = GST_FLOW_ERROR; - gst_video_frame_unmap (&outframe); - goto beach; - } else { - /* run various post processing (shading and geometric transformation) */ - /* FIXME: SHADER assumes 32bpp */ - if (priv->shader && GST_VIDEO_INFO_COMP_PSTRIDE (&scope->vinfo, 0) == 4) { - priv->shader (scope, &outframe, &priv->tempframe); - } - } - } - gst_video_frame_unmap (&outframe); - - g_mutex_unlock (&priv->config_lock); - ret = gst_pad_push (priv->srcpad, outbuf); - outbuf = NULL; - g_mutex_lock (&priv->config_lock); - - skip: - /* recheck as the value could have changed */ - sbpf = scope->req_spf * channels * sizeof (gint16); - GST_LOG_OBJECT (scope, "avail: %u, bpf: %u", avail, sbpf); - /* we want to take less or more, depending on spf : req_spf */ - if (avail - sbpf >= sbpf) { - gst_adapter_flush (priv->adapter, sbpf); - gst_adapter_unmap (priv->adapter); - } else if (avail >= sbpf) { - /* just flush a bit and stop */ - gst_adapter_flush (priv->adapter, (avail - sbpf)); - gst_adapter_unmap (priv->adapter); - break; - } - avail = gst_adapter_available (priv->adapter); - - if (ret != GST_FLOW_OK) - break; - } - - g_mutex_unlock (&priv->config_lock); - -beach: - return ret; - - /* ERRORS */ -not_negotiated: - { - GST_DEBUG_OBJECT (scope, "Failed to renegotiate"); - return GST_FLOW_NOT_NEGOTIATED; - } -} - -static gboolean -gst_audio_visualizer_src_event (GstPad * pad, GstObject * parent, - GstEvent * event) -{ - gboolean res; - GstAudioVisualizer *scope; - GstAudioVisualizerPrivate *priv; - - scope = GST_AUDIO_VISUALIZER (parent); - priv = scope->priv; - - switch (GST_EVENT_TYPE (event)) { - case GST_EVENT_QOS: - { - gdouble proportion; - GstClockTimeDiff diff; - GstClockTime timestamp; - - gst_event_parse_qos (event, NULL, &proportion, &diff, ×tamp); - - /* save stuff for the _chain() function */ - GST_OBJECT_LOCK (scope); - priv->proportion = proportion; - if (diff >= 0) - /* we're late, this is a good estimate for next displayable - * frame (see part-qos.txt) */ - priv->earliest_time = timestamp + 2 * diff + priv->frame_duration; - else - priv->earliest_time = timestamp + diff; - GST_OBJECT_UNLOCK (scope); - - res = gst_pad_push_event (priv->sinkpad, event); - break; - } - case GST_EVENT_RECONFIGURE: - /* dont't forward */ - gst_event_unref (event); - res = TRUE; - break; - default: - res = gst_pad_event_default (pad, parent, event); - break; - } - - return res; -} - -static gboolean -gst_audio_visualizer_sink_event (GstPad * pad, GstObject * parent, - GstEvent * event) -{ - gboolean res; - GstAudioVisualizer *scope; - - scope = GST_AUDIO_VISUALIZER (parent); - - switch (GST_EVENT_TYPE (event)) { - case GST_EVENT_CAPS: - { - GstCaps *caps; - - gst_event_parse_caps (event, &caps); - res = gst_audio_visualizer_sink_setcaps (scope, caps); - gst_event_unref (event); - break; - } - case GST_EVENT_FLUSH_STOP: - gst_audio_visualizer_reset (scope); - res = gst_pad_push_event (scope->priv->srcpad, event); - break; - case GST_EVENT_SEGMENT: - { - /* the newsegment values are used to clip the input samples - * and to convert the incomming timestamps to running time so - * we can do QoS */ - gst_event_copy_segment (event, &scope->priv->segment); - - res = gst_pad_push_event (scope->priv->srcpad, event); - break; - } - default: - res = gst_pad_event_default (pad, parent, event); - break; - } - - return res; -} - -static gboolean -gst_audio_visualizer_src_query (GstPad * pad, GstObject * parent, - GstQuery * query) -{ - gboolean res = FALSE; - GstAudioVisualizer *scope; - - scope = GST_AUDIO_VISUALIZER (parent); - - switch (GST_QUERY_TYPE (query)) { - case GST_QUERY_LATENCY: - { - /* We need to send the query upstream and add the returned latency to our - * own */ - GstClockTime min_latency, max_latency; - gboolean us_live; - GstClockTime our_latency; - guint max_samples; - gint rate = GST_AUDIO_INFO_RATE (&scope->ainfo); - - if (rate == 0) - break; - - if ((res = gst_pad_peer_query (scope->priv->sinkpad, query))) { - gst_query_parse_latency (query, &us_live, &min_latency, &max_latency); - - GST_DEBUG_OBJECT (scope, "Peer latency: min %" - GST_TIME_FORMAT " max %" GST_TIME_FORMAT, - GST_TIME_ARGS (min_latency), GST_TIME_ARGS (max_latency)); - - /* the max samples we must buffer buffer */ - max_samples = MAX (scope->req_spf, scope->priv->spf); - our_latency = gst_util_uint64_scale_int (max_samples, GST_SECOND, rate); - - GST_DEBUG_OBJECT (scope, "Our latency: %" GST_TIME_FORMAT, - GST_TIME_ARGS (our_latency)); - - /* we add some latency but only if we need to buffer more than what - * upstream gives us */ - min_latency += our_latency; - if (max_latency != -1) - max_latency += our_latency; - - GST_DEBUG_OBJECT (scope, "Calculated total latency : min %" - GST_TIME_FORMAT " max %" GST_TIME_FORMAT, - GST_TIME_ARGS (min_latency), GST_TIME_ARGS (max_latency)); - - gst_query_set_latency (query, TRUE, min_latency, max_latency); - } - break; - } - default: - res = gst_pad_query_default (pad, parent, query); - break; - } - - return res; -} - -static GstStateChangeReturn -gst_audio_visualizer_change_state (GstElement * element, - GstStateChange transition) -{ - GstStateChangeReturn ret; - GstAudioVisualizer *scope; - - scope = GST_AUDIO_VISUALIZER (element); - - switch (transition) { - case GST_STATE_CHANGE_READY_TO_PAUSED: - gst_audio_visualizer_reset (scope); - break; - default: - break; - } - - ret = GST_ELEMENT_CLASS (parent_class)->change_state (element, transition); - - switch (transition) { - case GST_STATE_CHANGE_PAUSED_TO_READY: - gst_audio_visualizer_set_allocation (scope, NULL, NULL, NULL, NULL); - break; - case GST_STATE_CHANGE_READY_TO_NULL: - break; - default: - break; - } - - return ret; -} diff --git a/gst/goom2k1/gstaudiovisualizer.h b/gst/goom2k1/gstaudiovisualizer.h deleted file mode 100644 index 9a618ab645f7ea440bc86653ab97f63e86ddf948..0000000000000000000000000000000000000000 --- a/gst/goom2k1/gstaudiovisualizer.h +++ /dev/null @@ -1,105 +0,0 @@ -/* GStreamer - * Copyright (C) <2011> Stefan Kost <ensonic@users.sf.net> - * Copyright (C) <2015> Luis de Bethencourt <luis@debethencourt.com> - * - * gstaudiovisualizer.c: base class for audio visualisation elements - * - * This program is free software; you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation; either version 2 of the License, or - * (at your option) any later version. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with this program; if not, write to the Free Software - * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA. - */ - -#ifndef __GST_AUDIO_VISUALIZER_H__ -#define __GST_AUDIO_VISUALIZER_H__ - -#include <gst/gst.h> -#include <gst/base/gstbasetransform.h> - -#include <gst/video/video.h> -#include <gst/audio/audio.h> -#include <gst/base/gstadapter.h> - -G_BEGIN_DECLS -#define GST_TYPE_AUDIO_VISUALIZER (goom2k1_gst_audio_visualizer_get_type()) -#define GST_AUDIO_VISUALIZER(obj) (G_TYPE_CHECK_INSTANCE_CAST((obj),GST_TYPE_AUDIO_VISUALIZER,GstAudioVisualizer)) -#define GST_AUDIO_VISUALIZER_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST((klass),GST_TYPE_AUDIO_VISUALIZER,GstAudioVisualizerClass)) -#define GST_AUDIO_VISUALIZER_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS((obj),GST_TYPE_AUDIO_VISUALIZER,GstAudioVisualizerClass)) -#define GST_IS_SYNAESTHESIA(obj) (G_TYPE_CHECK_INSTANCE_TYPE((obj),GST_TYPE_AUDIO_VISUALIZER)) -#define GST_IS_SYNAESTHESIA_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE((klass),GST_TYPE_AUDIO_VISUALIZER)) -typedef struct _GstAudioVisualizer GstAudioVisualizer; -typedef struct _GstAudioVisualizerClass GstAudioVisualizerClass; -typedef struct _GstAudioVisualizerPrivate GstAudioVisualizerPrivate; - -typedef void (*GstAudioVisualizerShaderFunc)(GstAudioVisualizer *scope, const GstVideoFrame *s, GstVideoFrame *d); - -/** - * GstAudioVisualizerShader: - * @GST_AUDIO_VISUALIZER_SHADER_NONE: no shading - * @GST_AUDIO_VISUALIZER_SHADER_FADE: plain fading - * @GST_AUDIO_VISUALIZER_SHADER_FADE_AND_MOVE_UP: fade and move up - * @GST_AUDIO_VISUALIZER_SHADER_FADE_AND_MOVE_DOWN: fade and move down - * @GST_AUDIO_VISUALIZER_SHADER_FADE_AND_MOVE_LEFT: fade and move left - * @GST_AUDIO_VISUALIZER_SHADER_FADE_AND_MOVE_RIGHT: fade and move right - * @GST_AUDIO_VISUALIZER_SHADER_FADE_AND_MOVE_HORIZ_OUT: fade and move horizontally out - * @GST_AUDIO_VISUALIZER_SHADER_FADE_AND_MOVE_HORIZ_IN: fade and move horizontally in - * @GST_AUDIO_VISUALIZER_SHADER_FADE_AND_MOVE_VERT_OUT: fade and move vertically out - * @GST_AUDIO_VISUALIZER_SHADER_FADE_AND_MOVE_VERT_IN: fade and move vertically in - * - * Different types of supported background shading functions. - */ -typedef enum { - GST_AUDIO_VISUALIZER_SHADER_NONE, - GST_AUDIO_VISUALIZER_SHADER_FADE, - GST_AUDIO_VISUALIZER_SHADER_FADE_AND_MOVE_UP, - GST_AUDIO_VISUALIZER_SHADER_FADE_AND_MOVE_DOWN, - GST_AUDIO_VISUALIZER_SHADER_FADE_AND_MOVE_LEFT, - GST_AUDIO_VISUALIZER_SHADER_FADE_AND_MOVE_RIGHT, - GST_AUDIO_VISUALIZER_SHADER_FADE_AND_MOVE_HORIZ_OUT, - GST_AUDIO_VISUALIZER_SHADER_FADE_AND_MOVE_HORIZ_IN, - GST_AUDIO_VISUALIZER_SHADER_FADE_AND_MOVE_VERT_OUT, - GST_AUDIO_VISUALIZER_SHADER_FADE_AND_MOVE_VERT_IN -} GstAudioVisualizerShader; - -struct _GstAudioVisualizer -{ - GstElement parent; - - guint req_spf; /* min samples per frame wanted by the subclass */ - - /* video state */ - GstVideoInfo vinfo; - - /* audio state */ - GstAudioInfo ainfo; - - /* <private> */ - GstAudioVisualizerPrivate *priv; -}; - -struct _GstAudioVisualizerClass -{ - GstElementClass parent_class; - - /* virtual function, called whenever the format changes */ - gboolean (*setup) (GstAudioVisualizer * scope); - - /* virtual function for rendering a frame */ - gboolean (*render) (GstAudioVisualizer * scope, GstBuffer * audio, GstVideoFrame * video); - - gboolean (*decide_allocation) (GstAudioVisualizer * scope, GstQuery *query); -}; - -GType goom2k1_gst_audio_visualizer_get_type (void); - -G_END_DECLS -#endif /* __GST_AUDIO_VISUALIZER_H__ */ diff --git a/gst/goom2k1/gstgoom.h b/gst/goom2k1/gstgoom.h index e34e42e0a82511d30397c8f1cec4206eb5112af7..41b818b51e8414b9a4ccc3b6cb179f51f679ed2b 100644 --- a/gst/goom2k1/gstgoom.h +++ b/gst/goom2k1/gstgoom.h @@ -22,7 +22,8 @@ #ifndef __GST_GOOM_H__ #define __GST_GOOM_H__ -#include "gstaudiovisualizer.h" +#include <gst/pbutils/gstaudiovisualizer.h> + #include "goom_core.h" G_BEGIN_DECLS diff --git a/gst/icydemux/Makefile.in b/gst/icydemux/Makefile.in index 55bad1387814ea77563ae2d310e44262f14d2dc0..4797a68a86897924507cbbde853afe65bfc803bc 100644 --- a/gst/icydemux/Makefile.in +++ b/gst/icydemux/Makefile.in @@ -476,6 +476,8 @@ VALGRIND_PATH = @VALGRIND_PATH@ VERSION = @VERSION@ VPX_130_CFLAGS = @VPX_130_CFLAGS@ VPX_130_LIBS = @VPX_130_LIBS@ +VPX_140_CFLAGS = @VPX_140_CFLAGS@ +VPX_140_LIBS = @VPX_140_LIBS@ VPX_CFLAGS = @VPX_CFLAGS@ VPX_LIBS = @VPX_LIBS@ WARNING_CFLAGS = @WARNING_CFLAGS@ diff --git a/gst/id3demux/Makefile.in b/gst/id3demux/Makefile.in index d45e554fd8da5b85043cca6b1d9461a082a790ce..a55dd64749471f95d0011c811be34ba62a1afb18 100644 --- a/gst/id3demux/Makefile.in +++ b/gst/id3demux/Makefile.in @@ -476,6 +476,8 @@ VALGRIND_PATH = @VALGRIND_PATH@ VERSION = @VERSION@ VPX_130_CFLAGS = @VPX_130_CFLAGS@ VPX_130_LIBS = @VPX_130_LIBS@ +VPX_140_CFLAGS = @VPX_140_CFLAGS@ +VPX_140_LIBS = @VPX_140_LIBS@ VPX_CFLAGS = @VPX_CFLAGS@ VPX_LIBS = @VPX_LIBS@ WARNING_CFLAGS = @WARNING_CFLAGS@ diff --git a/gst/imagefreeze/Makefile.in b/gst/imagefreeze/Makefile.in index ad5d057f191ba18645894f7a03d34b318080ccb2..6e91afe2c9177c69b7b09df0507ef00d20117ad5 100644 --- a/gst/imagefreeze/Makefile.in +++ b/gst/imagefreeze/Makefile.in @@ -476,6 +476,8 @@ VALGRIND_PATH = @VALGRIND_PATH@ VERSION = @VERSION@ VPX_130_CFLAGS = @VPX_130_CFLAGS@ VPX_130_LIBS = @VPX_130_LIBS@ +VPX_140_CFLAGS = @VPX_140_CFLAGS@ +VPX_140_LIBS = @VPX_140_LIBS@ VPX_CFLAGS = @VPX_CFLAGS@ VPX_LIBS = @VPX_LIBS@ WARNING_CFLAGS = @WARNING_CFLAGS@ diff --git a/gst/interleave/Makefile.in b/gst/interleave/Makefile.in index 9f6826bd0405cc079cc038b1a6c4ca712bd3e78b..8e51d3445c1a03af707844bd0ba7b02cb1c27657 100644 --- a/gst/interleave/Makefile.in +++ b/gst/interleave/Makefile.in @@ -478,6 +478,8 @@ VALGRIND_PATH = @VALGRIND_PATH@ VERSION = @VERSION@ VPX_130_CFLAGS = @VPX_130_CFLAGS@ VPX_130_LIBS = @VPX_130_LIBS@ +VPX_140_CFLAGS = @VPX_140_CFLAGS@ +VPX_140_LIBS = @VPX_140_LIBS@ VPX_CFLAGS = @VPX_CFLAGS@ VPX_LIBS = @VPX_LIBS@ WARNING_CFLAGS = @WARNING_CFLAGS@ diff --git a/gst/interleave/deinterleave.c b/gst/interleave/deinterleave.c index f7c0c942154fae80d4626c5c2496ea9cd7d7e7fe..cdf71f97bc0c82c62fa98577717666f9460fa963 100644 --- a/gst/interleave/deinterleave.c +++ b/gst/interleave/deinterleave.c @@ -134,6 +134,8 @@ gst_deinterleave_change_state (GstElement * element, GstStateChange transition); static gboolean gst_deinterleave_sink_event (GstPad * pad, GstObject * parent, GstEvent * event); +static gboolean gst_deinterleave_sink_query (GstPad * pad, GstObject * parent, + GstQuery * query); static gboolean gst_deinterleave_src_query (GstPad * pad, GstObject * parent, GstQuery * query); @@ -212,6 +214,8 @@ gst_deinterleave_init (GstDeinterleave * self) GST_DEBUG_FUNCPTR (gst_deinterleave_chain)); gst_pad_set_event_function (self->sink, GST_DEBUG_FUNCPTR (gst_deinterleave_sink_event)); + gst_pad_set_query_function (self->sink, + GST_DEBUG_FUNCPTR (gst_deinterleave_sink_query)); gst_element_add_pad (GST_ELEMENT (self), self->sink); } @@ -356,6 +360,56 @@ gst_deinterleave_set_process_function (GstDeinterleave * self) return TRUE; } +static gboolean +gst_deinterleave_check_caps_change (GstDeinterleave * self, + GstAudioInfo * old_info, GstAudioInfo * new_info) +{ + gint i; + gboolean same_layout = TRUE; + gboolean was_unpositioned; + gboolean is_unpositioned = GST_AUDIO_INFO_IS_UNPOSITIONED (new_info); + gint new_channels = GST_AUDIO_INFO_CHANNELS (new_info); + gint old_channels; + + was_unpositioned = GST_AUDIO_INFO_IS_UNPOSITIONED (old_info); + old_channels = GST_AUDIO_INFO_CHANNELS (old_info); + + /* We allow caps changes as long as the number of channels doesn't change + * and the channel positions stay the same. _getcaps() should've cared + * for this already but better be safe. + */ + if (new_channels != old_channels) + goto cannot_change_caps; + + /* Now check the channel positions. If we had no channel positions + * and get them or the other way around things have changed. + * If we had channel positions and get different ones things have + * changed too of course + */ + if ((!was_unpositioned && is_unpositioned) || (was_unpositioned + && !is_unpositioned)) + goto cannot_change_caps; + + if (!is_unpositioned) { + if (GST_AUDIO_INFO_CHANNELS (old_info) != + GST_AUDIO_INFO_CHANNELS (new_info)) + goto cannot_change_caps; + for (i = 0; i < GST_AUDIO_INFO_CHANNELS (old_info); i++) { + if (new_info->position[i] != old_info->position[i]) { + same_layout = FALSE; + break; + } + } + if (!same_layout) + goto cannot_change_caps; + } + + return TRUE; + +cannot_change_caps: + return FALSE; +} + static gboolean gst_deinterleave_sink_setcaps (GstDeinterleave * self, GstCaps * caps) { @@ -371,51 +425,17 @@ gst_deinterleave_sink_setcaps (GstDeinterleave * self, GstCaps * caps) goto unsupported_caps; if (self->sinkcaps && !gst_caps_is_equal (caps, self->sinkcaps)) { - gint i; - gboolean same_layout = TRUE; - gboolean was_unpositioned; - gboolean is_unpositioned = - GST_AUDIO_INFO_IS_UNPOSITIONED (&self->audio_info); - gint new_channels = GST_AUDIO_INFO_CHANNELS (&self->audio_info); - gint old_channels; GstAudioInfo old_info; gst_audio_info_init (&old_info); if (!gst_audio_info_from_caps (&old_info, self->sinkcaps)) goto info_from_caps_failed; - was_unpositioned = GST_AUDIO_INFO_IS_UNPOSITIONED (&old_info); - old_channels = GST_AUDIO_INFO_CHANNELS (&old_info); - /* We allow caps changes as long as the number of channels doesn't change - * and the channel positions stay the same. _getcaps() should've cared - * for this already but better be safe. - */ - if (new_channels != old_channels || - !gst_deinterleave_set_process_function (self)) - goto cannot_change_caps; - - /* Now check the channel positions. If we had no channel positions - * and get them or the other way around things have changed. - * If we had channel positions and get different ones things have - * changed too of course - */ - if ((!was_unpositioned && is_unpositioned) || (was_unpositioned - && !is_unpositioned)) - goto cannot_change_caps; - - if (!is_unpositioned) { - if (GST_AUDIO_INFO_CHANNELS (&old_info) != - GST_AUDIO_INFO_CHANNELS (&self->audio_info)) - goto cannot_change_caps; - for (i = 0; i < GST_AUDIO_INFO_CHANNELS (&old_info); i++) { - if (self->audio_info.position[i] != old_info.position[i]) { - same_layout = FALSE; - break; - } - } - if (!same_layout) + if (gst_deinterleave_check_caps_change (self, &old_info, &self->audio_info)) { + if (!gst_deinterleave_set_process_function (self)) goto cannot_change_caps; - } + } else + goto cannot_change_caps; } @@ -500,9 +520,37 @@ __set_channels (GstCaps * caps, gint channels) } } +static gboolean +gst_deinterleave_sink_acceptcaps (GstPad * pad, GstObject * parent, + GstCaps * caps) +{ + GstDeinterleave *self = GST_DEINTERLEAVE (parent); + GstCaps *templ_caps = gst_pad_get_pad_template_caps (pad); + gboolean ret; + + ret = gst_caps_can_intersect (templ_caps, caps); + gst_caps_unref (templ_caps); + if (ret && self->sinkcaps) { + GstAudioInfo new_info; + + gst_audio_info_init (&new_info); + if (!gst_audio_info_from_caps (&new_info, caps)) + goto info_from_caps_failed; + ret = + gst_deinterleave_check_caps_change (self, &self->audio_info, &new_info); + } + + return ret; + +info_from_caps_failed: + { + GST_ERROR_OBJECT (self, "coud not get info from caps"); + return FALSE; + } +} + static GstCaps * -gst_deinterleave_sink_getcaps (GstPad * pad, GstObject * parent, - GstCaps * filter) +gst_deinterleave_getcaps (GstPad * pad, GstObject * parent, GstCaps * filter) { GstDeinterleave *self = GST_DEINTERLEAVE (parent); GstCaps *ret; @@ -520,8 +568,10 @@ gst_deinterleave_sink_getcaps (GstPad * pad, GstObject * parent, for (l = GST_ELEMENT (self)->pads; l != NULL; l = l->next) { GstPad *ourpad = GST_PAD (l->data); GstCaps *peercaps = NULL, *ourcaps; + GstCaps *templ_caps = gst_pad_get_pad_template_caps (ourpad); - ourcaps = gst_caps_copy (gst_pad_get_pad_template_caps (ourpad)); + ourcaps = gst_caps_copy (templ_caps); + gst_caps_unref (templ_caps); if (pad == ourpad) { if (GST_PAD_DIRECTION (pad) == GST_PAD_SINK) @@ -562,6 +612,14 @@ gst_deinterleave_sink_getcaps (GstPad * pad, GstObject * parent, } GST_OBJECT_UNLOCK (self); + if (filter) { + GstCaps *aux; + + aux = gst_caps_intersect (ret, filter); + gst_caps_unref (ret); + ret = aux; + } + GST_DEBUG_OBJECT (pad, "Intersected caps to %" GST_PTR_FORMAT, ret); return ret; @@ -612,6 +670,41 @@ gst_deinterleave_sink_event (GstPad * pad, GstObject * parent, GstEvent * event) return ret; } +static gboolean +gst_deinterleave_sink_query (GstPad * pad, GstObject * parent, GstQuery * query) +{ + gboolean res; + + switch (GST_QUERY_TYPE (query)) { + case GST_QUERY_CAPS:{ + GstCaps *filter; + GstCaps *caps; + + gst_query_parse_caps (query, &filter); + caps = gst_deinterleave_getcaps (pad, parent, filter); + gst_query_set_caps_result (query, caps); + gst_caps_unref (caps); + res = TRUE; + break; + } + case GST_QUERY_ACCEPT_CAPS:{ + GstCaps *caps; + gboolean ret; + + gst_query_parse_accept_caps (query, &caps); + ret = gst_deinterleave_sink_acceptcaps (pad, parent, caps); + gst_query_set_accept_caps_result (query, ret); + res = TRUE; + break; + } + default: + res = gst_pad_query_default (pad, parent, query); + break; + } + + return res; +} + static gboolean gst_deinterleave_src_query (GstPad * pad, GstObject * parent, GstQuery * query) { @@ -648,7 +741,7 @@ gst_deinterleave_src_query (GstPad * pad, GstObject * parent, GstQuery * query) GstCaps *filter, *caps; gst_query_parse_caps (query, &filter); - caps = gst_deinterleave_sink_getcaps (pad, parent, filter); + caps = gst_deinterleave_getcaps (pad, parent, filter); gst_query_set_caps_result (query, caps); gst_caps_unref (caps); } diff --git a/gst/interleave/interleave.h b/gst/interleave/interleave.h index 78f519d99aa34f181326fdafa8b22204372aade9..e69936ac93bac25f125ff143f649b8cf883c269a 100644 --- a/gst/interleave/interleave.h +++ b/gst/interleave/interleave.h @@ -70,8 +70,6 @@ struct _GstInterleave GstEvent *pending_segment; - GstPadEventFunction collect_event; - GstInterleaveFunc func; GstPad *src; diff --git a/gst/isomp4/Makefile.in b/gst/isomp4/Makefile.in index 307df1318517388f98ccf836e13f5a0384c27483..8fd7b532ab429ea92fcd9598eb9c4ea33ca570c0 100644 --- a/gst/isomp4/Makefile.in +++ b/gst/isomp4/Makefile.in @@ -485,6 +485,8 @@ VALGRIND_PATH = @VALGRIND_PATH@ VERSION = @VERSION@ VPX_130_CFLAGS = @VPX_130_CFLAGS@ VPX_130_LIBS = @VPX_130_LIBS@ +VPX_140_CFLAGS = @VPX_140_CFLAGS@ +VPX_140_LIBS = @VPX_140_LIBS@ VPX_CFLAGS = @VPX_CFLAGS@ VPX_LIBS = @VPX_LIBS@ WARNING_CFLAGS = @WARNING_CFLAGS@ diff --git a/gst/isomp4/atoms.c b/gst/isomp4/atoms.c index 267c4f092a7a9d41cb4becbc954de0ba5f834cdc..e0ec513a2b8956fa3e7170cf4f263a5db960fe17 100644 --- a/gst/isomp4/atoms.c +++ b/gst/isomp4/atoms.c @@ -2965,9 +2965,7 @@ atom_trak_tx3g_update_dimension (AtomTRAK * trak, guint32 width, guint32 height) static void atom_tag_data_alloc_data (AtomTagData * data, guint size) { - if (data->data != NULL) { - g_free (data->data); - } + g_free (data->data); data->data = g_new0 (guint8, size); data->datalen = size; } @@ -3185,8 +3183,7 @@ atom_hdlr_set_type (AtomHDLR * hdlr, AtomsContext * context, guint32 comp_type, static void atom_hdlr_set_name (AtomHDLR * hdlr, const char *name) { - if (hdlr->name) - g_free (hdlr->name); + g_free (hdlr->name); hdlr->name = g_strdup (name); } @@ -3471,7 +3468,7 @@ atom_trak_set_audio_type (AtomTRAK * trak, AtomsContext * context, } static AtomInfo * -build_pasp_extension (AtomTRAK * trak, gint par_width, gint par_height) +build_pasp_extension (gint par_width, gint par_height) { AtomData *atom_data = atom_data_new (FOURCC_pasp); guint8 *data; @@ -3534,7 +3531,7 @@ atom_trak_set_video_type (AtomTRAK * trak, AtomsContext * context, /* QT spec has a pasp extension atom in stsd that can hold PAR */ if (par_n && (context->flavor == ATOMS_TREE_FLAVOR_MOV)) { ste->extension_atoms = g_list_append (ste->extension_atoms, - build_pasp_extension (trak, par_n, par_d)); + build_pasp_extension (par_n, par_d)); } return ste; @@ -4288,8 +4285,8 @@ build_btrt_extension (guint32 buffer_size_db, guint32 avg_bitrate, } static AtomInfo * -build_mov_wave_extension (AtomTRAK * trak, guint32 fourcc, AtomInfo * atom1, - AtomInfo * atom2, gboolean terminator) +build_mov_wave_extension (guint32 fourcc, AtomInfo * atom1, AtomInfo * atom2, + gboolean terminator) { AtomWAVE *wave; AtomFRMA *frma; @@ -4342,17 +4339,17 @@ build_mov_aac_extension (AtomTRAK * trak, const GstBuffer * codec_data, mp4a = build_codec_data_extension (FOURCC_mp4a, buf); gst_buffer_unref (buf); - return build_mov_wave_extension (trak, FOURCC_mp4a, mp4a, esds, TRUE); + return build_mov_wave_extension (FOURCC_mp4a, mp4a, esds, TRUE); } AtomInfo * -build_mov_alac_extension (AtomTRAK * trak, const GstBuffer * codec_data) +build_mov_alac_extension (const GstBuffer * codec_data) { AtomInfo *alac; alac = build_codec_data_extension (FOURCC_alac, codec_data); - return build_mov_wave_extension (trak, FOURCC_alac, NULL, alac, TRUE); + return build_mov_wave_extension (FOURCC_alac, NULL, alac, TRUE); } AtomInfo * @@ -4365,8 +4362,7 @@ build_fiel_extension (gint fields) return NULL; } - atom_data = - atom_data_new_from_data (GST_MAKE_FOURCC ('f', 'i', 'e', 'l'), &f, 1); + atom_data = atom_data_new_from_data (FOURCC_fiel, &f, 1); return build_atom_info_wrapper ((Atom *) atom_data, atom_data_copy_data, atom_data_free); @@ -4381,18 +4377,15 @@ build_jp2x_extension (const GstBuffer * prefix) return NULL; } - atom_data = - atom_data_new_from_gst_buffer (GST_MAKE_FOURCC ('j', 'p', '2', 'x'), - prefix); + atom_data = atom_data_new_from_gst_buffer (FOURCC_jp2x, prefix); return build_atom_info_wrapper ((Atom *) atom_data, atom_data_copy_data, atom_data_free); } AtomInfo * -build_jp2h_extension (AtomTRAK * trak, gint width, gint height, - const gchar * colorspace, gint ncomp, const GValue * cmap_array, - const GValue * cdef_array) +build_jp2h_extension (gint width, gint height, const gchar * colorspace, + gint ncomp, const GValue * cmap_array, const GValue * cdef_array) { AtomData *atom_data; GstBuffer *buf; @@ -4439,8 +4432,7 @@ build_jp2h_extension (AtomTRAK * trak, gint width, gint height, /* ihdr = image header box */ gst_byte_writer_put_uint32_be_unchecked (&writer, 22); - gst_byte_writer_put_uint32_le_unchecked (&writer, GST_MAKE_FOURCC ('i', 'h', - 'd', 'r')); + gst_byte_writer_put_uint32_le_unchecked (&writer, FOURCC_ihdr); gst_byte_writer_put_uint32_be_unchecked (&writer, height); gst_byte_writer_put_uint32_be_unchecked (&writer, width); gst_byte_writer_put_uint16_be_unchecked (&writer, ncomp); @@ -4455,8 +4447,7 @@ build_jp2h_extension (AtomTRAK * trak, gint width, gint height, /* colour specification box */ gst_byte_writer_put_uint32_be_unchecked (&writer, 15); - gst_byte_writer_put_uint32_le_unchecked (&writer, GST_MAKE_FOURCC ('c', 'o', - 'l', 'r')); + gst_byte_writer_put_uint32_le_unchecked (&writer, FOURCC_colr); /* specification method: enumerated */ gst_byte_writer_put_uint8_unchecked (&writer, 0x1); @@ -4469,8 +4460,7 @@ build_jp2h_extension (AtomTRAK * trak, gint width, gint height, if (cmap_array) { gst_byte_writer_put_uint32_be_unchecked (&writer, cmap_size); - gst_byte_writer_put_uint32_le_unchecked (&writer, - GST_MAKE_FOURCC ('c', 'm', 'a', 'p')); + gst_byte_writer_put_uint32_le_unchecked (&writer, FOURCC_cmap); for (i = 0; i < cmap_array_size; i++) { const GValue *item; gint value; @@ -4497,8 +4487,7 @@ build_jp2h_extension (AtomTRAK * trak, gint width, gint height, if (cdef_array) { gst_byte_writer_put_uint32_be_unchecked (&writer, cdef_size); - gst_byte_writer_put_uint32_le_unchecked (&writer, - GST_MAKE_FOURCC ('c', 'd', 'e', 'f')); + gst_byte_writer_put_uint32_le_unchecked (&writer, FOURCC_cdef); gst_byte_writer_put_uint16_be_unchecked (&writer, cdef_array_size); for (i = 0; i < cdef_array_size; i++) { const GValue *item; @@ -4564,7 +4553,7 @@ build_amr_extension (void) GST_WRITE_UINT8 (ext + 8, 1); buf = GST_BUFFER_NEW_READONLY (ext, sizeof (ext)); - res = build_codec_data_extension (GST_MAKE_FOURCC ('d', 'a', 'm', 'r'), buf); + res = build_codec_data_extension (FOURCC_damr, buf); gst_buffer_unref (buf); return res; } @@ -4586,7 +4575,7 @@ build_h263_extension (void) GST_WRITE_UINT8 (ext + 6, 0); buf = GST_BUFFER_NEW_READONLY (ext, sizeof (ext)); - res = build_codec_data_extension (GST_MAKE_FOURCC ('d', '2', '6', '3'), buf); + res = build_codec_data_extension (FOURCC_d263, buf); gst_buffer_unref (buf); return res; } @@ -4730,6 +4719,44 @@ build_ac3_extension (guint8 fscod, guint8 bsid, guint8 bsmod, guint8 acmod, atom_data_free); } +AtomInfo * +build_opus_extension (guint32 rate, guint8 channels, guint8 mapping_family, + guint8 stream_count, guint8 coupled_count, guint8 channel_mapping[256], + guint16 pre_skip, guint16 output_gain) +{ + AtomData *atom_data; + guint8 *data_block; + GstByteWriter bw; + gboolean hdl = TRUE; + guint data_block_len; + + gst_byte_writer_init (&bw); + hdl &= gst_byte_writer_put_uint8 (&bw, 0x00); /* version number */ + hdl &= gst_byte_writer_put_uint8 (&bw, channels); + hdl &= gst_byte_writer_put_uint16_le (&bw, pre_skip); + hdl &= gst_byte_writer_put_uint32_le (&bw, rate); + hdl &= gst_byte_writer_put_uint16_le (&bw, output_gain); + hdl &= gst_byte_writer_put_uint8 (&bw, mapping_family); + if (mapping_family > 0) { + hdl &= gst_byte_writer_put_uint8 (&bw, stream_count); + hdl &= gst_byte_writer_put_uint8 (&bw, coupled_count); + hdl &= gst_byte_writer_put_data (&bw, channel_mapping, channels); + } + + if (!hdl) { + GST_WARNING ("Error creating header"); + return NULL; + } + + data_block_len = gst_byte_writer_get_size (&bw); + data_block = gst_byte_writer_reset_and_get_data (&bw); + atom_data = atom_data_new_from_data (FOURCC_dops, data_block, data_block_len); + g_free (data_block); + + return build_atom_info_wrapper ((Atom *) atom_data, atom_data_copy_data, + atom_data_free); +} + AtomInfo * build_uuid_xmp_atom (GstBuffer * xmp_data) { diff --git a/gst/isomp4/atoms.h b/gst/isomp4/atoms.h index f8789e4706f8802f6deced3d53571d01ee9f6306..b105a4d38d7300788a255128dcf4900535dc0f53 100644 --- a/gst/isomp4/atoms.h +++ b/gst/isomp4/atoms.h @@ -948,15 +948,14 @@ void sample_table_entry_add_ext_atom (SampleTableEntry * ste, AtomInfo * ext); AtomInfo * build_codec_data_extension (guint32 fourcc, const GstBuffer * codec_data); AtomInfo * build_mov_aac_extension (AtomTRAK * trak, const GstBuffer * codec_data, guint32 avg_bitrate, guint32 max_bitrate); -AtomInfo * build_mov_alac_extension (AtomTRAK * trak, const GstBuffer * codec_data); +AtomInfo * build_mov_alac_extension (const GstBuffer * codec_data); AtomInfo * build_esds_extension (AtomTRAK * trak, guint8 object_type, guint8 stream_type, const GstBuffer * codec_data, guint32 avg_bitrate, guint32 max_bitrate); AtomInfo * build_btrt_extension (guint32 buffer_size_db, guint32 avg_bitrate, guint32 max_bitrate); -AtomInfo * build_jp2h_extension (AtomTRAK * trak, gint width, gint height, - const gchar *colorspace, gint ncomp, - const GValue * cmap_array, +AtomInfo * build_jp2h_extension (gint width, gint height, const gchar *colorspace, + gint ncomp, const GValue * cmap_array, const GValue * cdef_array); AtomInfo * build_jp2x_extension (const GstBuffer * prefix); @@ -964,6 +963,11 @@ AtomInfo * build_fiel_extension (gint fields); AtomInfo * build_ac3_extension (guint8 fscod, guint8 bsid, guint8 bsmod, guint8 acmod, guint8 lfe_on, guint8 bitrate_code); +AtomInfo * build_opus_extension (guint32 rate, guint8 channels, guint8 mapping_family, + guint8 stream_count, guint8 coupled_count, + guint8 channel_mapping[256], guint16 pre_skip, + guint16 output_gain); + AtomInfo * build_amr_extension (void); AtomInfo * build_h263_extension (void); AtomInfo * build_gama_atom (gdouble gamma); diff --git a/gst/isomp4/fourcc.h b/gst/isomp4/fourcc.h index 4bff1e0d53fb5bc8dffcaeaaf998b0f6dacbe050..5bb43e9529df52cb121d8a90b13e3b707274e352 100644 --- a/gst/isomp4/fourcc.h +++ b/gst/isomp4/fourcc.h @@ -103,7 +103,9 @@ G_BEGIN_DECLS #define FOURCC_ctab GST_MAKE_FOURCC('c','t','a','b') #define FOURCC_ctts GST_MAKE_FOURCC('c','t','t','s') #define FOURCC_cslg GST_MAKE_FOURCC('c','s','l','g') +#define FOURCC_d263 GST_MAKE_FOURCC('d','2','6','3') #define FOURCC_dac3 GST_MAKE_FOURCC('d','a','c','3') +#define FOURCC_damr GST_MAKE_FOURCC('d','a','m','r') #define FOURCC_data GST_MAKE_FOURCC('d','a','t','a') #define FOURCC_dcom GST_MAKE_FOURCC('d','c','o','m') #define FOURCC_desc GST_MAKE_FOURCC('d','e','s','c') @@ -115,6 +117,10 @@ G_BEGIN_DECLS #define FOURCC_dref GST_MAKE_FOURCC('d','r','e','f') #define FOURCC_drmi GST_MAKE_FOURCC('d','r','m','i') #define FOURCC_drms GST_MAKE_FOURCC('d','r','m','s') +#define FOURCC_dvcp GST_MAKE_FOURCC('d','v','c','p') +#define FOURCC_dvc_ GST_MAKE_FOURCC('d','v','c',' ') +#define FOURCC_dv5p GST_MAKE_FOURCC('d','v','5','p') +#define FOURCC_dv5n GST_MAKE_FOURCC('d','v','5','n') #define FOURCC_edts GST_MAKE_FOURCC('e','d','t','s') #define FOURCC_elst GST_MAKE_FOURCC('e','l','s','t') #define FOURCC_enda GST_MAKE_FOURCC('e','n','d','a') @@ -159,10 +165,12 @@ G_BEGIN_DECLS #define FOURCC_minf GST_MAKE_FOURCC('m','i','n','f') #define FOURCC_moov GST_MAKE_FOURCC('m','o','o','v') #define FOURCC_mp4a GST_MAKE_FOURCC('m','p','4','a') -#define FOURCC_mp4s GST_MAKE_FOURCC('m','p','4','s') +#define FOURCC_mp4s GST_MAKE_FOURCC('m','p','4','s') #define FOURCC_mp4s GST_MAKE_FOURCC('m','p','4','s') #define FOURCC_mp4v GST_MAKE_FOURCC('m','p','4','v') #define FOURCC_name GST_MAKE_FOURCC('n','a','m','e') +#define FOURCC_opus GST_MAKE_FOURCC('O','p','u','s') +#define FOURCC_dops GST_MAKE_FOURCC('d','O','p','s') #define FOURCC_pasp GST_MAKE_FOURCC('p','a','s','p') #define FOURCC_pcst GST_MAKE_FOURCC('p','c','s','t') #define FOURCC_pgap GST_MAKE_FOURCC('p','g','a','p') @@ -195,6 +203,7 @@ G_BEGIN_DECLS #define FOURCC_sowt GST_MAKE_FOURCC('s','o','w','t') #define FOURCC_stbl GST_MAKE_FOURCC('s','t','b','l') #define FOURCC_stco GST_MAKE_FOURCC('s','t','c','o') +#define FOURCC_stpp GST_MAKE_FOURCC('s','t','p','p') #define FOURCC_stps GST_MAKE_FOURCC('s','t','p','s') #define FOURCC_strf GST_MAKE_FOURCC('s','t','r','f') #define FOURCC_strm GST_MAKE_FOURCC('s','t','r','m') @@ -222,6 +231,7 @@ G_BEGIN_DECLS #define FOURCC_url_ GST_MAKE_FOURCC('u','r','l',' ') #define FOURCC_uuid GST_MAKE_FOURCC('u','u','i','d') #define FOURCC_v210 GST_MAKE_FOURCC('v','2','1','0') +#define FOURCC_vc_1 GST_MAKE_FOURCC('v','c','-','1') #define FOURCC_vide GST_MAKE_FOURCC('v','i','d','e') #define FOURCC_vmhd GST_MAKE_FOURCC('v','m','h','d') #define FOURCC_wave GST_MAKE_FOURCC('w','a','v','e') @@ -243,6 +253,7 @@ G_BEGIN_DECLS #define FOURCC_3gp4 GST_MAKE_FOURCC('3','g','p','4') #define FOURCC_3gp6 GST_MAKE_FOURCC('3','g','p','6') #define FOURCC_3gr6 GST_MAKE_FOURCC('3','g','r','6') +#define FOURCC_3g__ GST_MAKE_FOURCC('3','g',0,0) #define FOURCC_isml GST_MAKE_FOURCC('i','s','m','l') #define FOURCC_iso2 GST_MAKE_FOURCC('i','s','o','2') #define FOURCC_isom GST_MAKE_FOURCC('i','s','o','m') @@ -298,6 +309,7 @@ G_BEGIN_DECLS #define FOURCC_traf GST_MAKE_FOURCC('t','r','a','f') #define FOURCC_trex GST_MAKE_FOURCC('t','r','e','x') #define FOURCC_trun GST_MAKE_FOURCC('t','r','u','n') +#define FOURCC_wma_ GST_MAKE_FOURCC('w','m','a',' ') /* MPEG DASH */ #define FOURCC_tfdt GST_MAKE_FOURCC('t','f','d','t') diff --git a/gst/isomp4/gstqtmux.c b/gst/isomp4/gstqtmux.c index 7f72443e05b2804de2a05b616276dd8a08bdf099..9ac7c77e81987b41bca7603d4033cbe18a8af5df 100644 --- a/gst/isomp4/gstqtmux.c +++ b/gst/isomp4/gstqtmux.c @@ -122,6 +122,7 @@ #include <gst/audio/audio.h> #include <gst/video/video.h> #include <gst/tag/tag.h> +#include <gst/pbutils/pbutils.h> #include <sys/types.h> #ifdef G_OS_WIN32 @@ -2461,10 +2462,8 @@ gst_qt_mux_update_edit_lists (GstQTMux * qtmux) guint32 lateness = 0; guint32 duration = qtpad->trak->tkhd.duration; gboolean has_gap; - gboolean has_shift; has_gap = (qtpad->first_ts > (qtmux->first_ts + qtpad->dts_adjustment)); - has_shift = (qtpad->dts_adjustment > 0); if (has_gap) { GstClockTime diff; @@ -2480,11 +2479,14 @@ gst_qt_mux_update_edit_lists (GstQTMux * qtmux) (guint32) (1 * 65536.0)); } - if (has_gap || has_shift) { - GstClockTime ctts; + /* has shift */ + if (has_gap || (qtpad->dts_adjustment > 0)) { + GstClockTime ctts = 0; guint32 media_start; - ctts = qtpad->first_ts - qtpad->first_dts; + if (qtpad->first_ts > qtpad->first_dts) + ctts = qtpad->first_ts - qtpad->first_dts; + media_start = gst_util_uint64_scale_round (ctts, atom_trak_get_timescale (qtpad->trak), GST_SECOND); @@ -3644,7 +3646,7 @@ gst_qt_mux_audio_sink_set_caps (GstQTPad * qtpad, GstCaps * caps) GST_WARNING_OBJECT (qtmux, "unexpected codec-data size, possibly broken"); } if (format == GST_QT_MUX_FORMAT_QT) - ext_atom = build_mov_alac_extension (qtpad->trak, codec_config); + ext_atom = build_mov_alac_extension (codec_config); else ext_atom = build_codec_data_extension (FOURCC_alac, codec_config); /* set some more info */ @@ -3665,6 +3667,49 @@ gst_qt_mux_audio_sink_set_caps (GstQTPad * qtpad, GstCaps * caps) * the stream itself. Abuse the prepare_buf_func so we parse a frame * and get the needed data */ qtpad->prepare_buf_func = gst_qt_mux_prepare_parse_ac3_frame; + } else if (strcmp (mimetype, "audio/x-opus") == 0) { + /* Based on the specification defined in: + * https://www.opus-codec.org/docs/opus_in_isobmff.html */ + guint8 channels, mapping_family, stream_count, coupled_count; + guint16 pre_skip; + gint16 output_gain; + guint32 rate; + guint8 channel_mapping[256]; + const GValue *streamheader; + const GValue *first_element; + GstBuffer *header; + + entry.fourcc = FOURCC_opus; + entry.sample_size = 16; + + streamheader = gst_structure_get_value (structure, "streamheader"); + if (streamheader && GST_VALUE_HOLDS_ARRAY (streamheader) && + gst_value_array_get_size (streamheader) != 0) { + first_element = gst_value_array_get_value (streamheader, 0); + header = gst_value_get_buffer (first_element); + if (!gst_codec_utils_opus_parse_header (header, &rate, &channels, + &mapping_family, &stream_count, &coupled_count, channel_mapping, + &pre_skip, &output_gain)) { + GST_ERROR_OBJECT (qtmux, "Incomplete OpusHead"); + goto refuse_caps; + } + } else { + GST_WARNING_OBJECT (qtmux, + "no streamheader field in caps %" GST_PTR_FORMAT, caps); + + if (!gst_codec_utils_opus_parse_caps (caps, &rate, &channels, + &mapping_family, &stream_count, &coupled_count, + channel_mapping)) { + GST_ERROR_OBJECT (qtmux, "Incomplete Opus caps"); + goto refuse_caps; + } + pre_skip = 0; + output_gain = 0; + } + + entry.channels = channels; + ext_atom = build_opus_extension (rate, channels, mapping_family, + stream_count, coupled_count, channel_mapping, pre_skip, output_gain); } if (!entry.fourcc) @@ -3957,15 +4002,15 @@ gst_qt_mux_video_sink_set_caps (GstQTPad * qtpad, GstCaps * caps) switch (version) { case 25: if (pal) - entry.fourcc = GST_MAKE_FOURCC ('d', 'v', 'c', 'p'); + entry.fourcc = FOURCC_dvcp; else - entry.fourcc = GST_MAKE_FOURCC ('d', 'v', 'c', ' '); + entry.fourcc = FOURCC_dvc_; break; case 50: if (pal) - entry.fourcc = GST_MAKE_FOURCC ('d', 'v', '5', 'p'); + entry.fourcc = FOURCC_dv5p; else - entry.fourcc = GST_MAKE_FOURCC ('d', 'v', '5', 'n'); + entry.fourcc = FOURCC_dv5n; break; default: GST_WARNING_OBJECT (qtmux, "unrecognized dv version"); @@ -3998,8 +4043,8 @@ gst_qt_mux_video_sink_set_caps (GstQTPad * qtpad, GstCaps * caps) colorspace = gst_structure_get_string (structure, "colorspace"); if (colorspace && (ext_atom = - build_jp2h_extension (qtpad->trak, width, height, colorspace, ncomp, - cmap_array, cdef_array)) != NULL) { + build_jp2h_extension (width, height, colorspace, ncomp, cmap_array, + cdef_array)) != NULL) { ext_atom_list = g_list_append (ext_atom_list, ext_atom); ext_atom = build_fiel_extension (fields); @@ -4033,13 +4078,13 @@ gst_qt_mux_video_sink_set_caps (GstQTPad * qtpad, GstCaps * caps) variant = gst_structure_get_string (structure, "format"); if (!variant || !g_strcmp0 (variant, "standard")) - entry.fourcc = GST_MAKE_FOURCC ('a', 'p', 'c', 'n'); + entry.fourcc = FOURCC_apcn; else if (!g_strcmp0 (variant, "lt")) - entry.fourcc = GST_MAKE_FOURCC ('a', 'p', 'c', 's'); + entry.fourcc = FOURCC_apcs; else if (!g_strcmp0 (variant, "hq")) - entry.fourcc = GST_MAKE_FOURCC ('a', 'p', 'c', 'h'); + entry.fourcc = FOURCC_apch; else if (!g_strcmp0 (variant, "proxy")) - entry.fourcc = GST_MAKE_FOURCC ('a', 'p', '4', 'h'); + entry.fourcc = FOURCC_ap4h; } if (!entry.fourcc) diff --git a/gst/isomp4/gstqtmuxmap.c b/gst/isomp4/gstqtmuxmap.c index 1a8b6cec09a13d82499d25357ece10086dab278d..61b11a44304d9e21e05c518d97cb129461b4e63e 100644 --- a/gst/isomp4/gstqtmuxmap.c +++ b/gst/isomp4/gstqtmuxmap.c @@ -88,20 +88,15 @@ #define PCM_CAPS \ "audio/x-raw, " \ - "format = (string) { S8, U8 }, " \ - "layout = (string) interleaved, " \ - COMMON_AUDIO_CAPS (2, MAX) "; " \ - "audio/x-raw, " \ - "format = (string) { S16LE, S16BE }, " \ + "format = (string) { S16LE, S16BE, S8, U8 }, " \ "layout = (string) interleaved, " \ COMMON_AUDIO_CAPS (2, MAX) #define PCM_CAPS_FULL \ "audio/x-raw, " \ - "format = (string) { S32LE, S32BE, S24LE, S24BE }, " \ + "format = (string) { S32LE, S32BE, S24LE, S24BE, S16LE, S16BE, S8, U8 }, " \ "layout = (string) interleaved, " \ - COMMON_AUDIO_CAPS (2, MAX) "; " \ - PCM_CAPS + COMMON_AUDIO_CAPS (2, MAX) #define MP3_CAPS \ "audio/mpeg, " \ @@ -137,6 +132,12 @@ "audio/x-alac, " \ COMMON_AUDIO_CAPS(2, MAX) +#define OPUS_CAPS \ + "audio/x-opus, " \ + "channel-mapping-family = (int) [0, 255], " \ + COMMON_AUDIO_CAPS(8, MAX) + + #define TEXT_UTF8 \ "text/x-raw, " \ "format=(string)utf8" @@ -189,7 +190,8 @@ GstQTMuxFormatProp gst_qt_mux_format_list[] = { GST_STATIC_CAPS ("video/quicktime, variant = (string) iso"), GST_STATIC_CAPS (MPEG4V_CAPS "; " H264_CAPS ";" "video/x-mp4-part," COMMON_VIDEO_CAPS), - GST_STATIC_CAPS (MP3_CAPS "; " AAC_CAPS " ; " AC3_CAPS " ; " ALAC_CAPS), + GST_STATIC_CAPS (MP3_CAPS "; " + AAC_CAPS " ; " AC3_CAPS " ; " ALAC_CAPS " ; " OPUS_CAPS), GST_STATIC_CAPS (TEXT_UTF8)} , /* Microsoft Smooth Streaming fmp4/isml */ diff --git a/gst/isomp4/qtdemux.c b/gst/isomp4/qtdemux.c index cc408939c65144311053240888f0a34fbc407724..77bb73e8d95635ac5c1e82b3b54e9027b0fafca4 100644 --- a/gst/isomp4/qtdemux.c +++ b/gst/isomp4/qtdemux.c @@ -1242,6 +1242,7 @@ gst_qtdemux_adjust_seek (GstQTDemux * qtdemux, gint64 desired_time, GstClockTime media_time; GstClockTime seg_time; QtDemuxSegment *seg; + gboolean empty_segment = FALSE; str = qtdemux->streams[n]; @@ -1255,41 +1256,61 @@ gst_qtdemux_adjust_seek (GstQTDemux * qtdemux, gint64 desired_time, seg = &str->segments[seg_idx]; seg_time = desired_time - seg->time; + while (QTSEGMENT_IS_EMPTY (seg)) { + seg_time = 0; + empty_segment = TRUE; + GST_DEBUG_OBJECT (str->pad, "Segment %d is empty, moving to next one", + seg_idx); + seg_idx++; + if (seg_idx == str->n_segments) + break; + seg = &str->segments[seg_idx]; + } + + if (seg_idx == str->n_segments) { + /* FIXME track shouldn't have the last segment as empty, but if it + * happens we better handle it */ + continue; + } + /* get the media time in the segment */ media_start = seg->media_start + seg_time; /* get the index of the sample with media time */ index = gst_qtdemux_find_index_linear (qtdemux, str, media_start); GST_DEBUG_OBJECT (qtdemux, "sample for %" GST_TIME_FORMAT " at %u" - " at offset %" G_GUINT64_FORMAT, - GST_TIME_ARGS (media_start), index, str->samples[index].offset); - - /* find previous keyframe */ - kindex = gst_qtdemux_find_keyframe (qtdemux, str, index); + " at offset %" G_GUINT64_FORMAT " (empty segment: %d)", + GST_TIME_ARGS (media_start), index, str->samples[index].offset, + empty_segment); - /* if the keyframe is at a different position, we need to update the - * requested seek time */ - if (index != kindex) { - index = kindex; - - /* get timestamp of keyframe */ - media_time = QTSAMPLE_DTS (str, &str->samples[kindex]); - GST_DEBUG_OBJECT (qtdemux, - "keyframe at %u with time %" GST_TIME_FORMAT " at offset %" - G_GUINT64_FORMAT, kindex, GST_TIME_ARGS (media_time), - str->samples[kindex].offset); + if (!empty_segment) { + /* find previous keyframe */ + kindex = gst_qtdemux_find_keyframe (qtdemux, str, index); - /* keyframes in the segment get a chance to change the - * desired_offset. keyframes out of the segment are - * ignored. */ - if (media_time >= seg->media_start) { - GstClockTime seg_time; + /* if the keyframe is at a different position, we need to update the + * requested seek time */ + if (index != kindex) { + index = kindex; - /* this keyframe is inside the segment, convert back to - * segment time */ - seg_time = (media_time - seg->media_start) + seg->time; - if (seg_time < min_offset) - min_offset = seg_time; + /* get timestamp of keyframe */ + media_time = QTSAMPLE_DTS (str, &str->samples[kindex]); + GST_DEBUG_OBJECT (qtdemux, + "keyframe at %u with time %" GST_TIME_FORMAT " at offset %" + G_GUINT64_FORMAT, kindex, GST_TIME_ARGS (media_time), + str->samples[kindex].offset); + + /* keyframes in the segment get a chance to change the + * desired_offset. keyframes out of the segment are + * ignored. */ + if (media_time >= seg->media_start) { + GstClockTime seg_time; + + /* this keyframe is inside the segment, convert back to + * segment time */ + seg_time = (media_time - seg->media_start) + seg->time; + if (seg_time < min_offset) + min_offset = seg_time; + } } } @@ -1974,6 +1995,9 @@ gst_qtdemux_reset (GstQTDemux * qtdemux, gboolean hard) qtdemux->streams[n]->time_position = 0; qtdemux->streams[n]->accumulated_base = 0; } + if (!qtdemux->pending_newsegment) { + qtdemux->pending_newsegment = gst_event_new_segment (&qtdemux->segment); + } } } @@ -2103,6 +2127,14 @@ gst_qtdemux_handle_sink_event (GstPad * sinkpad, GstObject * parent, res = TRUE; goto drop; } + case GST_EVENT_FLUSH_START: + { + if (gst_event_get_seqnum (event) == demux->offset_seek_seqnum) { + gst_event_unref (event); + goto drop; + } + break; + } case GST_EVENT_FLUSH_STOP: { guint64 dur; @@ -2110,6 +2142,11 @@ gst_qtdemux_handle_sink_event (GstPad * sinkpad, GstObject * parent, dur = demux->segment.duration; gst_qtdemux_reset (demux, FALSE); demux->segment.duration = dur; + + if (gst_event_get_seqnum (event) == demux->offset_seek_seqnum) { + gst_event_unref (event); + goto drop; + } break; } case GST_EVENT_EOS: @@ -2364,6 +2401,8 @@ qtdemux_parse_ftyp (GstQTDemux * qtdemux, const guint8 * buffer, gint length) qtdemux->major_brand = QT_FOURCC (buffer + 8); GST_DEBUG_OBJECT (qtdemux, "major brand: %" GST_FOURCC_FORMAT, GST_FOURCC_ARGS (qtdemux->major_brand)); + if (qtdemux->comp_brands) + gst_buffer_unref (qtdemux->comp_brands); buf = qtdemux->comp_brands = gst_buffer_new_and_alloc (length - 16); gst_buffer_fill (buf, 0, buffer + 16, length - 16); } @@ -4110,8 +4149,6 @@ eos: * This will push out a NEWSEGMENT event with the right values and * position the stream index to the first decodable sample before * @offset. - * - * PULL-BASED */ static gboolean gst_qtdemux_activate_segment (GstQTDemux * qtdemux, QtDemuxStream * stream, @@ -4243,6 +4280,10 @@ gst_qtdemux_activate_segment (GstQTDemux * qtdemux, QtDemuxStream * stream, return TRUE; } + /* We don't need to look for a sample in push-based */ + if (!qtdemux->pullbased) + return TRUE; + /* and move to the keyframe before the indicated media time of the * segment */ if (G_LIKELY (!QTSEGMENT_IS_EMPTY (segment))) { @@ -4291,9 +4332,9 @@ gst_qtdemux_activate_segment (GstQTDemux * qtdemux, QtDemuxStream * stream, /* moving forwards check if we move past a keyframe */ if (kf_index > stream->sample_index) { GST_DEBUG_OBJECT (stream->pad, - "moving forwards to keyframe at %u (pts %" GST_TIME_FORMAT " dts %"GST_TIME_FORMAT" )", kf_index, - GST_TIME_ARGS (QTSAMPLE_PTS(stream, &stream->samples[kf_index])), - GST_TIME_ARGS (QTSAMPLE_DTS(stream, &stream->samples[kf_index]))); + "moving forwards to keyframe at %u (pts %" GST_TIME_FORMAT " dts %"GST_TIME_FORMAT" )", kf_index, + GST_TIME_ARGS (QTSAMPLE_PTS(stream, &stream->samples[kf_index])), + GST_TIME_ARGS (QTSAMPLE_DTS(stream, &stream->samples[kf_index]))); gst_qtdemux_move_stream (qtdemux, stream, kf_index); } else { GST_DEBUG_OBJECT (stream->pad, @@ -5450,7 +5491,10 @@ qtdemux_seek_offset (GstQTDemux * demux, guint64 offset) GST_SEEK_FLAG_FLUSH | GST_SEEK_FLAG_ACCURATE, GST_SEEK_TYPE_SET, offset, GST_SEEK_TYPE_NONE, -1); + /* store seqnum to drop flush events, they don't need to reach downstream */ + demux->offset_seek_seqnum = gst_event_get_seqnum (event); res = gst_pad_push_event (demux->sinkpad, event); + demux->offset_seek_seqnum = 0; return res; } @@ -5508,6 +5552,62 @@ gst_qtdemux_drop_data (GstQTDemux * demux, gint bytes) demux->todrop -= bytes; } +static void +gst_qtdemux_check_send_pending_segment (GstQTDemux * demux) +{ + if (G_UNLIKELY (demux->pending_newsegment)) { + gint i; + + gst_qtdemux_push_pending_newsegment (demux); + /* clear to send tags on all streams */ + for (i = 0; i < demux->n_streams; i++) { + QtDemuxStream *stream; + stream = demux->streams[i]; + gst_qtdemux_push_tags (demux, stream); + if (stream->sparse) { + GST_INFO_OBJECT (demux, "Sending gap event on stream %d", i); + gst_pad_push_event (stream->pad, + gst_event_new_gap (stream->segment.position, GST_CLOCK_TIME_NONE)); + } + } + } +} + +static void +gst_qtdemux_stream_send_initial_gap_segments (GstQTDemux * demux, + QtDemuxStream * stream) +{ + gint i; + + /* Push any initial gap segments before proceeding to the + * 'real' data */ + for (i = 0; i < stream->n_segments; i++) { + gst_qtdemux_activate_segment (demux, stream, i, stream->time_position); + + if (QTSEGMENT_IS_EMPTY (&stream->segments[i])) { + GstClockTime ts, dur; + GstEvent *gap; + + ts = stream->time_position; + dur = + stream->segments[i].duration - (stream->time_position - + stream->segments[i].time); + gap = gst_event_new_gap (ts, dur); + stream->time_position += dur; + + GST_DEBUG_OBJECT (stream->pad, "Pushing gap for empty " + "segment: %" GST_PTR_FORMAT, gap); + gst_pad_push_event (stream->pad, gap); + } else { + /* Only support empty segment at the beginning followed by + * one non-empty segment, this was checked when parsing the + * edts atom, arriving here is unexpected */ + g_assert (i + 1 == stream->n_segments); + break; + } + } +} + static GstFlowReturn gst_qtdemux_chain (GstPad * sinkpad, GstObject * parent, GstBuffer * inbuf) { @@ -5677,6 +5777,8 @@ gst_qtdemux_process_adapter (GstQTDemux * demux, gboolean force) extract_initial_length_and_fourcc (data, demux->neededbytes, NULL, &fourcc); if (fourcc == FOURCC_moov) { + gint n; + /* in usual fragmented setup we could try to scan for more * and end up at the the moov (after mdat) again */ if (demux->got_moov && demux->n_streams > 0 && @@ -5710,7 +5812,6 @@ gst_qtdemux_process_adapter (GstQTDemux * demux, gboolean force) if (!demux->got_moov) qtdemux_expose_streams (demux); else { - gint n; for (n = 0; n < demux->n_streams; n++) { QtDemuxStream *stream = demux->streams[n]; @@ -5720,6 +5821,15 @@ gst_qtdemux_process_adapter (GstQTDemux * demux, gboolean force) } demux->got_moov = TRUE; + gst_qtdemux_check_send_pending_segment (demux); + + /* fragmented streams headers shouldn't contain edts atoms */ + if (!demux->fragmented) { + for (n = 0; n < demux->n_streams; n++) { + gst_qtdemux_stream_send_initial_gap_segments (demux, + demux->streams[n]); + } + } g_node_destroy (demux->moov_node); demux->moov_node = NULL; @@ -5945,20 +6055,7 @@ gst_qtdemux_process_adapter (GstQTDemux * demux, gboolean force) /* first buffer? */ /* initial newsegment sent here after having added pads, * possible others in sink_event */ - if (G_UNLIKELY (demux->pending_newsegment)) { - gst_qtdemux_push_pending_newsegment (demux); - /* clear to send tags on all streams */ - for (i = 0; i < demux->n_streams; i++) { - stream = demux->streams[i]; - gst_qtdemux_push_tags (demux, stream); - if (stream->sparse) { - GST_INFO_OBJECT (demux, "Sending gap event on stream %d", i); - gst_pad_push_event (stream->pad, - gst_event_new_gap (stream->segment.position, - GST_CLOCK_TIME_NONE)); - } - } - } + gst_qtdemux_check_send_pending_segment (demux); /* Figure out which stream this packet belongs to */ for (i = 0; i < demux->n_streams; i++) { @@ -6031,6 +6128,8 @@ gst_qtdemux_process_adapter (GstQTDemux * demux, gboolean force) /* combine flows */ ret = gst_qtdemux_combine_flows (demux, stream, ret); + if (ret != GST_FLOW_OK && ret != GST_FLOW_NOT_LINKED) + goto non_ok_unlinked_flow; } else { /* skip this data, stream is EOS */ gst_adapter_flush (demux->adapter, demux->neededbytes); @@ -6074,6 +6173,12 @@ done: return ret; /* ERRORS */ +non_ok_unlinked_flow: + { + GST_DEBUG_OBJECT (demux, "Stopping, combined return flow %s", + gst_flow_get_name (ret)); + return ret; + } unknown_stream: { GST_ELEMENT_ERROR (demux, STREAM, FAILED, (NULL), ("unknown stream found")); @@ -6237,7 +6342,7 @@ qtdemux_parse_moov (GstQTDemux * qtdemux, const guint8 * buffer, guint length) method = QT_FOURCC ((guint8 *) dcom->data + 8); switch (method) { #ifdef HAVE_ZLIB - case GST_MAKE_FOURCC ('z', 'l', 'i', 'b'):{ + case FOURCC_zlib:{ guint uncompressed_length; guint compressed_length; guint8 *buf; @@ -7855,6 +7960,10 @@ qtdemux_parse_segments (GstQTDemux * qtdemux, QtDemuxStream * stream, GNode * trak) { GNode *edts; + /* accept edts if they contain gaps at start and there is only + * one media segment */ + gboolean allow_pushbased_edts = TRUE; + gint media_segments_count = 0; /* parse and prepare segment info from the edit list */ GST_DEBUG_OBJECT (qtdemux, "looking for edit list container"); @@ -7907,6 +8016,7 @@ qtdemux_parse_segments (GstQTDemux * qtdemux, QtDemuxStream * stream, if (media_time != G_MAXUINT32) { segment->media_start = QTSTREAMTIME_TO_GSTTIME (stream, media_time); segment->media_stop = segment->media_start + segment->duration; + media_segments_count++; } else { segment->media_start = GST_CLOCK_TIME_NONE; segment->media_stop = GST_CLOCK_TIME_NONE; @@ -7944,12 +8054,14 @@ qtdemux_parse_segments (GstQTDemux * qtdemux, QtDemuxStream * stream, } GST_DEBUG_OBJECT (qtdemux, "found %d segments", count); stream->n_segments = count; + if (media_segments_count != 1) + allow_pushbased_edts = FALSE; } done: /* push based does not handle segments, so act accordingly here, * and warn if applicable */ - if (!qtdemux->pullbased) { + if (!qtdemux->pullbased && !allow_pushbased_edts) { GST_WARNING_OBJECT (qtdemux, "streaming; discarding edit list segments"); /* remove and use default one below, we stream like it anyway */ g_free (stream->segments); @@ -8208,7 +8320,7 @@ qtdemux_parse_amr_bitrate (GstBuffer * buf, gboolean wb) goto bad_data; } - if (QT_FOURCC (map.data + 4) != GST_MAKE_FOURCC ('d', 'a', 'm', 'r')) { + if (QT_FOURCC (map.data + 4) != FOURCC_damr) { GST_DEBUG ("Unknown atom in %" GST_FOURCC_FORMAT, GST_FOURCC_ARGS (QT_UINT32 (map.data + 4))); goto bad_data; @@ -8457,6 +8569,7 @@ qtdemux_parse_trak (GstQTDemux * qtdemux, GNode * trak) guint32 fourcc; guint value_size, stsd_len, len; guint32 track_id; + guint32 dummy; GST_DEBUG_OBJECT (qtdemux, "parse_trak"); @@ -8488,6 +8601,8 @@ qtdemux_parse_trak (GstQTDemux * qtdemux, GNode * trak) gst_qtdemux_stream_flush_segments_data (qtdemux, stream); gst_qtdemux_stream_flush_samples_data (qtdemux, stream); } + /* need defaults for fragments */ + qtdemux_parse_trex (qtdemux, stream, &dummy, &dummy, &dummy); if (stream->pending_tags == NULL) stream->pending_tags = gst_tag_list_new_empty (); @@ -9341,7 +9456,7 @@ qtdemux_parse_trak (GstQTDemux * qtdemux, GNode * trak) gst_buffer_unref (buf); break; } - case GST_MAKE_FOURCC ('v', 'c', '-', '1'): + case FOURCC_vc_1: { gint len = QT_UINT32 (stsd_data) - 0x66; const guint8 *vc1_data = stsd_data + 0x66; @@ -9636,7 +9751,7 @@ qtdemux_parse_trak (GstQTDemux * qtdemux, GNode * trak) } break; } - case GST_MAKE_FOURCC ('w', 'm', 'a', ' '): + case FOURCC_wma_: { gint len = QT_UINT32 (stsd_data) - offset; const guint8 *wfex_data = stsd_data + offset; @@ -9743,6 +9858,38 @@ qtdemux_parse_trak (GstQTDemux * qtdemux, GNode * trak) } break; } + case FOURCC_opus: + { + GNode *opus; + const guint8 *opus_data; + guint8 *channel_mapping = NULL; + guint32 rate; + guint8 channels; + guint8 channel_mapping_family; + guint8 stream_count; + guint8 coupled_count; + guint8 i; + + opus = qtdemux_tree_get_child_by_type (stsd, FOURCC_opus); + opus_data = opus->data; + + channels = GST_READ_UINT8 (opus_data + 45); + rate = GST_READ_UINT32_LE (opus_data + 48); + channel_mapping_family = GST_READ_UINT8 (opus_data + 54); + stream_count = GST_READ_UINT8 (opus_data + 55); + coupled_count = GST_READ_UINT8 (opus_data + 56); + + if (channels > 0) { + channel_mapping = g_malloc (channels * sizeof (guint8)); + for (i = 0; i < channels; i++) + channel_mapping[i] = GST_READ_UINT8 (opus_data + i + 57); + } + + stream->caps = gst_codec_utils_opus_create_caps (rate, channels, + channel_mapping_family, stream_count, coupled_count, + channel_mapping); + break; + } default: break; } @@ -10065,7 +10212,6 @@ qtdemux_parse_trak (GstQTDemux * qtdemux, GNode * trak) goto samples_failed; if (qtdemux->fragmented) { - guint32 dummy; guint64 offset; /* need all moov samples as basis; probably not many if any at all */ @@ -10083,8 +10229,6 @@ qtdemux_parse_trak (GstQTDemux * qtdemux, GNode * trak) GST_CLOCK_TIME_IS_VALID (qtdemux->segment.duration)) stream->duration = GSTTIME_TO_QTSTREAMTIME (stream, qtdemux->segment.duration); - /* need defaults for fragments */ - qtdemux_parse_trex (qtdemux, stream, &dummy, &dummy, &dummy); } /* configure segments */ @@ -10417,7 +10561,7 @@ qtdemux_is_brand_3gp (GstQTDemux * qtdemux, gboolean major) { if (major) { return ((qtdemux->major_brand & GST_MAKE_FOURCC (255, 255, 0, 0)) == - GST_MAKE_FOURCC ('3', 'g', 0, 0)); + FOURCC_3g__); } else if (qtdemux->comp_brands != NULL) { GstMapInfo map; guint8 *data; @@ -10429,7 +10573,7 @@ qtdemux_is_brand_3gp (GstQTDemux * qtdemux, gboolean major) size = map.size; while (size >= 4) { res = res || ((QT_FOURCC (data) & GST_MAKE_FOURCC (255, 255, 0, 0)) == - GST_MAKE_FOURCC ('3', 'g', 0, 0)); + FOURCC_3g__); data += 4; size -= 4; } @@ -11551,7 +11695,7 @@ qtdemux_add_container_format (GstQTDemux * qtdemux, GstTagList * tags) if (qtdemux->major_brand == FOURCC_mjp2) fmt = "Motion JPEG 2000"; - else if ((qtdemux->major_brand & 0xffff) == GST_MAKE_FOURCC ('3', 'g', 0, 0)) + else if ((qtdemux->major_brand & 0xffff) == FOURCC_3g__) fmt = "3GP"; else if (qtdemux->major_brand == FOURCC_qt__) fmt = "Quicktime"; @@ -12012,7 +12156,7 @@ qtdemux_video_caps (GstQTDemux * qtdemux, QtDemuxStream * stream, _codec ("PNG still images"); caps = gst_caps_new_empty_simple ("image/png"); break; - case GST_MAKE_FOURCC ('j', 'p', 'e', 'g'): + case FOURCC_jpeg: _codec ("JPEG still images"); caps = gst_caps_new_simple ("image/jpeg", "parsed", G_TYPE_BOOLEAN, TRUE, @@ -12031,13 +12175,13 @@ qtdemux_video_caps (GstQTDemux * qtdemux, QtDemuxStream * stream, _codec ("Motion-JPEG format B"); caps = gst_caps_new_empty_simple ("video/x-mjpeg-b"); break; - case GST_MAKE_FOURCC ('m', 'j', 'p', '2'): + case FOURCC_mjp2: _codec ("JPEG-2000"); /* override to what it should be according to spec, avoid palette_data */ stream->bits_per_sample = 24; caps = gst_caps_new_simple ("image/x-j2c", "fields", G_TYPE_INT, 1, NULL); break; - case GST_MAKE_FOURCC ('S', 'V', 'Q', '3'): + case FOURCC_SVQ3: _codec ("Sorensen video v.3"); caps = gst_caps_new_simple ("video/x-svq", "svqversion", G_TYPE_INT, 3, NULL); @@ -12053,7 +12197,7 @@ qtdemux_video_caps (GstQTDemux * qtdemux, QtDemuxStream * stream, gst_caps_set_simple (caps, "format", G_TYPE_STRING, "RGB8P", NULL); _codec ("Windows Raw RGB"); break; - case GST_MAKE_FOURCC ('r', 'a', 'w', ' '): + case FOURCC_raw_: { guint16 bps; @@ -12084,7 +12228,7 @@ qtdemux_video_caps (GstQTDemux * qtdemux, QtDemuxStream * stream, case GST_MAKE_FOURCC ('Y', 'u', 'v', '2'): format = GST_VIDEO_FORMAT_I420; break; - case GST_MAKE_FOURCC ('2', 'v', 'u', 'y'): + case FOURCC_2vuy: case GST_MAKE_FOURCC ('2', 'V', 'u', 'y'): format = GST_VIDEO_FORMAT_UYVY; break; @@ -12094,7 +12238,7 @@ qtdemux_video_caps (GstQTDemux * qtdemux, QtDemuxStream * stream, case GST_MAKE_FOURCC ('v', '2', '1', '6'): format = GST_VIDEO_FORMAT_v216; break; - case GST_MAKE_FOURCC ('v', '2', '1', '0'): + case FOURCC_v210: format = GST_VIDEO_FORMAT_v210; break; case GST_MAKE_FOURCC ('r', '2', '1', '0'): @@ -12171,17 +12315,17 @@ qtdemux_video_caps (GstQTDemux * qtdemux, QtDemuxStream * stream, _codec ("GIF still images"); caps = gst_caps_new_empty_simple ("image/gif"); break; - case GST_MAKE_FOURCC ('h', '2', '6', '3'): + case FOURCC_h263: case GST_MAKE_FOURCC ('H', '2', '6', '3'): - case GST_MAKE_FOURCC ('s', '2', '6', '3'): + case FOURCC_s263: case GST_MAKE_FOURCC ('U', '2', '6', '3'): _codec ("H.263"); /* ffmpeg uses the height/width props, don't know why */ caps = gst_caps_new_simple ("video/x-h263", "variant", G_TYPE_STRING, "itu", NULL); break; - case GST_MAKE_FOURCC ('m', 'p', '4', 'v'): - case GST_MAKE_FOURCC ('M', 'P', '4', 'V'): + case FOURCC_mp4v: + case FOURCC_MP4V: _codec ("MPEG-4 video"); caps = gst_caps_new_simple ("video/mpeg", "mpegversion", G_TYPE_INT, 4, "systemstream", G_TYPE_BOOLEAN, FALSE, NULL); @@ -12209,16 +12353,21 @@ qtdemux_video_caps (GstQTDemux * qtdemux, QtDemuxStream * stream, "divxversion", G_TYPE_INT, 5, NULL); break; + case GST_MAKE_FOURCC ('F', 'F', 'V', '1'): + _codec ("FFV1"); + caps = gst_caps_new_simple ("video/x-ffv", + "ffvversion", G_TYPE_INT, 1, NULL); + break; + case GST_MAKE_FOURCC ('3', 'I', 'V', '1'): case GST_MAKE_FOURCC ('3', 'I', 'V', '2'): case GST_MAKE_FOURCC ('X', 'V', 'I', 'D'): case GST_MAKE_FOURCC ('x', 'v', 'i', 'd'): - case GST_MAKE_FOURCC ('F', 'M', 'P', '4'): + case FOURCC_FMP4: case GST_MAKE_FOURCC ('U', 'M', 'P', '4'): caps = gst_caps_new_simple ("video/mpeg", "mpegversion", G_TYPE_INT, 4, NULL); - if (codec_name) - *codec_name = g_strdup ("MPEG-4"); + _codec ("MPEG-4"); break; case GST_MAKE_FOURCC ('c', 'v', 'i', 'd'): @@ -12233,38 +12382,38 @@ qtdemux_video_caps (GstQTDemux * qtdemux, QtDemuxStream * stream, _codec ("Apple video"); caps = gst_caps_new_empty_simple ("video/x-apple-video"); break; - case GST_MAKE_FOURCC ('H', '2', '6', '4'): - case GST_MAKE_FOURCC ('a', 'v', 'c', '1'): + case FOURCC_H264: + case FOURCC_avc1: _codec ("H.264 / AVC"); caps = gst_caps_new_simple ("video/x-h264", "stream-format", G_TYPE_STRING, "avc", "alignment", G_TYPE_STRING, "au", NULL); break; - case GST_MAKE_FOURCC ('a', 'v', 'c', '3'): + case FOURCC_avc3: _codec ("H.264 / AVC"); caps = gst_caps_new_simple ("video/x-h264", "stream-format", G_TYPE_STRING, "avc3", "alignment", G_TYPE_STRING, "au", NULL); break; - case GST_MAKE_FOURCC ('H', '2', '6', '5'): - case GST_MAKE_FOURCC ('h', 'v', 'c', '1'): + case FOURCC_H265: + case FOURCC_hvc1: _codec ("H.265 / HEVC"); caps = gst_caps_new_simple ("video/x-h265", "stream-format", G_TYPE_STRING, "hvc1", "alignment", G_TYPE_STRING, "au", NULL); break; - case GST_MAKE_FOURCC ('h', 'e', 'v', '1'): + case FOURCC_hev1: _codec ("H.265 / HEVC"); caps = gst_caps_new_simple ("video/x-h265", "stream-format", G_TYPE_STRING, "hev1", "alignment", G_TYPE_STRING, "au", NULL); break; - case GST_MAKE_FOURCC ('r', 'l', 'e', ' '): + case FOURCC_rle_: _codec ("Run-length encoding"); caps = gst_caps_new_simple ("video/x-rle", "layout", G_TYPE_STRING, "quicktime", NULL); break; - case GST_MAKE_FOURCC ('W', 'R', 'L', 'E'): + case FOURCC_WRLE: _codec ("Run-length encoding"); caps = gst_caps_new_simple ("video/x-rle", "layout", G_TYPE_STRING, "microsoft", NULL); @@ -12281,8 +12430,8 @@ qtdemux_video_caps (GstQTDemux * qtdemux, QtDemuxStream * stream, caps = gst_caps_new_simple ("video/x-indeo", "indeoversion", G_TYPE_INT, 4, NULL); break; - case GST_MAKE_FOURCC ('d', 'v', 'c', 'p'): - case GST_MAKE_FOURCC ('d', 'v', 'c', ' '): + case FOURCC_dvcp: + case FOURCC_dvc_: case GST_MAKE_FOURCC ('d', 'v', 's', 'd'): case GST_MAKE_FOURCC ('D', 'V', 'S', 'D'): case GST_MAKE_FOURCC ('d', 'v', 'c', 's'): @@ -12293,8 +12442,8 @@ qtdemux_video_caps (GstQTDemux * qtdemux, QtDemuxStream * stream, caps = gst_caps_new_simple ("video/x-dv", "dvversion", G_TYPE_INT, 25, "systemstream", G_TYPE_BOOLEAN, FALSE, NULL); break; - case GST_MAKE_FOURCC ('d', 'v', '5', 'n'): /* DVCPRO50 NTSC */ - case GST_MAKE_FOURCC ('d', 'v', '5', 'p'): /* DVCPRO50 PAL */ + case FOURCC_dv5n: /* DVCPRO50 NTSC */ + case FOURCC_dv5p: /* DVCPRO50 PAL */ _codec ("DVCPro50 Video"); caps = gst_caps_new_simple ("video/x-dv", "dvversion", G_TYPE_INT, 50, "systemstream", G_TYPE_BOOLEAN, FALSE, NULL); @@ -12317,14 +12466,14 @@ qtdemux_video_caps (GstQTDemux * qtdemux, QtDemuxStream * stream, _codec ("VP6 Flash"); caps = gst_caps_new_empty_simple ("video/x-vp6-flash"); break; - case GST_MAKE_FOURCC ('X', 'i', 'T', 'h'): + case FOURCC_XiTh: _codec ("Theora"); caps = gst_caps_new_empty_simple ("video/x-theora"); /* theora uses one byte of padding in the data stream because it does not * allow 0 sized packets while theora does */ stream->padding = 1; break; - case GST_MAKE_FOURCC ('d', 'r', 'a', 'c'): + case FOURCC_drac: _codec ("Dirac"); caps = gst_caps_new_empty_simple ("video/x-dirac"); break; @@ -12340,41 +12489,41 @@ qtdemux_video_caps (GstQTDemux * qtdemux, QtDemuxStream * stream, _codec ("AVID DNxHD"); caps = gst_caps_from_string ("video/x-dnxhd"); break; - case GST_MAKE_FOURCC ('V', 'P', '8', '0'): + case FOURCC_VP80: _codec ("On2 VP8"); caps = gst_caps_from_string ("video/x-vp8"); break; - case GST_MAKE_FOURCC ('a', 'p', 'c', 's'): + case FOURCC_apcs: _codec ("Apple ProRes LT"); caps = gst_caps_new_simple ("video/x-prores", "variant", G_TYPE_STRING, "lt", NULL); break; - case GST_MAKE_FOURCC ('a', 'p', 'c', 'h'): + case FOURCC_apch: _codec ("Apple ProRes HQ"); caps = gst_caps_new_simple ("video/x-prores", "variant", G_TYPE_STRING, "hq", NULL); break; - case GST_MAKE_FOURCC ('a', 'p', 'c', 'n'): + case FOURCC_apcn: _codec ("Apple ProRes"); caps = gst_caps_new_simple ("video/x-prores", "variant", G_TYPE_STRING, "standard", NULL); break; - case GST_MAKE_FOURCC ('a', 'p', 'c', 'o'): + case FOURCC_apco: _codec ("Apple ProRes Proxy"); caps = gst_caps_new_simple ("video/x-prores", "variant", G_TYPE_STRING, "proxy", NULL); break; - case GST_MAKE_FOURCC ('a', 'p', '4', 'h'): + case FOURCC_ap4h: _codec ("Apple ProRes 4444"); caps = gst_caps_new_simple ("video/x-prores", "variant", G_TYPE_STRING, "4444", NULL); break; - case GST_MAKE_FOURCC ('v', 'c', '-', '1'): + case FOURCC_vc_1: case FOURCC_ovc1: _codec ("VC-1"); caps = gst_caps_new_simple ("video/x-wmv", @@ -12388,6 +12537,7 @@ qtdemux_video_caps (GstQTDemux * qtdemux, QtDemuxStream * stream, g_snprintf (fourstr, 5, "%" GST_FOURCC_FORMAT, GST_FOURCC_ARGS (fourcc)); s = g_strdup_printf ("video/x-gst-fourcc-%s", g_strstrip (fourstr)); caps = gst_caps_new_empty_simple (s); + g_free (s); break; } } @@ -12425,15 +12575,15 @@ qtdemux_audio_caps (GstQTDemux * qtdemux, QtDemuxStream * stream, switch (fourcc) { case GST_MAKE_FOURCC ('N', 'O', 'N', 'E'): - case GST_MAKE_FOURCC ('r', 'a', 'w', ' '): + case FOURCC_raw_: /* 8-bit audio is unsigned */ if (depth == 8) format = GST_AUDIO_FORMAT_U8; /* otherwise it's signed and big-endian just like 'twos' */ - case GST_MAKE_FOURCC ('t', 'w', 'o', 's'): + case FOURCC_twos: endian = G_BIG_ENDIAN; /* fall-through */ - case GST_MAKE_FOURCC ('s', 'o', 'w', 't'): + case FOURCC_sowt: { gchar *str; @@ -12478,11 +12628,11 @@ qtdemux_audio_caps (GstQTDemux * qtdemux, QtDemuxStream * stream, "format", G_TYPE_STRING, "S32BE", "layout", G_TYPE_STRING, "interleaved", NULL); break; - case GST_MAKE_FOURCC ('u', 'l', 'a', 'w'): + case FOURCC_ulaw: _codec ("Mu-law audio"); caps = gst_caps_new_empty_simple ("audio/x-mulaw"); break; - case GST_MAKE_FOURCC ('a', 'l', 'a', 'w'): + case FOURCC_alaw: _codec ("A-law audio"); caps = gst_caps_new_empty_simple ("audio/x-alaw"); break; @@ -12509,7 +12659,7 @@ qtdemux_audio_caps (GstQTDemux * qtdemux, QtDemuxStream * stream, case 0x5500736d: case 0x6d730055: /* MPEG layer 3, CBR only (pre QT4.1) */ - case GST_MAKE_FOURCC ('.', 'm', 'p', '3'): + case FOURCC__mp3: _codec ("MPEG-1 layer 3"); /* MPEG layer 3, CBR & VBR (QT4.1 and later) */ caps = gst_caps_new_simple ("audio/mpeg", "layer", G_TYPE_INT, 3, @@ -12523,7 +12673,7 @@ qtdemux_audio_caps (GstQTDemux * qtdemux, QtDemuxStream * stream, stream->sampled = TRUE; break; case GST_MAKE_FOURCC ('s', 'a', 'c', '3'): // Nero Recode - case GST_MAKE_FOURCC ('a', 'c', '-', '3'): + case FOURCC_ac_3: _codec ("AC-3 audio"); caps = gst_caps_new_simple ("audio/x-ac3", "framed", G_TYPE_BOOLEAN, TRUE, NULL); @@ -12543,12 +12693,12 @@ qtdemux_audio_caps (GstQTDemux * qtdemux, QtDemuxStream * stream, "framed", G_TYPE_BOOLEAN, TRUE, NULL); stream->sampled = TRUE; break; - case GST_MAKE_FOURCC ('M', 'A', 'C', '3'): + case FOURCC_MAC3: _codec ("MACE-3"); caps = gst_caps_new_simple ("audio/x-mace", "maceversion", G_TYPE_INT, 3, NULL); break; - case GST_MAKE_FOURCC ('M', 'A', 'C', '6'): + case FOURCC_MAC6: _codec ("MACE-6"); caps = gst_caps_new_simple ("audio/x-mace", "maceversion", G_TYPE_INT, 6, NULL); @@ -12561,7 +12711,7 @@ qtdemux_audio_caps (GstQTDemux * qtdemux, QtDemuxStream * stream, _codec ("DV audio"); caps = gst_caps_new_empty_simple ("audio/x-dv"); break; - case GST_MAKE_FOURCC ('m', 'p', '4', 'a'): + case FOURCC_mp4a: _codec ("MPEG-4 AAC audio"); caps = gst_caps_new_simple ("audio/mpeg", "mpegversion", G_TYPE_INT, 4, "framed", G_TYPE_BOOLEAN, TRUE, @@ -12571,7 +12721,7 @@ qtdemux_audio_caps (GstQTDemux * qtdemux, QtDemuxStream * stream, _codec ("QDesign Music"); caps = gst_caps_new_empty_simple ("audio/x-qdm"); break; - case GST_MAKE_FOURCC ('Q', 'D', 'M', '2'): + case FOURCC_QDM2: _codec ("QDesign Music v.2"); /* FIXME: QDesign music version 2 (no constant) */ if (FALSE && data) { @@ -12583,24 +12733,24 @@ qtdemux_audio_caps (GstQTDemux * qtdemux, QtDemuxStream * stream, caps = gst_caps_new_empty_simple ("audio/x-qdm2"); } break; - case GST_MAKE_FOURCC ('a', 'g', 's', 'm'): + case FOURCC_agsm: _codec ("GSM audio"); caps = gst_caps_new_empty_simple ("audio/x-gsm"); break; - case GST_MAKE_FOURCC ('s', 'a', 'm', 'r'): + case FOURCC_samr: _codec ("AMR audio"); caps = gst_caps_new_empty_simple ("audio/AMR"); break; - case GST_MAKE_FOURCC ('s', 'a', 'w', 'b'): + case FOURCC_sawb: _codec ("AMR-WB audio"); caps = gst_caps_new_empty_simple ("audio/AMR-WB"); break; - case GST_MAKE_FOURCC ('i', 'm', 'a', '4'): + case FOURCC_ima4: _codec ("Quicktime IMA ADPCM"); caps = gst_caps_new_simple ("audio/x-adpcm", "layout", G_TYPE_STRING, "quicktime", NULL); break; - case GST_MAKE_FOURCC ('a', 'l', 'a', 'c'): + case FOURCC_alac: _codec ("Apple lossless audio"); caps = gst_caps_new_empty_simple ("audio/x-alac"); break; @@ -12608,11 +12758,15 @@ qtdemux_audio_caps (GstQTDemux * qtdemux, QtDemuxStream * stream, _codec ("QualComm PureVoice"); caps = gst_caps_from_string ("audio/qcelp"); break; - case GST_MAKE_FOURCC ('w', 'm', 'a', ' '): + case FOURCC_wma_: case FOURCC_owma: _codec ("WMA"); caps = gst_caps_new_empty_simple ("audio/x-wma"); break; + case FOURCC_opus: + _codec ("Opus"); + caps = gst_caps_new_empty_simple ("audio/x-opus"); + break; case GST_MAKE_FOURCC ('l', 'p', 'c', 'm'): { guint32 flags = 0; @@ -12677,6 +12831,7 @@ qtdemux_audio_caps (GstQTDemux * qtdemux, QtDemuxStream * stream, g_snprintf (fourstr, 5, "%" GST_FOURCC_FORMAT, GST_FOURCC_ARGS (fourcc)); s = g_strdup_printf ("audio/x-gst-fourcc-%s", g_strstrip (fourstr)); caps = gst_caps_new_empty_simple (s); + g_free (s); break; } } @@ -12710,15 +12865,15 @@ qtdemux_sub_caps (GstQTDemux * qtdemux, QtDemuxStream * stream, GST_DEBUG_OBJECT (qtdemux, "resolve fourcc 0x%08x", GUINT32_TO_BE (fourcc)); switch (fourcc) { - case GST_MAKE_FOURCC ('m', 'p', '4', 's'): + case FOURCC_mp4s: _codec ("DVD subtitle"); caps = gst_caps_new_empty_simple ("subpicture/x-dvd"); stream->need_process = TRUE; break; - case GST_MAKE_FOURCC ('t', 'e', 'x', 't'): + case FOURCC_text: _codec ("Quicktime timed text"); goto text; - case GST_MAKE_FOURCC ('t', 'x', '3', 'g'): + case FOURCC_tx3g: _codec ("3GPP timed text"); text: caps = gst_caps_new_simple ("text/x-raw", "format", G_TYPE_STRING, @@ -12726,6 +12881,10 @@ qtdemux_sub_caps (GstQTDemux * qtdemux, QtDemuxStream * stream, /* actual text piece needs to be extracted */ stream->need_process = TRUE; break; + case FOURCC_stpp: + _codec ("XML subtitles"); + caps = gst_caps_new_empty_simple ("application/ttml+xml"); + break; default: { char *s, fourstr[5]; @@ -12733,6 +12892,7 @@ qtdemux_sub_caps (GstQTDemux * qtdemux, QtDemuxStream * stream, g_snprintf (fourstr, 5, "%" GST_FOURCC_FORMAT, GST_FOURCC_ARGS (fourcc)); s = g_strdup_printf ("text/x-gst-fourcc-%s", g_strstrip (fourstr)); caps = gst_caps_new_empty_simple (s); + g_free (s); break; } } @@ -12746,7 +12906,7 @@ qtdemux_generic_caps (GstQTDemux * qtdemux, QtDemuxStream * stream, GstCaps *caps; switch (fourcc) { - case GST_MAKE_FOURCC ('m', '1', 'v', ' '): + case FOURCC_m1v: _codec ("MPEG 1 video"); caps = gst_caps_new_simple ("video/mpeg", "mpegversion", G_TYPE_INT, 1, "systemstream", G_TYPE_BOOLEAN, FALSE, NULL); diff --git a/gst/isomp4/qtdemux.h b/gst/isomp4/qtdemux.h index 05cd806466f9bcafecdffce5bd62e2981aa88288..53bd071c3b6f5f8da855e166bdc1ea7447e50177 100644 --- a/gst/isomp4/qtdemux.h +++ b/gst/isomp4/qtdemux.h @@ -121,6 +121,7 @@ struct _GstQTDemux { * newsegment in TIME format which likely * means that upstream is driving the pipeline * (adaptive demuxers / dlna) */ + guint32 offset_seek_seqnum; gint64 seek_offset; gint64 push_seek_start; gint64 push_seek_stop; diff --git a/gst/isomp4/qtdemux_types.c b/gst/isomp4/qtdemux_types.c index 8e8189dea825dc1c103b66da87f09881aee8b944..dc71228e9d4f2424ae50e69683b1e740de71ee0f 100644 --- a/gst/isomp4/qtdemux_types.c +++ b/gst/isomp4/qtdemux_types.c @@ -201,6 +201,7 @@ static const QtNodeType qt_node_types[] = { {FOURCC_schi, "scheme information", QT_FLAG_CONTAINER}, {FOURCC_pssh, "protection system specific header", 0}, {FOURCC_tenc, "track encryption", 0}, + {FOURCC_stpp, "XML subtitle sample entry", 0}, {0, "unknown", 0,}, }; diff --git a/gst/law/Makefile.in b/gst/law/Makefile.in index 04584df3d372fe7f6ae26a230149deac571d06b8..6b1e5d24454e9a5a8877ac0074471af3546f5d2c 100644 --- a/gst/law/Makefile.in +++ b/gst/law/Makefile.in @@ -487,6 +487,8 @@ VALGRIND_PATH = @VALGRIND_PATH@ VERSION = @VERSION@ VPX_130_CFLAGS = @VPX_130_CFLAGS@ VPX_130_LIBS = @VPX_130_LIBS@ +VPX_140_CFLAGS = @VPX_140_CFLAGS@ +VPX_140_LIBS = @VPX_140_LIBS@ VPX_CFLAGS = @VPX_CFLAGS@ VPX_LIBS = @VPX_LIBS@ WARNING_CFLAGS = @WARNING_CFLAGS@ diff --git a/gst/level/Makefile.in b/gst/level/Makefile.in index 3401aeac738789ac041edc392ce2bef985c64a3a..4f4f4cc662b2014c61c99abec29e7d041d8d2684 100644 --- a/gst/level/Makefile.in +++ b/gst/level/Makefile.in @@ -476,6 +476,8 @@ VALGRIND_PATH = @VALGRIND_PATH@ VERSION = @VERSION@ VPX_130_CFLAGS = @VPX_130_CFLAGS@ VPX_130_LIBS = @VPX_130_LIBS@ +VPX_140_CFLAGS = @VPX_140_CFLAGS@ +VPX_140_LIBS = @VPX_140_LIBS@ VPX_CFLAGS = @VPX_CFLAGS@ VPX_LIBS = @VPX_LIBS@ WARNING_CFLAGS = @WARNING_CFLAGS@ diff --git a/gst/matroska/Makefile.in b/gst/matroska/Makefile.in index 38835cac21c58549bb0f39766c6342ac5a9116d0..6ea5d6e7bdce4c321fac9525fcdd1e596e3217ea 100644 --- a/gst/matroska/Makefile.in +++ b/gst/matroska/Makefile.in @@ -485,6 +485,8 @@ VALGRIND_PATH = @VALGRIND_PATH@ VERSION = @VERSION@ VPX_130_CFLAGS = @VPX_130_CFLAGS@ VPX_130_LIBS = @VPX_130_LIBS@ +VPX_140_CFLAGS = @VPX_140_CFLAGS@ +VPX_140_LIBS = @VPX_140_LIBS@ VPX_CFLAGS = @VPX_CFLAGS@ VPX_LIBS = @VPX_LIBS@ WARNING_CFLAGS = @WARNING_CFLAGS@ diff --git a/gst/matroska/ebml-write.c b/gst/matroska/ebml-write.c index d123f2c6243e3824957798104b77a4236ae64d89..08e93bca24ea846c432c688f0f570b10857017e0 100644 --- a/gst/matroska/ebml-write.c +++ b/gst/matroska/ebml-write.c @@ -215,7 +215,8 @@ gst_ebml_writer_send_segment_event (GstEbmlWrite * ebml, guint64 new_pos) GST_INFO ("seeking to %" G_GUINT64_FORMAT, new_pos); - gst_segment_init (&segment, GST_FORMAT_BYTES); + gst_segment_init (&segment, + ebml->streamable ? GST_FORMAT_TIME : GST_FORMAT_BYTES); segment.start = new_pos; segment.stop = -1; segment.position = 0; diff --git a/gst/matroska/ebml-write.h b/gst/matroska/ebml-write.h index 2dbe350f1e1724d234f6c50c979e97c576ee9fe6..c7143fec2ec627814d1aae2796b305b1d4b108ca 100644 --- a/gst/matroska/ebml-write.h +++ b/gst/matroska/ebml-write.h @@ -60,6 +60,8 @@ typedef struct _GstEbmlWrite { guint64 streamheader_pos; GstCaps *caps; + + gboolean streamable; } GstEbmlWrite; typedef struct _GstEbmlWriteClass { diff --git a/gst/matroska/matroska-demux.c b/gst/matroska/matroska-demux.c index 2fb49282ec35cda23eba2c22197c8bb41a42c45b..6c6933b98a370910b64f78de8877290c8d688a95 100644 --- a/gst/matroska/matroska-demux.c +++ b/gst/matroska/matroska-demux.c @@ -940,6 +940,34 @@ gst_matroska_demux_add_stream (GstMatroskaDemux * demux, GstEbmlRead * ebml) break; } + /* codec delay */ + case GST_MATROSKA_ID_CODECDELAY:{ + guint64 num; + + if ((ret = gst_ebml_read_uint (ebml, &id, &num)) != GST_FLOW_OK) + break; + + context->codec_delay = num; + + GST_DEBUG_OBJECT (demux, "CodecDelay: %" GST_TIME_FORMAT, + GST_TIME_ARGS (num)); + break; + } + + /* codec delay */ + case GST_MATROSKA_ID_SEEKPREROLL:{ + guint64 num; + + if ((ret = gst_ebml_read_uint (ebml, &id, &num)) != GST_FLOW_OK) + break; + + context->seek_preroll = num; + + GST_DEBUG_OBJECT (demux, "SeekPreroll: %" GST_TIME_FORMAT, + GST_TIME_ARGS (num)); + break; + } + /* name of this track */ case GST_MATROSKA_ID_TRACKNAME:{ gchar *text; @@ -2943,6 +2971,33 @@ gst_matroska_demux_add_wvpk_header (GstElement * element, return GST_FLOW_OK; } +static GstFlowReturn +gst_matroska_demux_add_prores_header (GstElement * element, + GstMatroskaTrackContext * stream, GstBuffer ** buf) +{ + GstBuffer *newbuf = gst_buffer_new_allocate (NULL, 8, NULL); + GstMapInfo map; + guint32 frame_size; + + if (!gst_buffer_map (newbuf, &map, GST_MAP_WRITE)) { + GST_ERROR ("Failed to map newly allocated buffer"); + return GST_FLOW_ERROR; + } + + frame_size = gst_buffer_get_size (*buf); + + GST_WRITE_UINT32_BE (map.data, frame_size); + map.data[4] = 'i'; + map.data[5] = 'c'; + map.data[6] = 'p'; + map.data[7] = 'f'; + + gst_buffer_unmap (newbuf, &map); + *buf = gst_buffer_append (newbuf, *buf); + + return GST_FLOW_OK; +} + /* @text must be null-terminated */ static gboolean gst_matroska_demux_subtitle_chunk_has_tag (GstElement * element, @@ -3162,6 +3217,7 @@ gst_matroska_demux_parse_blockgroup_or_simpleblock (GstMatroskaDemux * demux, gboolean readblock = FALSE; guint32 id; guint64 block_duration = -1; + gint64 block_discardpadding = 0; GstBuffer *buf = NULL; GstMapInfo map; gint stream_num = -1, n, laces = 0; @@ -3326,6 +3382,13 @@ gst_matroska_demux_parse_blockgroup_or_simpleblock (GstMatroskaDemux * demux, break; } + case GST_MATROSKA_ID_DISCARDPADDING:{ + ret = gst_ebml_read_sint (ebml, &id, &block_discardpadding); + GST_DEBUG_OBJECT (demux, "DiscardPadding: %" GST_STIME_FORMAT, + GST_STIME_ARGS (block_discardpadding)); + break; + } + case GST_MATROSKA_ID_REFERENCEBLOCK:{ ret = gst_ebml_read_sint (ebml, &id, &referenceblock); GST_DEBUG_OBJECT (demux, "ReferenceBlock: %" G_GINT64_FORMAT, @@ -3505,7 +3568,8 @@ gst_matroska_demux_parse_blockgroup_or_simpleblock (GstMatroskaDemux * demux, GST_OBJECT_LOCK (demux); earliest_time = videocontext->earliest_time; GST_OBJECT_UNLOCK (demux); - earliest_stream_time = gst_segment_to_position (&demux->common.segment, + earliest_stream_time = + gst_segment_position_from_running_time (&demux->common.segment, GST_FORMAT_TIME, earliest_time); if (GST_CLOCK_TIME_IS_VALID (lace_time) && @@ -3550,8 +3614,6 @@ gst_matroska_demux_parse_blockgroup_or_simpleblock (GstMatroskaDemux * demux, goto next_lace; } - buffer_timestamp = gst_matroska_track_get_buffer_timestamp (stream, sub); - if (!stream->dts_only) { GST_BUFFER_PTS (sub) = lace_time; } else { @@ -3560,6 +3622,8 @@ gst_matroska_demux_parse_blockgroup_or_simpleblock (GstMatroskaDemux * demux, GST_BUFFER_PTS (sub) = lace_time; } + buffer_timestamp = gst_matroska_track_get_buffer_timestamp (stream, sub); + if (GST_CLOCK_TIME_IS_VALID (lace_time)) { GstClockTime last_stop_end; @@ -3702,6 +3766,40 @@ gst_matroska_demux_parse_blockgroup_or_simpleblock (GstMatroskaDemux * demux, Therefore, create an aligned copy if necessary. */ sub = gst_matroska_demux_align_buffer (demux, sub, stream->alignment); + if (!strcmp (stream->codec_id, GST_MATROSKA_CODEC_ID_AUDIO_OPUS)) { + guint64 start_clip = 0, end_clip = 0; + + /* Codec delay is part of the timestamps */ + if (GST_BUFFER_PTS_IS_VALID (sub) && stream->codec_delay) { + if (GST_BUFFER_PTS (sub) > stream->codec_delay) { + GST_BUFFER_PTS (sub) -= stream->codec_delay; + } else { + GST_BUFFER_PTS (sub) = 0; + start_clip = + gst_util_uint64_scale_round (stream->codec_delay, 48000, + GST_SECOND); + + if (GST_BUFFER_DURATION_IS_VALID (sub)) { + if (GST_BUFFER_DURATION (sub) > stream->codec_delay) + GST_BUFFER_DURATION (sub) -= stream->codec_delay; + else + GST_BUFFER_DURATION (sub) = 0; + } + } + } + + if (block_discardpadding) { + end_clip = + gst_util_uint64_scale_round (block_discardpadding, 48000, + GST_SECOND); + } + + if (start_clip || end_clip) { + gst_buffer_add_audio_clipping_meta (sub, GST_FORMAT_DEFAULT, + start_clip, end_clip); + } + } + if (GST_BUFFER_PTS_IS_VALID (sub)) { stream->pos = GST_BUFFER_PTS (sub); if (GST_BUFFER_DURATION_IS_VALID (sub)) @@ -5157,6 +5255,48 @@ gst_matroska_demux_video_caps (GstMatroskaTrackVideoContext * } else if (!strcmp (codec_id, GST_MATROSKA_CODEC_ID_VIDEO_VP9)) { caps = gst_caps_new_empty_simple ("video/x-vp9"); *codec_name = g_strdup_printf ("On2 VP9"); + } else if (!strcmp (codec_id, GST_MATROSKA_CODEC_ID_VIDEO_PRORES)) { + guint32 fourcc; + const gchar *variant, *variant_descr = ""; + + /* Expect a fourcc in the codec private data */ + if (size < 4) { + GST_WARNING ("Too small PRORESS fourcc (%d bytes)", size); + return NULL; + } + + fourcc = GST_STR_FOURCC (data); + switch (fourcc) { + case GST_MAKE_FOURCC ('a', 'p', 'c', 's'): + variant_descr = " 4:2:2 LT"; + variant = "lt"; + break; + case GST_MAKE_FOURCC ('a', 'p', 'c', 'h'): + variant = "hq"; + variant_descr = " 4:2:2 HQ"; + break; + case GST_MAKE_FOURCC ('a', 'p', '4', 'h'): + variant = "4444"; + variant_descr = " 4:4:4:4"; + break; + case GST_MAKE_FOURCC ('a', 'p', 'c', 'o'): + variant = "proxy"; + variant_descr = " 4:2:2 Proxy"; + break; + case GST_MAKE_FOURCC ('a', 'p', 'c', 'n'): + default: + variant = "standard"; + variant_descr = " 4:2:2 SD"; + break; + } + + GST_LOG ("Prores video, codec fourcc %" GST_FOURCC_FORMAT, + GST_FOURCC_ARGS (fourcc)); + + caps = gst_caps_new_simple ("video/x-prores", + "format", G_TYPE_STRING, variant, NULL); + *codec_name = g_strdup_printf ("Apple ProRes%s", variant_descr); + context->postprocess_frame = gst_matroska_demux_add_prores_header; } else { GST_WARNING ("Unknown codec '%s', cannot build Caps", codec_id); return NULL; @@ -5377,7 +5517,9 @@ gst_matroska_demux_audio_caps (GstMatroskaTrackAudioContext * /* FIXME: Channel mask and reordering */ caps = gst_caps_new_simple ("audio/x-raw", "format", G_TYPE_STRING, gst_audio_format_to_string (format), - "layout", G_TYPE_STRING, "interleaved", NULL); + "layout", G_TYPE_STRING, "interleaved", + "channel-mask", GST_TYPE_BITMASK, + gst_audio_channel_get_fallback_mask (audiocontext->channels), NULL); *codec_name = g_strdup_printf ("Raw %d-bit PCM audio", audiocontext->bitdepth); @@ -5392,7 +5534,9 @@ gst_matroska_demux_audio_caps (GstMatroskaTrackAudioContext * /* FIXME: Channel mask and reordering */ caps = gst_caps_new_simple ("audio/x-raw", "format", G_TYPE_STRING, format, - "layout", G_TYPE_STRING, "interleaved", NULL); + "layout", G_TYPE_STRING, "interleaved", + "channel-mask", GST_TYPE_BITMASK, + gst_audio_channel_get_fallback_mask (audiocontext->channels), NULL); *codec_name = g_strdup_printf ("Raw %d-bit floating-point audio", audiocontext->bitdepth); context->alignment = audiocontext->bitdepth / 8; @@ -5436,20 +5580,28 @@ gst_matroska_demux_audio_caps (GstMatroskaTrackAudioContext * /* FIXME: mark stream as broken and skip if there are no stream headers */ context->send_stream_headers = TRUE; } else if (!strcmp (codec_id, GST_MATROSKA_CODEC_ID_AUDIO_OPUS)) { - caps = gst_caps_new_empty_simple ("audio/x-opus"); - *codec_name = g_strdup ("Opus"); - context->stream_headers = - gst_matroska_parse_opus_stream_headers (context->codec_priv, - context->codec_priv_size); - if (context->stream_headers) { - /* There was a valid header. Multistream headers are more than - * 19 bytes, as they include an extra channel mapping table. */ - gboolean multistream = (context->codec_priv_size > 19); - gst_caps_set_simple (caps, "multistream", G_TYPE_BOOLEAN, multistream, - NULL); + GstBuffer *tmp; + + if (context->codec_priv_size >= 19) { + if (audiocontext->samplerate) + GST_WRITE_UINT32_LE ((guint8 *) context->codec_priv + 12, + audiocontext->samplerate); + if (context->codec_delay) { + guint64 delay = + gst_util_uint64_scale_round (context->codec_delay, 48000, + GST_SECOND); + GST_WRITE_UINT16_LE ((guint8 *) context->codec_priv + 10, delay); + } + + tmp = + gst_buffer_new_wrapped (g_memdup (context->codec_priv, + context->codec_priv_size), context->codec_priv_size); + caps = gst_codec_utils_opus_create_caps_from_header (tmp, NULL); + gst_buffer_unref (tmp); + *codec_name = g_strdup ("Opus"); + } else { + GST_WARNING ("Invalid Opus codec data size"); } - /* FIXME: mark stream as broken and skip if there are no stream headers */ - context->send_stream_headers = TRUE; } else if (!strcmp (codec_id, GST_MATROSKA_CODEC_ID_AUDIO_ACM)) { gst_riff_strf_auds auds; diff --git a/gst/matroska/matroska-ids.c b/gst/matroska/matroska-ids.c index 273d4e1e2ffb469bda8f02437311628067b0b9e9..74b4147f8770e1894f172bb917a2519cbe666c41 100644 --- a/gst/matroska/matroska-ids.c +++ b/gst/matroska/matroska-ids.c @@ -305,10 +305,7 @@ gst_matroska_track_get_buffer_timestamp (GstMatroskaTrackContext * track, GstBuffer * buf) { if (track->dts_only) { - if (GST_BUFFER_DTS_IS_VALID (buf)) - return GST_BUFFER_DTS (buf); - else - return GST_BUFFER_PTS (buf); + return GST_BUFFER_DTS_OR_PTS (buf); } else { return GST_BUFFER_PTS (buf); } diff --git a/gst/matroska/matroska-ids.h b/gst/matroska/matroska-ids.h index 661a4a1b0f3323b4117cdf424e67d3e1ace74d0c..c4419c29113ff97134496ecf2279cbc3cf7df360 100644 --- a/gst/matroska/matroska-ids.h +++ b/gst/matroska/matroska-ids.h @@ -109,6 +109,8 @@ #define GST_MATROSKA_ID_CODECDOWNLOADURL 0x26B240 /* semi-draft */ #define GST_MATROSKA_ID_CODECDECODEALL 0xAA +#define GST_MATROSKA_ID_SEEKPREROLL 0x56BB +#define GST_MATROSKA_ID_CODECDELAY 0x56AA /* IDs in the TrackTranslate master */ #define GST_MATROSKA_ID_TRACKTRANSLATEEDITIONUID 0x66FC @@ -249,6 +251,7 @@ /* semi-draft */ #define GST_MATROSKA_ID_CODECSTATE 0xA4 #define GST_MATROSKA_ID_SLICES 0x8E +#define GST_MATROSKA_ID_DISCARDPADDING 0x75A2 /* IDs in the BlockAdditions master */ #define GST_MATROSKA_ID_BLOCKMORE 0xA6 @@ -348,6 +351,7 @@ #define GST_MATROSKA_CODEC_ID_VIDEO_VP8 "V_VP8" #define GST_MATROSKA_CODEC_ID_VIDEO_VP9 "V_VP9" #define GST_MATROSKA_CODEC_ID_VIDEO_MPEGH_HEVC "V_MPEGH/ISO/HEVC" +#define GST_MATROSKA_CODEC_ID_VIDEO_PRORES "V_PRORES" #define GST_MATROSKA_CODEC_ID_AUDIO_MPEG1_L1 "A_MPEG/L1" #define GST_MATROSKA_CODEC_ID_AUDIO_MPEG1_L2 "A_MPEG/L2" @@ -530,6 +534,8 @@ struct _GstMatroskaTrackContext { guint64 default_duration; guint64 pos; gdouble timecodescale; + guint64 seek_preroll; + guint64 codec_delay; gboolean set_discont; /* TRUE = set DISCONT flag on next buffer */ diff --git a/gst/matroska/matroska-mux.c b/gst/matroska/matroska-mux.c index 622f85a5f55da264a5cfdbd12ece42e80962b310..399ba4e7ec2b89dd6ec7e7cacefe19628390bb4f 100644 --- a/gst/matroska/matroska-mux.c +++ b/gst/matroska/matroska-mux.c @@ -125,9 +125,13 @@ static GstStaticPadTemplate videosink_templ = COMMON_VIDEO_CAPS "; " "video/x-vp8, " COMMON_VIDEO_CAPS "; " + "video/x-vp9, " + COMMON_VIDEO_CAPS "; " "video/x-raw, " "format = (string) { YUY2, I420, YV12, UYVY, AYUV, GRAY8, BGR, RGB }, " COMMON_VIDEO_CAPS "; " + "video/x-prores, " + COMMON_VIDEO_CAPS "; " "video/x-wmv, " "wmvversion = (int) [ 1, 3 ], " COMMON_VIDEO_CAPS) ); @@ -456,7 +460,7 @@ gst_matroska_mux_init (GstMatroskaMux * mux, gpointer g_class) mux->doctype_version = DEFAULT_DOCTYPE_VERSION; mux->writing_app = g_strdup (DEFAULT_WRITING_APP); mux->min_index_interval = DEFAULT_MIN_INDEX_INTERVAL; - mux->streamable = DEFAULT_STREAMABLE; + mux->ebml_write->streamable = DEFAULT_STREAMABLE; /* initialize internal variables */ mux->index = NULL; @@ -488,8 +492,7 @@ gst_matroska_mux_finalize (GObject * object) gst_object_unref (mux->collect); gst_object_unref (mux->ebml_write); - if (mux->writing_app) - g_free (mux->writing_app); + g_free (mux->writing_app); g_array_free (mux->used_uids, TRUE); @@ -906,8 +909,7 @@ gst_matroska_mux_set_codec_id (GstMatroskaTrackContext * context, const char *id) { g_assert (context && id); - if (context->codec_id) - g_free (context->codec_id); + g_free (context->codec_id); context->codec_id = g_strdup (id); } @@ -1249,6 +1251,30 @@ skip_details: context->codec_priv = priv_data; context->codec_priv_size = priv_data_size; } + } else if (strcmp (mimetype, "video/x-prores") == 0) { + const gchar *variant; + + gst_matroska_mux_free_codec_priv (context); + + variant = gst_structure_get_string (structure, "format"); + if (!variant || !g_strcmp0 (variant, "standard")) + context->codec_priv = g_strdup ("apcn"); + else if (!g_strcmp0 (variant, "hq")) + context->codec_priv = g_strdup ("apch"); + else if (!g_strcmp0 (variant, "lt")) + context->codec_priv = g_strdup ("apcs"); + else if (!g_strcmp0 (variant, "proxy")) + context->codec_priv = g_strdup ("apco"); + else if (!g_strcmp0 (variant, "4444")) + context->codec_priv = g_strdup ("ap4h"); + else { + GST_WARNING_OBJECT (mux, "Unhandled prores format: %s", variant); + + goto refuse_caps; + } + + context->codec_priv_size = sizeof (guint32); + gst_matroska_mux_set_codec_id (context, GST_MATROSKA_CODEC_ID_VIDEO_PRORES); } return TRUE; @@ -1616,12 +1642,11 @@ opus_streamheader_to_codecdata (const GValue * streamheader, goto wrong_type; bufarr = g_value_peek_pointer (streamheader); - if (bufarr->len <= 0 || bufarr->len > 255) /* one header, and count stored in a byte */ - goto wrong_count; - if (bufarr->len != 1 && bufarr->len != 2) + if (bufarr->len != 1 && bufarr->len != 2) /* one header, and count stored in a byte */ goto wrong_count; - context->xiph_headers_to_skip = bufarr->len; + /* Opus headers are not in-band */ + context->xiph_headers_to_skip = 0; bufval = &g_array_index (bufarr, GValue, 0); if (G_VALUE_TYPE (bufval) != GST_TYPE_BUFFER) { @@ -1635,6 +1660,12 @@ opus_streamheader_to_codecdata (const GValue * streamheader, context->codec_priv = g_malloc0 (context->codec_priv_size); gst_buffer_extract (buf, 0, context->codec_priv, -1); + context->codec_delay = + GST_READ_UINT16_LE ((guint8 *) context->codec_priv + 10); + context->codec_delay = + gst_util_uint64_scale_round (context->codec_delay, GST_SECOND, 48000); + context->seek_preroll = 80 * GST_MSECOND; + return TRUE; /* ERRORS */ @@ -2509,6 +2540,7 @@ gst_matroska_mux_track_header (GstMatroskaMux * mux, gst_ebml_write_uint (ebml, GST_MATROSKA_ID_AUDIOBITDEPTH, audiocontext->bitdepth); } + gst_ebml_write_master_finish (ebml, master); break; @@ -2526,6 +2558,16 @@ gst_matroska_mux_track_header (GstMatroskaMux * mux, if (context->codec_priv) gst_ebml_write_binary (ebml, GST_MATROSKA_ID_CODECPRIVATE, context->codec_priv, context->codec_priv_size); + + if (context->seek_preroll) { + gst_ebml_write_uint (ebml, GST_MATROSKA_ID_SEEKPREROLL, + context->seek_preroll); + } + + if (context->codec_delay) { + gst_ebml_write_uint (ebml, GST_MATROSKA_ID_CODECDELAY, + context->codec_delay); + } } #if 0 @@ -2668,7 +2710,7 @@ gst_matroska_mux_start (GstMatroskaMux * mux) #endif /* if not streaming, check if downstream is seekable */ - if (!mux->streamable) { + if (!mux->ebml_write->streamable) { gboolean seekable; GstQuery *query; @@ -2682,7 +2724,7 @@ gst_matroska_mux_start (GstMatroskaMux * mux) seekable = FALSE; } if (!seekable) { - mux->streamable = TRUE; + mux->ebml_write->streamable = TRUE; g_object_notify (G_OBJECT (mux), "streamable"); GST_WARNING_OBJECT (mux, "downstream is not seekable, but " "streamable=false. Will ignore that and create streamable output " @@ -2718,7 +2760,7 @@ gst_matroska_mux_start (GstMatroskaMux * mux) gst_ebml_write_master_start (ebml, GST_MATROSKA_ID_SEGMENT); mux->segment_master = ebml->pos; - if (!mux->streamable) { + if (!mux->ebml_write->streamable) { /* seekhead (table of contents) - we set the positions later */ mux->seekhead_pos = ebml->pos; master = gst_ebml_write_master_start (ebml, GST_MATROSKA_ID_SEEKHEAD); @@ -2731,7 +2773,7 @@ gst_matroska_mux_start (GstMatroskaMux * mux) gst_ebml_write_master_finish (ebml, master); } - if (mux->streamable) { + if (mux->ebml_write->streamable) { const GstTagList *tags; gboolean has_main_tags; @@ -2772,7 +2814,7 @@ gst_matroska_mux_start (GstMatroskaMux * mux) gst_ebml_write_uint (ebml, GST_MATROSKA_ID_TIMECODESCALE, mux->time_scale); mux->duration_pos = ebml->pos; /* get duration */ - if (!mux->streamable) { + if (!mux->ebml_write->streamable) { for (collected = mux->collect->data; collected; collected = g_slist_next (collected)) { GstMatroskaPad *collect_pad; @@ -2836,7 +2878,7 @@ gst_matroska_mux_start (GstMatroskaMux * mux) #if 0 /* chapters */ toc = gst_toc_setter_get_toc (GST_TOC_SETTER (mux)); - if (toc != NULL && !mux->streamable) { + if (toc != NULL && !mux->ebml_write->streamable) { guint64 master_chapters = 0; GstTocEntry *toc_entry; GList *cur, *to_write = NULL; @@ -3427,12 +3469,13 @@ gst_matroska_mux_write_data (GstMatroskaMux * mux, GstMatroskaPad * collect_pad, gboolean write_duration; gint16 relative_timestamp; gint64 relative_timestamp64; - guint64 block_duration; + guint64 block_duration, duration_diff = 0; gboolean is_video_keyframe = FALSE; gboolean is_video_invisible = FALSE; GstMatroskamuxPad *pad; gint flags = 0; GstClockTime buffer_timestamp; + GstAudioClippingMeta *cmeta = NULL; /* write data */ pad = GST_MATROSKAMUX_PAD_CAST (collect_pad->collect.pad); @@ -3452,6 +3495,11 @@ gst_matroska_mux_write_data (GstMatroskaMux * mux, GstMatroskaPad * collect_pad, buf = gst_matroska_mux_handle_dirac_packet (mux, collect_pad, buf); if (!buf) return GST_FLOW_OK; + } else if (strcmp (collect_pad->track->codec_id, + GST_MATROSKA_CODEC_ID_VIDEO_PRORES) == 0) { + /* Remove the 'Frame container atom' header' */ + buf = gst_buffer_make_writable (buf); + gst_buffer_resize (buf, 8, gst_buffer_get_size (buf) - 8); } buffer_timestamp = @@ -3468,6 +3516,17 @@ gst_matroska_mux_write_data (GstMatroskaMux * mux, GstMatroskaPad * collect_pad, return GST_FLOW_OK; } + if (!strcmp (collect_pad->track->codec_id, GST_MATROSKA_CODEC_ID_AUDIO_OPUS) + && collect_pad->track->codec_delay) { + /* All timestamps should include the codec delay */ + if (buffer_timestamp > collect_pad->track->codec_delay) { + buffer_timestamp += collect_pad->track->codec_delay; + } else { + buffer_timestamp = 0; + duration_diff = collect_pad->track->codec_delay - buffer_timestamp; + } + } + /* set the timestamp for outgoing buffers */ ebml->timestamp = buffer_timestamp; @@ -3493,7 +3552,7 @@ gst_matroska_mux_write_data (GstMatroskaMux * mux, GstMatroskaPad * collect_pad, if (mux->cluster_time + mux->max_cluster_duration < buffer_timestamp || is_video_keyframe || mux->force_key_unit_event) { - if (!mux->streamable) + if (!mux->ebml_write->streamable) gst_ebml_write_master_finish (ebml, mux->cluster); /* Forward the GstForceKeyUnit event after finishing the cluster */ @@ -3536,7 +3595,7 @@ gst_matroska_mux_write_data (GstMatroskaMux * mux, GstMatroskaPad * collect_pad, * the block in the cluster which contains the timestamp, should also work * for files with multiple audio tracks. */ - if (!mux->streamable && + if (!mux->ebml_write->streamable && (is_video_keyframe || ((collect_pad->track->type == GST_MATROSKA_TRACK_TYPE_AUDIO) && (mux->num_streams == 1)))) { @@ -3570,8 +3629,8 @@ gst_matroska_mux_write_data (GstMatroskaMux * mux, GstMatroskaPad * collect_pad, write_duration = FALSE; block_duration = 0; if (pad->frame_duration && GST_BUFFER_DURATION_IS_VALID (buf)) { - block_duration = gst_util_uint64_scale (GST_BUFFER_DURATION (buf), - 1, mux->time_scale); + block_duration = GST_BUFFER_DURATION (buf) + duration_diff; + block_duration = gst_util_uint64_scale (block_duration, 1, mux->time_scale); /* small difference should be ok. */ if (block_duration > collect_pad->default_duration_scaled + 1 || @@ -3600,7 +3659,16 @@ gst_matroska_mux_write_data (GstMatroskaMux * mux, GstMatroskaPad * collect_pad, if (is_video_invisible) flags |= 0x08; - if (mux->doctype_version > 1 && !write_duration) { + if (!strcmp (collect_pad->track->codec_id, GST_MATROSKA_CODEC_ID_AUDIO_OPUS)) { + cmeta = gst_buffer_get_audio_clipping_meta (buf); + g_assert (!cmeta || cmeta->format == GST_FORMAT_DEFAULT); + + /* Start clipping is done via header and CodecDelay */ + if (cmeta && !cmeta->end) + cmeta = NULL; + } + + if (mux->doctype_version > 1 && !write_duration && !cmeta) { if (is_video_keyframe) flags |= 0x80; @@ -3625,6 +3693,17 @@ gst_matroska_mux_write_data (GstMatroskaMux * mux, GstMatroskaPad * collect_pad, relative_timestamp, flags); if (write_duration) gst_ebml_write_uint (ebml, GST_MATROSKA_ID_BLOCKDURATION, block_duration); + + if (!strcmp (collect_pad->track->codec_id, GST_MATROSKA_CODEC_ID_AUDIO_OPUS) + && cmeta) { + /* Start clipping is done via header and CodecDelay */ + if (cmeta->end) { + guint64 end = + gst_util_uint64_scale_round (cmeta->end, GST_SECOND, 48000); + gst_ebml_write_sint (ebml, GST_MATROSKA_ID_DISCARDPADDING, end); + } + } + gst_ebml_write_buffer_header (ebml, GST_MATROSKA_ID_BLOCK, gst_buffer_get_size (buf) + gst_buffer_get_size (hdr)); gst_ebml_write_buffer (ebml, hdr); @@ -3677,7 +3756,7 @@ gst_matroska_mux_handle_buffer (GstCollectPads * pads, GstCollectData * data, /* if there is no best pad, we have reached EOS */ if (best == NULL) { GST_DEBUG_OBJECT (mux, "No best pad. Finishing..."); - if (!mux->streamable) { + if (!mux->ebml_write->streamable) { gst_matroska_mux_finish (mux); } else { GST_DEBUG_OBJECT (mux, "... but streamable, nothing to finish"); @@ -3796,7 +3875,7 @@ gst_matroska_mux_set_property (GObject * object, mux->min_index_interval = g_value_get_int64 (value); break; case PROP_STREAMABLE: - mux->streamable = g_value_get_boolean (value); + mux->ebml_write->streamable = g_value_get_boolean (value); break; default: G_OBJECT_WARN_INVALID_PROPERTY_ID (object, prop_id, pspec); @@ -3824,7 +3903,7 @@ gst_matroska_mux_get_property (GObject * object, g_value_set_int64 (value, mux->min_index_interval); break; case PROP_STREAMABLE: - g_value_set_boolean (value, mux->streamable); + g_value_set_boolean (value, mux->ebml_write->streamable); break; default: G_OBJECT_WARN_INVALID_PROPERTY_ID (object, prop_id, pspec); diff --git a/gst/matroska/matroska-mux.h b/gst/matroska/matroska-mux.h index dab82e098d251236012440a3df93ba905026a359..c38941625d572416272f38557c2c8e4049e0edc9 100644 --- a/gst/matroska/matroska-mux.h +++ b/gst/matroska/matroska-mux.h @@ -104,7 +104,6 @@ struct _GstMatroskaMux { GstMatroskaIndex *index; guint num_indexes; GstClockTimeDiff min_index_interval; - gboolean streamable; /* timescale in the file */ guint64 time_scale; diff --git a/gst/matroska/matroska-parse.c b/gst/matroska/matroska-parse.c index 2735b39f65d45d762a015f1ef82d5e1814136ba3..9bc5ce144372bdedae05639f8c7a744b0bda7f37 100644 --- a/gst/matroska/matroska-parse.c +++ b/gst/matroska/matroska-parse.c @@ -1839,7 +1839,8 @@ gst_matroska_parse_parse_blockgroup_or_simpleblock (GstMatroskaParse * parse, GST_OBJECT_LOCK (parse); earliest_time = videocontext->earliest_time; GST_OBJECT_UNLOCK (parse); - earliest_stream_time = gst_segment_to_position (&parse->common.segment, + earliest_stream_time = + gst_segment_position_from_running_time (&parse->common.segment, GST_FORMAT_TIME, earliest_time); if (GST_CLOCK_TIME_IS_VALID (lace_time) && diff --git a/gst/matroska/matroska-read-common.c b/gst/matroska/matroska-read-common.c index 537fed98c8bd2d8ef5b09c2c9a0ebc1a87b04ee5..691d4629a636d29de6b29d064d90cb1d36638230 100644 --- a/gst/matroska/matroska-read-common.c +++ b/gst/matroska/matroska-read-common.c @@ -815,8 +815,7 @@ gst_matroska_read_common_parse_metadata_targets (GstMatroskaReadCommon * common, case GST_MATROSKA_ID_TARGETTYPE: if ((ret = gst_ebml_read_ascii (ebml, &id, &str)) == GST_FLOW_OK) { - if (*target_type != NULL) - g_free (*target_type); + g_free (*target_type); *target_type = str; } break; @@ -1258,8 +1257,7 @@ gst_matroska_read_common_parse_header (GstMatroskaReadCommon * common, GST_DEBUG_OBJECT (common->sinkpad, "EbmlDocType: %s", GST_STR_NULL (text)); - if (doctype) - g_free (doctype); + g_free (doctype); doctype = text; break; } diff --git a/gst/matroska/webm-mux.c b/gst/matroska/webm-mux.c index 0ba330fd419e21f0f9bf3625dee34f1e3cae2615..508f095eb4cf442ce9f75d943c3f6ef7b62ac2b2 100644 --- a/gst/matroska/webm-mux.c +++ b/gst/matroska/webm-mux.c @@ -25,13 +25,13 @@ * <refsect2> * <title>Example launch line</title> * |[ - * gst-launch-0.10 webmmux name=mux ! filesink location=newfile.webm \ + * gst-launch-1.0 webmmux name=mux ! filesink location=newfile.webm \ * uridecodebin uri=file:///path/to/somefile.ogv name=demux \ * demux. ! videoconvert ! vp8enc ! queue ! mux.video_0 \ * demux. ! progressreport ! audioconvert ! audiorate ! vorbisenc ! queue ! mux.audio_0 * ]| This pipeline re-encodes a video file of any format into a WebM file. * |[ - * gst-launch-0.10 webmmux name=mux ! filesink location=test.webm \ + * gst-launch-1.0 webmmux name=mux ! filesink location=test.webm \ * videotestsrc num-buffers=250 ! video/x-raw,framerate=25/1 ! videoconvert ! vp8enc ! queue ! mux.video_0 \ * audiotestsrc samplesperbuffer=44100 num-buffers=10 ! audio/x-raw,rate=44100 ! vorbisenc ! queue ! mux.audio_0 * ]| This pipeline muxes a test video and a sine wave into a WebM file. @@ -70,10 +70,11 @@ static GstStaticPadTemplate webm_videosink_templ = ); static GstStaticPadTemplate webm_audiosink_templ = -GST_STATIC_PAD_TEMPLATE ("audio_%u", + GST_STATIC_PAD_TEMPLATE ("audio_%u", GST_PAD_SINK, GST_PAD_REQUEST, - GST_STATIC_CAPS ("audio/x-vorbis, " COMMON_AUDIO_CAPS) + GST_STATIC_CAPS ("audio/x-vorbis, " COMMON_AUDIO_CAPS ";" + "audio/x-opus, " COMMON_AUDIO_CAPS) ); static void diff --git a/gst/monoscope/Makefile.in b/gst/monoscope/Makefile.in index b5cc9ba84bca878a49ff5995583b5d4abb294a8b..275bfce403171a050c9c5c1b15ff4481af45ad68 100644 --- a/gst/monoscope/Makefile.in +++ b/gst/monoscope/Makefile.in @@ -477,6 +477,8 @@ VALGRIND_PATH = @VALGRIND_PATH@ VERSION = @VERSION@ VPX_130_CFLAGS = @VPX_130_CFLAGS@ VPX_130_LIBS = @VPX_130_LIBS@ +VPX_140_CFLAGS = @VPX_140_CFLAGS@ +VPX_140_LIBS = @VPX_140_LIBS@ VPX_CFLAGS = @VPX_CFLAGS@ VPX_LIBS = @VPX_LIBS@ WARNING_CFLAGS = @WARNING_CFLAGS@ diff --git a/gst/multifile/Makefile.in b/gst/multifile/Makefile.in index 7b402b7d6b4495a20dcbb81eba1c2edd4d31b3f5..febe0e3f6c7fec5e24709dcb7ea5ac4cb1d45baa 100644 --- a/gst/multifile/Makefile.in +++ b/gst/multifile/Makefile.in @@ -506,6 +506,8 @@ VALGRIND_PATH = @VALGRIND_PATH@ VERSION = @VERSION@ VPX_130_CFLAGS = @VPX_130_CFLAGS@ VPX_130_LIBS = @VPX_130_LIBS@ +VPX_140_CFLAGS = @VPX_140_CFLAGS@ +VPX_140_LIBS = @VPX_140_LIBS@ VPX_CFLAGS = @VPX_CFLAGS@ VPX_LIBS = @VPX_LIBS@ WARNING_CFLAGS = @WARNING_CFLAGS@ diff --git a/gst/multifile/gstmultifilesink.c b/gst/multifile/gstmultifilesink.c index ebc22c265cc33456d5ce35f1f6a3e9d4f1c8f168..c74c20bdda14cc4d18968c9a81dcec82fc421d66 100644 --- a/gst/multifile/gstmultifilesink.c +++ b/gst/multifile/gstmultifilesink.c @@ -180,7 +180,7 @@ static gboolean gst_multi_file_sink_event (GstBaseSink * sink, static GType gst_multi_file_sink_next_get_type (void) { - static GType multi_file_sync_next_type = 0; + static GType multi_file_sink_next_type = 0; static const GEnumValue next_types[] = { {GST_MULTI_FILE_SINK_NEXT_BUFFER, "New file for each buffer", "buffer"}, {GST_MULTI_FILE_SINK_NEXT_DISCONT, "New file after each discontinuity", @@ -199,12 +199,12 @@ gst_multi_file_sink_next_get_type (void) {0, NULL, NULL} }; - if (!multi_file_sync_next_type) { - multi_file_sync_next_type = + if (!multi_file_sink_next_type) { + multi_file_sink_next_type = g_enum_register_static ("GstMultiFileSinkNext", next_types); } - return multi_file_sync_next_type; + return multi_file_sink_next_type; } #define gst_multi_file_sink_parent_class parent_class diff --git a/gst/multifile/gstsplitmuxsink.c b/gst/multifile/gstsplitmuxsink.c index aef9e64a39f78c8c6a9ee6293d8a6344f20a08e3..d39c0381d0bce15bff6eb41dc2a54eb4f5992cea 100644 --- a/gst/multifile/gstsplitmuxsink.c +++ b/gst/multifile/gstsplitmuxsink.c @@ -1027,8 +1027,6 @@ handle_mq_input (GstPad * pad, GstPadProbeInfo * info, MqStreamCtx * ctx) } buf = gst_pad_probe_info_get_buffer (info); - ctx->in_running_time = gst_segment_to_running_time (&ctx->in_segment, - GST_FORMAT_TIME, GST_BUFFER_TIMESTAMP (buf)); buf_info = mq_stream_buf_new (); if (GST_BUFFER_PTS_IS_VALID (buf)) diff --git a/gst/multipart/Makefile.in b/gst/multipart/Makefile.in index db805eb989a126e2aa15117ef6b0a9fcd60e6c7a..7856fc38218892ffffda80ad61f25dbd70113269 100644 --- a/gst/multipart/Makefile.in +++ b/gst/multipart/Makefile.in @@ -478,6 +478,8 @@ VALGRIND_PATH = @VALGRIND_PATH@ VERSION = @VERSION@ VPX_130_CFLAGS = @VPX_130_CFLAGS@ VPX_130_LIBS = @VPX_130_LIBS@ +VPX_140_CFLAGS = @VPX_140_CFLAGS@ +VPX_140_LIBS = @VPX_140_LIBS@ VPX_CFLAGS = @VPX_CFLAGS@ VPX_LIBS = @VPX_LIBS@ WARNING_CFLAGS = @WARNING_CFLAGS@ diff --git a/gst/multipart/multipartdemux.c b/gst/multipart/multipartdemux.c index 640e592dbdef4cab5ee42245f95fced3ccac7db2..7695ae5d58215ecbc39b2de4a8610cd91075780d 100644 --- a/gst/multipart/multipartdemux.c +++ b/gst/multipart/multipartdemux.c @@ -733,7 +733,7 @@ gst_multipart_set_property (GObject * object, guint prop_id, switch (prop_id) { case PROP_BOUNDARY: - /* Not really that usefull anymore as we can reliably autoscan */ + /* Not really that useful anymore as we can reliably autoscan */ g_free (filter->boundary); filter->boundary = g_value_dup_string (value); if (filter->boundary != NULL) { diff --git a/gst/replaygain/Makefile.in b/gst/replaygain/Makefile.in index 13da9ac59070156d5ad88076e84a56abbdea44a9..47a6a0898f49a2e4563a2f357887d26aa9b8044e 100644 --- a/gst/replaygain/Makefile.in +++ b/gst/replaygain/Makefile.in @@ -481,6 +481,8 @@ VALGRIND_PATH = @VALGRIND_PATH@ VERSION = @VERSION@ VPX_130_CFLAGS = @VPX_130_CFLAGS@ VPX_130_LIBS = @VPX_130_LIBS@ +VPX_140_CFLAGS = @VPX_140_CFLAGS@ +VPX_140_LIBS = @VPX_140_LIBS@ VPX_CFLAGS = @VPX_CFLAGS@ VPX_LIBS = @VPX_LIBS@ WARNING_CFLAGS = @WARNING_CFLAGS@ diff --git a/gst/rtp/Makefile.in b/gst/rtp/Makefile.in index 91a6b406451f561da67f6d463c8276067add6fae..b51f5f359ed0920fe3b3d43fca8a48a9cf5fcec4 100644 --- a/gst/rtp/Makefile.in +++ b/gst/rtp/Makefile.in @@ -526,6 +526,8 @@ VALGRIND_PATH = @VALGRIND_PATH@ VERSION = @VERSION@ VPX_130_CFLAGS = @VPX_130_CFLAGS@ VPX_130_LIBS = @VPX_130_LIBS@ +VPX_140_CFLAGS = @VPX_140_CFLAGS@ +VPX_140_LIBS = @VPX_140_LIBS@ VPX_CFLAGS = @VPX_CFLAGS@ VPX_LIBS = @VPX_LIBS@ WARNING_CFLAGS = @WARNING_CFLAGS@ diff --git a/gst/rtp/README b/gst/rtp/README index 5042bd54427d2789e9a017458081e71de630b924..814311eb410cdc336d80bcf52d7ae1063cbaa38b 100644 --- a/gst/rtp/README +++ b/gst/rtp/README @@ -392,7 +392,7 @@ do we care? 2029 RTP Payload Format of Sun's CellB Video Encoding. -usefull -------- +useful +------ http://www.iana.org/assignments/rtp-parameters diff --git a/gst/rtp/gstrtpgstpay.c b/gst/rtp/gstrtpgstpay.c index 8d50b6cd5a63a3ec8d3b07185ec8845514b4a97c..20076fba5e29b348bf060485d1380d2964d08900 100644 --- a/gst/rtp/gstrtpgstpay.c +++ b/gst/rtp/gstrtpgstpay.c @@ -171,8 +171,7 @@ gst_rtp_gst_pay_reset (GstRtpGSTPay * rtpgstpay, gboolean full) if (rtpgstpay->taglist) gst_tag_list_unref (rtpgstpay->taglist); rtpgstpay->taglist = NULL; - if (rtpgstpay->stream_id) - g_free (rtpgstpay->stream_id); + g_free (rtpgstpay->stream_id); rtpgstpay->stream_id = NULL; rtpgstpay->current_CV = 0; rtpgstpay->next_CV = 0; @@ -545,8 +544,7 @@ gst_rtp_gst_pay_sink_event (GstRTPBasePayload * payload, GstEvent * event) gst_event_parse_stream_start (event, &stream_id); if (stream_id) { - if (rtpgstpay->stream_id) - g_free (rtpgstpay->stream_id); + g_free (rtpgstpay->stream_id); rtpgstpay->stream_id = g_strdup (stream_id); } etype = 4; diff --git a/gst/rtp/gstrtph264pay.c b/gst/rtp/gstrtph264pay.c index ea1aa50c2871c3f21ba0715cb6ee91c6cf9351f2..c8100ec4601e873ddf9ef8ee7058bbad7ba6e6db 100644 --- a/gst/rtp/gstrtph264pay.c +++ b/gst/rtp/gstrtph264pay.c @@ -124,11 +124,12 @@ gst_rtp_h264_pay_class_init (GstRtpH264PayClass * klass) g_object_class_install_property (G_OBJECT_CLASS (klass), PROP_CONFIG_INTERVAL, - g_param_spec_uint ("config-interval", + g_param_spec_int ("config-interval", "SPS PPS Send Interval", "Send SPS and PPS Insertion Interval in seconds (sprop parameter sets " - "will be multiplexed in the data stream when detected.) (0 = disabled)", - 0, 3600, DEFAULT_CONFIG_INTERVAL, + "will be multiplexed in the data stream when detected.) " + "(0 = disabled, -1 = send with every IDR frame)", + -1, 3600, DEFAULT_CONFIG_INTERVAL, G_PARAM_READWRITE | G_PARAM_STATIC_STRINGS) ); @@ -829,6 +830,10 @@ gst_rtp_h264_pay_payload_nal (GstRTPBasePayload * basepayload, GST_DEBUG_OBJECT (rtph264pay, "no previous SPS/PPS time, send now"); send_spspps = TRUE; } + } else if (nalType == IDR_TYPE_ID && rtph264pay->spspps_interval == -1) { + GST_DEBUG_OBJECT (rtph264pay, "sending SPS/PPS before current IDR frame"); + /* send SPS/PPS before every IDR frame */ + send_spspps = TRUE; } if (send_spspps || rtph264pay->send_spspps) { @@ -1373,7 +1378,7 @@ gst_rtp_h264_pay_set_property (GObject * object, guint prop_id, rtph264pay->update_caps = TRUE; break; case PROP_CONFIG_INTERVAL: - rtph264pay->spspps_interval = g_value_get_uint (value); + rtph264pay->spspps_interval = g_value_get_int (value); break; default: G_OBJECT_WARN_INVALID_PROPERTY_ID (object, prop_id, pspec); @@ -1394,7 +1399,7 @@ gst_rtp_h264_pay_get_property (GObject * object, guint prop_id, g_value_set_string (value, rtph264pay->sprop_parameter_sets); break; case PROP_CONFIG_INTERVAL: - g_value_set_uint (value, rtph264pay->spspps_interval); + g_value_set_int (value, rtph264pay->spspps_interval); break; default: G_OBJECT_WARN_INVALID_PROPERTY_ID (object, prop_id, pspec); diff --git a/gst/rtp/gstrtph264pay.h b/gst/rtp/gstrtph264pay.h index 44f7af4409d21a53d72cd2b1178915c453f6419e..c5a5e9fb684c8f8ffb437fdbc799d28abedff15d 100644 --- a/gst/rtp/gstrtph264pay.h +++ b/gst/rtp/gstrtph264pay.h @@ -71,7 +71,7 @@ struct _GstRtpH264Pay GstAdapter *adapter; - guint spspps_interval; + gint spspps_interval; gboolean send_spspps; GstClockTime last_spspps; diff --git a/gst/rtp/gstrtpj2kdepay.c b/gst/rtp/gstrtpj2kdepay.c index 04e69b726dacb8f119285a5810130ed50fc6a54b..f132811e9700ddd38af732a2610ae5b814efedcd 100644 --- a/gst/rtp/gstrtpj2kdepay.c +++ b/gst/rtp/gstrtpj2kdepay.c @@ -374,16 +374,13 @@ gst_rtp_j2k_depay_flush_frame (GstRTPBaseDepayload * depayload) goto done; if (avail > 2) { - GList *list, *walk; - GstBufferList *buflist; + GstBuffer *outbuf; /* take the last bytes of the JPEG 2000 data to see if there is an EOC * marker */ gst_adapter_copy (rtpj2kdepay->f_adapter, end, avail - 2, 2); if (end[0] != 0xff && end[1] != 0xd9) { - GstBuffer *outbuf; - end[0] = 0xff; end[1] = 0xd9; @@ -397,21 +394,11 @@ gst_rtp_j2k_depay_flush_frame (GstRTPBaseDepayload * depayload) avail += 2; } - GST_DEBUG_OBJECT (rtpj2kdepay, "pushing buffer list of %u bytes", avail); - list = gst_adapter_take_list (rtpj2kdepay->f_adapter, avail); - - buflist = gst_buffer_list_new (); - - for (walk = list; walk; walk = g_list_next (walk)) { - gst_rtp_drop_meta (GST_ELEMENT_CAST (depayload), - GST_BUFFER_CAST (walk->data), - g_quark_from_static_string (GST_META_TAG_VIDEO_STR)); - gst_buffer_list_add (buflist, GST_BUFFER_CAST (walk->data)); - } - - g_list_free (list); - - ret = gst_rtp_base_depayload_push_list (depayload, buflist); + GST_DEBUG_OBJECT (rtpj2kdepay, "pushing buffer of %u bytes", avail); + outbuf = gst_adapter_take_buffer (rtpj2kdepay->f_adapter, avail); + gst_rtp_drop_meta (GST_ELEMENT_CAST (depayload), + outbuf, g_quark_from_static_string (GST_META_TAG_VIDEO_STR)); + ret = gst_rtp_base_depayload_push (depayload, outbuf); } else { GST_WARNING_OBJECT (rtpj2kdepay, "empty packet"); gst_adapter_clear (rtpj2kdepay->f_adapter); diff --git a/gst/rtp/gstrtpjpegpay.c b/gst/rtp/gstrtpjpegpay.c index 65fcb172ff8f4fd56fd5bd7b86929fd02f22a3cb..559065d9edc3ebf39018f7fe1baea89af9d07c75 100644 --- a/gst/rtp/gstrtpjpegpay.c +++ b/gst/rtp/gstrtpjpegpay.c @@ -359,10 +359,8 @@ gst_rtp_jpeg_pay_setcaps (GstRTPBasePayload * basepayload, GstCaps * caps) res = gst_rtp_base_payload_set_outcaps (basepayload, NULL); } - if (dim != NULL) - g_free (dim); - if (rate != NULL) - g_free (rate); + g_free (dim); + g_free (rate); return res; diff --git a/gst/rtp/gstrtptheorapay.c b/gst/rtp/gstrtptheorapay.c index 802a335afd7c28049d714a9adaa3875b3518874d..c2b46404ca21ecfdf2f5794865d6ea3457211f75 100644 --- a/gst/rtp/gstrtptheorapay.c +++ b/gst/rtp/gstrtptheorapay.c @@ -164,8 +164,7 @@ gst_rtp_theora_pay_cleanup (GstRtpTheoraPay * rtptheorapay) gst_rtp_theora_pay_clear_packet (rtptheorapay); g_list_free_full (rtptheorapay->headers, (GDestroyNotify) gst_buffer_unref); rtptheorapay->headers = NULL; - if (rtptheorapay->config_data) - g_free (rtptheorapay->config_data); + g_free (rtptheorapay->config_data); rtptheorapay->config_data = NULL; rtptheorapay->last_config = GST_CLOCK_TIME_NONE; } @@ -516,8 +515,7 @@ gst_rtp_theora_pay_finish_headers (GstRTPBasePayload * basepayload) configuration = g_base64_encode (config, configlen); /* store for later re-sending */ - if (rtptheorapay->config_data) - g_free (rtptheorapay->config_data); + g_free (rtptheorapay->config_data); rtptheorapay->config_size = configlen - 4 - 3 - 2; rtptheorapay->config_data = g_malloc (rtptheorapay->config_size); rtptheorapay->config_extra_len = extralen; diff --git a/gst/rtp/gstrtpvorbispay.c b/gst/rtp/gstrtpvorbispay.c index 43507056ff0940c7010482ce6c65e5668e6d000c..2557bb51e40aaaf5466f5f4ba24c73344bcf24f6 100644 --- a/gst/rtp/gstrtpvorbispay.c +++ b/gst/rtp/gstrtpvorbispay.c @@ -156,8 +156,7 @@ gst_rtp_vorbis_pay_cleanup (GstRtpVorbisPay * rtpvorbispay) gst_rtp_vorbis_pay_clear_packet (rtpvorbispay); g_list_free_full (rtpvorbispay->headers, (GDestroyNotify) gst_buffer_unref); rtpvorbispay->headers = NULL; - if (rtpvorbispay->config_data) - g_free (rtpvorbispay->config_data); + g_free (rtpvorbispay->config_data); rtpvorbispay->config_data = NULL; rtpvorbispay->last_config = GST_CLOCK_TIME_NONE; } @@ -508,8 +507,7 @@ gst_rtp_vorbis_pay_finish_headers (GstRTPBasePayload * basepayload) configuration = g_base64_encode (config, configlen); /* store for later re-sending */ - if (rtpvorbispay->config_data) - g_free (rtpvorbispay->config_data); + g_free (rtpvorbispay->config_data); rtpvorbispay->config_size = configlen - 4 - 3 - 2; rtpvorbispay->config_data = g_malloc (rtpvorbispay->config_size); rtpvorbispay->config_extra_len = extralen; diff --git a/gst/rtp/gstrtpvp8pay.c b/gst/rtp/gstrtpvp8pay.c index 1c4c625007825fb1bc28f0a4b14ba121795251d0..d7576ab4b551dfb556ff329dfdc2f248826a5231 100644 --- a/gst/rtp/gstrtpvp8pay.c +++ b/gst/rtp/gstrtpvp8pay.c @@ -126,7 +126,7 @@ gst_rtp_vp8_pay_class_init (GstRtpVP8PayClass * gst_rtp_vp8_pay_class) gst_element_class_set_static_metadata (element_class, "RTP VP8 payloader", "Codec/Payloader/Network/RTP", - "Puts VP8 video in RTP packets)", "Sjoerd Simons <sjoerd@luon.net>"); + "Puts VP8 video in RTP packets", "Sjoerd Simons <sjoerd@luon.net>"); pay_class->handle_buffer = gst_rtp_vp8_pay_handle_buffer; pay_class->sink_event = gst_rtp_vp8_pay_sink_event; diff --git a/gst/rtpmanager/Makefile.in b/gst/rtpmanager/Makefile.in index d3589085883bc021da5b88b79964e6ea90c276a9..1c3d829bbf1d20841f82d26e1a6c597f03901cf7 100644 --- a/gst/rtpmanager/Makefile.in +++ b/gst/rtpmanager/Makefile.in @@ -490,6 +490,8 @@ VALGRIND_PATH = @VALGRIND_PATH@ VERSION = @VERSION@ VPX_130_CFLAGS = @VPX_130_CFLAGS@ VPX_130_LIBS = @VPX_130_LIBS@ +VPX_140_CFLAGS = @VPX_140_CFLAGS@ +VPX_140_LIBS = @VPX_140_LIBS@ VPX_CFLAGS = @VPX_CFLAGS@ VPX_LIBS = @VPX_LIBS@ WARNING_CFLAGS = @WARNING_CFLAGS@ diff --git a/gst/rtpmanager/gstrtpbin.c b/gst/rtpmanager/gstrtpbin.c index 21e1cd826373c4bc3a93a2042195494071713435..bc7ec6de4fcf273bfc09d91000d0bc8aea469efd 100644 --- a/gst/rtpmanager/gstrtpbin.c +++ b/gst/rtpmanager/gstrtpbin.c @@ -272,6 +272,9 @@ enum SIGNAL_REQUEST_AUX_SENDER, SIGNAL_REQUEST_AUX_RECEIVER, + SIGNAL_ON_NEW_SENDER_SSRC, + SIGNAL_ON_SENDER_SSRC_ACTIVE, + LAST_SIGNAL }; @@ -290,6 +293,10 @@ enum #define DEFAULT_DO_RETRANSMISSION FALSE #define DEFAULT_RTP_PROFILE GST_RTP_PROFILE_AVP #define DEFAULT_NTP_TIME_SOURCE GST_RTP_NTP_TIME_SOURCE_NTP +#define DEFAULT_RTCP_SYNC_SEND_TIME TRUE +#define DEFAULT_MAX_RTCP_RTP_TIME_DIFF 1000 +#define DEFAULT_MAX_DROPOUT_TIME 60000 +#define DEFAULT_MAX_MISORDER_TIME 2000 enum { @@ -308,7 +315,11 @@ enum PROP_DO_SYNC_EVENT, PROP_DO_RETRANSMISSION, PROP_RTP_PROFILE, - PROP_NTP_TIME_SOURCE + PROP_NTP_TIME_SOURCE, + PROP_RTCP_SYNC_SEND_TIME, + PROP_MAX_RTCP_RTP_TIME_DIFF, + PROP_MAX_DROPOUT_TIME, + PROP_MAX_MISORDER_TIME }; #define GST_RTP_BIN_RTCP_SYNC_TYPE (gst_rtp_bin_rtcp_sync_get_type()) @@ -561,6 +572,21 @@ on_npt_stop (GstElement * jbuf, GstRtpBinStream * stream) stream->session->id, stream->ssrc); } +static void +on_new_sender_ssrc (GstElement * session, guint32 ssrc, GstRtpBinSession * sess) +{ + g_signal_emit (sess->bin, gst_rtp_bin_signals[SIGNAL_ON_NEW_SENDER_SSRC], 0, + sess->id, ssrc); +} + +static void +on_sender_ssrc_active (GstElement * session, guint32 ssrc, + GstRtpBinSession * sess) +{ + g_signal_emit (sess->bin, gst_rtp_bin_signals[SIGNAL_ON_SENDER_SSRC_ACTIVE], + 0, sess->id, ssrc); +} + /* must be called with the SESSION lock */ static GstRtpBinStream * find_stream_by_ssrc (GstRtpBinSession * session, guint32 ssrc) @@ -625,12 +651,16 @@ create_session (GstRtpBin * rtpbin, gint id) /* configure SDES items */ GST_OBJECT_LOCK (rtpbin); g_object_set (session, "sdes", rtpbin->sdes, "rtp-profile", - rtpbin->rtp_profile, NULL); + rtpbin->rtp_profile, "rtcp-sync-send-time", rtpbin->rtcp_sync_send_time, + NULL); if (rtpbin->use_pipeline_clock) g_object_set (session, "use-pipeline-clock", rtpbin->use_pipeline_clock, NULL); else g_object_set (session, "ntp-time-source", rtpbin->ntp_time_source, NULL); + + g_object_set (session, "max-dropout-time", rtpbin->max_dropout_time, + "max-misorder-time", rtpbin->max_misorder_time, NULL); GST_OBJECT_UNLOCK (rtpbin); /* provide clock_rate to the session manager when needed */ @@ -654,6 +684,10 @@ create_session (GstRtpBin * rtpbin, gint id) g_signal_connect (sess->session, "on-timeout", (GCallback) on_timeout, sess); g_signal_connect (sess->session, "on-sender-timeout", (GCallback) on_sender_timeout, sess); + g_signal_connect (sess->session, "on-new-sender-ssrc", + (GCallback) on_new_sender_ssrc, sess); + g_signal_connect (sess->session, "on-sender-ssrc-active", + (GCallback) on_sender_ssrc_active, sess); gst_bin_add (GST_BIN_CAST (rtpbin), session); gst_bin_add (GST_BIN_CAST (rtpbin), demux); @@ -955,6 +989,21 @@ gst_rtp_bin_propagate_property_to_jitterbuffer (GstRtpBin * bin, GST_RTP_BIN_UNLOCK (bin); } +static void +gst_rtp_bin_propagate_property_to_session (GstRtpBin * bin, + const gchar * name, const GValue * value) +{ + GSList *sessions; + + GST_RTP_BIN_LOCK (bin); + for (sessions = bin->sessions; sessions; sessions = g_slist_next (sessions)) { + GstRtpBinSession *sess = (GstRtpBinSession *) sessions->data; + + g_object_set_property (G_OBJECT (sess->session), name, value); + } + GST_RTP_BIN_UNLOCK (bin); +} + /* get a client with the given SDES name. Must be called with RTP_BIN_LOCK */ static GstRtpBinClient * get_client (GstRtpBin * bin, guint8 len, guint8 * data, gboolean * created) @@ -1041,6 +1090,7 @@ get_current_times (GstRtpBin * bin, GstClockTime * running_time, ntpns = clock_time; break; default: + ntpns = -1; /* Fix uninited compiler warning */ g_assert_not_reached (); break; } @@ -1549,6 +1599,10 @@ create_stream (GstRtpBinSession * session, guint32 ssrc) g_object_set (buffer, "do-lost", rtpbin->do_lost, NULL); g_object_set (buffer, "mode", rtpbin->buffer_mode, NULL); g_object_set (buffer, "do-retransmission", rtpbin->do_retransmission, NULL); + g_object_set (buffer, "max-rtcp-rtp-time-diff", + rtpbin->max_rtcp_rtp_time_diff, NULL); + g_object_set (buffer, "max-dropout-time", rtpbin->max_dropout_time, + "max-misorder-time", rtpbin->max_misorder_time, NULL); g_signal_emit (rtpbin, gst_rtp_bin_signals[SIGNAL_NEW_JITTERBUFFER], 0, buffer, session->id, ssrc); @@ -2062,6 +2116,36 @@ gst_rtp_bin_class_init (GstRtpBinClass * klass) G_SIGNAL_RUN_LAST, G_STRUCT_OFFSET (GstRtpBinClass, request_aux_receiver), _gst_element_accumulator, NULL, g_cclosure_marshal_generic, GST_TYPE_ELEMENT, 1, G_TYPE_UINT); + /** + * GstRtpBin::on-new-sender-ssrc: + * @rtpbin: the object which received the signal + * @session: the session + * @ssrc: the sender SSRC + * + * Since: 1.8 + * + * Notify of a new sender SSRC that entered @session. + */ + gst_rtp_bin_signals[SIGNAL_ON_NEW_SENDER_SSRC] = + g_signal_new ("on-new-sender-ssrc", G_TYPE_FROM_CLASS (klass), + G_SIGNAL_RUN_LAST, G_STRUCT_OFFSET (GstRtpBinClass, on_new_sender_ssrc), + NULL, NULL, g_cclosure_marshal_generic, G_TYPE_NONE, 2, G_TYPE_UINT, + G_TYPE_UINT); + /** + * GstRtpBin::on-ssrc-active: + * @rtpbin: the object which received the signal + * @session: the session + * @ssrc: the sender SSRC + * + * Since: 1.8 + * + * Notify of a sender SSRC that is active, i.e., sending RTCP. + */ + gst_rtp_bin_signals[SIGNAL_ON_SENDER_SSRC_ACTIVE] = + g_signal_new ("on-sender-ssrc-active", G_TYPE_FROM_CLASS (klass), + G_SIGNAL_RUN_LAST, G_STRUCT_OFFSET (GstRtpBinClass, + on_sender_ssrc_active), NULL, NULL, g_cclosure_marshal_generic, + G_TYPE_NONE, 2, G_TYPE_UINT, G_TYPE_UINT); g_object_class_install_property (gobject_class, PROP_SDES, g_param_spec_boxed ("sdes", "SDES", @@ -2171,6 +2255,32 @@ gst_rtp_bin_class_init (GstRtpBinClass * klass) gst_rtp_ntp_time_source_get_type (), DEFAULT_NTP_TIME_SOURCE, G_PARAM_READWRITE | G_PARAM_STATIC_STRINGS)); + g_object_class_install_property (gobject_class, PROP_RTCP_SYNC_SEND_TIME, + g_param_spec_boolean ("rtcp-sync-send-time", "RTCP Sync Send Time", + "Use send time or capture time for RTCP sync " + "(TRUE = send time, FALSE = capture time)", + DEFAULT_RTCP_SYNC_SEND_TIME, + G_PARAM_READWRITE | G_PARAM_STATIC_STRINGS)); + + g_object_class_install_property (gobject_class, PROP_MAX_RTCP_RTP_TIME_DIFF, + g_param_spec_int ("max-rtcp-rtp-time-diff", "Max RTCP RTP Time Diff", + "Maximum amount of time in ms that the RTP time in RTCP SRs " + "is allowed to be ahead (-1 disabled)", -1, G_MAXINT, + DEFAULT_MAX_RTCP_RTP_TIME_DIFF, + G_PARAM_READWRITE | G_PARAM_STATIC_STRINGS)); + + g_object_class_install_property (gobject_class, PROP_MAX_DROPOUT_TIME, + g_param_spec_uint ("max-dropout-time", "Max dropout time", + "The maximum time (milliseconds) of missing packets tolerated.", + 0, G_MAXUINT, DEFAULT_MAX_DROPOUT_TIME, + G_PARAM_READWRITE | G_PARAM_STATIC_STRINGS)); + + g_object_class_install_property (gobject_class, PROP_MAX_MISORDER_TIME, + g_param_spec_uint ("max-misorder-time", "Max misorder time", + "The maximum time (milliseconds) of misordered packets tolerated.", + 0, G_MAXUINT, DEFAULT_MAX_MISORDER_TIME, + G_PARAM_READWRITE | G_PARAM_STATIC_STRINGS)); + gstelement_class->change_state = GST_DEBUG_FUNCPTR (gst_rtp_bin_change_state); gstelement_class->request_new_pad = GST_DEBUG_FUNCPTR (gst_rtp_bin_request_new_pad); @@ -2235,6 +2345,10 @@ gst_rtp_bin_init (GstRtpBin * rtpbin) rtpbin->do_retransmission = DEFAULT_DO_RETRANSMISSION; rtpbin->rtp_profile = DEFAULT_RTP_PROFILE; rtpbin->ntp_time_source = DEFAULT_NTP_TIME_SOURCE; + rtpbin->rtcp_sync_send_time = DEFAULT_RTCP_SYNC_SEND_TIME; + rtpbin->max_rtcp_rtp_time_diff = DEFAULT_MAX_RTCP_RTP_TIME_DIFF; + rtpbin->max_dropout_time = DEFAULT_MAX_DROPOUT_TIME; + rtpbin->max_misorder_time = DEFAULT_MAX_MISORDER_TIME; /* some default SDES entries */ cname = g_strdup_printf ("user%u@host-%x", g_random_int (), g_random_int ()); @@ -2412,6 +2526,45 @@ gst_rtp_bin_set_property (GObject * object, guint prop_id, GST_RTP_BIN_UNLOCK (rtpbin); break; } + case PROP_RTCP_SYNC_SEND_TIME:{ + GSList *sessions; + GST_RTP_BIN_LOCK (rtpbin); + rtpbin->rtcp_sync_send_time = g_value_get_boolean (value); + for (sessions = rtpbin->sessions; sessions; + sessions = g_slist_next (sessions)) { + GstRtpBinSession *session = (GstRtpBinSession *) sessions->data; + + g_object_set (G_OBJECT (session->session), + "rtcp-sync-send-time", rtpbin->rtcp_sync_send_time, NULL); + } + GST_RTP_BIN_UNLOCK (rtpbin); + break; + } + case PROP_MAX_RTCP_RTP_TIME_DIFF: + GST_RTP_BIN_LOCK (rtpbin); + rtpbin->max_rtcp_rtp_time_diff = g_value_get_int (value); + GST_RTP_BIN_UNLOCK (rtpbin); + gst_rtp_bin_propagate_property_to_jitterbuffer (rtpbin, + "max-rtcp-rtp-time-diff", value); + break; + case PROP_MAX_DROPOUT_TIME: + GST_RTP_BIN_LOCK (rtpbin); + rtpbin->max_dropout_time = g_value_get_uint (value); + GST_RTP_BIN_UNLOCK (rtpbin); + gst_rtp_bin_propagate_property_to_jitterbuffer (rtpbin, + "max-dropout-time", value); + gst_rtp_bin_propagate_property_to_session (rtpbin, "max-dropout-time", + value); + break; + case PROP_MAX_MISORDER_TIME: + GST_RTP_BIN_LOCK (rtpbin); + rtpbin->max_misorder_time = g_value_get_uint (value); + GST_RTP_BIN_UNLOCK (rtpbin); + gst_rtp_bin_propagate_property_to_jitterbuffer (rtpbin, + "max-misorder-time", value); + gst_rtp_bin_propagate_property_to_session (rtpbin, "max-dropout-time", + value); + break; default: G_OBJECT_WARN_INVALID_PROPERTY_ID (object, prop_id, pspec); break; @@ -2480,6 +2633,21 @@ gst_rtp_bin_get_property (GObject * object, guint prop_id, case PROP_NTP_TIME_SOURCE: g_value_set_enum (value, rtpbin->ntp_time_source); break; + case PROP_RTCP_SYNC_SEND_TIME: + g_value_set_boolean (value, rtpbin->rtcp_sync_send_time); + break; + case PROP_MAX_RTCP_RTP_TIME_DIFF: + GST_RTP_BIN_LOCK (rtpbin); + g_value_set_int (value, rtpbin->max_rtcp_rtp_time_diff); + GST_RTP_BIN_UNLOCK (rtpbin); + break; + case PROP_MAX_DROPOUT_TIME: + g_value_set_uint (value, rtpbin->max_dropout_time); + break; + case PROP_MAX_MISORDER_TIME: + g_value_set_uint (value, rtpbin->max_misorder_time); + break; + break; default: G_OBJECT_WARN_INVALID_PROPERTY_ID (object, prop_id, pspec); break; diff --git a/gst/rtpmanager/gstrtpbin.h b/gst/rtpmanager/gstrtpbin.h index 87c1fada4c70932b386fbbc64d8a089e2bcc4973..e74a718045f026cf8c143a78f530feae7817ff77 100644 --- a/gst/rtpmanager/gstrtpbin.h +++ b/gst/rtpmanager/gstrtpbin.h @@ -69,6 +69,10 @@ struct _GstRtpBin { GstClockTime buffer_start; gboolean do_retransmission; GstRTPProfile rtp_profile; + gboolean rtcp_sync_send_time; + gint max_rtcp_rtp_time_diff; + guint32 max_dropout_time; + guint32 max_misorder_time; /* a list of session */ GSList *sessions; @@ -117,6 +121,9 @@ struct _GstRtpBinClass { GstElement* (*request_aux_sender) (GstRtpBin *rtpbin, guint session); GstElement* (*request_aux_receiver) (GstRtpBin *rtpbin, guint session); + + void (*on_new_sender_ssrc) (GstRtpBin *rtpbin, guint session, guint32 ssrc); + void (*on_sender_ssrc_active) (GstRtpBin *rtpbin, guint session, guint32 ssrc); }; GType gst_rtp_bin_get_type (void); diff --git a/gst/rtpmanager/gstrtpjitterbuffer.c b/gst/rtpmanager/gstrtpjitterbuffer.c index e028c3ea71611a9399dd4045d6cf118ad37487f6..1349e3294486b1c3ff5e80990579fef358efb4c9 100644 --- a/gst/rtpmanager/gstrtpjitterbuffer.c +++ b/gst/rtpmanager/gstrtpjitterbuffer.c @@ -5,6 +5,8 @@ * Copyright 2007 Nokia Corporation * @author: Philippe Kalaf <philippe.kalaf@collabora.co.uk>. * Copyright 2007 Wim Taymans <wim.taymans@gmail.com> + * Copyright 2015 Kurento (http://kurento.org/) + * @author: Miguel ParÃs <mparisdiaz@gmail.com> * * This library is free software; you can redistribute it and/or * modify it under the terms of the GNU Library General Public @@ -136,6 +138,9 @@ enum #define DEFAULT_RTX_MIN_RETRY_TIMEOUT -1 #define DEFAULT_RTX_RETRY_PERIOD -1 #define DEFAULT_RTX_MAX_RETRIES -1 +#define DEFAULT_MAX_RTCP_RTP_TIME_DIFF 1000 +#define DEFAULT_MAX_DROPOUT_TIME 60000 +#define DEFAULT_MAX_MISORDER_TIME 2000 #define DEFAULT_AUTO_RTX_DELAY (20 * GST_MSECOND) #define DEFAULT_AUTO_RTX_TIMEOUT (40 * GST_MSECOND) @@ -158,7 +163,10 @@ enum PROP_RTX_MIN_RETRY_TIMEOUT, PROP_RTX_RETRY_PERIOD, PROP_RTX_MAX_RETRIES, - PROP_STATS + PROP_STATS, + PROP_MAX_RTCP_RTP_TIME_DIFF, + PROP_MAX_DROPOUT_TIME, + PROP_MAX_MISORDER_TIME }; #define JBUF_LOCK(priv) (g_mutex_lock (&(priv)->jbuf_lock)) @@ -255,6 +263,9 @@ struct _GstRtpJitterBufferPrivate gint rtx_min_retry_timeout; gint rtx_retry_period; gint rtx_max_retries; + gint max_rtcp_rtp_time_diff; + guint32 max_dropout_time; + guint32 max_misorder_time; /* the last seqnum we pushed out */ guint32 last_popped_seqnum; @@ -318,6 +329,7 @@ struct _GstRtpJitterBufferPrivate guint64 num_rtx_failed; gdouble avg_rtx_num; guint64 avg_rtx_rtt; + RTPPacketRateCtx packet_rate_ctx; /* for the jitter */ GstClockTime last_dts; @@ -661,6 +673,18 @@ gst_rtp_jitter_buffer_class_init (GstRtpJitterBufferClass * klass) "The maximum number of retries to request a retransmission. " "(-1 not limited)", -1, G_MAXINT, DEFAULT_RTX_MAX_RETRIES, G_PARAM_READWRITE | G_PARAM_STATIC_STRINGS)); + + g_object_class_install_property (gobject_class, PROP_MAX_DROPOUT_TIME, + g_param_spec_uint ("max-dropout-time", "Max dropout time", + "The maximum time (milliseconds) of missing packets tolerated.", + 0, G_MAXUINT, DEFAULT_MAX_DROPOUT_TIME, + G_PARAM_READWRITE | G_PARAM_STATIC_STRINGS)); + + g_object_class_install_property (gobject_class, PROP_MAX_MISORDER_TIME, + g_param_spec_uint ("max-misorder-time", "Max misorder time", + "The maximum time (milliseconds) of misordered packets tolerated.", + 0, G_MAXUINT, DEFAULT_MAX_MISORDER_TIME, + G_PARAM_READWRITE | G_PARAM_STATIC_STRINGS)); /** * GstRtpJitterBuffer:stats: * @@ -705,6 +729,22 @@ gst_rtp_jitter_buffer_class_init (GstRtpJitterBufferClass * klass) "Various statistics", GST_TYPE_STRUCTURE, G_PARAM_READABLE | G_PARAM_STATIC_STRINGS)); + /** + * GstRtpJitterBuffer:max-rtcp-rtp-time-diff + * + * The maximum amount of time in ms that the RTP time in the RTCP SRs + * is allowed to be ahead of the last RTP packet we received. Use + * -1 to disable ignoring of RTCP packets. + * + * Since: 1.8 + */ + g_object_class_install_property (gobject_class, PROP_MAX_RTCP_RTP_TIME_DIFF, + g_param_spec_int ("max-rtcp-rtp-time-diff", "Max RTCP RTP Time Diff", + "Maximum amount of time in ms that the RTP time in RTCP SRs " + "is allowed to be ahead (-1 disabled)", -1, G_MAXINT, + DEFAULT_MAX_RTCP_RTP_TIME_DIFF, + G_PARAM_READWRITE | G_PARAM_STATIC_STRINGS)); + /** * GstRtpJitterBuffer::request-pt-map: * @buffer: the object which received the signal @@ -822,6 +862,9 @@ gst_rtp_jitter_buffer_init (GstRtpJitterBuffer * jitterbuffer) priv->rtx_min_retry_timeout = DEFAULT_RTX_MIN_RETRY_TIMEOUT; priv->rtx_retry_period = DEFAULT_RTX_RETRY_PERIOD; priv->rtx_max_retries = DEFAULT_RTX_MAX_RETRIES; + priv->max_rtcp_rtp_time_diff = DEFAULT_MAX_RTCP_RTP_TIME_DIFF; + priv->max_dropout_time = DEFAULT_MAX_DROPOUT_TIME; + priv->max_misorder_time = DEFAULT_MAX_MISORDER_TIME; priv->last_dts = -1; priv->last_rtptime = -1; @@ -2264,7 +2307,8 @@ compare_buffer_seqnum (GstBuffer * a, GstBuffer * b, gpointer user_data) static gboolean handle_big_gap_buffer (GstRtpJitterBuffer * jitterbuffer, gboolean future, - GstBuffer * buffer, guint8 pt, guint16 seqnum, gint gap) + GstBuffer * buffer, guint8 pt, guint16 seqnum, gint gap, guint max_dropout, + guint max_misorder) { GstRtpJitterBufferPrivate *priv; guint gap_packets_length; @@ -2306,7 +2350,7 @@ handle_big_gap_buffer (GstRtpJitterBuffer * jitterbuffer, gboolean future, GST_DEBUG_OBJECT (jitterbuffer, "buffer too %s %d < %d, got 5 consecutive ones - reset", (future ? "new" : "old"), gap, - (future ? RTP_MAX_DROPOUT : -RTP_MAX_MISORDER)); + (future ? max_dropout : -max_misorder)); reset = TRUE; } else if (!all_consecutive) { g_queue_foreach (&priv->gap_packets, (GFunc) gst_buffer_unref, NULL); @@ -2314,20 +2358,19 @@ handle_big_gap_buffer (GstRtpJitterBuffer * jitterbuffer, gboolean future, GST_DEBUG_OBJECT (jitterbuffer, "buffer too %s %d < %d, got no 5 consecutive ones - dropping", (future ? "new" : "old"), gap, - (future ? RTP_MAX_DROPOUT : -RTP_MAX_MISORDER)); + (future ? max_dropout : -max_misorder)); buffer = NULL; } else { GST_DEBUG_OBJECT (jitterbuffer, "buffer too %s %d < %d, got %u consecutive ones - waiting", (future ? "new" : "old"), gap, - (future ? RTP_MAX_DROPOUT : -RTP_MAX_MISORDER), - gap_packets_length + 1); + (future ? max_dropout : -max_misorder), gap_packets_length + 1); buffer = NULL; } } else { GST_DEBUG_OBJECT (jitterbuffer, "buffer too %s %d < %d, first one - waiting", (future ? "new" : "old"), - gap, -RTP_MAX_MISORDER); + gap, -max_misorder); g_queue_push_tail (&priv->gap_packets, buffer); buffer = NULL; } @@ -2376,6 +2419,7 @@ gst_rtp_jitter_buffer_chain (GstPad * pad, GstObject * parent, RTPJitterBufferItem *item; GstMessage *msg = NULL; gboolean estimated_dts = FALSE; + guint32 packet_rate, max_dropout, max_misorder; jitterbuffer = GST_RTP_JITTER_BUFFER_CAST (parent); @@ -2480,6 +2524,18 @@ gst_rtp_jitter_buffer_chain (GstPad * pad, GstObject * parent, expected = priv->next_in_seqnum; + packet_rate = + gst_rtp_packet_rate_ctx_update (&priv->packet_rate_ctx, seqnum, rtptime); + max_dropout = + gst_rtp_packet_rate_ctx_get_max_dropout (&priv->packet_rate_ctx, + priv->max_dropout_time); + max_misorder = + gst_rtp_packet_rate_ctx_get_max_misorder (&priv->packet_rate_ctx, + priv->max_misorder_time); + GST_TRACE_OBJECT (jitterbuffer, + "packet_rate: %d, max_dropout: %d, max_misorder: %d", packet_rate, + max_dropout, max_misorder); + /* now check against our expected seqnum */ if (G_LIKELY (expected != -1)) { gint gap; @@ -2499,17 +2555,17 @@ gst_rtp_jitter_buffer_chain (GstPad * pad, GstObject * parent, if (gap < 0) { /* we received an old packet */ - if (G_UNLIKELY (gap != -1 && gap < -RTP_MAX_MISORDER)) { + if (G_UNLIKELY (gap != -1 && gap < -max_misorder)) { reset = handle_big_gap_buffer (jitterbuffer, FALSE, buffer, pt, seqnum, - gap); + gap, max_dropout, max_misorder); buffer = NULL; } else { GST_DEBUG_OBJECT (jitterbuffer, "old packet received"); } } else { /* new packet, we are missing some packets */ - if (G_UNLIKELY (priv->timers->len >= RTP_MAX_DROPOUT)) { + if (G_UNLIKELY (priv->timers->len >= max_dropout)) { /* If we have timers for more than RTP_MAX_DROPOUT packets * pending this means that we have a huge gap overall. We can * reset the jitterbuffer at this point because there's @@ -2518,14 +2574,14 @@ gst_rtp_jitter_buffer_chain (GstPad * pad, GstObject * parent, * next packet */ GST_WARNING_OBJECT (jitterbuffer, "%d pending timers > %d - resetting", priv->timers->len, - RTP_MAX_DROPOUT); + max_dropout); reset = TRUE; gst_buffer_unref (buffer); buffer = NULL; - } else if (G_UNLIKELY (gap >= RTP_MAX_DROPOUT)) { + } else if (G_UNLIKELY (gap >= max_dropout)) { reset = handle_big_gap_buffer (jitterbuffer, TRUE, buffer, pt, seqnum, - gap); + gap, max_dropout, max_misorder); buffer = NULL; } else { GST_DEBUG_OBJECT (jitterbuffer, "%d missing packets", gap); @@ -2901,9 +2957,11 @@ pop_and_push_next (GstRtpJitterBuffer * jitterbuffer, guint seqnum) } dts = - gst_segment_to_position (&priv->segment, GST_FORMAT_TIME, item->dts); + gst_segment_position_from_running_time (&priv->segment, + GST_FORMAT_TIME, item->dts); pts = - gst_segment_to_position (&priv->segment, GST_FORMAT_TIME, item->pts); + gst_segment_position_from_running_time (&priv->segment, + GST_FORMAT_TIME, item->pts); /* apply timestamp with offset to buffer now */ GST_BUFFER_DTS (outbuf) = apply_offset (jitterbuffer, dts); @@ -3340,10 +3398,11 @@ wait_next_timeout (GstRtpJitterBuffer * jitterbuffer) GstClockTime timer_timeout = -1; gint i, len; - /* If we have a clock, update "now" now with the very latest running time - * we have. It is used below when timeouts are triggered to calculate - * any next possible timeout. If we only update it after waiting for the - * clock, we would give a too old time to the timeout functions. + /* If we have a clock, update "now" now with the very + * latest running time we have. If timers are unscheduled below we + * otherwise wouldn't update now (it's only updated when timers + * expire), and also for the very first loop iteration now would + * otherwise always be 0 */ GST_OBJECT_LOCK (jitterbuffer); if (GST_ELEMENT_CLOCK (jitterbuffer)) { @@ -3446,8 +3505,10 @@ wait_next_timeout (GstRtpJitterBuffer * jitterbuffer) } if (ret != GST_CLOCK_UNSCHEDULED) { - GST_DEBUG_OBJECT (jitterbuffer, "sync done, %d, #%d, %" G_GINT64_FORMAT, - ret, priv->timer_seqnum, clock_jitter); + now = timer_timeout + MAX (clock_jitter, 0); + GST_DEBUG_OBJECT (jitterbuffer, + "sync done, %d, #%d, %" GST_STIME_FORMAT, ret, priv->timer_seqnum, + GST_STIME_ARGS (clock_jitter)); } else { GST_DEBUG_OBJECT (jitterbuffer, "sync unscheduled"); } @@ -3562,7 +3623,10 @@ do_handle_sync (GstRtpJitterBuffer * jitterbuffer) /* check how far ahead it is to our RTP timestamps */ diff = ext_rtptime - last_rtptime; /* if bigger than 1 second, we drop it */ - if (diff > clock_rate) { + if (jitterbuffer->priv->max_rtcp_rtp_time_diff != -1 && + diff > + gst_util_uint64_scale (jitterbuffer->priv->max_rtcp_rtp_time_diff, + clock_rate, 1000)) { GST_DEBUG_OBJECT (jitterbuffer, "too far ahead"); /* should drop this, but some RTSP servers end up with bogus * way too ahead RTCP packet when repeated PAUSE/PLAY, @@ -3939,6 +4003,21 @@ gst_rtp_jitter_buffer_set_property (GObject * object, priv->rtx_max_retries = g_value_get_int (value); JBUF_UNLOCK (priv); break; + case PROP_MAX_RTCP_RTP_TIME_DIFF: + JBUF_LOCK (priv); + priv->max_rtcp_rtp_time_diff = g_value_get_int (value); + JBUF_UNLOCK (priv); + break; + case PROP_MAX_DROPOUT_TIME: + JBUF_LOCK (priv); + priv->max_dropout_time = g_value_get_uint (value); + JBUF_UNLOCK (priv); + break; + case PROP_MAX_MISORDER_TIME: + JBUF_LOCK (priv); + priv->max_misorder_time = g_value_get_uint (value); + JBUF_UNLOCK (priv); + break; default: G_OBJECT_WARN_INVALID_PROPERTY_ID (object, prop_id, pspec); break; @@ -4044,6 +4123,21 @@ gst_rtp_jitter_buffer_get_property (GObject * object, g_value_take_boxed (value, gst_rtp_jitter_buffer_create_stats (jitterbuffer)); break; + case PROP_MAX_RTCP_RTP_TIME_DIFF: + JBUF_LOCK (priv); + g_value_set_int (value, priv->max_rtcp_rtp_time_diff); + JBUF_UNLOCK (priv); + break; + case PROP_MAX_DROPOUT_TIME: + JBUF_LOCK (priv); + g_value_set_uint (value, priv->max_dropout_time); + JBUF_UNLOCK (priv); + break; + case PROP_MAX_MISORDER_TIME: + JBUF_LOCK (priv); + g_value_set_uint (value, priv->max_misorder_time); + JBUF_UNLOCK (priv); + break; default: G_OBJECT_WARN_INVALID_PROPERTY_ID (object, prop_id, pspec); break; diff --git a/gst/rtpmanager/gstrtpmux.c b/gst/rtpmanager/gstrtpmux.c index 302600cc9f4d9991edac8e45db888d36f7360eec..69cafb47970c4f20948cc70f92652662fc217d31 100644 --- a/gst/rtpmanager/gstrtpmux.c +++ b/gst/rtpmanager/gstrtpmux.c @@ -156,9 +156,10 @@ gst_rtp_mux_class_init (GstRTPMuxClass * klass) 0, G_MAXUINT, 0, G_PARAM_READABLE | G_PARAM_STATIC_STRINGS)); g_object_class_install_property (G_OBJECT_CLASS (klass), PROP_SSRC, g_param_spec_uint ("ssrc", "SSRC", - "The SSRC of the packets (-1 == random)", + "The SSRC of the packets (default == random)", 0, G_MAXUINT, DEFAULT_SSRC, - G_PARAM_READWRITE | G_PARAM_STATIC_STRINGS)); + GST_PARAM_MUTABLE_PLAYING | G_PARAM_READWRITE | + G_PARAM_STATIC_STRINGS)); gstelement_class->request_new_pad = GST_DEBUG_FUNCPTR (gst_rtp_mux_request_new_pad); @@ -203,36 +204,52 @@ gst_rtp_mux_src_event (GstPad * pad, GstObject * parent, GstEvent * event) static gboolean gst_rtp_mux_src_event_real (GstRTPMux * rtp_mux, GstEvent * event) { - GstIterator *iter; - gboolean result = FALSE; - gboolean done = FALSE; - - iter = gst_element_iterate_sink_pads (GST_ELEMENT (rtp_mux)); - - while (!done) { - GValue item = { 0, }; - - switch (gst_iterator_next (iter, &item)) { - case GST_ITERATOR_OK: - gst_event_ref (event); - result |= gst_pad_push_event (g_value_get_object (&item), event); - g_value_reset (&item); - break; - case GST_ITERATOR_RESYNC: - gst_iterator_resync (iter); - result = FALSE; - break; - case GST_ITERATOR_ERROR: - GST_WARNING_OBJECT (rtp_mux, "Error iterating sinkpads"); - case GST_ITERATOR_DONE: - done = TRUE; - break; + switch (GST_EVENT_TYPE (event)) { + case GST_EVENT_CUSTOM_UPSTREAM: + { + const GstStructure *s = gst_event_get_structure (event); + + if (gst_structure_has_name (s, "GstRTPCollision")) { + guint ssrc = 0; + + if (!gst_structure_get_uint (s, "ssrc", &ssrc)) + ssrc = -1; + + GST_DEBUG_OBJECT (rtp_mux, "collided ssrc: %" G_GUINT32_FORMAT, ssrc); + + /* choose another ssrc for our stream */ + GST_OBJECT_LOCK (rtp_mux); + if (ssrc == rtp_mux->current_ssrc) { + GstCaps *caps; + guint suggested_ssrc = 0; + guint32 new_ssrc; + + if (gst_structure_get_uint (s, "suggested-ssrc", &suggested_ssrc)) + rtp_mux->current_ssrc = suggested_ssrc; + + while (ssrc == rtp_mux->current_ssrc) + rtp_mux->current_ssrc = g_random_int (); + + new_ssrc = rtp_mux->current_ssrc; + GST_OBJECT_UNLOCK (rtp_mux); + + caps = gst_pad_get_current_caps (rtp_mux->srcpad); + caps = gst_caps_make_writable (caps); + gst_caps_set_simple (caps, "ssrc", G_TYPE_UINT, new_ssrc, NULL); + gst_pad_set_caps (rtp_mux->srcpad, caps); + gst_caps_unref (caps); + } else { + GST_OBJECT_UNLOCK (rtp_mux); + } + } + break; } + default: + break; } - gst_iterator_free (iter); - gst_event_unref (event); - return result; + + return gst_pad_event_default (rtp_mux->srcpad, GST_OBJECT (rtp_mux), event); } static void @@ -249,6 +266,8 @@ gst_rtp_mux_init (GstRTPMux * rtp_mux) gst_element_add_pad (GST_ELEMENT (rtp_mux), rtp_mux->srcpad); rtp_mux->ssrc = DEFAULT_SSRC; + rtp_mux->current_ssrc = DEFAULT_SSRC; + rtp_mux->ssrc_random = TRUE; rtp_mux->ts_offset = DEFAULT_TIMESTAMP_OFFSET; rtp_mux->seqnum_offset = DEFAULT_SEQNUM_OFFSET; @@ -414,6 +433,17 @@ gst_rtp_mux_chain_list (GstPad * pad, GstObject * parent, rtp_mux = GST_RTP_MUX (parent); + if (gst_pad_check_reconfigure (rtp_mux->srcpad)) { + GstCaps *current_caps = gst_pad_get_current_caps (pad); + + if (!gst_rtp_mux_setcaps (pad, rtp_mux, current_caps)) { + ret = GST_FLOW_NOT_NEGOTIATED; + gst_buffer_list_unref (bufferlist); + goto out; + } + gst_caps_unref (current_caps); + } + GST_OBJECT_LOCK (rtp_mux); padpriv = gst_pad_get_element_private (pad); @@ -472,7 +502,18 @@ gst_rtp_mux_chain (GstPad * pad, GstObject * parent, GstBuffer * buffer) gboolean changed = FALSE; GstRTPBuffer rtpbuffer = GST_RTP_BUFFER_INIT; - rtp_mux = GST_RTP_MUX (GST_OBJECT_PARENT (pad)); + rtp_mux = GST_RTP_MUX (parent); + + if (gst_pad_check_reconfigure (rtp_mux->srcpad)) { + GstCaps *current_caps = gst_pad_get_current_caps (pad); + + if (!gst_rtp_mux_setcaps (pad, rtp_mux, current_caps)) { + ret = GST_FLOW_NOT_NEGOTIATED; + gst_buffer_unref (buffer); + goto out; + } + gst_caps_unref (current_caps); + } GST_OBJECT_LOCK (rtp_mux); padpriv = gst_pad_get_element_private (pad); @@ -523,6 +564,7 @@ gst_rtp_mux_chain (GstPad * pad, GstObject * parent, GstBuffer * buffer) ret = gst_pad_push (rtp_mux->srcpad, buffer); } +out: return ret; } @@ -532,6 +574,34 @@ gst_rtp_mux_setcaps (GstPad * pad, GstRTPMux * rtp_mux, GstCaps * caps) GstStructure *structure; gboolean ret = FALSE; GstRTPMuxPadPrivate *padpriv; + GstCaps *peercaps; + + if (!gst_caps_is_fixed (caps)) + return FALSE; + + peercaps = gst_pad_peer_query_caps (rtp_mux->srcpad, NULL); + if (peercaps) { + GstCaps *tcaps, *othercaps;; + tcaps = gst_pad_get_pad_template_caps (pad); + othercaps = gst_caps_intersect_full (peercaps, tcaps, + GST_CAPS_INTERSECT_FIRST); + + if (gst_caps_get_size (othercaps) > 0) { + structure = gst_caps_get_structure (othercaps, 0); + GST_OBJECT_LOCK (rtp_mux); + if (gst_structure_get_uint (structure, "ssrc", &rtp_mux->current_ssrc)) { + GST_DEBUG_OBJECT (pad, "Use downstream ssrc: %x", + rtp_mux->current_ssrc); + rtp_mux->have_ssrc = TRUE; + } + GST_OBJECT_UNLOCK (rtp_mux); + } + + gst_caps_unref (othercaps); + + gst_caps_unref (peercaps); + gst_caps_unref (tcaps); + } structure = gst_caps_get_structure (caps, 0); @@ -545,13 +615,25 @@ gst_rtp_mux_setcaps (GstPad * pad, GstRTPMux * rtp_mux, GstCaps * caps) &padpriv->timestamp_offset)) { padpriv->have_timestamp_offset = TRUE; } - GST_OBJECT_UNLOCK (rtp_mux); caps = gst_caps_copy (caps); + /* if we don't have a specified ssrc, first try to take one from the caps, + and if that fails, generate one */ + if (!rtp_mux->have_ssrc) { + if (rtp_mux->ssrc_random) { + if (!gst_structure_get_uint (structure, "ssrc", &rtp_mux->current_ssrc)) + rtp_mux->current_ssrc = g_random_int (); + rtp_mux->have_ssrc = TRUE; + } + } + gst_caps_set_simple (caps, "timestamp-offset", G_TYPE_UINT, rtp_mux->ts_base, - "seqnum-offset", G_TYPE_UINT, rtp_mux->seqnum_base, NULL); + "seqnum-offset", G_TYPE_UINT, rtp_mux->seqnum_base, + "ssrc", G_TYPE_UINT, rtp_mux->current_ssrc, NULL); + + GST_OBJECT_UNLOCK (rtp_mux); if (rtp_mux->send_stream_start) { gchar s_id[32]; @@ -567,7 +649,6 @@ gst_rtp_mux_setcaps (GstPad * pad, GstRTPMux * rtp_mux, GstCaps * caps) "setting caps %" GST_PTR_FORMAT " on src pad..", caps); ret = gst_pad_set_caps (rtp_mux->srcpad, caps); - gst_structure_get_uint (structure, "ssrc", &rtp_mux->current_ssrc); gst_caps_unref (caps); @@ -630,9 +711,8 @@ gst_rtp_mux_getcaps (GstPad * pad, GstRTPMux * mux, GstCaps * filter) GstCaps *peercaps; GstCaps *othercaps; GstCaps *tcaps; - GstCaps *other_filtered; - peercaps = gst_pad_peer_query_caps (mux->srcpad, filter); + peercaps = gst_pad_peer_query_caps (mux->srcpad, NULL); if (peercaps) { tcaps = gst_pad_get_pad_template_caps (pad); @@ -649,21 +729,20 @@ gst_rtp_mux_getcaps (GstPad * pad, GstRTPMux * mux, GstCaps * filter) } gst_caps_unref (tcaps); - clear_caps (othercaps, FALSE); + GST_LOG_OBJECT (pad, "Intersected srcpad-peercaps and template caps: %" + GST_PTR_FORMAT, othercaps); - other_filtered = gst_caps_copy (othercaps); - clear_caps (other_filtered, TRUE); + clear_caps (othercaps, TRUE); g_value_init (&v, GST_TYPE_CAPS); iter = gst_element_iterate_sink_pads (GST_ELEMENT (mux)); do { - gst_value_set_caps (&v, other_filtered); + gst_value_set_caps (&v, othercaps); res = gst_iterator_fold (iter, same_clock_rate_fold, &v, pad); gst_iterator_resync (iter); } while (res == GST_ITERATOR_RESYNC); gst_iterator_free (iter); - gst_caps_unref (other_filtered); caps = gst_caps_intersect ((GstCaps *) gst_value_get_caps (&v), othercaps); @@ -691,8 +770,12 @@ gst_rtp_mux_sink_query (GstPad * pad, GstObject * parent, GstQuery * query) GstCaps *filter, *caps; gst_query_parse_caps (query, &filter); + GST_LOG_OBJECT (pad, "Received caps-query with filter-caps: %" + GST_PTR_FORMAT, filter); caps = gst_rtp_mux_getcaps (pad, mux, filter); gst_query_set_caps_result (query, caps); + GST_LOG_OBJECT (mux, "Answering caps-query with caps: %" + GST_PTR_FORMAT, caps); gst_caps_unref (caps); res = TRUE; break; @@ -703,11 +786,8 @@ gst_rtp_mux_sink_query (GstPad * pad, GstObject * parent, GstQuery * query) } return res; - - } - static void gst_rtp_mux_get_property (GObject * object, guint prop_id, GValue * value, GParamSpec * pspec) @@ -716,6 +796,7 @@ gst_rtp_mux_get_property (GObject * object, rtp_mux = GST_RTP_MUX (object); + GST_OBJECT_LOCK (rtp_mux); switch (prop_id) { case PROP_TIMESTAMP_OFFSET: g_value_set_int (value, rtp_mux->ts_offset); @@ -724,9 +805,7 @@ gst_rtp_mux_get_property (GObject * object, g_value_set_int (value, rtp_mux->seqnum_offset); break; case PROP_SEQNUM: - GST_OBJECT_LOCK (rtp_mux); g_value_set_uint (value, rtp_mux->seqnum); - GST_OBJECT_UNLOCK (rtp_mux); break; case PROP_SSRC: g_value_set_uint (value, rtp_mux->ssrc); @@ -735,6 +814,7 @@ gst_rtp_mux_get_property (GObject * object, G_OBJECT_WARN_INVALID_PROPERTY_ID (object, prop_id, pspec); break; } + GST_OBJECT_UNLOCK (rtp_mux); } static void @@ -753,7 +833,12 @@ gst_rtp_mux_set_property (GObject * object, rtp_mux->seqnum_offset = g_value_get_int (value); break; case PROP_SSRC: + GST_OBJECT_LOCK (rtp_mux); rtp_mux->ssrc = g_value_get_uint (value); + rtp_mux->current_ssrc = rtp_mux->ssrc; + rtp_mux->have_ssrc = TRUE; + rtp_mux->ssrc_random = FALSE; + GST_OBJECT_UNLOCK (rtp_mux); break; default: G_OBJECT_WARN_INVALID_PROPERTY_ID (object, prop_id, pspec); @@ -774,6 +859,8 @@ gst_rtp_mux_sink_event (GstPad * pad, GstObject * parent, GstEvent * event) GstCaps *caps; gst_event_parse_caps (event, &caps); + GST_LOG_OBJECT (pad, "Received caps-event with caps: %" + GST_PTR_FORMAT, caps); ret = gst_rtp_mux_setcaps (pad, mux, caps); gst_event_unref (event); return ret; @@ -823,11 +910,6 @@ gst_rtp_mux_ready_to_paused (GstRTPMux * rtp_mux) g_clear_object (&rtp_mux->last_pad); rtp_mux->send_stream_start = TRUE; - if (rtp_mux->ssrc == -1) - rtp_mux->current_ssrc = g_random_int (); - else - rtp_mux->current_ssrc = rtp_mux->ssrc; - if (rtp_mux->seqnum_offset == -1) rtp_mux->seqnum_base = g_random_int_range (0, G_MAXUINT16); else @@ -841,6 +923,13 @@ gst_rtp_mux_ready_to_paused (GstRTPMux * rtp_mux) rtp_mux->last_stop = GST_CLOCK_TIME_NONE; + if (rtp_mux->ssrc_random) { + rtp_mux->have_ssrc = FALSE; + } else { + rtp_mux->current_ssrc = rtp_mux->ssrc; + rtp_mux->have_ssrc = TRUE; + } + GST_DEBUG_OBJECT (rtp_mux, "set timestamp-offset to %u", rtp_mux->ts_base); GST_OBJECT_UNLOCK (rtp_mux); diff --git a/gst/rtpmanager/gstrtpmux.h b/gst/rtpmanager/gstrtpmux.h index 4b71deeaf233578176a77ef69874dc5bd3b31183..3de9f41865b7152239d3da64038025c81bffc757 100644 --- a/gst/rtpmanager/gstrtpmux.h +++ b/gst/rtpmanager/gstrtpmux.h @@ -71,6 +71,8 @@ struct _GstRTPMux guint16 seqnum; /* protected by object lock */ guint ssrc; guint current_ssrc; + gboolean have_ssrc; + gboolean ssrc_random; GstPad *last_pad; /* protected by object lock */ diff --git a/gst/rtpmanager/gstrtprtxreceive.c b/gst/rtpmanager/gstrtprtxreceive.c index 71b80236a41ee6e5c3186ce256083fe8119c437f..477372246f6d3ba9d9151eecd660bac3998793dd 100644 --- a/gst/rtpmanager/gstrtprtxreceive.c +++ b/gst/rtpmanager/gstrtprtxreceive.c @@ -314,7 +314,7 @@ gst_rtp_rtx_receive_src_event (GstPad * pad, GstObject * parent, seqnum = -1; /* retrieve ssrc of the packet that need to be retransmitted - * it's usefull when reconstructing the original packet from the rtx packet */ + * it's useful when reconstructing the original packet from the rtx packet */ if (!gst_structure_get_uint (s, "ssrc", &ssrc)) ssrc = -1; diff --git a/gst/rtpmanager/gstrtpsession.c b/gst/rtpmanager/gstrtpsession.c index 2604c61fd32e0b949adf1f70b20e1c190a3ecccd..4c41c5d91523f27a267f749b3d3697a368f60a52 100644 --- a/gst/rtpmanager/gstrtpsession.c +++ b/gst/rtpmanager/gstrtpsession.c @@ -208,6 +208,8 @@ enum SIGNAL_ON_BYE_TIMEOUT, SIGNAL_ON_TIMEOUT, SIGNAL_ON_SENDER_TIMEOUT, + SIGNAL_ON_NEW_SENDER_SSRC, + SIGNAL_ON_SENDER_SSRC_ACTIVE, LAST_SIGNAL }; @@ -221,8 +223,11 @@ enum #define DEFAULT_USE_PIPELINE_CLOCK FALSE #define DEFAULT_RTCP_MIN_INTERVAL (RTP_STATS_MIN_INTERVAL * GST_SECOND) #define DEFAULT_PROBATION RTP_DEFAULT_PROBATION +#define DEFAULT_MAX_DROPOUT_TIME 60000 +#define DEFAULT_MAX_MISORDER_TIME 2000 #define DEFAULT_RTP_PROFILE GST_RTP_PROFILE_AVP #define DEFAULT_NTP_TIME_SOURCE GST_RTP_NTP_TIME_SOURCE_NTP +#define DEFAULT_RTCP_SYNC_SEND_TIME TRUE enum { @@ -238,9 +243,12 @@ enum PROP_USE_PIPELINE_CLOCK, PROP_RTCP_MIN_INTERVAL, PROP_PROBATION, + PROP_MAX_DROPOUT_TIME, + PROP_MAX_MISORDER_TIME, PROP_STATS, PROP_RTP_PROFILE, - PROP_NTP_TIME_SOURCE + PROP_NTP_TIME_SOURCE, + PROP_RTCP_SYNC_SEND_TIME }; #define GST_RTP_SESSION_GET_PRIVATE(obj) \ @@ -274,6 +282,7 @@ struct _GstRtpSessionPrivate gboolean use_pipeline_clock; GstRtpNtpTimeSource ntp_time_source; + gboolean rtcp_sync_send_time; guint rtx_count; }; @@ -441,6 +450,28 @@ on_sender_timeout (RTPSession * session, RTPSource * src, GstRtpSession * sess) src->ssrc); } +static void +on_new_sender_ssrc (RTPSession * session, RTPSource * src, GstRtpSession * sess) +{ + g_signal_emit (sess, gst_rtp_session_signals[SIGNAL_ON_NEW_SENDER_SSRC], 0, + src->ssrc); +} + +static void +on_sender_ssrc_active (RTPSession * session, RTPSource * src, + GstRtpSession * sess) +{ + g_signal_emit (sess, gst_rtp_session_signals[SIGNAL_ON_SENDER_SSRC_ACTIVE], 0, + src->ssrc); +} + +static void +on_notify_stats (RTPSession * session, GParamSpec * spec, + GstRtpSession * rtpsession) +{ + g_object_notify (G_OBJECT (rtpsession), "stats"); +} + #define gst_rtp_session_parent_class parent_class G_DEFINE_TYPE (GstRtpSession, gst_rtp_session, GST_TYPE_ELEMENT); @@ -517,7 +548,7 @@ gst_rtp_session_class_init (GstRtpSessionClass * klass) on_ssrc_validated), NULL, NULL, g_cclosure_marshal_VOID__UINT, G_TYPE_NONE, 1, G_TYPE_UINT); /** - * GstRtpSession::on-ssrc_active: + * GstRtpSession::on-ssrc-active: * @sess: the object which received the signal * @ssrc: the SSRC * @@ -586,6 +617,35 @@ gst_rtp_session_class_init (GstRtpSessionClass * klass) on_sender_timeout), NULL, NULL, g_cclosure_marshal_VOID__UINT, G_TYPE_NONE, 1, G_TYPE_UINT); + /** + * GstRtpSession::on-new-sender-ssrc: + * @sess: the object which received the signal + * @ssrc: the sender SSRC + * + * Since: 1.8 + * + * Notify of a new sender SSRC that entered @session. + */ + gst_rtp_session_signals[SIGNAL_ON_NEW_SENDER_SSRC] = + g_signal_new ("on-new-sender-ssrc", G_TYPE_FROM_CLASS (klass), + G_SIGNAL_RUN_LAST, G_STRUCT_OFFSET (GstRtpSessionClass, on_new_ssrc), + NULL, NULL, g_cclosure_marshal_VOID__UINT, G_TYPE_NONE, 1, G_TYPE_UINT); + + /** + * GstRtpSession::on-sender-ssrc-active: + * @sess: the object which received the signal + * @ssrc: the sender SSRC + * + * Since: 1.8 + * + * Notify of a sender SSRC that is active, i.e., sending RTCP. + */ + gst_rtp_session_signals[SIGNAL_ON_SENDER_SSRC_ACTIVE] = + g_signal_new ("on-sender-ssrc-active", G_TYPE_FROM_CLASS (klass), + G_SIGNAL_RUN_LAST, G_STRUCT_OFFSET (GstRtpSessionClass, + on_ssrc_active), NULL, NULL, g_cclosure_marshal_VOID__UINT, + G_TYPE_NONE, 1, G_TYPE_UINT); + g_object_class_install_property (gobject_class, PROP_BANDWIDTH, g_param_spec_double ("bandwidth", "Bandwidth", "The bandwidth of the session in bytes per second (0 for auto-discover)", @@ -651,6 +711,18 @@ gst_rtp_session_class_init (GstRtpSessionClass * klass) 0, G_MAXUINT, DEFAULT_PROBATION, G_PARAM_READWRITE | G_PARAM_STATIC_STRINGS)); + g_object_class_install_property (gobject_class, PROP_MAX_DROPOUT_TIME, + g_param_spec_uint ("max-dropout-time", "Max dropout time", + "The maximum time (milliseconds) of missing packets tolerated.", + 0, G_MAXUINT, DEFAULT_MAX_DROPOUT_TIME, + G_PARAM_READWRITE | G_PARAM_STATIC_STRINGS)); + + g_object_class_install_property (gobject_class, PROP_MAX_MISORDER_TIME, + g_param_spec_uint ("max-misorder-time", "Max misorder time", + "The maximum time (milliseconds) of misordered packets tolerated.", + 0, G_MAXUINT, DEFAULT_MAX_MISORDER_TIME, + G_PARAM_READWRITE | G_PARAM_STATIC_STRINGS)); + /** * GstRtpSession::stats: * @@ -663,6 +735,8 @@ gst_rtp_session_class_init (GstRtpSessionClass * klass) * dropped (due to bandwidth constraints) * "sent-nack-count" G_TYPE_UINT Number of NACKs sent * "recv-nack-count" G_TYPE_UINT Number of NACKs received + * "source-stats" G_TYPE_BOXED GValueArray of #RTPSource::stats for all + * RTP sources (Since 1.8) * * Since: 1.4 */ @@ -682,6 +756,13 @@ gst_rtp_session_class_init (GstRtpSessionClass * klass) gst_rtp_ntp_time_source_get_type (), DEFAULT_NTP_TIME_SOURCE, G_PARAM_READWRITE | G_PARAM_STATIC_STRINGS)); + g_object_class_install_property (gobject_class, PROP_RTCP_SYNC_SEND_TIME, + g_param_spec_boolean ("rtcp-sync-send-time", "RTCP Sync Send Time", + "Use send time or capture time for RTCP sync " + "(TRUE = send time, FALSE = capture time)", + DEFAULT_RTCP_SYNC_SEND_TIME, + G_PARAM_READWRITE | G_PARAM_STATIC_STRINGS)); + gstelement_class->change_state = GST_DEBUG_FUNCPTR (gst_rtp_session_change_state); gstelement_class->request_new_pad = @@ -726,6 +807,7 @@ gst_rtp_session_init (GstRtpSession * rtpsession) rtpsession->priv->sysclock = gst_system_clock_obtain (); rtpsession->priv->session = rtp_session_new (); rtpsession->priv->use_pipeline_clock = DEFAULT_USE_PIPELINE_CLOCK; + rtpsession->priv->rtcp_sync_send_time = DEFAULT_RTCP_SYNC_SEND_TIME; /* configure callbacks */ rtp_session_set_callbacks (rtpsession->priv->session, &callbacks, rtpsession); @@ -748,6 +830,12 @@ gst_rtp_session_init (GstRtpSession * rtpsession) (GCallback) on_timeout, rtpsession); g_signal_connect (rtpsession->priv->session, "on-sender-timeout", (GCallback) on_sender_timeout, rtpsession); + g_signal_connect (rtpsession->priv->session, "on-new-sender-ssrc", + (GCallback) on_new_sender_ssrc, rtpsession); + g_signal_connect (rtpsession->priv->session, "on-sender-ssrc-active", + (GCallback) on_sender_ssrc_active, rtpsession); + g_signal_connect (rtpsession->priv->session, "notify::stats", + (GCallback) on_notify_stats, rtpsession); rtpsession->priv->ptmap = g_hash_table_new_full (NULL, NULL, NULL, (GDestroyNotify) gst_caps_unref); @@ -815,12 +903,23 @@ gst_rtp_session_set_property (GObject * object, guint prop_id, case PROP_PROBATION: g_object_set_property (G_OBJECT (priv->session), "probation", value); break; + case PROP_MAX_DROPOUT_TIME: + g_object_set_property (G_OBJECT (priv->session), "max-dropout-time", + value); + break; + case PROP_MAX_MISORDER_TIME: + g_object_set_property (G_OBJECT (priv->session), "max-misorder-time", + value); + break; case PROP_RTP_PROFILE: g_object_set_property (G_OBJECT (priv->session), "rtp-profile", value); break; case PROP_NTP_TIME_SOURCE: priv->ntp_time_source = g_value_get_enum (value); break; + case PROP_RTCP_SYNC_SEND_TIME: + priv->rtcp_sync_send_time = g_value_get_boolean (value); + break; default: G_OBJECT_WARN_INVALID_PROPERTY_ID (object, prop_id, pspec); break; @@ -875,6 +974,14 @@ gst_rtp_session_get_property (GObject * object, guint prop_id, case PROP_PROBATION: g_object_get_property (G_OBJECT (priv->session), "probation", value); break; + case PROP_MAX_DROPOUT_TIME: + g_object_get_property (G_OBJECT (priv->session), "max-dropout-time", + value); + break; + case PROP_MAX_MISORDER_TIME: + g_object_get_property (G_OBJECT (priv->session), "max-misorder-time", + value); + break; case PROP_STATS: g_value_take_boxed (value, gst_rtp_session_create_stats (rtpsession)); break; @@ -884,6 +991,9 @@ gst_rtp_session_get_property (GObject * object, guint prop_id, case PROP_NTP_TIME_SOURCE: g_value_set_enum (value, priv->ntp_time_source); break; + case PROP_RTCP_SYNC_SEND_TIME: + g_value_set_boolean (value, priv->rtcp_sync_send_time); + break; default: G_OBJECT_WARN_INVALID_PROPERTY_ID (object, prop_id, pspec); break; @@ -946,6 +1056,7 @@ get_current_times (GstRtpSession * rtpsession, GstClockTime * running_time, ntpns = clock_time; break; default: + ntpns = -1; g_assert_not_reached (); break; } @@ -2174,7 +2285,8 @@ gst_rtp_session_chain_send_rtp_common (GstRtpSession * rtpsession, running_time = gst_segment_to_running_time (&rtpsession->send_rtp_seg, GST_FORMAT_TIME, timestamp); - running_time += priv->send_latency; + if (priv->rtcp_sync_send_time) + running_time += priv->send_latency; } else { /* no timestamp. */ running_time = -1; diff --git a/gst/rtpmanager/gstrtpsession.h b/gst/rtpmanager/gstrtpsession.h index a144c28caa67be3f17a4cd2de370404f9f72fd9c..1c1c1094b5c78d700b33f2fb02385a3f2fbd4e6e 100644 --- a/gst/rtpmanager/gstrtpsession.h +++ b/gst/rtpmanager/gstrtpsession.h @@ -72,6 +72,8 @@ struct _GstRtpSessionClass { void (*on_bye_timeout) (GstRtpSession *sess, guint32 ssrc); void (*on_timeout) (GstRtpSession *sess, guint32 ssrc); void (*on_sender_timeout) (GstRtpSession *sess, guint32 ssrc); + void (*on_new_sender_ssrc) (GstRtpSession *sess, guint32 ssrc); + void (*on_sender_ssrc_active) (GstRtpSession *sess, guint32 ssrc); }; GType gst_rtp_session_get_type (void); diff --git a/gst/rtpmanager/rtpsession.c b/gst/rtpmanager/rtpsession.c index 879b1deea754732446cb9d01cfe54acc964bd40f..75908c00e6505a1ab26fd710a604054a06ca482f 100644 --- a/gst/rtpmanager/rtpsession.c +++ b/gst/rtpmanager/rtpsession.c @@ -51,6 +51,8 @@ enum SIGNAL_SEND_RTCP, SIGNAL_SEND_RTCP_FULL, SIGNAL_ON_RECEIVING_RTCP, + SIGNAL_ON_NEW_SENDER_SSRC, + SIGNAL_ON_SENDER_SSRC_ACTIVE, LAST_SIGNAL }; @@ -68,7 +70,10 @@ enum #define DEFAULT_RTCP_FEEDBACK_RETENTION_WINDOW (2 * GST_SECOND) #define DEFAULT_RTCP_IMMEDIATE_FEEDBACK_THRESHOLD (3) #define DEFAULT_PROBATION RTP_DEFAULT_PROBATION +#define DEFAULT_MAX_DROPOUT_TIME 60000 +#define DEFAULT_MAX_MISORDER_TIME 2000 #define DEFAULT_RTP_PROFILE GST_RTP_PROFILE_AVP +#define DEFAULT_RTCP_REDUCED_SIZE FALSE enum { @@ -89,8 +94,11 @@ enum PROP_RTCP_FEEDBACK_RETENTION_WINDOW, PROP_RTCP_IMMEDIATE_FEEDBACK_THRESHOLD, PROP_PROBATION, + PROP_MAX_DROPOUT_TIME, + PROP_MAX_MISORDER_TIME, PROP_STATS, - PROP_RTP_PROFILE + PROP_RTP_PROFILE, + PROP_RTCP_REDUCED_SIZE }; /* update average packet size */ @@ -362,6 +370,36 @@ rtp_session_class_init (RTPSessionClass * klass) NULL, NULL, g_cclosure_marshal_generic, G_TYPE_NONE, 1, GST_TYPE_BUFFER | G_SIGNAL_TYPE_STATIC_SCOPE); + /** + * RTPSession::on-new-sender-ssrc: + * @session: the object which received the signal + * @src: the new sender RTPSource + * + * Notify of a new sender SSRC that entered @session. + * + * Since: 1.8 + */ + rtp_session_signals[SIGNAL_ON_NEW_SENDER_SSRC] = + g_signal_new ("on-new-sender-ssrc", G_TYPE_FROM_CLASS (klass), + G_SIGNAL_RUN_LAST, G_STRUCT_OFFSET (RTPSessionClass, on_new_sender_ssrc), + NULL, NULL, g_cclosure_marshal_VOID__OBJECT, G_TYPE_NONE, 1, + RTP_TYPE_SOURCE); + + /** + * RTPSession::on-sender-ssrc-active: + * @session: the object which received the signal + * @src: the active sender RTPSource + * + * Notify of a sender SSRC that is active, i.e., sending RTCP. + * + * Since: 1.8 + */ + rtp_session_signals[SIGNAL_ON_SENDER_SSRC_ACTIVE] = + g_signal_new ("on-sender-ssrc-active", G_TYPE_FROM_CLASS (klass), + G_SIGNAL_RUN_LAST, G_STRUCT_OFFSET (RTPSessionClass, + on_sender_ssrc_active), NULL, NULL, g_cclosure_marshal_VOID__OBJECT, + G_TYPE_NONE, 1, RTP_TYPE_SOURCE); + g_object_class_install_property (gobject_class, PROP_INTERNAL_SSRC, g_param_spec_uint ("internal-ssrc", "Internal SSRC", "The internal SSRC used for the session (deprecated)", @@ -374,25 +412,25 @@ rtp_session_class_init (RTPSessionClass * klass) g_object_class_install_property (gobject_class, PROP_BANDWIDTH, g_param_spec_double ("bandwidth", "Bandwidth", - "The bandwidth of the session (0 for auto-discover)", + "The bandwidth of the session in bits per second (0 for auto-discover)", 0.0, G_MAXDOUBLE, DEFAULT_BANDWIDTH, G_PARAM_READWRITE | G_PARAM_STATIC_STRINGS)); g_object_class_install_property (gobject_class, PROP_RTCP_FRACTION, g_param_spec_double ("rtcp-fraction", "RTCP Fraction", - "The fraction of the bandwidth used for RTCP (or as a real fraction of the RTP bandwidth if < 1)", + "The fraction of the bandwidth used for RTCP in bits per second (or as a real fraction of the RTP bandwidth if < 1)", 0.0, G_MAXDOUBLE, DEFAULT_RTCP_FRACTION, G_PARAM_READWRITE | G_PARAM_STATIC_STRINGS)); g_object_class_install_property (gobject_class, PROP_RTCP_RR_BANDWIDTH, g_param_spec_int ("rtcp-rr-bandwidth", "RTCP RR bandwidth", - "The RTCP bandwidth used for receivers in bytes per second (-1 = default)", + "The RTCP bandwidth used for receivers in bits per second (-1 = default)", -1, G_MAXINT, DEFAULT_RTCP_RR_BANDWIDTH, G_PARAM_READWRITE | G_PARAM_STATIC_STRINGS)); g_object_class_install_property (gobject_class, PROP_RTCP_RS_BANDWIDTH, g_param_spec_int ("rtcp-rs-bandwidth", "RTCP RS bandwidth", - "The RTCP bandwidth used for senders in bytes per second (-1 = default)", + "The RTCP bandwidth used for senders in bits per second (-1 = default)", -1, G_MAXINT, DEFAULT_RTCP_RS_BANDWIDTH, G_PARAM_READWRITE | G_PARAM_STATIC_STRINGS)); @@ -482,6 +520,18 @@ rtp_session_class_init (RTPSessionClass * klass) 0, G_MAXUINT, DEFAULT_PROBATION, G_PARAM_READWRITE | G_PARAM_STATIC_STRINGS)); + g_object_class_install_property (gobject_class, PROP_MAX_DROPOUT_TIME, + g_param_spec_uint ("max-dropout-time", "Max dropout time", + "The maximum time (milliseconds) of missing packets tolerated.", + 0, G_MAXUINT, DEFAULT_MAX_DROPOUT_TIME, + G_PARAM_READWRITE | G_PARAM_STATIC_STRINGS)); + + g_object_class_install_property (gobject_class, PROP_MAX_MISORDER_TIME, + g_param_spec_uint ("max-misorder-time", "Max misorder time", + "The maximum time (milliseconds) of misordered packets tolerated.", + 0, G_MAXUINT, DEFAULT_MAX_MISORDER_TIME, + G_PARAM_READWRITE | G_PARAM_STATIC_STRINGS)); + /** * RTPSession::stats: * @@ -492,6 +542,8 @@ rtp_session_class_init (RTPSessionClass * klass) * dropped (due to bandwidth constraints) * "sent-nack-count" G_TYPE_UINT Number of NACKs sent * "recv-nack-count" G_TYPE_UINT Number of NACKs received + * "source-stats" G_TYPE_BOXED GValueArray of #RTPSource::stats for all + * RTP sources (Since 1.8) * * Since: 1.4 */ @@ -505,6 +557,12 @@ rtp_session_class_init (RTPSessionClass * klass) "RTP profile to use for this session", GST_TYPE_RTP_PROFILE, DEFAULT_RTP_PROFILE, G_PARAM_READWRITE | G_PARAM_STATIC_STRINGS)); + g_object_class_install_property (gobject_class, PROP_RTCP_REDUCED_SIZE, + g_param_spec_boolean ("rtcp-reduced-size", "RTCP Reduced Size", + "Use Reduced Size RTCP for feedback packets", + DEFAULT_RTCP_REDUCED_SIZE, + G_PARAM_READWRITE | G_PARAM_STATIC_STRINGS)); + klass->get_source_by_ssrc = GST_DEBUG_FUNCPTR (rtp_session_get_source_by_ssrc); klass->send_rtcp = GST_DEBUG_FUNCPTR (rtp_session_send_rtcp); @@ -549,6 +607,8 @@ rtp_session_init (RTPSession * sess) sess->mtu = DEFAULT_RTCP_MTU; sess->probation = DEFAULT_PROBATION; + sess->max_dropout_time = DEFAULT_MAX_DROPOUT_TIME; + sess->max_misorder_time = DEFAULT_MAX_MISORDER_TIME; /* some default SDES entries */ sess->sdes = gst_structure_new_empty ("application/x-rtp-source-sdes"); @@ -582,6 +642,7 @@ rtp_session_init (RTPSession * sess) sess->rtcp_immediate_feedback_threshold = DEFAULT_RTCP_IMMEDIATE_FEEDBACK_THRESHOLD; sess->rtp_profile = DEFAULT_RTP_PROFILE; + sess->reduced_size_rtcp = DEFAULT_RTCP_REDUCED_SIZE; sess->last_keyframe_request = GST_CLOCK_TIME_NONE; @@ -642,16 +703,43 @@ rtp_session_create_sources (RTPSession * sess) return res; } +static void +create_source_stats (gpointer key, RTPSource * source, GValueArray * arr) +{ + GValue value = G_VALUE_INIT; + GstStructure *s; + + g_object_get (source, "stats", &s, NULL); + + g_value_init (&value, GST_TYPE_STRUCTURE); + gst_value_set_structure (&value, s); + g_value_array_append (arr, &value); + gst_structure_free (s); + g_value_unset (&value); +} + static GstStructure * rtp_session_create_stats (RTPSession * sess) { GstStructure *s; + GValueArray *source_stats; + GValue source_stats_v = G_VALUE_INIT; + guint size; s = gst_structure_new ("application/x-rtp-session-stats", "rtx-drop-count", G_TYPE_UINT, sess->stats.nacks_dropped, "sent-nack-count", G_TYPE_UINT, sess->stats.nacks_sent, "recv-nack-count", G_TYPE_UINT, sess->stats.nacks_received, NULL); + size = g_hash_table_size (sess->ssrcs[sess->mask_idx]); + source_stats = g_value_array_new (size); + g_hash_table_foreach (sess->ssrcs[sess->mask_idx], + (GHFunc) create_source_stats, source_stats); + + g_value_init (&source_stats_v, G_TYPE_VALUE_ARRAY); + g_value_take_boxed (&source_stats_v, source_stats); + gst_structure_take_value (s, "source-stats", &source_stats_v); + return s; } @@ -722,6 +810,12 @@ rtp_session_set_property (GObject * object, guint prop_id, case PROP_PROBATION: sess->probation = g_value_get_uint (value); break; + case PROP_MAX_DROPOUT_TIME: + sess->max_dropout_time = g_value_get_uint (value); + break; + case PROP_MAX_MISORDER_TIME: + sess->max_misorder_time = g_value_get_uint (value); + break; case PROP_RTP_PROFILE: sess->rtp_profile = g_value_get_enum (value); /* trigger reconsideration */ @@ -731,6 +825,9 @@ rtp_session_set_property (GObject * object, guint prop_id, if (sess->callbacks.reconsider) sess->callbacks.reconsider (sess, sess->reconsider_user_data); break; + case PROP_RTCP_REDUCED_SIZE: + sess->reduced_size_rtcp = g_value_get_boolean (value); + break; default: G_OBJECT_WARN_INVALID_PROPERTY_ID (object, prop_id, pspec); break; @@ -792,12 +889,21 @@ rtp_session_get_property (GObject * object, guint prop_id, case PROP_PROBATION: g_value_set_uint (value, sess->probation); break; + case PROP_MAX_DROPOUT_TIME: + g_value_set_uint (value, sess->max_dropout_time); + break; + case PROP_MAX_MISORDER_TIME: + g_value_set_uint (value, sess->max_misorder_time); + break; case PROP_STATS: g_value_take_boxed (value, rtp_session_create_stats (sess)); break; case PROP_RTP_PROFILE: g_value_set_enum (value, sess->rtp_profile); break; + case PROP_RTCP_REDUCED_SIZE: + g_value_set_boolean (value, sess->reduced_size_rtcp); + break; default: G_OBJECT_WARN_INVALID_PROPERTY_ID (object, prop_id, pspec); break; @@ -898,6 +1004,28 @@ on_sender_timeout (RTPSession * sess, RTPSource * source) g_object_unref (source); } +static void +on_new_sender_ssrc (RTPSession * sess, RTPSource * source) +{ + g_object_ref (source); + RTP_SESSION_UNLOCK (sess); + g_signal_emit (sess, rtp_session_signals[SIGNAL_ON_NEW_SENDER_SSRC], 0, + source); + RTP_SESSION_LOCK (sess); + g_object_unref (source); +} + +static void +on_sender_ssrc_active (RTPSession * sess, RTPSource * source) +{ + g_object_ref (source); + RTP_SESSION_UNLOCK (sess); + g_signal_emit (sess, rtp_session_signals[SIGNAL_ON_SENDER_SSRC_ACTIVE], 0, + source); + RTP_SESSION_LOCK (sess); + g_object_unref (source); +} + /** * rtp_session_new: * @@ -1102,7 +1230,7 @@ rtp_session_set_request_time_callback (RTPSession * sess, * @sess: an #RTPSession * @bandwidth: the bandwidth allocated * - * Set the session bandwidth in bytes per second. + * Set the session bandwidth in bits per second. */ void rtp_session_set_bandwidth (RTPSession * sess, gdouble bandwidth) @@ -1141,7 +1269,7 @@ rtp_session_get_bandwidth (RTPSession * sess) * @sess: an #RTPSession * @bandwidth: the RTCP bandwidth * - * Set the bandwidth in bytes per second that should be used for RTCP + * Set the bandwidth in bits per second that should be used for RTCP * messages. */ void @@ -1564,10 +1692,9 @@ obtain_source (RTPSession * sess, guint32 ssrc, gboolean * created, /* for RTP packets we need to set the source in probation. Receiving RTCP * packets of an SSRC, on the other hand, is a strong indication that we * are dealing with a valid source. */ - if (rtp) - g_object_set (source, "probation", sess->probation, NULL); - else - g_object_set (source, "probation", 0, NULL); + g_object_set (source, "probation", rtp ? sess->probation : 0, + "max-dropout-time", sess->max_dropout_time, "max-misorder-time", + sess->max_misorder_time, NULL); /* store from address, if any */ if (pinfo->address) { @@ -2754,6 +2881,10 @@ rtp_session_update_send_caps (RTPSession * sess, GstCaps * caps) sess->internal_ssrc_from_caps_or_property = TRUE; if (source) { rtp_source_update_caps (source, caps); + + if (created) + on_new_sender_ssrc (sess, source); + g_object_unref (source); } @@ -2806,6 +2937,8 @@ rtp_session_send_rtp (RTPSession * sess, gpointer data, gboolean is_list, goto invalid_packet; source = obtain_internal_source (sess, pinfo.ssrc, &created, current_time); + if (created) + on_new_sender_ssrc (sess, source); prevsender = RTP_SOURCE_IS_SENDER (source); oldrate = source->bitrate; @@ -3119,6 +3252,9 @@ session_start_rtcp (RTPSession * sess, ReportData * data) gst_rtcp_buffer_map (data->rtcp, GST_MAP_READWRITE, rtcp); + if (data->is_early && sess->reduced_size_rtcp) + return; + if (RTP_SOURCE_IS_SENDER (own)) { guint64 ntptime; guint32 rtptime; @@ -3715,7 +3851,7 @@ generate_rtcp (const gchar * key, RTPSource * source, ReportData * data) g_hash_table_foreach (sess->ssrcs[sess->mask_idx], (GHFunc) session_report_blocks, data); } - if (!data->has_sdes) + if (!data->has_sdes && (!data->is_early || !sess->reduced_size_rtcp)) session_sdes (sess, data); if (data->have_fir) @@ -3817,6 +3953,10 @@ rtp_session_on_timeout (RTPSession * sess, GstClockTime current_time, source = obtain_internal_source (sess, sess->suggested_ssrc, &created, current_time); sess->internal_ssrc_set = TRUE; + + if (created) + on_new_sender_ssrc (sess, source); + g_object_unref (source); } @@ -3842,6 +3982,9 @@ rtp_session_on_timeout (RTPSession * sess, GstClockTime current_time, /* update point-to-point status */ session_update_ptp (sess); + /* notify about updated statistics */ + g_object_notify (G_OBJECT (sess), "stats"); + /* see if we need to generate SR or RR packets */ if (!is_rtcp_time (sess, current_time, &data)) goto done; @@ -3883,7 +4026,7 @@ done: /* push out the RTCP packets */ while ((output = g_queue_pop_head (&data.output))) { - gboolean do_not_suppress; + gboolean do_not_suppress, empty_buffer; GstBuffer *buffer = output->buffer; RTPSource *source = output->source; @@ -3891,7 +4034,13 @@ done: g_signal_emit (sess, rtp_session_signals[SIGNAL_ON_SENDING_RTCP], 0, buffer, data.is_early, &do_not_suppress); - if (sess->callbacks.send_rtcp && (do_not_suppress || !data.may_suppress)) { + empty_buffer = gst_buffer_get_size (buffer) == 0; + + if (empty_buffer) + g_warning ("rtpsession: Trying to send an empty RTCP packet"); + + if (sess->callbacks.send_rtcp && + !empty_buffer && (do_not_suppress || !data.may_suppress)) { guint packet_size; packet_size = gst_buffer_get_size (buffer) + sess->header_len; @@ -3903,11 +4052,17 @@ done: sess->callbacks.send_rtcp (sess, source, buffer, output->is_bye, sess->send_rtcp_user_data); sess->stats.nacks_sent += data.nacked_seqnums; + + RTP_SESSION_LOCK (sess); + on_sender_ssrc_active (sess, source); + RTP_SESSION_UNLOCK (sess); } else { GST_DEBUG ("freeing packet callback: %p" + " empty_buffer: %d, " " do_not_suppress: %d may_suppress: %d", sess->callbacks.send_rtcp, - do_not_suppress, data.may_suppress); - sess->stats.nacks_dropped += data.nacked_seqnums; + empty_buffer, do_not_suppress, data.may_suppress); + if (!empty_buffer) + sess->stats.nacks_dropped += data.nacked_seqnums; gst_buffer_unref (buffer); } g_object_unref (source); diff --git a/gst/rtpmanager/rtpsession.h b/gst/rtpmanager/rtpsession.h index 5af74b89b5f48b9e757fac0a5298a32a32495074..3d9935905936ae0ac381019b15c7d0135d7a00db 100644 --- a/gst/rtpmanager/rtpsession.h +++ b/gst/rtpmanager/rtpsession.h @@ -219,9 +219,13 @@ struct _RTPSession { GstStructure *sdes; guint probation; + guint32 max_dropout_time; + guint32 max_misorder_time; GstRTPProfile rtp_profile; + gboolean reduced_size_rtcp; + /* bandwidths */ gboolean recalc_bandwidth; guint bandwidth; @@ -309,6 +313,8 @@ struct _RTPSessionClass { guint sender_ssrc, guint media_ssrc, GstBuffer *fci); gboolean (*send_rtcp) (RTPSession *sess, GstClockTime max_delay); void (*on_receiving_rtcp) (RTPSession *sess, GstBuffer *buffer); + void (*on_new_sender_ssrc) (RTPSession *sess, RTPSource *source); + void (*on_sender_ssrc_active) (RTPSession *sess, RTPSource *source); }; GType rtp_session_get_type (void); diff --git a/gst/rtpmanager/rtpsource.c b/gst/rtpmanager/rtpsource.c index 5aabe41468ef29db05ed376cd3c18d2463435bbd..06c869d9420be1e9cfa99f794b78590af09c0c67 100644 --- a/gst/rtpmanager/rtpsource.c +++ b/gst/rtpmanager/rtpsource.c @@ -1,5 +1,7 @@ /* GStreamer * Copyright (C) <2007> Wim Taymans <wim.taymans@gmail.com> + * Copyright (C) 2015 Kurento (http://kurento.org/) + * @author: Miguel ParÃs <mparisdiaz@gmail.com> * * This library is free software; you can redistribute it and/or * modify it under the terms of the GNU Library General Public @@ -40,6 +42,8 @@ enum #define DEFAULT_IS_SENDER FALSE #define DEFAULT_SDES NULL #define DEFAULT_PROBATION RTP_DEFAULT_PROBATION +#define DEFAULT_MAX_DROPOUT_TIME 60000 +#define DEFAULT_MAX_MISORDER_TIME 2000 enum { @@ -50,7 +54,9 @@ enum PROP_IS_SENDER, PROP_SDES, PROP_STATS, - PROP_PROBATION + PROP_PROBATION, + PROP_MAX_DROPOUT_TIME, + PROP_MAX_MISORDER_TIME }; /* GObject vmethods */ @@ -219,6 +225,18 @@ rtp_source_class_init (RTPSourceClass * klass) 0, G_MAXUINT, DEFAULT_PROBATION, G_PARAM_READWRITE | G_PARAM_STATIC_STRINGS)); + g_object_class_install_property (gobject_class, PROP_MAX_DROPOUT_TIME, + g_param_spec_uint ("max-dropout-time", "Max dropout time", + "The maximum time (milliseconds) of missing packets tolerated.", + 0, G_MAXUINT, DEFAULT_MAX_DROPOUT_TIME, + G_PARAM_READWRITE | G_PARAM_STATIC_STRINGS)); + + g_object_class_install_property (gobject_class, PROP_MAX_MISORDER_TIME, + g_param_spec_uint ("max-misorder-time", "Max misorder time", + "The maximum time (milliseconds) of misordered packets tolerated.", + 0, G_MAXUINT, DEFAULT_MAX_MISORDER_TIME, + G_PARAM_READWRITE | G_PARAM_STATIC_STRINGS)); + GST_DEBUG_CATEGORY_INIT (rtp_source_debug, "rtpsource", 0, "RTP Source"); } @@ -265,6 +283,8 @@ rtp_source_init (RTPSource * src) src->probation = DEFAULT_PROBATION; src->curr_probation = src->probation; src->closing = FALSE; + src->max_dropout_time = DEFAULT_MAX_DROPOUT_TIME; + src->max_misorder_time = DEFAULT_MAX_MISORDER_TIME; src->sdes = gst_structure_new_empty ("application/x-rtp-source-sdes"); @@ -505,6 +525,12 @@ rtp_source_set_property (GObject * object, guint prop_id, case PROP_PROBATION: src->probation = g_value_get_uint (value); break; + case PROP_MAX_DROPOUT_TIME: + src->max_dropout_time = g_value_get_uint (value); + break; + case PROP_MAX_MISORDER_TIME: + src->max_misorder_time = g_value_get_uint (value); + break; default: G_OBJECT_WARN_INVALID_PROPERTY_ID (object, prop_id, pspec); break; @@ -541,6 +567,12 @@ rtp_source_get_property (GObject * object, guint prop_id, case PROP_PROBATION: g_value_set_uint (value, src->probation); break; + case PROP_MAX_DROPOUT_TIME: + g_value_set_uint (value, src->max_dropout_time); + break; + case PROP_MAX_MISORDER_TIME: + g_value_set_uint (value, src->max_misorder_time); + break; default: G_OBJECT_WARN_INVALID_PROPERTY_ID (object, prop_id, pspec); break; @@ -878,6 +910,7 @@ get_clock_rate (RTPSource * src, guint8 payload) GST_DEBUG ("got clock-rate %d", clock_rate); src->clock_rate = clock_rate; + gst_rtp_packet_rate_ctx_reset (&src->packet_rate_ctx, clock_rate); } return src->clock_rate; } @@ -1005,16 +1038,30 @@ do_bitrate_estimation (RTPSource * src, GstClockTime running_time, } static gboolean -update_receiver_stats (RTPSource * src, RTPPacketInfo * pinfo) +update_receiver_stats (RTPSource * src, RTPPacketInfo * pinfo, + gboolean is_receive) { guint16 seqnr, expected; RTPSourceStats *stats; gint16 delta; + gint32 packet_rate, max_dropout, max_misorder; stats = &src->stats; seqnr = pinfo->seqnum; + packet_rate = + gst_rtp_packet_rate_ctx_update (&src->packet_rate_ctx, pinfo->seqnum, + pinfo->rtptime); + max_dropout = + gst_rtp_packet_rate_ctx_get_max_dropout (&src->packet_rate_ctx, + src->max_dropout_time); + max_misorder = + gst_rtp_packet_rate_ctx_get_max_misorder (&src->packet_rate_ctx, + src->max_misorder_time); + GST_TRACE ("SSRC %08x, packet_rate: %d, max_dropout: %d, max_misorder: %d", + src->ssrc, packet_rate, max_dropout, max_misorder); + if (stats->cycles == -1) { GST_DEBUG ("received first packet"); /* first time we heard of this source */ @@ -1023,80 +1070,82 @@ update_receiver_stats (RTPSource * src, RTPPacketInfo * pinfo) src->curr_probation = src->probation; } - expected = src->stats.max_seq + 1; - delta = gst_rtp_buffer_compare_seqnum (expected, seqnr); + if (is_receive) { + expected = src->stats.max_seq + 1; + delta = gst_rtp_buffer_compare_seqnum (expected, seqnr); + + /* if we are still on probation, check seqnum */ + if (src->curr_probation) { + /* when in probation, we require consecutive seqnums */ + if (delta == 0) { + /* expected packet */ + GST_DEBUG ("probation: seqnr %d == expected %d", seqnr, expected); + src->curr_probation--; + if (seqnr < stats->max_seq) { + /* sequence number wrapped - count another 64K cycle. */ + stats->cycles += RTP_SEQ_MOD; + } + src->stats.max_seq = seqnr; + + if (src->curr_probation == 0) { + GST_DEBUG ("probation done!"); + init_seq (src, seqnr); + } else { + GstBuffer *q; + + GST_DEBUG ("probation %d: queue packet", src->curr_probation); + /* when still in probation, keep packets in a list. */ + g_queue_push_tail (src->packets, pinfo->data); + pinfo->data = NULL; + /* remove packets from queue if there are too many */ + while (g_queue_get_length (src->packets) > RTP_MAX_PROBATION_LEN) { + q = g_queue_pop_head (src->packets); + gst_buffer_unref (q); + } + goto done; + } + } else { + /* unexpected seqnum in probation */ + goto probation_seqnum; + } + } else if (delta >= 0 && delta < max_dropout) { + /* Clear bad packets */ + stats->bad_seq = RTP_SEQ_MOD + 1; /* so seq == bad_seq is false */ + g_queue_foreach (src->packets, (GFunc) gst_buffer_unref, NULL); + g_queue_clear (src->packets); - /* if we are still on probation, check seqnum */ - if (src->curr_probation) { - /* when in probation, we require consecutive seqnums */ - if (delta == 0) { - /* expected packet */ - GST_DEBUG ("probation: seqnr %d == expected %d", seqnr, expected); - src->curr_probation--; + /* in order, with permissible gap */ if (seqnr < stats->max_seq) { /* sequence number wrapped - count another 64K cycle. */ stats->cycles += RTP_SEQ_MOD; } - src->stats.max_seq = seqnr; - - if (src->curr_probation == 0) { - GST_DEBUG ("probation done!"); + stats->max_seq = seqnr; + } else if (delta < -max_misorder || delta >= max_dropout) { + /* the sequence number made a very large jump */ + if (seqnr == stats->bad_seq && src->packets->head) { + /* two sequential packets -- assume that the other side + * restarted without telling us so just re-sync + * (i.e., pretend this was the first packet). */ init_seq (src, seqnr); } else { - GstBuffer *q; - - GST_DEBUG ("probation %d: queue packet", src->curr_probation); - /* when still in probation, keep packets in a list. */ + /* unacceptable jump */ + stats->bad_seq = (seqnr + 1) & (RTP_SEQ_MOD - 1); + g_queue_foreach (src->packets, (GFunc) gst_buffer_unref, NULL); + g_queue_clear (src->packets); g_queue_push_tail (src->packets, pinfo->data); pinfo->data = NULL; - /* remove packets from queue if there are too many */ - while (g_queue_get_length (src->packets) > RTP_MAX_PROBATION_LEN) { - q = g_queue_pop_head (src->packets); - gst_buffer_unref (q); - } - goto done; + goto bad_sequence; } - } else { - /* unexpected seqnum in probation */ - goto probation_seqnum; - } - } else if (delta >= 0 && delta < RTP_MAX_DROPOUT) { - /* Clear bad packets */ - stats->bad_seq = RTP_SEQ_MOD + 1; /* so seq == bad_seq is false */ - g_queue_foreach (src->packets, (GFunc) gst_buffer_unref, NULL); - g_queue_clear (src->packets); - - /* in order, with permissible gap */ - if (seqnr < stats->max_seq) { - /* sequence number wrapped - count another 64K cycle. */ - stats->cycles += RTP_SEQ_MOD; - } - stats->max_seq = seqnr; - } else if (delta < -RTP_MAX_MISORDER || delta >= RTP_MAX_DROPOUT) { - /* the sequence number made a very large jump */ - if (seqnr == stats->bad_seq && src->packets->head) { - /* two sequential packets -- assume that the other side - * restarted without telling us so just re-sync - * (i.e., pretend this was the first packet). */ - init_seq (src, seqnr); - } else { - /* unacceptable jump */ - stats->bad_seq = (seqnr + 1) & (RTP_SEQ_MOD - 1); + } else { /* delta < 0 && delta >= -max_misorder */ + /* Clear bad packets */ + stats->bad_seq = RTP_SEQ_MOD + 1; /* so seq == bad_seq is false */ g_queue_foreach (src->packets, (GFunc) gst_buffer_unref, NULL); g_queue_clear (src->packets); - g_queue_push_tail (src->packets, pinfo->data); - pinfo->data = NULL; - goto bad_sequence; + + /* duplicate or reordered packet, will be filtered by jitterbuffer. */ + GST_WARNING ("duplicate or reordered packet (seqnr %u, expected %u)", + seqnr, expected); } - } else { /* delta < 0 && delta >= -RTP_MAX_MISORDER */ - /* Clear bad packets */ - stats->bad_seq = RTP_SEQ_MOD + 1; /* so seq == bad_seq is false */ - g_queue_foreach (src->packets, (GFunc) gst_buffer_unref, NULL); - g_queue_clear (src->packets); - - /* duplicate or reordered packet, will be filtered by jitterbuffer. */ - GST_WARNING ("duplicate or reordered packet (seqnr %u, expected %u)", seqnr, - expected); } src->stats.octets_received += pinfo->payload_len; @@ -1117,7 +1166,9 @@ done: } bad_sequence: { - GST_WARNING ("unacceptable seqnum received"); + GST_WARNING + ("unacceptable seqnum received (seqnr %u, delta %d, packet_rate: %d, max_dropout: %d, max_misorder: %d)", + seqnr, delta, packet_rate, max_dropout, max_misorder); return FALSE; } probation_seqnum: @@ -1146,7 +1197,7 @@ rtp_source_process_rtp (RTPSource * src, RTPPacketInfo * pinfo) g_return_val_if_fail (RTP_IS_SOURCE (src), GST_FLOW_ERROR); g_return_val_if_fail (pinfo != NULL, GST_FLOW_ERROR); - if (!update_receiver_stats (src, pinfo)) + if (!update_receiver_stats (src, pinfo, TRUE)) return GST_FLOW_OK; /* the source that sent the packet must be a sender */ @@ -1217,7 +1268,7 @@ rtp_source_send_rtp (RTPSource * src, RTPPacketInfo * pinfo) src->is_sender = TRUE; /* we are also a receiver of our packets */ - if (!update_receiver_stats (src, pinfo)) + if (!update_receiver_stats (src, pinfo, FALSE)) return GST_FLOW_OK; /* update stats for the SR */ @@ -1433,17 +1484,15 @@ rtp_source_get_new_sr (RTPSource * src, guint64 ntpnstime, * We need to apply this diff to the RTP timestamp to get the RTP timestamp * for the given ntpnstime. */ diff = GST_CLOCK_DIFF (src->last_rtime, running_time); + GST_DEBUG ("running_time %" GST_TIME_FORMAT ", diff %" GST_STIME_FORMAT, + GST_TIME_ARGS (running_time), GST_STIME_ARGS (diff)); /* now translate the diff to RTP time, handle positive and negative cases. * If there is no diff, we already set rtptime correctly above. */ if (diff > 0) { - GST_DEBUG ("running_time %" GST_TIME_FORMAT ", diff %" GST_TIME_FORMAT, - GST_TIME_ARGS (running_time), GST_TIME_ARGS (diff)); t_rtp += gst_util_uint64_scale_int (diff, src->clock_rate, GST_SECOND); } else { diff = -diff; - GST_DEBUG ("running_time %" GST_TIME_FORMAT ", diff -%" GST_TIME_FORMAT, - GST_TIME_ARGS (running_time), GST_TIME_ARGS (diff)); t_rtp -= gst_util_uint64_scale_int (diff, src->clock_rate, GST_SECOND); } } else { diff --git a/gst/rtpmanager/rtpsource.h b/gst/rtpmanager/rtpsource.h index 0f47faea02c18e9023820a4cdc406520ee38e65a..941c7d63e778ddca3b2d8afb8ddcb9857cb66ccb 100644 --- a/gst/rtpmanager/rtpsource.h +++ b/gst/rtpmanager/rtpsource.h @@ -1,5 +1,7 @@ /* GStreamer * Copyright (C) <2007> Wim Taymans <wim.taymans@gmail.com> + * Copyright (C) 2015 Kurento (http://kurento.org/) + * @author: Miguel ParÃs <mparisdiaz@gmail.com> * * This library is free software; you can redistribute it and/or * modify it under the terms of the GNU Library General Public @@ -174,6 +176,9 @@ struct _RTPSource { guint64 bytes_received; GQueue *packets; + RTPPacketRateCtx packet_rate_ctx; + guint32 max_dropout_time; + guint32 max_misorder_time; RTPSourceCallbacks callbacks; gpointer user_data; diff --git a/gst/rtpmanager/rtpstats.c b/gst/rtpmanager/rtpstats.c index f9f7c2c79db5a7cc85a7d702bcb9d9a37b805f6a..984bc9f76a7defc06038132389c5842b0ba4b4e1 100644 --- a/gst/rtpmanager/rtpstats.c +++ b/gst/rtpmanager/rtpstats.c @@ -1,5 +1,7 @@ /* GStreamer * Copyright (C) <2007> Wim Taymans <wim.taymans@gmail.com> + * Copyright (C) 2015 Kurento (http://kurento.org/) + * @author: Miguel ParÃs <mparisdiaz@gmail.com> * * This library is free software; you can redistribute it and/or * modify it under the terms of the GNU Library General Public @@ -19,6 +21,89 @@ #include "rtpstats.h" +void +gst_rtp_packet_rate_ctx_reset (RTPPacketRateCtx * ctx, guint32 clock_rate) +{ + ctx->clock_rate = clock_rate; + ctx->probed = FALSE; + ctx->avg_packet_rate = -1; +} + +guint32 +gst_rtp_packet_rate_ctx_update (RTPPacketRateCtx * ctx, guint16 seqnum, + guint32 ts) +{ + guint64 new_ts, diff_ts; + gint diff_seqnum; + guint32 new_packet_rate; + + if (ctx->clock_rate <= 0) { + return ctx->avg_packet_rate; + } + + if (!ctx->probed) { + ctx->last_seqnum = seqnum; + ctx->last_ts = ts; + ctx->probed = TRUE; + return ctx->avg_packet_rate; + } + + new_ts = ctx->last_ts; + gst_rtp_buffer_ext_timestamp (&new_ts, ts); + diff_seqnum = gst_rtp_buffer_compare_seqnum (ctx->last_seqnum, seqnum); + if (diff_seqnum <= 0 || new_ts <= ctx->last_ts) { + return ctx->avg_packet_rate; + } + + diff_ts = new_ts - ctx->last_ts; + diff_ts = gst_util_uint64_scale_int (diff_ts, GST_SECOND, ctx->clock_rate); + new_packet_rate = gst_util_uint64_scale (diff_seqnum, GST_SECOND, diff_ts); + + /* The goal is that higher packet rates "win". + * If there's a sudden burst, the average will go up fast, + * but it will go down again slowly. + * This is useful for bursty cases, where a lot of packets are close + * to each other and should allow a higher reorder/dropout there. + */ + if (ctx->avg_packet_rate > new_packet_rate) { + ctx->avg_packet_rate = (7 * ctx->avg_packet_rate + new_packet_rate + 7) / 8; + } else { + ctx->avg_packet_rate = (ctx->avg_packet_rate + new_packet_rate + 1) / 2; + } + + ctx->last_seqnum = seqnum; + ctx->last_ts = new_ts; + + return ctx->avg_packet_rate; +} + +guint32 +gst_rtp_packet_rate_ctx_get (RTPPacketRateCtx * ctx) +{ + return ctx->avg_packet_rate; +} + +guint32 +gst_rtp_packet_rate_ctx_get_max_dropout (RTPPacketRateCtx * ctx, gint32 time_ms) +{ + if (time_ms <= 0 || !ctx->probed) { + return RTP_DEF_DROPOUT; + } + + return MAX (RTP_MIN_DROPOUT, ctx->avg_packet_rate * time_ms / 1000); +} + +guint32 +gst_rtp_packet_rate_ctx_get_max_misorder (RTPPacketRateCtx * ctx, + gint32 time_ms) +{ + if (time_ms <= 0 || !ctx->probed) { + return RTP_DEF_MISORDER; + } + + return MAX (RTP_MIN_MISORDER, ctx->avg_packet_rate * time_ms / 1000); +} + /** * rtp_stats_init_defaults: * @stats: an #RTPSessionStats struct diff --git a/gst/rtpmanager/rtpstats.h b/gst/rtpmanager/rtpstats.h index d221aea03ffdfea93a44f156c90a2c17d2fede02..14ba9da69248c6c341b98719b8554ad329135052 100644 --- a/gst/rtpmanager/rtpstats.h +++ b/gst/rtpmanager/rtpstats.h @@ -1,5 +1,7 @@ /* GStreamer * Copyright (C) <2007> Wim Taymans <wim.taymans@gmail.com> + * Copyright (C) 2015 Kurento (http://kurento.org/) + * @author: Miguel ParÃs <mparisdiaz@gmail.com> * * This library is free software; you can redistribute it and/or * modify it under the terms of the GNU Library General Public @@ -183,15 +185,37 @@ typedef struct { #define RTP_STATS_BYE_TIMEOUT (2 * GST_SECOND) /* - * The maximum number of missing packets we tolerate. These are packets with a - * sequence number bigger than the last seen packet. + * The default and minimum values of the maximum number of missing packets we tolerate. + * These are packets with asequence number bigger than the last seen packet. */ -#define RTP_MAX_DROPOUT 3000 +#define RTP_DEF_DROPOUT 3000 +#define RTP_MIN_DROPOUT 30 + /* - * The maximum number of misordered packets we tolerate. These are packets with - * a sequence number smaller than the last seen packet. + * The default and minimum values of the maximum number of misordered packets we tolerate. + * These are packets with a sequence number smaller than the last seen packet. */ -#define RTP_MAX_MISORDER 100 +#define RTP_DEF_MISORDER 100 +#define RTP_MIN_MISORDER 10 + +/** + * RTPPacketRateCtx: + * + * Context to calculate the pseudo-average packet rate. + */ +typedef struct { + gboolean probed; + guint32 clock_rate; + guint16 last_seqnum; + guint64 last_ts; + guint32 avg_packet_rate; +} RTPPacketRateCtx; + +void gst_rtp_packet_rate_ctx_reset (RTPPacketRateCtx * ctx, guint32 clock_rate); +guint32 gst_rtp_packet_rate_ctx_update (RTPPacketRateCtx *ctx, guint16 seqnum, guint32 ts); +guint32 gst_rtp_packet_rate_ctx_get (RTPPacketRateCtx *ctx); +guint32 gst_rtp_packet_rate_ctx_get_max_dropout (RTPPacketRateCtx *ctx, gint32 time_ms); +guint32 gst_rtp_packet_rate_ctx_get_max_misorder (RTPPacketRateCtx *ctx, gint32 time_ms); /** * RTPSessionStats: diff --git a/gst/rtsp/Makefile.in b/gst/rtsp/Makefile.in index dd1c76bcba985a335e0a5b4808f4df7e8de24b35..2c4c5ee6b437b994c61ed206d5c95876eae7593c 100644 --- a/gst/rtsp/Makefile.in +++ b/gst/rtsp/Makefile.in @@ -480,6 +480,8 @@ VALGRIND_PATH = @VALGRIND_PATH@ VERSION = @VERSION@ VPX_130_CFLAGS = @VPX_130_CFLAGS@ VPX_130_LIBS = @VPX_130_LIBS@ +VPX_140_CFLAGS = @VPX_140_CFLAGS@ +VPX_140_LIBS = @VPX_140_LIBS@ VPX_CFLAGS = @VPX_CFLAGS@ VPX_LIBS = @VPX_LIBS@ WARNING_CFLAGS = @WARNING_CFLAGS@ diff --git a/gst/rtsp/gstrtspsrc.c b/gst/rtsp/gstrtspsrc.c index 1f22e980de2ed4b1dd15fa8b25c1696f3b959168..7b40f379fdfd6ddbcfd6ecfa18ad61174fce1362 100644 --- a/gst/rtsp/gstrtspsrc.c +++ b/gst/rtsp/gstrtspsrc.c @@ -232,6 +232,7 @@ gst_rtsp_src_ntp_time_source_get_type (void) #define DEFAULT_DO_RETRANSMISSION TRUE #define DEFAULT_NTP_TIME_SOURCE NTP_TIME_SOURCE_NTP #define DEFAULT_USER_AGENT "GStreamer/" PACKAGE_VERSION +#define DEFAULT_MAX_RTCP_RTP_TIME_DIFF 1000 enum { @@ -269,7 +270,8 @@ enum PROP_TLS_INTERACTION, PROP_DO_RETRANSMISSION, PROP_NTP_TIME_SOURCE, - PROP_USER_AGENT + PROP_USER_AGENT, + PROP_MAX_RTCP_RTP_TIME_DIFF }; #define GST_TYPE_RTSP_NAT_METHOD (gst_rtsp_nat_method_get_type()) @@ -340,6 +342,8 @@ static gboolean gst_rtspsrc_stream_push_event (GstRTSPSrc * src, GstRTSPStream * stream, GstEvent * event); static gboolean gst_rtspsrc_push_event (GstRTSPSrc * src, GstEvent * event); static void gst_rtspsrc_connection_flush (GstRTSPSrc * src, gboolean flush); +static GstRTSPResult gst_rtsp_conninfo_close (GstRTSPSrc * src, + GstRTSPConnInfo * info, gboolean free); typedef struct { @@ -732,6 +736,13 @@ gst_rtspsrc_class_init (GstRTSPSrcClass * klass) "The User-Agent string to send to the server", DEFAULT_USER_AGENT, G_PARAM_READWRITE | G_PARAM_STATIC_STRINGS)); + g_object_class_install_property (gobject_class, PROP_MAX_RTCP_RTP_TIME_DIFF, + g_param_spec_int ("max-rtcp-rtp-time-diff", "Max RTCP RTP Time Diff", + "Maximum amount of time in ms that the RTP time in RTCP SRs " + "is allowed to be ahead (-1 disabled)", -1, G_MAXINT, + DEFAULT_MAX_RTCP_RTP_TIME_DIFF, + G_PARAM_READWRITE | G_PARAM_STATIC_STRINGS)); + /** * GstRTSPSrc::handle-request: * @rtspsrc: a #GstRTSPSrc @@ -879,6 +890,7 @@ gst_rtspsrc_init (GstRTSPSrc * src) src->do_retransmission = DEFAULT_DO_RETRANSMISSION; src->ntp_time_source = DEFAULT_NTP_TIME_SOURCE; src->user_agent = g_strdup (DEFAULT_USER_AGENT); + src->max_rtcp_rtp_time_diff = DEFAULT_MAX_RTCP_RTP_TIME_DIFF; /* get a list of all extensions */ src->extensions = gst_rtsp_ext_list_get (); @@ -1072,26 +1084,22 @@ gst_rtspsrc_set_property (GObject * object, guint prop_id, const GValue * value, gst_rtspsrc_set_proxy (rtspsrc, g_value_get_string (value)); break; case PROP_PROXY_ID: - if (rtspsrc->prop_proxy_id) - g_free (rtspsrc->prop_proxy_id); + g_free (rtspsrc->prop_proxy_id); rtspsrc->prop_proxy_id = g_value_dup_string (value); break; case PROP_PROXY_PW: - if (rtspsrc->prop_proxy_pw) - g_free (rtspsrc->prop_proxy_pw); + g_free (rtspsrc->prop_proxy_pw); rtspsrc->prop_proxy_pw = g_value_dup_string (value); break; case PROP_RTP_BLOCKSIZE: rtspsrc->rtp_blocksize = g_value_get_uint (value); break; case PROP_USER_ID: - if (rtspsrc->user_id) - g_free (rtspsrc->user_id); + g_free (rtspsrc->user_id); rtspsrc->user_id = g_value_dup_string (value); break; case PROP_USER_PW: - if (rtspsrc->user_pw) - g_free (rtspsrc->user_pw); + g_free (rtspsrc->user_pw); rtspsrc->user_pw = g_value_dup_string (value); break; case PROP_BUFFER_MODE: @@ -1102,10 +1110,8 @@ gst_rtspsrc_set_property (GObject * object, guint prop_id, const GValue * value, const gchar *str; str = g_value_get_string (value); - if (str) { - sscanf (str, "%u-%u", - &rtspsrc->client_port_range.min, &rtspsrc->client_port_range.max); - } else { + if (sscanf (str, "%u-%u", &rtspsrc->client_port_range.min, + &rtspsrc->client_port_range.max) != 2) { rtspsrc->client_port_range.min = 0; rtspsrc->client_port_range.max = 0; } @@ -1161,6 +1167,9 @@ gst_rtspsrc_set_property (GObject * object, guint prop_id, const GValue * value, g_free (rtspsrc->user_agent); rtspsrc->user_agent = g_value_dup_string (value); break; + case PROP_MAX_RTCP_RTP_TIME_DIFF: + rtspsrc->max_rtcp_rtp_time_diff = g_value_get_int (value); + break; default: G_OBJECT_WARN_INVALID_PROPERTY_ID (object, prop_id, pspec); break; @@ -1304,6 +1313,9 @@ gst_rtspsrc_get_property (GObject * object, guint prop_id, GValue * value, case PROP_USER_AGENT: g_value_set_string (value, rtspsrc->user_agent); break; + case PROP_MAX_RTCP_RTP_TIME_DIFF: + g_value_set_int (value, rtspsrc->max_rtcp_rtp_time_diff); + break; default: G_OBJECT_WARN_INVALID_PROPERTY_ID (object, prop_id, pspec); break; @@ -3493,6 +3505,11 @@ gst_rtspsrc_stream_configure_manager (GstRTSPSrc * src, GstRTSPStream * stream, NULL); } + if (g_object_class_find_property (klass, "max-rtcp-rtp-time-diff")) { + g_object_set (src->manager, "max-rtcp-rtp-time-diff", + src->max_rtcp_rtp_time_diff, NULL); + } + /* buffer mode pauses are handled by adding offsets to buffer times, * but some depayloaders may have a hard time syncing output times * with such input times, e.g. container ones, most notably ASF */ @@ -4476,69 +4493,90 @@ gst_rtsp_conninfo_connect (GstRTSPSrc * src, GstRTSPConnInfo * info, gboolean async) { GstRTSPResult res; + GstRTSPMessage response; + gboolean retry = FALSE; + memset (&response, 0, sizeof (response)); + gst_rtsp_message_init (&response); + do { + if (info->connection == NULL) { + if (info->url == NULL) { + GST_DEBUG_OBJECT (src, "parsing uri (%s)...", info->location); + if ((res = gst_rtsp_url_parse (info->location, &info->url)) < 0) + goto parse_error; + } + /* create connection */ + GST_DEBUG_OBJECT (src, "creating connection (%s)...", info->location); + if ((res = gst_rtsp_connection_create (info->url, &info->connection)) < 0) + goto could_not_create; - if (info->connection == NULL) { - if (info->url == NULL) { - GST_DEBUG_OBJECT (src, "parsing uri (%s)...", info->location); - if ((res = gst_rtsp_url_parse (info->location, &info->url)) < 0) - goto parse_error; - } - - /* create connection */ - GST_DEBUG_OBJECT (src, "creating connection (%s)...", info->location); - if ((res = gst_rtsp_connection_create (info->url, &info->connection)) < 0) - goto could_not_create; + if (retry) { + gst_rtspsrc_setup_auth (src, &response); + } - if (info->url_str) g_free (info->url_str); - info->url_str = gst_rtsp_url_get_request_uri (info->url); + info->url_str = gst_rtsp_url_get_request_uri (info->url); - GST_DEBUG_OBJECT (src, "sanitized uri %s", info->url_str); + GST_DEBUG_OBJECT (src, "sanitized uri %s", info->url_str); - if (info->url->transports & GST_RTSP_LOWER_TRANS_TLS) { - if (!gst_rtsp_connection_set_tls_validation_flags (info->connection, - src->tls_validation_flags)) - GST_WARNING_OBJECT (src, "Unable to set TLS validation flags"); + if (info->url->transports & GST_RTSP_LOWER_TRANS_TLS) { + if (!gst_rtsp_connection_set_tls_validation_flags (info->connection, + src->tls_validation_flags)) + GST_WARNING_OBJECT (src, "Unable to set TLS validation flags"); - if (src->tls_database) - gst_rtsp_connection_set_tls_database (info->connection, - src->tls_database); + if (src->tls_database) + gst_rtsp_connection_set_tls_database (info->connection, + src->tls_database); - if (src->tls_interaction) - gst_rtsp_connection_set_tls_interaction (info->connection, - src->tls_interaction); - } + if (src->tls_interaction) + gst_rtsp_connection_set_tls_interaction (info->connection, + src->tls_interaction); + } - if (info->url->transports & GST_RTSP_LOWER_TRANS_HTTP) - gst_rtsp_connection_set_tunneled (info->connection, TRUE); + if (info->url->transports & GST_RTSP_LOWER_TRANS_HTTP) + gst_rtsp_connection_set_tunneled (info->connection, TRUE); - if (src->proxy_host) { - GST_DEBUG_OBJECT (src, "setting proxy %s:%d", src->proxy_host, - src->proxy_port); - gst_rtsp_connection_set_proxy (info->connection, src->proxy_host, - src->proxy_port); + if (src->proxy_host) { + GST_DEBUG_OBJECT (src, "setting proxy %s:%d", src->proxy_host, + src->proxy_port); + gst_rtsp_connection_set_proxy (info->connection, src->proxy_host, + src->proxy_port); + } } - } - if (!info->connected) { - /* connect */ - if (async) - GST_ELEMENT_PROGRESS (src, CONTINUE, "connect", - ("Connecting to %s", info->location)); - GST_DEBUG_OBJECT (src, "connecting (%s)...", info->location); - if ((res = - gst_rtsp_connection_connect (info->connection, - src->ptcp_timeout)) < 0) - goto could_not_connect; + if (!info->connected) { + /* connect */ + if (async) + GST_ELEMENT_PROGRESS (src, CONTINUE, "connect", + ("Connecting to %s", info->location)); + GST_DEBUG_OBJECT (src, "connecting (%s)...", info->location); + res = gst_rtsp_connection_connect_with_response (info->connection, + src->ptcp_timeout, &response); + + if (response.type == GST_RTSP_MESSAGE_HTTP_RESPONSE && + response.type_data.response.code == GST_RTSP_STS_UNAUTHORIZED) { + gst_rtsp_conninfo_close (src, info, TRUE); + if (!retry) + retry = TRUE; + else + retry = FALSE; // we should not retry more than once + } else { + retry = FALSE; + } - info->connected = TRUE; - } + if (res == GST_RTSP_OK) + info->connected = TRUE; + else if (!retry) + goto could_not_connect; + } + } while (!info->connected && retry); + gst_rtsp_message_unset (&response); return GST_RTSP_OK; /* ERRORS */ parse_error: { GST_ERROR_OBJECT (src, "No valid RTSP URL was provided"); + gst_rtsp_message_unset (&response); return res; } could_not_create: @@ -4546,6 +4584,7 @@ could_not_create: gchar *str = gst_rtsp_strresult (res); GST_ERROR_OBJECT (src, "Could not create connection. (%s)", str); g_free (str); + gst_rtsp_message_unset (&response); return res; } could_not_connect: @@ -4553,6 +4592,7 @@ could_not_connect: gchar *str = gst_rtsp_strresult (res); GST_ERROR_OBJECT (src, "Could not connect to server. (%s)", str); g_free (str); + gst_rtsp_message_unset (&response); return res; } } diff --git a/gst/rtsp/gstrtspsrc.h b/gst/rtsp/gstrtspsrc.h index a3d0a9a61d8253aba0ecbb6e569c223d22acd756..dc218dc115289ee6cc6452bc71e23aae95b04088 100644 --- a/gst/rtsp/gstrtspsrc.h +++ b/gst/rtsp/gstrtspsrc.h @@ -238,6 +238,7 @@ struct _GstRTSPSrc { gboolean do_retransmission; gint ntp_time_source; gchar *user_agent; + GstClockTime max_rtcp_rtp_time_diff; /* state */ GstRTSPState state; diff --git a/gst/shapewipe/Makefile.in b/gst/shapewipe/Makefile.in index a7cffc9df1319deaac5eb971c53dffcc12db0a6e..b34cb4df9cc7a568a350786c65e8c6b641f8a34e 100644 --- a/gst/shapewipe/Makefile.in +++ b/gst/shapewipe/Makefile.in @@ -476,6 +476,8 @@ VALGRIND_PATH = @VALGRIND_PATH@ VERSION = @VERSION@ VPX_130_CFLAGS = @VPX_130_CFLAGS@ VPX_130_LIBS = @VPX_130_LIBS@ +VPX_140_CFLAGS = @VPX_140_CFLAGS@ +VPX_140_LIBS = @VPX_140_LIBS@ VPX_CFLAGS = @VPX_CFLAGS@ VPX_LIBS = @VPX_LIBS@ WARNING_CFLAGS = @WARNING_CFLAGS@ diff --git a/gst/smpte/Makefile.in b/gst/smpte/Makefile.in index e9c7e6e7fde615488e68173a654f818fbff9f290..9def17c9753792233067046a45504d2f0383e231 100644 --- a/gst/smpte/Makefile.in +++ b/gst/smpte/Makefile.in @@ -479,6 +479,8 @@ VALGRIND_PATH = @VALGRIND_PATH@ VERSION = @VERSION@ VPX_130_CFLAGS = @VPX_130_CFLAGS@ VPX_130_LIBS = @VPX_130_LIBS@ +VPX_140_CFLAGS = @VPX_140_CFLAGS@ +VPX_140_LIBS = @VPX_140_LIBS@ VPX_CFLAGS = @VPX_CFLAGS@ VPX_LIBS = @VPX_LIBS@ WARNING_CFLAGS = @WARNING_CFLAGS@ diff --git a/gst/smpte/gstsmpte.c b/gst/smpte/gstsmpte.c index 696a1b4cdfaaf5ecd00e6c5574da06bb5682d88f..294d809ea1a4f815fa9d718d755716e1c57d9163 100644 --- a/gst/smpte/gstsmpte.c +++ b/gst/smpte/gstsmpte.c @@ -97,18 +97,6 @@ enum PROP_INVERT }; -/* FIXME: should use video meta etc. */ -#define I420_Y_ROWSTRIDE(width) (GST_ROUND_UP_4(width)) -#define I420_U_ROWSTRIDE(width) (GST_ROUND_UP_8(width)/2) -#define I420_V_ROWSTRIDE(width) ((GST_ROUND_UP_8(I420_Y_ROWSTRIDE(width)))/2) - -#define I420_Y_OFFSET(w,h) (0) -#define I420_U_OFFSET(w,h) (I420_Y_OFFSET(w,h)+(I420_Y_ROWSTRIDE(w)*GST_ROUND_UP_2(h))) -#define I420_V_OFFSET(w,h) (I420_U_OFFSET(w,h)+(I420_U_ROWSTRIDE(w)*GST_ROUND_UP_2(h)/2)) - -#define I420_SIZE(w,h) (I420_V_OFFSET(w,h)+(I420_V_ROWSTRIDE(w)*GST_ROUND_UP_2(h)/2)) - - #define GST_TYPE_SMPTE_TRANSITION_TYPE (gst_smpte_transition_type_get_type()) static GType gst_smpte_transition_type_get_type (void) @@ -219,13 +207,13 @@ static const int u_colors[] = { 128, 0, 170, 46, 212, 85, 255, 128, 0, 128 }; static const int v_colors[] = { 128, 155, 0, 21, 235, 255, 107, 128, 128, 255 }; static void -fill_i420 (guint8 * data, gint width, gint height, gint color) +fill_i420 (GstVideoInfo * vinfo, guint8 * data, gint height, gint color) { - gint size = I420_Y_ROWSTRIDE (width) * GST_ROUND_UP_2 (height); + gint size = GST_VIDEO_INFO_COMP_STRIDE (vinfo, 0) * GST_ROUND_UP_2 (height); gint size4 = size >> 2; guint8 *yp = data; - guint8 *up = data + I420_U_OFFSET (width, height); - guint8 *vp = data + I420_V_OFFSET (width, height); + guint8 *up = data + GST_VIDEO_INFO_COMP_OFFSET (vinfo, 1); + guint8 *vp = data + GST_VIDEO_INFO_COMP_OFFSET (vinfo, 2); memset (yp, y_colors[color], size); memset (up, u_colors[color], size4); @@ -375,6 +363,9 @@ gst_smpte_finalize (GstSMPTE * smpte) if (smpte->collect) { gst_object_unref (smpte->collect); } + if (smpte->mask) { + gst_mask_destroy (smpte->mask); + } G_OBJECT_CLASS (parent_class)->finalize ((GObject *) smpte); } @@ -496,21 +487,21 @@ gst_smpte_collected (GstCollectPads * pads, GstSMPTE * smpte) if (in1 == NULL) { /* if no input, make picture black */ - in1 = gst_buffer_new_and_alloc (I420_SIZE (smpte->width, smpte->height)); + in1 = gst_buffer_new_and_alloc (GST_VIDEO_INFO_SIZE (&smpte->vinfo1)); gst_buffer_map (in1, &map, GST_MAP_WRITE); - fill_i420 (map.data, smpte->width, smpte->height, 7); + fill_i420 (&smpte->vinfo1, map.data, smpte->height, 7); gst_buffer_unmap (in1, &map); } if (in2 == NULL) { /* if no input, make picture white */ - in2 = gst_buffer_new_and_alloc (I420_SIZE (smpte->width, smpte->height)); + in2 = gst_buffer_new_and_alloc (GST_VIDEO_INFO_SIZE (&smpte->vinfo2)); gst_buffer_map (in2, &map, GST_MAP_WRITE); - fill_i420 (map.data, smpte->width, smpte->height, 0); + fill_i420 (&smpte->vinfo2, map.data, smpte->height, 0); gst_buffer_unmap (in2, &map); } if (smpte->position < smpte->end_position) { - outbuf = gst_buffer_new_and_alloc (I420_SIZE (smpte->width, smpte->height)); + outbuf = gst_buffer_new_and_alloc (GST_VIDEO_INFO_SIZE (&smpte->vinfo1)); /* set caps if not done yet */ if (!gst_pad_has_current_caps (smpte->srcpad)) { diff --git a/gst/spectrum/Makefile.in b/gst/spectrum/Makefile.in index 0c48bf92582211e329815637f0ab1ea0239c9891..ad2ec5772f283814e7aff628d2ef3ff7e26d3784 100644 --- a/gst/spectrum/Makefile.in +++ b/gst/spectrum/Makefile.in @@ -477,6 +477,8 @@ VALGRIND_PATH = @VALGRIND_PATH@ VERSION = @VERSION@ VPX_130_CFLAGS = @VPX_130_CFLAGS@ VPX_130_LIBS = @VPX_130_LIBS@ +VPX_140_CFLAGS = @VPX_140_CFLAGS@ +VPX_140_LIBS = @VPX_140_LIBS@ VPX_CFLAGS = @VPX_CFLAGS@ VPX_LIBS = @VPX_LIBS@ WARNING_CFLAGS = @WARNING_CFLAGS@ diff --git a/gst/udp/Makefile.in b/gst/udp/Makefile.in index 60a3cac8856d1cb5bf5f054fa5a7dfdb887bf799..8e2ffcf85baf3d9066f197ad97cf1b5e2439abcf 100644 --- a/gst/udp/Makefile.in +++ b/gst/udp/Makefile.in @@ -480,6 +480,8 @@ VALGRIND_PATH = @VALGRIND_PATH@ VERSION = @VERSION@ VPX_130_CFLAGS = @VPX_130_CFLAGS@ VPX_130_LIBS = @VPX_130_LIBS@ +VPX_140_CFLAGS = @VPX_140_CFLAGS@ +VPX_140_LIBS = @VPX_140_LIBS@ VPX_CFLAGS = @VPX_CFLAGS@ VPX_LIBS = @VPX_LIBS@ WARNING_CFLAGS = @WARNING_CFLAGS@ diff --git a/gst/udp/gstudpsrc.c b/gst/udp/gstudpsrc.c index b4ebba46c721f4563cc6a0e2e819b973908d7bef..34aa7e46441c0a74a3eb2392d9db061cab3f124e 100644 --- a/gst/udp/gstudpsrc.c +++ b/gst/udp/gstudpsrc.c @@ -41,7 +41,7 @@ * one. * * The #GstUDPSrc:caps property is mainly used to give a type to the UDP packet - * so that they can be autoplugged in GStreamer pipelines. This is very usefull + * so that they can be autoplugged in GStreamer pipelines. This is very useful * for RTP implementations where the contents of the UDP packets is transfered * out-of-bounds using SDP or other means. * @@ -112,24 +112,7 @@ #include <gst/net/gstnetaddressmeta.h> -#if GLIB_CHECK_VERSION (2, 35, 7) #include <gio/gnetworking.h> -#else - -/* nicked from gnetworking.h */ -#ifdef G_OS_WIN32 -#ifndef _WIN32_WINNT -#define _WIN32_WINNT 0x0501 -#endif -#include <winsock2.h> -#undef interface -#include <ws2tcpip.h> /* for socklen_t */ -#endif /* G_OS_WIN32 */ - -#ifdef HAVE_SYS_SOCKET_H -#include <sys/socket.h> -#endif -#endif /* not 100% correct, but a good upper bound for memory allocation purposes */ #define MAX_IPV4_UDP_PACKET_SIZE (65536 - 8) @@ -155,6 +138,7 @@ static GstStaticPadTemplate src_template = GST_STATIC_PAD_TEMPLATE ("src", #define UDP_DEFAULT_USED_SOCKET NULL #define UDP_DEFAULT_AUTO_MULTICAST TRUE #define UDP_DEFAULT_REUSE TRUE +#define UDP_DEFAULT_LOOP TRUE enum { @@ -173,7 +157,8 @@ enum PROP_USED_SOCKET, PROP_AUTO_MULTICAST, PROP_REUSE, - PROP_ADDRESS + PROP_ADDRESS, + PROP_LOOP }; static void gst_udpsrc_uri_handler_init (gpointer g_iface, gpointer iface_data); @@ -283,6 +268,11 @@ gst_udpsrc_class_init (GstUDPSrcClass * klass) "Address to receive packets for. This is equivalent to the " "multicast-group property for now", UDP_DEFAULT_MULTICAST_GROUP, G_PARAM_READWRITE | G_PARAM_STATIC_STRINGS)); + g_object_class_install_property (gobject_class, PROP_LOOP, + g_param_spec_boolean ("loop", "Multicast Loopback", + "Used for setting the multicast loop parameter. TRUE = enable," + " FALSE = disable", UDP_DEFAULT_LOOP, + G_PARAM_READWRITE | G_PARAM_STATIC_STRINGS)); gst_element_class_add_pad_template (gstelement_class, gst_static_pad_template_get (&src_template)); @@ -322,6 +312,7 @@ gst_udpsrc_init (GstUDPSrc * udpsrc) udpsrc->auto_multicast = UDP_DEFAULT_AUTO_MULTICAST; udpsrc->used_socket = UDP_DEFAULT_USED_SOCKET; udpsrc->reuse = UDP_DEFAULT_REUSE; + udpsrc->loop = UDP_DEFAULT_LOOP; /* configure basesrc to be a live source */ gst_base_src_set_live (GST_BASE_SRC (udpsrc), TRUE); @@ -808,6 +799,9 @@ gst_udpsrc_set_property (GObject * object, guint prop_id, const GValue * value, case PROP_REUSE: udpsrc->reuse = g_value_get_boolean (value); break; + case PROP_LOOP: + udpsrc->loop = g_value_get_boolean (value); + break; default: break; } @@ -862,6 +856,9 @@ gst_udpsrc_get_property (GObject * object, guint prop_id, GValue * value, case PROP_REUSE: g_value_set_boolean (value, udpsrc->reuse); break; + case PROP_LOOP: + g_value_set_boolean (value, udpsrc->loop); + break; default: G_OBJECT_WARN_INVALID_PROPERTY_ID (object, prop_id, pspec); break; @@ -969,6 +966,7 @@ gst_udpsrc_open (GstUDPSrc * src) goto bind_error; g_object_unref (bind_saddr); + g_socket_set_multicast_loopback (src->used_socket, src->loop); } else { GST_DEBUG_OBJECT (src, "using provided socket %p", src->socket); /* we use the configured socket, try to get some info about it */ @@ -984,7 +982,6 @@ gst_udpsrc_open (GstUDPSrc * src) goto getsockname_error; } -#if GLIB_CHECK_VERSION (2, 35, 7) { gint val = 0; @@ -1016,47 +1013,6 @@ gst_udpsrc_open (GstUDPSrc * src) GST_DEBUG_OBJECT (src, "could not get udp buffer size"); } } -#elif defined (SO_RCVBUF) - { - gint rcvsize, ret; - socklen_t len; - - len = sizeof (rcvsize); - if (src->buffer_size != 0) { - rcvsize = src->buffer_size; - - GST_DEBUG_OBJECT (src, "setting udp buffer of %d bytes", rcvsize); - /* set buffer size, Note that on Linux this is typically limited to a - * maximum of around 100K. Also a minimum of 128 bytes is required on - * Linux. */ - ret = - setsockopt (g_socket_get_fd (src->used_socket), SOL_SOCKET, SO_RCVBUF, - (void *) &rcvsize, len); - if (ret != 0) { - GST_ELEMENT_WARNING (src, RESOURCE, SETTINGS, (NULL), - ("Could not create a buffer of requested %d bytes, %d: %s (%d)", - rcvsize, ret, g_strerror (errno), errno)); - } - } - - /* read the value of the receive buffer. Note that on linux this returns 2x the - * value we set because the kernel allocates extra memory for metadata. - * The default on Linux is about 100K (which is about 50K without metadata) */ - ret = - getsockopt (g_socket_get_fd (src->used_socket), SOL_SOCKET, SO_RCVBUF, - (void *) &rcvsize, &len); - if (ret == 0) - GST_DEBUG_OBJECT (src, "have udp buffer of %d bytes", rcvsize); - else - GST_DEBUG_OBJECT (src, "could not get udp buffer size"); - } -#else - if (src->buffer_size != 0) { - GST_WARNING_OBJECT (src, "don't know how to set udp buffer size on this " - "OS. Consider upgrading your GLib to >= 2.35.7 and re-compiling the " - "GStreamer udp plugin"); - } -#endif g_socket_set_broadcast (src->used_socket, TRUE); diff --git a/gst/udp/gstudpsrc.h b/gst/udp/gstudpsrc.h index 5d7e340dbcc33334029ddc5e9bb9d9215120933e..a47648322423c5f1302854c1712854d1d19f1aa2 100644 --- a/gst/udp/gstudpsrc.h +++ b/gst/udp/gstudpsrc.h @@ -60,6 +60,7 @@ struct _GstUDPSrc { gboolean close_socket; gboolean auto_multicast; gboolean reuse; + gboolean loop; /* stats */ guint max_size; diff --git a/gst/videobox/Makefile.in b/gst/videobox/Makefile.in index e9c576d00ced0b88082f826b18ecb50cdbfa6fa4..d1adc29c2349ffa5d58acb4752234f49a02d75cc 100644 --- a/gst/videobox/Makefile.in +++ b/gst/videobox/Makefile.in @@ -504,6 +504,8 @@ VALGRIND_PATH = @VALGRIND_PATH@ VERSION = @VERSION@ VPX_130_CFLAGS = @VPX_130_CFLAGS@ VPX_130_LIBS = @VPX_130_LIBS@ +VPX_140_CFLAGS = @VPX_140_CFLAGS@ +VPX_140_LIBS = @VPX_140_LIBS@ VPX_CFLAGS = @VPX_CFLAGS@ VPX_LIBS = @VPX_LIBS@ WARNING_CFLAGS = @WARNING_CFLAGS@ diff --git a/gst/videocrop/Makefile.in b/gst/videocrop/Makefile.in index 9b42b745a0bef2223facd6dd101f4e95a803e35d..96311412d7f47ff9f152496a4cb0256baafdd4df 100644 --- a/gst/videocrop/Makefile.in +++ b/gst/videocrop/Makefile.in @@ -477,6 +477,8 @@ VALGRIND_PATH = @VALGRIND_PATH@ VERSION = @VERSION@ VPX_130_CFLAGS = @VPX_130_CFLAGS@ VPX_130_LIBS = @VPX_130_LIBS@ +VPX_140_CFLAGS = @VPX_140_CFLAGS@ +VPX_140_LIBS = @VPX_140_LIBS@ VPX_CFLAGS = @VPX_CFLAGS@ VPX_LIBS = @VPX_LIBS@ WARNING_CFLAGS = @WARNING_CFLAGS@ diff --git a/gst/videofilter/Makefile.in b/gst/videofilter/Makefile.in index a672e82e400229ceb803cb90f25b970bae174da1..eab76ae6ccbf5ae82a7fd36ff8bd4e6c6db70680 100644 --- a/gst/videofilter/Makefile.in +++ b/gst/videofilter/Makefile.in @@ -480,6 +480,8 @@ VALGRIND_PATH = @VALGRIND_PATH@ VERSION = @VERSION@ VPX_130_CFLAGS = @VPX_130_CFLAGS@ VPX_130_LIBS = @VPX_130_LIBS@ +VPX_140_CFLAGS = @VPX_140_CFLAGS@ +VPX_140_LIBS = @VPX_140_LIBS@ VPX_CFLAGS = @VPX_CFLAGS@ VPX_LIBS = @VPX_LIBS@ WARNING_CFLAGS = @WARNING_CFLAGS@ diff --git a/gst/videomixer/Makefile.in b/gst/videomixer/Makefile.in index 10d76b0738fd9e07cb1a9f532ec22c604dbe2979..3208c5bb795efd2d8839bbca3a0dc0c1e87888d2 100644 --- a/gst/videomixer/Makefile.in +++ b/gst/videomixer/Makefile.in @@ -505,6 +505,8 @@ VALGRIND_PATH = @VALGRIND_PATH@ VERSION = @VERSION@ VPX_130_CFLAGS = @VPX_130_CFLAGS@ VPX_130_LIBS = @VPX_130_LIBS@ +VPX_140_CFLAGS = @VPX_140_CFLAGS@ +VPX_140_LIBS = @VPX_140_LIBS@ VPX_CFLAGS = @VPX_CFLAGS@ VPX_LIBS = @VPX_LIBS@ WARNING_CFLAGS = @WARNING_CFLAGS@ diff --git a/gst/videomixer/videomixer2.c b/gst/videomixer/videomixer2.c index 15659862d4a466db5c5723e17c53faa8e066bbcf..25fc35ae3aeb1a8fbca2b45d5a86d25790eef2c8 100644 --- a/gst/videomixer/videomixer2.c +++ b/gst/videomixer/videomixer2.c @@ -801,9 +801,9 @@ gst_videomixer2_update_qos (GstVideoMixer2 * mix, gdouble proportion, GstClockTimeDiff diff, GstClockTime timestamp) { GST_DEBUG_OBJECT (mix, - "Updating QoS: proportion %lf, diff %s%" GST_TIME_FORMAT ", timestamp %" - GST_TIME_FORMAT, proportion, (diff < 0) ? "-" : "", - GST_TIME_ARGS (ABS (diff)), GST_TIME_ARGS (timestamp)); + "Updating QoS: proportion %lf, diff %" GST_STIME_FORMAT ", timestamp %" + GST_TIME_FORMAT, proportion, GST_STIME_ARGS (diff), + GST_TIME_ARGS (timestamp)); GST_OBJECT_LOCK (mix); mix->proportion = proportion; diff --git a/gst/wavenc/Makefile.in b/gst/wavenc/Makefile.in index d999a3244496de8fb5bd2ec99efa324f5f484b7a..e1ed40039b66c3db1cc3729ef892b623c2f8ffbe 100644 --- a/gst/wavenc/Makefile.in +++ b/gst/wavenc/Makefile.in @@ -476,6 +476,8 @@ VALGRIND_PATH = @VALGRIND_PATH@ VERSION = @VERSION@ VPX_130_CFLAGS = @VPX_130_CFLAGS@ VPX_130_LIBS = @VPX_130_LIBS@ +VPX_140_CFLAGS = @VPX_140_CFLAGS@ +VPX_140_LIBS = @VPX_140_LIBS@ VPX_CFLAGS = @VPX_CFLAGS@ VPX_LIBS = @VPX_LIBS@ WARNING_CFLAGS = @WARNING_CFLAGS@ diff --git a/gst/wavparse/Makefile.in b/gst/wavparse/Makefile.in index bc79baa8619d0acd4bd2837b404843d38687bcf4..7f6a751a5ed00010ab77e3cd0899b66601590111 100644 --- a/gst/wavparse/Makefile.in +++ b/gst/wavparse/Makefile.in @@ -477,6 +477,8 @@ VALGRIND_PATH = @VALGRIND_PATH@ VERSION = @VERSION@ VPX_130_CFLAGS = @VPX_130_CFLAGS@ VPX_130_LIBS = @VPX_130_LIBS@ +VPX_140_CFLAGS = @VPX_140_CFLAGS@ +VPX_140_LIBS = @VPX_140_LIBS@ VPX_CFLAGS = @VPX_CFLAGS@ VPX_LIBS = @VPX_LIBS@ WARNING_CFLAGS = @WARNING_CFLAGS@ diff --git a/gst/wavparse/gstwavparse.c b/gst/wavparse/gstwavparse.c index 205af8894740286d46c44cabdfd135b8888d9048..1452db4ae84e0b06711d6ec9f54d28d037ad08ef 100644 --- a/gst/wavparse/gstwavparse.c +++ b/gst/wavparse/gstwavparse.c @@ -378,12 +378,14 @@ gst_wavparse_perform_seek (GstWavParse * wav, GstEvent * event) gboolean update; GstSegment seeksegment = { 0, }; gint64 last_stop; + guint32 seqnum = 0; if (event) { GST_DEBUG_OBJECT (wav, "doing seek with event"); gst_event_parse_seek (event, &rate, &format, &flags, &cur_type, &cur, &stop_type, &stop); + seqnum = gst_event_get_seqnum (event); /* no negative rates yet */ if (rate < 0.0) @@ -449,6 +451,7 @@ gst_wavparse_perform_seek (GstWavParse * wav, GstEvent * event) /* BYTE seek event */ event = gst_event_new_seek (rate, GST_FORMAT_BYTES, flags, cur_type, cur, stop_type, stop); + gst_event_set_seqnum (event, seqnum); res = gst_pad_push_event (wav->sinkpad, event); } return res; @@ -464,9 +467,13 @@ gst_wavparse_perform_seek (GstWavParse * wav, GstEvent * event) * as it completes one iteration (and thus might block when the sink is * blocking in preroll). */ if (flush) { + GstEvent *fevent; GST_DEBUG_OBJECT (wav, "sending flush start"); - gst_pad_push_event (wav->sinkpad, gst_event_new_flush_start ()); - gst_pad_push_event (wav->srcpad, gst_event_new_flush_start ()); + + fevent = gst_event_new_flush_start (); + gst_event_set_seqnum (fevent, seqnum); + gst_pad_push_event (wav->sinkpad, gst_event_ref (fevent)); + gst_pad_push_event (wav->srcpad, fevent); } else { gst_pad_pause_task (wav->sinkpad); } @@ -545,10 +552,15 @@ gst_wavparse_perform_seek (GstWavParse * wav, GstEvent * event) /* prepare for streaming again */ if (flush) { + GstEvent *fevent; + /* if we sent a FLUSH_START, we now send a FLUSH_STOP */ GST_DEBUG_OBJECT (wav, "sending flush stop"); - gst_pad_push_event (wav->sinkpad, gst_event_new_flush_stop (TRUE)); - gst_pad_push_event (wav->srcpad, gst_event_new_flush_stop (TRUE)); + + fevent = gst_event_new_flush_stop (TRUE); + gst_event_set_seqnum (fevent, seqnum); + gst_pad_push_event (wav->sinkpad, gst_event_ref (fevent)); + gst_pad_push_event (wav->srcpad, fevent); } /* now we did the seek and can activate the new segment values */ @@ -569,6 +581,7 @@ gst_wavparse_perform_seek (GstWavParse * wav, GstEvent * event) if (wav->start_segment) gst_event_unref (wav->start_segment); wav->start_segment = gst_event_new_segment (&wav->segment); + gst_event_set_seqnum (wav->start_segment, seqnum); /* mark discont if we are going to stream from another position. */ if (last_stop != wav->segment.position) { @@ -1072,7 +1085,6 @@ gst_wavparse_stream_headers (GstWavParse * wav) gboolean gotdata = FALSE; GstCaps *caps = NULL; gchar *codec_name = NULL; - GstEvent **event_p; gint64 upstream_size = 0; GstStructure *s; @@ -1666,8 +1678,7 @@ gst_wavparse_stream_headers (GstWavParse * wav) * the right newsegment event downstream. */ gst_wavparse_perform_seek (wav, wav->seek_event); /* remove pending event */ - event_p = &wav->seek_event; - gst_event_replace (event_p, NULL); + gst_event_replace (&wav->seek_event, NULL); /* we just started, we are discont */ wav->discont = TRUE; @@ -1693,10 +1704,8 @@ gst_wavparse_stream_headers (GstWavParse * wav) /* ERROR */ exit: { - if (codec_name) - g_free (codec_name); - if (header) - g_free (header); + g_free (codec_name); + g_free (header); if (caps) gst_caps_unref (caps); return res; @@ -1807,7 +1816,6 @@ gst_wavparse_send_event (GstElement * element, GstEvent * event) { GstWavParse *wav = GST_WAVPARSE (element); gboolean res = FALSE; - GstEvent **event_p; GST_DEBUG_OBJECT (wav, "received event %s", GST_EVENT_TYPE_NAME (event)); @@ -1819,8 +1827,7 @@ gst_wavparse_send_event (GstElement * element, GstEvent * event) } else { GST_DEBUG_OBJECT (wav, "queuing seek for later"); - event_p = &wav->seek_event; - gst_event_replace (event_p, event); + gst_event_replace (&wav->seek_event, event); /* we always return true */ res = TRUE; diff --git a/gst/y4m/Makefile.in b/gst/y4m/Makefile.in index ad940f162e3c9069d1d8ec09ed766f83dfcda79b..987ded3a49ca7095a3ce00680811e251739dfb90 100644 --- a/gst/y4m/Makefile.in +++ b/gst/y4m/Makefile.in @@ -476,6 +476,8 @@ VALGRIND_PATH = @VALGRIND_PATH@ VERSION = @VERSION@ VPX_130_CFLAGS = @VPX_130_CFLAGS@ VPX_130_LIBS = @VPX_130_LIBS@ +VPX_140_CFLAGS = @VPX_140_CFLAGS@ +VPX_140_LIBS = @VPX_140_LIBS@ VPX_CFLAGS = @VPX_CFLAGS@ VPX_LIBS = @VPX_LIBS@ WARNING_CFLAGS = @WARNING_CFLAGS@ diff --git a/m4/Makefile.in b/m4/Makefile.in index 76463a3b5359e763dea0f9f165ca003bda1b75e1..166b02585b066afad6b92816816657bb7704d463 100644 --- a/m4/Makefile.in +++ b/m4/Makefile.in @@ -390,6 +390,8 @@ VALGRIND_PATH = @VALGRIND_PATH@ VERSION = @VERSION@ VPX_130_CFLAGS = @VPX_130_CFLAGS@ VPX_130_LIBS = @VPX_130_LIBS@ +VPX_140_CFLAGS = @VPX_140_CFLAGS@ +VPX_140_LIBS = @VPX_140_LIBS@ VPX_CFLAGS = @VPX_CFLAGS@ VPX_LIBS = @VPX_LIBS@ WARNING_CFLAGS = @WARNING_CFLAGS@ diff --git a/pkgconfig/Makefile.in b/pkgconfig/Makefile.in index f7fd58dc33f57bc13a69e9d302a73af0a574ac6a..59465b36827ab6d5d1a9790689e085cab0f299e8 100644 --- a/pkgconfig/Makefile.in +++ b/pkgconfig/Makefile.in @@ -391,6 +391,8 @@ VALGRIND_PATH = @VALGRIND_PATH@ VERSION = @VERSION@ VPX_130_CFLAGS = @VPX_130_CFLAGS@ VPX_130_LIBS = @VPX_130_LIBS@ +VPX_140_CFLAGS = @VPX_140_CFLAGS@ +VPX_140_LIBS = @VPX_140_LIBS@ VPX_CFLAGS = @VPX_CFLAGS@ VPX_LIBS = @VPX_LIBS@ WARNING_CFLAGS = @WARNING_CFLAGS@ diff --git a/po/af.gmo b/po/af.gmo index 7fdb4913b33c0c9cdce1372e21502c2a004c8ee2..6af099208f10336cbe51eb2c4deeee743e5e31d8 100644 Binary files a/po/af.gmo and b/po/af.gmo differ diff --git a/po/af.po b/po/af.po index 6aa74520b5e2671a4f6e4a3efd97e7a485f96bf8..bbbc58898a22104fd97eddf83ea83538b3dab06a 100644 --- a/po/af.po +++ b/po/af.po @@ -7,7 +7,7 @@ msgid "" msgstr "" "Project-Id-Version: gst-plugins 0.7.6\n" "Report-Msgid-Bugs-To: http://bugzilla.gnome.org/\n" -"POT-Creation-Date: 2015-12-14 19:16+0100\n" +"POT-Creation-Date: 2015-12-24 13:17+0100\n" "PO-Revision-Date: 2004-03-18 14:16+0200\n" "Last-Translator: Petri Jooste <rkwjpj@puk.ac.za>\n" "Language-Team: Afrikaans <i18n@af.org.za>\n" diff --git a/po/az.gmo b/po/az.gmo index 9e12d7bff8a2b280c82c08fbb2a47ed9b4e43eee..4377dbb793e6d333010f2008746b16004012637d 100644 Binary files a/po/az.gmo and b/po/az.gmo differ diff --git a/po/az.po b/po/az.po index a14e1d50896c6dc9cfea535ebefa73f15167d269..181059e2b222774b8cbb6282f76400acd7afc1a7 100644 --- a/po/az.po +++ b/po/az.po @@ -7,7 +7,7 @@ msgid "" msgstr "" "Project-Id-Version: gst-plugins-0.8.0\n" "Report-Msgid-Bugs-To: http://bugzilla.gnome.org/\n" -"POT-Creation-Date: 2015-12-14 19:16+0100\n" +"POT-Creation-Date: 2015-12-24 13:17+0100\n" "PO-Revision-Date: 2004-03-19 18:29+0200\n" "Last-Translator: Metin Amiroff <metin@karegen.com>\n" "Language-Team: Azerbaijani <translation-team-az@lists.sourceforge.net>\n" diff --git a/po/bg.gmo b/po/bg.gmo index c1faafe931622fc4eac6459aa30d7e06210bbfb8..7ab3777d847cca2994faa04faad76aa0c3357f01 100644 Binary files a/po/bg.gmo and b/po/bg.gmo differ diff --git a/po/bg.po b/po/bg.po index 64d3e0e4a1191e7253d5e949fb97ae30fee5514a..077bc7b9a7701624ad878d399918af5802b3e0ee 100644 --- a/po/bg.po +++ b/po/bg.po @@ -8,7 +8,7 @@ msgid "" msgstr "" "Project-Id-Version: gst-plugins-good 0.10.28.2\n" "Report-Msgid-Bugs-To: http://bugzilla.gnome.org/\n" -"POT-Creation-Date: 2015-12-14 19:16+0100\n" +"POT-Creation-Date: 2015-12-24 13:17+0100\n" "PO-Revision-Date: 2011-04-26 22:35+0300\n" "Last-Translator: Alexander Shopov <ash@kambanaria.org>\n" "Language-Team: Bulgarian <dict@fsa-bg.org>\n" diff --git a/po/ca.gmo b/po/ca.gmo index 9e1800b2242cd214863fb4fdac50262930dd9b40..432e976d66165619677bc1692287eb4d4d909474 100644 Binary files a/po/ca.gmo and b/po/ca.gmo differ diff --git a/po/ca.po b/po/ca.po index ac89e5c4d5e660f33454f5f37983397db4ef7ddb..7a7ab4f33d89a44e55164543d0424b58980b7912 100644 --- a/po/ca.po +++ b/po/ca.po @@ -9,7 +9,7 @@ msgid "" msgstr "" "Project-Id-Version: gst-plugins-good 0.10.28.2\n" "Report-Msgid-Bugs-To: http://bugzilla.gnome.org/\n" -"POT-Creation-Date: 2015-12-14 19:16+0100\n" +"POT-Creation-Date: 2015-12-24 13:17+0100\n" "PO-Revision-Date: 2012-01-01 14:19+0100\n" "Last-Translator: Gil Forcada <gforcada@gnome.org>\n" "Language-Team: Catalan <ca@dodds.net>\n" diff --git a/po/cs.gmo b/po/cs.gmo index 9b41153312ffe0c636d013a3c5e76c815b8d6b78..b2a659f296b9a44220716ca94c358cc08afd8347 100644 Binary files a/po/cs.gmo and b/po/cs.gmo differ diff --git a/po/cs.po b/po/cs.po index 13cbff488553b6a05e8ab1097c75da980435fc84..8c80a0701968011f93f1afbacf02608784d3a780 100644 --- a/po/cs.po +++ b/po/cs.po @@ -10,7 +10,7 @@ msgid "" msgstr "" "Project-Id-Version: gst-plugins-good-1.6.0\n" "Report-Msgid-Bugs-To: http://bugzilla.gnome.org/\n" -"POT-Creation-Date: 2015-12-14 19:16+0100\n" +"POT-Creation-Date: 2015-12-24 13:17+0100\n" "PO-Revision-Date: 2015-10-15 20:58+0200\n" "Last-Translator: Marek ÄŒernocký <marek@manet.cz>\n" "Language-Team: Czech <translation-team-cs@lists.sourceforge.net>\n" diff --git a/po/da.gmo b/po/da.gmo index 8dcc420ffbdc5c0b64871289c7f750959fe17c8a..21bf4ca3f7722743d751c31662375d0c0cdd3e9d 100644 Binary files a/po/da.gmo and b/po/da.gmo differ diff --git a/po/da.po b/po/da.po index aec12a8463c3926a15c7bd742333d5128ab10e7e..5aa529c5c4ae933df8679cd2e50f1bb2e4fcb37c 100644 --- a/po/da.po +++ b/po/da.po @@ -11,7 +11,7 @@ msgid "" msgstr "" "Project-Id-Version: gst-plugins-good-1.3.90\n" "Report-Msgid-Bugs-To: http://bugzilla.gnome.org/\n" -"POT-Creation-Date: 2015-12-14 19:16+0100\n" +"POT-Creation-Date: 2015-12-24 13:17+0100\n" "PO-Revision-Date: 2014-06-29 23:54+0200\n" "Last-Translator: Joe Hansen <joedalton2@yahoo.dk>\n" "Language-Team: Danish <dansk@dansk-gruppen.dk>\n" diff --git a/po/de.gmo b/po/de.gmo index d3d3f2f11871061858ab13821dfa137337610199..0e9823b75776d333393e8c068ca7de847fe0f219 100644 Binary files a/po/de.gmo and b/po/de.gmo differ diff --git a/po/de.po b/po/de.po index c9d1a585b5d1fa582c34e5c8bed37a1f7a43686d..db9191e85d356ce1e9c3e8e0a9e7785cef3d8b0d 100644 --- a/po/de.po +++ b/po/de.po @@ -14,7 +14,7 @@ msgid "" msgstr "" "Project-Id-Version: gst-plugins-good 1.6.0\n" "Report-Msgid-Bugs-To: http://bugzilla.gnome.org/\n" -"POT-Creation-Date: 2015-12-14 19:16+0100\n" +"POT-Creation-Date: 2015-12-24 13:17+0100\n" "PO-Revision-Date: 2015-10-21 00:14+0200\n" "Last-Translator: Christian Kirbach <christian.kirbach@gmail.com>\n" "Language-Team: German <translation-team-de@lists.sourceforge.net>\n" diff --git a/po/el.gmo b/po/el.gmo index 6430cb97776acd7130f6d8a9f3e644a1e80f48b1..2998dbae5199371b42d0ee22f9b61e2fc0394925 100644 Binary files a/po/el.gmo and b/po/el.gmo differ diff --git a/po/el.po b/po/el.po index 3621c137ea3591af12c6727e8e1e0b8d19c9b91d..83a55df58e4c84472fbc03b35f86e1e059d85ff2 100644 --- a/po/el.po +++ b/po/el.po @@ -8,7 +8,7 @@ msgid "" msgstr "" "Project-Id-Version: gst-plugins-good 0.10.28.2\n" "Report-Msgid-Bugs-To: http://bugzilla.gnome.org/\n" -"POT-Creation-Date: 2015-12-14 19:16+0100\n" +"POT-Creation-Date: 2015-12-24 13:17+0100\n" "PO-Revision-Date: 2012-05-05 19:05+0100\n" "Last-Translator: Savvas Radevic <vicedar@gmail.com>\n" "Language-Team: Greek <team@lists.gnome.gr>\n" diff --git a/po/en_GB.gmo b/po/en_GB.gmo index 3d52a327c2b57064b990c9777d6bb18d8fa1c11b..78f7cba7c495e0e898ef411eee1a168b3e61c74f 100644 Binary files a/po/en_GB.gmo and b/po/en_GB.gmo differ diff --git a/po/en_GB.po b/po/en_GB.po index 611b5207af7c826a9c05f7add3e4516e2318c78b..557ea25bef3e6d51ca315a8064c051eca7ea2e02 100644 --- a/po/en_GB.po +++ b/po/en_GB.po @@ -6,7 +6,7 @@ msgid "" msgstr "" "Project-Id-Version: gst-plugins 0.8.1\n" "Report-Msgid-Bugs-To: http://bugzilla.gnome.org/\n" -"POT-Creation-Date: 2015-12-14 19:16+0100\n" +"POT-Creation-Date: 2015-12-24 13:17+0100\n" "PO-Revision-Date: 2004-04-26 10:41-0400\n" "Last-Translator: Gareth Owen <gowen72@yahoo.com>\n" "Language-Team: English (British) <en_gb@li.org>\n" diff --git a/po/eo.gmo b/po/eo.gmo index 731d21593529af28127f5236bfd7cd8950ec2811..0fc1cb11b7d5994c39de36713892fc5b1ecd2a01 100644 Binary files a/po/eo.gmo and b/po/eo.gmo differ diff --git a/po/eo.po b/po/eo.po index 901ffb5c0234d928e8caed8997e91d4da0ad653f..8c1534c580178018db17ca8b720157c80271984e 100644 --- a/po/eo.po +++ b/po/eo.po @@ -7,7 +7,7 @@ msgid "" msgstr "" "Project-Id-Version: gst-plugins-good 0.10.28.2\n" "Report-Msgid-Bugs-To: http://bugzilla.gnome.org/\n" -"POT-Creation-Date: 2015-12-14 19:16+0100\n" +"POT-Creation-Date: 2015-12-24 13:17+0100\n" "PO-Revision-Date: 2011-06-04 21:48+0100\n" "Last-Translator: Kristjan SCHMIDT <kristjan.schmidt@googlemail.com>\n" "Language-Team: Esperanto <translation-team-eo@lists.sourceforge.net>\n" diff --git a/po/es.gmo b/po/es.gmo index 74f2e37318980fc5e624ef544870027d0f3baece..d78dc6c4cdf6b56ed4207e3e0c75807e0033fcd3 100644 Binary files a/po/es.gmo and b/po/es.gmo differ diff --git a/po/es.po b/po/es.po index 8a80e2668bc21b08d0216c23a06d8546d8e8dbce..2f94a90e8b22ec0fd127a53b4a95bb72eaf9e3a1 100644 --- a/po/es.po +++ b/po/es.po @@ -7,7 +7,7 @@ msgid "" msgstr "" "Project-Id-Version: gst-plugins-good 0.10.26.2\n" "Report-Msgid-Bugs-To: http://bugzilla.gnome.org/\n" -"POT-Creation-Date: 2015-12-14 19:16+0100\n" +"POT-Creation-Date: 2015-12-24 13:17+0100\n" "PO-Revision-Date: 2011-02-12 18:30+0100\n" "Last-Translator: Jorge González González <aloriel@gmail.com>\n" "Language-Team: Spanish <es@li.org>\n" diff --git a/po/eu.gmo b/po/eu.gmo index b2f0eaf54be5b24e995654fabdc287b02aae429a..72128cc15f78f231026a9da47628ac562ffb9891 100644 Binary files a/po/eu.gmo and b/po/eu.gmo differ diff --git a/po/eu.po b/po/eu.po index 47cc32999c1dc1c7d3e5f68d4568c8f55a4791a9..c551eba6b56055f0ff4a02c385d3a9415ec6d940 100644 --- a/po/eu.po +++ b/po/eu.po @@ -8,7 +8,7 @@ msgid "" msgstr "" "Project-Id-Version: gst-plugins-good-0.10.18.2\n" "Report-Msgid-Bugs-To: http://bugzilla.gnome.org/\n" -"POT-Creation-Date: 2015-12-14 19:16+0100\n" +"POT-Creation-Date: 2015-12-24 13:17+0100\n" "PO-Revision-Date: 2010-03-25 12:37+0100\n" "Last-Translator: Mikel Olasagasti Uranga <hey_neken@mundurat.net>\n" "Language-Team: Basque <translation-team-eu@lists.sourceforge.net>\n" diff --git a/po/fi.gmo b/po/fi.gmo index e3e91a7996040a19460003985d5b2ccc7babb2a1..c4de1c9f48394ac88b6e3f55dbbbf7b853c09d17 100644 Binary files a/po/fi.gmo and b/po/fi.gmo differ diff --git a/po/fi.po b/po/fi.po index e3096bae4fbe6717c8f9423898f33e6c8b8ffd40..a6212f1a970dca958d82966e4e7a9437cf3e0e16 100644 --- a/po/fi.po +++ b/po/fi.po @@ -11,7 +11,7 @@ msgid "" msgstr "" "Project-Id-Version: gst-plugins-good 0.10.25.3\n" "Report-Msgid-Bugs-To: http://bugzilla.gnome.org/\n" -"POT-Creation-Date: 2015-12-14 19:16+0100\n" +"POT-Creation-Date: 2015-12-24 13:17+0100\n" "PO-Revision-Date: 2010-11-17 23:03+0200\n" "Last-Translator: Tommi Vainikainen <Tommi.Vainikainen@iki.fi>\n" "Language-Team: Finnish <translation-team-fi@lists.sourceforge.net>\n" diff --git a/po/fr.gmo b/po/fr.gmo index 22611c148ea4c5b7f8a1e9e73a636d00f735abf8..4358b00aee2750bd04567022328279f057d7d0ed 100644 Binary files a/po/fr.gmo and b/po/fr.gmo differ diff --git a/po/fr.po b/po/fr.po index 4ac52f6976ed40292af230553855eee3d2b3d36f..d4e37033cf5e971b2b3ba608ad2ffc57f1b07763 100644 --- a/po/fr.po +++ b/po/fr.po @@ -10,7 +10,7 @@ msgid "" msgstr "" "Project-Id-Version: gst-plugins-good 1.4.1\n" "Report-Msgid-Bugs-To: http://bugzilla.gnome.org/\n" -"POT-Creation-Date: 2015-12-14 19:16+0100\n" +"POT-Creation-Date: 2015-12-24 13:17+0100\n" "PO-Revision-Date: 2015-04-26 19:35+0200\n" "Last-Translator: Stéphane Aulery <lkppo@free.fr>\n" "Language-Team: French <traduc@traduc.org>\n" diff --git a/po/gl.gmo b/po/gl.gmo index f1ff1c36c018d6dbbffd9a4d212b9026ca03de07..ad1f9222f45aa573945ced82ce2cd5732a1848c2 100644 Binary files a/po/gl.gmo and b/po/gl.gmo differ diff --git a/po/gl.po b/po/gl.po index 029cfd1622b5bc85b2480d4d21ef40b89b834c05..d4a67f4e8b18a7061263bd8d488d70b160543482 100644 --- a/po/gl.po +++ b/po/gl.po @@ -7,7 +7,7 @@ msgid "" msgstr "" "Project-Id-Version: gst-plugins-good 1.0.3\n" "Report-Msgid-Bugs-To: http://bugzilla.gnome.org/\n" -"POT-Creation-Date: 2015-12-14 19:16+0100\n" +"POT-Creation-Date: 2015-12-24 13:17+0100\n" "PO-Revision-Date: 2012-12-15 03:46+0200\n" "Last-Translator: Fran Dieguez <frandieguez@ubuntu.com>\n" "Language-Team: Galician <proxecto@trasno.net>\n" diff --git a/po/gst-plugins-good-1.0.pot b/po/gst-plugins-good-1.0.pot index 38c16b8ea05c0c481c50946e0aeb9dd1f6bb0b8c..ec5ef108d3779e0769d2a757348c0b3bc49c41e1 100644 --- a/po/gst-plugins-good-1.0.pot +++ b/po/gst-plugins-good-1.0.pot @@ -5,9 +5,9 @@ #, fuzzy msgid "" msgstr "" -"Project-Id-Version: gst-plugins-good 1.6.2\n" +"Project-Id-Version: gst-plugins-good 1.7.1\n" "Report-Msgid-Bugs-To: http://bugzilla.gnome.org/\n" -"POT-Creation-Date: 2015-12-14 19:16+0100\n" +"POT-Creation-Date: 2015-12-24 13:17+0100\n" "PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n" "Last-Translator: FULL NAME <EMAIL@ADDRESS>\n" "Language-Team: LANGUAGE <LL@li.org>\n" @@ -20,10 +20,10 @@ msgstr "" msgid "Jack server not found" msgstr "" -#: ext/jpeg/gstjpegdec.c:925 ext/jpeg/gstjpegdec.c:1178 -#: ext/jpeg/gstjpegdec.c:1190 ext/jpeg/gstjpegdec.c:1219 -#: ext/jpeg/gstjpegdec.c:1228 ext/jpeg/gstjpegdec.c:1237 -#: ext/jpeg/gstjpegdec.c:1245 +#: ext/jpeg/gstjpegdec.c:925 ext/jpeg/gstjpegdec.c:1189 +#: ext/jpeg/gstjpegdec.c:1201 ext/jpeg/gstjpegdec.c:1230 +#: ext/jpeg/gstjpegdec.c:1239 ext/jpeg/gstjpegdec.c:1248 +#: ext/jpeg/gstjpegdec.c:1256 msgid "Failed to decode JPEG image" msgstr "" @@ -37,36 +37,36 @@ msgstr "" msgid "Could not connect to server" msgstr "" -#: ext/soup/gstsouphttpsrc.c:911 +#: ext/soup/gstsouphttpsrc.c:932 msgid "No URL set." msgstr "" -#: ext/soup/gstsouphttpsrc.c:1270 +#: ext/soup/gstsouphttpsrc.c:1292 msgid "Server does not support seeking." msgstr "" -#: ext/soup/gstsouphttpsrc.c:1545 +#: ext/soup/gstsouphttpsrc.c:1567 msgid "Could not resolve server name." msgstr "" -#: ext/soup/gstsouphttpsrc.c:1551 +#: ext/soup/gstsouphttpsrc.c:1573 msgid "Could not establish connection to server." msgstr "" -#: ext/soup/gstsouphttpsrc.c:1556 +#: ext/soup/gstsouphttpsrc.c:1578 msgid "Secure connection setup failed." msgstr "" -#: ext/soup/gstsouphttpsrc.c:1566 +#: ext/soup/gstsouphttpsrc.c:1588 msgid "" "A network error occurred, or the server closed the connection unexpectedly." msgstr "" -#: ext/soup/gstsouphttpsrc.c:1573 +#: ext/soup/gstsouphttpsrc.c:1595 msgid "Server sent bad data." msgstr "" -#: gst/avi/gstavidemux.c:5679 +#: gst/avi/gstavidemux.c:5689 msgid "Internal data stream error." msgstr "" @@ -78,50 +78,50 @@ msgstr "" msgid "This file contains no playable streams." msgstr "" -#: gst/isomp4/qtdemux.c:691 gst/isomp4/qtdemux.c:5585 gst/isomp4/qtdemux.c:5652 -#: gst/isomp4/qtdemux.c:5891 +#: gst/isomp4/qtdemux.c:691 gst/isomp4/qtdemux.c:5685 gst/isomp4/qtdemux.c:5752 +#: gst/isomp4/qtdemux.c:6001 msgid "This file is invalid and cannot be played." msgstr "" -#: gst/isomp4/qtdemux.c:2441 +#: gst/isomp4/qtdemux.c:2480 msgid "Cannot play stream because it is encrypted with PlayReady DRM." msgstr "" -#: gst/isomp4/qtdemux.c:3511 gst/isomp4/qtdemux.c:6629 -#: gst/isomp4/qtdemux.c:6636 gst/isomp4/qtdemux.c:7410 -#: gst/isomp4/qtdemux.c:7839 gst/isomp4/qtdemux.c:7846 -#: gst/isomp4/qtdemux.c:10133 +#: gst/isomp4/qtdemux.c:3550 gst/isomp4/qtdemux.c:6734 +#: gst/isomp4/qtdemux.c:6741 gst/isomp4/qtdemux.c:7515 +#: gst/isomp4/qtdemux.c:7944 gst/isomp4/qtdemux.c:7951 +#: gst/isomp4/qtdemux.c:10277 msgid "This file is corrupt and cannot be played." msgstr "" -#: gst/isomp4/qtdemux.c:3753 +#: gst/isomp4/qtdemux.c:3792 msgid "Invalid atom size." msgstr "" -#: gst/isomp4/qtdemux.c:3831 +#: gst/isomp4/qtdemux.c:3870 msgid "This file is incomplete and cannot be played." msgstr "" -#: gst/isomp4/qtdemux.c:8771 +#: gst/isomp4/qtdemux.c:8886 msgid "The video in this file might not play correctly." msgstr "" -#: gst/isomp4/qtdemux.c:10174 +#: gst/isomp4/qtdemux.c:10318 #, c-format msgid "This file contains too many streams. Only playing first %d" msgstr "" -#: gst/multifile/gstsplitmuxsrc.c:532 gst/wavparse/gstwavparse.c:2250 +#: gst/multifile/gstsplitmuxsrc.c:532 gst/wavparse/gstwavparse.c:2257 msgid "Internal data flow error." msgstr "" -#: gst/rtsp/gstrtspsrc.c:6894 +#: gst/rtsp/gstrtspsrc.c:6934 msgid "" "No supported stream was found. You might need to install a GStreamer RTSP " "extension plugin for Real media streams." msgstr "" -#: gst/rtsp/gstrtspsrc.c:6899 +#: gst/rtsp/gstrtspsrc.c:6939 msgid "" "No supported stream was found. You might need to allow more transport " "protocols or may otherwise be missing the right GStreamer RTSP extension " @@ -166,13 +166,13 @@ msgstr "" msgid "Error recording from audio device." msgstr "" -#: sys/oss/gstosssrc.c:377 +#: sys/oss/gstosssrc.c:376 msgid "" "Could not open audio device for recording. You don't have permission to open " "the device." msgstr "" -#: sys/oss/gstosssrc.c:385 +#: sys/oss/gstosssrc.c:384 msgid "Could not open audio device for recording." msgstr "" @@ -253,80 +253,80 @@ msgstr "" msgid "Error reading %d bytes from device '%s'." msgstr "" -#: sys/v4l2/gstv4l2object.c:1085 +#: sys/v4l2/gstv4l2object.c:1160 #, c-format msgid "Failed to enumerate possible video formats device '%s' can work with" msgstr "" -#: sys/v4l2/gstv4l2object.c:2577 +#: sys/v4l2/gstv4l2object.c:2740 #, c-format msgid "Could not map buffers from device '%s'" msgstr "" -#: sys/v4l2/gstv4l2object.c:2585 +#: sys/v4l2/gstv4l2object.c:2748 #, c-format msgid "The driver of device '%s' does not support the IO method %d" msgstr "" -#: sys/v4l2/gstv4l2object.c:2592 +#: sys/v4l2/gstv4l2object.c:2755 #, c-format msgid "The driver of device '%s' does not support any known IO method." msgstr "" -#: sys/v4l2/gstv4l2object.c:3214 sys/v4l2/gstv4l2object.c:3225 +#: sys/v4l2/gstv4l2object.c:3378 sys/v4l2/gstv4l2object.c:3389 #, c-format msgid "Device '%s' is busy" msgstr "" -#: sys/v4l2/gstv4l2object.c:3231 sys/v4l2/gstv4l2object.c:3243 +#: sys/v4l2/gstv4l2object.c:3395 sys/v4l2/gstv4l2object.c:3407 #, c-format msgid "Device '%s' cannot capture at %dx%d" msgstr "" -#: sys/v4l2/gstv4l2object.c:3254 +#: sys/v4l2/gstv4l2object.c:3418 #, c-format msgid "Device '%s' cannot capture in the specified format" msgstr "" -#: sys/v4l2/gstv4l2object.c:3267 +#: sys/v4l2/gstv4l2object.c:3431 #, c-format msgid "Device '%s' does support non-contiguous planes" msgstr "" -#: sys/v4l2/gstv4l2object.c:3278 +#: sys/v4l2/gstv4l2object.c:3442 #, c-format msgid "Could not get parameters on device '%s'" msgstr "" -#: sys/v4l2/gstv4l2object.c:3286 +#: sys/v4l2/gstv4l2object.c:3450 msgid "Video device did not accept new frame rate setting." msgstr "" -#: sys/v4l2/gstv4l2object.c:3391 +#: sys/v4l2/gstv4l2object.c:3555 msgid "Video device did not provide output format." msgstr "" -#: sys/v4l2/gstv4l2object.c:3397 +#: sys/v4l2/gstv4l2object.c:3561 msgid "Video device returned invalid dimensions." msgstr "" -#: sys/v4l2/gstv4l2object.c:3405 +#: sys/v4l2/gstv4l2object.c:3569 msgid "Video devices uses an unsupported interlacing method." msgstr "" -#: sys/v4l2/gstv4l2object.c:3412 +#: sys/v4l2/gstv4l2object.c:3576 msgid "Video devices uses an unsupported pixel format." msgstr "" -#: sys/v4l2/gstv4l2object.c:3824 +#: sys/v4l2/gstv4l2object.c:4001 msgid "Failed to configure internal buffer pool." msgstr "" -#: sys/v4l2/gstv4l2object.c:3830 +#: sys/v4l2/gstv4l2object.c:4007 msgid "Video device did not suggest any buffer size." msgstr "" -#: sys/v4l2/gstv4l2object.c:3845 +#: sys/v4l2/gstv4l2object.c:4022 msgid "No downstream pool to import from." msgstr "" @@ -364,7 +364,7 @@ msgstr "" msgid "Failed to allocated required memory." msgstr "" -#: sys/v4l2/gstv4l2src.c:510 sys/v4l2/gstv4l2videodec.c:581 +#: sys/v4l2/gstv4l2src.c:510 sys/v4l2/gstv4l2videodec.c:611 msgid "Failed to allocate required memory." msgstr "" @@ -388,11 +388,11 @@ msgstr "" msgid "Encoder on device %s has no supported output format" msgstr "" -#: sys/v4l2/gstv4l2videodec.c:595 +#: sys/v4l2/gstv4l2videodec.c:625 msgid "Failed to start decoding thread." msgstr "" -#: sys/v4l2/gstv4l2videodec.c:603 +#: sys/v4l2/gstv4l2videodec.c:633 msgid "Failed to process frame." msgstr "" @@ -504,10 +504,10 @@ msgstr "" msgid "Failed to set output %d on device %s." msgstr "" -#: sys/ximage/gstximagesrc.c:828 +#: sys/ximage/gstximagesrc.c:838 msgid "Changing resolution at runtime is not yet supported." msgstr "" -#: sys/ximage/gstximagesrc.c:842 +#: sys/ximage/gstximagesrc.c:852 msgid "Cannot operate without a clock" msgstr "" diff --git a/po/hr.gmo b/po/hr.gmo index 38618de9b3095d648c10a4577d5a29b55323fcce..6fd14095131ad93e80cefe69e4f72b8bbbc8502a 100644 Binary files a/po/hr.gmo and b/po/hr.gmo differ diff --git a/po/hr.po b/po/hr.po index a5876c5f2d6c361cd1db73ecb5421dedfbdf9c2c..e63d4a12886ae1f9db13fe106d597651948ccf19 100644 --- a/po/hr.po +++ b/po/hr.po @@ -6,7 +6,7 @@ msgid "" msgstr "" "Project-Id-Version: gst-plugins-good 0.10.28.2\n" "Report-Msgid-Bugs-To: http://bugzilla.gnome.org/\n" -"POT-Creation-Date: 2015-12-14 19:16+0100\n" +"POT-Creation-Date: 2015-12-24 13:17+0100\n" "PO-Revision-Date: 2012-04-16 03:04+0200\n" "Last-Translator: Tomislav Krznar <tomislav.krznar@gmail.com>\n" "Language-Team: Croatian <lokalizacija@linux.hr>\n" diff --git a/po/hu.gmo b/po/hu.gmo index 0868f61766c887c776782c9097f38879ae7c2c37..b7c2c0f5b7d954597dbdbc6c2853fb6d0a59b7d8 100644 Binary files a/po/hu.gmo and b/po/hu.gmo differ diff --git a/po/hu.po b/po/hu.po index ce7cb8fc8294829f73e067ac5a781e076c2bbdb2..1a0ecca45e1d142f6c9e57926eeb5708e8500be8 100644 --- a/po/hu.po +++ b/po/hu.po @@ -9,7 +9,7 @@ msgid "" msgstr "" "Project-Id-Version: gst-plugins-good 1.6.0\n" "Report-Msgid-Bugs-To: http://bugzilla.gnome.org/\n" -"POT-Creation-Date: 2015-12-14 19:16+0100\n" +"POT-Creation-Date: 2015-12-24 13:17+0100\n" "PO-Revision-Date: 2015-11-20 23:48+0100\n" "Last-Translator: Balázs Úr <urbalazs@gmail.com>\n" "Language-Team: Hungarian <translation-team-hu@lists.sourceforge.net>\n" diff --git a/po/id.gmo b/po/id.gmo index 8fd1ea3bd01375257fc2da48de987c6bca314cb5..a73bfbb88fe414112ff96f38c694cb8b49601146 100644 Binary files a/po/id.gmo and b/po/id.gmo differ diff --git a/po/id.po b/po/id.po index 4399ffc5f0d6d16057725f7fd29f28fa4ce1b4f1..9780ce00a64fef55f58bb6bcf03aea968458e7d0 100644 --- a/po/id.po +++ b/po/id.po @@ -8,7 +8,7 @@ msgid "" msgstr "" "Project-Id-Version: gst-plugins-good 1.3.90\n" "Report-Msgid-Bugs-To: http://bugzilla.gnome.org/\n" -"POT-Creation-Date: 2015-12-14 19:16+0100\n" +"POT-Creation-Date: 2015-12-24 13:17+0100\n" "PO-Revision-Date: 2014-07-06 21:37+0700\n" "Last-Translator: Andhika Padmawan <andhika.padmawan@gmail.com>\n" "Language-Team: Indonesian <translation-team-id@lists.sourceforge.net>\n" diff --git a/po/it.gmo b/po/it.gmo index 80df0444993316dd756287afc110179d0670f3c7..7a5d8b51dc5d06109449be8bf729887c81bcbbbb 100644 Binary files a/po/it.gmo and b/po/it.gmo differ diff --git a/po/it.po b/po/it.po index 4d35f7da308e6d17fcb7b047b0a37aec8f0ef7b2..c086e25a1bb6593482608dbbc6313b14583f8e3e 100644 --- a/po/it.po +++ b/po/it.po @@ -7,7 +7,7 @@ msgid "" msgstr "" "Project-Id-Version: gst-plugins-good 0.10.25.3\n" "Report-Msgid-Bugs-To: http://bugzilla.gnome.org/\n" -"POT-Creation-Date: 2015-12-14 19:16+0100\n" +"POT-Creation-Date: 2015-12-24 13:17+0100\n" "PO-Revision-Date: 2010-10-25 10:11+0200\n" "Last-Translator: Luca Ferretti <elle.uca@infinito.it>\n" "Language-Team: Italian <tp@lists.linux.it>\n" diff --git a/po/ja.gmo b/po/ja.gmo index 4a719cc17e14c374bd1e65adc503f99a7a90e75f..21a45e8d00de24c0784755d4f93197efda7985d3 100644 Binary files a/po/ja.gmo and b/po/ja.gmo differ diff --git a/po/ja.po b/po/ja.po index 975c58e0d2485f7da12331ab89a363164292b791..f7c2352861f156e20917314d98d09d347a61f144 100644 --- a/po/ja.po +++ b/po/ja.po @@ -8,7 +8,7 @@ msgid "" msgstr "" "Project-Id-Version: gst-plugins-good 1.0.3\n" "Report-Msgid-Bugs-To: http://bugzilla.gnome.org/\n" -"POT-Creation-Date: 2015-12-14 19:16+0100\n" +"POT-Creation-Date: 2015-12-24 13:17+0100\n" "PO-Revision-Date: 2012-12-22 20:13+0900\n" "Last-Translator: Takeshi Hamasaki <hmatrjp@users.sourceforge.jp>\n" "Language-Team: Japanese <translation-team-ja@lists.sourceforge.net>\n" diff --git a/po/lt.gmo b/po/lt.gmo index 5ffc10462dea54bd0aafe81c1257b56e3353a6e2..6555e52f514abad64decce6e54bc8a6754452654 100644 Binary files a/po/lt.gmo and b/po/lt.gmo differ diff --git a/po/lt.po b/po/lt.po index 4ed9960aa38104aae327040534d300ea4b57951f..4a6dba9dc653a9fa0e70a72fc53669409871affe 100644 --- a/po/lt.po +++ b/po/lt.po @@ -7,7 +7,7 @@ msgid "" msgstr "" "Project-Id-Version: gst-plugins-good 0.10.23.2\n" "Report-Msgid-Bugs-To: http://bugzilla.gnome.org/\n" -"POT-Creation-Date: 2015-12-14 19:16+0100\n" +"POT-Creation-Date: 2015-12-24 13:17+0100\n" "PO-Revision-Date: 2010-07-16 19:34+0300\n" "Last-Translator: Žygimantas BeruÄka <uid0@akl.lt>\n" "Language-Team: Lithuanian <komp_lt@konferencijos.lt>\n" diff --git a/po/lv.gmo b/po/lv.gmo index a3b68deebea36c6b7634979687b479fb16101999..4cac42c5708942f8310fe5c5736c58a86784a7c7 100644 Binary files a/po/lv.gmo and b/po/lv.gmo differ diff --git a/po/lv.po b/po/lv.po index 00b3f3617be6bacac6a0e8c33c9f113d8c59194d..8297da811bbd657c2469662d858092efafb965a2 100644 --- a/po/lv.po +++ b/po/lv.po @@ -9,7 +9,7 @@ msgid "" msgstr "" "Project-Id-Version: gst-plugins-good 1.2.1\n" "Report-Msgid-Bugs-To: http://bugzilla.gnome.org/\n" -"POT-Creation-Date: 2015-12-14 19:16+0100\n" +"POT-Creation-Date: 2015-12-24 13:17+0100\n" "PO-Revision-Date: 2014-04-20 16:38+0300\n" "Last-Translator: Rihards Prieditis <rprieditis@gmail.com>\n" "Language-Team: Latvian <translation-team-lv@lists.sourceforge.net>\n" diff --git a/po/mt.gmo b/po/mt.gmo index a60e9956b9db44b7e72ce9ed9c7916472eef81a9..55087f55e560b8c3d05509bcb7abddb9c5145bcd 100644 Binary files a/po/mt.gmo and b/po/mt.gmo differ diff --git a/po/mt.po b/po/mt.po index a251a52fd10886357e7923c5cf8d93e8d05f6938..d4fabf552b653bcbfcd0339d635ad4d8af8623f2 100644 --- a/po/mt.po +++ b/po/mt.po @@ -5,7 +5,7 @@ msgid "" msgstr "" "Project-Id-Version: gst-plugins-good-0.10.10.3\n" "Report-Msgid-Bugs-To: http://bugzilla.gnome.org/\n" -"POT-Creation-Date: 2015-12-14 19:16+0100\n" +"POT-Creation-Date: 2015-12-24 13:17+0100\n" "PO-Revision-Date: 2008-10-26 19:09+0100\n" "Last-Translator: Michel Bugeja <michelbugeja@rabatmalta.com>\n" "Language-Team: Maltese <translation-team-mt@lists.sourceforge.net>\n" diff --git a/po/nb.gmo b/po/nb.gmo index b4c9a8ed5b2ca40667574f6329adc2a65d6275a0..ad3f5723cc4d062783e6ef3815329b7789984ff2 100644 Binary files a/po/nb.gmo and b/po/nb.gmo differ diff --git a/po/nb.po b/po/nb.po index 88f1d56615183532ccb28a33fc2ed43528a64425..f9fcd65dbfa5edb6e2f5124f7deeba26bce2602d 100644 --- a/po/nb.po +++ b/po/nb.po @@ -2,21 +2,21 @@ # This file is put in the public domain. # # Kjartan Maraas <kmaraas@gnome.org>, 2004-2010. -# Johnny A. Solbu <johnny@solbu.net>, 2012-2014 +# Johnny A. Solbu <johnny@solbu.net>, 2012-2015 # msgid "" msgstr "" -"Project-Id-Version: gst-plugins-good 1.3.90\n" +"Project-Id-Version: gst-plugins-good 1.6.0\n" "Report-Msgid-Bugs-To: http://bugzilla.gnome.org/\n" -"POT-Creation-Date: 2015-12-14 19:16+0100\n" -"PO-Revision-Date: 2014-07-22 13:14+0100\n" +"POT-Creation-Date: 2015-12-24 13:17+0100\n" +"PO-Revision-Date: 2015-12-22 21:12+0100\n" "Last-Translator: Johnny A. Solbu <johnny@solbu.net>\n" "Language-Team: Norwegian Bokmaal <i18n-nb@lister.ping.uio.no>\n" "Language: nb_NO\n" "MIME-Version: 1.0\n" "Content-Type: text/plain; charset=UTF-8\n" "Content-Transfer-Encoding: 8bit\n" -"X-Generator: Poedit 1.5.4\n" +"X-Generator: Poedit 1.6.9\n" msgid "Jack server not found" msgstr "Jack-server ikke funnet" @@ -47,10 +47,9 @@ msgstr "Kunne ikke etablere tilkobling til tjener." msgid "Secure connection setup failed." msgstr "Oppsett av sikker tilkobling feilet." -#, fuzzy msgid "" "A network error occurred, or the server closed the connection unexpectedly." -msgstr "Et nettverk feil oppstod, eller tjeneren lukket uventet tilkoblingen." +msgstr "En nettverksfeil oppstod, eller tjeneren lukket uventet tilkoblingen." msgid "Server sent bad data." msgstr "Tjener sendte ugyldige data." diff --git a/po/nl.gmo b/po/nl.gmo index d4dd0ffecaa59459208674d73a3cf011e5905d00..60af1d0d2c9a1dcedfe5ccf5a49e7b1f87840c98 100644 Binary files a/po/nl.gmo and b/po/nl.gmo differ diff --git a/po/nl.po b/po/nl.po index 2b1f2d72f585e499a9f9db1b7fed102909dadb22..ce7be394394bb7b5a997c32172847eac453105ca 100644 --- a/po/nl.po +++ b/po/nl.po @@ -6,7 +6,7 @@ msgid "" msgstr "" "Project-Id-Version: gst-plugins-good 1.6.0\n" "Report-Msgid-Bugs-To: http://bugzilla.gnome.org/\n" -"POT-Creation-Date: 2015-12-14 19:16+0100\n" +"POT-Creation-Date: 2015-12-24 13:17+0100\n" "PO-Revision-Date: 2015-10-17 12:36+0200\n" "Last-Translator: Freek de Kruijf <f.de.kruijf@gmail.com>\n" "Language-Team: Dutch <vertaling@vrijschrift.org>\n" diff --git a/po/or.gmo b/po/or.gmo index aff2b08b2e9a2f78d636a3f0f7cc2b0cbdb31c90..95cd2d3ba82e29caa7e17b6d25e66887d9695a4a 100644 Binary files a/po/or.gmo and b/po/or.gmo differ diff --git a/po/or.po b/po/or.po index f96e928cfdf1b6557b0636b81de3a81c190d2988..eefbe5f77275b5478a81a4c66d82dfc5b2b6b5fd 100644 --- a/po/or.po +++ b/po/or.po @@ -8,7 +8,7 @@ msgid "" msgstr "" "Project-Id-Version: gst-plugins-0.8.3\n" "Report-Msgid-Bugs-To: http://bugzilla.gnome.org/\n" -"POT-Creation-Date: 2015-12-14 19:16+0100\n" +"POT-Creation-Date: 2015-12-24 13:17+0100\n" "PO-Revision-Date: 2004-09-27 13:32+0530\n" "Last-Translator: Gora Mohanty <gora_mohanty@yahoo.co.in>\n" "Language-Team: Oriya <gora_mohanty@yahoo.co.in>\n" diff --git a/po/pl.gmo b/po/pl.gmo index 197399142a867658ea6c954cdd2754007da14d73..fb797c99ed36ce08fe55e195c7638ab60e77bbc8 100644 Binary files a/po/pl.gmo and b/po/pl.gmo differ diff --git a/po/pl.po b/po/pl.po index 06b1938de696da7c37f3b0800f9de440064bcc3a..abd04f011cd532d4923582db698f47421533c331 100644 --- a/po/pl.po +++ b/po/pl.po @@ -6,7 +6,7 @@ msgid "" msgstr "" "Project-Id-Version: gst-plugins-good 1.6.0\n" "Report-Msgid-Bugs-To: http://bugzilla.gnome.org/\n" -"POT-Creation-Date: 2015-12-14 19:16+0100\n" +"POT-Creation-Date: 2015-12-24 13:17+0100\n" "PO-Revision-Date: 2015-10-15 20:49+0200\n" "Last-Translator: Jakub Bogusz <qboosh@pld-linux.org>\n" "Language-Team: Polish <translation-team-pl@lists.sourceforge.net>\n" diff --git a/po/pt_BR.gmo b/po/pt_BR.gmo index fbf5a768290f1979e3c4fbc7b6c1e5047ca70d6a..6659d570a1158a4aa82e58b4a44007a46931f14c 100644 Binary files a/po/pt_BR.gmo and b/po/pt_BR.gmo differ diff --git a/po/pt_BR.po b/po/pt_BR.po index b40325b6efec99e8c82d7ddf6ef4c100db3ec5ea..8c87ff09efbad4d60558d516bf6f046e6ce716ca 100644 --- a/po/pt_BR.po +++ b/po/pt_BR.po @@ -13,7 +13,7 @@ msgid "" msgstr "" "Project-Id-Version: gst-plugins-good-1.4.1\n" "Report-Msgid-Bugs-To: http://bugzilla.gnome.org/\n" -"POT-Creation-Date: 2015-12-14 19:16+0100\n" +"POT-Creation-Date: 2015-12-24 13:17+0100\n" "PO-Revision-Date: 2015-02-01 23:02-0200\n" "Last-Translator: FabrÃcio Godoy <skarllot@gmail.com>\n" "Language-Team: Brazilian Portuguese <ldpbr-translation@lists.sourceforge." diff --git a/po/ro.gmo b/po/ro.gmo index f00ce16f10020635efad6366f6ea114fc06b5eb7..23fa2c1f86f84c8368d9f1b9b570d9250b7c7c06 100644 Binary files a/po/ro.gmo and b/po/ro.gmo differ diff --git a/po/ro.po b/po/ro.po index af303fa96719bf0251a174706ac18c1eb4fac89f..27247c9bc54551464ac1972d9cf67037295ec609 100644 --- a/po/ro.po +++ b/po/ro.po @@ -5,7 +5,7 @@ msgid "" msgstr "" "Project-Id-Version: gst-plugins-good 0.10.23.2\n" "Report-Msgid-Bugs-To: http://bugzilla.gnome.org/\n" -"POT-Creation-Date: 2015-12-14 19:16+0100\n" +"POT-Creation-Date: 2015-12-24 13:17+0100\n" "PO-Revision-Date: 2010-08-16 03:22+0300\n" "Last-Translator: Lucian Adrian Grijincu <lucian.grijincu@gmail.com>\n" "Language-Team: Romanian <translation-team-ro@lists.sourceforge.net>\n" diff --git a/po/ru.gmo b/po/ru.gmo index 1d6d0cd8ca6858f0237d5a11b32ddbe1034439c1..4626da1ec1ac103c11fca0f71c233d1e347651ae 100644 Binary files a/po/ru.gmo and b/po/ru.gmo differ diff --git a/po/ru.po b/po/ru.po index 9d4b0f6195f9538943a3171173311b543f479070..8082e2374521e7d10cab5db9277a1e47b4c72ab8 100644 --- a/po/ru.po +++ b/po/ru.po @@ -9,7 +9,7 @@ msgid "" msgstr "" "Project-Id-Version: gst-plugins-good 1.6.0\n" "Report-Msgid-Bugs-To: http://bugzilla.gnome.org/\n" -"POT-Creation-Date: 2015-12-14 19:16+0100\n" +"POT-Creation-Date: 2015-12-24 13:17+0100\n" "PO-Revision-Date: 2015-10-18 13:39+0300\n" "Last-Translator: Yuri Kozlov <yuray@komyakino.ru>\n" "Language-Team: Russian <gnu@d07.ru>\n" diff --git a/po/sk.gmo b/po/sk.gmo index 926bc3eb7e9252a88e77affc89d7868fc4b9ab26..081621110472c6288f60d6f7c73ca992263c924f 100644 Binary files a/po/sk.gmo and b/po/sk.gmo differ diff --git a/po/sk.po b/po/sk.po index 6c56d31356e8ba394e41a790e6358c988a83053f..ecfaaa3061f5c65f37e45786a7b3143d3da4f452 100644 --- a/po/sk.po +++ b/po/sk.po @@ -6,7 +6,7 @@ msgid "" msgstr "" "Project-Id-Version: gst-plugins-good 1.2.1\n" "Report-Msgid-Bugs-To: http://bugzilla.gnome.org/\n" -"POT-Creation-Date: 2015-12-14 19:16+0100\n" +"POT-Creation-Date: 2015-12-24 13:17+0100\n" "PO-Revision-Date: 2014-01-30 11:08+0100\n" "Last-Translator: Peter Tuharsky <tuharsky@misbb.sk>\n" "Language-Team: Slovak <sk-i18n@lists.linux.sk>\n" diff --git a/po/sl.gmo b/po/sl.gmo index 3f0b4a1693d0df0dd9db963b0fde9edfd6462901..74aa43ad2918d1e7a32c6f5760e7a01fc563ffb4 100644 Binary files a/po/sl.gmo and b/po/sl.gmo differ diff --git a/po/sl.po b/po/sl.po index efc480a87f06fca37abdabdcb914800c5c8bacc5..b5a7156156a25e8298742a2702d388bb944f9811 100644 --- a/po/sl.po +++ b/po/sl.po @@ -10,7 +10,7 @@ msgid "" msgstr "" "Project-Id-Version: gst-plugins-good-1.2.1\n" "Report-Msgid-Bugs-To: http://bugzilla.gnome.org/\n" -"POT-Creation-Date: 2015-12-14 19:16+0100\n" +"POT-Creation-Date: 2015-12-24 13:17+0100\n" "PO-Revision-Date: 2014-04-09 22:52+0100\n" "Last-Translator: Klemen KoÅ¡ir <klemen913@gmail.com>\n" "Language-Team: Slovenian <translation-team-sl@lists.sourceforge.net>\n" diff --git a/po/sq.gmo b/po/sq.gmo index 4b05cf1d7736454777e01020d1897da2ec43e7e1..f6feb2fddbe3bb520d6b8021485d96bb3eb0d8c9 100644 Binary files a/po/sq.gmo and b/po/sq.gmo differ diff --git a/po/sq.po b/po/sq.po index 4bd6c6f13625e792d6379e814074b2fd23da1301..23973daab9942966140022b819d0fc413d37426d 100644 --- a/po/sq.po +++ b/po/sq.po @@ -6,7 +6,7 @@ msgid "" msgstr "" "Project-Id-Version: gst-plugins 0.8.3\n" "Report-Msgid-Bugs-To: http://bugzilla.gnome.org/\n" -"POT-Creation-Date: 2015-12-14 19:16+0100\n" +"POT-Creation-Date: 2015-12-24 13:17+0100\n" "PO-Revision-Date: 2004-08-07 20:29+0200\n" "Last-Translator: Laurent Dhima <laurenti@alblinux.net>\n" "Language-Team: Albanian <begraj@hotmail.com>\n" diff --git a/po/sr.gmo b/po/sr.gmo index 05a34ef328f494293531b3080ce7aadac550f52a..09e18f71f29a49cb62f43de5acb8a24b1b59c0ed 100644 Binary files a/po/sr.gmo and b/po/sr.gmo differ diff --git a/po/sr.po b/po/sr.po index 0c04e2ee50c4be947237a6a5259302978adde9cd..d0ae47f9aec2d2d18a5161e65cbdd973512b66a5 100644 --- a/po/sr.po +++ b/po/sr.po @@ -2,13 +2,13 @@ # Copyright (C) 2014 Free Software Foundation, Inc. # This file is distributed under the same license as the gst-plugins-good package. # Danilo Segan <dsegan@gmx.net>, 2004. -# МироÑлав Ðиколић <miroslavnikolic@rocketmail.com>, 2011—2014. +# МироÑлав Ðиколић <miroslavnikolic@rocketmail.com>, 2011—2015. msgid "" msgstr "" -"Project-Id-Version: gst-plugins-good-1.4.1\n" +"Project-Id-Version: gst-plugins-good-1.6.0\n" "Report-Msgid-Bugs-To: http://bugzilla.gnome.org/\n" -"POT-Creation-Date: 2015-12-14 19:16+0100\n" -"PO-Revision-Date: 2014-09-13 10:50+0200\n" +"POT-Creation-Date: 2015-12-24 13:17+0100\n" +"PO-Revision-Date: 2015-12-24 11:39+0200\n" "Last-Translator: МироÑлав Ðиколић <miroslavnikolic@rocketmail.com>\n" "Language-Team: Serbian <(nothing)>\n" "Language: sr\n" @@ -47,7 +47,6 @@ msgstr "Ðе могу да уÑпоÑтавим везу Ñа Ñервером." msgid "Secure connection setup failed." msgstr "Подешавање безбедне везе није уÑпело." -#, fuzzy msgid "" "A network error occurred, or the server closed the connection unexpectedly." msgstr "Дошло је до грешке на мрежи, или је Ñервер неочекивано затворио везу." diff --git a/po/sv.gmo b/po/sv.gmo index 4b9068963353fde5ea15a9879b48fe6ec28ce82f..71a339dae53ed920c53a87b26f90a732eda7e585 100644 Binary files a/po/sv.gmo and b/po/sv.gmo differ diff --git a/po/sv.po b/po/sv.po index 6238e8b72beecd6408e7459eafce571c249e1af1..78c227b0f0079b8ff4197859a259071ff88eb7ff 100644 --- a/po/sv.po +++ b/po/sv.po @@ -9,7 +9,7 @@ msgid "" msgstr "" "Project-Id-Version: gst-plugins-good 1.6.0\n" "Report-Msgid-Bugs-To: http://bugzilla.gnome.org/\n" -"POT-Creation-Date: 2015-12-14 19:16+0100\n" +"POT-Creation-Date: 2015-12-24 13:17+0100\n" "PO-Revision-Date: 2015-10-31 15:31+0100\n" "Last-Translator: Sebastian Rasmussen <sebras@gmail.com>\n" "Language-Team: Swedish <tp-sv@listor.tp-sv.se>\n" diff --git a/po/tr.gmo b/po/tr.gmo index 7ac8224885f3adf5125a462444d89e2637ceb7b0..9434456228c73524d31a3b6d91d1acaa2f7ca66f 100644 Binary files a/po/tr.gmo and b/po/tr.gmo differ diff --git a/po/tr.po b/po/tr.po index 6bd8967893eabaade3d50602002b1cba888d948b..9edc5768cdd55509ceff7e1c5db99711bfd69340 100644 --- a/po/tr.po +++ b/po/tr.po @@ -8,7 +8,7 @@ msgid "" msgstr "" "Project-Id-Version: gst-plugins-good 1.4.1\n" "Report-Msgid-Bugs-To: http://bugzilla.gnome.org/\n" -"POT-Creation-Date: 2015-12-14 19:16+0100\n" +"POT-Creation-Date: 2015-12-24 13:17+0100\n" "PO-Revision-Date: 2015-01-10 21:07+0100\n" "Last-Translator: Volkan Gezer <volkangezer@gmail.com>\n" "Language-Team: Turkish <gnu-tr-u12a@lists.sourceforge.net>\n" diff --git a/po/uk.gmo b/po/uk.gmo index 6f2b3da34a13c8158eb10a6380095958c37ef12e..8634af9e55c81cb4c8c88292a3bf159ccffe1b8c 100644 Binary files a/po/uk.gmo and b/po/uk.gmo differ diff --git a/po/uk.po b/po/uk.po index 8fc0b522a58af111609ca9fcba11b1d1e8ce6947..168eccf82577f0b25f1126d80b5644f3e97b393c 100644 --- a/po/uk.po +++ b/po/uk.po @@ -8,7 +8,7 @@ msgid "" msgstr "" "Project-Id-Version: gst-plugins-good 1.6.0\n" "Report-Msgid-Bugs-To: http://bugzilla.gnome.org/\n" -"POT-Creation-Date: 2015-12-14 19:16+0100\n" +"POT-Creation-Date: 2015-12-24 13:17+0100\n" "PO-Revision-Date: 2015-11-13 21:55+0200\n" "Last-Translator: Yuri Chornoivan <yurchor@ukr.net>\n" "Language-Team: Ukrainian <translation-team-uk@lists.sourceforge.net>\n" diff --git a/po/vi.gmo b/po/vi.gmo index 31ccb20c2dae5967c0c14be0095ece9b40b8e913..7005c5edb8182704a41c4cd8759f6909c94dad8d 100644 Binary files a/po/vi.gmo and b/po/vi.gmo differ diff --git a/po/vi.po b/po/vi.po index 8aaa5faca4b1a8351d7d935607f4dd61917091ec..bc3b10e838f60f4b1774513809536703b0289ae8 100644 --- a/po/vi.po +++ b/po/vi.po @@ -8,7 +8,7 @@ msgid "" msgstr "" "Project-Id-Version: gst-plugins-good 1.6.0\n" "Report-Msgid-Bugs-To: http://bugzilla.gnome.org/\n" -"POT-Creation-Date: 2015-12-14 19:16+0100\n" +"POT-Creation-Date: 2015-12-24 13:17+0100\n" "PO-Revision-Date: 2015-10-16 08:17+0700\n" "Last-Translator: Trần Ngá»c Quân <vnwildman@gmail.com>\n" "Language-Team: Vietnamese <translation-team-vi@lists.sourceforge.net>\n" diff --git a/po/zh_CN.gmo b/po/zh_CN.gmo index 1f7f1d502c6ca355344e871c4890a33da02192da..2cfa11d578c65de4e5a500cbee062e09b61eee38 100644 Binary files a/po/zh_CN.gmo and b/po/zh_CN.gmo differ diff --git a/po/zh_CN.po b/po/zh_CN.po index eb1333b04b70031abe8ad473b38d87cc37029539..4f9940afdb87d2cd313b783582c4571a8d15deae 100644 --- a/po/zh_CN.po +++ b/po/zh_CN.po @@ -7,7 +7,7 @@ msgid "" msgstr "" "Project-Id-Version: gst-plugins-good 1.6.0\n" "Report-Msgid-Bugs-To: http://bugzilla.gnome.org/\n" -"POT-Creation-Date: 2015-12-14 19:16+0100\n" +"POT-Creation-Date: 2015-12-24 13:17+0100\n" "PO-Revision-Date: 2015-10-16 19:26+0800\n" "Last-Translator: Tianze Wang <zwpwjwtz@126.com>\n" "Language-Team: Chinese (simplified) <i18n-zh@googlegroups.com>\n" diff --git a/po/zh_HK.gmo b/po/zh_HK.gmo index 624145a1aa67c7b5f5beeb47c5985a6454945e63..80ab6caf4d5ecef0e5835acd79611848a04c29f9 100644 Binary files a/po/zh_HK.gmo and b/po/zh_HK.gmo differ diff --git a/po/zh_HK.po b/po/zh_HK.po index 3bfa198de12175f2b4b01f223b131939862b1930..20e0ea8c1de3c04cc5ec159367949dcccd15f428 100644 --- a/po/zh_HK.po +++ b/po/zh_HK.po @@ -6,7 +6,7 @@ msgid "" msgstr "" "Project-Id-Version: gst-plugins-good-0.10.2 0.10.2\n" "Report-Msgid-Bugs-To: http://bugzilla.gnome.org/\n" -"POT-Creation-Date: 2015-12-14 19:16+0100\n" +"POT-Creation-Date: 2015-12-24 13:17+0100\n" "PO-Revision-Date: 2006-08-29 01:08+0800\n" "Last-Translator: Abel Cheung <abelcheung@gmail.com>\n" "Language-Team: Chinese (Hong Kong) <community@linuxhall.org>\n" diff --git a/po/zh_TW.gmo b/po/zh_TW.gmo index 1e3c0538602b5130df922f58b8c06350f40b0fc7..997ac34c342aabb38bd7552d1975bdd8a03db35e 100644 Binary files a/po/zh_TW.gmo and b/po/zh_TW.gmo differ diff --git a/po/zh_TW.po b/po/zh_TW.po index 3f3aa9fcec58aec3d89a3a7692002a99547005d7..e306b457a2993cdb26952875eb5b4bae484340d3 100644 --- a/po/zh_TW.po +++ b/po/zh_TW.po @@ -6,7 +6,7 @@ msgid "" msgstr "" "Project-Id-Version: gst-plugins-good-0.10.2 0.10.2\n" "Report-Msgid-Bugs-To: http://bugzilla.gnome.org/\n" -"POT-Creation-Date: 2015-12-14 19:16+0100\n" +"POT-Creation-Date: 2015-12-24 13:17+0100\n" "PO-Revision-Date: 2006-08-29 01:08+0800\n" "Last-Translator: Abel Cheung <abelcheung@gmail.com>\n" "Language-Team: Chinese (traditional) <zh-l10n@linux.org.tw>\n" diff --git a/sys/Makefile.in b/sys/Makefile.in index fcbbec489d4c8cf58278e7c881333cd92952b7e3..de42d0c057ec0049f998dc21c08e9b79a087477c 100644 --- a/sys/Makefile.in +++ b/sys/Makefile.in @@ -461,6 +461,8 @@ VALGRIND_PATH = @VALGRIND_PATH@ VERSION = @VERSION@ VPX_130_CFLAGS = @VPX_130_CFLAGS@ VPX_130_LIBS = @VPX_130_LIBS@ +VPX_140_CFLAGS = @VPX_140_CFLAGS@ +VPX_140_LIBS = @VPX_140_LIBS@ VPX_CFLAGS = @VPX_CFLAGS@ VPX_LIBS = @VPX_LIBS@ WARNING_CFLAGS = @WARNING_CFLAGS@ diff --git a/sys/directsound/Makefile.in b/sys/directsound/Makefile.in index e398394be5698b949886ee8b4a2571872a17c338..5940e506c24c95bea2dbf3f2896ea3824423368e 100644 --- a/sys/directsound/Makefile.in +++ b/sys/directsound/Makefile.in @@ -480,6 +480,8 @@ VALGRIND_PATH = @VALGRIND_PATH@ VERSION = @VERSION@ VPX_130_CFLAGS = @VPX_130_CFLAGS@ VPX_130_LIBS = @VPX_130_LIBS@ +VPX_140_CFLAGS = @VPX_140_CFLAGS@ +VPX_140_LIBS = @VPX_140_LIBS@ VPX_CFLAGS = @VPX_CFLAGS@ VPX_LIBS = @VPX_LIBS@ WARNING_CFLAGS = @WARNING_CFLAGS@ diff --git a/sys/directsound/gstdirectsoundsink.c b/sys/directsound/gstdirectsoundsink.c index a4f0bded83f21728e5bda7d695b524e4ee6f6ab9..ffd1bfe89fcfd9e9f03bad3792602913a298074a 100644 --- a/sys/directsound/gstdirectsoundsink.c +++ b/sys/directsound/gstdirectsoundsink.c @@ -430,8 +430,15 @@ gst_directsound_sink_open (GstAudioSink * asink) dsoundsink = GST_DIRECTSOUND_SINK (asink); - if (dsoundsink->device_id) + if (dsoundsink->device_id) { lpGuid = string_to_guid (dsoundsink->device_id); + if (lpGuid == NULL) { + GST_ELEMENT_ERROR (dsoundsink, RESOURCE, OPEN_READ, + ("gst_directsound_sink_open: device set, but guid not found: %s", + dsoundsink->device_id), (NULL)); + return FALSE; + } + } /* create and initialize a DirecSound object */ if (FAILED (hRes = DirectSoundCreate (lpGuid, &dsoundsink->pDS, NULL))) { @@ -608,7 +615,8 @@ gst_directsound_sink_write (GstAudioSink * asink, gpointer data, guint length) &dwCurrentPlayCursor, NULL); if (SUCCEEDED (hRes) && SUCCEEDED (hRes2) && (dwStatus & DSBSTATUS_PLAYING)) { - DWORD dwFreeBufferSize; + DWORD dwFreeBufferSize = 0; + DWORD sleepTime = 0; calculate_freesize: /* calculate the free size of the circular buffer */ @@ -621,7 +629,17 @@ gst_directsound_sink_write (GstAudioSink * asink, gpointer data, guint length) dwCurrentPlayCursor - dsoundsink->current_circular_offset; if (length >= dwFreeBufferSize) { - Sleep (100); + sleepTime = + ((length - + dwFreeBufferSize) * 1000) / (dsoundsink->bytes_per_sample * + GST_AUDIO_BASE_SINK (asink)->ringbuffer->spec.info.rate); + if (sleepTime > 0) { + GST_DEBUG_OBJECT (dsoundsink, + "gst_directsound_sink_write: length:%i, FreeBufSiz: %ld, sleepTime: %ld, bps: %i, rate: %i", + length, dwFreeBufferSize, sleepTime, dsoundsink->bytes_per_sample, + GST_AUDIO_BASE_SINK (asink)->ringbuffer->spec.info.rate); + Sleep (sleepTime); + } hRes = IDirectSoundBuffer_GetCurrentPosition (dsoundsink->pDSBSecondary, &dwCurrentPlayCursor, NULL); diff --git a/sys/oss/Makefile.in b/sys/oss/Makefile.in index 065d7a9054d54f8cee876d02491448de70423fe0..71f2c6e6a2904a95549e899869644661e7b43737 100644 --- a/sys/oss/Makefile.in +++ b/sys/oss/Makefile.in @@ -478,6 +478,8 @@ VALGRIND_PATH = @VALGRIND_PATH@ VERSION = @VERSION@ VPX_130_CFLAGS = @VPX_130_CFLAGS@ VPX_130_LIBS = @VPX_130_LIBS@ +VPX_140_CFLAGS = @VPX_140_CFLAGS@ +VPX_140_LIBS = @VPX_140_LIBS@ VPX_CFLAGS = @VPX_CFLAGS@ VPX_LIBS = @VPX_LIBS@ WARNING_CFLAGS = @WARNING_CFLAGS@ diff --git a/sys/oss/gstosssrc.c b/sys/oss/gstosssrc.c index 742c59dc443298dedce284e0dcdb0bbf9e56d3e0..60c9e053442db7266a6428f4877b5217d6c79cef 100644 --- a/sys/oss/gstosssrc.c +++ b/sys/oss/gstosssrc.c @@ -181,8 +181,7 @@ gst_oss_src_set_property (GObject * object, guint prop_id, switch (prop_id) { case PROP_DEVICE: - if (src->device) - g_free (src->device); + g_free (src->device); src->device = g_value_dup_string (value); break; default: diff --git a/sys/oss4/Makefile.in b/sys/oss4/Makefile.in index 28dcc0cd6fb87a49c3d3d8f3d0255397600dd7d9..90973b04a724b954ffdb85c03574da81caade514 100644 --- a/sys/oss4/Makefile.in +++ b/sys/oss4/Makefile.in @@ -479,6 +479,8 @@ VALGRIND_PATH = @VALGRIND_PATH@ VERSION = @VERSION@ VPX_130_CFLAGS = @VPX_130_CFLAGS@ VPX_130_LIBS = @VPX_130_LIBS@ +VPX_140_CFLAGS = @VPX_140_CFLAGS@ +VPX_140_LIBS = @VPX_140_LIBS@ VPX_CFLAGS = @VPX_CFLAGS@ VPX_LIBS = @VPX_LIBS@ WARNING_CFLAGS = @WARNING_CFLAGS@ diff --git a/sys/osxaudio/Makefile.in b/sys/osxaudio/Makefile.in index 2f4e7b37771a9c188db443b33385cf976e60d328..7cecd5f76f964464957c875e1187396b9d8cd0b4 100644 --- a/sys/osxaudio/Makefile.in +++ b/sys/osxaudio/Makefile.in @@ -484,6 +484,8 @@ VALGRIND_PATH = @VALGRIND_PATH@ VERSION = @VERSION@ VPX_130_CFLAGS = @VPX_130_CFLAGS@ VPX_130_LIBS = @VPX_130_LIBS@ +VPX_140_CFLAGS = @VPX_140_CFLAGS@ +VPX_140_LIBS = @VPX_140_LIBS@ VPX_CFLAGS = @VPX_CFLAGS@ VPX_LIBS = @VPX_LIBS@ WARNING_CFLAGS = @WARNING_CFLAGS@ diff --git a/sys/osxvideo/Makefile.in b/sys/osxvideo/Makefile.in index 44c46434e344812172320eef2a473b61139a7068..299113040f52249cf4dd9a22815756c932298e66 100644 --- a/sys/osxvideo/Makefile.in +++ b/sys/osxvideo/Makefile.in @@ -478,6 +478,8 @@ VALGRIND_PATH = @VALGRIND_PATH@ VERSION = @VERSION@ VPX_130_CFLAGS = @VPX_130_CFLAGS@ VPX_130_LIBS = @VPX_130_LIBS@ +VPX_140_CFLAGS = @VPX_140_CFLAGS@ +VPX_140_LIBS = @VPX_140_LIBS@ VPX_CFLAGS = @VPX_CFLAGS@ VPX_LIBS = @VPX_LIBS@ WARNING_CFLAGS = @WARNING_CFLAGS@ diff --git a/sys/sunaudio/Makefile.in b/sys/sunaudio/Makefile.in index fa9bf3628a7c21bac2048a72b554ea1d3d5f58a4..c23856b2122ebfedd2f1172181f9805296ed6415 100644 --- a/sys/sunaudio/Makefile.in +++ b/sys/sunaudio/Makefile.in @@ -482,6 +482,8 @@ VALGRIND_PATH = @VALGRIND_PATH@ VERSION = @VERSION@ VPX_130_CFLAGS = @VPX_130_CFLAGS@ VPX_130_LIBS = @VPX_130_LIBS@ +VPX_140_CFLAGS = @VPX_140_CFLAGS@ +VPX_140_LIBS = @VPX_140_LIBS@ VPX_CFLAGS = @VPX_CFLAGS@ VPX_LIBS = @VPX_LIBS@ WARNING_CFLAGS = @WARNING_CFLAGS@ diff --git a/sys/sunaudio/gstsunaudiosrc.c b/sys/sunaudio/gstsunaudiosrc.c index ec1d7d7a42d2e4e6a73496fa815f519338b8740e..0f454bf8ee20f8e9b98de71bded1ec9a28e4f9d6 100644 --- a/sys/sunaudio/gstsunaudiosrc.c +++ b/sys/sunaudio/gstsunaudiosrc.c @@ -177,8 +177,7 @@ gst_sunaudiosrc_set_property (GObject * object, guint prop_id, switch (prop_id) { case PROP_DEVICE: - if (sunaudiosrc->device) - g_free (sunaudiosrc->device); + g_free (sunaudiosrc->device); sunaudiosrc->device = g_value_dup_string (value); break; default: diff --git a/sys/v4l2/Makefile.in b/sys/v4l2/Makefile.in index 44bc72f9d53224bf5d0a131c2d38f908e8bec8e2..2134e2afcbf4c67e489d395fcef5cacea46f0e3d 100644 --- a/sys/v4l2/Makefile.in +++ b/sys/v4l2/Makefile.in @@ -505,6 +505,8 @@ VALGRIND_PATH = @VALGRIND_PATH@ VERSION = @VERSION@ VPX_130_CFLAGS = @VPX_130_CFLAGS@ VPX_130_LIBS = @VPX_130_LIBS@ +VPX_140_CFLAGS = @VPX_140_CFLAGS@ +VPX_140_LIBS = @VPX_140_LIBS@ VPX_CFLAGS = @VPX_CFLAGS@ VPX_LIBS = @VPX_LIBS@ WARNING_CFLAGS = @WARNING_CFLAGS@ diff --git a/sys/v4l2/gstv4l2.c b/sys/v4l2/gstv4l2.c index 8333eab41e26b11f467585d3e397d452f633c7b2..83fcc982a2d498ea7a981ebaeb72d9366ba0ac92 100644 --- a/sys/v4l2/gstv4l2.c +++ b/sys/v4l2/gstv4l2.c @@ -54,6 +54,7 @@ GST_DEBUG_CATEGORY (v4l2_debug); #define GST_CAT_DEFAULT v4l2_debug +#ifdef GST_V4L2_ENABLE_PROBE /* This is a minimalist probe, for speed, we only enumerate formats */ static GstCaps * gst_v4l2_probe_template_caps (const gchar * device, gint video_fd, @@ -167,6 +168,13 @@ gst_v4l2_probe_and_register (GstPlugin * plugin) gst_v4l2_probe_template_caps (it->device_path, video_fd, V4L2_BUF_TYPE_VIDEO_CAPTURE_MPLANE)); + /* Skip devices without any supported formats */ + if (gst_caps_is_empty (sink_caps) || gst_caps_is_empty (src_caps)) { + gst_caps_unref (sink_caps); + gst_caps_unref (src_caps); + continue; + } + basename = g_path_get_basename (it->device_path); if (gst_v4l2_is_video_dec (sink_caps, src_caps)) @@ -192,12 +200,21 @@ gst_v4l2_probe_and_register (GstPlugin * plugin) return ret; } +#endif static gboolean plugin_init (GstPlugin * plugin) { + const gchar *paths[] = { "/dev", "/dev/v4l2", NULL }; + const gchar *names[] = { "video", NULL }; + GST_DEBUG_CATEGORY_INIT (v4l2_debug, "v4l2", 0, "V4L2 API calls"); + /* Add some depedency, so the dynamic features get updated upon changes in + * /dev/video* */ + gst_plugin_add_dependency (plugin, + NULL, paths, names, GST_PLUGIN_DEPENDENCY_FLAG_FILE_NAME_IS_PREFIX); + if (!gst_element_register (plugin, "v4l2src", GST_RANK_PRIMARY, GST_TYPE_V4L2SRC) || !gst_element_register (plugin, "v4l2sink", GST_RANK_NONE, @@ -205,9 +222,12 @@ plugin_init (GstPlugin * plugin) !gst_element_register (plugin, "v4l2radio", GST_RANK_NONE, GST_TYPE_V4L2RADIO) || !gst_device_provider_register (plugin, "v4l2deviceprovider", - GST_RANK_PRIMARY, GST_TYPE_V4L2_DEVICE_PROVIDER) || + GST_RANK_PRIMARY, GST_TYPE_V4L2_DEVICE_PROVIDER) /* etc. */ - !gst_v4l2_probe_and_register (plugin)) +#ifdef GST_V4L2_ENABLE_PROBE + || !gst_v4l2_probe_and_register (plugin) +#endif + ) return FALSE; #ifdef ENABLE_NLS diff --git a/sys/v4l2/gstv4l2object.c b/sys/v4l2/gstv4l2object.c index 17847e69fccd9f7def9a8f4c8cc004b5dffe9ced..9f7deafffa43e37fdd2e48601f2997005077efee 100644 --- a/sys/v4l2/gstv4l2object.c +++ b/sys/v4l2/gstv4l2object.c @@ -83,39 +83,83 @@ typedef struct } GstV4L2FormatDesc; static const GstV4L2FormatDesc gst_v4l2_formats[] = { - /* from Linux 2.6.15 videodev2.h */ + /* RGB formats */ {V4L2_PIX_FMT_RGB332, TRUE, GST_V4L2_RAW}, - {V4L2_PIX_FMT_RGB555, TRUE, GST_V4L2_RAW}, + {V4L2_PIX_FMT_ARGB555, TRUE, GST_V4L2_RAW}, + {V4L2_PIX_FMT_XRGB555, TRUE, GST_V4L2_RAW}, + {V4L2_PIX_FMT_ARGB555X, TRUE, GST_V4L2_RAW}, + {V4L2_PIX_FMT_XRGB555X, TRUE, GST_V4L2_RAW}, {V4L2_PIX_FMT_RGB565, TRUE, GST_V4L2_RAW}, - {V4L2_PIX_FMT_RGB555X, TRUE, GST_V4L2_RAW}, {V4L2_PIX_FMT_RGB565X, TRUE, GST_V4L2_RAW}, + {V4L2_PIX_FMT_BGR666, TRUE, GST_V4L2_RAW}, {V4L2_PIX_FMT_BGR24, TRUE, GST_V4L2_RAW}, {V4L2_PIX_FMT_RGB24, TRUE, GST_V4L2_RAW}, + {V4L2_PIX_FMT_ABGR32, TRUE, GST_V4L2_RAW}, + {V4L2_PIX_FMT_XBGR32, TRUE, GST_V4L2_RAW}, + {V4L2_PIX_FMT_ARGB32, TRUE, GST_V4L2_RAW}, + {V4L2_PIX_FMT_XRGB32, TRUE, GST_V4L2_RAW}, + + /* Deprecated Packed RGB Image Formats (alpha ambiguity) */ + {V4L2_PIX_FMT_RGB444, TRUE, GST_V4L2_RAW}, + {V4L2_PIX_FMT_RGB555, TRUE, GST_V4L2_RAW}, + {V4L2_PIX_FMT_RGB555X, TRUE, GST_V4L2_RAW}, {V4L2_PIX_FMT_BGR32, TRUE, GST_V4L2_RAW}, {V4L2_PIX_FMT_RGB32, TRUE, GST_V4L2_RAW}, + + /* Grey formats */ {V4L2_PIX_FMT_GREY, TRUE, GST_V4L2_RAW}, + {V4L2_PIX_FMT_Y4, TRUE, GST_V4L2_RAW}, + {V4L2_PIX_FMT_Y6, TRUE, GST_V4L2_RAW}, + {V4L2_PIX_FMT_Y10, TRUE, GST_V4L2_RAW}, + {V4L2_PIX_FMT_Y12, TRUE, GST_V4L2_RAW}, + {V4L2_PIX_FMT_Y16, TRUE, GST_V4L2_RAW}, + {V4L2_PIX_FMT_Y16_BE, TRUE, GST_V4L2_RAW}, + {V4L2_PIX_FMT_Y10BPACK, TRUE, GST_V4L2_RAW}, + + /* Palette formats */ + {V4L2_PIX_FMT_PAL8, TRUE, GST_V4L2_RAW}, + + /* Chrominance formats */ + {V4L2_PIX_FMT_UV8, TRUE, GST_V4L2_RAW}, + + /* Luminance+Chrominance formats */ {V4L2_PIX_FMT_YVU410, TRUE, GST_V4L2_RAW}, {V4L2_PIX_FMT_YVU420, TRUE, GST_V4L2_RAW}, + {V4L2_PIX_FMT_YVU420M, TRUE, GST_V4L2_RAW}, {V4L2_PIX_FMT_YUYV, TRUE, GST_V4L2_RAW}, + {V4L2_PIX_FMT_YYUV, TRUE, GST_V4L2_RAW}, + {V4L2_PIX_FMT_YVYU, TRUE, GST_V4L2_RAW}, {V4L2_PIX_FMT_UYVY, TRUE, GST_V4L2_RAW}, + {V4L2_PIX_FMT_VYUY, TRUE, GST_V4L2_RAW}, {V4L2_PIX_FMT_YUV422P, TRUE, GST_V4L2_RAW}, {V4L2_PIX_FMT_YUV411P, TRUE, GST_V4L2_RAW}, {V4L2_PIX_FMT_Y41P, TRUE, GST_V4L2_RAW}, + {V4L2_PIX_FMT_YUV444, TRUE, GST_V4L2_RAW}, + {V4L2_PIX_FMT_YUV555, TRUE, GST_V4L2_RAW}, + {V4L2_PIX_FMT_YUV565, TRUE, GST_V4L2_RAW}, + {V4L2_PIX_FMT_YUV32, TRUE, GST_V4L2_RAW}, + {V4L2_PIX_FMT_YUV410, TRUE, GST_V4L2_RAW}, + {V4L2_PIX_FMT_YUV420, TRUE, GST_V4L2_RAW}, + {V4L2_PIX_FMT_YUV420M, TRUE, GST_V4L2_RAW}, + {V4L2_PIX_FMT_HI240, TRUE, GST_V4L2_RAW}, + {V4L2_PIX_FMT_HM12, TRUE, GST_V4L2_RAW}, + {V4L2_PIX_FMT_M420, TRUE, GST_V4L2_RAW}, /* two planes -- one Y, one Cr + Cb interleaved */ {V4L2_PIX_FMT_NV12, TRUE, GST_V4L2_RAW}, {V4L2_PIX_FMT_NV12M, TRUE, GST_V4L2_RAW}, {V4L2_PIX_FMT_NV12MT, TRUE, GST_V4L2_RAW}, + {V4L2_PIX_FMT_NV12MT_16X16, TRUE, GST_V4L2_RAW}, {V4L2_PIX_FMT_NV21, TRUE, GST_V4L2_RAW}, {V4L2_PIX_FMT_NV21M, TRUE, GST_V4L2_RAW}, - - /* The following formats are not defined in the V4L2 specification */ - {V4L2_PIX_FMT_YUV410, TRUE, GST_V4L2_RAW}, - {V4L2_PIX_FMT_YUV420, TRUE, GST_V4L2_RAW}, - {V4L2_PIX_FMT_YYUV, TRUE, GST_V4L2_RAW}, - {V4L2_PIX_FMT_HI240, TRUE, GST_V4L2_RAW}, - - /* see http://www.siliconimaging.com/RGB%20Bayer.htm */ + {V4L2_PIX_FMT_NV16, TRUE, GST_V4L2_RAW}, + {V4L2_PIX_FMT_NV16M, TRUE, GST_V4L2_RAW}, + {V4L2_PIX_FMT_NV61, TRUE, GST_V4L2_RAW}, + {V4L2_PIX_FMT_NV61M, TRUE, GST_V4L2_RAW}, + {V4L2_PIX_FMT_NV24, TRUE, GST_V4L2_RAW}, + {V4L2_PIX_FMT_NV42, TRUE, GST_V4L2_RAW}, + + /* Bayer formats - see http://www.siliconimaging.com/RGB%20Bayer.htm */ {V4L2_PIX_FMT_SBGGR8, TRUE, GST_V4L2_CODEC}, {V4L2_PIX_FMT_SGBRG8, TRUE, GST_V4L2_CODEC}, {V4L2_PIX_FMT_SGRBG8, TRUE, GST_V4L2_CODEC}, @@ -127,12 +171,16 @@ static const GstV4L2FormatDesc gst_v4l2_formats[] = { {V4L2_PIX_FMT_PJPG, FALSE, GST_V4L2_CODEC}, {V4L2_PIX_FMT_DV, FALSE, GST_V4L2_TRANSPORT}, {V4L2_PIX_FMT_MPEG, FALSE, GST_V4L2_TRANSPORT}, + {V4L2_PIX_FMT_H264, FALSE, GST_V4L2_CODEC}, + {V4L2_PIX_FMT_H264_NO_SC, FALSE, GST_V4L2_CODEC}, + {V4L2_PIX_FMT_H264_MVC, FALSE, GST_V4L2_CODEC}, + {V4L2_PIX_FMT_H263, FALSE, GST_V4L2_CODEC}, {V4L2_PIX_FMT_MPEG1, FALSE, GST_V4L2_CODEC}, {V4L2_PIX_FMT_MPEG2, FALSE, GST_V4L2_CODEC}, {V4L2_PIX_FMT_MPEG4, FALSE, GST_V4L2_CODEC}, - {V4L2_PIX_FMT_H263, FALSE, GST_V4L2_CODEC}, - {V4L2_PIX_FMT_H264, FALSE, GST_V4L2_CODEC}, - /* VP8 not parseable */ + {V4L2_PIX_FMT_XVID, FALSE, GST_V4L2_CODEC}, + {V4L2_PIX_FMT_VC1_ANNEX_G, FALSE, GST_V4L2_CODEC}, + {V4L2_PIX_FMT_VC1_ANNEX_L, FALSE, GST_V4L2_CODEC}, {V4L2_PIX_FMT_VP8, FALSE, GST_V4L2_CODEC | GST_V4L2_NO_PARSE}, /* Vendor-specific formats */ @@ -140,7 +188,6 @@ static const GstV4L2FormatDesc gst_v4l2_formats[] = { {V4L2_PIX_FMT_SN9C10X, TRUE, GST_V4L2_CODEC}, {V4L2_PIX_FMT_PWC1, TRUE, GST_V4L2_CODEC}, {V4L2_PIX_FMT_PWC2, TRUE, GST_V4L2_CODEC}, - {V4L2_PIX_FMT_YVYU, TRUE, GST_V4L2_RAW}, }; #define GST_V4L2_FORMAT_COUNT (G_N_ELEMENTS (gst_v4l2_formats)) @@ -460,11 +507,9 @@ gst_v4l2_object_destroy (GstV4l2Object * v4l2object) { g_return_if_fail (v4l2object != NULL); - if (v4l2object->videodev) - g_free (v4l2object->videodev); + g_free (v4l2object->videodev); - if (v4l2object->channel) - g_free (v4l2object->channel); + g_free (v4l2object->channel); if (v4l2object->formats) { gst_v4l2_object_clear_format_list (v4l2object); @@ -901,10 +946,27 @@ gst_v4l2_object_format_get_rank (const struct v4l2_fmtdesc *fmt) break; case V4L2_PIX_FMT_RGB332: + case V4L2_PIX_FMT_ARGB555: + case V4L2_PIX_FMT_XRGB555: case V4L2_PIX_FMT_RGB555: + case V4L2_PIX_FMT_ARGB555X: + case V4L2_PIX_FMT_XRGB555X: case V4L2_PIX_FMT_RGB555X: + case V4L2_PIX_FMT_BGR666: case V4L2_PIX_FMT_RGB565: case V4L2_PIX_FMT_RGB565X: + case V4L2_PIX_FMT_RGB444: + case V4L2_PIX_FMT_Y4: + case V4L2_PIX_FMT_Y6: + case V4L2_PIX_FMT_Y10: + case V4L2_PIX_FMT_Y12: + case V4L2_PIX_FMT_Y10BPACK: + case V4L2_PIX_FMT_YUV555: + case V4L2_PIX_FMT_YUV565: + case V4L2_PIX_FMT_YUV32: + case V4L2_PIX_FMT_NV12MT_16X16: + case V4L2_PIX_FMT_NV42: + case V4L2_PIX_FMT_H264_MVC: rank = RGB_ODD_BASE_RANK; break; @@ -915,6 +977,10 @@ gst_v4l2_object_format_get_rank (const struct v4l2_fmtdesc *fmt) case V4L2_PIX_FMT_RGB32: case V4L2_PIX_FMT_BGR32: + case V4L2_PIX_FMT_ABGR32: + case V4L2_PIX_FMT_XBGR32: + case V4L2_PIX_FMT_ARGB32: + case V4L2_PIX_FMT_XRGB32: rank = RGB_BASE_RANK; break; @@ -929,6 +995,11 @@ gst_v4l2_object_format_get_rank (const struct v4l2_fmtdesc *fmt) case V4L2_PIX_FMT_NV21M: /* Same as NV21 */ case V4L2_PIX_FMT_YYUV: /* 16 YUV 4:2:2 */ case V4L2_PIX_FMT_HI240: /* 8 8-bit color */ + case V4L2_PIX_FMT_NV16: /* 16 Y/CbCr 4:2:2 */ + case V4L2_PIX_FMT_NV16M: /* Same as NV16 */ + case V4L2_PIX_FMT_NV61: /* 16 Y/CrCb 4:2:2 */ + case V4L2_PIX_FMT_NV61M: /* Same as NV61 */ + case V4L2_PIX_FMT_NV24: /* 24 Y/CrCb 4:4:4 */ rank = YUV_ODD_BASE_RANK; break; @@ -939,6 +1010,7 @@ gst_v4l2_object_format_get_rank (const struct v4l2_fmtdesc *fmt) rank = YUV_BASE_RANK + 2; break; case V4L2_PIX_FMT_YUV420: /* I420, 12 bits per pixel */ + case V4L2_PIX_FMT_YUV420M: rank = YUV_BASE_RANK + 7; break; case V4L2_PIX_FMT_YUYV: /* YUY2, 16 bits per pixel */ @@ -950,6 +1022,9 @@ gst_v4l2_object_format_get_rank (const struct v4l2_fmtdesc *fmt) case V4L2_PIX_FMT_UYVY: /* UYVY, 16 bits per pixel */ rank = YUV_BASE_RANK + 9; break; + case V4L2_PIX_FMT_YUV444: + rank = YUV_BASE_RANK + 6; + break; case V4L2_PIX_FMT_Y41P: /* Y41P, 12 bits per pixel */ rank = YUV_BASE_RANK + 5; break; @@ -1133,9 +1208,20 @@ gst_v4l2_object_v4l2fourcc_to_video_format (guint32 fourcc) case V4L2_PIX_FMT_GREY: /* 8 Greyscale */ format = GST_VIDEO_FORMAT_GRAY8; break; + case V4L2_PIX_FMT_Y16: + format = GST_VIDEO_FORMAT_GRAY16_LE; + break; + case V4L2_PIX_FMT_Y16_BE: + format = GST_VIDEO_FORMAT_GRAY16_BE; + break; + case V4L2_PIX_FMT_XRGB555: case V4L2_PIX_FMT_RGB555: format = GST_VIDEO_FORMAT_RGB15; break; + case V4L2_PIX_FMT_XRGB555X: + case V4L2_PIX_FMT_RGB555X: + format = GST_VIDEO_FORMAT_BGR15; + break; case V4L2_PIX_FMT_RGB565: format = GST_VIDEO_FORMAT_RGB16; break; @@ -1145,12 +1231,20 @@ gst_v4l2_object_v4l2fourcc_to_video_format (guint32 fourcc) case V4L2_PIX_FMT_BGR24: format = GST_VIDEO_FORMAT_BGR; break; + case V4L2_PIX_FMT_XRGB32: case V4L2_PIX_FMT_RGB32: format = GST_VIDEO_FORMAT_xRGB; break; + case V4L2_PIX_FMT_XBGR32: case V4L2_PIX_FMT_BGR32: format = GST_VIDEO_FORMAT_BGRx; break; + case V4L2_PIX_FMT_ABGR32: + format = GST_VIDEO_FORMAT_BGRA; + break; + case V4L2_PIX_FMT_ARGB32: + format = GST_VIDEO_FORMAT_ARGB; + break; case V4L2_PIX_FMT_NV12: case V4L2_PIX_FMT_NV12M: format = GST_VIDEO_FORMAT_NV12; @@ -1169,6 +1263,7 @@ gst_v4l2_object_v4l2fourcc_to_video_format (guint32 fourcc) format = GST_VIDEO_FORMAT_YUV9; break; case V4L2_PIX_FMT_YUV420: + case V4L2_PIX_FMT_YUV420M: format = GST_VIDEO_FORMAT_I420; break; case V4L2_PIX_FMT_YUYV: @@ -1180,11 +1275,6 @@ gst_v4l2_object_v4l2fourcc_to_video_format (guint32 fourcc) case V4L2_PIX_FMT_UYVY: format = GST_VIDEO_FORMAT_UYVY; break; -#if 0 - case V4L2_PIX_FMT_Y41P: - format = GST_VIDEO_FORMAT_Y41P; - break; -#endif case V4L2_PIX_FMT_YUV411P: format = GST_VIDEO_FORMAT_Y41B; break; @@ -1194,6 +1284,17 @@ gst_v4l2_object_v4l2fourcc_to_video_format (guint32 fourcc) case V4L2_PIX_FMT_YVYU: format = GST_VIDEO_FORMAT_YVYU; break; + case V4L2_PIX_FMT_NV16: + case V4L2_PIX_FMT_NV16M: + format = GST_VIDEO_FORMAT_NV16; + break; + case V4L2_PIX_FMT_NV61: + case V4L2_PIX_FMT_NV61M: + format = GST_VIDEO_FORMAT_NV61; + break; + case V4L2_PIX_FMT_NV24: + format = GST_VIDEO_FORMAT_NV24; + break; default: format = GST_VIDEO_FORMAT_UNKNOWN; break; @@ -1213,10 +1314,6 @@ gst_v4l2_object_v4l2fourcc_to_bare_struct (guint32 fourcc) case V4L2_PIX_FMT_JPEG: /* JFIF JPEG */ structure = gst_structure_new_empty ("image/jpeg"); break; - case V4L2_PIX_FMT_YYUV: /* 16 YUV 4:2:2 */ - case V4L2_PIX_FMT_HI240: /* 8 8-bit color */ - /* FIXME: get correct fourccs here */ - break; case V4L2_PIX_FMT_MPEG1: structure = gst_structure_new ("video/mpeg", "mpegversion", G_TYPE_INT, 2, NULL); @@ -1226,6 +1323,7 @@ gst_v4l2_object_v4l2fourcc_to_bare_struct (guint32 fourcc) "mpegversion", G_TYPE_INT, 2, NULL); break; case V4L2_PIX_FMT_MPEG4: + case V4L2_PIX_FMT_XVID: structure = gst_structure_new ("video/mpeg", "mpegversion", G_TYPE_INT, 4, "systemstream", G_TYPE_BOOLEAN, FALSE, NULL); @@ -1239,35 +1337,52 @@ gst_v4l2_object_v4l2fourcc_to_bare_struct (guint32 fourcc) "stream-format", G_TYPE_STRING, "byte-stream", "alignment", G_TYPE_STRING, "au", NULL); break; + case V4L2_PIX_FMT_H264_NO_SC: + structure = gst_structure_new ("video/x-h264", + "stream-format", G_TYPE_STRING, "avc", "alignment", + G_TYPE_STRING, "au", NULL); + break; + case V4L2_PIX_FMT_VC1_ANNEX_G: + case V4L2_PIX_FMT_VC1_ANNEX_L: + structure = gst_structure_new ("video/x-wmv", + "wmvversion", G_TYPE_INT, 3, "format", G_TYPE_STRING, "WVC1", NULL); + break; case V4L2_PIX_FMT_VP8: structure = gst_structure_new_empty ("video/x-vp8"); break; - case V4L2_PIX_FMT_RGB332: - case V4L2_PIX_FMT_RGB555X: - case V4L2_PIX_FMT_RGB565X: - /* FIXME: get correct fourccs here */ - break; case V4L2_PIX_FMT_GREY: /* 8 Greyscale */ + case V4L2_PIX_FMT_Y16: + case V4L2_PIX_FMT_Y16_BE: + case V4L2_PIX_FMT_XRGB555: case V4L2_PIX_FMT_RGB555: + case V4L2_PIX_FMT_XRGB555X: + case V4L2_PIX_FMT_RGB555X: case V4L2_PIX_FMT_RGB565: case V4L2_PIX_FMT_RGB24: case V4L2_PIX_FMT_BGR24: case V4L2_PIX_FMT_RGB32: + case V4L2_PIX_FMT_XRGB32: + case V4L2_PIX_FMT_ARGB32: case V4L2_PIX_FMT_BGR32: + case V4L2_PIX_FMT_XBGR32: + case V4L2_PIX_FMT_ABGR32: case V4L2_PIX_FMT_NV12: /* 12 Y/CbCr 4:2:0 */ case V4L2_PIX_FMT_NV12M: case V4L2_PIX_FMT_NV12MT: case V4L2_PIX_FMT_NV21: /* 12 Y/CrCb 4:2:0 */ case V4L2_PIX_FMT_NV21M: + case V4L2_PIX_FMT_NV16: /* 16 Y/CbCr 4:2:2 */ + case V4L2_PIX_FMT_NV16M: + case V4L2_PIX_FMT_NV61: /* 16 Y/CrCb 4:2:2 */ + case V4L2_PIX_FMT_NV61M: + case V4L2_PIX_FMT_NV24: /* 24 Y/CrCb 4:4:4 */ case V4L2_PIX_FMT_YVU410: case V4L2_PIX_FMT_YUV410: case V4L2_PIX_FMT_YUV420: /* I420/IYUV */ + case V4L2_PIX_FMT_YUV420M: case V4L2_PIX_FMT_YUYV: case V4L2_PIX_FMT_YVU420: case V4L2_PIX_FMT_UYVY: -#if 0 - case V4L2_PIX_FMT_Y41P: -#endif case V4L2_PIX_FMT_YUV422P: case V4L2_PIX_FMT_YVYU: case V4L2_PIX_FMT_YUV411P:{ @@ -1308,8 +1423,28 @@ gst_v4l2_object_v4l2fourcc_to_bare_struct (guint32 fourcc) case V4L2_PIX_FMT_PWC2: structure = gst_structure_new_empty ("video/x-pwc2"); break; + case V4L2_PIX_FMT_RGB332: + case V4L2_PIX_FMT_BGR666: + case V4L2_PIX_FMT_ARGB555X: + case V4L2_PIX_FMT_RGB565X: + case V4L2_PIX_FMT_RGB444: + case V4L2_PIX_FMT_YYUV: /* 16 YUV 4:2:2 */ + case V4L2_PIX_FMT_HI240: /* 8 8-bit color */ + case V4L2_PIX_FMT_Y4: + case V4L2_PIX_FMT_Y6: + case V4L2_PIX_FMT_Y10: + case V4L2_PIX_FMT_Y12: + case V4L2_PIX_FMT_Y10BPACK: + case V4L2_PIX_FMT_YUV444: + case V4L2_PIX_FMT_YUV555: + case V4L2_PIX_FMT_YUV565: + case V4L2_PIX_FMT_Y41P: + case V4L2_PIX_FMT_YUV32: + case V4L2_PIX_FMT_NV12MT_16X16: + case V4L2_PIX_FMT_NV42: + case V4L2_PIX_FMT_H264_MVC: default: - GST_DEBUG ("Unknown fourcc 0x%08x %" GST_FOURCC_FORMAT, + GST_DEBUG ("Unsupported fourcc 0x%08x %" GST_FOURCC_FORMAT, fourcc, GST_FOURCC_ARGS (fourcc)); break; } @@ -1454,15 +1589,11 @@ gst_v4l2_object_get_caps_info (GstV4l2Object * v4l2object, GstCaps * caps, switch (GST_VIDEO_INFO_FORMAT (info)) { case GST_VIDEO_FORMAT_I420: fourcc = V4L2_PIX_FMT_YUV420; + fourcc_nc = V4L2_PIX_FMT_YUV420M; break; case GST_VIDEO_FORMAT_YUY2: fourcc = V4L2_PIX_FMT_YUYV; break; -#if 0 - case GST_VIDEO_FORMAT_Y41P: - fourcc = V4L2_PIX_FMT_Y41P; - break; -#endif case GST_VIDEO_FORMAT_UYVY: fourcc = V4L2_PIX_FMT_UYVY; break; @@ -1486,6 +1617,17 @@ gst_v4l2_object_get_caps_info (GstV4l2Object * v4l2object, GstCaps * caps, fourcc = V4L2_PIX_FMT_NV21; fourcc_nc = V4L2_PIX_FMT_NV21M; break; + case GST_VIDEO_FORMAT_NV16: + fourcc = V4L2_PIX_FMT_NV16; + fourcc_nc = V4L2_PIX_FMT_NV16M; + break; + case GST_VIDEO_FORMAT_NV61: + fourcc = V4L2_PIX_FMT_NV61; + fourcc_nc = V4L2_PIX_FMT_NV61M; + break; + case GST_VIDEO_FORMAT_NV24: + fourcc = V4L2_PIX_FMT_NV24; + break; case GST_VIDEO_FORMAT_YVYU: fourcc = V4L2_PIX_FMT_YVYU; break; @@ -1502,15 +1644,30 @@ gst_v4l2_object_get_caps_info (GstV4l2Object * v4l2object, GstCaps * caps, fourcc = V4L2_PIX_FMT_BGR24; break; case GST_VIDEO_FORMAT_xRGB: + fourcc = V4L2_PIX_FMT_RGB32; + fourcc_nc = V4L2_PIX_FMT_XRGB32; + break; case GST_VIDEO_FORMAT_ARGB: fourcc = V4L2_PIX_FMT_RGB32; + fourcc_nc = V4L2_PIX_FMT_ARGB32; break; case GST_VIDEO_FORMAT_BGRx: + fourcc = V4L2_PIX_FMT_BGR32; + fourcc_nc = V4L2_PIX_FMT_XBGR32; + break; case GST_VIDEO_FORMAT_BGRA: fourcc = V4L2_PIX_FMT_BGR32; + fourcc_nc = V4L2_PIX_FMT_ABGR32; break; case GST_VIDEO_FORMAT_GRAY8: fourcc = V4L2_PIX_FMT_GREY; + break; + case GST_VIDEO_FORMAT_GRAY16_LE: + fourcc = V4L2_PIX_FMT_Y16; + break; + case GST_VIDEO_FORMAT_GRAY16_BE: + fourcc = V4L2_PIX_FMT_Y16_BE; + break; default: break; } @@ -1533,6 +1690,7 @@ gst_v4l2_object_get_caps_info (GstV4l2Object * v4l2object, GstCaps * caps, break; case 4: fourcc = V4L2_PIX_FMT_MPEG4; + fourcc_nc = V4L2_PIX_FMT_XVID; break; default: break; @@ -1541,7 +1699,12 @@ gst_v4l2_object_get_caps_info (GstV4l2Object * v4l2object, GstCaps * caps, } else if (g_str_equal (mimetype, "video/x-h263")) { fourcc = V4L2_PIX_FMT_H263; } else if (g_str_equal (mimetype, "video/x-h264")) { - fourcc = V4L2_PIX_FMT_H264; + const gchar *stream_format = + gst_structure_get_string (structure, "stream-format"); + if (g_str_equal (stream_format, "avc")) + fourcc = V4L2_PIX_FMT_H264_NO_SC; + else + fourcc = V4L2_PIX_FMT_H264; } else if (g_str_equal (mimetype, "video/x-vp8")) { fourcc = V4L2_PIX_FMT_VP8; } else if (g_str_equal (mimetype, "video/x-bayer")) { @@ -2788,6 +2951,7 @@ gst_v4l2_object_extrapolate_stride (const GstVideoFormatInfo * finfo, case GST_VIDEO_FORMAT_NV12_64Z32: case GST_VIDEO_FORMAT_NV21: case GST_VIDEO_FORMAT_NV16: + case GST_VIDEO_FORMAT_NV61: case GST_VIDEO_FORMAT_NV24: estride = (plane == 0 ? 1 : 2) * GST_VIDEO_FORMAT_INFO_SCALE_WIDTH (finfo, plane, stride); @@ -3524,43 +3688,56 @@ done: } GstCaps * -gst_v4l2_object_get_caps (GstV4l2Object * v4l2object, GstCaps * filter) +gst_v4l2_object_probe_caps (GstV4l2Object * v4l2object, GstCaps * filter) { GstCaps *ret; GSList *walk; GSList *formats; - if (v4l2object->probed_caps == NULL) { - formats = gst_v4l2_object_get_format_list (v4l2object); + formats = gst_v4l2_object_get_format_list (v4l2object); - ret = gst_caps_new_empty (); + ret = gst_caps_new_empty (); - for (walk = formats; walk; walk = walk->next) { - struct v4l2_fmtdesc *format; - GstStructure *template; + for (walk = formats; walk; walk = walk->next) { + struct v4l2_fmtdesc *format; + GstStructure *template; - format = (struct v4l2_fmtdesc *) walk->data; + format = (struct v4l2_fmtdesc *) walk->data; - template = - gst_v4l2_object_v4l2fourcc_to_bare_struct (format->pixelformat); + template = gst_v4l2_object_v4l2fourcc_to_bare_struct (format->pixelformat); - if (template) { - GstCaps *tmp; + if (template) { + GstCaps *tmp; - tmp = gst_v4l2_object_probe_caps_for_format (v4l2object, - format->pixelformat, template); - if (tmp) - gst_caps_append (ret, tmp); + tmp = gst_v4l2_object_probe_caps_for_format (v4l2object, + format->pixelformat, template); + if (tmp) + gst_caps_append (ret, tmp); - gst_structure_free (template); - } else { - GST_DEBUG_OBJECT (v4l2object->element, "unknown format %u", - format->pixelformat); - } + gst_structure_free (template); + } else { + GST_DEBUG_OBJECT (v4l2object->element, "unknown format %u", + format->pixelformat); } - v4l2object->probed_caps = ret; } + if (filter) { + ret = gst_caps_intersect_full (filter, ret, GST_CAPS_INTERSECT_FIRST); + } else { + ret = gst_caps_ref (ret); + } + + return ret; +} + +GstCaps * +gst_v4l2_object_get_caps (GstV4l2Object * v4l2object, GstCaps * filter) +{ + GstCaps *ret; + + if (v4l2object->probed_caps == NULL) + v4l2object->probed_caps = gst_v4l2_object_probe_caps (v4l2object, NULL); + if (filter) { ret = gst_caps_intersect_full (filter, v4l2object->probed_caps, GST_CAPS_INTERSECT_FIRST); diff --git a/sys/v4l2/gstv4l2object.h b/sys/v4l2/gstv4l2object.h index 177a86b1b5ce07972286332cf9f5b6d51d6d3690..e3728c4779680662e511153e1a77cc6dbb4f7149 100644 --- a/sys/v4l2/gstv4l2object.h +++ b/sys/v4l2/gstv4l2object.h @@ -260,6 +260,8 @@ gboolean gst_v4l2_object_unlock_stop (GstV4l2Object * v4l2object); gboolean gst_v4l2_object_stop (GstV4l2Object * v4l2object); +GstCaps * gst_v4l2_object_probe_caps (GstV4l2Object * v4l2object, + GstCaps * filter); GstCaps * gst_v4l2_object_get_caps (GstV4l2Object * v4l2object, GstCaps * filter); diff --git a/sys/v4l2/gstv4l2transform.c b/sys/v4l2/gstv4l2transform.c index 42aeb13471bf812b738391c9e0dd8afc3e80a857..f617ac4fdf2c205acff5f89c272c99eb33afcf47 100644 --- a/sys/v4l2/gstv4l2transform.c +++ b/sys/v4l2/gstv4l2transform.c @@ -73,8 +73,8 @@ gst_v4l2_transform_set_property (GObject * object, pspec); break; case PROP_CAPTURE_IO_MODE: - gst_v4l2_object_set_property_helper (self->v4l2capture, PROP_IO_MODE, - value, pspec); + gst_v4l2_object_set_property_helper (self->v4l2capture, prop_id, value, + pspec); break; /* By default, only set on output */ diff --git a/sys/v4l2/gstv4l2videodec.c b/sys/v4l2/gstv4l2videodec.c index f06e4f61c910cca408ae8aad104f3fd8896c62fe..dc09a607506699c0e0dcb45e8de2e4d920ebdc4a 100644 --- a/sys/v4l2/gstv4l2videodec.c +++ b/sys/v4l2/gstv4l2videodec.c @@ -90,13 +90,13 @@ gst_v4l2_video_dec_get_property (GObject * object, GstV4l2VideoDec *self = GST_V4L2_VIDEO_DEC (object); switch (prop_id) { - case PROP_IO_MODE: + case PROP_OUTPUT_IO_MODE: gst_v4l2_object_get_property_helper (self->v4l2output, prop_id, value, pspec); break; case PROP_CAPTURE_IO_MODE: - gst_v4l2_object_get_property_helper (self->v4l2output, PROP_IO_MODE, - value, pspec); + gst_v4l2_object_get_property_helper (self->v4l2capture, prop_id, value, + pspec); break; /* By default read from output */ @@ -465,6 +465,8 @@ gst_v4l2_video_dec_handle_frame (GstVideoDecoder * decoder, GstVideoInfo info; GstVideoCodecState *output_state; GstBuffer *codec_data; + GstCaps *acquired_caps, *caps, *filter; + GstStructure *st; GST_DEBUG_OBJECT (self, "Sending header"); @@ -506,6 +508,34 @@ gst_v4l2_video_dec_handle_frame (GstVideoDecoder * decoder, if (!gst_v4l2_object_acquire_format (self->v4l2capture, &info)) goto not_negotiated; + /* Create caps from the acquired format, remove the format field */ + acquired_caps = gst_video_info_to_caps (&info); + st = gst_caps_get_structure (acquired_caps, 0); + gst_structure_remove_field (st, "format"); + + /* Probe currently available pixel formats */ + filter = gst_v4l2_object_probe_caps (self->v4l2capture, acquired_caps); + gst_caps_unref (acquired_caps); + caps = gst_pad_peer_query_caps (decoder->srcpad, filter); + gst_caps_unref (filter); + + GST_DEBUG_OBJECT (self, "Possible decoded caps: %" GST_PTR_FORMAT, + caps); + if (gst_caps_is_empty (caps)) { + gst_caps_unref (caps); + goto not_negotiated; + } + + /* Fixate pixel format */ + caps = gst_caps_fixate(caps); + + GST_DEBUG_OBJECT (self, "Chosen decoded caps: %" GST_PTR_FORMAT, caps); + + /* Try to set negotiated format, on success replace acquired format */ + if (gst_v4l2_object_set_format (self->v4l2capture, caps)) + gst_video_info_from_caps (&info, caps); + gst_caps_unref (caps); + output_state = gst_video_decoder_set_output_state (decoder, info.finfo->format, info.width, info.height, self->input_state); diff --git a/sys/waveform/Makefile.in b/sys/waveform/Makefile.in index caaebcea5dea8dc1f39ba89bec6296b7f3c2080c..8f16b69c9ec8b7d18cdd1f0c2c7bd979ff38cc27 100644 --- a/sys/waveform/Makefile.in +++ b/sys/waveform/Makefile.in @@ -478,6 +478,8 @@ VALGRIND_PATH = @VALGRIND_PATH@ VERSION = @VERSION@ VPX_130_CFLAGS = @VPX_130_CFLAGS@ VPX_130_LIBS = @VPX_130_LIBS@ +VPX_140_CFLAGS = @VPX_140_CFLAGS@ +VPX_140_LIBS = @VPX_140_LIBS@ VPX_CFLAGS = @VPX_CFLAGS@ VPX_LIBS = @VPX_LIBS@ WARNING_CFLAGS = @WARNING_CFLAGS@ diff --git a/sys/ximage/Makefile.in b/sys/ximage/Makefile.in index 016b76e3ed2933c2b47c1540b6914f7ae31eac91..2de449de53e51625c436bb2e908e15463ae871b2 100644 --- a/sys/ximage/Makefile.in +++ b/sys/ximage/Makefile.in @@ -479,6 +479,8 @@ VALGRIND_PATH = @VALGRIND_PATH@ VERSION = @VERSION@ VPX_130_CFLAGS = @VPX_130_CFLAGS@ VPX_130_LIBS = @VPX_130_LIBS@ +VPX_140_CFLAGS = @VPX_140_CFLAGS@ +VPX_140_LIBS = @VPX_140_LIBS@ VPX_CFLAGS = @VPX_CFLAGS@ VPX_LIBS = @VPX_LIBS@ WARNING_CFLAGS = @WARNING_CFLAGS@ diff --git a/sys/ximage/gstximagesrc.c b/sys/ximage/gstximagesrc.c index f193194fc4de34392f12ae26d4fb0f3ea7dc1b52..93f8f47b9aeadf826bf35a9b520b172ee393cbd4 100644 --- a/sys/ximage/gstximagesrc.c +++ b/sys/ximage/gstximagesrc.c @@ -536,6 +536,7 @@ gst_ximage_src_ximage_get (GstXImageSrc * ximagesrc) if (ximagesrc->have_xdamage && ximagesrc->use_damage && ximagesrc->last_ximage != NULL) { XEvent ev; + gboolean have_damage = FALSE; /* have_frame is TRUE when either the entire screen has been * grabbed or when the last image has been copied */ @@ -544,83 +545,91 @@ gst_ximage_src_ximage_get (GstXImageSrc * ximagesrc) GST_DEBUG_OBJECT (ximagesrc, "Retrieving screen using XDamage"); do { + XDamageNotifyEvent *damage_ev = (XDamageNotifyEvent *) (&ev); + XNextEvent (ximagesrc->xcontext->disp, &ev); - if (ev.type == ximagesrc->damage_event_base + XDamageNotify) { - XserverRegion parts; - XRectangle *rects; - int nrects; + if (ev.type == ximagesrc->damage_event_base + XDamageNotify && + damage_ev->level == XDamageReportNonEmpty) { - parts = XFixesCreateRegion (ximagesrc->xcontext->disp, 0, 0); XDamageSubtract (ximagesrc->xcontext->disp, ximagesrc->damage, None, - parts); - /* Now copy out all of the damaged rectangles. */ - rects = XFixesFetchRegion (ximagesrc->xcontext->disp, parts, &nrects); - if (rects != NULL) { - int i; - - if (!have_frame) { - GST_LOG_OBJECT (ximagesrc, - "Copying from last frame ximage->size: %" G_GSIZE_FORMAT, - gst_buffer_get_size (ximage)); - copy_buffer (ximage, ximagesrc->last_ximage); - have_frame = TRUE; - } - for (i = 0; i < nrects; i++) { - GST_LOG_OBJECT (ximagesrc, - "Damaged sub-region @ %d,%d size %dx%d reported", - rects[i].x, rects[i].y, rects[i].width, rects[i].height); + ximagesrc->damage_region); + have_damage = TRUE; + } + } while (XPending (ximagesrc->xcontext->disp)); - /* if we only want a small area, clip this damage region to - * area we want */ - if (ximagesrc->endx > ximagesrc->startx && - ximagesrc->endy > ximagesrc->starty) { - /* see if damage area intersects */ - if (rects[i].x + rects[i].width - 1 < ximagesrc->startx || - rects[i].x > ximagesrc->endx) { - /* trivial reject */ - } else if (rects[i].y + rects[i].height - 1 < ximagesrc->starty || - rects[i].y > ximagesrc->endy) { - /* trivial reject */ - } else { - /* find intersect region */ - int startx, starty, width, height; - - startx = (rects[i].x < ximagesrc->startx) ? ximagesrc->startx : - rects[i].x; - starty = (rects[i].y < ximagesrc->starty) ? ximagesrc->starty : - rects[i].y; - width = (rects[i].x + rects[i].width - 1 < ximagesrc->endx) ? - rects[i].x + rects[i].width - startx : - ximagesrc->endx - startx + 1; - height = (rects[i].y + rects[i].height - 1 < ximagesrc->endy) ? - rects[i].y + rects[i].height - starty : ximagesrc->endy - - starty + 1; - - GST_LOG_OBJECT (ximagesrc, - "Retrieving damaged sub-region @ %d,%d size %dx%d as intersect region", - startx, starty, width, height); - XGetSubImage (ximagesrc->xcontext->disp, ximagesrc->xwindow, - startx, starty, width, height, AllPlanes, ZPixmap, - meta->ximage, startx - ximagesrc->startx, - starty - ximagesrc->starty); - } + if (have_damage) { + XRectangle *rects; + int nrects; + + /* Now copy out all of the damaged rectangles. */ + rects = + XFixesFetchRegion (ximagesrc->xcontext->disp, + ximagesrc->damage_region, &nrects); + if (rects != NULL) { + int i; + + if (!have_frame) { + GST_LOG_OBJECT (ximagesrc, + "Copying from last frame ximage->size: %" G_GSIZE_FORMAT, + gst_buffer_get_size (ximage)); + copy_buffer (ximage, ximagesrc->last_ximage); + have_frame = TRUE; + } + for (i = 0; i < nrects; i++) { + GST_LOG_OBJECT (ximagesrc, + "Damaged sub-region @ %d,%d size %dx%d reported", + rects[i].x, rects[i].y, rects[i].width, rects[i].height); + + /* if we only want a small area, clip this damage region to + * area we want */ + if (ximagesrc->endx > ximagesrc->startx && + ximagesrc->endy > ximagesrc->starty) { + /* see if damage area intersects */ + if (rects[i].x + rects[i].width - 1 < ximagesrc->startx || + rects[i].x > ximagesrc->endx) { + /* trivial reject */ + } else if (rects[i].y + rects[i].height - 1 < ximagesrc->starty || + rects[i].y > ximagesrc->endy) { + /* trivial reject */ } else { + /* find intersect region */ + int startx, starty, width, height; + + startx = (rects[i].x < ximagesrc->startx) ? ximagesrc->startx : + rects[i].x; + starty = (rects[i].y < ximagesrc->starty) ? ximagesrc->starty : + rects[i].y; + width = (rects[i].x + rects[i].width - 1 < ximagesrc->endx) ? + rects[i].x + rects[i].width - startx : + ximagesrc->endx - startx + 1; + height = (rects[i].y + rects[i].height - 1 < ximagesrc->endy) ? + rects[i].y + rects[i].height - starty : ximagesrc->endy - + starty + 1; GST_LOG_OBJECT (ximagesrc, - "Retrieving damaged sub-region @ %d,%d size %dx%d", - rects[i].x, rects[i].y, rects[i].width, rects[i].height); - + "Retrieving damaged sub-region @ %d,%d size %dx%d as intersect region", + startx, starty, width, height); XGetSubImage (ximagesrc->xcontext->disp, ximagesrc->xwindow, - rects[i].x, rects[i].y, - rects[i].width, rects[i].height, - AllPlanes, ZPixmap, meta->ximage, rects[i].x, rects[i].y); + startx, starty, width, height, AllPlanes, ZPixmap, + meta->ximage, startx - ximagesrc->startx, + starty - ximagesrc->starty); } + } else { + + GST_LOG_OBJECT (ximagesrc, + "Retrieving damaged sub-region @ %d,%d size %dx%d", + rects[i].x, rects[i].y, rects[i].width, rects[i].height); + + XGetSubImage (ximagesrc->xcontext->disp, ximagesrc->xwindow, + rects[i].x, rects[i].y, + rects[i].width, rects[i].height, + AllPlanes, ZPixmap, meta->ximage, rects[i].x, rects[i].y); } - free (rects); } + XFree (rects); } - } while (XPending (ximagesrc->xcontext->disp)); + } if (!have_frame) { GST_LOG_OBJECT (ximagesrc, "Copying from last frame ximage->size: %" G_GSIZE_FORMAT, @@ -757,9 +766,10 @@ gst_ximage_src_ximage_get (GstXImageSrc * ximagesrc) iwidth = (cx + ximagesrc->cursor_image->width < ximagesrc->endx) ? cx + ximagesrc->cursor_image->width - startx : ximagesrc->endx - startx; - iheight = (cy + ximagesrc->cursor_image->height < ximagesrc->endy) ? - cy + ximagesrc->cursor_image->height - starty : - ximagesrc->endy - starty; + iheight = + (cy + ximagesrc->cursor_image->height < + ximagesrc->endy) ? cy + ximagesrc->cursor_image->height - + starty : ximagesrc->endy - starty; } } else { startx = cx; @@ -775,11 +785,11 @@ gst_ximage_src_ximage_get (GstXImageSrc * ximagesrc) GUINT_TO_LE (ximagesrc->cursor_image->pixels[i]); /* copy those pixels across */ for (j = starty; - j < starty + iheight && j < ximagesrc->starty + ximagesrc->height; - j++) { + j < starty + iheight + && j < ximagesrc->starty + ximagesrc->height; j++) { for (i = startx; - i < startx + iwidth && i < ximagesrc->startx + ximagesrc->width; - i++) { + i < startx + iwidth + && i < ximagesrc->startx + ximagesrc->width; i++) { guint8 *src, *dest; src = @@ -788,8 +798,8 @@ gst_ximage_src_ximage_get (GstXImageSrc * ximagesrc) dest = (guint8 *) & (meta->ximage->data[((j - ximagesrc->starty) * ximagesrc->width + (i - - ximagesrc->startx)) * (ximagesrc->xcontext->bpp / - 8)]); + ximagesrc->startx)) * + (ximagesrc->xcontext->bpp / 8)]); composite_pixel (ximagesrc->xcontext, (guint8 *) dest, (guint8 *) src); @@ -963,8 +973,8 @@ gst_ximage_src_set_property (GObject * object, guint prop_id, } static void -gst_ximage_src_get_property (GObject * object, guint prop_id, GValue * value, - GParamSpec * pspec) +gst_ximage_src_get_property (GObject * object, guint prop_id, + GValue * value, GParamSpec * pspec) { GstXImageSrc *src = GST_XIMAGE_SRC (object); @@ -1116,16 +1126,16 @@ gst_ximage_src_get_caps (GstBaseSrc * bs, GstCaps * filter) format = gst_video_format_from_masks (xcontext->depth, xcontext->bpp, - xcontext->endianness, xcontext->r_mask_output, xcontext->g_mask_output, - xcontext->b_mask_output, alpha_mask); + xcontext->endianness, xcontext->r_mask_output, + xcontext->g_mask_output, xcontext->b_mask_output, alpha_mask); return gst_caps_new_simple ("video/x-raw", "format", G_TYPE_STRING, gst_video_format_to_string (format), "width", G_TYPE_INT, width, "height", G_TYPE_INT, height, "framerate", GST_TYPE_FRACTION_RANGE, 1, G_MAXINT, G_MAXINT, 1, - "pixel-aspect-ratio", GST_TYPE_FRACTION, xcontext->par_n, xcontext->par_d, - NULL); + "pixel-aspect-ratio", GST_TYPE_FRACTION, xcontext->par_n, + xcontext->par_d, NULL); } static gboolean @@ -1186,8 +1196,8 @@ gst_ximage_src_class_init (GstXImageSrcClass * klass) gc->finalize = gst_ximage_src_finalize; g_object_class_install_property (gc, PROP_DISPLAY_NAME, - g_param_spec_string ("display-name", "Display", "X Display Name", NULL, - G_PARAM_READWRITE | G_PARAM_STATIC_STRINGS)); + g_param_spec_string ("display-name", "Display", "X Display Name", + NULL, G_PARAM_READWRITE | G_PARAM_STATIC_STRINGS)); g_object_class_install_property (gc, PROP_SHOW_POINTER, g_param_spec_boolean ("show-pointer", "Show Mouse Pointer", "Show mouse pointer (if XFixes extension enabled)", TRUE, diff --git a/tests/Makefile.in b/tests/Makefile.in index ff4e3179cd81944336d1b20264a04c0a0e10f6d5..aa822e551da500c730a4f2fa83da40e723fa858b 100644 --- a/tests/Makefile.in +++ b/tests/Makefile.in @@ -449,6 +449,8 @@ VALGRIND_PATH = @VALGRIND_PATH@ VERSION = @VERSION@ VPX_130_CFLAGS = @VPX_130_CFLAGS@ VPX_130_LIBS = @VPX_130_LIBS@ +VPX_140_CFLAGS = @VPX_140_CFLAGS@ +VPX_140_LIBS = @VPX_140_LIBS@ VPX_CFLAGS = @VPX_CFLAGS@ VPX_LIBS = @VPX_LIBS@ WARNING_CFLAGS = @WARNING_CFLAGS@ diff --git a/tests/check/Makefile.am b/tests/check/Makefile.am index e577979d383464c87ac2b14fe150dfbfa703452e..5184e24aad604cd18181c08a91e7ec76bb22cb1e 100644 --- a/tests/check/Makefile.am +++ b/tests/check/Makefile.am @@ -146,7 +146,7 @@ check_law = endif if USE_GDK_PIXBUF -check_gdkpixbuf = elements/gdkpixbufsink +check_gdkpixbuf = elements/gdkpixbufsink elements/gdkpixbufoverlay else check_gdkpixbuf = endif @@ -424,6 +424,9 @@ elements_amrparse_LDADD = libparser.la $(LDADD) elements_flacparse_LDADD = libparser.la $(LDADD) +elements_flvdemux_CFLAGS = $(GST_PLUGINS_BASE_CFLAGS) $(CFLAGS) $(AM_CFLAGS) +elements_flvdemux_LDADD = $(GST_PLUGINS_BASE_LIBS) -lgsttag-$(GST_API_VERSION) $(LDADD) + elements_mpegaudioparse_LDADD = libparser.la $(LDADD) elements_aspectratiocrop_LDADD = $(LDADD) diff --git a/tests/check/Makefile.in b/tests/check/Makefile.in index 214ce8db5cf062cd340788ef340b25c20a4d43c7..063a2b2a729c3ba168b396329aa91b2f98e41401 100644 --- a/tests/check/Makefile.in +++ b/tests/check/Makefile.in @@ -195,7 +195,8 @@ libparser_la_LINK = $(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) \ @USE_FLAC_TRUE@am__EXEEXT_11 = pipelines/flacdec$(EXEEXT) @USE_PLUGIN_FLV_TRUE@am__EXEEXT_12 = elements/flvdemux$(EXEEXT) \ @USE_PLUGIN_FLV_TRUE@ elements/flvmux$(EXEEXT) -@USE_GDK_PIXBUF_TRUE@am__EXEEXT_13 = elements/gdkpixbufsink$(EXEEXT) +@USE_GDK_PIXBUF_TRUE@am__EXEEXT_13 = elements/gdkpixbufsink$(EXEEXT) \ +@USE_GDK_PIXBUF_TRUE@ elements/gdkpixbufoverlay$(EXEEXT) @USE_PLUGIN_ISOMP4_TRUE@am__EXEEXT_14 = elements/qtmux$(EXEEXT) @USE_PLUGIN_ICYDEMUX_TRUE@am__EXEEXT_15 = elements/icydemux$(EXEEXT) @USE_PLUGIN_ID3DEMUX_TRUE@am__EXEEXT_16 = elements/id3demux$(EXEEXT) @@ -447,13 +448,23 @@ elements_flacparse_SOURCES = elements/flacparse.c elements_flacparse_OBJECTS = elements/flacparse.$(OBJEXT) elements_flacparse_DEPENDENCIES = libparser.la $(am__DEPENDENCIES_2) elements_flvdemux_SOURCES = elements/flvdemux.c -elements_flvdemux_OBJECTS = elements/flvdemux.$(OBJEXT) -elements_flvdemux_LDADD = $(LDADD) -elements_flvdemux_DEPENDENCIES = $(am__DEPENDENCIES_1) +elements_flvdemux_OBJECTS = \ + elements/elements_flvdemux-flvdemux.$(OBJEXT) +elements_flvdemux_DEPENDENCIES = $(am__DEPENDENCIES_1) \ + $(am__DEPENDENCIES_2) +elements_flvdemux_LINK = $(LIBTOOL) $(AM_V_lt) --tag=CC \ + $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=link $(CCLD) \ + $(elements_flvdemux_CFLAGS) $(CFLAGS) $(AM_LDFLAGS) $(LDFLAGS) \ + -o $@ elements_flvmux_SOURCES = elements/flvmux.c elements_flvmux_OBJECTS = elements/flvmux.$(OBJEXT) elements_flvmux_LDADD = $(LDADD) elements_flvmux_DEPENDENCIES = $(am__DEPENDENCIES_1) +elements_gdkpixbufoverlay_SOURCES = elements/gdkpixbufoverlay.c +elements_gdkpixbufoverlay_OBJECTS = \ + elements/gdkpixbufoverlay.$(OBJEXT) +elements_gdkpixbufoverlay_LDADD = $(LDADD) +elements_gdkpixbufoverlay_DEPENDENCIES = $(am__DEPENDENCIES_1) elements_gdkpixbufsink_SOURCES = elements/gdkpixbufsink.c elements_gdkpixbufsink_OBJECTS = \ elements/elements_gdkpixbufsink-gdkpixbufsink.$(OBJEXT) @@ -898,15 +909,16 @@ SOURCES = $(libparser_la_SOURCES) elements/aacparse.c \ elements/capssetter.c elements/deinterlace.c \ elements/deinterleave.c elements/dtmf.c elements/equalizer.c \ elements/flacparse.c elements/flvdemux.c elements/flvmux.c \ - elements/gdkpixbufsink.c elements/icydemux.c \ - elements/id3demux.c elements/id3v2mux.c elements/imagefreeze.c \ - elements/interleave.c elements/jpegdec.c elements/jpegenc.c \ - elements/level.c elements/matroskademux.c \ - elements/matroskamux.c elements/matroskaparse.c \ - elements/mpegaudioparse.c elements/mulawdec.c \ - elements/mulawenc.c elements/multifile.c elements/qtmux.c \ - elements/rganalysis.c elements/rglimiter.c elements/rgvolume.c \ - elements/rtp-payloading.c elements/rtpaux.c elements/rtpbin.c \ + elements/gdkpixbufoverlay.c elements/gdkpixbufsink.c \ + elements/icydemux.c elements/id3demux.c elements/id3v2mux.c \ + elements/imagefreeze.c elements/interleave.c \ + elements/jpegdec.c elements/jpegenc.c elements/level.c \ + elements/matroskademux.c elements/matroskamux.c \ + elements/matroskaparse.c elements/mpegaudioparse.c \ + elements/mulawdec.c elements/mulawenc.c elements/multifile.c \ + elements/qtmux.c elements/rganalysis.c elements/rglimiter.c \ + elements/rgvolume.c elements/rtp-payloading.c \ + elements/rtpaux.c elements/rtpbin.c \ $(elements_rtpbin_buffer_list_SOURCES) elements/rtpcollision.c \ elements/rtph263.c elements/rtpjitterbuffer.c \ elements/rtpmux.c elements/rtprtx.c elements/rtpsession.c \ @@ -936,15 +948,16 @@ DIST_SOURCES = $(libparser_la_SOURCES) elements/aacparse.c \ elements/capssetter.c elements/deinterlace.c \ elements/deinterleave.c elements/dtmf.c elements/equalizer.c \ elements/flacparse.c elements/flvdemux.c elements/flvmux.c \ - elements/gdkpixbufsink.c elements/icydemux.c \ - elements/id3demux.c elements/id3v2mux.c elements/imagefreeze.c \ - elements/interleave.c elements/jpegdec.c elements/jpegenc.c \ - elements/level.c elements/matroskademux.c \ - elements/matroskamux.c elements/matroskaparse.c \ - elements/mpegaudioparse.c elements/mulawdec.c \ - elements/mulawenc.c elements/multifile.c elements/qtmux.c \ - elements/rganalysis.c elements/rglimiter.c elements/rgvolume.c \ - elements/rtp-payloading.c elements/rtpaux.c elements/rtpbin.c \ + elements/gdkpixbufoverlay.c elements/gdkpixbufsink.c \ + elements/icydemux.c elements/id3demux.c elements/id3v2mux.c \ + elements/imagefreeze.c elements/interleave.c \ + elements/jpegdec.c elements/jpegenc.c elements/level.c \ + elements/matroskademux.c elements/matroskamux.c \ + elements/matroskaparse.c elements/mpegaudioparse.c \ + elements/mulawdec.c elements/mulawenc.c elements/multifile.c \ + elements/qtmux.c elements/rganalysis.c elements/rglimiter.c \ + elements/rgvolume.c elements/rtp-payloading.c \ + elements/rtpaux.c elements/rtpbin.c \ $(elements_rtpbin_buffer_list_SOURCES) elements/rtpcollision.c \ elements/rtph263.c elements/rtpjitterbuffer.c \ elements/rtpmux.c elements/rtprtx.c elements/rtpsession.c \ @@ -1428,6 +1441,8 @@ VALGRIND_PATH = @VALGRIND_PATH@ VERSION = @VERSION@ VPX_130_CFLAGS = @VPX_130_CFLAGS@ VPX_130_LIBS = @VPX_130_LIBS@ +VPX_140_CFLAGS = @VPX_140_CFLAGS@ +VPX_140_LIBS = @VPX_140_LIBS@ VPX_CFLAGS = @VPX_CFLAGS@ VPX_LIBS = @VPX_LIBS@ WARNING_CFLAGS = @WARNING_CFLAGS@ @@ -1608,7 +1623,7 @@ CLEANFILES = core.* test-registry.* @USE_PLUGIN_LAW_TRUE@ elements/mulawenc @USE_GDK_PIXBUF_FALSE@check_gdkpixbuf = -@USE_GDK_PIXBUF_TRUE@check_gdkpixbuf = elements/gdkpixbufsink +@USE_GDK_PIXBUF_TRUE@check_gdkpixbuf = elements/gdkpixbufsink elements/gdkpixbufoverlay @USE_PLUGIN_ICYDEMUX_FALSE@check_icydemux = @USE_PLUGIN_ICYDEMUX_TRUE@check_icydemux = elements/icydemux @USE_PLUGIN_ID3DEMUX_FALSE@check_id3demux = @@ -1732,6 +1747,8 @@ elements_aacparse_LDADD = libparser.la $(LDADD) elements_ac3parse_LDADD = libparser.la $(LDADD) elements_amrparse_LDADD = libparser.la $(LDADD) elements_flacparse_LDADD = libparser.la $(LDADD) +elements_flvdemux_CFLAGS = $(GST_PLUGINS_BASE_CFLAGS) $(CFLAGS) $(AM_CFLAGS) +elements_flvdemux_LDADD = $(GST_PLUGINS_BASE_LIBS) -lgsttag-$(GST_API_VERSION) $(LDADD) elements_mpegaudioparse_LDADD = libparser.la $(LDADD) elements_aspectratiocrop_LDADD = $(LDADD) elements_aspectratiocrop_CFLAGS = $(GST_PLUGINS_BASE_CFLAGS) $(CFLAGS) $(AM_CFLAGS) @@ -2094,18 +2111,24 @@ elements/flacparse.$(OBJEXT): elements/$(am__dirstamp) \ elements/flacparse$(EXEEXT): $(elements_flacparse_OBJECTS) $(elements_flacparse_DEPENDENCIES) $(EXTRA_elements_flacparse_DEPENDENCIES) elements/$(am__dirstamp) @rm -f elements/flacparse$(EXEEXT) $(AM_V_CCLD)$(LINK) $(elements_flacparse_OBJECTS) $(elements_flacparse_LDADD) $(LIBS) -elements/flvdemux.$(OBJEXT): elements/$(am__dirstamp) \ - elements/$(DEPDIR)/$(am__dirstamp) +elements/elements_flvdemux-flvdemux.$(OBJEXT): \ + elements/$(am__dirstamp) elements/$(DEPDIR)/$(am__dirstamp) elements/flvdemux$(EXEEXT): $(elements_flvdemux_OBJECTS) $(elements_flvdemux_DEPENDENCIES) $(EXTRA_elements_flvdemux_DEPENDENCIES) elements/$(am__dirstamp) @rm -f elements/flvdemux$(EXEEXT) - $(AM_V_CCLD)$(LINK) $(elements_flvdemux_OBJECTS) $(elements_flvdemux_LDADD) $(LIBS) + $(AM_V_CCLD)$(elements_flvdemux_LINK) $(elements_flvdemux_OBJECTS) $(elements_flvdemux_LDADD) $(LIBS) elements/flvmux.$(OBJEXT): elements/$(am__dirstamp) \ elements/$(DEPDIR)/$(am__dirstamp) elements/flvmux$(EXEEXT): $(elements_flvmux_OBJECTS) $(elements_flvmux_DEPENDENCIES) $(EXTRA_elements_flvmux_DEPENDENCIES) elements/$(am__dirstamp) @rm -f elements/flvmux$(EXEEXT) $(AM_V_CCLD)$(LINK) $(elements_flvmux_OBJECTS) $(elements_flvmux_LDADD) $(LIBS) +elements/gdkpixbufoverlay.$(OBJEXT): elements/$(am__dirstamp) \ + elements/$(DEPDIR)/$(am__dirstamp) + +elements/gdkpixbufoverlay$(EXEEXT): $(elements_gdkpixbufoverlay_OBJECTS) $(elements_gdkpixbufoverlay_DEPENDENCIES) $(EXTRA_elements_gdkpixbufoverlay_DEPENDENCIES) elements/$(am__dirstamp) + @rm -f elements/gdkpixbufoverlay$(EXEEXT) + $(AM_V_CCLD)$(LINK) $(elements_gdkpixbufoverlay_OBJECTS) $(elements_gdkpixbufoverlay_LDADD) $(LIBS) elements/elements_gdkpixbufsink-gdkpixbufsink.$(OBJEXT): \ elements/$(am__dirstamp) elements/$(DEPDIR)/$(am__dirstamp) @@ -2510,6 +2533,7 @@ distclean-compile: @AMDEP_TRUE@@am__include@ @am__quote@elements/$(DEPDIR)/elements_deinterleave-deinterleave.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@elements/$(DEPDIR)/elements_dtmf-dtmf.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@elements/$(DEPDIR)/elements_equalizer-equalizer.Po@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@elements/$(DEPDIR)/elements_flvdemux-flvdemux.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@elements/$(DEPDIR)/elements_gdkpixbufsink-gdkpixbufsink.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@elements/$(DEPDIR)/elements_imagefreeze-imagefreeze.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@elements/$(DEPDIR)/elements_interleave-interleave.Po@am__quote@ @@ -2539,8 +2563,8 @@ distclean-compile: @AMDEP_TRUE@@am__include@ @am__quote@elements/$(DEPDIR)/elements_videofilter-videofilter.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@elements/$(DEPDIR)/elements_videomixer-videomixer.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@elements/$(DEPDIR)/flacparse.Po@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@elements/$(DEPDIR)/flvdemux.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@elements/$(DEPDIR)/flvmux.Po@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@elements/$(DEPDIR)/gdkpixbufoverlay.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@elements/$(DEPDIR)/icydemux.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@elements/$(DEPDIR)/id3demux.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@elements/$(DEPDIR)/id3v2mux.Po@am__quote@ @@ -2842,6 +2866,20 @@ elements/elements_equalizer-equalizer.obj: elements/equalizer.c @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(elements_equalizer_CFLAGS) $(CFLAGS) -c -o elements/elements_equalizer-equalizer.obj `if test -f 'elements/equalizer.c'; then $(CYGPATH_W) 'elements/equalizer.c'; else $(CYGPATH_W) '$(srcdir)/elements/equalizer.c'; fi` +elements/elements_flvdemux-flvdemux.o: elements/flvdemux.c +@am__fastdepCC_TRUE@ $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(elements_flvdemux_CFLAGS) $(CFLAGS) -MT elements/elements_flvdemux-flvdemux.o -MD -MP -MF elements/$(DEPDIR)/elements_flvdemux-flvdemux.Tpo -c -o elements/elements_flvdemux-flvdemux.o `test -f 'elements/flvdemux.c' || echo '$(srcdir)/'`elements/flvdemux.c +@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) elements/$(DEPDIR)/elements_flvdemux-flvdemux.Tpo elements/$(DEPDIR)/elements_flvdemux-flvdemux.Po +@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='elements/flvdemux.c' object='elements/elements_flvdemux-flvdemux.o' libtool=no @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(elements_flvdemux_CFLAGS) $(CFLAGS) -c -o elements/elements_flvdemux-flvdemux.o `test -f 'elements/flvdemux.c' || echo '$(srcdir)/'`elements/flvdemux.c + +elements/elements_flvdemux-flvdemux.obj: elements/flvdemux.c +@am__fastdepCC_TRUE@ $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(elements_flvdemux_CFLAGS) $(CFLAGS) -MT elements/elements_flvdemux-flvdemux.obj -MD -MP -MF elements/$(DEPDIR)/elements_flvdemux-flvdemux.Tpo -c -o elements/elements_flvdemux-flvdemux.obj `if test -f 'elements/flvdemux.c'; then $(CYGPATH_W) 'elements/flvdemux.c'; else $(CYGPATH_W) '$(srcdir)/elements/flvdemux.c'; fi` +@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) elements/$(DEPDIR)/elements_flvdemux-flvdemux.Tpo elements/$(DEPDIR)/elements_flvdemux-flvdemux.Po +@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='elements/flvdemux.c' object='elements/elements_flvdemux-flvdemux.obj' libtool=no @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(elements_flvdemux_CFLAGS) $(CFLAGS) -c -o elements/elements_flvdemux-flvdemux.obj `if test -f 'elements/flvdemux.c'; then $(CYGPATH_W) 'elements/flvdemux.c'; else $(CYGPATH_W) '$(srcdir)/elements/flvdemux.c'; fi` + elements/elements_gdkpixbufsink-gdkpixbufsink.o: elements/gdkpixbufsink.c @am__fastdepCC_TRUE@ $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(elements_gdkpixbufsink_CFLAGS) $(CFLAGS) -MT elements/elements_gdkpixbufsink-gdkpixbufsink.o -MD -MP -MF elements/$(DEPDIR)/elements_gdkpixbufsink-gdkpixbufsink.Tpo -c -o elements/elements_gdkpixbufsink-gdkpixbufsink.o `test -f 'elements/gdkpixbufsink.c' || echo '$(srcdir)/'`elements/gdkpixbufsink.c @am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) elements/$(DEPDIR)/elements_gdkpixbufsink-gdkpixbufsink.Tpo elements/$(DEPDIR)/elements_gdkpixbufsink-gdkpixbufsink.Po @@ -3759,6 +3797,13 @@ elements/gdkpixbufsink.log: elements/gdkpixbufsink$(EXEEXT) --log-file $$b.log --trs-file $$b.trs \ $(am__common_driver_flags) $(AM_LOG_DRIVER_FLAGS) $(LOG_DRIVER_FLAGS) -- $(LOG_COMPILE) \ "$$tst" $(AM_TESTS_FD_REDIRECT) +elements/gdkpixbufoverlay.log: elements/gdkpixbufoverlay$(EXEEXT) + @p='elements/gdkpixbufoverlay$(EXEEXT)'; \ + b='elements/gdkpixbufoverlay'; \ + $(am__check_pre) $(LOG_DRIVER) --test-name "$$f" \ + --log-file $$b.log --trs-file $$b.trs \ + $(am__common_driver_flags) $(AM_LOG_DRIVER_FLAGS) $(LOG_DRIVER_FLAGS) -- $(LOG_COMPILE) \ + "$$tst" $(AM_TESTS_FD_REDIRECT) elements/qtmux.log: elements/qtmux$(EXEEXT) @p='elements/qtmux$(EXEEXT)'; \ b='elements/qtmux'; \ @@ -4370,7 +4415,7 @@ LOOPS ?= 10 --show-possibly-lost=no \ --leak-resolution=high --num-callers=20 \ ./$* 2>&1 | tee $$valgrind_log ; \ - if grep "==" $$valgrind_log > /dev/null 2>&1; then \ + if grep "^==" $$valgrind_log > /dev/null 2>&1; then \ rm $$valgrind_log; \ exit 1; \ fi ; \ diff --git a/tests/check/elements/deinterlace.c b/tests/check/elements/deinterlace.c index c9da2dd823fadbf7538c063f96b642af2535ee67..72e64cf6fabe4e2c690b8f213dff9acbdb1ba7ba 100644 --- a/tests/check/elements/deinterlace.c +++ b/tests/check/elements/deinterlace.c @@ -223,7 +223,7 @@ srcpad_dequeue_and_compare_buffer (GstPad * pad, GstPadProbeInfo * info, /* * Utility function that sets up a pipeline with deinterlace for - * validanting that it operates in passthrough mode when receiving + * validating that it operates in passthrough mode when receiving * data with 'infiltercaps' as the input caps and operating in 'mode' mode */ static void diff --git a/tests/check/elements/deinterleave.c b/tests/check/elements/deinterleave.c index 2ad17b3ac3646911816b2979ef73f2b5bc8a9672..f81fddb20050f48f406158273c845129d29dfe42 100644 --- a/tests/check/elements/deinterleave.c +++ b/tests/check/elements/deinterleave.c @@ -272,6 +272,7 @@ GST_START_TEST (test_2_channels_caps_change) { GstPad *sinkpad; GstCaps *caps, *caps2; + GstCaps *ret_caps; gint i; GstBuffer *inbuf; gfloat *indata; @@ -297,13 +298,18 @@ GST_START_TEST (test_2_channels_caps_change) G_GUINT64_CONSTANT (1) << GST_AUDIO_CHANNEL_POSITION_FRONT_RIGHT; gst_caps_set_simple (caps, "channel-mask", GST_TYPE_BITMASK, channel_mask, NULL); - gst_check_setup_events (mysrcpad, deinterleave, caps, GST_FORMAT_TIME); sinkpad = gst_element_get_static_pad (deinterleave, "sink"); fail_unless (sinkpad != NULL); fail_unless (gst_pad_link (mysrcpad, sinkpad) == GST_PAD_LINK_OK); g_object_unref (sinkpad); + ret_caps = gst_pad_peer_query_caps (mysrcpad, caps); + fail_if (gst_caps_is_empty (ret_caps)); + fail_unless (gst_pad_peer_query_accept_caps (mysrcpad, caps)); + gst_caps_unref (ret_caps); + gst_check_setup_events (mysrcpad, deinterleave, caps, GST_FORMAT_TIME); + g_signal_connect (deinterleave, "pad-added", G_CALLBACK (deinterleave_pad_added), GINT_TO_POINTER (2)); @@ -333,6 +339,10 @@ GST_START_TEST (test_2_channels_caps_change) G_GUINT64_CONSTANT (1) << GST_AUDIO_CHANNEL_POSITION_FRONT_RIGHT; gst_caps_set_simple (caps2, "channel-mask", GST_TYPE_BITMASK, channel_mask, NULL); + ret_caps = gst_pad_peer_query_caps (mysrcpad, caps2); + fail_if (gst_caps_is_empty (ret_caps)); + fail_unless (gst_pad_peer_query_accept_caps (mysrcpad, caps2)); + gst_caps_unref (ret_caps); gst_pad_set_caps (mysrcpad, caps2); inbuf = gst_buffer_new_and_alloc (2 * 48000 * sizeof (gfloat)); @@ -360,6 +370,10 @@ GST_START_TEST (test_2_channels_caps_change) G_GUINT64_CONSTANT (1) << GST_AUDIO_CHANNEL_POSITION_FRONT_CENTER; gst_caps_set_simple (caps2, "channel-mask", GST_TYPE_BITMASK, channel_mask, NULL); + ret_caps = gst_pad_peer_query_caps (mysrcpad, caps2); + fail_unless (gst_caps_is_empty (ret_caps)); + gst_caps_unref (ret_caps); + fail_if (gst_pad_peer_query_accept_caps (mysrcpad, caps2)); gst_pad_set_caps (mysrcpad, caps2); inbuf = gst_buffer_new_and_alloc (3 * 48000 * sizeof (gfloat)); diff --git a/tests/check/elements/flvdemux.c b/tests/check/elements/flvdemux.c index c9d156dda71ebe81244dd79ecbac77e7de592f3d..2d8d1a7c698acbd56901bb5231ef40e8a6196063 100644 --- a/tests/check/elements/flvdemux.c +++ b/tests/check/elements/flvdemux.c @@ -19,8 +19,10 @@ */ #include <gst/check/gstcheck.h> +#include <gst/check/gstharness.h> #include <gst/gst.h> +#include <gst/tag/tag.h> static void pad_added_cb (GstElement * flvdemux, GstPad * pad, GstBin * pipeline) @@ -166,6 +168,156 @@ GST_START_TEST (test_reuse_push) GST_END_TEST; +static GstBuffer * +create_buffer (guint8 * data, gsize size) +{ + GstBuffer * buf = gst_buffer_new_wrapped_full (GST_MEMORY_FLAG_READONLY, + data, size, 0, size, NULL, NULL); + GST_BUFFER_PTS (buf) = GST_CLOCK_TIME_NONE; + GST_BUFFER_DTS (buf) = GST_CLOCK_TIME_NONE; + GST_BUFFER_DURATION (buf) = GST_CLOCK_TIME_NONE; + GST_BUFFER_OFFSET (buf) = GST_BUFFER_OFFSET_NONE; + GST_BUFFER_OFFSET_END (buf) = GST_BUFFER_OFFSET_NONE; + return buf; +} + +static void +flvdemux_pad_added (GstElement * flvdemux, GstPad * srcpad, GstHarness * h) +{ + (void)flvdemux; + gst_harness_add_element_src_pad (h, srcpad); +} + +GST_START_TEST (test_speex) +{ + guint8 flv_header0[] = { + 0x46, 0x4c, 0x56, 0x01, 0x04, 0x00, 0x00, 0x00, + 0x09, 0x00, 0x00, 0x00, 0x00 + }; + + guint8 flv_header1[] = { + 0x12, 0x00, 0x00, 0x7c, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x02, 0x00, 0x0a, 0x6f, 0x6e, + 0x4d, 0x65, 0x74, 0x61, 0x44, 0x61, 0x74, 0x61, + 0x08, 0x00, 0x00, 0x00, 0x04, 0x00, 0x0c, 0x61, + 0x75, 0x64, 0x69, 0x6f, 0x63, 0x6f, 0x64, 0x65, + 0x63, 0x69, 0x64, 0x00, 0x40, 0x26, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x0f, 0x6d, 0x65, + 0x74, 0x61, 0x64, 0x61, 0x74, 0x61, 0x63, 0x72, + 0x65, 0x61, 0x74, 0x6f, 0x72, 0x02, 0x00, 0x13, + 0x47, 0x53, 0x74, 0x72, 0x65, 0x61, 0x6d, 0x65, + 0x72, 0x20, 0x46, 0x4c, 0x56, 0x20, 0x6d, 0x75, + 0x78, 0x65, 0x72, 0x00, 0x0c, 0x63, 0x72, 0x65, + 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x64, 0x61, 0x74, + 0x65, 0x02, 0x00, 0x18, 0x57, 0x65, 0x64, 0x20, + 0x53, 0x65, 0x70, 0x20, 0x32, 0x33, 0x20, 0x31, + 0x30, 0x3a, 0x34, 0x39, 0x3a, 0x35, 0x36, 0x20, + 0x32, 0x30, 0x31, 0x35, 0x00, 0x00, 0x09, 0x00, + 0x00, 0x00, 0x87, + }; + + guint8 speex_header0[] = { + 0x08, 0x00, 0x00, 0x51, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0xb2, 0x53, 0x70, 0x65, 0x65, + 0x78, 0x20, 0x20, 0x20, 0x31, 0x2e, 0x32, 0x72, + 0x63, 0x31, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x01, 0x00, 0x00, 0x00, 0x50, 0x00, 0x00, 0x00, + 0x80, 0x3e, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, + 0x04, 0x00, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, + 0xff, 0xff, 0xff, 0xff, 0x40, 0x01, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x5c, + }; + + guint8 speex_header1[] = { + 0x08, 0x00, 0x00, 0x29, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0xb2, 0x1f, 0x00, 0x00, 0x00, + 0x45, 0x6e, 0x63, 0x6f, 0x64, 0x65, 0x64, 0x20, + 0x77, 0x69, 0x74, 0x68, 0x20, 0x47, 0x53, 0x74, + 0x72, 0x65, 0x61, 0x6d, 0x65, 0x72, 0x20, 0x53, + 0x70, 0x65, 0x65, 0x78, 0x65, 0x6e, 0x63, 0x00, + 0x00, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, 0x34, + }; + + guint8 buffer[] = { + 0x08, 0x00, 0x00, 0x47, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0xb2, 0x36, 0x9d, 0x1b, 0x9a, + 0x20, 0x00, 0x01, 0x68, 0xe8, 0xe8, 0xe8, 0xe8, + 0xe8, 0xe8, 0xe8, 0x84, 0x00, 0xb4, 0x74, 0x74, + 0x74, 0x74, 0x74, 0x74, 0x74, 0x42, 0x00, 0x5a, + 0x3a, 0x3a, 0x3a, 0x3a, 0x3a, 0x3a, 0x3a, 0x21, + 0x00, 0x2d, 0x1d, 0x1d, 0x1d, 0x1d, 0x1d, 0x1d, + 0x1d, 0x1b, 0x3b, 0x60, 0xab, 0xab, 0xab, 0xab, + 0xab, 0x0a, 0xba, 0xba, 0xba, 0xba, 0xb0, 0xab, + 0xab, 0xab, 0xab, 0xab, 0x0a, 0xba, 0xba, 0xba, + 0xba, 0xb7, 0x00, 0x00, 0x00, 0x52, + }; + + GstHarness * h = gst_harness_new_with_padnames ("flvdemux", "sink", NULL); + gst_harness_set_src_caps_str (h, "video/x-flv"); + + g_signal_connect (h->element, "pad-added", + G_CALLBACK (flvdemux_pad_added), h); + + gst_harness_push (h, create_buffer (flv_header0, sizeof (flv_header0))); + gst_harness_push (h, create_buffer (flv_header1, sizeof (flv_header1))); + gst_harness_push (h, create_buffer (speex_header0, sizeof (speex_header0))); + gst_harness_push (h, create_buffer (speex_header1, sizeof (speex_header1))); + gst_harness_push (h, create_buffer (buffer, sizeof (buffer))); + + { + GstCaps * caps; + const GstStructure * s; + const GValue *streamheader; + const GValue *header; + const GValue *vorbiscomment; + GstBuffer *buf; + GstTagList *list; + gint rate; + gint channels; + + caps = gst_pad_get_current_caps (h->sinkpad); + s = gst_caps_get_structure (caps, 0); + + fail_unless (gst_structure_has_name (s, "audio/x-speex")); + + streamheader = gst_structure_get_value (s, "streamheader"); + fail_unless (streamheader != NULL); + fail_unless (G_VALUE_HOLDS (streamheader, GST_TYPE_ARRAY)); + fail_unless_equals_int (2, gst_value_array_get_size (streamheader)); + + header = gst_value_array_get_value (streamheader, 0); + fail_unless (header != NULL); + fail_unless (G_VALUE_HOLDS (header, GST_TYPE_BUFFER)); + buf = gst_value_get_buffer (header); + + vorbiscomment = gst_value_array_get_value (streamheader, 1); + fail_unless (header != NULL); + fail_unless (G_VALUE_HOLDS (header, GST_TYPE_BUFFER)); + buf = gst_value_get_buffer (vorbiscomment); + list = gst_tag_list_from_vorbiscomment_buffer (buf, NULL, 0, NULL); + fail_unless (list != NULL); + gst_tag_list_unref (list); + + gst_structure_get_int (s, "rate", &rate); + fail_unless_equals_int (16000, rate); + + gst_structure_get_int (s, "channels", &channels); + fail_unless_equals_int (1, channels); + + gst_caps_unref (caps); + } + + /* we should have gotten 2x speex-headers, and one encoded buffer */ + fail_unless_equals_int (3, gst_harness_buffers_in_queue (h)); + + gst_harness_teardown (h); +} + +GST_END_TEST; + static Suite * flvdemux_suite (void) { @@ -176,6 +328,8 @@ flvdemux_suite (void) tcase_add_test (tc_chain, test_reuse_push); tcase_add_test (tc_chain, test_reuse_pull); + tcase_add_test (tc_chain, test_speex); + return s; } diff --git a/tests/check/elements/gdkpixbufoverlay.c b/tests/check/elements/gdkpixbufoverlay.c new file mode 100644 index 0000000000000000000000000000000000000000..bc4555489400aa2fd3e3a3ae41354ed42aee3be6 --- /dev/null +++ b/tests/check/elements/gdkpixbufoverlay.c @@ -0,0 +1,80 @@ +/* GStreamer unit test for the gdkpixbufoverlay element + * Copyright (C) 2015 Tim-Philipp Müller <tim centricular com> + * + * This library is free software; you can redistribute it and/or + * modify it under the terms of the GNU Library General Public + * License as published by the Free Software Foundation; either + * version 2 of the License, or (at your option) any later version. + * + * This library is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Library General Public License for more details. + * + * You should have received a copy of the GNU Library General Public + * License along with this library; if not, write to the + * Free Software Foundation, Inc., 51 Franklin St, Fifth Floor, + * Boston, MA 02110-1301, USA. + */ + +#ifdef HAVE_CONFIG_H +# include "config.h" +#endif + +#include <gst/check/gstcheck.h> + +GST_START_TEST (test_simple_overlay) +{ + GstElement *pipeline, *src, *overlay, *sink; + GstMessage *msg; + GstBus *bus; + + src = gst_element_factory_make ("videotestsrc", NULL); + fail_unless (src != NULL); + g_object_set (src, "num-buffers", 3, NULL); + + overlay = gst_element_factory_make ("gdkpixbufoverlay", NULL); + fail_unless (overlay != NULL); + +#define IMAGE_PATH GST_TEST_FILES_PATH G_DIR_SEPARATOR_S "image.jpg" + g_object_set (overlay, "location", IMAGE_PATH, NULL); + + sink = gst_element_factory_make ("fakesink", NULL); + fail_unless (sink != NULL); + + pipeline = gst_pipeline_new (NULL); + gst_bin_add_many (GST_BIN (pipeline), src, overlay, sink, NULL); + gst_element_link_many (src, overlay, sink, NULL); + + /* start prerolling */ + fail_unless_equals_int (gst_element_set_state (pipeline, GST_STATE_PLAYING), + GST_STATE_CHANGE_ASYNC); + + bus = gst_element_get_bus (pipeline); + + /* wait for EOS */ + msg = gst_bus_timed_pop_filtered (bus, GST_CLOCK_TIME_NONE, GST_MESSAGE_EOS); + gst_message_unref (msg); + + fail_unless_equals_int (gst_element_set_state (pipeline, GST_STATE_NULL), + GST_STATE_CHANGE_SUCCESS); + + gst_object_unref (bus); + gst_object_unref (pipeline); +} + +GST_END_TEST; + +static Suite * +gdkpixbufoverlay_suite (void) +{ + Suite *s = suite_create ("gdkpixbufoverlay"); + TCase *tc_chain = tcase_create ("general"); + + suite_add_tcase (s, tc_chain); + tcase_add_test (tc_chain, test_simple_overlay); + + return s; +} + +GST_CHECK_MAIN (gdkpixbufoverlay); diff --git a/tests/check/elements/rtp-payloading.c b/tests/check/elements/rtp-payloading.c index f19306be24cc8103b98bb5c413886d9022a9312e..3af1d6cac8b9123997287b048041f395ab5fff7c 100644 --- a/tests/check/elements/rtp-payloading.c +++ b/tests/check/elements/rtp-payloading.c @@ -615,6 +615,31 @@ GST_START_TEST (rtp_h264) rtp_h264_frame_count, "video/x-h264,stream-format=(string)byte-stream,alignment=(string)nal", "rtph264pay", "rtph264depay", 0, 0, FALSE); + + /* config-interval property used to be of uint type, was changed to int, + * make sure old GValue stuff still works */ + { + GValue val = G_VALUE_INIT; + GstElement *rtph264pay; + GParamSpec *pspec; + + + rtph264pay = gst_element_factory_make ("rtph264pay", NULL); + pspec = g_object_class_find_property (G_OBJECT_GET_CLASS (rtph264pay), + "config-interval"); + fail_unless (pspec->value_type == G_TYPE_INT); + g_value_init (&val, G_TYPE_UINT); + g_value_set_uint (&val, 10); + g_object_set_property (G_OBJECT (rtph264pay), "config-interval", &val); + g_value_set_uint (&val, 0); + g_object_get_property (G_OBJECT (rtph264pay), "config-interval", &val); + fail_unless_equals_int (10, g_value_get_uint (&val)); + g_object_set (G_OBJECT (rtph264pay), "config-interval", -1, NULL); + g_object_get_property (G_OBJECT (rtph264pay), "config-interval", &val); + fail_unless (g_value_get_uint (&val) == G_MAXUINT); + g_value_unset (&val); + gst_object_unref (rtph264pay); + } } GST_END_TEST; diff --git a/tests/check/elements/rtpmux.c b/tests/check/elements/rtpmux.c index 36b58e6189e383236a0a3889b076c2c8fcf102da..6f83c0810c2e3044cb3eca62a20c367449c6a936 100644 --- a/tests/check/elements/rtpmux.c +++ b/tests/check/elements/rtpmux.c @@ -61,6 +61,15 @@ query_func (GstPad * pad, GstObject * noparent, GstQuery * query) return TRUE; } +static GstCaps * +remove_ssrc_from_caps (GstCaps * caps) +{ + GstCaps *copy = gst_caps_copy (caps); + GstStructure *s = gst_caps_get_structure (copy, 0); + gst_structure_remove_field (s, "ssrc"); + return copy; +} + static gboolean event_func (GstPad * pad, GstObject * noparent, GstEvent * event) { @@ -69,12 +78,20 @@ event_func (GstPad * pad, GstObject * noparent, GstEvent * event) { GstCaps *caps; GstCaps **caps2 = g_object_get_data (G_OBJECT (pad), "caps"); + GstCaps *caps_no_ssrc; + GstCaps *caps2_no_ssrc; gst_event_parse_caps (event, &caps); + caps_no_ssrc = remove_ssrc_from_caps (caps); + caps2_no_ssrc = remove_ssrc_from_caps (*caps2); + fail_unless (caps2 != NULL && *caps2 != NULL); fail_unless (gst_caps_is_fixed (caps)); fail_unless (gst_caps_is_fixed (*caps2)); - fail_unless (gst_caps_is_equal_fixed (caps, *caps2)); + + fail_unless (gst_caps_is_equal_fixed (caps_no_ssrc, caps2_no_ssrc)); + gst_caps_unref (caps_no_ssrc); + gst_caps_unref (caps2_no_ssrc); break; } default: @@ -137,7 +154,6 @@ test_basic (const gchar * elem_name, const gchar * sink2, int count, gst_caps_set_simple (src2caps, "clock-rate", G_TYPE_INT, 3, NULL); caps = gst_pad_peer_query_caps (src1, NULL); - fail_unless (gst_caps_is_equal (caps, sinkcaps)); gst_caps_unref (caps); g_object_set (rtpmux, "seqnum-offset", 100, "timestamp-offset", 1000, @@ -231,10 +247,10 @@ basic_check_cb (GstPad * pad, int i) fail_unless (buffers && g_list_length (buffers) == 1); gst_rtp_buffer_map (buffers->data, GST_MAP_READ, &rtpbuffer); - fail_unless (gst_rtp_buffer_get_ssrc (&rtpbuffer) == 66); - fail_unless (gst_rtp_buffer_get_timestamp (&rtpbuffer) == - 200 - 57 + 1000 + i); - fail_unless (gst_rtp_buffer_get_seq (&rtpbuffer) == 100 + 1 + i); + fail_unless_equals_int (66, gst_rtp_buffer_get_ssrc (&rtpbuffer)); + fail_unless_equals_int64 (200 - 57 + 1000 + i, + gst_rtp_buffer_get_timestamp (&rtpbuffer)); + fail_unless_equals_int (100 + 1 + i, gst_rtp_buffer_get_seq (&rtpbuffer)); gst_rtp_buffer_unmap (&rtpbuffer); } @@ -265,10 +281,10 @@ lock_check_cb (GstPad * pad, int i) fail_unless (buffers && g_list_length (buffers) == 1); gst_rtp_buffer_map (buffers->data, GST_MAP_READ, &rtpbuffer); - fail_unless (gst_rtp_buffer_get_ssrc (&rtpbuffer) == 66); - fail_unless (gst_rtp_buffer_get_timestamp (&rtpbuffer) == - 200 - 57 + 1000 + i); - fail_unless (gst_rtp_buffer_get_seq (&rtpbuffer) == 100 + 1 + i); + fail_unless_equals_int (66, gst_rtp_buffer_get_ssrc (&rtpbuffer)); + fail_unless_equals_int64 (200 - 57 + 1000 + i, + gst_rtp_buffer_get_timestamp (&rtpbuffer)); + fail_unless_equals_int (100 + 1 + i, gst_rtp_buffer_get_seq (&rtpbuffer)); gst_rtp_buffer_unmap (&rtpbuffer); inbuf = gst_rtp_buffer_new_allocate (10, 0, 0); @@ -325,16 +341,147 @@ generate_test_buffer (guint seq_num, guint ssrc) return buf; } -GST_START_TEST (test_rtpmux_ssrc) +static guint32 +_rtp_buffer_get_ssrc (GstBuffer * buf) +{ + GstRTPBuffer rtp = GST_RTP_BUFFER_INIT; + guint32 ret; + g_assert (gst_rtp_buffer_map (buf, GST_MAP_READ, &rtp)); + ret = gst_rtp_buffer_get_ssrc (&rtp); + gst_rtp_buffer_unmap (&rtp); + return ret; +} + +GST_START_TEST (test_rtpmux_ssrc_property) +{ + GstHarness *h = gst_harness_new_with_padnames ("rtpmux", NULL, "src"); + GstHarness *h0 = gst_harness_new_with_element (h->element, "sink_0", NULL); + GstHarness *h1 = gst_harness_new_with_element (h->element, "sink_1", NULL); + GstBuffer *buf0; + GstBuffer *buf1; + + /* set ssrc to 111111 */ + g_object_set (h->element, "ssrc", 111111, NULL); + + /* both sinkpads have their own idea of what the ssrc should be */ + gst_harness_set_src_caps_str (h0, "application/x-rtp, ssrc=(uint)222222"); + gst_harness_set_src_caps_str (h1, "application/x-rtp, ssrc=(uint)333333"); + + /* push on both sinkpads with different ssrc */ + fail_unless_equals_int (GST_FLOW_OK, + gst_harness_push (h0, generate_test_buffer (0, 222222))); + fail_unless_equals_int (GST_FLOW_OK, + gst_harness_push (h1, generate_test_buffer (0, 333333))); + + buf0 = gst_harness_pull (h); + buf1 = gst_harness_pull (h); + + /* we expect the ssrc to be what we specified in the property */ + fail_unless_equals_int (111111, _rtp_buffer_get_ssrc (buf0)); + fail_unless_equals_int (111111, _rtp_buffer_get_ssrc (buf1)); + + gst_buffer_unref (buf0); + gst_buffer_unref (buf1); + + gst_harness_teardown (h0); + gst_harness_teardown (h1); + gst_harness_teardown (h); +} + +GST_END_TEST; + +GST_START_TEST (test_rtpmux_ssrc_property_not_set) +{ + GstHarness *h = gst_harness_new_with_padnames ("rtpmux", NULL, "src"); + GstHarness *h0 = gst_harness_new_with_element (h->element, "sink_0", NULL); + GstHarness *h1 = gst_harness_new_with_element (h->element, "sink_1", NULL); + GstBuffer *buf0; + GstBuffer *buf1; + + gst_harness_set_src_caps_str (h0, "application/x-rtp, ssrc=(uint)222222"); + gst_harness_set_src_caps_str (h1, "application/x-rtp, ssrc=(uint)333333"); + + fail_unless_equals_int (GST_FLOW_OK, + gst_harness_push (h0, generate_test_buffer (0, 222222))); + fail_unless_equals_int (GST_FLOW_OK, + gst_harness_push (h1, generate_test_buffer (0, 333333))); + + buf0 = gst_harness_pull (h); + buf1 = gst_harness_pull (h); + + /* we expect the ssrc to be the first ssrc that came in */ + fail_unless_equals_int (222222, _rtp_buffer_get_ssrc (buf0)); + fail_unless_equals_int (222222, _rtp_buffer_get_ssrc (buf1)); + + gst_buffer_unref (buf0); + gst_buffer_unref (buf1); + + gst_harness_teardown (h0); + gst_harness_teardown (h1); + gst_harness_teardown (h); +} + +GST_END_TEST; + +GST_START_TEST (test_rtpmux_ssrc_downstream_can_overrule) { - GstHarness * h = gst_harness_new_with_padnames ("rtpdtmfmux", NULL, "src"); - GstHarness * h0 = gst_harness_new_with_element ( - h->element, "sink_0", NULL); - GstHarness * h1 = gst_harness_new_with_element ( - h->element, "sink_1", NULL); + GstHarness *h = gst_harness_new_with_padnames ("rtpmux", NULL, "src"); + GstHarness *h0 = gst_harness_new_with_element (h->element, "sink_0", NULL); + GstHarness *h1 = gst_harness_new_with_element (h->element, "sink_1", NULL); + GstBuffer *buf0; + GstBuffer *buf1; + + /* downstream is specifying 444444 as ssrc */ + gst_harness_set_sink_caps_str (h, "application/x-rtp, ssrc=(uint)444444"); + /* rtpmux ssrc is set to 111111 */ g_object_set (h->element, "ssrc", 111111, NULL); + /* while upstream ssrc is 222222 and 333333 */ + gst_harness_set_src_caps_str (h0, "application/x-rtp, ssrc=(uint)222222"); + gst_harness_set_src_caps_str (h1, "application/x-rtp, ssrc=(uint)333333"); + + fail_unless_equals_int (GST_FLOW_OK, + gst_harness_push (h0, generate_test_buffer (0, 222222))); + fail_unless_equals_int (GST_FLOW_OK, + gst_harness_push (h1, generate_test_buffer (0, 333333))); + + buf0 = gst_harness_pull (h); + buf1 = gst_harness_pull (h); + + /* we expect the ssrc to be downstream ssrc */ + fail_unless_equals_int (444444, _rtp_buffer_get_ssrc (buf0)); + fail_unless_equals_int (444444, _rtp_buffer_get_ssrc (buf1)); + + gst_buffer_unref (buf0); + gst_buffer_unref (buf1); + + gst_harness_teardown (h0); + gst_harness_teardown (h1); + gst_harness_teardown (h); +} + +GST_END_TEST; + +GST_START_TEST (test_rtpmux_ssrc_downstream_dynamic) +{ + GstHarness *h = gst_harness_new_parse ("rtpmux ! capsfilter"); + GstElement *rtpmux = gst_harness_find_element (h, "rtpmux"); + GstElement *capsfilter = gst_harness_find_element (h, "capsfilter"); + + GstHarness *h0 = gst_harness_new_with_element (rtpmux, "sink_0", NULL); + GstHarness *h1 = gst_harness_new_with_element (rtpmux, "sink_1", NULL); + GstCaps *caps; + GstBuffer *buf0; + GstBuffer *buf1; + + gst_harness_play (h); + + caps = gst_caps_from_string ("application/x-rtp, ssrc=(uint)444444"); + g_object_set (capsfilter, "caps", caps, NULL); + gst_caps_unref (caps); + + /* while upstream ssrc is 222222 and 333333 */ gst_harness_set_src_caps_str (h0, "application/x-rtp, ssrc=(uint)222222"); gst_harness_set_src_caps_str (h1, "application/x-rtp, ssrc=(uint)333333"); @@ -343,10 +490,37 @@ GST_START_TEST (test_rtpmux_ssrc) fail_unless_equals_int (GST_FLOW_OK, gst_harness_push (h1, generate_test_buffer (0, 333333))); + /* we expect the ssrc to be downstream ssrc (444444) */ + buf0 = gst_harness_pull (h); + buf1 = gst_harness_pull (h); + fail_unless_equals_int (444444, _rtp_buffer_get_ssrc (buf0)); + fail_unless_equals_int (444444, _rtp_buffer_get_ssrc (buf1)); + gst_buffer_unref (buf0); + gst_buffer_unref (buf1); + + caps = gst_caps_from_string ("application/x-rtp, ssrc=(uint)555555"); + g_object_set (capsfilter, "caps", caps, NULL); + gst_caps_unref (caps); + + fail_unless_equals_int (GST_FLOW_OK, + gst_harness_push (h0, generate_test_buffer (0, 222222))); + fail_unless_equals_int (GST_FLOW_OK, + gst_harness_push (h1, generate_test_buffer (0, 333333))); + + /* we expect the ssrc to be the new downstream ssrc (555555) */ + buf0 = gst_harness_pull (h); + buf1 = gst_harness_pull (h); + fail_unless_equals_int (555555, _rtp_buffer_get_ssrc (buf0)); + fail_unless_equals_int (555555, _rtp_buffer_get_ssrc (buf1)); + gst_buffer_unref (buf0); + gst_buffer_unref (buf1); + + gst_object_unref (rtpmux); gst_harness_teardown (h0); gst_harness_teardown (h1); gst_harness_teardown (h); } + GST_END_TEST; static Suite * @@ -358,7 +532,10 @@ rtpmux_suite (void) tc_chain = tcase_create ("rtpmux_basic"); suite_add_tcase (s, tc_chain); tcase_add_test (tc_chain, test_rtpmux_basic); - tcase_add_test (tc_chain, test_rtpmux_ssrc); + tcase_add_test (tc_chain, test_rtpmux_ssrc_property); + tcase_add_test (tc_chain, test_rtpmux_ssrc_property_not_set); + tcase_add_test (tc_chain, test_rtpmux_ssrc_downstream_can_overrule); + tcase_add_test (tc_chain, test_rtpmux_ssrc_downstream_dynamic); tc_chain = tcase_create ("rtpdtmfmux_basic"); tcase_add_test (tc_chain, test_rtpdtmfmux_basic); diff --git a/tests/check/elements/souphttpsrc.c b/tests/check/elements/souphttpsrc.c index c2a7c5739ad89215b7cf7620c9c61018d0663115..8eeb3185dd73829eadcaa4ffd73d738d69c57c78 100644 --- a/tests/check/elements/souphttpsrc.c +++ b/tests/check/elements/souphttpsrc.c @@ -163,7 +163,7 @@ run_test (const char *format, ...) rc = 302; GST_INFO ("debug: %s", debug); /* should not've gotten any output in case of a 40x error. Wait a bit - * to give streaming thread a chance to push out a buffer and triggering + * to give the streaming thread a chance to push out a buffer and trigger * our callback before shutting down the pipeline */ g_usleep (G_USEC_PER_SEC / 2); fail_unless (buf == NULL); @@ -387,8 +387,9 @@ GST_START_TEST (test_icy_stream) gst_bin_add (GST_BIN (pipe), sink); fail_unless (gst_element_link (src, sink)); - /* Virgin Radio 32kbps mp3 shoutcast stream */ - g_object_set (src, "location", "http://mp3-vr-32.smgradio.com:80/", NULL); + /* Radionomy Hot40Music shoutcast stream */ + g_object_set (src, "location", + "http://streaming.radionomy.com:80/Hot40Music", NULL); /* EOS after the first buffer */ g_object_set (src, "num-buffers", 1, NULL); diff --git a/tests/examples/Makefile.in b/tests/examples/Makefile.in index 5f087406dfbe65ea152cd8f4ca1002e619341466..70e8f15abff430a5e160af905861dc05a89d916d 100644 --- a/tests/examples/Makefile.in +++ b/tests/examples/Makefile.in @@ -455,6 +455,8 @@ VALGRIND_PATH = @VALGRIND_PATH@ VERSION = @VERSION@ VPX_130_CFLAGS = @VPX_130_CFLAGS@ VPX_130_LIBS = @VPX_130_LIBS@ +VPX_140_CFLAGS = @VPX_140_CFLAGS@ +VPX_140_LIBS = @VPX_140_LIBS@ VPX_CFLAGS = @VPX_CFLAGS@ VPX_LIBS = @VPX_LIBS@ WARNING_CFLAGS = @WARNING_CFLAGS@ diff --git a/tests/examples/audiofx/Makefile.in b/tests/examples/audiofx/Makefile.in index e4df35206c0a338d75c1928dea1d6f139fe2722b..eb24548ff9626aca3bb18b544401b6255217d624 100644 --- a/tests/examples/audiofx/Makefile.in +++ b/tests/examples/audiofx/Makefile.in @@ -459,6 +459,8 @@ VALGRIND_PATH = @VALGRIND_PATH@ VERSION = @VERSION@ VPX_130_CFLAGS = @VPX_130_CFLAGS@ VPX_130_LIBS = @VPX_130_LIBS@ +VPX_140_CFLAGS = @VPX_140_CFLAGS@ +VPX_140_LIBS = @VPX_140_LIBS@ VPX_CFLAGS = @VPX_CFLAGS@ VPX_LIBS = @VPX_LIBS@ WARNING_CFLAGS = @WARNING_CFLAGS@ diff --git a/tests/examples/cairo/Makefile.in b/tests/examples/cairo/Makefile.in index ec4cae57652a102c8510c40ded1e99ac38b575f8..23ee96e1d3f265b251a822cde51f3863dce13555 100644 --- a/tests/examples/cairo/Makefile.in +++ b/tests/examples/cairo/Makefile.in @@ -445,6 +445,8 @@ VALGRIND_PATH = @VALGRIND_PATH@ VERSION = @VERSION@ VPX_130_CFLAGS = @VPX_130_CFLAGS@ VPX_130_LIBS = @VPX_130_LIBS@ +VPX_140_CFLAGS = @VPX_140_CFLAGS@ +VPX_140_LIBS = @VPX_140_LIBS@ VPX_CFLAGS = @VPX_CFLAGS@ VPX_LIBS = @VPX_LIBS@ WARNING_CFLAGS = @WARNING_CFLAGS@ diff --git a/tests/examples/equalizer/Makefile.in b/tests/examples/equalizer/Makefile.in index bbb5c96f6278cc7c91e9cf8ac85f8c868e9a3fb7..a93dbe3c53dc9c9480782c15b479ac8ed8fce8ba 100644 --- a/tests/examples/equalizer/Makefile.in +++ b/tests/examples/equalizer/Makefile.in @@ -445,6 +445,8 @@ VALGRIND_PATH = @VALGRIND_PATH@ VERSION = @VERSION@ VPX_130_CFLAGS = @VPX_130_CFLAGS@ VPX_130_LIBS = @VPX_130_LIBS@ +VPX_140_CFLAGS = @VPX_140_CFLAGS@ +VPX_140_LIBS = @VPX_140_LIBS@ VPX_CFLAGS = @VPX_CFLAGS@ VPX_LIBS = @VPX_LIBS@ WARNING_CFLAGS = @WARNING_CFLAGS@ diff --git a/tests/examples/equalizer/demo.c b/tests/examples/equalizer/demo.c index 387544de7b51152b889d48e1ee781b8e45b90733..03b4ff6eb6cae4a2a1253b4f977a95a16a4a7fa5 100644 --- a/tests/examples/equalizer/demo.c +++ b/tests/examples/equalizer/demo.c @@ -180,8 +180,11 @@ main (int argc, char *argv[]) if (!g_option_context_parse (ctx, &argc, &argv, &err)) { g_print ("Error initializing: %s\n", err->message); + g_option_context_free (ctx); + g_clear_error (&err); exit (1); } + g_option_context_free (ctx); if (argc < 2) { g_print ("Usage: %s <uri to play>\n", argv[0]); diff --git a/tests/examples/jack/Makefile.in b/tests/examples/jack/Makefile.in index 493bf25601b1af33f679438526e295a8507c969f..d9b0f9ebd39a86c9f75360ef9c9b759d8d87e6df 100644 --- a/tests/examples/jack/Makefile.in +++ b/tests/examples/jack/Makefile.in @@ -444,6 +444,8 @@ VALGRIND_PATH = @VALGRIND_PATH@ VERSION = @VERSION@ VPX_130_CFLAGS = @VPX_130_CFLAGS@ VPX_130_LIBS = @VPX_130_LIBS@ +VPX_140_CFLAGS = @VPX_140_CFLAGS@ +VPX_140_LIBS = @VPX_140_LIBS@ VPX_CFLAGS = @VPX_CFLAGS@ VPX_LIBS = @VPX_LIBS@ WARNING_CFLAGS = @WARNING_CFLAGS@ diff --git a/tests/examples/level/Makefile.in b/tests/examples/level/Makefile.in index 9e287588605a4b5a744ca66b3446306f12227aac..2fbbb34b077d51e343521c6a31b064a629b0304d 100644 --- a/tests/examples/level/Makefile.in +++ b/tests/examples/level/Makefile.in @@ -445,6 +445,8 @@ VALGRIND_PATH = @VALGRIND_PATH@ VERSION = @VERSION@ VPX_130_CFLAGS = @VPX_130_CFLAGS@ VPX_130_LIBS = @VPX_130_LIBS@ +VPX_140_CFLAGS = @VPX_140_CFLAGS@ +VPX_140_LIBS = @VPX_140_LIBS@ VPX_CFLAGS = @VPX_CFLAGS@ VPX_LIBS = @VPX_LIBS@ WARNING_CFLAGS = @WARNING_CFLAGS@ diff --git a/tests/examples/pulse/Makefile.in b/tests/examples/pulse/Makefile.in index a2650e0b896f259a0bedf83c67fe680700a260eb..6a2846cab4d2bb7bfe231735d846dc854d388611 100644 --- a/tests/examples/pulse/Makefile.in +++ b/tests/examples/pulse/Makefile.in @@ -445,6 +445,8 @@ VALGRIND_PATH = @VALGRIND_PATH@ VERSION = @VERSION@ VPX_130_CFLAGS = @VPX_130_CFLAGS@ VPX_130_LIBS = @VPX_130_LIBS@ +VPX_140_CFLAGS = @VPX_140_CFLAGS@ +VPX_140_LIBS = @VPX_140_LIBS@ VPX_CFLAGS = @VPX_CFLAGS@ VPX_LIBS = @VPX_LIBS@ WARNING_CFLAGS = @WARNING_CFLAGS@ diff --git a/tests/examples/rtp/Makefile.in b/tests/examples/rtp/Makefile.in index bc7c58c00d2b483c8047aa5aa35bc2a8c43f6929..4f2ec241ae4ce10788a1b564cd4a2a1c420d29ce 100644 --- a/tests/examples/rtp/Makefile.in +++ b/tests/examples/rtp/Makefile.in @@ -472,6 +472,8 @@ VALGRIND_PATH = @VALGRIND_PATH@ VERSION = @VERSION@ VPX_130_CFLAGS = @VPX_130_CFLAGS@ VPX_130_LIBS = @VPX_130_LIBS@ +VPX_140_CFLAGS = @VPX_140_CFLAGS@ +VPX_140_LIBS = @VPX_140_LIBS@ VPX_CFLAGS = @VPX_CFLAGS@ VPX_LIBS = @VPX_LIBS@ WARNING_CFLAGS = @WARNING_CFLAGS@ diff --git a/tests/examples/shapewipe/Makefile.in b/tests/examples/shapewipe/Makefile.in index d3faa674e009765900e19208582f09baf47af3a1..49d71d40073528e693fb90bcc2826fee07c46895 100644 --- a/tests/examples/shapewipe/Makefile.in +++ b/tests/examples/shapewipe/Makefile.in @@ -450,6 +450,8 @@ VALGRIND_PATH = @VALGRIND_PATH@ VERSION = @VERSION@ VPX_130_CFLAGS = @VPX_130_CFLAGS@ VPX_130_LIBS = @VPX_130_LIBS@ +VPX_140_CFLAGS = @VPX_140_CFLAGS@ +VPX_140_LIBS = @VPX_140_LIBS@ VPX_CFLAGS = @VPX_CFLAGS@ VPX_LIBS = @VPX_LIBS@ WARNING_CFLAGS = @WARNING_CFLAGS@ diff --git a/tests/examples/spectrum/Makefile.in b/tests/examples/spectrum/Makefile.in index 77a3e191cad9c4ff5b28eab7079e93d3c8783b83..5239b8bb05ffa6892137edf39e28c90ceed9f171 100644 --- a/tests/examples/spectrum/Makefile.in +++ b/tests/examples/spectrum/Makefile.in @@ -467,6 +467,8 @@ VALGRIND_PATH = @VALGRIND_PATH@ VERSION = @VERSION@ VPX_130_CFLAGS = @VPX_130_CFLAGS@ VPX_130_LIBS = @VPX_130_LIBS@ +VPX_140_CFLAGS = @VPX_140_CFLAGS@ +VPX_140_LIBS = @VPX_140_LIBS@ VPX_CFLAGS = @VPX_CFLAGS@ VPX_LIBS = @VPX_LIBS@ WARNING_CFLAGS = @WARNING_CFLAGS@ diff --git a/tests/examples/v4l2/Makefile.in b/tests/examples/v4l2/Makefile.in index e3f152bc6c0b13abfb55524a06d372fa351cc9ee..e393bae3a1eb6778a369ef2c9db13d6f9262b64e 100644 --- a/tests/examples/v4l2/Makefile.in +++ b/tests/examples/v4l2/Makefile.in @@ -445,6 +445,8 @@ VALGRIND_PATH = @VALGRIND_PATH@ VERSION = @VERSION@ VPX_130_CFLAGS = @VPX_130_CFLAGS@ VPX_130_LIBS = @VPX_130_LIBS@ +VPX_140_CFLAGS = @VPX_140_CFLAGS@ +VPX_140_LIBS = @VPX_140_LIBS@ VPX_CFLAGS = @VPX_CFLAGS@ VPX_LIBS = @VPX_LIBS@ WARNING_CFLAGS = @WARNING_CFLAGS@ diff --git a/tests/files/Makefile.in b/tests/files/Makefile.in index 71621bd2b8dd98187ee02bdef958d0ad36fc42a1..ad00ca3d001732711f60b041d64f85e308d80d69 100644 --- a/tests/files/Makefile.in +++ b/tests/files/Makefile.in @@ -390,6 +390,8 @@ VALGRIND_PATH = @VALGRIND_PATH@ VERSION = @VERSION@ VPX_130_CFLAGS = @VPX_130_CFLAGS@ VPX_130_LIBS = @VPX_130_LIBS@ +VPX_140_CFLAGS = @VPX_140_CFLAGS@ +VPX_140_LIBS = @VPX_140_LIBS@ VPX_CFLAGS = @VPX_CFLAGS@ VPX_LIBS = @VPX_LIBS@ WARNING_CFLAGS = @WARNING_CFLAGS@ diff --git a/tests/icles/Makefile.in b/tests/icles/Makefile.in index 3b216ac5250c3fcebb19ebf9e792051d4593a2bf..6d87ab053f652ee3755a89ed0d782a21710227f8 100644 --- a/tests/icles/Makefile.in +++ b/tests/icles/Makefile.in @@ -545,6 +545,8 @@ VALGRIND_PATH = @VALGRIND_PATH@ VERSION = @VERSION@ VPX_130_CFLAGS = @VPX_130_CFLAGS@ VPX_130_LIBS = @VPX_130_LIBS@ +VPX_140_CFLAGS = @VPX_140_CFLAGS@ +VPX_140_LIBS = @VPX_140_LIBS@ VPX_CFLAGS = @VPX_CFLAGS@ VPX_LIBS = @VPX_LIBS@ WARNING_CFLAGS = @WARNING_CFLAGS@ diff --git a/tests/icles/equalizer-test.c b/tests/icles/equalizer-test.c index 3f9e50e252e59e6b3caf653e7cfe27f61e40b3d9..883ba33de30931c8af4a556c90d5f49666edcc77 100644 --- a/tests/icles/equalizer-test.c +++ b/tests/icles/equalizer-test.c @@ -55,7 +55,7 @@ check_bus (GstClockTime max_wait_time) gst_message_parse_error (msg, &err, &debug); GST_ERROR ("ERROR: %s [%s]", err->message, debug); g_print ("\n===========> ERROR: %s\n%s\n\n", err->message, debug); - g_error_free (err); + g_clear_error (&err); g_free (debug); } @@ -186,8 +186,11 @@ main (int argc, char **argv) if (!g_option_context_parse (ctx, &argc, &argv, &opt_err)) { g_error ("Error parsing command line options: %s", opt_err->message); + g_option_context_free (ctx); + g_clear_error (&opt_err); return -1; } + g_option_context_free (ctx); GST_DEBUG_CATEGORY_INIT (equalizer_test_debug, "equalizertest", 0, "eqtest"); diff --git a/tests/icles/gdkpixbufoverlay-test.c b/tests/icles/gdkpixbufoverlay-test.c index efbb9727450cfbf23be87de19f83112388f1121e..45276ee9824f845c1eb16523f2fa92b56a2203a4 100644 --- a/tests/icles/gdkpixbufoverlay-test.c +++ b/tests/icles/gdkpixbufoverlay-test.c @@ -151,7 +151,7 @@ bus_cb (GstBus * bus, GstMessage * msg, gpointer user_data) gst_message_parse_error (msg, &err, &dbg); gst_object_default_error (msg->src, err, dbg); - g_error_free (err); + g_clear_error (&err); g_free (dbg); g_main_loop_quit (loop); break; @@ -218,6 +218,8 @@ main (int argc, char **argv) g_option_context_add_group (ctx, gst_init_get_option_group ()); if (!g_option_context_parse (ctx, &argc, &argv, &err)) { g_print ("Error initializing: %s\n", err->message); + g_option_context_free (ctx); + g_clear_error (&err); return 1; } g_option_context_free (ctx); diff --git a/tests/icles/gdkpixbufsink-test.c b/tests/icles/gdkpixbufsink-test.c index fbcb13abd5d9285d3aad9f7fb6054dfb9085b9b6..6c2825a440789d20119aea31c9f8770a840548c0 100644 --- a/tests/icles/gdkpixbufsink-test.c +++ b/tests/icles/gdkpixbufsink-test.c @@ -175,7 +175,7 @@ bus_message_cb (GstBus * bus, GstMessage * msg, AppInfo * info) gst_message_parse_error (msg, &err, &dbg); g_error ("Error: %s\n%s\n", err->message, (dbg) ? dbg : ""); - g_error_free (err); + g_clear_error (&err); g_free (dbg); break; } @@ -345,6 +345,8 @@ main (int argc, char **argv) if (!g_option_context_parse (ctx, &argc, &argv, &opt_err)) { g_error ("Error parsing command line options: %s", opt_err->message); + g_option_context_free (ctx); + g_clear_error (&opt_err); return -1; } diff --git a/tests/icles/test-oss4.c b/tests/icles/test-oss4.c index b2e4b96cb82ce4d34fdec5593e4ad0e12b34c02a..adbe442c35787fe8b25cc0e23690cf63d24d6c44 100644 --- a/tests/icles/test-oss4.c +++ b/tests/icles/test-oss4.c @@ -115,6 +115,8 @@ main (int argc, char **argv) g_option_context_add_group (ctx, gst_init_get_option_group ()); if (!g_option_context_parse (ctx, &argc, &argv, &err)) { g_print ("Error initializing: %s\n", err->message); + g_option_context_free (ctx); + g_clear_error (&err); exit (1); } g_option_context_free (ctx); diff --git a/tests/icles/videocrop-test.c b/tests/icles/videocrop-test.c index 081fa60f9dd9a17dc792f352b175242b814c14bb..2acfa3373887ca55aa52ae8190b013b246e2a42e 100644 --- a/tests/icles/videocrop-test.c +++ b/tests/icles/videocrop-test.c @@ -53,7 +53,7 @@ check_bus_for_errors (GstBus * bus, GstClockTime max_wait_time) gst_message_parse_error (msg, &err, &debug); GST_ERROR ("ERROR: %s [%s]", err->message, debug); g_print ("\n===========> ERROR: %s\n%s\n\n", err->message, debug); - g_error_free (err); + g_clear_error (&err); g_free (debug); gst_message_unref (msg); } @@ -201,8 +201,11 @@ main (int argc, char **argv) if (!g_option_context_parse (ctx, &argc, &argv, &opt_err)) { g_error ("Error parsing command line options: %s", opt_err->message); + g_option_context_free (ctx); + g_clear_error (&opt_err); return -1; } + g_option_context_free (ctx); GST_DEBUG_CATEGORY_INIT (videocrop_test_debug, "videocroptest", 0, "vctest"); diff --git a/win32/common/config.h b/win32/common/config.h index f5ab67874ea029a7baa5ef87ab3209a45b38ab17..027a27e119a46c311b6c29ad179df91af812817f 100644 --- a/win32/common/config.h +++ b/win32/common/config.h @@ -45,6 +45,9 @@ /* GStreamer API Version */ #define GST_API_VERSION "1.0" +/* Define if extra runtime checks should be enabled */ +#undef GST_ENABLE_EXTRA_CHECKS + /* Defined if gcov is enabled to force a rebuild due to config.h changing */ #undef GST_GCOV_ENABLED @@ -61,11 +64,14 @@ #define GST_PACKAGE_ORIGIN "Unknown package origin" /* GStreamer package release date/time for plugins as YYYY-MM-DD */ -#define GST_PACKAGE_RELEASE_DATETIME "2015-12-14" +#define GST_PACKAGE_RELEASE_DATETIME "2015-12-24" /* Define if static plugins should be built */ #undef GST_PLUGIN_BUILD_STATIC +/* Define if Video4Linux probe shall be run at plugin load */ +#undef GST_V4L2_ENABLE_PROBE + /* Define to enable aalib ASCII Art library (used by aasink). */ #undef HAVE_AALIB @@ -346,6 +352,9 @@ /* Define to enable VPX decoder (used by vpx). */ #undef HAVE_VPX +/* Defined if the VPX library version is 1.4 or bigger */ +#undef HAVE_VPX_1_4 + /* Define to enable Win32 WaveForm (used by waveformsink). */ #undef HAVE_WAVEFORM @@ -387,7 +396,7 @@ #define PACKAGE_NAME "GStreamer Good Plug-ins" /* Define to the full name and version of this package. */ -#define PACKAGE_STRING "GStreamer Good Plug-ins 1.6.2" +#define PACKAGE_STRING "GStreamer Good Plug-ins 1.7.1" /* Define to the one symbol short name of this package. */ #define PACKAGE_TARNAME "gst-plugins-good" @@ -396,7 +405,7 @@ #undef PACKAGE_URL /* Define to the version of this package. */ -#define PACKAGE_VERSION "1.6.2" +#define PACKAGE_VERSION "1.7.1" /* directory where plugins are located */ #ifdef _DEBUG @@ -427,7 +436,7 @@ #undef TARGET_CPU /* Version number of package */ -#define VERSION "1.6.2" +#define VERSION "1.7.1" /* Define WORDS_BIGENDIAN to 1 if your processor stores words with the most significant byte first (like Motorola and SPARC, unlike Intel). */