Commit graph

12024 commits

Author SHA1 Message Date
Wim Taymans 554b81ed24 bin: try harder to avoid state changes in wrong direction
When the bin does an upward state change, try to avoid doing a downward state
change on the child and vice versa.
Add some more unit tests for this fix.

Fixes https://bugzilla.gnome.org/show_bug.cgi?id=621833
2012-05-18 15:04:35 +02:00
unknown 57564ed276 basesrc: default return TRUE for latency-events reaching the src
The src is the final stop for this event, and the default result is FALSE
for all sources not implementing event handling, which again will result
in a warning about latency not being able to be configured.

Fixes https://bugzilla.gnome.org/show_bug.cgi?id=667299
2012-05-18 10:14:55 +02:00
Idar Tollefsen 7a70c91ac3 configure: explicitly check for sys/mman.h header
And use header-specific guards.

https://bugzilla.gnome.org/show_bug.cgi?id=667292
2012-05-15 19:05:42 +01:00
Tim-Philipp Müller f85885474c filesrc: remove unused or questionable madvise() calls in deprecated mmap code paths
use-mmap functionality has been removed in 0.11 and doesn't really
have any performance advantages in most cases anyway. Deprecate
"sequential" property to hint sequential access in mmap mode and
make it non-functional. Chances are no one was using this ever
anyway, or inappropriately.

Remove madvise() calls. We would need to do extensive configure
checks to handle these properly on different systems, and it
doesn't seem worth adding that for code that's already removed
in 0.11 or questionable anyway (like madvise DONTNEED right
before munmap).

https://bugzilla.gnome.org/show_bug.cgi?id=667292
2012-05-15 18:43:59 +01:00
Wim Taymans 69bd7708c3 docs: improve docs 2012-05-14 10:16:22 +02:00
Vincent Penquerc'h a975fadbaf event: add new seek snap flags
They can be used to select snapping behavior (to previous, next, or
nearest location, where relevant) when seeking.

