Commit graph

113094 commits

Author SHA1 Message Date
Thibault Saunier
491bf70f89 tutorial: Add notice about missing language ports
Part-of: <https://gitlab.freedesktop.org/gstreamer/gst-docs/-/merge_requests/124>
2020-12-07 11:14:56 -03:00
Thibault Saunier
de01b82504 tutorials: Port 'hello world' to python
Part-of: <https://gitlab.freedesktop.org/gstreamer/gst-docs/-/merge_requests/124>
2020-12-07 11:14:56 -03:00
Thibault Saunier
e085b45563 Add template files to handle language in tutorials
Part-of: <https://gitlab.freedesktop.org/gstreamer/gst-docs/-/merge_requests/124>
2020-12-07 11:12:35 -03:00
Seungha Yang
85aeda42fe sendrecv/js: Add an UI for connecting to specified peer id
Part-of: <https://gitlab.freedesktop.org/gstreamer/gst-examples/-/merge_requests/28>
2020-12-07 20:40:50 +09:00
Seungha Yang
9e83c09be6 sendrecv/js: Convert taps to spaces
Part-of: <https://gitlab.freedesktop.org/gstreamer/gst-examples/-/merge_requests/28>
2020-12-07 20:40:50 +09:00
Seungha Yang
753f14f5de sendrecv: Add an option for example to be able to accept connection request from peer
Add "our-id" option to specify id to be used for registering to
signalling server and wait connection request from peer

Part-of: <https://gitlab.freedesktop.org/gstreamer/gst-examples/-/merge_requests/28>
2020-12-07 20:40:41 +09:00
Sebastian Dröge
758569a629 datetime: Update tests for returning NULL instead of g_return_val_if_fail() in error cases
Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/706>
2020-12-07 12:23:15 +02:00
Sebastian Dröge
cf0f39efe8 datetime: Make use of new g_time_zone_new_identifier() that properly handles errors
g_time_zone_new() returns UTC if it fails to parse the timezone
identifier, which is rather suboptimal and causes wrong datetimes to be
created silently.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/706>
2020-12-07 12:14:50 +02:00
Sebastian Dröge
9f23808b55 datetime: Clean up all constructors to fail gracefully if invalid dates/times are provided
And also don't crash dereferencing a NULL pointer if the GDateTime
functions return NULL.

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

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/706>
2020-12-07 12:14:50 +02:00
Sebastian Dröge
2bedcbaa2e datetime: Change getters to return specific invalid values if the value is not set
This is more bindings friendly than requiring a special function to be
called beforehand or getting an assertion instead, and should also
simplify some usage.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/706>
2020-12-07 12:14:50 +02:00
Sebastian Dröge
16733a82f4 datetime: Improve documentation a bit to explain when NULL is returned
Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/706>
2020-12-07 12:14:50 +02:00
Sebastian Dröge
b6debae2c0 ccconverter: Refactor code to only retrieve the timecode meta once
Part-of: <https://gitlab.freedesktop.org/gstreamer/gst-plugins-bad/-/merge_requests/1833>
2020-12-07 09:40:52 +00:00
Víctor Manuel Jáquez Leal
34683c36de va: decode: fix display type
Instead of a pointer to GstVaDisplay it was used a VADisplay type, which in
certain platforms is the same, and the compiler didn't complain.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gst-plugins-bad/-/merge_requests/1860>
2020-12-06 18:03:47 +01:00
He Junyan
dfc730165c libs: encoder: H265: Add screen content coding extensions support.
In scc mode, the I frame can ref to itself and it needs the L0 reference
list enabled. So we should set the I frame to P_SLICE type. We do not need
to change the ref_pic_list0/1 passed to VA driver, just need to enable the
VAEncPictureParameterBufferHEVC->pps_curr_pic_ref_enabled_flag to notify
the driver consider the current frame as reference. For bits conformance,
the NumRpsCurrTempList0 should be incremented by one to include the current
picture as the reference frame. We manually do it when packing the slice header.

Command line like:
gst-launch-1.0  videotestsrc num-buffers=10 ! \
capsfilter caps=video/x-raw,format=NV12, framerate=30/1,width=640,height=360 ! \
vaapih265enc ! capsfilter caps=video/x-h265,profile="{ (string)screen-extended-main }" ! \
filesink location=out.265
Can be used to specify that the encoder should use SCC profiles.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer-vaapi/-/merge_requests/379>
2020-12-06 23:37:56 +08:00
Jakub Adam
6434db5298 rtpbasepayload: pass optional caps fields in a GstStructure
For more flexibility, allow to pass the extra output caps fields as
a GstStructure.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gst-plugins-base/-/merge_requests/952>
2020-12-05 08:29:31 +00:00
Marc Leeman
102c60f82c rtpmanagerbad: allow setting caps on rtpsrc
rtpsrc tries to do a lookup of the caps based on the encoding-name. For
not so standard encodings, the caps can be set, avoiding the lookup.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gst-plugins-bad/-/merge_requests/1406>
2020-12-04 14:51:38 +00:00
Ratchanan Srirattanamet
cc8f54468e audiobasesrc: always acquire if not acquired in _setcaps
audiobasesrc's setcaps contains an optimization that makes it not re-
acquire the ringbuffer if the caps have not changed. However, it doesn't
check if it has successfully acquired it or not. It's possible to have
the caps set but not having ringbuffer acquired if the previous attempt
to acquire fails.

