Commit graph

6858 commits

Author SHA1 Message Date
Sebastian Dröge
7ae23d13c8 mxfdemux: Only pre-set position for exactly the same essence track
The edit rate is only supposed to be the same in a source package, but there
might be multiple source packages with the same essence container. As such
just comparing the body/index SID is not sufficient.
2015-12-10 12:47:17 +02:00
Sebastian Dröge
39aa2aaa39 mxfdemux: Only pre-set the track position if it's for the same body/index SID 2015-12-10 12:27:04 +02:00
Sebastian Dröge
f2eaa68c90 mxfdemux: Only access the index table if it has enough elements 2015-12-09 16:55:00 +02:00
Sebastian Dröge
6e06f8c936 mxfdemux: Use keyframe information from index table segments if available
We don't implement keyframe detection for all codecs and this will allow us to
implement better seeking.
2015-12-09 16:49:30 +02:00
Sebastian Dröge
b504672fc4 mxfdemux: Collect all index table segments after finding the random index pack
That way we always have the index table information available, especially the
keyframe-ness of all buffers.
2015-12-09 16:33:39 +02:00
Sebastian Dröge
6d367d6b48 mxfdemux: Fix handling of IndexTableSegments
This was completely broken before and could only work on a very constrained
set of files. After these changes it should work except for situations where
PTS != DTS, which is not handled at all in mxfdemux currently.

https://bugzilla.gnome.org/show_bug.cgi?id=759118
2015-12-09 16:33:39 +02:00
Sebastian Dröge
c82d702985 mxftypes: Fix parsing of index table segments 2015-12-08 20:24:59 +02:00
Sebastian Dröge
41e500356f mxfmux: Handle aggregation with NULL buffers without crashing 2015-12-08 18:23:02 +02:00
Sebastian Dröge
a02708f924 mxfmux: Add FIXME about enforcing that all tracks in a source package have the same edit rate
The standard requires this and also the index table segments are not going to
work otherwise.
2015-12-08 16:45:33 +02:00
Sebastian Dröge
df7209a1c5 mxfmux: Write index table segments
But only for the first essence track, and once for every keyframe every 2
seconds.
2015-12-08 13:50:44 +02:00
Sebastian Dröge
1addfcc0b2 mxfmetadata: Fix static local tag for index sid 2015-12-08 10:14:41 +02:00
Sebastian Dröge
47da7565ce mxftypes: Add function to serialize an index table segment to a buffer 2015-12-08 10:14:41 +02:00
Sebastian Dröge
01f0d16db3 mxfmux: Index table segments must not use the primer pack
According to S377-1-2009c 9.2 the local tags must not be resolved from the
primer pack, which as a result means that there can't be any other tags than
statically assigned ones.
2015-12-08 10:14:41 +02:00
Edward Hervey
fe45de837c mxfmux: Remove more dead code
Coverity CID #1328818
2015-12-07 13:49:49 +01:00
Nicolas Dufresne
fe116092cd h26xparse: Resend PPS/SPS after seek
This is to support byte-stream decoder that does not remember the
PPS/SPS after a flush. This is not needed by all decoders, but is
harmless for those that do remember.

https://bugzilla.gnome.org/show_bug.cgi?id=758405
2015-12-05 19:05:26 -05:00
Sebastian Dröge
2ab188bf29 mxfmux: Don't copy input buffers, just append them to the header 2015-12-04 18:06:30 +02:00
Edward Hervey
a21c2618c5 tsdemux: Expose DVB Subpicture as subpictures
For some reason we were considering them as private data.
2015-12-02 14:15:04 +01:00
Edward Hervey
531117b7df tsdemux: Push GAP events *after* deactivating old programs
The order in which program switch must happen is:
1) drain all data on old pads (but don't push EOS)
2) add new pads (but don't push any data on them)
3) Push EOS and remove old pads
4) Start pushing data on new pads

There was one caveat in this implementation, which is that when
we activate a sparse pad (step 2) we would push a GAP event. The problem
is that, while being an event, it is actually *data*.

We therefore need to make sure pushing those GAP event is done at the step
we start pushing data.

https://bugzilla.gnome.org/show_bug.cgi?id=750402
2015-12-02 14:15:04 +01:00
Edward Hervey
7336294635 tsdemux: Make sure old streams are drained before switching
Before we add any streams, make sure we drain all streams. This ensures
there's consistency that only "new" data will be pushed on buffers once
the new pads are added

https://bugzilla.gnome.org/show_bug.cgi?id=750402
2015-12-02 14:15:04 +01:00
Edward Hervey
14e6d2d427 mpegtsdemux: Allow deactivation of programs to be delayed
When changing programs, the order of events needs to be the following:
* add pads from new program
* send EOS on old pads
* remove old pads
* emit 'no-more-pads'