The seeking implementation (eg, demuxer) may currently ignore some
or all of these flags.
2012-04-30 09:52:04 +01:00
Sebastian Dröge 6d39c958cb gst-uninstalled: Add insanity, insanity-gst and gst-editing-services 2012-04-25 18:11:03 +02:00
Wim Taymans dd74e5cdc0 pad: fix typo in comment 2012-04-25 09:09:59 +02:00
Edward Hervey 184b6e555a ghostpad: Don't use g_signal_handler_disconnect_by_*
It introduces an unneeded overhead. Instead store the id of the
signal handlers and remove them properly
2012-04-24 16:12:15 +02:00
Sebastian Dröge 7848b66e3e message: Remove comma at end of enum list
This comma confuses some compilers.
2012-04-23 09:19:51 +02:00
Mark Nauwelaerts 5823dd4724 collectpads2: always recording incoming segment info if no buffer_func set 2012-04-17 12:23:48 +02:00
Vincent Penquerc'h b642b87579 collectpads2: assume 0 based segment if no time segment was provided
https://bugzilla.gnome.org/show_bug.cgi?id=669305
2012-04-16 11:08:07 +02:00
Wim Taymans bdda711d03 queue2: signal delete before waiting
When we don't have the requested data in the ringbuffer and we move our read
pointer to the requested position, signal the delete cond to inform the writer
that we changed the current fill level. If we don't, the writer might stay
blocked and we might wait forever.
2012-04-11 12:45:46 +02:00
Wim Taymans dc3d3674b1 queue2: add test for ringbuffer deadlock 2012-04-11 12:45:43 +02:00
Wim Taymans ccbeb19881 queue2: update current read position before waiting
When we don't have enough bytes in the ringbuffer to satisfy the current
request, first update the current read position before waiting. If we don't do
that, the ringbuffer might appear full and the writer will never write more
bytes to wake us up.
2012-04-11 12:45:41 +02:00
Wim Taymans 463a8d9abf queue2: add range only on sinkpad
Only add the range when we receive a segment event on the sinkpad. The add_range
method will modify the write position, which only makes sense to do on the
sinkpad.
2012-04-11 12:45:37 +02:00
Wim Taymans e3ca88ea7b queue2: fix debug message
We're not writing to the offset of the buffer
2012-04-11 12:45:31 +02:00
Wim Taymans 30c425c29f queue2: add_range already updates the level 2012-04-11 12:45:24 +02:00
Alexander Saprykin 30872d3a5f toc: fix memory leaks while copying content 2012-04-11 10:28:43 +02:00
Alexander Saprykin 932e063ec2 tocsetter: fix memory leaks in unit test 2012-04-11 10:02:21 +02:00
Alexander Saprykin 43c5930d17 toc: fix memory leaks in unit test 2012-04-11 10:02:06 +02:00
Wim Taymans 2e28804a6e queue2: clear seeking flag in all cases
Also clear the seeking flag when downstream is in pull mode.
2012-04-10 16:06:41 +02:00
Wim Taymans fd9c328260 gst: add toc entry ref/unref 2012-04-10 12:49:04 +02:00
Wim Taymans b7a8051d95 queue2: set seeking flag with the queue lock 2012-04-10 12:44:38 +02:00
Wim Taymans 5755e24379 queue2: Keep track of the seeking state
Set the seeking flag right before we send a seek event upstream and discard all
data untill we see a flush-stop again. We need to do this because we activate
the range that we seek to immediately after sending the seek event and it is
possible that we receive data in our chain function from before the seek
which would then be added to the wrong range resulting in data corruption.
2012-04-10 12:44:35 +02:00
Wim Taymans 49a4b801ac queue2: make range on newsegment for ringbuffer
When using the ringbuffer, handle the newsegment event like we handle it when
using the temp-file mode: create a new range for the new byte segment. The new
segment should normally already be created when we do a seek.
2012-04-10 12:44:30 +02:00
Sebastian Dröge 829eafad0e multiqueue: Don't use buffer after pushing it downstream 2012-04-09 16:40:47 +02:00
Sebastian Dröge 1484a211f1 element: Fail if a pad for a non-request template is requested 2012-04-09 16:01:02 +02:00
Tim-Philipp Müller ad6da493e8 win32: add new TOC API to libgstreamer.def
Fixes 'make check'.
2012-04-07 16:06:59 +01:00
Tim-Philipp Müller c31acbe4f9 tests: add new toc test binaries to .gitignore 2012-04-07 16:05:33 +01:00
Tim-Philipp Müller 94696f4bd9 gst: don't export private TOC functions 2012-04-07 16:04:14 +01:00
Wim Taymans f251e3073b atomicqueue: fix race
After a writer has written to its reserved write location, it can only make the
location available for reading if all of the writers with lower locations have
finished.
2012-04-07 15:30:12 +01:00
Wim Taymans 930c019721 atomicqueue: fix subtle race
Fix a race where the reader would see the updated the tail pointer before the
write could write the data into the queue. Fix this by having a separate reader
tail pointer that is only incremented after the writer wrote the data.
2012-04-07 15:24:53 +01:00
Tim-Philipp Müller d05d29d0c9 filesrc: set default block size from local define
Doesn't actually change the default value, just makes use of the
define there is. Superficial testing with fakesink and jpegdec did
not reveal improved performance for bigger block sizes, so leave
default as it is.
2012-04-07 15:21:29 +01:00
Wim Taymans 4638f15de2 queue2: don't update the current reading_pos in flush
A flush from the upstream element should not make buffering go to 0, the next
pull request might be inside a range that we have and then we don't need to
buffer at all. If the next pull is outside anything we have, buffering will
happen as usual anyway.
2012-04-06 16:46:58 +02:00
Wim Taymans d8a61930af queue2: check the pad mode on the right pad 2012-04-06 12:32:49 +02:00
Wim Taymans f06458aabc queue2: forward flush events correctly
We want to forward the flush events received on the sinkpad whenever the srcpad
is activated in pushmode, which can also happen when using the RINGBUFFER or
DOWNLOAD mode and downstream failed to activate us in pull mode.
2012-04-06 12:24:22 +02:00
Wim Taymans 67ccad0621 queue2: stop waiting for more data after EOS
When we have EOS, read the remaining bytes in the buffer and make sure we don't
wait for more data. Also clip the output buffer to the amount of remaining
bytes.
2012-04-05 10:17:46 +02:00
Wim Taymans 9a1185673e queue2: check for filled buffer correctly
When using the ringbuffer mode, the buffer is filled when we reached the
max_level.bytes mark or the total size of the ringbuffer, whichever is smaller.
2012-04-05 10:16:52 +02:00
Wim Taymans 0bb0c68566 queue2: avoid waiting for a filled buffer
Use a threshold variable to hold the maximum distance from the current position
for with we will wait instead of doing a seek.
When using the ringbuffer and the requested offset is not available, avoid
waiting until the complete ringbuffer is filled but instead do a seek when the
requested data is further than the threshold.
Avoid doing the seek twice in the ringbuffer case.
Use the same threshold for ringbuffer and download buffering.
2012-04-05 10:16:46 +02:00
Tim-Philipp Müller 4d79cbe7ef tools: fix compiler warning
gst-launch.c: In function ‘print_toc_entry’:
gst-launch.c:446:3: error: the size of array ‘spc’ can’t be evaluated [-Werror=vla]
gst-launch.c:446:3: error: variable-sized object may not be initialized
2012-04-03 09:27:09 +01:00
Stefan Sauer 2c715dd827 gst-launch: add -c, --toc to print the toc
Print the nested chapter and edition structure of the chapters message.
2012-04-02 21:50:55 +02:00
Alexander Saprykin 72c7b56b01 docs: add overview of GstToc usage 2012-04-02 21:50:55 +02:00
Alexander Saprykin f9e99a24e6 docs: Add GstToc and GstTocSetter sections with related functions 2012-04-02 21:50:55 +02:00
Alexander Saprykin 4b6969c2a6 gstchecks: Add unit test for the GstTocSetter 2012-04-02 21:50:55 +02:00
Alexander Saprykin 936f524ee5 gstchecks: Add unit test for the GstToc 2012-04-02 21:50:55 +02:00
Alexander Saprykin 3f30c73443 Add new GstTocSetter interface 2012-04-02 21:50:55 +02:00
Alexander Saprykin 6e65daa4d1 Add new TOC query 2012-04-02 21:50:55 +02:00
Alexander Saprykin 03d0f569b3 Add new TOC message 2012-04-02 21:50:55 +02:00
Alexander Saprykin c3f97992c4 Add new TOC and TOC select events 2012-04-02 21:50:55 +02:00