Commit graph

5787 commits

Author SHA1 Message Date
Josep Torra 11e287529d format: use GST_FORMAT_UNDEFINED and few casts to GstFormat
Fixes warning #188: enumerated type mixed with another type reported by ICC.
2011-08-26 14:11:13 +02:00
Stefan Kost febde0c19f gstobject: also remove the cast as this is causing the trouble 2011-08-23 11:55:17 +02:00
Stefan Kost df099959fd gstobject: use the atomic macros to deal with the glib change in the impl. 2011-08-23 11:43:44 +02:00
David Schleef ec6e452f63 object: make gst_object_replace() atomic 2011-08-21 14:07:08 -07:00
Stefan Kost cce32ba0a2 docs: more clarification for element docs
Don't suggest deprecated method in the desction docs and try to be more helpful
in other places by suggesting related functions.
2011-08-20 14:07:55 +02:00
Stefan Kost a3611c139a docs: small clarification in the gst_element_get_request_pad docs
Make it more obvious that one should pass the template name.
2011-08-20 09:57:14 +02:00
Tim-Philipp Müller eb08ed6ed0 docs: fix typo in element factory documentation 2011-08-16 17:19:29 +01:00
Tim-Philipp Müller 4985d2a954 caps: fix compiler warning reported by ICC
The MAX macro expands to code that checks if an unsigned integer is < 0.

Fixes warning #186: pointless comparison of unsigned integer reported by ICC.

https://bugzilla.gnome.org/show_bug.cgi?id=656265
2011-08-15 21:15:29 +01:00
Josep Torra c56881a026 buffer: explicitly cast to the enum type
Fixes warning #188: enumerated type mixed with another type reported by ICC.

https://bugzilla.gnome.org/show_bug.cgi?id=656265
2011-08-15 21:15:22 +01:00
Josep Torra 2271b6dc9a gststate: explicitly cast to the enum type
Fixes warning #188: enumerated type mixed with another type reported by ICC.

https://bugzilla.gnome.org/show_bug.cgi?id=656265
2011-08-15 21:15:12 +01:00
Josep Torra 89239d85cc event: explicitly cast to the right enum types
Fixes warning #188: enumerated type mixed with another type reported by ICC.

https://bugzilla.gnome.org/show_bug.cgi?id=656265
2011-08-15 21:14:55 +01:00
Josep Torra 7b434c44bf gsterror: explicitly cast to the right GstGError code enum types
Fixes warning #188: enumerated type mixed with another type reported by ICC.

https://bugzilla.gnome.org/show_bug.cgi?id=656265
2011-08-15 21:14:22 +01:00
Josep Torra b30b78c505 debugutils: use GST_STATE_VOID_PENDING for GstState instead of 0
Fixes a warning reported by ICC.

https://bugzilla.gnome.org/show_bug.cgi?id=656265
2011-08-15 21:13:47 +01:00
Josep Torra d99d270a69 caps: define GST_CAPS_FLAGS_NONE for consistency with other enumerations
Use them to fix warnings when building with ICC.

API: GST_CAPS_FLAGS_NONE

https://bugzilla.gnome.org/show_bug.cgi?id=656265
2011-08-15 21:13:29 +01:00
Josep Torra abda75bcf5 gst: use GstDebugLevel enum type to fix a warning building with ICC
https://bugzilla.gnome.org/show_bug.cgi?id=656265
2011-08-15 21:13:03 +01:00
Stefan Kost d8c0bd45a7 debugutils: removed non-sense comment 2011-08-11 10:09:41 +02:00
Stefan Kost 20618b4c28 registry: move utf-8 validation to registry saving time
Instead of checking for valid utf-8 element-details every time we create
elements (from plugin-init or registry), do it before we save the registry.
Fixes #656193.
2011-08-10 13:45:49 +02:00
Shaun Hoopes 3029a222e8 debugutils: improve dot file flow layout
Iterate source- and sink-pads separately to ensure that the graph reflects the
upstream/downstream order. Fixes #643269
2011-08-06 18:26:39 +02:00
Tim-Philipp Müller 317fba25a6 elementfactory: fix g-i annotation for _create() and _make() to allow NULL object names 2011-07-27 10:09:11 +01:00
Raluca Elena Podiuc 43f5624334 docs: removed double negation in event/message seq num description
https://bugzilla.gnome.org/show_bug.cgi?id=654751
2011-07-16 23:53:03 +01:00
Emmanuel Pacaud 156583a69c task: Check for PR_SET_NAME before using
Fixes: #653172.

