platform/upstream/gstreamer.git
23 months agoadaptivedemux2: Refactor stream methods into the stream
Jan Schmidt [Sat, 20 Aug 2022 18:31:53 +0000 (04:31 +1000)]
adaptivedemux2: Refactor stream methods into the stream

Unlike the legacy elements, GstAdaptiveDemuxStream is a GObject now,
so a bunch of things that were actually stream methods on the
parent demux object can directly become stream methods now.

Move the stream class out to a header of its own.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/3314>

23 months agohlsdemux2/m3u8: Implement EXT-X-GAP parsing
Jan Schmidt [Tue, 7 Jun 2022 04:36:24 +0000 (14:36 +1000)]
hlsdemux2/m3u8: Implement EXT-X-GAP parsing

Read the EXT-X-GAP tag and set is_gap on the segment.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/3314>

23 months agohlsdemux2/m3u8: Refactor parsing for readability
Jan Schmidt [Tue, 7 Jun 2022 04:13:39 +0000 (14:13 +1000)]
hlsdemux2/m3u8: Refactor parsing for readability

Small readability improvements in the parsing code

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/3314>

23 months agoadaptivedemux2/downloadhelper: Remove return val for download_request_add_buffer()
Jan Schmidt [Thu, 13 Oct 2022 19:21:41 +0000 (06:21 +1100)]
adaptivedemux2/downloadhelper: Remove return val for download_request_add_buffer()

The function can't actually fail, and the only caller
was ignoring the result anyway, so remove the return value.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/3314>

23 months agoadaptivedemux2/downloadhelper: Add debug output of response headers
Jan Schmidt [Thu, 13 Oct 2022 19:20:06 +0000 (06:20 +1100)]
adaptivedemux2/downloadhelper: Add debug output of response headers

Dump the HTTP response headers at TRACE level

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/3314>

23 months agoadaptivedemux2/downloadhelper: Don't mark transfer as complete/error if cancelled.
Jan Schmidt [Thu, 13 Oct 2022 19:19:11 +0000 (06:19 +1100)]
adaptivedemux2/downloadhelper: Don't mark transfer as complete/error if cancelled.

If the state of the download request was reset to UNSENT,
it was cancelled. Don't update the state to COMPLETE or ERRORED
in on_read_ready().

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/3314>

23 months agoadaptivedemux2/downloadhelper: Ignore spurious read failure
Jan Schmidt [Thu, 13 Oct 2022 19:17:00 +0000 (06:17 +1100)]
adaptivedemux2/downloadhelper: Ignore spurious read failure

Sometimes g_input_stream_read_all_finish() can return
0 bytes, but still succeed (return TRUE) and have more
data available later. Only finish the transfer
if it returns 0 bytes *and* FALSE with no error.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/3314>

23 months agoadaptivedemux2/downloadhelper: Fix function name
Jan Schmidt [Thu, 13 Oct 2022 19:15:45 +0000 (06:15 +1100)]
adaptivedemux2/downloadhelper: Fix function name

Fix a typo in the name of function download_request_despatch_progress()

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/3314>

23 months agoadaptivedemux2: Remove scheduler_lock mutex
Jan Schmidt [Tue, 11 Oct 2022 15:14:32 +0000 (02:14 +1100)]
adaptivedemux2: Remove scheduler_lock mutex

Remove the old unused scheduler_lock

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/3314>

23 months agoadaptivedemux2: Hold tracks lock accessing input_period
Jan Schmidt [Mon, 10 Oct 2022 16:20:11 +0000 (03:20 +1100)]
adaptivedemux2: Hold tracks lock accessing input_period

The input_period is protected by the TRACKS_LOCK,
so make sure to hold that when accessing it.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/3314>

23 months agoadaptivedemux2: Add state checks and clean up obsolete variables
Jan Schmidt [Tue, 16 Aug 2022 13:01:46 +0000 (23:01 +1000)]
adaptivedemux2: Add state checks and clean up obsolete variables

The cancelled flag was only set in the stream finalize()
method, after all activity on the stream has stopped anyway.
Replace uses of cancelled with checks on the stream state.

Remove the replaced flag, which was checked but never set
to TRUE anywhere any more.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/3314>

23 months agogstpad: Fix non-serialized sticky event push
Edward Hervey [Mon, 24 Oct 2022 10:13:14 +0000 (12:13 +0200)]
gstpad: Fix non-serialized sticky event push

With non-serialized sticky events, such as GST_EVENT_INSTANT_RATE, we both want
to store the event (for later re-linking) *AND* push the event in a non-blocking
way.

