Commit graph

2956 commits

Author SHA1 Message Date
Jan Alexander Steffens (heftig) 39bab56a08 rtmp2/connection: Discern reasons for cancelling all commands
Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/1403>
2022-11-07 12:31:08 +00:00
Jan Alexander Steffens (heftig) 297cdaa381 rtmp2/connection: Handle EOF like error
Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/1403>
2022-11-07 12:31:08 +00:00
Jan Alexander Steffens (heftig) 031d52672b rtmp2/client: Make sure 'salt' is not NULL
Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/1403>
2022-11-07 12:31:08 +00:00
Jan Alexander Steffens (heftig) dcada94046 rtmp2/client: Make sure 'reason' is not NULL
Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/1403>
2022-11-07 12:31:07 +00:00
Jan Alexander Steffens (heftig) a13f234be3 rtmp2/client: Make sure 'desc' is not NULL
Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/1403>
2022-11-07 12:31:07 +00:00
Jan Alexander Steffens (heftig) 2037f1ed0a rtmp2/client: Make sure 'code' is not NULL
Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/1403>
2022-11-07 12:31:07 +00:00
Edward Hervey a100f36b69 webrtcbin: Don't duplicate enum string values
Some were leaked when debugging was enabled. Instead just directly use the
static strings as-is.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/3347>
2022-11-07 11:21:00 +00:00
Edward Hervey 605cb6a4d4 gstpad: Avoid race in (un)setting EOS flag on sinkpads
The scenario is the following:

* Thread 1 is pushing an EOS event on a sinkpad
* Thread 2 is pushing a STREAM_START event on the same sinkpad before Thread 1
returns. Note : It starts pushing the event after Thread 1 took the object lock.

There is a potential race between:

* The moment Thread 1 sets the EOS flag once it has finished sending the
event (via store_sticky_event). When it does that it has both the STREAM and
OBJECT lock

* The moment Thread 2 sends the STREAM_START event (Which should release that
EOS status), but removing the EOS flag is only done while holding the OBJECT
lock and not the STREAM_LOCK, which means it could be re-set by Thread 1 before
it then checks again the EOS flag (without the STREAM lock taken).

The EOS flag unsetting by STREAM_START should be done with the STREAM lock
taken, otherwise it will be racy.

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

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/3320>
2022-11-07 06:28:39 +01:00
Nicolas Dufresne e81e212610 videocodectestsink: Add YUV422 support
Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/3331>
2022-11-07 00:40:25 +00:00
Tim-Philipp Müller 62f8d292a1 gst-inspect: print doc urls for Rust plugins
We have documentation for them now after all.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/3346>
2022-11-06 18:10:44 +00:00
Justin Chadwell fd96fc23c5 qtdemux: use unsigned int types to store result of QT_UINT32
In a few cases throughout qtdemux, the results of QT_UINT32 were being
stored in a signed integer, which could cause subtle bugs in the case of
an integer overflow, even allowing the the result to equal a negative
number!

This patch prevents this by simply storing the results of this function
call properly in an unsigned integer type. Additionally, we fix up the
length checking with stsd parsing to prevent cases of child atoms
exceeding their parent atom sizes.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/3344>
2022-11-06 12:00:31 +00:00
Seungha Yang 0405e0cfc7 d3d11videosink: Always clear back buffer on resize
Swapchain may not need to be resized if the size of backbuffer
is equal to the previous size. Then previously rendered frame will be stay
on the screen. Do clear back buffer whenever resize() is called

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/3341>
2022-11-05 17:23:24 +00:00
Edward Hervey 24a0e5bdfd subparse: Fix non-closed tag handling.
Unclear what the goal was, but we could end up reading way past the next_tag.

Instead just move everything from after the end tag ('>') to the next_tag.

Fixes https://bugs.chromium.org/p/oss-fuzz/issues/detail?id=53040

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/3340>
2022-11-05 16:19:53 +00:00
Nicolas Dufresne e283c99358 avutils: Add missing space in doc
Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/3330>
2022-11-05 15:12:08 +00:00
Nicolas Dufresne 7b70de580c avviddec: Initialize std_compliance to default
This was missed in the initial patch.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/3330>
2022-11-05 15:12:08 +00:00
Seungha Yang e1e9ee5506 qsv: Fix encoding error when input memory belongs to other GPU
Copy frame if VA display of input buffer is different from that
of encoder, like we've been doing on Windows

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/3335>
2022-11-05 13:59:45 +00:00
Tim-Philipp Müller 04581fad6a identity: fix "handoff" signal docs
The docs list an extra pad argument, which doesn't
match the actual signal function signature. Probably
a copy'n'paste mistake when copying things from fakesink.

Fixes #1546

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/3337>
2022-11-05 11:58:34 +00:00
He Junyan 1881d1826a va: baseenc: Do not import the VA surface from other display.
Fixes: https://gitlab.freedesktop.org/gstreamer/gstreamer/-/issues/1167
Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/3322>
2022-11-05 13:39:34 +08:00
He Junyan d51b29b1dc va: compositor: Do not use allocator and pool from other display.
Just like the va decoder, the compositor should not use allocator
and pool from other display. Also, when importing the input buffer,
if it is from other display, we should fallback to memory copy.

