Commit graph

4150 commits

Author SHA1 Message Date
Sebastian Dröge
a82f92aed2 hlsdemux: Reset in PAUSED->READY after chaining up to the parent class
Otherwise there are possible race conditions with the streaming thread.
2011-09-02 19:45:21 +02:00
Thibault Saunier
b968f82b18 h264parse: Port to the new h.264 parsing library 2011-09-02 15:46:02 +02:00
Thibault Saunier
a983b29a49 mpegvideoparse: Port to the new mpeg parsing library 2011-09-02 15:46:02 +02:00
Sebastian Dröge
0561c3751c hlsdemux: Remove obsolete FIXME comment 2011-09-02 15:00:58 +02:00
Sebastian Dröge
82bbc76f15 hlsdemux: Reset the internal state going to/from READY instead of NULL
This theoretically allows reuse of the element when setting it to READY
instead of NULL.
2011-09-02 14:55:45 +02:00
Sebastian Dröge
445f626016 hlsdemux: Set playlist parsing helper object to NULL after freeing 2011-09-02 14:54:56 +02:00
Youness Alaoui
acacc251fa hlsdemux: Allow up to 3 consecutive failed downloads before erroring
In some networks, especiall in 3G, a fragment download or playlist
update may fail. We allow for up to 3 consecutive failures, while using
the rfc's specs for retry delays before considering that there was an
error on the stream.
2011-09-02 14:52:07 +02:00
Youness Alaoui
8889c5927c hlsdemux: remove unused argument 2011-09-02 14:51:11 +02:00
Robert Swain
db0739e54f camerabin2: Add a flag to disable image conversion elements
If we know that our camera source element produces buffers at the same
resolution and appropriate colourspace for the output, we don't need any
of the generic conversion elements in encodebin. This reduces caps
negotiation overheads among other things.
2011-09-01 15:57:50 +02:00
Thiago Santos
2ed3d1b309 camerabin2: Micro optimize encodebin pads linking
Reduce one check in encodebin pads linking on camerabin2 by
using the link_pads_full version
2011-08-31 15:45:18 -03:00
Thiago Santos
ac7fc0d357 camerabin2: Use explicit boolean literals to make gobject happy
gobject boolean properties are strict and only accept 1 or 0, otherwise
they throw an assertion.
2011-08-31 15:45:18 -03:00
Sebastian Dröge
cf8f00d57a hlsdemux: Just join the task
gst_task_join() will already stop the task, no need
to stop it additionally.
2011-08-31 14:48:47 +02:00
Sebastian Dröge
119771eaab hlsdemux: Join the task instead of just stopping it and not waiting for it to finish
Fixes interesting race conditions that cause crashes in decodebin2
because pads are added/removed from child elements although they
should be in READY state already.
2011-08-31 14:47:40 +02:00
Sebastian Dröge
c8b7ae1ffa hlsdemux: Remove unused variable 2011-08-31 12:12:59 +02:00
Youness Alaoui
0c97deb59d hlsdemux: switch to higher/lower bitrate by more than one step at a time 2011-08-31 12:12:33 +02:00
Youness Alaoui
6436747eb0 hlsdemux: remove spamming GST_LOG_OBJECT 2011-08-31 12:11:32 +02:00
Youness Alaoui
277a7d05b2 hlsdemux: If paused, do not cache fragments until out of memory error!
We should stop the update thread in PAUSED state and avoid fetching
new fragments when the queue is not empty. The queue should always be
empty since we push data into a queue. Also, in totem, if we seek and
pause the stream while it's buffering, then the state will stay playing
for some reason, so it's best not to continue fetching fragments forever.
2011-08-31 12:11:20 +02:00
Youness Alaoui
917708df82 hlsdemux: start/stop update thread and keep track of status 2011-08-31 12:10:32 +02:00
Youness Alaoui
4724b9a5b6 hlsdemux: Post duration message when we parse the playlist 2011-08-31 12:09:53 +02:00
Youness Alaoui
f93939b46c hlsdemux: Send a flush-stop when switching pads. Fixes A->A/V sync issue.
This is to ensure that we reset the accumulate segment on the sinks
so if we start with audio only then switch to audio+video, then both
sinks will have the same segments and will be synchronized.
2011-08-31 12:09:38 +02:00
Youness Alaoui
ed5a5cc139 hlsdemux: seems there was a typo, free the adapter if it contains data, not if already empty 2011-08-30 16:18:30 +02:00
Youness Alaoui
4a6d888961 hlsdemux: oups, we need to empty the queue after freeing its content 2011-08-30 16:18:08 +02:00
Youness Alaoui
59c61209cf tsdemux: Need to flush all streams when we receive a flush-start 2011-08-30 16:17:47 +02:00
Youness Alaoui
cb30cd242c hlsdemux: do not broadcast the fetcher_cond on bus error if we're cancelled
If we cancel the fetch and call the stop_fetcher, which holds the lock,
when it sets the fetcher's state to NULL, it might send an error
on the bus. In that case, we must ignore it, otherwise it will try
to take the lock and will block forever.
2011-08-30 16:16:54 +02:00
Jonas Larsson
fc0fe37b10 hlsdemux: Split playslist on \r\n not just \n 2011-08-30 16:16:07 +02:00
Youness Alaoui
6e9eeb7678 hlsdemux: Do not succeed a download if the fetcher had an error 2011-08-30 16:15:41 +02:00
Youness Alaoui
e22c300be2 hlsdemux: Rename functions that need to be called with a locked mutex 2011-08-30 16:15:28 +02:00
Youness Alaoui
50d0468241 hlsdemux: We must signal the fetcher_cond while holding its lock 2011-08-30 16:15:03 +02:00
Youness Alaoui
3054355dc1 hlsdemux: We do not need to set the current playlist to the main one
When caching fragments, if we set the current playlist to main, then
it will always think it's a live stream (no endlist in it) so it will
force the redownload of the main playlist after every seek, which is
unnecessary. Also, it causes a race condition where a seek migh happen
during that redownload, and we'll think we're trying to seek a live pipeline.
2011-08-30 16:14:30 +02:00
Thiago Santos
5ae630489c camerabin2: Make viewfinder's queue a thread limit only
Reduce the viewfinder queue limits to only allow it to store
one buffer, preventing the queue from holding old buffers for
too long. This also avoids showing slightly outdated frames on
the viewfinder when the source has already produced new ones
and improves the buffer recycling rate, important for sources
that use bufferpools.
2011-08-26 09:43:14 -03:00
Youness Alaoui
e380fbb019 tsdemux: In push mode, do not start pull loop if upstream seek fails 2011-08-26 09:51:46 +02:00
Youness Alaoui
108493ee51 hlsdemux: do not make the update_thread joinable 2011-08-26 09:51:46 +02:00
Youness Alaoui
8c04ea47d2 hlsdemux: Ensure the task is paused in case of cache error 2011-08-26 09:51:46 +02:00
Youness Alaoui
46ac6a2589 hlsdemux: stop the threads in the proper order
first pause the task, then stop all fetchers, then stop the update thread
then pause the task again, since it might have been restarted by
another thread in the meantime
2011-08-26 09:51:46 +02:00
Youness Alaoui
015d1e11e2 hlsdemux: do not post an error if we seek/cancel during caching of fragments 2011-08-26 09:51:46 +02:00
Youness Alaoui
d69297a23c hlsdemux: if we're canceling a fetcher, we must stop its thread 2011-08-26 09:51:46 +02:00
Youness Alaoui
42401da686 hlsdemux: lock the update_thread mutex before stopping it 2011-08-26 09:51:46 +02:00
Youness Alaoui
39657fa52f hlsdemux: lock the fetcher mutex before stopping it 2011-08-26 09:51:45 +02:00
Youness Alaoui
e1a0bdcdf5 hlsdemux: do not allow two fetchers to run simultanously 2011-08-26 09:51:45 +02:00
Youness Alaoui
adcfcabb14 hlsdemux: Stop the streaming task on PAUSED_TO_READY state change 2011-08-26 09:51:45 +02:00
Olivier Crête
1fdae52753 dtmf: Add more debug 2011-08-24 12:24:18 -04:00
Olivier Crête
4167697c0e dtmf: Max event type is 15 2011-08-24 12:24:18 -04:00
Olivier Crête
e8268053c2 dtmfsrc: Align DTMF sound buffers with last-stop from event
Also make sure the timestamps never go backwards
2011-08-24 12:24:18 -04:00
Olivier Crête
2c7257481a rtpdtmfsrc: Correctly recognize the end of a buffer 2011-08-24 12:24:18 -04:00
Olivier Crête
7c55ff3023 rtpdtmfsrc: Make sure rtpdtmfsrc timestamps don't overlap 2011-08-24 12:24:17 -04:00
Olivier Crête
e6c431a533 rtpdtmfsrc: Put the inter digit interval at the end, not at the start
The reason is to let rtpdtmfmux drop buffers during the inter digit interval,
this way, there will be more silence around the DTMF tones so IVFs will have
a better chance recognizing them.
2011-08-24 12:24:17 -04:00
Olivier Crête
7837cc25fb rtpdtmfsrc: Start at the last_stop from the start event if there was one
The goal is to try to not have a GAP between the audio and the DTMF
2011-08-24 12:24:17 -04:00
Olivier Crête
859b8ebfc9 rtpdtmfmux: Add last-stop to dtmf-event upstream events
Add the running time of the last outputted buffer to the
upstream "dtmf-event" events so that the dtmf source does not
leave a gap.
2011-08-24 12:24:17 -04:00
Olivier Crête
38aaf7cbab rtpdtmfsrc: Respect ptime from the caps
Respect the ptime from the caps for the DTMF packets
2011-08-24 12:24:17 -04:00
Olivier Crête
4f97524376 rtpdtmfsrc: Just error out if there is no clock 2011-08-24 12:24:17 -04:00
Sebastian Dröge
c86aba3469 tsdemux: Use FALSE instead of 0 for bool parameter 2011-08-24 09:35:18 +02:00
Youness Alaoui
744101a417 tsdemux: Need to send a newsegment after a seek 2011-08-24 08:12:29 +02:00
Youness Alaoui
a3fc3ec443 hlsdemux: Send buffering messages on the bus 2011-08-24 08:12:19 +02:00
Youness Alaoui
e2de4e5870 hlsdemux: cache the number of fragments we are required to cache 2011-08-24 08:12:14 +02:00
Youness Alaoui
cfd28a6f90 tsdemux: Forward seek/duration query/event to the sinkpad 2011-08-24 07:48:52 +02:00
Thiago Santos
69c65875ea camerabin2: Optimize start up a little by removing some pad checks
Some pad checks are guaranteed to work, so we can disable them
by using gst_element_link_pads_full
2011-08-24 01:03:32 -03:00
Thiago Santos
011eddcd0e camerabin2: Remove from experimental
Remove camerabin2 from experimental, allowing it to be built
without needing to pass --enable-experimental on configure.
2011-08-23 19:26:31 -03:00
Thiago Santos
e32897d809 camerabin2: Always set encodebin flags when going to ready
When going from NULL to READY we want the encodebin flags to be
set, and not only after creating encodebin (on the first run)
2011-08-23 19:13:21 -03:00
Thiago Santos
5c662ec0c7 camerabin2: Add new entry to flags property
Adds a new entry to camerabin2 flags to disable viewfinder
conversion elements.
2011-08-23 11:58:33 -03:00
Thiago Santos
dc9276b9ee camerabin2: viewfinderbin: Add property for disabling converters
Adds a new property to disable converters elements for performance
reasons. It should only be used if the application knows they aren't
needed.
2011-08-23 11:19:51 -03:00
Vincent Penquerc'h
66dbdfd4d1 tsdemux: do not try to compare a PCR with itself for statistics
Especially as one of the logs will cause a divide by zero.

