Commit graph

25621 commits

Author SHA1 Message Date
Seungha Yang
be8cec5348 h264parse: Add support for inband timecode update
Add new property "update-timecode" to allow updating timecode
in picture timing SEI depending on timecode meta. Since the picture
timing SEI message requires proper VUI setting but we don't support
re-writing SPS, this might not work for some streams
2020-04-08 15:39:12 +00:00
Seungha Yang
fffbec11e4 h264parse: Don't unconditionally append timecode meta
If upstream buffer has its own timecode metatdata, don't append
new timecode meta into the buffer.
2020-04-08 15:39:12 +00:00
Seungha Yang
1a09251699 h264parser: Parse all SEI payload type even if it's not handled by parser
... so that user can handle it from outside of parser API
2020-04-08 15:39:12 +00:00
Seungha Yang
db1ea18276 h264parser: Add support for creating picture timing SEI
This new method can make it possible to inject timecode meta into
h264 bitstream
2020-04-08 15:39:12 +00:00
Seungha Yang
72854261bb tests: h264parser: Fix picture timing SEI
The payloadSize don't need to include rbsp_trailing_bits()
2020-04-08 15:39:12 +00:00
Seungha Yang
28ce6c2a40 h264parser: Make GstH264PicTiming self-containing all the syntax information
... and store all parsed values.

We are storing pic_struct_present_flag although it's not part of
this SEI message but GstH264PicTiming includes it to clarify
following syntax values.
In addition to that, by adding CpbDpbDelaysPresentFlag, we don't need to
refer to VUI anymore.
2020-04-08 15:39:12 +00:00
Seungha Yang
c272dd3462 h264parser: Fix some misleading debug messages 2020-04-08 15:39:12 +00:00
Seungha Yang
5a675080c5 h264parser: Fix mismatched argument of declaration and definition 2020-04-08 15:39:12 +00:00
Michael Olbrich
01628fa847 sdpdemux: don't send EOS for unknown SSRC
The rtpbin sends signals for all SSRCs. Don't send an EOS when the SSRC
does not match the stream SSRC.

This avoids problems when an SSRC from another receiver times out.
2020-04-08 13:24:34 +00:00
Thibault Saunier
b9e0ccd8b7 codecs: Add basic documentation stubs 2020-04-08 08:47:46 -04:00
Nicolas Dufresne
f5da12bcf5 v4l2decoder: Fix file descriptor leak
A copy paste error was leading to file descriptor leak. This was detected by
Coverity.

CID 1461285
2020-04-07 17:10:08 -04:00
Philippe Normand
12ff0a4797 fakevideosink: Allow allocation meta flags fine-tuning
In some scenarios the fakevideosink shouldn't advertize the overlay-composition
meta for instance, so that overlay elements perform subtitles blending
themselves.
2020-04-07 14:40:37 -04:00
Michael Olbrich
468408c6a6 mpegtspacketizer: be more tolerant when parsing the adaptation field
According to the specification, the adaptation field length must be 183 if
there is no payload data and < 183 if the packet contains an adaptation
field and payload data.

Unfortunately some payloaders always set the flag for payload data, even if
the adaptation field length is 183.

Don't return with an error in this case. Clear the payload data flag
instead and parse the adaptation field as usual. This avoids visual
artefacts for such streams.
2020-04-07 08:21:04 +00:00
Nicolas Dufresne
b79c949789 codecs: h264: Fix DPB size calculation
As per specification in A.3.1 h) and A.3.2 f), the maximum size of the DPB is
16. Fix the maximum in the fine and fix the formula to use MIN instead of MAX
so that we no longer always use the maximum for the profile/level.
2020-04-07 07:53:27 +00:00
Haihao Xiang
00baed3ebe msdkvp9dec: add support for VP9 12bit
The output formats are P012_LE for 12bit 420 and Y412_LE for 12bit 444.
2020-04-07 00:39:35 +00:00
worldofpeace
f10b424418 meson: build with neon 0.31
No API/ABI changes https://github.com/notroj/neon/blob/0.31.0/NEWS#L3
2020-04-03 18:50:16 -04:00
Nirbheek Chauhan
387b6df948 meson: Don't use get_option('buildtype')
We should directly check the values of the `debug` and `optimization`
options instead.