Previously tsdemux was not doing that, and was first deactivating and
removing old pads before adding new ones.

We fix this by allowing subclasses of mpegtsbase to be able to handle
themselves the deactivation of programs. In this case tsdemux will
properly deactivate it once it has activated the new program.

https://bugzilla.gnome.org/show_bug.cgi?id=750402
2015-12-02 14:15:04 +01:00
Sebastian Dröge
92d926d733 videoframe-audiolevel: Fix compilation of static plugin and some compiler warnings
Use G_GSIZE_FORMAT for gsize instead of %ld and make sure that the plugin name
is a valid C identifier, i.e. contains no spaces or dashes.
2015-12-02 14:36:42 +02:00
Vivia Nikolaidou
978bcd7181 alevel: New audio/video level element
The videoframe-audiolevel element acts like a synchronized audio/video "level"
element. For each video frame, it posts a level-style message containing the
RMS value of the corresponding audio frames. This element needs both video and
audio to pass through it. Furthermore, it needs a queue after its video
source.

https://bugzilla.gnome.org/show_bug.cgi?id=748259
2015-12-02 12:52:57 +02:00
Paolo Pettinato
ce67e8934d pcapparse: Forward FLUSH_STOP events downstream too
https://bugzilla.gnome.org/show_bug.cgi?id=758913
2015-12-01 20:03:29 +02:00
Tim-Philipp Müller
b79cfc68cb tsmux: fix wrong log message level
ERROR level is debugging left-over.
2015-12-01 17:07:44 +00:00
Ravi Kiran K N
6b643fdff6 id3mux: write private data tag
Handle "PRIV" tag in id3mux. Write owner
identifier and private data and add to the
id3v2 frame.

https://bugzilla.gnome.org/show_bug.cgi?id=758728
2015-11-27 12:16:57 +00:00
Vineeth T M
b328fbe31a spu-pgs: Fix array memory leak
https://bugzilla.gnome.org/show_bug.cgi?id=758517
2015-11-24 15:23:00 +00:00
Tim-Philipp Müller
01f23d88f3 audiomixer: register function name for debugging just once
Not every time aggregate is called...
2015-11-24 15:17:30 +00:00
Sebastian Dröge
8541424d34 mxfmux: Error out if we get a timeout during live mixing
We can't handle that but need complete streams without gaps.
2015-11-21 01:56:46 +05:30
Sebastian Dröge
73beb1834e mxfmpeg: Use the correct sound essence compression UL for MP3
There's one for MPEG 1 Layer 1 and one for Layer 2 and 3. We previously
had the second for Layer 1 and 2 and nothing for Layer 3, which was wrong.
2015-11-21 01:56:46 +05:30
Sebastian Dröge
adb01a23da mxfmpeg: Set the essence container UL byte 13 to 0x10 for h264
0x04 signifies a MPEG elementary stream but according to RP2008, 0x10 should
be used for a h264 byte-stream. This also fixes compatibility of our files
with ffmpeg.
2015-11-21 01:56:46 +05:30
Luis de Bethencourt
49ccb72b47 docs: update gst-launch-0.10 lines
Update references to gst-launch-0.10 to gst-launch-1.0
2015-11-19 17:25:01 +00:00
Reynaldo H. Verdejo Pinochet
86ec812429 Remove unnecessary NULL checks before g_free()
g_free() is NULL-safe
2015-11-18 16:05:42 -08:00
Olivier Crête
d673e7cd58 autoconvert: Add support for bufferlists 2015-11-16 21:53:48 -05:00
Olivier Crête
8e75bea378 autoconvert: Always give a valid reply to internal caps queries
Caps queries can always have a valid reply, either the filter or ANY.
If the caps are ANY, then accept-caps always returns TRUE.
2015-11-13 17:21:17 -05:00
Nicolas Huet
d65d8657e6 mpegtsdemux: fix section_data leak
If packet->payload_unit_start_indicator is true and pointer 0, there is no
discontinuity check. Therefore there could be a previous section not complete
that need to be cleared.

https://bugzilla.gnome.org/show_bug.cgi?id=758010
2015-11-13 09:37:53 +01:00
Luis de Bethencourt
fc23467152 tsdemux: remove memory leak
The values of channel_mapping are copied by gst_codec_utils_opus_create_caps ()
but it doesn't free or take ownership of the g_new0 allocated memory. This
needs to be freed before going out of scope.

CID 1338692
2015-11-12 12:08:15 +00:00
Luis de Bethencourt
7bec955fe0 mpegtsmux: remove unnecessary buffer check
buf surely isn't NULL inside the block conditional to a buffer size bigger
than (G_MAXUINT16 - 3). Plus gst_buffer_unref() checks if the buffer is
NULL and does nothing if it is.