We therefore must *not* propagate pending sticky events if the event is "sticky
or serialized" but only if it's "serialized"

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/3254>

23 months agosrt: Remove callers for which srt_bstats fails
Jan Alexander Steffens (heftig) [Wed, 27 Jul 2022 13:59:35 +0000 (15:59 +0200)]
srt: Remove callers for which srt_bstats fails

This keeps them from accumulating in the element and in the stats while
the sink is not being fed, as long as we at least periodically grab
stats.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/3156>

23 months agosrt: Use simpler list operations for callers
Jan Alexander Steffens (heftig) [Fri, 29 Jul 2022 09:53:18 +0000 (11:53 +0200)]
srt: Use simpler list operations for callers

Avoid `g_list_append` and `g_list_remove` (which have to scan the list)
and replace them with `g_list_prepend` and `g_list_delete_link`.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/3156>

23 months agosrt: Clean up poll/sock lifecycle
Jan Alexander Steffens (heftig) [Tue, 10 Nov 2020 09:06:37 +0000 (10:06 +0100)]
srt: Clean up poll/sock lifecycle

Make sure `srtobject->poll_id` is never invalid as long as `srtobject`
exists. Only remove our caller socket from it when the socket becomes
invalid.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/3156>

23 months agosrt: Clean up error handling
Jan Alexander Steffens (heftig) [Wed, 8 Jun 2022 14:35:54 +0000 (16:35 +0200)]
srt: Clean up error handling

- Make the srt_epoll_wait loops more uniform.

- Error only via GError when possible; let the element send the error
  message. Avoids a second error message.

- Return 0 when cancelled. Avoids an error message from the element.

- Don't send an error message from send_headers when we're a server
  sink.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/3156>

23 months agosrt: Simplify socket stats
Jan Alexander Steffens (heftig) [Tue, 11 Oct 2022 09:14:59 +0000 (11:14 +0200)]
srt: Simplify socket stats

Don't hide stats depending on whether we're a sending or receiving
socket. While we're here, add some more debug logs.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/3156>

23 months agosrt: Replace stats accumulation with naive byte counting
Jan Alexander Steffens (heftig) [Mon, 5 Oct 2020 17:50:13 +0000 (19:50 +0200)]
srt: Replace stats accumulation with naive byte counting

srt_bstats cannot be used to get the stats of closed connections, so the
best we can do is keep the running count ourselves.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/3156>

23 months agodirectshow: Validate enumerated AM_MEDIA_TYPE struct
Seungha Yang [Fri, 4 Nov 2022 09:32:05 +0000 (18:32 +0900)]
directshow: Validate enumerated AM_MEDIA_TYPE struct

The video info struct can be null if format is undefined

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/3323>

23 months agovpx: Complete high bitdepth vp9 en/decoding support
Seungha Yang [Sun, 30 Oct 2022 11:28:25 +0000 (20:28 +0900)]
vpx: Complete high bitdepth vp9 en/decoding support

Adding 12bits variant formats to en/decoder, and high bitdepth
4:4:4 (except for GBR) encoding support

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/3298>

23 months agovpx: Define formats for compatibility
Seungha Yang [Sun, 30 Oct 2022 11:03:10 +0000 (20:03 +0900)]
vpx: Define formats for compatibility

ifdef for enum values never work. Instead, define new enum type
and use it

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/3298>

23 months agoexamples: d3d11: Fix GCC build error/warning
Seungha Yang [Thu, 3 Nov 2022 14:40:00 +0000 (23:40 +0900)]
examples: d3d11: Fix GCC build error/warning

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/3318>

23 months agoqsvjpegenc: Add support for YUY2 format
Seungha Yang [Wed, 2 Nov 2022 20:18:03 +0000 (05:18 +0900)]
qsvjpegenc: Add support for YUY2 format

Now GstD3D11 defines YUY2 format

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/3316>

23 months agoqsv: Add JPEG decoder
Seungha Yang [Wed, 2 Nov 2022 20:12:31 +0000 (05:12 +0900)]
qsv: Add JPEG decoder

Because DXVA does not define JPEG decoding, we need this
vendor specific API for Windows

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/3316>

23 months agod3d11: Add support for YUY2 format
Seungha Yang [Wed, 2 Nov 2022 18:38:33 +0000 (03:38 +0900)]
d3d11: Add support for YUY2 format

YUY2 is a primary YUV 4:2:2 format for DXVA.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/3316>

