Commit graph

6481 commits

Author SHA1 Message Date
Sebastian Dröge
debf5340bb compositor: Remove unused zorder pad property
It's handled in videoaggregator already.
2014-11-26 12:42:24 +01:00
Sebastian Dröge
7eef9dd0ad compositor: GstVideoMeta is supported just fine, tell upstream about that
Also provide a GstVideoBufferPool to upstream just in case.
2014-11-25 19:03:21 +01:00
Ramprakash Jelari
f9e50eee58 mpegtspacketizer: Fix format string compiler warning 2014-11-24 13:34:21 +01:00
Wonchul Lee
aa2ecf5e53 rawparse: send SEEKING query upstream first
Sometimes rawparse does not handle the seeking query
properly, the rawparse should send the query upstream
first. For example, upstream could support seeking in
TIME format (but not in BYTE format), so the BYTE format
seeking query that rawparse sends in push mode would
fail.

https://bugzilla.gnome.org/show_bug.cgi?id=722764
2014-11-22 17:51:01 +00:00
Sebastian Dröge
6c3b3bef4e interaudiosink: Make sure to store at least period-time samples at once in the adapter
It's better to create some more silence than having the source pull multiple
short buffers out of the adapter and insert silence between them.
2014-11-12 18:10:45 +01:00
Sebastian Dröge
411795560f intervideosrc: Stop showing the current frame after 1 second, not after 30 frames 2014-11-12 13:59:23 +01:00
Sebastian Dröge
cf5cd85a3b interaudiosrc: Make sure we have a writable buffer before we start changing metadata 2014-11-11 11:18:40 +01:00
Sebastian Dröge
ce6222f8d4 intervideosrc: Set the GAP flag on repeated buffers
videorate does the same and it allows optimizations downstream.
2014-11-11 11:18:40 +01:00
Sebastian Dröge
3d1cd1011b interaudiosrc: Set the GAP flag on buffers that only contain silence 2014-11-11 11:18:40 +01:00
Tim-Philipp Müller
6e3518dfd6 pngparse: optimise reading of png files
Read PNG data chunk in one go by letting the parser
base class know the size we need, so that it doesn't
drip-feed us small chunks of data (causing a lot of
reallocs and memcpy in the process) until we have
everything.

Improves parsing performance of very large PNG files
(65MB) from ~13 seconds to a couple of millisecs.

https://bugzilla.gnome.org/show_bug.cgi?id=736176
2014-11-09 21:02:15 +00:00
Aurélien Zanelli
6b5e950236 vc1parse: set seq_layer_sent to FALSE on reset()
https://bugzilla.gnome.org/show_bug.cgi?id=738526
2014-11-08 19:01:10 +01:00
Aurélien Zanelli
025f8b9129 vc1parse: implement asf to *-frame-layer stream-format
This commit add an helper to convert a frame to frame-layer format and
use it to implement these two stream-format conversion:
- asf --> sequence-layer-frame-layer
- asf --> frame-layer

In simple/main profile, we basically have a raw frame, so building a
frame layer isn't too complicated. But in advanced profile, the first
frame-layer should contain sequence-header, entrypoint, and frame and
each keyframe should contain entrypoint, so we have to handle these
carefully.

https://bugzilla.gnome.org/show_bug.cgi?id=738526
2014-11-08 19:01:10 +01:00
Aurélien Zanelli
7d76ba5731 vc1parse: check output format at negotiation time
Add an helper to check that output stream-format is coherent with
profile and header-format. It also check if we know how to do the
conversion if the input stream-format differs from selected
output-format.
So, in case output stream-format is not allowed, it will now fail at
negotiation rather than in pre_push_frame.

https://bugzilla.gnome.org/show_bug.cgi?id=738526
2014-11-08 19:01:10 +01:00
Aurélien Zanelli
5eadb05fab vc1parse: add some asf related stream-format conversions
This commit introduces an helper to convert an ASF frame to BDUs format with
startcodes and use this helper to implements following stream-format
conversions:
- asf --> bdu
- asf --> sequence-layer-bdu
- asf --> sequence-layer-raw-frame

https://bugzilla.gnome.org/show_bug.cgi?id=738526
2014-11-08 19:01:10 +01:00
Aurélien Zanelli
f2c5900c6d vc1parse: add some simple stream-format conversion
It add the support of following stream-format conversion:
- bdu --> sequence-layer-bdu
- bdu-frame --> sequence-layer-bdu-frame
- frame-layer --> sequence-layer-frame-layer

For these conversion, the only requirements is to push a sequence-layer
buffer prior to data.

https://bugzilla.gnome.org/show_bug.cgi?id=738526
2014-11-08 19:01:10 +01:00
Aurélien Zanelli
cd500c5a06 vc1parse: prepare the stream-format conversion code and add the simplest ones
It prepares the template for stream-format conversion and it implements
the following conversion:
- sequence-layer-bdu --> bdu
- sequence-layer-bdu-frame --> bdu-frame
- sequence-layer-frame-layer --> frame-layer

Work is done in the pre_push_frame() method.

