Commit graph

6334 commits

Author SHA1 Message Date
Gwenole Beauchesne 34c2cfd4dd h264parse: improve conditions for skipping NAL units.
Carefully track cases when skipping broken or invalid NAL units is
necessary. In particular, always allow NAL units to be processed
and let that gst_h264_parse_process_nal() function decide on whether
the current NAL needs to be dropped or not.

This fixes parsing of streams with SEI NAL buffering_period() message
inserted between SPS and PPS, or SPS-Ext NAL following a traditional
SPS NAL unit, among other cases too.

Practical examples from the H.264 AVC conformance suite include
alphaconformanceG, CVSE2_Sony_B, CVSE3_Sony_H, CVSEFDFT3_Sony_E
when parsing in stream-format=byte-stream,alignment=au mode.

https://bugzilla.gnome.org/show_bug.cgi?id=732203

Signed-off-by: Gwenole Beauchesne <gwenole.beauchesne@intel.com>
2014-07-01 16:26:48 +02:00
Gwenole Beauchesne 7bb6443bfb h264parse: introduce new state tracking variables.
Improve parser state tracking by introducing new flags reflecting
it: "got-sps", "got-pps" and "got-slice". This is an addition for
robustness purposes.

Older have_sps and have_pps variables are kept because they have
a different meaning. i.e. they are used for deciding on when to
submit updated caps or not, and rather mean "have new SPS/PPS to
be submitted?"

Signed-off-by: Gwenole Beauchesne <gwenole.beauchesne@intel.com>
2014-07-01 16:26:48 +02:00
Gwenole Beauchesne 5601c87598 h264parse: fix and optimize NAL collection function.
Use gst_h264_parser_identify_nalu_unchecked() to identify the next
NAL unit. We don't want to parse the full NAL unit, but only the
header bytes and possibly the first RBSP byte for identifying the
first_mb_in_slice syntax element.

Also fix check for failure when returning from that function. The
only success condition for that is GST_H264_PARSER_OK, so use it.

https://bugzilla.gnome.org/show_bug.cgi?id=732154

Signed-off-by: Gwenole Beauchesne <gwenole.beauchesne@intel.com>
2014-07-01 16:26:48 +02:00
Sebastian Dröge d09f145ad7 intersubsrc: basesrc is already creating a pad for us, no need to do it twice 2014-06-29 22:20:51 +02:00
Sebastian Dröge fec55b42c9 yadif: basetransform is creating pads for us already, don't do it twice 2014-06-29 22:19:07 +02:00
Sebastian Dröge c15458b8cb intersubsink/src: Free channel string when finalizing the instance 2014-06-29 20:58:40 +02:00
Sebastian Dröge 78ab2cdffd vc1parse: Fix compiler warnings when compiling with G_DISABLE_ASSERT 2014-06-29 20:11:58 +02:00
Thiago Santos 256e843e30 dataurisrc: fix leak as gst_buffer_replace adds its own ref
So unref the buffer after that otherwise it leaks
2014-06-28 09:44:22 -03:00
Sebastian Dröge fae814aef8 interaudiosrc: Fail in set_caps() if the caps can't be parsed 2014-06-28 10:43:43 +02:00
Thiago Santos c5ef1bee73 audiovisualizer: fix caps leaks
Fix leak of caps event and of caps objects when setting caps on
sink and src pads
2014-06-27 17:27:25 -03:00
Gwenole Beauchesne 9bd186a960 codecparsers: h264: fix memory leak in GstH264PPS.
The gst_h264_parse_pps() function dynamically allocates the slice
group ids map array, so that needs to be cleared before parsing a
new PPS NAL unit again, or when it is no longer needed.

Likewise, a clean copy to the internal NAL parser state needs to be
performed so that to avoid a double-free corruption.

https://bugzilla.gnome.org/show_bug.cgi?id=707282

Signed-off-by: Gwenole Beauchesne <gwenole.beauchesne@intel.com>
2014-06-27 14:00:10 +02:00
Aurélien Zanelli 67df207280 codecparsers: h264: add support for Recovery Point SEI message.
The recovery point SEI message helps a decoder in determining if the
decoding process would produce acceptable pictures for display after
the decoder initiates random access or after the encoder indicates
a broken link in the coded video sequence.

This is not used in the h264parse element, but it could help debugging.

https://bugzilla.gnome.org/show_bug.cgi?id=723380
2014-06-26 17:22:26 +02:00
Edward Hervey 22dfd9aef3 mpegts: Unify API : GstMpegts / gst_mpegts_ / GST_*_MPEGTS_
It was previously a mix and match of both variants, introducing just too much
confusion.