23 months agodoc: avviddec: Update plugin cache
Nicolas Dufresne [Wed, 2 Nov 2022 15:09:17 +0000 (11:09 -0400)]
doc: avviddec: Update plugin cache

This is to add std-compliance property and GstFFMpegVidDec base class.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/3311>

23 months agoavviddec: Introduce a class for shared properties
Nicolas Dufresne [Tue, 1 Nov 2022 15:13:23 +0000 (11:13 -0400)]
avviddec: Introduce a class for shared properties

Without a parent class,the documentation would need to be duplicated for
every CODECs. This patch adds an abstract class in between GstVideoDecoder
and the element.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/3311>

23 months agoavviddec: Expose std-compliance option
Seungha Yang [Tue, 1 Nov 2022 13:35:11 +0000 (09:35 -0400)]
avviddec: Expose std-compliance option

Default compliance mode (i.e., FF_COMPLIANCE_NORMAL) might not
strictly follow specification. This property will allow user
to specifiy expected compliance mode.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/3311>

2 years agoparse: do delayed set only if the target child was not found and fail otherwise
Michael Gruner [Thu, 18 Aug 2022 04:34:35 +0000 (22:34 -0600)]
parse: do delayed set only if the target child was not found and fail otherwise

When using the child proxy notation (child::property=value) it may
happen that the target child does not exist at the time of parsing
(i.e: decodebin creates the encoder according to the contents of the
stream). On this cases, we want to delay the setting of the property
to later, when new elements are added. Previous logic performed a
delayed set even if the target child was found but the property
was not found in it. This should be treated as a failure because,
unlike missing elements, properties should not appear dynamically.
By not failing, typos in property names may go unnoticed to the end
user.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/2908>

2 years agochildproxy: Implement a new ::get_child_by_name_recurse() API
Michael Gruner [Tue, 18 Oct 2022 16:15:12 +0000 (18:15 +0200)]
childproxy: Implement a new ::get_child_by_name_recurse() API

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/2908>

2 years agomsdkcontext: use gst_object_unref instead of g_object_unref
Tong Wu [Tue, 1 Nov 2022 01:47:38 +0000 (09:47 +0800)]
msdkcontext: use gst_object_unref instead of g_object_unref

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/3301>

2 years agomsdkcontext: use gst_object_ref for GstVaDisplay
Tong Wu [Mon, 31 Oct 2022 08:59:18 +0000 (16:59 +0800)]
msdkcontext: use gst_object_ref for GstVaDisplay

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/3301>

2 years agomsdkcontext: g_object_new() must not return nullptr
Tong Wu [Mon, 31 Oct 2022 08:56:32 +0000 (16:56 +0800)]
msdkcontext: g_object_new() must not return nullptr

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/3301>

2 years agomsdkenc: use GST_CAPS_FEATURE_MEMORY_VA to check the feature
Tong Wu [Mon, 31 Oct 2022 08:52:23 +0000 (16:52 +0800)]
msdkenc: use GST_CAPS_FEATURE_MEMORY_VA to check the feature

Add macros to protect sinkpad_is_va(), since it is not defined on
Windows.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/3301>

2 years agowpe: fix wpevideosrc gst-play example
Guillaume Desmottes [Tue, 1 Nov 2022 11:03:24 +0000 (12:03 +0100)]
wpe: fix wpevideosrc gst-play example

wpe:// no longer works since 1.20, see wpesrc examples.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/3306>

2 years agovah264enc: Added option to insert CEA-708 closed captions
Eric Knapp [Thu, 27 Oct 2022 14:03:34 +0000 (10:03 -0400)]
vah264enc: Added option to insert CEA-708 closed captions

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/2910>

2 years agoqsv: Check 16K resolution support
Seungha Yang [Tue, 1 Nov 2022 13:19:18 +0000 (22:19 +0900)]
qsv: Check 16K resolution support

... and remove duplicated code

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/3310>

2 years agovulkan: Mark gst_vulkan_image_view_new create_info as constant pointer
Marijn Suijten [Fri, 14 May 2021 08:24:05 +0000 (10:24 +0200)]
vulkan: Mark gst_vulkan_image_view_new create_info as constant pointer

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/1615>

2 years agovulkan: Remove unnecessary null checks
Marijn Suijten [Tue, 5 Jan 2021 21:33:12 +0000 (22:33 +0100)]
vulkan: Remove unnecessary null checks

These null checkes are slightly misleading when double-checking
mutability for external language interop.  None of the functions in
these files allow the variable at hand to become `NULL` under normal
operation, because they are checked at initialization and never (allowed
to be) reassigned to `NULL`.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/1615>