https://bugzilla.gnome.org/show_bug.cgi?id=738526
2014-11-08 19:01:10 +01:00
Josep Torra
d518033e77 h264parse: set the HEADER flag on buffers containing SPS or PPS 2014-11-07 15:51:48 +01:00
Josep Torra
4b43e95ebd h265parse: set the HEADER flag on buffers containing VPS, SPS or PPS 2014-11-07 15:51:48 +01:00
Sebastian Dröge
0fc6cc6874 intervideosrc: Print a warning into the debug log on generating black frames 2014-11-06 17:36:15 +01:00
Sebastian Dröge
e6b5a271a1 intervideosink: Add some debug output in the render function 2014-11-06 17:21:39 +01:00
Sebastian Dröge
df64862ebe h265parse: don't unnecesarily set src_caps
https://bugzilla.gnome.org/show_bug.cgi?id=739374
2014-11-06 11:53:04 +01:00
Matej Knopp
1f367764fc h264parse: don't unnecesarily set src_caps
https://bugzilla.gnome.org/show_bug.cgi?id=739374
2014-11-06 11:51:59 +01:00
Sebastian Dröge
017a8c8369 interaudiosrc: Fix compiler warning about unused variables
gstinteraudiosrc.c: In function 'gst_inter_audio_src_create':
gstinteraudiosrc.c:339:27: error: variable 'buffer_samples' set but not used [-Werror=unused-but-set-variable]
   guint64 period_samples, buffer_samples;
                           ^
2014-11-04 15:16:33 +01:00
Sebastian Dröge
5c7d0a1553 interaudio: Make buffer size and latency handling more explicit and add properties for them
This now makes audio work more reliable without disconts.
2014-11-04 14:56:55 +01:00
Sebastian Dröge
2939337b61 interaudiosink: Use the bpf from the audio info instead of hardcoding 4 2014-11-04 13:59:20 +01:00
Sebastian Dröge
c10f5eecea interaudio: Only flush the ringbuffer on the sink side 2014-11-04 13:58:44 +01:00
Sebastian Dröge
6a36b53831 interaudiosink: Flush the adapter when we get new caps
Ideally we would drain the source but that would require more coordination
between sink and source than what we currently have.
2014-11-04 13:47:38 +01:00
Sebastian Dröge
dda95aeb50 intervideosrc: Negotiate framerate with downstream
Prefer the closest framerate to the input framerate though.
2014-11-03 16:54:58 +01:00
Sebastian Dröge
85f66e3531 inter*src: No need to set caps manually on the pad
basesrc does that for us already.
2014-11-03 16:24:33 +01:00
Wim Taymans
4e8d93c44a inter: fix order of arguments 2014-11-03 15:19:48 +01:00
Sebastian Dröge
f660537fd5 interaudio: Set all required fields on the template caps
https://bugzilla.gnome.org/show_bug.cgi?id=739542
2014-11-03 10:05:59 +01:00
Tim-Philipp Müller
4a84fd9355 inter: don't leak surface name 2014-11-02 23:24:39 +00:00
Tim-Philipp Müller
074d6347d1 mpegdemux: start pushing data again when a pad gets linked later
The whole not_linked optimisation is really a bit dodgy here, but
let's leave it in place for now and at least start pushing data
again when a pad got linked later, in which case we should get a
RECONFIGURE event.
2014-11-02 22:49:05 +00:00
Tim-Philipp Müller
2a93e71e67 mpegdemux: namespace fixes 2014-11-02 22:46:49 +00:00
Tim-Philipp Müller
d5c7a09a83 audiovisualizer: post QoS messages when dropping frames due to QoS 2014-11-02 19:26:20 +00:00
Tim-Philipp Müller
77e5c7644c audiovisualizer: fix boilerplate macros 2014-11-02 19:12:56 +00:00
Luis de Bethencourt
3e452352f0 gaudieffects: remove < 0 comparison on guint32
Current CLAMP checks both if the value is below 0 or above 255. Considering it
is an unsigned value it can never be less than zero, so that comparison is
unnecessary. Switching to using if just for the upper bound.

CID #1139796
2014-10-30 17:06:01 +00:00
Luis de Bethencourt
267bc774ec gaudieffects: declare floor and ceiling as constants 2014-10-30 16:16:19 +00:00
Luis de Bethencourt
381eb9537c gaudieffects: stored value is overwritten
Value from left_luminance is assigned to out_luminance here, but that stored
value is not used before it is overwritten in the next cycle of the loop.
Removing assignation.

CID #1226473
2014-10-30 15:51:46 +00:00
Matthieu Bouron
0b040b7131 mpegtsbase: do not remove programs on EOS
As a consequence, tsdemux won't remove its pads anymore on EOS.

Fixes the case when mpegtsbase is not able to process new packets
after EOS as the corresponding pids aren't known anymore because
the programs were removed and the pes/psi were kept, preventing the
PAT to be parsed again.

https://bugzilla.gnome.org/show_bug.cgi?id=738695
2014-10-30 16:28:40 +01:00
Vincent Penquerc'h
a5350f2d0c siren: fix sample rate list
It was using a 24000/24000/48000, but I think it meant to use
24000/32000/48000. Not 100% sure...