`get_option('buildtype')` will return `'custom'` for most combinations
of `-Doptimization` and `-Ddebug`, but those two will always be set
correctly if only `-Dbuildtype` is set. So we should look at those
options directly.

For the two-way mapping between `buildtype` and `optimization`
+ `debug`, see this table:
https://mesonbuild.com/Builtin-options.html#build-type-options
2020-04-03 17:07:47 +05:30
Stéphane Cerveau
1f62fe1cbc kms: add fallback on libdrm project if available. 2020-04-03 10:53:01 +00:00
Haihao Xiang
4cc5321010 msdkh265dec: add support for main-444-12, main-444-12-intra profiles
The video format is Y412_LE
2020-04-03 01:19:45 +00:00
Haihao Xiang
4d756c07b0 msdk: map Y412_LE to VA_FOURCC_Y416
In media driver, VA_FOURCC_Y416 is used for packed 12 bits 4:4:4:4 YUV
format, the corresponding RT format is VA_RT_FORMAT_YUV442_12
2020-04-03 01:19:45 +00:00
Haihao Xiang
55ed9458b5 msdk: map MFX_FOURCC_Y416 to VA_FOURCC_Y416
Y416 is used for packed 12 bits 4:4:4:4 YUV format in media driver, the
RT format is VA_RT_FORMAT_YUV444_12
2020-04-03 01:19:45 +00:00
Haihao Xiang
e769df9689 msdk: map Y412_LE to MFX_FOURCC_Y416
MFX_FOURCC_Y416 is used for packed 12 bits 4:4:4:4 YUV format in
MediaSDK
2020-04-03 01:19:45 +00:00
Haihao Xiang
3de690ceda msdkh265dec: add support for main-422-12, main-422-12-intra profiles
The video format is Y212_LE
2020-04-03 01:19:45 +00:00
Haihao Xiang
01edef09a3 msdk: map Y212_LE to VA_FOURCC_Y216
In media driver, VA_FOURCC_Y216 is used for packed 12 bits 4:2:2 YUV
format, the corresponding RT format is VA_RT_FORMAT_YUV422_12
2020-04-03 01:19:45 +00:00
Haihao Xiang
34177985e2 msdk: map MFX_FOURCC_Y216 to VA_FOURCC_Y216
In media driver, Y216 is used for packed 12 bits 4:2:2 format YUV
format, so the RT format is VA_RT_FORMAT_YUV422_12.
2020-04-03 01:19:45 +00:00
Haihao Xiang
fb200ccfdd msdk: map Y212_LE to MFX_FOURCC_Y216
MFX_FOURCC_Y216 is used for packed 12 bits 422 YUV format in MediaSDK
2020-04-03 01:19:45 +00:00
Seungha Yang
950aa3d1db msdkh265enc: Fix for wrong parser free function 2020-04-03 00:42:23 +09:00
Jan Schmidt
46f994871f adaptivedemux: Handle instant rate change requests directly
Downstream demuxers will first send seek events upstream to us.
Do the right thing with instant rate change requests by handling them
immediately.
2020-04-02 11:26:46 +00:00
Jan Schmidt
1c79b39896 adaptivedemux: Don't ignore gst_segment_do_seek() return result
gst_segment_do_seek() can fail, so don't ignore the return result
2020-04-02 11:26:46 +00:00
Jan Schmidt
b9ebd885ff tsdemux: Send instant-rate-change event if requested in the SEEK event
Convert instant-rate-change seek events into a downstream
instant-rate-change event and skip any further local seek handling.
2020-04-02 11:26:46 +00:00
Seungha Yang
71cf93c361 msdkh264enc: Configure parser and SEI array only if it's required 2020-04-02 09:20:11 +00:00
Seungha Yang
206fe1534d msdkh265enc: Add support for CEA708 closed caption insertion
Functionally identical to that of msdkh264enc
2020-04-02 09:20:11 +00:00
Seungha Yang
ce09ceb106 h265parser: Add a helper method to create SEI nal unit
Add an API to create raw SEI nal unit. This would be useful in case
an user want to create SEI nal data and inject the SEI nal data
into bitstream.
2020-04-02 09:20:11 +00:00
Miguel Paris
45a1070203 srtpdec: reduce log level for replay cases
These are normal cases, so DEBUG level is enough.
2020-04-01 17:45:15 +00:00
Miguel París Díaz
ed71e262b0 srtpdec: do not warning old replay errors
Reordered packets producing decrypting errors are very normal,
so we should filter which errors are warning and which not.
2020-04-01 17:45:15 +00:00
Miguel Paris
075ff1e8b0 srtpdec: fix reseting RTP sequence number on ROC changes
Each srtp_stream_t is tied to an specific SSRC, so a
roc_changed flag should be kept per each SSRC in order to
properly reset RTP sequence number on ROC changes.
2020-04-01 16:49:44 +02:00
Seungha Yang
fc9f7a6ade d3d11: Update for video-hdr struct change
See the change of -base https://gitlab.freedesktop.org/gstreamer/gst-plugins-base/-/merge_requests/594
2020-04-01 05:18:11 +00:00
Seungha Yang
bd706edc52 nvh265enc: Update for video-hdr struct change
See the change of -base https://gitlab.freedesktop.org/gstreamer/gst-plugins-base/-/merge_requests/594
2020-04-01 05:18:11 +00:00
Seungha Yang
770a851e03 x265enc: Update for video-hdr struct change
See the change of -base https://gitlab.freedesktop.org/gstreamer/gst-plugins-base/-/merge_requests/594
2020-04-01 05:18:11 +00:00
Seungha Yang
f05effe024 h264parse,h265parse: Update for video-hdr struct change
See the change of -base https://gitlab.freedesktop.org/gstreamer/gst-plugins-base/-/merge_requests/594
2020-04-01 05:18:11 +00:00
Zeeshan Ali
355719bae7 h265parse: Set duration on buffers base on framerate 2020-03-31 14:13:30 +00:00
Zeeshan Ali
158d69fd45 h265parse: Derive src fps from vui_time_scale & vui_num_units_in_tick 2020-03-31 14:13:30 +00:00
Zeeshan Ali
51bc67d4ef h265parse: Handle interlaced video
For interlaced video:
* set the interlace mode in the src caps
* double the height from SPS in the caps.
* set field latency, instead of frame latency.