2 years agovulkan: Add missing `(nullable)` annotation to `Returns`
Marijn Suijten [Mon, 4 Jan 2021 00:07:04 +0000 (01:07 +0100)]
vulkan: Add missing `(nullable)` annotation to `Returns`

Most of these functions already state they might return `%NULL`, but
this is not picked up by G-IR.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/1615>

2 years agovulkan: Add missing `array length` and `(out)` annotation to parameters
Marijn Suijten [Sun, 3 Jan 2021 23:40:24 +0000 (00:40 +0100)]
vulkan: Add missing `array length` and `(out)` annotation to parameters

Add `array length` annotation for `layouts` such that `n_layouts` is
properly marked as its length, and add `(out)` where a function returns
in that parameter.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/1615>

2 years agohlsdemux2: m3u8: Use PDT to offset stream time when aligning playlist
Jan Schmidt [Thu, 27 Oct 2022 12:57:58 +0000 (23:57 +1100)]
hlsdemux2: m3u8: Use PDT to offset stream time when aligning playlist

When matching segments across playlists with Program-Date-Times,
use the difference in segment PDTs to adjust the stream time
that's being transferred. This can fix cases where the
segment boundaries don't align across different streams
and the first download gets thrown away once the PTS
is seen and found not to match.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/3309>

2 years agohlsdemux2: Download new header when it changes
Jan Schmidt [Mon, 31 Oct 2022 15:17:46 +0000 (02:17 +1100)]
hlsdemux2: Download new header when it changes

Check whether the init file / MAP data for a segment
is different to the current data and trigger an
update if so. Previously, the header would only
be checked in HLS after switching bitrate or
after a seek / first download.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/3307>

2 years agom3u8: Expose GstM3U8InitFile methods
Jan Schmidt [Mon, 31 Oct 2022 14:41:35 +0000 (01:41 +1100)]
m3u8: Expose GstM3U8InitFile methods

Exposure ref/unref methods for the GstM3U8InitFile type,
and add a gst_m3u8_init_file_equal() comparison method.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/3307>

2 years agosubprojects: orc: bump to 0.4.33
Tim-Philipp Müller [Mon, 31 Oct 2022 17:05:01 +0000 (17:05 +0000)]
subprojects: orc: bump to 0.4.33

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/3304>

2 years agod3d11decoder: Fix for VP9 decoding with odd resolution
Seungha Yang [Mon, 31 Oct 2022 17:00:33 +0000 (02:00 +0900)]
d3d11decoder: Fix for VP9 decoding with odd resolution

Fixing off by one mismatch when width and/or height of stream
is odd number

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/3302>

2 years agoqsv: Add VP9 decoder
Seungha Yang [Thu, 27 Oct 2022 18:25:38 +0000 (03:25 +0900)]
qsv: Add VP9 decoder

Recent Intel GPU supports 12bits VP9 decoding but only VP9
profile2 with 10bits is defined by DXVA spec.
Thus, we need this vendor specific decoder element

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/3290>

2 years agoadaptivedemux2: Improve minimum buffering threshold
Edward Hervey [Fri, 21 Oct 2022 15:24:41 +0000 (17:24 +0200)]
adaptivedemux2: Improve minimum buffering threshold

Previously the minimum buffering threshold was hardcoded to a specific
value (10s). This is suboptimal this an actual value will depend on the actual
stream being played.

This commit sets the low watermark threshold in time to 0, which is an automatic
mode. Subclasses can provide a stream `recommended_buffering_threshold` when
update_stream_info() is called.

Currently implemented for HLS, where we recommended 1.5 average segment
duration. This will result in buffering being at 100% when the 2nd segment has
been downloaded (minus a bit already being consumed downstream)

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/3240>

2 years agod3d11vp9dec: Disallow Profile2 12bits stream
Seungha Yang [Sun, 30 Oct 2022 10:01:54 +0000 (19:01 +0900)]
d3d11vp9dec: Disallow Profile2 12bits stream

Since DXVA does not support the format, specify bit-depth field
to sinkpad template caps so that d3d11vp9dec can be skipped
during autoplugging

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/3297>

2 years agovp9parse: Set subsampling to src caps even if GBR stream
Seungha Yang [Sun, 30 Oct 2022 09:37:55 +0000 (18:37 +0900)]
vp9parse: Set subsampling to src caps even if GBR stream

Some muxer elements will need the subsampling information

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/3297>

