Commit graph

1328 commits

Author SHA1 Message Date
Sebastian Dröge
5e61a8999f avviddec: Use interlaced-mode=interleaved and set field-order if possible
https://bugzilla.gnome.org/show_bug.cgi?id=771376
2016-11-01 20:42:52 +02:00
Sebastian Dröge
d2e65754b3 avcodecmap: Configure field order in the context if we can
https://bugzilla.gnome.org/show_bug.cgi?id=771376
2016-11-01 20:42:52 +02:00
Sebastian Dröge
fb9fea0223 avvidenc: Set colorimetry information in the context if known
https://bugzilla.gnome.org/show_bug.cgi?id=750882
2016-11-01 20:42:52 +02:00
Sebastian Dröge
5b40fb965b avviddec: Set colorimetry information from the context if known
But only if upstream did not provide that information.

https://bugzilla.gnome.org/show_bug.cgi?id=750882
2016-11-01 20:42:52 +02:00
Tim-Philipp Müller
efe5797041 avcodecmap: Add mapping for Opus audio decoder
Make avdec_opus work.

https://bugzilla.gnome.org/show_bug.cgi?id=773672
2016-11-01 19:05:37 +02:00
Sebastian Dröge
f1bca3115e avaudenc/dec: Allow compilation against ffmpeg < 3.2 again 2016-10-26 23:29:40 +03:00
Sebastian Dröge
440482475f avaudenc/dec: Ignore S64BE/LE pseudo-codecs 2016-10-26 23:20:52 +03:00
Sebastian Dröge
e3558d4d07 avviddec: Use enum instead of magic numbers for the chroma siting values 2016-09-29 12:01:59 +03:00
Sebastian Dröge
8443af343e av: Cast AVContext::bit_rate to a guint before passing to varargs functions
We expect it to be a int or uint, however it changed the type to a
int64_t in later versions of ffmpeg. As such it would be passed as a 64
bit value to varargs functions, while the consumer of the arguments
assumes only 32 bits. This causes crashes.

https://bugzilla.gnome.org/show_bug.cgi?id=771092
2016-09-14 11:20:48 +02:00
Thibault Saunier
f6c31d1cb6 build: Do not link plugin against lzma and bz2 if using system install
And bump version to 1.9.2
2016-09-05 12:44:37 -03:00
Iain Lane
f5f32986b6 Only use AV_CODEC_ID_WRAPPED_AVFRAME on new enough libavcodecs
https://bugzilla.gnome.org/show_bug.cgi?id=770753
2016-09-03 14:20:26 +03:00
Thibault Saunier
e4b51a81cb Add support for Meson as alternative/parallel build system
https://github.com/mesonbuild/meson

We only support building with ffmpeg installed system wide and not as
subproject yet.
2016-08-29 09:56:18 -03:00
Thibault Saunier
80924aab15 Use the new API to post flow ERROR messages on the bus
https://bugzilla.gnome.org/show_bug.cgi?id=770158
2016-08-26 19:23:32 -03:00
Tim-Philipp Müller
e5ceb287d3 libav: fix confusing 'insane framerate' debug log message
Usually means no framerate / variable framerate. Also the
fraction arguments were swapped.
2016-08-20 10:54:07 +01:00
Edward Hervey
8b374b3f82 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-08-04 10:45:14 +02:00
Sebastian Dröge
3e93ad1bcd libav: Ignore more quasi-codecs 2016-07-22 14:54:21 +03:00
Sebastian Dröge
5f4bd291c1 libav: Ignore VAAPI decoders and VAAPI/nvenc encoders
These can show up when having a build against a system version of ffmpeg.
2016-07-22 14:42:59 +03:00
Sebastian Dröge
0bdceaad8a avaudenc: Use gst_caps_fixate() instead of gst_caps_truncate()
Just truncating might not be enough.
2016-07-05 20:16:45 +03:00
Sebastian Dröge
832b42301d 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:09 +03:00
Sebastian Dröge
a5ac55c4a0 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:15:28 +03:00
Edward Hervey
e36fa30c15 avvidec: Don't set bogus latency
We might have cases where the framerate is not known (0/1).
2016-05-14 12:09:06 +02:00
Edward Hervey
878d32ad38 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-13 09:52:29 +02:00
Sebastian Dröge
445a301844 avcodecmap: Add mapping for G729 caps
https://bugzilla.gnome.org/show_bug.cgi?id=766333
2016-05-13 10:27:38 +03:00
Sebastian Dröge
3fb49b6053 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 13:06:07 +03:00
Sebastian Dröge
00ebf95e08 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-29 12:55:19 +03:00
Sebastian Dröge
151cd32a10 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-28 18:43:37 +03:00
Sebastian Dröge
2027188c34 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
2016-04-25 18:39:54 +03:00
Sebastian Dröge
ae3a80eec7 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-20 15:27:45 +03:00
Víctor Manuel Jáquez Leal
1af733a636 avvid{dec,enc}: remove dead gobject macros
The GObject macros either for GstFFMpegVidDec and GstFFMpegVidEnc can
break the compilation because they are not GTypes, since each av video
elements are registered in runtime.