This commit replaces the caps existence check with whether the
ringbuffer is acquired or not. There's no need to check for caps
existence because 1.) it's unlikely to be NULL if the ringbuffer is
acquired, and 2.) _setcaps shouldn't be called with a NULL caps.

This should also let the element retry on acquiring ringbuffer after an
error by re-setting the element's state to READY and back to PLAYING.
Whether this behavior is correct is up for debate.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gst-plugins-base/-/merge_requests/512>
2020-12-04 13:57:58 +00:00
Thibault Saunier
6046a515cd launch: Add an interactive mode where we can seek etc...
Part-of: <https://gitlab.freedesktop.org/gstreamer/gst-editing-services/-/merge_requests/209>
2020-12-04 09:29:02 -03:00
Matthew Waters
656af79130 rtpmanager: update for rtp header extensions
Provide an implementation of the transport-wide-cc header extension and
use it in rtpfunnel.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gst-plugins-good/-/merge_requests/808>
2020-12-04 13:24:19 +11:00
Thibault Saunier
c35d47127b gst: Add new structure/caps/_to_string using the brackets for nesting
This adds `gst_structure_serialize` and `gst_caps_serialize` which use
the newly introduced bracket delimiters for nested structures.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/532>
2020-12-03 21:46:27 -03:00
Thibault Saunier
330450ef93 value: Cleanup on range parsing failures
Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/532>
2020-12-03 21:46:27 -03:00
Thibault Saunier
322caf880d structure: Add support for brackets as nested structures/caps specifiers
This introduces a more human friendly syntax to specify nested
structures It does so by using 2 different markers for opening and
closing them instead of abusing quotes which lead to requiring an insane
amount of escaping to match nesting levels.

The brackets (`[` and `]`) have been chosen as they avoid complex
constructions with curly brackets (or lower/higher than signs) where you
could have structures embedded inside arrays (which also use curly
brackets), ie. `s, array=(structure){{struct}}` should be parsed as an
array of structures, but the cast seems to imply something different. We
do not have this issue with brackets as they are currently used for
ranges, which can only be casted to numeric types.

This commit does not make use of that new syntax for serialization as
that would break backward compatibility, so it is basically a 'sugar'
syntax for humans. A notice has been explicitly made in the
documentation to let the user know about it.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/532>
2020-12-03 21:46:26 -03:00
Seungha Yang
96831233a3 d3d11videosink: Add a property to support rendering statistics data on window
Add a new property "render-stats" to allow rendering statistics
data on window for debugging and/or development purpose.
Text rendering will be accelerated by GPU since this implementation
uses Direct2D/DirectWrite API and Direct3D inter-op for minimal overhead.
Specifically, text data will be rendered on swapchain backbuffer
directly without any copy/allocation of extra texture.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gst-plugins-bad/-/merge_requests/1830>
2020-12-04 05:22:14 +09:00
Seungha Yang
22990bb9ea d3d11: Protect ID3D11VideoContext with lock
Likewise d3d11 immediate context (i.e., ID3D11DeviceContext),
ID3D11VideoContext API is not thread safe. It must be protected therefore.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gst-plugins-bad/-/merge_requests/1856>
2020-12-04 03:40:17 +09:00
Marijn Suijten
87ffe289aa check: gst_test_clock_process_next_clock_id returns nullable
It is possible there are no more pending clocks in the chain, in which
case this function returns null.

See also tests like test_single_shot_async_future that validate NULL
returns.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/714>
2020-12-03 19:25:30 +01:00
He Junyan
6ffddd27e5 glimagesink: Avoid assert in query.
The sink_query just uses context, other_context and display to query info.
But all these objects can be changed or distroyed in state_change() func
and other places.
This patch is not very perfect. The condition race still exists in other
places in this element. All the functions directly access these objects
without protection. Most of them are executed when the data is pushing and
draw context/window have already been established, so they should not have
problems. But the sink_query and propose_allocation functions are the query
-like functions and executed in query context, which can be called in any
state of the element. So it can cause some crash issues because of destroyed
context object.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gst-plugins-base/-/merge_requests/922>
2020-12-04 00:40:12 +08:00
Mathieu Duponchelle
cc44634422 docs: don't exit the subdir when optional deps aren't found
Part-of: <https://gitlab.freedesktop.org/gstreamer/gst-plugins-bad/-/merge_requests/1854>
2020-12-03 16:29:59 +00:00
He Junyan
f7ea6d9b64 glcolorconver: Return empty caps in transform_caps if fails.
We should not return a NULL in transform_caps() function. The NULL
will generate a assert of:
  "transform_caps returned caps which are not a real subset of the
   filter caps"
