Commit graph

9794 commits

Author SHA1 Message Date
Edward Hervey
5067664c09 typefind: Keep typefind factories sorted in the registry. Fixes #599147
This avoids having to do the sorting everytime we use typefind

The behaviour of gst_type_find_factory_get_list has subtlely changed
in the sense that the order was previously undefined, whereas now
it returns them sorted by rank and then by name.
2009-10-24 10:44:09 +02:00
Edward Hervey
c79ed99bab registry: Cache element and typefind factories. Fixes 598896
This avoids unneeded list/filtering if the registry hasn't changed
2009-10-24 10:44:04 +02:00
Edward Hervey
ebee258806 gstpluginfeature: API : new gst_plugin_feature_list_copy() method
This allows copying AND incrementing the refcount at the same time,
avoiding a double iteratio of the GList
2009-10-24 10:39:30 +02:00
Edward Hervey
9e792ee5b8 gstregistry: Add a cookie for detecting feature list changes
We also create a private structure, since we will need to add more
data there in following patches.
2009-10-24 10:39:13 +02:00
Wim Taymans
db79dd88c3 message: don't use typechecking cast macros
Simply use casting macros for accessing the message fields like we do for
buffers and events. Avoids some costly typechecking that does not really buy us
much.
2009-10-23 13:40:32 -04:00
Wim Taymans
c9a7e2d188 Revert "gstmessage: Avoid expensive src/type/timestamp fetch."
This reverts commit 61cf93a334.
2009-10-23 13:13:52 -04:00
Edward Hervey
61cf93a334 gstmessage: Avoid expensive src/type/timestamp fetch.
If we've already checked that we have a valid message, use the entries
directly.
2009-10-23 18:21:47 +02:00
Edward Hervey
e5a13bd3fc gstcaps: Use inlined version of _is_any()/_is_empty()
CAPS_IS_ANY and CAPS_IS_EMPTY are the equivalent of their gst_caps_*
counterpart except that they avoid the typechecking and are inlined.

CAPS_IS_EMPTY_SIMPLE only checks for empty caps (without checking if
the caps is ANY).
2009-10-23 17:47:43 +02:00
Wim Taymans
c10690aea2 TODO: add item to TODO list
We currently do a little too much work when we push the first buffer around
resulting in excessive caps checking. We can probably make this a little less
expensive.
2009-10-22 16:42:13 -04:00
Jan Schmidt
dc2c4de73a gstpipeline: Simplify base time checking slightly
Simplify checking and distribution of the base time - don't re-check
the value of a local variable that was set 3 lines earlier.
2009-10-22 12:54:17 +01:00
Edward Hervey
517ab2860e gsturi: Optimisation: Avoid type-checking in sorting method.
We already know the list only contains plugin features
2009-10-22 13:16:07 +02:00
Edward Hervey
a9ed7c0ec4 gsturi: Optimisation : Cast when we're sure of the type.
Also directly access GstElementFactory->uri_type instead of going
through a function that will (once again) check whether it's a
GstElementFactory
2009-10-22 13:13:56 +02:00
Edward Hervey
5583220a1d tests/fakesink: Add some debugging 2009-10-22 12:33:37 +02:00
Edward Hervey
ca054ff4e5 tests/faeksink: Lower the number of threads to avoid timeouts
We just end up with way too much contention in glib otherwise.
2009-10-22 12:33:01 +02:00
Edward Hervey
4b13520b61 gstregistry: Use hash table when finding a feature. Fixes #598895 2009-10-22 11:13:47 +02:00
Wim Taymans
2f7b348fc0 tee: implement custom acceptcaps function
Implement a custom acceptcaps function on the sinkpad. We can accept any caps as
long as it is accepted by all downstream peer elements.
2009-10-21 16:26:01 -04:00
Wim Taymans
b95cc5031b multiqueue: avoid lock for taking the counter
The counter for incomming data is already protected with the STREAM_LOCK so we
don't need to add another lock around it.
2009-10-21 13:38:57 -04:00
Wim Taymans
368b7899c0 registry: hash the plugin basename
Maintain a hashtable of the plugin basename. We can then use this
hashtable to speedup the search for an existing plugin and avoid
a whole lot of strcmp calls.
2009-10-20 23:28:54 -04:00
Wim Taymans
5de94ede2f registry: speed up _strlen
Make the _strlen function a little tighter
2009-10-20 23:27:41 -04:00
Wim Taymans
50b9a3ecc3 registry: name is never NULL
When looking up a feature by name, we never call this internal
function with NULL so we don't have to check for it.
2009-10-20 21:43:58 -04:00
Wim Taymans
d722d16155 registry: refactor plugin lookup
We keep lookup plugins by their basename. Avoid creating a basename
from a filename if we can.
2009-10-20 21:39:11 -04:00
Wim Taymans
1be3d5cd83 registry: do quick check for . files
Do a quick check for . files before calling the strcmp functions
2009-10-20 21:15:56 -04:00
Michael Smith
d833b39a85 Remove executable bits on xml unit test. 2009-10-20 12:21:41 -07:00
Benjamin Otte
868711fc70 docs: Fix docs for gst_caps_set_simple() 2009-10-20 10:51:25 +01:00
Jan Schmidt
08c56edb84 docs: Modify docs string slightly.
Apparently starting the last line of a docs string with 'returns' both
confuses and enrages gtk-doc. Use a slightly different wording instead.
2009-10-19 13:02:30 +01:00
Jan Schmidt
de199b4d8d pluginloader: When a plugin is blacklisted, output a GST_ERROR line. 2009-10-19 12:30:07 +01:00
Edward Hervey
adfb63837c tools/gst-inspect: Check we're not handling NULL pointers. 2009-10-19 13:30:10 +02:00
Edward Hervey
b11d72adb4 tools/gst-inspect: Remove dead assignment 2009-10-19 13:29:40 +02:00
Peter Kjellerstedt
485ae69c9e trace: Do not poison gst_trace_add_entry()
Since gst_trace_add_entry() is a macro, gcc will barf when it is
defined in case it has been poisoned due to trace support being
disabled.
2009-10-19 10:53:00 +02:00
Stefan Kost
382ad3baa6 controller: just cast in internal API where we have checked parameters already 2009-10-18 23:18:58 +03:00
Stefan Kost
a4e4916632 controller: use g_slice for controlled property structures
Use g_slide instead of nomal g_new, Also don't init struct with 0 as we need to
init it anyway with the real values.
Also join the 3 flags checks into one.
2009-10-18 23:15:07 +03:00
Edward Hervey
bb0918279f libs/base/typefindhelper: Remove useless typechecking in tight loop
The list against which we run the comparefunc will only contain
GstPluginFeature, therefore remove the 6 expensive type checks we do
for every single comparision.
2009-10-18 17:17:17 +02:00
Wim Taymans
7d86ad93a2 caps: fix typo in docs 2009-10-16 12:39:54 +02:00
Edward Hervey
db8a25a0a4 win32: Add new API symbol 2009-10-16 09:43:08 +02:00
Stefan Kost
d4e7390290 Automatic update of common submodule
From 85d1530 to 0702fe1
2009-10-16 10:13:53 +03:00
Benjamin Otte
0ff4086507 Improve caps setters API
This patch adds gst_caps_set_value() and allows gst_caps_set_simple() to
work on non-simple caps. See the API documentation for the functions
about what they do.

