Commit graph

4794 commits

Author SHA1 Message Date
Stefan Kost
c2da78a953 docs: fix gtk-doc warnings
Move MT safety to main description (it does not belong to Return: or Since:
statement). Add a few missing return docs. Downgrade a normal comment froma doc
comment. Fix a doc header to only contain symbol name.
2009-05-22 12:53:11 +03:00
Jan Schmidt
c05e2382cb docs: Fix up some documentation warnings.
Since: tags should always be the last thing in a doc block, apparently.
Add some Returns: descriptions to some recent functions.
2009-05-22 09:33:02 +01:00
Wim Taymans
f7c5767559 docs: update docs for stream_time->running_time
Change some instances where we wrongly refer to stream time where it should have
been running time.
2009-05-21 17:32:00 +02:00
Hannes Bistry
b47f425069 loadsave: fix requestpad handling and serialisation order.
Support request pads when loading. Reverse pad serialisation order to
preserve it when recreating the pipeline.
2009-05-20 10:58:59 +03:00
Tim-Philipp Müller
71c7ae6c07 docs: mention that GST_FORMAT_{PERCENT|BUFFERS} are not implemented 2009-05-18 01:00:36 +01:00
Sebastian Dröge
44ea1ac6b4 gstclock: Fix ABI breakage on 32 bit architectures
The padding of GstClock is a GstClockTime and not a
gpointer, so adding a pointer requires the padding
size to be changed depending on the pointer size.
Use an union instead.

Fixes bug #582878.
2009-05-17 10:46:39 +02:00
Thiago Santos
f2890f46a5 [gstvalue] adds safety parenthesis to macros missing them. 2009-05-15 15:26:18 -03:00
Thiago Santos
69a1a60a87 [gstutils] Adds more safety to GST_WRITE_* and GST_READ_ macros.
Adds safety ( ) to parameters in _GST_PUT and _GST_GET macros.
Fixes #582708.
2009-05-15 15:26:17 -03:00
Wim Taymans
bb8f296d45 clock: use seqlocks to parallellize readers 2009-05-15 16:14:52 +02:00
Edward Hervey
4f951e2614 Makefile.am: update for added/moved/removed files that weren't dist-ed. 2009-05-15 11:00:53 +02:00
Sebastian Dröge
bebfde7502 element: Set the originating pad as message source in gst_element_found_tags_for_pad ()
Fixes bug #582588.
2009-05-14 12:25:20 +02:00
Wim Taymans
ae08561ae6 element: add gst_element_lost_state_full()
Add a gst_element_lost_state_full() with an extra argument to control
distribution of a new base_time. We will need this for flushing step
operations.

API: GstElement::gst_element_lost_state_full()
2009-05-14 11:36:28 +02:00
Stefan Kost
39d21970b0 debugutils: show more pad-details
Show pad activation mode and pad-flags inside the pad. Write down some ideas
about how we could improve the caps layout.
2009-05-13 11:03:27 +03:00
Stefan Kost
82635ea2a7 debugutils: layout improvement
dot does not take the head/tail labels into account. For unfixed caps they get
quite large. Double the padding to make it sort of readable in more cases. Also
make normal font bigger and caps-label font smaller to increase our luck.
2009-05-13 00:32:17 +03:00
Tim-Philipp Müller
fb007e5d50 Initialise some more types in gst_init(), esp. the new enum types
Possibly fixes GObject class creation/unref race conditions when
creating the last-message string in fakesink for events with
structures that have fields with these enum types.
2009-05-12 20:58:32 +01:00
Tim-Philipp Müller
7f0b2f3d3b systemclock: remove duplicate _get_type() function for GstClockType
Remove the static gst_clock_type_get_type() function in the
systemclock code in favour of the public one in gstenumtypes.c.
2009-05-12 20:57:09 +01:00
Stefan Kost
b71014259a ghostpad: remove deprecated API
_internal_link_function() is deprecated and _iterate_internal_links_function()
is already provided.
2009-05-12 18:31:20 +03:00
Stefan Kost
5ce13775b8 parse-launch: allow specifying GstElement properties via gst_parse_bin_from_description
If deserializing a property fails, check if the value type is a string and if so
attempt to create a bin from the string value. This allows to e.g. specify
audio-sink/video-sink for playbin on gst-launch commandline.
2009-05-12 18:31:19 +03:00
Wim Taymans
2dcbe1a4d3 bufferlist: make objects opaque 2009-05-12 16:18:48 +02:00
Wim Taymans
19dc33935e bufferlist: fix a comment 2009-05-12 15:33:25 +02:00
Jonas Holmberg
22a48fb08c bufferlist: hook up the pad functions
Reuse buffer code for bufferlists. Not sure if this measurably impacts performance
for the simple buffer case, if it does after doing some benchmarks, we can
decouple it later.

Fixes #572285
2009-05-12 15:18:53 +02:00
Jonas Holmberg
d99cf4db1b bufferlist: add docs/build/debug/unittest
See #572285
2009-05-12 15:18:52 +02:00
Jonas Holmberg
27fb4ce76c bufferlist: add bufferlist code
Buffer lists are a means to manage disjoint buffers as one buffer. It's also
possible to put many of those buffers into a list.

The idea is that when support is added to various elements, we will be able to
more efficiently slice and dice buffers, reduce the amount of memcpy and also
reduce data passing overhead.

The implementation is kept simple on purpose, reusing all of the memory
management features we have for miniobjects and buffers.

Access to the bufferlist object is done with an iterator, which allows for
efficient iteration and modification of the list.

See #572285
2009-05-12 15:18:52 +02:00
Edward Hervey
6c1dce01d1 gstbuffer: copy new buffer flags when copying metadata. 2009-05-12 11:22:11 +02:00
Wim Taymans
8c26c22f2c element: fix posting of async-start messages
When an element lost its state but was busy doing a state change, still post the
async-start message with the base_time reset flag or else we might end up with
an old base_time.

this can happen when a sink is goin async to paused and then a flushing seek is
performed. This would cause the base_time to remain unmodified because the
async-start message was not sent.
2009-05-12 10:20:53 +02:00
José Alburquerque
7ff2f9233f API: Add gst_plugin_register_static_full()
This is mainly useful for bindings that need to provide
some additional user data to the registration function.

Fixes bug #545787.
2009-05-12 09:02:45 +02:00
Sebastian Dröge
ad8a35ff3e tags: API: Add functions to add single tags to GstTagList or GstTagSetter
The new functions are gst_tag_setter_add_tag_value()
and gst_tag_list_add_value()). This fixes bug #581198.
2009-05-12 09:02:44 +02:00
Sebastian Dröge
c003165b76 GstURIHandler: Use get_type_full() vmethod if specified instead of get_type()
This fixes bug #581281 and makes it easier for bindings to
implement GstURIHandlers. get_protocols_full() was already used
like this.
2009-05-12 09:02:44 +02:00
Tim-Philipp Müller
01b93c1ef2 xmlregistry: remove the old xml registry
No point in keeping it around really. Fixes #577926.
2009-05-12 00:09:58 +01:00
Tim-Philipp Müller
0b285bfa40 tags: add a tag for the container format
API: add GST_TAG_CONTAINER_FORMAT
2009-05-11 23:44:19 +01:00
Tim-Philipp Müller
06d79151c1 bin: fix debug message
Make the debug message show what's actually happening (the message
replaced here is not necessarily of the same type as the one that
replaces it).
2009-05-11 23:41:52 +01:00
Wim Taymans
b962f41ca1 GstTask: fix compilation 2009-05-12 00:34:44 +02:00
Wim Taymans
d2c5ea9a40 TaskPool: remove _set_func()
Remove the static function set on the TaskPool before _prepare() is called and
allow for assigning a function to a Task when we _push().
Update the examples
2009-05-12 00:27:38 +02:00
Wim Taymans
09368ff155 taskpool: fix a comment 2009-05-12 00:27:22 +02:00
Wim Taymans
4b604f7da6 Pad: post STREAM_STATUS_TYPE_CREATE
Post a stream-status message indicating that a new task was created so that the
application has a chance to change the properties of the task.

Fix unit test to take into account the new ref of the message.
2009-05-12 00:27:10 +02:00
Wim Taymans
02250179d9 GstTask: add methods for configuring the pool
Add getter and setter for configuring the GstTaskPool to use for a GstTask.
2009-05-12 00:26:58 +02:00
Wim Taymans
a8d2516fa6 Task: remember pool
Remember the pool we currently have our task running so that we can use it to
join the task later on.
Fix a leak of the taskpool.
2009-05-12 00:26:48 +02:00
Wim Taymans
8e2bd06c31 task: fix deadlock due to typo 2009-05-12 00:25:41 +02:00
Wim Taymans
5fdd5e0a1e GstTask: use GstTaskPool for managing threads
Use the new GstTaskPool to handle streaming threads.
2009-05-12 00:25:11 +02:00
Wim Taymans
4d326be6cf taskpool: fix docs, make push/join generic
Fix some more docs.
Make _push() return a generic id (this can be something else than a GThread in
some cases) and make _join() use that generic id.
2009-05-12 00:22:25 +02:00
Wim Taymans
aadac11ae3 taskpool: add new object to manage threads
Add a new object GstTaskPool to manage the streaming threads.
This will allow us to create and use custom configured threads.
2009-05-12 00:22:19 +02:00
Wim Taymans
2d8a22c1da Task: add method to set the priority
Add a method to configure a priority for the threads used by GstTask.
2009-05-12 00:08:35 +02:00
Wim Taymans
b59045aab9 GstTask: improve documentation
Improve the documentation for the callbacks.
2009-05-12 00:05:12 +02:00
Wim Taymans
540560a758 GstPad: install thread callbacks of the task
Install thread status callbacks on the task object of a pad and post
STREAM_STATUS messages.
2009-05-12 00:00:44 +02:00
Wim Taymans
d4a9ece0b1 message: clarify some docs 2009-05-11 23:53:52 +02:00
Wim Taymans
35eeb4864c Task: call leave_thread before signaling
Call the leave_thread callback before we signal the thread performing the _join
so that we can be sure that the listener still has valid info in the callback.
2009-05-11 23:49:19 +02:00
Wim Taymans
e72efeccd1 GstMessage: Add STREAM_STATUS message methods
Add methods to handle the stream_status message types.
2009-05-11 23:47:22 +02:00
Wim Taymans
81c0840ab0 quark: add "object" quark
Add the object quark that will be used for the STREAM_STATUS messages.
2009-05-11 23:47:06 +02:00
Wim Taymans
d52114d449 Task: remove create/join methods
Prepare for using the GstTaskPool object. We don't need the create and join
callbacks anymore, they will be handled by the pool.
2009-05-11 23:44:42 +02:00
Wim Taymans
a830dcd9c2 GstTask: add private data, fix parent_class
Use the parent class that the glib macro gave us
Actually add the private data to the task.
2009-05-11 23:30:02 +02:00
Wim Taymans
d68a20906a GstTask: hook up enter/leave/notify callbacks
Hoop up the notify/enter/leave callbacks.
2009-05-11 23:24:32 +02:00
Wim Taymans
9d8d9e0805 GstTask: allow setting callbacks
Allow setting thread callbacks that will allow us to control the threads used by
the task.
2009-05-11 23:19:53 +02:00
Wim Taymans
c3a4f5a976 GstTask: add some more docs 2009-05-11 23:04:02 +02:00
Wim Taymans
10f5429887 GstPad: use new task function
Use the new task_set_state function and actually return its result to
the caller.
2009-05-11 23:00:45 +02:00
Wim Taymans
c31c3f215f GstTask: unify task state functions
Add new gst_task_set_state() to change the state of the task instead of
duplicating the code in each function.

API: GstTask::gst_task_set_state()
2009-05-11 22:59:35 +02:00
Wim Taymans
fb3d528d1a Message: small indentation change. 2009-05-11 22:40:11 +02:00
Wim Taymans
761b0e39c1 Avoid unneeded type checks 2009-05-11 22:35:09 +02:00
Wim Taymans
ceb74fe2cf registry: avoid calling _get_name() too much
Avoid calling gst_plugin_get_name() too many times but instead cache
the value.
2009-05-11 22:35:09 +02:00
Wim Taymans
84c5db2635 Use new _ref_sink when we can 2009-05-11 22:35:09 +02:00
Wim Taymans
54401df78c gstobject: add gst_object_ref_sink
Add the gst_object_ref_sink() method to match the glib one.

