Commit graph

5846 commits

Author SHA1 Message Date
Wim Taymans
3d949e988b element: don't mess with pad caps in activate
When deactivating a pad, let the pad decide what fields to clear.
2011-05-06 17:39:08 +02:00
Wim Taymans
3122f429cd event: only allow fixed caps in caps event 2011-05-06 17:39:08 +02:00
Sebastian Dröge
903dadef17 event: Improve documentation of gst_event_new_reconfigure() 2011-05-06 13:01:24 +02:00
Wim Taymans
fb3da828e5 element: rename gst_element_lost_state_full()
Rename gst_element_lost_state_full() to gst_element_lost_state() and
remove the old method name.
2011-05-06 12:19:16 +02:00
Wim Taymans
0637aa95c5 pad: clean up the .h file a bit 2011-05-06 12:09:00 +02:00
Wim Taymans
4372869e80 pad: implement more sticky events
Remove the context again, adding an extra layer of refcounting and object
creation to manage an array is too complicated and inefficient. Use a simple
array again.
Also implement event updates when calling gst_pad_chain() and
gst_event_send_event() directly.
2011-05-06 11:14:02 +02:00
Stefan Kost
218bc52c7f info: avoid redefinition of symbols when debugging is off
The refactoring of gst_debug_add_log_function() now causes build failure when
debug-logging is turned off. Just move it to the conditional part of the header.
2011-05-06 12:02:52 +03:00
Wim Taymans
14b619c170 event: reorder events
Reorder the sticky events so that they are in the order they should be pushed.
2011-05-06 11:00:18 +02:00
Wim Taymans
f663c9770b pad: simplify some more
If we get a context in the chain functions we always need to do a full update of
the context on the peer pad.
2011-05-05 19:24:46 +02:00
Wim Taymans
d3e0a37900 pad: improve context passing some more
Pass the context downstream when it got updated.
Have two ways of informing downstream of events, do a full context update when
the CONTEXT_PENDING flag is set and simply forward the event otherwise.
Set the CONTENT_PENDING flag when linking pads.
We don't need to old context anymore when updating the context of a pad.
2011-05-05 19:01:21 +02:00
Sebastian Dröge
292806f60e pad: Fix refcount leak of the parent in the default event dispatch function 2011-05-05 17:05:21 +02:00
Wim Taymans
dfef1d027d pad: improve passing around the context
Improve passing around the context, only send the context to the peer element
when the CONTEXT_PENDING flag is set.
2011-05-05 16:34:29 +02:00
Sebastian Dröge
98d1ee4a8f gst: Update everything for the new GstIterator API 2011-05-05 15:36:03 +02:00
Sebastian Dröge
348563bc19 iterator: Refactor GstIterator to be more binding friendly and have saner refcounting
Fixes bug #638987.
2011-05-05 15:33:29 +02:00
Johan Dahlin
62c7339847 iterator: register as a boxed type
https://bugzilla.gnome.org/show_bug.cgi?id=638987
2011-05-05 15:33:29 +02:00
Johan Dahlin
b5a4aad134 iterator: use GSlice
https://bugzilla.gnome.org/show_bug.cgi?id=638987
2011-05-05 15:33:29 +02:00
Johan Dahlin
0e2cf0caa1 iterator: free struct in gst_iterator_free
https://bugzilla.gnome.org/show_bug.cgi?id=638987
2011-05-05 15:33:28 +02:00
Johan Dahlin
47ebd0755b iterator: store size in the struct
https://bugzilla.gnome.org/show_bug.cgi?id=638987
2011-05-05 15:33:28 +02:00
Sebastian Dröge
dc63e38219 caps: Merge structures when intersecting instead of appending them
This prevents adding duplicates over and over again to the resulting
caps if they already describe the new intersection result.

While this changes intersection from O(n*m) to O(n^2*m), it results in
smaller caps, which in the end will decrease further processing times.

