Commit graph

623 commits

Author SHA1 Message Date
Matthew Waters 3ffbb66593 applemedia/corevideobuffer: remove unused variable
Fixes:

../sys/applemedia/corevideobuffer.c:209:19: error: variable 'video_meta' set but not used [-Werror,-Wunused-but-set-variable]
    GstVideoMeta *video_meta;
                  ^

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/2046>
2022-03-28 10:30:23 +00:00
Matthew Waters b8f83c9d14 applemedia/iosgl: remove unused variable
Fixes:

../sys/applemedia/iosurfaceglmemory.c:219:41: error: variable 'texfmt' set but not used [-Werror,-Wunused-but-set-variable]
    GLuint tex_id, tex_target, texifmt, texfmt;
                                        ^

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/2046>
2022-03-28 10:30:23 +00:00
Matthew Waters 49e452525d vtdec: remove unused variable
Fixes:

../sys/applemedia/vtdec.c:611:35: error: variable 'output_flags' set but not used [-Werror,-Wunused-but-set-variable]
  VTDecodeFrameFlags input_flags, output_flags;
                                  ^

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/2046>
2022-03-28 10:30:23 +00:00
Matthew Waters edd9ec0456 avsamplevideosink: remove unused variable
Fixes

../sys/applemedia/avsamplevideosink.m:80:20: error: variable 'gstelement_class' set but not used [-Werror,-Wunused-but-set-variable]
  GstElementClass *gstelement_class;
                   ^

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/2046>
2022-03-28 10:30:23 +00:00
Matthew Waters 651cd8e0bb avfassetsrc: fix unused-but-set warning
../sys/applemedia/avfassetsrc.m:1014:12: error: variable 'caps' set but not used [-Werror,-Wunused-but-set-variable]
  GstCaps *caps;
           ^

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/2046>
2022-03-28 10:30:23 +00:00
Matthew Waters f65b61fd53 speed: fix unused-but-set warning
../gst/speed/gstspeed.c:523:39: error: variable 'base' set but not used [-Werror,-Wunused-but-set-variable]
      gint64 start_value, stop_value, base;
                                      ^

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/2046>
2022-03-28 10:30:23 +00:00
Matthew Waters fc28db57ae resindvd: silence unused-but-set warning
../ext/resindvd/gstpesfilter.c:117:11: error: variable 'STD_buffer_size_bound' set but not used [-Werror,-Wunused-but-set-variable]
  guint16 STD_buffer_size_bound;
          ^

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/2046>
2022-03-28 10:30:23 +00:00
Matthew Waters 6f95f7263f mpegts: don't shadow res variable
Fixes unused-but-set warning:

../gst/mpegtsmux/gstbasetsmux.c:2115:43: error: variable 'res' set but not used [-Werror,-Wunused-but-set-variable]
      gboolean all_headers, done = FALSE, res = FALSE;
                                          ^

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/2046>
2022-03-28 10:30:23 +00:00
Matthew Waters 6c49f8d308 mpeg: fix unused-but-set warning
../gst-libs/gst/mpegts/gst-dvb-section.c:206:9: error: variable 'i' set but not used [-Werror,-Wunused-but-set-variable]
  guint i = 0, allocated_events = 12;
        ^
../gst-libs/gst/mpegts/gst-dvb-section.c:365:9: error: variable 'i' set but not used [-Werror,-Wunused-but-set-variable]
  guint i = 0, allocated_streams = 12;
        ^
../gst-libs/gst/mpegts/gst-dvb-section.c:543:9: error: variable 'i' set but not used [-Werror,-Wunused-but-set-variable]
  guint i = 0, allocated_streams = 12;
        ^
../gst-libs/gst/mpegts/gst-dvb-section.c:885:9: error: variable 'i' set but not used [-Werror,-Wunused-but-set-variable]
  guint i = 0, allocated_services = 8;
        ^