Signed-off-by: David Schleef <ds@schleef.org>
2011-06-25 13:52:28 -07:00
Javier Jardón 5d25e4a204 Use "const" instead G_CONST_RETURN
G_CONST_RETURN will be deprecated soon.

https://bugzilla.gnome.org/show_bug.cgi?id=652211
2011-06-09 17:54:27 +01:00
Tim-Philipp Müller 6d374e54b9 parse: add prototypes for unused functions to avoid compiler warning
The warning is never fatal, because we don't use -Werror for the
parser helper library build, but the warnings are annoying anyway.
2011-06-05 15:27:19 +01:00
David Schleef f3eac7de22 Work around changes in g_atomic API
See #651514 for details.  It's apparently impossible to write code
that avoids both type punning warnings with old g_atomic headers and
assertions in the new.  Thus, macros and a version check.
2011-06-04 00:36:26 -07:00
Sebastian Dröge 0a80b57d74 value: Consider "1" and "{1}" as equal in gst_value_compare()
Previously this was only done in the is_subset() check but
having it only there brings us into definition-hell where
"1" and "{1}" are subset of each other but not equal.
2011-05-30 11:33:57 +02:00
Sebastian Dröge f304196148 caps: Fix subset check for equivalent lists and scalar values
For example "{ 1 }" and "1" are not strictly equal but
both are a subset of each other. Also add a unit test
for this.
2011-05-30 07:38:40 +02:00
Stefan Kost 6c2024f881 docs: xrefs more api around GstStateChange and GstStateChangeReturn. 2011-05-28 10:24:37 +03:00
Stefan Kost dd6a5d81c4 docs: xref the async messages to GstStateChange 2011-05-28 09:52:55 +03:00
Sebastian Dröge 57df188757 caps: Add gst_caps_is_subset_structure()
API: gst_caps_is_subset_structure()

This allows to check if a structure is a subset of given
caps without allocating a new caps instance for it.
2011-05-27 13:55:31 +02:00
Sebastian Dröge da58834884 structure: Add gst_structure_is_subset()
API: gst_structure_is_subset()
2011-05-27 13:47:11 +02:00
Sebastian Dröge d98e9acb0f caps: Optimize gst_caps_is_subset()
..and as a result gst_caps_is_equal() and others.

This now only checks if for every subset structure there is
a superset structure in the superset caps. Previously we were
subtracting one from another, creating completely new caps
and then even simplified them.

The new implemention now is about 1.27 times faster and doesn't
break the -base unit tests are anything anymore.
2011-05-27 13:38:51 +02:00
Sebastian Dröge 0cf2dfd0ba caps: Fix subset check in gst_caps_merge()
Caps A are a subset of caps B even if caps B doesn't
have all fields of caps A.

Also add a unit test for this.
2011-05-27 13:37:06 +02:00
Sebastian Dröge d706ca0859 Revert "caps: Optimize gst_caps_is_subset()"
This reverts commit 32248a9b85.

This breaks some tests in -base and the failures should
be fixed first.
2011-05-27 12:56:43 +02:00
Sebastian Dröge 32248a9b85 caps: Optimize gst_caps_is_subset()
..and as a result gst_caps_is_equal() and others.

This now only checks if for every subset structure there is
a superset structure in the superset caps. Previously we were
subtracting one from another, creating completely new caps
and then even simplified them.

The new implemention now is about 1.27 times faster.
2011-05-27 12:45:59 +02:00
Tim-Philipp Müller 8a3721a1ca gst: we can now use GLib 2.24 API unconditionally 2011-05-25 16:02:10 +01:00
Руслан Ижбулатов d56b3ec5aa systemclock: Placate gcc by defining EWOULDBLOCK to something 2011-05-25 12:04:14 +02:00
Руслан Ижбулатов 54a9d8038d poll: Fix WAKE_EVENT() to behave posixly on Windows 2011-05-25 12:04:14 +02:00
Stefan Kost e0c92982e9 registrybinary: small cleanups
Remove unneeded braces from string define. Small doc improvement.
2011-05-24 20:30:11 +03:00
Stefan Kost 75ba14c79b preset: use guint for the version number parts
Use unsigned integers for extra safety (like we do in plugin version parsing).
2011-05-24 20:30:11 +03:00
Sebastian Dröge de1c3bdd5a Revert "debugutils: Fix for GstIterator API changes"
This reverts commit e1cc3176d6.

