Commit graph

38 commits

Author SHA1 Message Date
Knut Saastad
fa505867a9 rtpvp9depay: detect incomplete frames and bail out
If a packet with the B bit set arrives but we haven't received
a packet with the marker or E bits set to end the previous frame,
we know the current frame was incomplete.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gst-plugins-good/-/merge_requests/795>
2020-10-30 01:31:19 +00:00
John-Mark Bell
3348c5ceae rtpvp8pay: payload temporally scaled bitstreams.
Co-Authored-By: Vincent Sanders <vince@pexip.com>
Part-of: <https://gitlab.freedesktop.org/gstreamer/gst-plugins-good/-/merge_requests/728>
2020-10-16 09:25:10 +00:00
Stian Selnes
29d5936749 rtpvp8pay: Add picture-id-offset property
Add property to set the initial value for picture-id. RFC7741 says
that picture-id MAY be initialized to a random value, thus it's also
valid to simply set it to a fixed initial value. A fixed value is very
useful for testing.

Default behavior is not changed.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gst-plugins-good/-/merge_requests/728>
2020-10-16 09:25:10 +00:00
Mikhail Fludkov
543b7e5024 rtpvp8pay: move duplicate code to separate functions
Two new functions to modify picture id:
gst_rtp_vp8_pay_picture_id_reset - picks random picture id of
appropriate bitsize
gst_rtp_vp8_pay_picture_id_increment - increments picture id taking
care of wrapping

Part-of: <https://gitlab.freedesktop.org/gstreamer/gst-plugins-good/-/merge_requests/728>
2020-10-16 09:25:10 +00:00
Sebastian Dröge
f95dde512c rtp: Fix allocations to support source-info property
Use gst_rtp_base_payload_allocate_output_buffer() instead of
gst_rtp_buffer_new_allocate() in order to allocate RTP buffer with
correct number of CSRCs according to the meta.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gst-plugins-good/-/merge_requests/612>
2020-09-28 15:27:17 +00:00
Stian Selnes
d494be9916 rtpvp8pay: Fix allocation to support source-info property
Use gst_rtp_base_payload_allocate_output_buffer() in order to allocate
RTP buffer with correct number of CSRCs according to the meta.

Fixes https://gitlab.freedesktop.org/gstreamer/gst-plugins-good/-/issues/314

Part-of: <https://gitlab.freedesktop.org/gstreamer/gst-plugins-good/-/merge_requests/612>
2020-09-28 15:27:17 +00:00
Mathieu Duponchelle
f63299ff2f plugins: uddate gst_type_mark_as_plugin_api() calls 2020-06-06 00:42:25 +02:00
Mathieu Duponchelle
37c619f995 plugins: Use gst_type_mark_as_plugin_api() for all non-element plugin types 2020-06-03 22:44:09 -04:00
Stian Selnes
81a87c26f9 rtpvp8pay, rtpvp9pay: fix caps leak in set_caps() 2020-03-12 16:49:58 +00:00
Nicolas Dufresne
2b11c62571 rtppayload: Fix VP8/VP9/OPUS dual encoding name handling
All these were copy pasted and would lead to assertion when chained with
rtpmux. This commit rewrite the negotiation with downstream. This also
drop the fallback to ancient names if the pad is unlinked. This was
completly arbitrary decision that made no sense.

https://bugzilla.gnome.org/show_bug.cgi?id=796809
2018-08-01 09:42:36 -04:00
Tim-Philipp Müller
4a28e649c3 rtp: cache meta tag quarks and add more utility functions for metas
Every g_quark_from_static_string() is a hash table lookup serialised
on the global quark lock in GLib. Let's just look up the two quarks
we need once and cache them locally for future use. While we're at it,
add new utility functions for the two most commonly used tags
(audio + video). Make first argument a gpointer so we don't have to
cast and make the code ugly. These are used for logging purposes
only anyway.
2017-05-24 13:32:10 +01:00
Vineeth TM
1071309870 good: use new gst_element_class_add_static_pad_template()
https://bugzilla.gnome.org/show_bug.cgi?id=763076
2016-03-24 14:32:20 +02:00
Mischa Spiegelmock
cdd7091c1c docs: Minor fixes in various places
https://bugzilla.gnome.org/show_bug.cgi?id=756996
2015-10-23 10:42:19 +03:00
Sebastian Dröge
b1089fb520 rtp: 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 video tag.