For example in an audioconvert ! audioconvert ! audioconvert pipeline,
when forwarding the downstream caps preference in basetransform
(see e26da72de25a91c3eaad9f7c8b2f53ba888a0394) this results in
16 instead of 191 caps structures.
2011-05-05 15:22:14 +02:00
Sebastian Dröge
5a7ec99214 pad: Keep track of reconfigure events and the pad-needs-reconfiguring status 2011-05-05 15:11:51 +02:00
Sebastian Dröge
25916cff66 event: Rename renegotiate event to reconfigure
In 0.11 this event will also do reconfiguration of buffer pools
and similar things, not just renegotiation.
2011-05-05 15:06:00 +02:00
Olivier Crête
40cff0eb6d pad: Send renegotiate event on link 2011-05-05 15:04:33 +02:00
Olivier Crête
581533cd00 pad: Drop renegotiate event if there is no getcaps function on a sink pad
If there is no custom getcaps function on a sink pad, then changes in
downstream caps will never be propagated, so there is no point in trying to
renegotiate the capabilities.
2011-05-05 15:04:25 +02:00
Thiago Santos
a3dd59e97a event: Adding new renegotiate event 2011-05-05 15:02:39 +02:00
Wim Taymans
77569e0a9a pad: pass the context around
Pass the context from srcpad to sinkpad before dataflow when something
changed.
2011-05-05 13:17:08 +02:00
Wim Taymans
f16180a761 pad: update the context lazyly 2011-05-05 13:17:08 +02:00
Wim Taymans
e72d062b33 gst: init the GType early 2011-05-05 13:17:08 +02:00
Wim Taymans
08dbe37f6f context: add foreach function
Add a function to iterate over all stored events.
2011-05-05 13:17:08 +02:00
Wim Taymans
c4751ec8c1 Revert "context: use context on buffers instead of caps"
This reverts commit 9ef1346b1f.

Way to much for one commit and I'm not sure we want to get rid of the pad caps
just like that. It's nice to have the buffer and its type in onw nice bundle
without having to drag the complete context with it.
2011-05-05 13:17:08 +02:00
Miguel Angel Cabrera Moya
419f48d0d1 parse: don't unescape inside quotes
Escaped characters inside quoted strings are supposed to be unescaped by
deserialization functions, not by parsing functions.

https://bugzilla.gnome.org/show_bug.cgi?id=648025
2011-05-05 12:30:05 +02:00
Sebastian Dröge
e22f5d8a68 bin: Only post EOS messages after reaching the PLAYING state
Fixes bug #647756.
2011-05-05 12:30:05 +02:00
Sebastian Dröge
c6e9ce64ae pad: Remove unnecessary FIXME
Resetting the result is not necessary when resyncing because
pads that previously got the event will be skipped and we
need to consider the results of the previous pushes.
2011-05-05 12:30:05 +02:00
Sebastian Dröge
5a6ef6408f element: If activating one pad failed error out early instead of trying to activate the next pads
If one pad fails to activate the complete activation process will fail
anyway and trying to activate the other pads only wastes time.
2011-05-05 12:30:05 +02:00
Sebastian Dröge
5c84883f2e bin: If activating one pad failed error out early instead of trying to activate the next pads
If one pad fails to activate the complete activation process will fail
anyway and trying to activate the other pads only wastes time.
2011-05-05 12:30:05 +02:00
Sebastian Dröge
65eafd9340 Merge branch 'master' into 0.11
Conflicts:
	docs/gst/gstreamer-sections.txt
	gst/gstelementfactory.c
	gst/gstminiobject.c
