Commit graph

6963 commits

Author SHA1 Message Date
Jan Schmidt de568c4896 Revert "dvdspu: cache overlay composition"
This reverts commit aabb8a1a68.
2015-09-27 00:24:17 +10:00
Jan Schmidt 259a7bbf6c Revert "dvdspu: improve negotiation of overlay composition"
This reverts commit 1899e2a099.
2015-09-27 00:24:15 +10:00
Arnaud Vrac 7a7f358e6d dvdspu: fix pgs palette colors
U and V were inverted

https://bugzilla.gnome.org/show_bug.cgi?id=755239
2015-09-26 23:29:55 +10:00
Arnaud Vrac 1899e2a099 dvdspu: improve negotiation of overlay composition
Support negotiating GstVideoOverlayComposition downstream
while not providing it upstream.

https://bugzilla.gnome.org/show_bug.cgi?id=663750
2015-09-26 23:29:15 +10:00
Arnaud Vrac aabb8a1a68 dvdspu: cache overlay composition
This avoids rendering the overlay buffer for each video frame.

https://bugzilla.gnome.org/show_bug.cgi?id=663750
2015-09-26 23:22:44 +10:00
Arnaud Vrac 46aaaa6c30 dvdspu: handle frame size event from upstream
An IDX file or codec_data normally contains the original frame size of
the video. Allow upstream to provide this information by sending a
custom event, which will allow scaling the overlay correctly.

https://bugzilla.gnome.org/show_bug.cgi?id=663750
2015-09-26 23:18:38 +10:00
Arnaud Vrac a41e7c5bec dvdspu: allow suffix in dvd event name to allow multiple sticky dvd events
https://bugzilla.gnome.org/show_bug.cgi?id=663750
2015-09-26 23:18:32 +10:00
Arnaud Vrac dd3e9deb2a dvdspu: render to ARGB overlay instead of AYUV
https://bugzilla.gnome.org/show_bug.cgi?id=663750
2015-09-26 23:17:58 +10:00
Arnaud Vrac 5016a73190 dvdspu: render to AYUV overlay
Instead of only supporting writing SPU data directly to YUV frames,
render the SPU data to an intermediate AYUV overlay buffer. The overlay
data is then attached to the video frame if downstream supports overlay
composition, otherwise the AYUV overlay is blended to the video frame.

For the PGS format, the overlay buffer size is set to the size of the
Composition Window, and its position in the overlay composition is set
to the window position. The objects to render are now cropped when the
cropping flag is set.

For the Vobsub format, the overlay buffer size is set to the size of the
Display Area.

Once rendered, the overlay composition rectangle is now moved and scaled
to fit the video output size, to avoid clipping.

https://bugzilla.gnome.org/show_bug.cgi?id=663750
2015-09-26 23:17:03 +10:00
Arnaud Vrac 35e6d79d40 dvdspu: pass dvdspu argument to set_caps functions
https://bugzilla.gnome.org/show_bug.cgi?id=663750
2015-09-26 23:16:51 +10:00
Arnaud Vrac 344fe03f09 dvdspu: skip unneeded reading of RLE data
The RLE data was being read for dumping the SPU image even when the
DUMP_FULL_IMAGE macro was not set.

https://bugzilla.gnome.org/show_bug.cgi?id=663750
2015-09-26 23:16:37 +10:00
Tim-Philipp Müller fccee018f3 audiomixer: fix deadlock when G_DISABLE_ASSERT is not defined
This makes the audiomixer unit test time out in master.
Broke with 587e7c4
2015-09-26 10:21:41 +01:00
Sebastian Dröge bed2c6820f audioaggregator: Stop using deprecated gst_segment_to_position() 2015-09-26 00:17:55 +02:00
Sebastian Dröge 3c44d3eca4 audioaggregator: Only skip the remaining part of a GAP buffer
We might've queued up a GAP buffer that is only partially inside the current
output buffer (i.e. we received it too late!). In that case we should only
skip the part of the GAP buffer that is inside the current output buffer, not
also the remaining part. Otherwise we forward this pad too far into the future
and break synchronization.
2015-09-18 18:00:05 +02:00
Tim-Philipp Müller fade5a6d8a dvdspu: pgs: fix printf format/argument mismatch in debug statements
Fixes compiler warnings when extra debugging is enabled at compile time.
2015-09-17 19:57:16 +01:00
Jan Schmidt e990e75e1e pcapparse: Hook up the recently added change_state vfunc.
The state change function was implemented, but not installed,
making the compiler complain about the unused function.
2015-09-18 00:29:51 +10:00
Jan Schmidt 587e7c4a23 Don't throw compiler warnings with G_DISABLE_ASSERT
Disable code that warns about unused variables when G_DISABLE_ASSERT
is defined, as it is in tarballs and pre-releases.
2015-09-18 00:29:51 +10:00
Tim-Philipp Müller 0cb160a685 intervideosink: render preroll frames as well
Derive from GstVideoSink so that preroll frames will automatically
get rendered too, unless the show-preroll-frame property is set to
FALSE. Fixes intervideosrc only picking up frames if intervideosink
is in PLAYING state.

https://bugzilla.gnome.org/show_bug.cgi?id=755049
2015-09-16 17:20:52 +01:00
Jan Schmidt 86a8ff50c0 dvbsuboverlay: Check if downstream supports GstVideoOverlayComposition.
Fix the negotiation of GstVideoOverlayComposition by checking
intersection with the peer caps, rather than just accept-caps,
which might only check the pad template.

https://bugzilla.gnome.org/show_bug.cgi?id=755113
2015-09-17 00:49:58 +10:00
Sebastian Dröge 637106e287 audioaggregator: Fix mixup of running times and segment positions
We have to queue buffers based on their running time, not based on
the segment position.

Also return running time from GstAggregator::get_next_time() instead of
a segment position, as required by the API.

Also only update the segment position after we pushed a buffer, otherwise
we're going to push down a segment event with the next position already.

https://bugzilla.gnome.org/show_bug.cgi?id=753196
2015-09-14 19:57:00 +02:00
Sebastian Dröge 97fe89f351 audioaggregator: Use stream time in the position query instead of segment position
https://bugzilla.gnome.org/show_bug.cgi?id=753196
2015-09-14 19:56:51 +02:00
Nirbheek Chauhan cf786a9399 compositor: Ensure all arguments to CLAMP are signed int
If any of the arguments to CLAMP are unsigned integers, the comparison causes
an automatic conversion of the signed int to unsigned, which causes -1 to become
UINT_MAX and get clamped to the high value of the CLAMP instead of 0.

See 716 at http://c0x.coding-guidelines.com/6.3.1.8.html

Also add a test for this.

https://bugzilla.gnome.org/show_bug.cgi?id=754576
2015-09-04 23:32:36 +02:00
Olivier Crête cf1d116b19 pcapparse: Reset state on flush and state changes
https://bugzilla.gnome.org/show_bug.cgi?id=753152
2015-08-31 14:42:27 -04:00
Nirbheek Chauhan db49716c70 compositor: variables in clamp_rectangle() should be signed
x/y/w/h are signed integers. As can be seen in GstCompositorPad.
The prototype for clamp_rectangle was wrong. This commit reverts the change
and fixes the prototype.

This reverts commit bca444ea4a.
2015-08-29 17:27:45 +01:00
Tim-Philipp Müller 536e3742aa Fix file permissions of some files 2015-08-28 19:55:59 +01:00
Luis de Bethencourt bca444ea4a compositor: remove check for below zero for unsigned value
CLAMP checks both if value is '< 0' and '> max'. Value will never be a negative
number since it is an unsigned integer. Removing that check and only checking if
it is bigger than max by using MIN().

CID 1320707
2015-08-28 15:21:13 +01:00
Sebastian Dröge 50fc332ab5 dvbsuboverlay: Fix caps memory leak by making static caps actually static
See https://bugzilla.gnome.org/show_bug.cgi?id=754157
2015-08-27 11:10:53 +03:00
Nicolas Dufresne b392a6e3b9 h264parse/h265parse: Fix negotiation crash
As it's recursive, gst_pad_get_allowed_caps() may also return
empty for anything incompatible downstream. EMPTY is not valid caps
value for gst_caps_fixate(). This lead to assertion and then crash.
Ideally, the negotiate function should be re-factored to have a return
value, and we could make the negotiation fails earlier.

https://bugzilla.gnome.org/show_bug.cgi?id=754122
2015-08-26 10:56:07 -04:00
Nirbheek Chauhan 9b59bb8630 compositor: Actually use the output resolution for clamping
The obscured check in compositor was using the dimensions of the pad to clamp
the h/w of the pad instead of the output resolution, and was doing an incorrect
calculation to do so. Fix that by simplifying the whole calculation by using
corner coordinates. Also add a test for this bug which fell through the cracks,
and just skip all the obscured tests if the pad's alpha is 0.0.