https://en.wikipedia.org/wiki/G.722.1 has the list of supported
bitrates. It's not clear whether the "flag" code maps to this,
however.

Coverity 206072
2014-10-30 15:21:15 +00:00
Sreerenj Balachandran
3776e78ae6 codecparsers: h264: add support for Frame Packing Arrangement SEI message.
This parses the frame_packing_arragement() payload in SEI message.
This information can be used by decoders to appropriately rearrange the
samples which belong to Stereoscopic and Multiview High profiles.

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

Signed-off-by: Sreerenj Balachandran <sreerenj.balachandran@intel.com>
Signed-off-by: Gwenole Beauchesne <gwenole.beauchesne@intel.com>
2014-10-29 23:09:41 +11:00
Sreerenj Balachandran
51f003e469 codecparsers: h264: add support for Stereo Video Information SEI message.
Add the necessary payload parsing support for stereo_video_info.

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

Signed-off-by: Sreerenj Balachandran <sreerenj.balachandran@intel.com>
2014-10-29 23:09:41 +11:00
Jan Schmidt
068cba5df6 tsparse: Handle backward and discont timestamps better.
Assume that small backward PCR jumps are just from upstream packet
mis-ordering and don't reset timestamp tracking state - assuming that
things will be OK again shortly.

Make the threshold for detecting discont between sequential buffers
configurable and match the smoothing-latency setting on tsparse
to better cope with data bursts.
2014-10-29 23:02:50 +11:00
Jan Schmidt
a49ce685d1 tsparse: Implement timestamp/retimestamping of output buffers
When the set-timestamps property is set, use PCRs on the provided
(or autodetected) pcr-pid to apply (or replace) timestamps on the
output buffers, using piece-wise linear interpolation.

This allows tsparse to be used to stream an arbitrary mpeg-ts file,
or to smooth jittery reception timestamps from a network stream.

The reported latency is increased to match the smoothing latency if
necessary.
2014-10-29 23:02:50 +11:00
Tim-Philipp Müller
95c211dc49 Add some missing G_END_DECLS 2014-10-28 21:42:31 +00:00
Sebastian Dröge
56e49ce3b6 inter: Use 64-bit safe scaling functions 2014-10-27 15:35:43 +01:00
Vootele Vesterblom
9e6377d4b7 rawparse: fix handling of segment event in sink event handler 2014-10-23 16:47:25 +02:00
Sebastian Dröge
76f879525d interaudio: Add support for arbitrary raw audio formats 2014-10-22 19:34:17 +02:00
Sebastian Dröge
9bcc1aa274 intervideo: Add support for arbitrary video formats 2014-10-22 19:31:31 +02:00
Sebastian Dröge
1363a244a0 inter: Truncate the caps as part of the fixating 2014-10-22 19:28:48 +02:00
Sebastian Dröge
04dbd095a1 interaudio: Fix timestamp, latency and period handling 2014-10-22 19:09:15 +02:00
Sebastian Dröge
8c5a8c76f6 interaudio: Use GST_DEBUG_OBJECT() instead of GST_DEBUG() 2014-10-22 19:09:15 +02:00
Sebastian Dröge
6f72e8ceab interaudio: Properly pass through caps from the sink to the source
Otherwise a magic capsfilter after the source is required with
exactly the same caps as the input.
2014-10-22 19:09:15 +02:00
Sebastian Dröge
211a39e55e inter: Clean up surfaces after the last user is gone 2014-10-22 19:09:15 +02:00
Sebastian Dröge
f3ce87d1bd inter: Whitespace cleanup 2014-10-22 19:09:15 +02:00
Sebastian Dröge
b7ed4e9355 intervideo: Properly pass through caps from the sink to the source
Otherwise a magic capsfilter after the source is required with
exactly the same caps as the input.

This would've failed before with invalid buffer sizes:
gst-launch-1.0 videotestsrc ! intervideosink  intervideosrc ! "video/x-raw,width=640,height=480" ! xvimagesink
2014-10-22 19:09:01 +02:00
Sebastian Dröge
1dd83ca6ee rawparse: Check for 0-size after adjusting the size for the frame size
If we don't have a complete raw audio frame we would otherwise still
ask for a 0 sized buffer from the adapter.
2014-10-22 15:07:04 +02:00
Sebastian Dröge
ee0ccf64c5 rawparse: Don't try to retrieve 0 byte buffers from the adapter in multi-frame mode 2014-10-22 14:44:20 +02:00
Vineeth T M
aec1f2a001 audiomixer: critical error for blocksize, timeout min/max values
Audiomixer blocksize, cant be 0, hence adjusting the minimum value to 1
timeout value of aggregator is defined with MAX of MAXINT64,
but it cannot cross G_MAXLONG * GST_SECOND - 1
Hence changed the max value of the same

https://bugzilla.gnome.org/show_bug.cgi?id=738845
2014-10-21 10:58:48 +02:00
Matthew Waters
f0caf04ad6 videoaggregator: operate on caps rather than video info
Otherwise the CapsFeatures will be lost along with the possibility
of multiple output types and formats.

