Commit graph

6885 commits

Author SHA1 Message Date
Tim-Philipp Müller
49ea16e041 segment: make sure we don't have unmapped seek flags littering out segment flags
Make GstSeekFlag to GstSegmentFlag conversion explicit, and
set only those seek flags in the segment flags which are
mapped. This makes sure we don't have extraneous flags
littering our segment flag field, which also fixes the
debug printing/serialisation of segment events in the
debug log.
2012-07-04 16:16:04 +01:00
Joshua M. Doe
ba6fad9302 datetime: add conversion to/from GDateTime
Exposes existing constructor.

API: gst_date_time_to_g_date_time()
API: gst_date_time_new_from_g_date_time()

https://bugzilla.gnome.org/show_bug.cgi?id=679080
2012-07-04 10:22:41 +01:00
Tim-Philipp Müller
291403bbb9 utils: remove unused gst_print_* functions 2012-07-04 08:52:08 +01:00
Tim-Philipp Müller
95f2cab053 pads: no need to deactivate pads that are already in PAD_MODE_NONE 2012-07-03 22:24:22 +01:00
Tim-Philipp Müller
0841ac48f1 pads: make pad activation debug logs a bit more readable 2012-07-03 22:20:40 +01:00
Tim-Philipp Müller
4f7aa97b21 pad: clear EOS flag when deactivating pads fixing element re-use 2012-07-03 19:04:54 +01:00
Wim Taymans
db65bfa129 buffer: fix the _get_mapped function
Fix the internal _get_mapped function. gst_memory_make_mapped() takes ownership
of the memory so we need to keep an additional ref until we are done.
2012-07-03 12:42:44 +02:00
Wim Taymans
2c88afb992 buffer: add more debug log 2012-07-03 12:42:44 +02:00
Sebastian Dröge
0412af25fe event: The GAP event is (partially) implemented now, STREAM_CONFIG isn't 2012-07-03 10:03:37 +02:00
Chun-wei Fan
02c07aa854 math-compat.h: add implementation for isnan() for Visual C++
Visual C++ does not have isnan(), so add fallback to
math-compat.h (could use _isnan() in this case, but
this makes it work for all cases where isnan is missing).

https://bugzilla.gnome.org/show_bug.cgi?id=679112
2012-07-02 20:27:53 +01:00
Wim Taymans
e288ac7913 gstobject: don't use g_strdup_value_contents()
g_strdup_value_contents() does some extra escaping, preventing us from using the
output on the console to be used directly.
2012-06-29 11:21:36 +02:00
Wim Taymans
4c6228224f buffer: add _append_region function
Make a gst_buffer_append_region() function that allows you to append a memory
region from one buffer to another. This is a more general version of
gst_buffer_append().
2012-06-28 11:02:19 +02:00
Tim-Philipp Müller
f738dbe86a datetime: ignore 0 days or months in dates
Handle 0 months or days correctly in date strings, so that
2012-06-00 is parsed the same as 2012-06, for example.
2012-06-27 23:00:08 +01:00
Christophe Fergeau
dd9fedb41f parse: escape \ with a \ as well, so that we don't lose the \ when unescaping
If we have a file called Foo\Bar.ogg, there is no way to pass
that filename properly to filesrc in gst_parse_launch(), since
gst_parse_unescape() will just unescape \x to x.

Not cherry-picking this into 0.10 since there are apparently
apps that work around this problem and which would break if
we fixed it there too.

https://bugzilla.gnome.org/show_bug.cgi?id=673319
2012-06-27 19:59:29 +01:00
Tim-Philipp Müller
e4301fe50f elementfactory: annotate some of the type defines for g-i
Type is not picked up yet though, and we still need
to annotate values for the 'simple' defines.

https://bugzilla.gnome.org/show_bug.cgi?id=677925
2012-06-27 16:37:54 +01:00
Tim-Philipp Müller
e552cc74d9 clock: annotate GST_CLOCK_TIME_NONE with its value for g-i
The value now gets picked up, but it still thinks the type
is a 'gint'.