https://bugzilla.gnome.org/show_bug.cgi?id=754107
2015-08-26 15:03:05 +03:00
Tim-Philipp Müller 54fc1ed5f4 tsdemux: fix latency handling again
The tsdemux latency should always be added to the minimum
latency (which is always a valid clock time value). The
"cleanup" in commit a1f709c2 made it so that it would not
be added if upstream reported 0 as minimum latency (as
e.g. udpsrc would). This broke playback of live mpeg-ts
streaming in some cases, leading to playback stutter due
to a too-small configured latency for the pipeline.

https://bugzilla.gnome.org/show_bug.cgi?id=751508
2015-08-24 10:46:31 +01:00
Guillaume Marquebielle 30d58f4688 liveadder: fix assertion when copying buffer region
In gst_live_adder_chain() function, calls to gst_buffer_copy_region() can lead
to assertion as 'offset + size <= bufsize' is not respected.
Indeed 'offset' and 'size' parameters are calculated through calling gst_live_adder_length_from_duration(),
and thus gst_util_uint64_scale_int_round().
Depending on the nearest integers, rounded values 'offset' and 'size' can then trigger the assertion.
This case mainly occurs when 'skip' value is > 0 in chain function process.

https://bugzilla.gnome.org/show_bug.cgi?id=753759
2015-08-18 16:37:09 -04:00
Thiago Santos a6dc5e19a2 videoencoders: use template subset check for accept-caps
It is faster than doing a query that propagates downstream and
should be enough

Elements: openjpegenc, schroenc, webpenc, pnmenc
2015-08-17 14:39:44 -03:00
Thiago Santos 6517282af7 audioencoders: use template subset check for accept-caps
It is faster than doing a query that propagates downstream and
should be enough

Elements: faac, gsmenc, opusenc, sbcenc, voamrwbenc, adpcmenc, sirenenc
2015-08-17 10:07:54 -03:00
Olivier Crête 567b1e8c46 videoparsers: Use gst_base_parse_merge_tags()
Instead of squashing all upstream tags

https://bugzilla.gnome.org/show_bug.cgi?id=679768
2015-08-16 17:28:29 +01:00
Edward Hervey 7ea4a66b9f mpegtsdemux: Fix illogical comparision
A variable can't be two values at once. We want to stop if it's not the
actual ts *AND* not the other ts

CID #1316475
2015-08-16 12:56:56 +02:00
Thiago Santos 56b822f9f6 audiodecoders: use default pad accept-caps handling
Avoids useless check of downstream caps when handling an
accept-caps query

Elements: dtsdec, faad, gsmdec, mpg123audiodec, opusdec,
          sbcdec, adpcmdec, sirendec
2015-08-15 13:51:16 -03:00
Thiago Santos a5ed877783 videodecoders: use default pad accept-caps handling
Avoids useless check of downstream caps when handling an
accept-caps query

Elements: daaladec, libde265dec, openjpegdec, rsvgdec, schrodec,
          webpdec, pnmdec, vmncdec, openexrdec
2015-08-15 13:51:16 -03:00
Luis de Bethencourt 51dfa3b135 rtph265depay: make sure we call handle_nal for each NAL
Call handle_nal for each NAL in the STAP-A RTP packet. This makes sure
we correctly extract the SPS and PPS.

https://bugzilla.gnome.org/show_bug.cgi?id=730999
2015-08-15 16:22:22 +01:00
Luis de Bethencourt 4075b1112c rtph265pay: Copy metadata in the payloader, but only the relevant ones
The payloader didn't copy anything so far, the depayloader copied every
possible meta. Let's make it consistent and just copy all metas without
tags or with only the video tag.

https://bugzilla.gnome.org/show_bug.cgi?id=751774
2015-08-15 14:45:37 +01:00
Luis de Bethencourt 5b2ddfb90c rtph265pay: Use GST_WARNING_OBJECT() instead of GST_WARNING()
https://bugzilla.gnome.org/show_bug.cgi?id=753228
2015-08-15 11:41:43 +01:00
Luis de Bethencourt 585e042fca rtph265pay: fix potential crash when shutting down
A race condition in the state change function may cause buffers to be
unreffed while they are still used by the streaming thread in
gst_rtp_h265_pay_send_vps_sps_pps() resulting in a crash. Chain up to the
parent class first in the state change function to make sure streaming
has stopped and only then free those buffers.

https://bugzilla.gnome.org/show_bug.cgi?id=741381
2015-08-15 11:34:31 +01:00
Jan Schmidt fdac09d843 h264parse: Clear SPS info after processing.
The SPS struct might be filled out by a call to
gst_h264_parser_parse_subset_sps, which fills out
dynamically allocated data and requires a call
to gst_h264_sps_clear() to free it. Also make sure
to clear out any allocated SPS data when returning
an error.

https://bugzilla.gnome.org/show_bug.cgi?id=753306
2015-08-15 15:39:23 +10:00
Thiago Santos 8f855a8b78 pngparse: enable accept-intersect and accept-template flags on sinkpad
Do a quick check with the pad template caps as it is enough. Users
should have figured the appropriate full caps on a previous caps query

https://bugzilla.gnome.org/show_bug.cgi?id=753623
2015-08-14 13:42:59 -03:00
Thiago Santos c4cd1ce4fd videoparsers: enable accept-template flag
Do a quick check with the pad template caps as it is enough. Users
should have figured the appropriate full caps on a previous caps query

https://bugzilla.gnome.org/show_bug.cgi?id=753623
2015-08-14 13:42:59 -03:00
Luis de Bethencourt b3418759d9 rtph265pay: fix buffer leak when using SPS/PPS
Fixes a buffer leak that would occur if the pipeline was shutdown while a
SPS/PPS header was being created.

https://bugzilla.gnome.org/show_bug.cgi?id=741271
2015-08-14 15:08:10 +01:00
Luis de Bethencourt fd665514ba rtph265depay: copy metadata in the depayloader, but only the relevant ones
The payloader didn't copy anything so far, the depayloader copied every
possible meta. Let's make it consistent and just copy all metas without
tags or with only the video tag.

https://bugzilla.gnome.org/show_bug.cgi?id=751774
2015-08-14 12:00:23 +01:00
Vineeth TM 6fb346717b spu-pgs: fix buffer and event leak
When playing mts files with embedded subtitles, the buffer is mapped,
but not unmapped at the end resulting in a memory leak.

Also unref event in handle_dvd_event as it takes ownership of the event.

https://bugzilla.gnome.org/show_bug.cgi?id=753539
2015-08-13 14:56:00 +01:00
Vineeth TM 0812437293 dvdspu: Fix event leaks
When playing mts files with embedded subtitles, there are few event leaks.
Events are supposed to be transfer full. So if not forwarding the event,
they need to be freed.

https://bugzilla.gnome.org/show_bug.cgi?id=753539
2015-08-13 14:38:03 +01:00
Luis de Bethencourt 397b5d06ec rtph265depay: checking if depay has sps/pps nals before insertion
Related to: https://bugzilla.gnome.org/show_bug.cgi?id=753430

https://bugzilla.gnome.org/show_bug.cgi?id=753228
2015-08-12 17:54:55 +01:00
Luis de Bethencourt ef9b7ef60a rtph265depay: only update the srcpad caps if something else than the codec_data changed
h264parse and gstrtph264depay do the same, let's keep the behaviour
consistent. As we now include the codec_data inside the stream, this causes
less caps renegotiation.

https://bugzilla.gnome.org/show_bug.cgi?id=753228
2015-08-12 17:22:44 +01:00
Luis de Bethencourt 4edf2ac1c5 rtph265depay: PPS replaces old PPS if it has the same id
https://bugzilla.gnome.org/show_bug.cgi?id=753228
2015-08-12 16:51:18 +01:00
Luis de Bethencourt 021333a9fc rtph265depay: Insert SPS/PPS NALs into the stream
rtph264depay does the same and this fixes decoding of some streams with 32
SPS (or 256 PPS). It is allowed to have SPS ID 0 to 31 (or PPS ID 0 to 255),
but the field in the codec_data for the number of SPS or PPS is only 5
(or 8) bit. As such, 32 SPS (or 256 PPS) are interpreted as 0 everywhere.

This looks like a mistake in the part of the spect about the codec_data.
2015-08-12 16:34:43 +01:00
Luis de Bethencourt fee3129d49 rtph265depay: implement process_rtp_packet() vfunc
For more optimised RTP packet handling: means we don't need to map the
input buffer again but can just re-use the mapping the base class has
already done.

Based on: https://bugzilla.gnome.org/show_bug.cgi?id=750235