https://bugzilla.gnome.org/show_bug.cgi?id=738129
2014-10-21 01:14:36 +11:00
Aurélien Zanelli
4cc6c7fe3b vc1parse: introduce a helper to make sequence-layer
It will be useful to implement stream-format conversion.

https://bugzilla.gnome.org/show_bug.cgi?id=738526
2014-10-20 13:17:57 +02:00
Tim-Philipp Müller
2cd4f5d0c1 tsdemux: send initial GAP event on sparse streams for faster startup with playbin
Signal sparse streams properly in stream-start event and force sending
of pending sticky events which have been stored on the pad already and
which otherwise would only be sent on the first buffer or serialized
event (which means very late in case of subtitle streams). Playsink in
playbin waits for stream-start or another serialized event, and if we
don't do this it will wait for the multiqueue to run full before
starting playback, which might take a couple of seconds.

https://bugzilla.gnome.org/show_bug.cgi?id=734040
2014-10-20 12:32:19 +02:00
Edward Hervey
b59a9262c0 tsdemux: GAP detection
All pads of a stream are now added at the beginning. In order to cope with
streams that don't get any data (forever or for a long time) we detect gaps
and push out GAP events when needed.

Cleanups and commenting by Jan Schmidt <jan@centricular.com>

https://bugzilla.gnome.org/show_bug.cgi?id=734040
2014-10-20 12:32:10 +02:00
Aurélien Zanelli
89455b7106 vc1parse: select caps according to wmv format at negotiation
Some VC1 decoder can have different caps according to wmv format, ie
WMV3 or WVC1.
So instead of keeping the first available caps, we interserct with
current WMV format.

https://bugzilla.gnome.org/show_bug.cgi?id=738532
2014-10-20 12:18:50 +02:00
Sebastian Dröge
fff292438c rtpbad: Fix make dist by removing non-existing file from EXTRA_DIST
It's used by the rtp plugin in gst-plugins-good for VP8 but not needed
or used here.
2014-10-19 13:44:38 +02:00
Thijs Vermeir
a7ec281c43 rtpbad: include plugins base cflags (fix build on jenkins) 2014-10-17 16:51:27 +02:00
Thijs Vermeir
293522d418 rtp: add h265 RTP payloader + depayloader 2014-10-17 10:40:24 +02:00
Aurélien Zanelli
6375fce925 vc1parse: parse frame header when stream format is ASF/raw for simple/main profile
When stream-format is ASF or sequence-layer-raw-frame, we basically have
a raw frame so we can parse it to extract some information such the
keyframe flag. The only requirement is to have a valid sequence-header.

This commit parse the frame header and set the DELTA_UNIT buffer flag in
case the frame is not a keyframe.

https://bugzilla.gnome.org/show_bug.cgi?id=738519
2014-10-14 14:02:30 +02:00
Aurélien Zanelli
77453c8124 vc1parse: just assume none header-format when no codec_data is present
https://bugzilla.gnome.org/show_bug.cgi?id=738449
2014-10-14 10:23:28 +02:00
Aurélien Zanelli
6df477ff0d vc1parse: fix framesize when input is frame-layer
frame-layer header is represented as a sequence of 32 bit unsigned
integer serialized in little-endian byte order, so framesize is on the
first 3 bytes.

SMPTE 421M Annex L.

https://bugzilla.gnome.org/show_bug.cgi?id=738243
2014-10-10 11:51:14 +01:00
Antonio Ospite
bc835743a4 midiparse: mention fluiddec instead of fluidsynth
The element name is actually fluiddec even if it uses fluidsynth.

https://bugzilla.gnome.org/show_bug.cgi?id=738223
2014-10-10 11:29:45 +01:00
David Woodhouse
684d041896 pcapparse: Add support for LINKTYPE_RAW
Also, strictly speaking, these numbers aren't DLT_*; they are LINKTYPE_* because
libpcap translates from internal OS-specific DLT_ numbering to the portable
LINKTYPE_ number space when writing files.

https://bugzilla.gnome.org/show_bug.cgi?id=738206
2014-10-09 12:46:10 -04:00
Matthew Waters
b9db635f48 aggregator: add latency query handling 2014-10-09 23:52:11 +11:00
Sebastian Dröge
2817472b9e h265parse: expose parsed profile, tier and level to downstream
https://bugzilla.gnome.org/show_bug.cgi?id=732239
2014-10-09 11:46:23 +03:00
Sreerenj Balachandran
b1a286cd7c h264parse: expose parsed profile and level to downstream
Set parsed profile and level in src caps.

https://bugzilla.gnome.org/show_bug.cgi?id=732239
2014-10-09 11:46:18 +03:00
Thibault Saunier
33fbf7f16d audiomixer: Handle seek event in READY state 2014-10-06 18:57:28 +02:00
Thibault Saunier
27b8d981c7 audiomixer: Set the sinkpad segments basetime after seeking
Otherwise stream offset and running time comparison will not be
correct, leading to segfaults after seeks
2014-10-06 18:57:28 +02:00
Thibault Saunier
dd65d70f65 audiomixer: Port to GstAggregator
https://bugzilla.gnome.org/show_bug.cgi?id=737183

