Commit graph

1471 commits

Author SHA1 Message Date
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
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
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
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
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
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
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
Nicolas Dufresne
aa724e2f14 Use AV_ namespace for all CODEC_ macro
The remaining use of CODEC_ are codec flags that has been moved into the
new codec private properties or have been deperated. Will be fixed in
later patches.

https://bugzilla.gnome.org/show_bug.cgi?id=792900
2018-07-13 00:53:26 +02:00
Nicolas Dufresne
7b3e41e20b Use AV_ namespace for INPUT_BUFFER_PADDING_SIZE
https://bugzilla.gnome.org/show_bug.cgi?id=792900
2018-07-13 00:53:26 +02:00
Nicolas Dufresne
2485cc582a Don't include deprecated avfiltergraph.h header
https://bugzilla.gnome.org/show_bug.cgi?id=792900
2018-07-13 00:53:26 +02:00
Roland Jon
43bda46b50 avdemux: fix memory leaks
https://bugzilla.gnome.org/show_bug.cgi?id=796452
2018-06-01 08:14:46 +02:00
Edward Hervey
04b3867cb8 libav: Switch to common include 2018-05-11 14:24:03 +02:00
Edward Hervey
ad66c90ded avmux: Remove unneeded constant variable
Since the removal of the gif hacks, the variable was always set to
its default value of FALSE. Just remove it.

CID #1433656
2018-05-11 14:19:42 +02:00
Edward Hervey
b894bedeb3 avvidec: Expose Closed Caption as GstVideoCaptionMeta 2018-05-07 17:12:07 +02:00
Mathieu Duponchelle
a68dbb9c82 Expose support for DSD
DSD is usually wrapped in DSF, for which we now also expose the
demuxer.

https://bugzilla.gnome.org/show_bug.cgi?id=721186
2018-05-06 12:49:47 +02:00
Matej Knopp
c182d28770 gstavdemux: adjust seeking offset according to start_time
https://bugzilla.gnome.org/show_bug.cgi?id=733094
2018-05-06 10:55:45 +02:00
Edward Hervey
4d69122fb0 av*mux: Disable gif related "hacks"
This is properly handled by the previous commit now
2018-02-12 08:32:01 +01:00
Mathieu Duponchelle
d5b0305241 Enable gif format, and make it so avdemux_gif and avdec_gif can autoplug
https://bugzilla.gnome.org/show_bug.cgi?id=784684
2018-02-12 08:27:53 +01:00
Edward Hervey
79bc255fa2 avvid*: Don't expose V4L2 mem-to-mem decoder and encoders
It's not going to work without special handling. Mask for now.
2018-02-10 15:18:11 +01:00
U. Artie Eoff
7a951369c7 libav: use LIBAV_CPPFLAGS for -I include paths
Autotools automatically appends user CPPFLAGS after target
CPPFLAGS.  Also, it puts all CPPFLAGS before CFLAGS in final
generated gcc compile command.  The internal ffmpeg include
paths need to come before any other external include paths
to ensure we don't accidentally pickup external ffmpeg
headers first (i.e. from user CPPFLAGS include paths).  Thus,
move the internal LIBAV include paths to LIBAV_CPPFLAGS so
that they come before any user defined CPPFLAGS.

This allows ffmpeg and gst-ffmpeg to coexist on users system.

https://bugzilla.gnome.org/show_bug.cgi?id=789379
2018-01-13 12:18:54 +00:00
Ashish Kumar
a323802c5b avprotocol: fix leak in error code paths
https://bugzilla.gnome.org/show_bug.cgi?id=788481
2018-01-13 11:54:25 +00:00
Jan Alexander Steffens (heftig)
a771795005 avdemux: Whitelist the demuxers required for GC/Wii/WiiU ADPCM streams
Required to play .brstm (GameCube/Wii) and .bfstm (Wii U) files. Needs
at least avdec_adpcm_thp too, but that one is already accessible.

https://bugzilla.gnome.org/show_bug.cgi?id=789139
2017-10-19 16:50:38 +02:00
Nicola Murino
f86dfde0a4 avdemux: reset to 0 negative pts
for us pts are unsigned so reset to 0 negative pts returned from libav.
This is better than outputs completly wrong timestamps

https://bugzilla.gnome.org/show_bug.cgi?id=787795
2017-10-05 21:40:55 -04:00
Mathieu Duponchelle
2bb0dc16d6 gstavcodecmap: Do not require a channel-mask
.. for mono or stereo input.

https://bugzilla.gnome.org/show_bug.cgi?id=786401
2017-08-17 14:49:12 +02:00
Sebastian Dröge
5b22802b35 Revert "avviddec: Remove usage of deprecated EDGE APIs"
This reverts commit 4284d791bc.

