Commit graph

607 commits

Author SHA1 Message Date
He Junyan
e11d94c576 h265parse: Add the missing timestamp when splitting a frame.
When splitting a frame, the gst_buffer_copy_region() does not copy
the timestamp correctly for sub frames when the offset is not 0.
We still need those timestamps for each output sub frame.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/4025>
2023-02-21 16:03:58 +00:00
He Junyan
f4bb5123e4 h264parse: Add the missing timestamp when splitting a frame.
When splitting a frame, the gst_buffer_copy_region() does not copy
the timestamp correctly for sub frames when the offset is not 0.
We still need those timestamps for each output sub frame.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/4025>
2023-02-21 16:03:58 +00:00
Philippe Normand
f12769b860 wpe: Logging fixes for the WebExtension
Using logging macros without a `GST_CAT_DEFAULT` in scope leads to critical
warnings.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/4021>
2023-02-21 12:41:14 +00:00
Matthew Waters
e3674a3e42 ccconverter: don't debug a potentially freed filter caps
Fixes a use-after-free

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/4012>
2023-02-21 10:09:15 +00:00
Mengkejiergeli Ba
ca2f5731ff av1parser, h265parser: Fix some code defects
Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/4002>
2023-02-20 11:26:37 +00:00
Piotr Brzeziński
87158bd6cd vtdec: Fix not waiting for async frames when flushing
This was causing incorrect output when seeking, especially
when used with a multithreaded source like `videotestsrc n-threads=2`.
It should now correctly wait for frames still being processed by VT
while vtdec is flushing.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/3939>
2023-02-11 13:31:42 +00:00
Nirbheek Chauhan
46719759bc nvcodec: Log readable errors when initializing CUDA
It is really difficult for people to figure out why nvcodec has
0 features. Even the debug log is cryptic. Also make sure the errors
go to the ERROR log level, which is more likely to be enabled by
default.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/3796>
2023-02-10 21:46:40 +00:00
Nirbheek Chauhan
69402f0b05 nvcodec: Fix reporting of CuDeviceGetCount error
cuda_ret is was always going to be CUDA_SUCCESS in the error log.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/3796>
2023-02-10 21:46:40 +00:00
Sebastian Dröge
9ee04be643 aom: Include stream-format and alignment in the AV1 caps
The decoder does not work with arbitrary alignment and annexb stream
format and the encoder can give the information that it outputs
obu-stream/tu to downstream.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/3875>
2023-02-08 10:11:14 +00:00
Edward Hervey
854beabd20 closedcaption: Don't leak caps event
All events that we handle should be unreffed

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/3907>
2023-02-07 17:28:25 +00:00
He Junyan
23c45c269f va: Avoid the array index overflow when filling 8x8 scaling list.
The VA API has not defined the scaling list entries for U/V planes
for the 4:4:4 stream. In fact, we do not meet the 4:4:4 format output
for H264 so far, and scaling list is not used frequently, so we just
print out some warning and ignore these scaling list values.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/3879>
2023-02-02 10:22:33 +00:00
Seungha Yang
864f895e1b nvvp9dec: Fix return value
It should return GstFlowReturn value, not boolean

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/3876>
2023-02-02 02:08:16 +00:00
Seungha Yang
19238bdc6f mpegpsdemux: Ignore DTS if PTS < DTS
It's possibly timestamp rollover case. But PTS < DTS is already
invalid case anyway.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/3834>
2023-01-28 12:58:00 +00:00
Seungha Yang
1f45b0e7e3 wasapi2src: Fix loopback capture on Windows 10 Anniversary Update
... or older. Work around an OS bug that loopback capture
device doesn't notify event.