Co-Authored by: Mathieu Duponchelle <mathieu.duponchelle@opencreed.com>
2014-10-06 18:57:28 +02:00
Vineeth T M
52ac7cf27a videoparser: comment unused GST_BASE_PARSE_FRAME_FLAG_PARSING
GST_BASE_PARSE_FRAME_FLAG_PARSING value is wrong, and the same flag is
not being used presently. Hence changing the value and commenting it out.
This needs to be included in baseparse.h later on

https://bugzilla.gnome.org/show_bug.cgi?id=737411
2014-10-06 11:48:08 +01:00
Vineeth T M
14acb6fb37 gst: remove unnecessary GLIB_DISABLE_DEPRECATION_WARNINGS
There are unnecessary definitions for disabling deprecation warnings.
Since GLIB_DISABLE_DEPRECATION_WARNINGS is not needed anymore in these files,
removing the same.

https://bugzilla.gnome.org/show_bug.cgi?id=737559
2014-10-02 10:51:35 +03:00
Aurélien Zanelli
677d052e84 vc1parse: unref caps when it is empty in renegotiate()
https://bugzilla.gnome.org/show_bug.cgi?id=737724
2014-10-02 10:43:49 +03:00
Jesper Larsen
1b8e76d235 tsdemux: do not discard on discont if PES start
If a discontinuity in the stream is detected, data is discarded until
a new PES starts. If the first packet after the discontinuity is also
the start of a PES, there is no reason to discard the packets.

https://bugzilla.gnome.org/show_bug.cgi?id=737569
2014-09-29 11:41:01 +02:00
Luis de Bethencourt
efca04f23f style: remove unnecessary break statements
Code flow never arrives to these break statements due to the gotos preceding
them. So the breaks are unnecessary, as discussed in bug 736942.

https://bugzilla.gnome.org/show_bug.cgi?id=737370
2014-09-25 16:41:15 +01:00
Thibault Saunier
4c63326a7a h264parse: Return flushing if we get chained while being set to READY
Or not negotiated in the case we would be actually not negotiated

Currently we are getting assertions from
gst_pb_utils_add_codec_description_to_tag_list because of NULL
caps.

https://bugzilla.gnome.org/show_bug.cgi?id=737186
2014-09-24 19:21:18 +02:00
Jan Schmidt
085a34e4c7 chopmydata: Transfer timestamps to output buffers
Allows using chopmydata as a simple repacketizer
2014-09-24 22:48:56 +10:00
Luis de Bethencourt
4e638096e6 mpegpsmux: refactor duplicate else branches
Unknown case should assert if reached instead of just assuming the max buffer
size.

https://bugzilla.gnome.org/show_bug.cgi?id=736460
2014-09-23 17:55:36 +01:00
Aurélien Zanelli
42167b0d1f vc1parse: initialize sent_codec_tag before using it
https://bugzilla.gnome.org/show_bug.cgi?id=736951
2014-09-23 19:50:26 +03:00
Sanjay NM
511dfd65de videofilters: Add support for more YUV formats
https://bugzilla.gnome.org/show_bug.cgi?id=737111
2014-09-23 19:34:06 +03:00
Sanjay NM
44874d35b5 mpegdemux: removed an unwanted initialization and a variable
https://bugzilla.gnome.org/show_bug.cgi?id=736863
2014-09-18 12:54:05 +03:00
Sanjay NM
b041deb2fa camerabin2: removed redundant initialization
https://bugzilla.gnome.org/show_bug.cgi?id=736853
2014-09-18 12:34:39 +03:00
Aurélien Zanelli
7acf2fe5cb vc1parse: enable header-format conversion
In fact we support header-format conversion which is done in
update_caps() method.

https://bugzilla.gnome.org/show_bug.cgi?id=736786
2014-09-18 12:28:12 +03:00
Aurélien Zanelli
de141c3237 vc1parse: forge sequence-layer from seq_hdr instead of seq_layer
If we don't have a seq_layer_buffer, we also don't have a valid
seq_layer because there are set together in
gst_vc1_parse_handle_seq_layer().

So when output header format is sequence-layer and when we don't have a
seq_layer_buffer, we forge one from seq_hdr.

https://bugzilla.gnome.org/show_bug.cgi?id=736781
2014-09-17 11:37:44 +03:00
Aurélien Zanelli
d2847eaa09 vc1parse: fix sequence-layer/frame-layer endianness
Sequence-layer and frame-layer are serialized in little-endian byte
order except for STRUCT_C and framedata fields as described in SMPTE 421M Annex
L.

https://bugzilla.gnome.org/show_bug.cgi?id=736750
2014-09-16 17:40:55 +03:00
Vineeth T M
5294a68122 vmncdec: modify wrong packetized mode logic
packetized mode is being set when framerate is being set
which is not correct. Changing the same by checking the
input segement format. If input segment is in TIME it is
Packetized, and if it is in BYTES it is not.

https://bugzilla.gnome.org/show_bug.cgi?id=736252
2014-09-16 11:24:53 +03:00
Aurélien Zanelli
2071c13936 vc1parse: fix malformed sequence layer header and STRUCT_C
This commit fix several issues with sequence layer header forging on
update_caps():
- 0x00000004 unsigned integer is before STRUCT_C.