2 years agovp9parse: Delaying src caps until frame is parsed if profile > 0
Seungha Yang [Sun, 30 Oct 2022 09:35:08 +0000 (18:35 +0900)]
vp9parse: Delaying src caps until frame is parsed if profile > 0

subsampling and/or bitdepth information will be required for
negotiation

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/3297>

2 years agofdkaacenc: Update documentation to clarify bitrate and peak-bitrate
Sanchayan Maity [Sat, 29 Oct 2022 10:47:53 +0000 (16:17 +0530)]
fdkaacenc: Update documentation to clarify bitrate and peak-bitrate

bitrate property is only applicable for constant bitrate and
peak-bitrate is only applicable for variable bitrate. Clarify
the same.

2 years agofdkaacenc: Add support for setting bitrate mode
Sanchayan Maity [Sat, 29 Oct 2022 06:49:58 +0000 (12:19 +0530)]
fdkaacenc: Add support for setting bitrate mode

2 years agofdkaacenc: Add support for setting peak bitrate
Sanchayan Maity [Sun, 31 Jan 2021 16:30:36 +0000 (22:00 +0530)]
fdkaacenc: Add support for setting peak bitrate

2 years agofdkaacenc: Add support for enabling afterburner
Sanchayan Maity [Sat, 23 Jan 2021 13:05:12 +0000 (18:35 +0530)]
fdkaacenc: Add support for enabling afterburner

This is an additional quality parameter. In the default configuration this
quality switch is deactivated because it would cause a workload increase
which might be significant. If workload is not an issue in the application
it can be recommended to activate this feature.

2 years agofdkaacdec: Do not report decoding error for flush request
Sanchayan Maity [Thu, 26 Nov 2020 13:53:11 +0000 (19:23 +0530)]
fdkaacdec: Do not report decoding error for flush request

A flush request is done when set_format is called to empty internal bit
buffer maintained by fdk-aac. When this happens, during the explicit
call to handle_buffer, decodeFrame does not return a AAC_DEC_OK. This
gets reported as a decoding error while no decoding error in fact took
place. Since this can be confusing, just return a GST_FLOW_OK and log
that an explicit flush was requested.

2 years agowavparse: Speed up type finding for DTS
Sanchayan Maity [Fri, 28 Oct 2022 13:27:44 +0000 (18:57 +0530)]
wavparse: Speed up type finding for DTS

In order to figure out if the "raw" audio contained within the wav
container is actually DTS, right now we call the typefinder helper
which runs all typefinders.

Speed up this type finding process by specifying the extension.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/3294>

2 years agoplaybin3: Fix missing pad unref
Sanchayan Maity [Thu, 13 Oct 2022 16:45:58 +0000 (22:15 +0530)]
playbin3: Fix missing pad unref

GST_TRACERS="leaks" GST_DEBUG="GST_TRACER:7,leaks:6" gst-play-1.0 --use-playbin3 test.mkv

When running a pipeline like above, leaks are observed.

0:00:56.882419132 240637 0x5562c528ccc0 TRACE             GST_TRACER :0:: object-alive, type-name=(string)GstConcatPad, address=(gpointer)0x7efd7c0d20a0, description=(string)<'':sink_0>, ref-count=(uint)1, trace=(string);
0:00:56.882429131 240637 0x5562c528ccc0 TRACE             GST_TRACER :0:: object-alive, type-name=(string)GstConcatPad, address=(gpointer)0x7efd7c0d2be0, description=(string)<'':sink_0>, ref-count=(uint)1, trace=(string);
0:00:56.882437056 240637 0x5562c528ccc0 TRACE             GST_TRACER :0:: object-alive, type-name=(string)GstConcatPad, address=(gpointer)0x7efd7c0d3720, description=(string)<'':sink_0>, ref-count=(uint)1, trace=(string);

gst_element_release_request_pad does not unref the pad. It needs to
be followed by gst_object_unref. Doing that fixes the above leaks.

Use g_ptr_array_new_with_free_func with gst_object_unref as the free
function to unref the pad after release.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/3177>

2 years agopbutils: add correct mime mapping for vp9
Matthew Waters [Wed, 26 Oct 2022 02:42:59 +0000 (13:42 +1100)]
pbutils: add correct mime mapping for vp9

Based on https://www.webmproject.org/vp9/mp4/#codecs-parameter-string

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/3260>

2 years agomp4mux: enable muxing VP9 streams
Matthew Waters [Tue, 25 Oct 2022 02:30:15 +0000 (13:30 +1100)]
mp4mux: enable muxing VP9 streams

As specified in https://www.webmproject.org/vp9/mp4/

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/3260>