The prefix are from now on:
* GstMpegts for structures and type names (and not GstMpegTs)
* gst_mpegts_ for functions (and not gst_mpeg_ts_)
* GST_MPEGTS_ for enums/flags (and not GST_MPEG_TS_)
* GST_TYPE_MPEGTS_ for types (and not GST_TYPE_MPEG_TS_)

The rationale for chosing that is:
* the namespace is shorter/direct (it's mpegts, not mpeg_ts nor mpeg-ts)
* the namespace is one word under Gst
* it's shorter (yah)
2014-06-25 14:50:05 +02:00
Stefan Ringel 7c884374eb mpegts: change to GType and from gchar[] to gchar*
https://bugzilla.gnome.org/show_bug.cgi?id=730914
2014-06-24 16:06:01 +02:00
Edward Hervey aaee4dc23b all: Don't declare variables in 'for' loops 2014-06-24 14:51:32 +02:00
Edward Hervey 48006e2136 compositor: Fix Makefile CFLAGS/LIBADD ordering
We want to use the libraries from -bad if/when present
2014-06-24 08:01:21 +02:00
Chris Bass d9d4a91c62 h265parse: fix hvcC size check
In ISO/IEC 14496-15, the minimum size of a HEVCDecoderConfigurationRecord
(i.e., the contents of a hvcC box) is 23 bytes. However, the code in h265parse
checks that the size of this data is not less than 28 bytes, and it refuses to
accept caps if the check fails. The result is that standards-conformant streams
that don't carry any parameter sets in their hvcC boxes won't play.

https://bugzilla.gnome.org//show_bug.cgi?id=731783
2014-06-22 21:57:28 +01:00
Sebastian Dröge 6d3d06c91f Release 1.3.3 2014-06-22 19:22:28 +02:00
Sebastian Dröge ae99043506 rawparse: Use the pad passed to us directly for default event handling 2014-06-22 14:21:35 +02:00
Justin Joy 9bd4a1b2e0 rawparse: default query should be forward on target pad
https://bugzilla.gnome.org/show_bug.cgi?id=731899
2014-06-22 14:21:35 +02:00
Tim-Philipp Müller 983eb6d28a tsdemux: fix up comment 2014-06-22 12:32:35 +01:00
Sebastian Dröge 59bdcd9ae3 tsdemux: Update comments to the new reality and remove unused variables 2014-06-21 16:55:05 +02:00
Mathieu Duponchelle 11fa711c34 compositor: Add a new compositor based on the new GstVideoAggregator base class
It is a replacement for videomixer with a similare API

Co-Authored by: Thibault Saunier <tsaunier@gnome.org>

https://bugzilla.gnome.org/show_bug.cgi?id=731919
2014-06-20 19:53:33 +02:00
Tim-Philipp Müller 7a6183802d pnm: link against libgstbase for GstAdapter
https://bugzilla.gnome.org/show_bug.cgi?id=730523
2014-06-18 10:13:10 +01:00
Sanjay NM ed1a664171 pnmdec: Added PBM Support
https://bugzilla.gnome.org/show_bug.cgi?id=730523
2014-06-17 09:19:07 -03:00
Sanjay NM 310fe9f780 pnmdec: use GstVideoDecoder Class
https://bugzilla.gnome.org/show_bug.cgi?id=731400
2014-06-16 14:07:34 -03:00
Edward Hervey 1d1d469488 tsdemux: Don't overwrite original seek value
In accurate mode, we'll be using start to fill in the seek segment,
therefore don't overwrite it with the shifted seek position.

https://bugzilla.gnome.org/show_bug.cgi?id=731698
2014-06-16 07:42:37 +02:00
Edward Hervey 97b3382c80 mpegtspacketizer: live: handle pcr/dts discrepancies some more
When wrapover/reset occur, we end up with a small window of time where
the PTS/DTS will still be using the previous/next time-range.

In order not to return bogus values, return GST_CLOCK_TIME_NONE if the
PTS/DTS value to convert differs by more than 15s against the last seen
PCR

https://bugzilla.gnome.org/show_bug.cgi?id=674536
2014-06-13 11:52:15 +02:00
Edward Hervey fdf9bdf929 mpegtspacketizer: Fix wraparound detection issue
Using 32bit unsigned values for corrected pcr/offset meant that we
potentially ended up in bogus values

Furthermore, refpcr - refpcroffset could end up being negative, which
PCRTIME_TO_GSTTIME() can't handle (and returned a massive positive value)
2014-06-13 11:48:39 +02:00
Mathieu Duponchelle 79c13b713e tsdemux: implement proper seeking for h264 streams.
Co-Authored by: Thibault Saunier <tsaunier@gnome.org>

From a high level perspective, the new process for seeking h264
streams is as follows:

1) Rewind the stream until we find the first I-slice of a frame,
   and mark its offset in the stream.
