Commit graph

7593 commits

Author SHA1 Message Date
Guillaume Desmottes
ea2619aadc video: fix GST_VIDEO_FRAME_IS_BOTTOM_FIELD()
GST_VIDEO_FRAME_FLAG_BOTTOM_FIELD is a subset of
GST_VIDEO_FRAME_FLAG_TOP_FIELD so needs to be checked accordingly.

Fix #726
2020-02-26 16:15:59 +00:00
Guillaume Desmottes
26f386ce8b video: add macros checking for GST_VIDEO_BUFFER_FLAG_TOP/BOTTOM_FIELD flags
The GST_VIDEO_BUFFER_FLAG_TOP_FIELD flag is a superset of
GST_VIDEO_BUFFER_FLAG_BOTTOM_FIELD as they are defined using other
flags. As a result we can't use GST_BUFFER_FLAG_IS_SET() to check for
those flags.
2020-02-26 16:15:59 +00:00
Stéphane Cerveau
19f27f94ee videoencoder: protect the use of num_subframes
change stream lock location to protect the use of
frame->abidata.ABI.num_subframes
2020-02-24 20:37:38 +00:00
Devarsh Thakkar
8df947df5d videoencoder: Release stream lock in finish_subframe before pad_push
Derived from 780d635dadc0723e39a8ba90cfe0903a2de346fd for
https://bugzilla.gnome.org/show_bug.cgi?id=715192
which was for finish_frame.
2020-02-24 20:37:38 +00:00
Seungha Yang
6dd643532f meson: gl: Update to support when egl and win32 window system are explicitly requested 2020-02-18 21:04:42 +09:00
Seungha Yang
6531037533 glwindow/win32: Accept both win32 and egl display
EGL would be the case where we use ANGLE.
2020-02-18 20:11:40 +09:00
Seungha Yang
929c17e6cc glcontext: egl: Fix build with win32 window system 2020-02-18 20:10:22 +09:00
Seungha Yang
e78c5ffb1b gl: Decouple win32 window and wgl context
With ANGLE, win32 window can be used with gles and egl
2020-02-18 20:10:03 +09:00
Seungha Yang
4a006d6951 glcontext/egl: Fix build with upstream ANGLE
ANGLE_surface_d3d_render_to_back_buffer extension is only available
with Microsoft fork of ANGLE. Note that Microsoft's ANGLE repository
has been deprecated.
2020-02-18 04:48:06 +00:00
Seungha Yang
d176f67d33 gl/window/win32: Handle mouse and key events
This is at least useful for the gst-play-1.0 use case.
2020-02-17 02:42:41 +00:00
He Junyan
07f459caa4 libs: dmabuf: init the GST_CAT_DEFAULT in type define.
To avoid `gst_debug_log_valist: assertion 'category != NULL' failed`
if we do not call gst_dmabuf_allocator_new
2020-02-15 11:42:15 +08:00
Sebastian Dröge
9a55945c0b appsrc/appsink: Make setting/replacing callbacks thread-safe
Previously we would simply use them without any locking at all, while
using the object lock for setting them. Nothing prevented new callbacks
to be set in the meantime, potentially calling a callback with already
freed user_data.

To prevent this move the callbacks into a reference counted struct and
use the appsrc/appsink mutex to protect access to it, which is used in
all functions calling the callbacks already anyway.

Fixes https://gitlab.freedesktop.org/gstreamer/gst-plugins-base/issues/729
2020-02-14 14:42:19 +00:00
Håvard Graff
85e201fe30 rtpbasepayload: add property for embedding twcc sequencenumbers
By setting the extension-ID for TWCC (Transport Wide Congestion Control),
the payloader will embed sequencenumbers as a RTP header-extension
according to https://tools.ietf.org/html/draft-holmer-rmcat-transport-wide-cc-extensions-01#section-2

The negotiation of this being enabled with downstream elements
is done with caps reflecting the way this is communicated using SDP.
2020-02-14 09:40:59 +00:00
Matthew Waters
0e1f7f6e8d gl/window/win32: implement get_window_handle()
Some other frameworks need the HWND to retrieve information from.
2020-02-13 12:31:43 +11:00
Kristofer Björkström
4152b0c840 rtpbasepayload: timestamp bug, if rate control=no
With commit "basepayload: Expose onvif-no-rate-control property" the rtp
timestamp changed behaviour when rate control is disabled.