2 years agoqtmux: add support for writing vpcC box for VP9
Matthew Waters [Tue, 25 Oct 2022 02:28:26 +0000 (13:28 +1100)]
qtmux: add support for writing vpcC box for VP9

Increases compatibility for VP9 in .mov in at least VLC.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/3260>

2 years agovp9parser: initialize subsampling to -1
Matthew Waters [Tue, 25 Oct 2022 02:22:30 +0000 (13:22 +1100)]
vp9parser: initialize subsampling to -1

The default value of 0 is a valid subsampling value and could be
confused with an 'unset' value.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/3260>

2 years agogst-plugins-rs: Track 0.9 branch until 1.22 release
Sebastian Dröge [Thu, 27 Oct 2022 12:42:22 +0000 (15:42 +0300)]
gst-plugins-rs: Track 0.9 branch until 1.22 release

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/3286>

2 years agovaencoder: Reset attribute index to one.
Víctor Manuel Jáquez Leal [Thu, 27 Oct 2022 12:20:37 +0000 (14:20 +0200)]
vaencoder: Reset attribute index to one.

Further fix to 4ffb3663 where I forgot to reset the attribute index.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/3285>

2 years agodashdemux2: Fix the way we determine current_position after seeks
Thibault Saunier [Tue, 4 Oct 2022 21:21:15 +0000 (18:21 -0300)]
dashdemux2: Fix the way we determine current_position after seeks

Without that the current_position was off after seeks, potentially
leading to not properly push a last fragment when a `.stop` time was
set.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/3159>

2 years agoadaptivedemux: Minor typo fix
Thibault Saunier [Mon, 3 Oct 2022 18:20:24 +0000 (15:20 -0300)]
adaptivedemux: Minor typo fix

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/3159>

2 years agodash: Fix computing `repeat_index` when seeking in stream with a start !=0 on the...
Thibault Saunier [Tue, 20 Sep 2022 18:32:52 +0000 (15:32 -0300)]
dash: Fix computing `repeat_index` when seeking in stream with a start !=0 on the first fragment

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/3159>

2 years agomatroskademux: Let upstream handle seeking/duration query in time if possible
Thibault Saunier [Thu, 22 Sep 2022 14:20:55 +0000 (11:20 -0300)]
matroskademux: Let upstream handle seeking/duration query in time if possible

So proper response are given for dash streams

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/3159>

2 years agomatroskademux: Start support for upstream segments in TIME format
Thibault Saunier [Wed, 21 Sep 2022 18:01:39 +0000 (15:01 -0300)]
matroskademux: Start support for upstream segments in TIME format

So we can use matroskademux for dash webm dash streams.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/3159>

2 years agoximagesrc: grab the server while capturing screen image
Jakub Adam [Mon, 24 Jan 2022 15:49:52 +0000 (16:49 +0100)]
ximagesrc: grab the server while capturing screen image

Makes sure screen resolution doesn't change in the middle of the
process.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/1562>

2 years agoximagesrc: change video resolution when X11 screen gets resized
Jakub Adam [Fri, 17 Dec 2021 13:57:57 +0000 (14:57 +0100)]
ximagesrc: change video resolution when X11 screen gets resized

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/1562>

2 years agoci: Allow the documentation job to always run post-merge
Jordan Petridis [Mon, 24 Oct 2022 18:58:52 +0000 (21:58 +0300)]
ci: Allow the documentation job to always run post-merge

We want the docs to be deployed on every post-merge pipeline
on the main branch. In order to do that however we have to
also have the fedora build job always running.

This won't affect the documentation job run by MRs.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/3258>

2 years agoci: Make jobs explicitly depend on the trigger job to run
Jordan Petridis [Mon, 24 Oct 2022 18:51:53 +0000 (21:51 +0300)]
ci: Make jobs explicitly depend on the trigger job to run

Instead of relying on the implicit dep from the image build
jobs.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/3258>

2 years agoci: consolidate pre-build CI stages
Jordan Petridis [Mon, 24 Oct 2022 18:38:13 +0000 (21:38 +0300)]
ci: consolidate pre-build CI stages

Back in the day we kept separate stages around to define
build order, however with DAG/needs now jobs run asynchronously.
Additionally on recent version its possibel to same jobs depend on
other jobs from the same stage.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/3258>

2 years agoci: Replace obselete variable
Jordan Petridis [Mon, 24 Oct 2022 18:06:14 +0000 (21:06 +0300)]
ci: Replace obselete variable

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/3258>