https://bugzilla.gnome.org/show_bug.cgi?id=753228
2015-08-12 15:53:23 +01:00
Luis de Bethencourt 2d3dc2caa6 rtph265depay: Use GST_BUFFER_PTS() instead of GST_BUFFER_TIMESTAMP()
Switching to GST_BUFFER_TIMESTAMP() to be consistent with other rtp code.
2015-08-12 15:14:52 +01:00
Luis de Bethencourt 9379933607 rtph265depay: prevent trying to get 0 bytes from adapter
This causes an assertion and would lead to getting a NULL instead
of a buffer. Without proper checking this would easily lead to a
segfault.

Related to rpth264depay: https://bugzilla.gnome.org/show_bug.cgi?id=737199
2015-08-12 15:05:02 +01:00
Nicolas Dufresne e531ea9ff0 frei0r: Fix setting string parameters
String parameters are expected to be passed as (f0r_param_string *),
which actually map to char**. In the filters this is evaluated as
(*(char**)param) which currently lead to crash when passing char*.

Remove the special case for string, all types, including char* as
passed as a reference.

https://phabricator.freedesktop.org/T83
2015-08-11 15:11:01 -04:00
Sreerenj Balachandran a83dabd5e8 videoparsers: h265: Fix the frame start detection code
Check slice headers in between GST_H265_NAL_SLICE_TRAIL_N
and GST_H265_NAL_SLICE_RASL_R for frame start detection.

https://bugzilla.gnome.org/show_bug.cgi?id=753497
2015-08-11 11:34:36 +01:00
Sreerenj Balachandran 2775b202dc videoparsers: h265: Avoid skipping of EOS and EOB nals
EndOfSequence and EndOfBitstream nal units have size of 2 bytes.
Don't consider them as broken nals.

https://bugzilla.gnome.org/show_bug.cgi?id=753497
2015-08-11 11:34:36 +01:00
Tim-Philipp Müller 424426f486 asfmux: output TIME segment if we output a stream and won't seek back later
Check if downstream is seekable via a SEEKING query and output a
BYTE segment if we want to seek back to fix up the headers later,
but if we're streaming send a TIME segment instead (which goes
down better with e.g. asfmux ! rtpasfpay).

https://bugzilla.gnome.org/show_bug.cgi?id=719553
2015-08-08 16:19:09 +01:00
Sreerenj Balachandran 69becd734d h265parse: expose compatible profiles to downstream
Some video bitstreams report a too restrictive set of profiles. If a video
decoder was to strictly follow the indicated profile, it wouldn't support that
stream, whereas it could in theory and in practice. So we should relax the
profile restriction for allowing the decoder to get connected with parser.

https://bugzilla.gnome.org/show_bug.cgi?id=747613
2015-08-07 13:11:53 +02:00
Nicolas Dufresne ef7a074fa0 rgb2bayer: Use mapped frame stride 2015-08-06 18:12:07 -04:00
Nicolas Dufresne 97a0d9d72d rgb2bayer: Protect against failing map 2015-08-06 18:11:53 -04:00
Nicolas Dufresne 6bd93bd7e5 bayer2rgb: Read stride from the video info 2015-08-06 18:04:58 -04:00
Nicolas Dufresne 7d6fd42726 bayer2rgb: Protect against failing map 2015-08-06 18:04:41 -04:00
Nicolas Dufresne 3757e507f3 pcapparse: Segment should start at base ts
Instead we would use cur_ts which matches the last TS store
in the buffer list.

https://bugzilla.gnome.org/show_bug.cgi?id=753037
2015-08-05 14:54:05 -04:00
Anders Jonsson 3fb2222470 camerabin2: Fix string typo
https://bugzilla.gnome.org/show_bug.cgi?id=753241
2015-08-05 09:15:07 -04:00
Jimmy Ohn be714c7441 rawparse: fix duplicated format in handle_seek_pull
GstFormat variable are duplicated in handle_seek_pull function.
So we need to move this variable in condition statement.

https://bugzilla.gnome.org/show_bug.cgi?id=753243
2015-08-04 12:29:40 -03:00
Olivier Crête 10ef6403b6 audiointerleave: Avoid caps processing if not yet negotiated
https://bugzilla.gnome.org/show_bug.cgi?id=745768
2015-07-30 14:00:05 -04:00
Olivier Crête 3f2bc1e4b2 audioaggregator: On timeout, resync pads with not enough data
https://bugzilla.gnome.org/show_bug.cgi?id=745768
2015-07-30 14:00:05 -04:00
Olivier Crête 6efc106a67 aggregator: Queue "latency" buffers at each sink pad.
In the case where you have a source giving the GstAggregator smaller
buffers than it uses, when it reaches a timeout, it will consume the
first buffer, then try to read another buffer for the pad. If the
previous element is not fast enough, it may get the next buffer even
though it may be queued just before. To prevent that race, the easiest
solution is to move the queue inside the GstAggregatorPad itself. It
also means that there is no need for strange code cause by increasing
the min latency without increasing the max latency proportionally.

This also means queuing the synchronized events and possibly acting
on them on the src task.

https://bugzilla.gnome.org/show_bug.cgi?id=745768
2015-07-30 14:00:05 -04:00
Vineeth TM 09992f32dc h265parse: Avoid checking for Non Mandatory VPS NAL
VPS is not mandatory, and need not check for its presence before setting
the caps. Because of the check, in streams which don't have VPS,
sticky event mishandling happens.

https://bugzilla.gnome.org/show_bug.cgi?id=752807
2015-07-30 15:10:05 +01:00
Vineeth TM 8f7a84a9a1 sdpdemux: assertion error due to wrong condition check
In media to caps function, reserved_keys array is being used for variable i,
leading to GLib-CRITICAL **: g_ascii_strcasecmp: assertion 's1 != NULL' failed
changed it to variable j

https://bugzilla.gnome.org/show_bug.cgi?id=753009
2015-07-30 15:51:53 +03:00
Luis de Bethencourt 0e29906a6f rtp: remove dead assignment
Value set to ret will be overwritten at least once at the end of the while
loop, removing assignment.
2015-07-29 17:33:27 +01:00
Tim-Philipp Müller d37fcff732 mpegtsmux: use GQueue instead of GList prepend/reverse 2015-07-29 17:30:15 +01:00
Luis de Bethencourt d6b637532f sdpdemux: remove redundant assignment
Value of p is already set below just before being used. Removing this
first assignment that will be ignored.
2015-07-29 17:19:33 +01:00
Luis de Bethencourt 7ddaf8741b mpegtsbase: remove redundant check
No need to check if done is True since break will already terminate the for
loop.
2015-07-29 16:52:08 +01:00
Sebastian Dröge a4a2638d86 sdpdemux: Don't assert in GstAdapter if no data was received before EOS 2015-07-29 14:35:50 +01:00
Sebastian Dröge 86a9b84c92 sdpdemux: Strip keys from the fmtp that we use internally in our caps
Skip keys from the fmtp, which we already use ourselves for the
caps. Some software is adding random things like clock-rate into
the fmtp, and we would otherwise here set a string-typed clock-rate
in the caps... and thus fail to create valid RTP caps

https://bugzilla.gnome.org/show_bug.cgi?id=753009
2015-07-29 14:35:50 +01:00
Jan Schmidt c1b0d818bb h264parse: Add more NAL types for debugging output.
Register more NAL unit types so that they are dumped
by name in the debug output instead of being labelled
'Invalid'
2015-07-29 23:10:49 +10:00
Jan Schmidt 55373e21a8 mpegtsmux: Don't clear the PID on reset.
The PID on a pad shouldn't change on a state change, only
if the pad is freed and a new one created. Clearing the PID
prevented mpegtsmux from being reused, because all packets
would end up muxed in PID 0

https://bugzilla.gnome.org/show_bug.cgi?id=752999
2015-07-29 23:10:49 +10:00
Jan Schmidt 0d170d51c7 mpegtsmux: Accumulate streamheaders in reverse
Accumulate streamheader packets in reverse into the
GList for efficiency, and reverse the list once when
processing.

Improves muxing speed when there are a lot of
streamheaders.
2015-07-29 23:10:49 +10:00
Vineeth TM 9b43bed607 h263parse: fix caps memory leak
https://bugzilla.gnome.org/show_bug.cgi?id=752991
2015-07-29 09:25:47 +01:00
Jan Schmidt 48a1f27923 h264parse: Don't discard first AU delimiter
Don't throw away AU delimiter(s) that precede the SPS/PPS. Should
fix MPEG-TS playback on iOS/Quicktime when muxing streams that
already have AU delimiters.