2) Rewind the stream until we find SPS and PPS informations,
   to make sure the subsequent parser is up to date.
3) Accumulate optionnal SEI NAL units on the way.
4) Push the SPS, PPS and SEI units before the new keyframe.

https://bugzilla.gnome.org/show_bug.cgi?id=675132
2014-06-12 14:44:10 +02:00
Vincent Penquerc'h 174fc1015e aiffparse: bail out early when bytes per sample is not set
This should always be set for valid files when we get there,
and checking this avoids having ad hoc checks further down
in several places.

Coverity 1139698
2014-06-12 10:00:55 +01:00
Edward Hervey 6be887783e mpegtspacketizer: Use first group for handling reference pcr
If _set_current_pcr_offset gets called after a flushing seek, we ended
up using the current group for delta calculation ... whereas we should
be using the first group to calculate shifts.

Also add an early exit if there are no changes to apply
2014-06-11 09:41:50 +02:00
Edward Hervey 0020a9344d tsdemux: Remove unused variable
The seeksegment was no longer used since the switch to calculating segments
when we see data.
2014-06-10 14:50:10 +02:00
Edward Hervey 6043f7a578 mpegtspacketizer: Fix debug statement 2014-06-10 14:27:53 +02:00
Edward Hervey 8e28f335f4 mpegtspacketizer: Fix duration evaluation in push mode
When working in push mode, we need to be able to evaluate the duration
based on a single group of observations.

To do that we use the current group values
2014-06-10 14:27:01 +02:00
Edward Hervey a822517ca9 mpegtspacketizer: Handle early PTS conversion
When handling the PTS/DTS conversion in new groups, there's a possibility
that the PTS might be smaller than the first PCR value observed, due to
re-ordering.

When using the current group, only apply the wraparound correction when we
are certain it is one (i.e. differs by more than a second) and not when it's
just a small difference (like out-of-order PTS).

https://bugzilla.gnome.org/show_bug.cgi?id=731088
2014-06-10 13:29:28 +02:00
Tim-Philipp Müller c60f4ecd11 gdp: don't print already-freed string
CID 1221987
2014-06-09 10:10:01 +01:00
Edward Hervey 38cb5e00fe speed: Fix position query some more
Forgot to remove code in 16fd917632

CID #1139677
2014-06-09 10:57:32 +02:00
Edward Hervey a2890e831b mpegtsdemux: Fix sticky event handling
When we receive sticky events from upstream, always return TRUE.

Fixes the issue where we receive custom sticky events (such as "uri")
and no pads are created yet.
2014-06-07 07:15:33 +02:00
Jan Schmidt 9538651a20 tsdemux: Remove extraneous extra parameter from check_pending_buffers function 2014-06-04 21:56:28 +10:00
Jan Schmidt a86b3d032c mpegtspacketiser: Always initialise packet AFC flags and PCR fields
Also fix a slight typo in a comment about the smoothing algorithm
2014-06-04 21:56:00 +10:00
Jan Schmidt 842c4a3d2c tsdemux: Reset pending_ts on a discont, to re-measure initial timestamps
Since all the other timestamp tracking now gets reset on a discont,
it makes sense to wait for a PCR and timestamp buffers like when
playback first starts
2014-06-04 21:54:43 +10:00
Michael Olbrich c9ae275c72 liveadder: handle gap buffer flag
Remove GAP flag unless both sides have gap data, ignore
incoming data if it is gap data.

https://bugzilla.gnome.org/show_bug.cgi?id=722397
2014-06-03 14:59:30 -04:00
Olivier Crête 037f277566 gdp: Fail gracefully if event can't be parsed
https://bugzilla.gnome.org/show_bug.cgi?id=731093
2014-06-02 21:44:00 -04:00
Edward Hervey 16fd917632 speed: make position query able to convert bytes to time
(same as 744c58d71b but for the
position query)

It was only querying in time, but then trying to use dead bytes
to time conversion code.

Coverity 1139677
2014-06-02 10:11:58 +02:00
Edward Hervey e7a0d7d0ed mpegdemux: avoid crashing in pathological case
(Identical to commit 612cdeec80 which
was for resindvd)

When we'd see an unknown stream type, then a SDDS stream.
Then we'd get to the end of the switch with a NULL temp stream
pointer, and dereference it.

Coverity 1139708
2014-06-02 09:42:33 +02:00
Thiago Santos 0ae4bc74ba camerabin: fix structure handling in preview message
Avoid trying to modify the message structure as it isn't mutable.
Use a copy and post a new message if necessary.

Fixes failing tests.
2014-05-30 02:10:45 -03:00
Thiago Santos 32d8022820 tsbase: parse the mgt and add listed EIT/ETT pids to the known psi
This will make tsbase also parse the EITs and ETTs from ATSC streams that have
their pids reported on the MGT and post to the bus

