Commit graph

5425 commits

Author SHA1 Message Date
Edward Hervey
c0ce94dbf2 mpegtspacketizer: Speed up NIT parsing
Avoid duplicating the delivery structure, and instead give it to the
receiving container.
2013-06-19 19:31:12 +02:00
Edward Hervey
40bcf48b0c mpegtbase: simplify code
We don't need generic methods for push/flush since we know all the
subclass that we control
2013-06-19 12:29:47 +02:00
Edward Hervey
79e63e3daf mpegtsdemux: Fix for compiling without GST_DEBUG
Protect debug-only variables/usage, and in one case remove a useless
variable.
2013-06-19 12:29:46 +02:00
Edward Hervey
e66d543f00 tsparse: Ensure initial events are sent in the right order
First send stream-start, then caps, then segment.

The segment we push is from upstream in push-mode. If we work in pull-mode
then we initialize the base segment to BYTES.

https://bugzilla.gnome.org/show_bug.cgi?id=702422
2013-06-19 07:40:28 +02:00
Sebastian Dröge
d50625eeb0 mpegvideoparse: Make sure the buffer is writable before we add the MPEG video meta
https://bugzilla.gnome.org/show_bug.cgi?id=702174
2013-06-14 14:53:52 +02:00
Arnaud Vrac
a5402d6eeb tsdemux: fix M2TS stream resync
Sync byte scan is incorrect for M2TS streams because the timestamp 4
bytes were not included in the flush size. This can result in an
infinite loop.

Rework the scan code to be clearer and work in all cases.
2013-06-12 08:01:24 +02:00
Arnaud Vrac
065d421d34 tsdemux: move some debug prints at the log level 2013-06-12 08:01:20 +02:00
Josep Torra
28a2902a7b tsdemux: fixes seeking in pull mode
Preserve the current segment and observations in pull mode seeks with
flushing.

https://bugzilla.gnome.org/show_bug.cgi?id=698050
2013-06-12 08:01:06 +02:00
Hans de Goede
28e64d1031 wrappercamerabinsrc: Add video-source-filter during construction
By adding the video-source-filter during construction time, rather then
patching it in later (*), we can greatly reduce the amount of caps involved
in negotation, speeding up pipeline creation.

I wrote this while working on speeding up the startup of cheese. My cheese
has been modified to add a capsfilter, filtering for only the configured
resolution, with that cheese patch + this patch, the pipeline creation time
goes from aprox 1.1 seconds to aprox 350ms. This is with a Logitech 9000
pro camera, which supports lots of different resolutions at many different
framerates per resolution, causing a caps "explosion" if not filtered.

*) Note the code for this is left in, as it is still necessary if the
video-source-filter is changed between a stop + re-start.

https://bugzilla.gnome.org/show_bug.cgi?id=701953
2013-06-11 12:47:53 +02:00
Hans de Goede
8dc7fae455 wrappercamerabinsrc: Don't unset the video-source property on pipeline start
check_and_replace_src() was setting self->app_vid_src to NULL, which
means that an app setting the video-source property, and then starting,
stopping and re-starting the pipeline (ie to make changes to the
video-source-filter property) would after the restart no longer have
a video-source.

This patch fixes this by making gst_camerabin_setup_default_element return a
ref to the passed in user_element, rather then returning the user_element as
is, so that that ref can be passed on to the bin, and the app_vid_src ref
stays valid.

https://bugzilla.gnome.org/show_bug.cgi?id=701915
2013-06-10 16:16:29 +02:00
Sebastian Dröge
c383dd6420 rfb: Link with libgstbase for GstPushSrc 2013-06-07 15:18:15 +02:00
Alban Browaeys
44b1bc6081 mpegdemux: accept ID_PRIVATE_STREAM_1 to avoid loosing sync
Current fallback to lost_sync seems to impede a delay to restore
sync. Let the parser parse and skip the private stream.
Here it contains the digital camera brand (in 2010 bytes)
and is repeated twice.

