Commit graph

467 commits

Author SHA1 Message Date
Mikhail Fludkov
d7397f0235 rtpbuffer.h: Add new RTPBuffer flags
These flags will be used for Forward Error Correction purposes

https://bugzilla.gnome.org/show_bug.cgi?id=792695
2018-02-21 12:45:41 +01:00
Miguel Paris
bae3636197 rtp: fix gst_rtp_buffer_ext_timestamp taking into account backwards
If timestamp goes forwards more than allowed, we consider that the
timestamp belongs to the previous counting, so the extended timestamp
is unwrapped.

https://bugzilla.gnome.org/show_bug.cgi?id=783443
2017-12-21 17:27:42 -05:00
Sebastian Dröge
d33c407f6b rtp: Require gconstpointer instead of gpointer for gst_rt[c]p_buffer_new_copy_data() 2017-11-17 14:14:55 +02:00
Edward Hervey
ae865ec1d1 rtcpbuffer: fix left shift override
Needs to be cast to the target type
2017-11-04 16:56:10 +01:00
Justin Kim
33709106e9 rtcpbuffer: Add XR type
RTCP XR provides supplements information of the report blocks
from SR and RR. This patch is for downgrading warnings when
XR is detected before implementing entire block types of RFC3611.

https://bugzilla.gnome.org/show_bug.cgi?id=789743
2017-11-01 10:54:10 +02:00
Havard Graff
43985b363d meson: remove vs_module_defs
GST_EXPORT should handle it.
2017-10-05 13:53:14 +01:00
Tim-Philipp Müller
33ae84fd1c rtp: mark symbols explicitly for export with GST_EXPORT 2017-05-16 15:22:42 +01:00
Tim-Philipp Müller
f4494dab87 rtpbasedepayload: fix class description in docs 2017-05-15 16:20:01 +01:00
Tim-Philipp Müller
60e9629860 g-i: no need to load registry in g-i scanner 2017-05-04 23:55:20 +01:00
Sebastian Dröge
a3656ba29b libs: Check if meta transform_func is NULL before using it
https://bugzilla.gnome.org/show_bug.cgi?id=782050
2017-05-02 14:31:14 +03:00
Rico Tzschichholz
07a427b403 meson: Pass --c-include accordingly to GIR builds 2017-04-13 12:23:32 +01:00
Thibault Saunier
099ac9faf2 docs: Convert gtkdoc comments to markdown
Modernizing the documentation, making it simpler to read an
modify and allowing us to possibly switch to hotdoc in the
future.
2017-03-10 18:19:17 -03:00
Miguel Paris
036bdf5d2d rtpbuffer: Fix ensure_buffers() if whole packet is in one GstMemory
When gst_rtp_buffer_add_extension_onebyte_header() is used over a
GstRtpBuffer that only contains a memory for the whole packet,
ensure_buffers function crashes at the next point:

mem = gst_memory_copy (rtp->map[i].memory, offset, rtp->size[i]);

when i==2 because the payload is not mapped.

In addition the offset is calculated subtracting in the wrong direction.

https://bugzilla.gnome.org/show_bug.cgi?id=774959
2016-11-25 13:15:24 +02:00
Sebastian Dröge
b9f59fd999 rtpbasepayload: Ensure to set the RECONFIGURE flag again if reconfiguration failed
https://bugzilla.gnome.org/show_bug.cgi?id=774623
2016-11-18 12:04:27 +02:00
Thibault Saunier
6917cb629e meson: Generate girs
https://bugzilla.gnome.org/show_bug.cgi?id=773944
2016-11-09 18:06:19 -03:00
Sebastian Dröge
d84879db28 rtpbasedepayload: Reject non-TIME segments
https://bugzilla.gnome.org/show_bug.cgi?id=765796
2016-11-01 21:09:13 +02:00
Sebastian Dröge
568ec0fc7b Revert "basertpdepayload: create valid segment when given non-time segment"
This reverts commit 0f609bc6c6.
2016-11-01 21:09:04 +02:00
Havard Graff
c726e0ab6d rtpbuffer: Add buffer flag RETRANSMISSION
Useful for elements to know if a buffer is a retransmitted RTP packet.

https://bugzilla.gnome.org/show_bug.cgi?id=769771
2016-09-01 13:05:47 +03:00
Nirbheek Chauhan
5c4f4ac1bd Add support for Meson as alternative/parallel build system
https://github.com/mesonbuild/meson

With contributions from:

Tim-Philipp Müller <tim@centricular.com>
Jussi Pakkanen <jpakkane@gmail.com> (original port)

Highlights of the features provided are:
* Faster builds on Linux (~40-50% faster)
* The ability to build with MSVC on Windows
* Generate Visual Studio project files
* Generate XCode project files
* Much faster builds on Windows (on-par with Linux)
* Seriously fast configure and building on embedded

... and many more. For more details see:

http://blog.nirbheek.in/2016/05/gstreamer-and-meson-new-hope.html
http://blog.nirbheek.in/2016/07/building-and-developing-gstreamer-using.html

Building with Meson should work on both Linux and Windows, but may
need a few more tweaks on other operating systems.
2016-08-20 11:09:51 +01:00
Sebastian Dröge
69f90adbaf rtpbuffer: Add some const qualifiers
gst_rtp_buffer_add_extension_onebyte_header() and
gst_rtp_buffer_add_extension_twobytes_header() can have a const argument for
the actual extension data.
2016-07-26 17:46:38 +03:00
Tim-Philipp Müller
a80c546628 rtp: rtpbasedepayload: simplify code
Remove unnecessary helper struct for callbacks. The bclass
member of the helper struct was not used, so we can just
remove it and the GET_CLASS() call and simplify the whole
affair by passing the depayloader directly to the callback.
2016-07-15 19:51:20 +01:00
Zaheer Abbas Merali
0f609bc6c6 basertpdepayload: create valid segment when given non-time segment
This will become an error in 1.10.

https://bugzilla.gnome.org/show_bug.cgi?id=765796
2016-07-01 14:16:46 +02:00
Tim-Philipp Müller
d52a74f32e g-i: pass compiler env to g-ir-scanner
It's what introspection.mak does as well. Should
fix spurious build failures on gnome-continuous.
2016-05-24 00:44:21 +01:00
Vivia Nikolaidou
a0cf3b4262 fdmemory, rtpbasedepayload: Ran gst-indent
https://bugzilla.gnome.org/show_bug.cgi?id=764948
2016-04-12 17:34:18 +03:00
Mikhail Fludkov
7a206336dd rtpbasedepayload: look at ssrc before sequence numbers
Doing so prevents us dropping buffers in the rare, but possible, situations,
when the stream changes SSRC and new sequence numbers does not differ
much from the last sequence number from previous SSRC. For example:
ssrc - 0xaaaa 101,102,103,104 ssrc - 0xbbbb 102, 103, 104, 105...
In the scenario above we don't want to drop the first 3 packets of
0xbbbb stream.

https://bugzilla.gnome.org/show_bug.cgi?id=764459
2016-04-03 11:49:16 +03:00
Tim-Philipp Müller
3ab183c758 rtp: rtcpbuffer: fix indentation
https://bugzilla.gnome.org/show_bug.cgi?id=761944
2016-03-30 22:41:54 +01:00
Tim-Philipp Müller
5377088f1e rtp: rtpcbuffer: fix Since markers
https://bugzilla.gnome.org/show_bug.cgi?id=761944
2016-03-30 22:41:54 +01:00
Stian Selnes
93196092d1 rtcpbuffer: Add API for APP packets
https://bugzilla.gnome.org/show_bug.cgi?id=761944
2016-03-24 14:24:11 +02:00
Haakon Sporsheim
d8e9a711a0 rtcpbuffer: Add profile-specific extension API.
https://bugzilla.gnome.org/show_bug.cgi?id=761950
2016-03-24 14:22:54 +02:00
Sebastian Dröge
2c29f09da8 rtpbasepayload: Handle gst_pad_get_current_caps() returning NULL gracefully 2016-02-23 18:23:45 +02:00
Xavier Claessens
429860e51f base: Add g_autoptr() support to all types
https://bugzilla.gnome.org/show_bug.cgi?id=754464
2015-12-14 13:39:43 -05:00
Sebastian Dröge
d6be67265f rtpbasedepayload: Check if the packet loss event actually has timestamp and duration fields
CID 1139615
2015-12-14 13:11:21 +01:00
Tim-Philipp Müller
f0db396e63 rtpbasedepay: when setting discont flag make sure rtpbuffer is current
Depayloaders will look at rtpbuffer->buffer for the discont flag.
When we set the discont flag on a buffer in the rtp base depayloader
and we have to make the buffer writable, make sure the rtpbuffer
actually contains the newly-flagged buffer, not the original input
buffer. This was introduced with the addition of the process_rtp_packet
vfunc, but would only trigger if the input buffer wasn't flagged
already and was not writable already.
2015-12-11 11:06:35 +00:00
Tim-Philipp Müller
86350ff8b7 rtpbasedepay: fix possible refcounting issue when detecting a discont
When we detect a discont and the input buffer isn't already flagged
as discont, handle_buffer() does a gst_buffer_make_writable() on the
input buffer in order to set the flag. This assumed it had ownership
of the input buffer though, which it didn't. This would still work
fine in most scenarios, but could lead to crashes or mini object
unref criticals in some cases when a discont is detected, e.g. when
using pcapparse in front of a depayloader. This problem was
introduced in bc14cdf529.
2015-12-11 10:38:14 +00:00
Reynaldo H. Verdejo Pinochet
4ed7b0a0e6 Drop usage of deprecated g-ir-scanner --strip-prefix flag 2015-12-02 20:19:43 -08:00
Sebastian Dröge
5bdeed32bc rtp: GST_RTP_BUFFER_MAP_FLAG_SKIP_PADDING is Since 1.6.1 2015-10-20 12:10:52 +03:00
Stian Selnes
0a668c1866 rtpbuffer: Add map flag to skip padding
Encrypted RTP buffers may contain encrypted padding, hence it's
necessary to have an option to relax the validation in order to
successfully map the buffer.