Fixes: https://gitlab.freedesktop.org/gstreamer/gstreamer/-/issues/1167
Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/3322>
2022-11-05 13:39:34 +08:00
He Junyan b9b211c1d1 va: basetransform: Do not use allocator and pool from other display.
Just like the va decoder, the vpp and deinterlace should not use allocator
and pool from other display. Also, when importing the input buffer, if it
is from other display, we should fallback to memory copy.

Fixes: https://gitlab.freedesktop.org/gstreamer/gstreamer/-/issues/1167
Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/3322>
2022-11-05 13:39:34 +08:00
He Junyan a8330686cb va: basedec: Do not use allocator and pool from other display.
The command line such as:
  gst-launch-1.0 -vf filesrc location=1.264 ! h264parse !
  vah264dec ! varenderD129postproc ! fakesink
The decoder here gets the allocation proposal from the vpp which is
on another GPU device. The allocator and pool belong to other display
and should not be used in the decoder.

Fixes: https://gitlab.freedesktop.org/gstreamer/gstreamer/-/issues/1167
Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/3322>
2022-11-05 13:39:34 +08:00
He Junyan 3875c420f7 libs: va: Add API to peek the va buffer's display.
Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/3322>
2022-11-05 13:39:34 +08:00
He Junyan 464650a5d0 libs: va: Add API to peek the va memory's display.
Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/3322>
2022-11-05 13:39:34 +08:00
He Junyan b1a98433f8 libs: va: Add API to peek the allocator's display.
Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/3322>
2022-11-05 13:39:34 +08:00
He Junyan 028920cfc4 libs: va: Fix code style in gstvaallocator.h
Replace all tabs with spaces.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/3322>
2022-11-05 13:39:34 +08:00
Seungha Yang 4db4f08227 d3dvideosink: Update plugin description
Direct3D is too generic (there are various version numbers).
Clarify that this element is using the Direct3D9 API

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/3333>
2022-11-04 22:48:41 +00:00
Tim-Philipp Müller edc2e8312e qt: initialize GError properly in gst_qt_get_gl_wrapcontext()
Spotted by Claus Stovgaard.

Fixes #1545

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/3327>
2022-11-04 20:39:16 +00:00
Sebastian Dröge b368a5fcd2 qtmux: Add durations to raw audio buffers from the raw audio adapter in prefill mode
This ensures that a duration can also be calculated and stored for the
last buffer at EOS.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/3321>
2022-11-04 19:02:22 +00:00
Sebastian Dröge 7b60e48c8c qtmux: Release object lock before posting an error message
GST_ELEMENT_ERROR() also takes the object lock and this would then
deadlock.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/3321>
2022-11-04 19:02:22 +00:00
Edward Hervey 73762156f3 gst-validate-1.0: Don't leak arguments and context
Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/3319>
2022-11-04 17:59:22 +00:00
Edward Hervey 3beec9bad3 validate-scenario: Don't leak temporary path value
It's only use in the structure iterator

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/3319>
2022-11-04 17:59:22 +00:00
Edward Hervey 2114490b9b validate-scenario: Don't leak temporary local variables structures
Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/3319>
2022-11-04 17:59:21 +00:00
Edward Hervey f4d0537b3e lv2: Don't leak plugin information on registration
Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/3319>
2022-11-04 17:59:21 +00:00
Edward Hervey 685a4aaaa7 ladspa: Don't leak plugin information on registration
Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/3319>
2022-11-04 17:59:21 +00:00
Edward Hervey 8ca2a2a230 fdkaacenc: Properly terminate GEnumValue table
It should be terminated with a NULL entry, otherwise we just stray into the
realms of cryptographic libraries^W^W random memory usage.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/3319>
2022-11-04 17:59:21 +00:00
Edward Hervey 0213536f77 libav: avcfg: Avoid brittle comparision
Subtracting a gint from another (or a guint from another) has no guarantees that
it will result in a gint.

Therefore do the actual comparision instead.