Fixes: https://gitlab.freedesktop.org/gstreamer/gstreamer/-/issues/1738
Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/3809>
2023-01-26 16:07:43 +00:00
Tim-Philipp Müller
8b32e0f57a gst-plugins-bad: update translations
Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/3764>
2023-01-21 11:15:58 +00:00
Seungha Yang
af97e98315 d3d11memory: Fix potential crash in GstD3D11PoolAllocator
Allocator object can be the final refcount holder, when a GstD3D11Memory
is being released. Do unref allocator once there's no more
remaining operation.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/3726>
2023-01-13 19:33:56 +00:00
Seungha Yang
230ecf3cd9 d3d11memory: Remove GstD3D11PoolAllocator::dispose
Clear GstD3D11Device object in finalize method as well

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/3726>
2023-01-13 19:33:56 +00:00
Rodrigo Bernardes
fe90b08d2f dvbbasebin: don't rely on g_key_file_get_(integer|uint64) return
instead check if an error was returned, and fail if any

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/3701>
2023-01-10 01:55:35 +00:00
Olivier Crête
7cb4f36c42 srt: Avoid crash on unknown option
Use the correct field that is null instead of the struct value which
never is.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/3682>
2023-01-04 15:23:15 +00:00
Yatin Maan
7cf130801b aom: av1enc: Ensure that input pts is strictly increasing
Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/3649>
2022-12-27 22:42:56 +01:00
Yatin Maan
ab7b1c8d62 aom: av1enc: Fix pts unit
Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/3649>
2022-12-27 22:42:49 +01:00
He Junyan
78d1f5d026 va: Delay the VAProcPipelineCaps query after context created.
The VAAPI vaQueryVideoProcPipelineCaps() requires the context as the
parameter. So far, we always pass VA_INVALID_ID and it can succeed.
But the API does not say that and in theory, a valid context is required.
Now the new platform really needs a valid context and so we have to
delay that query until the context is created.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/3620>
2022-12-22 02:29:46 +00:00
Tim-Philipp Müller
4a99827d4c Back to development 2022-12-20 00:39:36 +00:00
Tim-Philipp Müller
f7806a854a Release 1.20.5 2022-12-19 23:34:46 +00:00
Tim-Philipp Müller
554efedd44 Update ChangeLogs for 1.20.5 2022-12-19 23:34:34 +00:00
Edward Hervey
f9c2df6f9a mpegts: Always clear packetizer on DISCONT push mode
If a discontinuity is detected in push mode, we need to clear the cached section
observations since they might have potentially changed.

This was only done properly when operating with TIME segments (dvb, udp,
adaptive demuxers, ...) but not with BYTE segments (such as with custom app/fd
sources).

We still don't want to flush out the PCR observations, since this might be
needed for seeking in push-based BYTE sources.

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

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/3600>
2022-12-19 10:16:43 +00:00
Seungha Yang
3f3604f4e2 d3d11videosink: Fixing focus lost on desktop layout change
Watch all message on the window thread, instead of internal window only.
Otherwise, some global window messages, such as desktop layout change,
wouldn't be handled by our window.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/3594>
2022-12-17 13:26:23 +00:00
Nirbheek Chauhan
3cb73e02aa avfvideosrc: Report latency when doing screen capture
There is no `device` when doing screen capture, but there is always an
`input`, so use that to decide when we can reply to a latency query.
Without this, the latency query just fails.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/3591>
2022-12-17 01:28:00 +00:00
Seungha Yang
79672414cc d3d11videosink: Call ShowWindow() from window thread
... when rendering on external HWND. ShowWindow() will cause
synchronous message passing to window thread and then can be blocked.
At the same time, window thread can wait for GStreamer thread.
Instead of the synchronous call, queue the task to window message
and performs from the window thread.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/3588>
2022-12-16 19:06:39 +00:00
Seungha Yang
095ee27bb5 d3d11videosink: Fix deadlock when parent window is busy
Deadlock sequence:
* From a streaming thread, d3d11videosink sends synchronous message
  to the parent window, so that internal (child) window can be
  constructed on the parent window's thread
* App thread (parent window thread) is waiting for pipeline's
  state change (to GST_STATE_NULL) but streaming thread is
  blocked and waiting for app thread

To avoid the deadlock, GstD3D11WindowWin32 should send message
to the parent window asynchronously.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/3573>
2022-12-16 14:26:08 +00:00
Seungha Yang
7a7de1aafc d3d11videosink: Error out if RTV is unavailable
Add RTV pointer validation

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/3573>
2022-12-16 14:26:08 +00:00
Seungha Yang
a0526b4ac2 d3d11videosink: Protect window with lock at every place
Access to the object should be thread safe to support runtime
property update

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/3573>
2022-12-16 14:26:08 +00:00
A. Wilcox
551dd7df38 mpegts: Handle when iconv doesn't support ISO 6937
Systems like musl libc don't support ISO 6937 in iconv.  This ensures
that the MPEG-TS plugin can cope with that.  There is existing support
in the plugin for other methods, so it seems to have been the original
intent anyway.

Fixes: #1314
Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/3563>
2022-12-12 13:55:18 +00:00
Edward Hervey
5b4653756e mpegts: Check continuity counter on section streams
This wasn't really done, and is needed in order to detect potential section
changes for sections that have got identical information (such as when switching
between streams that have the same PAT/PMT pid and subtable information).

