Commit graph

9323 commits

Author SHA1 Message Date
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 0e74bfe248 segment: add gst_segment_set_running_time
Added new method for closing the segment to a specific running time.

API: GstSegment::gst_segment_set_running_time()
2009-06-04 12:53:20 +02:00
Tim-Philipp Müller fef7c3f2ff po: update .po files for string changes
This makes sure that people who get themselves a fresh checkout
don't immediately have changed *po files after running make, which
would cause a bit of hassle next time the files are updated. Better
to keep them up-to-date when strings change.
2009-06-04 00:59:04 +01:00
Tim-Philipp Müller 32ba8b4fb3 errors: reword state change failed error message and remove bugzilla link
Reword this message a bit to make it clearer what it means, namely that
the state change may have failed for good reasons, but that the element
just failed to post a proper error on the bus. This is not an internal
GStreamer bug, and we really don't need people to flood bugzilla with
bug reports if one such plugin bug ever makes it into the wild.
2009-06-04 00:59:03 +01:00
Tim-Philipp Müller 99a1493e69 gst-launch: refer to element, pad, or object in some message strings
Revisit these strings now that the change regarding the message source
object in gst_element_found_tags_for_pad() got reverted. Try to refer
explicitly to what kind of element it is (element, pad, etc.) in some
cases, which is nicer than having to deduce this info (and we can
re-use the already existing translated strings for the most common
case). It also makes for better example code, since it's clear now
that the message source object doesn't have to be an element.
2009-06-04 00:40:52 +01:00
Tim-Philipp Müller 604097bc3a API: add GST_MESSAGE_SRC_NAME macro
Add GST_MESSAGE_SRC_NAME macro that always returns a non-NULL string.
Useful for debugging and logging purposes.
2009-06-04 00:40:51 +01:00
Wim Taymans 92984a116b segment: add method for converting to position
Add gst_segment_to_position() that converts a running_time to a position in the
segment. A faulty variant of this function is currently used in inputselector
but we'll need it for frame stepping too.

API: GstSegment::gst_segment_to_position()
2009-06-03 19:06:30 +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
Tim-Philipp Müller db6f3ae042 Revert "go back to allowing gettext 0.11.5, but don't mix with libtool 2.2"
This reverts commit 31c09d738c.

Reverting this, since it breaks autogen.sh for me on debian sid.
Failure is: "libtool 2.2 requires autopoint 0.17 or higher" even though
0.17 was found.
2009-06-03 09:49:59 +01:00
Tim-Philipp Müller b345a8d0db Revert "only update submodule when it is not on a specific branch"
This reverts commit 93b83333aa.

Reverting since this fails on a fresh checkout. Also, we shouldn't
depend on possibly translated strings.
2009-06-03 09:49:59 +01:00
Tim-Philipp Müller df851d54ef docs: fix up reference to gst-launch-0.8
Also mention decodebin2, uridecodebin, and playbin2
2009-06-03 09:49:59 +01: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
Thomas Vander Stichele 31c09d738c go back to allowing gettext 0.11.5, but don't mix with libtool 2.2 2009-06-03 01:25:26 +02:00
Thomas Vander Stichele 93b83333aa only update submodule when it is not on a specific branch 2009-06-03 01:02:43 +02:00
David Schleef 08fb55c2e1 tools: Set pipeline to PAUSED before waiting for main loop idle
When it is shutting down a pipeline after ctrl-c, set pipeline to
paused before waiting for the main loop to complete all pending
transactions.  Fixes #584657.

If some part of the pipeline is generating signals or idle functions
at a fast rate, waiting for a main loop iteration may never return.
2009-06-02 13:49:36 -07:00
Stefan Kost 47d9904eba structure: fix serialisation of nested structures.
Use string_warp/unwrap to escape delimiters, otherwise deserialisation fails.
Also move GST_ASCII_IS_STRING to private header to avoid keeping it in sync.
Also use '\0' when terminating a string for better readability.
2009-06-02 18:39:17 +03: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
Tim-Philipp Müller 51f50a5c67 info: widen log level strings to take into account the new MEMDUMP 2009-06-01 20:28:30 +01: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 2f6439dfde examples: step in time as well 2009-06-01 13:37:28 +02:00
Wim Taymans 67752e5adb example: print step_done message and sync
Dump the step_done message contents.
Sync against the clock when going to PLAYING.
2009-06-01 13:37:27 +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 cb9597a271 Add frame stepping in PAUSED example 2009-06-01 13:37:26 +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
Wim Taymans 386c516e51 add new API for framestepping
Add new STEP event and methods for creating/parsing the event
Update design docs.
Add new STEP_DONE message and method to create/parse.