../gst-libs/gst/mpegts/gst-dvb-section.c:1316:9: error: variable 'i' set but not used [-Werror,-Wunused-but-set-variable]
  guint i = 0, allocated_services = 8;
        ^

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/2046>
2022-03-28 10:30:23 +00:00
Sebastian Dröge a4ea62ef5b video-format: Move NV12_8L128 into the correct position in GST_VIDEO_FORMATS_ALL
Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/2045>
2022-03-28 10:39:24 +03:00
Matthew Waters 063ca24bd8 mpegdemux: silence unused-but-set werror
../gst/mpegdemux/gstpesfilter.c:117:11: error: variable 'STD_buffer_size_bound' set but not used [-Werror,-Wunused-but-set-variable]
  guint16 STD_buffer_size_bound;
          ^

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/2044>
2022-03-28 05:23:31 +00:00
Andrew Pritchard 432354e6d4 Fix GstAmcSurfaceTexture segfault
Check that `self` and `self->callback` are defined. `self` can be set to
`NULL` in `remove_listener`, and `self->callback` can be set to `NULL`
inside `gst_amc_surface_texture_jni_set_on_frame_available_callback`.
This can cause a segfault since the Java object can outlive the C
object, and call the callback after `remove_listener` is called.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/2024>
2022-03-28 04:44:21 +00:00
Matthew Waters 2e69886a02 ccconverter: ensure correct ordering of cea608 across output buffers
e.g. if a 60fps output is configured, we can only produce a single field
of cea608 that must alternate between field 1 and field 2.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/2019>
2022-03-26 00:00:36 +00:00
Matthew Waters 6977119f99 ccconverter: ignore padding cea608 data even if marked as 'valid'
Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/2019>
2022-03-26 00:00:36 +00:00
Nicolas Dufresne c9d8b8a972 v4l2codecs: Detect missing M2M_HOLD_CAPTURE_BUF
Produce an error if we try to use the feature of holding capture buffer
but it is not supported by the driver. Ingoring this can lead to stalls
as the driver will run-out of capture buffer to decode into. This
affects slice decoders but also split-field interlaced decoding.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/2009>
2022-03-25 21:40:28 +00:00
Nicolas Dufresne efa360ce82 v4l2codecs: h264: Set other field poc if available
Whenever the other field POC is available, pass it back to the
driver. This should not be strictly required, but it makes things
easier to debug and more forgiven.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/2009>
2022-03-25 21:40:28 +00:00
Nicolas Dufresne dcd62c35f0 v4l2codecs: Trace request by it FD
This helps when crossing the debug logs with the kernel logs.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/2009>
2022-03-25 21:40:28 +00:00
Nicolas Dufresne d24dc74170 v4l2codecs: h264: Fix dpb entry flag FLAG_FIELD
The logic to guess back this value was broken. Use the value
now saved into the picture instead. This was tested using
LibreELEC patched 5.15 kernel, and fixed the interlaced decode
issues.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/2009>
2022-03-25 21:40:28 +00:00
Nicolas Dufresne 104ae1b2e6 codecs: h264: Save the field_pic_flag
This flag is set when the stream is interlaced and the specific
slice is made of single parity fields rather the paired at the
macroblock layer. This is rarely needed in late decoding process
but the Rockchip RKVDEC HW interface requires it, hence needs to
be passed through V4L2 Stateless interface.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/2009>
2022-03-25 21:40:28 +00:00
Xavier Claessens 924574a608 d3d11: Fix example build error
```
../subprojects/gst-plugins-bad/tests/examples/d3d11/d3d11device.cpp:129:50: error: invalid conversion from ‘int’ to ‘DXGI_FORMAT’ [-fpermissive]
  129 |     D3D11_SHADER_RESOURCE_VIEW_DESC srv_desc = { 0, };
```

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/2029>
2022-03-25 19:40:53 +00:00
Thibault Saunier 25819c41fb navigation: Add support for key Modifiers in all relevant events
Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/2010>
2022-03-25 15:16:03 +00:00
He Junyan b2a00dff07 va: h265dec: Fix a crash because of missing reference frame.
Some problematic H265 stream may miss the reference frame in the DPB,
and get some message like: "No short term reference picture for xxx".
So there may be empty entries in ref_pic_list0/1 when passing to
decode_slice() function of sub class. We need to check the NULL pointer.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/2018>
2022-03-25 13:12:46 +00:00
Chun-wei Fan b9f29bfc39 openexr: Specify modules when finding OpenEXR.
Specify modules to look for OpenEXR when CMake is used, as we may have
CMake config files instead of pkg-config files that result from building
OpenEXR, which may be built with CMake which is typically the case on Visual
Studio builds.