This is not the 0.11 branch...
2011-05-24 13:28:00 +02:00
Sebastian Dröge e1cc3176d6 debugutils: Fix for GstIterator API changes 2011-05-24 13:27:38 +02:00
Kipp Cannon 696a9a694f clock: improve the GST_TIME_FORMAT/ARGS docs 2011-05-24 00:26:40 +03:00
Stefan Kost 1718abcbbb docs: hide this from the docs 2011-05-23 23:40:20 +03:00
Stefan Kost 01d8d7d718 deprecation-guards: fixup for commit 9ff4ec3104
Remove the deprecation guards for GST_PLUGIN_DEFINE_STATIC again (even though it
is deprecated) as we use it in the tests. Remove "_" for intlinkfunc.
2011-05-20 15:50:30 +03:00
Stefan Kost aa2bfc9b7f preset: include cleanup
Only have include in the installed header we need to use it. Move the includes
needed by the implementation to the c file.
2011-05-20 00:39:10 +03:00
Stefan Kost 79b22cb2ed docs: use the same name for the argument in prototype and docs 2011-05-18 15:03:46 +03:00
Stefan Kost bd302bb63d pluginfeature: avoid duplicating feature->name
The feature name is not supposed to change over time anyway. In order to enforce
this parentize features to the registry and make the feature->name pointing to
GstObject:name. In 0.11 we could consider of removing the feature->name variable
(FIXME comment added).

Fixes: #459466
2011-05-18 09:55:57 +03:00
Stefan Kost 9ff4ec3104 docs: add deprecation guards
Move GstPadIntLinkFunction to private header to avoid a dozen #ifdefs. Use a
gpointer in public header instead.
2011-05-18 09:55:57 +03:00
Tim-Philipp Müller da21881f28 miniobject: delay private data initialisation until actually needed
We only use the private instance data for weak references for now,
so can delay initialisation until actually needed (microoptimisation)
2011-05-17 11:38:30 +01:00
Sebastian Dröge b4dea3a1d3 structure: Make both parameters to gst_structure_is_equal() const 2011-05-17 09:35:54 +02:00
Sebastian Dröge 53ef31718d structure: Update Since markers to the correct version 2011-05-17 09:33:47 +02:00
Sebastian Dröge a08a17dfbd structure: Add gst_structure_intersect()
API: gst_structure_intersect()
2011-05-17 09:33:04 +02:00
Edward Hervey 64725facb5 gststructure: Add gst_structure_can_intersect API
Allows checking if two structures can intersect without having to
go through GstCaps

API: gst_structure_can_intersect

https://bugzilla.gnome.org/show_bug.cgi?id=629300
2011-05-17 09:28:06 +02:00
Edward Hervey ae46eb3a38 gstructure: New API: gst_structure_is_equal
Allows checking equality of GstStructure without having to create
intermediary GstCaps.

API: gst_structure_is_equal

https://bugzilla.gnome.org/show_bug.cgi?id=629300
2011-05-17 09:28:00 +02:00
Tim-Philipp Müller 76ccd2a1e9 docs: fix up some Since markers and update for new multiqueue args 2011-05-14 14:05:52 +01:00
Sebastian Dröge 7316a88387 bin: Don't interprete pipelines without sink elements as always being in EOS state
Some tests (e.g. elements/capsfilter) have pipelines with dangling
sinkpads and without a sink element. These pipelines can never post
an EOS message (because this is only valid by a sink) and as such
should never get an EOS message posted by the bin.
2011-05-14 11:39:36 +02:00
Sebastian Dröge cdffc1d5d5 systemclock: Only retry writing to the socket for EAGAIN, EWOULDBLOCK and EINTR
Fixes infinite loop in some cases, bug #650002.
2011-05-14 11:39:35 +02:00
Sebastian Dröge 116972d6eb miniobject: Minor cleanup of last commit 2011-05-14 11:39:35 +02:00
José Alburquerque cf671d7b0a miniobject: Add weak referencing functionality
API: gst_mini_object_weak_ref()
API: gst_mini_object_weak_unref()