Also use the *actual* type for comparing flags (the field value types are different)

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/3319>
2022-11-04 17:59:21 +00:00
Edward Hervey cadc067bde libav: avcfg: Don't leak duplicate enumvalue entries
If we discard the duplicates, we also need to free the allocated strings.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/3319>
2022-11-04 17:59:21 +00:00
Edward Hervey 97bfb8b6cb imagesequencesrc; Fix leaks
* The path was leaked
* The custom buffer was never freed

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/3319>
2022-11-04 17:59:21 +00:00
Edward Hervey 6ffae88a9f qtdemux: Fix cenc-related leaks
Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/3319>
2022-11-04 17:59:21 +00:00
Edward Hervey aa61662632 deinterlace: Don't leak metas
There is no correlation between the frame being NULL and the metas not being
present.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/3319>
2022-11-04 17:59:21 +00:00
Edward Hervey 094d27585e validate: plug some leaks
Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/3319>
2022-11-04 17:59:21 +00:00
Edward Hervey 7f86e925e2 adaptivedemux2: Fix collection leaks
* The collection on the period was never unreffed
* The collection in the message handler was never unreffed

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/3319>
2022-11-04 17:59:21 +00:00
Edward Hervey 93d8b3f660 parsebin: Fix leak
Release the reference on the collection which was given to us when extracting it
from the event/message.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/3319>
2022-11-04 17:59:21 +00:00
Jan Schmidt b2f2a9125c mssdemux2: Update for adaptivedemux2 refactoring
Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/3314>
2022-11-05 04:00:31 +11:00
Jan Schmidt 565f47b4f3 adaptivedemux2: Move stream_seek() to the Stream class
Move the last stream specific vfunc from the demux
class to the stream class.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/3314>
2022-11-05 04:00:31 +11:00
Jan Schmidt 2fe641353d 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>
2022-11-05 04:00:31 +11:00
Jan Schmidt 9f89b8e3ef 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>
2022-11-05 03:24:27 +11:00
Jan Schmidt 55db033570 hlsdemux2/m3u8: Refactor parsing for readability
Small readability improvements in the parsing code

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/3314>
2022-11-05 03:24:27 +11:00
Jan Schmidt bfeb3c5625 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>
2022-11-05 03:24:27 +11:00
Jan Schmidt 0f8c38c190 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>
2022-11-05 03:24:27 +11:00
Jan Schmidt d1ae35f08a 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>
2022-11-05 03:24:26 +11:00
Jan Schmidt 46517d5aca 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>
2022-11-05 03:24:26 +11:00
Jan Schmidt 1751f555f2 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>
2022-11-05 03:24:26 +11:00
Jan Schmidt c9de81edd4 adaptivedemux2: Remove scheduler_lock mutex
Remove the old unused scheduler_lock

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/3314>
2022-11-05 03:24:26 +11:00
Jan Schmidt b691aece65 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>
2022-11-05 03:24:26 +11:00
Jan Schmidt 93f80bb061 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>
2022-11-05 03:24:26 +11:00
Edward Hervey 730ed3a69a 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>
2022-11-04 14:20:36 +00:00
Jan Alexander Steffens (heftig) 424b331afc 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>
2022-11-04 13:07:34 +00:00
Jan Alexander Steffens (heftig) d575a41145 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>
2022-11-04 13:07:34 +00:00
Jan Alexander Steffens (heftig) 3c23c16f40 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>
2022-11-04 13:07:34 +00:00
Jan Alexander Steffens (heftig) 4e05100e8c 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>
2022-11-04 13:07:34 +00:00
Jan Alexander Steffens (heftig) a3cc5cf257 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>
2022-11-04 13:07:34 +00:00
Jan Alexander Steffens (heftig) b6974b6afc 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>
2022-11-04 13:07:34 +00:00
Seungha Yang bfed80a82c 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>
2022-11-04 10:01:39 +00:00
Seungha Yang 786b7699d1 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>
2022-11-04 05:37:58 +09:00
Seungha Yang 1ce38adfe3 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>
2022-11-04 05:14:23 +09:00
Seungha Yang 6d46a9c3c7 examples: d3d11: Fix GCC build error/warning
Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/3318>
2022-11-04 02:17:22 +09:00
Seungha Yang f7cc753274 qsvjpegenc: Add support for YUY2 format
Now GstD3D11 defines YUY2 format

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/3316>
2022-11-03 06:40:10 +09:00
Seungha Yang 1853dd56a4 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>
2022-11-03 06:40:10 +09:00
Seungha Yang 3f94df9487 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>
2022-11-03 06:40:09 +09:00
Nicolas Dufresne 5fe360dec4 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>
2022-11-02 19:23:14 +00:00
Nicolas Dufresne 99ec53073a 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>
2022-11-02 19:23:14 +00:00
Seungha Yang af05abdb79 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>
2022-11-02 19:23:14 +00:00
Michael Gruner 2cdfa8f419 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>
2022-11-02 13:21:09 +00:00
Michael Gruner ded2fed3b9 childproxy: Implement a new ::get_child_by_name_recurse() API
Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/2908>
2022-11-02 13:21:09 +00:00
Tong Wu 60f7467dfe msdkcontext: use gst_object_unref instead of g_object_unref
Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/3301>
2022-11-02 07:40:59 +00:00
Tong Wu bae66c8ae0 msdkcontext: use gst_object_ref for GstVaDisplay
Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/3301>
2022-11-02 07:40:59 +00:00
Tong Wu c9cc92a20a msdkcontext: g_object_new() must not return nullptr
Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/3301>
2022-11-02 07:40:59 +00:00
Tong Wu 7b03da634b 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>
2022-11-02 07:40:59 +00:00
Guillaume Desmottes a92f41e0c7 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>
2022-11-02 00:21:21 +00:00
Eric Knapp 87e9952b8f vah264enc: Added option to insert CEA-708 closed captions
Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/2910>
2022-11-01 23:22:03 +00:00
Seungha Yang be1771126d qsv: Check 16K resolution support
... and remove duplicated code

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/3310>
2022-11-01 17:23:52 +00:00
Marijn Suijten 31c23fb6c0 vulkan: Mark gst_vulkan_image_view_new create_info as constant pointer
Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/1615>
2022-11-01 15:19:51 +01:00
Marijn Suijten 3d081c45be 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>
2022-11-01 15:19:51 +01:00
Marijn Suijten ebe7517b8e 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>
2022-11-01 15:19:51 +01:00
Marijn Suijten 614cd87732 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>
2022-11-01 15:19:51 +01:00
Jan Schmidt 4a8805ade7 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>
2022-11-01 13:04:44 +00:00
Jan Schmidt 6af3769511 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>
2022-11-01 11:53:26 +00:00
Jan Schmidt 9b8c71d148 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>
2022-11-01 11:51:44 +00:00
Tim-Philipp Müller 9e6056b306 subprojects: orc: bump to 0.4.33
Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/3304>
2022-10-31 23:50:28 +00:00
Seungha Yang 92e03ba869 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>
2022-10-31 20:45:25 +00:00
Seungha Yang 5e66dde1b2 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>
2022-10-31 19:30:47 +00:00
Edward Hervey 33db765f45 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>
2022-10-31 16:16:50 +01:00
Seungha Yang d8bdd9429b 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>
2022-10-31 11:29:39 +00:00
Seungha Yang 32b13a883a 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>
2022-10-31 11:29:38 +00:00
Seungha Yang 47f1dc837f 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>
2022-10-31 11:29:38 +00:00
Sanchayan Maity da52bedbff 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.
2022-10-30 16:54:51 +05:30
Sanchayan Maity f0ceb9ea4f fdkaacenc: Add support for setting bitrate mode 2022-10-30 16:54:51 +05:30
Sanchayan Maity 595dd7a1ed fdkaacenc: Add support for setting peak bitrate 2022-10-29 16:04:42 +05:30
Sanchayan Maity 734593ccab 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.
2022-10-29 15:57:52 +05:30
Sanchayan Maity a63d8ee720 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.
2022-10-29 10:47:16 +05:30
Sanchayan Maity 858e516383 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>
2022-10-28 19:01:26 +05:30
Sanchayan Maity 673d13f176 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>
2022-10-28 10:15:42 +05:30
Matthew Waters 1c835695a3 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>
2022-10-28 00:06:07 +00:00
Matthew Waters e2081ce31e 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>
2022-10-28 00:06:07 +00:00
Matthew Waters 5bed545113 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>
2022-10-28 00:06:07 +00:00
Matthew Waters f77f27f4c9 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>
2022-10-28 00:06:07 +00:00
Sebastian Dröge bf98b0ecd6 gst-plugins-rs: Track 0.9 branch until 1.22 release
Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/3286>
2022-10-27 21:30:09 +00:00
Víctor Manuel Jáquez Leal 96f0521155 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>
2022-10-27 20:32:15 +00:00
Thibault Saunier 1c1b0380cb 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>
2022-10-27 19:45:44 +00:00
Thibault Saunier 4f991a55af adaptivedemux: Minor typo fix
Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/3159>
2022-10-27 19:45:44 +00:00
Thibault Saunier 8a9821e805 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>
2022-10-27 19:45:44 +00:00
Thibault Saunier f7abd81a45 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>
2022-10-27 19:45:44 +00:00
Thibault Saunier 8c7579e129 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>
2022-10-27 19:45:44 +00:00
Jakub Adam 2125dbbd0b 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>
2022-10-27 18:42:38 +00:00
Jakub Adam c93afcc99c ximagesrc: change video resolution when X11 screen gets resized
Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/1562>
2022-10-27 18:42:38 +00:00
Sebastian Dröge c878d0f68b 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>
2022-10-27 15:25:22 +00:00
Edward Hervey 8f286fc388 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>
2022-10-27 15:25:22 +00:00
Nicolas Dufresne 5c2eba666b 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>
2022-10-27 13:34:48 +00:00
He Junyan 2408ca2f18 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>
2022-10-27 12:15:43 +00:00
He Junyan c294ba82e6 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>
2022-10-27 12:15:43 +00:00
He Junyan 9dc76185fc bitwriter: Fix a nal conversion bug when input is not byte aligned.
Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/3193>
2022-10-27 12:15:43 +00:00
Mengkejiergeli Ba 13be7cbe86 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>
2022-10-27 11:12:08 +00:00
Edward Hervey cb1345ab77 concat: Properly propagate EOS seqnum
Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/3284>
2022-10-27 11:20:01 +02:00
Mengkejiergeli Ba c989d023fd msdkav1enc: Remove reorder TU workaround
Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/3225>
2022-10-27 07:07:38 +00:00
Mengkejiergeli Ba 78a7c6318a msdkav1enc: Remove pts workaround
Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/3225>
2022-10-27 07:07:38 +00:00
Seungha Yang 2c5a050ae7 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>
2022-10-27 06:15:56 +00:00
Mengkejiergeli Ba 2c1315cae9 msdkvpp: Fix upper frc
Refact vpp commit 4c6b719445 broke the
upper FRC, here to fix this by using outbuf_new.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/3223>
2022-10-27 05:17:12 +00:00
Mengkejiergeli Ba 27216d6f2e bad: Add msdkav1enc docs
Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/2971>
2022-10-27 04:02:10 +00:00
Nicolas Dufresne 4fb9f2a2b4 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>
2022-10-26 18:16:25 +00:00
Nicolas Dufresne 9ebe338d80 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>
2022-10-26 17:23:02 +00:00
Daniels Umanovskis 990d124790 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>
2022-10-26 16:10:36 +00:00
Nicolas Dufresne 8a8fe360a2 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>
2022-10-26 14:51:40 +00:00
Ignacio Casal Quinteiro d44eb4b2fa avfdeviceprovider: do not leak the properties
Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/3268>
2022-10-26 10:29:25 +00:00
Víctor Manuel Jáquez Leal ba24191f2a 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>
2022-10-26 08:19:32 +00:00
Víctor Manuel Jáquez Leal d32fdf975d va: Fix typos.
Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/3063>
2022-10-26 08:19:32 +00:00
Víctor Manuel Jáquez Leal 4ffb3663a8 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>
2022-10-26 08:19:32 +00:00
Víctor Manuel Jáquez Leal 5e531c1a88 vah264enc: Add todo item.
Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/3063>
2022-10-26 08:19:32 +00:00
Víctor Manuel Jáquez Leal d463feaa08 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>
2022-10-26 08:19:32 +00:00
Víctor Manuel Jáquez Leal 79c47fbdb8 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>
2022-10-26 08:19:32 +00:00
Víctor Manuel Jáquez Leal d608872ba3 vabaseenc: Use class entrypoint.
Add a macro to access to class entrypoint and use it instead of move
it to a variable.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/3063>
2022-10-26 08:19:32 +00:00
Seungha Yang e68645c2d2 d3d11: Move format defines to private header
Those defines will be likely changed/deleted in the future, and we
don't need to expose them to public at the moment

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/3265>
2022-10-26 02:55:34 +09:00
Tim-Philipp Müller d132592423 xingmux: move from gst-plugins-ugly to gst-plugins-good
Fixes https://gitlab.freedesktop.org/gstreamer/gst-plugins-base/-/issues/415

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/3251>
2022-10-25 12:40:20 +00:00
Patrick Griffis 2265709574 build: Fix building ges with tools disabled
If you configure with `tools=disabled` then ges_launch is undefined.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/3259>
2022-10-25 08:53:19 +00:00
Sebastian Dröge 366893e9ac Fix various warnings from gobject-introspection
Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/3261>
2022-10-25 09:45:25 +03:00
Tim-Philipp Müller e703374ff8 fdkaac: add minimal unit test
Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/1785>
2022-10-25 00:13:05 +00:00
Tim-Philipp Müller d7e2aff994 fdkaacenc: fix output caps in case of implicit signaling and HE-AAC
Need to put the actual profile in the output caps otherwise any
capsfilter after the encoder that was used to force the output
profile will fail, such as

  fdkaacenc ! audio/mpeg,stream-format=adts,profile=he-aac-v1 ! ..

