Commit graph

7389 commits

Author SHA1 Message Date
Mathieu Duponchelle
3c4bef46b7 basepayload: Expose onvif-no-rate-control property
The ONVIF spec mandates that when Rate-Control=no, the RTP timestamps
match the original sampling times, as opposed to the intended playback
time.
2019-04-05 16:42:55 +00:00
Mathieu Duponchelle
57f5c2d4db rtspdefs: Add Onvif Rate-Control header 2019-04-05 16:42:55 +00:00
Mathieu Duponchelle
e9b2cd0e53 rtspdefs: Add Onvif Frames header 2019-04-05 16:42:55 +00:00
Haihao Xiang
3b6415b421 video: add BGR10A2_LE pixel format
This pixel format is a packed 4:4:4 RGB with alpha channel (B-G-R-A),
R/G/B channel has 10 bits and alpha channel is the MSB 2 bits.
2019-04-04 01:59:18 +00:00
Mathieu Duponchelle
abed7c2d3d gstvideometa: do not emit criticals when adding timecode metas
This is inconsistent with other add_meta methods such as
gst_buffer_add_video_meta , which will return NULL without
logging when gst_video_info_set_format fails.

It is up to the caller to check the return value of the
function, and log if appropriate.
2019-04-03 17:37:10 +02:00
Aaron Boxer
6ade19cc15 discoverer: async_timeout_cb: don't clean up timeout_source
discoverer_collect() already does this. So, the second
unref triggers an assert.
2019-04-01 18:35:06 +00:00
Haihao Xiang
a6afa88812 video: fix unpack_Y410
It should handle data starting from x
2019-03-26 10:24:35 +08:00
Haihao Xiang
4ab04e5dea video: fix unpack_Y210
It should handle data starting from x and width may be an odd
2019-03-26 10:24:35 +08:00
Guillaume Desmottes
10ce73b6eb video-info: check if alternate caps has the feature as well
It's invalid to have a 'interlace-mode=alternate' without the Interlaced caps
feature as well.
Modify gst_video_info_from_caps() to reject such case so we can easily
spot them in bugged elements.
2019-03-25 15:36:57 +01:00
Guillaume Desmottes
6ba860021c video-info: handle 'field-order' in alternate mode
The alternate interlace mode may also use the 'field-order' field in caps.
2019-03-25 15:35:46 +01:00
Tim-Philipp Müller
2f9db671cb gl: suppress some g-i warnings
gst_gl_memory_setup_buffer() was marked as introspectable=0
anyway, so might just as well mark it as '(skip)' and suppress
the warning. Reason is the (element-type gpointer) on wrapped_data.

gstglmemory.c:1426: Warning: GstGL: gst_gl_memory_setup_buffer: argument wrapped_data: Missing (element-type) annotation
gstglmemory.c:1426: Warning: GstGL: gst_gl_memory_setup_buffer: argument wrapped_data: Missing (element-type) annotation

egl/gstegl.h:40: Warning: GstGL: symbol='EGL_EGLEXT_PROTOTYPES': Unknown namespace for symbol 'EGL_EGLEXT_PROTOTYPES'
2019-03-24 16:05:09 +00:00
Tim-Philipp Müller
bb48e326ac meson: gl: don't pass generated xdg shell header and source file to g-i
They're private, g-i doesn't need to know about them.
Avoids lots of spammy g-i warnings.
2019-03-23 21:51:37 +00:00
Tim-Philipp Müller
413b7168da audiometa: fix g-i warning
gstaudiometa.c:382: Warning: GstAudio: gst_buffer_add_audio_meta: return value: Invalid non-constant return of bare structure or union; register as boxed type or (skip)
2019-03-23 20:08:56 +00:00
Sebastian Dröge
2ad6b0b432 rtspconnection: Remove unneeded bytes_written >= 0 conditions
It's unsigned and always >= 0.

Fixes https://gitlab.freedesktop.org/gstreamer/gst-plugins-base/issues/569
2019-03-22 10:28:16 +02:00
Haihao Xiang
2a45590051 video: update orc generated files for new functions 2019-03-21 23:05:09 +00:00
Haihao Xiang
f0cbb78770 glimagesink: add support for VUYA format 2019-03-21 23:05:09 +00:00
Haihao Xiang
90f8cca04e video: add VUYA pixel format
AYUV in gstreamer was defined in A-Y-U-V order in memory[1], however
Microsoft defined another AYUV format in V-U-Y-A order in memory[2]. Add
VUYA format for the latter in order to distinguish the two formats

[1] https://gstreamer.freedesktop.org/documentation/design/mediatype-video-raw.html#formats
[2] https://docs.microsoft.com/en-us/windows/desktop/medfound/recommended-8-bit-yuv-formats-for-video-rendering#ayuv)
2019-03-21 23:05:09 +00:00
Josep Torra
c1a5a36bba rtcpbuffer: test for len instead of type
The function rtcp_packet_min_length() returns a length for each known type
and -1 for unknown types. This change fixes the test accordingly and silences
the following warning.

