summaryrefslogtreecommitdiff
path: root/gst
AgeCommit message (Collapse)AuthorFilesLines
2021-07-08splitmuxsink: always use factory property when setMathieu Duponchelle1-1/+3
Part-of: <https://gitlab.freedesktop.org/gstreamer/gst-plugins-good/-/merge_requests/1024>
2021-07-06qtdemux: No need for new "application/x-cbcs" capsYacine Bandou1-10/+12
Instead of using the new "application/x-cbcs" caps, we are just adding a new structure field "ciphe-mode", to indicate which encryption scheme is used: "cenc", "cbcs", "cbc1" or "cens". Similarly for the protection metadata, we add the "cipher-mode" field to specify the encryption mode with which the buffers are encrypted. "cenc": AES-CTR (no pattern) "cbc1": AES-CBC (no pattern) "cens": AES-CTR (pattern specified) "cbcs": AES-CBC (pattern specified, using a constant IV) Currently only "cenc" and "cbcs" are supported. Part-of: <https://gitlab.freedesktop.org/gstreamer/gst-plugins-good/-/merge_requests/1013>
2021-07-02matroskamux: Always write a tags element into seekheadJan Schmidt1-1/+1
If there are only stream tags, we still want to write the tags entry into the seekhead, so that tags can be found quickly in the player. Fixes https://gitlab.freedesktop.org/gstreamer/gst-plugins-good/-/issues/905 Part-of: <https://gitlab.freedesktop.org/gstreamer/gst-plugins-good/-/merge_requests/1020>
2021-07-02qtmux: Don't need to update track per GstCaps if it's not changedSeungha Yang1-1/+13
Skip GstQTMuxPad::set_caps() call for duplicated caps. All the processing done in set_caps() method for duplicated caps are redundant. Part-of: <https://gitlab.freedesktop.org/gstreamer/gst-plugins-good/-/merge_requests/1019>
2021-07-01rtpssrcdemux: Remove pads and reset the element also in READY->NULLSebastian Dröge1-1/+1
Mostly for completeness. Part-of: <https://gitlab.freedesktop.org/gstreamer/gst-plugins-good/-/merge_requests/1018>
2021-07-01rtpptdemux: Remove pads also in PAUSED->READYSebastian Dröge1-1/+1
They're based on per-stream information and that should be reset whenever going to READY state. Part-of: <https://gitlab.freedesktop.org/gstreamer/gst-plugins-good/-/merge_requests/1018>
2021-06-28multiudpsink: Fix broken SO_SNDBUF get/set on WindowsSeungha Yang1-25/+22
SO_SNDBUF has been undefined on Windows because of missing WinSock2.h include. And don't use native socket functions (e.g., setsockopt()) if code is expected to be built on Windows. We don't link ws2_32.lib for this plugin. Part-of: <https://gitlab.freedesktop.org/gstreamer/gst-plugins-good/-/merge_requests/1016>
2021-06-24rtpmanager: Access GstRTPHdrExt fields through accessorOlivier Crête1-2/+2
This way, the implementation can be private. Part-of: <https://gitlab.freedesktop.org/gstreamer/gst-plugins-good/-/merge_requests/1017>
2021-06-22qtdemux: Refuse seeks in BYTES formatJan Schmidt1-1/+16
If downstream tries to seek in BYTES format, don't pass that through to upstream. The byte positions downstream requests won't make any sense in the muxed stream. There might be other formats we want to pass through to upstream, but BYTES is not one of them. If we get a seeking query about BYTES format, refuse that too. This fixes a situation where we're playing a fragmented mp4 over http and qtdemux refuses the initial seek (in TIME format), but then h264parse/baseparse send a seek in BYTES format and everything falls apart. Part-of: <https://gitlab.freedesktop.org/gstreamer/gst-plugins-good/-/merge_requests/1014>
2021-06-16rtph265depay: update codec_data in caps regardless of formatNirbheek Chauhan1-29/+2
Updating of codec_data in the caps is important to propagate changes in sps/pps/vps via NALs. Without this, downstream does not renegotiate when upstream changes resolution. The comment referring to rtph264pay is from 2015 and is out of date. rtph264pay stopped doing that in 2017 with commit dabeed52a995d27e16eba9e4617e61eb0bcd44c4 Part-of: <https://gitlab.freedesktop.org/gstreamer/gst-plugins-good/-/merge_requests/1011>
2021-06-02qtdemux: use g_memdup2() as g_memdup() is deprecatedTim-Philipp Müller1-19/+19
- atom nodes/bytereader sizes are already checked - palettes: are fixed/known size g_memdup() is deprecated since GLib 2.68 and we want to avoid deprecation warnings with recent versions of GLib. Also use gst_buffer_new_memdup() instead of _wrapped(g_memdup(),..). Part-of: <https://gitlab.freedesktop.org/gstreamer/gst-plugins-good/-/merge_requests/993>
2021-06-02matroskademux: use g_memdup2() as g_memdup() is deprecatedTim-Philipp Müller4-31/+34
- ebml-read: add some sanity checks when going from 64-bit to 32-bit length - matroska-ids: codec_data_size has been checked via gst_ebml_read_binary(), is existing allocation. - matroska-demux: alloc size is from existing allocations g_memdup() is deprecated since GLib 2.68 and we want to avoid deprecation warnings with recent versions of GLib. Also use gst_buffer_new_memdup() instead of _wrapped(g_memdup(),..). Part-of: <https://gitlab.freedesktop.org/gstreamer/gst-plugins-good/-/merge_requests/993>
2021-05-29rtpjpegpay: fix image corruption when compiled with MSVC on WindowsTim-Philipp Müller1-2/+3
On Windows with MSVC, jpeg_header_size would end up 2 bytes larger than it should be. This then leads to the first 2 bytes of the actual jpeg image data to be dropped, because we think those belong to the header, which results in an undecodable image when reconstructed in the depayloader. What happens is that when the compiler evaluates jpeg_header_size = mem.offset + read_u16_and_inc_offset_by_2(&mem); it actually uses the mem.offset value after it has been increased by the function call on the right hand size of the equation. From section 6.5 of the C99 spec: 3. The grouping of operators and operands is indicated by the syntax [74]. Except as specified later (for the function-call (), &&, ||, ?:, and comma operators), the order of evaluation of subexpressions and the order in which side effects take place are both unspecified. Fixes https://gitlab.freedesktop.org/gstreamer/gst-plugins-good/-/issues/889 Part-of: <https://gitlab.freedesktop.org/gstreamer/gst-plugins-good/-/merge_requests/999>
2021-05-27deinterlace: Drop "field-order" field while transforming capsSeungha Yang1-2/+9
Like other basetransform subclasses are doing, drop field which can be converted by deinterlace. Part-of: <https://gitlab.freedesktop.org/gstreamer/gst-plugins-good/-/merge_requests/997>
2021-05-27deinterlace: Drop field-order field if outputting progressiveSeungha Yang1-0/+5
Progressive with field-order doesn't make sense Part-of: <https://gitlab.freedesktop.org/gstreamer/gst-plugins-good/-/merge_requests/997>
2021-05-25rtpssrcdemux: fix "data flow before segment event" crashHavard Graff1-14/+22
This crash could happen at any time a RTP and RTCP buffer arrived simultaneously in ssrcdemux. The problem was that sticky-event arriving while the rtp and rtcp pads were being set up could arrive just too late to be included in the initial forwarding. The fix checks if the stickies have been sent on the srcpad about to be pushed on, and if not sends them. It also blocks any stickes from being forwarded *prior* to this happening, to avoid them arriving on the srcpad multiple times. Since the test loops 1000 times, this will make running under valgrind take forever, so use the RUNNING_ON_VALGRIND variable to detect we are running under valgrind, and reduce the loop-count to 2 in that case. Part-of: <https://gitlab.freedesktop.org/gstreamer/gst-plugins-good/-/merge_requests/992>
2021-05-25rtpssrcdemux: refactor destruction of GstRtpSsrcDemuxPadsHavard Graff1-18/+13
Part-of: <https://gitlab.freedesktop.org/gstreamer/gst-plugins-good/-/merge_requests/992>
2021-05-25rtpssrcdemux: make naming consistentHavard Graff2-53/+52
Use plural for GstRtpSsrcDemuxPads, since it contains two pads, and use the variable-name 'dpads' everywhere. Part-of: <https://gitlab.freedesktop.org/gstreamer/gst-plugins-good/-/merge_requests/992>
2021-05-23wavparse: use g_strndup() for copying text dataTim-Philipp Müller1-2/+2
So we don't rely on NUL terminators inside the data. Part-of: <https://gitlab.freedesktop.org/gstreamer/gst-plugins-good/-/merge_requests/994>
2021-05-23wavparse: clean up adtl/note/labl chunk parsingTim-Philipp Müller1-4/+2
We were passing the size of the adtl chunk to the note/labl sub-chunk parsing function, which means we may memdup lots of data after the chunk string's NUL terminator that doesn't really belong to it. Part-of: <https://gitlab.freedesktop.org/gstreamer/gst-plugins-good/-/merge_requests/994>
2021-05-23wavparse: guard against overflow when comparing chunk sizesTim-Philipp Müller1-1/+1
Could be rewritten as lsize > (size - 8) a well, but the extra check seems clearer. Doesn't look like it was problematic, lsize wasn't actually used when parsing the sub-chunks. Part-of: <https://gitlab.freedesktop.org/gstreamer/gst-plugins-good/-/merge_requests/994>
2021-05-20matroskademux: fix decoder glitches with H264 contentStéphane Cerveau1-4/+8
To avoid decoder starvation causing glitches on screen, the demuxer shall clip only when the buffer is a key frame and the lace time is greater than the stop time. Fixes gst-editing-services#128 Part-of: <https://gitlab.freedesktop.org/gstreamer/gst-plugins-good/-/merge_requests/973>
2021-05-11matroskademux: Advertise codec-alpha in capsNicolas Dufresne3-1/+27
This will be used to select the appropriate decoders. We also only attach the GstVideoCodecAlphaMeta if the AlphaMode element is set, this is to stay on the safe side and mimic what browsers (verified in Firefox and Chromium code) do. Part-of: <https://gitlab.freedesktop.org/gstreamer/gst-plugins-good/-/merge_requests/968>
2021-05-11matroskademux: Store alpha stream in VideoCodecAlphaMetaNicolas Dufresne1-7/+14
This generalize the feature over using mini object quark data. If that feature was Matroska specifc, using the new CustomMeta would have been enough and arguably cleaner then QData, though it seems that similar technique is use with AV1 Image Format (AVIF). Part-of: <https://gitlab.freedesktop.org/gstreamer/gst-plugins-good/-/merge_requests/968>
2021-05-11matroska-demux: extract VP8 alpha from BlockAdditionalsTim-Philipp Müller1-2/+144
And put it on buffers as qdata (which is easier in this case than a private custom meta because it can be picked up easily in other modules). Part-of: <https://gitlab.freedesktop.org/gstreamer/gst-plugins-good/-/merge_requests/968>
2021-05-07udpsrc: Plug leaks of saddr in error casesJan Alexander Steffens (heftig)1-0/+2
Part-of: <https://gitlab.freedesktop.org/gstreamer/gst-plugins-good/-/merge_requests/977>
2021-05-07udpsrc: WhitespaceJan Alexander Steffens (heftig)1-1/+1
Part-of: <https://gitlab.freedesktop.org/gstreamer/gst-plugins-good/-/merge_requests/977>
2021-05-07deinterlace: Plug a method subobject leakJan Alexander Steffens (heftig)1-1/+1
Changing the method would leak the previous method. Part-of: <https://gitlab.freedesktop.org/gstreamer/gst-plugins-good/-/merge_requests/976>
2021-05-05matroska-mux: Change accepted caps width and height from [16, MAX] to [1, MAX]David Fernandez1-2/+2
There are cases where the video size might be less than 16x16. This change allows the Matroska muxer to accept this cases. Part-of: <https://gitlab.freedesktop.org/gstreamer/gst-plugins-good/-/merge_requests/539>
2021-05-05Use gst_element_request_pad_simpleFrançois Laignel3-13/+13
Instead of the deprecated gst_element_get_request_pad. Part-of: <https://gitlab.freedesktop.org/gstreamer/gst-plugins-good/-/merge_requests/958>
2021-04-30qtmux: Make sure to write 64-bit STCO table when needed.Jan Schmidt2-7/+24
qtmux attempts to choose between writing a 32-bit stco chunk offset table when it can, but switch to a 64-bit co64 table when file offsets go over 4GB. This patch fixes a problem where the atom handling code was checking mdat-relative offsets instead of the final file offset (computed by adding the mdat position plus the mdat-relative offset) - leading to problems where files with a size between 4GB and 4GB+offset-of-the-mdat would write incorrect STCO tables with some samples having truncated 32-bit offsets. Smaller files write STCO correctly, larger files would switch to co64 and also output correctly. Part-of: <https://gitlab.freedesktop.org/gstreamer/gst-plugins-good/-/merge_requests/970>
2021-04-26rtpopuspay: set MARKER flagGuillaume Desmottes2-0/+37
Set MARKER flag on first buffer after DTX. According to RFC 3551 section 4.1 the marker bit needs to be set on "the first packet after a silence period during which packets have not been transmitted contiguously". Part-of: <https://gitlab.freedesktop.org/gstreamer/gst-plugins-good/-/merge_requests/967>
2021-04-26rtpopuspay: add DTX supportGuillaume Desmottes2-0/+72
If enabled, the payloader won't transmit empty frames. Can be tested using: opusenc dtx=true bitrate-type=vbr ! rtpopuspay dtx=true Part-of: <https://gitlab.freedesktop.org/gstreamer/gst-plugins-good/-/merge_requests/967>
2021-04-25rtpjitterbuffer: fix divide-by-zeroHavard Graff1-2/+4
The estimated packet-duration can sometimes end up as zero, and dividing by that is never a good idea... The test reproduces the scenario, and the fix is easy. Part-of: <https://gitlab.freedesktop.org/gstreamer/gst-plugins-good/-/merge_requests/966>
2021-04-24rtpjitterbuffer: clean up and improve missing packets handlingHavard Graff1-100/+156
* Try to make variable and function names more clear. * Add plenty of comments describing the logic step-by-step. * Improve the logging around this, making the logs easier to read and understand when debugging these issues. * Revise the logic of packets that are actually beyond saving in doing the following: 1. Do an optimistic estimation of which packets can still arrive. 2. Based on this, find which packets (and duration) are now hopelessly lost. 3. Issue an immediate lost-event for the hopelessly lost and then add lost/rtx timers for the ones we still hope to save, meaning that if they are to arrive, they will not be discarded. * Revise the use of rtx-delay: Earlier the rtx-delay would vary, depending on the pts of the latest packet and the estimated pts of the packet it being issued a RTX for, but now that we aim to estimate the PTS of the missing packet accurately, the RTX delay should remain the same for all packets. Meaning: If the packet have a PTS of X, the delay in asked for a RTX for this packet is always a constant X + delay, not a variable one. * Finally ensure that the chaotic "check-for-stall" tests uses timestamps that starts from 0 to make them easier to debug. Part-of: <https://gitlab.freedesktop.org/gstreamer/gst-plugins-good/-/merge_requests/952>
2021-04-23level: make properties thread-safeGuillaume Desmottes2-9/+30
Part-of: <https://gitlab.freedesktop.org/gstreamer/gst-plugins-good/-/merge_requests/962>
2021-04-23level: disable passthrough when audio-level-meta is enabledGuillaume Desmottes1-1/+11
Ensure we receive a writable buffer to add the meta. Fix #878 Part-of: <https://gitlab.freedesktop.org/gstreamer/gst-plugins-good/-/merge_requests/962>
2021-04-23matroskamux: Don't pass a non-GObject pointer to GST_DEBUG_OBJECT and similarSebastian Dröge1-2/+3
Part-of: <https://gitlab.freedesktop.org/gstreamer/gst-plugins-good/-/merge_requests/964>
2021-04-22rtpjitterbuffer: Avoid generation of invalid timestampsEdward Hervey1-3/+32
When updating timestamps and timer timeouts with a new offset, make sure that the resulting value is valid (and not a negative (signed) value which ends up in a massive (unsigned) value). Fixes #571 Part-of: <https://gitlab.freedesktop.org/gstreamer/gst-plugins-good/-/merge_requests/960>
2021-04-20rtspsrc: Fix race saving seek event seqnum.Doug Nazar1-5/+5
We need to save the seek seqnum before the flush stop event since that will start the basesrc task which may send the segment event before we're ready. Part-of: <https://gitlab.freedesktop.org/gstreamer/gst-plugins-good/-/merge_requests/954>
2021-04-15rtpsbcpay: remove use of packed struct for payloadDoug Nazar1-40/+2
Part-of: <https://gitlab.freedesktop.org/gstreamer/gst-plugins-good/-/merge_requests/950>
2021-04-14dtmf: convert to bit accessorsDoug Nazar3-27/+24
Part-of: <https://gitlab.freedesktop.org/gstreamer/gst-plugins-good/-/merge_requests/949>
2021-04-13rtspsrc: Remove some dead codeNirbheek Chauhan1-9/+0
stop is not used after this point, nor do we create a new segment here since 84725d62b57bc74ce34abde755f35bf8f948f94d Part-of: <https://gitlab.freedesktop.org/gstreamer/gst-plugins-good/-/merge_requests/940>
2021-04-13rtspsrc: Do not overwrite the known duration after a seekNirbheek Chauhan1-1/+0
This breaks the duration query and also the seeking query. Broke in 5f1a732bc7b76a6f1b8aa5f26b6e76fbca0261c7 Part-of: <https://gitlab.freedesktop.org/gstreamer/gst-plugins-good/-/merge_requests/940>
2021-04-13rtspsrc: Just assign the segment instead of memcpyNirbheek Chauhan1-3/+3
Assignments copy by value, we don't need to memcpy... Part-of: <https://gitlab.freedesktop.org/gstreamer/gst-plugins-good/-/merge_requests/940>
2021-04-13rtpjitterbuffer: Check srcresult before waiting on the condition variable tooSebastian Dröge1-0/+4
It might've been set to FLUSHING between the last check and the waiting, and in that case we'd be waiting here forever now. Part-of: <https://gitlab.freedesktop.org/gstreamer/gst-plugins-good/-/merge_requests/944>
2021-04-13rtp: fix rtptwcc to support big endian.Doug Nazar1-3/+3
Part-of: <https://gitlab.freedesktop.org/gstreamer/gst-plugins-good/-/merge_requests/942>
2021-04-13rtp: fix rtphdrextrfc6464 to support big endian.Doug Nazar1-16/+7
Part-of: <https://gitlab.freedesktop.org/gstreamer/gst-plugins-good/-/merge_requests/942>
2021-04-13qtmux: Protect against writing absurd sample durationsJan Schmidt2-6/+21
If the input DTS goes backward or is missing, the calculated sample duration goes negative and wraps around to a very big number. In that case, just write a sample with a duration of 0 and hope the problem is transient. Part-of: <https://gitlab.freedesktop.org/gstreamer/gst-plugins-good/-/merge_requests/914>
2021-04-12rtspsrc: De-dup seek event seqnums to avoid multiple seeksNirbheek Chauhan1-1/+9
Seek events are sent upstream on each sink, so if we receive multiple seeks with the same seqnum, we must only perform one seek, not N seeks where N = the number of sinks in the pipeline connected to rtspsrc. This is the same thing done by demuxers like qtdemux or matrsokademux. Part-of: <https://gitlab.freedesktop.org/gstreamer/gst-plugins-good/-/merge_requests/938>