2011-05-05 12:27:51 +02:00
Wim Taymans
9ef1346b1f context: use context on buffers instead of caps
Put the srcpad context on buffers instead of caps. This allows us to associate
all the relevant info contained in events with a buffer.
2011-05-04 18:59:47 +02:00
Wim Taymans
9136abf623 pad: use the context to store sticky events
Store the sticky events in the context of a source pad.
2011-05-04 15:53:21 +02:00
Wim Taymans
0fee137dbc context: add helper object to manage events
Add a helper object to manage the events that define the context of a buffer and
a stream.
2011-05-04 15:20:10 +02:00
Wim Taymans
6cfd9d57e2 event: add new CAPS event
Add a new CAPS event that will be used to negotiate downstream elements. It'll
also stick on pad so that we can remove the GstCaps field on pads and the
GstCaps field on buffers.
2011-05-04 11:03:05 +02:00
Wim Taymans
bc9cffda90 pad: more sticky events work
Copy the sticky events from the srcpad to the sinkpad when linking pads. Set the
STICKY_PENDING flag to make sure that the sticky events are dispatched before
pushing the next buffer to the element.
2011-05-03 18:58:18 +02:00
Thiago Santos
a750aac2dd miniobject: Fix dup_mini_object function to handle NULL gvalues
g_value_dup_object handles gvalues that contain NULL pointers,
gst_value_dup_mini_object should do the same.

https://bugzilla.gnome.org/show_bug.cgi?id=649195
2011-05-03 08:15:51 -03:00
Stefan Kost
58fc672362 docs: fix copy'n'paste doc header mistake 2011-05-03 13:03:21 +03:00
Stefan Kost
c45ff2b12a docs: add two trivial doc blobs 2011-05-03 13:03:21 +03:00
Stefan Kost
319eef8aa9 docs: improve the syntax for the capsintersectmode docs 2011-05-03 13:03:20 +03:00
Stefan Kost
41754faaaf docs: fixup broken xref 2011-05-03 13:03:20 +03:00
Stefan Kost
a482babf55 docs: fix gtk-doc syntax 2011-05-03 13:03:20 +03:00
Stefan Kost
81c32bc56e docs: we don't need to document private members in opaque structs 2011-05-03 13:03:20 +03:00
Philippe Normand
4e36f93924 core: store presets, registry and plugins in XDG directories.
Presets and plugins moved to $XDG_DATA_HOME/gstreamer-0.11/
root directory. Registry moved to $XDG_CACHE_HOME/gstreamer-0.11/.

Fixes bug #518597.
2011-05-03 09:43:22 +02:00
Sebastian Dröge
5fe9bcd989 Merge branch 'master' into 0.11
Conflicts:
	configure.ac
	gst/gstbus.c
2011-05-03 09:42:58 +02:00
Wim Taymans
2243adffa1 event: add sticky flags to events
Add the sticky flag to events and a sticky index.
Keep sticky events in an array on each pad.
Remove GST_EVENT_SRC(), it is causing refcycles with sticky events, was not used
and is not very interesting anyway.
2011-05-02 18:34:18 +02:00
Wim Taymans
9d80fbac23 query: improve allocation parameters query
Use the same parameters as those used for the bufferpool. Make sure we can pass
a minimum and maximum amount of buffers needed.
2011-05-02 11:09:52 +02:00
Tim-Philipp Müller
1ebff8a510 pluginfeature: include plugin.h in header where we use a GstPlugin pointer
Should fix issue with gstreamermm build where <gst/gstindex.h> is included
directly instead of gst/gst.h.
2011-04-29 23:44:55 +01:00
Wim Taymans
6ab7e6c15d Remove pad_alloc, this can now be done better
Remove pad_alloc and all references. This can now be done more efficiently and
more flexible with the ALLOCATION query and the bufferpool objects. There is no
reverse negotiation yet but that will be done with an event later.
2011-04-29 13:26:19 +02:00
Wim Taymans
ed1862269a query: init the ALLOCATION query correctly
Don't add the 'pool' property instead of adding it with a NULL array.
2011-04-29 12:11:56 +02:00
Wim Taymans
ccfaa53fb2 query: fix parsing of the ALLOCATION query
Add methods for parsing the caps and the need_pool boolean.
2011-04-29 10:50:17 +02:00
Wim Taymans
6ea2e71c48 query: fix typo in method name and improve docs
Fixed typo in method name and add/improve the docs.
2011-04-28 16:20:22 +02:00
Wim Taymans
06f6935107 bufferpool: add query to request pool and configuration
Add a query to request allocation parameters and optionally a bufferpool as
well. This should allow elements to discover downstream capabilities and also
use the downstream allocators.
2011-04-28 15:31:48 +02:00
Wim Taymans
7c8405fa28 bus: fix timeout handling 2011-04-27 18:10:55 +02:00
Wim Taymans
442193f3f3 bufferpool: fix some docs 2011-04-27 17:56:12 +02:00
Wim Taymans
a61e0e5bde event: improve argument names of segments 2011-04-27 17:55:20 +02:00
Tim-Philipp Müller
06ca275916 Revert lockfree GstBus for the release
Drop in old GstBus code for the release to play it safe, since
regressions that are apparently hard to track down and reproduce
have been reported (on windows/OSX mostly) against the lockfree
version, and more time is needed to fix them.