https://bugzilla.gnome.org/show_bug.cgi?id=656927
2011-08-23 10:38:10 +02:00
Vincent Penquerc'h
b19a5ea1f3 tsdemux: do not keep a dangling pointer
When removing the current program, it will get freed by the
hash table removal callback, so ensure we clear our pointer
to it.

Fixes a crash later on in gst_ts_demux_push trying to access it.

https://bugzilla.gnome.org/show_bug.cgi?id=656927
2011-08-23 10:37:24 +02:00
Vincent Penquerc'h
c437541791 dvdspu: do not clear out high bits from display area
http://dvd.sourceforge.net/spu_notes does not mention that high bits
are to be masked, and not clearing them makes a sample work, where
clearing them yielded left > right.
History does not shed any light, as tracing this code's origin shows
the same bitmasks being there in 2007 when it was imported.

https://bugzilla.gnome.org/show_bug.cgi?id=620119
2011-08-23 10:15:27 +02:00
Sebastian Dröge
6edff48378 mpegtsbase: First try if upstream handles seeking in TIME format before seeking in the demuxer 2011-08-23 09:52:20 +02:00
Sebastian Dröge
a27b7b6712 tsdemux: First send SEEKING queries upstream 2011-08-23 09:40:16 +02:00
Sebastian Dröge
ca0df16d52 tsdemux: Send DURATION query upstream first 2011-08-23 09:27:23 +02:00
Sebastian Dröge
20f9738c10 hlsdemux: Use FALSE instead of 0 for a bool parameter 2011-08-23 09:23:33 +02:00
Youness Alaoui
3f42050c34 hlsdemux: switch pads when we seek (need_segment) since tsdemux doesn't cope well with a reset 2011-08-23 09:22:40 +02:00
Youness Alaoui
2d90f1c0dc hlsdemux: Add a FIXME comment. loop task should be a pad task 2011-08-23 09:21:03 +02:00
Youness Alaoui
b55f157d6f hlsdemux: Do not seek in a live stream 2011-08-23 09:20:25 +02:00
Youness Alaoui
18f53cf547 hlsdemux: Do not take the pad stream lock, use the task's lock instead 2011-08-23 09:20:14 +02:00
Youness Alaoui
e2f69e1be9 hlsdemux: Implement EVENT_SEEK 2011-08-23 09:19:59 +02:00
Youness Alaoui
475abd15b6 hlsdemux: Implement the GST_QUERY_SEEKING properly 2011-08-23 09:18:16 +02:00
Youness Alaoui
ae4af3910e hlsdemux: Implement correctly the GST_QUERY_DURATION 2011-08-23 09:17:30 +02:00
Youness Alaoui
a916d4dfd2 hlsdemux: Do not use GST_TASK_WAIT in the task function
The task function uses GST_TASK_WAIT which does a g_cond_wait giving it
the GST_OBJECT_GET_LOCK of the task. The mutex gets locked when
g_cond_wait returns, so if we don't lock/unlock it, it will
stay locked forever, preventing the task from ever finishing.
We shouldn't lock the task object lock, so let's remove the GST_TASK_WAIT
and make the task pause instead if there are no buffers in the queue.
2011-08-23 09:16:35 +02:00
Youness Alaoui
818762e8fc tsdemux: do not send a new-segment on stream removal
When a program is changed, stream_added is called which sets the
need_newsegment to TRUE, then stream_removed is called, which calls
the flush_pending_data, which checks for the newsegment and causes
it to send a new-segment.