- Set reserved bits of STRUCT_C to their values for simple/main
  profiles in sequence layer header format and ASF header format.

- Sequence layer shall be represented as a sequence of 32 bits unsigned
  integers and shall be serialized in little-endian byte order except
  for STRUCT_C which shall be serialized in big-endian byte-order.

See SMPTE 421M Annex L for more details about sequence layer format.

https://bugzilla.gnome.org/show_bug.cgi?id=736474
2014-09-12 16:10:50 +03:00
Aurélien Zanelli
77b850c08d tsdemux: fix trivial coding style issue
https://bugzilla.gnome.org/show_bug.cgi?id=736531
2014-09-12 11:31:59 +02:00
Aurélien Zanelli
6d767a09d8 tsdemux: fix overflow of packet_length field of PESHeader
packet_length is defined as a guint16 in the PESHeader structure. This
definition match the specification. But since we add 6 bytes to the
packet_length value (length of start_code + stream_id + packet_length),
we can overflow the guint16 when the value in the PES header is greater
than 65529.
So use a guint32 instead of a guint16 to avoid overflow.

https://bugzilla.gnome.org/show_bug.cgi?id=736490
2014-09-12 11:27:52 +02:00
Belozorov Semen
00d0ff6c8e mpegpsmux: fix memory leak when converting H.264 avc to byte-stream format
Fix memory leak for input stream with caps "video/x-h264,stream-format=avc".

https://bugzilla.gnome.org/show_bug.cgi?id=736426
2014-09-11 14:28:23 +01:00
Tim-Philipp Müller
8990a61221 aiffmux: allocate byte writer on stack 2014-09-10 19:27:27 +01:00
Tim-Philipp Müller
c08c99b894 asfmux: allocate byte readers on the stack 2014-09-10 19:19:32 +01:00
Jesper Larsen
ff444dbf6d tsdemux: clear mutex resources in dispose
https://bugzilla.gnome.org/show_bug.cgi?id=736390
2014-09-10 18:53:47 +01:00
Tim-Philipp Müller
7b8bd35d18 Fix up one-element lists in template caps 2014-09-10 17:24:39 +01:00
Thiago Santos
e03e6c1571 Revert "dataurisrc: Remove unnecessary else if condition"
This reverts commit 3024ae9c38.

The *buf can be NULL or not depending if the caller of gst_pad_get_range
function provided or not a buffer.
2014-09-07 01:30:16 -03:00
Vineeth T M
d089c53704 aiffparse: Fix handling of 64 bit floating point data
In gst_aiff_parse_create_caps if and else-if conditions
are duplicated.

https://bugzilla.gnome.org/show_bug.cgi?id=736090
2014-09-05 10:45:57 +03:00
Vineeth T M
3024ae9c38 dataurisrc: Remove unnecessary else if condition
In gst_data_uri_src_create(), buf cannot be NULL, hence
else if (*buf != NULL) will be invalid so removing the
else if condition and adding a check to unreference buf
in else condition, just in case

https://bugzilla.gnome.org/show_bug.cgi?id=735861
2014-09-04 11:31:56 +03:00
Vineeth T M
76e099e5b9 dataurisrc: Make get_uri() threadsafe
https://bugzilla.gnome.org/show_bug.cgi?id=735861
2014-09-02 09:56:41 +03:00
Vineeth T M
114ee3355a zebrastripe: Refactor to remove duplicate code
gst_zebra_stripe_transform_frame_ip_planarY
gst_zebra_stripe_transform_frame_ip_YUY2
gst_zebra_stripe_transform_frame_ip_AYUV
all above 3 functions do the same functionality except for offset and pixel stride.
Hence moving the functionality to a single funtion.

https://bugzilla.gnome.org/show_bug.cgi?id=735032
2014-09-01 10:57:45 -03:00
Tim-Philipp Müller
d8b5675ddc dvbsuboverlay: remove code that can't be reached
If this code could ever be reached, it would leak
memory (CID 1231977), but gst_caps_get_features()
never returns NULL, so that can't happen.
2014-08-29 19:24:52 +01:00
Tim-Philipp Müller
ea7d5027a0 h264parse: fix up handling of input caps corner cases
Do more elaborate validation of the input caps: what fields
are required and/or not allowed. Don't assume AVC3 format
input without codec_data field is byte-stream format. Fix
up some now-unreachable code (CID 1232800).
2014-08-28 20:18:17 +01:00
Sebastian Dröge
25b5da587d rawparse: Reset negotiation state when going back to READY
After going back to READY we can accept new format settings again.
2014-08-28 11:37:56 +03:00
Blake Tregre
105b52e88a rfbsrc: Clamp out of bounds resolutions to prevent segfaults
https://bugzilla.gnome.org/show_bug.cgi?id=726801
2014-08-28 09:53:17 +03:00
Thiago Santos
9b6c8a48b4 h264parse: don't consider unknown stream-format as avc
It should try to use bytestream in these cases that the format
is set to _FORMAT_NONE as it seems that is what the 'else' clause
for bytestream can handle (by defaulting to _FORMAT_BYTESTREAM).
2014-08-25 13:37:57 -03:00
Thiago Santos
52257fe538 tsdemux: remove pads when resetting the element
Otherwise the pads will be there if it is restarted and the stream
can be a completely different one.

