Seungha Yang [Sun, 8 Mar 2020 07:03:35 +0000 (16:03 +0900)]
d3d11h264dec: Make use of max_dpb_size passed by baseclass
Most likely this modification can save GPU memory.
Seungha Yang [Wed, 26 Feb 2020 11:24:14 +0000 (20:24 +0900)]
d3d11h265dec: Fix scaling list parsing
Scaling list can be signalled via sps or pps. Decoder should check
both of them.
Seungha Yang [Wed, 26 Feb 2020 08:44:52 +0000 (17:44 +0900)]
d3d11h265dec: Properly signal the ucNumDeltaPocsOfRefRpsIdx
ucNumDeltaPocsOfRefRpsIdx should be the NumDeltaPocs[RefRpsIdx].
Seungha Yang [Wed, 26 Feb 2020 08:33:59 +0000 (17:33 +0900)]
h265parser: Store NumDeltaPocs of reference for hardware accelerators
That's the value of NumDeltaPocs[RefRpsIdx] and we might be able to derive
the value from given sps and slice header.
Because well known hardware implementations refer to the value, however,
storing the value makes things easier.
Following is the list of hardware implementations
* DXVA2: ucNumDeltaPocsOfRefRpsIdx
* NVDEC/VDPAU: NumDeltaPocsOfRefRpsIdx
Seungha Yang [Mon, 24 Feb 2020 11:53:49 +0000 (20:53 +0900)]
h265decoder: Fix for output and removal picture from DPB
See C.5.2.2 Output and removal of pictures from the DPB.
If the number of pictures in the DPB is greater than or equal to
sps_max_dec_pic_buffering_minus1[HighestTid] + 1, then the picture
should be outputted.
Seungha Yang [Fri, 6 Mar 2020 07:40:50 +0000 (16:40 +0900)]
meson: codecs: Don't install header
This library is not intended to be public. APIs are likely to
change over time and should not be disclosed to people yet.
Seungha Yang [Thu, 5 Mar 2020 05:40:28 +0000 (14:40 +0900)]
h264decoder: Rename some internals
No more a part of d3d11 implementation
Seungha Yang [Thu, 5 Mar 2020 05:35:14 +0000 (14:35 +0900)]
vp9decoder: Update document
s/GstH264Picture/GstVp9Picture/g and minor update since this baseclass
is no more d3d11 specific one.
Seungha Yang [Thu, 5 Mar 2020 05:29:22 +0000 (14:29 +0900)]
codecs: Change output_picture() to mandatory implementation
GstVideoCodecFrame is expected to be consumed by subclass
per output_picture(). So the implementation cannot be optional.
Seungha Yang [Thu, 5 Mar 2020 08:23:34 +0000 (17:23 +0900)]
h265decoder: Port to nal type classification macro
... and remove namespaceless macro methods from baseclass
Seungha Yang [Thu, 5 Mar 2020 06:18:35 +0000 (15:18 +0900)]
h265parser: Add helper macro for nal type classification
Add some macros to remove code duplication and to make it more readable
Thibault Saunier [Thu, 5 Mar 2020 12:17:49 +0000 (09:17 -0300)]
transcodebin: Avoid elements name duplication
By just letting GStreamer choose a good name
Nicolas Dufresne [Tue, 3 Mar 2020 20:21:07 +0000 (15:21 -0500)]
d3d11: Use gst_video_decoder_get_frame()
Now that the system_frame_number is saved on the pictures we can use
gst_video_decoder_get_frame() helper instead of getting the full list
and looping over it.
Nicolas Dufresne [Sat, 15 Feb 2020 02:50:15 +0000 (21:50 -0500)]
h264picture: Add system_frame_num
This allow cross-referencing GstH264Picture and GstVideoCodecFrame.
Nicolas Dufresne [Sat, 15 Feb 2020 02:49:12 +0000 (21:49 -0500)]
h264parser: Add some fixmes
Some of the syntax element do not use the spec name, which makes them harder
to find in the spec.
Nicolas Dufresne [Thu, 13 Feb 2020 04:48:16 +0000 (23:48 -0500)]
codecs: Pass the max_dpb_size to new_segment virtual
On new_segment, the decoder is expected to negotiate. The decoder may want to
pre-allocate the needed buffers. Pass the max_dpb_size as this is needed to
determin how many buffers should be allocated.
Nicolas Dufresne [Sun, 9 Feb 2020 16:20:16 +0000 (11:20 -0500)]
codecs: Add missing auto cleanup funcs
Nicolas Dufresne [Fri, 31 Jan 2020 22:54:57 +0000 (17:54 -0500)]
Move CODEC base classes into it's own library
This introduce a library which contains a set of base classes which
handles the parsing and the state tracking for the purpose of decoding
different CODECs. Currently H264, H265 and VP9 are supported. These
bases classes are used to decode with low level decoding API like DXVA,
NVDEC, VDPAU, VAAPI and V4L2 State Less decoders. The new library is
named gstreamer-codecs-1.0 / libgstcodecs.
Jan Schmidt [Wed, 4 Mar 2020 17:18:03 +0000 (04:18 +1100)]
webrtc: Don't crash in ICE gathering
Fix a crash collating ICE gathering states if there are
unassociated transceivers in the list with no TransportStream
Guillaume Desmottes [Tue, 3 Mar 2020 09:26:47 +0000 (14:56 +0530)]
transcodebin: add converters before filters
User doesn't have any guarantee about the actual raw format decodebin will
produce so their filters may or may not fit.
Fix #1228
Guillaume Desmottes [Tue, 3 Mar 2020 09:51:31 +0000 (15:21 +0530)]
transcodebin: fix logs when failing to link filter
- Display caps of the pad we actually tried to link.
- Use the template caps as the filter is likely to not have any caps set
yet.
- Log pad name as well.
Thibault Saunier [Fri, 21 Feb 2020 16:12:39 +0000 (13:12 -0300)]
timecodestamper: Add seeking support
The approach is quite simple and doesn't take all use cases into account,
it only implements support when we are using the internal timecode we
create ourself.
Also the way we compute the sought frame count is naive, but it works
for simple cases.
Jan Schmidt [Mon, 2 Mar 2020 16:39:50 +0000 (03:39 +1100)]
webrtc: Unblock transportreceivebin for send-only bundled streams
If there is any active mline in a bundle, we need to unblock
the transportreceivebin for DTLS setup and RTCP reception,
otherwise no data can ever start flowing.
Fixes https://gitlab.freedesktop.org/gstreamer/gst-plugins-bad/issues/1206
Jan Schmidt [Fri, 28 Feb 2020 14:47:52 +0000 (01:47 +1100)]
webrtc: Remove RECEIVE_STATE_DROP from transportreceivebin
As per discussion in the bug, remove the drop state from transportreceivebin.
Dropping data is necessary, but for bundled config, needs to happen
further downstream after mixed flows have been separated.
Also support switching back to BLOCK from PASS state.
https://gitlab.freedesktop.org/gstreamer/gst-plugins-bad/issues/1206
Dominique Leuenberger [Thu, 27 Feb 2020 13:54:13 +0000 (14:54 +0100)]
build: Fix build on systems with wayland-client headers in non-default location
Add a missing dependency to wl_client_dep for the wayland build. Some distros
have the wayland-client headers not installed in /usr/include (which is perfectly
valid, the pkg-config .pc file gives the right feedback).
Seungha Yang [Mon, 2 Mar 2020 06:22:49 +0000 (15:22 +0900)]
d3d11vp9dec: Add support for reverse playback
This commit moves parsing code for superframe and frame header into
handle_frame() method, and removes parse() implementation from vp9decoder
baseclass.
The combination of
- multiple frames are packed in a given input buffer (i.e., superframe)
- reverse playback
seems to be complicated and also it doesn't work as intended in some case
Jan Alexander Steffens (heftig) [Tue, 3 Mar 2020 09:49:08 +0000 (10:49 +0100)]
rtmp2: Only grab stats on close when connection exists
If the connection attempt failed, self->connection is NULL.
Matthew Read [Sat, 29 Feb 2020 12:49:06 +0000 (12:49 +0000)]
openslessink: Allow openslessink to handle 48kHz streams.
The most common audio sample rate in AV streams is 48kHz, and the most
common device output sample rate is 48kHz. This allows handing of 48kHz
input streams without resampling.
Remove comments about avoiding the use of 48kHz.
Heinrich Kruger [Thu, 27 Feb 2020 14:10:16 +0000 (14:10 +0000)]
decklink: Add support for 2K DCI video modes
Extend the video modes supported by the decklink plugin to include 2K
DCI video modes.
Heinrich Kruger [Thu, 27 Feb 2020 11:32:17 +0000 (11:32 +0000)]
decklink: Update Decklink SDK to 10.11.4
This change is needed to support 2K DCI video modes.
Version 10.8 of the Decklink SDK supported DCI video modes for output
only. This updated version drops that restriction.
The current latest version of the Decklink SDK is 11.5, however
the gstreamer decklink plugin is not compatible with API changes
introduced in version 11 of the SDK. Therefore I have opted to upgrade
to the latest 10.x version instead.
Matthew Waters [Tue, 3 Mar 2020 03:27:32 +0000 (14:27 +1100)]
dash: add build-dep on pbutils
Fixes dependency issues:
FAILED: subprojects/gst-plugins-bad/ext/dash/8bd0b95@@gstdash@sha/gstdashsink.c.obj
cl @subprojects/gst-plugins-bad/ext/dash/8bd0b95@@gstdash@sha/gstdashsink.c.obj.rsp
C:\builds\ystreet\gst-plugins-base\gst-build\subprojects\gst-plugins-base\gst-libs\gst/pbutils/pbutils.h(30): fatal error C1083: Cannot open include file: 'gst/pbutils/pbutils-enumtypes.h': No such file or directory
Matthew Waters [Tue, 18 Feb 2020 03:02:14 +0000 (14:02 +1100)]
vulkan/window/xcb: implement keyboard support
Matthew Waters [Mon, 17 Feb 2020 04:09:58 +0000 (15:09 +1100)]
vulkan/window/xcb: implement mouse event support
Matthew Waters [Mon, 17 Feb 2020 04:08:47 +0000 (15:08 +1100)]
vulkan/sink: implement GstNavigation support
Matthew Waters [Mon, 17 Feb 2020 04:07:10 +0000 (15:07 +1100)]
vulkan/swapper: add get_surface_rectangles
Retrieve the input, output and covered rectangles.
Matthew Waters [Mon, 17 Feb 2020 04:05:49 +0000 (15:05 +1100)]
vulkan/display: implement thread-safe find_window()
Matthew Waters [Mon, 17 Feb 2020 04:03:34 +0000 (15:03 +1100)]
vulkan/window: add support for mouse/keyboard events
Seungha Yang [Mon, 2 Mar 2020 11:55:29 +0000 (20:55 +0900)]
d3d11videosink: Clarify the meaning of various width and height variables
* Remove redundant variables for width/height and par from GstD3D11Window.
GstVideoInfo holds all the values.
* Don't need to pass par to gst_d3d11_window_prepare().
It will be parsed from caps again
* Remove duplicated math
Fixing regression of the commit
9dada901083fec3276cb2df58785db14b87e8f22
Yeongjin Jeong [Thu, 27 Feb 2020 18:08:23 +0000 (03:08 +0900)]
d3d11vp9dec: Port to GstVP9SuperframeInfo
The vp9parser is now exposed new API for parsing superframe info.
Yeongjin Jeong [Sun, 1 Mar 2020 15:43:45 +0000 (00:43 +0900)]
tests: vp9parser: Add test parsing superframe
Yeongjin Jeong [Thu, 27 Feb 2020 18:06:47 +0000 (03:06 +0900)]
vp9parser: Add new API for parsing superframe info
Some elements are using their own implementations for superframe parsing.
To reduce redundant code, we need to add API to the parser.
Guillaume Desmottes [Thu, 27 Feb 2020 13:01:19 +0000 (18:31 +0530)]
transcodebin: mark properties as GST_PARAM_MUTABLE_READY
They are all used in the READY to PAUSED transition so should not be
changed after.
Guillaume Desmottes [Thu, 27 Feb 2020 11:46:45 +0000 (17:16 +0530)]
transcodebin: force decoding if a filter is defined
Filter operates on raw data so don't allow decodebin to produce
encoded data if one is defined.
My use case here is keeping the video stream untouched but apply a filter
on the audio one, while keeping the same audio format.
Guillaume Desmottes [Thu, 27 Feb 2020 11:33:42 +0000 (17:03 +0530)]
transcodebin: logs when inserting, or not, a filter
It's not easy atm to figure out from the logs if a filter has actually be
inserted or not.
Seungha Yang [Wed, 26 Feb 2020 07:13:21 +0000 (16:13 +0900)]
d3d11decoder: Do not print warning message if retry count is in expected range
gst_d3d11_result() will print warning message when HRESULT != S_OK.
However, since the retry is trivial stuff, check hr == E_PENDING first
and do not warn it.
Seungha Yang [Wed, 26 Feb 2020 06:55:23 +0000 (15:55 +0900)]
d3d11decoder: Check decoder status report
... and if h/w decoder reports error, increase error count.
Olivier Crête [Thu, 27 Feb 2020 23:16:27 +0000 (18:16 -0500)]
fakevideosink: Align max-lateness/processing-deadline to GstVideoSink
To emulate correctly the timing video of a real sink, let's set those
properties just like a real video sink.
Jan Schmidt [Thu, 13 Feb 2020 14:42:34 +0000 (01:42 +1100)]
webrtc: Use the dtlssrtenc rtp-sync property
Instead of synchronising at the ICE transport, do clock sync for the
RTP stream at the DTLS transport via the dtlssrtpenc rtp-sync
property. This avoids delaying RTCP while waiting until it is time
to output an RTP packet when rtcp-mux is enabled.
https://gitlab.freedesktop.org/gstreamer/gst-plugins-bad/issues/1212
Jan Schmidt [Thu, 13 Feb 2020 14:38:14 +0000 (01:38 +1100)]
gstdtlsrtpenc: Add rtp-sync property
Add an rtp-sync property which synchronises RTP streams
to the pipeline clock before passing them to funnel for
merging with RTCP.
https://gitlab.freedesktop.org/gstreamer/gst-plugins-bad/issues/1212
Nirbheek Chauhan [Thu, 27 Feb 2020 06:09:08 +0000 (11:39 +0530)]
dash: Don't use sscanf + glib format modifiers
We do not have a way to know the format modifiers to use with string
functions provided by the system. `G_GUINT64_FORMAT` and other string
modifiers only work for glib string formatting functions. We cannot
use them for string functions provided by the stdlib. See:
https://developer.gnome.org/glib/stable/glib-Basic-Types.html#glib-Basic-Types.description
F.ex.
```
../ext/dash/gstxmlhelper.c: In function 'gst_xml_helper_get_prop_unsigned_integer_64':
../ext/dash/gstxmlhelper.c:473:40: error: unknown conversion type character 'l' in format [-Werror=format=]
if (sscanf ((gchar *) prop_string, "%" G_GUINT64_FORMAT,
^~~
In file included from /builds/nirbheek/cerbero/cerbero-build/dist/windows_x86/include/glib-2.0/glib/gtypes.h:32,
from /builds/nirbheek/cerbero/cerbero-build/dist/windows_x86/include/glib-2.0/glib/galloca.h:32,
from /builds/nirbheek/cerbero/cerbero-build/dist/windows_x86/include/glib-2.0/glib.h:30,
from /builds/nirbheek/cerbero/cerbero-build/dist/windows_x86/include/gstreamer-1.0/gst/gst.h:27,
from ../ext/dash/gstxmlhelper.h:26,
from ../ext/dash/gstxmlhelper.c:22:
/builds/nirbheek/cerbero/cerbero-build/dist/windows_x86/lib/glib-2.0/include/glibconfig.h:69:28: note: format string is defined here
#define G_GUINT64_FORMAT "llu"
^
../ext/dash/gstxmlhelper.c:473:40: error: too many arguments for format [-Werror=format-extra-args]
if (sscanf ((gchar *) prop_string, "%" G_GUINT64_FORMAT,
^~~
```
In the process, we're also following the DASH MPD spec more closely
now, which specifies that ranges must follow RFC 2616 section 14.35.1:
https://tools.ietf.org/html/rfc2616#page-138
Sebastian Dröge [Wed, 26 Feb 2020 19:11:40 +0000 (21:11 +0200)]
dtls: Set a random serial number and issuer/subject in the self-signed certificates
This is also what Chrome and Firefox are doing, citing privacy concerns.
Also putting OpenWebRTC from Sweden as issuer/subject is rather
confusing.
Guillaume Desmottes [Wed, 26 Feb 2020 03:38:03 +0000 (09:08 +0530)]
transcodebin: consider 'any' as no restriction
gstreamer-rs set 'any' as default restriction which actually means 'no
restriction' so handle it as the absence of restriction.
Seungha Yang [Wed, 26 Feb 2020 04:11:30 +0000 (13:11 +0900)]
d3d11window: Set DXGI_PRESENT_ALLOW_TEARING only in fullscreen mode
The DXGI_PRESENT_ALLOW_TEARING flag might cause unexpected tearing
side effect. Setting it in fullscreen mode only seems to be
the correct usage as in the Microsoft's direct3d examples.
Guillaume Desmottes [Tue, 25 Feb 2020 15:33:06 +0000 (21:03 +0530)]
transcodebin: fix caps leak
encodecaps was leaked if the profile has restrictions.
Jan Alexander Steffens (heftig) [Tue, 25 Feb 2020 13:58:23 +0000 (14:58 +0100)]
rtmp2: Allow setting flash-version
In case the application has to deal with fussy servers. User agent
sniffing is so last decade.
Adds a property to set the Flash version on both the sink and the src.
The default stays the same (IIRC, Flash plugin for Linux from 2009).
Jan Schmidt [Fri, 14 Feb 2020 17:18:07 +0000 (04:18 +1100)]
h265parser: Skip unused bits in an SEI.
Alternative approach to
18b54f8d347030c73d8afbeaf55df57aa5acbb96
that skips all bits in a broken SEI correctly.
Stéphane Cerveau [Wed, 12 Feb 2020 16:37:46 +0000 (17:37 +0100)]
Revert "h265parser: Skip unused SEI bits differently"
This reverts commit
18b54f8d347030c73d8afbeaf55df57aa5acbb96.
Stéphane Cerveau [Tue, 11 Feb 2020 11:21:29 +0000 (12:21 +0100)]
tests: add picture timing SEI parsing
Dylan Yip [Fri, 7 Feb 2020 08:13:49 +0000 (00:13 -0800)]
h265parse: Fix offset by one error in pic timing SEI
Offset by one error causes a free/malloc error when parsing pic timing
SEI messages.
Seungha Yang [Fri, 21 Feb 2020 12:02:47 +0000 (21:02 +0900)]
d3d11decoder: Ensure the written bitstream buffer size is 128 bytes aligned
DXVA spec is saying that the size of bitstream buffer provided by hardware decoder
should be 128 bytes aligned. And also the host software decoder should
align the size of written buffer to 128 bytes. That means if the slice
(or frame in case of VP9) size is not aligned with 128 bytes,
the rest of non 128 bytes aligned memory should be zero-padded.
In addition to aligning implementation, some variables are renamed
to be more intuitive by this commit.
Haihao Xiang [Wed, 12 Feb 2020 02:24:55 +0000 (10:24 +0800)]
msdk: libva: Don't set the hint if MFX_VERSION is lower than 1025
MFX_MEMTYPE_VIDEO_MEMORY_ENCODER_TARGET is defined since MFX_VERSION
1025.
Jan Alexander Steffens (heftig) [Mon, 27 Jan 2020 14:13:58 +0000 (15:13 +0100)]
rtmp2: Expose connection stats as property
Save the stats before we destroy the connection, so we can still
retrieve them afterwards.
Jan Alexander Steffens (heftig) [Fri, 14 Feb 2020 13:53:46 +0000 (14:53 +0100)]
rtmp2: Add gst_rtmp_connection_get_stats and _get_null_stats
The former uses a thread-safe way of getting statistics from the
connection without having to protect the fields with a lock.
The latter produces a zeroed statistics structure for use when no
connection exists.
Jan Alexander Steffens (heftig) [Fri, 14 Feb 2020 11:34:44 +0000 (12:34 +0100)]
rtmp2: Count outgoing bytes and acked bytes
For statistics.
Jan Alexander Steffens (heftig) [Mon, 27 Jan 2020 15:30:20 +0000 (16:30 +0100)]
rtmp2sink: Add a property for the outgoing chunk size
Jan Alexander Steffens (heftig) [Fri, 14 Feb 2020 11:34:19 +0000 (12:34 +0100)]
rtmp2: Add gst_rtmp_connection_set_chunk_size
Jan Alexander Steffens (heftig) [Mon, 27 Jan 2020 15:22:20 +0000 (16:22 +0100)]
rtmp2: Handle outgoing set chunk/window size properly
Apply outgoing sizes only after writing the chunk to the peer. This is
important particularly for the set chunk size and allows exposing it
without threading issues.
Jan Alexander Steffens (heftig) [Mon, 27 Jan 2020 13:05:31 +0000 (14:05 +0100)]
rtmp2: Chunk messages as buffers in loop thread
Move output chunking from gst_rtmp_connection_queue_message into
gst_rtmp_connection_start_write, which effectively moves it from the
streaming thread into the loop thread.
This allows us to handle the outgoing chunk-size message (which is
generated by changing the future chunk-size property) properly, which
could come from any other thread.
Jan Alexander Steffens (heftig) [Wed, 12 Feb 2020 15:55:15 +0000 (16:55 +0100)]
rtmp2: Consistently use GstBuffer for RTMP chunks
Jan Alexander Steffens (heftig) [Wed, 12 Feb 2020 15:47:30 +0000 (16:47 +0100)]
rtmp2: Add gst_rtmp_chunk_stream_serialize_all
Serializes an RTMP message into a series of chunks, all in one buffer.
Similar to what gst_rtmp_connection_queue_message does to serialize
into a GByteArray.
Jan Alexander Steffens (heftig) [Wed, 12 Feb 2020 15:43:30 +0000 (16:43 +0100)]
rtmp2: Add gst_rtmp_output_stream_write_all_buffer_async
Similar to gst_rtmp_output_stream_write_all_bytes_async, but takes a
GstBuffer instead of a GBytes. It can also return the number of bytes
written, which might be lower in case of an error.
Jan Alexander Steffens (heftig) [Fri, 14 Feb 2020 11:28:43 +0000 (12:28 +0100)]
rtmp2: Improve handling incoming set chunk/window size
Reject out-of-spec sizes and warn about suspiciously small sizes.
Jan Alexander Steffens (heftig) [Fri, 14 Feb 2020 13:26:27 +0000 (14:26 +0100)]
rtmp2: Lock self->lock before OBJECT_LOCK
OBJECT_LOCK is used to protect property access only. self->lock is
used to access the RtmpConnection, mostly between the streaming thread
and the loop thread.
To avoid deadlocks involving these two locks, we obey a lock order:
If both self->lock and OBJECT_LOCK are needed, self->lock must be locked
first. Clarify this.
Jan Alexander Steffens (heftig) [Fri, 14 Feb 2020 11:20:32 +0000 (12:20 +0100)]
rtmp2: Reject oversized messages
We only have 24 bits for the size, so reject anything larger.
Jan Alexander Steffens (heftig) [Fri, 14 Feb 2020 10:49:23 +0000 (11:49 +0100)]
rtmp2: Count in_bytes_acked instead of in_bytes_unacked
This is nicer for statistics.
Jan Alexander Steffens (heftig) [Wed, 12 Feb 2020 17:27:56 +0000 (18:27 +0100)]
rtmp2: rtmpconnection: Use more appropriate size types
- guint32 for chunk size and window size
- guint64 for running counters
Jan Alexander Steffens (heftig) [Wed, 12 Feb 2020 15:55:45 +0000 (16:55 +0100)]
rtmp2: Add a g_return_val_if_fail
Jan Alexander Steffens (heftig) [Wed, 12 Feb 2020 15:49:45 +0000 (16:49 +0100)]
rtmp2: Replace explicit unref with g_main_context_invoke_full
Jan Alexander Steffens (heftig) [Mon, 27 Jan 2020 14:27:28 +0000 (15:27 +0100)]
rtmp2: rtmpconnection: Use GST_*_OBJECT logging
GstRtmpConnection isn't a GstObject with a name or path, but we still
get the GObject's type and address.
Marc Leeman [Fri, 21 Feb 2020 10:33:35 +0000 (11:33 +0100)]
rist: fix two minor memory leaks
Marc Leeman [Wed, 19 Feb 2020 16:07:35 +0000 (17:07 +0100)]
rtpmanagerbad: fix two minor memory leaks
Marc Leeman [Wed, 19 Feb 2020 16:07:23 +0000 (17:07 +0100)]
rtpmanagerbad: reduce lock in rtpsink
Marc Leeman [Wed, 19 Feb 2020 16:06:18 +0000 (17:06 +0100)]
rtpmanagerbad: documentation comment fix
Jan Schmidt [Thu, 20 Feb 2020 16:39:14 +0000 (03:39 +1100)]
webrtc: Configure transportsendbin latency internally
Add latency configuration logic to transportsendbin to
isolate it from the overall pipeline latency. That means that
it configures minimum latency internally based on the
latency query, and sends a latency event upstream that
matches.
Fixes https://gitlab.freedesktop.org/gstreamer/gst-plugins-bad/issues/1209
Seungha Yang [Thu, 20 Feb 2020 07:19:09 +0000 (16:19 +0900)]
d3d11decoder: Add padding space on decoder output view when it's not aligned
Most H/W decoders have required alignment and dxva is also the case.
Seungha Yang [Fri, 14 Feb 2020 16:23:32 +0000 (01:23 +0900)]
d3d11decoder: Register elements per GPU device with capability check
This implementation is similar to what we've done for nvcodec plugin.
Since supported resolution, profiles, and formats are device dependent ones,
single template caps cannot represent them, so this modification
will help autoplugging and fallback.
Note that the legacy gpu list and list of resolution to query were
taken from chromium's code.
Seungha Yang [Mon, 17 Feb 2020 06:04:28 +0000 (15:04 +0900)]
d3d11device: Fix typo
s/vender/vendor
Seungha Yang [Fri, 14 Feb 2020 11:27:28 +0000 (20:27 +0900)]
d3d11device: Adjust debug level for when _new() fails
gst_d3d11_device_new might be used to enumerate device.
Matthew Waters [Thu, 6 Feb 2020 05:39:06 +0000 (16:39 +1100)]
vkswapper: keep a reference on the input buffer until present is finished
Otherwise, there may be a very small period of time where the buffer can
be freed while being presented.
Jan Schmidt [Fri, 14 Feb 2020 01:52:30 +0000 (12:52 +1100)]
webrtc: Merge ICE candidates to local descriptions
When emitting ICE candidates, also merge them to the local and
pending description so they show up in the SDP if those are
retrieved from the current-local-description and
pending-local-description properties.
https://gitlab.freedesktop.org/gstreamer/gst-plugins-bad/issues/676
Seungha Yang [Sun, 16 Feb 2020 08:11:29 +0000 (17:11 +0900)]
d3d11videosink: Ensure upload staging texture to fallback render texture
gst_video_frame_copy will copy input frame to stating texture
of fallback frame. Then, we need to map fallback texture with GST_MAP_D3D11
flag to upload the staging texture to render texture. Otherwise
the render texture wouldn't be updated.
Seungha Yang [Thu, 13 Feb 2020 12:19:37 +0000 (21:19 +0900)]
d3d11decoder: Fix copying decoder view to staging
Source texture (decoder view) might be larger than destination (staging) texture.
In that case, D3D11_BOX structure should be passed to CopySubresourceRegion method
in order to specify the exact target area.
Sebastian Dröge [Wed, 12 Feb 2020 15:50:53 +0000 (17:50 +0200)]
webrtcbin: Block the source pads before dtlssrtpdec inside transportreceivebin
Otherwise dropped sticky events are not actually re-sent on the next
opportunity and we can end up with data-flow before stream-start/segment
events.
Sebastian Dröge [Thu, 6 Feb 2020 17:40:20 +0000 (19:40 +0200)]
sctp: Take some socket configurations from Firefox's datachannel code
- Do not send ABORTs for unexpected packets are as response to INIT
- Enable interleaving of messages of different streams
- Configure 1MB send and receive buffer for the socket
- Enable SCTP_SEND_FAILED_EVENT and SCTP_PARTIAL_DELIVERY_EVENT events
- Set SCTP_REUSE_PORT configuration
- Set SCTP_EXPLICIT_EOR and the corresponding send flag. We probably
want to split packets to a maximum size later and only set the flag
on the last packet. Firefox uses 0x4000 as maximum size here.
- Enable SCTP_ENABLE_CHANGE_ASSOC_REQ
- Disable PMTUD and set an maximum initial MTU of 1200
Sebastian Dröge [Thu, 6 Feb 2020 16:43:35 +0000 (18:43 +0200)]
sctp: Start connection synchronously when starting the association
Calling bind() only sets up some data structures and calling connect()
only produces one packet before it returns. That packet is stored in a
queue that is asynchronously forwarded by the encoder's source pad loop,
so not much is happening there either. Especially no waiting is
happening here and no forwarding of data to other elements.
This fixes a race condition during connection setup: the connection
would immediately fail if we pass a packet from the peer to the socket
before bind() and connect() have returned.
This can't happen anymore as bind() and connect() have returned already
before both elements reach the PAUSED state, and in webrtcbin there is
an additional blocking pad probe before the decoder that does not let
any data pass through before that anyway.
Sebastian Dröge [Thu, 6 Feb 2020 14:42:01 +0000 (16:42 +0200)]
sctp: Switch back to a non-recursive mutex and don't hold it while calling any usrsctp functions
The library is thread-safe by itself and potentially calls back into our
code, not only from the same thread but also from other threads. This
can easily lead to deadlocks if we try to hold our mutex on both sides.
Seungha Yang [Wed, 12 Feb 2020 13:29:31 +0000 (22:29 +0900)]
d3d11window: Fix for broken dirty rect drawing on Windows 7
DXGI_SWAP_EFFECT_DISCARD cannot be used with dirty rect drawing feature
of IDXGISwapChain1::Present().
Note that IDXGISwapChain1 interface is available on Platform Update for Windows 7
and DXGI_SWAP_EFFECT_FLIP_SEQUENTIAL is also the case.
Seungha Yang [Tue, 11 Feb 2020 04:12:33 +0000 (13:12 +0900)]
d3d11window: Fix for dxva decoder output view rendering
Use resolution specified in caps for input_rect instead of
passed width and height value. The width and height might be modified
ones by d3d11videosink, then frame resolution might be different.
Seungha Yang [Wed, 5 Feb 2020 12:27:23 +0000 (21:27 +0900)]
d3d11decoder: Refactor decoding process
* Move decoding process to handle_frame
* Remove GstVideoDecoder::parse implementation
* Clarify flush/drain/finish usage
In forward playback case, have_frame() call will be followed by
handle_frame() but reverse playback is not the case.
To ensure GstVideoCodecFrame, the decoding process should be placed inside
of handle_frame(), instead of parse().
Since we don't support alignment=nal, the parse() implementation is not worth.
In order to fix broken reverse playback, let's remove the parse()
implementation and revisit it when adding alignment=nal support.
Seungha Yang [Thu, 30 Jan 2020 11:04:58 +0000 (20:04 +0900)]
d3d11decoder: Move handle_frame implementation to baseclass
... and remove unused start, stop method from subclass.
Current implementation does not require subclass specific behavior
for the handle_frame() method.