In this case, Meson does seem to find the 'OpenEXR' package with CMake
after trying pkg-config, but does not consider it enough without the
'modules:' argument.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/2014>
2022-03-25 07:45:54 +00:00
Sangchul Lee 952c1194f3 webrtcbin: Update documentation of 'get-stats' action signal
Some stats fields are updated according to the current implementation.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/2005>
2022-03-25 07:01:40 +00:00
Mathieu Duponchelle 29de0e8e1d Revert "webrtcbin: fix msid line and allow customization"
This reverts commit 3cad3455377d5a22faa138d9df840257059776c8.

That commit was breaking the association between an audio and
a video track in the standard case.

In practice, to support carrying separate MediaStream, we are
going a way to map what MediaStreamTrack belong to what MediaStream,
but that will require some thinking about the API.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/2023>
2022-03-25 00:31:58 +01:00
Vivia Nikolaidou fabf948194 tsdemux: Don't check SCTE events for being too far from the PCR
Otherwise it happens that SCTE events can only be scheduled up to 15
seconds since the last seen PCR, which is a useless restriction.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/2021>
2022-03-24 18:59:37 +00:00
Mathieu Duponchelle 06fec40f45 webrtcbin: fix msid line and allow customization
From https://datatracker.ietf.org/doc/html/draft-ietf-mmusic-msid-16:

> Multiple media descriptions with the same value for msid-id and
> msid-appdata are not permitted.

Our previous implementation of simply using the CNAME as the msid
identifier and the name of the transceiver as the msid appdata was
misguided and incorrect, and created issues when bundling multiple
video streams together: the ontrack event was emitted with the same
streams for the two bundled medias, at least in Firefox.

Instead, use the transceiver name as the identifier, and expose
a msid-appdata property on transceivers to allow for further
customization by the application. When the property is not set,
msid-appdata can be left empty as it is specified as optional.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/2003>
2022-03-24 16:43:29 +00:00
Thibault Saunier fe16900dff wpe: Mark first audio buffer as discont
Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/1492>
2022-03-24 00:01:20 +00:00
Thibault Saunier a14e36fde4 wpe: Use about:blank as default URL to support only using load-bytes
WebKit is not going to render anything until a URI is set, leading to a
WPE posting a `WPE View did not render a buffer` error message. To avoid
requiring the user to know it if they only want to use
`wpesrc::load-bytes` we can just use `about:blank` as default and
everything will work as users would expect.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/1492>
2022-03-24 00:01:20 +00:00
Seungha Yang 1bd5b7356d fakevideosink,fakeaudiosink: Proxy handoff and preroll-handoff signals
Proxy signals for application to be able to consume them

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/1585>
2022-03-23 20:03:40 +00:00
Seungha Yang 454e8f58a8 aom: av1enc: Specify Temporal Unit alignment
Encoded bitstream consists of leading Temporal delimiter OBU
with frame, that's Temporal Unit alignment.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/1471>
2022-03-23 19:16:25 +00:00
Seungha Yang 769800ad5f qsvencoder: Clear caps after debug print
Otherwise debug function will print (null) for alread cleared pointer

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/2012>
2022-03-24 02:55:49 +09:00
Seungha Yang 188382ca9a qsvh264enc: Fix profile and level setting in codec data
The profile field in SPS is located after header byte

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/2012>
2022-03-24 02:55:31 +09:00
Seungha Yang 60735deded nvcodec: Add new Direct3D11/CUDA mode encoder implementation
Adding new encoder elements nvd3d11{h264,h265}enc for Direct3D11
input support and re-written nvcuda{h264,h265}enc elements.
Newly writeen elements have some differences compared with old
nv{h264,h265}enc including non-backward compatible changes.