https://bugzilla.gnome.org/show_bug.cgi?id=764162
2016-03-24 18:36:22 +01:00
Vineeth TM
8603ff7596 libav: use new gst_element_class_add_static_pad_template()
https://bugzilla.gnome.org/show_bug.cgi?id=763084
2016-03-24 14:53:51 +02:00
Sebastian Dröge
34fe6af6da avcodecmap: Only set the bitrate if we actually got it from the caps
Otherwise we set a random value from the stack as bitrate. The default (0)
is a better choice and doesn't upset valgrind.
2016-03-11 15:44:16 +02:00
Sebastian Dröge
20586e9f2d avdeinterlace: Don't assume that get_current_caps() returns non-NULL caps after has_current_caps()
Remove calls to gst_pad_has_current_caps() which then go on to call
gst_pad_get_current_caps() as the caps can go to NULL in between. Instead just
use gst_pad_get_current_caps() and check for NULL.

https://bugzilla.gnome.org/show_bug.cgi?id=759539
2016-02-23 18:19:18 +02:00
Tim-Philipp Müller
9e00a37d0e Don't use exported but undeclared core debug category symbols
It's not right and won't work on Windows with MSVC.
2016-02-20 12:59:38 +00:00
Edward Hervey
e3cf542215 avcfg: rc-min-rate and rc-max-rate are now 64bit integers
Switch the gobject properties and internal handling to support that
2016-02-16 16:43:23 +01:00
Sebastian Dröge
55fd9e3623 avvidenc: Set width/height and format in the AVFrame we pass to the encoder API 2016-02-16 09:13:23 +02:00
Sebastian Dröge
3f41aaff30 avaudenc: Also use av_free() instead of g_free() 2016-01-25 20:13:10 +01:00
Sebastian Dröge
a7d9d448bd avaudenc: Use av_malloc() instead of GLib malloc() wrappers for memory freed by ffmpeg
It has its own allocator that is not necessarily doing the same as malloc and
will then usually crash. E.g. on Windows or when memalign() is available.
2016-01-25 20:08:11 +01:00
Edward Hervey
da335a0ea3 avvidec: Bring mpeg video decoders up to PRIMARY rank
We should have done that ages ago ...

https://bugzilla.gnome.org/show_bug.cgi?id=574461
2016-01-21 17:35:51 +01:00
Sebastian Dröge
6e18a221a0 avviddec: Use AVFrame API instead of deprecated AVPicture API 2016-01-20 10:31:40 +02:00
Sebastian Dröge
4e0b05bf7f av: Use av_image_get_buffer_size() instead of deprecated avpicture_get_size() 2016-01-19 09:42:47 +02:00
Sebastian Dröge
fce3e0ba66 avdemux: Use av_packet_unref() instead of deprecated av_free_packet() 2016-01-19 09:39:00 +02:00
Sebastian Dröge
1d7d7033bc avvidenc: Use AVPacket.flags for detecting keyframes
AVCodec.coded_frame is deprecated and will disappear at some point
in the future.
2016-01-19 09:36:01 +02:00
Sebastian Dröge
e04bcf0601 avdeinterlace: Chain up to parent class' dispose()
https://bugzilla.gnome.org/show_bug.cgi?id=757498
2016-01-16 17:24:09 +02:00
Sebastian Dröge
46fb2e9f11 libav: Bitrate field changed from int to int64_t, fix compiler warnings
Cast it to a gint64 for now though, as otherwise we will fail compilation
with ffmpeg 2.8.

https://bugzilla.gnome.org/show_bug.cgi?id=757498
2016-01-16 17:23:37 +02:00
Andreas Cadhalpun
6235a04ef3 libav: Remove usage of deprecated API
https://bugzilla.gnome.org/show_bug.cgi?id=757498
2016-01-16 16:47:40 +02:00
Andreas Cadhalpun
ddec3a2c78 avdeinterlace: Port non-deprecated AVFilter API
https://bugzilla.gnome.org/show_bug.cgi?id=757498
2016-01-16 11:11:44 +01:00
Tim-Philipp Müller
83ce87e7c8 av: canonicalise av plugin name more consistently in more places
Use g_strdelimit(), make sure to include comma as well, which
isn't included in G_STR_DELIMITERS.

https://bugzilla.gnome.org/show_bug.cgi?id=734451
2016-01-07 17:16:41 +00:00
Sebastian Dröge
8e466b73d8 avcodecmap: Add special mapping for mono channel layouts
In ffmpeg this is the same as FRONT_CENTER, but we distinguish between
FRONT_CENTER and MONO in GStreamer. Add an explicit mapping for this special
case in the translations functions.

https://bugzilla.gnome.org/show_bug.cgi?id=759846
2015-12-24 13:10:55 +01:00
Vineeth TM
ae27b9c503 avviddec: remove realvideo slice_offset handling
Handling slice_offset in avviddec is resulting in invalid memory read.
Since rv decoders anyways handle slice_offset, removing the same to fix
memory mishandlings

https://bugzilla.gnome.org/show_bug.cgi?id=758726
2015-12-23 13:17:08 +01:00
Reynaldo H. Verdejo Pinochet
193b0d81d1 Require libav provided by FFmpeg at run-time
Error out if system's libav* libraries are not
provided by FFmpeg. Libav-incompatible changes
were introduced to support the latter so we
can no longer support both.

https://bugzilla.gnome.org/show_bug.cgi?id=758183
2015-12-04 11:59:47 -08:00