because we put profile=lc in there to match the profile signaled
in the ADTS header. This is expressed through the base-profile=lc
in the GStreamer caps though, the profile needs to carry the
'real' profile.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/1785>
2022-10-25 00:13:04 +00:00
Tim-Philipp Müller 24645e35c5 fdkaacenc: don't set base-profile=lc for non-backwards compatible output
Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/1785>
2022-10-25 00:13:04 +00:00
Tim-Philipp Müller 31c04f87e3 fdkaacenc: rename profile=sbr|ps to profile=he-aac-v1|he-aac-v2
Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/1785>
2022-10-25 00:13:04 +00:00
Piotrek Brzeziński d8b1ff4668 fdkaacenc: add support for AAC-LD
Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/1785>
2022-10-25 00:13:04 +00:00
Piotrek Brzeziński 8cda666cb0 fdkaacenc: add support for HE-AACv1 and HE-AACv2
Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/1785>
2022-10-25 00:13:04 +00:00
Patrick Griffis 2a59e8af97 webrtc: Fix double free in webrtc-recvonly-h264 demo
The "message" signal does not transfer ownership of the GBytes passed
to it so calling g_bytes_unref() on it is incorrect.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/3257>
2022-10-24 22:16:44 +00:00
Seungha Yang e25a6f4794 gst-inspect: Hide GST_PARAM_DOC_SHOW_DEFAULT flag
It's known flag but only for documentation purpose. Don't show
its (and user cannot understand) value 0x2000

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/3241>
2022-10-24 17:14:48 +00:00
Fabian Orccon db5b4e6a06 ges: transition: Notify vtype change on ges_extractable_set_asset call
Fixes #1454

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/3215>
2022-10-24 14:14:30 +00:00
Seungha Yang 4124c83e22 gst-plugins-bad: Update Windows plugins cache
Add/update d3d11, qsv, nvcodec, wic, directshow, and amfcodec plugins cache

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/3250>
2022-10-24 12:42:52 +00:00
Seungha Yang 722f097b9d nvcodec: Update for documentation
* Use GST_PARAM_DOC_SHOW_DEFAULT flags for GPU ID related
  properties