API: GstObject::gst_object_ref_sink()
2009-05-11 22:35:08 +02:00
Wim Taymans
20d2734a25 gstobject: avoid type checks 2009-05-11 22:35:08 +02:00
Wim Taymans
13515a7535 gstbuffer: avoid typechecks in finalize
Avoid useless typechecking in the finalize of buffers and subbuffers.
2009-05-11 22:35:08 +02:00
Jan Schmidt
bd07633cc2 info: Support new printf extensions in glibc 2.10
The printf extension mechanism changed in glibc 2.10, and the older
register_printf_function is deprecated. Detect and use the new
mechanism where available.
2009-05-11 21:30:14 +01:00
Wim Taymans
81cadeecd2 GstBin: set PENDING_STATE correctly
Set the pending state correctly when we are going to perform an async
state_continue on the bin.
Fixes #580121
2009-04-24 19:36:22 +02:00
Stefan Kost
581ccbb581 gstdebug: compete stubs. Fixes #579177.
Avoid defines when including gstinfo.h ourself and complete stubs. Sync stub
returns with the defines.
2009-04-17 15:01:46 +03:00
Yaakov Selkowitz
eacfe25cf9 gst_init: relocatability is unnecessary on Cygwin
See #555978.
2009-04-17 11:39:59 +01:00
Brian Cameron
e6a3fd9bbb gstinfo: don't assume G_HAVE_ISO_VARARGS implies ISO C99
Makes headers C++ clean, esp. with the Sun compilers.
Fixes #567692.
2009-04-17 10:11:21 +01:00
Tim-Philipp Müller
b31896b2af GstPlugin: fix compilation if both HAVE_WIN32 and HAVE_SIGACTION are defined
Move _gst_plugin_fault_handler_is_setup into the ifdef block where it's
used. Fixes #578201.
2009-04-17 09:17:40 +01:00
Jan Schmidt
d50044dc2f docs: remove errant gtk-doc comment marker triggering a warning 2009-04-16 00:48:12 +01:00
Jan Schmidt
4c6c9c2d5b paramspecs: revert gst_param_spec_is_mutable() for release
Revert the gst_param_spec_is_mutable API for this release so we can
discuss it a bit further first.
2009-04-16 00:48:11 +01:00
Stefan Kost
659102e04a gstdebug: show enabled/disabled in configure and fix build for disabled
When its disabled, we poison some symbols to force a build error if they are
used. Dunno how useful this acually is, but we need to disable the poisoning
when we include this ourself. Also don't define some of the dummies, as they
are getting replaced with defines and that creates code that does not compile.
2009-04-15 23:35:35 +03:00
Sebastian Dröge
c09069c889 Use g_once_init_*() instead of GOnce for the enum types 2009-04-15 19:58:34 +02:00
Sebastian Dröge
484c3272c4 staticpadtemplate: Update docs of gst_static_pad_template_get_caps ()
gst_static_pad_template_get_caps () actually returns a reference to the
caps and it's cleaner to unref them after usage. The core will, however,
always hold a reference to the caps so this didn't result in a memory
leak.
2009-04-15 13:06:13 +02:00
Stefan Kost
dafde2ed66 docs: use real <note> tags as they look nice in new gtk-doc 2009-04-14 22:33:25 +03:00
David Schleef
8dd2b4b591 Fix locking in gst_param_spec_is_mutable 2009-04-14 12:21:39 -07:00
Wim Taymans
5ca6853eb1 docs: add simple doc blurb 2009-04-14 19:12:52 +02:00
Wim Taymans
004f981edb paramspecs: add note about racyness
Add a note about potential racyness in _is_mutable().
2009-04-14 19:11:44 +02:00
LRN
7e0bdbf208 info: use mutex to do console colors on windows
Use a static mutex to keep the console colors and context together when
debugging with colors on Windows.
Fixes #517231.
2009-04-14 10:32:07 +02:00
Tim-Philipp Müller
25826ffe40 docs: add Since: tags to gtk-doc chunks for new param spec API
And, for our release manager, the in-commit-message keywords
for the previous commit:
API: GST_PARAM_MUTABLE_READY
API: GST_PARAM_MUTABLE_PAUSED
API: GST_PARAM_MUTABLE_PLAYING
API: gst_param_spec_is_mutable
2009-04-13 14:27:49 +01:00
David Schleef
1ecf114c0e Add param spec flags for when a property can be changed
Adds GST_PARAM_MUTABLE* flags to indicate in which states a
property can be changed and take effect.  Fixes #571559
2009-04-12 18:45:24 -07:00
Wim Taymans
1b4b1a5b1f bin: always mark pending_async_done
When we get an ASYNC_DONE message when a state change was busy, set the
pending_async_done flag so that after the state change completes, the bin can
check if all async elements are finished. Don't only do this for the bin itself
but for all elements.

