Commit graph

25458 commits

Author SHA1 Message Date
Seungha Yang
2e5fee17a3 msdkbufferpool: Fix build warning on Windows
gstmsdkbufferpool.c(274): warning C4101: 'fd': unreferenced local variable
2020-03-22 22:30:15 +09:00
Guillermo Rodríguez
21a56b396c examples/wayland: unref GstContext after use 2020-03-20 17:30:22 +11:00
U. Artie Eoff
09d41b0b7d msdkvpp: add YV12 format to src pad
VPP YV12 output format support added since
MFX_VERSION 1032.

https://github.com/Intel-Media-SDK/MediaSDK/pull/2027
2020-03-19 09:31:59 -07:00
Seungha Yang
22eab50907 nvdec: Add fallback for CUDA/OpenGL interop failure
It happens when local OpenGL context belongs to non-nvidia GPU.
2020-03-19 13:58:09 +09:00
Victor Manuel Jaquez Leal
efcabce98e libs: codecparser: add missing unstable api warning
mpeg4 and vp8 parsers didn't show that compilation warning as the
others parsers.
2020-03-16 18:07:54 +01:00
Philippe Normand
158a2b3fd1 webrtcdsp: Fix documentation markup 2020-03-15 12:44:31 +00:00
Philippe Normand
b36e36f74a openni2: Remove spurious gtk-doc markers 2020-03-15 10:47:02 +00:00
Philippe Normand
273e32d5aa decklink: Remove spurious gtk-doc marker 2020-03-15 10:46:54 +00:00
Philippe Normand
97355cdd41 docs: Scan C++ files too 2020-03-13 17:47:46 +00:00
Haihao Xiang
c02f603262 msdk: meson: check whether mfxExtVP9Param is defined
User reported MFX_VERSION is 1026 however the build is broken[1], so add
the check for mfxExtVP9Param to make sure it can be build without
compiler error.