* Fix some typos
* Add since markers

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/3250>
2022-10-24 12:42:51 +00:00
Seungha Yang 7ce3fccf25 mediafoundation: Update for documentation
* Use GST_PARAM_DOC_SHOW_DEFAULT flags for GPU ID related
  properties
* Add doc caps
* Add since markers

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/3250>
2022-10-24 12:42:51 +00:00
Seungha Yang 9d926ae8b1 mfvideoencoder: Document only hardware encoders
Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/3250>
2022-10-24 12:42:51 +00:00
Seungha Yang e9415aafb5 mfvideoencoder: Fix device enumeration
Although a GPU does not support the codec, the other GPU might
be able to support the codec

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/3250>
2022-10-24 12:42:51 +00:00
Seungha Yang d92c43cb0f amfcodec: Update for documentation
* Use GST_PARAM_DOC_SHOW_DEFAULT flags for GPU ID related
  properties
* Add doc caps

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/3250>
2022-10-24 12:42:51 +00:00
Seungha Yang 4038a486a0 qsv: Use GST_PARAM_DOC_SHOW_DEFAULT flag
Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/3250>
2022-10-24 12:42:51 +00:00
Seungha Yang 6974b6f6ff d3d11: Update for documentation
* Use GST_PARAM_DOC_SHOW_DEFAULT flags for GPU ID related
  properties