Other checks exist in tsbase to detect if the "new" PAT/PMT really is an update or not.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/3556>
2022-12-11 00:37:18 +00:00
Marek Olejnik
14f6dbc39a h265decoder: Do not abort when failed to prepare ref pic set
Currently the element calls abort when failed to prepare reference
picture set. This can happent when the input stream is somehow
corrupted, like a rtsp strem with lost packets. Now it will only
return with GST_FLOW_ERROR instead of terminating whole process.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/3542>
2022-12-08 02:12:37 +09:00
Sebastian Dröge
fbffce6d0d dvbsubenc: Forward GAP events as-is if we wouldn't produce an end packet and are not in the middle of an existing subtitle
An end packet is only produced once for the last subtitle, so multiple
GAP events between subtitles would result only in a single end packet
and nothing else otherwise. This would potentially starve downstream
then, so instead forward the GAP events in that case.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/3536>
2022-12-07 10:41:39 +00:00
Nirbheek Chauhan
c4ed258573 directshow: Fix build error with glib 2.75 and newer
Starting with glib 2.75, `NULL` is `nullptr`, which cannot be
implicitly coerced to `0`, unlike `NULL`. So explicitly pass `0`.

```
[3206/4524] Compiling C++ object subprojects/gst-plugins-bad/sys/directshow/gstdirectshow.dll.p/dshowvideosink.cpp.obj
FAILED: subprojects/gst-plugins-bad/sys/directshow/gstdirectshow.dll.p/dshowvideosink.cpp.obj
"cl" "-Isubprojects\gst-plugins-bad\sys\directshow\gstdirectshow.dll.p" "-Isubprojects\gst-plugins-bad\sys\directshow" "-I..\subprojects\gst-plugins-bad\sys\directshow" "-Isubprojects\gst-plugins-bad" "-I..\subprojects\gst-plugins-bad" "-Isubprojects\gst-plugins-base\gst-libs" "-I..\subprojects\gst-plugins-base\gst-libs" "-Isubprojects\gstreamer\libs" "-I..\subprojects\gstreamer\libs" "-Isubprojects\gstreamer" "-I..\subprojects\gstreamer" "-Isubprojects\orc" "-I..\subprojects\orc" "-I..\subprojects\gst-plugins-bad\sys\directshow\strmbase\baseclasses" "-Isubprojects\gst-plugins-base\gst-libs\gst\video" "-Isubprojects\gstreamer\gst" "-Isubprojects\gst-plugins-base\gst-libs\gst\audio" "-Isubprojects\gst-plugins-base\gst-libs\gst\tag" "-IC:/gst-install/include/glib-2.0" "-IC:/gst-install/lib/glib-2.0/include" "-IC:/gst-install/include" "/MD" "/nologo" "/showIncludes" "/utf-8" "/W2" "/EHsc" "/O2" "/Zi" "/wd4018" "/wd4146" "/wd4244" "/wd4305" "/utf-8" "/we4002" "/we4003" "/we4013" "/we4020" "/we4027" "/we4029" "/we4033" "/we4045" "/we4047" "/we4053" "/we4062" "/we4098" "/we4101" "/we4189" "/utf-8" "-D_MBCS" "/wd4189" "/wd4456" "/wd4701" "/wd4703" "/wd4706" "/wd4996" "-DHAVE_CONFIG_H" "/Fdsubprojects\gst-plugins-bad\sys\directshow\gstdirectshow.dll.p\dshowvideosink.cpp.pdb" /Fosubprojects/gst-plugins-bad/sys/directshow/gstdirectshow.dll.p/dshowvideosink.cpp.obj "/c" ../subprojects/gst-plugins-bad/sys/directshow/dshowvideosink.cpp
../subprojects/gst-plugins-bad/sys/directshow/dshowvideosink.cpp(62): warning C5051: attribute 'noinline' requires at least '/std:c++20'; ignored
../subprojects/gst-plugins-bad/sys/directshow/dshowvideosink.cpp(123): error C2664: 'LRESULT SendMessageA(HWND,UINT,WPARAM,LPARAM)': cannot convert argument 3 from 'nullptr' to 'WPARAM'
../subprojects/gst-plugins-bad/sys/directshow/dshowvideosink.cpp(123): note: A native nullptr can only be converted to bool or, using reinterpret_cast, to an integral type
C:\Program Files (x86)\Windows Kits\10\include\10.0.19041.0\um\winuser.h(3690): note: see declaration of 'SendMessageA'
../subprojects/gst-plugins-bad/sys/directshow/dshowvideosink.cpp(635): error C2664: 'BOOL SystemParametersInfoA(UINT,UINT,PVOID,UINT)': cannot convert argument 2 from 'nullptr' to 'UINT'
../subprojects/gst-plugins-bad/sys/directshow/dshowvideosink.cpp(635): note: A native nullptr can only be converted to bool or, using reinterpret_cast, to an integral type
C:\Program Files (x86)\Windows Kits\10\include\10.0.19041.0\um\winuser.h(13153): note: see declaration of 'SystemParametersInfoA'
../subprojects/gst-plugins-bad/sys/directshow/dshowvideosink.cpp(1593): error C2664: 'LRESULT SendMessageA(HWND,UINT,WPARAM,LPARAM)': cannot convert argument 3 from 'nullptr' to 'WPARAM'
../subprojects/gst-plugins-bad/sys/directshow/dshowvideosink.cpp(1593): note: A native nullptr can only be converted to bool or, using reinterpret_cast, to an integral type
C:\Program Files (x86)\Windows Kits\10\include\10.0.19041.0\um\winuser.h(3690): note: see declaration of 'SendMessageA'
```

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/3533>
2022-12-07 00:56:57 +00:00
Seungha Yang
d87d33d3fe mfvideosrc: Fix buffer leak
The allocated buffer should be released

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/3496>
2022-12-01 00:02:19 +00:00
Seungha Yang
7300e51fbe mediafoundation: Chain up from GObject::constructed
... so that GstTracer can trace it

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/3496>
2022-12-01 00:02:19 +00:00
Seungha Yang
5996fad734 d3d11: Use correct ref/unref methods
Those objects are GstObject subclasses

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/3496>
2022-12-01 00:02:19 +00:00
He Junyan
d6b4d7a071 h264parser: Fix a typo in pred_weight_table parsing.
When setting default values, the reference list number of l1 is wrong.