This reverts commit 03391a8970.
This reverts commit 43cdbc17e6.
This reverts commit 80eb160e0f.
This reverts commit c41b0ade28.
This reverts commit 874d60e589.
This reverts commit 79370d4b17.
This reverts commit 2cb3e52351.
This reverts commit bd1c400114.
This reverts commit 4bf8f1524f.
This reverts commit 14d7db1b52.

https://bugzilla.gnome.org/show_bug.cgi?id=647493
2011-04-26 16:14:00 +01:00
Josep Torra
5ccda2f8f4 Small cosmetic cleanups
Make sure the return values from g_return_* are of the right type.
2011-04-25 11:10:47 +02:00
Wim Taymans
070cdaab7c Merge branch 'master' into 0.11 2011-04-25 10:30:41 +02:00
David Schleef
36fc7179cb minor inline documentation fix 2011-04-24 18:31:12 -07:00
Tim-Philipp Müller
f9625dbe55 registry: when removing a cached-but-no-longer-existing plugin, only remove features that belong to it
When a plugin file no longer exists, e.g. because it's been removed or
renamed, don't remove all features in the registry based on the *name*
of the plugin they belong to, but only remove those who actually belong
to that particular plugin (object/pointer).

This fixes issues of plugin features disappearing when a plugin .so file
is renamed.

https://bugzilla.gnome.org/show_bug.cgi?id=604094
2011-04-24 11:27:56 +01:00
Tim-Philipp Müller
4926ce31c7 pluginfeature: store pointer to plugin in addition to the plugin name
So we can reliably remove plugin features for a specific plugin later.

https://bugzilla.gnome.org/show_bug.cgi?id=604094
2011-04-24 11:27:19 +01:00
Tim-Philipp Müller
d3d5b98c2f registry: use TRACE log level to log files that don't look like plugins
Cuts down the noise in uninstalled setups.
2011-04-24 11:05:58 +01:00
Mark Nauwelaerts
03391a8970 bus: also allow popping a message without timeout if no poll available
... which happens in particular flushing a bus, possibly as part
of a state change, e.g. when having a pipeline in a pipeline
and then changing state back to NULL. The interior pipeline
will/might then flush the bus, which is a child bus from the
parent which does not have a poll anymore these days.

https://bugzilla.gnome.org/show_bug.cgi?id=648297
2011-04-21 12:29:34 +01:00
Wim Taymans
d939bea074 element: remove unused variable 2011-04-20 19:03:49 +02:00
Wim Taymans
9ccd6b1134 element: don't touch base_time or clock in state change
Don't touch the base_time or the clock when setting an element to the READY or
NULL state. It is the parent that will manage this for us.
2011-04-20 19:03:16 +02:00
Sebastian Dröge
4db7fc58d2 bufferlist: Implement gst_buffer_list_foreach() 2011-04-19 20:52:05 +02:00
Wim Taymans
8e76da20b6 Merge branch 'master' into 0.11 2011-04-19 19:30:28 +02:00
Wim Taymans
b8c1e81328 buffer: add method to compare buffer data
Add method to compare the data in a buffer.
2011-04-19 18:57:43 +02:00
Wim Taymans
24bb414035 Merge branch 'master' into 0.11
Conflicts:
	configure.ac