When disabling rate control, we must take care of the stream time to
avoid the timestamps to begin from zero again.
2020-02-11 12:30:49 +00:00
Thibault Saunier
1e9da26b68 discoverer: Start discovering next URI from right thread
When using the cache, we were not using the right GMainContext to setup
next URI to discovery, fix that.
2020-02-10 17:16:42 -03:00
Matthew Waters
a171eb80d6 glcolorconvert: error out if memory context is different than ours 2020-02-05 15:32:14 +11:00
Matthew Waters
1abd05dbff glviewconvert: fix reset context for GL context change
We need to remove GL resources from the old context instead of the new
GL context.  The two GL context may not even be shared.
2020-02-05 15:32:14 +11:00
Matthew Waters
af1986352b glviewconvert: fix a use-after-free with allocation params
_free(params) followed by a params->align is a bad idea :)
2020-02-05 15:32:14 +11:00
Matthew Waters
cbffe13d60 glviewconvert: also remove GL buffers on a reset
Fixes a possible memory leak on renegotiation
2020-02-05 15:32:14 +11:00
Matthew Waters
9461d178ea gl/basesrc: call gl_stop when shutting down
Fixes multiple leaks
2020-02-05 15:31:38 +11:00
Havard Graff
19e4d1a93c rtpbuffer: add gst_rtp_buffer_get_extension_onebyte_header_from_bytes
So that one can parse the GBytes returned by gst_rtp_buffer_get_extension_bytes
2020-02-04 08:44:43 +00:00
Mathieu Duponchelle
54cc985810 videoaggregator: handle gap buffers properly
This simply implies not trying to "prepare" those buffers,
as mapping an empty buffer to a video frame does not make
much sense.

This also adds a simple test in compositor that performs
some trivial checking of the handling of gap events, the test
was not failing before, but an error was logged, this is
no longer the case.

Fixes #717
2020-01-30 19:02:44 +01:00
Sebastian Dröge
72cb0c0641 videoaggregator: Don't configure NULL chroma-site/colorimetry
If there's no known value in the best caps then the functions to convert
them to strings will return NULL. Having the fields not in the caps is
not a problem, having them with a NULL value however will cause
negotiation failures.
2020-01-28 22:07:44 +02:00
Thibault Saunier
ae2b4f8899 encodebin: Add missing 'Since' marker 2020-01-13 18:33:29 -03:00
Nicolas Dufresne
8b2afcf56a rtpbasepayload: Save and forward the push flow return
Save push/push_list helper flow return and in case of failure, return it
in the process function. This allow forwarding downstream flow return
even if the subclass is using the push/push_list helper.
2020-01-11 19:39:55 -05:00
Ryan Huang
c7a9a966b0 Fix link to raw video format design document 2020-01-02 23:37:21 +00:00
Aaron Boxer
807418894b rtspurl: add API method to create request uri combined with control url
code logic very similar to gst_rtsp_url_get_request_uri ()
2019-12-27 16:57:08 +00:00
Mathieu Duponchelle
64d2e6b70d gstvideoaggregator: always update converter when needed
In prepare_frame, it is not enough for the target info
(conversion_info) to not have changed to decide not to update
the converter, as the vpad info may have changed as well.

Fixes #714
2019-12-27 11:57:22 +00:00
Sebastian Dröge
ad68f71d9a fft: Update our kiss fft version
This fixes thread-safety issues and various other minor issues. Our
previous version was about 13 years old.

Fixes https://gitlab.freedesktop.org/gstreamer/gst-plugins-base/issues/715
2019-12-27 11:53:14 +02:00
Seungha Yang
940c9998e5 glwindow/win32: Don't post any WinProc message to parent window
Posting any message to parent seems to be pointless. That might break
parent window.
Regardless of the posting, parent window can catch mouse event
and also any keyboard events will be handled by parent window by default.

Fixes: https://gitlab.freedesktop.org/gstreamer/gst-plugins-base/issues/634
2019-12-22 09:16:35 +00:00
Stéphane Cerveau
6cfdeb7423 videoencoder: send new headers in finish_frame
If headers have been set by subclass, this headers should be sent
for a first time or on demand with a key-unit
2019-12-21 02:59:14 +00:00
Stéphane Cerveau
7013a58874 videoencoder: Use video marker flag to signal end of frame
This marker is optional, its name refer to RTP marker bit. This mark can
be use to reduce latency in various use cases. With the split between
finish_frame() and finish_subframe() we will now be able to identitfy
the last subframe with no latency.