in transform base class.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gst-plugins-base/-/merge_requests/922>
2020-12-04 00:24:32 +08:00
He Junyan
1146a7e3a0 glbasefilter: Need to check the display before lock it.
In find_gl_context_unlocked(), the display of filter may be NULL
and can cause crash if we directly access and lock it.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gst-plugins-base/-/merge_requests/922>
2020-12-04 00:23:38 +08:00
He Junyan
089a1f56b0 glbasefilter: Delete the un-paired unlock in change_state().
Part-of: <https://gitlab.freedesktop.org/gstreamer/gst-plugins-base/-/merge_requests/922>
2020-12-04 00:13:59 +08:00
Edward Hervey
d137171f03 opencv: Expose retinex parameters
Makes the plugin a tad more useful :)

Part-of: <https://gitlab.freedesktop.org/gstreamer/gst-plugins-bad/-/merge_requests/1845>
2020-12-03 17:04:07 +01:00
Marius Vlad
aa68d03013 gst-libs/gst/wayland: Install "unstable" wayland header
Context creation and retrieval is required, the symbols are exported
with the header missing. Users most likely define GST_USE_UNSTABLE_API
so they're aware of the implications of using a header that might change
between releases.

Signed-off-by: Marius Vlad <marius.vlad@collabora.com>
Part-of: <https://gitlab.freedesktop.org/gstreamer/gst-plugins-bad/-/merge_requests/1688>
2020-12-03 14:54:47 +00:00
Edward Hervey
339ad46b93 hlsdemux: Use actual object for logging
i.e. the pad of the stream

Part-of: <https://gitlab.freedesktop.org/gstreamer/gst-plugins-bad/-/merge_requests/1853>
2020-12-03 14:31:17 +00:00
Arun Raghavan
81abc4c825 curl: Remove incorrect GST_DEBUG_OBJECT() calls
klass is not a GstObject, and these debugs print should likely not be
around anyway.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gst-plugins-bad/-/merge_requests/1851>
2020-12-03 13:31:38 +00:00
Arun Raghavan
27ce682940 audioencoder: Fix incorrect GST_LOG_OBJECT usage
GstBuffer is not a GstObject, so this causes a warning to be emitted.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gst-plugins-base/-/merge_requests/956>
2020-12-03 12:46:33 +00:00
Arun Raghavan
f0210bf92e gitignore: Add the webrtc-audio-processing subproject
Part-of: <https://gitlab.freedesktop.org/gstreamer/gst-build/-/merge_requests/227>
2020-12-03 06:40:15 -05:00
Edward Hervey
dddd0af9cd cuda: Fix lowest targetted architecture for CUDA >= 11.0
Fixes https://gitlab.freedesktop.org/gstreamer/gst-plugins-bad/-/issues/1469

Part-of: <https://gitlab.freedesktop.org/gstreamer/gst-plugins-bad/-/merge_requests/1835>
2020-12-03 12:23:44 +01:00
Matthew Waters
7a53fbad68 rtp/basepayload: implement support for rtp header extensions
New signals are added for managing the internal list of rtp header
extension implementations read by a specific depayloader instance.

If the 'extmap-$NUM' field is present in the src caps, then an
extension implementation will be requested but is not required to be able
to negotiate correctly.  An extension will be requested using the
'request-extension' signal if none could be found internally.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gst-plugins-base/-/merge_requests/748>
2020-12-03 10:19:32 +00:00
Matthew Waters
092ea647bb rtp/basedepayload: implement support for rtp header extensions
New signals are added for managing the internal list of rtp header
extension implementations read by a specific depayloader instance.

If the 'extmap-$NUM' field is present in the sink caps, then an
extension implementation will be requested but is not requited to be
able to negotiate correctly.  An extension will be requested using the
'request-extension' signal if none could be found internally.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gst-plugins-base/-/merge_requests/748>
2020-12-03 10:19:32 +00:00
Matthew Waters
427c3f4442 rtp: add base object for reading/writing rtp header extensions (RFC5285)
Facilitates the creation of rtp header extension implementations that
can be reused across applications.

Implementations are registered into the GStreamer registry as elements
(idea from GstRTSPExtension) and can be retrieved by URI or filtered
manually.  RTP header extensions must have the classification
"Network/Extension/RTPHeader" to be considered as a RTP Header
extension.