Add weak referencing functionality to GstMiniObject, which
allows to get notifications when an mini object is destroyed
but doesn't increase the real refcount. This is mostly
useful for bindings.

Fixes bug #609473.
2011-05-14 11:39:35 +02:00
Sebastian Dröge 4a836cae9f bin: Only post EOS messages after reaching the PLAYING state
Fixes bug #647756.
2011-05-14 11:39:35 +02:00
Sebastian Dröge 3872b816d2 element: Add GstElement::state_changed vfunc
API: GstElement::state_changed

This is always called when the state of an element has changed and
before the corresponding state-changed message is posted on the bus.
2011-05-14 11:39:35 +02:00
Sebastian Dröge 3c760a3ee5 ghostpad: Add docs for all the new, public functions 2011-05-14 11:39:35 +02:00
Sebastian Dröge 800b738715 ghostpad: Add guards against invalid parameters to the new, public functions 2011-05-14 11:39:35 +02:00
Sebastian Dröge 6807e536b0 ghostpad: Rename ghostpad/proxypad default functions
API: gst_ghost_pad_activate_pull_default
API: gst_ghost_pad_activate_push_default
API: gst_ghost_pad_internal_activate_pull_default
API: gst_ghost_pad_internal_activate_push_default
API: gst_ghost_pad_link_default
API: gst_ghost_pad_setcaps_default
API: gst_ghost_pad_unlink_default
API: gst_proxy_pad_acceptcaps_default
API: gst_proxy_pad_bufferalloc_default
API: gst_proxy_pad_chain_default
API: gst_proxy_pad_chain_list_default
API: gst_proxy_pad_checkgetrange_default
API: gst_proxy_pad_event_default
API: gst_proxy_pad_fixatecaps_default
API: gst_proxy_pad_getcaps_default
API: gst_proxy_pad_getrange_default
API: gst_proxy_pad_iterate_internal_links_default
API: gst_proxy_pad_query_default
API: gst_proxy_pad_query_type_default
API: gst_proxy_pad_setcaps_default
2011-05-14 11:39:34 +02:00
Sebastian Dröge 4c1e594ae5 ghostpad: Make all the internal caps functions public
This is useful if ghostpad/proxypads should be used but
additional code should be executed, e.g. for tracking
segments in the event function.
2011-05-14 11:39:34 +02:00
Sebastian Dröge b36ce63f38 ghostpad: Only implement the iterate_internal_links function on proxypads
ghostpads inherit it from their parent class. Also make it threadsafe.
2011-05-14 11:39:34 +02:00
Sebastian Dröge a216426bb6 ghostpad: API: Expose gst_proxy_pad_get_internal()
This allows to get the internal pad of ghostpads and
proxypads without using gst_pad_iterate_internal_links()
and is much more convenient.