* RGBA is not a supported input format any more:
  New elements will support only YUV formats to avoid implicit conversion
  done by hardware. Ideally it should be done by upstream element
  in order to have more control on it. Moreover, RGBA support can cause
  redundant RGBA -> YUV conversion if multiple encoders are
  used for the same RGBA input
* Subsampled planar format support is dropped:
  I420 and YV12 format are not supported formats for Direct3D11.
  Although it's supported in CUDA mode, it's not a hardware friendly
  memory layout and it will waste GPU memory since UV planes
  will have large padding due to the memory layout requirement of NVENC.
* GL support is dropped: Similar to the RGBA case,
  GL support in encoder would be suboptimal if GL input is
  used by multiple encoders, because each encoder will copy GL memory
  into CUDA memory.
  Upstream cudaupload element can be used for GL <-> CUDA
  interop instead.
* No more pre-allocation of encoder input surfaces. New implementation
  will use input CUDA memory without copy (zero-copy) or
  will copy into a NVENC's input buffer struct in case of
  system memory input.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/1997>
2022-03-23 13:48:53 +00:00
Vivienne Watermeier e6b187032b wpevideosrc: Add touch event support
Dispatches a list of active touch events to the wpe view on each
received TOUCH_FRAME event. Touch inputs currently only move the cursor,
since wpe doesn't seem to support clicking/scrolling or zooming with
touch input.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/1633>
2022-03-23 13:14:52 +00:00
Vivienne Watermeier 6c2f6c3bd4 all: Use new navigation interface and API
Use and implement the new navigation interface in all relevant sink elements,
and use API functions everywhere instead of directy accessing the event structure.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/1633>
2022-03-23 13:14:52 +00:00
Tong Wu 2a703678c0 msdkenc: add macro definitions to avoid the gst-inspect error
Since the strings are empty for GST_MSDK_CAPS_MAKE_WITH_DMABUF_FEATURE
and GST_MSDK_CAPS_MAKE_WITH_VA_FEATURE, when excuting
gst-inspect-1.0.exe msdkh265enc, there will be convert static caps error
because of the extra semicolon between two empty strings. Now macro
definitions are added to avoid this issue.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/2004>
2022-03-23 04:34:06 +00:00
Mengkejiergeli Ba d8ab85c3ef msdkdec: Check width and height of mfxVideoParam before allocation
DecodeHeader must be called to fill the mfxVideoParam before allocation,
and thus the check for width and height in mfxVideoParam is necessary.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/1817>
2022-03-22 05:22:09 +00:00
Nicolas Dufresne ebf63e1b91 doc: Update cache after NV12_8L128 addition
Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/1379>
2022-03-22 00:41:39 +00:00
Benjamin Gaignard 98cb44ffc6 v4l2codecs: Fix memory leak
Free pending_requests array when releasing decoder to avoid memory leak

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/2000>
2022-03-21 16:06:05 +00:00
Daniel Almeida 9a364464f0 av1decoder: Sync duplicate_picture with VP9 one
Pass the current frame to the duplicate_picture callback. This makes it easier
to set the frame's output_buffer if we already have one available. Also
documented that unlike VP9, it is not optional to implement this as the
picture will populate the DPB if it is a key-frame. To ensure this, remove the
default implementation.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/1992>
2022-03-21 15:10:01 +00:00
Nicolas Dufresne a7ceac50b2 vp9decoder: Copy system_frame_number in duplicate_picture
Just like AV1, copy the system_frame_number from the original picture to make
it clear they reference the same data.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/1992>
2022-03-21 15:10:01 +00:00
Nicolas Dufresne 80107d4a86 cdoecs: av1: Copy system_frame_number in duplicate_picture
The system_frame_number is notably used by V4L2 decoder as a unique
indentifier for the frame that was decoded. This value is used to tell driver
which frame to reference, as V4L2 does not have an efficient mechanism to
otherwise pass back the frames.

