Commit graph

2197 commits

Author SHA1 Message Date
Nirbheek Chauhan
21a18e22e1 avcfg: Ensure that ternary operator always evaluates to int64
When building with MSVC, if the 3rd operator is a double, the entire
expression always promoted double, and is then cast to int64.

When TRUE, this evaluates to (gint64) (gdouble) (INT64_MAX)
which overflows to INT64_MIN on MSVC, but not on C99 compilers.

This causes us to fail the g_return_if_fail inside g_param_spec_int64
when built with MSVC.
2018-10-16 04:29:37 +05:30
Arun Raghavan
ef106350d4 avdemux: Expose IFF container support
This exposes support for the "iff" demuxer. This is a general purpose
format, and the reason to expose this now is to allow reading DSD data
(which is supported via a variant called DSDIFF).

More information at:
  https://wiki.multimedia.cx/index.php?title=IFF
  https://www.loc.gov/preservation/digital/formats/fdd/fdd000245.shtml
2018-10-12 19:23:21 +05:30
Nirbheek Chauhan
26585686b0 meson: Generate a pkgconfig file for gstlibav
This matches all other plugins in the other gstreamer repos. This is
also necessary for generating the correct libtool archive (.la) files
in Cerbero which are needed for static linking on Android and iOS.
2018-10-09 18:14:23 +05:30
Tim-Philipp Müller
f749504848 meson: use new 'python' module instead of deprecated 'python3' one
https://github.com/mesonbuild/meson/pull/4169
2018-10-08 20:55:08 +01:00
Nirbheek Chauhan
50311411f4 meson: Don't export symbols from linked static libraries
We don't want to export any symbols from the ffmpeg static libraries
we link to when building inside Cerbero. In the Autotools build, we
pass -export-symbols-regex to libtool which ensures this for us.
2018-10-01 16:13:29 +05:30
Edward Hervey
46cc79c43a avviddec: Remove unneeded check
frame is always valid in this function (but wasn't before the
refactoring from a few months ago).

CID #1439540
2018-09-21 16:01:53 +02:00
Edward Hervey
143aa80cdf avcfg: Simplify code
The existence of 'opt' is checked, the remainder of the code can therefore
rely on it being valid.

CID #1439537
2018-09-21 11:30:58 +02:00
Tim-Philipp Müller
5e4f6cadb0 libav: update internal snapshot to ffmpeg n4.0.2 2018-08-15 19:33:58 +01:00
Mathieu Duponchelle
ff3a8f6627 decoders: fix draining
https://bugzilla.gnome.org/show_bug.cgi?id=796900
2018-07-31 19:13:25 +02:00
Georg Ottinger
962d2a78fe avmux: Place pva case after generic case
In the function gst_ffmpeg_formatid_get_codecids() in the if / else if
construct the special case !strcmp (format_name, "pva") should be
handled before the generic case (plugin->audio_codec !=
AV_CODEC_ID_NONE) || (plugin->video_codec != AV_CODEC_ID_NONE)
This patch fixes the ordering.

I stumbled accorss this issue while adding a new format to
gst_ffmpeg_formatid_get_codecids()

https://bugzilla.gnome.org/show_bug.cgi?id=796738
2018-07-26 16:22:30 -04:00
George Kiagiadakis
4596249496 avauddec: add support for decoding in non-interleaved layout
This removes the internal interleave loop and always negotiates
the native output layout of the libav decoder. Users can use
audioconvert to interleave if necessary.

Special care has been taken to leave the encoder unaffected by
the changes in avcodecmap, since GstAudioEncoder doesn't support
the non-interleaved layout yet.