The internal pad of a ghostpad is the pad of the opposite direction
that is used to link to the ghostpad target.
2011-05-14 11:39:34 +02:00
Sebastian Dröge 6e57ce32e5 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-14 11:39:34 +02:00
Miguel Angel Cabrera Moya f450817d7f 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-14 11:39:34 +02:00
Sebastian Dröge f07b637d86 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-14 11:39:33 +02:00
Sebastian Dröge 2f947f3993 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-14 11:39:33 +02:00
Sebastian Dröge f3f1f7d69a 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-14 11:39:33 +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
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
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
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
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
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
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
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
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
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
Mark Nauwelaerts 67666768a2 baseparse: use determined seekability in answering SEEKING query 2011-04-08 15:44:52 +01:00
Mark Nauwelaerts ba3d5da1ee baseparse: add skip property 2011-04-08 15:44:52 +01:00
Mark Nauwelaerts 038821d30e baseparse: use _set_frame_props to configure frame lead_in and lead_out
... provided a corresponding decoder with sufficient leading and following
frames to carry out full decoding for a particular segment.
2011-04-08 15:44:52 +01:00
Mark Nauwelaerts 668ad3836a baseparse: use _set_duration to configure duration update interval
... as it logically belongs there as one or the other; either subclass
can provide a duration, or an estimate must be made (reguarly updated).
2011-04-08 15:44:52 +01:00
Mark Nauwelaerts 6b33f59406 baseparse: localize use of provided fps information 2011-04-08 15:44:52 +01:00
Mark Nauwelaerts 9db9d2eabf baseparse: seek table and accurate seek support 2011-04-08 15:44:52 +01:00
Mark Nauwelaerts 3304f194a9 baseparse: proper and more extended segment and seek handling
That is, loop pause handling, segment seek support, newsegment for gaps, etc
2011-04-08 15:44:52 +01:00
Mark Nauwelaerts 4d20688af3 baseparse: add index support 2011-04-08 15:44:52 +01:00
Mark Nauwelaerts 224af37314 baseparse: refactor state reset 2011-04-08 15:44:51 +01:00
Mark Nauwelaerts 35bfc86e67 baseparse: prevent indefinite resyncing 2011-04-08 15:44:51 +01:00
Mark Nauwelaerts 31e676e4d7 baseparse: specific EOS handling if no output so far 2011-04-08 15:44:51 +01:00
Mark Nauwelaerts d801f74366 baseparse: adjust _set_frame_prop documentation and set default as claimed 2011-04-08 15:44:51 +01:00
Mark Nauwelaerts 745de19963 baseparse: fix bitrate copy-and-paste and update heuristic 2011-04-08 15:44:51 +01:00
Mark Nauwelaerts 60a8533d48 baseparse: post duration message if average bitrates is updated 2011-04-08 15:44:51 +01:00
Mark Nauwelaerts 7ba1b6e4d7 baseparse: remove is_seekable vmethod and use a set_seek instead
Seekability, like duration, etc is unlikely to change (frequently), and
the default assumption covers most cases, so let subclass set when needed.
At the same time, allow subclass to indicate if it has seek-metadata (table)
available, and possibly have it provide an average bitrate.
2011-04-08 15:44:51 +01:00
Mark Nauwelaerts 4b0f92db79 baseparse: add another hook for subclass prior to pushing buffer
... and allow subclass to perform custom segment clipping, or to
emit tags or messages at this time.
2011-04-08 15:44:50 +01:00
Mark Nauwelaerts b51b5d4b29 baseparse: 0 converts to 0 by default 2011-04-08 15:44:50 +01:00
Mark Nauwelaerts 3c656232eb baseparse: refactor conversion using helper function and export default convert 2011-04-08 15:44:50 +01:00
Mark Nauwelaerts 12cc228d84 baseparse: streamline query handling 2011-04-08 15:44:50 +01:00
Mark Nauwelaerts e274ebb292 baseparse: cleanup struct and remove unused member 2011-04-08 15:44:50 +01:00
Arun Raghavan 03164ad8ab baseparse: Allow chaining of subclass event handlers
This allows the child class to chain its event handler with
GstBaseParse, so that subclasses don't have to duplicate all the default
event handling logic.

https://bugzilla.gnome.org/show_bug.cgi?id=622276
2011-04-08 15:44:50 +01:00
Sebastian Dröge f3f338f14a baseparse: Don't use GST_FLOW_IS_FATAL()
Also don't post an error message for UNEXPECTED and do it
for NOT_LINKED.
2011-04-08 15:44:49 +01:00
Mark Nauwelaerts 08e8dbf027 baseparse: non-TIME seek event is simply not handled 2011-04-08 15:44:49 +01:00
Mark Nauwelaerts dc80b52372 baseparse: fix seek event ref handling 2011-04-08 15:44:49 +01:00
Mark Nauwelaerts b4f1778a7d baseparse: prevent arithmetic overflows in pull mode buffer cache handling 2011-04-08 15:44:49 +01:00
Mark Nauwelaerts 1b8a96e999 baseparse: fix seek handling
Allow a few more seek event type combinations, and really use the result
of gst_segment_set_seek to perform the seek.  Also add some debug.
2011-04-08 15:44:49 +01:00
Arun Raghavan eb73b3e933 baseparse: Don't emit bitrate tags too early
We wait to parse a minimum number of frames (10, arbitrarily) before
emiting bitrate tags so that our early estimates are not wildly
inaccurate for streams that start with a silence. If the stream ends
before that, we just emit the tags anyway.

While it _would_ be nicer to be specify the threshold to start pushing
the tags in terms of duration, this would introduce more complexity than
this merits.

https://bugzilla.gnome.org/show_bug.cgi?id=614991
2011-04-08 15:44:49 +01:00
Sebastian Dröge a6b20b62bd baseparse: Set the last stop to the buffer starttime if the duration is invalid
...instead of not setting it at all.
2011-04-08 15:44:49 +01:00
Joshua M. Doe e85f8c8ab6 baseparse: Send NEWSEGMENT event with correct start and position
Instead of taking the last stop (which could be buffer endtime instead
of starttime) always take the buffer starttime.

