summaryrefslogtreecommitdiff
path: root/gst
Commit message (Collapse)AuthorAgeFilesLines
* audiobuffersplit: Remove unneeded buffer_clip wrapperNicolas Dufresne2021-09-221-10/+1
| | | | | | This is just a small cleanup noticed while reading. Part-of: <https://gitlab.freedesktop.org/gstreamer/gst-plugins-bad/-/merge_requests/2544>
* mpegtsmux, mpegpsmux: remove GPL from choice of licenses and add SPDX ↵Tim-Philipp Müller2021-09-2224-361/+67
| | | | | | | | | | | | | license identifiers Some people need to avoid inclusion of GPL code for their use cases and thus get easily spooked by GPL license headers. This code is actually licensed under different licenses, only one of which is GPL, and it's already possible to just upgrade from LGPL to GPL anyway so having the GPL listed explicitly as one of the choices doesn't really add anything. So remove GPL from the list and also add SPDX license identifiers while we're at it. Part-of: <https://gitlab.freedesktop.org/gstreamer/gst-plugins-bad/-/merge_requests/2539>
* jpeg2000parse + openjpeg: Switch striped mode to its own capsStéphane Cerveau2021-09-201-54/+42
| | | | | | | | | | It's not compatible with any other element that use the non-striped mode. In addition, in this mode, we require that every frame have the same number of stripes or that the MARKER bit be present, which is different from the other formats too. Part-of: <https://gitlab.freedesktop.org/gstreamer/gst-plugins-bad/-/merge_requests/979>
* mpegtsmux: Require frame alignment for JPEG 2000Olivier Crête2021-09-201-2/+2
| | | | | | We have yet to implement stripe alignment with the required descriptor. Part-of: <https://gitlab.freedesktop.org/gstreamer/gst-plugins-bad/-/merge_requests/979>
* mpegtspacketizer: memcmp potentially seen_before dataVivia Nikolaidou2021-09-201-3/+14
| | | | | | | | | | | | | Theoretically the version number is incremented every time there's a new section, but in a world of streaming we can't easily make that assumption. An example of a broken use case is when we're cat-ing two mpeg-ts files together, which is equivalent of capturing a DVB stream while switching channels. A set-top box would know that we switched the channels and reset the demuxer, but in practice this might not happen. Part-of: <https://gitlab.freedesktop.org/gstreamer/gst-plugins-bad/-/merge_requests/2468>
* videoparseutils: Fix for wrong CEA708 minimum size checkSeungha Yang2021-09-021-1/+5
| | | | | | The minimum possible size of valid CEA708 data is 3 bytes, not 7 bytes Part-of: <https://gitlab.freedesktop.org/gstreamer/gst-plugins-bad/-/merge_requests/2505>
* errorignore: Add ignore-eos modeVivia Nikolaidou2021-08-272-0/+20
| | | | | | | It's otherwise very complicated to ignore GST_FLOW_EOS without a ghostpad's chain function to rewrite. Part-of: <https://gitlab.freedesktop.org/gstreamer/gst-plugins-bad/-/merge_requests/2492>
* timecodestamper: add support for closedcaption inputMathieu Duponchelle2021-08-262-74/+90
| | | | | | | | | | | | | | Some closedcaption elements like sccenc except input buffers to have timecode metas. The original use case is to serialize closed captions extracted from a video stream, in that case ccextractor copies the video time code metas to the closed caption buffers, but no such mechanism exists when creating a CC stream ex nihilo. Remedy that by having timecodestamper accept closedcaption input caps, as long as they have a framerate. Part-of: <https://gitlab.freedesktop.org/gstreamer/gst-plugins-bad/-/merge_requests/2490>
* Use g_memdup2() where available and add fallback for older GLib versionsTim-Philipp Müller2021-08-0510-13/+16
| | | | | | | g_memdup() is deprecated since GLib 2.68 and we want to avoid deprecation warnings with recent versions of GLib. Part-of: <https://gitlab.freedesktop.org/gstreamer/gst-plugins-bad/-/merge_requests/2280>
* timecodestamper: Fix latency calculationSebastian Dröge2021-08-051-3/+5
| | | | | | | The LTC extra latency is in ms already and not in frames, so multiplying with the framerate will end up with a wrong number. Part-of: <https://gitlab.freedesktop.org/gstreamer/gst-plugins-bad/-/merge_requests/2453>
* tsdemux: Notify when ignore_pcr is setJan Alexander Steffens (heftig)2021-07-281-0/+1
| | | | Part-of: <https://gitlab.freedesktop.org/gstreamer/gst-plugins-bad/-/merge_requests/2437>
* debugutils: Only proxy the properties onceNicolas Dufresne2021-07-272-2/+26
| | | | | | | | | The needed once call was removed accidently during porting. This was catch by the CI as memory leaks. Related to !2426 Part-of: <https://gitlab.freedesktop.org/gstreamer/gst-plugins-bad/-/merge_requests/2438>
* mxf: Handle D10 "picture only" variantEdward Hervey2021-07-271-1/+1
| | | | | | Fixes https://gitlab.freedesktop.org/gstreamer/gst-plugins-bad/-/issues/80 Part-of: <https://gitlab.freedesktop.org/gstreamer/gst-plugins-bad/-/merge_requests/2436>
* mxfvc3: Also accept clip-wrapped vc-3Edward Hervey2021-07-271-2/+2
| | | | | | We can now handle this fine Part-of: <https://gitlab.freedesktop.org/gstreamer/gst-plugins-bad/-/merge_requests/2434>
* mxfdemux: Handle EOS with non-frame wrappingEdward Hervey2021-07-271-2/+13
| | | | | | | | | | | When reaching the end of non-frame wrapping track in pull mode, we want to force the switch to the next non-eos pad. This is similar to when we exceed the maximum drift. Fixes issues on EOS where not everything would be drained out and stray errors would pop out. Part-of: <https://gitlab.freedesktop.org/gstreamer/gst-plugins-bad/-/merge_requests/2434>
* mxfdemux: More granular interleaved content handlingEdward Hervey2021-07-271-4/+6
| | | | | | | | An interleave of 500ms can be way too big for some downstream queueing elements. Instead use a smaller 100ms interleave and silence the various warnings about resyncing (it's normal) Part-of: <https://gitlab.freedesktop.org/gstreamer/gst-plugins-bad/-/merge_requests/2434>
* debugutils: De-duplicate proxy_properties function to a new utils modulePhilippe Normand2021-07-265-199/+161
| | | | Part-of: <https://gitlab.freedesktop.org/gstreamer/gst-plugins-bad/-/merge_requests/2426>
* audiolatency: Expose samplesperbuffer propertySeungha Yang2021-07-262-3/+30
| | | | | | | | | ... for user to be able to set the number of required samples. For instance, our default value is 240 samples (about 5ms latency in case that sample rate is 48000), which might be larger than actual buffer size of audio capture device. Part-of: <https://gitlab.freedesktop.org/gstreamer/gst-plugins-bad/-/merge_requests/2307>
* videoparsers: vp9: Need to process the first frame even not key.He Junyan2021-07-231-1/+21
| | | | | | | | | | | | | | | | | | | | Some cut VP9 streams begin with a non key frame. The current code just bail out the parse_process_frame() if not a key frame. Because of this, we do not set the valid caps before we push the data of the first frame(even this first frame will be discarded by the downstream decoder because it is not a key frame). The pipeline such as: gst-launch-1.0 filesrc location=some.ivf ! ivfparse ! vp9parse ! vavp9dec ! fakesink will get a negotiation error and the pipeline can not continue. The correct behaviour should be: the decoder discard the first frame and continue to decode later frames successfully. So, when the parse does not have valid stream info(should be the first frame case), we should continue and report caps. Part-of: <https://gitlab.freedesktop.org/gstreamer/gst-plugins-bad/-/merge_requests/2427>
* audiolatency: Handle audio buffers with invalid durationNirbheek Chauhan2021-07-231-9/+18
| | | | | | | | | pipewiresrc outputs audio buffers without a valid duration, so we need to calculate it manually in that case. Upstream issue: https://gitlab.freedesktop.org/pipewire/pipewire/-/issues/1438 Part-of: <https://gitlab.freedesktop.org/gstreamer/gst-plugins-bad/-/merge_requests/2419>
* tsdemux: Handle PCR-less streamsEdward Hervey2021-07-221-3/+30
| | | | | | | | | | | | | Some programs specify a PCR PID but don't actually store any PCR values, or are way too far apart. In order to gracefully handle those situations, we will queue up to a certain amount of pending buffers before deciding to give up on that PCR PID and not use any (i.e. using DTS/PTS values as-is) Fixes https://gitlab.freedesktop.org/gstreamer/gst-plugins-bad/-/issues/1629 Part-of: <https://gitlab.freedesktop.org/gstreamer/gst-plugins-bad/-/merge_requests/2422>
* mxfdemux: Make gst-indent on the CI happyEdward Hervey2021-07-211-4/+4
| | | | | | grmbl Part-of: <https://gitlab.freedesktop.org/gstreamer/gst-plugins-bad/-/merge_requests/2371>
* mxfdemux: Handle non-frame wrappingEdward Hervey2021-07-212-112/+332
| | | | | | | | | | | | | | | | | | * If we have an index table for non-framed essence, we can handle it * The demuxer has a state which indicates whether it will next fetch a KLV or data contained *within* a KLV. * The position on Essence Tracks always correspond to the next entry to fetch, demuxer offset will be skipped accordingly whenever we switch between partitions (in case of resyncs). A copy of the main clip/custom KLV for that partition is kept to track the position within the essence of that partition. * For clip/custom-wrapped raw audio, if the edit rate is too small (and would cause plenty of tiny buffers to be outputted), specify a minimum number of edit units per buffer. Part-of: <https://gitlab.freedesktop.org/gstreamer/gst-plugins-bad/-/merge_requests/2371>
* mxfdemux: Use KLV for position/content trackingEdward Hervey2021-07-212-344/+460
| | | | | | | | | | | * For pull-based, this avoids pulling content if it's not needed (ex: skipping filler packet, not downloading the content if we only need to know if/where an essence packet is, etc...). Allows reducing i/o usage to the minimum. * This also allows doing sub-klv position tracking, and opens the way for non-frame-wrapping handling Part-of: <https://gitlab.freedesktop.org/gstreamer/gst-plugins-bad/-/merge_requests/2371>
* mxfdemux: Output the topology of the file in debug logsEdward Hervey2021-07-211-0/+144
| | | | | | | This provides a summary of the number/type of tracks in the Material and File Packages Part-of: <https://gitlab.freedesktop.org/gstreamer/gst-plugins-bad/-/merge_requests/2371>
* mxfdemux: Refactor pull seekEdward Hervey2021-07-211-23/+198
| | | | | | | | | | | | In order to figure out the exact start position (backed by a keyframe) accross all tracks, we first figure out the backing keyframe position, and *then* seek to that position. Avoids ending up in situations where we would properly seek to the backing keyframe on video ... but not on the audio streams (they would have been set to the original non-keyframe position). Fixes key-unit seeking. Part-of: <https://gitlab.freedesktop.org/gstreamer/gst-plugins-bad/-/merge_requests/2371>
* mxfaes-bwf: Handle new custom-constant-sized variantEdward Hervey2021-07-212-5/+13
| | | | | | | | | Defined by Amendment 2:2013 to SMPTE ST 382:2007 Also define a new "UNKNOWN" wrapping type to make the difference with known wrapping types Part-of: <https://gitlab.freedesktop.org/gstreamer/gst-plugins-bad/-/merge_requests/2371>
* mxfmpeg: Fix essence coding detectionEdward Hervey2021-07-211-14/+13
| | | | | | | | | | The picture essence coding matching was wrong. Use the proper "base" MXFUL for video mpeg compression for matching. Also handle the case where some old files would put the essence container label in the essence coding field Part-of: <https://gitlab.freedesktop.org/gstreamer/gst-plugins-bad/-/merge_requests/2371>
* mxfdemux: Refactor index table and offset handlingEdward Hervey2021-07-214-402/+1089
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * Streamline offset <=> entry handling. Historically the demuxer didn't support information from index tables and stored the discovered information in an array per track. When index table support was added, a parallel system was setup for that relationship. This commit unifies this into one system with the `find_edit_entry()` and `find_entry_for_offset()` functions. * By extension, per-track offset entry tables are only created/used if no index table is present for those tracks. * Use index table information as-is. The index table system from MXF is quite complex and there are various ways to use the information contained within. Instead of converting that information we store the data from the tables as-is and extract the needed information when needed. * Handle index tables without entries (i.e. all content package units are of the same size). * Allow collecting index table segments as we go instead of only once if a random-index-pack is present. This also improves support of some files in push-mode. * When searching for keyframe entries, use the keyframe_offset if present (speeds up searching). * For interleaved content (i.e. several tracks in the sample essence container), we use a system to be able to identify the position of each track in the delta entries of index tables. * Handle temporal offset only on tracks which *do* need it (as specified in the delta entries of the index tables). If present, those offsets are stored in a pre-processed table which allows computing PTS from DTS with a simple offset. * Add a quirk for files which are known to be have wrongly stored temporal offsets. * Overall opens the way to handle more types of MXF files, especially those with non-frame-wrapping. Part-of: <https://gitlab.freedesktop.org/gstreamer/gst-plugins-bad/-/merge_requests/2371>
* mxfdemux: Drop duplicate seek eventsEdward Hervey2021-07-211-0/+5
| | | | Part-of: <https://gitlab.freedesktop.org/gstreamer/gst-plugins-bad/-/merge_requests/2371>
* mxf: Improve index entry debug logEdward Hervey2021-07-211-9/+13
| | | | | | By printing out the various known flag values Part-of: <https://gitlab.freedesktop.org/gstreamer/gst-plugins-bad/-/merge_requests/2371>
* mxf: Demote error message when resolving valid empty referenceEdward Hervey2021-07-211-0/+11
| | | | | | | A Source Clip can have zero'd SourcePackageID and SourceTrackID, this indicates it terminates the source reference chain Part-of: <https://gitlab.freedesktop.org/gstreamer/gst-plugins-bad/-/merge_requests/2371>
* mxfdemux: Handle temporal reordering shiftEdward Hervey2021-07-212-3/+64
| | | | | | | | | | | | | | | | | | | | | | This is similar to how the same issue was handled in qtdemux. In order for the "DTS <= PTS" constraint to be respected, we calculate the maximum temporal reordering that can happen (via index tables). If there is a non-0 temporal reordering, we: * Shift all outgoing PTS by that amount * Shift segment for that stream by that amount * Don't modify DTS (i.e. they might end up having negative running-time, before the start of the segment) Also ensure all entries have a valid PTS set, previously this wouldn't be set for entries with a temporal offset of 0. Fixes https://gitlab.freedesktop.org/gstreamer/gst-plugins-bad/-/issues/584 (and maybe a lot of other issues) Part-of: <https://gitlab.freedesktop.org/gstreamer/gst-plugins-bad/-/merge_requests/2371>
* mpegtsmux: Quieten "missed PCR" warnings in VBR mode.Jan Schmidt2021-07-151-1/+1
| | | | | | | | | When the muxer is operating in VBR mode, it's kind of expected for now that we might not put the PCR in exactly the right place, because the muxer doesn't schedule packets that way. In that case don't warn constantly about the PCR ending up a few ms off target. Part-of: <https://gitlab.freedesktop.org/gstreamer/gst-plugins-bad/-/merge_requests/2295>
* rtmp2src: workaround a GLib race when destroying a GMainContext/GSourceMatthew Waters2021-07-151-1/+4
| | | | | | | | | | | https://gitlab.gnome.org/GNOME/glib/-/issues/803 Basically, if destruction of a GSource and its associated GMainContext are not synchronised, Then the GSource destruction can access freed GMainContext resources and cause a crash. This is not super common but can happen. Part-of: <https://gitlab.freedesktop.org/gstreamer/gst-plugins-bad/-/merge_requests/2405>
* vp9parse: Skip parsing decode-only frameSeungha Yang2021-07-141-1/+2
| | | | | | | Decode-only frame (i.e., show_existing_frame == 1) doesn't hold any valid information apart from the index of frame to be duplicated. Part-of: <https://gitlab.freedesktop.org/gstreamer/gst-plugins-bad/-/merge_requests/2408>
* interlace: Push the reconfigure event in the right directionJan Alexander Steffens (heftig)2021-07-061-1/+1
| | | | Part-of: <https://gitlab.freedesktop.org/gstreamer/gst-plugins-bad/-/merge_requests/2361>
* mxfdemux: Check validity of interleaved File PackageEdward Hervey2021-07-053-0/+34
| | | | | | | As specified by the S377 MXF core specification, if a file package has interleaved content, then all tracks must be using the same Edit Rate Part-of: <https://gitlab.freedesktop.org/gstreamer/gst-plugins-bad/-/merge_requests/2378>
* h265parse: Add special profile case for profile_idc 0.He Junyan2021-07-021-0/+19
| | | | | | | | | | | This is a work-around to identify some main profile streams having wrong profile_idc. There are some wrongly encoded main profile streams which doesn't have any of the profile_idc values mentioned in Annex-A, instead, general_profile_idc has been set as zero and the general_profile_compatibility_flag[general_profile_idc] is TRUE. Assuming them as MAIN profile for now. Part-of: <https://gitlab.freedesktop.org/gstreamer/gst-plugins-bad/-/merge_requests/2322>
* h265parse: Map -intra profiles to non-intra compatible profiles.He Junyan2021-07-021-0/+100
| | | | | | | All the -intra profiles can map to non-intra profiles as compatible profiles, except the monochrome case for main and main-10. Part-of: <https://gitlab.freedesktop.org/gstreamer/gst-plugins-bad/-/merge_requests/2322>
* mxfvanc: Handle empty ANC essenceEdward Hervey2021-07-012-2/+33
| | | | | | | | | | Not having any *actual* ANC is totally fine and common usage with several MXF variants. In order to properly advance the streams, the essence handler returns an empty GAP buffer which gets converted to a GST_EVENT_GAP. Part-of: <https://gitlab.freedesktop.org/gstreamer/gst-plugins-bad/-/merge_requests/2345>
* avwait: Don't consider it a segment change if the segment is the same except ↵Sebastian Dröge2021-06-231-8/+10
| | | | | | for the position Part-of: <https://gitlab.freedesktop.org/gstreamer/gst-plugins-bad/-/merge_requests/2319>
* tsmux: When selecting random PIDs, name the pads according to those PIDsSebastian Dröge2021-06-231-1/+7
| | | | | | | | | | | Some elements will make use of the automatically generated names to create new pads in future muxer instances, for example splitmuxsink. Previously we would've created a pad with a random pid that would become "sink_0", and then on a new muxer instance a pad "sink_0" and tsmux would've then failed because 0 is not a valid PID. Part-of: <https://gitlab.freedesktop.org/gstreamer/gst-plugins-bad/-/merge_requests/2318>
* tsmux: Recheck existing pad PIDs when requesting a new pad with a random pidSebastian Dröge2021-06-231-1/+23
| | | | | | | | | | Previously pads might have been requested already (e.g. in NULL state), then reset was called (e.g. because changing state) and then a new pad was requested. Resetting is re-creating the internal muxer object and as such resetting the pid counter, so the next requested pad would get the same pid as the first requested pad which then leads to collisions. Part-of: <https://gitlab.freedesktop.org/gstreamer/gst-plugins-bad/-/merge_requests/2317>
* h264parse,h265parse: Push parameter set NAL units again per segment-doneSeungha Yang2021-06-162-0/+2
| | | | | | | | | | | | Some decoder implementations might drain out internal buffers and reset its status on segment-done event. So, in case that upstream stream-format is packetized but downstream supports only byte-format, required codec-data might not be forwarded toward downstream if such parameter set NAL units don't exist in inband bitstream. Therefore, parse elements should re-send parameter set NAL units like the case of flush event. Part-of: <https://gitlab.freedesktop.org/gstreamer/gst-plugins-bad/-/merge_requests/2334>
* h265parse: Fix a typo in get_compatible_profile_caps().He Junyan2021-06-161-1/+2
| | | | | | | | The GST_H265_PROFILE_MAIN_444_10 profile should be compatible with GST_H265_PROFILE_SCREEN_EXTENDED_MAIN_444_10, not the current GST_H265_PROFILE_SCREEN_EXTENDED_MAIN_10. Part-of: <https://gitlab.freedesktop.org/gstreamer/gst-plugins-bad/-/merge_requests/2328>
* alphadecodebin: Fix stall due to QoSNicolas Dufresne2021-06-141-0/+5
| | | | | | | | | alphacombine element is a simple element that assumes buffers are always paired, or at least that missing buffers are signalled with a GAP. The QoS implementation in the GstVideoDecoder base class allow decoders dropping frames independently and that could lead to stall in alphacombine. Part-of: <https://gitlab.freedesktop.org/gstreamer/gst-plugins-bad/-/merge_requests/2326>
* jpeg2000parse, openjpeg: add support for YCrCb 4:1:1 samplingStéphane Cerveau2021-06-141-2/+7
| | | | | | | Add YCrCb 4:1:1 support in openjpeg elements and fix in jpeg2000parse the YCrCb 4:1:0 support Part-of: <https://gitlab.freedesktop.org/gstreamer/gst-plugins-bad/-/merge_requests/2321>
* debugutils: Introduce videocodectestsinkNicolas Dufresne2021-06-075-12/+473
| | | | | | | | | | | | | | This is a video specific sink used to test video CODEC conformance. This is similar to a combination of filesink and testsink, but will skip over any type of padding that GStreamer Video library introduces. This is needed in order to obtain the correct checksum or raw yuv data. This element currently support writing back non-padded raw I420 through the location property and will calculate an MD5 and post it as an element message of type conformance/checksum. More output format or checksum type could be added in the future as needed. Part-of: <https://gitlab.freedesktop.org/gstreamer/gst-plugins-bad/-/merge_requests/2287>
* tsdemux: Clear all streams when rewindingEdward Hervey2021-06-031-4/+21
| | | | | | | This avoids sending out partial invalid data downstream which could cause decoders (ex: `dvdlpmdec`) to error out. Part-of: <https://gitlab.freedesktop.org/gstreamer/gst-plugins-bad/-/merge_requests/2301>