See https://bugzilla.gnome.org/show_bug.cgi?id=736213 for getting
h264parse to insert AU delimiters when they don't already
exist.
2015-07-24 02:46:21 +10:00
Olivier Crête 86fb628d09 audioaggregator: Register function name
Otherwise, it sometimes segfaults with debugging enabled
2015-07-22 19:30:19 -04:00
Olivier Crête 034feb5bb9 audioaggregator: Use 1.0 style buffer allocation 2015-07-22 19:30:12 -04:00
Nirbheek Chauhan ad8cb458ba audioaggregator: Sync pad values before aggregating
We need to sync the pad values before taking the aggregator and pad locks
otherwise the element will just deadlock if there's any property changes
scheduled using GstController since that involves taking the aggregator and pad
locks.

Also add a test for this.

https://bugzilla.gnome.org/show_bug.cgi?id=749574
2015-07-22 19:50:38 +01:00
Luis de Bethencourt 3bf12a1b9f liveadder: remove unneeded variable
ret is declared just to initialize to TRUE and overwrite with the value of
vret. We can return the value of vret directly. vret is TRUE unless the
forward_event_func sets it to FALSE.
2015-07-22 16:14:16 +01:00
Olivier Crête f8f9c72cc5 audioaggregator: Read output buffer duration with lock held 2015-07-21 21:55:25 -04:00
Luis de Bethencourt ac54fa8c95 liveadder: return false if event couldn't be pushed
Make the gst pad's event function return false if the event couldn't be
pushed to the pad.
2015-07-21 14:11:01 +01:00
Tim-Philipp Müller be22d8fb4a mpegtsmux: fix aac caps in pad template for raw aac
Raw aac doesn't need framed=true.

Fixes not-negotiated error with voaacenc ! mpegtsmux.
2015-07-20 12:38:28 +01:00
Tim-Philipp Müller ec309dbd64 mpegtsmux: don't wait for data on sparse inputs like metadata or subtitle streams 2015-07-13 23:34:33 +01:00
Tim-Philipp Müller c05a9424be mpegtsmux: add basic support for asynchronous KLV metadata streams
This is defined in SMPTE Rp 217. In this case the
metadata PES packets carry no timestamps of their
own and no Metadata Access Unit Wrappers are used.
2015-07-13 23:34:31 +01:00
Edward Hervey 631b2d8826 mpegtsbase: Fix previous commit
We only want to do a hard reset of the observations if we're working
with TIME segments in push mode. For BYTE segment we want to keep
the observations (in order to do seeks in push-mode).
2015-07-09 18:33:00 +02:00
Edward Hervey 0247dc7489 mpegtsbase: Flush more on DISCONT buffers in push mode
When in push mode, we want to discard all previous observations from the
mpegtspacketizer when we get a DISCONT buffer.

This avoids trying to calculate bogus timestamps (estimating them using old
PCR observations).

We only do a hard reset in push-mode. In pull-mode we still need the observations
(in order to seek properly)
2015-07-09 18:15:54 +02:00
Roman Donchenko 649e76575d pngparse: fix a GstCaps object leak
https://bugzilla.gnome.org//show_bug.cgi?id=752127
2015-07-08 17:26:59 +01:00
Tim-Philipp Müller f0358aac16 tsdemux: remove unnecessary check
This is not public API, use g_assert() instead of
g_return_if_fail(), so that it's compiled out in
releases. It's only called from our code, with &foo.
2015-07-08 14:50:00 +01:00
Tim-Philipp Müller eeaf4d11b7 tsdemux: add support for KLV metadata streams
There's no timestamps for these streams though, we
might want to make some up based on the last/next
video PTS or so.
2015-07-08 14:50:00 +01:00
Tim-Philipp Müller f17899a55c pcapparse: fix another regression
Introduced by c4c9fe60b pcapparse: Take buffer directly from the adapter

Using gst_adapter_take_buffer_fast() can lead to buffers that are
made up of multiple memories with the first memory smaller than the
RTP header size, which violates assumptions GstRtpBaseDepayloader
makes, namely that the complete RTP header will be in the first
memory. This leads to such packets being dropped when feeding
them from pcapparse to RTP depayloaders. Use take_buffer() so
we get buffers with a single memory.
2015-07-03 10:30:22 +01:00
Tim-Philipp Müller aec19c1053 pcapparse: fix regression when handling packets with eth padding
Introduced by c4c9fe60b pcapparse: Take buffer directly from the adapter

Flush any trailing bytes after the payload from the adapter as well,
otherwise we'll read a bogus packet size from the adapter next and
then everything goes downhill from there.

https://bugzilla.gnome.org/show_bug.cgi?id=751879
2015-07-03 10:25:15 +01:00
Sangkyu Park 0ca354eb10 mpegdemux: check pointer before dereferencing
gst_ps_demux_get_stream() could return NULL when it is unknown stream,
check this hasn't happened before dereferencing the returned pointer.

https://bugzilla.gnome.org/show_bug.cgi?id=751528
2015-06-26 18:02:22 +01:00
Vivia Nikolaidou 9664d1a6b1 error-ignore: New element to convert some GstFlowReturn types into others
Can be used to fix misbehaving sinks. It will pass through all buffers
until it encounters GST_FLOW_ERROR or GST_FLOW_NOT_NEGOTIATED (configurable).
At that point it will unref the buffers and return GST_FLOW_NOT_LINKED
(configurable) - until the next READY_TO_PAUSED or FLUSH_STOP.

https://bugzilla.gnome.org/show_bug.cgi?id=750098
2015-06-23 10:28:18 +02:00
Wim Taymans 0a5b6d9344 bayer: update ORC files
Update ORC files with newest ORC to fix backup code generation error.
2015-06-22 13:30:58 +02:00
Tim-Philipp Müller 794c647f59 irtspparse: reflow code to avoid uninitialized variable warning
This should hopefully allow even the most challenged static
code analyzer to figure out that it's all fine. Also makes
the flow clearer.