https://bugzilla.gnome.org/show_bug.cgi?id=730435
2014-05-29 10:37:59 +02:00
Thiago Santos c56a4d54b8 tsdemux: add/remove pads to flowcombiner differently due to streaming nature
Due to mpegts streaming nature some pads are created but are only added
later to the element. This can cause a scenario where the first stream
doesn't have an available decoder (while the next ones still pending
would have) and tsdemux will fail with not-linked as the first stream
added wouldn't be linked.

To avoid this tsdemux needs to add pads to the flowcombiner
when they are created instead of only when adding them to the
element.
2014-05-27 10:29:32 -03:00
Thiago Santos b8d87c11ab mxfdemux: remove unread last_flow variable
it isn't necessary anymore and is already unused
2014-05-27 07:42:46 -03:00
Sebastian Dröge a3489ffa83 mxfdemux: Compare positions to find the earliest pad, not flow returns 2014-05-27 12:24:43 +02:00
Thiago Santos ae839d8dc2 mxfdemux: use GstFlowCombiner
Removes flow return combination code to use the newly added GstFlowCombiner

https://bugzilla.gnome.org/show_bug.cgi?id=709224
2014-05-26 23:29:43 -03:00
Thiago Santos 6dc571b5cf mpegdemux: use GstFlowCombiner
Removes flow return combination code to use the newly added GstFlowCombiner

https://bugzilla.gnome.org/show_bug.cgi?id=709224
2014-05-26 23:29:43 -03:00
Thiago Santos b66012a586 tsdemux: use GstFlowCombiner
Removes flow return combination code to use the newly added GstFlowCombiner
2014-05-26 23:29:43 -03:00
Aurélien Zanelli 2c3e7b6352 h264parse: use new gst_h264_video_calculate_framerate() to get framerate
https://bugzilla.gnome.org/show_bug.cgi?id=723352
2014-05-22 16:12:36 +02:00
Aurélien Zanelli a9dfa354f6 h264parse: set field_pic_flag when parsing a slice header
field_pic_flag was used but never set to other value than its default

https://bugzilla.gnome.org/show_bug.cgi?id=730363
2014-05-22 15:54:04 +02:00
Sebastian Dröge 46016ccd14 Release 1.3.2 2014-05-21 13:06:35 +02:00
Wim Taymans d80630f011 bayer: fix unused variable 2014-05-20 11:42:35 +02:00
Sebastian Dröge 5fc8820d8c freeverb: Don't pass floats to abs() but instead cast them to ints first
gstfreeverb.c:781:29: error: using integer absolute value function 'abs' when
      argument is of floating point type [-Werror,-Wabsolute-value]
    if (abs (out_l2) > 0 || abs (out_r2) > 0)
2014-05-19 11:34:42 +02:00
Tim-Philipp Müller f8d63c5ad9 mxfdemux: post error message when erroring out on unsupported essence wrapping 2014-05-14 00:25:09 +01:00
Edward Hervey 1b5e514a05 mpegtbase: Small rewrite
Setting done was useless anyway
2014-05-13 13:54:23 +02:00
Edward Hervey 93ef3f9b24 vmndec: Don't leak output state
_set_output_state returns a reference to the codec state.

CID #1212170
2014-05-13 11:38:44 +02:00
Edward Hervey bc918d1466 sdpdemux: Don't leak adapter data
CID #1212158
2014-05-13 11:35:46 +02:00
Edward Hervey 2495f700bd mpegpsmux; Fix stream leak
CID #1212164
2014-05-13 11:30:35 +02:00
Edward Hervey 1d01afc166 jp2kdecimator: Don't leak various slices and arrays
CID #1212139
CID #1212140
CID #1212141
2014-05-13 11:28:00 +02:00
Edward Hervey 6baeb94dce asfmux: Don't leak bytereader
By making it go through the error path that takes care of cleanups

CID #1212168
2014-05-13 11:19:24 +02:00
Sebastian Dröge 066cf18336 dvbsuboverlay: Do not try to add a feature to a caps features ANY
It does not makes sense and asserts.

Based on 7f9aac386f from gst-plugins-base.
2014-05-11 07:56:50 +02:00
Tim-Philipp Müller ab3153b9a2 tsdemux: remove confusing debug log line 2014-05-10 12:56:24 +01:00
Olivier Crête 1660538615 autoconvert: factories don't need the lock
An atomic is enough, they can only be set once.
2014-05-09 23:05:28 -04:00
Olivier Crête c47c26bf1f Revert "autoconvert: Handle caps query on internal srcpad"
This is not needed anymore if the gst_pad_link checks nothing.