https://bugzilla.gnome.org/show_bug.cgi?id=697283
2013-06-07 12:57:03 +02:00
Ilya Smelykh
ef0e051e7d h264parse: Wait until SPS/PPS before outputting any data
https://bugzilla.gnome.org/show_bug.cgi?id=646327
2013-06-07 12:10:08 +02:00
Sebastian Dröge
37427ccaef Release 1.1.1 2013-06-05 18:29:49 +02:00
Edward Hervey
0809770d26 mpegtspacketizer: Fix leak
Since we were manually setting GValue to the GValueArray, we also need
to specify how many were set, otherwise all values in the array will
be leaked.
2013-06-05 15:23:18 +02:00
Edward Hervey
877019ae00 mpegtspacketizer: Speedup TDT/TOT parsing
Use quarks where needed, makes it 2.5 times faster
2013-06-05 13:39:14 +02:00
Edward Hervey
824f08d1d8 mpegtspacketizer: Fix string leak
The description/text get copied in the structure.
2013-06-05 13:21:29 +02:00
Edward Hervey
f3bf40e2b0 mpegtspacketizer: Speed up descriptor parsing/packing
descriptors are stored as a GValueArray of GString. The downside is
that there is no way to "pass" ownership of a GValue to a GValueArray
which previously resulted in expensive copy/free of the (already expensive)
GString.

Here we estimate first the size of the GValueArray, then create it,
then directly use the GValue of that array.

Speeds up total SI parsing by ~30%
2013-06-05 12:49:09 +02:00
Edward Hervey
e6f0986b9e mpegtspacketizer: Use gst_value_list_append_and_take_value
Avoids doing the expensive copy of structures/arrays/...

Speeds up parsing SI by about 50%
2013-06-05 12:48:05 +02:00
Edward Hervey
b378b7e9d6 mpegtspacketizer: Avoid copying GValueArray
Just give the GValueArray to the container GValue.
2013-06-05 11:27:05 +02:00
Sebastian Dröge
b8cb2b4d79 midiparse: In pull mode drop SEGMENT, CAPS and STREAM_START events
We create and send our own later from another thread.
2013-05-28 15:55:25 +02:00
Sebastian Dröge
357779d3c6 midiparse: Push stream-start event before anything else 2013-05-28 15:55:25 +02:00
Stefan Sauer
116f7c0a77 audiochannelmix: fill in the author template
The copyright header still contained the author template.
2013-05-26 14:29:54 +02:00
Michael Rubinstein
e6c8224609 mpegtsdemux: Free memory behind GString if we don't use it
https://bugzilla.gnome.org/show_bug.cgi?id=700903
2013-05-25 15:49:21 +02:00
Edward Hervey
ce441cbff7 mpegtsbase: Post an error message when EOS'ing without source pads
This ensures we don't "hang" when files can't be decoded, or contain
no valid streams.
2013-05-23 14:59:34 +02:00
Edward Hervey
7837cab44e tsdemux: Demote a warning to debug level
We will get it for virtually every first packets.
2013-05-23 14:59:34 +02:00
David Schleef
35018ae632 audiofx: Add plugin, add audiochannelmix 2013-05-18 14:02:18 -07:00
Tim-Philipp Müller
a204ddd225 videosignal: fix CFLAGS order 2013-05-18 12:21:59 +01:00
Sebastian Dröge
f0a1935119 mpegtsmux: Push stream-start event before anything else 2013-05-15 11:38:35 +02:00
Sebastian Dröge
a5ac2d3aee audiovisualizer: Enable GLib deprecation warnings again 2013-05-15 11:02:29 +02:00
Sebastian Dröge
3d09d0068d audiovisualizer: Negotiate as soon as possible when getting the sinkpad caps 2013-05-15 11:00:46 +02:00
Sebastian Dröge
3de73279df asfmux: Send stream-start event 2013-05-15 10:56:20 +02:00
Tim-Philipp Müller
f0039c6dc3 nsf: remove nsf plugin, replaced by gme plugin
https://bugzilla.gnome.org/show_bug.cgi?id=648021
2013-05-14 00:14:34 +01:00
David Schleef
e5288a2464 intervideosrc: Fix timestamp generation 2013-05-11 12:07:36 -07:00
Tim-Philipp Müller
146e78ffdb rfbsrc: post error messages on errors 2013-05-11 19:42:31 +01:00
David Schleef
e79b977fdb videofilters: Add videodiff element 2013-05-10 17:40:17 -07:00
David Schleef
4b7f0d99f0 y4mdec: set timestamps when restriding buffer 2013-05-10 17:40:17 -07:00
David Schleef
4a88eebe0e videomark/detect: rename to simplevideomark[detect] 2013-05-10 17:31:10 -07:00
David Schleef
b3ff0630e8 videomark/detect: port to 1.0 2013-05-10 17:31:10 -07:00
Tim-Philipp Müller
4cfa3f5af3 rfbsrc: fix rfbdecoder new/free asymetry and wrong free in error case
If rfb_decoder_new() allocates the decoder sructure, rfb_decoder_free()
should free the structure. We should not free the decoder when an
error occurs during connection - it holds lots of configuration/state
and will be freed later in finalize.
2013-05-11 00:36:06 +01:00
Tim-Philipp Müller
14d20271c1 rfbsrc: make authentication handshake safe for multiple instances
Move DES key into context struct.
2013-05-11 00:29:40 +01:00
Tim-Philipp Müller
0fc4af8498 rfbsrc: remove GPL-licensed source file
and replace the 1% of it that we need with new code, so we
don't have to change the runtime license of rfbsrc to GPL.
2013-05-10 23:11:05 +01:00
Aleix Conchillo Flaque
90e006513a rfbsrc: use glib gio sockets for network access
https://bugzilla.gnome.org/show_bug.cgi?id=700038
2013-05-10 20:52:29 +01:00
Aleix Conchillo Flaque
42783e676e rfbsrc: port to 1.0
https://bugzilla.gnome.org/show_bug.cgi?id=700038
2013-05-10 20:43:16 +01:00
Greg Rutz
4d4fd09a3a mpegtsmux: Fix memory leak when using prepare_func
prepare_func will allocate a new buffer to replace the original
one. Instead of using gst_buffer_replace (which causes an extra
refcount increment on the new buffer), we just unref the original
buffer.