Fix #778
2020-03-31 14:13:30 +00:00
Nicolas Dufresne
7b8c071f9c codecs: h264dpb: Don't leak pic_list GArray
The contents was cleared, but the array was never released.
2020-03-31 09:34:05 -04:00
Nicolas Dufresne
4cb871eb53 v4l2codecs: Only build this plugin on Linux
This is not useful on any other OSs, it will also avoid potential build
failure as this code uses Linux specific calls.
2020-03-31 09:34:05 -04:00
Nicolas Dufresne
7254a18f0f v4l2codecs: Add plugin dependency
This ensure that the registry cache get updated when a meaningful change is
made in /dev for files named media*.
2020-03-31 09:34:05 -04:00
Nicolas Dufresne
e70993bf43 v4l2codecs: Wait for buffers to come back
This code add required mechanism to try and allocate (not implemented yet)
otherwise wait for more buffers. This also comes with mechanism to terminate
the wait on flush or PAUSED_TO_READY transitions.
2020-03-31 09:34:05 -04:00
Nicolas Dufresne
09a9ffcda6 v4l2codecs: Implement flushing sequence
This simply consit of cycling through STREAMOFF/STREAMON with stateless
decoders.
2020-03-31 09:34:05 -04:00
Nicolas Dufresne
f69283819a v4l2codecs: allocator: Add method to wait for more buffers
This add function to wait for buffers to get back into the pool along with a
set_flushing() method to allow unblocking this wait.
2020-03-31 09:34:05 -04:00
Nicolas Dufresne
bc0a8ff40d v4l2codecs: pool: Create new buffer when pool is empty
This simply create an empty GstBuffer when the pool is empty. This way it's up
to the allocator to grow or wait if we ran out of memory.
2020-03-31 09:34:05 -04:00