* Add doc caps
* Increase deinterlace max resolution

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/3250>
2022-10-24 12:42:51 +00:00
Seungha Yang 31be056b6e d3d11: Run indent
Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/3250>
2022-10-24 12:42:51 +00:00
Seungha Yang 1ec4905e92 wic: Add since marker
Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/3250>
2022-10-24 12:42:51 +00:00
Seungha Yang 92fd435a25 directshow: Add since marker
Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/3250>
2022-10-24 12:42:51 +00:00
Sebastian Dröge 7193a601b3 examples: webrtc: Update to gstreamer-rs 0.19 release
Also update the macOS workaround for gstreamer-gl requiring a
`NSRunLoop` / `NSApp` on the main thread, and update from strucopt to
clap 4.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/3255>
2022-10-24 11:50:09 +00:00
Seungha Yang 23261bccbb qsv: Enable MinGW toolchain support
Use PCRE regex method to work around (likely) GCC std::regex bug,
and enable building for non-MSVC

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/3239>
2022-10-24 10:53:40 +00:00
Sebastian Dröge e392d9c597 rtspsrc: Only EOS on timeout if all streams are timed out/EOS
Otherwise a stream that is just temporarily inactive might time out and
then can never become active again because the EOS event was sent
already.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/3238>
2022-10-24 09:19:12 +00:00
Nirbheek Chauhan a083280a58 gl/vulkan: Fix static linking on macOS
duplicate symbol '__invoke_on_main' in:
    /Library/Frameworks/GStreamer.framework/Versions/1.0/lib/libgstvulkan-1.0.a(cocoa_gstvkwindow_cocoa.m.o)
    /Library/Frameworks/GStreamer.framework/Versions/1.0/lib/libgstgl-1.0.a(cocoa_gstglwindow_cocoa.m.o)
ld: 1 duplicate symbol for architecture x86_64
clang: error: linker command failed with exit code 1 (use -v to see invocation)

Also make the same change in iOS for consistency.

Continuation of https://gitlab.freedesktop.org/gstreamer/gst-plugins-bad/-/issues/1132

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/3242>
2022-10-24 00:48:08 +00:00
Matthew Waters 0077d13304 webrtcbin: configure rtpulpfecdec passthrough property
This allows downstream (payloaders mostly) to be able to correctly
detect actual packet loss from rtp sequence numbers.

See
https://gitlab.freedesktop.org/gstreamer/gst-plugins-good/-/issues/581
for background.

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

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/3212>
2022-10-23 23:44:07 +00:00
Matthew Waters 093e9c8c9d rtpulpfecdec: add property for passthrough
Support for enabling and disabling decoding of FEC data decoding on
packet loss events and unconditional seqnum rewriting of packets.

See
https://gitlab.freedesktop.org/gstreamer/gst-plugins-good/-/issues/581
for background.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/3212>
2022-10-23 23:44:07 +00:00
Patrick Griffis d0e2b31470 webrtc: Fix critical in webrtc-recvonly-h264 example
This signal only takes 2 properties yet a third was passed.
This would cause a critical in GLib.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/3252>
2022-10-23 22:51:28 +00:00
Sebastian Dröge fee144bca5 net: Add missing nullable annotation on the name parameter in the net/NTP clock constructors
Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/3249>
2022-10-22 15:59:16 +00:00
Seungha Yang 249790fa59 padtemplate: Fix annotations
gst_caps_replace() does not take ownership of the new caps

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/3248>
2022-10-22 22:06:13 +09:00
Devin Anderson 0812c753c6 gst-libav: Fix synchronization issues and errors created by the forwarding of
segment events by demuxer.

In order to play nicely with `ffmpeg`, demuxers in `gst-libav` have to make
buffers available to `ffmpeg` while taking the blocking I/O model in `ffmpeg`
into account, which results in buffers not being sent downstream until `ffmpeg`
has processed them in its separate thread.

In constrast, many `gstreamer` events are simply forwarded downstream.
Currently `GST_EVENT_SEGMENT` events are forwarded downstream without any
processing, which can potentially result in:
 * `GST_EVENT_SEGMENT` events being out of sync with buffers
 * `GST_EVENT_SEGMENT` events going out that are incorrect because they apply
   to data seen by the demuxer, but not necessarily seen by downstream elements