https://bugzilla.gnome.org/show_bug.cgi?id=699786
2013-05-07 16:37:49 +02:00
Matej Knopp
946ffd0da5 mpegvideoparse: don't compare buffer size when checking whether to update caps
https://bugzilla.gnome.org/show_bug.cgi?id=699398
2013-05-03 12:52:18 +02:00
Tim-Philipp Müller
f1a6d84a6c mpegvideoparse: don't announce incomplete source caps
Don't send any source caps yet if we're still in
drop-buffers-until-we-get-a-sequence-header mode.

Fixes transmuxing of many MPEG-TS/PS streams into
formats which require things like width, height or
codec_data on the input caps.

Also fixes issues when using playbin with decoder
sinks that want width/height etc.

https://bugzilla.gnome.org/show_bug.cgi?id=695879
2013-05-01 17:42:11 +01:00
Olivier Crête
6e5db57d24 liveadder: Document that the latency is in milliseconds
Bug #698896
2013-04-26 15:33:18 -04:00
Edward Hervey
65ba9b4756 tsdemux: convert packet PTS/DTS as soon as possible
We let the mpegtspacketizer deal with pcr wraparound/resets.

https://bugzilla.gnome.org/show_bug.cgi?id=674536
2013-04-26 15:49:18 +02:00
Edward Hervey
05b51dfec0 mpegtsdemux: header cleanups/updates 2013-04-26 15:49:18 +02:00
Josep Torra
b946de7211 h264parse: Update src pad caps when it was explicitly signaled
Fixes src pad caps aren't updated when converting from AVC to bytestream
and new caps had been received in the sink pad.

https://bugzilla.gnome.org/show_bug.cgi?id=698679
2013-04-26 10:38:36 +02:00
Thiago Santos
d8b8809d57 tsdemux: Fix caps string leak 2013-04-24 12:28:17 +02:00
Wim Taymans
57ed87f51b aiff: port to 1.0 2013-04-18 17:18:49 +02:00
Greg Rutz
2306d51d9d tsdemux: Add support for Motorola DigiCipher II MPEG2 video
Since there is a conflict between the DCII stream type and BluRay
stream types, moved the processing of BluRay-specific stream types
to the beginning of the function.  Only if a BluRay stream type
IS NOT found do we proceed to check the rest of the stream type
identifiers

Previous code was also "sort-of" handling a similar conflict between
BluRay AC3 audio and standard AC3 audio.  Moved the special case BluRay
AC3 handling in the main switch statement to the new BluRay-specific
switch.