When the flag GST_RTP_BUFFER_MAP_FLAG_SKIP_PADDING is set
gst_rtp_buffer_map() will map the buffer like if padding is not
present.

https://bugzilla.gnome.org/show_bug.cgi?id=752705
2015-10-15 22:42:37 +03:00
Sebastian Dröge
79d4765525 Revert "rtpbuffer: increase logging level when map fails"
This reverts commit e3c8a82017.

It causes too much noise in the logs.
2015-10-15 22:40:50 +03:00
Miguel París Díaz
e3c8a82017 rtpbuffer: increase logging level when map fails
https://bugzilla.gnome.org/show_bug.cgi?id=756641
2015-10-15 16:48:08 +03:00
Sebastian Rasmussen
042e71a117 rtpbasepayload: Implement video SDP attributes
Fixes https://bugzilla.gnome.org/show_bug.cgi?id=726472
2015-10-02 17:44:14 +03:00
Jan Schmidt
95eb641821 rtpbasedepayload: Make stats creation threadsafe, fix a CRITICAL
Use the object lock to protect the internal segment when updating
against access from getting the stats property.

Fix a critical in gst-inspect or when retrieving the stats
before any segment has arrived by checking whether the
segment has been initted..
2015-08-15 23:37:26 +10:00
Sebastian Dröge
a0f1b964f1 rtpbaseaudiopayload: Copy metadata in the (de)payloader, but only the relevant ones
The payloader didn't copy anything so far, the depayloader copied every
possible meta. Let's make it consistent and just copy all metas without
tags or with only the audio tag.

https://bugzilla.gnome.org/show_bug.cgi?id=751774
2015-08-11 12:46:36 +02:00
Nicolas Dufresne
6ddab6918d basedepayloader: Don't re-timestamp with running-time
There was a confusion, six depayloaders where passing through the
timestamp while the base class was re-timestamping to running
time. This inconstancy has been unnoticed has in most use cases
the incoming segment is [0, inifnity] in which case timestamps are
the same as running time. With DTS/PTS shifting added (to avoid
negative values) and pcapparse sending a different segment this
started being an issue.

https://bugzilla.gnome.org/show_bug.cgi?id=753037
2015-08-10 13:26:20 -04:00
Brian Peters
1273848bf5 rtpbuffer: avoid accessing NULL buffer even more
Previous commit was incompletely applied.

https://bugzilla.gnome.org/show_bug.cgi?id=753001
2015-07-30 15:16:57 +01:00
Brian Peters
04c69952c0 rtp: buffer: don't access NULL buffer pointer
unmap will set rtpbuffer->buffer to NULL, so we need to
save the pointer to access it while the RTP buffer is
unmapped.

https://bugzilla.gnome.org/show_bug.cgi?id=753001
2015-07-30 14:30:44 +01:00
Tim-Philipp Müller
232bdf1711 rtpbasedepayload: fix leaks in error code paths
This was introduced when reshuffling the buffer unmaps
in commit bc14cdf529
rtp: rtpbasedepayload: add process_rtp_packet() vfunc

Fixes make check-valgrind.

https://bugzilla.gnome.org/show_bug.cgi?id=750235
2015-07-30 12:50:56 +01:00
Nicolas Dufresne
7c638e06ff depayloader: Use input segment start
When there is no clock_base provided, the start position is
set to 0 instead of the original segment start value. This
would break synchronization if start was not 0.

https://bugzilla.gnome.org/show_bug.cgi?id=752228
2015-07-18 15:40:26 -04:00
Tim-Philipp Müller
bc14cdf529 rtp: rtpbasedepayload: add process_rtp_packet() vfunc
Add process_rtp_packet() vfunc that works just like the
existing process() vfunc only that it takes the GstRTPBuffer
that the base class has already mapped (with MAP_READ),
which means that the subclass doesn't have to map it again,
which allows more performant processing of input buffers
for most RTP depayloaders.

https://bugzilla.gnome.org/show_bug.cgi?id=750235
2015-07-12 14:29:29 +01:00
Tim-Philipp Müller
3d7a92b452 rtpbasedepayload: fix typo in comment 2015-07-07 19:56:52 +01:00
Tim-Philipp Müller
fbf2773b2e rtpbasepayload: fix possible segment event leak
Need to clear it when shutting down, not when starting up.
Fixes leak in rtp-payloading unit test.
2015-07-07 15:05:59 +01:00