2011-04-19 16:21:15 +02:00
Havard Graff
547d451772 pad: unlock before freeing the cache to avoid deadlock
https://bugzilla.gnome.org/show_bug.cgi?id=648199
2011-04-19 15:15:34 +01:00
Tim-Philipp Müller
60bbb9c24f docs: add note/warning to gst_index_get_writer_id() docs about the OBJECT_LOCK
https://bugzilla.gnome.org/show_bug.cgi?id=646811
2011-04-19 13:23:19 +01:00
Tim-Philipp Müller
f4b178af3b query: const-ify formats arguments to gst_query_set_formatsv() 2011-04-19 11:48:05 +01:00
Sebastian Dröge
0f3f816f3f utils: Remove GST_BOILERPLATE and friends 2011-04-19 11:45:32 +02:00
Sebastian Dröge
6e41a3cf2f pad: Make the size parameter of gst_pad_alloc_buffer() unsigned
Internally guints were used everywhere already.
2011-04-18 10:47:26 +02:00
Sebastian Dröge
9b2a8b8480 pad: Don't allow fixating ANY caps and remove FIXME 2011-04-18 10:41:18 +02:00
Sebastian Dröge
7c8617ea82 bin: Enable DURATION query caching
Elements must now post a DURATION message on the bus if they
change the duration in PAUSED or PLAYING.
2011-04-18 10:36:41 +02:00
Sebastian Dröge
caaf5ad528 Merge branch 'master' into 0.11 2011-04-16 16:06:02 +02:00
Sebastian Dröge
a9e69dc3be gst: Don't use base_init and use G_DEFINE_TYPE instead of GST_BOILERPLATE 2011-04-16 15:59:40 +02:00
Sebastian Dröge
aad57970de element: Inherit element metadata and pad templates from parent classes
This allows to add pad templates and set metadata in class_init instead of
base_init. base_init is a concept that is not supported by almost all
languages and copying the templates/metadata for subclasses is the more
intuitive way of doing things.

Subclasses can override pad templates of parent classes by adding a new
template with the same now.

Also gst_element_class_add_pad_template() now takes ownership of the
pad template, which was assumed by all code before anyway.

Fixes bug #491501.
2011-04-16 15:59:35 +02:00
Tim-Philipp Müller
d22ad73e74 gst: gobject-introspection scanner doesn't need to scan or update plugin info 2011-04-16 13:49:45 +01:00
Sebastian Dröge
bc68243123 gst: make sure gobject-introspection scanner calls gst_init()
https://bugzilla.gnome.org/show_bug.cgi?id=647922
2011-04-16 14:34:41 +02:00
Sebastian Dröge
8bfdd8c817 Merge branch 'master' into 0.11 2011-04-16 09:33:06 +02:00
Sebastian Dröge
f51a23a83c Merge branch 'master' into 0.11 2011-04-16 08:59:58 +02:00
Tim-Philipp Müller
f660536eb3 pluginloader: only run gst-plugin-scanner with /usr/bin/arch wrapper on OS X >= 10.5
Based on patch by: Daniel Macks <dmacks@netspace.org>

Earlier versions of OSX don't support proper multiarch and
trying to use /usr/bin/arch -foo with those versions would
just break things.

https://bugzilla.gnome.org/show_bug.cgi?id=615357
2011-04-15 21:02:35 +01:00
Sebastian Dröge
379d5dfb07 bufferlist: Add boxed type for GstBufferListIterator for gobject-introspection 2011-04-14 16:14:02 +02:00
Sebastian Dröge
2d7c81f1d7 parse: Add boxed type for GstParseContext for gobject-introspection 2011-04-14 16:14:01 +02:00
Sebastian Dröge
bf6c3ea6df gst: Add some more gobject-introspection annotations 2011-04-14 16:14:01 +02:00
Sebastian Dröge
151b7264e8 utils: Fix caps leaks in gst_element_factory_can_accept_{any,all}_caps_in_direction() 2011-04-14 09:00:44 +02:00
David Schleef
0b6430f6e8 parser: Allow element names to begin with digits 2011-04-13 12:24:12 -07:00
Ole André Vadla Ravnås
7dd38cdcf4 ghostpad: Fix pad callbacks so they handle when parent goes away
1) We need to lock and get a strong ref to the parent, if still there.
2) If it has gone away, we need to handle that gracefully.

