summaryrefslogtreecommitdiff
path: root/gst/isomp4
Commit message (Collapse)AuthorAgeFilesLines
* qtdemux: reset pending segment if we are already pushing oneThiago Santos2016-03-071-0/+2
| | | | | | | | | | | | | | | | | | | | When upstream is running in bytes in push-mode, qtdemux will convert seeks from time to bytes and send it upstream. Upstream element will perform a byte seek and send a byte segment to qtdemux that will convert it to time and push it downstream. There is, however, the pending_segment variable that stores a new segment event to be pushed before the next data. When handling seeks as mentioned above this variable was being ignored and, if it contained some segment event, it would override the one resulting from the seek. This would restore a previous segment and would cause the seek segment to be discarded downstream. This patch fixes this issue by unrefing any pending segment as the seek from upstream should contain the latest one that should be used, as requested by the application. https://bugzilla.gnome.org/show_bug.cgi?id=763165
* qtdemux: run gst-indentThiago Santos2016-03-071-8/+10
| | | | Otherwise commits will fail with our indent check hook
* qtdemux: cenc aux info parsing from mdat support in PULL modePhilippe Normand2016-02-251-1/+25
| | | | | | | | | | | This is already supported for PUSH mode but was failing in PULL mode. The aux info is sometimes stored in the mdat before the first sample, so the loop task needs to pull data stored at that location and perform the aux info cenc parsing. https://bugzilla.gnome.org/show_bug.cgi?id=761700 https://bugzilla.gnome.org/show_bug.cgi?id=762516
* qtdemux: prevent buffer flow if any stream failed to be exposedPhilippe Normand2016-02-251-6/+29
| | | | | | | | | In some cases the stream configuration can fail, for instance if the stream is protected and no decryptor was found. For those situations the demuxer shouldn't emit any data on the corresponding source pad of the stream and bail out. https://bugzilla.gnome.org/show_bug.cgi?id=762516
* qtdemux: don't push encrypted buffer without cenc metadataPhilippe Normand2016-02-251-0/+6
| | | | | | | | | | When the cenc metadata is stored outside of the moof box and the stream is exposed it is possible that the cenc metadata hasn't been processed yet while the first buffer is being pushed. When this happens the buffer can't possibly be decrypted downstream so don't push it. https://bugzilla.gnome.org/show_bug.cgi?id=762516
* qtdemux: read saio aux_info_type as a FOURCCPhilippe Normand2016-02-241-1/+5
| | | | https://bugzilla.gnome.org/show_bug.cgi?id=756897
* win32: remove outdated build cruftTim-Philipp Müller2016-02-211-148/+0
| | | | | | This hasn't been touched for generations, doesn't work, and is just causing confusion. We also don't want to maintain these files manually.
* qtdemux: workaround for files with wrong color_table_id valueMatej Knopp2016-02-191-0/+8
| | | | | | Instead of erroring out, just use the default color table. https://bugzilla.gnome.org/show_bug.cgi?id=761637
* qtdemux: plug leaks in cenc aux info parsingPhilippe Normand2016-02-191-0/+2
|
* qtdemux: only transform protected caps onceAlex Ashley2016-02-171-5/+7
| | | | | | | | | | | | | | | | | | | | | | | | | Commit 7873bede3134b15e5066e8d14e54d1f5054d2063 (https://bugzilla.gnome.org/show_bug.cgi?id=760774) changed the behaviour of qtdemux to call gst_qtdemux_configure_stream() for every new moof. When playing a protected stream, gst_qtdemux_configure_stream() calls gst_qtdemux_configure_protected_caps(). The gst_qtdemux_configure_protected_caps() function takes the original media format, puts this in a field called "original-media-type" and then changes the caps to "application/x-cenc". The gst_qtdemux_configure_protected_caps() did not handle the case of being called multiple times, causing it to incorrectly set the caps. The second call was causing the caps to be set to: application/x-cenc, original-media-type"application/x-cenc" This commit makes gst_qtdemux_configure_protected_caps() check that the caps have already been transformed, so that it only gets changed once. https://bugzilla.gnome.org/show_bug.cgi?id=761769
* qtdemux: fix framerate calculation for fragmented formatSeungha Yang2016-01-291-6/+39
| | | | | | | | | | | | | qtdemux calculates framerate using duration and the number of sample. In case of fragmented mp4 format, however, the number of sample can be figure out after parsing every moof box. Because qtdemux does not parse every moof in QTDEMUX_STATE_HEADER state, it will cause incorrect framerate calculation. This patch will triger gst_qtdemux_configure_stream() for every new moof. Then, framerate will be calculated by using duration and n_samples of the moof. https://bugzilla.gnome.org/show_bug.cgi?id=760774
* qtdemux: handling zero segment-duration edit listSeungha Yang2016-01-291-4/+20
| | | | | | | | | | Based on document ISO_IEC_14496-12, edit list box can have segment duration as zero. It does not imply that media_start equals to media_stop. But, it just indicates a sample which should be presented at the first. This patch derives segment duration using media_time and duration of file. And set derived duration to segment-duration. https://bugzilla.gnome.org/show_bug.cgi?id=760781
* qtdemux: expose streams with first moof for fragmented formatSeungha Yang2016-01-292-16/+39
| | | | | | | | | In case of push mode, qtdemux expose streams after got moov box. We can not guarantee that a moov box has sample data such as sample duration and the number of sample in stbl box for fragmented format case. So, if a moov has no sample data, streams will not be exposed until get the first moof. https://bugzilla.gnome.org/show_bug.cgi?id=760779
* gst: Fix unintialized variable warningsVíctor Manuel Jáquez Leal2016-01-271-1/+1
| | | | | | | | | While cross-compiling with Linaro GCC 5.1-2015.08, it complained about a couple unitialized variables. This patch initializes them to zero. https://bugzilla.gnome.org/show_bug.cgi?id=761094
* qtdemux: drop flushes from our own offset seekThiago Santos2015-12-222-0/+17
| | | | | | | | Prevents downstream from receiving flushes for a seek only in upstream. Those seeks are only to start reading from the right offset when skipping or returning to qt atoms. https://bugzilla.gnome.org/show_bug.cgi?id=758928
* qtmux: Don't write invalid edit list start time.Jan Schmidt2015-12-191-2/+4
| | | | | | | | | Avoid writing a negative number as a large positive integer in an edit list when the first_ts is smaller than the first_dts - which can happen when the first packet received has a PTS but no DTS. https://bugzilla.gnome.org/show_bug.cgi?id=759615
* isomp4: remove unused parameters in build_*_extensionLuis de Bethencourt2015-12-103-13/+11
| | | | | | AtomTRAK parameter is not used by build_mov_alac_extension(), build_jp2h_extension(), or build_mov_alac_extension() and can be removed.
* isomp4: replace variable only used onceLuis de Bethencourt2015-12-101-3/+2
| | | | Replace has_shift variable with value since it is only use once.
* qtdemux: Stop pushing data as soon as possible in push-modeEdward Hervey2015-12-071-0/+8
| | | | | | | | | | When working in push-mode, we attempt to push out everything currently buffered in the adapter. This has two pitfalls: * We could stop earlier (the moment we get a non-ok or non-not-linked) * We return the last combined flow return, which might be completely different from the previous combined flow return
* qtdemux: add support for OpusLuis de Bethencourt2015-11-261-0/+36
| | | | | | | Add support for demuxing Opus encapsulated in MP4 files, based on the following spec: https://www.opus-codec.org/docs/opus_in_isobmff.html https://bugzilla.gnome.org/show_bug.cgi?id=742643
* qtdemux: use macro for codec_nameLuis de Bethencourt2015-11-251-2/+1
| | | | Use _codec() macro instead of duplicating code.
* qtdemux: restore the segment on case of soft resetThiago Santos2015-11-241-0/+3
| | | | | | | | | | When seeking back to restore the mdat position a flush is pushed through and it resets downstream segment information. Make sure that after the flush (that does a soft reset) a segment will be pushed again Fixes regressions spotted at https://ci.gstreamer.net/job/GStreamer-master-validate/2100/
* qtdemux: unite duplicate FourCCLuis de Bethencourt2015-11-202-7/+10
| | | | Unite in fourcc.h the FourCCs that are used twice or more in qtdemux
* atoms: remove unused argument of build_mov_wave_extension()Luis de Bethencourt2015-11-191-4/+4
| | | | | AtomTrak * trak argument of build_move_wave_extension() isn't used. Removing it.
* qtdemux: remove duplicate FourCCLuis de Bethencourt2015-11-192-54/+54
| | | | Use the available FourCCs in fourcc.h instead of duplicating them.
* isomp4: centralize all FourCCLuis de Bethencourt2015-11-193-23/+22
| | | | | | 10 FourCCs generated with GST_MAKE_FOURCC() in gstqtmux.c and atoms.c already exist in fourcc.h. Don't duplicate these and use them directly. Plus moving 6 to fourcc.h, to centralize them all.
* isomp4: add support for Opus in mp4mpuxLuis de Bethencourt2015-11-195-1/+97
| | | | | | | | Add support for muxing MP4 files containing Opus. Based on the spec detailed here: https://www.opus-codec.org/docs/opus_in_isobmff.html https://bugzilla.gnome.org/show_bug.cgi?id=742643
* qtdemux: Replace tabs with spacesSebastian Dröge2015-11-181-3/+3
|
* qtdemux: Cast to signed integers to prevent unsigned compare between ↵Sebastian Dröge2015-11-181-2/+4
| | | | | | | | | | | | negative and positive numbers This fixes seeking if the first entries in the samples table are negative. The binary search would always fail on this as the array would not be sorted if interpreting the negative numbers as huge positive numbers. This caused us to always output buffers from the beginning after a seek instead of close to the seek position. Also add a case to the comparison function for equality.
* qtdemux: only send initial gaps for non-fragmented streamsThiago Santos2015-11-171-3/+7
| | | | | | | | | | | It would be unusual to have the header segment with an 'edts' atom indicating gaps at the beginning when handling fragmented streams. The header usually doesn't contain any timestamping information, this should come from the playlist/manifest and the segments with media in those scenarios. https://bugzilla.gnome.org/show_bug.cgi?id=758171
* Revert "Revert "qtdemux: respect qt segments in push-mode for empty starts""Thiago Santos2015-11-171-18/+76
| | | | | | This reverts commit d842ff288a9d01214a046becbfd9cbff3a4acea0. This was reverted by accident
* Revert "qtdemux: respect qt segments in push-mode for empty starts"Sebastian Dröge2015-11-161-76/+18
| | | | This reverts commit 142d8e2d23e5602e7382977af1043d621625f8c8.
* qtdemux: Fix string memory leakVineeth TM2015-11-161-0/+3
| | | | | | | The string got using g_strdup_printf will be allocated memory and should be freed after use. https://bugzilla.gnome.org/show_bug.cgi?id=758161
* isomp4/atoms: remove unnecessary NULL checks before g_free()Reynaldo H. Verdejo Pinochet2015-11-151-5/+2
|
* qtdemux: respect qt segments in push-mode for empty startsThiago Santos2015-11-091-18/+76
| | | | | | | | | | | | | | In push-mode it is hard to support qt segments overall but it is possible to support when the file isn't heavily edited but just contain a segment to indicate a gap at the beginning. This also allows properly timestamping data that has negative DTS in push-mode. It is relevant to support those for 2 scenarios: 1) fragmented streaming 2) HTTP playback of 'regular' mp4 https://bugzilla.gnome.org/show_bug.cgi?id=753484
* qtdemux: support for cenc auxiliary info parsing outside of moof boxPhilippe Normand2015-11-042-17/+53
| | | | | | | When the cenc aux info index is out of moof boundaries, keep track of it and parse the beginning of the mdat box, before the first sample. https://bugzilla.gnome.org/show_bug.cgi?id=755614
* qtmux: Don't unconditionally use strnlen()Ryan Hendrickson2015-10-191-1/+3
| | | | | | It's not available on older OSX and we can as well use memchr() here. https://bugzilla.gnome.org/show_bug.cgi?id=756154
* qtmux: unify raw audio caps into a single caps structureTim-Philipp Müller2015-10-191-8/+3
|
* qtdemux: add support for FFV1 coded streams in movReynaldo H. Verdejo Pinochet2015-10-151-0/+6
| | | | https://bugzilla.gnome.org/show_bug.cgi?id=752495
* qtdemux: fix caps leakGuillaume Desmottes2015-10-141-0/+6
| | | | | | | | | | | If the QtDemuxStream are re-used they may already have caps which used to be leaked. Reproduced using the validate.dash.playback.seek_forward.dash_exMPD_BIP_TC1 validate scenario. https://bugzilla.gnome.org/show_bug.cgi?id=756561
* qtdemux: Fix taglist memory leakVineeth TM2015-10-141-2/+4
| | | | | | Free the stream and its sub items instead of just the stream https://bugzilla.gnome.org/show_bug.cgi?id=756544
* qtmux: Allow negotiating to S8 as a raw format but stop making it best choiceThibault Saunier2015-10-132-6/+4
| | | | | | | Negotiation to audio/x-raw,format=S8 was not possible because S8 does not have a bit order so we ended up doing `if (!entry.fourcc) goto refuse_caps;` https://bugzilla.gnome.org/show_bug.cgi?id=756387
* qtmux: Add prores supportThibault Saunier2015-10-132-0/+17
| | | | https://bugzilla.gnome.org/show_bug.cgi?id=756388
* qtdemux: Fix memory leak for corrupted fileVineeth TM2015-10-081-0/+2
| | | | | | Free brands before overriding them. https://bugzilla.gnome.org/show_bug.cgi?id=756226
* qtmux: Fix date memory leakVineeth TM2015-10-071-0/+1
| | | | | | | When getting date from taglist, the memory should be freed after using it. https://bugzilla.gnome.org/show_bug.cgi?id=756171
* qtmux: Fix sample memory leakVineeth TM2015-10-051-0/+1
| | | | | | | When getting sample from taglist, the memory should be freed after using it. https://bugzilla.gnome.org/show_bug.cgi?id=756068
* qtdemux: handle empty segments in seeking adjustThiago Santos2015-10-021-26/+47
| | | | | | | | | | If seeking targets an empty segment skip it as there is no media offset to get from it. Instead look for the next one. This doesn't make seeking in push-mode work if you seek to an empty segment but at least won't get you to wrong offsets. https://bugzilla.gnome.org/show_bug.cgi?id=753484
* qtdemux: Check multi trex to find track id in mp4 mpeg-dash streamManasa Athreya2015-10-021-3/+3
| | | | | | | | | If stream has more than one trex box which is not matched to actual track id, it makes qtdemux crashed. Author : Manasa Athreya (manasa.athreya@lge.com) https://bugzilla.gnome.org/show_bug.cgi?id=754864
* qtdemux: support timed-text subtitle tracks.Chris Bass2015-09-263-0/+6
| | | | https://bugzilla.gnome.org/show_bug.cgi?id=752818
* qtdemux: Accumulate segments for edit lists before activating the next segmentSebastian Dröge2015-09-241-5/+7
| | | | | | | | | | | eceb2ccc739092d964d78945e19c2ecedbd214e2 broke segment seeks by always accumulating segments manually when activating a segment. This is only needed when handling edit lists, not when activating a segment because of a seek. Do the accumulation when switching edit list segments instead. This fixes segment seeks again, while keeping edit lists playback working. https://bugzilla.gnome.org/show_bug.cgi?id=755471