Commit graph

5317 commits

Author SHA1 Message Date
Stefan Kost
8d9688f84c utils: better error logging in link_pads_filtered 2010-08-05 09:40:02 +03:00
Olivier Crête
37e2fb1054 gstutils: Make gst_pad_proxy_getcaps() return empty caps if it's what the other side has
gst_pad_proxy_getcaps() would return the pad template caps if the other side
returned empty caps or if the intersection of all the caps on the other side
was empty.

https://bugzilla.gnome.org/show_bug.cgi?id=624203
2010-08-05 01:14:18 +01:00
Wim Taymans
aa68b600f5 gst: remove \n from debug statements 2010-08-04 10:28:32 +02:00
Tim-Philipp Müller
6f0da67002 info: fix compilation on windows
Fix mismatched brackets (#625295).
2010-07-27 14:32:31 +02:00
Thiago Santos
fda35f7ac7 gstdatetime: Fix localtime usage
localtime only takes one parameter and returns a statically
allocated tm struct. Use it correctly.

Fixes #625368
2010-07-27 07:21:19 -03:00
Tim-Philipp Müller
4cecd73c93 info: flush again after every line of debug output
g_printerr() used to do this for us. Also use libc's fprintf() functions,
to make sure the stderr pointer we use is actually compatible with the
libc linked against by GStreamer (which apparently may not always be the
same as what GLib is linked against on windows), and we don't need the
functionality ensured by g_fprintf().

Fixes #625295.
2010-07-26 19:14:51 +02:00
Thiago Santos
f2c18c6c98 gststructure: Adds datetime getter function
Adds gst_structure_get_date_time function

API: gst_structure_get_date_time

Fixes #594504
2010-07-26 11:57:52 -03:00
Thiago Santos
137d19d621 tag: Adds GST_TAG_DATE_TIME tag
Adds a new tag that represents a date and time a media was
created

API: GST_TAG_DATE_TIME

Fixes #594504
2010-07-26 11:57:51 -03:00
Thiago Santos
3449bfc30e taglist: Add datetime get functions
Adds _date_time_get and _date_time_get_index functions to
taglist.

API: gst_tag_list_get_date_time
API: gst_tag_list_get_date_time_index

Fixes #594504
2010-07-26 11:57:51 -03:00
Thiago Santos
b4870282cb gstvalue: Adds datetime functions
Adds a datetime functions to gstvalue

Fixes #594504
2010-07-26 11:57:50 -03:00
Thiago Santos
6425bde6ec gstdatetime: Adds GstDateTime
Adds GstDateTime to represent dates + time + timezone
information.

Tests included.

API: GstDateTime
API: gst_date_time_get_day
API: gst_date_time_get_month
API: gst_date_time_get_year
API: gst_date_time_get_hour
API: gst_date_time_get_microsecond
API: gst_date_time_get_minute
API: gst_date_time_get_second
API: gst_date_time_get_time_zone_offset
API: gst_date_time_new
API: gst_date_time_new_local_time
API: gst_date_time_new_from_unix_epoch
API: gst_date_time_new_now_local_time
API: gst_date_time_new_now_utc
API: gst_date_time_ref
API: gst_date_time_unref

Fixes #594504
2010-07-26 11:57:49 -03:00
Sebastian Dröge
c8b06272bc gst: Fix usage of glib_check_version()
It returns NULL if the installed GLib version is as least as
new as the required version and some explanatory string otherwise.
2010-07-26 14:59:51 +02:00
Tim-Philipp Müller
042e056776 binaryregistry: save and load release date time in GstPluginDesc
https://bugzilla.gnome.org/show_bug.cgi?id=623040
2010-07-23 17:03:42 +01:00
Tim-Philipp Müller
8c72758ec2 plugin: add release datetime field to GstPluginDesc and set it if GST_PACKAGE_RELEASE_DATETIME is defined
This is a string describing a date and/or date/time in a simple subset of
the ISO-8601 format, namely either "YYYY-MM-DD" or "YYYY-MM-DDTHH:MMZ" (with
'T' the date/time separator and the 'Z' indicating UTC).

The main purpose of this field is to keep track of plugin and element versions
on an absolute timeline, so it's possible to determine which one is newer when
comparing two date time numbers. This will allow us to express 'replaces'-type
relationships betweeen plugins and element factories in future, even across
different modules and plugin merges or splits (source module version numbers
aren't particularly useful here, since they can only meaningfully be compared
within the same module). It also allows applications and libraries to reliably
check that a plugin is recent enough without making assumptions about modules
or module versions.

We use a string here to keep things simple and clear, esp. on the build system
side of things.

https://bugzilla.gnome.org/show_bug.cgi?id=623040
2010-07-23 17:00:56 +01:00
Tim-Philipp Müller
9d4caf8d8c info: write debugging output to file if GST_DEBUG_FILE environment variable is set
This changes behaviour slightly in that we no longer output things
via g_printerr(), so any non-standard glib printerr handlers are no
longer called when GST_DEBUG is enabled. However, this seems not
really desirable in most cases anyway, and the GLib docs also say
that libraries should not use g_printerr() for logging.

Other stderr output (e.g. warnings, or application messages) will
of course not be captured in the log file this way.

GST_DEBUG_FILE=- will redirect debug output to stdout.
2010-07-21 15:54:07 +01:00
Edward Hervey
21c8edca2a gstpad: Assume pads are compatible if we don't have templates
This is the same behaviour as if we had a pad template caps of
GST_CAPS_ANY on any of the pads (i.e. the actual check will be done
during caps negotiation).
2010-07-20 20:52:35 +02:00
Tim-Philipp Müller
b987febf09 registry: use GStatBuf unconditionally and add typedef for backwards compatibility
No need to clutter the code with #if #else #endif.

See #623875.
2010-07-16 17:55:07 +01:00
Sebastian Dröge
88ec06f433 structure: Use a const GstStructure * as parameter for some more gst_structure_get variants 2010-07-16 17:33:38 +02:00
David Hoyt
c53457976e registrybinary: Fix compatibility with GLib 2.25 when using MSVC
Newer GLib uses a new type for g_stat() and friends to improve
Windows compatibility. On POSIX this is a typedef to struct stat.

Fixes bug #623875.
2010-07-16 17:27:54 +02:00
Sebastian Dröge
9d0e2e7252 pipeline: If the currently used clock gets lost update it the next time when going from PAUSED to playing
Fixes bug #623806.
2010-07-16 17:27:04 +02:00
Edward Hervey
7fa58dbebd GstPad: Do not call gst_pad_accept_caps() when caps change
Instead just check that the caps intersect with the pad template.
The elements should properly accept/refuse the caps in setcaps().

Shaves off calling the default implementation of acceptcaps which does
an expensive gst_pad_get_caps() (so if you have 50 of those elements in
a row, you'd be doing factorial(50) gst_pad_get_caps...).

Does not break any module unit test and most apps work fine.

https://bugzilla.gnome.org/show_bug.cgi?id=622740
2010-07-16 15:30:55 +02:00
Edward Hervey
5b40ebbceb utils: Add more details about gst_element_get_compatible_pad 2010-07-16 15:30:22 +02:00
Stefan Kost
9d2292acaa pad: remove comma at the end of the last enum value
Fixes the build for c++.
2010-07-15 12:03:04 +03:00
Eduardo Dobay
e86cfe1a19 taglist: fix merge_strings_with_comma() for more than two strings
Fixes #624113.
2010-07-11 18:59:53 +01:00
Edward Hervey
27410f3934 gstvalue: Improve gst_value_{set|get}_caps docs 2010-07-06 11:18:32 +02:00
Alessandro Decina
a02fcb0478 clock: document that GstClockEntry should be treated as ana opaque structure. 2010-07-06 10:46:42 +02:00
Alessandro Decina
819780acf7 clock: use the new gst_clock_id_wait_async_full.
Use the new gst_clock_id_wait_async_full in gst_clock_set_master.
Also add some tests.
2010-07-06 10:46:42 +02:00
Alessandro Decina
538e82c6f7 clock: fix refcounting bug in gst_clock_set_master.
Make sure clock->clockid is unreffed before clock->master.
gst_clock_id_unschedule (clock->clockid) tries to access clock->master. If
clock->master is unreffed before and it's deallocated, _unschedule could access
free'd memory.
2010-07-06 10:46:42 +02:00
Alessandro Decina
dda8663811 clock: add gst_clock_id_wait_async_full.
Add gst_clock_id_wait_async_full. It's the same as gst_clock_id_wait_async but
allows passing a GDestroyNotify to destroy user_data.
2010-07-06 10:46:42 +02:00
Stefan Kost
8df1fdab57 docs: improve the api docs for new GstPadLinkChecks and its use 2010-07-05 17:53:42 +03:00
Edward Hervey
70d1f1f177 gstcaps: Make sure _normalize() is applied on all structures.
We need to use gst_caps_get_size() in the loop counter since some
structures could be added while iterating.

Fixes #623301
2010-07-01 18:17:40 +02:00
Sebastian Dröge
c076eb6bb0 utils: Don't use G_GNUC_CONST for the uint64 scaling functions
They are actually *not* const functions because on architectures
without int128 instructions the parameters were changed.

gcc re-used the parameters on the stack for multiple calls though
and the changed parameters were used for the second call then.

Fixes bug #623003.
2010-06-28 10:20:39 +02:00
Tim-Philipp Müller
00697e8529 xml: keep dummy gst_xml_get_type() function for g-i even if rest of GstXML is removed
Add a minimal gst_xml_get_type() function, so that gobject-introspection doesn't
break the compilation if we're compiling with GST_REMOVE_DEPRECATED defined or
--disable-loadsave having been passed to configure. Until someone figures out
a better way at least.
2010-06-26 10:35:38 +01:00
Tim-Philipp Müller
71f3a6f0f7 Don't include <libxml/parser.h> from public headers if GST_DISABLE_DEPRECATED is defined
Since everything GstXML related has been deprecated, we can now skip the
libxml includes from the public headers when GST_DISABLE_DEPRECATED is
defined.

See #463435.
2010-06-26 10:35:38 +01:00
Stefan Kost
8fffa2d790 dot-dump: terminate truncated strings and escape special chars
Fixes syntax errors in generated dot files for caps with strings.
2010-06-25 21:25:10 +03:00
Edward Hervey
27b4868157 pad: more documentation regarding the new flags 2010-06-25 18:55:18 +02:00
Wim Taymans
d4e1fdb0c7 pad: make the NOTHING link check flag be 0
Make the pad link check of NOTHING be 0. This way we have a flag for each
feature and 0 when no flags are set.
2010-06-25 18:28:07 +02:00
Sebastian Dröge
5f4a965f67 gstxml: Deprecate GstXml and related functions
Pipeline serialisation to and from XML is horribly broken for all
but the most simple use cases, and will likely never be fixed.
Make sure everyone playing around with these tools is aware of
this, to avoid frustration. See countless bug reports in bugzilla.

Fixes bug #622685.
2010-06-25 18:25:40 +02:00
Tim-Philipp Müller
3410d665d7 binaryregistry: ignore the plugin cache if the filter environment has changed
Make sure that we properly update the registry and the cache file whenever
the filter environment changes or there's no more filter set.
2010-06-23 17:56:51 +01:00
Tim-Philipp Müller
9c6b87510e pluginloading: add support for whitelisting based on plugin or source module name and path
This feature is primarily intended for use in plugin modules' unit tests.

Consider the following situation: gst-plugins-good is built against an
installed GStreamer core. An older version of gst-plugins-good is also
installed in that prefix, along with random other plugin modules. Now,
when doing 'make check' in the just-built gst-plugins-good tree, we
want to only load plugins from GStreamer core, gst-plugins-base, and
gst-plugins-good, but not random other modules (we don't want any unit
tests to fail just because some module in gst-plugins-bad has a broken
plugin_init, for example). Also, we want to only load gst-plugins-good
modules from the locally-built source tree, but not any of the older
gst-plugins-good modules installed. This is usually assured by loading
the ones in the source tree first (by adding that path first to the
right environment variables), but it gets tricky when plugins are
moved, removed, merged, or renamed, or the plugin filename changes.

Note that 'make check' should really work right without doing
'make install' or uninstalling the old gst-plugins-good package (or
any other gst-plugins-foo package) first.

Enter GST_PLUGIN_LOADING_WHITELIST. This environment variable may
contain source-package@path-prefix pairs separated by the platform
search path separator (G_SEARCHPATH_SEPARATOR_S). The source package
and path prefix are separated by the '@' character. The path prefix is
entirely optional, as is the '@' separator if no path is given.

It is also possible to filter based on plugin names instead of the name
of the source-package by specifying one or more plugin names separated
by commas before the optional path prefix.

In short, the following match patterns are possible:

   plugin1,plugin2@pathprefix or
   plugin1,plugin2@* or just
   plugin1,plugin2 or
   source-package@pathprefix or
   source-package@* or just
   source-package

So for our gst-plugins-good unit test example above, we  would set the
environment variable on *nix to something like this (will likely be a
relative path in practice):
gstreamer:gst-plugins-base:gst-plugins-good@/path/to/src/gst-plugins-good

Fixes #619815 and #619717.
2010-06-23 17:56:51 +01:00
Edward Hervey
4a999b5e43 gstghostpad: We don't need any checks when linking target pad
https://bugzilla.gnome.org/show_bug.cgi?id=622504
2010-06-23 18:42:40 +02:00
Edward Hervey
5faf5620f3 gstutils: New gst_element_link_pads_full method
Links the elements with the specified pad linking checks.

API:gst_element_link_pads_full

https://bugzilla.gnome.org/show_bug.cgi?id=622504
2010-06-23 18:42:40 +02:00
Edward Hervey
625c4e2d80 GstPad: Add new pad linking method with configurable checks.
To be used for cases where we don't need all checks to be validated.

API: gst_pad_link_full
API: GstPadLinkCheck

https://bugzilla.gnome.org/show_bug.cgi?id=622504
2010-06-23 18:42:35 +02:00
Thiago Santos
7a34c1cd18 tag: Adds GST_TAG_IMAGE_ORIENTATION tag
Adds a new tag to inform about the image orientation and how
to rotate and flip it before display.

Note that this tag is a string with a predefined set of
possible values.

API: GST_TAG_IMAGE_ORIENTATION

Fixes #619508
2010-06-23 11:57:20 -03:00
Tim-Philipp Müller
ddb11b4f2d gstobject: deprecate gst_object_{set|get}_name_prefix()
The name prefix stuff has never been used for anything and it doesn't
look like we'll ever want to use it for anything.

Fixes #621006.
2010-06-22 18:53:15 +01:00
Johan Dahlin
23faba0190 Add gobject-introspection annotations for GstPadIntLinkFunction
Fixes build with latest gobject-introspection from git.

https://bugzilla.gnome.org/show_bug.cgi?id=622025
2010-06-22 15:01:20 +01:00
Tim-Philipp Müller
fb40cafa5a registry: also skip .deps dirs when scanning for plugins
No need to descend into .deps dirs in uninstalled setups, we know
these don't contain any plugins.
2010-06-19 13:06:45 +01:00
Thiago Santos
9ee11a2af4 taglist: add gst_tag_list_peek_string_index to avoid a copy
Adds a variation of the _get_string_index function that doesn't copy
the string.

API: gst_tag_list_peek_string_index

https://bugzilla.gnome.org/show_bug.cgi?id=621896
2010-06-18 11:49:21 -03:00
Johan Dahlin
2ecfa42fad elementfactory: Add an allow-none annotation
https://bugzilla.gnome.org/show_bug.cgi?id=621773
2010-06-16 19:03:21 +02:00
Johan Dahlin
c041915989 miniobject: Add introspection annotations
These are required to know how to unref/ref and
convert to/from a GValue.

https://bugzilla.gnome.org/show_bug.cgi?id=621773
2010-06-16 19:03:21 +02:00
Johan Dahlin
ff3f95b167 event: Add out annotations
https://bugzilla.gnome.org/show_bug.cgi?id=621773
2010-06-16 19:03:21 +02:00
Johan Dahlin
6ab6dcf931 query: Add out annotations
https://bugzilla.gnome.org/show_bug.cgi?id=621773
2010-06-16 19:03:21 +02:00
Johan Dahlin
f6f292c83e message: Add out annotations
https://bugzilla.gnome.org/show_bug.cgi?id=621773
2010-06-16 19:03:20 +02:00
Benjamin Gaignard
5d44b1a381 element: Improve gst_element_get_name() docs
Fixes bug #621660.
2010-06-15 18:49:41 +02:00
Edward Hervey
4a11063768 Revert "GstPad: Add GST_PAD_NEGOTIABLE GstPadFlag"
This reverts commit dc38e75d88.

boom
2010-06-15 11:54:19 +02:00
Edward Hervey
3df54c45bf Revert "gstpad: Return pad template in get_caps if pad is not negotiable"
This reverts commit 7460321a60.

crack
2010-06-15 11:54:19 +02:00
Edward Hervey
19334dbb85 Revert "pad: fix comment"
This reverts commit 8e92cb4a7d.

whatever...
2010-06-15 11:54:19 +02:00
Edward Hervey
27a58ed70d Revert "element: only clear negotiable when going to NULL"
This reverts commit 8f5ec1f737.

bleeeeh
2010-06-15 11:54:19 +02:00
Tim-Philipp Müller
29cc802269 info: add dummy TRACE log level macros for when debugging is disabled
Forgot those when adding the original API, just like the API markers
in the commit message:

API: GST_TRACE
API: GST_TRACE_OBJECT
API: GST_CAT_TRACE
API: GST_CAT_TRACE_OBJECT
API: GST_LEVEL_TRACE

Fixes compilation with --disable-gst-debug
2010-06-15 10:46:08 +01:00
Wim Taymans
8f5ec1f737 element: only clear negotiable when going to NULL
Don't clear the negotiable flag when going to READY because then it will never
be set to TRUE again.
2010-06-14 18:07:23 +02:00
Wim Taymans
8e92cb4a7d pad: fix comment 2010-06-14 17:33:16 +02:00
Edward Hervey
7460321a60 gstpad: Return pad template in get_caps if pad is not negotiable
https://bugzilla.gnome.org/show_bug.cgi?id=618644
2010-06-14 17:08:14 +02:00
Edward Hervey
dc38e75d88 GstPad: Add GST_PAD_NEGOTIABLE GstPadFlag
A pad is 'negotiable' when its container element is in a state greater
than GST_STATE_READY

API:gst_pad_is_negotiable
API:gst_pad_set_negotiable
API:GST_PAD_NEGOTIABLE

https://bugzilla.gnome.org/show_bug.cgi?id=618644
2010-06-14 17:08:14 +02:00
Sebastian Dröge
4d8320e4c6 gstvalue: Add some more assertions and checks for valid input parameters 2010-06-14 15:45:11 +02:00
Tim-Philipp Müller
6edfcc3705 docs: add Since: tag for new gst_caps_steal_structure 2010-06-14 12:28:57 +01:00
Tim-Philipp Müller
a76412747d docs: fix example to use a category name that actually exists 2010-06-14 12:28:42 +01:00
Edward Hervey
32adac81ee gstcaps: New gst_caps_steal_structure() method
This allows removing structures from caps without them being freed. Helpful when
plugins need to move around structures without having to do an expensive structure
copy.

API:gst_caps_steal_structure

https://bugzilla.gnome.org/show_bug.cgi?id=621527
2010-06-14 13:16:18 +02:00
Sebastian Dröge
603c04f4fa gstvalue: Don't initialize arrays from variables 2010-06-14 08:18:00 +02:00
Sebastian Dröge
6fd7c5bda0 element: Store result of strtol in an unused variable to really fix a compiler warning... 2010-06-14 08:11:35 +02:00
Sebastian Dröge
fe378a9067 element: Cast return value to void to prevent compiler warning 2010-06-13 20:52:36 +02:00
Sebastian Dröge
48438b6cc7 gstvalue: Add some assertion guards against invalid parameters to public API 2010-06-13 18:00:22 +02:00
Sebastian Dröge
e6e29192bc Remove some dead assignments 2010-06-13 17:08:48 +02:00
Sebastian Dröge
6ff314c75a pad: Fix iterator aggregation of all pads in the internal links fallback
g_list_prepend() returns the new head of the list and not
using this will create a memory leak and a single-element list.
2010-06-13 16:27:39 +02:00
Sebastian Dröge
18f23bc0b0 iterator: Add new FIXME for 0.11 and update gst_iterator_find_custom docs
The compare function should only unref the element if it's
not the matching element.

Also the FIXME in _fold() is not relevant because the ref/unref
happens in the fold function.
2010-06-13 15:25:24 +02:00
Sebastian Dröge
c4ccbe093e iterator: If the iterator resync in find_custom() just retry 2010-06-13 11:25:53 +02:00
Martin Bisson
ab0763f0e8 value: Fixed serialization for short fourccs.
"Y16 " and "Y8  " were not displayed properly because the space
character is not alnum.  A unit test is also included.

Fixes bug #621282.
2010-06-12 08:07:34 +02:00
Stefan Kost
ccc5e23a39 debugutils: fix comment typo even more 2010-06-09 12:17:03 +03:00
Stefan Kost
fdbf9239b3 docs: update docs (format and search path).
Remove obsolete xml registry cache extension. Tell that content and location is
internal detail. Docuemnt the plugin search order.
2010-06-09 12:15:52 +03:00
Stefan Kost
012cf2862f comments: add a few comments to the sparsely documented plugin loader 2010-06-09 12:15:52 +03:00
Zaheer Abbas Merali
8f1cd236ec debugutils: fix comment typo 2010-06-08 11:41:11 +02:00
Stefan Kost
2d2ec4e3d5 caps: use gst_caps_append_structure_unchecked() macro once more 2010-06-08 12:19:49 +03:00
Stefan Kost
c5f85a1cda caps: use a safer name for temporary var. to not shadow one from outer scope 2010-06-08 12:19:22 +03:00
Stefan Kost
ad619a4e84 value: use glib types in more places
Do a bunch of char -> gchar, int -> gint, double -> gdouble changes.
2010-06-07 12:22:44 +03:00
Stefan Kost
c95a85f6cf value: just compute strlen() once 2010-06-07 12:22:44 +03:00
Martin Bisson
28fdbee35a value: Add support for parsing short fourccs from strings
For example "Y16 " and "Y8  ".
2010-06-07 08:21:00 +02:00
Tim-Philipp Müller
66fc4c8ba2 info: add new TRACE log level and move refcounting there from LOG level
This makes it possible to easily get a *:5 debug log without all
the refcounting noise, and drastically reduces the number of lines
output for a normal log (46m to 28m for a 20min video). The full log
including refcounting information can still be gotten using *:7.

Fixes #620460.
2010-06-05 12:53:15 +01:00
Sebastian Dröge
2d5b1bbc1d utils: Use G_PARAM_STATIC_STRINGS for standard properties 2010-06-04 17:10:05 +02:00
Stefan Kost
21b4ef4d0f pads: Improve readability for gst_pad_fixate_caps()
Just truncate and then fixate. We check for empty caps in the begin and a
fixate-func that empties a caps would be broken. It also helps lazy caps impl.
in bug 618853 by avoiding the gst_caps_get_size().
2010-06-01 22:30:37 +03:00
Wim Taymans
88c6896fb9 gstbin: unlock _get_state() on error
When an error message is received on the bus, mark the bin as being in the error
state and unlock all current _get_state() calls with an error.

Fixes #505770
2010-05-25 19:17:44 +02:00
Tim-Philipp Müller
3ea8b47445 tagsetter: make sure only one thread creates the TagData 2010-05-24 19:08:29 +01:00
Tim-Philipp Müller
99eb992bc0 tagsetter: protect tagsetter operations with a lock
So we don't crash when a muxer tries to add tags from two
threads at the same time, eg. because it received tag events
on two input pads simultaneously.

See #619533.
2010-05-24 18:16:19 +01:00
Stefan Kost
ccaadae492 caps: use our macros more often in the code 2010-05-22 23:26:16 +03:00
Stefan Kost
bd7a34bfa1 caps: add append_structure_unchecked
This is useful when we know that caps is !NULL, writable and structure is
!NULL too.
2010-05-22 23:14:48 +03:00
Stefan Kost
edfbd90b29 docs: xref function name 2010-05-22 22:45:33 +03:00
Stefan Kost
999a6235c0 caps: use our macos more 2010-05-22 22:44:02 +03:00
Sebastian Dröge
e35fe4ef9c structure: API: Add gst_structure_fixate_field_string() 2010-05-22 10:01:44 +02:00
Stefan Kost
3e78a5dd19 docs: add links for GSource priorities
Now it is xreffed with the glib docs, where the priority scale is explained.
2010-05-19 16:24:54 +03:00
Wim Taymans
e1294397d7 miniobject: cleanup type registration a little
We can make some structs const static with little effort.
2010-05-18 18:37:25 +02:00
Tim-Philipp Müller
4793930efb pad: don't print WARNING debug statements for normal things like EOS, part II 2010-05-17 13:09:15 +01:00
Stefan Kost
e8c2c40b21 caps: comment and whitespace cleanup
Make comment more specific, reposition it and add more of the kind.
Move one ifdef'ed function around.
2010-05-14 11:54:56 +03:00
Sebastian Dröge
beb24d05af utils: Simplify fractions before doing calculations that could cause overflows
... to prevent some unnecessary overflows from happenening.
2010-05-13 08:21:37 +02:00
Sebastian Dröge
ee21479eab utils: GCD is 0 if both parameters are 0, don't divide by zero
And turn overflow checks from assertions into simple checks to
return FALSE.
2010-05-13 08:01:14 +02:00
Sebastian Dröge
2c5d3d1761 utils: Simplify result of gst_fraction_multiply() 2010-05-13 08:01:14 +02:00
Wim Taymans
60499306a6 Revert "pad: don't check twice for changed caps per push"
We need to check the pad caps on the srcpad as well as on the sinkpad. Revert
this commit as it removes the check on the srcpad and can leave the srcpad
unnegotiated (or negotiated with wrong caps)

This reverts commit 07dc1e5b49.
2010-05-06 16:41:09 +02:00
Stefan Kost
07dc1e5b49 pad: don't check twice for changed caps per push
gst_pad_chain_data_unchecked() does the same check already.
2010-05-06 17:04:53 +03:00
Wim Taymans
6e4fde7195 docs: clarify the pull_range functions
Clarify the gst_pad_pull_range(), GstBaseSrc::create(), gst_pad_get_range()
and GstPadGetRange functions a little.

Fixes #617733
2010-05-05 12:01:50 +02:00
Wim Taymans
72c512a87d utils: use reffed _get_caps() version
We don't need to have a writable copy so we can use the _reffed
version instead.
2010-05-04 11:44:27 +02:00
Thiago Santos
d020295ae0 tags: Adds geo location direction tags
Adds 3 new geo location tags involving direction and
movement of capture. Those are:

API: GST_TAG_GEO_LOCATION_CAPTURE_DIRECTION
API: GST_TAG_GEO_LOCATION_MOVEMENT_DIRECTION
API: GST_TAG_GEO_LOCATION_MOVEMENT_SPEED

Fixes #617223
2010-05-03 09:50:09 -03:00
Thiago Santos
2cc0bcb798 tags: Adds GST_TAG_DEVICE_MANUFACTURER and GST_TAG_DEVICE_MODEL
Adds those new tags to describe the device manufacturer and
model used to create medias.

API: GST_TAG_DEVICE_MANUFACTURER
API: GST_TAG_DEVICE_MODEL

Fixes #615941
2010-05-03 09:05:45 -03:00
Tim-Philipp Müller
3d6d9ca4e1 Bump GLib requirement to 2.20
See http://gstreamer.freedesktop.org/wiki/ReleasePlanning/GLibRequirement
2010-04-30 13:10:16 +01:00
Tim-Philipp Müller
8e932639ba buffer: only warn if metadata is not writable when it should be, don't return as well
Make sure we execute the same code path in git versions and in releases,
so just warn when metadata isn't writable when we want it to be instead
of bailing out.
2010-04-30 13:09:34 +01:00
Tim-Philipp Müller
ae56d71363 element: make 'adding flushing pad' warning more useful
This is a pretty common issue with ghost pads, let's make
the warning more helpful and tell people what they need
to do to fix it.
2010-04-30 13:09:34 +01:00
Benjamin Otte
b878069ef7 caps: Do not allow fixating empty caps
Passing empty caps to gst_pad_fixate_caps() is invalid, as empty caps
cannot be fixated.
2010-04-29 22:41:36 +02:00
Benjamin Otte
31832d3c21 caps: Use G_GNUC_WARN_UNUSED_RESULT for make_writable()
People often call
  gst_caps_make_writable (caps);
instead of
  caps = gst_caps_make_writable (caps);
and cause a bug. Warning about an unused return value helps here.

See https://bugzilla.gnome.org/show_bug.cgi?id=616541#c2 for an example.
2010-04-29 22:41:36 +02:00
Sebastian Dröge
b748da35d6 gst: Use GError boxed type from GObject 2.25.2 instead of our own if possible 2010-04-29 18:18:37 +02:00
Wim Taymans
c13e225a17 docs: add some more docs for the events 2010-04-29 10:26:14 +02:00
Tim-Philipp Müller
126d9cfce8 pad: add enums for custom flow return success and error codes
This way people can just #define their own custom flow returns to
one of these without having the compiler (esp. gcc-4.5) complain
about comparing integers to an enum or the enum not being listed

Fixes #615880.

API: GST_FLOW_CUSTOM_SUCCESS_1
API: GST_FLOW_CUSTOM_SUCCESS_2
API: GST_FLOW_CUSTOM_ERROR_1
API: GST_FLOW_CUSTOM_ERROR_2
2010-04-16 14:52:32 +01:00
Thiago Santos
e7a568a346 tags: doc fixes
Adds missing ':' to tags docs
2010-04-15 11:20:39 -03:00
Tim-Philipp Müller
c008823e6e bin: fix bogus variable type
The result of gst_iterator_find_custom() is not a GstIterator *.
2010-04-15 11:40:05 +01:00
Tim-Philipp Müller
24ce15bca7 structure: log what structure string we failed to parse 2010-04-14 23:53:26 +01:00
Wim Taymans
67ab660b19 bin: fix refcount when removing elements during state change
When an element is removed from a bin because it caused a state change error,
don't unref the child twice.
Add some more debug info.
Add a unit test for this error.

Fixes #615756
2010-04-14 18:32:26 +02:00
Tim-Philipp Müller
e3e58e03b3 build: $(LIBM) belongs into LIBADD not LDFLAGS 2010-04-14 11:40:21 +01:00
Sebastian Dröge
b5e875d201 registrychunks: Initialize typefind/element factory registry chunks with zeroes
This makes valgrind stop complaining about reading unitializated memory,
which is not initialized because it's just compiler-added struct padding...
2010-04-09 13:08:13 +02:00
Stefan Kost
46899ff8ba docs: use informalfigure tag to not syntax highlight the content 2010-04-08 10:47:03 +03:00
Tim-Philipp Müller
461d0e214a docs: add a few code snippets that show how to use gst_message_parse_*(). 2010-04-07 19:30:49 +01:00
Tim-Philipp Müller
189facea50 parse: fix more compiler warnings
Fix 'grammar.tab.c:815:6: warning: "YYENABLE_NLS" is not defined'
compiler warning and the same for YYLTYPE_IS_TRIVIAL. The two
translated strings aren't particularly helpful, so just define
YYENABLE_NLS to 0.
2010-04-07 19:09:24 +01:00
Tim-Philipp Müller
a26879b7a0 parse: fix compiler warning
Fix 'grammar.y:668: passing argument 1 of ‘g_free’ discards qualifiers
from pointer target type' compiler warning.
2010-04-07 19:09:23 +01:00
Wim Taymans
05d663a702 message: add Since: markers 2010-04-07 16:06:22 +02:00
Wim Taymans
08b7865f24 docs: fix some typos 2010-04-06 17:46:36 +02:00
Stefan Kost
d29c31f9cd docs: improve event docs
Rephrase first paragraph of section docs. Add detail to eos event docs.
2010-04-04 15:21:16 +03:00
Tim-Philipp Müller
c4a4f2dad2 libs: point gobject-introspection scanner to .la files
Point g-ir-scanner to the .la file of our library, which hopefully
makes it find the right dependencies in all cases (ie. our locally
built libgstreamer and not the system-installed one). This is also
how it's done in Gtk+ and how it's documented in the wiki, see
http://live.gnome.org/GObjectIntrospection/AutotoolsIntegration

Based on patches by Vincent Untz and Alan Knowles.

Fixes #603710.
2010-04-03 13:41:52 +01:00
Philip Withnall
6ca0b51e4e utils: Use G_GNUC_CONST instead of G_GNUC_PURE for conversion functions
Fixes bug #614629.
2010-04-02 18:43:37 +02:00
Sebastian Dröge
133792e5cd event: Use correct type for the message parameter in gst_event_{new,parse}_sink_message
The struct workaround was only necessary in gstevent.h, gstutils.h knows about GstMessage
2010-03-31 10:25:30 +02:00
Stefan Kost
477a5d0939 gstinfo: add a comment explaining the reason for using fucntion protos here. 2010-03-29 16:38:05 +03:00
Stefan Kost
e55d18baa2 gstinfo: always define dummy debug category as a function prototype
It does not seem to make sense to define this as a function only if we have
varargs macros.
2010-03-29 16:38:05 +03:00
Stefan Kost
b40c2f8114 build: fix redeclaration erors when building with --gst-disable-gst-debug
Give dummy symbols a uniqe name.
2010-03-29 16:38:04 +03:00
Stefan Kost
f89ccf7d3d build: move some prototypes out of #ifndef GST_DISABLE_GST_DEBUG
Move the prototypes up together. We only define the macros differently.
Fixes bug #614167 mostly.
2010-03-29 16:37:48 +03:00
Stefan Kost
04bf54c58f info: readd the use of GstDebugFuncPtr typedef and tell why
This reverts the related changes from 3f4954e42d
and ffb0a4e190.
2010-03-29 16:36:15 +03:00
Sebastian Dröge
ffb0a4e190 info: Fix build at least until the correct fix is found
See bug #614167.
2010-03-28 21:02:41 +02:00
Sebastian Dröge
e305e49ef4 structure: Make structure abbreviations array one-time initialization threadsafe 2010-03-28 19:49:00 +02:00
Sebastian Dröge
ad230b07f6 iterator: Add FIXME 0.11 for using GSlice for allocation 2010-03-28 19:48:54 +02:00
Sebastian Dröge
fd68dbc08f gst: Use GSlice instead of normal g_malloc in more places 2010-03-28 19:48:45 +02:00
Stefan Kost
3f4954e42d build: more some prototypes out if #ifndef GST_DISABLE_GST_DEBUG
The build was failing becasue of a new warning. There are still failures
(tracked via bug #614167).
2010-03-28 13:14:06 +03:00
Sebastian Dröge
d3f1d2aeb5 elementfactory: Add FIXME 0.11 to remove GstElementDetails from the public API
It's not necessary anymore to expose this as public API and this allows
easier extension of the element details by new fields.
2010-03-25 18:57:40 +01:00
Wim Taymans
5fdee7e064 bin: improve docs a little
Mention that a DURATION message does not mean that one can safely query the
duration on a bin, that only works when the bin is prerolled.
2010-03-25 18:12:06 +01:00
Thiago Santos
e875577b0f tags: Add new _USER_RATING tag
Adds a new tag for user favorite media rating.
User rating informs how much (from 0 to 100) a user
'likes' a media.
Having an percent uint range for this is easy to map into other scales,
like some players that allow users to attribute 'stars' to its
media.

API: GST_TAG_USER_RATING

Fixes #520697
2010-03-24 15:18:53 -03:00
Tim-Philipp Müller
3d5843e1f4 build: fix make distcheck
The change from GST_ALL_CFLAGS to GST_OPTION_CFLAGS dropped the includes,
putting them back fixes make distcheck.
2010-03-24 15:47:22 +00:00
Benjamin Otte
3b4aa3f76a Deprecated gst_element_class_set_details()
Use gst_element_class_set_details_simple() instead. If you want to
convert automatically, here's a script:

for file in `git grep -l GstElementDetails`; do
  sed -i -n -r '
    1h
    1!H
    $ {
      g
      s/((\/\*[^\n]*\*\/)?\n)*[^\n]*GstElementDetails .* =\s*GST_ELEMENT_DETAILS\s*\((\"[^\"]*\",\s*\"[^\"]*\",\s*\"[^\"]*\",\s*(\"[^\"]*\"\s*)*)\);\n*(.*)gst_element_class_set_details \(([^,]*),\s*[^)]*\)/\n\n\5gst_element_class_set_details_simple (\6, \3)/
      s/((\/\*[^\n]*\*\/)?\n)*[^\n]*GstElementDetails .* =\s*\{\s*(\"[^\"]*\",\s*\"[^\"]*\",\s*\"[^\"]*\",\s*(\"[^\"]*\"\s*)*)\};\n*(.*)gst_element_class_set_details \(([^,]*),\s*[^)]*\)/\n\n\5gst_element_class_set_details_simple (\6, \3)/
      p
    }' $file
  ~/gst/gstreamer/tools/gst-indent $file
done
2010-03-24 12:20:05 +01:00
Tim-Philipp Müller
0aa584917a structure: add mapping for (uint) to allow deserialisation of unsigned integers
Unsigned ints are used in taglists, would be nice to be able to
deserialise them, esp. in connection with the taginject API.
2010-03-23 19:23:22 +00:00
Stefan Kost
e3efae65bc gettext: build fixes: #if -> #ifdef 2010-03-22 17:10:06 +02:00
Stefan Kost
da287f556d parse-launch: make delayed set recursive
Right now deleyed set would only try for first set of children. We need to keep
trying to support arbitrary deep hierarchies (like in playbin2 with auto*sinks).
Also GstBin would need to actualy emit the child-added/removed signal as it
implements the iface. Fixes #613215.
2010-03-22 10:01:38 +02:00
Wim Taymans
d67f8733ac message: improve docs a little 2010-03-17 19:26:30 +01:00
Robert Swain
1a3257132d message: add QoS message to inform apps of lost data
This has been implemented as per part-qos.txt and partially addresses
bug #322947
2010-03-17 19:16:42 +01:00
Mart Raudsepp
719a9217fb docs: fix typo 2010-03-17 11:03:15 +00:00
Mart Raudsepp
db949f66e0 docs: fix since tag for gst_structure_id_has_field_typed()
gst_structure_id_has_field_typed was added in 0.10.26, not 0.10.16.
Apparent typo in commit f9e3b72f when the API was added.
2010-03-17 11:03:15 +00:00
Tim-Philipp Müller
235910e227 gst: use #if GLIB_CHECK_VERSION instead of #ifndef GLIBMACRO
for better greppability at the time we bump GLib version requirements.
2010-03-17 11:03:15 +00:00
Stefan Kost
5ff43184cf task: snprintf needs to include "stdio.h" 2010-03-16 09:56:41 +02:00
Wim Taymans
c78c637a77 task: use bionic/libc friendly arguments to prctl
prctl is supposed to take 5 arguments. It used to work with 2 arguments on some
versions of libc because it is defined as a varags function there.

See #611911
2010-03-15 17:07:59 +01:00
Wim Taymans
fb9243178a task: update docs. 2010-03-15 15:12:01 +01:00
Sebastian Dröge
f9f0346f3f taglist: Work around gtk-doc problem 2010-03-15 14:52:41 +01:00
Sebastian Dröge
fbbb671e54 utils: Handle iterator resyncs in gst_pad_proxy_setcaps()
Fixes bug #612881.
2010-03-15 14:52:40 +01:00
Wim Taymans
f9c74afe62 task: configure the object name as thread name
When we have prctl available, use it to set the configured object name as the
thread name for better debugging.

Based on patch by Robert Swain.
2010-03-15 14:48:19 +01:00
Wim Taymans
f089c3cceb pad: set a good name on the task of the pad
Use the element:pad names to configure a good name for the pad task.
2010-03-15 13:48:30 +01:00
Wim Taymans
f4b43b6c12 task: retab 2010-03-15 12:13:55 +01:00
Stefan Kost
575e7eb5f7 logging: remove extra newline 2010-03-15 11:17:22 +02:00
Stefan Kost
ba53eee64b bus: turn g_return_if_fail into g_assert.
This either must never happen (which makes sense in this case) and thus should
use assert() or we should use a traditional if (poll_data->message) return;
to avoid differnet behaviour of intenal api when compiling with
G_DISABLE_CHECKS.
2010-03-15 11:17:22 +02:00
Stefan Kost
1ca450ba5c caps: move the check to the public api.
This avoids creating empty caps and destroying them in the case of an error. We
also avoid double checking in other code path where we call the internal api.
2010-03-15 11:17:22 +02:00
Stefan Kost
43a4763491 caps: this is internal API where we need to ensure !NULL higher up 2010-03-15 11:17:22 +02:00
Stefan Kost
646d436799 gst: this is an internal function where we already ensure !NULL when calling 2010-03-15 11:17:21 +02:00
Stefan Kost
b9cb52a2c2 debugutils: fix case of pad flag
Due to a typo the code was always showing the flag as 's' (lower case).
Fixes #611075
2010-03-15 11:16:44 +02:00
Stefan Kost
0765d4b812 debug: add pretty printer for events
Adder is using GST_PTR_FORMAT for events already, so we might actualy
implement this and print out some useful info.
2010-03-15 09:10:05 +02:00
Benjamin Otte
7c1d33a8a3 Add some 0.11 FIXMEs for GstPluginInitFunc
See 8fe63000de for why having a TRUE/FALSE
return value is a bad idea.
I've scanned a few plugins and they generally get it wrong and aren't
unloadable when they return FALSE.
2010-03-13 11:05:33 +01:00
Leo Singer
3f86f8cee1 gstinfo: fix compilation error if HAVE_REGISTER_PRINTF_SPECIFIER is undefined
Use #if HAVE_FOO instead of #ifdef HAVE_FOO.

Fixes #612733.
2010-03-12 19:05:16 +00:00
Benjamin Otte
8fe63000de plugins: Do not ever unload a plugin after calling into it
This is what can happen in a plugin_init function:
- An element based on GstBaseSink is registered
- Other elements fail to register
- The plugin_init function returns FALSE

Now if this the plugin is the first plugin to link against
libgstbase.so, it will have caused libgstbase.so to be loaded and static
strings from that library will have been added to gobject while
registering GstBaseSink.

So unloading the plugin will cause those strings to go stale and the
next plugin using GstBaseSink will crash. So we must not unload modules
after calling into them ever.

https://bugzilla.redhat.com/show_bug.cgi?id=572800
2010-03-12 16:56:56 +01:00
Edward Hervey
bbe26d36ba gst: Use G_VALUE_COLLECT_INIT if available
This brings total call speedups between 5% and 25%.
gst_caps_set_simple_valist: +5%
gst_structure_set_valist: + 10%
gst_structure_id_set_valist: +25%
gst_tag_list_add_valist: +5%

Measured using valgrind when run over the discovery of 200 media files.

Fixes #610256
2010-03-12 10:01:47 +01:00
Thiago Santos
f563ac57f8 tags: Adds new geo location tags
Adds new tags GST_TAG_GEO_LOCATION_COUNTRY,
GST_TAG_GEO_LOCATION_CITY and GST_TAG_GEO_LOCATION_SUBLOCATION.

API: GST_TAG_GEO_LOCATION_COUNTRY
API: GST_TAG_GEO_LOCATION_CITY
API: GST_TAG_GEO_LOCATION_SUBLOCATION

Fixes #612410
2010-03-11 15:31:06 -03:00
Benjamin Otte
8fa19a360c win32: Add prototype for DllMain() 2010-03-11 18:37:24 +01:00
Edward Hervey
d60a3b8a59 gstreamer: remove unneeded casts
G_PARAM_SPEC_VALUE_TYPE does an expensive type check, whereas the
value_type field is a public field, so we can just use it directly.
2010-03-11 11:46:28 +01:00
Benjamin Otte
7e7f51f617 Fixes for -Wmissing-declarations -Wmissing-prototypes
Also adds those flags to the configure warning flags

https://bugzilla.gnome.org/show_bug.cgi?id=611692
2010-03-11 10:59:57 +01:00
Tim-Philipp Müller
8a4aed855a buffer: fix printf format
Use %u to print unsigned integers.
2010-03-11 09:39:23 +00:00
Stefan Kost
4ba031a7e2 i18n: define dummy ngettext if i18n is disabled.
We cannot blindly use gettext function and not define them when not using gettext.
2010-03-11 10:14:05 +02:00
Stefan Kost
59bf16352b i18n: fix the build with i18n disabled.
Don't include gettext.h if !ENABLE_NLS.
2010-03-11 10:04:27 +02:00
Stefan Kost
a184419ec5 buffer: allow configurable memory alignment. Fixes #596832
The alignment guaranteed by malloc is not always sufficient. E.g. vector
instructions or hardware subsystems want specifically aligned buffers. The
attached patch will use posix_memalign if available to allocate buffers.
The desired alignment can be set when running configure using the new
--with-buffer-alignment option.
2010-03-11 10:00:28 +02:00
Benjamin Otte
a9d1a493a7 Fixes for -Wwrite-strings
This changes some APIs in compatible ways:
- Some functions now take "const char *" arguments, not "char *"
- Some structs now have "conts char *" members, not "char *"
The changes may cause warnings when compiling with the right warning
flags. You've been warned.

Also adds -Wwrite-strings as a warning flag in configure.ac.

https://bugzilla.gnome.org/show_bug.cgi?id=611692
2010-03-10 20:50:10 +01:00
Benjamin Otte
22f87a529f Fixes -Wundef warnings
... and adds that flag to configure.ac

https://bugzilla.gnome.org/show_bug.cgi?id=611692
2010-03-10 20:46:09 +01:00
Benjamin Otte
3234c0128b Fixes for -Wold-style-definition
https://bugzilla.gnome.org/show_bug.cgi?id=611692
2010-03-10 20:45:35 +01:00
Benjamin Otte
e8f65e8bff Make code safe for -Wredundant-decls
Adds that warning to configure.ac

Includes a tiny change of the GST_BOILERPLATE_FULL() macro:
The get_type() function is no longer declared before being defined.

https://bugzilla.gnome.org/show_bug.cgi?id=611692
2010-03-10 20:45:33 +01:00
Benjamin Otte
f067d38d1d Make sure generated code doesn't run with -Werror
https://bugzilla.gnome.org/show_bug.cgi?id=611692
2010-03-10 19:27:09 +01:00
Benjamin Otte
0d4d5a57da Revert "registry: remove unused function"
Turns out  the function is not unused, but was in an #ifdef WIN32
section.
Whoops.

This reverts commit 57d5db424c.
2010-03-10 19:17:42 +01:00
Benjamin Otte
57d5db424c registry: remove unused function
Actually, there was two functions with the same name, but only one was
used.

https://bugzilla.gnome.org/show_bug.cgi?id=611692
2010-03-10 15:24:11 +01:00
Benjamin Otte
5c01dcb1f7 remove unused gst_element_default_error()
https://bugzilla.gnome.org/show_bug.cgi?id=611692
2010-03-10 15:24:11 +01:00
Jeremy Huddleston
fa0d218e4c utils: Use mulq instead of mul as some assemblers can't guess the size of the operands
Fixes bug #612370.
2010-03-10 07:17:07 +00:00
Sebastian Dröge
ce74a1ae19 build: Make some more rules silent if requested 2010-03-09 20:57:17 +00:00
Benjamin Otte
5c4044d5f9 Fix typos in documentation 2010-03-09 19:18:21 +01:00
Benjamin Otte
ec10b764b9 caps: Fail when fractions are followed by random text
Previous code treated "1/1yourmom" the same as "1/1" and "1wimsmom" the
same as "1". Now the code is stricter and will fail to convert a
fraction when followed by garbage text.
2010-03-09 19:18:21 +01:00
Benjamin Otte
4743e62be8 caps: Allow 1/max as the minimal fraction value > 0
This is useful for formats that require a valid framerate (like
theoraenc).
2010-03-08 22:26:34 +01:00
Wim Taymans
14113e8661 element: fix typo in comments 2010-03-08 17:36:02 +01:00
Tim-Philipp Müller
4cbf794b0e gstpoll: don't pass non-objects as first argument to GST_DEBUG_OBJECT()
This may cause crashes when logging is enabled, especially on windows.
It's not safe to pass random pointers to g_type_check_instance_is_a().

Fixes #611719.
2010-03-04 18:40:50 +00:00
Tim-Philipp Müller
0b954928c8 tags: try to make comment for translators more helpful 2010-03-01 12:02:44 +00:00
Johan Bilien
1d7afbd0f2 introspection: add annotation for gst_element_get_state
state and pending are "out" arguments.

Fixes #605189.
2010-02-18 01:28:57 +00:00