In order to detail the use of GST_BUFFER_FLAG_MARKER in a video
use case, the flag GST_VIDEO_BUFFER_FLAG_MARKER has been introduced
with a proper documentation clarifying marker's role.
2019-12-21 02:59:14 +00:00
Guillaume Desmottes
3e32896912 videoencoder: add API to push subframes
Introduce a new API so encoders can split the encoding in subframes.
This can be useful to reduce the overall latency as we no longer need to
wait for the full frame to be encoded to start decoding or sending it.
2019-12-21 02:59:14 +00:00
Guillaume Desmottes
789803fd6d videoencoder: factor out logic from gst_video_encoder_finish_frame()
No semantic change, I'm going to reuse all those functions in a new
finish_slice() methods.
2019-12-21 02:59:14 +00:00
Jonas Holmberg
af909c6d82 audioencoder: fix segment event leak
Segment event was leaked if format != _TIME.
2019-12-20 12:43:35 +00:00
Olivier Crête
6b283d9e78 Revert "videoencoder: factor out logic from gst_video_encoder_finish_frame()"
This reverts commit b1ec312b8e.
2019-12-19 17:52:12 -05:00
Stéphane Cerveau
b1ec312b8e videoencoder: factor out logic from gst_video_encoder_finish_frame()
No semantic change, I'm going to reuse all those functions in a new
finish_slice() methods.
2019-12-19 21:59:10 +00:00
Olivier Crête
61aeb4bbc3 rtspconnection: Add functions without GTimeVal deprecate existing
GTimeVal is now deprecated in GLib, so let's deprecate it here too
2019-12-18 18:20:25 +00:00
Stéphane Cerveau
f8dc428a2a remove various useless linefeed in logs 2019-12-11 10:07:12 +01:00
Stéphane Cerveau
3b8769e673 codec-utils: add h264 constrained and progressive profiles
Those profiles have been added in the version 2012-01
and 2011-06 of the AVC spec.

Aligned code with https://bugzilla.gnome.org/show_bug.cgi?id=794127
2019-12-03 23:35:23 +00:00
Matthew Waters
eb0107986a gl/macos+ios: privatise _invoke_on_main()
https://gitlab.freedesktop.org/gstreamer/gst-plugins-bad/issues/1132
2019-12-03 14:15:58 +11:00
Mart Raudsepp
65f2bb8fa2 videoaggregator: don't let a repeat-after-eos pad prevent EOS
.. if there are pads present that are not repeating after EOS.

Fixes #664
2019-11-27 22:21:14 +02:00
Edward Hervey
df35256dad video-converter: Fix RGB-XYZ-RGB conversion
The matrices were in the wrong order.
Instead of the conversion matrix being
  _ XYZ_TO_RGB_output * RGB_TO_XYZ_input * input_RGB
It was
  _ RGB_TO_XYZ_input * XYZ_TO_RGB_output * input_RGB
2019-11-21 13:46:38 +00:00
Jochen Henneberg
33ae846607 audioringbuffer: Reset reorder flag before check
This function might be revisited with different channel position mapping
while audio source goes into play so the reorder flag needs to be reset
before the checks happen.
2019-11-17 14:10:31 +00:00
Wonchul Lee
32ae3e336d glupload: Fix allocator leak
It fixes allocator leak in failure case
2019-11-15 10:26:48 +00:00
Guillaume Desmottes
8a3d901d8f video-info: improve GST_CAPS_FEATURE_FORMAT_INTERLACED documentation
Copied the description from gst-doc written by Tim.

Fix #606
2019-11-15 04:19:20 +00:00
Matthew Waters
a41bad561a gl/window: marshall quit to the window thread
Fixes a possible deadlock where we're waiting for the window thread to
quit but it never does.
2019-11-15 01:04:45 +00:00
Sebastian Dröge
89f613abf5 audio-buffer: Don't fail to map buffers with zero samples
Instead initialize the map infos, etc to NULL like gst_buffer_map()
would be doing on a zero-sized buffer.

This fixes a crash in audioresample if the first output buffer would
contain zero samples.
2019-11-14 14:47:44 +01:00
Wonchul Lee
7d8e7cd3eb glcontext/egl: Fix window leak
Fixed to do unref after use of window get by gst_gl_context_get_window()
2019-11-13 17:35:40 +09:00