This reverts commit a303375a3f.
2014-05-09 23:04:26 -04:00
Olivier Crête c0ff27959e autoconvert: No need to check anything when linking internal pads 2014-05-09 23:03:48 -04:00
Olivier Crête 4ccf7582a2 autoconvert: Don't ignore elements accepted ANY, it is valid 2014-05-09 23:03:43 -04:00
Olivier Crête f3f6cdd451 autoconvert: Remove broken usage of the iterator
We're a subclass, so we can just take the object lock and iterate the list
directly.
2014-05-09 23:03:36 -04:00
Olivier Crête 907ffc7352 autoconvert: Process upstream getcaps
Process it like downstream getcaps
2014-05-09 23:03:29 -04:00
Olivier Crête b852f13a54 autoconvert: Return the GList of factories, to a pointer to it. 2014-05-09 23:02:28 -04:00
Olivier Crête 9eeef09c80 autoconvert: subelement can only be change with stream lock held
It was already the case, now be more explicit about that, and remove useless
lock/ref/unlock/unref dances.
2014-05-09 23:02:23 -04:00
Olivier Crête 606ff3debd autoconvert: Keep a ref to the pads too
Simplifies the code
2014-05-09 23:02:16 -04:00
Olivier Crête 968b4a4969 autoconvert: Remove uneeded if()
NULL is valid GList
2014-05-09 23:02:12 -04:00
Olivier Crête b76e564acf autoconvert: Always push reconfigure upstream too
A reconfigure could trigger a change of contents instead of just reconfiguring the internal element
2014-05-09 23:02:09 -04:00
Olivier Crête ead6db4277 autoconvert: Remove unused internal parameter 2014-05-09 23:02:05 -04:00
Luis de Bethencourt bf1997fe89 pnmenc: remove empty line
Remove trailing empty line from commit bfdc543952

https://bugzilla.gnome.org/show_bug.cgi?id=729614
2014-05-06 10:00:28 -04:00
Jesper Larsen f9a4d559eb mpegtsmux: Remove unused data in TsMuxSection
https://bugzilla.gnome.org/show_bug.cgi?id=721685
2014-05-06 14:10:06 +02:00
Tim-Philipp Müller e807ac077d pnmenc: fix flow return and buffer leak in not-negotiated case
https://bugzilla.gnome.org/show_bug.cgi?id=729614
2014-05-06 09:48:58 +01:00
Sanjay NM bfdc543952 Fix for not checking zero width and height
Signed-off-by: Sanjay NM <sanjay.nm@samsung.com>

https://bugzilla.gnome.org/show_bug.cgi?id=729614
2014-05-06 00:27:49 -04:00
Sebastian Dröge b2ce00c55d Release 1.3.1 2014-05-03 19:57:57 +02:00
Per x Johansson 6a7315c382 watchdog: Add handling of PAUSED state
Also allow disabling the timeout by setting it to 0.

https://bugzilla.gnome.org/show_bug.cgi?id=726156
2014-05-03 09:50:59 +02:00
Blake Tregre a73a42b10f rfbsrc: Send stream-start event in the beginning
https://bugzilla.gnome.org/show_bug.cgi?id=726802
2014-05-02 14:20:58 +02:00
Haakon Sporsheim (ieei) 36a2acae45 h264parse: unref/replace force_key_unit_event in gst_h264_parse_reset
https://bugzilla.gnome.org/show_bug.cgi?id=729200
2014-04-29 12:17:51 -03:00
Tim-Philipp Müller dbe6fdd6bf docs: remove outdated and pointless 'Last reviewed' lines from docs
They are very confusing for people, and more often than not
also just not very accurate. Seeing 'last reviewed: 2005' in
your docs is not very confidence-inspiring. Let's just remove
those comments.
2014-04-27 00:36:32 +01:00
Sebastian Dröge dec5de073d mpegtsmux: Only require alignment and stream-format for h264, parsed is implicit 2014-04-25 17:40:56 +02:00
Edward Hervey f982feb1d9 mpegpsdemux: Flush program end code bytes
This should not harm regular files, since those are the last 4 bytes of
a normal file.

This allows to handle playback of concatenated mpeg-ps files. Seeking and
duration reporting is still wrong though.
2014-04-23 10:46:20 +02:00
Sebastian Dröge 516597d5fa mpegtspacketizer: Remove dead code and simplify if statement
CID 1204274
2014-04-22 12:56:54 +02:00
Vincent Penquerc'h 60d7e45cab mxf: fix MP2 case
Testing mpegversion when mpegaudioversion was likely meant.

Similar tests in sys/androidmedia/gstamcaudiodec.c also test
mpegaudioversion with the same conditional code.