I came across this bug when I was attempting to enable G723.1 demuxing/decoding
using the G723.1 demuxer and decoder provided by `ffmpeg`.  I wrote tests to
verify support for the functionality, and found that, in push mode,
`GST_EVENT_SEGMENT` events pushed to the demuxer by the upstream `filesrc`
element would be forwarded to the decoder without modification, resulting in
an internal data streaming error.  With this patch, tests work in both push and
pull mode.

This patch solves the problem by disabling the forwarding of
`GST_EVENT_SEGMENT` events downstream (an initial `GST_EVENT_SEGMENT` event is
still pushed downstream by the demuxer).  It's possible there's a better way to
do this, but, having looked at how a few different `gstreamer` demuxers deal
with `GST_EVENT_SEGMENT` events, it seems like the processing is somewhat
specific to the demuxer implementation, whereas `gst-libav` has one general way
of handling the situation for any `ffmpeg` demuxer.  Perhaps there's a better
way to solve this using the `ffmpeg` API to take advantage of specific demuxer
details.  IDK.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/3218>
2022-10-21 23:17:58 +00:00
Seungha Yang 7bc5ed34fd gst-inspect: Don't print link to doc if it's known to be unavailable
"gst_element_factory_get_skip_documentation() == true" means
documentation was intentionally skipped for the element feature

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/3243>
2022-10-22 05:36:38 +09:00
François Laignel a5f3ccc037 gst: uri query: fix inconsistent uri nullability assertion
Functions `gst_query_set_uri` and `gst_query_set_uri_redirection`
can both set a `NULL` `uri`, as annotated in the documentation.
However the functions bodies reject `NULL` `uri`s.

See [1] for a discussion on that matter.

[1]: https://gitlab.freedesktop.org/gstreamer/gstreamer-rs/-/merge_requests/1134#note_1600988

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/3237>
2022-10-21 15:05:48 +00:00
Seungha Yang 426535f3a6 d3d11screencapture: Add WinRT API based capture mode
Add Windows Graphics Capture (WGC) API based screen capture mode.
The conditions where this mode is used:
* Explicitly requested by user (capture-api property)
* To capture specific window
* When DXGI desktop duplication API does not work on hybrid graphics systems
  (e.g., multi-gpu laptop)

Full features of this implementation require Windows 11. And Windows 11
SDK is required to build this feature.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/3144>
2022-10-21 14:21:28 +00:00
Seungha Yang 087e335006 d3d11screencapture: Subclassing capture implementation
Preparation to use WinRT capture API

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/3144>
2022-10-21 14:21:28 +00:00
Seungha Yang dcd3f210a0 qsv: Add plugin doc
Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/2738>
2022-10-21 21:29:25 +09:00
Seungha Yang 2b3f690355 qsv: Update SDK version to v2022.2.4
See release note
https://github.com/oneapi-src/oneVPL/releases/tag/v2022.2.0

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/2738>
2022-10-21 21:29:25 +09:00
He Junyan 242401915f av1parse: Correct the pts for frames and OBUs inside a TU.
When the output alignment is smaller than the input alignment, for
example, When the output alignment is "FRAME" and the parse is likely
connecting to a decoder, the current PTS setting for AV1 frames inside
a TU is not very correct.

For example, a TU may begin with non-displayed frames and end with a
displayed frame. The current way will assign the PTS to the first
non-displayed frame, which is a decode-only frame and the PTS will be
discarded in the video decoder. While the last displayed frame has
invalid PTS, and so the video decoder needs to guess its PTS based on
the frame rate and previous frame's PTS. This is not a decent and
robust way. And more important, when the previous frames provide DTS,
the video decoder will also guess the PTS based on the previous frames'
DTS and trigger the warning like:

  gstvideodecoder.c:3147:gst_video_decoder_prepare_finish_frame: \
  <vavp9dec0> decreasing timestame

It sets the reordered_output and makes the decoder in free run mode.

We should correct the PTS for a TU, let the non-displayed frames have
no PTS while set the correct PTS to the displayed one. Also, when the
AV1 stream has multi spatial layers, there are more than one displayed
frames inside one TU with the same PTS.

Note: If the input alignment is not TU aligned, we can not know the
exact PTS of this TU, and so we just clear the PTS of the decode only
frame and leave others unchanged.

We also correct all the PTS if the output is OBU aligned. All their
PTS and DTS are set to the input buffer's PTS.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/3182>
2022-10-21 11:16:13 +00:00
He Junyan a1f352196f av1parse: Only check the TU bound when the alignment is TU.
Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/3182>
2022-10-21 11:16:13 +00:00
He Junyan ee5d7ce075 av1parse: push all data once when input alignment not smaller than output.
When the incoming data has big alignment than the output, we do not need to
call finish_frame() and exit the current handle_frame() for each splitted
frame. We can push them all at one shot with in one handle_frame(), whcih
may improve the performance and can help us to find the edge of TU.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/3182>
2022-10-21 11:16:13 +00:00
He Junyan b7d3a219ab av1parse: Set the output buffer flags correctly.
The current code forgets to clear some flags and has some typo.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/3182>
2022-10-21 11:16:13 +00:00
Thibault Saunier dbed9978ac docs: plugins-scanner: Handle interface used for plugin API properties
Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/3236>
2022-10-21 09:14:25 +00:00
Matthew Waters a633f5d287 webrtcbin: also add rtcp-fb ccm fir for video mlines by default
In addition to the 'nack pli' already added.  Both are supported by
rtpbin/rtpsession by default already.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/3235>
2022-10-21 01:02:34 +00:00
Matthew Waters 5ddb347a23 build/gl: fix automatic dispmanx detection for rpi4
rpi4 doesn't contain dispmanx but still contains bcm_host.pc which
confuses the configure detection.  Add an explicit check for
EGL_DISPMANX_WINDOW_T to ensure that we only build with dispmanx when
the types are available.

