Commit graph

7597 commits

Author SHA1 Message Date
He Junyan
1781718a71 libs: pbutils: Add High throughput scc extensions profile idc(IDC 11)
It is compitable with scc and we can use scc's function to identify it.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gst-plugins-base/-/merge_requests/645>
2020-04-28 21:26:29 +08:00
He Junyan
f43a3e1f7d libs: pbutils: select extension profile by profile idc.
the old manner does not consider the profile idc. The profile idc should
play an more important role in recognizing the profile than the other
information. And there is no need to mix profiles of different extensions
together to find the closest profile when the bits stream is not standard,
different extensions support different features and should not be mixed.

The correct way should be recognize the extension category by profile idc
firstly, and then find the closest profile.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gst-plugins-base/-/merge_requests/645>
2020-04-28 20:45:04 +08:00
He Junyan
5a1f526d22 libs: pbutils: rename the GstH265FormatRangeExtensionProfile.
GstH265FormatRangeExtensionProfile declares the common bits used
for not only format range extensions profiles, but also for several
different h265 extension profiles, such as high throughput, screen
content coding extensions, etc. And So the old name is not proper.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gst-plugins-base/-/merge_requests/645>
2020-04-28 18:19:06 +08:00
Guillaume Desmottes
4610bb59ac opusdec: prevent 'channels=0' in caps
gst_opus_channel_positions() should fail if caps contains "channels=0".
Prevent index underflow when indexing gst_opus_channel_positions[] (CID 1462590).

Part-of: <https://gitlab.freedesktop.org/gstreamer/gst-plugins-base/-/merge_requests/644>
2020-04-27 10:07:33 +02:00
Matthew Waters
6a1e575345 glbasesrc: avoid deadlock when querying for OpenGL context
Continuation of:
a4e49ba8c9
https://gitlab.freedesktop.org/gstreamer/gst-plugins-base/-/merge_requests/642

Part-of: <https://gitlab.freedesktop.org/gstreamer/gst-plugins-base/-/merge_requests/643>
2020-04-27 11:36:02 +10:00
Matthew Waters
5d47b8e232 gl: fix application context querying between elements
Fixes error introduced by:
a4e49ba8c9
https://gitlab.freedesktop.org/gstreamer/gst-plugins-base/-/merge_requests/642

Using the application GL context as the local GL context is not going to
work very well.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gst-plugins-base/-/merge_requests/643>
2020-04-27 11:36:02 +10:00
Matthew Waters
a4e49ba8c9 gl: avoid deadlock querying for OpenGL context
If there are two elements and threads attempting to query each other for
an OpenGL context. The locking may result in a deadlock.

We need to unlock each element's context_lock when querying another
element for the OpenGL context in order to allow any other element to
take the lock when the other element is querying for an OpenGL context.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gst-plugins-base/-/merge_requests/642>
2020-04-24 18:03:16 +10:00
Sebastian Dröge
98bb7d0c2e video-anc: Register an init function for Bar meta
The init function is mandatory and we keep around uninitialized memory
otherwise.

Fixes https://gitlab.freedesktop.org/gstreamer/gst-plugins-base/-/issues/747
2020-04-19 18:29:18 +03:00
He Junyan
4216bd6eb2 libs: gl: Fix a context leak when display_create_context failed 2020-04-08 15:26:23 +08:00
Thibault Saunier
fef4717770 pbutils: Add EncodingProfile serialization support 2020-04-03 11:21:14 -03:00
Thibault Saunier
d794e5389e pbutils: Support for variable framerate in the encoding serialization 2020-04-03 11:21:14 -03:00
Jan Schmidt
5b720702cf video-hdr: Fix a docs typo (x -> y) 2020-04-02 23:30:57 +11:00
Jan Schmidt
fd3942d06b audiodecoder: Handle instant-rate-change event
When receiving an instant-rate-change event, store the updated
seek flags and replace the flags in any input segments with them
to allow for instant switching between trickmodes and not.
2020-04-01 21:01:38 +00:00
Jan Schmidt
8cb14728a7 videodecoder: Handle instant-rate-change event
When receiving an instant-rate-change event, store the updated
seek flags and replace the flags in any input segments with them
to allow for instant switching between trickmodes and not.
2020-04-01 21:01:38 +00:00
Jan Schmidt
f9c5db7d56 audiobasesink: Handle an extra case of buffers being out of segment
It's possible that a buffer might be within the segment proper,
but not within the "valid" part we're playing, which is only
things after the 'offset' part of the segment. In that case,
the running-times of the buffer-start and buffer-stop will be
GST_CLOCK_TIME_NONE, and we'd better not schedule playback that
far in the future.
2020-04-01 21:01:38 +00:00
Stéphane Cerveau
ac6b805827 videoencoder: subclass 'set_format' should be optional
Aligns documentation with the code to make the subclass
'set_format' call optional.
2020-04-01 17:47:04 +02:00
Seungha Yang
1dee0f05a7 video-hdr: Rework for GstVideoMasteringDisplayInfo and GstVideoContentLightLevel struct
This commit modifies GstVideoMasteringDisplayInfo and GstVideoContentLightLevel
structs so that each value is to be more like hdr_metadata_infoframe struct
of linux drm header and DXGI_HDR_METADATA_HDR10 struct of Windows.
So each value is no more fraction but normalized one as per CTA 861.G spec.
Also the unit of each value will be consistent with H.264, H.265
specifications, hdr_metadata_infoframe struct for linux and
DXGI_HDR_METADATA_HDR10 struct for Windows.
2020-04-01 11:11:15 +00:00
Matthew Waters
476eaf9425 videoaggregator: fix gir warning about invalid doc comment
[38/1301] Generating GstVideo-1.0.gir with a custom command.
../subprojects/gst-plugins-base/gst-libs/gst/video/gstvideoaggregator.c:231: Error: GstVideo: identifier not found on the first line:
   *
    ^