Coverity 206071
2014-04-21 13:23:46 +01:00
Vincent Penquerc'h 7659f3bec4 vc1parse: guard against dividing by zero
If framerate is unknown, we write the maximum framerate
allowed for this profile/level:

https://tools.ietf.org/html/draft-ietf-avt-rtp-vc1-06#section-6.1
http://wiki.multimedia.cx/index.php?title=VC-1#Setup_Data_.2F_Sequence_Layer

Coverity 1139694
2014-04-21 13:23:46 +01:00
Vincent Penquerc'h d111287995 mxfmux: guard against dividing by 0
Use a placeholder value in that case, it's better than crashing.

Coverity 1139697
2014-04-21 13:23:46 +01:00
Vincent Penquerc'h 52981d5a4a mxfdemux: guard against NULL non source components
This component is dereferenced, and later code checking for
NULL in particular cases implies it can be NULL. This likely
does not fix the coverity warning as it was seeing another
path setting component to NULL explicitely, but this was
spotted by looking at:

Coverity 1139736

Which is actually OK from what I can see since the actual
dereference of the explicit NULL pointer will not happen
if the condition that led to the NULL pointer assignment
is met, since the assignment and defeference have mutually
exclusive tests.
2014-04-21 09:24:00 +01:00
Vincent Penquerc'h 9815faea9b rawparse: catch errors in caps manipulation
Coverity 1139622
2014-04-21 09:24:00 +01:00
Gwenole Beauchesne abadffd4d8 ivfparse: detect and propagate resolution changes.
Detect resolution changes on key frames, and propagate the resulting
caps to the src pad. Only the uncompressed data chunk is decoded, so
avoid using the new VP8 bitstream parsing library for now.

Signed-off-by: Gwenole Beauchesne <gwenole.beauchesne@intel.com>
2014-04-18 18:31:15 +02:00
Gwenole Beauchesne 3b308cba3c ivfparse: avoid possible division-by-zero when calculating PTS.
Avoid possible division-by-zero while deriving the presentation timestamp
of the buffer. The base class will take care of any interpolation needs.

Signed-off-by: Gwenole Beauchesne <gwenole.beauchesne@intel.com>
2014-04-18 18:31:15 +02:00
Gwenole Beauchesne 3d0ce67fcd ivfparse: port to baseparse.
https://bugzilla.gnome.org/show_bug.cgi?id=710855

Signed-off-by: Gwenole Beauchesne <gwenole.beauchesne@intel.com>
2014-04-18 18:31:15 +02:00
Edward Hervey f062b78051 mpegtspacketizer: Improve ts_to_offset code
* Search in current pending values first. For CBR streams we can very
  easily end up having just one initial observations and then nothing
  else (since the bitrate doesn't change).
* Use one group whether we are in that group *OR* if there is only
  one group.
* If the group to use isn't closed (points are being accumulated in the
  PCROffsetCurrent), use the latest data available for calculation
* If in the unlikelyness that all of this *still* didn't produce more
  than one data point, just return the initial offset
2014-04-18 16:23:43 +02:00
Edward Hervey f96604099d tsdemux: Fix scaling macros
While the calculation done in these macros will work with 64bit
integers, they will fail if working with 32bit integers.

Force the scaling up to solve that.

This amazingly didn't introduce major issues up to now, but resulted
in bogus values in debug logs.
2014-04-18 16:20:31 +02:00
Edward Hervey da74a23c1d mpegtsbase: Don't hard-flush the packetizer on discont buffers
Doing a hard flush on the packetizer will drop all observations, which
will eventually break push-based seeking (with BYTES segment) since
we won't know where to seek to anymore (new data would always be
considered as the beginning of the stream).
2014-04-18 16:18:01 +02:00
Edward Hervey 3d6265a9f5 mxfdemux: Fix copy/paste error
We want to check whether the rate is different. We check changes in
numerator *and* denominator.

CID #1139631
CID #1139642
2014-04-16 16:25:29 +02:00
Edward Hervey be859d02a6 mxf: Handle fraction parsing failure
And properly cleanup/reset the segment before returning on errors

CID #206012
2014-04-16 16:19:47 +02:00
Edward Hervey fa72b4c870 mxf: Remove useless check
a guint will always smaller or equal to the maximum value it can
contain

CID #206049
2014-04-16 16:12:02 +02:00
Vincent Penquerc'h 172c398127 mxf: avoid dereferencing NULL mapping data pointer
Also unref buffers on error, as it seems to be done in one, but
not all, error paths.

The NULL pointer part is Coverity 206112

https://bugzilla.gnome.org/show_bug.cgi?id=727889
2014-04-16 16:08:38 +02:00
Andoni Morales Alastruey 78acb90a80 jp2kdecimator: fix maybe-uninitialized compiler error 2014-04-11 12:29:17 +02:00
Edward Hervey 998e19896b mpegtsmux: Remove unneeded unref
packet_buffer has already been cleared in all code paths leading
to this point.