This is necessary in order to safely modify a running pipeline. Has been
observed when a streaming thread is doing a buffer_alloc() while an
application thread sends an event on a pad further downstream, and from
within a pad probe (holding STREAM_LOCK) carries out the pipeline plumbing
while the streaming thread has its buffer_alloc() in progress.
2011-04-13 17:37:54 +02:00
Tim-Philipp Müller
918a62abcf pluginloader: fix compiler warnings
Cast string constants to make compiler happy.
2011-04-11 12:52:12 +01:00
Jan Schmidt
159cf687a1 pluginloader: make sure gst-plugin-scanner is called with the right arch on OSX
On OSX, GStreamer might be built as a 'fat/universal' binary containing
both 32-bit and 64-bit code. We must take care that gst-plugin-scanner
is executed with the same architecture as the GStreamer core, otherwise
bad things may happen and core/scanner will not be able to communicate
properly.

Should fix issues with (32-bit) firefox using a 32-bit GStreamer core
which then spawns a 'universal' gst-plugin-scanner binary which gets
run in 64-bit mode, causing 100% cpu usage / busy loops or just hanging
firefox until killed.

https://bugzilla.gnome.org/show_bug.cgi?id=615357
2011-04-11 11:41:19 +01:00
Robert Swain
fd5aa095da pad: Allow tracking of buffers in GST_SCHEDULING debug output
As GST_SCHEDULING reports when buffers pass through pads due to
gst_pad_push calls, they are a good way of tracking the progress of
buffers through pipelines. As such, adding output of the buffer pointers
to these messages allows tracking of specific buffers, easing debugging.
2011-04-11 11:05:24 +02:00
Wim Taymans
6be4dbdb5a Merge branch 'master' into 0.11
Conflicts:
	android/base.mk
	android/controller.mk
	android/dataprotocol.mk
	android/elements.mk
	android/gst-inspect.mk
	android/gst-launch.mk
	android/gst-plugin-scanner.mk
	android/gst.mk
	android/indexers.mk
	android/net.mk
	win32/common/libgstbase.def
2011-04-11 10:26:54 +02:00
Wim Taymans
df85690cfd buffer: add FIXME 2011-04-11 10:20:10 +02:00
Alessandro Decina
3f1ef2255a android: make it ready for androgenizer
Remove the android/ top dir
Fixe the Makefile.am to be androgenized

To build gstreamer for android we are now using androgenizer which generates the needed Android.mk files.
Androgenizer can be found here: http://git.collabora.co.uk/?p=user/derek/androgenizer.git
2011-04-11 01:08:07 +02:00
Tim-Philipp Müller
76559d4160 trace: don't put code with side effects into g_return_if_fail() 2011-04-09 23:54:20 +01:00
Tim-Philipp Müller
3fc68cf9e8 element: unref event in default_send_event in case element has no pads
Spotted by  Haakon Sporsheim.
2011-04-09 18:04:55 +01:00
Edward Hervey
87d16a992c gst: Don't forget to dist gstelementmetadata.h 2011-04-09 04:05:20 +02:00
David Schleef
e57cb6b47a baseparse: Create baseparse library 2011-04-08 15:44:56 +01:00
Mark Nauwelaerts
3882b7f2ed baseparse: tune QUERY_SEEKING response
Even if we currently do not have a duration yet, assume seekable if
it looks like we'll likely be able to determine it later on
(which coincides with needed information to perform seeking).

Fixes #641047.
2011-04-08 15:44:56 +01:00
Arun Raghavan
694d5c4b75 baseparse: Update min/max bitrate before first posting them
This avoids posting an initial min-bitrate of G_UINTMAX and max-bitrate
of 0.