API: GstEvent::gst_event_new_step()
API: GstEvent::gst_event_parse_step()
API: GstMessage::gst_message_new_step_done()
API: GstMessage::gst_message_parse_step_done()
2009-06-01 13:36:49 +02:00
Tim-Philipp Müller a565dbd1f3 structures: don't leak invalid or empty strings when we warn
Fixes minor memory leak in unit tests caused by the recent changes.
Since we're expected to take ownership of the GValue in the structure
field struct here, we need to unset it if we don't use it.
2009-06-01 10:10:20 +01:00
Stefan Kost fc866b82db controller: add test for cubic int. and too few control points
Added another tests to check some worries in Bug #582564.
2009-06-01 11:08:31 +03:00
Stefan Kost 7e27a53265 fakesrc: add a FIXME comment for blocksize vs. size-max property issue 2009-06-01 09:51:20 +03:00
Tim-Philipp Müller d9df74ea3e identity: hack around g_object_notify() bug by protecting it with a lock
Out-of-band events might lead to us calling g_object_notify() from a
non-streaming thread, which can cause crashes if g_object_notify() is
being called from the streaming thread at the same time. See #554460.
2009-05-31 21:30:18 +01:00
Stefan Kost 249b9b9aa4 controller: use real world number in benchmark 2009-05-31 22:39:05 +03:00
Stefan Kost 612387da25 registry: fix comment formatting 2009-05-31 22:39:05 +03:00
Tim-Philipp Müller 7e4b164c12 fakesink: hack around crasher bug in g_object_notify() for out-of-band events
GObject may crash if two threads do concurrent g_object_notify() on the same
object. This may happen if fakesink receives an out-of-band event such as
FLUSH_START while processing a buffer or serialised event in the streaming
thread. Since this may happen with the default settings during a common
operation like a seek, and there seems to be little chance of a timely fix
in GObject (see #166020), we should hack around this issue by protecting all
of fakesink's direct g_object_notify() calls with a lock.

Also add unit test for the above.

Fixes #554460.
2009-05-31 19:17:33 +01:00
Tim-Philipp Müller 7c4e618471 taglists: make _get_{string|pointer} return FALSE for NULL values
Make gst_tag_list_get_string() return FALSE for NULL strings and
empty strings, and gst_tag_list_get_pointer() return FALSE for
NULL pointers, like we do with dates and buffers.

Fixes #560345.
2009-05-31 16:17:45 +01:00
Tim-Philipp Müller 30c890c7a2 taglists: warn if someone tries to add empty or NULL string tags to a taglist
Also warn if an element or application tries to add a field with an
empty string to a structure (NULL strings are still needed and
allowed though) and do all those checks in the right function.

Fixes #559643.
2009-05-31 15:38:01 +01:00
Tim-Philipp Müller c8acbbfde0 structure: add gst_structure_id_new() convenience function
Add convenience wrapper for gst_structure_id_empty_new() plus
gst_structure_id_set() and use it in a few places.

API: gst_structure_id_new()
2009-05-29 19:28:10 +01:00
Tim-Philipp Müller bc7c7e9836 micro-optimisation: use GST_QUARK in more places
Use gst_structure_id_empty_new() in combination with GST_QUARK
rather than gst_structure_id_new() when creating message, event,
query and taglist structures. Mostly just because we can.
2009-05-29 19:27:43 +01:00
Wim Taymans ae62089f58 element: reset start_time in lost state 2009-05-29 16:14:36 +02:00
Wim Taymans 6beb496878 docs: update element an pipeline docs 2009-05-29 13:03:15 +02:00
Wim Taymans 170b9d6253 docs: remove a TODO item that is fixed now 2009-05-29 12:48:28 +02:00
Wim Taymans 087c8957d2 pipeline: deprecate old methods, fix test
Deprecate the old _set_stream_time and _get_last_stream_time methods because
they are now equivalent to the better named _set/_get_start_time.
2009-05-29 12:21:36 +02:00
Wim Taymans 6affcdd2ad pipeline: use START_TIME to keep track of time
Use the element START_TIME to keep track of the running time when the pipeline
paused so that it can be used to restore the base_time.
Take the start_time before setting the children to PAUSED so that we can
distribute the start_time to the children.
2009-05-29 11:55:39 +02:00