CID #1199696
2014-04-11 11:34:26 +02:00
Santiago Carot-Nemesio 7d97a4b20b liveadder: fix memory leak querying sink caps
https://bugzilla.gnome.org/show_bug.cgi?id=727894
2014-04-10 01:22:33 +01:00
Vincent Penquerc'h 931150cb91 Revert "tsmux: catch alloc failure"
Turns out glib aborts on allocation failure, so this is pointless.
We'll just ignore Coverity warnings on such constructs.

This reverts commit d347809a82.
2014-04-09 16:01:43 +01:00
Vincent Penquerc'h 747542762e asfmux: remove unnecessary test
We've been dereferencing that object like there's no tomorrow
in the code just before that.

Coverity 206369
2014-04-09 15:41:11 +01:00
Vincent Penquerc'h c6a9c1d878 asfmux: remove stray gst_buffer_unmap on error path
A previous commit removed the map, and the unmap on the main
code path, but not the one on the error path.

Coverity 1139930
2014-04-09 15:39:33 +01:00
Vincent Penquerc'h 336767d779 autoconvert: remove dead code
Those events were previously taken from a cached events list,
which was removed during the port to 0.11, but this bit stayed.

Coverity 1139684
2014-04-09 15:28:05 +01:00
Vincent Penquerc'h c3a2e0ad97 camerabin2: remove unneeded check
A message may not be NULL in the message handling function
(and nothing there sets it to NULL).

Coverity 1139848
2014-04-09 15:24:13 +01:00
Vincent Penquerc'h 75c09f8d03 compare: special case empty regions with 1 SSIM to avoid dividing by 0
Coverity 1139689, 1139688
2014-04-09 15:21:20 +01:00
Vincent Penquerc'h 93b1504945 inter: remove dead code
Coverity 1139666
2014-04-09 15:09:25 +01:00
Vincent Penquerc'h c5cb2fbe96 liveadder: remove dead code
From the 0.11 port

Coverity 1139676
2014-04-09 15:03:45 +01:00
Vincent Penquerc'h f255422ec2 mpegtsdemux: catch prev-not-found when inserting in the group list
While this probably should never happen if callers are well behaved,
this avoids a crash if it does. With a warning about it. Unsure if
it'd be better to not add at all, but it should not happen...

Coverity 1139713
2014-04-09 14:13:46 +01:00
Vincent Penquerc'h d47727c032 mpegtsmux: guard against _dispose being called mutiple times
_dispose calls _reset, so we need to make sure _reset handles
already NULLed fields.

Coverity 1139843
2014-04-09 13:53:13 +01:00
Vincent Penquerc'h d6dc066527 tsmux: prevent possible double free on error path
Spotted while looking at a Coverity issue in the area.
2014-04-09 13:44:59 +01:00
Vincent Penquerc'h d347809a82 tsmux: catch alloc failure
While it will probably not trigger, it should silence a Coverity
warning about the fail code path testing for NULLness before
freeing, where the buffer was already dereferenced. It seems
safest to keep that test, in case future goto fail statements
happen to have a NULL buffer there.

Coverity 1139851
2014-04-09 13:44:45 +01:00
Vincent Penquerc'h 744c58d71b speed: make duration query able to convert bytes to time
It was only querying in time, but then trying to use dead bytes
to time conversion code.