https://bugzilla.gnome.org/show_bug.cgi?id=697892
2013-04-18 09:30:58 +02:00
Youness Alaoui
ece3d1c2f6 h264parse: Do not check for VUI parameters if they were not present in the SPS 2013-04-16 19:58:06 -04:00
David Schleef
303a2eaec4 mpegtsdemux: check value before using as denominator 2013-04-15 17:05:30 -07:00
Sebastian Dröge
e51cd4fe2f gst: Add better support for static plugins 2013-04-15 15:59:22 +02:00
Wim Taymans
9699a974ca sdpdemux: fix timeout value
Timeout on udpsrc is in nanoseconds in 1.0
2013-04-15 09:28:05 +02:00
Alexander Olsson
90229af34c jpegparse: accept any jpeg input - parsed, unparsed or unmarked
The src element may not include information about whether
the data is parsed or not. Hence do not require parsed=false.

Fixes multipartdemux ! jpegparse ! ...

https://bugzilla.gnome.org/show_bug.cgi?id=697884
2013-04-13 13:54:52 +01:00
David Schleef
8552396c36 videoanalyse: port to 1.0 2013-04-12 14:11:09 -07:00
David Schleef
83862968a3 videofiltersbad: port to 1.0 2013-04-12 14:11:06 -07:00
Matej Knopp
13ac73bef4 mpegdemux: decrease log priority for repeating messages
https://bugzilla.gnome.org/show_bug.cgi?id=697834
2013-04-12 00:18:36 +01:00
Sebastian Dröge
2713fd1058 tsdemux: Check the continuity counter for non-section packets too
And if we detect a discontinuity there (like... when losing packets
or having MPEGTS over raw UDP with out-of-order packets) we just
drop the corresponding packet.

A future version could try to implement a re-ordering algorithm based
on that, similar to what rtpjitterbuffer does.
2013-04-11 13:11:44 +02:00
Stefan Sauer
2991e1ed48 mfxdemus: update todo (ther eis a muxer) 2013-04-11 10:06:23 +02:00
Sebastian Dröge
4ca886c53b mpegtsbase: Call ::program_stopped after removing all streams
Subclasses want to access the program while removing the streams
and will currently crash because of dereferencing NULL in some cases.
2013-04-10 16:19:00 +02:00
Alexander Schrab
3320f29a88 watchdog: race between g_main_loop_run/_quit fixed
https://bugzilla.gnome.org/show_bug.cgi?id=697694
2013-04-10 10:36:19 +01:00
David Schleef
329c250a41 watchdog: fix event handling 2013-04-09 15:43:35 -07:00
David Schleef
63a2fac9a9 yadif: remove extra template code 2013-04-09 15:43:35 -07:00
David Schleef
45cb1195a6 ivtc: remove transform_size, it's not needed 2013-04-09 15:43:35 -07:00
David Schleef
9fd00c01a3 interaudiosink: fix leak when not connected 2013-04-09 15:36:17 -07:00
Edward Hervey
98265d0b28 tsdemux: Add support for TrueHD audio 2013-04-07 18:41:38 +02:00
Tim-Philipp Müller
a84e2ccbb8 audiovisualizer: shaders assume 32bpp
Backport fix for crashes and invalid writes in totem from libvisual
in -base, to minimise differences to version in -base and to make
sure the bug doesn't sneak back in later when the base class is
made public.

The shader code looks like it makes assumptions that are not
necessarily always true, even if they're true for now for the
existing elements, namly that pixel stride is 4, for example.

See https://bugzilla.gnome.org/show_bug.cgi?id=683527
2013-04-05 00:53:54 +01:00
Matthew Waters
bf502f5502 audiovisualizer: handle non-existant pool in the default allocation query
gst_query_set_nth_allocation_pool() requires there to be a pool in the
query already. This is not always the case when we get the query from
upstream.  Use gst_query_add_allocation_pool() instead in such case.

https://bugzilla.gnome.org/show_bug.cgi?id=681719
2013-04-05 00:38:36 +01:00
Wim Taymans
5d72759fec audiovisualizer: improve allocation
Based on patch by Matthew Waters

Add private data
Add decide_allocation vmethod
Refactor bufferpool negotiation