This fixes some bins in bins that simulate async state changes by posting ASYNC
messages (such as sdpparse in uridecodebin/playbin2).
2009-04-09 11:51:43 +02:00
Wim Taymans
b4e9c87fcc info: fix compilation, %08x needs an unsigned int
%08x needs an unsigned int, so give it that.
2009-04-09 11:42:48 +02:00
Tim-Philipp Müller
116c8be6bf API: add FIXME and DUMPMEM log levels and convenience macros
Two new log levels to dump FIXMEs into the log and to log data
in form of a hex dump (#578114).

API: GST_CAT_FIXME_OBJECT
API: GST_CAT_MEMDUMP_OBJECT
API: GST_CAT_FIXME
API: GST_CAT_MEMDUMP
API: GST_FIXME_OBJECT
API: GST_MEMDUMP_OBJECT
API: GST_FIXME
API: GST_MEMDUMP
2009-04-08 21:32:05 +01:00
Stefan Kost
7d0b4f10c6 docs: xref more 2009-04-08 18:13:42 +03:00
Stefan Kost
c9917a1a84 tests: remove the hacks to workaround the pad-leak 2009-04-08 17:49:18 +03:00
Stefan Kost
8892f3f4c9 padtemplate: enable code to fix the leak, now that the deps have been released
Good and ffmpeg are actually multiple releases beyond, so that this is now safe
to do.
2009-04-08 15:24:58 +03:00
Edward Hervey
a69841761b gsttaglist: Remove unused variable.
We don't need to allocate a variable if it's the return of a function call
and we only check it once.
2009-04-04 14:37:13 +02:00
Edward Hervey
759fe3452a gststructure: Only use methods used in g_* checks if glib checks are disabled 2009-04-04 14:35:34 +02:00
Sebastian Dröge
e7ccf786c3 gst: Use G_DEFINE_TYPE and friends or at least g_once_init_* in the _get_type() functions 2009-04-04 10:20:36 +02:00
Sebastian Dröge
42febffe0d gst: Use G_DEFINE_TYPE and don't call g_thread_init() from class_init
class_init is too late for calling g_thread_init() as g_thread_init()
needs to be called before any GObject function.
2009-04-04 10:18:42 +02:00
Mark Nauwelaerts
66295d508b Use g_slice_copy instead of g_slice_dup.
A (buggy) glib g_slice_dup macro may cause compiler warnings on e.g. x86_64.
2009-04-03 13:47:35 +02:00
Edward Hervey
4028fa7149 gststructure: Remove dead assignment.
'type' is never used until line 1847 where it's overwritten.
2009-04-03 12:57:24 +02:00
Edward Hervey
f68573dc42 gstbin: Remove unused variable.
The return value of gst_element_change_state isn't used after that call.
2009-04-03 12:57:24 +02:00
Edward Hervey
f096c7d4e0 pipeline: remove redundant assignment.
If that block is entered, then start_time becomes GST_CLOCK_TIME_NONE.
Since start_time is invalid, the code will enter the block at line 434 and
new_base_time will be set there.
2009-04-03 12:57:24 +02:00
Edward Hervey
9557542722 gstregistrybinary: remove variable only used for a check.
that variable isn't used anywhere else within that block.
2009-04-03 12:57:24 +02:00
Edward Hervey
971755842d Remove unused increments as detect by LLVM's CLang static analyzer. 2009-04-03 12:56:57 +02:00
Edward Hervey
00cbbc87c7 Remove unused variables detected by LLVM's Clang static analyzer. 2009-04-03 12:56:48 +02:00
Tim-Philipp Müller
01166ec0cd docs: improve API reference for gst_caps_get_structure() 2009-04-03 11:20:32 +01:00
Thomas Vander Stichele
8995a45593 docs: explain ref ownership for handle_message implementations 2009-04-02 13:32:58 +02:00
Stefan Kost
2806a409ed binaryregistry: init variable, that is referenced in error case below the fail: label 2009-03-27 17:32:29 +02:00
Wim Taymans
659e1d2dc2 clock: wakeup the async thread a bit more
Also wake up the async thread when it is doing an async wait for an entry.
2009-03-27 16:15:55 +01:00
Wim Taymans
ffc752c458 element: Fix a little debug message 2009-03-27 16:15:10 +01:00
Stefan Kost
82c9b78f86 binaryregistry: check for not reading beyond the data area. Fixes #576842
Check all reads against the end of the data region. Roll back registration of
partial reads.
2009-03-27 15:34:25 +02:00
Wim Taymans
4446f9972d clock: make UNSCHEDULED checks threadsafe
Move the checks for using an unscheduled entry from the unsafe GstClock to the
SystemClock object so that we can perform the correct locking.
fix a leak and potential deadlock then the async thread fails to start.
Sprinkle some G_LIKELY around because we can.
2009-03-26 22:05:31 +01:00
Wim Taymans
e15cf9bc12 clock: remove pending async wakeup sooner
Remove a pending async wakeup before we check if the next entry is UNSCHEDULED
because we might leave the control socket busy.
2009-03-26 21:40:20 +01:00
Peter Kjellerstedt
7be99f052b gstpoll: Corrected a documentation typo. 2009-03-26 19:33:41 +01:00
Wim Taymans
41f1a1881e clock: add some more comments. 2009-03-26 19:13:55 +01:00
Wim Taymans
16b68e7de0 clock: rework the wakeup of entries.
Keep a counter for the amount of outstanding wakeups that we produce and only
perform a write/read to the control socket when 1 or 0 respectively.
don't poll when waiting for the entries to be unblocked and clear their wakeup
counts, just act on the signal when the wakeup count is 0.
unscheduled entries will clear their wakeup count themselves.
Keep track of when we wakeup the async thread because the list of entries has
changed.
don't try to see if the list changed because we can't really know when one entry
is added multiple times.
Only wake up the async thread when we add an async entry to the head of the list
and the old entry was BUSY.
2009-03-26 18:53:02 +01:00
Jan Schmidt
31669a4819 gstpoll: Fix up documentation strings.
Note the changed behaviour of gst_poll_wait for timer GstPoll's, and
fix a couple of spelling errors.
2009-03-26 15:06:16 +00:00
Wim Taymans
df30f60048 clock: fix 2 wakeup races.
when an entry being waited on in the async thread is unscheduled, clear the
wakeup queue so we can continue waiting on other entries.
When an entry being waited on in the async thread is unlocked because an earlier
entry was added to the list, set the entry to OK again. This makes sure that
only the entries being waited on have the BUSY flag set and wake up the timer
poll when they are unscheduled.
2009-03-26 15:59:17 +01:00
Tim-Philipp Müller
ea554b1d62 registry: ignore .git directory when recursively scanning plugin paths for plugins
Saves some cycles/pandas for those of us who run uninstalled setups.
2009-03-26 14:52:00 +00:00
Tim-Philipp Müller
cc0978bd85 registry: do fsync() before close() and rename()
This helps prevent filesystem/data inconsistencies in certain
circumstances on certain filesystems (like ext4, xfs, ubifs).
Also see bug #562976.
2009-03-26 14:51:49 +00:00
Tim-Philipp Müller
c4e10b9535 API: add gst_tag_list_get_buffer{_index}
Convenience API, mostly for image tags, so people don't have to
figure out the whole GValue/GstValue thing just for this.
2009-03-26 14:21:10 +00:00
Sebastian Dröge
10bc5670a3 segment: Use g_slice_dup() now 2009-03-26 11:17:01 +01:00
Sebastian Dröge
f75fad6a70 Remove some compatibility stuff for GLib < 2.14 2009-03-26 11:08:27 +01:00
Tim-Philipp Müller
26f9f721ff API: add GST_TAG_SUBTITLE_CODEC
Yes, 'codec' isn't exactly the best word, but let's be consistent with AUDIO_CODEC
and VIDEO_CODEC (which may be 'raw' formats as well after all). Prerequisite for
bug  #576552.
2009-03-25 00:50:07 +00:00
Wim Taymans
1bd7f96497 gstutils: improve property set and convert code
Use string deserialisation instead of custom parsing code to allow for all
supported ways of specifying property values.
fixes #576582.
2009-03-24 19:33:56 +01:00
Stefan Kost
c04e3f9a03 build: define stubs when disabling gst-debug subsystem. Fixes #575922
Running configure with e.g. --disable-dst-debug was compiling out the debug
system (ABI break). Now stubs are added and only if one does e.g.
make CFLAGS="-DGST_REMOVE_DISABLED" the symbols are ommitted.
2009-03-23 16:21:58 +02:00
Tim-Philipp Müller
b62bfc573a debugging: make GST_PTR_FORMAT work for queries as well 2009-03-20 00:42:51 +00:00
Tim-Philipp Müller
0492ca71f5 API: add GST_QUERY_CAST
because we can, and for consistency.
2009-03-20 00:39:41 +00:00
Wim Taymans
b4b386a1fd gstpad: fix gst_pad_can_link
We were converting the GstPadLinkReturn to a gboolean, which is not what we want
to do.
2009-03-19 17:20:50 +01:00
Stefan Kost
a5e3baf44d docs: more info about when state changes can be async and when not. 2009-03-19 10:39:33 +02:00
Damien Lespiau
c5ee0b7c1d info: more indentation fixes
Fixes #517231.
2009-03-18 19:54:28 +01:00
Wim Taymans
d12d111fa2 info: indentation fix 2009-03-18 19:06:23 +01:00
Wim Taymans
3857d902c3 info: simply some more 2009-03-18 18:57:16 +01:00
Wim Taymans
ca33a78881 info: refactor debug colors for win32 and other
Refactor the debug line code to use as much code as possible for the win32 and
other color codings.
Update docs with new symbol.
2009-03-18 18:45:41 +01:00
Wim Taymans
0c059ad2de windows: initial commit for terminal colors 2009-03-18 17:30:12 +01:00
Zeeshan Ali (Khattak)
8af9d58ea7 gstpad: fix gst_pad_can_link()
Move the gst_pad_can_link() implementation from gstutils to gstpad and use
gst_pad_link_prepare() to make it work correctly and also check the caps.

Make the broken implementation in gstutils static.

Small cleanups in the _get_fixed_caps() function.

Fixes #575682.
2009-03-18 17:01:16 +01:00
David Adam
7d7fceced5 config.h needs to be included first, either directly or via gst_private.h
Fixes build with -Werror caused by '_FILE_OFFSET_BITS redefined' warning on
OpenSolaris where _FILE_OFFSET_BITS may be defined both in our config.h
and via stdio.h (#575695).
2009-03-17 20:41:44 +00:00
Stefan Kost
b3e56e19f5 bin: forward segment-start like segment-done if parent is also a bin, fixes #575598.
Bin collects segment-start messages and segent-done messages. it posts a
segment-done message to its parent, once it has received a segment-done for
each segment-start. Imho it should also send a segment-start if it receives the
first segment start and if parent is !=NULL. This is needed for bins in bins,
so that also higher order bins can group segment-starts and segment-dones.
Right now higher order bins will post a segment-done for each segment-done
received.
2009-03-17 12:05:33 +02:00
Stefan Kost
73953055af systemclock: these warnings are serious, give more detail in the message 2009-03-15 23:41:33 +02:00
Wim Taymans
e7245c0891 Fix indentation of .h files
--
2009-03-13 10:56:54 +01:00
Stefan Kost
c3286501b4 taglists: apply fix for replace all also to gst_tag_list_add_valist_values. Fixes #574241 2009-03-12 12:21:39 +02:00
Wim Taymans
5467c64379 docs: Improve some docs
Rename some function variables and add some Return: to make the docs more happy.
2009-03-12 10:48:21 +01:00
Stefan Kost
15e7d1e9c7 docs: fix linking to constant and functions 2009-03-12 00:41:24 +02:00
Stefan Kost
1cfc0aee17 dump2dot: ellipsize caps fields, better placement of unnegotiated caps
Long caps fields like enums are ellipsised. If caps are not negotiated, use
head- and taillabel to place them closer to the pads. Use smarter way to indent.
2009-03-11 15:27:08 +02:00
Laszlo Pandy
ce0d28fe9a dump2dot: make caps in DOT debug graphs more readable. Fixes 574484
Use a monospace font for edge labels and indent.
2009-03-11 15:27:08 +02:00
Sebastian Dröge
d307513735 padtemplate: Allow %u as conversion modifier additional to %d and %s 2009-03-11 14:11:30 +01:00
Stefan Kost
36205e7d42 logging: some additional logging for tracing caps negotiation.
Demote one log that can come quite often. Remove one fixme that is done. Apply
gst-indent changes.
2009-03-10 21:13:40 +02:00
Stefan Kost
01dfca40f1 comment: add a fixme-0.11 2009-03-10 21:13:40 +02:00
Stefan Kost
50fdaa4f25 dump2dot: don't use GST_TIME_FORMAT when building filenames. fixes #574623 2009-03-09 16:01:20 +02:00
Wim Taymans
da0060d3aa pad: call new callbacks set in the block callback
Keep track of when a new callback is installed in the callback and call the new
callback in that case.
Add unit test for checking pad blocking.
Fixes #573823.
2009-03-09 11:48:36 +01:00
Tim-Philipp Müller
2f4eba5892 docs: improve docs for gst_tag_list_get_date*()
Mention that the date value needs to be freed and how to free it.
2009-03-08 17:15:33 +00:00
Stefan Kost
fd0b4ff60b dump2dot: improve caps logging
Factor out code to describe caps. Improve formating (no \n in caps fields).
Check peer caps too and show both if they differ.
2009-03-08 00:32:43 +02:00
Stefan Kost
1ec60ae392 apidocs: markup example as highlightable example and copy same for structure
structures can be printed like we can do for caps. Mark the example so that
gtk-doc can pretty print and xref it.
2009-03-06 21:59:20 +02:00
Antoine Tremblay
fe2f12b162 GstPad: relax failure to deactivate unlinked pads
When de/activating a pad in pull mode the pad needs to de/activate the
peer pad it is connected to, failure to be able to do this in activation mode
is an error.

However if there is no peerpad, we can still deactivate the pad correctly and
assume the application will deactivate the unlinked peer pad eventually.

Fixes #574163.
2009-03-05 11:29:48 +01:00
LRN
e13168bd4b GstPoll: set the return value on windows
Make sure that the return value of the functions _read/_write_control()
return the actual result instead of always FALSE on windows.
Fixes #574211.
2009-03-05 11:02:59 +01:00
Sebastian Dröge
3c6448c64e API: Add gst_util_array_binary_search() for binary searchs on a sorted array
This will be mostly useful in all elements that have some kind of internal
seek/index table. Currently almost all of them (or even all of them)
are using a linear search although the used array is already sorted,
wasting some CPU time without good reason.

Fixes bug #573623.
2009-03-02 16:17:45 +01:00
David Schleef
a29773e4cc Bump glib requirement to 2.14
Also remove code conditional on < 2.14.
2009-02-28 11:15:29 -08:00
Stefan Kost
6911aa59be binary registry: Don't attempt to parse empty caps 2009-02-25 16:03:25 +02:00
Sebastian Dröge
70fcf4a201 registry: Set typefind factory caps to NULL instead of empty caps if they originally were NULL 2009-02-25 14:19:54 +01:00
Sebastian Dröge
fdc03c2841 registrybinary: Check if typefind factory caps are NULL before copying them 2009-02-24 15:10:15 +01:00
Alessandro Decina
d3940f520b GstPad: Add gst_pad_set_blocked_async_full
This allows connecting a GDestroyNotify for when the callback is removed/replaced.
Partially fixes #514717
2009-02-22 20:01:05 +01:00
Sebastian Dröge
5bd73d1456 Include floating point write/read functions in the docs by working around a gtk-doc bug 2009-02-22 19:05:20 +01:00
Ali Sabil
136cfb3bed Convert unref/copy functions of GstMiniObject subclasses to static inline functions
unref and copy functions are sometimes used as function
pointers for example in the case of g_hash_table_new_full
as a GDestroyNotify function.

Currently GstBuffer, GstEvent, GstMessage and GstQuery
define their respective unref and copy functions as
macros, making use of gst_mini_object_unref/copy.
This approach works very well for most cases, except
for some automatically generated bindings (currently Vala),
where the memory management semantics are defined
declaratively.

The possible solutions would be to either convert all
the macros into static inline function, or change the
signature of gst_mini_object_unref to take a void*
instead of a GstMiniObject*.

Fixes bug #572480.
2009-02-22 18:51:08 +01:00
Edward Hervey
05f3cc9391 GstBufferFlags: Add "Since: 0.10.23" for the newly added flags 2009-02-19 18:05:07 +01:00
Edward Hervey
37d95a00e4 GstBufferFlags: Add 3 new media-specific buffer flags.
Partially fixes #163577
2009-02-19 16:04:43 +01:00
Wim Taymans
4b986a4a94 Add message to request a state change
Add a GST_MESSAGE_REQUEST_STATE that can be posted by element when they would
like to have the application change the state of the pipeline. the primary use
case is to pause the pipeline when an audio mixer is mixing a higher priority
stream but it can also be used for other purposes.

Add some docs and a unit test.

Implement the REQUEST_STATE message in gst-launch.

API: gst_message_new_request_state()
API: gst_message_parse_request_state()
API: GST_MESSAGE_REQUEST_STATE
2009-02-18 15:31:55 +01:00
Wim Taymans
26f368f7e7 Clear target when the target pad disappears
When the target pad disappears (because it was explicitly unlinked or the
element was removed/unreffed) make sure we receive a notify with the unlink
function on the proxy pad and clear the target. We use a simple flag to not do
this and cause deadlocks when the target was changed explicitly using the
ghostpad functions.

Update the unit test because we now unref the target sooner (and correctly).
2009-02-16 12:58:34 +01:00
Stefan Kost
8efaf40013 docs: format and indent examples. 2009-02-15 16:40:43 +02:00
Sebastian Dröge
e74460824f taglist: API: Add HOMEPAGE tag
This tag will list a homepage for the media,
i.e. the artist's or movie's homepage.

This is different to GST_TAG_LOCATION as the latter
lists the original location of the media.

Fixes bug #571227.
2009-02-12 10:42:47 +01:00
Sebastian Dröge
c2b856e699 Replace some mentions of CVS by GIT 2009-02-08 10:28:59 +01:00
Stefan Kost
b87960ae5d binary registry: Rewrite sanity check to actualy catch something.
The previous commit was bogus, as was the check before. We just point m to the file data,
so neither it nor its members will be NULL. Better check if we have enough data.
2009-02-06 10:51:28 +02:00
Stefan Kost
4262f6c641 cleanup: remove unused variables in _class_init() and reindent. 2009-02-05 17:25:01 +02:00
Stefan Kost
1acf4f05f4 bus: remove unused set/get property functions 2009-02-05 17:05:56 +02:00
Stefan Kost
c69a262889 binary registry: comparing arrays against NULL is useless 2009-02-05 15:56:19 +02:00
Stefan Kost
2246b477bb cleanup: Either check always for internal being NULL or don't.
IMHO the ghostpad is borked if internal is NULL. So the check can go and it is
used later unchecked anyway.
2009-02-04 17:28:28 +02:00
Stefan Kost
726a2fbff6 crash: Don't crash on non existent tags. 2009-02-04 17:28:15 +02:00
Stefan Kost
9cda224a0d leak: Don't leak type name in failure cases. 2009-02-04 16:17:34 +02:00
Stefan Kost
09eb9d797d leak: don't return without calling va_end 2009-02-04 15:41:24 +02:00
Jonas Holmberg
abffdb2ac3 Implement the systemclock with gstpoll
Add a property to select the clock type, currently REALTIME and MONOTONIC when
posix timers are available.

Implement the systemclock with GstPoll instead of GCond. This allows us to
schedule timeouts with nanosecond precission on newer kernels and with ppoll
support. It's also resilient to changes to the systemclock because of NTP or
similar.
2009-02-03 18:04:46 +01:00
Wim Taymans
5cfb02af4a GstPoll: add methods to use gstpoll for timeouts
Add a special timer mode in GstPoll that makes it only use the control socket
with a timeout to schedule timeouts. Also add a pair of methods to wakeup the
timeout thread.
API: GstPoll::gst_poll_new_timer()
API: GstPoll::gst_poll_write_control()
API: GstPoll::gst_poll_read_control()
2009-02-03 17:49:02 +01:00
Peter Kjellerstedt
846d56b865 gstregistrybinary: Make it compile with GST_DISABLE_GST_DEBUG. 2009-02-02 14:19:57 +01:00
Tim-Philipp Müller
b4645e277b Remove broken class to interface cast macros from GstUriHandler and GstImplementsInterface headers
Remove class-to-interface-struct cast macros which don't work,
don't make sense, and in some cases wouldn't even compile if
used. Removal should be ok seeing that code which uses any of
these is broken and bound to crash. Fixes #565607.

API: remove GST_IMPLEMENTS_INTERFACE_CLASS
API: remove GST_IS_IMPLEMENTS_INTERFACE_CLASS
API: remove GST_URI_HANDLER_CLASS
2009-01-30 18:25:39 +00:00
Jan Schmidt - Sun Microsystems - Dublin Ireland
919b245809 Fix compilation warning with Forte. 2009-01-30 16:33:07 +00:00
Sebastian Dröge
1af5d201fc Allocate everything that is written to the registry with g_malloc0()
Allocate every structure that is directly written to the binary
registry with g_malloc0(). Otherwise some parts of it will be
uninitialized (struct padding because of alignment, etc) and
valgrind will complain about it.
2009-01-30 10:31:30 +01:00
Jan Schmidt
a626dff72c Make sure to take a copy of the strings we're going to free later. 2009-01-29 15:54:45 +00:00
Stefan Kost
35312121cf Improve the docs for gst_clock_id_wait_async().
Its mentioned in the section docs, but lets repeat at the function docs that the callback can be invoked from any thread.
2009-01-27 23:14:49 +02:00
Wim Taymans
0f55cf13b4 Avoid unneeded reads from the control socket
Add a new variable that keeps track of the status of the control socket. This
allows us to avoid doing a read() on the control socket when we did not write
anything to it.
Fixes #568438.
2009-01-26 12:52:12 +01:00
Stefan Kost
24635e7f5a Add more debug logging for failure cases. 2009-01-25 22:17:31 +02:00
Stefan Kost
f963f7f14d Document that GST_PLUGIN_DEFINE macros use PACKAGE define. Fixes #559722.
PACKAGE is defined by autofoo. If people use something different, they might want to define it themself.
2009-01-25 22:11:32 +02:00
Brian Cameron
0bf1bd0db0 Fix linking failures on Solaris. Fixes bug #568481.
Link libgstreamer with $(LIBM) as it uses math functions.

Add a configure check for socket and nsl library and add
them to LIBS if they're found. This is needed on Solaris
for socket() and gethostbyname().
2009-01-23 09:54:53 +01:00
Wim Taymans
809372066a Allow adding a typefinder without a typefind function so that it can be used
to map the caps to the extension. See #566661.
2009-01-21 12:45:45 +01:00
Wim Taymans
ae76b3d606 do not call the unlink function on the target pad when the ghostpad
is unlinked.
Add some unit tests for this behaviour.
Fixes #566936.
2009-01-21 12:21:49 +01:00
Tim-Philipp Müller
0ee5e36cfb gst/gstbus.c: Fix order of members in GstBusSource structure - the first member must be the parent structure ie. GSou...
Original commit message from CVS:
* gst/gstbus.c: (gst_bus_set_main_context), (gst_bus_create_watch):
Fix order of members in GstBusSource structure - the first member
must be the parent structure ie. GSource. Should make bus sources
attached to non-default main contexts work in all cases now (ie.
primarily in cases where the callback has a non-NULL user data
argument). Fixes #562170.
* tests/check/gst/gstbus.c: (test_custom_main_context):
Add unit test for the above, based on code by
Justin Karneges <justin at affinix com>.
2009-01-17 21:04:41 +00:00
Jonas Holmberg
732ff5f6fd gst/gstpad.h: A small documentation fix.
Original commit message from CVS:
Patch by: Jonas Holmberg <jonas dot holmberg at axis dot com>
* gst/gstpad.h:
A small documentation fix.
2009-01-15 10:04:37 +00:00
Sebastian Dröge
18eb11db60 gst/gstutils.h: Initialize g_once_init* data with 0. Fixes bug #567225.
Original commit message from CVS:
* gst/gstutils.h:
Initialize g_once_init* data with 0. Fixes bug #567225.
2009-01-11 09:46:52 +00:00
Stefan Kost
291c2822f8 gst/gst.c: Create a registry if there is none also when the option for gst-disable-registry-update has been selected....
Original commit message from CVS:
* gst/gst.c:
Create a registry if there is none also when the option for
gst-disable-registry-update has been selected. Fixes #567002
2009-01-08 13:41:19 +00:00
Tim-Philipp Müller
b8b0c80b29 gst/gst.c: Ref new enum type in gst_init.
Original commit message from CVS:
* gst/gst.c: (init_post):
Ref new enum type in gst_init.
* win32/common/libgstreamer.def:
Add recently-added API.
2009-01-06 18:10:22 +00:00
Tim-Philipp Müller
2ae03ba72f Add API for making a GStreamer plugin 'dependent' on external files, directories or environment variables, so that GS...
Original commit message from CVS:
* docs/gst/gstreamer-sections.txt::
* gst/gst_private.h: (GstPluginDep), (_GstPluginPrivate):
* gst/gstplugin.c: (gst_plugin_init), (gst_plugin_finalize),
(gst_plugin_class_init), (gst_plugin_list_free),
(gst_plugin_ext_dep_get_env_vars_hash),
(_priv_plugin_deps_env_vars_changed),
(gst_plugin_ext_dep_extract_env_vars_paths),
(gst_plugin_ext_dep_get_hash_from_stat_entry),
(gst_plugin_ext_dep_direntry_matches),
(gst_plugin_ext_dep_scan_dir_and_match_names),
(gst_plugin_ext_dep_scan_path_with_filenames),
(gst_plugin_ext_dep_get_stat_hash),
(_priv_plugin_deps_files_changed), (gst_plugin_ext_dep_free),
(gst_plugin_ext_dep_strv_equal), (gst_plugin_ext_dep_equals),
(gst_plugin_add_dependency), (gst_plugin_add_dependency_simple):
* gst/gstplugin.h: (GstPluginPrivate), (GstPluginFlags),
(GST_PLUGIN_DEPENDENCY_FLAG_NONE),
(GST_PLUGIN_DEPENDENCY_FLAG_RECURSE),
(GST_PLUGIN_DEPENDENCY_FLAG_PATHS_ARE_DEFAULT_ONLY),
(GST_PLUGIN_DEPENDENCY_FLAG_FILE_NAME_IS_SUFFIX),
(GstPluginDependencyFlags), (GstPluginFilter):
* gst/gstregistry.c: (gst_registry_scan_path_level):
* gst/gstregistrybinary.c: (gst_registry_binary_save_feature),
(gst_registry_binary_save_plugin_dep),
(gst_registry_binary_save_plugin),
(gst_registry_binary_load_feature),
(gst_registry_binary_load_plugin_dep_strv),
(gst_registry_binary_load_plugin_dep),
(gst_registry_binary_load_plugin):
* gst/gstregistrybinary.h: (GST_MAGIC_BINARY_VERSION_STR),
(GstBinaryPluginElement), (_GstBinaryDep), (GstBinaryDep):
* gst/gstregistryxml.c: (gst_registry_xml_save_plugin):
Add API for making a GStreamer plugin 'dependent' on external files,
directories or environment variables, so that GStreamer knows when
it needs to re-load GStreamer plugins that wrap other plugin systems.
Fixes bug #350477.
API: add gst_plugin_add_dependency()
API: add gst_plugin_add_dependency_simple()
2009-01-06 17:58:59 +00:00
Wim Taymans
6766b6a4a2 gst/gstbus.c: The lock order should be maincontext > OBJECT_LOCK so we need to release the object lock when waking up...
Original commit message from CVS:
* gst/gstbus.c: (gst_bus_wakeup_main_context):
The lock order should be maincontext > OBJECT_LOCK so we need to release
the object lock when waking up the mainloop to avoid deadlocks.
2009-01-05 15:41:00 +00:00
Wim Taymans
23bdf5c9fe gst/gstbin.c: Use an iterator to set the clock and the index so that we can release the object lock appropriately. Fi...
Original commit message from CVS:
* gst/gstbin.c: (gst_bin_set_index_func), (gst_bin_set_clock_func),
(gst_bin_change_state_func):
Use an iterator to set the clock and the index so that we can release
the object lock appropriately. Fixes #566393.
2009-01-05 10:14:28 +00:00
Edward Hervey
ab1921ffc3 gst/gstindex.c: Add a debugging category for GstIndex, first little step in making indexing top-notch.
Original commit message from CVS:
* gst/gstindex.c: (gst_index_get_type):
Add a debugging category for GstIndex, first little step in making
indexing top-notch.
2009-01-03 18:16:54 +00:00
Edward Hervey
334ad4c328 gst/: Assign debug statements to relevant categories instead of the 'default' category so they don't get lost in debu...
Original commit message from CVS:
* gst/gstelement.c: (gst_element_message_full),
(gst_element_pads_activate):
* gst/gstobject.c: (gst_object_dispatch_properties_changed):
* gst/gstutils.c: (gst_pad_proxy_getcaps), (gst_pad_proxy_setcaps),
(gst_pad_add_data_probe_full), (gst_pad_add_event_probe_full),
(gst_pad_add_buffer_probe_full), (gst_pad_remove_data_probe),
(gst_pad_remove_event_probe), (gst_pad_remove_buffer_probe):
Assign debug statements to relevant categories instead of the 'default'
category so they don't get lost in debugging.
2009-01-03 18:10:08 +00:00
Stefan Kost
7dd8b92448 gst/gstdebugutils.c: Add some ideas, how to make the graph smaller.
Original commit message from CVS:
* gst/gstdebugutils.c:
Add some ideas, how to make the graph smaller.
* gst/gstutils.c:
Add a comment from a debug session.
* libs/gst/base/gstbasetransform.c:
Log more context.
* libs/gst/controller/gstinterpolationcontrolsource.c:
Indet.
* plugins/elements/gstcapsfilter.c:
Fix typo in docs.
2009-01-01 21:27:06 +00:00
Tim-Philipp Müller
428ead89b8 gst/gstbus.c: Make GstBusSource work with non-default main contexts (#562170).
Original commit message from CVS:
* gst/gstbus.c: (gst_bus_dispose), (gst_bus_get_property),
(gst_bus_wakeup_main_context), (gst_bus_set_main_context),
(gst_bus_post), (gst_bus_source_prepare), (gst_bus_source_finalize),
(gst_bus_create_watch):
Make GstBusSource work with non-default main contexts (#562170).
* tests/check/gst/gstbus.c: (message_func_eos), (message_func_app),
(test_watch), (test_watch_with_custom_context), (gst_bus_suite):
Add test case for GstBusSource with a non-default main context.
* tests/check/libs/.cvsignore:
Ignore more.
2008-12-27 17:41:11 +00:00
Tim-Philipp Müller
13089a438a gst/gstregistrybinary.c: Wrap multi-line macros in G_STMT_{START|END}.
Original commit message from CVS:
* gst/gstregistrybinary.c: (unpack_element), (unpack_const_string),
(unpack_string)::
Wrap multi-line macros in G_STMT_{START|END}.
2008-12-27 16:23:12 +00:00
Sebastian Dröge
9b65eb6838 API: Add URI query type. This is useful to query the URI of a sink/source element and can be used by demuxers that ne...
Original commit message from CVS:
* docs/gst/gstreamer-sections.txt:
* gst/gstquark.c:
* gst/gstquark.h:
* gst/gstquery.c: (gst_query_new_uri), (gst_query_set_uri),
(gst_query_parse_uri):
* gst/gstquery.h:
API: Add URI query type. This is useful to query the URI
of a sink/source element and can be used by demuxers that
need to get data from other files.
This query should go upstream by default.
Fixes bug #562949.
* plugins/elements/gstfdsink.c: (gst_fd_sink_query):
* plugins/elements/gstfdsrc.c: (gst_fd_src_class_init),
(gst_fd_src_query):
* plugins/elements/gstfilesink.c: (gst_file_sink_query):
* plugins/elements/gstfilesrc.c: (gst_file_src_class_init),
(gst_file_src_query):
Implement URI query.
2008-12-20 17:33:44 +00:00
Alessandro Decina
1b13418a0a Don't forward gst_pad_set_caps() on a source ghostpad to its target.
Original commit message from CVS:
* gst/gstghostpad.c:
* tests/check/gst/gstghostpad.c:
Don't forward gst_pad_set_caps() on a source ghostpad to its target.
That would cause the ghostpad to emit notify::caps two times (fist
from gst_pad_set_caps() and after from on_src_target_notify()).
2008-12-19 15:11:06 +00:00
Alessandro Decina
c0a2c5839e In a source ghostpad, when caps are changed in the target pad, the change needs to be reflected in the ghostpad.
Original commit message from CVS:
* gst/gstghostpad.c:
* tests/check/gst/gstghostpad.c:
In a source ghostpad, when caps are changed in the target pad, the
change needs to be reflected in the ghostpad.
Fixes #564863.
2008-12-17 16:16:45 +00:00
Sebastian Dröge
33239dded7 gst/gstutils.c: Add FIXME for 0.11 to set the pad as message source and not the element. Otherwise it's impossible to...
Original commit message from CVS:
* gst/gstutils.c: (gst_element_found_tags_for_pad):
Add FIXME for 0.11 to set the pad as message source and not
the element. Otherwise it's impossible to detect for which
pad the tags were found without adding an event probe
or something similar to the pad.
2008-12-17 09:37:47 +00:00
Stefan Kost
0961f05009 Rename api added in previous commit and add since tag to docs.
Original commit message from CVS:
* docs/gst/gstreamer-sections.txt:
* gst/gsttagsetter.c:
* gst/gsttagsetter.h:
Rename api added in previous commit and add since tag to docs.
API: gst_tag_setter_reset_tags()
2008-12-16 15:51:52 +00:00
Stefan Kost
2e25b024cc Add function to reset tagsetter for element reuse.
Original commit message from CVS:
* docs/gst/gstreamer-sections.txt:
* gst/gsttagsetter.c:
* gst/gsttagsetter.h:
Add function to reset tagsetter for element reuse.
API: gst_tag_setter_flush()
2008-12-16 14:05:40 +00:00
Stefan Kost
4a162d56ab gst/gsttaglist.c: Avoid copy of empty taglist.
Original commit message from CVS:
* gst/gsttaglist.c:
Avoid copy of empty taglist.
2008-12-16 09:37:53 +00:00
Stefan Kost
f28a2a6cfc More complete unit tests. Fix handling of empty taglists (they were not merged before).
Original commit message from CVS:
* gst/gsttaglist.c:
* tests/check/gst/gsttag.c:
More complete unit tests. Fix handling of empty taglists (they were
not merged before).
2008-12-16 09:23:21 +00:00
Stefan Kost
f085768807 gst/: Update GstTagSetter and GstTagMergeMode documentation. Mention that tags can come from events and from applicat...
Original commit message from CVS:
* gst/gsttaglist.h:
* gst/gsttagsetter.c:
Update GstTagSetter and GstTagMergeMode documentation. Mention
that tags can come from events and from application. Fix example.
2008-12-16 07:07:36 +00:00
Sebastian Dröge
4a19260c75 gst/gstutils.c: Fix a caps memory leak introduced by the last change.
Original commit message from CVS:
* gst/gstutils.c: (gst_element_get_compatible_pad):
Fix a caps memory leak introduced by the last change.
2008-12-09 16:23:58 +00:00
Sebastian Dröge
629b2a910b gst/gstutils.c: Check if the caps of the pads are compatible before returning a pad and claiming it is compatible. Th...
Original commit message from CVS:
* gst/gstutils.c: (gst_element_get_compatible_pad):
Check if the caps of the pads are compatible before returning
a pad and claiming it is compatible. This, among other things,
fixes a bug with gst-launch where an incompatible pad is chosen
and linking fails. Fixes bug #544003.
2008-12-09 15:45:36 +00:00
David Schleef
e716f92dd7 gst/gst.c: Search for plugins on win32 based on the location of the gstreamer DLL. Fixes #548786
Original commit message from CVS:
* gst/gst.c:
Search for plugins on win32 based on the location of the
gstreamer DLL.  Fixes #548786
2008-12-05 20:32:03 +00:00
이문형
67edb154e5 gst/gstpoll.c: Adds support for FD_CONNECT event (win32). See #562258.
Original commit message from CVS:
Patch by: 이문형 <iwings at gmail dot com>
* gst/gstpoll.c: (gst_poll_fd_ctl_write), (gst_poll_fd_has_error):
Adds support for FD_CONNECT event (win32). See #562258.
2008-11-27 11:12:30 +00:00
Simon Holm Thøgersen
9c15d8efec gst/gstregistry.c: Reduce the number of stat() calls for every file from three times to one time. Fixes bug #560360.
Original commit message from CVS:
Patch by: Simon Holm Thøgersen <odie at cs dot aau dot dk>
* gst/gstregistry.c: (gst_registry_scan_path_level):
Reduce the number of stat() calls for every file from three times
to one time. Fixes bug #560360.
2008-11-24 09:59:07 +00:00
Wim Taymans
ede1e01d13 gst/gstpad.c: Avoid getting the acceptcaps function too early.
Original commit message from CVS:
* gst/gstpad.c: (gst_pad_accept_caps):
Avoid getting the acceptcaps function too early.
2008-11-21 16:48:48 +00:00
Michael Smith
8b1ed490b3 gst/gstregistrybinary.c: In win32 codepath, if we fail to write the registry, create the directory for it and try aga...
Original commit message from CVS:
* gst/gstregistrybinary.c:
In win32 codepath, if we fail to write the registry, create the
directory for it and try again, matching the behaviour in non-win32
codepaths.
2008-11-20 20:44:56 +00:00
Wim Taymans
82479761f1 gst/gstquery.*: Add GstQueryType for custom queries instead of having to use the not-so-very-convenient registration ...
Original commit message from CVS:
* gst/gstquery.c:
* gst/gstquery.h:
Add GstQueryType for custom queries instead of having to use the
not-so-very-convenient registration infrastructure to register new
types.
2008-11-20 10:35:50 +00:00
Andrew Feren
604382bfb5 gst/gstobject.c: Unref the GEnumClass after usage again. Fixes bug #561501.
Original commit message from CVS:
Patch by: Andrew Feren <acferen at yahoo dot com>
* gst/gstobject.c: (gst_object_default_deep_notify):
Unref the GEnumClass after usage again. Fixes bug #561501.
2008-11-19 12:20:03 +00:00
Wim Taymans
9184d9ee3c gst/gstbin.*: Add do-latency signal with the old default fallback implementation. This allows for custom latency calc...
Original commit message from CVS:
* gst/gstbin.c: (_gst_boolean_accumulator), (gst_bin_class_init),
(gst_bin_recalculate_latency), (gst_bin_do_latency_func),
(gst_bin_change_state_func):
* gst/gstbin.h:
Add do-latency signal with the old default fallback implementation. This
allows for custom latency calculations for when the default is not
sufficient.
API: GstBin::do-latency signal.
2008-11-19 12:06:41 +00:00
Wim Taymans
c311f2153a Add method to recalculate and redistribute the latency on a bin.
Original commit message from CVS:
* docs/gst/gstreamer-sections.txt:
* gst/gstbin.c: (gst_bin_recalculate_latency),
(gst_bin_change_state_func):
* gst/gstbin.h:
Add method to recalculate and redistribute the latency on a bin.
API: gst_bin_recalculate_latency().
2008-11-18 09:58:33 +00:00
Wim Taymans
cc5c8784cb gst/gstbuffer.h: Document the free_func.
Original commit message from CVS:
* gst/gstbuffer.h:
Document the free_func.
2008-11-18 09:52:41 +00:00
Stefan Kost
d27aea0391 gst/gstvalue.c: Don't crash if either of the string GValues is empty.
Original commit message from CVS:
* gst/gstvalue.c:
Don't crash if either of the string GValues is empty.
2008-11-17 21:25:39 +00:00
Sebastian Dröge
e79e2061ae gst/gstutils.h: Add G_GNUC_PURE to gst_util_uint64_scale* and the double<->uint64 conversion functions.
Original commit message from CVS:
* gst/gstutils.h:
Add G_GNUC_PURE to gst_util_uint64_scale* and the double<->uint64
conversion functions.
2008-11-17 04:49:06 +00:00
Wim Taymans
3cc67ebab7 gst/gstbuffer.c: Avoid costly typechecking for trivially correct pointers.
Original commit message from CVS:
* gst/gstbuffer.c: (gst_buffer_finalize):
Avoid costly typechecking for trivially correct pointers.
* gst/gstpoll.c: (gst_poll_wait):
Add some G_LIKELY here and there.
* libs/gst/base/gstadapter.c: (gst_adapter_push):
Add some debug info.
2008-11-13 18:09:45 +00:00
Sebastian Dröge
681e4d01c8 gst/gstregistrybinary.*: Don't write and check a CRC for the binary registry file. It's guaranteed that the registry ...
Original commit message from CVS:
* gst/gstregistrybinary.c: (gst_registry_binary_write_chunk),
(gst_registry_binary_initialize_magic),
(gst_registry_binary_write_cache),
(gst_registry_binary_check_magic):
* gst/gstregistrybinary.h:
Don't write and check a CRC for the binary registry file. It's
guaranteed that the registry is completely written (it's first written
to a temporary file and then moved) and if the registry was corrupted
by some hardware failure we would have bigger problems.
Bump binary registry version to 0.10.21.1 for this as it's an
incompatible change and to ensure that the registry gets rebuild
after the update.
This saves some milliseconds for reading/writing the registry.
Fixes bug #560399.
2008-11-12 10:39:25 +00:00
Wim Taymans
7f987200b5 gst/gstvalue.c: Reorganize some more, be more conservative with the GST_TYPE_ARRAY not being fixed and inline the tri...
Original commit message from CVS:
* gst/gstvalue.c: (gst_type_is_fixed), (gst_value_is_fixed):
Reorganize some more, be more conservative with the GST_TYPE_ARRAY not
being fixed and inline the trivial check.
2008-11-06 15:37:16 +00:00
Wim Taymans
18aeb9a41e gst/gstcaps.c: Callgrind micro optimisations.
Original commit message from CVS:
* gst/gstcaps.c: (gst_caps_copy), (_gst_caps_free),
(gst_caps_merge_structure), (gst_caps_get_structure),
(gst_caps_copy_nth), (gst_caps_set_simple),
(gst_caps_set_simple_valist), (gst_caps_is_fixed),
(gst_caps_is_equal_fixed), (gst_caps_intersect),
(gst_caps_subtract), (gst_caps_normalize), (gst_caps_do_simplify),
(gst_caps_to_string):
Callgrind micro optimisations.
Avoid array bounds checks and force inline of trivial function.
* gst/gstobject.c: (gst_object_set_name_default):
-1 is equivalent to letting glib to the strlen but then there is more
room for optimisations and it's not our fault.
* gst/gststructure.c: (gst_structure_id_empty_new_with_size):
no need to clear the array, we're cool.
* gst/gstvalue.c: (gst_type_is_fixed), (gst_value_is_fixed):
The most common _is_fixed() check is done on fundamental glib base
types so we check this first instead of doing a huge amount of
useless GST_TYPE_ARRAY calls.
2008-11-06 15:09:34 +00:00
Wim Taymans
812640dd18 gst/gstevent.h: Add a SKIP seek flag for use with advanced trickmodes.
Original commit message from CVS:
* gst/gstevent.h:
Add a SKIP seek flag for use with advanced trickmodes.
API: GstSeekFlags::GST_SEEK_FLAG_SKIP
2008-11-06 12:03:17 +00:00
Wim Taymans
209c57085c gst/gststructure.c: No need to memset, we can clear the value ourselves.
Original commit message from CVS:
* gst/gststructure.c: (gst_structure_id_empty_new_with_size):
No need to memset, we can clear the value ourselves.
* gst/gstvalue.c: (gst_type_is_fixed),
(gst_value_get_compare_func):
Some optimisations from a few callgrind sessions:
When checking if a type is fixed, check for trivial fundamental types
first before checking types for which we need to get the type followed
by the heavy duty type checks, this reduces the amount of
g_type_fundamental() calls a lot.
When getting the compare function, first check for our registered types.
If that fails, do the heavy duty g_type_is_a() checks, reduces the
amount of g_type_is_a() considerably.
2008-11-05 16:57:35 +00:00
Wim Taymans
16e6c3ef96 gst/gstbin.c: Get the seqnum before we dispose the message.
Original commit message from CVS:
* gst/gstbin.c: (gst_bin_handle_message_func):
Get the seqnum before we dispose the message.
2008-11-04 18:10:04 +00:00
Wim Taymans
0a71170006 Copy seqnums from events to messages so that they can all be related back to eachother.
Original commit message from CVS:
* gst/gstbin.c: (bin_handle_async_start),
(gst_bin_handle_message_func), (gst_bin_query):
* libs/gst/base/gstbasesink.c: (gst_base_sink_render_object),
(gst_base_sink_event), (gst_base_sink_change_state):
* libs/gst/base/gstbasesrc.c: (gst_base_src_perform_seek),
(gst_base_src_loop), (gst_base_src_change_state):
Copy seqnums from events to messages so that they can all be related
back to eachother.
2008-11-04 15:56:55 +00:00
Andy Wingo
1f1d642981 gst/gstutils.c (gst_util_seqnum_next): Refactor for clarity.
Original commit message from CVS:
2008-11-04  Andy Wingo  <wingo@pobox.com>

* gst/gstutils.c (gst_util_seqnum_next): Refactor for clarity.

Also add API: to previous changelog entry.
2008-11-04 13:56:37 +00:00
Andy Wingo
5f5fbbdd7d Add sequence numbers to events and messages. See #559250.
Original commit message from CVS:
2008-11-04  Andy Wingo  <wingo@pobox.com>

Add sequence numbers to events and messages. See #559250.

* gst/gstutils.c (gst_util_seqnum_next, gst_util_seqnum_compare):
New functions.

* gst/gstevent.h:
* gst/gstevent.c (_gst_event_copy, gst_event_new): Initialize new
events with a new sequence number, and copy it when copying.
(gst_event_get_seqnum, gst_event_set_seqnum): Accessors for an
event's sequence number.

* gst/gstmessage.h:
* gst/gstmessage.c (_gst_message_copy, gst_message_new_custom):
(gst_event_get_seqnum, gst_event_set_seqnum): As with events, so
with messages.

* docs/gst/gstreamer-sections.txt: Add new functions to the docs.
2008-11-04 12:22:53 +00:00
Stefan Kost
1d61cb0381 gst/gstregistrybinary.c: Don't bother with the GTimer if we don't output the results.
Original commit message from CVS:
* gst/gstregistrybinary.c:
Don't bother with the GTimer if we don't output the results.
2008-11-03 12:29:10 +00:00
Stefan Kost
0d430a59ef gst/gstregistrybinary.c: Oh my, studip, stupid me. Remove double stat() call.
Original commit message from CVS:
* gst/gstregistrybinary.c:
Oh my, studip, stupid me. Remove double stat() call.
2008-10-31 15:54:44 +00:00
Stefan Kost
5b29f0a1cc gst/gstpreset.c: Use g_unlink instead of unlink.
Original commit message from CVS:
* gst/gstpreset.c:
Use g_unlink instead of unlink.
* gst/gststructure.c:
Use glib type.
* gst/gstutils.c:
Add a FIXME:.
* gst/gsttaglist.c:
* gst/gsttypefind.c:
* gst/gstvalue.c:
Formatting & whitespaces.
2008-10-31 14:24:49 +00:00
Stefan Kost
588ab506b9 gst/: Use g_unlink() as none of these are directories.
Original commit message from CVS:
* gst/gstregistrybinary.c:
* gst/gstregistryxml.c:
Use g_unlink() as none of these are directories.
2008-10-30 14:15:14 +00:00
Wim Taymans
d0b44d1578 gst/gstpipeline.c: Some more comments.
Original commit message from CVS:
* gst/gstpipeline.c: (gst_pipeline_provide_clock_func):
Some more comments.
2008-10-29 17:04:50 +00:00
Wim Taymans
d2e5ffde24 gst/gstsegment.c: Set the last_stop to a more meaningful position when configuring the segment. ie. the start/stop of...
Original commit message from CVS:
* gst/gstsegment.c: (gst_segment_set_newsegment_full):
Set the last_stop to a more meaningful position when configuring the
segment. ie. the start/stop of the segment or clipped against the
updated segment boundaries.
* tests/check/gst/gstsegment.c: (GST_START_TEST):
Add some unit tests for the last_stop.
2008-10-23 09:49:07 +00:00
Sebastian Dröge
5644be89d7 API: Move float endianness conversion macros from libgstfloatcast to core as it's useful in general, even in core. Fi...
Original commit message from CVS:
* docs/gst/gstreamer-sections.txt:
* gst/gstutils.h:
API: Move float endianness conversion macros from libgstfloatcast
to core as it's useful in general, even in core. Fixes bug #555196.
This adds GDOUBLE_FROM_BE, GDOUBLE_FROM_LE, GDOUBLE_TO_BE,
GDOUBLE_TO_LE, GDOUBLE_SWAP_LE_BE, GFLOAT_FROM_BE, GFLOAT_FROM_LE,
GFLOAT_TO_BE, GFLOAT_TO_LE, GFLOAT_SWAP_LE_BE.
Also add GST_READ_ and GST_WRITE_ macros for floats and doubles:
GST_READ_FLOAT_LE, GST_READ_FLOAT_BE, GST_READ_DOUBLE_LE,
GST_READ_DOUBLE_BE, GST_WRITE_FLOAT_LE, GST_WRITE_FLOAT_BE,
GST_WRITE_DOUBLE_LE, GST_WRITE_DOUBLE_BE.
2008-10-23 07:09:21 +00:00
Wim Taymans
b340b510ce gst/gstpad.c: When we use gst_pad_alloc_buffer() without wanting to set the caps we also don't need to check if the c...
Original commit message from CVS:
* gst/gstpad.c: (gst_pad_configure_src):
When we use gst_pad_alloc_buffer() without wanting to set the caps we
also don't need to check if the caps are compatible because the caller
presumably is going to perform its own custom checks. Fixes some cases
where basetransform elements would error out when it was not needed.
2008-10-20 13:32:07 +00:00
Tim-Philipp Müller
1be929a4b6 gst/gstquark.c: Fix printf format warning.
Original commit message from CVS:
* gst/gstquark.c: (_priv_gst_quarks_initialize):
Fix printf format warning.
2008-10-14 17:10:43 +00:00
Wim Taymans
97ec47cabb docs/design/part-TODO.txt: Remove item from the todo list because it was fixed with the latency state change rewrites.
Original commit message from CVS:
* docs/design/part-TODO.txt:
Remove item from the todo list because it was fixed with the latency
state change rewrites.
* docs/design/part-seeking.txt:
* docs/design/part-segments.txt:
Update some docs.
* gst/gstevent.c: (gst_event_new_new_segment_full),
(gst_event_parse_new_segment_full), (gst_event_new_buffer_size),
(gst_event_parse_buffer_size), (gst_event_new_qos),
(gst_event_parse_qos), (gst_event_new_seek),
(gst_event_parse_seek), (gst_event_new_latency),
(gst_event_parse_latency):
Use quarks to construct and parse events.
* gst/gstquark.c: (_priv_gst_quarks_initialize):
* gst/gstquark.h:
Add some more quarks to the table.
Emit a warning when the quark tables are not in sync.
* tests/check/gst/gstbus.c: (GST_START_TEST):
Add an assert.
2008-10-13 17:19:25 +00:00
Wim Taymans
85de653640 gst/gstbus.c: Fix deadlock, g_source_get_id() cannot be called in finalize.
Original commit message from CVS:
* gst/gstbus.c: (gst_bus_source_finalize),
(gst_bus_add_watch_full_unlocked), (gst_bus_add_watch_full),
(gst_bus_enable_sync_message_emission),
(gst_bus_disable_sync_message_emission),
(gst_bus_add_signal_watch_full), (gst_bus_remove_signal_watch):
Fix deadlock, g_source_get_id() cannot be called in finalize.
Keep track of the watch source by keeping a pointer to the source object
instead.
Use the bus lock to protect access to the pointer to the current
watch source.
2008-10-13 10:50:17 +00:00
Olivier Crete
882c997103 gst/gstbus.c: Only allow one bus watch to be set at a time. This is necessary because the dispatcher pops the message...
Original commit message from CVS:
Base on Patch by: Olivier Crete <tester at tester dot ca>
* gst/gstbus.c: (gst_bus_source_finalize),
(gst_bus_add_watch_full), (gst_bus_add_signal_watch_full):
Only allow one bus watch to be set at a time. This is necessary
because the dispatcher pops the message from the bus and the second
watcher will then get NULL or the next message (and the first won't
get this next message then, etc). If more than one "watcher" is
required signal watches should be used. Fixes bug #526044.
2008-10-13 09:22:22 +00:00
Sebastian Dröge
e6543e71ef gst/gstxml.c: Clarify that the save_thyself() and restore_thyself() virtual functions of GstObject need to be overrid...
Original commit message from CVS:
* gst/gstxml.c:
Clarify that the save_thyself() and restore_thyself() virtual
functions of GstObject need to be overriden, not
gst_object_(save|restore)_thyself() which is impossible.
Fixes bug #555700.
2008-10-10 15:38:06 +00:00
Wim Taymans
401cc7fe6a gst/gstpad.c: Revert a patch from 21 months ago that broke caps negotiation in pull mode. Basically, having a buffer ...
Original commit message from CVS:
* gst/gstpad.c: (gst_pad_get_range), (gst_pad_pull_range):
Revert a patch from 21 months ago that broke caps negotiation in pull
mode. Basically, having a buffer pass over a pad will trigger the
setcaps function when caps change, just like in push mode.
2008-10-10 15:27:37 +00:00
Wim Taymans
bc8e367885 gst/gstbin.c: The message src can be NULL, don't try to print the object names in that case.
Original commit message from CVS:
* gst/gstbin.c: (gst_bin_remove_func), (update_degree),
(gst_bin_handle_message_func):
The message src can be NULL, don't try to print the object names in that
case.
* libs/gst/base/gstbasesink.c: (gst_base_sink_pad_activate):
Add some more debug info.
* tests/check/pipelines/simple-launch-lines.c: (run_pipeline),
(GST_START_TEST):
Add some debug.
Fix the test, pull based sinks go ASYNC to PAUSED, just like other
scheduling modes.
2008-10-10 10:38:12 +00:00
Wim Taymans
3245d41e16 gst/gstpipeline.c: Release the object lock before trying to flush the bus.
Original commit message from CVS:
* gst/gstpipeline.c: (gst_pipeline_change_state):
Release the object lock before trying to flush the bus.
2008-10-08 15:21:12 +00:00
Wim Taymans
33bd5179c3 gst/gstghostpad.*: Unbreak -good build, private is a reserved c++ keyword.
Original commit message from CVS:
* gst/gstghostpad.c:
* gst/gstghostpad.h:
Unbreak -good build, private is a reserved c++ keyword.
2008-10-08 10:39:24 +00:00
Andy Wingo
b731374c49 gst/gstghostpad.*: Fix unintended API removal: re-add GST_GHOST_PAD_CAST to the header.
Original commit message from CVS:
2008-10-08  Andy Wingo  <wingo@pobox.com>

* gst/gstghostpad.h (GST_GHOST_PAD_CAST):
* gst/gstghostpad.c (GST_GHOST_PAD_CAST): Fix unintended API
removal: re-add GST_GHOST_PAD_CAST to the header.
2008-10-08 10:19:11 +00:00
Andy Wingo
9640db9fe2 gst/gstghostpad.h (GstProxyPad, GstProxyPadClass, GstGhostPad)
Original commit message from CVS:
2008-10-08  Andy Wingo  <wingo@pobox.com>

* gst/gstghostpad.h (GstProxyPad, GstProxyPadClass, GstGhostPad)
(GstGhostPadClass): Publically expose these structures so as to
allow easy subclassing from C. Hide the member data behind a
private opaque data pointer.

* gst/gstghostpad.c: Adapt to store instance data in the type
instance's private data region, not in the public struct.
2008-10-08 10:12:45 +00:00
Sebastian Dröge
2d2a55a2a4 gst/gstregistrybinary.c: If we can't get a cache file don't try to save something to it.
Original commit message from CVS:
* gst/gstregistrybinary.c: (gst_registry_binary_write_cache):
If we can't get a cache file don't try to save something to it.
Dereferencing NULL pointers usually isn't a good idea.
2008-10-08 10:07:15 +00:00
Andy Wingo
83d3b5d88e gst/gstghostpad.c (gst_ghost_pad_construct): If we got a template via g_object_get(), be sure to unref it.
Original commit message from CVS:
2008-10-08  Andy Wingo  <wingo@pobox.com>

* gst/gstghostpad.c (gst_ghost_pad_construct): If we got a
template via g_object_get(), be sure to unref it.

* gst/gstbuffer.h (GST_BUFFER_FREE_FUNC): Fix incorrect doc.
2008-10-08 08:54:55 +00:00
Sebastian Dröge
22dd04f7e0 Always use the unaligned variants of GST_READ_UINT* and GST_WRITE_UINT* as it's too easy to break the ISO C strict al...
Original commit message from CVS:
* docs/gst/gstreamer-sections.txt:
* gst/gstutils.h:
Always use the unaligned variants of GST_READ_UINT* and GST_WRITE_UINT*
as it's too easy to break the ISO C strict aliasing rules with simple
casts to the corresponding type and this would introduce hard to debug
bugs. Fixes bug #545714.
API: Add GST_READ_UINT24_(LE|BE) and GST_WRITE_UINT24_(LE|BE).
2008-10-07 12:00:49 +00:00
Tim-Philipp Müller
cabf154dc6 gst/: Add 'Since' bits to gtk-doc chunks for new API.
Original commit message from CVS:
* gst/gstbuffer.h: (GST_BUFFER_FREE_FUNC):
* gst/gstghostpad.c: (gst_ghost_pad_construct):
Add 'Since' bits to gtk-doc chunks for new API.
2008-10-07 06:56:11 +00:00
Andy Wingo
267d0ba8f3 gst/gstbuffer.h (GST_BUFFER_FREE_FUNC): New API, a free function that will be called on the malloc_data to free it. B...
Original commit message from CVS:
2008-10-06  Andy Wingo  <wingo@pobox.com>

* gst/gstbuffer.h (GST_BUFFER_FREE_FUNC): New API, a free function
that will be called on the malloc_data to free it. Basically a way
to avoid subclassing when all you need is a different free
function, i.e. free() instead of g_free().

* gst/gstbuffer.c (gst_buffer_finalize): Free malloc_data via
calling the free function.
(gst_buffer_init): Initialize the free function to g_free.
2008-10-06 18:01:42 +00:00
Andy Wingo
f7ae133fec gst/gstghostpad.*: New function, finishes the initialization of ghost pad. Useful for language bindings and subclasse...
Original commit message from CVS:
2008-10-06  Andy Wingo  <wingo@pobox.com>

* gst/gstghostpad.h:
* gst/gstghostpad.c (gst_ghost_pad_construct): New function,
finishes the initialization of ghost pad. Useful for language
bindings and subclassers of GstGhostPad. Fixes #539108.
(gst_ghost_pad_new_full): Use the new constructor.
2008-10-06 17:57:25 +00:00
Olivier Crete
ee0eaf824b gst/gstbin.c: Keep track of pads that are being linked/unlinked and resync the state changes.
Original commit message from CVS:
Base on Patch by: Olivier Crete <tester at tester dot ca>
* gst/gstbin.c: (gst_bin_init), (gst_bin_add_func),
(gst_bin_remove_func), (update_degree),
(gst_bin_sort_iterator_new), (gst_bin_handle_message_func):
Keep track of pads that are being linked/unlinked and resync the state
changes.
* gst/gstpad.c: (gst_pad_get_direction),
(gst_pad_set_chain_function), (gst_pad_set_getrange_function),
(gst_pad_set_checkgetrange_function), (gst_pad_unlink),
(gst_pad_link_prepare), (gst_pad_link),
(gst_pad_event_default_dispatch), (gst_pad_chain), (gst_pad_push),
(gst_pad_check_pull_range), (gst_pad_get_range),
(gst_pad_pull_range):
Some code cleanups, use macros to check pad direction.
Don't need to take the lock on the pad direction.
Post structure change when pads are linked/unlinked.
Change some checks into _return_if_fail().
* tests/check/gst/gstbin.c:
(test_link_structure_change_state_changed_sync_cb),
(GST_START_TEST), (gst_bin_suite):
Add testcase for pad link/unlinke resync during a state change.
Fixes #510354.
2008-10-06 16:15:02 +00:00
Wim Taymans
cb98130213 Implement STRUCTURE_CHANGED messages. These messages will be used to signal the parent bin of link/unlink operations ...
Original commit message from CVS:
* docs/gst/gstreamer-sections.txt:
* gst/gstmessage.c: (gst_message_new_structure_change),
(gst_message_parse_structure_change):
* gst/gstmessage.h:
Implement STRUCTURE_CHANGED messages. These messages will be used to
signal the parent bin of link/unlink operations that could require a
resync when doing a state change. See ##510354.
API: gst_message_new_structure_change()
API: gst_message_parse_structure_change()
2008-10-06 15:31:49 +00:00
Wim Taymans
11588b2db5 gst/gstquark.*: Add some more quarks for new message. See #510354.
Original commit message from CVS:
* gst/gstquark.c:
* gst/gstquark.h:
Add some more quarks for new message. See #510354.
2008-10-06 15:21:14 +00:00
Antoine Tremblay
db71547857 gst/gstpad.c: Fix small refount leak in caps compatibility check.
Original commit message from CVS:
Patch by: Antoine Tremblay <hexa00 at gmail dot com>
* gst/gstpad.c: (gst_pad_link_check_compatible_unlocked):
Original patch by : Simon Descaries
Fix small refount leak in caps compatibility check.
Fixes #551676.
2008-10-06 08:45:42 +00:00
Antoine Tremblay
607fd58a5e gst/gstelement.c: Avoid leaking the parent ref when we fail changing the state of the element using gst_element_sync_...
Original commit message from CVS:
Based on patch by: Antoine Tremblay <hexa00 at gmail dot com>
* gst/gstelement.c: (gst_element_sync_state_with_parent):
Avoid leaking the parent ref when we fail changing the state of the
element using gst_element_sync_state_with_parent(). Fixes #551978.
2008-09-14 22:01:30 +00:00
Tim-Philipp Müller
844b19464e gst/gsttaglist.h: Fix Since: markers for new geo tags.
Original commit message from CVS:
* gst/gsttaglist.h:
Fix Since: markers for new geo tags.
2008-09-03 05:52:40 +00:00
Stefan Kost
cf424d4c56 gst/gsttaglist.h: Fix actual tag name define after renaming from altitude to elevation.
Original commit message from CVS:
* gst/gsttaglist.h:
Fix actual tag name define after renaming from altitude to elevation.
2008-09-02 20:00:28 +00:00
Wim Taymans
7cf8be7fd8 gst/gstpad.c: Add fallback when calling the deprecated function on an element that implements the new internal_link h...
Original commit message from CVS:
* gst/gstpad.c: (add_unref_pad_to_list),
(gst_pad_get_internal_links_default):
Add fallback when calling the deprecated function on an element that
implements the new internal_link handler.
2008-09-01 14:05:45 +00:00
Stefan Kost
ce1f50ae11 Add new tags for geo location and clarify purpose of existing location tag. Fixes #481169
Original commit message from CVS:
* docs/gst/gstreamer-sections.txt:
* gst/gsttaglist.c:
* gst/gsttaglist.h:
Add new tags for geo location and clarify purpose of existing location
tag. Fixes #481169
2008-09-01 13:35:32 +00:00
Olivier Crete
390369246e gst/gstpad.c: Use thread-safe internal links iterator. Fixes #549504.
Original commit message from CVS:
Patch by: Olivier Crete <tester at tester dot ca>
* gst/gstpad.c: (gst_pad_iterate_internal_links_default),
(gst_pad_event_default_dispatch), (gst_pad_dispatcher):
Use thread-safe internal links iterator. Fixes #549504.
2008-09-01 11:27:45 +00:00
Olivier Crete
68037404b8 Add threadsafe replacement functions for getting internal links of an element. Deprecate the old internal links funct...
Original commit message from CVS:
Based on patch by: Olivier Crete <tester at tester dot ca>
* docs/gst/gstreamer-sections.txt:
* win32/common/libgstreamer.def:
* gst/gstpad.c: (gst_pad_init),
(gst_pad_set_iterate_internal_links_function),
(int_link_iter_data_free), (iterate_pad),
(gst_pad_iterate_internal_links_default),
(gst_pad_iterate_internal_links), (gst_pad_get_internal_links):
* gst/gstpad.h:
Add threadsafe replacement functions for getting internal links of an
element. Deprecate the old internal links functions.
API:GstPad::gst_pad_set_iterate_internal_links_function()
API:GstPad::GstPadIterIntLinkFunction
API:GstPad::gst_pad_iterate_internal_links()
API:GstPad::gst_pad_iterate_internal_links_default()
* gst/gstghostpad.c: (gst_proxy_pad_do_iterate_internal_links),
(gst_proxy_pad_init):
Implement threadsafe internal links.
* tests/check/elements/tee.c: (GST_START_TEST), (tee_suite):
Unit test for internal links on tee. See #549504.
2008-09-01 10:42:04 +00:00
Edward Hervey
98354dc527 gst/gstpad.c: Die evil deadlock, die !
Original commit message from CVS:
* gst/gstpad.c: (gst_pad_get_internal_links_default):
Die evil deadlock, die !
2008-08-30 12:07:41 +00:00
Edward Hervey
dd80b2030c Fix all leaks due to the bug in gst_pad_template_new() by which it does not steal the refcount of the given caps as s...
Original commit message from CVS:
* gst/gstutils.c: (gst_element_get_compatible_pad):
* tests/check/gst/gstghostpad.c: (GST_START_TEST):
* tests/check/gst/gstpad.c: (name_is_valid), (GST_START_TEST):
Fix all leaks due to the bug in gst_pad_template_new() by which it does
not steal the refcount of the given caps as stated.
REVERT THIS COMMIT ONCE FIXED !
REVERT THIS COMMIT ONCE FIXED !
REVERT THIS COMMIT ONCE FIXED !
REVERT THIS COMMIT ONCE FIXED !
REVERT THIS COMMIT ONCE FIXED !
REVERT THIS COMMIT ONCE FIXED !
2008-08-30 11:55:59 +00:00
Wim Taymans
e6da27eb3b gst/gstiterator.*: After 3 years it's about time to revise the documentation of the iterator objects.
Original commit message from CVS:
* gst/gstiterator.c:
* gst/gstiterator.h:
After 3 years it's about time to revise the documentation of the
iterator objects.
2008-08-29 17:58:25 +00:00
Wim Taymans
31aded4133 gst/gstpad.c: Make the internal links function less thread-unsafe and add some comments, dunno why.
Original commit message from CVS:
* gst/gstpad.c: (gst_pad_get_internal_links_default):
Make the internal links function less thread-unsafe and add some
comments, dunno why.
2008-08-29 16:10:56 +00:00
Tim-Philipp Müller
0609c4cabe gst/gst_private.h: Include gstinfo.h even if GST_DISABLE_GST_DEBUG is defined. Fixes build with --disable-gst-debug.
Original commit message from CVS:
* gst/gst_private.h:
Include gstinfo.h even if GST_DISABLE_GST_DEBUG is defined. Fixes
build with --disable-gst-debug.
2008-08-29 14:12:02 +00:00
David Schleef
7c90130407 gst/gstpadtemplate.c: Revert last change, since it breaks a few plugins, ffmpeg, alaw, and mulaw. Code is correct, b...
Original commit message from CVS:
* gst/gstpadtemplate.c: Revert last change, since it breaks
a few plugins, ffmpeg, alaw, and mulaw.  Code is correct,
but shouldn't be enabled until we've released fixed versions
of -good and -ffmpeg.
2008-08-29 00:34:58 +00:00
Stefan Kost
0dfab1544c gst/gstobject.c: Put the gst_object_get_name() back in.
Original commit message from CVS:
* gst/gstobject.c:
Put the gst_object_get_name() back in.
2008-08-28 20:12:54 +00:00
Stefan Kost
29f2239a89 gst/gstpadtemplate.c: The old behaviour was that gst_pad_template_new() takes ownership of the caps. As we now call g...
Original commit message from CVS:
* gst/gstpadtemplate.c:
The old behaviour was that gst_pad_template_new() takes ownership of
the caps. As we now call g_object_new() which calls g_object_set() and
which copies the caps, we have to unref them to not leak them. Fixes
make valgrid for me.
2008-08-28 12:32:19 +00:00
Stefan Kost
4eebee56fd gst/gsturi.c: Don't segfault on input like "tel:+1-123-555-1234".
Original commit message from CVS:
* gst/gsturi.c:
Don't segfault on input like "tel:+1-123-555-1234".
2008-08-28 10:45:04 +00:00
Stefan Kost
c17a8ce88a gst/gstobject.c: Due to popular request also include ObjectType in gst_object_get_path_string(). Makes gst-launch -v ...
Original commit message from CVS:
* gst/gstobject.c:
Due to popular request also include ObjectType in
gst_object_get_path_string(). Makes gst-launch -v bit more useful.
2008-08-27 07:18:37 +00:00
David Schleef
93f300823f gst/gstutils.c: Remove check in gst_pad_query_convert() that src_val must be positive, because that's not a requirement.
Original commit message from CVS:
* gst/gstutils.c: Remove check in gst_pad_query_convert() that
src_val must be positive, because that's not a requirement.
This causes problems with converting negative granulepos
values for Dirac.
* gst/gstquery.c: Same, gst_query_new_convert().
2008-08-27 03:04:23 +00:00
David Schleef
34087e8b17 gst/gstutils.c: Remove check in gst_pad_query_convert() that src_val must be positive, because that's not a requirement.
Original commit message from CVS:
* gst/gstutils.c: Remove check in gst_pad_query_convert() that
src_val must be positive, because that's not a requirement.
This causes problems with converting negative granulepos
values for Dirac.
2008-08-27 02:59:59 +00:00
Wim Taymans
207bbf4f14 gst/gstclock.c: Add some more debugging to the clock slaving code.
Original commit message from CVS:
* gst/gstclock.c: (gst_clock_add_observation):
Add some more debugging to the clock slaving code.
* win32/common/libgstbase.def:
Add new basetransform method.
2008-08-25 11:06:34 +00:00
Wim Taymans
f716d86e48 gst/gstbin.c: Take the (recursive) state lock between getting the locked state of an element and changing the element...
Original commit message from CVS:
* gst/gstbin.c: (gst_bin_element_set_state):
Take the (recursive) state lock between getting the locked state of an
element and changing the element state. This allows the application to
lock an element's state and then change its state without races.
2008-08-25 11:00:13 +00:00
Wim Taymans
a6b1feccd0 gst/gstbin.c: When an element is in the locked state we still want to update the base_time of the element.
Original commit message from CVS:
* gst/gstbin.c: (gst_bin_element_set_state):
When an element is in the locked state we still want to update the
base_time of the element.
2008-08-25 10:52:47 +00:00
Murray Cumming
976b9750ea gst/gstutils.c: Mention that this is just like gst_buffer_merge() but with extra unreffing for C coders. Advise langu...
Original commit message from CVS:
patch by: Murray Cumming <murrayc@murrayc.com>
* gst/gstutils.c:
Mention that this is just like gst_buffer_merge() but with extra
unreffing for C coders. Advise language bindings not to wrap it.
Fixes Bug #533856.
Also fix file comment.
2008-08-20 07:22:11 +00:00
Thijs Vermeir
05bfed2da8 gst/gstpad.h: Add doc
Original commit message from CVS:
* gst/gstpad.h:
Add doc
2008-08-14 20:05:33 +00:00
Stefan Kost
8713a8203b gst/: Remove double interface from doc-string.
Original commit message from CVS:
* gst/gstchildproxy.h:
* gst/gstpreset.h:
Remove double interface from doc-string.
2008-08-12 06:27:35 +00:00
Michael Smith
945bf1bdd3 gst/gstregistrybinary.c: Don't use g_mkstmp() on win32, it's unsafe if glib is using a different libc.
Original commit message from CVS:
* gst/gstregistrybinary.c:
Don't use g_mkstmp() on win32, it's unsafe if glib is using a different
libc.
Fixes #544776.
2008-08-11 19:04:04 +00:00
Stefan Kost
bdbd0bfac4 Document preset-iface vmethods.
Original commit message from CVS:
* docs/gst/gstreamer-sections.txt:
* gst/gstpreset.h:
Document preset-iface vmethods.
2008-08-11 08:06:20 +00:00
Frederic Crozat
f8cf146ed4 gst/gst.c: Make sure gettext returns translations in UTF-8 encoding rather than in the current locale encoding (#5468...
Original commit message from CVS:
Patch by: Frederic Crozat <fcrozat@mandriva.org>
* gst/gst.c: (init_pre):
Make sure gettext returns translations in UTF-8 encoding rather
than in the current locale encoding (#546822).
2008-08-07 15:49:00 +00:00
Wim Taymans
b08cd83cbb gst/gstcaps.c: Fix subset test.
Original commit message from CVS:
* gst/gstcaps.c: (gst_caps_structure_is_subset_field):
Fix subset test.
* tests/check/gst/gstcaps.c: (GST_START_TEST):
Improve unit test subset tests and add a testcase for the subset failure
cases.
* tests/check/gst/gstvalue.c: (GST_START_TEST), (gst_value_suite):
Improve subtraction unit test.
2008-08-07 12:28:28 +00:00
Wim Taymans
c82ad04dd4 gst/gstpad.h: Clarify the docs a bit more.
Original commit message from CVS:
* gst/gstpad.h:
Clarify the docs a bit more.
2008-08-05 16:50:27 +00:00
Olivier Crete
70a4cad10c gst/gststructure.c: Avoid overflows in fixation code when dealing with MAXINT values, which v4l2src seems to do.
Original commit message from CVS:
Patch by: Olivier Crete <tester at tester dot ca>
* gst/gststructure.c:
(gst_structure_fixate_field_nearest_fraction):
Avoid overflows in fixation code when dealing with MAXINT values, which
v4l2src seems to do.
Fixes #546328.
* tests/check/gst/gststructure.c: (GST_START_TEST):
Make a unit test to check the fix.
2008-08-05 15:03:27 +00:00
Wim Taymans
5665680537 gst/gstbin.c: Fix race for bins that simulate ASYNC state changes by inserting
Original commit message from CVS:
* gst/gstbin.c: (gst_bin_add_func), (gst_bin_remove_func),
(gst_bin_change_state_func), (bin_handle_async_done),
(gst_bin_handle_message_func):
Fix race for bins that simulate ASYNC state changes by inserting
ASYNC_START and ASYNC_DONE messages in their bus. We need to check for
pending ASYNC messages even when the bin does not have ASYNC children.
We note detect this behaviour because we will receive an ASYNC message
that is originating from the bin itself.
Fixes races with decodebin2 state changes.
* tests/check/gst/gstbin.c: (GST_START_TEST):
Add some more debug.
2008-08-04 15:49:13 +00:00
Tim-Philipp Müller
6d0ca73fea gst/gsttaglist.c: Fix typo.
Original commit message from CVS:
* gst/gsttaglist.c: (_gst_tag_initialize):
Fix typo.
2008-08-04 13:01:35 +00:00
Stefan Kost
909a7d2de7 gst/gsttaglist.c: Argh. actually save the text before committing. Now adds gst_tag_merge_strings_with_comma() to gst_...
Original commit message from CVS:
* gst/gsttaglist.c:
Argh. actually save the text before committing. Now adds
gst_tag_merge_strings_with_comma() to gst_tag_register().
2008-08-04 12:46:23 +00:00
Stefan Kost
8e729fc6a2 gst/gsttaglist.*: Do as tim pointed out and actually register the new tag. Also improve te docs and use gst_tag_merge...
Original commit message from CVS:
* gst/gsttaglist.c:
* gst/gsttaglist.h:
Do as tim pointed out and actually register the new tag. Also improve
te docs and use gst_tag_merge_strings_with_comma() method to allow
retriving all keywords merged in one list.
2008-08-04 12:30:26 +00:00
Stefan Kost
6cf55f54e3 Add new taglist item GST_TAG_KEYWORDS, needed for #520694 .
Original commit message from CVS:
* docs/gst/gstreamer-sections.txt:
* gst/gsttaglist.h:
Add new taglist item GST_TAG_KEYWORDS, needed for #520694 .
2008-08-01 11:34:06 +00:00
Tim-Philipp Müller
2fd47ae874 gst/gstpadtemplate.c: Add "name-template", "direction", "presence" and "caps" properties, so that gst_pad_template_ne...
Original commit message from CVS:
* gst/gstpadtemplate.c:
(gst_pad_template_class_init), (gst_static_pad_template_get),
(gst_pad_template_new), (gst_pad_template_pad_created),
(gst_pad_template_set_property), (gst_pad_template_get_property):
Add "name-template", "direction", "presence" and "caps" properties,
so that gst_pad_template_new() is just a thin wrapper around
g_object_new(), which is better for bindings. (Fixes: #539772)
2008-08-01 10:02:49 +00:00
Michael Smith
26b51b2d9c gst/gsturi.c: Be more liberal in what URIs we accept.
Original commit message from CVS:
* gst/gsturi.c:
Be more liberal in what URIs we accept.
Do not unescape bits of the URI for no apparent reason before passing to
the element. Fixes #545352.
2008-07-31 17:16:50 +00:00
Robert Schwebel
1695ddb9dd gst/gst.c: Include gstconfig.h as macros from it are used. Fixes bug #545607.
Original commit message from CVS:
Patch by: Robert Schwebel <r.schwebel@pengutronix.de>
* gst/gst.c:
Include gstconfig.h as macros from it are used. Fixes bug #545607.
2008-07-31 15:24:21 +00:00
Sebastian Dröge
4bfb1fe70c Remove GST_DISABLE_(ENUMTYPES|INDEX|URI) everywhere.
Original commit message from CVS:
* configure.ac:
* docs/gst/gstreamer-sections.txt:
* docs/gst/gstreamer.types:
* docs/gst/gstreamer.types.in:
* gst/Makefile.am:
* gst/gst.c:
* gst/gstbin.c: (gst_bin_class_init), (gst_bin_set_index_func):
* gst/gstconfig.h.in:
* gst/gstelement.c: (gst_element_get_index):
* gst/gstregistrybinary.c: (gst_registry_binary_save_feature),
(gst_registry_binary_load_feature),
(gst_registry_binary_read_cache):
* gst/gstregistryxml.c: (load_feature),
(gst_registry_xml_read_cache), (gst_registry_xml_save_feature):
* plugins/Makefile.am:
* tools/gst-indent:
* tools/gst-inspect.c: (print_index_info), (print_element_list),
(print_plugin_features), (print_element_features):
* tools/gst-xmlinspect.c: (print_event_masks),
(print_element_info):
* win32/common/gstconfig.h:
Remove GST_DISABLE_(ENUMTYPES|INDEX|URI) everywhere.
Disabling the indexers and URI handler code will only reduce the
required amount of memory by a very small amount but on the other hand
requires much more maintaince work. Apart from that many places of
code are broken when disabling them.
Disabling the enum types doesn't reduce the required amount of memory
by more than a few bytes and makes it hard to fix bugs like #539772,
i.e. use the enums as GObject properties.
2008-07-31 15:20:32 +00:00
Wim Taymans
48336614c0 gst/gstpad.c: Remove silly redundant debug.
Original commit message from CVS:
* gst/gstpad.c: (gst_pad_acceptcaps_default),
(gst_pad_configure_src), (gst_pad_alloc_buffer_full):
Remove silly redundant debug.
Add some more debug info.
Clarify the docs regarding new caps received from pad_alloc.
2008-07-31 12:50:52 +00:00