gstrtcpbuffer.c:567:12: error: comparison of constant -1 with expression of type 'GstRTCPType' is always false
      [-Werror,-Wtautological-constant-out-of-range-compare]
  if (type == -1)
2019-03-21 19:27:28 +01:00
Nicolas Dufresne
3ee89d6e3c Remove some left over 0.10 references 2019-03-21 17:22:24 +00:00
Josep Torra
a1cc9ea6a9 discoverer: add casts to avoid warnings in osx builds
Fix the following warnings by adding casts.

gstdiscoverer.c:1801:17: error: format specifies type 'unsigned long' but the argument has type 'off_t' (aka 'long long') [-Werror,-Wformat]
      location, file_status.st_size, file_status.st_mtime);
                ^~~~~~~~~~~~~~~~~~~
gstdiscoverer.c:1801:38: error: format specifies type 'long long' but the argument has type '__darwin_time_t' (aka 'long') [-Werror,-Wformat]
      location, file_status.st_size, file_status.st_mtime);

https://gitlab.freedesktop.org/gstreamer/gst-plugins-base/issues/570
2019-03-21 17:21:30 +01:00
Stian Selnes
eadeec791a rtpbasedepayload: Drop gap events before first buffer
Before a gap event is pushed downstream a segment event must be pushed
since the gap event can cause packet concealment downstream and hence
data flow. Since concealment before receiving any data packets usually
doesn't make any sense, the gap event is not sent downstream.

Alternatively one could generate a default caps and segment event, but
no need to complicate things until it's proven necessary.

https://bugzilla.gnome.org/show_bug.cgi?id=773104
https://gitlab.freedesktop.org/gstreamer/gst-plugins-base/issues/301
2019-03-20 15:30:50 +00:00
Roman Shpuntov
31cb8500ee macOS gst-plugins-base/gl/cocoa: UI API called on a background thread: -[NSView removeFromSuperview]
The problem inside gstglwindow_cocoa.m, all UI operations must be called from main UI thread.

https://gitlab.freedesktop.org/gstreamer/gst-plugins-base/issues/568
Fixes #568
2019-03-20 18:44:12 +07:00
Wonchul Lee
a75e47e815 appsrc: Fix docs typo
Fix typo empty-percent to min-percent
2019-03-16 14:57:56 +00:00
Antonio Ospite
1eb9c5b309 rtpbasepayload: print list size in log output instead of -1
It is weird to see "Preparing to push packet with size 4294967295" in
the logs, so print the list length in case of a buffer list.
2019-03-15 17:38:58 +01:00
Tobias Ronge
f672277509 gstrtspconnection: Security loophole making heap overflow
The former code allowed an attacker to create a heap overflow by
sending a longer than allowed session id in a response and including a
semicolon to change the maximum length. With this change, the parser
will never go beyond 512 bytes.
2019-03-14 10:24:30 +01:00
Guillaume Desmottes
2e939afd73 video-color: add more color primaries formats
They correspond to index 10, 11, 12 and 22 from ITU-T H.273,
Table 2 – Interpretation of colour primaries (ColourPrimaries) value
2019-03-12 16:53:54 +01:00
Nirbheek Chauhan
045137d340 glwindow/win32: Don't use condition variables for message synchronization
Using a single condition variable for synchronization across all GL
messages is very slow on Windows and uses up to 20% CPU usage in some
workloads due to lock contention and false broadcasts.

Using per-message event handles reduces the CPU usage to negligible
amounts despite having to allocate a new event handle for each
message.
2019-03-12 03:21:57 +00:00
Nirbheek Chauhan
36ec18c230 glmemory: Disable GL timing queries when debugging
This can be very expensive in some workloads, taking up to 11% of the
total execution time.
2019-03-12 03:21:57 +00:00
Nirbheek Chauhan
21bc1040d4 glframebuffer: Don't do expensive checks with low gst debug levels
Framebuffer checks can be very expensive, taking up to 3-5% of the
total CPU consumed by the application.
2019-03-12 03:21:57 +00:00
Lucas Stach
c71dd72b21 gl/wayland: fix glib mainloop integration
Implement the prepare and check functions according to the
documentation by returning TRUE when events should be dispatched
via the dispatch function.

As wl_display_read_events never blocks we can call it unconditionally
without looking at the poll status.