https://bugzilla.gnome.org/show_bug.cgi?id=705977
2018-07-23 16:16:10 +03:00
Seungha Yang
db82350245 libav: Fix symbol redefine build error
https://bugzilla.gnome.org/show_bug.cgi?id=796827
2018-07-19 12:21:01 +01:00
Tim-Philipp Müller
c881f831c3 Remove obsolete #if 0-ed code 2018-07-18 15:44:23 +01:00
Tim-Philipp Müller
6aa62114c5 Remove swscale plugin code
This has been disabled for 5.5 years, time to remove it.
2018-07-17 00:57:34 +01:00
Mathieu Duponchelle
25bf32c280 libav: Update to ffmpeg release/4.0 HEAD 2018-07-16 19:46:17 +02:00
Edward Hervey
a3c72b2148 avcfg: Properly initalize GValue
.. to the expected property value type.
2018-07-16 08:44:45 +02:00
Mathieu Duponchelle
ad1f3a914b avcfg: actually remove call to g_object_getv
(Sorry about that)
2018-07-13 18:03:27 +02:00
Mathieu Duponchelle
dd37a553ac av*dec: Ignore decoding errors
We were ignoring these before the port to 4.0, interpreting them
as GST_FLOW_ERROR / GST_ELEMENT_ERROR causes check failures.

We should start using GST_*_DECODER_ERROR in latter commits,
for now simply restore the previous behaviour.
2018-07-13 17:24:07 +02:00
Mathieu Duponchelle
70d9f923dc avcfg: use g_object_get_property, not g_object_getv
I simply confused those two, we didn't need g_object_getv
here anyway.
2018-07-13 17:21:25 +02:00
Mathieu Duponchelle
c34dd9bb1a avcfg: ignore some generic properties
We expose profile, level and colorimetry / colorspaces through
caps.

https://bugzilla.gnome.org/show_bug.cgi?id=792900
2018-07-13 00:53:28 +02:00
Mathieu Duponchelle
9c0dd8ef60 avcfg: add skip support to overrides system
https://bugzilla.gnome.org/show_bug.cgi?id=792900
2018-07-13 00:53:28 +02:00
Mathieu Duponchelle
b3dc5c2799 meson: add FFmpeg meson as a fallback
https://bugzilla.gnome.org/show_bug.cgi?id=792900
2018-07-13 00:53:28 +02:00
Mathieu Duponchelle
e1d0d73fc0 auddec: fix luck-based sinkpad access
https://bugzilla.gnome.org/show_bug.cgi?id=792900
2018-07-13 00:53:28 +02:00
Mathieu Duponchelle
f42ce26ae9 Update ffmpeg version requirements
https://bugzilla.gnome.org/show_bug.cgi?id=792900
2018-07-13 00:53:28 +02:00
Mathieu Duponchelle
8b6516d5c5 Remove obsolete scale and resample sources
https://bugzilla.gnome.org/show_bug.cgi?id=792900
2018-07-13 00:53:28 +02:00
Mathieu Duponchelle
aedcf438d0 configure: update libav configure args
https://bugzilla.gnome.org/show_bug.cgi?id=792900
2018-07-13 00:53:28 +02:00
Mathieu Duponchelle
3b6597188a libav: Update to n4.0.1 release
https://bugzilla.gnome.org/show_bug.cgi?id=792900
2018-07-13 00:53:28 +02:00
Mathieu Duponchelle
fb9b70c44f meson: stop ignoring deprecation warnings!
https://bugzilla.gnome.org/show_bug.cgi?id=792900
2018-07-13 00:53:27 +02:00
Mathieu Duponchelle
8f1543838b avvidenc: port to send_frame / receive_packet
https://bugzilla.gnome.org/show_bug.cgi?id=792900
2018-07-13 00:53:27 +02:00
Mathieu Duponchelle
be9b6969cb avviddec: fix invalid alignment calculations.
avcodec_align_dimensions2 uses context->pix_fmt to make its
calculations, we thus need to make sure it is adequately set
when calling it.

Fixes:

gst-launch-1.0 videotestsrc ! video/x-raw, width=1920, height=1080 \
! avenc_mpeg4 ! avdec_mpeg4 ! xvimagesink

This showed invalid writes under valgrind, then segfault.