https://bugzilla.gnome.org/show_bug.cgi?id=751774
2015-08-11 12:47:23 +02:00
Chris Clayton
e29f231e5d rtpvp8depay: potential access beyond end of array
Compiling (with gcc-4.9-20150603) produces an error because of an access beyond
the end of an array. This patch fixes the error by initializing the loop
control/array index variable (i) to 1 and returning i - 1 when a match is found.
Also, because the values stored in the array increase in value as the index
increases, the >= test unnecessary, so it is removed.
2015-06-08 20:16:20 +01:00
Vincent Penquerc'h
dc73d153cb rtpvp8pay: default encoding name to VP8
https://bugzilla.gnome.org/show_bug.cgi?id=737810
2015-02-19 14:29:02 +00:00
Vincent Penquerc'h
b88ea286d2 rtpvp8pay: make caps writable before truncating them
https://bugzilla.gnome.org/show_bug.cgi?id=737810
2015-02-19 14:06:51 +00:00
Vincent Penquerc'h
b866c989f5 rtpvp8pay: negotiate encoding name
Chrome uses a different one than gstreamer.

https://bugzilla.gnome.org/show_bug.cgi?id=737810
2015-02-19 13:52:29 +00:00
Nicolas Dufresne
0f4f948f5f rtpvp8: Use VP8 encoding name
Both Firefox and Chrome uses VP8 as the encoding in their SDP.
Adding this now defacto standard name removes the need for special
case in SDP parsing code.

https://bugzilla.gnome.org/show_bug.cgi?id=737810
2014-11-01 11:26:26 -04:00
Tim-Philipp Müller
4b1f771e4d rtpvp8pay: allocate bitreader on the stack 2014-06-18 14:54:59 +01:00
Tim-Philipp Müller
725b8f272b rtpvp8pay: post error message on bus on error and don't use g_message() 2014-06-18 14:54:59 +01:00
Tim-Philipp Müller
f4db7443ae rtpvp8pay: couple of minor optimisations
Pre-allocate buffer list of the right size to avoid re-allocs.
Avoid plenty of double runtime cast checks and re-doing the
same calculation over and over again in rtp_vp8_calc_payload_len().
Only call gst_buffer_get_size() once.
2014-06-18 14:54:58 +01:00
Sebastian Dröge
e178cf60ae rtpvp8pay: Don't leak input buffers
https://bugzilla.gnome.org/show_bug.cgi?id=722414
2014-01-20 10:13:19 +01:00
Sebastian Dröge
111982de28 rtpvp8pay: Make Picture ID mode configurable and default to no picture ID
Some implementations (linphone) only support no picture at all in the
stream and will fail if one is provided.

https://bugzilla.gnome.org/show_bug.cgi?id=711497
2013-11-05 17:26:49 +01:00
Tim-Philipp Müller
5ac789408b rtpvp8: include config.h and minor style fixes 2012-11-01 21:10:21 +00:00
Tim-Philipp Müller
44efab8e3d rtpvp8: use gst_element_class_set_static_metadata()
where possible. Avoids some string copies. Also re-indent
some stuff. Also some indent fixes here and there.
2012-11-01 20:53:48 +00:00
Mark Nauwelaerts
bc7dbbbd4f rtpvp8: replace gst_element_class_set_details_simple with gst_element_class_set_metadata 2012-11-01 20:53:48 +00:00
Wim Taymans
fccfca38d4 rtpvp8: update for buffer changes 2012-11-01 20:53:48 +00:00
Danilo Cesar Lemes de Paula
3edffb13e3 rtpvp8; fix compatibility with the third draft
https://bugzilla.gnome.org/show_bug.cgi?id=671073
2012-11-01 20:53:48 +00:00
Mark Nauwelaerts
d9581832a0 rtpvp8: port some more to new memory API 2012-11-01 20:53:47 +00:00
Olivier Crête
c6761daa27 rtpvp8: port to 0.11 2012-11-01 20:53:47 +00:00
Sebastian Dröge
2c5ea76bdc rtpvp8pay: Fix typo 2012-11-01 20:53:47 +00:00
Youness Alaoui
1cf155d70d rtpvp8: Update the pay/depay to the ietf-draft-01 spec 2012-11-01 20:53:47 +00:00
Vincent Penquerc'h
88aade4150 rtpvp8: fix bitstream parsing using the wrong kind of bitreader
VP8 uses a probabilistic bool coder, not a straight bit coder.
This fixes parsing when error-resilient is set.

This commit includes a copy of libvpx's bool coder, BSD licensed.

https://bugzilla.gnome.org/show_bug.cgi?id=652694
2012-11-01 20:53:47 +00:00
Olivier Crête
97c3f3617c rtpvp8: Reject unknown bitstream versions 2012-11-01 20:53:47 +00:00
Edward Hervey
74a1a704bf rtpvp8: Fix unitialized variable
Makes macosx compiler happy.
2012-11-01 20:53:47 +00:00
Sjoerd Simons
a45e7a3fc0 rtpvp8pay: Treat the frame header just like any other partition
When setting up the initial mapping just act as if the global frame
information is another partition. This saves special-casing it later in
the actual packetizing code.
2012-11-01 20:53:47 +00:00
Sjoerd Simons
e9f4e9342f rtpvp8: Add simple payloaders and depayloaders for VP8
Minimal implementation of http://www.webmproject.org/code/specs/rtp/,
version 0.3.2
2012-11-01 20:53:47 +00:00