This simplifies the implementation and gets rid of a race where the
mainloop could get blocked due to nobody actually reading the events
from the wayland connection.
2019-03-11 13:54:16 +01:00
Mathieu Duponchelle
a35d500eae videoaggregator: fix buffer skipping with pad offsets
The ->skip_buffer implementation in videoaggregator replicates
the behaviour of the aggregate method to determine whether a
buffer can be skipped
(https://bugzilla.gnome.org/show_bug.cgi?id=781928).

This fixes a typo that made it so the start time of the buffer
was calculated against the output segment, not the segment of
the relevant sinkpad, which caused buffers to be skipped when
for example a sinkpad had received a segment which base had
been modified by a pad offset somewhere along the way.

This simply makes the calculation of the buffer start time
identical to the calculation in aggregate()
2019-03-08 07:40:25 +00:00
Matthew Waters
6a37bf9bb9 gl: Don't restore the viewport on function exit
Doing so involves retrieving the current viewport from OpenGL which as
with any glGet operation, is expensive.

This means that the various sinks need to reset the viewport on draw.

In the process, fix resizing on cocoa.
2019-03-08 17:49:05 +11:00
Thibault Saunier
7bcd72f5b6 Revert "Revert "discoverer: Serialize/load "next" StreamInfo in GVariants""
This reverts commit 747f5a75c3.

This was never meant to be reverted in the first place but sliped in
during developement
2019-03-07 19:52:44 -03:00
Thibault Saunier
747f5a75c3 Revert "discoverer: Serialize/load "next" StreamInfo in GVariants"
This reverts commit 6ca357f5b67590c694a95013f5eb5fdd04cf46a9.
2019-03-07 20:59:29 +00:00
Thibault Saunier
19c86b4494 discoverer: Remove padding from private headers 2019-03-07 20:59:29 +00:00
Thibault Saunier
c8eee6f0c6 dicoverer: Do not add container infos to the stream list
They are not added on actual discovery

See https://gitlab.freedesktop.org/gstreamer/gst-plugins-base/issues/398
2019-03-07 20:59:29 +00:00
Thibault Saunier
4014995d0c discoverer: Serialize/load "next" StreamInfo in GVariants
See https://gitlab.freedesktop.org/gstreamer/gst-plugins-base/issues/398
2019-03-07 20:59:29 +00:00
Thibault Saunier
54920276b0 discoverer: Implement GstDiscovererInfo caching
This uses the gst_discoverer_info_from/to_variant API and saves
the variants on disc (in the user data cache dir) allowing much
faster retrieval of the information after the cache has been built.

Fixes https://gitlab.freedesktop.org/gstreamer/gst-plugins-base/issues/398
2019-03-07 20:59:29 +00:00
Olivier Crête
6a8c15f3bd video-aggregator: Sync property values to output timestamp
The properties need to be change at every output frame based on the output
time because they may change even though the input frame is not changing.
2019-03-07 14:43:06 -05:00
Matthew Waters
4e13980e10 gl: fix a few other leaks when not getting to PAUSED 2019-03-07 02:01:09 +11:00
Matthew Waters
86aa568383 glcolorconvert: Ensure we free the internal convert object
If we only ever make it to READY, transform_caps can create an
internal convert object that will never be freed by basetransform's
stop vmethod (PAUSED->READY).
2019-03-06 23:32:18 +11:00
Tim-Philipp Müller
d58b7cf75c gl: .gitignore generated wayland xdg shell files 2019-03-06 10:49:48 +00:00
Tim-Philipp Müller
81ccfdd6fd video: fix pipeline leak in gst_video_convert_sample_async() 2019-03-06 10:04:48 +00:00
Matthew Waters
13fc711eca gloverlaycompositor: Also free the texcoord GL buffer
Fix a typo that was attempting to free the position GL buffer twice
(without any consequences as there was a if (buffer) check)

Fixes https://gitlab.freedesktop.org/gstreamer/gst-plugins-base/issues/561
2019-03-06 01:08:04 +00:00
Tim-Philipp Müller
8d1122013b audiodecoder: add _finish_subframe() method
This allows us to output audio samples without discarding
any input frames, which is useful for some formats/codecs
(e.g. the MonkeysAudio decoder implementation in ffmpeg
which will might return e.g. 16 output buffers for an
input buffer for certain files).

In the past decoder implementations just concatenated
the returned audio buffers until a full frame had been
decoded, but that's no longer possible to do efficiently
when the decoder returns audio samples in non-interleaved
layout.

Allowing subframes to be output before the entire input
frame is decoded can also be useful to decrease startup
latency/delay.

https://gitlab.freedesktop.org/gstreamer/gst-libav/issues/49
2019-03-05 19:49:13 +00:00
Marc Leeman
2e5f5e67ce rtp: add H265 to lookup for media info 2019-03-05 14:33:17 +01:00
Nicolas Dufresne
3f3719da41 videooverlay: Fix render-rectangle range
The range was set to -1 to MAXINT, but the x,y value can be negative.
Relax the restriction so that we can now have negative coordinates.
2019-03-04 17:05:04 -05:00
Matthew Waters
55bcdcf01a gl: actually use the highp specifier
675415bf2e contained a typo that incorrectly
used the mediump specifier instead of highp.
2019-02-28 23:39:21 +11:00
Matthew Waters
675415bf2e gl: try to use highp precision where supported
The use of mediump as a specifier in GLSL shaders will have limited
resolution and when used as texture coordinates may become inaccurate
over texture sizes of 1024.
2019-02-28 17:26:32 +11:00
James Cowgill
8f51fba8b5 video-format: Fix GBRA_10/12 alpha channel pixel strides
These formats have 4 components, so they should also have 4 components
of pixel stride.
2019-02-20 09:40:24 +00:00