https://bugzilla.gnome.org/show_bug.cgi?id=792900
2018-07-13 00:53:27 +02:00
Mathieu Duponchelle
8562f10969 avaudenc: port to send_frame / receive_packet
https://bugzilla.gnome.org/show_bug.cgi?id=792900
2018-07-13 00:53:27 +02:00
Mathieu Duponchelle
3e8709d21a avmux: fix remaining warnings
https://bugzilla.gnome.org/show_bug.cgi?id=792900
2018-07-13 00:53:27 +02:00
Mathieu Duponchelle
066acfa922 avauddec: fix remaining warnings
https://bugzilla.gnome.org/show_bug.cgi?id=792900
2018-07-13 00:53:27 +02:00
Mathieu Duponchelle
6243197c82 avauddec: port to new decoding API
https://bugzilla.gnome.org/show_bug.cgi?id=792900
2018-07-13 00:53:27 +02:00
Mathieu Duponchelle
8f3bc07e09 avaudenc: further cleanup
https://bugzilla.gnome.org/show_bug.cgi?id=792900
2018-07-13 00:53:27 +02:00
Mathieu Duponchelle
59b9e66542 avaudenc: install options generically
https://bugzilla.gnome.org/show_bug.cgi?id=792900
2018-07-13 00:53:27 +02:00
Mathieu Duponchelle
965cd81603 avviddec: fix signed/unsigned comparisons
https://bugzilla.gnome.org/show_bug.cgi?id=792900
2018-07-13 00:53:27 +02:00
Mathieu Duponchelle
d191fb2e50 avvidec: port to new decoding API
https://bugzilla.gnome.org/show_bug.cgi?id=792900
2018-07-13 00:53:27 +02:00
Mathieu Duponchelle
c214205430 gstav: stop calling deprecated registration methods
https://bugzilla.gnome.org/show_bug.cgi?id=792900
2018-07-13 00:53:27 +02:00
Mathieu Duponchelle
1035d6c820 auddec: stop using deprecated getters
https://bugzilla.gnome.org/show_bug.cgi?id=792900
2018-07-13 00:53:27 +02:00
Mathieu Duponchelle
2ec542f7c2 av_oformat_next (deprecated) -> av_muxer_iterate
https://bugzilla.gnome.org/show_bug.cgi?id=792900
2018-07-13 00:53:27 +02:00
Mathieu Duponchelle
bc7160dd47 av_iformat_next (deprecated) -> av_demuxer_iterate
https://bugzilla.gnome.org/show_bug.cgi?id=792900
2018-07-13 00:53:27 +02:00
Mathieu Duponchelle
d059922f56 avauddec: remove obsolete version check
https://bugzilla.gnome.org/show_bug.cgi?id=792900
2018-07-13 00:53:27 +02:00
Mathieu Duponchelle
e4bf6147a0 av_codec_next (deprecated) -> av_codec_iterate
https://bugzilla.gnome.org/show_bug.cgi?id=792900
2018-07-13 00:53:27 +02:00
Mathieu Duponchelle
37b58e0753 avdemux: port to AVCodecParameters
https://bugzilla.gnome.org/show_bug.cgi?id=792900
2018-07-13 00:53:27 +02:00
Mathieu Duponchelle
4116117873 avmux: port to AVCodecParameters
https://bugzilla.gnome.org/show_bug.cgi?id=792900
2018-07-13 00:53:26 +02:00
Mathieu Duponchelle
4f28ea23eb Remove all uses of AVPicture
https://bugzilla.gnome.org/show_bug.cgi?id=792900
2018-07-13 00:53:26 +02:00
Mathieu Duponchelle
9cc57a74d8 avaudenc: remove obsolete setting of rc_strategy
https://bugzilla.gnome.org/show_bug.cgi?id=792900
2018-07-13 00:53:26 +02:00
Mathieu Duponchelle
1e4529ced2 Refactor avcfg / avvidenc
We were previously installing hardcoded properties for all
video encoders, refactor to instead use FFmpeg's AVOption API.

avvidenc still exposes a few properties related to the pass
mechanism: while the AVOption API allows specifying both passes
as flags at the same time, this is not practical in GStreamer's
context, where passes need to be run separately using a stats file.

https://bugzilla.gnome.org/show_bug.cgi?id=792900
2018-07-13 00:53:26 +02:00
Nicolas Dufresne
d8dfa4657b avviddec: Stop using deperated EDGE API
https://bugzilla.gnome.org/show_bug.cgi?id=792900
2018-07-13 00:53:26 +02:00