https://bugzilla.gnome.org/show_bug.cgi?id=641857
2011-04-08 15:44:56 +01:00
Mark Nauwelaerts
ae23eb9955 baseparse: tune default duration estimate update interval
Rather than a fixed default frame count, estimate frame count to aim for
an interval duration depending on fps if available, otherwise use old
fixed default.
2011-04-08 15:44:56 +01:00
Mark Nauwelaerts
d6d56d2420 baseparse: reverse playback; mind keyframes for fragment boundary 2011-04-08 15:44:55 +01:00
Mark Nauwelaerts
6f933050b0 baseparse: ensure non-empty candidate frames 2011-04-08 15:44:55 +01:00
Mark Nauwelaerts
123b2b063c baseparse: clarify some debug statements 2011-04-08 15:44:55 +01:00
Mark Nauwelaerts
dccb20cd58 baseparse: properly track upstream timestamps
... rather than with a delay.
2011-04-08 15:44:55 +01:00
Mark Nauwelaerts
212eae966a baseparse: need proper frame duration to obtain sensible frame bitrate 2011-04-08 15:44:55 +01:00
Mark Nauwelaerts
ebf124251f baseparse: proper initial values for index tracking variables 2011-04-08 15:44:55 +01:00
Mark Nauwelaerts
ef641d0515 baseparse: arrange for consistent event handling 2011-04-08 15:44:55 +01:00
Mark Nauwelaerts
ec835b45b7 baseparse: header style cleaning 2011-04-08 15:44:54 +01:00
Mark Nauwelaerts
070db250b3 baseparse: provide some more initial frame metadata in parse_frame
... and document accordingly.
2011-04-08 15:44:54 +01:00
Mark Nauwelaerts
c38fbf8879 baseparse: refactor passthrough into format flags
Also add a format flag to signal baseparse that subclass/format can provide
(parsed) timestamp rather than an estimated one.  In particular, such "strong"
timestamp then allows to e.g. determine duration.
2011-04-08 15:44:54 +01:00
Mark Nauwelaerts
75bf0cfa32 baseparse: introduce a baseparse frame to serve as context
... and adjust subclass parsers accordingly
2011-04-08 15:44:54 +01:00
Mark Nauwelaerts
a27cc4ad83 baseparse: restrict duration scanning to pull mode and avoid extra set_caps call 2011-04-08 15:44:54 +01:00
Mark Nauwelaerts
efe6f065d6 baseparse: update some documentation
Also add some more debug.
2011-04-08 15:44:54 +01:00
Mark Nauwelaerts
e567d1776c baseparse: allow increasing min_size for current frame parsing only
Also check that subclass actually either directs to skip bytes or
increases expected frame size to avoid going nowhere in bogus
indefinite looping.
2011-04-08 15:44:54 +01:00
Mark Nauwelaerts
cb4ec7388a baesparse: fix refactor regression in loop based parsing 2011-04-08 15:44:54 +01:00
Mark Nauwelaerts
3cf81d066f baseparse: pass all available data to subclass rather than minimum
Also reduce some adapter calls and add a few debug statements.
2011-04-08 15:44:54 +01:00
Mark Nauwelaerts
c0cbab6981 baseparse: fix reverse playback handling 2011-04-08 15:44:54 +01:00
Mark Nauwelaerts
d191e8b496 baseparse: minor typo and debug statement cleanup 2011-04-08 15:44:54 +01:00
Mark Nauwelaerts
c1adec7c76 baseparse: reduce locking
... which is either already mute and/or implicitly handled by STREAM_LOCK.
2011-04-08 15:44:54 +01:00
Mark Nauwelaerts
d45cdf65d5 baseparse: avoid loop in frame locating interpolation 2011-04-08 15:44:54 +01:00
Thiago Santos
a3e55038ac audioparsers: baseparse: Be careful to not lose the event ref
Don't unref the event if it hasn't been handled, because the caller
assumes it is still valid and might reuse it.

I ran into this problem when transcoding an AVI (with mp3 inside)
to gpp.