The intention of these changes is to ease working with caps in caps
transform functions. An example for this would be ffmpegcolorspace,
where the caps transform function could be changed to look roughly like
this (pseudocode ahead):
  result = gst_caps_copy (template_caps);
  value = gst_structure_get_value (gst_caps_get_structure (caps, 0),
    "widh");
  gst_caps_set_value (result, value);
  /* same for height, framerate and par */
  return caps;
which is much cleaner and easier to understand than the current code.

https://bugzilla.gnome.org/show_bug.cgi?id=597690
2009-10-15 19:10:50 +02:00
Benjamin Otte
1190018f04 Add XML_LIBS when building tests that use xml-specific functions 2009-10-15 19:10:50 +02:00
Jan Schmidt
9629b55450 po: Don't create backup .po files
As well as preventing creation of useless backup files, it works
around a bug in gettext 0.17 on OS/X
2009-10-15 16:36:17 +01:00
Wim Taymans
e9f2714ff9 basesrc: fix race in PLAYING->PAUSED->PLAYING
When we quickly switch from PLAYING to PAUSED and back to PLAYING it's possible
in some cases that the task refuses to start, This is because when we go to
PAUSED, we unschedule the clock timeout, which could return UNSCHEDULED when
we're back to PLAYING, causing the task to PAUSE again with a wrong-state.

This patch checks if we are running when we return with an UNSCHEDULED return
value and if we are, try to create a new buffer.

Fixes #597550
2009-10-15 16:30:36 +02:00
Stefan Kost
bad284be7a docs: clarify preset api docs 2009-10-15 12:16:05 +03:00
Stefan Kost
cd31173b79 docs: fix controller sections docs 2009-10-14 17:58:22 +03:00
Edward Hervey
8f9d7f2bd1 Automatic update of common submodule
From 6380d4b to 85d1530
2009-10-14 10:40:50 +02:00
Peter Kjellerstedt
1314aa75d5 iterator: Fix a documentation typo 2009-10-14 10:16:31 +02:00
Sebastian Dröge
957c0e11b2 build: ...and add missing endif 2009-10-14 08:57:52 +02:00
Sebastian Dröge
4200639298 build: Also don't run make check-exports if debugging is disabled 2009-10-14 08:57:04 +02:00
Peter Kjellerstedt
1b569d8cb4 build: Only run make check-exports if no public API was disabled
Fixes bug #598297.
2009-10-14 08:50:31 +02:00
Sebastian Dröge
b8454d623d gstobject: Replace recursive gst_object_has_ancestor() with an iterative version
This is slightly more efficient because the compiler can't do tail
recursion here and has to keep all stack frames.

Not that efficiency is that important here but I already had
the iterative version somewhere else and both are easy to read.
2009-10-14 08:34:03 +02:00
Sebastian Dröge
4917bb4fc2 gstobject: Add simple unit test for gst_object_has_ancestor() 2009-10-14 08:34:03 +02:00
Tommi Myöhänen
87058ab28e netclientclock: fix timestamp comparission, Fixes #597407 2009-10-13 19:12:50 +03:00
Jan Schmidt
ffb8518d01 check: Disable the test_fail_abstract_new() test entirely on OS/X
Fixes a compiler warning from the function being compiled but not
used.
2009-10-12 21:51:55 +01:00