2020-04-01 20:05:06 +11:00
Haihao Xiang
77db5a0e21 gl: add support for Y412_LE / Y412_BE format
Reuse Y410 code for Y412_LE / Y412_BE except gl format. The gl format is
RGBA16 for Y412_LE / Y412_BE.

Sample pipeline:
gst-launch-1.0 videotestsrc ! video/x-raw,format=Y412_LE ! glimagesink
2020-04-01 13:55:50 +08:00
Haihao Xiang
5f859203ad gl: add support for Y212_LE / Y212_BE format
Because the color value is stored in MSB, so we can reuse the
Y210 code for P012_LE / P012_BE

Sample pipeline:
gst-launch-1.0 videotestsrc ! video/x-raw,format=Y212_LE ! glimagesink
2020-04-01 13:55:11 +08:00
Mathieu Duponchelle
fb1c284026 gstvideoaggregator: expose max-last-buffer-repeat property on pads
This can be used to have compositor display either the background
or a stream on a lower zorder after a live input stream freezes
for a certain amount of time, for example because of network
issues.
2020-03-31 18:24:45 +02:00
Haihao Xiang
7816cbf9a4 video: add support for Y412 format
Y412 is a packed 12 bits 4:4:4:4 format in the order U, Y, V, A, 2 bytes
per component with the color value stored in the 12 most significant
bits

Refer to https://github.com/torvalds/linux/blob/master/include/uapi/drm/drm_fourcc.h#L182
for the LE variant
2020-03-27 13:19:34 +00:00
Haihao Xiang
ea063721d2 video: add support for Y212 format
Y212 is a packed 12 bits 4:2:2 format in the order Y, U, Y, V, 2 bytes
per component with the color value stored in the 12 most significant
bits

Refer to https://github.com/torvalds/linux/blob/master/include/uapi/drm/drm_fourcc.h#L174
for the LE variant
2020-03-27 13:19:34 +00:00
Sebastian Dröge
0e74e190ad video-blend: Add support for blending on top of 16 bit per component formats
With this we can support every currently supported video format for
blending.
2020-03-27 08:55:45 +00:00
Matthew Waters
7f59cefafb glcontext/cocoa: handle sending one message during shutdown
gst_gl_window_quit() will attempt to send a message but will be called
from GstGLContext's finalize handler and so the weak ref that backs
gst_gl_window_get_context will return NULL as it has already been
cleared.  We need that context in send_message_async to decide whether
to run the provided callback immediately or queue in GCD
2020-03-26 11:25:44 +00:00
Matthew Waters
3a9fde7b24 glcontext: add context is valid precondition to get_thread() 2020-03-26 11:25:44 +00:00
Matthew Waters
785feed73f glwindow: remove unused private alive variable 2020-03-26 11:25:44 +00:00
Haihao Xiang
5b11ac0819 glupload: fix segfault
Without this fix, it is possible that outbuf is not initialized, which
will result in segfault when call gst_buffer_replace (&outbuf, NULL). In
addition, the patch fixes potential memory leak in restart path.

The segfault can be reproduced by the pipeline below:

GST_GL_PLATFORM=egl \
gst-launch-1.0 videotestsrc ! msdkh265enc ! msdkh265dec ! \
'video/x-raw(memory:DMABuf)' ! glimagesink
2020-03-26 14:06:13 +08:00
Haihao Xiang
1db94e5205 gl: add support for P012_LE / P012_BE format
Because the color value is stored in MSB, so we can reuse the
P016_LE / P016_BE code for P012_LE / P012_BE
2020-03-24 14:29:38 +08:00
Chris Lord
7cd2f5a29f glupload: Fix fallback from direct dmabuf to dmabuf upload method
In the situation that the direct dmabuf path is chosen, but with an
unsupported texture format, this causes accept to fail rather than
continue and fail at the upload stage. It is also possibly necessary to
reconfigure after falling back from direct to non-direct dmabuf upload
paths.
2020-03-23 11:09:49 +00:00
Víctor Manuel Jáquez Leal
8211370281 videodecoder: fix documentation
Fix list indentation, othewise it is interpreted as verbatim.
2020-03-21 14:15:51 +01:00
Niels De Graef
cafb2cfc4d navigation: Use G_DEFINE_INTERFACE 2020-03-20 06:20:43 +00:00
Niels De Graef
21a107294d streamvolume: Use G_DECLARE_INTERFACE 2020-03-20 06:20:43 +00:00
Niels De Graef
eae9d3fbd5 gstphysmemory: Use G_DECLARE_INTERFACE 2020-03-20 06:20:43 +00:00
Niels De Graef
a6c4e92cb4 audiovisualizer: Add support for g_autoptr()
Ideally, we would use something like `G_DECLARE_DERIVABLE_TYPE`, but
that would break API.
2020-03-20 06:20:43 +00:00
Miguel Paris
f265e5cbd5 rtpbuffer: add_extension_onebyte_header: fix the proper wordlen
The wordlen ("length") MUST represent the total "number of 32-bit words
in the extension, excluding the four-octet extension header" (rfc3550).
There are cases where already existent padding is reused for adding
the new extension. So the new wordlen should be updated if the new
added extension makes it to increase.
2020-03-19 14:18:20 +01:00
Miguel Paris
2d4d28d662 rtpbuffer: get_onebyte_header_end_offset: allow 0 offset
There are some cases where the full extension data could be padding.
In order to make the GstRtpBuffer robust enough, this change supports
this case.
2020-03-19 14:18:20 +01:00
Philippe Normand
3f79805aa0 gl/wayland: Mouse events handling 2020-03-19 09:59:47 +00:00
Philippe Normand
5a4c5e9169 gl/navigation: Scroll events dispatch support 2020-03-19 09:59:47 +00:00
Philippe Normand
7240cad9c5 navigation: Mouse scroll events support
This patch introduces a new API to send and parse mouse scroll events. Mouse
event coordinates are sent relative to the display space of the related output
area. This is usually the size in pixels of the window associated with the
element implementing the GstNavigation interface.
2020-03-19 09:59:47 +00:00
Guillaume Desmottes
545d0b144f audio: annotate @buf in finish_frame methods 2020-03-18 15:38:25 +01:00
Haihao Xiang
e4e3fc5666 video: add support for P012 format
P012 is a semi-planar 4:2:0 format, 2bytes per component with the value
stored in the 12 most significant bits
2020-03-16 21:01:27 +00:00
Niels De Graef
ec84cf92f9 *aggregator: Add g_autoptr support for *ConvertPad 2020-03-16 15:47:58 +00:00
Tobias Ronge
f1b3ed37c6 gstrtpbasepayloader: Add property for scaling RTP timestamp
This patch introduces a property which, if set to FALSE, prevents RTP
basepayloader from scaling the RTP time when a segment's rate is not
equal to 1.0. The specification is ambiguous on this subject and some
clients expect the timestamps not to be scaled.
2020-03-16 10:25:44 +00:00
Matthew Waters
a777fe2628 videometa: constify tc argument to add_video_time_meta()
We don't modify the argument.
2020-03-16 15:34:02 +11:00
Peter Seiderer
7b00e5de99 meson: add window system egl 2020-03-12 10:00:59 +00:00
Guillaume Desmottes
e8f5777c92 rtsp: remove documentation link on GTimeVal
Looks like it's been removed from glib.devhelp2 on Fedora 31.

Fix #508
2020-03-12 13:44:10 +05:30
Matthew Waters
f58914b93b gl/wayland: use wayland's roundtrip_queue()
There's no need to roll our own anymore
2020-03-11 09:17:36 +00:00
Philipp Zabel
40773e9c91 glupload: dmabuf: only accept uploads to external-oes if supported by the context
This keeps the DirectDmabufExternal uploader from accepting buffers if
texture-target=external-oes is not supported by the GL context.
2020-03-06 12:02:58 +01:00
Matthew Waters
5ae7998a8f gl/wayland: use a proxy wrapper for the wl_display
This allows us to remove races when setting the wl_queue on wayland
objects with wl_proxy_set_queue() as each created object is created with
the queue already set.

We can also move all our initilization code into the window as we
can retrieve all wayland objects from each window instance.  This
removes a possible race when integrating with external API's as we would
always attempt to immediately retrieve a small set of wayland objects.
That is no longer the case with the objects from each window instance.
2020-03-04 00:04:18 +00:00