https://bugzilla.gnome.org/show_bug.cgi?id=751305
2015-06-22 10:51:00 +01:00
Vineeth TM 39d657c274 tsmux: code style fix
trivial patch to add proper ( while checking for if(G_UNLIKELY())

https://bugzilla.gnome.org/show_bug.cgi?id=751305
2015-06-22 10:12:45 +01:00
Tim-Philipp Müller d43a849833 mpeg1sys: remove ancient plugin that's never even been ported to 0.8 2015-06-22 09:08:00 +01:00
Tim-Philipp Müller 1bf7ca64c0 h264parse: fix typo in log message 2015-06-20 16:07:57 +01:00
Jan Schmidt b77f8e172a h264parse: Move PAR calcs, and use them for stereoscopic half-aspect
Move the pixel-aspect-ratio calculations higher up in caps
determination, so the results are available for a call to
gst_video_multiview_guess_half_aspect() when stereoscopic video
is detected.
2015-06-19 01:49:33 +10:00
Alessandro Decina bdcaf8f5ee fpsdisplaysink: get rendered and dropped stats from QOS messages
Use QOS messages to update rendered and dropped frame stats. This is
the only accurate method. The old method didn't take max-lateness and
latency into account.
2015-06-18 13:02:26 +07:00
Nicolas Dufresne 6bf6429bc1 mpegtsmux: Remove redundant min_dts
After few iteration, this variable became the same as dts. It's not
the min as the name says, but the dts of the current buffer. Simply
remove and place with dts. Also move the debug trace to actually
print the signed version of the running-time dts.
2015-06-15 10:10:40 -04:00
Vineeth TM 95dd8d9662 mpegtsmux: fix build error
after e000a6f0a4, there is build error in bad plugins
this happens because, GST_CLOCK_STIME_IS_VALID () is being checked for pad_data
but it expects a GstClockTime parameter. Changing the check to 'dts'

https://bugzilla.gnome.org/show_bug.cgi?id=750961
2015-06-15 10:12:11 +02:00
Mathieu Duponchelle 53b0808042 compositor: update zorder documentation.
It is not bound between 0 and 10000 anymore.
2015-06-14 23:20:38 +02:00
Nicolas Dufresne 338f7e8c8d tsdemux: Segment start should match first PTS
The segment should start at first PTS, and the vairable name lower_pts
state so correctly. Though we where using the first DTS instead. This
could lead to small desynchronization of video stream.

https://bugzilla.gnome.org/show_bug.cgi?id=740575
2015-06-12 17:10:29 -04:00
Nicolas Dufresne e000a6f0a4 tsmux: Add negative DTS support
Use the saved DTS, make it signed and pass that to the stream muxer. This
preserves the running time sign. All usage of -1 as invalid TS are now
replaced with G_MININT64. Negative values will be seen as wrap-around
point, but the delta between PTS and DTS will remain correct. Demuxers
don't care about absolute values, they only cares about deltas.

https://bugzilla.gnome.org/show_bug.cgi?id=740575
2015-06-12 17:10:29 -04:00
Nicolas Dufresne 8432116df2 tsmux: Remove uneeded cast and cast macro
https://bugzilla.gnome.org/show_bug.cgi?id=740575
2015-06-12 17:10:29 -04:00
Nicolas Dufresne 91cbaa5ac7 mpegtsmux: Properly detect backward DTS
There was code to detect backward dts, but the marker min_dts
was never set. Setting it enable this feature that prevents
potential integer overflow when generating TS.

https://bugzilla.gnome.org/show_bug.cgi?id=740575
2015-06-12 17:10:29 -04:00
Vivia Nikolaidou 3bbc945eb3 debugutilsbad: Minor cleanup
Ran gst-indent on debugutilsbad.c, moved headers to noinst in Makefile.am
2015-06-12 16:16:17 +02:00
Jan Schmidt 08c73f9cc7 h264parse: Add support for passing stereoscopic/multiview info
Pass any multiview info from the container or SEI info downstream
2015-06-12 00:39:15 +10:00
Jan Schmidt e8908f5aee h264parse: Don't switch to passthrough on set_caps()
Wait until at least one keyframe has been parsed before
deciding to switch to passthrough mode, in case the
stream contains SEI messages that supplement the output
caps - for example by providing stereoscopic information
2015-06-12 00:39:15 +10:00
Yanko Kaneti fa9fa5d460 mpegtsmux: Remove arbitrary constraint on prog-map program ids
https://bugzilla.gnome.org/show_bug.cgi?id=746765
2015-06-12 00:09:54 +10:00
Edward Hervey 898b436219 h263parse: Fix PSC matching
We were off by one byte in the matching

It should be (using 24 bit matching):
   * startcode  : 0000 0000 0000 0000 1000 00xx
   * mask (bin) : 1111 1111 1111 1111 1111 1100
   * mask (hex) :    f    f    f    f    f    c
   * match      :    0    0    0    0    8    0

https://bugzilla.gnome.org/show_bug.cgi?id=750685
2015-06-11 08:27:19 +02:00
Santiago Carot-Nemesio 9fb4d5df20 liveadder: Fix memory leaks iterating over pads
Rebased for latest master by Nicolas Huet <nicolas.huet@parrot.com>.

https://bugzilla.gnome.org/show_bug.cgi?id=745748
2015-06-10 10:24:35 +02:00
Tim-Philipp Müller 654a5f3fc7 audiomixer: fix misleading documentation copied from adder 2015-06-09 14:37:36 +01:00
Jan Schmidt 6fde1dfa88 dvdspu: Map the pixel data once per render, not *ahem* twice per byte.
The naive port to 1.0 from years ago was silly, make it better.
2015-06-09 09:10:09 +10:00
Luis de Bethencourt afcb49dcce tsdemux: correct fix for dead code
Rename template to caps to keep the original intention of the code after
commit b4c9aa1c

CID #1304674
2015-06-08 14:19:27 +01:00
Luis de Bethencourt e9cb38017b Revert "tsdemux: remove dead code"
This reverts commit 0635acfec0.
2015-06-08 14:14:41 +01:00
Luis de Bethencourt 0635acfec0 tsdemux: remove dead code
After commit b4c9aa1c30 template will always be
NULL. The if conditional will always be FALSE, so removing it.

CID #1304674
2015-06-08 13:37:35 +01:00
Sebastian Dröge 0034323f49 Release 1.5.1 2015-06-07 10:55:35 +02:00
Luis de Bethencourt 7aed8e184f tsdemux: remove ignored assignment
Function goes to done before the value set in start_offset is ever used.
2015-06-05 14:34:59 +01:00
Vineeth TM 7824f4cf52 simplevideomarkdetect: fix detect of videomark partially or fully outside video
In case of the videomark being partially or fully outside,
an error was bein thrown saying, mark width is more than video width.
And when the width, offset properties are set to maximum it resulted in crash.
Instead of throwing error, added logic to detect the mark
in case of partial visibility or dont show the mark when it is outside.

https://bugzilla.gnome.org/show_bug.cgi?id=743908
2015-06-05 13:15:23 +01:00
Vineeth TM abed8af00c simplevideomark: Add Error logs
When the pattern offset is outside the video, the print error message

https://bugzilla.gnome.org/show_bug.cgi?id=743908
2015-06-05 13:08:16 +01:00
Thiago Santos b4c9aa1c30 tsdemux: refactor pad creation
Avoid repeating the same pad creation code everywhere
2015-06-04 13:51:01 -03:00
Luis de Bethencourt a85a8afc3e vc1parse: remove useless value assignments
In all these cases ret is set but overwritten before the return of the function
2015-06-03 15:25:16 +01:00
Thiago Santos d91f5e85e7 mpegtsbase: do not access variable after unref
Data might not exist anymore
2015-06-02 16:55:08 -03:00
Vineeth TM 0905746c0c simplevideomark: fix display of videomark partially or fully outside video
In case of the videomark being partially or fully outside, an error was being
thrown saying the mark width is more than video width. And when the width,
offset properties are set to maximum it resulted in crash. Instead of throwing
an error, add logic to detect the mark in case of partial visibility or don't
show the mark when it is outside.

https://bugzilla.gnome.org/show_bug.cgi?id=743908
2015-06-02 14:08:13 +01:00
Aurélien Zanelli 633b4db556 tsdemux: enable Chinese AVS video stream
Chinese broadcaster encapsulate AVS video codec into MPEG2-TS. They
use the stream_id 0x42 to identify AVS video streams. It should be noted
that this id is currently within the ISO reserved range, hence it's
utilisation is unofficial.

https://bugzilla.gnome.org/show_bug.cgi?id=727731
2015-06-02 12:41:26 +01:00
Olivier Crête db5b3b5c41 audiointerleave: Always have "channels" be the actual pad count
Don't force it anywhere

https://bugzilla.gnome.org/show_bug.cgi?id=750252
2015-06-01 19:43:20 -04:00
Olivier Crête 45ef27aa46 audiointerleave: Use the channel count from the set caps
This is the same number that was used to allocate the buffer
2015-06-01 19:42:49 -04:00
Luis de Bethencourt 3477fc422b audiovisualizer: clean dereferences of private structure
https://bugzilla.gnome.org/show_bug.cgi?id=742875
2015-06-01 12:53:40 +01:00
Luis de Bethencourt a881085a75 audiovisualizer: make private all variable subclasses don't need
https://bugzilla.gnome.org/show_bug.cgi?id=742875
2015-06-01 11:57:14 +01:00
Luis de Bethencourt 99a52f74e7 mpegtsmux: don't overwrite value
Value of res is reset to FALSE in each iteration of the while loop. We want to
conserve TRUE if any pad event succeeded until we arrive to done.

Also, buf is set to the value of *outbuf twice. Removing the first assignment
since the second one is outside of a conditional.
2015-05-27 13:25:27 +01:00
Luis de Bethencourt a818a93d14 dvbsuboverlay: remove unused assignment
buf is incremented just before returning, this new value is never used.
Removing unused assignment.
2015-05-26 16:40:18 +01:00
Vineeth T M 5985bc4b05 exclusion: exception when set factor to 0
When factor property is set to 0, transform just returns.
Adjust the minimum value to 1.

https://bugzilla.gnome.org/show_bug.cgi?id=743907
2015-05-26 14:17:31 +01:00
Sebastian Dröge 3230e51993 compositor/glvideomixer: Don't calculate PAR/DAR with unset GstVideoInfos
Otherwise we divide by zero.
2015-05-21 16:24:48 +03:00
Sebastian Dröge 41c11e3979 compositor: Fix double assignment 2015-05-21 16:19:08 +03:00
Matthew Waters d1419afef1 compositor/glvideomixer: fix up par handling
We were using the wrong formula

https://bugzilla.gnome.org/show_bug.cgi?id=749634
2015-05-21 01:04:38 +10:00
Edward Hervey 69c09c38cf h264parse: Consider SEI NALU as "HEADER" packets
Like SPS/PPS they do contain information which will be needed to
decode the following data (as per definition of the flag)

Also ensures that the series of SPS/PPS/SEI NALU before a keyframe
can be considered as one contiguous header
2015-05-20 15:41:11 +02:00
Edward Hervey 43621624c8 mpegtsmux: Carry over GST_BUFFER_FLAG_HEADER
In the same way we do it for the DELTA_UNIT flag

This allows downstream elements to know whether a given mpeg-ts
packet contains a corresponding HEADER elementary unit
2015-05-20 15:41:11 +02:00
Stefan Sauer 4116d11327 Revert "doc: Workaround gtkdoc issue"
This reverts commit ff6c736fe0.

This is fixed by the gtk-doc 1.23 release.

<para> cannot contain <refsect2>:
http://www.docbook.org/tdg/en/html/para.html
http://www.docbook.org/tdg/en/html/refsect2.html
2015-05-18 20:16:32 +02:00
Nicolas Dufresne ff6c736fe0 doc: Workaround gtkdoc issue
With gtkdoc 1.22, the XML generator fails when a itemizedlist is
followed by a refsect2. Workaround the issue by wrapping the
refsect2 into para.
2015-05-16 23:38:14 -04:00
Vincent Penquerc'h 1dd94be326 tsdemux: fix buffer timestamp not being in stream time
Timestamps should start at the segment start, rather than 0, so
we need to not subtract the first timestamp. This makes the sink
correctly account for running time when switching PMTs where a
stream starts not quite at zero, causing timing offsets that can
become noticeable and causing dropped frames after a few times.
2015-05-15 14:50:35 +01:00
Vincent Penquerc'h 4a219df304 tsdemux: accumulate previous segment base time 2015-05-15 14:49:04 +01:00
Vincent Penquerc'h 29fd6332a4 tsdemux: fix refcounting when applying a new PMT
A new program object is created to replace an existing one
in the programs hash table, so its refcount needs to match.

With the default of 0 refcount on creation, the next PAT
change will cause that refcount to be both incremented and
decremented (assuming the new PAT references that stream too),
which will cause the program to be destroyed.

https://bugzilla.gnome.org/show_bug.cgi?id=748412
2015-05-15 14:45:49 +01:00
Matthew Waters 0871b7b43d compositor: implement proper par handling
We were previously failing on different input and output par
2015-05-14 14:58:07 +10:00
Thiago Santos d60c171ad2 mpegtsmux: the parent is provided in the function
No need to get it again
2015-05-13 13:35:14 -03:00
Lyon Wang 6adf3c2499 h263parse: fix custom picture format (CPFMT) parsing
In the H263 spec, CPFMT is present only if the use of a custom
picture format is signalled in PLUSEPTYPE and UFEP is "001",
so we need to check params->format and only if the value is
6 (custom source format) the CPFMT should be read, otherwise
it's not present and wrong data will be parsed.

When reading the CPFMT, the width and height were not
calculated correctly (wrong bitmask).

https://bugzilla.gnome.org//show_bug.cgi?id=749253
2015-05-13 11:51:20 +01:00
Matthew Waters c519169052 compositor: fix rectangle obscure test to clamp against the output frame size
Rather than one of the input pad video info's.

The test checking this was not constraining the output frame size
to ensure that the out of frame stream was not being displayed.
2015-05-13 17:44:30 +10:00
Luis de Bethencourt 6a71b91c6e removesilence: remove gst_remove_silence_reset()
No need to call gst_remove_silence_reset() in gst_remove_silence_init() because
vad_new() already calls this function. Since there are no more uses of
_silence_reset(), we can remove it altogether.
2015-05-08 14:24:07 +01:00
Luis de Bethencourt 8899efae60 Update references to decodebin
Update old references for decodebin2 to decodebin.
2015-05-08 13:54:08 +01:00
Luis de Bethencourt d1f7c0e6fe removesilence: update example launch line 2015-05-08 13:49:38 +01:00
Sreerenj Balachandran 3fae18b5d2 h264parse: Fix profile and level setting in caps
Don't use the apis in codec-utils to extract the profile and level
syntax elements since it is wrong if there are emulation prevention
bytes existing in the byte-stream data.

https://bugzilla.gnome.org/show_bug.cgi?id=747613
2015-05-04 09:30:05 +02:00
Thiago Santos f9f6bbf4f5 wrappercamerabinsrc: handle when source creation fail
Remember to set the source to NULL state as adding it to the pipeline
will set it to the READY state.
2015-05-01 19:45:00 -03:00
Thiago Santos fc4f95bb7c wrappercamerabinsrc: fix element linking order
Video source should be linked to videocrop and not to
videoconvert as it is done in the main linking path
2015-05-01 19:44:40 -03:00
Nirbheek Chauhan 1c60de8ad7 compositor: Only map the frame from a buffer if it will be used
It's a waste of resources to map it if it won't be converted
or used at all. Since we moved the frame mapping down, we need
to use the GST_VIDEO_INFO accessor macros now in the code above
that instead of the GST_VIDEO_FRAME accessor macros.

https://bugzilla.gnome.org/show_bug.cgi?id=746147
2015-05-01 11:27:55 +01:00
Nirbheek Chauhan cc2de817ae compositor: use accessor macros for consistency
https://bugzilla.gnome.org/show_bug.cgi?id=746147
2015-05-01 10:57:08 +01:00
Nirbheek Chauhan e0fd23cb23 compositor: Skip pads that are completely obscured by a higher zorder pad
For each frame, compare the frame boundaries, check if the format contains an
alpha channel, check opacity, and skip the frame if it's going to be completely
overwritten by a higher zorder frame. The check is O(n^2), but that doesn't
matter here because the number of sinkpads is small.

More can be done to avoid needless drawing, but this covers the majority of
cases. See TODOs. Ideally, a reverse painter's algorithm should be used for
optimal drawing, but memcpy during compositing is small compared to the CPU used
for frame conversion on each pad.

https://bugzilla.gnome.org/show_bug.cgi?id=746147
2015-05-01 10:56:32 +01:00
Sreerenj Balachandran 6fc55a997e h265parse: Fix source caps to report cropped dimensions
https://bugzilla.gnome.org/show_bug.cgi?id=747613
2015-04-30 21:49:56 +02:00
Sreerenj Balachandran 5770a96c8d h265parse: Fix the memory freeing of stored VPS nals
https://bugzilla.gnome.org/show_bug.cgi?id=747613
2015-04-30 21:49:17 +02:00
Sreerenj Balachandran a70c4f319d h265parse: Fix profile, tier and level setting in caps
Don't use the apis in codec-utils to extract the profile,tier and level
syntax elements since it is wrong if there are emulation prevention
bytes existing in the byte-stream data.

https://bugzilla.gnome.org/show_bug.cgi?id=747613
2015-04-30 21:48:35 +02:00
Luis de Bethencourt cf210bac27 rtjpeg: remove unused quality property 2015-04-30 10:50:19 +01:00
Luis de Bethencourt b7ffc524cc mixmatrix: remove unused property enum items
These two properties have been there since the origin of the element but they
aren't used. Removing them.
2015-04-29 17:22:06 +01:00
Edward Hervey 93b19d06b6 aiff: Re-add noinst_HEADERS instruction
Was removed in the previous android cleanup commit
2015-04-29 10:56:24 +02:00
Tim-Philipp Müller f0a9c246a3 gst: remove some unnecessary glib version checks
We require 2.32, no need to check for anything older
than that.
2015-04-28 16:02:27 +01:00
Guillaume Desmottes da113b5ad7 mxf: fix descriptor leak
Free the existing descriptor array, if any, before replacing it.

Fix leaks with the
validate.file.playback.scrub_forward_seeking.test-mpeg2-mp3_mxf scenario.

https://bugzilla.gnome.org/show_bug.cgi?id=748580
2015-04-28 11:53:52 -03:00
Guillaume Desmottes 94446498de tsdemux: fix taglist leak
If the stream which is about to be removed still has a ref on a tag list we
should drop it.

Fix a leak which was occasionally happening with the
validate.file.playback.change_state_intensive.tron_en_ge_aac_h264_ts scenario.

https://bugzilla.gnome.org/show_bug.cgi?id=748576
2015-04-28 14:58:03 +01:00
Jimmy Ohn 365375a1de mpegtspacketizer: fix find_subtable() return value
find_subtable() returns a pointer, so return NULL and
not FALSE when nothing is found.

https://bugzilla.gnome.org/show_bug.cgi?id=748527
2015-04-28 14:48:22 +01:00
Thiago Santos 2690cd33ce wrappercamerabinsrc: remove unused code
The structure is created and never used anymore. Remove it.
2015-04-27 21:14:09 -03:00
Thiago Santos 5e0e02553d wrappercamerabinsrc: use digitalzoom element
Replace videocrop ! videoscale ! capsfilter with the digitalzoom
bin that has the same pipeline internally and already updates
the capsfilter automatically when caps change, removing this code
from wrappercamerabinsrc and making it cleaner.
2015-04-27 21:14:09 -03:00
Thiago Santos ca96378ebf digitalzoom: change videocrop parameters before passing caps event
Avoids one extra uneeded renegotiation if the elements are already
configured to their final property values when the caps event
goes through.

Also avoids hitting bug https://bugzilla.gnome.org/show_bug.cgi?id=748344
2015-04-27 21:14:02 -03:00
Thiago Santos 239cb53e06 digitalzoom: also skip internal pipeline in upstream caps query
To avoid going through our capsfilter which would limit the choices.
2015-04-27 21:13:55 -03:00
Thiago Santos 539db6f68b digitalzoom: prevent assertion when caps is any 2015-04-27 21:13:55 -03:00
Thiago Santos 3a70cf5667 camerabin: digitalzoom: create a bin element for digital zooming
It contains videocrop ! videoscale ! capsfilter and implements digital
zooming.

At this moment, it is a private element of the camerabin plugin.

This will remove some code used in wrappercamerabinsrc to make
code clearer and digitalzoom can potentially be used by other
applications in the future, it has nothing camerabin specific.
2015-04-27 21:13:47 -03:00
Luis de Bethencourt d45a1253b1 mpegdemux: remove unused property enum item
The property enum item has been there since the origin of the element but it
has never been used. Removing it.
2015-04-27 14:56:13 +01:00
Luis de Bethencourt 925b65b02e Rename property enums from ARG_ to PROP_
Property enum items should be named PROP_ for consistency and readability.
2015-04-27 10:55:18 +01:00
Tim-Philipp Müller 699452ef31 Remove obsolete Android build cruft
This is not needed any longer.
2015-04-26 18:59:32 +01:00
Stefan Sauer 707b0ffcd6 audiovisualizer: fix the license from GPL to LGPL
This was a copy'n'paste buf in the initial commit done by myself.
2015-04-25 18:50:52 +02:00
Stefan Sauer da29bdc71a audiovisualizer: fix the license from GPL to LGPL
This was a copy'n'paste buf in the initial commit done by myself.
2015-04-25 18:46:41 +02:00
Thiago Santos c6f4e4cfd8 wrappercamerabinsrc: Rework cropping for zoom and dimension reduction
wrappercamerabinsrc has a videocrop element to be used for
zooming and for cropping when input caps is different when used
with the GstPhotography interface. The zooming part needs
the following elements:

capsfilter ! videocrop ! videoscale ! capsfilter

The capsfilters should always have the same caps to ensure the
zooming is done and preserves dimensions, unless when it is needed
to do more cropping due to input dimensions those caps
need to be modified accordingly to preserve the output dimensions.

This, however, makes it hard to get caps negotiation to work properly
as we need to have different caps in the capsfilters to account for
the extra cropping needed. It could be simple for fixed caps but it
gets tricky with unfixed ones.

To solve this, this patch splits the zooming and dimension reduction
cropping into 2 separate videocrop elements. The first one does
the dimension cropping, which is only needed when the GstPhotography
API is used and the source provides a caps that is different than
what is requested, while the second is dedicated to zoom crop only.

The first part of the pipeline goes from:

src ! videoconvert ! capsfilter ! videocrop ! videoscale ! capsfilter

to

src ! videocrop ! videoconvert ! capsfilter ! videocrop ! videoscale ! capsfilter

It might add an extra overhead in the image capture as the image might need
to be cropped twice but this can be solved by enabling videocrop to use
crop metas so only the later one does the real cropping.

It also makes the code a bit simpler.
2015-04-24 15:12:47 -03:00
Thiago Santos 524e536a91 wrappercamerabinsrc: remove obsolete comment
This is already handled in another place and doesn't make sense
in the function context anymore
2015-04-24 15:12:47 -03:00
Thiago Santos 7b834cb0b3 wrappercamerabinsrc: error out if source fails to prepare for capture
Post an error when preparing the image capture through photography
interface fails
2015-04-24 15:12:46 -03:00
Thiago Santos 0c04f2f0ff wrappercamerabinsrc: intersect instead of compare for equality
Intersect is enough to check if the requested caps are compatible
with what the source is going to provide. Equality will be too strict.
2015-04-24 15:12:46 -03:00
Thiago Santos af1dda2ecd wrappercamerabinsrc: fix typo 2015-04-24 15:12:46 -03:00
Luis de Bethencourt c944093d08 remove unused enum items PROP_LAST
This were probably added to the enums due to cargo cult programming and are
unused.
2015-04-24 16:48:26 +01:00
Luis de Bethencourt e5d62b073b gaudi: don't run gaussian function if sigma is 0 2015-04-23 11:47:37 +01:00
Luis de Bethencourt 8305f14ded gaudi: fix to 30780db1
The second check for (factor == 0) creeped in the last commit.
Apologies.
2015-04-22 15:04:05 +01:00
Luis de Bethencourt 30780db15b gaudi: fix exclusion's factor range
Avoid dividing by zero when the factor is zero. Instead, output a buffer with
all color values as zero.
2015-04-22 14:55:33 +01:00
Luis de Bethencourt 1fee98f5dd gaudi: remove floor variable in solarize
Floor variable has no effect and it isn't worth it to have it adjustable.
2015-04-22 14:15:17 +01:00
Luis de Bethencourt 2fbbdb5529 gaudi: remove unused property 2015-04-22 14:06:53 +01:00
Thiago Santos 70193761b8 wrappercamerabinsrc: Reset zoom element caps to go to viewfinder mode
Avoids not-negotiated failures related to using image capture caps
still when adjusting to go back to viewfinder.
2015-04-21 10:00:44 -03:00
Thiago Santos ef5b7ca93e wrappercamerabinsrc: fix leak of drain query
gst_pad_peer_query doesn't take ownership of the query object
2015-04-21 10:00:44 -03:00
Thiago Santos b74770bd05 wrappercamerabinsrc: Refactor internal pipeline
Remove tee and output-selector and just link the source
pad to the outputs we want as needed.

The way we need to prioritize caps negotiation and allocation
queries depending on the mode enabled is too custom to be
handled using tee and output-selector.
This provides more flexibility and doesn't get in the way of proper
handling of negotiation and allocation queries.
2015-04-21 10:00:44 -03:00
Edward Hervey 8ba1fbbe64 h264parse: Remove dead code
The detection for missing format/alignment is done way before this
codepath is reached (at which point we have already decided of a
format and alignment).

CID #1232800
2015-04-20 14:35:19 +02:00
Luis de Bethencourt fa4822a41b tsdemux: clean assignment typo
No need to set the value twice.

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

CID #295122
2015-04-20 11:30:28 +01:00
Luis de Bethencourt f52cf2a7c4 tsdemux: remove dead code
position of GstSegment is an unsigned int64, it can never be below zero.

CID #1295123
2015-04-20 10:58:33 +01:00
Vineeth T M 3daa793494 fieldanalysis: exception when block width to 0
When block width property is set to 0, exception occurs.
This happens due to divide by zero errors in calculations.
block width property can never be 0. Hence adjusting the minimum value to 1.

https://bugzilla.gnome.org/show_bug.cgi?id=744188
2015-04-20 09:42:14 +01:00
Olivier Crête b4219a3e63 mpegtsbase: Remove unused latency query code
The behavior changes based on the type of segment,
not on the liveness of the source.
2015-04-17 13:59:08 -06:00
Olivier Crête a1f709c293 tsdemux: Cleanup latency query handling
The minimum latency is always 0 or more. And we should
requery upstream as it may have changed.
2015-04-17 13:59:08 -06:00
Edward Hervey ed27244c03 mpegtspacketizer: Unify debug statements
Use 0x%04x for PIDs
2015-04-17 16:21:28 +02:00
Edward Hervey b80ae9cdcd tsdemux: Unify duration querying code
And properly use it in the SEEKING query.

Fixes seeking with gst-play
2015-04-17 16:21:28 +02:00
Vincent Penquerc'h d84d803431 mpegdemux: fix pad leak when not adding a new pad after no-more-pads 2015-04-16 13:35:40 +01:00
Vincent Penquerc'h cb0eaeadfd tsdemux: fix segment position tracking for the general case
Different streams can have different PTS/DTS bases, and some
streams may not even have DTS.

https://bugzilla.gnome.org/show_bug.cgi?id=745102
2015-04-16 13:35:40 +01:00
Sebastian Dröge 9b50a12b52 h264parse: Don't unref buffer that was unreffed just a few lines before already 2015-04-15 21:07:59 +02:00
Olivier Crête c4c9fe60b6 pcapparse: Take buffer directly from the adapter
No need to make a copy into a new buffer, just take the data
from the adapter.
2015-04-10 20:27:15 -04:00
Olivier Crête a2b093af47 pcapparse: Produce GstBufferList 2015-04-10 20:27:15 -04:00
Thiago Santos 5a1c73a105 wrappercamerabinsrc: remove unused attribute and related pad probe
The variable was never set to true and can be removed along
with the probe in which it used to act
2015-04-10 16:23:25 -03:00
Vincent Penquerc'h 338bfe5e35 tsdemux: handle seeks with no target (ie, keep current position)
Such seeks are used to change playback rate and we do not want
to alter the position in that case, so we bypass the flush/seek
logic, and set things up so a new segment is scheduled to be
regenerated.

https://bugzilla.gnome.org/show_bug.cgi?id=735100
2015-04-09 15:44:20 +01:00
Vincent Penquerc'h 68f57d20b9 tsparse: fix timestamps not updating after a PMT change
The PCRs stay locked onto the same PID as before the change,
but the relevant PID has no reason to be the same after it.

https://bugzilla.gnome.org/show_bug.cgi?id=745102
2015-04-09 15:44:20 +01:00
Vincent Penquerc'h ade79a9ad2 tsdemux: send new segment when a stream is added
This will happen when the PMT changes, replacing streams with
new ones. In that case, we need to accumulate the running time
from the previous chain in the segment base.

https://bugzilla.gnome.org/show_bug.cgi?id=745102
2015-04-09 15:44:20 +01:00
Vincent Penquerc'h fc2460b331 tsdemux: keep track of current position
This allows seeking to correctly set the base on the segment.

https://bugzilla.gnome.org/show_bug.cgi?id=745102
2015-04-09 15:44:20 +01:00
Guillaume Desmottes 4d790dae67 mxfdemux: fix memory leak
Reset the internal segment before freeing it.

mxf_index_table_segment_parse() allocates data inside the segment
(like segment->delta_entries) which have to be freed using
mxf_index_table_segment_reset().

https://bugzilla.gnome.org/show_bug.cgi?id=746803
2015-04-04 19:47:40 +01:00
Olivier Crête 34a921c31b audiomixer: Allow downstream caps with a non-default channel-mask
Instead of failing, take the downstream channel mask if the channel
count is 1.
2015-04-01 20:32:41 -04:00
Mark Nauwelaerts 32e87b1024 mxfdemux: resurrect some flow return handling
https://bugzilla.gnome.org/show_bug.cgi?id=744572
2015-03-28 18:22:29 +01:00
Mark Nauwelaerts b2d109242f mpegdemux: resurrect some flow return handling
https://bugzilla.gnome.org/show_bug.cgi?id=744572
2015-03-28 18:22:29 +01:00
Luis de Bethencourt 78ce8ff74f audioaggregator: check sink caps are valid 2015-03-24 16:18:22 +00:00
Luis de Bethencourt cfdcb14730 Revert "audioaggregator: check sink caps are valid"
This reverts commit 6d4d0d1cdf.

Never put code with side effects into an assertion, it can be compiled out
2015-03-24 16:17:00 +00:00
Luis de Bethencourt 6d4d0d1cdf audioaggregator: check sink caps are valid
CID #1291622
2015-03-24 15:53:17 +00:00
Luis de Bethencourt b3ad336af1 gaudieffects: clean solarize code 2015-03-23 15:10:39 +00:00
Luis de Bethencourt 70cc73fd70 gaudieffects: removing values only used once 2015-03-23 15:10:39 +00:00
Luis de Bethencourt 110fa9c09c gaudieffects: small cleanup in headers 2015-03-23 15:10:39 +00:00
Luis de Bethencourt fd3c60de34 gaudieffects: update copyright dates of dilate 2015-03-19 13:59:42 +00:00
Luis de Bethencourt 78ebbb4fd7 gaudieffects: factorize transform code of dilate 2015-03-19 13:58:21 +00:00
Olivier Crête 224f14a299 audiointerleave: Set src caps in aggregate
This prevents races between the setcaps of the sink pads

https://bugzilla.gnome.org/show_bug.cgi?id=740236
2015-03-16 16:44:03 -04:00
Olivier Crête b08b01895f audiointerleave: Add interleave element based on audioaggregator
https://bugzilla.gnome.org/show_bug.cgi?id=740236
2015-03-16 16:44:03 -04:00
Olivier Crête c565877991 audioaggregator: Print a message when a buffer is late
https://bugzilla.gnome.org/show_bug.cgi?id=740236
2015-03-16 16:44:03 -04:00
Olivier Crête 01520c7e47 audioaggregator: Don't re-send the caps if they did not change
https://bugzilla.gnome.org/show_bug.cgi?id=740236
2015-03-16 16:41:45 -04:00
Olivier Crête 959f8e4a3e audioaggregator: Split base class from audiomixer
Also:
-  Don't modify size on early buffer
   The size is the size of the buffer, not of remaining part.
- Use the input caps when manipulating the input buffer
   Also store in in the sink pad
- Reply to the position query in bytes too
- Put GAP flag on output if all inputs are GAP data
- Only try to clip buffer if the incoming segment is in time or samples
- Use incoming segment with incoming timestamp
   Handle non-time segments and NONE timestamps
- Don't reset the position when pushing out new caps
- Make a number of member variables private
- Correctly handle case where no pad has a buffer
  If none of the pads have buffers that can be handled, don't claim to be EOS.
- Ensure proper locking
- Only support time segments

https://bugzilla.gnome.org/show_bug.cgi?id=740236
2015-03-16 16:41:45 -04:00
Olivier Crête ff9be3ba34 audiomixer: Release pad object lock before dropping buffer
Otherwise, the locking order is violated and deadlocks happen.

https://bugzilla.gnome.org/show_bug.cgi?id=745768
2015-03-16 14:31:50 -04:00
Olivier Crête 2d553d1b25 audiomixer: Only ignore pads with no buffers on timeout
When the timeout is reached, only ignore pads with no buffers, iterate
over the other pads until all buffers have been read. This is important
in the cases where the input buffers are smaller than the output buffer.

https://bugzilla.gnome.org/show_bug.cgi?id=745768
2015-03-16 14:31:50 -04:00
Olivier Crête 9c49624610 audiomixer: Only advance by the buffer size when a buffer is late
https://bugzilla.gnome.org/show_bug.cgi?id=745768
2015-03-16 14:31:50 -04:00
Jan Schmidt d5ca311a0d compositor: Revert most of previous patch.
The calculation doesn't produce the same results.
Keep just the change to divide alpha by 255 instead of 256,
for slightly better accuracy
2015-03-16 04:00:44 +11:00
Tim-Philipp Müller 5c3652dd22 mpegtsmux: drop some superfluous assertions
g_return_*_if_fail() is for public API to catch
programming errors. For internal code, we should
just use g_assert() to check internal state.
2015-03-15 16:10:31 +00:00
Jesper Larsen 67d46d9934 mpegtsmux: Fix namespace of some internal functions
https://bugzilla.gnome.org/show_bug.cgi?id=733347
2015-03-15 14:10:32 +00:00
Jan Schmidt badc0438d6 compositor: Fix blending functions
Correctly calculate alpha in a few places by dividing by 255,
not 256.

Fix the argb and bgra blending functions to avoid an off-by-one
error in the calculations, so painting with alpha = 0xff doesn't
ever bleed through from behind
2015-03-16 00:33:23 +11:00
Tim-Philipp Müller 09c05df889 mpegtsmux: make "alignment" property more useful for packetisation
Currently the alignment property just makes sure that we
output things in multiples of align*packet_size bytes, but
with no clear maximum size. When streaming MPEG-TS over
UDP one wants buffers with a maximum packet size of 1316.
The alignment property so far would just output buffers
that are a multiple of 1316 then.

Instead we now make the alignment property output
individual buffers with the alignment size, which
is entirely backwards compatible with the expected
behaviour up until now. For efficiency reason
collect all those buffers in a buffer list and
send that downstream.

Also collect data to push downstream in a buffer
list from the adapter if we don't align things,
which is still more efficient because of the
silly way the muxer currently creates output
packets.

https://bugzilla.gnome.org/show_bug.cgi?id=722129
2015-03-15 12:07:03 +00:00
Thiago Santos 187d4441eb camerabin: remove hack around bug 648359
It is already fixed
2015-03-14 18:29:28 +00:00
Thiago Santos 888414ed11 camerabin: remove deprecated g_atomic function
We depend on 2.32 already
2015-03-14 18:29:28 +00:00
Thiago Santos 5c20c2e211 wrappercamerabinsrc: fix pad leak
Only get the pad if it is really going to be used to avoid
leaking it
2015-03-14 18:29:28 +00:00
Ramiro Polla f532a72406 sdpdemux: properly escape percent sign in documentation 2015-03-14 14:24:17 +00:00
Sebastian Dröge 472069a699 audiomixer: Fix discont detection and buffer alignment code
Actually accumulate the sample counter to check the accumulated error
between actual timestamps and expected ones instead of just resetting
the error back to 0 with every new buffer.

Also don't reset discont_time whenever we don't resync. The whole point of
discont_time is to remember when we first detected a discont until we actually
act on it a bit later if the discont stayed around for discont_wait time.

https://bugzilla.gnome.org/show_bug.cgi?id=746032
2015-03-12 17:14:33 +00:00
Nirbheek Chauhan 3d9020e564 audiomixer: Add locking to fill_buffer and fix mix_buffer
The audiomixer pad struct fields may be changed from other threads
2015-03-12 09:53:28 +00:00
Nirbheek Chauhan 0f72e4ccf7 audiomixer: Mark a discont when we receive a new segment event
This allows us to handle new segment events correctly; either by dropping
buffers or inserting silence; for example if the offset is changed on an srcpad
connected to audiomixer.
2015-03-12 09:52:15 +00:00