We must not send the newsegment when flushing the pending data on the
removed stream. We should only push it when flushing data on the newly
added streams (after they finish parsing their PTS header)
2011-08-22 16:01:24 +02:00
Youness Alaoui
382710e200 tsdemux: Fix newsegment when switching programs
If a program/stream is changed, then a newsegment is sent which must
not be the same as the base segment since it happens later. We must
shift the start position by the time elapsed since the newsegment
and the current PTS of the stream
2011-08-22 16:01:17 +02:00
Youness Alaoui
4cc1dfb360 tsdemux: interpolate gap and fix timestamps depending on upstream segment 2011-08-22 15:55:47 +02:00
Youness Alaoui
690e59e497 hlsdemux: Keep a separate variable for the current variant used
By using a separate variable, first it allows us to sort the lists
of alternates but keep the pointer on the first occurence in the main
playlist (to respect the spec of starting with the bitrate specified
first in the main playlist). It also avoid playing with the lists variable
which should be used to store the list of playlists and not as a pointer
to the current one.
Also fixes a memleak with the g_list_foreach freeing the lists, if it wasn't
pointing to the first element of the list.
2011-08-22 15:46:41 +02:00
Tiago César Katcipis
382346a6f3 removesilence: new plugin
Fixes: #597822.

Signed-off-by: David Schleef <ds@schleef.org>
2011-08-21 15:28:08 -07:00
Thiago Santos
6c272aafa7 camerabin2: Prevent audiosrc from sending undesired eos
Basesrc derived classes send an eos when they change state
from paused to ready and that breaks video recordings on camerabin2
as it makes the whole audio branch pads flushing.