Fixes: https://gitlab.freedesktop.org/gstreamer/gst-plugins-base/-/issues/893
Fixes: https://gitlab.freedesktop.org/gstreamer/gst-plugins-base/-/issues/952
Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/3230>
2022-10-20 22:29:16 +00:00
Sangchul Lee 0f05be382b webrtcbin: Improve documentation of 'turn-server' property
Description about how to set time-limited credentials is added.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/3229>
2022-10-20 15:30:07 +00:00
Seungha Yang 09fc6f14f3 docs: plugin-scanner: Stop updating "long-name" metadata
The "long-name" value can be environment dependent, and it's not
actually used by our documentation.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/3208>
2022-10-20 10:38:19 +00:00
Seungha Yang fcde6af7df parse: Adjust debug log level
That's not an error case at all

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/3228>
2022-10-19 18:43:53 +00:00
Matthew Waters 5fed85c465 docs/glcontextconfig: rename title to not be GstGLContext
Can be confusing havint two pages that both have GstGLContext as the
title.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/3227>
2022-10-19 13:01:06 +00:00
Sebastian Dröge c7080b1626 {element,deviceprovider}factory: g_object_new() can't ever return NULL
So treat it as the assertion it is.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/3226>
2022-10-19 12:09:45 +00:00
Sebastian Dröge 4f03dbd37c elementfactory: Handle element factory loading failure in gst_element_factory_create_valist() not as assertion
In gst_element_factory_create_with_properties() it is a normal error
path so let's keep this consistent.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/3226>
2022-10-19 12:09:45 +00:00
Sebastian Dröge 3ceee904dc gst: Use G_TYPE_INVALID instead of 0 for GTypes
Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/3226>
2022-10-19 12:09:45 +00:00
Mathieu Duponchelle f0598767f0 tests: parse-launch: remove assignment order tests
These tests relied on setting the name of an element twice to verify
that the last one set took precedence, however name is a CONSTRUCT property
and the parser now errors out when such properties are set twice, in
g_object_new_with_properties .

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/3026>
2022-10-19 11:21:04 +00:00
Mathieu Duponchelle c2f890aba7 parse: refactor to make use of gst_element_factory_make_with_properties
Instead of creating the element first, then setting properties and
presets, we gather those and construct the element with the properties.

This means users of gst_parse_launch can now set construct-only
properties.

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

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/3026>
2022-10-19 11:21:04 +00:00
Bunio_FH 095bca9bdb gstminiobject: shares capacity increase
during the MSE (WebKit) tests from Apple suite:
https://hls-streaming.cdn-apple.com/hls_conformance/dist/v1.1/index.html?pretty=true&whitelist=MSE%20Suite
webkit attempts to add a single audio buffer containing ~35.5k frames.
when corresponding GstSamples are pulled buffer is being referenced
more than object capacity allows: 2^15-1. since the case could be considered
malformed a surgical patch is applied to increase the capacity.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/3221>
2022-10-19 10:16:05 +00:00
Mathieu Duponchelle 11c74ccec6 fake{video|audio}sink: don't proxy properties at instance init.
Instead proxy properties from the GstBaseSink class at class_init time,
and duplicate the rest of the fakesink properties manually.

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

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/3073>
2022-10-19 09:12:11 +00:00
Jordan Petridis 75872c802b cdparanoia: Ignore compiler warning coming from the cdparanoia header
When trying to build the plugin, GCC starts complaining about issues
with one of the cdparanoia headers and it block us from being able
to build the plugin with Werror.

The current warning in the header look like this:

```
[1/2] Compiling C object subprojects/gst-plugins-base/ext/cdparanoia/libgstcdparanoia.so.p/gstcdparanoiasrc.c.o
In file included from ../subprojects/gst-plugins-base/ext/cdparanoia/gstcdparanoiasrc.h:37,
                 from ../subprojects/gst-plugins-base/ext/cdparanoia/gstcdparanoiasrc.c:31:
/usr/include/cdda/cdda_interface.h:164:3: warning: initialization discards ‘const’ qualifier from pointer target type [-Wdiscarded-qualifiers]
  164 |   "Success",
      |   ^~~~~~~~~
...
/usr/include/cdda/cdda_interface.h:163:14: warning: ‘strerror_tr’ defined but not used [-Wunused-variable]
  163 | static char *strerror_tr[]={
      |              ^~~~~~~~~~~
[2/2] Linking target subprojects/gst-plugins-base/ext/cdparanoia/libgstcdparanoia.so
```

Last release of cdparanoia was in 2008, so our best bet for the
time is to ignore the warnings.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/2722>
2022-10-19 08:18:45 +00:00