2 years agocore/base: Only post latency messages if the latency values have actually changed
Sebastian Dröge [Thu, 27 Oct 2022 12:13:36 +0000 (15:13 +0300)]
core/base: Only post latency messages if the latency values have actually changed

Fixes https://gitlab.freedesktop.org/gstreamer/gstreamer/-/issues/1525

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/3282>

2 years agovideodecoder: Only post latency message if it changed
Edward Hervey [Thu, 27 Oct 2022 05:21:19 +0000 (07:21 +0200)]
videodecoder: Only post latency message if it changed

Posting latency messages causes a full and potentially expensive latency
recalculation of the pipeline. While subclasses should check whether the latency
really changed or not before calling this function, we ensure that we do not
post such messages if it didn't change.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/3282>

2 years agoavdec_h265: Fix endless renegoation with alternate interlacing
Nicolas Dufresne [Wed, 26 Oct 2022 20:30:31 +0000 (16:30 -0400)]
avdec_h265: Fix endless renegoation with alternate interlacing

The picture parameter picture->top_field_first is reused in this mode
to signal the TOP fields. As a side effect, it will change every frame
and current code assumed that if this changes then a renegotiation is
needed. Fixed this by ignoring that change whenever we are decoding one field
only.

Fixes #1523

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/3276>

2 years agoh265bitwriter: Correct the all API to byte aligned.
He Junyan [Thu, 27 Oct 2022 07:21:30 +0000 (15:21 +0800)]
h265bitwriter: Correct the all API to byte aligned.

In fact, all the h265 bit writer have byte aligned output. So we
change the API from bit size in unit to byte size, which is easy
to use.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/3193>

2 years agoh264bitwriter: Correct the all API to byte aligned.
He Junyan [Thu, 27 Oct 2022 05:42:17 +0000 (13:42 +0800)]
h264bitwriter: Correct the all API to byte aligned.

In fact, all the h264 bit writer have byte aligned output except
the slice header. So we change the API from bit size in unit to
byte size, which is easy to use. For slice header, we add a extra
"trail_bits_num" to return the unaligned bits number.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/3193>

2 years agobitwriter: Fix a nal conversion bug when input is not byte aligned.
He Junyan [Thu, 27 Oct 2022 06:40:49 +0000 (14:40 +0800)]
bitwriter: Fix a nal conversion bug when input is not byte aligned.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/3193>

2 years agomsdkvpp: Set va mem caps as higher priority
Mengkejiergeli Ba [Mon, 24 Oct 2022 03:56:51 +0000 (11:56 +0800)]
msdkvpp: Set va mem caps as higher priority

We use va pool as msdkvpp's bufferpool, which means both va memory
and dma memory will be allocated by va pool. Considering drm modifier
stuff is not ready, we use va memory with higher priortiry than
dma memory when deciding vpp caps.

Besides, this patch removes the specified "interlace-mode" in vpp caps.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/3253>

2 years agoconcat: Properly propagate EOS seqnum
Edward Hervey [Thu, 27 Oct 2022 09:18:24 +0000 (11:18 +0200)]
concat: Properly propagate EOS seqnum

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/3284>

2 years agomsdkav1enc: Remove reorder TU workaround
Mengkejiergeli Ba [Tue, 18 Oct 2022 03:36:23 +0000 (03:36 +0000)]
msdkav1enc: Remove reorder TU workaround

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/3225>

2 years agomsdkav1enc: Remove pts workaround
Mengkejiergeli Ba [Tue, 18 Oct 2022 03:10:43 +0000 (03:10 +0000)]
msdkav1enc: Remove pts workaround

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/3225>

2 years agocodecparsers: {h264,h265}bitwriter: Don't install headers yet
Seungha Yang [Wed, 26 Oct 2022 19:15:01 +0000 (04:15 +0900)]
codecparsers: {h264,h265}bitwriter: Don't install headers yet

Those APIs are quite early stage of development, and we might want to
change them in the near future

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/3275>

2 years agomsdkvpp: Fix upper frc
Mengkejiergeli Ba [Tue, 18 Oct 2022 08:34:41 +0000 (16:34 +0800)]
msdkvpp: Fix upper frc

Refact vpp commit 4c6b7194451ff6fbfe88834219d982302114d74b broke the
upper FRC, here to fix this by using outbuf_new.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/3223>

2 years agobad: Add msdkav1enc docs
Mengkejiergeli Ba [Fri, 29 Jul 2022 10:15:08 +0000 (18:15 +0800)]
bad: Add msdkav1enc docs

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/2971>