It causes crashes on various h264 and DNXHD/VC3 streams, where the
decoders write to arbitrary memory far after what we've allocated.
2017-08-10 18:55:29 +03:00
Satya Prakash Gupta
7c304c0c1e libswscale: Memory leak in gst_video_frame_map
https://bugzilla.gnome.org/show_bug.cgi?id=784741
2017-07-17 15:36:49 +03:00
Satya Prakash Gupta
98cf1a7e2d avdemux/mux: Memory leak and possible crash in avio_alloc_context
https://bugzilla.gnome.org/show_bug.cgi?id=784735
2017-07-17 11:09:48 +03:00
Nicolas Dufresne
4284d791bc avviddec: Remove usage of deprecated EDGE APIs
As a side effect, left/right green bars goes away when using
xvimagesink. I just think that xv cropping is broken, so this is
probably just hiding a bug.
2017-07-11 09:37:03 -04:00
Sebastian Dröge
3ad6c9958b avmux: Blacklist scc muxer
We have no codec mappings for it and it's a subtitle/closed caption
"muxer" anyway.
2017-07-10 10:33:33 +03:00
Tim-Philipp Müller
89d9b7fa99 meson: add options to set package name and origin
https://bugzilla.gnome.org/show_bug.cgi?id=782172
2017-05-20 15:18:55 +01:00
Nicolas Dufresne
7b0a5ad309 plugin: Explicitly link to BZ2, LZMA and LZ
While all this information is in the .la files, libtool seems to get
confused with ordering in presence of static system libraries. This could
cause missing symbol error at link time. Adding these depenencies explicitly
workaround the issue.
2017-05-20 15:27:52 +02:00
Nicolas Dufresne
a65562fe9c Remove plugin specific static build option
Static and dynamic plugins now have the same interface. The standard
--enable-static/--enable-shared toggle are sufficient.
2017-05-16 14:43:11 -04:00
Sebastian Dröge
15a17f3f8d avviddec: Don't expose NVIDIA CUVID decoder
It's not working without further changes on our side, like all hardware
decoders in ffmpeg.
2017-05-16 18:55:36 +03:00
Nicolas Dufresne
1038ae2327 Generate .la for internal libav libraries
This should help libtool in getting the internal linking right.
Effectively, libtool can sometime get the link order wrong when
presented with a mix of .la and -l arguments. These .la file are
also required by the android build system and were previously
created by cerbero.
2017-05-12 12:34:09 -04:00
Nicolas Dufresne
de60c46e30 Use automake to install dependency libraries
The install line was using -t parameter which is not supported on OSX.
Instead, use automake DATA installation mechanism, this way we rely on
automake to generate portable scripts.
2017-05-11 13:31:50 -04:00
Nicolas Dufresne
0b48f0e3fd Use a portable method to link against internal FFMPEG
In the last iteration, we kept the original method to link the shared
plugin and edited the .a and .la files so satisfy what cerbero needed.
Unfortunately, that required adding .a file into the archive which is
not allowed with iOS ar command for universal builds.

