Commit graph

5191 commits

Author SHA1 Message Date
Philippe Normand
b2e6379be8 gstvalue: Add new GstInt64Range type
new GstInt64Range to store gint64 ranges.

API: GST_TYPE_INT64_RANGE
API: gst_value_set_int64_range
API: gst_value_get_int64_range_min
API: gst_value_get_int64_range_max

Fixes bug #627826.
2010-09-01 11:07:37 +02:00
Arun Raghavan
00a0f4fd0b docs: Trivial cleanup for GST_DEBUG_CATEGORY_GET 2010-08-30 21:27:28 -03:00
Edward Hervey
b0b8fb9b31 info: Re-instate the default for color usage
This was accidently removed in 7a722091b6
2010-08-30 16:03:38 +02:00
Sebastian Dröge
c857047be7 utils: Fix inverted assertion logic in gst_util_fraction_compare() 2010-08-28 09:35:01 +02:00
Sebastian Dröge
8ca48752fb utils: Add gst_util_fraction_compare() to compare fractions
And use it for the fraction comparisons in gstvalue.c instead
of using comparisons by first converting the fractions to double.
Should fix bug #628174.

API: gst_util_fraction_compare()
2010-08-28 09:31:59 +02:00
Sebastian Dröge
d7f59ca0c4 pad: Deprecate GST_FLOW_IS_FATAL() and GST_FLOW_IS_SUCCESS()
The problem with both macros is, that they suggest something that isn't true.
If GST_FLOW_IS_FATAL is true, there could still be a problem for many elements
and they should stop what they're currently doing and return that value
upstream (e.g. not-linked in a parser). If GST_FLOW_IS_SUCCESS is false, it
could still be that this is "ok" for the element (e.g. not-linked for a demuxer
on a few of its pads but not all).

It's better to not have these "convenience" macros but instead let people
*think* about the handling of different flow returns, that makes sense for
their element. And we should document the expected handling of flow returns for
different classes of elements in the plugin writer's guide.

Fixes bug #628014.
2010-08-27 16:59:08 +02:00
Alessandro Decina
94a314eaee gstplugin: load the gst-python plugin loader with G_MODULE_BIND_LAZY. 2010-08-26 14:32:40 +02:00
Thiago Santos
0bd40a4397 tag: Adds GST_TAG_APPLICATION_DATA
Adds GST_TAG_APPLICATION_DATA for representing arbitrary private
data that applications might want to store into tags. Exif/id3,
for example, have tags for this.

API: GST_TAG_APPLICATION_DATA

Fixes #626651
2010-08-24 21:10:33 -03:00
David Schleef
3ef2688658 Valgrind define is HAVE_VALGRIND_VALGRIND_H 2010-08-23 18:21:25 -07:00
David Schleef
7a722091b6 Allow gst_debug_set_default_threshold() before gst_init()
Calling gst_debug_set_default_threshold() before initialization
seems like the "obvious" order.
2010-08-23 18:21:25 -07:00
Mark Nauwelaerts
c485918405 registrychunks: intern all GstPluginDesc members when unpacking 2010-08-23 10:59:50 +02:00
Mark Nauwelaerts
ad85386a57 gstobject: fix leak when naming parented object 2010-08-23 10:59:45 +02:00
Arun Raghavan
904c1a7a1d gst: Add a gst_is_initialized() API
For one, this will allow libraries that expect applications to
initialize GStreamer before using their API to have a check for this
condition.

https://bugzilla.gnome.org/show_bug.cgi?id=627438
2010-08-20 19:35:01 +02:00
Wim Taymans
57cc780c45 bin: relax the source element check
When there is a sink inside a bin, the SINK flag is set on the bin. When we are
trying to iterate the source elements, also include the bins with the SINK flag
because they could also contain source elements, in which case they are also a
source.

This solves the case where sending an EOS to a pipeline didn't get dispatched to
all source elements.

See #625597
2010-08-20 18:04:52 +02:00
Thiago Santos
706f0f657b element: link_many should activate pads if needed
gst_element_link_many does some magic and creates ghostpads
if needed, but it didn't set the newly created ghostpad to
active if needed. This patch fixes it.

https://bugzilla.gnome.org/show_bug.cgi?id=626784
2010-08-19 07:33:08 -03:00
Stefan Kost
72c0474936 info: xrefs glib symbol in docs 2010-08-12 23:25:03 +03:00
Thiago Santos
261ef606e2 tag: Adds GST_TAG_APPLICATION_NAME tag
Adds a new tag for representing application used to create
a media

https://bugzilla.gnome.org/show_bug.cgi?id=626027
2010-08-09 17:44:17 -03:00
Sebastian Dröge
699385f715 bufferlist: Initialize the GType cache for the bufferlist again
This was accidentially removed with last commit.
2010-08-08 17:57:52 +02:00
Sebastian Dröge
d5c0b3311b bufferlist: Don't chain up finalize to the parent class
GstMiniObject::finalize does nothing and this prevents a
runtime-type-check cast and function call per buffer list.
2010-08-06 19:38:22 +02:00
Shixin Zeng
d41997040b gst: make _get_type() in gst/* thread safe
This is not really necessary here because everything is
initialized from gst_init() already but using G_DEFINE_TYPE()
removes some copy&paste boilerplate code.
2010-08-06 19:35:59 +02:00
Tim-Philipp Müller
18ecca6331 utils: speed up pad linking utility functions by not trying pads that will never work
In gst_element_get_compatible_pad(), when trying to find a compatible pad on an
element for a given pad, there's no point in checking the element's sink pads
if the pad to link is a sink pad as well, or the element's source pads if the
given pad is a source pad already, since those would never be able to link
anyway. Should speed up linking using the convenience functions a little bit,
or at least reduce debug log output.
2010-08-05 10:16:16 +01:00
Stefan Kost
f547482e7c info: take the timestamp a tick later
The logging is not an atomic operation and because of the multi-threading we end
up with out-of-order log lines. Tools that present the log-file should probably
resort the lines. This change just takes the timestamp a bit closer to the
actual logging.
2010-08-05 10:35:46 +03:00
Stefan Kost
d3f63b1b87 docs: more docs for gst_parse_launch and co
Tell about limited reusability of some parsed pipelines.
2010-08-05 09:40:03 +03:00
Stefan Kost
c94fbb5594 pad: log element:pad names with caps 2010-08-05 09:40:03 +03:00
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