https://bugzilla.gnome.org/show_bug.cgi?id=678928
2012-06-27 14:48:55 +01:00
Tim-Philipp Müller
5a6be2201d datetime: fix compare function
Take into account that not all fields might be valid (though they
are valid in the GDateTime structure). But we should just return
unordered if the set fields don't match. Also, don't check
microseconds when comparing datetimes, since we don't serialise
those by default if they're available. This ensures date times are
still regarded as equal after serialising+deserialising.
2012-06-27 13:51:33 +01:00
Oleksij Rempel
1eb9932dbb datetime: add serialisation to and deserialisation from ISO 8601 strings
Some tag parsers and writers use same datetime format based on ISO 8601.
We can reduce some code by creating some general functions for it.

API: gst_date_time_to_iso8601_string()
API: gst_date_time_new_from_iso8601_string()

https://bugzilla.gnome.org/show_bug.cgi?id=678031
2012-06-27 12:37:06 +01:00
Tim-Philipp Müller
2c532aa821 toc: put toc directly into event/message/query structure
Now that TOCs are refcounted and have a GType, we can just
stuff a ref of the TOC directly into the various toc
event/message/query structures and get rid of lots of
cracktastic GstStructure <-> GstToc serialisation and
deserialisation code. We lose some TOC sanity checking
in the process, but that should really be done when
it's being created anyway.
2012-06-26 20:43:50 +01:00
Tim-Philipp Müller
0cb9ad013a Revert "bus: skip gst_bus_create_watch as GSource is not introspectable"
This reverts commit 930e36a89b.

