...
 
Commits (31)
=== release 1.8.3 ===
2016-08-19 Sebastian Dröge <slomo@coaxion.net>
* configure.ac:
releasing 1.8.3
2016-08-16 21:11:35 +0300 Sebastian Dröge <sebastian@centricular.com>
* configure.ac:
configure: Explicitly disable CrystalHD decoder
Otherwise it will pick it up when the system has the relevant headers,
and then linking produces an unusable plugin later as we don't ensure
that the plugin also links against the crystalhd library.
Also backport a few other similar cases from master at the same time.
https://bugzilla.gnome.org/show_bug.cgi?id=769809
2016-08-04 10:45:14 +0200 Edward Hervey <edward@centricular.com>
* ext/libav/gstavviddec.c:
avvidec: Ensure skipping strategy gets properly reset
When switching playback modes, like from TRICKMODE or TRICKMODE_KEY_UNITS
back to regular playback, we need to make sure we set the skip mode
back to the default setting.
While this field would be properly reset when we *have* feedback from
downstream (i.e. diff != G_MAXINT64), it would not be reset during
the initial phase (i.e. when the decoder hasn't pushed a buffer yet,
and therefore the sink hasn't sent back QoS information).
This avoids dropping plenty of frames when going back to regular playback
2016-07-22 14:54:21 +0300 Sebastian Dröge <sebastian@centricular.com>
* ext/libav/gstavauddec.c:
* ext/libav/gstavaudenc.c:
* ext/libav/gstavviddec.c:
* ext/libav/gstavvidenc.c:
libav: Ignore more quasi-codecs
2016-07-22 14:42:59 +0300 Sebastian Dröge <sebastian@centricular.com>
* ext/libav/gstavviddec.c:
* ext/libav/gstavvidenc.c:
libav: Ignore VAAPI decoders and VAAPI/nvenc encoders
These can show up when having a build against a system version of ffmpeg.
2016-07-05 20:15:28 +0300 Sebastian Dröge <sebastian@centricular.com>
* ext/libav/gstavvidenc.c:
avvidenc: Create caps from the codec context after it is opened
We won't get codec_data and various other information otherwise.
2016-07-05 20:16:09 +0300 Sebastian Dröge <sebastian@centricular.com>
* ext/libav/gstavaudenc.c:
avaudenc: Create caps from the codec context after it is opened
We won't get codec_data and various other information otherwise.
2016-07-05 20:16:45 +0300 Sebastian Dröge <sebastian@centricular.com>
* ext/libav/gstavaudenc.c:
avaudenc: Use gst_caps_fixate() instead of gst_caps_truncate()
Just truncating might not be enough.
=== release 1.8.2 ===
2016-06-09 11:52:04 +0300 Sebastian Dröge <sebastian@centricular.com>
* ChangeLog:
* NEWS:
* RELEASE:
* configure.ac:
* docs/plugins/inspect/plugin-libav.xml:
* gst-libav.doap:
Release 1.8.2
2016-05-14 12:09:06 +0200 Edward Hervey <bilboed@bilboed.com>
* ext/libav/gstavviddec.c:
avvidec: Don't set bogus latency
We might have cases where the framerate is not known (0/1).
2016-05-12 11:09:13 +0200 Edward Hervey <edward@centricular.com>
* ext/libav/gstavviddec.c:
avvidec: Report the latency once we're fully configured
Several decoders will only be able to report a real latency (has_b_frames)
once they're actually initialized (i.e. when they return their first frame).
Doing it earlier (in set_format) doesn't guarantee that the AVCodecContext
has_b_frames has been properly initialized.
https://bugzilla.gnome.org/show_bug.cgi?id=766362
2016-05-03 19:04:06 +0300 Sebastian Dröge <sebastian@centricular.com>
* gst-libs/ext/libav:
libav: Update to ffmpeg n3.0.2
2016-04-29 13:06:07 +0300 Sebastian Dröge <sebastian@centricular.com>
* ext/libav/gstavauddec.c:
avauddec: Finish frames if they are header buffers only and don't produce any output
Otherwise we will consider them as one frame of raw audio that is still
pending, and shift all timestamps by the amount of time spent with header
buffers.
https://bugzilla.gnome.org/show_bug.cgi?id=765797
2016-04-29 12:55:19 +0300 Sebastian Dröge <sebastian@centricular.com>
* ext/libav/gstavauddec.c:
avauddec: If decoding a frame failed, skip it
Otherwise the next successfully decoded frame will get its timestamp and we
will slowly let a/v sync drift apart.
https://bugzilla.gnome.org/show_bug.cgi?id=765797
2016-04-28 18:43:37 +0300 Sebastian Dröge <sebastian@centricular.com>
* ext/libav/gstavaudenc.c:
avaudenc: Set all required fields in the AVFrame
Various functions in libavcodec need them, like the format, sample rate, etc.
and just having them in the context is not enough.
This fixes draining for codecs like MP2 that require a fixed frame size and
require libav to pad the last frame if required.
2016-04-25 18:39:54 +0300 Sebastian Dröge <sebastian@centricular.com>
* ext/libav/gstavcfg.c:
avcfg: Use av_strdup() instead of g_strdup() for strings owned by ffmpeg
It has its own allocator that depending on the configuration is incompatible
with GLib's and just causes a segmentation fault. Like on Windows.
https://bugzilla.gnome.org/show_bug.cgi?id=760266
=== release 1.8.1 ===
2016-04-20 18:31:25 +0300 Sebastian Dröge <sebastian@centricular.com>
* ChangeLog:
* NEWS:
* RELEASE:
* configure.ac:
* docs/plugins/inspect/plugin-libav.xml:
* gst-libav.doap:
Release 1.8.1
2016-04-20 15:27:45 +0300 Sebastian Dröge <sebastian@centricular.com>
* configure.ac:
* ext/libav/gstav.c:
avdeinterlace: Register all filters and only disable all except for yadif during compilation
Otherwise avdeinterlace won't find any filters, and we only use yadif in
there.
https://bugzilla.gnome.org/show_bug.cgi?id=765319
2016-04-15 12:51:07 +0300 Sebastian Dröge <sebastian@centricular.com>
* gst-libs/ext/libav:
libav: Update to n3.0.1
=== release 1.8.0 ===
2016-03-24 Sebastian Dröge <slomo@coaxion.net>
2016-03-24 12:55:15 +0200 Sebastian Dröge <sebastian@centricular.com>
* ChangeLog:
* NEWS:
* RELEASE:
* configure.ac:
releasing 1.8.0
* docs/plugins/inspect/plugin-libav.xml:
* gst-libav.doap:
Release 1.8.0
2016-03-20 13:43:00 +0000 Egor Zaharov <nexfwall@yandex.ru>
......@@ -2711,7 +2872,6 @@
* ext/libav/gstav.h:
* ext/libav/gstavdemux.c:
* ext/libav/gstavmux.c:
* ext/libav/gstavpipe.h:
* ext/libav/gstavprotocol.c:
* ext/libav/gstavprotocol.h:
av: Move gst_ffmpegdata functions to gstavprotocol.h too
......@@ -3119,9 +3279,6 @@
* ext/libav/gstavauddec.h:
* ext/libav/gstavaudenc.c:
* ext/libav/gstavaudenc.h:
* ext/libav/gstavdec.c:
* ext/libav/gstavenc.c:
* ext/libav/gstavenc.h:
* ext/libav/gstavviddec.c:
* ext/libav/gstavviddec.h:
* ext/libav/gstavvidenc.h:
......@@ -3400,28 +3557,6 @@
* configure.ac:
* ext/Makefile.am:
* ext/ffmpeg/Makefile.am:
* ext/ffmpeg/gstffmpeg.c:
* ext/ffmpeg/gstffmpeg.h:
* ext/ffmpeg/gstffmpegaudioresample.c:
* ext/ffmpeg/gstffmpegcfg.c:
* ext/ffmpeg/gstffmpegcfg.h:
* ext/ffmpeg/gstffmpegcodecmap.c:
* ext/ffmpeg/gstffmpegcodecmap.h:
* ext/ffmpeg/gstffmpegdec.c:
* ext/ffmpeg/gstffmpegdeinterlace.c:
* ext/ffmpeg/gstffmpegdemux.c:
* ext/ffmpeg/gstffmpegenc.c:
* ext/ffmpeg/gstffmpegenc.h:
* ext/ffmpeg/gstffmpegmux.c:
* ext/ffmpeg/gstffmpegpipe.h:
* ext/ffmpeg/gstffmpegprotocol.c:
* ext/ffmpeg/gstffmpegscale.c:
* ext/ffmpeg/gstffmpegutils.c:
* ext/ffmpeg/gstffmpegutils.h:
* ext/ffmpeg/gstffmpegviddec.c:
* ext/ffmpeg/gstffmpegvidenc.c:
* ext/ffmpeg/gstffmpegvidenc.h:
* ext/libav/Makefile.am:
* ext/libav/gstav.c:
* ext/libav/gstav.h:
......@@ -4232,14 +4367,6 @@
* configure.ac:
* docs/plugins/Makefile.am:
* docs/plugins/gst-ffmpeg-plugins-docs.sgml:
* docs/plugins/gst-ffmpeg-plugins-sections.txt:
* docs/plugins/gst-ffmpeg-plugins.args:
* docs/plugins/gst-ffmpeg-plugins.hierarchy:
* docs/plugins/gst-ffmpeg-plugins.interfaces:
* docs/plugins/gst-ffmpeg-plugins.prerequisites:
* docs/plugins/gst-ffmpeg-plugins.signals:
* docs/plugins/gst-ffmpeg-plugins.types:
* docs/plugins/gst-libav-plugins-docs.sgml:
* docs/plugins/gst-libav-plugins-sections.txt:
* docs/plugins/gst-libav-plugins.args:
......@@ -4268,18 +4395,13 @@
* ext/libpostproc/gstpostproc.c:
* ext/libswscale/Makefile.am:
* ext/libswscale/gstffmpegscale.c:
* gst-ffmpeg.doap:
* gst-ffmpeg.spec.in:
* gst-libav.doap:
* gst-libav.spec.in:
* tests/check/Makefile.am:
* tests/check/elements/avdec_adpcm.c:
* tests/check/elements/avdemux_ape.c:
* tests/check/elements/ffdec_adpcm.c:
* tests/check/elements/ffdemux_ape.c:
* tests/check/generic/libavcodec-locking.c:
* tests/check/generic/plugin-test.c:
* tests/check/gst-ffmpeg.supp:
* tests/check/gst-libav.supp:
Rename everything from gst-ffmpeg to gst-libav
Also change elements factory names to avenc_*, avdec_*,
......
This diff is collapsed.
Release notes for GStreamer libav Plugins 1.8.0
Release notes for GStreamer libav Plugins 1.8.3
The GStreamer team is pleased to announce the first release of the new stable
1.8 release series. The 1.8 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 GStreamer team is proud to announce the third bugfix release in the stable
1.8 release series of your favourite cross-platform multimedia framework!
Binaries for Android, iOS, Mac OS X and Windows will be provided shortly after
the source release by the GStreamer project during the stable 1.8 release
series.
This release only contains bugfixes and it is safe to update from 1.8.x. For a
full list of bugfixes see Bugzilla.
This module contains plugins based on the libav project, including codecs.
See /releases/1.8/ for the full release notes.
This module contains plugins based on the ffmpeg/libav project, including codecs.
......@@ -35,10 +35,6 @@ contains a set of less supported plugins that haven't passed the
Bugs fixed in this release
* 763940 : 'configure' using system libav always fails with " Uncompatible libavcodec found "
==== Download ====
You can find source releases of gst-libav in the download
......@@ -74,5 +70,6 @@ subscribe to the gstreamer-devel list.
Contributors to this release
* Egor Zaharov
* Edward Hervey
* Sebastian Dröge
 
\ No newline at end of file
......@@ -3,7 +3,7 @@ AC_PREREQ(2.69)
dnl initialize autoconf
dnl when going to/from release please set the nano (fourth number) right !
dnl releases only do Wall, cvs and prerelease does Werror too
AC_INIT(GStreamer libav, 1.8.0,
AC_INIT(GStreamer libav, 1.8.3,
http://bugzilla.gnome.org/enter_bug.cgi?product=GStreamer,
gst-libav)
......@@ -40,7 +40,7 @@ GST_API_VERSION=1.0
AC_SUBST(GST_API_VERSION)
AG_GST_LIBTOOL_PREPARE
AS_LIBTOOL(GST, 800, 0, 800)
AS_LIBTOOL(GST, 803, 0, 803)
dnl *** required versions of GStreamer stuff ***
GST_REQ=1.8.0
......@@ -362,7 +362,9 @@ else
--disable-programs --disable-ffserver --disable-ffplay --disable-ffprobe --disable-ffmpeg \
--disable-encoder=flac --disable-protocols --disable-devices \
--disable-network --disable-hwaccels --disable-dxva2 --disable-vdpau \
--disable-filters --disable-doc --disable-vda --disable-d3d11va --disable-dxva2 \
--disable-filters --enable-filter=yadif --disable-doc --disable-vda --disable-d3d11va --disable-dxva2 \
--disable-videotoolbox --disable-vaapi --disable-crystalhd \
--disable-nvenc --disable-mmal --disable-libmfx \
--disable-iconv --enable-optimizations"
if test "x$enable_gpl" == "xyes"; then
......@@ -378,7 +380,7 @@ else
target_os=darwin
;;
*)
target_os=`echo $host_os | sed 's/-gnu//'`
target_os=`echo $host_os | sed 's/-gnu.*//'`
;;
esac
......
......@@ -106,10 +106,6 @@ GObject
avdec_opus
avdec_paf_audio
avdec_pcm_lxf
avdec_pcm_s16be_planar
avdec_pcm_s24le_planar
avdec_pcm_s32le_planar
avdec_pcm_s8_planar
avdec_qcelp
avdec_qdm2
avdec_ralf
......@@ -159,10 +155,6 @@ GObject
avenc_mp2
avenc_mp2fixed
avenc_nellymoser
avenc_pcm_s16be_planar
avenc_pcm_s24le_planar
avenc_pcm_s32le_planar
avenc_pcm_s8_planar
avenc_real_144
avenc_roq_dpcm
avenc_s302m
......@@ -176,7 +168,6 @@ GObject
GstPipeline
GstFFMpegDeinterlace
GstVideoDecoder
avdec_012v
avdec_4xm
avdec_8bps
avdec_aasc
......@@ -194,7 +185,6 @@ GObject
avdec_avrp
avdec_avs
avdec_avui
avdec_ayuv
avdec_bethsoftvid
avdec_bfi
avdec_binkvideo
......@@ -340,9 +330,6 @@ GObject
avdec_txd
avdec_ultimotion
avdec_utvideo
avdec_v308
avdec_v408
avdec_v410
avdec_vb
avdec_vble
avdec_vc1
......@@ -372,11 +359,8 @@ GObject
avdec_xface
avdec_xl
avdec_xwd
avdec_y41p
avdec_yop
avdec_yuv4
avdec_zerocodec
avdec_zlib
avdec_zmbv
GstVideoEncoder
avenc_a64multi
......@@ -388,7 +372,6 @@ GObject
avenc_asv2
avenc_avrp
avenc_avui
avenc_ayuv
avenc_bmp
avenc_cinepak
avenc_cljr
......@@ -436,18 +419,12 @@ GObject
avenc_targa
avenc_tiff
avenc_utvideo
avenc_v308
avenc_v408
avenc_v410
avenc_vc2
avenc_wmv1
avenc_wmv2
avenc_wrapped_avframe
avenc_xbm
avenc_xface
avenc_xwd
avenc_y41p
avenc_yuv4
avenc_zmbv
avdemux_4xm
avdemux_aiff
......
This diff is collapsed.
......@@ -30,6 +30,7 @@
#include <libavcodec/avcodec.h>
#include <libavformat/avformat.h>
#include <libavfilter/avfiltergraph.h>
#include "gstav.h"
#include "gstavutils.h"
......@@ -151,6 +152,7 @@ plugin_init (GstPlugin * plugin)
gst_ffmpeg_init_pix_fmt_info ();
av_register_all ();
avfilter_register_all ();
gst_ffmpegaudenc_register (plugin);
gst_ffmpegvidenc_register (plugin);
......
......@@ -702,7 +702,7 @@ gst_ffmpegauddec_handle_frame (GstAudioDecoder * decoder, GstBuffer * inbuf)
GstMapInfo map;
gint size, bsize, len, have_data;
GstFlowReturn ret = GST_FLOW_OK;
gboolean do_padding;
gboolean do_padding, is_header;
ffmpegdec = (GstFFMpegAudDec *) decoder;
......@@ -715,6 +715,7 @@ gst_ffmpegauddec_handle_frame (GstAudioDecoder * decoder, GstBuffer * inbuf)
}
inbuf = gst_buffer_ref (inbuf);
is_header = GST_BUFFER_FLAG_IS_SET (inbuf, GST_BUFFER_FLAG_HEADER);
oclass = (GstFFMpegAudDecClass *) (G_OBJECT_GET_CLASS (ffmpegdec));
......@@ -819,6 +820,9 @@ gst_ffmpegauddec_handle_frame (GstAudioDecoder * decoder, GstBuffer * inbuf)
ret =
gst_audio_decoder_finish_frame (GST_AUDIO_DECODER (ffmpegdec),
ffmpegdec->outbuf, 1);
else if (len < 0 || is_header)
ret =
gst_audio_decoder_finish_frame (GST_AUDIO_DECODER (ffmpegdec), NULL, 1);
ffmpegdec->outbuf = NULL;
if (bsize > 0) {
......@@ -869,9 +873,27 @@ gst_ffmpegauddec_register (GstPlugin * plugin)
goto next;
}
/* no quasi-codecs, please */
if (in_plugin->id >= AV_CODEC_ID_PCM_S16LE &&
in_plugin->id <= AV_CODEC_ID_PCM_BLURAY) {
/* no quasi codecs, please */
if (in_plugin->id == AV_CODEC_ID_PCM_S16LE_PLANAR ||
(in_plugin->id >= AV_CODEC_ID_PCM_S16LE &&
in_plugin->id <= AV_CODEC_ID_PCM_BLURAY) ||
/* ffmpeg 3.0 */
#if AV_VERSION_INT (LIBAVCODEC_VERSION_MAJOR, LIBAVCODEC_VERSION_MINOR, LIBAVCODEC_VERSION_MICRO) >= AV_VERSION_INT (57,0,0)
(in_plugin->id >= AV_CODEC_ID_PCM_S8_PLANAR &&
#if AV_VERSION_INT (LIBAVCODEC_VERSION_MAJOR, LIBAVCODEC_VERSION_MINOR, LIBAVCODEC_VERSION_MICRO) >= AV_VERSION_INT (57,54,0)
in_plugin->id <= AV_CODEC_ID_PCM_S64BE)) {
#else
in_plugin->id <= AV_CODEC_ID_PCM_S16BE_PLANAR)) {
#endif
#else
in_plugin->id == AV_CODEC_ID_PCM_S8_PLANAR ||
in_plugin->id == AV_CODEC_ID_PCM_S24LE_PLANAR_DEPRECATED ||
in_plugin->id == AV_CODEC_ID_PCM_S32LE_PLANAR_DEPRECATED ||
in_plugin->id == AV_CODEC_ID_PCM_S16BE_PLANAR_DEPRECATED ||
in_plugin->id == AV_CODEC_ID_PCM_S24LE_PLANAR ||
in_plugin->id == AV_CODEC_ID_PCM_S32LE_PLANAR ||
in_plugin->id == AV_CODEC_ID_PCM_S16BE_PLANAR) {
#endif
goto next;
}
......
......@@ -303,8 +303,23 @@ gst_ffmpegaudenc_set_format (GstAudioEncoder * encoder, GstAudioInfo * info)
ffmpegaudenc->context->channels) != 0);
}
/* some codecs support more than one format, first auto-choose one */
GST_DEBUG_OBJECT (ffmpegaudenc, "picking an output format ...");
allowed_caps = gst_pad_get_allowed_caps (GST_AUDIO_ENCODER_SRC_PAD (encoder));
if (!allowed_caps) {
GST_DEBUG_OBJECT (ffmpegaudenc, "... but no peer, using template caps");
/* we need to copy because get_allowed_caps returns a ref, and
* get_pad_template_caps doesn't */
allowed_caps =
gst_pad_get_pad_template_caps (GST_AUDIO_ENCODER_SRC_PAD (encoder));
}
GST_DEBUG_OBJECT (ffmpegaudenc, "chose caps %" GST_PTR_FORMAT, allowed_caps);
gst_ffmpeg_caps_with_codecid (oclass->in_plugin->id,
oclass->in_plugin->type, allowed_caps, ffmpegaudenc->context);
/* open codec */
if (gst_ffmpeg_avcodec_open (ffmpegaudenc->context, oclass->in_plugin) < 0) {
gst_caps_unref (allowed_caps);
gst_ffmpeg_avcodec_close (ffmpegaudenc->context);
GST_DEBUG_OBJECT (ffmpegaudenc, "avenc_%s: Failed to open FFMPEG codec",
oclass->in_plugin->name);
......@@ -324,20 +339,6 @@ gst_ffmpegaudenc_set_format (GstAudioEncoder * encoder, GstAudioInfo * info)
return FALSE;
}
/* some codecs support more than one format, first auto-choose one */
GST_DEBUG_OBJECT (ffmpegaudenc, "picking an output format ...");
allowed_caps = gst_pad_get_allowed_caps (GST_AUDIO_ENCODER_SRC_PAD (encoder));
if (!allowed_caps) {
GST_DEBUG_OBJECT (ffmpegaudenc, "... but no peer, using template caps");
/* we need to copy because get_allowed_caps returns a ref, and
* get_pad_template_caps doesn't */
allowed_caps =
gst_pad_get_pad_template_caps (GST_AUDIO_ENCODER_SRC_PAD (encoder));
}
GST_DEBUG_OBJECT (ffmpegaudenc, "chose caps %" GST_PTR_FORMAT, allowed_caps);
gst_ffmpeg_caps_with_codecid (oclass->in_plugin->id,
oclass->in_plugin->type, allowed_caps, ffmpegaudenc->context);
/* try to set this caps on the other side */
other_caps = gst_ffmpeg_codecid_to_caps (oclass->in_plugin->id,
ffmpegaudenc->context, TRUE);
......@@ -359,7 +360,7 @@ gst_ffmpegaudenc_set_format (GstAudioEncoder * encoder, GstAudioInfo * info)
gst_caps_unref (icaps);
return FALSE;
}
icaps = gst_caps_truncate (icaps);
icaps = gst_caps_fixate (icaps);
if (!gst_audio_encoder_set_output_format (GST_AUDIO_ENCODER (ffmpegaudenc),
icaps)) {
......@@ -393,7 +394,7 @@ gst_ffmpegaudenc_set_format (GstAudioEncoder * encoder, GstAudioInfo * info)
const gchar *codec;
gst_tag_list_add (tags, GST_TAG_MERGE_REPLACE, GST_TAG_NOMINAL_BITRATE,
ffmpegaudenc->context->bit_rate, NULL);
(guint) ffmpegaudenc->context->bit_rate, NULL);
if ((codec =
gst_ffmpeg_get_codecid_longname (ffmpegaudenc->context->codec_id)))
......@@ -475,6 +476,10 @@ gst_ffmpegaudenc_encode_audio (GstFFMpegAudEnc * ffmpegaudenc,
info = gst_audio_encoder_get_audio_info (enc);
planar = av_sample_fmt_is_planar (ffmpegaudenc->context->sample_fmt);
frame->format = ffmpegaudenc->context->sample_fmt;
frame->sample_rate = ffmpegaudenc->context->sample_rate;
frame->channels = ffmpegaudenc->context->channels;
frame->channel_layout = ffmpegaudenc->context->channel_layout;
if (planar && info->channels > 1) {
gint channels;
......@@ -779,8 +784,26 @@ gst_ffmpegaudenc_register (GstPlugin * plugin)
goto next;
/* no quasi codecs, please */
if ((in_plugin->id >= AV_CODEC_ID_PCM_S16LE &&
in_plugin->id <= AV_CODEC_ID_PCM_BLURAY)) {
if (in_plugin->id == AV_CODEC_ID_PCM_S16LE_PLANAR ||
(in_plugin->id >= AV_CODEC_ID_PCM_S16LE &&
in_plugin->id <= AV_CODEC_ID_PCM_BLURAY) ||
/* ffmpeg 3.0 */
#if AV_VERSION_INT (LIBAVCODEC_VERSION_MAJOR, LIBAVCODEC_VERSION_MINOR, LIBAVCODEC_VERSION_MICRO) >= AV_VERSION_INT (57,0,0)
(in_plugin->id >= AV_CODEC_ID_PCM_S8_PLANAR &&
#if AV_VERSION_INT (LIBAVCODEC_VERSION_MAJOR, LIBAVCODEC_VERSION_MINOR, LIBAVCODEC_VERSION_MICRO) >= AV_VERSION_INT (57,54,0)
in_plugin->id <= AV_CODEC_ID_PCM_S64BE)) {
#else
in_plugin->id <= AV_CODEC_ID_PCM_S16BE_PLANAR)) {
#endif
#else
in_plugin->id == AV_CODEC_ID_PCM_S8_PLANAR ||
in_plugin->id == AV_CODEC_ID_PCM_S24LE_PLANAR_DEPRECATED ||
in_plugin->id == AV_CODEC_ID_PCM_S32LE_PLANAR_DEPRECATED ||
in_plugin->id == AV_CODEC_ID_PCM_S16BE_PLANAR_DEPRECATED ||
in_plugin->id == AV_CODEC_ID_PCM_S24LE_PLANAR ||
in_plugin->id == AV_CODEC_ID_PCM_S32LE_PLANAR ||
in_plugin->id == AV_CODEC_ID_PCM_S16BE_PLANAR) {
#endif
goto next;
}
......
......@@ -1030,7 +1030,7 @@ gst_ffmpeg_cfg_fill_context (GstFFMpegVidEnc * ffmpegenc,
/* make a copy for ffmpeg, it will likely free only some,
* but in any case safer than a potential double free */
G_STRUCT_MEMBER (gchar *, context, context_offset) =
g_strdup (G_STRUCT_MEMBER (gchar *, ffmpegenc, qdata->offset));
av_strdup (G_STRUCT_MEMBER (gchar *, ffmpegenc, qdata->offset));
} else {
/* memcpy a bit heavy for a small copy,
* but hardly part of 'inner loop' */
......
......@@ -1146,8 +1146,8 @@ gst_ffmpeg_codecid_to_caps (enum AVCodecID codec_id,
caps =
gst_ff_aud_caps_new (context, NULL, codec_id, encode, "audio/x-wma",
"wmaversion", G_TYPE_INT, version, "block_align", G_TYPE_INT,
context->block_align, "bitrate", G_TYPE_INT, context->bit_rate,
NULL);
context->block_align, "bitrate", G_TYPE_INT,
(guint) context->bit_rate, NULL);
} else {
caps =
gst_ff_aud_caps_new (context, NULL, codec_id, encode, "audio/x-wma",
......@@ -1824,7 +1824,7 @@ gst_ffmpeg_codecid_to_caps (enum AVCodecID codec_id,
if (context)
gst_caps_set_simple (caps,
"block_align", G_TYPE_INT, context->block_align,
"bitrate", G_TYPE_INT, context->bit_rate, NULL);
"bitrate", G_TYPE_INT, (guint) context->bit_rate, NULL);
break;
case AV_CODEC_ID_ADPCM_G726:
......@@ -1836,7 +1836,7 @@ gst_ffmpeg_codecid_to_caps (enum AVCodecID codec_id,
if (context)
gst_caps_set_simple (caps,
"block_align", G_TYPE_INT, context->block_align,
"bitrate", G_TYPE_INT, context->bit_rate, NULL);
"bitrate", G_TYPE_INT, (guint) context->bit_rate, NULL);
if (!encode) {
gst_caps_append (caps, gst_caps_new_simple ("audio/x-adpcm",
......@@ -1970,7 +1970,7 @@ gst_ffmpeg_codecid_to_caps (enum AVCodecID codec_id,
if (context)
gst_caps_set_simple (caps,
"block_align", G_TYPE_INT, context->block_align,
"bitrate", G_TYPE_INT, context->bit_rate, NULL);
"bitrate", G_TYPE_INT, (guint) context->bit_rate, NULL);
}
break;
......@@ -2012,7 +2012,7 @@ gst_ffmpeg_codecid_to_caps (enum AVCodecID codec_id,
if (context) {
gst_caps_set_simple (caps,
"leaf_size", G_TYPE_INT, context->block_align,
"bitrate", G_TYPE_INT, context->bit_rate, NULL);
"bitrate", G_TYPE_INT, (guint) context->bit_rate, NULL);
}
}
break;
......@@ -2044,7 +2044,7 @@ gst_ffmpeg_codecid_to_caps (enum AVCodecID codec_id,
if (context) {
gst_caps_set_simple (caps,
"leaf_size", G_TYPE_INT, context->block_align,
"bitrate", G_TYPE_INT, context->bit_rate, NULL);
"bitrate", G_TYPE_INT, (guint) context->bit_rate, NULL);
}
}
break;
......@@ -2082,7 +2082,7 @@ gst_ffmpeg_codecid_to_caps (enum AVCodecID codec_id,
if (context)
gst_caps_set_simple (caps,
"block_align", G_TYPE_INT, context->block_align,
"bitrate", G_TYPE_INT, context->bit_rate, NULL);
"bitrate", G_TYPE_INT, (guint) context->bit_rate, NULL);
}
break;
......@@ -2161,7 +2161,7 @@ gst_ffmpeg_codecid_to_caps (enum AVCodecID codec_id,
if (context)
gst_caps_set_simple (caps,
"block_align", G_TYPE_INT, context->block_align,
"bitrate", G_TYPE_INT, context->bit_rate, NULL);
"bitrate", G_TYPE_INT, (guint) context->bit_rate, NULL);
g_free (mime);
break;
default:
......
......@@ -928,6 +928,7 @@ gst_ffmpegmux_register (GstPlugin * plugin)
(!strncmp (in_plugin->name, "crc", 3)) ||
(!strncmp (in_plugin->name, "null", 4)) ||
(!strncmp (in_plugin->name, "gif", 3)) ||
(!strncmp (in_plugin->name, "fifo", 4)) ||
(!strncmp (in_plugin->name, "frame", 5)) ||
(!strncmp (in_plugin->name, "image", 5)) ||
(!strncmp (in_plugin->name, "mulaw", 5)) ||
......
......@@ -1011,6 +1011,7 @@ gst_ffmpegviddec_negotiate (GstFFMpegVidDec * ffmpegdec,
GstVideoInfo *in_info, *out_info;
GstVideoCodecState *output_state;
gint fps_n, fps_d;
GstClockTime latency;
if (!update_video_context (ffmpegdec, context, picture))
return TRUE;
......@@ -1093,6 +1094,15 @@ gst_ffmpegviddec_negotiate (GstFFMpegVidDec * ffmpegdec,
if (!gst_video_decoder_negotiate (GST_VIDEO_DECODER (ffmpegdec)))
goto negotiate_failed;
/* The decoder is configured, we now know the true latency */
if (fps_n) {
latency =
gst_util_uint64_scale_ceil (ffmpegdec->context->has_b_frames *
GST_SECOND, fps_d, fps_n);
gst_video_decoder_set_latency (GST_VIDEO_DECODER (ffmpegdec), latency,
latency);
}
return TRUE;
/* ERRORS */
......@@ -1146,29 +1156,36 @@ gst_ffmpegviddec_do_qos (GstFFMpegVidDec * ffmpegdec,
*mode_switch = TRUE;
}
if (*mode_switch == TRUE) {
/* We've already switched mode, we can return straight away
* without any further calculation */
return;
}
diff =
gst_video_decoder_get_max_decode_time (GST_VIDEO_DECODER (ffmpegdec),
frame);
/* if we don't have timing info, then we don't do QoS */
if (G_UNLIKELY (diff == G_MAXINT64))
if (G_UNLIKELY (diff == G_MAXINT64)) {
/* Ensure the skipping strategy is the default one */
ffmpegdec->context->skip_frame = ffmpegdec->skip_frame;
return;
}
GST_DEBUG_OBJECT (ffmpegdec, "decoding time %" G_GINT64_FORMAT, diff);
if (*mode_switch == FALSE) {
if (diff > 0 && ffmpegdec->context->skip_frame != AVDISCARD_DEFAULT) {
ffmpegdec->context->skip_frame = AVDISCARD_DEFAULT;
*mode_switch = TRUE;
GST_DEBUG_OBJECT (ffmpegdec, "QOS: normal mode");
}
if (diff > 0 && ffmpegdec->context->skip_frame != AVDISCARD_DEFAULT) {
ffmpegdec->context->skip_frame = AVDISCARD_DEFAULT;
*mode_switch = TRUE;
GST_DEBUG_OBJECT (ffmpegdec, "QOS: normal mode");
}
else if (diff <= 0 && ffmpegdec->context->skip_frame != AVDISCARD_NONREF) {
ffmpegdec->context->skip_frame = AVDISCARD_NONREF;
*mode_switch = TRUE;
GST_DEBUG_OBJECT (ffmpegdec,
"QOS: hurry up, diff %" G_GINT64_FORMAT " >= 0", diff);
}
else if (diff <= 0 && ffmpegdec->context->skip_frame != AVDISCARD_NONREF) {
ffmpegdec->context->skip_frame = AVDISCARD_NONREF;
*mode_switch = TRUE;
GST_DEBUG_OBJECT (ffmpegdec,
"QOS: hurry up, diff %" G_GINT64_FORMAT " >= 0", diff);
}
}
......@@ -2015,13 +2032,23 @@ gst_ffmpegviddec_register (GstPlugin * plugin)
|| in_plugin->type != AVMEDIA_TYPE_VIDEO)
goto next;
/* no quasi-codecs, please */
/* no quasi codecs, please */
if (in_plugin->id == AV_CODEC_ID_RAWVIDEO ||
in_plugin->id == AV_CODEC_ID_V210 ||
in_plugin->id == AV_CODEC_ID_V210X ||
in_plugin->id == AV_CODEC_ID_R210 ||
(in_plugin->id >= AV_CODEC_ID_PCM_S16LE &&
in_plugin->id <= AV_CODEC_ID_PCM_BLURAY)) {
in_plugin->id == AV_CODEC_ID_V308 ||
in_plugin->id == AV_CODEC_ID_V408 ||
in_plugin->id == AV_CODEC_ID_V410 ||
in_plugin->id == AV_CODEC_ID_R210
|| in_plugin->id == AV_CODEC_ID_AYUV
|| in_plugin->id == AV_CODEC_ID_Y41P
|| in_plugin->id == AV_CODEC_ID_012V
|| in_plugin->id == AV_CODEC_ID_YUV4
#if AV_VERSION_INT (LIBAVCODEC_VERSION_MAJOR, LIBAVCODEC_VERSION_MINOR, LIBAVCODEC_VERSION_MICRO) >= \
AV_VERSION_INT (57,4,0)
|| in_plugin->id == AV_CODEC_ID_WRAPPED_AVFRAME
#endif
|| in_plugin->id == AV_CODEC_ID_ZLIB) {
goto next;
}
......@@ -2051,6 +2078,20 @@ gst_ffmpegviddec_register (GstPlugin * plugin)
goto next;
}
if (strstr (in_plugin->name, "vaapi")) {
GST_DEBUG
("Ignoring VAAPI decoder %s. We can't handle this outside of ffmpeg",
in_plugin->name);
goto next;
}
if (g_str_has_suffix (in_plugin->name, "_qsv")) {
GST_DEBUG
("Ignoring qsv decoder %s. We can't handle this outside of ffmpeg",
in_plugin->name);
goto next;
}
GST_DEBUG ("Trying plugin %s [%s]", in_plugin->name, in_plugin->long_name);
/* no codecs for which we're GUARANTEED to have better alternatives */
......
......@@ -430,6 +430,29 @@ gst_ffmpegvidenc_set_format (GstVideoEncoder * encoder,
gst_ffmpeg_caps_with_codecid (oclass->in_plugin->id,
oclass->in_plugin->type, allowed_caps, ffmpegenc->context);
/* open codec */
if (gst_ffmpeg_avcodec_open (ffmpegenc->context, oclass->in_plugin) < 0) {
gst_caps_unref (allowed_caps);
goto open_codec_fail;
}
/* is the colourspace correct? */
if (pix_fmt != ffmpegenc->context->pix_fmt) {
gst_caps_unref (allowed_caps);
goto pix_fmt_err;
}
/* we may have failed mapping caps to a pixfmt,
* and quite some codecs do not make up their own mind about that
* in any case, _NONE can never work out later on */
if (pix_fmt == AV_PIX_FMT_NONE) {
gst_caps_unref (allowed_caps);
goto bad_input_fmt;
}
/* second pass stats buffer no longer needed */
g_free (ffmpegenc->context->stats_in);
/* try to set this caps on the other side */
other_caps = gst_ffmpeg_codecid_to_caps (oclass->in_plugin->id,
ffmpegenc->context, TRUE);
......@@ -450,23 +473,6 @@ gst_ffmpegvidenc_set_format (GstVideoEncoder * encoder,
GST_DEBUG_OBJECT (ffmpegenc, "codec flags 0x%08x", ffmpegenc->context->flags);
/* open codec */
if (gst_ffmpeg_avcodec_open (ffmpegenc->context, oclass->in_plugin) < 0)
goto open_codec_fail;
/* is the colourspace correct? */
if (pix_fmt != ffmpegenc->context->pix_fmt)
goto pix_fmt_err;
/* we may have failed mapping caps to a pixfmt,
* and quite some codecs do not make up their own mind about that
* in any case, _NONE can never work out later on */
if (pix_fmt == AV_PIX_FMT_NONE)
goto bad_input_fmt;
/* second pass stats buffer no longer needed */
g_free (ffmpegenc->context->stats_in);
/* Store input state and set output state */
if (ffmpegenc->input_state)
gst_video_codec_state_unref (ffmpegenc->input_state);
......@@ -481,7 +487,7 @@ gst_ffmpegvidenc_set_format (GstVideoEncoder * encoder,
const gchar *codec;
gst_tag_list_add (tags, GST_TAG_MERGE_REPLACE, GST_TAG_NOMINAL_BITRATE,
ffmpegenc->context->bit_rate, NULL);
(guint) ffmpegenc->context->bit_rate, NULL);
if ((codec =
gst_ffmpeg_get_codecid_longname (ffmpegenc->context->codec_id)))
......@@ -952,7 +958,18 @@ gst_ffmpegvidenc_register (GstPlugin * plugin)
if (in_plugin->id == AV_CODEC_ID_RAWVIDEO ||
in_plugin->id == AV_CODEC_ID_V210 ||
in_plugin->id == AV_CODEC_ID_V210X ||
in_plugin->id == AV_CODEC_ID_V308 ||
in_plugin->id == AV_CODEC_ID_V408 ||
in_plugin->id == AV_CODEC_ID_V410 ||
in_plugin->id == AV_CODEC_ID_R210
|| in_plugin->id == AV_CODEC_ID_AYUV
|| in_plugin->id == AV_CODEC_ID_Y41P
|| in_plugin->id == AV_CODEC_ID_012V
|| in_plugin->id == AV_CODEC_ID_YUV4
#if AV_VERSION_INT (LIBAVCODEC_VERSION_MAJOR, LIBAVCODEC_VERSION_MINOR, LIBAVCODEC_VERSION_MICRO) >= \
AV_VERSION_INT (57,4,0)
|| in_plugin->id == AV_CODEC_ID_WRAPPED_AVFRAME
#endif
|| in_plugin->id == AV_CODEC_ID_ZLIB) {
goto next;
}
......@@ -967,6 +984,27 @@ gst_ffmpegvidenc_register (GstPlugin * plugin)
goto next;
}
if (strstr (in_plugin->name, "vaapi")) {
GST_DEBUG
("Ignoring VAAPI encoder %s. We can't handle this outside of ffmpeg",
in_plugin->name);
goto next;
}
if (strstr (in_plugin->name, "nvenc")) {
GST_DEBUG
("Ignoring nvenc encoder %s. We can't handle this outside of ffmpeg",
in_plugin->name);
goto next;
}
if (g_str_has_suffix (in_plugin->name, "_qsv")) {
GST_DEBUG
("Ignoring qsv encoder %s. We can't handle this outside of ffmpeg",
in_plugin->name);
goto next;
}
/* only video encoders */
if (!av_codec_is_encoder (in_plugin)
|| in_plugin->type != AVMEDIA_TYPE_VIDEO)
......
......@@ -32,6 +32,36 @@ colorspace conversion elements.
</GitRepository>
</repository>
<release>
<Version>
<revision>1.8.3</revision>
<branch>1.8</branch>
<name></name>
<created>2016-08-19</created>
<file-release rdf:resource="http://gstreamer.freedesktop.org/src/gst-libav/gst-libav-1.8.3.tar.xz" />
</Version>
</release>
<release>
<Version>
<revision>1.8.2</revision>
<branch>1.8</branch>
<name></name>
<created>2016-06-09</created>
<file-release rdf:resource="http://gstreamer.freedesktop.org/src/gst-libav/gst-libav-1.8.2.tar.xz" />
</Version>
</release>
<release>
<Version>
<revision>1.8.1</revision>
<branch>1.8</branch>
<name></name>
<created>2016-04-20</created>
<file-release rdf:resource="http://gstreamer.freedesktop.org/src/gst-libav/gst-libav-1.8.1.tar.xz" />
</Version>
</release>
<release>
<Version>
<revision>1.8.0</revision>
......
libav @ c63e5875
Subproject commit c40983a6f631d22fede713d535bb9c31d5c9740c
Subproject commit c63e58756699d07b5bc69799db388600d3e634bf