https://bugzilla.gnome.org/show_bug.cgi?id=734394
2014-08-19 00:02:33 -03:00
Vineeth T M
8caf5b7360 scenechange: fix crash on startup
gst_video_frame_map() was using the oldinfo GstVideoInfo
before it's been populated, resulting in a crash right
at the start.

https://bugzilla.gnome.org/show_bug.cgi?id=734763
2014-08-14 20:27:00 +01:00
Thibault Saunier
03031037fa tsdemux: Do not tweak segments on reverse playback
We can't compare the first buffer start and the segment start in that
case... playback is going backward!

https://bugzilla.gnome.org/show_bug.cgi?id=734445
2014-08-13 17:46:55 +02:00
Thiago Santos
eee178988a dvbsuboverlay: improve negotiation
Check if downstream supports overlay meta, if possible use it and
if not fallback to no-overlay caps

https://bugzilla.gnome.org/show_bug.cgi?id=733916
2014-08-11 11:35:01 -03:00
Thiago Santos
627b6ac461 dvbsuboverlay: always intersect with the filter in getcaps
Avoids returning unsupported caps to peers

https://bugzilla.gnome.org/show_bug.cgi?id=733916
2014-08-11 11:33:28 -03:00
Sebastian Rasmussen
8ee4e198cc inter: Unref bus after usage
gst_pipeline_get_bus() returns a reference to a bus that needs to
be unreferenced after usage.

Fixes https://bugzilla.gnome.org/show_bug.cgi?id=734525
2014-08-11 10:02:44 +02:00
Sebastian Rasmussen
5d1fedd18e wrappercamerabinsrc: Unref elements after usage
gst_bin_get_by_name() and gst_bin_get_by_interface() both return
references to elements that need to be unreferenced after usage.

https://bugzilla.gnome.org/show_bug.cgi?id=734524
2014-08-10 14:17:55 +01:00
Sebastian Rasmussen
7731f3b36e interlace: fix caps refcounting
tcaps was unrefed when it shouldn't have been unrefed
in some cases.

https://bugzilla.gnome.org/show_bug.cgi?id=734531
2014-08-10 12:04:38 +01:00
Sebastian Rasmussen
128cbf4f57 dvbsuboverlay: Avoid leaking copy of caps object
gst_pad_get_pad_template_caps() returns a reference which is unreferenced,
so creating a copy using gst_caps_copy() results in a reference leak.

Fixes https://bugzilla.gnome.org/show_bug.cgi?id=734528
2014-08-10 11:56:56 +01:00
Sebastian Dröge
54c61efe44 mpegtspacketizer: Store PCR time/byte offsets in 64 bit integers
32 bit integers are going to overflow, especially the PCR offset to
the first PCR will overflow after about 159 seconds. This makes playback
of streams stop at 159 seconds as suddenly the timestamps are starting
again from 0. Now we have a few more years time until it happens again
and 64 bits are too small.
2014-08-05 11:45:55 +02:00
Sebastian Dröge
cb293af93d Revert "mpegtspacketizer: Convert PCR times to GStreamer times before comparing them against 500 * GST_MSECOND"
This reverts commit 9f186c6ab3.

That commit was actually completely wrong, nevermind.
2014-08-05 10:42:28 +02:00
Sebastian Dröge
9f186c6ab3 mpegtspacketizer: Convert PCR times to GStreamer times before comparing them against 500 * GST_MSECOND
Otherwise it will believe to detect PCR gaps already when there's a very small
gap of a few milliseconds, breaking playback of some files.
2014-08-05 10:37:41 +02:00
Thiago Santos
1685c45465 mpegtspacketizer: avoid timestamp overflows
Cause timing to break in the pipeline that can lead to a stall

https://bugzilla.gnome.org/show_bug.cgi?id=733837
2014-08-01 10:37:15 -03:00
Thiago Santos
a70764df5a wrappercamerabinsrc: do not give references to probes
They are kept until the probes are removed but they will never be
removed as the refcount of the element won't get to 0 because the
probes own references (cyclic refs). As the probes should only be
running as long as the element is running there is no need to
secure a ref for them.