CID 1338693
2015-11-12 11:42:40 +00:00
Nicolas Huet
21a025c2a1 tsdemux: fix pending buffers leak when flushing
https://bugzilla.gnome.org/show_bug.cgi?id=757895
2015-11-11 15:35:54 +01:00
Etienne Peron
a336181ef5 tsdemux: Fix pad leak when the pad is never exposed
If tsdemux never receives data for a stream, the corresponding pad will never
be added and stream->active will remain FALSE. When the stream is removed, the
pad will not be unreffed and will be leaked.

https://bugzilla.gnome.org/show_bug.cgi?id=757873
2015-11-11 15:32:30 +01:00
Sreerenj Balachandran
c3b28700d9 ivfparse: Fix the wrong width & height parsing of vp9 bitstream
The current implementation for detecting the resolution changes
on key frames is based on vp8 bitstream alignment. Avoid this
width and height parsing for vp9 bitstream, which requires proper
frame header parsing inorder to detect the resolution change (Fixme).

https://bugzilla.gnome.org/show_bug.cgi?id=757825
2015-11-11 15:30:25 +01:00
Matthew Waters
ac9a2971bd tsdemux: provide our own definition of log2()
The log2 function/macro doesn't exist when targetting android API < 18 (or MSVC
< 2013) whereas our current baseline is API 9.
2015-11-11 18:57:55 +11:00
Edward Hervey
1a1bfb19d4 dvbsuboverlay: Don't send flush events
It is up to the element handling the seek to send flush events
downstream, otherwise we end up with a situation where upstream
would get unexpected GST_FLOW_FLUSHING
2015-11-06 19:29:49 +00:00
Tim-Philipp Müller
734d5a79c5 Fix code indentation 2015-11-06 19:29:49 +00:00
Branko Subasic
4c482befbd rtponviftimestamp: use stream time for timestamp
The Onvif Streaming Specification specifies that the NTP timestamps
in the Onvif extension header indicaes the absolute UTC time associated
with the access unit. But by using running time we can not achieve that,
since a frame's running time depends on the played interval, whether a
non-flushing is done, etc. Instead we have to use the stream time.

https://bugzilla.gnome.org/show_bug.cgi?id=757688
2015-11-06 12:55:25 -05:00
Linus Svensson
6f6fe37ed9 rtponviftimestamp: Update ntp-offset and d/e-bits with a GstEvent
It is now possible to update the currently used ntp-offset with a
custom serialized downstream event. The element will read the ntp-offset
property when doing the state transition from READY to PAUSED and
use that offset until it receives a "GstNtpOffset" event, which also
has a "ntp-offset" attribute in that it's structure. In case the
property is not set and no event has been received, the element will
guess the npt-offset with help of the clock. If no clock can be
retrieved, the element will error out and stop the data flow.

The same event is also used for updating the D/E-bits in the RTP
extension header. The discont flag in a buffer can be set whenver a
live/network source looses a frame, but that is not the type of
discontinuity that the onvif extension header should reflect. The
header is mainly used for playback of a track concept, in which
gaps can be present, and it's those kind of gaps that should be
highlighted with the D- and E-bits.

https://bugzilla.gnome.org/show_bug.cgi?id=757688
2015-11-06 12:55:25 -05:00
Linus Svensson
a58826292e rtponviftimestamp: Do not rearange order of data
If a buffer or a buffer list is cached, no events serialized with the
data stream should get through. The cached buffers and events should
be purged when we stop flushing.

https://bugzilla.gnome.org/show_bug.cgi?id=757688
2015-11-06 12:55:25 -05:00
Tim-Philipp Müller
edab4deb3a glshader, tsdemux: simplify code
Jus use _delete_link() instead of _remove_link() + _free1()
2015-11-06 13:00:55 +00:00
Sebastian Dröge
ee2e082a27 tsdemux: Don't create an incomplete OpusHead but set all the other caps fields instead
OpusHead is optional, the other fields are not.

https://bugzilla.gnome.org/show_bug.cgi?id=757152
2015-11-03 20:35:41 +02:00
Sebastian Dröge
2609c394d7 tsmux: Simplify Opus caps parsing by using codecutils helpers
https://bugzilla.gnome.org/show_bug.cgi?id=757152
2015-11-03 20:35:41 +02:00
Sebastian Dröge
ecf7c7742c tsdemux/mux: Add support for GstAudioClippingMeta for Opus
https://bugzilla.gnome.org/show_bug.cgi?id=757153
2015-11-03 20:35:41 +02:00