For this reason, and because it is more ligical, copy the original
system_frame_number into the duplicate picture instead of using the current
frame.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/1992>
2022-03-21 15:10:01 +00:00
Seungha Yang 0c6125bad6 meson: va: Define GST_USE_UNSTABLE_API
Remove extra_c_args which is not defined in this meson file at all,
and define GST_USE_UNSTABLE_API to avoid build warnings

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/1999>
2022-03-21 22:17:00 +09:00
Nicolas Dufresne 049655c824 codecs: av1: Fix state when we show existing keyframe
Showing existing keyframe have special meaning in AV1. All the references
frame will be refreshed with the original keyframe information. The refresh
process (7.20) is implemented by saving data from the frame_header into the
state. To fix this special case, load all the relevant information into the
frame_header.

As there is nothing happening in between this and the loading of the key-frame
into the state, this patch also remove the separate API function, using it
internally instead.

Fixes #1090

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/1971>
2022-03-19 11:56:33 +00:00
Jakub Adam 90eadae350 d3d11: Fix some typos
Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/1985>
2022-03-19 00:19:41 +00:00
Nirbheek Chauhan 1cb127f16b meson: Bump all meson requirements to 0.60
Lots of new warnings ever since
https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/1934

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/1977>
2022-03-18 22:49:16 +00:00
Nirbheek Chauhan 8819350b74 openexr: Fix some warnings
```
../subprojects/gst-plugins-bad/ext/openexr/gstopenexrdec.cpp:46:24: warning: ‘Imf_3_1::Int64’ is deprecated: use uint64_t [-Wdeprecated-declarations]
   46 |   virtual Int64 tellg ();
      |                        ^
In file included from ../subprojects/gst-plugins-bad/ext/openexr/gstopenexrdec.cpp:32:
/usr/include/OpenEXR/ImfInt64.h:23:32: note: declared here
   23 | typedef IMATH_NAMESPACE::Int64 Int64;
      |                                ^~~~~
../subprojects/gst-plugins-bad/ext/openexr/gstopenexrdec.cpp:47:32: warning: ‘Imf_3_1::Int64’ is deprecated: use uint64_t [-Wdeprecated-declarations]
   47 |   virtual void seekg (Int64 pos);
      |                                ^
In file included from ../subprojects/gst-plugins-bad/ext/openexr/gstopenexrdec.cpp:32:
/usr/include/OpenEXR/ImfInt64.h:23:32: note: declared here
   23 | typedef IMATH_NAMESPACE::Int64 Int64;
      |                                ^~~~~
../subprojects/gst-plugins-bad/ext/openexr/gstopenexrdec.cpp:67:26: warning: ‘Imf_3_1::Int64’ is deprecated: use uint64_t [-Wdeprecated-declarations]
   67 | Int64 MemIStream::tellg ()
      |                          ^
In file included from ../subprojects/gst-plugins-bad/ext/openexr/gstopenexrdec.cpp:32:
/usr/include/OpenEXR/ImfInt64.h:23:32: note: declared here
   23 | typedef IMATH_NAMESPACE::Int64 Int64;
      |                                ^~~~~
../subprojects/gst-plugins-bad/ext/openexr/gstopenexrdec.cpp:73:29: warning: ‘Imf_3_1::Int64’ is deprecated: use uint64_t [-Wdeprecated-declarations]
   73 | MemIStream::seekg (Int64 pos)
      |                             ^
In file included from ../subprojects/gst-plugins-bad/ext/openexr/gstopenexrdec.cpp:32:
/usr/include/OpenEXR/ImfInt64.h:23:32: note: declared here
   23 | typedef IMATH_NAMESPACE::Int64 Int64;
      |                                ^~~~~
```

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/1977>
2022-03-18 22:49:16 +00:00
He Junyan 580a2bb64b codecparsers: av1parser: Fix a typo in FilmGrainParams comment.
Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/1974>
2022-03-18 18:59:25 +00:00
Jakub Adam df55700f44 d3d11screencapturesrc: Allow capturing screen sub-area
Adds crop-x, crop-y, crop-width, crop-height properties specifying the
screen area to capture.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/1932>
2022-03-18 13:56:51 +01:00