Coverity 1139677
2014-04-09 11:15:10 +01:00
Mohammed Sameer 0450e8f53f camerabin: add any feature to viewfinderbin static pad template
https://bugzilla.gnome.org/show_bug.cgi?id=727857
2014-04-09 08:56:01 +02:00
Mohammed Sameer b261374462 camerabin: report an error if we fail to link vfsrc and viewfinder queue
https://bugzilla.gnome.org/show_bug.cgi?id=727855
2014-04-09 08:54:07 +02:00
Tim-Philipp Müller 39dc1f0ebb mxfdemux: guard against NULL material track
Just to be on the safe side.
2014-04-08 16:53:41 +01:00
Jan Schmidt 982104d764 dvbsuboverlay: Avoid infinite loops on short data 2014-04-09 01:10:21 +10:00
Tim-Philipp Müller 6e764e5b11 mxfdemux: implement simple KEY_UNIT seeking
If a KEY_UNIT seek was requested, adjust segment
start to position of the key frame.
2014-04-08 14:37:34 +01:00
Tim-Philipp Müller 4898a51afe mxfdemux: fix seeking, send data starting from a key unit
Fixes multiple seeking issues. When doing ACCURATE or normal
non-KEYUNIT seeks, mxfdemux would just send data from the
edit unit that covered the seek position, whether that's
a keyframe or not. Decoders would only output things from
the next keyframe then, which means there's a gap between
the start of the segment and the first decoded data in
some cases. In combination with gst-editing-services this
might result in a frozen picture for the duration of that
gap at the beginning (if videorate fixes up the first
buffer's start timestamp to cover the entire gap), or
a black frame (if no videorate is used and videomixer
fills the gap). Also fixes A/V sync issue when requesting
a KEYUNIT seek.
2014-04-08 13:26:49 +01:00
Vincent Penquerc'h ff11934bbf festival: fix fd leak
Coverity 1139831
2014-04-08 12:20:40 +01:00
Edward Hervey 2b5d043654 speed: Clarify passthrough in switch statement
We do want the caps event to be forwarded downstream

CID #1139754
2014-04-08 11:26:38 +02:00
Edward Hervey 0ae5c15bf8 mpegtsmux: Initialize helper mpegts library
We now use that library, we need to initialize it so that debug
categories (amongst other things) get properly initialized
2014-04-08 07:47:15 +02:00
Vincent Penquerc'h 8e580ea6f1 mxf: fix stop date parsing using the wrong input
Coverity 1139645
2014-04-07 13:54:50 +01:00
Vincent Penquerc'h f06e18595a jp2kdecimator: fix copy/paste errors in expressions
Correct formulae found in ITU T.800, B.12.1.[345]

Coverity 1139649, 1139650, 1139651
2014-04-07 13:54:47 +01:00
Sebastian Dröge 22b6ec3b2f mpegtsmux: Require parsed/framed input for most of the supported formats
https://bugzilla.gnome.org/show_bug.cgi?id=719519
2014-04-02 23:49:37 +02:00
Sebastian Dröge 7b2cfa6303 mpegtspacketizer: Fix typo in debug output 2014-03-29 10:33:45 +01:00
Sebastian Dröge 10ffa089a0 h264parse: Copy over DISCONT flag from input buffers 2014-03-29 10:33:45 +01:00
Sebastian Dröge 986c8782e4 tsdemux: Push next buffer after a discont with the DISCONT flag 2014-03-29 10:33:45 +01:00
Sebastian Dröge 264d7dbd89 tsdemux: Drain remaining data on disconts 2014-03-29 10:33:45 +01:00
Sebastian Dröge d986d24d41 mpegtsbase: Flush if we receive a discont buffer 2014-03-29 10:33:45 +01:00
Sebastian Dröge 11bc356ce7 tsdemux: Don't dereference NULL if flushed before a program was selected 2014-03-29 10:33:45 +01:00
Sebastian Dröge ba114b6b22 tsdemux: Ensure that all pending data is pushed even if the stream was not activated before
gst_ts_demux_push_pending_data() will check if it now can activate the
stream and add the pad, we don't have to check that ourselves.

Fixes playback of very short MPEG TS files.
2014-03-29 10:33:45 +01:00
Sebastian Dröge 0cecb44813 mpegtsbase: Fix pull mode scanning for PCR on small files
If a file does not contain 5 PCRs until it is EOS, or does not
contain more than 655360 bytes the PCR scanning algorithm just
aborted.
2014-03-29 10:33:45 +01:00
Jan Schmidt d232881105 dvbsuboverlay: Clarify confusing debug message
The message is describing the number of bytes remaining for
parsing, not 'missing'.
2014-03-25 21:40:11 +11:00
Jan Schmidt bfe2994101 tsdemux: Fix mpegts_packetizer_set_current_pcr_offset()
When adjusting the PCR offset of groups, adjust the correct group
entry from the list - not the current group repeatedly.
2014-03-25 21:40:11 +11:00
Jan Schmidt a99164811c dvbsuboverlay: Remove warning for 2-bit and 8-bit subpictures
Both 2-bit and 8-bit mode now seem fine, so remove the warning
messages about them
2014-03-25 21:40:11 +11:00
Jan Schmidt 0a19be4464 dvbsuboverlay: Fix 8-bit subpicture rendering.
Fix 2 small flaws handling 8-bit subpictures that makes
my one test file work.
2014-03-25 21:40:10 +11:00
Edward Hervey 7b15072714 dvbsuboverlay: Don't forward text gap events downstream
That gap is only for the subtitle stream and not for the video stream.
2014-03-18 15:18:38 +01:00
Matthieu Bouron 19724f6ece dvbsuboverlay: handle video/x-raw(ANY) if downstream supports the GstVideoOverlayCompositionMeta API
https://bugzilla.gnome.org/show_bug.cgi?id=726463
2014-03-16 18:00:53 +01:00
Matthew Waters 4bdf5f336a move gl elements to ext subdirectory 2014-03-16 11:23:16 +01:00