Fixes https://bugzilla.gnome.org/show_bug.cgi?id=681719
2013-04-05 00:37:08 +01:00
Edward Hervey
2296296a51 mpegvideoparse: Only add meta if downstream needs it
It's not perfect, because in the cases where upstream doesn't
initiate an allocation query, we won't know.
2013-03-31 19:04:12 +02:00
Edward Hervey
14e7e78b7a mpegvideoparse: Store information in GstMpegVideo12Meta
FIXME : Only do so if we know downstream will need it
2013-03-31 18:55:33 +02:00
Edward Hervey
ca3146a2cd tsparse: Ensure segment events are forwarded
We skip them for tsdemux though (recreated later)

Fixes #690949
2013-03-30 13:54:37 +01:00
Wim Taymans
d7bcf7206f mpegpsdemux: push stream start event 2013-03-30 11:15:48 +01:00
Josep Torra
b6719fe0e3 midiparser: ensure variable is initialized and fix debug message access 2013-03-30 10:57:08 +01:00
Josep Torra
030cf658e6 mpeg4videoparser: Fix a compiler warning about uninitialised variable use 2013-03-30 09:52:45 +01:00
David Schleef
a1bb437ece watchdog: new element 2013-03-27 15:31:21 -07:00
David Schleef
65cb59912b mxfdemux: Use %03u for format in gst_pad_create_stream_id_printf() 2013-03-25 18:57:32 -07:00
Wim Taymans
f468979dea interlaced: set both DTS and PTS
Handle both dts and pts on output buffers.
2013-03-25 10:10:28 +01:00
Douglas Bagnall
0c9db072ce tsdemux: remove unused current_program_number field
https://bugzilla.gnome.org/show_bug.cgi?id=690934
2013-03-24 20:58:28 +00:00
Tim-Philipp Müller
0002f7638b rawparse: send segment event in time format also in push mode
When converting the incoming segment from byte to time format,
don't just convert the start/stop/time values, but also change
the segment format to TIME.

https://bugzilla.gnome.org/show_bug.cgi?id=696361
2013-03-22 19:40:58 +00:00
Sebastian Dröge
dfa6c17de5 y4mdec: Use the correct strides as used by y4m and convert to GStreamer strides if necessary
https://bugzilla.gnome.org/show_bug.cgi?id=696361
2013-03-22 15:53:08 +01:00
Sebastian Dröge
58bfdb2798 y4mdec: Use the default event/query handlers for the default handling
Especially don't forward caps events from the sinkpad to the srcpad.

https://bugzilla.gnome.org/show_bug.cgi?id=696282
2013-03-22 14:52:54 +01:00
Sebastian Dröge
5dba06113d y4mdec: Properly handle segment and time values of -1 2013-03-22 14:50:28 +01:00
Wim Taymans
5981ad182e midi: set midi parser rank primary
Now that it supports seeking and all, mark it primary
2013-03-22 14:48:52 +01:00
Wim Taymans
5474532f57 midiparse: always seek back to beginning
We always need to seek back to the beginning because when we do a flushing seek,
we might have lost events downstream.
2013-03-22 13:49:49 +01:00
Wim Taymans
803f564013 midiparse: implement seeking
Seek back to 0 for backward seeking and let things run and clip for forwards
seeking.
2013-03-22 12:25:16 +01:00
Wim Taymans
661989bcb7 midiparse: simplify the callbacks
We only need one callback to send bytes out.
2013-03-21 18:18:29 +01:00
Wim Taymans
06e06b6159 midiparse: clean up tracks 2013-03-21 17:25:32 +01:00
Wim Taymans
7a14606b51 midiparse: don't leak midi data 2013-03-21 17:16:24 +01:00
Wim Taymans
15f07e7f12 midiparse: small cleanups in error paths 2013-03-21 16:06:46 +01:00
Wim Taymans
adae7f1859 midiparse: duration is max of all track durations 2013-03-21 16:06:46 +01:00
Wim Taymans
7498d104a7 midiparse: fix klass 2013-03-21 16:06:46 +01:00
Wim Taymans
5492631d84 midiparse: Update duration
Rework things a bit so that we can run over the midi events and fire callbacks
for each of them. We can then use that for calculating the duration and also for
doing playback.
Only parse as many tracks as specified in the header.
Fix default tempo;
Send MIDI tick events every 10ms
2013-03-21 15:00:16 +01:00
Wim Taymans
76cd090503 midiparse: handle midi in RIFF 2013-03-21 09:30:41 +01:00
Wim Taymans
a093d65310 midiparse: small fixes 2013-03-21 07:21:41 +01:00