In addtion, it fixes a stupid typo (#endif') introduced by me.

[1] https://gitlab.freedesktop.org/gstreamer/gst-plugins-bad/merge_requests/988#note_408093
2020-03-13 01:29:04 +00:00
rubenrua
6c3f092afc asfmux: Fix typo in property description
s/milisecs/milliseconds/g
2020-03-12 18:38:11 +01:00
Thibault Saunier
fb888dada1 timecodestamper: Plug a leak 2020-03-11 21:38:13 -03:00
Edward Hervey
fa2916a159 mpegts: Add a property to ignore broken PCR streams
Some mpeg-ts (HLS, DVB, ...) streams out there have completely broken
PCR streams on which we can't reliably recover correct timestamps.

For those, provide a property that will ignore the program PCR stream
(by faking that it's not present (0x1fff)).
2020-03-11 16:28:03 +00:00
Seungha Yang
8e45fd27d1 mpegdemux: Add ignore-scr property to ignore broken SCR
Some MPEG-PS streams might not be compliant but the SCR can be ignored
if PTS/DTS in PES header is consistently increased.
2020-03-11 21:06:20 +09:00
Seungha Yang
f6328cec89 mpegdemux: Remove whitespace 2020-03-11 17:42:18 +09:00
yychao
cb0e4bffea smoothstreaming: fix H264 CodecPrivateData parsing
Do not pass SPS nal_unit_type (0x67) into gst_h264_parse_sps()

Fixes #648
2020-03-10 12:55:05 +00:00
Seungha Yang
4b06b1a56e h265parse: In-band sps/pps update if only codec_data differs in src caps
Apply in-band sps/pps resending implementation to h265parse.
2020-03-10 08:51:04 +00:00
Seungha Yang
82a7d1cd99 h264parse: In-band sps/pps update if only codec_data differs in src caps
Initially the case "only codec_data is different" was addressed in
https://bugzilla.gnome.org/show_bug.cgi?id=705333 in order for
unusual bitstreams to be handled. That's the case where sps and pps
are placed in bitstream. When sps/pps are signalled only via caps
by upstream, however, the updated codec_data is mandatory for decoder
and therefore we shouldn't ignore them.
2020-03-10 08:51:04 +00:00
Dong Il Park
691b066ec6 tsdemux: Add format_identifier for AC4 codec
According to following spec document, add format_identifier for AC4 in tsdemux.

ETSI TS 103 190-2 V1.2.1 : Annex D : AC-4 in MPEG-2 transport stream
2020-03-10 16:32:59 +09:00
yychao
adc3d12741 tsdemux: Add support for AC4
According to following two specs, add support for AC4 in tsdemux.

1. ETSI TS 103 190-2 V1.2.1 (2018-02) : Annex D (normative): AC-4 in MPEG-2 transport streams
2. ETSI EN 300 468 V1.16.1 (2019-08) : Annex D (normative):Service information implementation of AC-3, EnhancedAC-3, and AC-4 audio in DVB systems
2020-03-09 21:54:09 +00:00
Sebastian Dröge
5a2053e0af webrtcbin: Use GPtrArrays or store items inline instead of using GArrays of pointers 2020-03-09 21:38:42 +02:00
Jan Schmidt
8274fcd311 webrtcbin: Prevent ICE gathering state reaching complete early
The ICE gathering state can transition to complete prematurely if the
underlying ICE components complete their gathering while the initial
ICE gathering state task is queued and still pending.

In that situation, the ice gathering state task will report complete
while there are still ICE candidates queued for emission.

Prevent that by storing ICE candidates in an array and checking if
there are any pending before reporting a completed ICE gathering
state.
2020-03-10 05:47:40 +11:00
Jan Schmidt
9410ef56b8 webrtc: Protect the pending ICE candidates array
ICE candidates can be added to the array directly from the application
or from the webrtc main loop. Rename it to make it clear that it's
holding remote ICE candidates from the peer, and protect it with a
new mutex
2020-03-10 05:25:40 +11:00
Seungha Yang
58a4c33a0e d3d11vp9dec: Add support for internal frame resizing
VP9 codec allows resizing reference frame by spec. Handling this case
is a bit tricky especially when the resizing happens on non-keyframe,
because pre-allocated decoder textures (i.e., dpb) have negotiated
resolution and to change resolution meanwhile decoding on non-keyframe,
each texture might need to be re-created, copied to new dpb somehow,
and re-negotiated with downstream.

Due to the complicated requirement of negotiation driven
resizing handling, this commit adds shader into d3d11decoder object
to resize only corresponding frames. Note that if the resolution change
is detected on keyframe, decoder will re-negotiate with downstream.
2020-03-09 23:44:12 +09:00
Seungha Yang
c10b5f06a5 d3d11decoder: Set GstVideoAlignment to downstream d3d11 buffer pool
To copy decoder output texture to another d3d11 texture, the downstream
texture needs to be aligned too.
2020-03-09 23:44:12 +09:00
Seungha Yang
5c51601cdf d3d11decoder: Use aligned resolution for staging texture
Not only any textures for decoder output view, any destination texture
which would be copied from decoder output texture need to be aligned too.
Otherwise driver sometimes crashed/hung (not sure why).
2020-03-09 23:44:12 +09:00
Seungha Yang
5074cecc82 d3d11colorconverter: Add support cropping
Vertex buffer will be updated if input texture resolution is different
from GstVideoInfo or when an user requests specific crop area.
2020-03-09 23:44:06 +09:00
Seungha Yang
c6c83ca493 d3d11bufferpool: Add padding space for semi-planar YUV formats
Resolution of NV12, P010, and P016 formats must be multiple of two.
Otherwise texture cannot be created. Instead of doing this alignment
per API consumer side, do this in buffer pool for simplicity.
2020-03-09 10:14:53 +09:00
Seungha Yang
5609d8751c h265decoder: Pass max_dpb_size to new_sequence vfunc
same as we are doing in h264decoder
2020-03-08 16:11:35 +09:00
Seungha Yang
b70a192220 d3d11h264dec: Make use of max_dpb_size passed by baseclass
Most likely this modification can save GPU memory.
2020-03-08 16:03:35 +09:00
Seungha Yang
7c153b6e93 d3d11h265dec: Fix scaling list parsing
Scaling list can be signalled via sps or pps. Decoder should check
both of them.
2020-03-07 12:57:38 +09:00
Seungha Yang
cfb6283613 d3d11h265dec: Properly signal the ucNumDeltaPocsOfRefRpsIdx
ucNumDeltaPocsOfRefRpsIdx should be the NumDeltaPocs[RefRpsIdx].
2020-03-07 12:20:03 +09:00
Seungha Yang
353013fcaa h265parser: Store NumDeltaPocs of reference for hardware accelerators
That's the value of NumDeltaPocs[RefRpsIdx] and we might be able to derive
the value from given sps and slice header.
Because well known hardware implementations refer to the value, however,
storing the value makes things easier.

Following is the list of hardware implementations
* DXVA2: ucNumDeltaPocsOfRefRpsIdx
* NVDEC/VDPAU: NumDeltaPocsOfRefRpsIdx
2020-03-07 12:20:03 +09:00
Seungha Yang
ba3430a059 h265decoder: Fix for output and removal picture from DPB
See C.5.2.2 Output and removal of pictures from the DPB.

If the number of pictures in the DPB is greater than or equal to
sps_max_dec_pic_buffering_minus1[HighestTid] + 1, then the picture
should be outputted.
2020-03-07 12:20:03 +09:00
Seungha Yang
8b0d5e1272 meson: codecs: Don't install header
This library is not intended to be public. APIs are likely to
change over time and should not be disclosed to people yet.
2020-03-06 16:44:01 +09:00
Seungha Yang
fdf06fa363 h264decoder: Rename some internals
No more a part of d3d11 implementation
2020-03-05 15:27:42 +00:00
Seungha Yang
f487648b03 vp9decoder: Update document
s/GstH264Picture/GstVp9Picture/g and minor update since this baseclass
is no more d3d11 specific one.
2020-03-05 15:27:42 +00:00
Seungha Yang
82f1d5e8be codecs: Change output_picture() to mandatory implementation
GstVideoCodecFrame is expected to be consumed by subclass
per output_picture(). So the implementation cannot be optional.
2020-03-05 15:27:42 +00:00
Seungha Yang
83b056cb77 h265decoder: Port to nal type classification macro
... and remove namespaceless macro methods from baseclass
2020-03-05 23:22:39 +09:00
Seungha Yang
959320264a h265parser: Add helper macro for nal type classification
Add some macros to remove code duplication and to make it more readable
2020-03-05 23:22:34 +09:00
Thibault Saunier
924006279a transcodebin: Avoid elements name duplication
By just letting GStreamer choose a good name
2020-03-05 09:17:49 -03:00
Nicolas Dufresne
020ee62c59 d3d11: Use gst_video_decoder_get_frame()
Now that the system_frame_number is saved on the pictures we can use
gst_video_decoder_get_frame() helper instead of getting the full list
and looping over it.
2020-03-05 03:06:16 +00:00
Nicolas Dufresne
56c3b40c30 h264picture: Add system_frame_num
This allow cross-referencing GstH264Picture and GstVideoCodecFrame.
2020-03-05 03:06:16 +00:00
Nicolas Dufresne
2b9ffa8f54 h264parser: Add some fixmes
Some of the syntax element do not use the spec name, which makes them harder
to find in the spec.
2020-03-05 03:06:16 +00:00
Nicolas Dufresne
c6b8157dd6 codecs: Pass the max_dpb_size to new_segment virtual
On new_segment, the decoder is expected to negotiate. The decoder may want to
pre-allocate the needed buffers. Pass the max_dpb_size as this is needed to
determin how many buffers should be allocated.
2020-03-05 03:06:16 +00:00
Nicolas Dufresne
f3f60f5a4c codecs: Add missing auto cleanup funcs 2020-03-05 03:06:16 +00:00
Nicolas Dufresne
00d04784d3 Move CODEC base classes into it's own library
This introduce a library which contains a set of base classes which
handles the parsing and the state tracking for the purpose of decoding
different CODECs. Currently H264, H265 and VP9 are supported. These
bases classes are used to decode with low level decoding API like DXVA,
NVDEC, VDPAU, VAAPI and V4L2 State Less decoders. The new library is
named gstreamer-codecs-1.0 / libgstcodecs.
2020-03-05 03:06:16 +00:00
Jan Schmidt
ad53de1da1 webrtc: Don't crash in ICE gathering
Fix a crash collating ICE gathering states if there are
unassociated transceivers in the list with no TransportStream
2020-03-04 23:06:52 +00:00
Guillaume Desmottes
469d2cac2f transcodebin: add converters before filters
User doesn't have any guarantee about the actual raw format decodebin will
produce so their filters may or may not fit.

Fix #1228
2020-03-04 14:15:34 +00:00
Guillaume Desmottes
667eadac92 transcodebin: fix logs when failing to link filter
- Display caps of the pad we actually tried to link.
- Use the template caps as the filter is likely to not have any caps set
  yet.
- Log pad name as well.
2020-03-04 14:15:34 +00:00