Prevent it by using a pad probe that only allows the eos to pass
when it is caused by a stop-capture action.
2011-08-21 18:23:16 -03:00
Thiago Santos
fefc27a586 camerabin2: Use gst_pad_send_event instead of eventfunc macro 2011-08-21 18:23:16 -03:00
Thiago Santos
fe206e75f7 camerabin2: Avoid assertions when plugin creation fails
Capsfilters are created on the constructor and their properties can
be set/get from camerabin2's set/get_property functions. The user with
a broken setup would cause assertions when trying to set/get the
capture caps of this camerabin2.

A proper missing-plugin message will be posted when the user tries to
set camerabin2 to READY state.
2011-08-21 18:23:16 -03:00
Alessandro Decina
fa6d174455 tsmux: remove unnecessary check
remove an if (best) check where best != NULL has already been checked
2011-08-21 10:54:52 +02:00
Youness Alaoui
02bc614163 tsbase: reinitiate segment at flush-stop event only 2011-08-18 14:54:22 +02:00
Youness Alaoui
5878f71233 hlsdemux: Set buffer timestamp since we send a TIME segment 2011-08-18 14:05:10 +02:00
Youness Alaoui
8b762708cd hlsdemux: Allow bandwidth switching during caching of fragments 2011-08-18 14:00:42 +02:00
Youness Alaoui
a62aa2b774 hlsdemux: set the pad's caps before adding it 2011-08-18 13:53:02 +02:00
Vincent Penquerc'h
0381919e83 aiffmux: drop data after 4ish GB and moan
https://bugzilla.gnome.org/show_bug.cgi?id=654278
2011-08-16 23:25:38 +01:00
Vincent Penquerc'h
76c0f9bfe7 aiffmux: use guint32 for guint32 parameters
This makes explicit that the range is limited.