Fixes bug #614016.
2011-04-08 15:44:49 +01:00
Tim-Philipp Müller b0b9163125 audioparsers: remove unused GstBaseParseClassPrivate structure 2011-04-08 15:44:49 +01:00
Arun Raghavan 102ee0cf41 audioparsers: Add bitrate calculation to baseparse
This makes baseparse keep a running average of the stream bitrate, as
well as the minimum and maximum bitrates. Subclasses can override a
vfunc to make sure that per-frame overhead from the container is not
accounted for in the bitrate calculation.

We take care not to override the bitrate, minimum-bitrate, and
maximum-bitrate tags if they have been posted upstream. We also
rate-limit the emission of bitrate so that it is only triggered by a
change of >10 kbps.
2011-04-08 15:44:49 +01:00
Mark Nauwelaerts 8a2141f001 audioparsers: rename baseparse GType name to avoid possible conflicts 2011-04-08 15:44:49 +01:00
Mark Nauwelaerts cbc6dcc04b audioparsers: documentation fixes 2011-04-08 15:44:49 +01:00
Mark Nauwelaerts d249e34fb4 baseparse: adjust seek handling and newsegment sending
Perform sanity check on type of seek, and only perform one that is
appropriately supported.  Adjust downstream newsegment event
to first buffer timestamp that is sent downstream.
2011-04-08 15:44:48 +01:00
Mark Nauwelaerts 192aa0d41f baseparse: minor refactor cleanup
Also add some debug logging.
2011-04-08 15:44:48 +01:00
Mark Nauwelaerts abadf63413 baseparse: implement leftover draining in pull mode 2011-04-08 15:44:48 +01:00
Mark Nauwelaerts b67b86fcdb baseparse: provide default conversion using bps if no fps available
Also store estimated duration as such, rather than pretending otherwise
(e.g. set by subclass).
2011-04-08 15:44:48 +01:00
Mark Nauwelaerts d0ea041a38 baseparse: check for remaining data when draining in push mode 2011-04-08 15:44:48 +01:00
Mark Nauwelaerts 497105ca1b baseparse: fix pull mode cache size comparison 2011-04-08 15:44:48 +01:00
Michael Smith ab3bf9fd95 audioparse: fix a format string as reported on irc. 2011-04-08 15:44:48 +01:00
Mark Nauwelaerts 0f85a2b685 baseparse: custom bufferflag indicates not to count frame in stats 2011-04-08 15:44:48 +01:00
Mark Nauwelaerts f3d49be227 audioparsers: reference GstBaseParse now lives here 2011-04-08 15:44:48 +01:00
Mark Nauwelaerts 3a4e980038 audioparsers: rename 'aacparse' plugin to generic 'audioparsers' plugin 2011-04-08 15:44:48 +01:00
Mark Nauwelaerts 1dd6b12316 baseparse: reset passthrough mode to default (disabled) on activation 2011-04-08 15:44:48 +01:00
Mark Nauwelaerts a9de98830a baseparse: ensure buffer metadata is writable 2011-04-08 15:44:48 +01:00
Mark Nauwelaerts 1bc8301c79 baseparse: fix/enhance DISCONT marking
In particular, consider DISCONT == !sync, and allow subclass to query
sync state, as it may want to perform additional checks depending
on whether sync was achieved earlier on.
Also arrange for subclass to query whether leftover data is being drained.
2011-04-08 15:44:47 +01:00
Mark Nauwelaerts 48b4912c2e baseparse: add timestamp handling, and default conversion
In particular, (optionally) provide baseparse with a notion of frames per second
(and therefore also frame duration) and have it track frame and byte counts.
This way, subclass can provide baseparse with fps and have it provide default
buffer time metadata and conversions, though subclass can still install
callbacks to handle such itself.
2011-04-08 15:44:47 +01:00
Mark Nauwelaerts 899a6de75b baseparse: documentation fixes 2011-04-08 15:44:47 +01:00
Mark Nauwelaerts 14a3a9f42a baseparse: use_fixed_caps for src pad
After all, stream is as-is, and there is little molding to downstream's
taste that can be done.  If subclass can and wants to do so, it can
still override as such.
2011-04-08 15:44:47 +01:00