Removes 3 leaked refs of wrappercamerabinsrc
2014-07-26 13:27:51 -03:00
Thiago Santos
455baef448 camerabin: use gst_object_ref to make it easier to track refs
Helps debugging
2014-07-26 12:46:01 -03:00
Thiago Santos
34b90db967 wrappercamerabinsrc: unref request pads
Do not forget to unref output-selector requested pads
2014-07-26 12:38:42 -03:00
Thiago Santos
2bfd106ef6 jpegparse: port to baseparse
https://bugzilla.gnome.org/show_bug.cgi?id=728356
2014-07-24 17:07:45 -03:00
Thiago Santos
65676a2f15 wrappercamerabinsrc: only flush buffers if renegotiation is needed
This avoid extra overhead when taking sequential pictures that woudln't
need renegotiation
2014-07-23 13:58:26 -03:00
Thiago Santos
19d5be4c3a camerabin: handle EOS on the pipeline
Make camerabin handle EOS to the pipeline to allow standard pipeline
close where an EOS is sent to the whole pipeline before setting it to NULL.
2014-07-23 13:58:26 -03:00
Mathieu Duponchelle
29dd215649 tsdemux: Do not scan for keyframe when in push mode.
Fixes https://bugzilla.gnome.org/show_bug.cgi?id=733490
2014-07-22 15:51:21 +02:00
Mathieu Duponchelle
39d7d438c6 tsdemux: Do not scan for a keyframe in non-accurate mode.
Fixes https://bugzilla.gnome.org/show_bug.cgi?id=733490
2014-07-22 15:50:59 +02:00
Thiago Santos
6c9fdb52e1 gdppay: remove obsolete code
Buffers have no caps in 1.0
2014-07-22 08:51:32 -03:00
Thiago Santos
ea7b843244 gdppay: put all sticky events in streamheader
Use the sticky events to compose the streamheader as they are the
ones that are persisted to config new pads linked. Instead of storing
them ourselves rely on the pad storage that already orders it for us

https://bugzilla.gnome.org/show_bug.cgi?id=732596
2014-07-22 08:51:32 -03:00
Sanjay NM
00b33e2068 pnmenc: Port PNM Encoder to use GstVideoEncoder Class
https://bugzilla.gnome.org/show_bug.cgi?id=731943
2014-07-22 06:19:48 -03:00
Sanjay NM
15a2da8ba7 pnmdec: Patch to handle max value
Convert the image values from 0-maxvalue to 0-255 when
'decoding' the pnm image

https://bugzilla.gnome.org/show_bug.cgi?id=731773
2014-07-21 17:23:47 -03:00
Thiago Santos
b39c01baa1 wrappercamerabinsrc: set src to ready when there are no pending buffers
Setting to ready will block waiting for buffers to be reclaimed, so flush
before setting to null to make sure no buffers are pending

https://bugzilla.gnome.org/show_bug.cgi?id=733072
2014-07-17 10:06:09 -03:00
Sebastian Rasmussen
e79e96e59d mxfmux: Avoid taking unnecessary ref
Fixes https://bugzilla.gnome.org/show_bug.cgi?id=733123
2014-07-16 16:47:21 +02:00
Nicolas Dufresne
362951b9ec wrappercamerabinsrc: Fix caps filter caps proxying
The notify signal is triggered when caps is changed. But instead of
proxying the fixed caps, we query for the caps. Hence, when we go to
READY state, we endup setting template caps on the proxied caps
filter instead of NULL, which leads to negoitation failure. Correctly
proxy NULL caps if this is the new caps. Fixes not negotiated error
when running in cheese. Also fix a leak of caps string in one of the
trace.

https://bugzilla.gnome.org/show_bug.cgi?id=732741
2014-07-11 11:05:08 -04:00
Nicolas Dufresne
5e4e572335 camerabin2: Flush downstream after setting src to READY
v4l2src requires all buffers to come back in order to cleanly stop
streaming. Flushing the pipline should force all buffers to come
back.

https://bugzilla.gnome.org/show_bug.cgi?id=732741
2014-07-10 18:34:21 -04:00
Sebastian Rasmussen
1f371ce855 aiffparse: Print invalid fourcc in error message in hex
Previously this was printed as characters which caused later processing
of the error message to sometimes warn about non-UTF-8 characters.

Fixes https://bugzilla.gnome.org/show_bug.cgi?id=732715
2014-07-04 17:46:58 +01:00
Sebastian Dröge
aa6ee77297 mpegtspacketizer: Don't dereference NULL if we have no PCR yet
Can happen sometimes if the duration is requested before we
received enough data with a PCR.
2014-07-03 14:15:36 +02:00
Jan Schmidt
c103f7134b tsdemux: Add locking around mpegtspacketiser groups.
Otherwise occasionally DURATION queries can crash, if they happen at
the wrong moment.
2014-07-03 21:46:28 +10:00
Göran Jönsson
e050541f11 watchdog: Only create a new GSource if we have a main context
We can still get OOB events while stopping the watchdog element, and while
stopping it we destroy the main context.

Also let the GSource own a reference to the element for additional safety.

https://bugzilla.gnome.org/show_bug.cgi?id=732554
2014-07-01 19:41:36 +02:00
Gwenole Beauchesne
7d44a51bfe h264parse: fix collection of access units to preserve config headers.
Always use a GstAdapter when collecting access units (alignment="au")
in either byte-stream or avcC format. This is required to properly
preserve config headers like SPS and PPS when invalid or broken NAL
units are subsequently parsed.

More precisely, this fixes scenario like:
<SPS> <PPS> <invalid-NAL> <slice>

where we used to reset the output frame buffer when an invalid or
broken NAL is parsed, i.e. SPS and PPS NAL units were lost, thus
preventing the next slice unit to be decoded, should this also
represent any valid data.

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
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