https://bugzilla.gnome.org/show_bug.cgi?id=639555
2011-04-08 15:44:54 +01:00
Tim-Philipp Müller
40a5458392 docs: minor baseparse docs/comment fixes
Remove copy'n'paste leftovers.
2011-04-08 15:44:54 +01:00
Mark Nauwelaerts
4dc486ddc5 baseparse: increase keyframe awareness
... which is not particular relevant for audio parsing, but more so
in video cases.  In particular, auto-determine if dealing with video (caps).
2011-04-08 15:44:54 +01:00
Mark Nauwelaerts
aed933c0ce baseparse: avoid unexpected stray metadata 2011-04-08 15:44:53 +01:00
Mark Nauwelaerts
0cb02472f0 baseparse: use proper _NONE output value when applicable 2011-04-08 15:44:53 +01:00
Edward Hervey
dab512bb15 audioparsers: Remove dead assignments 2011-04-08 15:44:53 +01:00
Andoni Morales Alastruey
fc4885a3a3 audioparse: fix possible division-by-zero
https://bugzilla.gnome.org/show_bug.cgi?id=635786
2011-04-08 15:44:53 +01:00
Mark Nauwelaerts
4230c0b2e1 baseparse: use correct offset when adding index entry
... bearing in mind that BUFFER_OFFSET is media specific and may not
reflect the basic offset after having been parsed.
2011-04-08 15:44:53 +01:00
Mark Nauwelaerts
3faccbd29f baseparse: enhancements for timestamp marked framed formats
That is, as such formats allow subclass to extract position from frame,
it is possible to extract duration (if not otherwise provided)
from (near) last frame, and a seek can fairly accurately target the required
position.

Fixes #631389.
2011-04-08 15:44:53 +01:00
Mark Nauwelaerts
454f21f077 baseparse: refactor frame scanning peformed by _loop 2011-04-08 15:44:53 +01:00
Mark Nauwelaerts
10eae096fe baseparse: slightly optimize sending of pending newsegment events 2011-04-08 15:44:53 +01:00
Mark Nauwelaerts
6d3447c6ec baseparse: minor fixes and enhancements
Arrange for upstream as well as downstream flushing when seeking.
Also determine upstream size as well as seekability.  Adjust some comments
to reality and employ debug statement in proper order.
2011-04-08 15:44:53 +01:00
Mark Nauwelaerts
0f9435888a baseparse: use only upstream duration if it provides one 2011-04-08 15:44:53 +01:00
Mark Nauwelaerts
78ef0387e7 baseparse: reflow update_bitrate code
... which makes local variables represent real state better, and avoids
triggering unneeded updates/actions.
2011-04-08 15:44:53 +01:00
Mark Nauwelaerts
85307bf969 baseparse: add some debug statements 2011-04-08 15:44:53 +01:00
Mark Nauwelaerts
9394662f35 baseparse: perform bitrate handling and posting after newsegment sending 2011-04-08 15:44:53 +01:00
Mark Nauwelaerts
07eff44306 baseparse: immediately post subclass provided bitrate 2011-04-08 15:44:53 +01:00
Tim-Philipp Müller
a4f5db7088 Revert "baseparse: add skip property"
This reverts commit b5a3d60363.

Reverting this for now, since no one really seems to remember why this
property exists or what it could possibly be good for. It seems to have
been in the original mp3parse since the beginning of time and was back-
ported from there.
2011-04-08 15:44:52 +01:00
Sebastian Dröge
ad6ce1e2d8 audioparser: Let the format string agree with the parameters to fix compiler warning 2011-04-08 15:44:52 +01:00
Arun Raghavan
c56f223da7 baseparse: Fix debug output
We lose the reference to the buffer after gst_pad_push(), so the debug
print should happen before.

https://bugzilla.gnome.org/show_bug.cgi?id=622276
2011-04-08 15:44:52 +01:00
Mark Nauwelaerts
cc8d04dad5 baseparse: support reverse playback
... in pull mode or upstream driven.
2011-04-08 15:44:52 +01:00
Mark Nauwelaerts
5e9cfceb26 baseparse: remove done TODOs and update documentation 2011-04-08 15:44:52 +01:00