Commit graph

20286 commits

Author SHA1 Message Date
Sebastian Dröge
637bbac622 videoaggregator: Don't crash when setting pad properties after the aggregator was finalized
The application might still have a strong reference to a pad and change
properties, which should work without crashing.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gst-plugins-base/-/merge_requests/649>
2020-05-01 10:41:29 +00:00
Sebastian Dröge
380dffb0d0 Add missing colons to Since markers in the docs
Part-of: <https://gitlab.freedesktop.org/gstreamer/gst-plugins-base/-/merge_requests/648>
2020-05-01 10:08:40 +03:00
Philippe Normand
03c4a819d3 gl: Add since tags for new glbasesrc base class
Part-of: <https://gitlab.freedesktop.org/gstreamer/gst-plugins-base/-/merge_requests/647>
2020-04-30 18:00:19 +01:00
Philippe Normand
101868c5d0 gst/gl: Add documentation for new scroll API
Part-of: <https://gitlab.freedesktop.org/gstreamer/gst-plugins-base/-/merge_requests/647>
2020-04-30 18:00:19 +01:00
Philippe Normand
ed910e6cb8 navigation: Add since tag for new API
Part-of: <https://gitlab.freedesktop.org/gstreamer/gst-plugins-base/-/merge_requests/647>
2020-04-30 18:00:19 +01:00
He Junyan
5bb8bdf90d test: pbutils: Add check for high throughput scc.
Part-of: <https://gitlab.freedesktop.org/gstreamer/gst-plugins-base/-/merge_requests/645>
2020-04-28 21:27:36 +08:00
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
Guillaume Desmottes
989bbe29d8 opusdec: add 'stats' property
Allow users to retrieve the number of samples, and their duration,
generated using PLC.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gst-plugins-base/-/merge_requests/641>
2020-04-24 14:49:05 +02: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
Matthew Waters
4a7a247293 tests: add glviewconvert users integration unit test
Catch all smoke test for ensuring a basic pipeline can negotiate
successfully.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gst-plugins-base/-/merge_requests/638>
2020-04-24 12:12:31 +10:00
Jan Schmidt
f16d970f77 textrender: Don't calculate caps on every buffer
Only renegotiate with downstream when the srcpad has a pending
reconfigure flag, instead of querying, fixating and sending caps
for every buffer.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gst-plugins-base/-/merge_requests/640>
2020-04-21 23:17:28 +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
Matthew Waters
cdd5470f06 glvideomixer: fix black output after display changes
Partial revert of 55e80b550e

https://gitlab.freedesktop.org/gstreamer/gst-plugins-base/-/issues/743
2020-04-14 12:03:49 +10:00
Matthew Waters
ebf8198a97 glvideomixer: intersect with template caps when updating
Downstream may provide extra things when we ask it for caps that we may
need to remove.

Fixes the following pipeline warning:

gltestsrc ! glvideomixerelement ! glimagesinkelement

** (gst-launch-1.0:908581): WARNING **: 13:53:28.518: glvideomixer0: update_src_caps returned caps which are not a real subset of the filter caps
2020-04-14 12:03:49 +10:00
Jan Schmidt
7e5368627e typefind: Consider MPEG-PS PSM to be a PES type
Include the Program Stream Map packet type 0xBC in the
set of packets we treat as PES. This fixes typefinding
on MPEG-PS streams with PSM, where the PSM would previously
be considered a loss-of-sync and cause the typefind
to require more data.
2020-04-10 22:47:04 +10:00
Philippe Normand
e38070d157 uridecodebin3: Activate suburi playback item
The suburi playback item has to be activated after the main playback item so
that playsink can properly enable text rendering.

Fixes #451
2020-04-10 07:26:49 +00:00
Jan Schmidt
212c94312e textrender: Fix AYUV output.
Fix the check for whether the element is operating in ARGB mode. It
was incorrectly checking if the output format has an alpha channel,
which is true for both ARGB and AYUV, leading to the element
incorrectly outputting ARGB values into AYUV caps.
2020-04-09 18:29:51 +00: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
545a993316 discoverer: Enhance printed information when not verbose
Basically print information about media tracks making without tags
nor buffers in caps making still quite small but containing all
information infos.

Stop making 'Topology' section and just print the info

before:

```
Topology:
  container: MPEG-2 Transport Stream
    audio: AC-3 (ATSC A/52)
    video: H.264 (High Profile)

Properties:
  Duration: 0:00:05.512394259
  Seekable: yes
  Live: no
  Tags:
      audio codec: AC-3 (ATSC A/52)
      bitrate: 192000
      video codec: H.264 (High Profile)
      minimum bitrate: 12947
      maximum bitrate: 12947
```

After:

```
Properties:
  Duration: 0:00:05.512394259
  Seekable: yes
  Live: no
  container: MPEG-2 Transport Stream
    audio: AC-3 (ATSC A/52)
      Stream ID: b076403d73e0c5fc13985832e8d585945603993437ba14b0799f422f9495e8ef:1/00001100
      Language: <unknown>
      Channels: 2 (front-left, front-right)
      Sample rate: 48000
      Depth: 32
      Bitrate: 192000
      Max bitrate: 0
    video: H.264 (High Profile)
      Stream ID: b076403d73e0c5fc13985832e8d585945603993437ba14b0799f422f9495e8ef:1/00001011
      Width: 1920
      Height: 1080
      Depth: 24
      Frame rate: 30000/1001
      Pixel aspect ratio: 1/1
      Interlaced: true
      Bitrate: 10363396
      Max bitrate: 12947
```
2020-04-06 10:01:32 -04:00
Sebastian Dröge
6ea225ccb4 typefindfunctions: Fix otio typefinder to actually detect otio files
The string "\"OTIO_SCHEMA\":" is 14 characters and not 15. Checking for
15 characters would also check for the final '\0', which does not exist
in any otio file as the string is the key of a JSON map.
2020-04-06 15:23:27 +03:00
Sebastian Dröge
fa91783833 typefindfunctions: Fix otio typefinder detecting anything with curly braces at the start
memcmp() returns 0 (aka FALSE) on match and a difference otherwise.

Previously the typefinder was matching on anything but otio files that
happened to have some curly braces in the beginning of the file.

Fixes a false positive with a MOV file.
2020-04-06 15:20:22 +03: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
Jan Schmidt
0bc8998bdf gst-play: Add -i parameter for instant rate changes
Add a command line flag that enables use of the
instant rate changes flag when doing rate changes.
2020-04-01 21:01:38 +00:00
Jan Schmidt
9f55f8c28e tests/examples/seek/instant-rate-change: Add example app
Add an example app to exercise instant rate changes in a few
scenarios. Currently it deadlocks a lot sending rate changes to
paused pipelines.
2020-04-01 21:01:38 +00:00
Sebastian Dröge
42b7527542 playback-test: Add support for start_type=stop_type=NONE seeks 2020-04-01 21:01:38 +00:00
Sebastian Dröge
ba49b94c52 playback-test: Add support for sending instant-rate-change seeks 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
Mathieu Duponchelle
caca46e0e6 subparse: convert from pango-markup to utf8 ..
when downstream requires it
2020-03-27 15:27:06 +00: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