https://bugzilla.gnome.org/show_bug.cgi?id=654278
2011-08-16 20:32:27 +01:00
Vincent Penquerc'h
fb2479d1da aiffmux: avoid integer overflow
These values are 32 bits, and width is a multiple of 8.

https://bugzilla.gnome.org/show_bug.cgi?id=654278
2011-08-16 20:31:55 +01:00
George Kiagiadakis
743b4677a2 mpeg4videoparse: Use gst_bit_reader_skip to skip more than 32 bits.
GET_BITS is a macro for gst_bit_reader_get_bits_uint32, which cannot
read more than 32 bits and will fail in this case where it is called
to read 79 bits. Since we want to skip those bits, gst_bit_reader_skip
is more appropriate in this case.
2011-08-16 19:05:52 +02:00
Thiago Santos
19e5736acd camerabin2: Add audio-filter property
Adds a property to add a custom GstElement to the audio
branch of the pipeline. This allows the user to do custom audio
processing/analysis when recording videos.
2011-08-13 11:42:07 -03:00
Stefan Kost
008fa0770b basevisualizer: add more shader variants and simplify code
Use macros to simplyfy the shading code. Those will ease to add support for
other colorspaces in the future. Add more variants for the shading (left,right,
horiz-in, vert-out, vert-in).
2011-08-12 22:39:53 +02:00
Stefan Kost
039ff3873b basevisualizer: more docs 2011-08-12 21:22:20 +02:00
Stefan Kost
3ba5b8bd0e baseaudiovisualizer: protect config with a lock
Before it was easy to crash the elements when using a ximagesink and triggering
renegotiation by resizing.
2011-08-12 21:18:44 +02:00
Stefan Kost
058c63d185 spectrascope: make a copy of the audiodata before downmixing and windowing
The buffers come from the adapter and the data might overlap. We don't want to
modify it in place.
2011-08-12 16:57:49 +02:00
Vincent Penquerc'h
2728ead8a2 mxf: do not assert on the values of data read from input
Instead, log a warning, and return.

https://bugzilla.gnome.org/show_bug.cgi?id=563827
2011-08-09 10:44:48 +02:00
Thiago Santos
8dc9551f9a camerabin2: Adding video-done message
video-done message will be posted when a video recording is
finished. Similar to image-done message.
2011-08-06 19:55:48 -03:00
Thiago Santos
80fb917034 camerabin2: Adding top-level element documentation 2011-08-06 12:26:32 -03:00