This patch uses standard method to link a static library. One of the
benefit is that it removes some libtool warning about portability.
For the static case, we implement an install hook that installs
FFMPEG internal .a files in the plugin directory (so it does not get
confused with a possible system FFMPEG. This makes the static plugin
usable without depending on cerbero recipe.
2017-05-11 10:08:14 -04:00
Nicolas Dufresne
46691bd0ec static: Update libgstlibav.lai too
Libtool will produce libgstlibav.la and libgstlibav.lai (the installed
version). We need to edit at least the installed version for the final
linking of static application to work.
2017-05-10 12:10:54 -04:00
Nicolas Dufresne
a7d6eb2afa Simplify and fix the static linking
Some libtool will endup removing the shared build when running a static
build. That had unwanted side effect. Rather then fighting libtool to
get to build each static and shared seperatly, let libtool build with
the LIBAV_DEPS added to LIBADD (list of libav*.a) and finally remove the
extra .a from the archive and fix the .la to what cerbero will expect.
2017-05-10 10:03:45 -04:00
Nicolas Dufresne
dcc36f6e0a libav: Allow build both static dynamic plugins
When building plugins with internal FFMPEG, we use different link
flags depending if it is static or shared. As we want to build both
static and dynamic plugins at once, rewrite the rules so we can
pass the right flags.

https://bugzilla.gnome.org/show_bug.cgi?id=779344
2017-05-09 08:49:17 -04:00
Sebastian Dröge
32addd9757 avaudenc/dec: Blacklist more PCM decoders/encoders 2017-04-13 15:23:45 +03:00
Arun Raghavan
a3b7aebf6b avvidenc: Fix compiler errors in the previous commit
The declaration of 'const char *klass' was shadowing a function
argument.
2017-03-22 12:55:40 +05:30
Arun Raghavan
2e25f166fc avvidenc: Classify image encoders with "Image" instead of "Video"
This allows gst_video_convert_sample*() to work with codecs for which we
have libav encoders (such as BMP).

https://bugzilla.gnome.org/show_bug.cgi?id=780317
2017-03-21 09:49:45 +05:30
Sebastian Dröge
fecf973bc9 avcodecmap: Add mappings for I420/I422/Y444_12LE/BE and GBRA
https://bugzilla.gnome.org/show_bug.cgi?id=780100
2017-03-16 17:22:51 +02:00
Emeric Grange
d666041a51 avcodecmap: Add GBR_12LE/BE and GBRA_12LE/BE pixel format mapping for CineForm decoder 2017-03-16 16:10:23 +02:00
Jan Schmidt
bcbe3aff83 avvidenc: Add Stereo3D mapping
Add mapping between GStreamer multiview modes/flags and
libav Stereo3D frame packings when encoding video.

https://bugzilla.gnome.org/show_bug.cgi?id=767938
2017-03-16 15:23:01 +11:00
Jan Schmidt
8e6fbe7f63 avviddec: Map any stereo3D info to multiview modes
Map any libav Stereo3D side data to GStreamer multiview
mode / flags for playback.

https://bugzilla.gnome.org/show_bug.cgi?id=767938
2017-03-16 15:23:01 +11:00
Sebastian Dröge
887e45e6cc avcodecmap: Add mapping for CineForm HD / CFHD codec
https://bugzilla.gnome.org/show_bug.cgi?id=780024
2017-03-14 18:02:23 +02:00
Garima Gaur
14dc964f0e Fix some caps leaks when creating pad templates
https://bugzilla.gnome.org/show_bug.cgi?id=776700
2017-01-02 12:41:20 +00:00
Sebastian Dröge
cfd7503959 avcodecmap: Add mapping for Flash Screen2 codec 2016-12-04 23:39:00 +02:00
Sebastian Dröge
35f9fd9355 avdemux: Disable GIF "demuxer"
It's actually a parser but it a) can only work with the ffmpeg GIF
decoder that is deactivated anyway, and b) it currently causes infinite
linking of avdemux_gif elements with a multiqueue in between in
decodebin.

https://bugzilla.gnome.org/show_bug.cgi?id=775516
2016-12-02 17:06:50 +02:00
Sebastian Dröge
77ad28cd44 avprotocol: Don't use GST_LOG_OBJECT() and friends on an arbitrary struct that is not a GObject
https://bugzilla.gnome.org/show_bug.cgi?id=775516
2016-12-02 14:19:46 +02:00
Thibault Saunier
2ae66e2721 Define plugin license outside the call to PLUGIN_DEFINE
Msvc fails at pre processing it and states that the
the use of "#" is invalid inside a macro.
2016-11-25 13:22:34 -03:00
Thibault Saunier
863f2c7bb1 Properly check if unistd.h is avalaible
And stop providing a meson.h.config as it is not needed (as meson dep
has been bumped to 0.36)
2016-11-25 13:22:34 -03:00
Edward Hervey
9258b8ba53 avcodecmap: Add support for packed 32bit RGBx variants
We can support those, so just add the mapping
2016-11-24 17:15:14 +01:00
Sebastian Dröge
ac4a47bacb av: Enable IVF demuxer (and muxer)
It works and is a quite unimportant format, we should get rid of our
parser to reduce the amount of code to maintain.
2016-11-16 17:06:54 +02:00
Marinus Schraal
06a9a34d6d avdemux: Map artist to artist tag
It was incorrectly mapped to album-artist before.

https://bugzilla.gnome.org/show_bug.cgi?id=774398
2016-11-14 13:03:07 +02:00
Tim-Philipp Müller
b81813d928 avmux: blacklist fifo plugin
Avoids criticals in gst-inspect-1.0 -a
2016-11-12 15:21:59 +00:00
leigh123linux@googlemail.com
3c3be3125f avvidenc/dec: Disable more hardware encoder/decoders
Important when using a system ffmpeg/libav.

https://bugzilla.gnome.org/show_bug.cgi?id=774278
2016-11-12 10:33:51 +02:00
Sebastian Dröge
88da0fb956 avviddec: Fix comment to say interlace-mode instead of interlaced-mode 2016-11-04 16:27:59 +02:00
Sebastian Dröge
2c38c99a86 avcodecmap: It's interlace-mode, not interlaced-mode 2016-11-04 16:22:07 +02:00
Sebastian Dröge
7f39f69c7c avcodecmap: Add variant to the ProRes caps
https://bugzilla.gnome.org/show_bug.cgi?id=769048
2016-11-01 20:42:52 +02:00
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