This shouldn't have been pushed, since GSource is now handled
(https://bugzilla.gnome.org/show_bug.cgi?id=657725)
2012-06-26 18:22:33 +01:00
Johan Dahlin
930e36a89b bus: skip gst_bus_create_watch as GSource is not introspectable
https://bugzilla.gnome.org/show_bug.cgi?id=657640
2012-06-26 18:19:18 +01:00
Tim-Philipp Müller
e11f38b98b toc: add more entry types
Make entry types less abstract.

https://bugzilla.gnome.org/show_bug.cgi?id=678742
2012-06-26 17:30:19 +01:00
Wim Taymans
d3f5dd0707 miniobject: add steal_qdata
Rework the qdata code a little
2012-06-26 09:51:10 +02:00
Tim-Philipp Müller
03ac16c1d8 tocsetter: clean up and update API for refcounted TOCs
Let's keep it simple for now:

gst_toc_setter_reset_toc() -> gst_toc_setter_reset()
gst_toc_setter_get_toc_copy() -> removed
gst_toc_setter_get_toc() -> returns a ref now
gst_toc_setter_get_toc_entry_copy() -> removed,
    use TOC functions instead
gst_toc_setter_get_toc_entry() -> removed,
    use TOC functions instead
gst_toc_setter_add_toc_entry() -> removed,
    to avoid problems with (refcount-dependent)
    writability of TOC; use TOC functions instead
2012-06-25 20:18:32 +01:00
Wim Taymans
17022f7ad1 memory: improve docs
Mention that custom allocator functions can pass whatever they want to the
user_data.
2012-06-25 09:33:18 +02:00
Alexander Saprykin
3ba43888f4 tagsetter: use G_DEFINE_INTERFACE_* macro
https://bugzilla.gnome.org/show_bug.cgi?id=673641
2012-06-25 00:31:01 +01:00
Alexander Saprykin
49eb73be77 tocsetter: use G_DEFINE_INTERFACE_* macro
https://bugzilla.gnome.org/show_bug.cgi?id=673641
2012-06-25 00:30:59 +01:00
Tim-Philipp Müller
8590be2861 tocsetter, gst-launch, tests: update for GstToc API changes 2012-06-24 20:15:19 +01:00
Tim-Philipp Müller
f20efe23a3 toc: make GstToc and GstTocEntry mini objects
Because we can, and in order to make them refcounted.
2012-06-24 20:15:11 +01:00
Tim-Philipp Müller
528f89c940 taglist: fix confusing log message 2012-06-23 21:42:58 +01:00
Tim-Philipp Müller
06d96f1bda value: fix int64 - int64 range intersection on big endian systems
Works better if we use the v_int64 field of the GValue instead of v_int.
2012-06-23 21:35:33 +01:00
Tim-Philipp Müller
1be934f0dd miniobjects: pass copy, dispose and free function to gst_mini_object_init()
So mini objects don't have to poke into the GstMiniObject part
of the structure. Saves lines of code, and seems slightly cleaner.
We don't have proper OO hierarchies or methods here after all.
2012-06-23 20:02:02 +01:00
Tim-Philipp Müller
8973bca63c taglist: remove some outdated FIXMEs and comments 2012-06-23 17:05:22 +01:00
Tim-Philipp Müller
4b5c8cada2 sample: some more g-i annotations 2012-06-23 17:04:53 +01:00
Tim-Philipp Müller
bc28ebf08d sample: add compare function for GstSample
Should make gst_tag_list_is_equal() work properly with image tags.

https://bugzilla.gnome.org/show_bug.cgi?id=672637
2012-06-23 16:59:10 +01:00
Tim-Philipp Müller
533ecb8840 value: fix buffer compare function 2012-06-23 16:30:03 +01:00
Tim-Philipp Müller
2f46207ec7 parse: update for gst_element_make_from_uri() change 2012-06-23 14:43:21 +01:00
Tim-Philipp Müller
f8445bd293 uri: add error argument to gst_element_make_from_uri()
So callers can differentiate between there not being a
handler for the protocol, and them not accepting the URI
for some reason.

https://bugzilla.gnome.org/show_bug.cgi?id=645467
2012-06-23 14:43:17 +01:00
Tim-Philipp Müller
b5a064850e memory: annotate GstMapInfo data as array for g-i 2012-06-23 12:39:10 +01:00
Wim Taymans
7da1d23a9b info: add destroy notify to gst_debug_add_log_function() 2012-06-20 13:28:08 +02:00
Wim Taymans
d2c632fcda pad: improve introspection annotation 2012-06-20 13:27:33 +02:00
Wim Taymans
6efb5c9b6b bus: add GDestroyNotify to set_sync_handler() 2012-06-20 12:29:35 +02:00
Wim Taymans
b2aa56f4e3 task: add separate methods to add enter/leave callback
Remove the structure of callbacks and replace with separate methods to register
each callback. This is much more binding friendly.

Fixes https://bugzilla.gnome.org/show_bug.cgi?id=677898
2012-06-20 11:59:09 +02:00
Wim Taymans
76e8b2ecda task: add GDestroyNotify to _new
Add a GDestroyNotify to the user_data we pass to gst_task_new()
Change gst_pad_start_task() to also take the notify
2012-06-20 10:31:49 +02:00
Wim Taymans
d7d5306009 clock: remove _full version
Rename gst_clock_id_wait_async_full() to gst_clock_id_wait_async()
and remove the old gst_clock_id_wait_async() version.
2012-06-20 09:58:14 +02:00
Evan Nemerson
870d631f51 task pool: set scope of gst_task_pool_push callback to async 2012-06-19 17:37:59 -07:00
Evan Nemerson
b70aefdb85 introspection: add missing return value annotations 2012-06-19 17:33:45 -07:00
Evan Nemerson
8620b30df9 introspection: rename some "data" arguments to "user_data"
GObject Introspection will automatically treat "user_data" arguments
as closure data.
2012-06-19 16:09:10 -07:00
Evan Nemerson
4e89ecd4d1 toc: add some missing element-type annotations 2012-06-19 16:08:46 -07:00
Evan Nemerson
d5c54b07fc buffer pool: put GstBufferPoolAcquireParams typedef before struct
Works around https://bugzilla.gnome.org/show_bug.cgi?id=581525
2012-06-19 16:06:49 -07:00