Fix: https://gitlab.freedesktop.org/gstreamer/gstreamer-vaapi/-/issues/336
Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/3468>
2022-11-25 17:27:29 +01:00
Sebastian Dröge
efc6d5d461 dvbsubenc: Write Display Definition Segment if a non-default width/height is used
Otherwise it can't be rendered by dvbsuboverlay or ffmpeg at least.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/3459>
2022-11-23 12:28:43 +00:00
Edward Hervey
080818140d Revert "mpegtspacketizer: memcmp potentially seen_before data"
This reverts commit fcad4cc646.

This was wrong is so many ways.

* The memcmp was badly used (it should use == 0 to check the data is identical,
  and not != 0)
* There was no boundary checks on the present stream section_data when passing
  it to memcmp.
* The return value should have been TRUE (i.e. we have done all checks, none of
  them failed, therefore the section has been seen before)
* stream->section_data would *always* be NULL if the section had already been
  processed

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

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/3427>
2022-11-19 00:41:43 +00:00
Edward Hervey
d0ed03fe3b mpegts: Check is program is identical before updating
There is no need to update the program if it's identical :)

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/3427>
2022-11-19 00:41:43 +00:00
Seungha Yang
f74e856255 d3d11screencapturesrc: Specify PAR 1/1 to template caps
... otherwise PAR can be wrongly signalled during the negotiation

Fixing below pipeline when desktop resolution is not 640x480
gst-launch-1.0.exe \
  d3d11screencapturesrc ! videoscale !
  video/x-raw,width=640,height=480,pixel-aspect-ratio=1/1 ! d3d11videosink

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/3372>
2022-11-15 11:26:09 +00:00
Jan Schmidt
a44530df57 aesdec: Fix padding removal for per-buffer-padding=FALSE
When per-buffer-padding is FALSE, the OpenSSL context needs
to be told to remove any padding at the end of the ciphertext

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

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/3411>
2022-11-15 04:54:53 +00:00
Jan Alexander Steffens (heftig)
8c1243a595 rtmp2: Improve error messages
Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/3368>
2022-11-15 02:38:32 +00:00
Jan Alexander Steffens (heftig)
a4121afebb rtmp2/connection: Pass triggering GError in 'error' signal
Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/3368>
2022-11-15 02:38:32 +00:00
Jan Alexander Steffens (heftig)
7a80611c3a rtmp2/connection: Pass triggering GError to _emit_error
Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/3368>
2022-11-15 02:38:32 +00:00
Jan Alexander Steffens (heftig)
90f39a4c7e rtmp2/connection: Discern reasons for cancelling all commands
Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/3368>
2022-11-15 02:38:32 +00:00