Edward Hervey
dcdc73d182
gstcheck: Add a stream consistency checking helper routine. Fixes #588744
2009-07-20 10:46:19 +02:00
Edward Hervey
1d0c6a669f
basesrc: Serialize tags into the dataflow. Fixes #588745
2009-07-20 08:49:43 +02:00
Tim-Philipp Müller
79c8e24885
docs: fix API docs for gst_{adapter|byte_reader}_masked_scan_uint32
...
Clarify byte reader docs a bit: offset is relative to the current
position of the reader, not to the start of the data. Also, the
examples in both the adapter docs and the byte reader docs have
the mask and pattern arguments swapped (see #587561 ). Spotted
by Carl-Anton Ingmarsson.
2009-07-16 14:17:03 +01:00
Stefan Kost
3ce0c64b45
basetransform: take size once
2009-07-14 08:32:24 +02:00
Stefan Kost
cfae0c15e7
collectpads: make it the best of wims and edwards patch.
...
Check the right flushing flag, but still add it to the pad-list.
2009-07-07 00:23:41 +01:00
Stefan Kost
2288f9f6ec
basetransform: make comment a FIXME comment
2009-07-06 19:52:44 +01:00
Stefan Kost
4bfb312e13
logging: use perf category for dropped buffers
2009-07-06 19:52:44 +01:00
Edward Hervey
e6d949328f
collectpads: Don't forward FLUSH_STOP if some input streams are still flushing.
...
This guarantees that only one FLUSH_STOP event (the last one) will be sent
downstream when a flushing seek is being done through collectpads.
2009-07-05 21:24:42 +02:00
Edward Hervey
ed18ceffe6
collectpads: Update the cookie when setting ourselves as flushing.
...
This forces the pad status to be re-evaluated on the next _check_pads().
2009-07-04 17:17:18 +02:00
Tim-Philipp Müller
4d76b175ef
docs: fix gtk-doc /*< private >*/ marker
2009-07-02 01:18:57 +01:00
Edward Hervey
53b09c392a
libs/controller: Set default gst debugging category.
2009-06-29 12:07:36 +02:00
Wim Taymans
92b0f32d74
bufferlist: use faster gst_buffer_list_get()
...
Use the faster gst_buffer_list_get() to get the first buffer of a list.
2009-06-29 11:56:10 +02:00
Ognyan Tonchev
27fe127e76
basesink: take timestamp later
...
Make sure we don't accidentally cast a bufferlist of a buffer and try to take
the timestamp of it.
Refixes #585960
2009-06-29 11:46:00 +02:00
Stefan Kost
3e21ddf81f
logging: add a performace log category
...
This category can be used to log slow code path and help auditing the
performance. Add FIXME-0.11 to some questionable categories.
2009-06-29 11:28:01 +03:00
Tim-Philipp Müller
31ff42de21
basesink: don't do things with side effects within a g_assert()
...
Make the bufferlist stuff work properly when things are compiled
with -DG_DISABLE_ASSERT.
2009-06-25 11:25:46 +01:00
Tim-Philipp Müller
6b64d41937
bytereader: add a bunch of utility functions for strings and a data dup function
...
API: gst_byte_reader_dup_data
API: gst_byte_reader_dup_string
API: gst_byte_reader_dup_string_utf8
API: gst_byte_reader_dup_string_utf16
API: gst_byte_reader_dup_string_utf32
API: gst_byte_reader_skip_string
API: gst_byte_reader_skip_string_utf8
API: gst_byte_reader_skip_string_utf16
API: gst_byte_reader_skip_string_utf32
API: gst_byte_reader_peek_string
API: gst_byte_reader_peek_string_utf8
API: gst_byte_reader_get_string
API: gst_byte_reader_get_string_utf8
And some basic unit tests. Fixes #586568 .
2009-06-23 02:17:48 +01:00
Wim Taymans
dd3e2b557e
collectpads: use the right flushing flag.
...
We need to use the pad private flag because the other pad flag is protected with
the pad lock instead.
2009-06-18 16:50:42 +02:00
Edward Hervey
a295d22575
collectpads: Properly handle flushing pads.
...
If a pad is flushing, it should not be considered as either eos or
containing data.
2009-06-18 16:43:27 +02:00
Wim Taymans
c88e05c861
basesink: add Since tag for new method
2009-06-16 13:34:38 +02:00
Branko Subasic
de5bcfc4cd
basesink: add support for buffer list
...
Fixes #585960
2009-06-16 13:32:37 +02:00
Wim Taymans
6a1d8feccc
collectpads: fix .h indentation
2009-06-15 18:44:14 +02:00
Wim Taymans
4c990aab3a
basesrc: add some more debug
2009-06-15 18:43:52 +02:00
Tim-Philipp Müller
674447fafe
bytereader: add gst_byte_reader_masked_scan_uint32()
...
Add a pattern scan function similar to the one recently added to
GstAdapter, and a unit test (based on the adapter one).
Fixes #585592 .
API: add gst_byte_reader_masked_scan_uint32()
2009-06-13 10:53:49 +01:00
Wim Taymans
25067558dc
stepping: more stepping improvements
...
Update design doc with step-start docs.
Add eos field to step done message
when stepping in reverse, update the segment time field.
Flush out the current step when we are flushing.
2009-06-12 13:20:36 +02:00
Wim Taymans
23b772664b
basesink: post step-start
...
when we clip, also stop the stepping.
Don't do QoS when stepping
Post step-start when queueing and activating the step.
2009-06-12 13:16:29 +02:00
Wim Taymans
6e633cbe33
basesink: update segment start/stop for clipping
...
When we start stepping, store the start/stop values of the segment before we
install new start/stop values for clipping in non-flushing steps.
for non-flushing steps, update the element start time. For flushing steps, it
does not change because running_time does not advance
Make sure we always perform the stop_stepping operations even when we drop
frames.
2009-06-09 12:06:35 +02:00
Wim Taymans
72e8d9909c
basesink: do proper clipping in stepping
...
Update the stop position of the segment so that we clip correctly.
After clipping in non-flushing mode, rerender the remainder of the buffer.
2009-06-09 10:25:34 +02:00
Wim Taymans
89c42f8506
stepping: do flushing steps correctly
...
Note in the docs that a flushing step in PLAYING brings the pipeline to the lost
state and skips the data before prerolling again.
Implement the flushing step correctly by invalidating the current step
operation, which would activate the new step operation.
2009-06-08 17:41:56 +02:00
Jan Schmidt
f0f9ed875f
basesink: Change awkward wording in a translateable message.
2009-06-08 16:16:27 +01:00
Wim Taymans
a4c6d04b4c
basesink: add non-flushing steps
...
Add support for non-flushing steps and with different rates.
Clear step info when flushing
2009-06-08 16:27:36 +02:00
Mark Nauwelaerts
4bb3702886
basesrc: reply to QUERY_SEEKING with original format. Fixes #584838 .
2009-06-05 16:01:27 +02:00
Wim Taymans
fa7db7d247
basesink: fix clipped start/stop after step
...
Use the segment helpers to get a more accurate clipped start/stop position after
a stepping operation ended.
2009-06-04 17:27:03 +02:00
Wim Taymans
957e40343d
basesink: use more correct segment methods
...
Use the more correct new segment methods for updating the segment before and
after a step.
2009-06-04 12:53:23 +02:00
Wim Taymans
a907f8d145
basesink; handle EOS correctly.
...
Handle EOS and buffers without a timestamp gracefully.
Remove a warning that is not so much a warning now anymore.
2009-06-03 15:39:13 +02:00
Wim Taymans
c811d51471
basesink: forget previous times when stepping
...
When we start a flushing step operation, forget about the previous stream time
so that the position reporting works correctly.
2009-06-03 10:39:53 +02:00
Wim Taymans
71a5ebe638
basesink: fix regression in unit tests
...
Store the timestamp of the buffer after prerolling. While we are prerolled we
want to report the position of the segment start value.
2009-06-02 15:37:22 +02:00
Wim Taymans
484d188440
basesink: post a warning on excessive framedrops
...
When we go into emergency rendering, post a warning informing the user about
this fact.
2009-06-01 19:37:14 +02:00
Wim Taymans
5479772bec
basesink: more stepping in reverse
...
Fix stepping and position reporting in reverse playback.
2009-06-01 13:37:29 +02:00
Wim Taymans
8c54c70d9c
basesink: use start_time as the step start
...
Use the start_time of the element as the point from where the step operation
starts. This fixes stepping in all paused states.
2009-06-01 13:37:29 +02:00
Wim Taymans
642bb32196
basesink: catch step cases in _wait_preroll()
...
When a subclass is blocking in _wait_preroll() in the _render method, make sure
we can unlock the subclass and detect this return value from the render method.
2009-06-01 13:37:29 +02:00
Wim Taymans
1caab05238
basesink: more stepping in reverse fixes
2009-06-01 13:37:28 +02:00
Wim Taymans
4be27fa555
basesink: small cleanups
2009-06-01 13:37:28 +02:00
Wim Taymans
0c205b96b4
framestep: implement backwards framestep
...
Update framestep document, we want to pass the flush flag in the step-done
message.
Add flush flag to the gstmessage.
Update examples to use the new step-done message api.
Implement framestep with playback rates < 0.0 too.
2009-06-01 13:37:28 +02:00
Wim Taymans
1839782379
basesink: add framestepping in time
2009-06-01 13:37:28 +02:00
Wim Taymans
7a7e9629ce
basesink: keep track of stepped time
...
Pass running_time around so that the stepping code can calculate the elapsed
time correctly.
2009-06-01 13:37:27 +02:00
Wim Taymans
f07b86f18b
basesink: move stuff around, more stepping
...
Make start and stop_stepping methods and move their invocation in the right
places.
Perform the atual stepping operation where we have full context about the
timestamps.
2009-06-01 13:37:27 +02:00
Wim Taymans
546c959f26
basesink: first stab at frame stepping in PAUSED
...
Unlock the prerolled frame and recheck if we need to step.
Keep a simple counter for the frames we're about to skip while stepping and
preroll/post step_done when stepping finished.
2009-06-01 13:37:26 +02:00
Arnout Vandecappelle
c74c3bf1b3
adapter: fix _masked_scan_uint32() at boundaries
...
gst_adapter_masked_scan_uint32 could return values smaller than offset
if the first byte(s) of the mask are 0 and the pattern matches the
beginning of the adapter.
Added examples to documentation of gst_adapter_masked_scan_uint32().
Also added some more masked boundary tests.
Fixes #584118
2009-05-28 22:02:21 +02:00
Stefan Kost
04ece69838
controller: add G_LIKELY and join two if for same condition
...
A G_LIKELY for the sequence!=NULL checks. Join two ifs to an if-else. Add
indent guides to keep indent form breaking the function declaration
2009-05-22 14:21:39 +03:00
Edward Hervey
d72c17e328
gsttypefindhelper: Fix indentation
2009-05-22 12:57:10 +02:00
Jan Schmidt
2437a08666
controller: Silence a warning from the GSequence being NULL.
...
Fix a warning that occurs when the self->priv->values is NULL and
the code tries to retrieve an iterator from it. The warning was showing
up in the checks for the volume element.
2009-05-22 09:43:02 +01:00
Wim Taymans
72232cfef1
adapter: improve the flush function
...
Remove a compare and branch from flush.
2009-05-20 22:20:46 +02:00
Stefan Kost
6784355d52
controller: fix assertion when freeing the control source
2009-05-20 17:33:18 +03:00
Wim Taymans
fd76e4fc93
adapter: potentially save a memcpy in _take
...
Directly use the assembled_data in _take() functions when we can instead of
copying it out.
2009-05-20 12:48:41 +02:00
Wim Taymans
f3ff7ad055
adapter: micro optimisations
2009-05-20 11:36:11 +02:00
Wim Taymans
49c4e367e9
adapter: avoid comparisions in fast path
...
Small tweaks to reduce the number of useless compares in loops.
2009-05-20 11:12:43 +02:00
Wim Taymans
9197f4399b
adapter: avoid branch in copy code
2009-05-20 10:28:45 +02:00
Wim Taymans
270723c85c
adapter: add _masked_scan_uint32
...
Add a reasonably optimized new gst_adapter_masked_scan_uint32() function
to scan the adapter for a pattern after applying a mask.
Add some unit tests.
API: GstAdapter::gst_adapter_masked_scan_uint32()
Fixes #583187
2009-05-20 00:37:53 +02:00
Wim Taymans
d6b21ba529
adapter: more optimisations
...
Remove duplicate copy code (_peek_into and _copy) and make a unified
optimized copy function.
2009-05-19 22:13:04 +02:00
Sebastian Dröge
10743802be
controller: Use ordered GSequence instead of GList
...
This makes lookups and insertions O(log n) instead of
always O(n) for insertions and O(n) in worst case for
lookups.
Fixes bug #582564 .
2009-05-14 22:13:47 +02:00
Wim Taymans
b23279e922
adapter: don't use realloc, it does a memcpy
...
Don't use realloc to grow the scratch area because we don't want the memcpy the
old useless data into the new area before we write our new stuff in it.
2009-05-13 23:52:02 +02:00
Wim Taymans
cc7985ab48
adapter: use g_realloc for resizing the buffer
...
Use g_realloc for resizing the internal buffer instead of a
less fancy _free/_malloc pair.
2009-05-13 22:51:18 +02:00
Wim Taymans
bb013081a4
adapter: move new member to private struct
...
Move the new members to a private struct because we don't have enough padding
anymore on 32-bits platforms.
2009-05-13 21:35:23 +02:00
Wim Taymans
763a6f6761
adapter: update some docs
2009-05-13 18:50:23 +02:00
Wim Taymans
3d19b75147
adapter: add method to keep track of timestamps
...
Keep track of the timestamp and offset associated with the current head of the
adapter.
API: GstAdapter::gst_adapter_prev_timestamp()
2009-05-13 16:22:58 +02:00
Wim Taymans
8ceff30ca9
adapter: small cleanups
2009-05-13 16:20:26 +02:00
Wim Taymans
605639a2bf
adapter: optimize taking the headbuffer
...
When a are requested to take a buffer from the adapter that is exactly the
headbuffer, don't make a subbuffer of it but return that head buffer.
Add a unit-test for this new optimisation.
2009-05-12 10:25:40 +02:00
Wim Taymans
50bcf96ffe
basesrc: don't ignore pad_start return value
2009-05-11 23:06:39 +02:00
Stefan Kost
e778c5fd8b
logging: fix unused variable warning when disabling debug logs.
...
The var was NULL anyway, bacause of the ifdefs there, the message makes no
sense including it.
2009-04-15 23:35:35 +03:00
Stefan Kost
dd3c9ab6b6
controller: factor out duplicated code and add a description for it.
...
Also fix typo in the tests while reviewing them.
2009-04-14 22:08:56 +03:00
Edward Hervey
9e4fa43657
basesink: Remove dead assignments.
...
sstart/sstop/rstart/rstop are all either:
* assigned values later on before being used in 'do_times:' (EOS and buffers)
* not used (non-EOS events)
2009-04-04 14:39:51 +02:00
Edward Hervey
ec3cd5d438
basesrc: remove dead assignment.
...
The variable will not be read before it's assigned a value line 942/945
2009-04-04 14:38:52 +02:00
Sebastian Dröge
d12034ab4b
gst: Use g_once_init* or G_DEFINE_TYPE
2009-04-04 10:59:39 +02:00
Edward Hervey
14b356b439
controller: remove dead assignment.
...
The value of prop is being overwritten just after without being read.
2009-04-03 12:57:24 +02:00
Edward Hervey
471bd93af5
adapter: remove dead assignment.
...
The value set to to_copy at that line is never used, and is overwritten
further down before being read.
2009-04-03 12:57:24 +02:00
Edward Hervey
6577af3635
basesink : Remove unused variable.
...
sync is never used anywhere in that code.
2009-04-03 12:57:24 +02:00
Edward Hervey
9bf1d7247a
basetransform: move unused variable in the #if 0 block.
...
That variable is only used by the code which has been if 0'd
2009-04-03 12:57:24 +02:00
Edward Hervey
00cbbc87c7
Remove unused variables detected by LLVM's Clang static analyzer.
2009-04-03 12:56:48 +02:00
Sebastian Dröge
3933296685
gstcheck: Call gst_check_init() before creating the suite
...
This allows using the GStreamer or GObject API in the suite
creation function.
2009-04-02 10:44:23 +02:00
Tim-Philipp Müller
13f8041238
basesink: fix once-per-second 'emergency rendering' for case where all buffers but the very first are late
...
Due to a typo basesink didn't do any emergency rendering of late buffers
if the only buffer ever rendered was the first one with timestamp 0. This
means that in cases where the decoder is very very slow, we'd never see
any buffers but the very first one rendered. Fixes #576381 .
2009-03-23 12:34:34 +00:00
Stefan Kost
b118e869a2
controller: Fix generation of control-change arrays.
...
When generating arrays of control changes timestamp variable was used instead
the local ts variable that we increment when stepping through the array.
Pointed out by Martin Pokorny.
2009-03-20 11:28:37 +02:00
Tim-Philipp Müller
d430552ec3
gstcheck: fix for check versions > 0.9.6
...
A new argument allowed_exit_value was added in SVN recently (#574213 ).
2009-03-19 21:31:08 +00:00
Stefan Kost
c2f1cb40fc
collectpads: add debug logging to make it easier to trace it
2009-03-15 23:41:33 +02:00
Edward Hervey
c1a75a0b45
gstbasesrc: unsigned long is "%lu", not "%ul". Fixes build on macosx
2009-03-11 11:23:05 +01:00
Stefan Kost
36205e7d42
logging: some additional logging for tracing caps negotiation.
...
Demote one log that can come quite often. Remove one fixme that is done. Apply
gst-indent changes.
2009-03-10 21:13:40 +02:00
Stefan Kost
de48f9c507
collectpads: revert accidential commit from the queue (me should start using branches)
2009-03-06 22:10:10 +02:00
Stefan Kost
436b0e7275
collectpads: reliably go to eos. Fixes #574160
...
Update collectpads status when removing pads.
2009-03-06 21:50:19 +02:00
Andy Wingo
e2ff005e63
basesink: propagate UPSTREAM events in pull mode too
...
* libs/gst/base/gstbasesink.c (gst_base_sink_send_event): Propagate
upstream events in pull mode too.
2009-03-05 17:42:22 +01:00
Edward Hervey
f0481cb717
GstAdapter: Discard empty buffers in _push(). Fixes #574024
2009-03-04 09:20:43 +01:00
Stefan Kost
df620c9cb6
basesink: move left over handling of the error case to the activate_failed label.
...
If was left as dead code.
2009-02-26 15:42:06 +02:00
Wim Taymans
79c3c6a339
Error out more specifically on empty caps
...
When we get empty caps from the getcaps function in the default negotiate
function, post a more descriptive error.
2009-02-23 17:37:46 +01:00
LRN
4cd4883ed3
Fix signed when compiling with MSys/MinGW
...
fix signed issues when compiling with MSys/MinGW.
Fixes #572591 .
2009-02-23 12:33:13 +01:00
Wim Taymans
805569c873
Don't forward LATENCY event when not ready
...
When we are not ready to handle a latency query (we are not yet prerolled) we
also don't try to forward the latency event because that might cause unexpected
errors when upstream is not yet linked.
2009-02-23 10:53:17 +01:00
Stefan Kost
e31a7709c3
controller: remove unused variable
2009-02-05 13:42:30 +02:00
Stefan Kost
f207841b89
check: Don't assume gst_pad_get_peer returns non NULL value.
2009-02-04 16:07:30 +02:00
Wim Taymans
d807bca61c
GstBaseSink: use new variable to schedule preroll
...
Use a separate variable to keep track if we need to call the preroll method
instead of abusing the commited variable.
2009-02-03 15:27:34 +01:00
Wim Taymans
fe4233120c
GstBaseSink: avoid calling preroll multiple times
...
Fix a regression introduced by fix for #567725 in commit
1c7ab4ed4f
. We should only call the preroll
function once namely when we did not yet commit the state change.
Add a unit test to check that we call the preroll function when interrupting the
clock_wait (see #567725 ).
Add a unit test to check that we only call the preroll function once.
2009-02-03 12:52:49 +01:00
Thijs Vermeir
8a080229c7
Force reconfigure of basetransform to recheck alloc request
...
While reconfiguring a basetransform element we need also to recheck
the alloc request. Because it's possible that due to caps changes
the proxy_alloc state is not correct anymore.
(Re-commit after discusion with Wim on IRC)
2009-02-02 18:23:41 +01:00
Wim Taymans
c786c5224a
Revert "Check suggested caps for proxy alloc"
...
This reverts commit 50afd45957
.
It breaks the interactive test-scale unit test.
2009-01-30 10:45:17 +01:00
Wim Taymans
a371ea6e5f
Revert "Force reconfigure of basetransform to recheck alloc request"
...
This reverts commit 3a4602d771
.
It breaks the interactive test-scale unit test.
2009-01-30 10:45:16 +01:00