2 years agomeson: Fix path for webrtc validate tests
Nicolas Dufresne [Wed, 26 Oct 2022 17:41:10 +0000 (13:41 -0400)]
meson: Fix path for webrtc validate tests

This fixes a crash when trying to run gst-validate-launcher from inside
the meson devenv. The error was:

  ModuleNotFoundError: No module named 'observer'

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/3273>

2 years agoavviddec: Avoid flushing on framerate changes
Nicolas Dufresne [Wed, 26 Oct 2022 14:44:01 +0000 (10:44 -0400)]
avviddec: Avoid flushing on framerate changes

A framerate change does not require flushing the decoder and causes
issues with some specific fragmented files if the two fragments have
different framerate.

Fixes #1522

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/3270>

2 years agoximagesink, xvimagesink: set the _NET_WM_PID atom on the window
Daniels Umanovskis [Wed, 26 Oct 2022 08:25:43 +0000 (10:25 +0200)]
ximagesink, xvimagesink: set the _NET_WM_PID atom on the window

This makes it easier for X11 window management to work with windows created by these sinks

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/3267>

2 years agoalphacombine: Add missing query handler for gaps
Nicolas Dufresne [Tue, 25 Oct 2022 12:14:18 +0000 (08:14 -0400)]
alphacombine: Add missing query handler for gaps

The gap handling was in place, but there was no event handler to trigger it.
Implement the alpha sink event handler for the gaps. This fixes handling of
valid streams which may not refresh the alpha frames for every video frames.
It will also allow a clean error if the stream was missing the initial
alpha frame, at least until we find a better way to handle these
invalid frames.

Related to #1518

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/3264>

2 years agoavfdeviceprovider: do not leak the properties
Ignacio Casal Quinteiro [Wed, 26 Oct 2022 09:47:43 +0000 (11:47 +0200)]
avfdeviceprovider: do not leak the properties

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/3268>

2 years agoci: Fix traceback when user doesn't have a cerbero fork
Nirbheek Chauhan [Wed, 26 Oct 2022 09:17:52 +0000 (14:47 +0530)]
ci: Fix traceback when user doesn't have a cerbero fork

```
Traceback (most recent call last):
  File "ci/gitlab/trigger_cerbero_pipeline.py", line 59, in <module>
    if cerbero is None:
NameError: name 'cerbero' is not defined
```

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/3063>

2 years agovaencoder: Fix caps semantics.
Víctor Manuel Jáquez Leal [Fri, 21 Oct 2022 08:57:39 +0000 (10:57 +0200)]
vaencoder: Fix caps semantics.

When using gst_va_caps_from_profiles() the semantics of sink/src caps
depends if the element is an encoder or a decoder.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/3063>

2 years agova: Fix typos.
Víctor Manuel Jáquez Leal [Wed, 19 Oct 2022 14:44:07 +0000 (16:44 +0200)]
va: Fix typos.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/3063>

2 years agovah264enc: Fail if unsupported rate control.
Víctor Manuel Jáquez Leal [Thu, 11 Aug 2022 10:51:17 +0000 (12:51 +0200)]
vah264enc: Fail if unsupported rate control.

Handle when encoder doesn't support rate control, which is set as
VA_RC_NONE, and if the set rate control mode is not supported by the
GStreamer element, the element configuration fails.

Also it logs out max and target bitrate.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/3063>

2 years agovah264enc: Add todo item.
Víctor Manuel Jáquez Leal [Thu, 15 Sep 2022 10:56:14 +0000 (12:56 +0200)]
vah264enc: Add todo item.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/3063>

2 years agovaencoder: Honor entrypoint at constructor.
Víctor Manuel Jáquez Leal [Wed, 19 Oct 2022 14:08:17 +0000 (16:08 +0200)]
vaencoder: Honor entrypoint at constructor.

The entrypoint is set when the encoder helper is constructed,
nonetheless it was also passed as parameter when opening. That's
buggy.

In order to simplify the code, the entrypoint at construction is
honored.

But gst_va_encoder_has_profile_and_entrypoint() now doesn't rely in
the internal list of profiles since it only contains those that
belongs to codec and entrypoint, thus it queries directly the VA
driver.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/3063>

2 years agovabaseenc: Scope error bail out.
Víctor Manuel Jáquez Leal [Thu, 11 Aug 2022 10:50:27 +0000 (12:50 +0200)]
vabaseenc: Scope error bail out.

Though this is not enforced by the GStreamer code style, it's clearer
to add a nested scope for error handling using label/goto.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/3063>