Fixes: https://gitlab.freedesktop.org/gstreamer/gst-plugins-base/-/issues/777
Part-of: <https://gitlab.freedesktop.org/gstreamer/gst-plugins-base/-/merge_requests/748>
2020-12-03 10:19:32 +00:00
Mart Raudsepp
526cb2baa8 gl/eagl: Fix automatic resize behaviour
https://gitlab.freedesktop.org/gstreamer/gst-plugins-base/-/merge_requests/681
added a layoutSubViews, which never gets called, because it should have been
called layoutSubviews (non-capital "v"). However after fixing that, it still
doesn't work correctly, because window_width/height values are immediately
updated and then draw_cb will never trigger the resize path, because the
values are already up to date.
Update the values inside the resize path again instead, so the check for
entering the resize path is logically always correct.
This makes the layoutSubviews unnecessary, as it only updated the internal
size values prematurely, so it is deleted instead of method naming fixed.

These changes were originally done to avoid accessing UIKit objects on the
main thread, but no additional accesses are added here, only internal
private variable assignments under the same draw_lock, so there should be
no threading issues reintroduced.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gst-plugins-base/-/merge_requests/945>
2020-12-03 08:18:29 +00:00
Mart Raudsepp
8ffea3afb5 gl/eagl: Fix resize condition check in draw_cb to not get called unnecessarily
A CGSize contains CGFloat values (a typedef to double or float), which means
that the values aren't equal, despite it being equal after they are cast to
int by assigning them to window_height/width private members. This leads to
excessive gst_gl_window_resize calls on each frame, at least if the CGFloat
value has a .5 decimal value, e.g. 103.5.
Fix it by storing them as CGFloat instead of gint.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gst-plugins-base/-/merge_requests/945>
2020-12-03 08:18:29 +00:00
Matthew Waters
d4ff62700d video/converter: increase the number of cache lines for resampling
The exising hardcoded max default does not account for the possible
-1 offset when retrieving lines for resampling.  As a result, when
another chain has the same number of cache lines (4), the resample
operation would be attempting to generate 5 lines with a cache size
of 4 and would overwrite the first cache line.

Fixes https://gitlab.freedesktop.org/gstreamer/gst-plugins-base/-/issues/821

Part-of: <https://gitlab.freedesktop.org/gstreamer/gst-plugins-base/-/merge_requests/938>
2020-12-03 06:39:09 +00:00
Axel Kellermann
df3a6542a2 Fix typos in streaming.md
Part-of: <https://gitlab.freedesktop.org/gstreamer/gst-docs/-/merge_requests/123>
2020-12-02 19:04:40 +00:00
Axel Kellermann
172ace3cc2 Fix typos in media-information-gathering.md
Part-of: <https://gitlab.freedesktop.org/gstreamer/gst-docs/-/merge_requests/122>
2020-12-02 16:08:01 +00:00
Jose Quaresma
f5ee123958 meson: gtk_doc is not supported anymore
Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/710>
2020-12-02 15:04:50 +00:00
Edward Hervey
30ee21eae3 tsparse: Forward incoming timestamps
Ensure we properly forward the upstream PTS/DTS on the regular and program
source pads. All packets being processed will carry over the latest PTS/DTS (as
a reconstructed GstBuffer).

Fixes https://gitlab.freedesktop.org/gstreamer/gst-plugins-bad/-/issues/1419

And properly forward PTS/DTS for program pads (which wasn't the case before)

Original patch by Vivia Nikolaidou <vivia@ahiru.eu>

Part-of: <https://gitlab.freedesktop.org/gstreamer/gst-plugins-bad/-/merge_requests/1769>
2020-12-02 14:22:06 +00:00
Sebastian Dröge
7bd73a56ca streams: gst_stream_type_get_name() is not nullable
It takes an enum and only the defined values are valid to pass in here
as it's not extensible from the outside.

Add a g_return_val_if_reached() for the unreachable case and return
"invalid".

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/711>
2020-12-02 14:21:46 +00:00
Sebastian Dröge
2f3e245426 adaptivedemux: Don't log with non-GObject objects
Instead of using the streams, log with the pad of the streams.

https://gitlab.freedesktop.org/gstreamer/gst-plugins-bad/-/issues/1457

Part-of: <https://gitlab.freedesktop.org/gstreamer/gst-plugins-bad/-/merge_requests/1844>
2020-12-02 12:03:36 +00:00
Jordan Petridis
d4e55b655c
Revert "ci: check commit using ci-fairy"
This reverts commit 12c1689aaa.

Revert ci-fairy check-commits job for now as it seems a bit
buggy. It picks up commits that are not part of the branch
and breaks the CI.

Will investigate further and reintroduce it later.
2020-12-02 12:38:57 +02:00