gnomemm r1521 - in gstreamermm/trunk: . examples/media_player_gtkmm gstreamer/gstreamermm gstreamer/src tests tools/m4
- From: jaalburqu svn gnome org
- To: svn-commits-list gnome org
- Subject: gnomemm r1521 - in gstreamermm/trunk: . examples/media_player_gtkmm gstreamer/gstreamermm gstreamer/src tests tools/m4
- Date: Thu, 22 May 2008 03:38:11 +0000 (UTC)
Author: jaalburqu
Date: Thu May 22 03:38:11 2008
New Revision: 1521
URL: http://svn.gnome.org/viewvc/gnomemm?rev=1521&view=rev
Log:
2008-05-21 Josà Alburquerque <jaalburqu svn gnome org>
* gstreamer/src/error.ccg:
* gstreamer/src/error.hg: Added set_field() methods documentation;
Added set_field(..., const char*); Made enum {get,set}_field() methods
use int instead of ValueBase; Revisted method docs.
* gstreamer/src/structure.ccg:
* gstreamer/src/structure.hg: Wrapped get_*_error_quark() methods.
* tests/test-structure.cc: Added lines to test setting/getting enums.
* examples/media_player_gtkmm/player_window.h:
* gstreamer/gstreamermm/init.h:
* gstreamer/gstreamermm/version.h:
* gstreamer/src/bin.hg:
* gstreamer/src/buffer.hg:
* gstreamer/src/bus.hg:
* gstreamer/src/caps.hg:
* gstreamer/src/childproxy.hg:
* gstreamer/src/clock.hg:
* gstreamer/src/element.hg:
* gstreamer/src/event.hg:
* gstreamer/src/filter.hg:
* gstreamer/src/format.hg:
* gstreamer/src/ghostpad.hg:
* gstreamer/src/pad.hg:
* gstreamer/src/padtemplate.hg:
* gstreamer/src/parse.hg:
* gstreamer/src/pipeline.hg:
* gstreamer/src/registry.hg:
* gstreamer/src/taglist.hg:
* gstreamer/src/task.hg:
* gstreamer/src/xml.hg:
* tools/m4/class_gstminiobject.m4: Corrected method docs @param,
@returns and @result directives to start with uppercase and end with
period.
Modified:
gstreamermm/trunk/ChangeLog
gstreamermm/trunk/examples/media_player_gtkmm/player_window.h
gstreamermm/trunk/gstreamer/gstreamermm/init.h
gstreamermm/trunk/gstreamer/gstreamermm/version.h
gstreamermm/trunk/gstreamer/src/bin.hg
gstreamermm/trunk/gstreamer/src/buffer.hg
gstreamermm/trunk/gstreamer/src/bus.hg
gstreamermm/trunk/gstreamer/src/caps.hg
gstreamermm/trunk/gstreamer/src/childproxy.hg
gstreamermm/trunk/gstreamer/src/clock.hg
gstreamermm/trunk/gstreamer/src/element.hg
gstreamermm/trunk/gstreamer/src/error.ccg
gstreamermm/trunk/gstreamer/src/error.hg
gstreamermm/trunk/gstreamer/src/event.hg
gstreamermm/trunk/gstreamer/src/filter.hg
gstreamermm/trunk/gstreamer/src/format.hg
gstreamermm/trunk/gstreamer/src/ghostpad.hg
gstreamermm/trunk/gstreamer/src/pad.hg
gstreamermm/trunk/gstreamer/src/padtemplate.hg
gstreamermm/trunk/gstreamer/src/parse.hg
gstreamermm/trunk/gstreamer/src/pipeline.hg
gstreamermm/trunk/gstreamer/src/registry.hg
gstreamermm/trunk/gstreamer/src/structure.ccg
gstreamermm/trunk/gstreamer/src/structure.hg
gstreamermm/trunk/gstreamer/src/taglist.hg
gstreamermm/trunk/gstreamer/src/task.hg
gstreamermm/trunk/gstreamer/src/xml.hg
gstreamermm/trunk/tests/test-structure.cc
gstreamermm/trunk/tools/m4/class_gstminiobject.m4
Modified: gstreamermm/trunk/examples/media_player_gtkmm/player_window.h
==============================================================================
--- gstreamermm/trunk/examples/media_player_gtkmm/player_window.h (original)
+++ gstreamermm/trunk/examples/media_player_gtkmm/player_window.h Thu May 22 03:38:11 2008
@@ -37,7 +37,7 @@
public:
/**
* @param playbin The pipeline that can play media files.
- * @param video_sink The video sink to use to display stream video (if any)
+ * @param video_sink The video sink to use to display stream video (if any).
*/
PlayerWindow(const Glib::RefPtr<Gst::Pipeline>& playbin, const Glib::RefPtr<Gst::Element>& video_sink);
virtual ~PlayerWindow();
Modified: gstreamermm/trunk/gstreamer/gstreamermm/init.h
==============================================================================
--- gstreamermm/trunk/gstreamer/gstreamermm/init.h (original)
+++ gstreamermm/trunk/gstreamer/gstreamermm/init.h Thu May 22 03:38:11 2008
@@ -43,8 +43,8 @@
* functions in other glib-style libraries, such as gtk_init(). In particular,
* unknown command line options cause this function to abort program execution.
*
- * @param argc Pointer to application's argc
- * @param argv Pointer to application's argv
+ * @param argc Pointer to application's argc.
+ * @param argv Pointer to application's argv.
*/
void init(int& argc, char**& argv);
@@ -59,8 +59,8 @@
* this is not an option, your program must initialise the GLib thread system
* using g_thread_init() before any other GLib functions are called.
*
- * @param argc Pointer to application's argc
- * @param argv Pointer to application's argv
+ * @param argc Pointer to application's argc.
+ * @param argv Pointer to application's argv.
* @return true if GStreamer could be initialized.
* @throw Glib::Error
*/
Modified: gstreamermm/trunk/gstreamer/gstreamermm/version.h
==============================================================================
--- gstreamermm/trunk/gstreamer/gstreamermm/version.h (original)
+++ gstreamermm/trunk/gstreamer/gstreamermm/version.h Thu May 22 03:38:11 2008
@@ -27,9 +27,9 @@
/** Gets the version number of the gstreamermm library.
*
- * @param major Pointer to a guint to store the major version number
- * @param minor Pointer to a guint to store the minor version number
- * @param micro Pointer to a guint to store the micro version number
+ * @param major Pointer to a guint to store the major version number.
+ * @param minor Pointer to a guint to store the minor version number.
+ * @param micro Pointer to a guint to store the micro version number.
*/
void version(guint& major, guint& minor, guint& micro);
Modified: gstreamermm/trunk/gstreamer/src/bin.hg
==============================================================================
--- gstreamermm/trunk/gstreamer/src/bin.hg (original)
+++ gstreamermm/trunk/gstreamer/src/bin.hg Thu May 22 03:38:11 2008
@@ -135,8 +135,8 @@
public:
/** Creates a new bin with the given name.
*
- * @param name the name of the new bin
- * @return a new Gst::Bin
+ * @param name The name of the new bin.
+ * @return A new Gst::Bin.
*/
_WRAP_CREATE(const Glib::ustring& name)
@@ -150,7 +150,7 @@
* MT safe.
*
* @param element The Gst::Element to add.
- * @return this Gst::Bin if successful, for chained calls to add().
+ * @return This Gst::Bin if successful, for chained calls to add().
*
* @throws std::runtime_error if the Bin does not want to accept the Element.
*/
Modified: gstreamermm/trunk/gstreamer/src/buffer.hg
==============================================================================
--- gstreamermm/trunk/gstreamer/src/buffer.hg (original)
+++ gstreamermm/trunk/gstreamer/src/buffer.hg Thu May 22 03:38:11 2008
@@ -92,7 +92,7 @@
_WRAP_METHOD(Glib::RefPtr<Buffer> merge(const Glib::RefPtr<const Buffer>& other_buffer) const, gst_buffer_merge)
/** Get the data element of this buffer.
- * @returns a pointer to the data element of this buffer.
+ * @returns A pointer to the data element of this buffer.
*/
_MEMBER_GET(data, data, guint8*, guint8*)
Modified: gstreamermm/trunk/gstreamer/src/bus.hg
==============================================================================
--- gstreamermm/trunk/gstreamer/src/bus.hg (original)
+++ gstreamermm/trunk/gstreamer/src/bus.hg Thu May 22 03:38:11 2008
@@ -144,7 +144,7 @@
* poll functions or enable the "sync-message" signal emission with
* enable_sync_message_emission().
*
- * @param slot The handler slot to install
+ * @param slot The handler slot to install.
*/
void set_sync_handler(const SlotMessageSync& slot);
Modified: gstreamermm/trunk/gstreamer/src/caps.hg
==============================================================================
--- gstreamermm/trunk/gstreamer/src/caps.hg (original)
+++ gstreamermm/trunk/gstreamer/src/caps.hg Thu May 22 03:38:11 2008
@@ -66,22 +66,22 @@
/** Creates a new Gst::Caps that indicates that it is compatible with any
* media format.
*
- * @return the new Gst::Caps
+ * @return The new Gst::Caps.
*/
static Glib::RefPtr<Caps> create_any();
/** Creates a new Gst::Caps that contains one Gst::Structure.
*
- * @param media_type the media type of the structure
- * @return the new Gst::Caps
+ * @param media_type The media type of the structure.
+ * @return The new Gst::Caps.
*/
static Glib::RefPtr<Caps> create_simple(const Glib::ustring& media_type);
/** Creates a new Gst::Caps and adds the given Gst::Structure.
* Use append_structure() to add additional structures.
*
- * @param first_struct the first structure to add
- * @return Returns the new Gst::Caps
+ * @param first_struct The first structure to add.
+ * @return Returns the new Gst::Caps.
*/
static Glib::RefPtr<Caps> create(const Structure& first_struct);
@@ -95,20 +95,20 @@
/** Appends a structure to caps.
*
- * @param structure the Gst::Structure to append
+ * @param structure The Gst::Structure to append.
*/
void append_structure(const Structure& structure);
/** Appends a structure to caps if its not already expressed by caps.
*
- * @param structure the Gst::Structure to merge
+ * @param structure The Gst::Structure to merge.
*/
void merge_structure(const Structure& structure);
/** Finds the structure in caps that has the index @a idx, and returns it.
*
- * @param index the index of the structure
- * @return the Gst::Structure corresponding to index
+ * @param index The index of the structure.
+ * @return The Gst::Structure corresponding to index.
*/
Structure get_structure(guint idx) const;
@@ -120,8 +120,8 @@
/** Sets fields in a simple Gst::Caps. A simple Gst::Caps is one that only
* has one structure.
*
- * @param field field to set
- * @param value the value which the field should be set to
+ * @param field Field to set.
+ * @param value The value which the field should be set to.
*/
void set_simple(const Glib::ustring& name, const Glib::ValueBase& value);
_IGNORE(gst_caps_set_simple)
Modified: gstreamermm/trunk/gstreamer/src/childproxy.hg
==============================================================================
--- gstreamermm/trunk/gstreamer/src/childproxy.hg (original)
+++ gstreamermm/trunk/gstreamer/src/childproxy.hg Thu May 22 03:38:11 2008
@@ -56,9 +56,10 @@
//TODO: should gst_child_proxy_lookup() be wrapped?
/** Gets a single property using the Gst::ChildProxy mechanism.
- * @param name The property to get
- * @param value An empty Glib::ValueBase in which to store the property
- * @return This Gst::ChildProxy so more properties can be retrieved if needed
+ * @param name The property to get.
+ * @param value An empty Glib::ValueBase in which to store the property.
+ * @return This Gst::ChildProxy so more properties can be retrieved if
+ * needed.
*/
Glib::RefPtr<ChildProxy> get_proxy_property(const Glib::ustring& name, Glib::ValueBase& value);
@@ -66,9 +67,9 @@
_IGNORE(gst_child_proxy_get_proxy_valist)
/** Sets a single property using the Gst::ChildProxy mechanism.
- * @param name The property to get
- * @param value The Glib::ValueBase to set the property to (non-empty)
- * @return This Gst::ChildProxy so more properties can be set
+ * @param name The property to get.
+ * @param value The Glib::ValueBase to set the property to (non-empty).
+ * @return This Gst::ChildProxy so more properties can be set.
*/
Glib::RefPtr<ChildProxy> set_proxy_property(const Glib::ustring& name, const Glib::ValueBase& value);
@@ -76,12 +77,12 @@
_IGNORE(gst_child_proxy_set_proxy_valist)
/** Emits the "child-added" signal.
- * @param child The newly added child
+ * @param child The newly added child.
*/
void child_added(const Glib::RefPtr<Gst::Object>& child);
/** Emits the "child-removed" signal.
- * @param child The newly added child
+ * @param child The newly added child.
*/
void child_removed(const Glib::RefPtr<Gst::Object>& child);
Modified: gstreamermm/trunk/gstreamer/src/clock.hg
==============================================================================
--- gstreamermm/trunk/gstreamer/src/clock.hg (original)
+++ gstreamermm/trunk/gstreamer/src/clock.hg Thu May 22 03:38:11 2008
@@ -63,8 +63,8 @@
* will be called immediatly with a time set to Gst::CLOCK_TIME_NONE. The
* slot will be called when the time of id has been reached.
*
- * @param slot The slot to callback
- * @return the result of the non blocking wait. MT safe.
+ * @param slot The slot to callback.
+ * @return The result of the non blocking wait. MT safe.
*/
ClockReturn wait_async(const SlotClock& slot);
@@ -72,44 +72,44 @@
};
/** Get hour component of Gst::ClockTime.
- * @param time the Gst::ClockTime to parse
- * @return the hour component of the Gst::ClockTime
+ * @param time The Gst::ClockTime to parse.
+ * @return The hour component of the Gst::ClockTime.
*/
guint get_hours(ClockTime time);
/** Get minute component of Gst::ClockTime.
- * @param time the Gst::ClockTime to parse
- * @return the minute component of the Gst::ClockTime
+ * @param time The Gst::ClockTime to parse.
+ * @return The minute component of the Gst::ClockTime.
*/
guint get_minutes(ClockTime time);
/** Get seconds component of Gst::ClockTime.
- * @param time the Gst::ClockTime to parse
- * @return the seconds component of the Gst::ClockTime
+ * @param time The Gst::ClockTime to parse.
+ * @return The seconds component of the Gst::ClockTime.
*/
guint get_seconds(ClockTime time);
/** Get milliseconds component of Gst::ClockTime.
- * @param time the Gst::ClockTime to parse
- * @return the milliseconds component of the Gst::ClockTime
+ * @param time The Gst::ClockTime to parse.
+ * @return The milliseconds component of the Gst::ClockTime.
*/
guint get_milliseconds(ClockTime time);
/** Get microseconds component of Gst::ClockTime.
- * @param time the Gst::ClockTime to parse
- * @return the microseconds component of the Gst::ClockTime
+ * @param time The Gst::ClockTime to parse.
+ * @return The microseconds component of the Gst::ClockTime.
*/
guint get_microseconds(ClockTime time);
/** Get nanoseconds component of Gst::ClockTime.
- * @param time the Gst::ClockTime to parse
- * @return the nanoseconds component of the Gst::ClockTime
+ * @param time The Gst::ClockTime to parse.
+ * @return The nanoseconds component of the Gst::ClockTime.
*/
guint get_nanoseconds(ClockTime time);
/** Get fractional component (milli, micro and nano seconds) of Gst::ClockTime.
- * @param time the Gst::ClockTime to parse
- * @return the fractional component of the Gst::ClockTime
+ * @param time The Gst::ClockTime to parse.
+ * @return The fractional component of the Gst::ClockTime.
*/
guint get_fractional_seconds(ClockTime time);
Modified: gstreamermm/trunk/gstreamer/src/element.hg
==============================================================================
--- gstreamermm/trunk/gstreamer/src/element.hg (original)
+++ gstreamermm/trunk/gstreamer/src/element.hg Thu May 22 03:38:11 2008
@@ -66,15 +66,15 @@
/** Gets a string representing the given state.
*
- * @param state a Gst::State to get the name of.
- * @return a Glib::ustring with the name of the state.
+ * @param state A Gst::State to get the name of.
+ * @return A Glib::ustring with the name of the state.
*/
Glib::ustring get_name(State s);
/** Gets a string representing the given state change result.
*
- * @param s a Gst::StateChangeReturn to get the name of.
- * @return a Glib::ustring with the name of the state change result.
+ * @param s A Gst::StateChangeReturn to get the name of.
+ * @return A Glib::ustring with the name of the state change result.
*/
Glib::ustring get_name(StateChangeReturn s);
@@ -222,7 +222,7 @@
/** Queries an element for the stream position.
*
- * @param format a pointer to the Gst::Format asked for. On return will
+ * @param format A pointer to the Gst::Format asked for. On return will
* contain the Gst::Format used.
* @return true if the query could be performed.
*/
@@ -232,7 +232,7 @@
/** Queries an element for the total stream duration.
*
- * @param format a pointer to the Gst::Format asked for. On return contains
+ * @param format A pointer to the Gst::Format asked for. On return contains
* the Gst::Format used.
* @return true if the query could be performed.
*/
@@ -247,7 +247,7 @@
*
* This function takes owership of the provided event.
*
- * @param event the Gst::Event to send to the element.
+ * @param event The Gst::Event to send to the element.
* @return true if the event was handled. MT safe.
*/
bool send_event(const Glib::RefPtr<Event>& event);
Modified: gstreamermm/trunk/gstreamer/src/error.ccg
==============================================================================
--- gstreamermm/trunk/gstreamer/src/error.ccg (original)
+++ gstreamermm/trunk/gstreamer/src/error.ccg Thu May 22 03:38:11 2008
@@ -20,3 +20,24 @@
*/
#include <gst/gsterror.h>
+
+Glib::QueryQuark get_core_error_quark()
+{
+ return gst_core_error_quark();
+}
+
+Glib::QueryQuark get_library_error_quark()
+{
+ return gst_library_error_quark();
+}
+
+Glib::QueryQuark get_resource_error_quark()
+{
+ return gst_resource_error_quark();
+}
+
+Glib::QueryQuark get_stream_error_quark()
+{
+ return gst_stream_error_quark();
+}
+
Modified: gstreamermm/trunk/gstreamer/src/error.hg
==============================================================================
--- gstreamermm/trunk/gstreamer/src/error.hg (original)
+++ gstreamermm/trunk/gstreamer/src/error.hg Thu May 22 03:38:11 2008
@@ -78,9 +78,16 @@
* that indicates all XVideo ports are taken, the application can attempt to
* use another sink instead.
*/
-
_WRAP_GERROR(CoreError, GstCoreError, GST_CORE_ERROR, NO_GTYPE)
+//TODO: As in rest of API, put these get_*_quark() methods in namespace.
+/** Get error domain for core system. Errors in this domain will be from the
+ * Gst::CoreError enumeration.
+ *
+ * @return The quark associated with the core error domain.
+ */
+Glib::QueryQuark get_core_error_quark();
+
/** The GStreamer library GError type.
* GStreamer elements can throw non-fatal warnings and fatal errors.
* Higher-level elements and applications can programatically filter the ones
@@ -128,6 +135,13 @@
*/
_WRAP_GERROR(LibraryError, GstLibraryError, GST_LIBRARY_ERROR, NO_GTYPE)
+/** Get error domain for library loading. Errors in this domain will be from
+ * the Gst::LibraryError enumeration.
+ *
+ * @return The quark associated with the library error domain.
+ */
+Glib::QueryQuark get_library_error_quark();
+
/** The GStreamer resource GError type.
* GStreamer elements can throw non-fatal warnings and fatal errors.
* Higher-level elements and applications can programatically filter the ones
@@ -185,6 +199,13 @@
*/
_WRAP_GERROR(ResourceError, GstResourceError, GST_RESOURCE_ERROR, NO_GTYPE)
+/** Get error domain for resource handling. Errors in this domain will be from
+ * the Gst::ResourceError enumeration.
+ *
+ * @return The quark associated with the resource error domain.
+ */
+Glib::QueryQuark get_resource_error_quark();
+
/** The GStreamer stream GError type.
* GStreamer elements can throw non-fatal warnings and fatal errors.
* Higher-level elements and applications can programatically filter the ones
@@ -244,5 +265,12 @@
*/
_WRAP_GERROR(StreamError, GstStreamError, GST_STREAM_ERROR, NO_GTYPE)
+/** Get error domain for media stream processing. Errors in this domain will be
+ * from the Gst::StreamError enumeration.
+ *
+ * @return The quark associated with the media stream error domain.
+ */
+Glib::QueryQuark get_stream_error_quark();
+
} // namespace Gst
Modified: gstreamermm/trunk/gstreamer/src/event.hg
==============================================================================
--- gstreamermm/trunk/gstreamer/src/event.hg (original)
+++ gstreamermm/trunk/gstreamer/src/event.hg Thu May 22 03:38:11 2008
@@ -63,15 +63,15 @@
/** Get a printable name for the given event type.
*
- * @param type the event type
- * @return a reference to the static name of the event.
+ * @param type The event type.
+ * @return A reference to the static name of the event.
*/
Glib::ustring get_name(EventType t);
/** Get the unique quark for the given event type.
*
- * @param type the event type
- * @return the quark associated with the event type
+ * @param type The event type.
+ * @return The quark associated with the event type.
*/
Glib::QueryQuark get_quark(EventType t);
@@ -167,20 +167,20 @@
*
* When the async flag is set, a thread boundary is prefered.
*
- * @param format buffer format
- * @param minsize minimum buffer size
- * @param maxsize maximum buffer size
- * @param async thread behavior
- * @return a new Gst::EventBufferSize
+ * @param format Buffer format.
+ * @param minsize Minimum buffer size.
+ * @param maxsize Maximum buffer size.
+ * @param async Thread behavior.
+ * @return A new Gst::EventBufferSize.
*/
static Glib::RefPtr<Event> create(Format format, gint64 minsize, gint64 maxsize, bool async);
/** Get the format, minsize, maxsize and async-flag in the buffersize event.
*
- * @param format A pointer to store the format in
- * @param minsize A pointer to store the minsize in
- * @param maxsize A pointer to store the maxsize in
- * @param async A pointer to store the async-flag in
+ * @param format A pointer to store the format in.
+ * @param minsize A pointer to store the minsize in.
+ * @param maxsize A pointer to store the maxsize in.
+ * @param async A pointer to store the async-flag in.
*/
void parse(Format& format, gint64& minsize, gint64& maxsize, bool& async);
};
@@ -273,8 +273,8 @@
* The latency is mostly used in live sinks and is always expressed in the
* time format.
*
- * @param latency the new latency value
- * @return a new Gst::EventLatency
+ * @param latency The new latency value.
+ * @return A new Gst::EventLatency.
*
* Since 0.10.12
*/
@@ -296,8 +296,8 @@
/** Create a new navigation event from the given description.
*
- * @param structure description of the event
- * @return a new Gst::EventNavigation
+ * @param structure Description of the event.
+ * @return A new Gst::EventNavigation.
*/
static Glib::RefPtr<Event> create(Structure& structure);
};
@@ -338,13 +338,13 @@
*
* position + (TIMESTAMP(buf) - start) * ABS (rate * applied_rate)
*
- * @param update is this segment an update to a previous one
- * @param rate a new rate for playback
- * @param format The format of the segment values
- * @param start the start value of the segment
- * @param stop the stop value of the segment
- * @param position stream position
- * @param applied_rate The rate factor which has already been applied
+ * @param update Is this segment an update to a previous one.
+ * @param rate A new rate for playback.
+ * @param format The format of the segment values.
+ * @param start The start value of the segment.
+ * @param stop The stop value of the segment.
+ * @param position Stream position.
+ * @param applied_rate The rate factor which has already been applied.
* @return A new newsegment event.
*
* Since 0.10.6
@@ -354,12 +354,12 @@
/** Get the update flag, rate, format, start, stop and position in the
* newsegment event.
*
- * @param update A pointer to the update flag of the segment
- * @param rate A pointer to the rate of the segment
- * @param format A pointer to the format of the newsegment values
- * @param start A pointer to store the start value in
- * @param stop A pointer to store the stop value in
- * @param position A pointer to store the stream time in
+ * @param update A pointer to the update flag of the segment.
+ * @param rate A pointer to the rate of the segment.
+ * @param format A pointer to the format of the newsegment values.
+ * @param start A pointer to store the start value in.
+ * @param stop A pointer to store the stop value in.
+ * @param position A pointer to store the stream time in.
*/
void parse(bool& update, double& rate, Format& format, gint64& start, gint64& stop, gint64& position);
@@ -367,13 +367,13 @@
* the newsegment event. See create() for a full description of the
* newsegment event.
*
- * @param update A pointer to the update flag of the segment
- * @param rate A pointer to the rate of the segment
- * @param format A pointer to the format of the newsegment values
- * @param start A pointer to store the start value in
- * @param stop A pointer to store the stop value in
- * @param position A pointer to store the stream time in
- * @param applied_rate A pointer to the applied_rate of the segment
+ * @param update A pointer to the update flag of the segment.
+ * @param rate A pointer to the rate of the segment.
+ * @param format A pointer to the format of the newsegment values.
+ * @param start A pointer to store the start value in.
+ * @param stop A pointer to store the stop value in.
+ * @param position A pointer to store the stream time in.
+ * @param applied_rate A pointer to the applied_rate of the segment.
*
* Since 0.10.6
*/
@@ -419,9 +419,9 @@
* The application can use general event probes to intercept the QoS event
* and implement custom application specific QoS handling.
*
- * @param proportion the proportion of the qos message
- * @param diff The time difference of the last clock sync
- * @param timestamp The timestamp of the buffer
+ * @param proportion The proportion of the qos message.
+ * @param diff The time difference of the last clock sync.
+ * @param timestamp The timestamp of the buffer.
* @return A new QOS event.
*/
static Glib::RefPtr<Event> create(double proportion, ClockTimeDiff diff, ClockTime timestamp);
@@ -429,9 +429,9 @@
/** Get the proportion, diff and timestamp in the qos event. See create() for
* more information about the different QoS values.
*
- * @param proportion A pointer to store the proportion in
- * @param diff A pointer to store the diff in
- * @param timestamp A pointer to store the timestamp in
+ * @param proportion A pointer to store the proportion in.
+ * @param diff A pointer to store the diff in.
+ * @param timestamp A pointer to store the timestamp in.
*/
void parse(double& proportion, ClockTimeDiff& diff, ClockTime& timestamp);
};
@@ -474,27 +474,28 @@
* Gst::QUERY_POSITION and update the playback segment current position with
* a Gst::SEEK_TYPE_SET to the desired position.
*
- * @param rate The new playback rate
- * @param format The format of the seek values
- * @param flags The optional seek flags
- * @param start_type The type and flags for the new start position
- * @param start The value of the new start position
- * @param stop_type The type and flags for the new stop position
- * @param stop The value of the new stop position
+ * @param rate The new playback rate.
+ * @param format The format of the seek values.
+ * @param flags The optional seek flags.
+ * @param start_type The type and flags for the new start position.
+ * @param start The value of the new start position.
+ * @param stop_type The type and flags for the new stop position.
+ * @param stop The value of the new stop position.
* @return A new seek event.
*/
static Glib::RefPtr<Event> create(double rate, Format format, SeekFlags flags, SeekType start_type, gint64 start, SeekType stop_type, gint64 stop);
/** Parses a seek event and stores the results in the given result locations.
*
- * @param rate result location for the rate
- * @param format result location for the stream format
- * @param flags result location for the Gst::SeekFlags
- * @param start_type result location for the Gst::SeekType of the start
- * position
- * @param start result location for the start postion expressed in format
- * @param stop_type result location for the Gst::SeekType of the stop position
- * @param stop result location for the stop postion expressed in format
+ * @param rate Result location for the rate.
+ * @param format Result location for the stream format.
+ * @param flags Result location for the Gst::SeekFlags.
+ * @param start_type Result location for the Gst::SeekType of the start
+ * position.
+ * @param start Result location for the start postion expressed in format.
+ * @param stop_type Result location for the Gst::SeekType of the stop
+ * position.
+ * @param stop Result location for the stop postion expressed in format.
*/
void parse(double& rate, Format& format, SeekFlags& flags, SeekType& start_type, gint64& start, SeekType& stop_type, gint64& stop);
};
@@ -507,14 +508,14 @@
explicit EventTag(GstEvent* event);
/** Generates a metadata tag event from the given taglist.
- * @param taglist metadata list
- * @return a new Gst::Event
+ * @param taglist Metadata list.
+ * @return A new Gst::Event.
*/
static Glib::RefPtr<Event> create(const TagList& taglist);
//TODO: Use return value:
/** Parses a tag event and stores the results in the given taglist location.
- * @param taglist pointer to metadata list
+ * @param taglist Pointer to metadata list.
*/
void parse(TagList& taglist);
};
Modified: gstreamermm/trunk/gstreamer/src/filter.hg
==============================================================================
--- gstreamermm/trunk/gstreamer/src/filter.hg (original)
+++ gstreamermm/trunk/gstreamer/src/filter.hg Thu May 22 03:38:11 2008
@@ -42,11 +42,11 @@
* prepended to the list of results returned. If first is true,
* the search is halted after the first result is found.
*
- * @param list A list of objects
- * @param slot The slot to execute for each item
- * @param first Flag to stop execution after a successful item
+ * @param list A list of objects.
+ * @param slot The slot to execute for each item.
+ * @param first Flag to stop execution after a successful item.
*
- * @return the list of results
+ * @return The list of results.
*/
static Glib::ListHandle< Glib::RefPtr<Glib::Object> > run(const Glib::ListHandle<Glib::RefPtr<Glib::Object> >& list, const SlotFilter& slot, bool first);
};
Modified: gstreamermm/trunk/gstreamer/src/format.hg
==============================================================================
--- gstreamermm/trunk/gstreamer/src/format.hg (original)
+++ gstreamermm/trunk/gstreamer/src/format.hg Thu May 22 03:38:11 2008
@@ -50,23 +50,23 @@
/** Get a printable name for the given format. Do not modify or free.
*
- * @param format a Gst::Format
- * @return the name of the format or NULL if the format is unknow
+ * @param format A Gst::Format.
+ * @return The name of the format or NULL if the format is unknown.
*/
Glib::ustring get_name(Format f);
/** Get the unique quark for the given format.
*
- * @param format a Gst::Format
- * @return the quark associated with the format or 0 if the format is unknown.
+ * @param format A Gst::Format.
+ * @return The quark associated with the format or 0 if the format is unknown.
*/
Glib::QueryQuark get_quark(Format f);
/** Create a new Gst::Format based on the nick or return an already registered
* format with that nick.
*
- * @param nick The nick of the new format
- * @param description The description of the new format
+ * @param nick The nick of the new format.
+ * @param description The description of the new format.
* @return A new Gst::Format or an already registered format with the same
* nick. MT safe.
*/
@@ -74,7 +74,7 @@
/** Return the format registered with the given nick.
*
- * @param nick The nick of the format
+ * @param nick The nick of the format.
* @return The format with nick or Gst::FORMAT_UNDEFINED if the format was not
* registered.
*/
@@ -85,8 +85,8 @@
/** Get details about the given format.
*
- * @param format The format to get details of
- * @param The Gst::FormatDefinition in which to store details of format.
+ * @param format The format to get details of.
+ * @param def The Gst::FormatDefinition in which to store details of format.
* @return true if successful, false otherwise. MT safe.
*/
bool get_details(Format format, FormatDefinition& def);
Modified: gstreamermm/trunk/gstreamer/src/ghostpad.hg
==============================================================================
--- gstreamermm/trunk/gstreamer/src/ghostpad.hg (original)
+++ gstreamermm/trunk/gstreamer/src/ghostpad.hg Thu May 22 03:38:11 2008
@@ -70,7 +70,7 @@
* The created ghostpad will not have a padtemplate.
*
* @param name The name of the new pad.
- * @param dir The direction of the ghostpad
+ * @param dir The direction of the ghostpad.
* @return A new Gst::GhostPad, or an empty RefPtr in case of an error.
*/
_WRAP_CREATE(const Glib::ustring& name, PadDirection dir)
@@ -82,7 +82,7 @@
* @param name The name of the new pad.
* @param target The pad to ghost.
* @param templ The Gst::PadTemplate to use on the ghostpad.
- * @return a new Gst::GhostPad, or an empty RefPtr in case of an error.
+ * @return A new Gst::GhostPad, or an empty RefPtr in case of an error.
*/
_WRAP_CREATE(const Glib::ustring& name, const Glib::RefPtr<Pad>& target, const Glib::RefPtr<PadTemplate>& templ)
Modified: gstreamermm/trunk/gstreamer/src/pad.hg
==============================================================================
--- gstreamermm/trunk/gstreamer/src/pad.hg (original)
+++ gstreamermm/trunk/gstreamer/src/pad.hg Thu May 22 03:38:11 2008
@@ -138,9 +138,9 @@
* PAUSED, this can take an indeterminate amount of time. Be careful with
* this blocking call as it might not return for reasons stated above.
*
- * @param slot SlotBlock that will be called when the operation succeeds
+ * @param slot SlotBlock that will be called when the operation succeeds.
* @param blocked boolean indicating whether the pad should be blocked or
- * unblocked
+ * unblocked.
* @return true if the pad could be blocked. This function can fail if the
* pad was already in the requested state. MT safe.
*/
@@ -168,7 +168,7 @@
* remove_data_probe().
*
* @param slot The slot to call when data is passed over pad (note: slot is
- * not copied because it is connected to a signal)
+ * not copied because it is connected to a signal).
* @return The handler id which may be used to remove the connection later.
*/
gulong add_data_probe(const SlotData& slot);
@@ -176,16 +176,16 @@
/** Adds a probe that will be called for all buffers passing through a pad.
* See add_data_probe() for more information.
*
- * @param slot The slot to call when buffers are passed over pad
- * @return The handler id
+ * @param slot The slot to call when buffers are passed over pad.
+ * @return The handler id.
*/
gulong add_buffer_probe(const SlotData& slot);
/** Adds a probe that will be called for all events passing through a pad.
* See add_data_probe() for more information.
*
- * @param slot The slot to call when events are passed over pad
- * @return The handler id
+ * @param slot The slot to call when events are passed over pad.
+ * @return The handler id.
*/
gulong add_event_probe(const SlotData& slot);
Modified: gstreamermm/trunk/gstreamer/src/padtemplate.hg
==============================================================================
--- gstreamermm/trunk/gstreamer/src/padtemplate.hg (original)
+++ gstreamermm/trunk/gstreamer/src/padtemplate.hg Thu May 22 03:38:11 2008
@@ -71,12 +71,12 @@
* and with the given arguments. This functions takes ownership of the
* provided caps, so be sure to not use them afterwards.
*
- * @param name_template the name template.
- * @param direction the Gst::PadDirection of the template.
- * @param presence the Gst::PadPresence of the pad.
- * @param caps a Gst::Caps set for the template. The caps are taken ownership
+ * @param name_template The name template.
+ * @param direction The Gst::PadDirection of the template.
+ * @param presence The Gst::PadPresence of the pad.
+ * @param caps A Gst::Caps set for the template. The caps are taken ownership
* of.
- * @return a new Gst::PadTemplate.
+ * @return A new Gst::PadTemplate.
*/
_WRAP_CREATE(const Glib::ustring& name_template, PadDirection direction, PadPresence presence, const Glib::RefPtr<Caps>& caps)
Modified: gstreamermm/trunk/gstreamer/src/parse.hg
==============================================================================
--- gstreamermm/trunk/gstreamer/src/parse.hg (original)
+++ gstreamermm/trunk/gstreamer/src/parse.hg Thu May 22 03:38:11 2008
@@ -48,7 +48,7 @@
{
public:
/** Get the error quark used by the parsing subsystem.
- * @return the quark of the parse errors.
+ * @return The quark of the parse errors.
*/
static Glib::QueryQuark error_quark();
@@ -56,9 +56,9 @@
* might get a return value that is not NULL even though the error is set. In
* this case there was a recoverable parsing error and you can try to play
* the pipeline.
- * @param pipeline_description the command line describing the pipeline
- * @param error the error message in case of an erroneous pipeline.
- * @return a new element on success, NULL on failure. If more than one
+ * @param pipeline_description The command line describing the pipeline.
+ * @param error The error message in case of an erroneous pipeline.
+ * @return A new element on success, NULL on failure. If more than one
* toplevel element is specified by the pipeline_description, all elements
* are put into a Gst::Pipeline, which than is returned.
* @throw Gst::CoreError
@@ -72,10 +72,10 @@
/** Create a new element based on command line syntax. An error does not
* mean that the pipeline could not be constructed.
- * @param argv null-terminated array of arguments
- * @param error will contain an error message if an erroneuos pipeline is
+ * @param argv NULL-terminated array of arguments.
+ * @param error Will contain an error message if an erroneuos pipeline is
* specified.
- * @return a new element on success and NULL on failure.
+ * @return A new element on success and NULL on failure.
* @throw Gst::CoreError
* @throw Gst::ParseError
*/
@@ -94,11 +94,11 @@
* and want them all ghosted, you will have to create the ghost pads
* yourself).
*
- * @param bin_description command line describing the bin
- * @param ghost_unconnected_pads whether to automatically create ghost pads
- * for unconnected source or sink pads within the bin
- * @param err where to store the error message in case of an error
- * @return a newly-created bin, or NULL if an error occurred.
+ * @param bin_description Command line describing the bin.
+ * @param ghost_unconnected_pads Whether to automatically create ghost pads
+ * for unconnected source or sink pads within the bin.
+ * @param err Where to store the error message in case of an error.
+ * @return A newly-created bin, or NULL if an error occurred.
* @throw Gst::CoreError
* @throw Gst::ParseError
*/
Modified: gstreamermm/trunk/gstreamer/src/pipeline.hg
==============================================================================
--- gstreamermm/trunk/gstreamer/src/pipeline.hg (original)
+++ gstreamermm/trunk/gstreamer/src/pipeline.hg Thu May 22 03:38:11 2008
@@ -92,8 +92,8 @@
public:
/** Create a new pipeline with the given name.
*
- * @param name name of new pipeline
- * @return newly created Gst::Pipeline MT safe.
+ * @param name Name of new pipeline.
+ * @return Newly created Gst::Pipeline. MT safe.
*/
_WRAP_CREATE(const Glib::ustring& name)
Modified: gstreamermm/trunk/gstreamer/src/registry.hg
==============================================================================
--- gstreamermm/trunk/gstreamer/src/registry.hg (original)
+++ gstreamermm/trunk/gstreamer/src/registry.hg Thu May 22 03:38:11 2008
@@ -113,9 +113,9 @@
* the results. If the first flag is set, only the first match is returned
* (as a list with a single object).
*
- * @param filter the filter to use
- * @param first only return first match
- * @return a List of Gst::Plugin. MT safe.
+ * @param filter The filter to use.
+ * @param first Only return first match.
+ * @return A list of Gst::Plugin. MT safe.
*
*/
Glib::ListHandle< Glib::RefPtr<Plugin> > get_plugin_list(const Plugin::SlotFilter& filter, bool first);
@@ -124,10 +124,10 @@
* returns a List with the results. If the first flag is set, only the first
* match is returned (as a list with a single object).
*
- * @param registry registry to query
- * @param filter the filter to use
- * @param first only return first match
- * @return a List of Gst::PluginFeature. MT safe.
+ * @param registry Registry to query.
+ * @param filter The filter to use.
+ * @param first Only return first match.
+ * @return A list of Gst::PluginFeature. MT safe.
*/
Glib::ListHandle< Glib::RefPtr<PluginFeature> > get_feature_list(const PluginFeature::SlotFilter& filter, bool first);
@@ -142,21 +142,21 @@
#ifdef USE_BINARY_REGISTRY
/** Read the contents of the binary cache file at location into registry.
*
- * @param location A filename
+ * @param location A filename.
* @return true on success.
*/
bool binary_read_cache(const Glib::ustring& location);
/** Write the registry to a cache to file at given location.
*
- * @param location A filename
+ * @param location A filename.
* @return true on success.
*/
void binary_write_cache(const Glib::ustring& location);
#else
/** Read the contents of the XML cache file at location into registry.
*
- * @param location A filename
+ * @param location A filename.
* @return true on success.
*/
bool xml_read_cache(const Glib::ustring& location);
@@ -164,7 +164,7 @@
/** Write registry in an XML format at the location given by location.
* Directories are automatically created.
*
- * @param location A filename
+ * @param location A filename.
* @return true on success.
*/
bool xml_write_cache(const Glib::ustring& location);
Modified: gstreamermm/trunk/gstreamer/src/structure.ccg
==============================================================================
--- gstreamermm/trunk/gstreamer/src/structure.ccg (original)
+++ gstreamermm/trunk/gstreamer/src/structure.ccg Thu May 22 03:38:11 2008
@@ -102,7 +102,8 @@
void Structure::set_field(const Glib::ustring& fieldname, const Fourcc& value)
{
- //TODO: Or should this be a uint32?
+ //Using a Fourcc is fine because _set_gstructure_field() makes appropriate
+ //conversion to GStreamer GType
Glib::Value<Fourcc> val;
val.init( Glib::Value<Fourcc>::value_type() );
val.set(value);
@@ -128,10 +129,21 @@
set_field(fieldname, val);
}
+
+//We use std::string, because the encoding is unknown. murrayc
+void Structure::set_field(const Glib::ustring& fieldname, const char* value)
+{
+ Glib::Value<std::string> val;
+ val.init( Glib::Value<std::string>::value_type() );
+ val.set(value);
+
+ set_field(fieldname, val);
+}
void Structure::set_field(const Glib::ustring& fieldname, const Glib::Date& value)
{
- //TODO: Or should this be a GDate?
+ //Using a Glib::Date is fine because _set_gstructure_field() makes
+ //appropriate conversion to GStreamer GType
Glib::Value<Glib::Date> val;
val.init( Glib::Value<Glib::Date>::value_type() );
val.set(value);
@@ -141,7 +153,8 @@
void Structure::set_field(const Glib::ustring& fieldname, const ClockTime& value)
{
- //TODO: Or should this be a GstClockTime?
+ //Using a ClockTime is fine because a ClockTime is a GstClockTime which is a
+ //guint64 which GStreamer will interpret correctly
Glib::Value<ClockTime> val;
val.init( Glib::Value<ClockTime>::value_type() );
val.set(value);
@@ -149,15 +162,15 @@
set_field(fieldname, val);
}
-void Structure::set_field(const Glib::ustring& fieldname, GType enumtype, const Glib::ValueBase& value)
+void Structure::set_field(const Glib::ustring& fieldname, GType enumtype, int value)
{
- //TODO: We must need to do something more. murrayc
- set_field(fieldname, value);
+ gst_structure_set(gobj(), fieldname.c_str(), enumtype, value, NULL);
}
void Structure::set_field(const Glib::ustring& fieldname, const Gst::Fraction& value)
{
- //TODO: Or should we use two ints somehow?
+ //Using a Gst::Fraction is fine because _set_gstructure_field() makes
+ //appropriate conversion to GStreamer GType
Glib::Value<Gst::Fraction> val;
val.init( Glib::Value<Gst::Fraction>::value_type() );
val.set(value);
@@ -167,7 +180,8 @@
void Structure::set_field(const Glib::ustring& fieldname, const Gst::FractionRange& value)
{
- //TODO: Or should we use two Fractions somehow?
+ //Using a Gst::FractionRange is fine because _set_gstructure_field() makes
+ //appropriate conversion to GStreamer GType
Glib::Value<Gst::FractionRange> val;
val.init( Glib::Value<Gst::FractionRange>::value_type() );
val.set(value);
@@ -348,14 +362,9 @@
bool
-Structure::get_field(const Glib::ustring& name, GType enum_type, Glib::ValueBase& value) const
+Structure::get_field(const Glib::ustring& name, GType enum_type, int& value) const
{
- bool result = gst_structure_has_field_typed(gobj(), name.c_str(), enum_type);
-
- if (result)
- value.init(gst_structure_get_value(gobj(), name.c_str()));
-
- return result;
+ return gst_structure_get_enum(gobj(), name.c_str(), enum_type, &value);
}
@@ -374,8 +383,16 @@
bool
Structure::get_field(const Glib::ustring& name, Gst::FractionRange& range) const
{
- //TODO
-
+ const GValue* gst_fraction_range_val = gst_structure_get_value(gobj(), name.c_str());
+
+ if (gst_structure_get_field_type(gobj(), name.c_str()) == GST_TYPE_FRACTION_RANGE)
+ {
+ Glib::ValueBase fraction_range_val;
+ fraction_range_val.init(gst_fraction_range_val);
+ range = Gst::FractionRange(fraction_range_val);
+ return true;
+ }
+
return false;
}
Modified: gstreamermm/trunk/gstreamer/src/structure.hg
==============================================================================
--- gstreamermm/trunk/gstreamer/src/structure.hg (original)
+++ gstreamermm/trunk/gstreamer/src/structure.hg Thu May 22 03:38:11 2008
@@ -70,60 +70,171 @@
_WRAP_METHOD(void set_name(const Glib::ustring& name), gst_structure_set_name)
_WRAP_METHOD(Glib::QueryQuark get_name_id() const, gst_structure_get_name_id)
- /** Get the value of the field with name fieldname.
+ /** Get the value of the field with name @a fieldname.
*
- * @param fieldname the name of the field to get
- * @param value the Value class in which to store the value
+ * @param fieldname The name of the field to get.
+ * @param value The Value class in which to store the value.
*/
void get_field(const Glib::ustring& fieldname, Glib::ValueBase& value) const;
- /** Sets the field with the given name field to value. If the field does not
+ /** Sets the field with name @a fieldname to value. If the field does not
* exist, it is created. If the field exists, the previous value is replaced
- * and freed. Returns this Gst::Structure for continued setting convenience.
- * Please note that when setting special GStreamer fields such as
- * Glib::Value<Gst::IntRange> and Glib::Value<Gst::Fraction> (using classes
- * in value.h) they are converted to the GStreamer GTypes and thus when
- * attempting to get these fields back, they can no longer be stored in the
- * same Glib::Value<...>.
+ * and freed. Please note that when setting special GStreamer fields such as
+ * Glib::Value<Gst::IntRange> and Glib::Value<Gst::Fraction> and
+ * Glib::Value<Glib::Date> they are converted to the GStreamer GTypes and
+ * thus when attempting to get these fields back as GValues, they will have
+ * the GStreamer GType and can no longer be stored in the same
+ * Glib::Value<...>.
*
- * @param fieldname the name of the field to set.
- * @param value the new value of the field.
+ * @param fieldname The name of the field to set.
+ * @param value The value to set the field to.
*/
void set_field(const Glib::ustring& fieldname, const Glib::ValueBase& value);
+ /** Sets the field with name @a fieldname to the boolean @a value. If the
+ * field does not exist, it is created. If the field exists, the previous
+ * value is replaced and freed.
+ *
+ * @param fieldname The name of the field to set.
+ * @param value The value to set the field to.
+ */
void set_field(const Glib::ustring& fieldname, bool value);
+ /** Sets the field with name @a fieldname to the int @a value. If the
+ * field does not exist, it is created. If the field exists, the previous
+ * value is replaced and freed.
+ *
+ * @param fieldname The name of the field to set.
+ * @param value The value to set the field to.
+ */
void set_field(const Glib::ustring& fieldname, int value);
+ /** Sets the field with name @a fieldname to the guint @a value. If the
+ * field does not exist, it is created. If the field exists, the previous
+ * value is replaced and freed.
+ *
+ * @param fieldname The name of the field to set.
+ * @param value The value to set the field to.
+ */
void set_field(const Glib::ustring& fieldname, guint value);
+ /** Sets the field with name @a fieldname to the Gst::Fourcc @a value. If
+ * the field does not exist, it is created. If the field exists, the previous
+ * value is replaced and freed. Please note that when setting fields to
+ * special gstreamermm types such as Gst::Fourcc and Gst::Fraction and
+ * Glib::Date they are converted to the GStreamer GTypes and thus when
+ * attempting to get these fields back as GValues, they will have the
+ * GStreamer GType.
+ *
+ * @param fieldname The name of the field to set.
+ * @param value The value to set the field to.
+ */
void set_field(const Glib::ustring& fieldname, const Fourcc& value);
+ /** Sets the field with name @a fieldname to the double @a value. If the
+ * field does not exist, it is created. If the field exists, the previous
+ * value is replaced and freed.
+ *
+ * @param fieldname The name of the field to set.
+ * @param value The value to set the field to.
+ */
void set_field(const Glib::ustring& fieldname, double value);
//We use std::string, because the encoding is unknown. murrayc
+ /** Sets the field with name @a fieldname to the std::string @a value. If
+ * the field does not exist, it is created. If the field exists, the previous
+ * value is replaced and freed.
+ *
+ * @param fieldname The name of the field to set.
+ * @param value The value to set the field to.
+ */
void set_field(const Glib::ustring& fieldname, const std::string& value);
-
+
+ /** Sets the field with name @a fieldname to the string constant @a value. If
+ * the field does not exist, it is created. If the field exists, the previous
+ * value is replaced and freed.
+ *
+ * @param fieldname The name of the field to set.
+ * @param value The value to set the field to.
+ */
+ void set_field(const Glib::ustring& fieldname, const char* value);
+
+ /** Sets the field with name @a fieldname to the Glib::Date @a value. If
+ * the field does not exist, it is created. If the field exists, the previous
+ * value is replaced and freed. Please note that when setting fields to
+ * special types such as Gst::Fourcc and Gst::Fraction and Glib::Date they
+ * are converted to the GStreamer GTypes and thus when attempting to get
+ * these fields back as GValues, they will have the GStreamer GType.
+ *
+ * @param fieldname The name of the field to set.
+ * @param value The value to set the field to.
+ */
void set_field(const Glib::ustring& fieldname, const Glib::Date& value);
+ /** Sets the field with name @a fieldname to the Gst::ClockTime @a value. If
+ * the field does not exist, it is created. If the field exists, the previous
+ * value is replaced and freed.
+ *
+ * @param fieldname The name of the field to set.
+ * @param value The value to set the field to.
+ */
void set_field(const Glib::ustring& fieldname, const ClockTime& value);
- void set_field(const Glib::ustring& fieldname, GType enumtype, const Glib::ValueBase& value);
-
+ /** Sets the field with name @a fieldname to the value @a value of the enum
+ * type @a enum_type. If the field does not exist, it is created. If the
+ * field exists, the previous value is replaced and freed. Caller is
+ * responsible for making sure that @a value is a valid @a enumtype. A call
+ * to this method would look like so:
+ * @code
+ * ...
+ * structure.set_field("state", Glib::Value<Gst::State>::value_type(),
+ * Gst::STATE_PAUSED);
+ * ...
+ * @endcode
+ *
+ * @param fieldname The name of the field to set.
+ * @param enumtype The enum GType that @a value should be treated as.
+ * @param value The value to set the field to.
+ */
+ void set_field(const Glib::ustring& fieldname, GType enumtype, int value);
+
+ /** Sets the field with name @a fieldname to the Gst::Fraction @a value. If
+ * the field does not exist, it is created. If the field exists, the previous
+ * value is replaced and freed. Please note that when setting fields to
+ * special types such as Gst::Fourcc and Gst::Fraction and Glib::Date they
+ * are converted to the GStreamer GTypes and thus when attempting to get
+ * these fields back as GValues, they will have the GStreamer GType.
+ *
+ * @param fieldname The name of the field to set.
+ * @param value The value to set the field to.
+ */
void set_field(const Glib::ustring& fieldname, const Gst::Fraction& value);
+ /** Sets the field with name @a fieldname field to the Gst::FractionRange @a
+ * value. If the field does not exist, it is created. If the field exists,
+ * the previous value is replaced and freed. Please note that when setting
+ * fields to special types such as Gst::Fourcc and Gst::Fraction and
+ * Glib::Date they are converted to the GStreamer GTypes and thus when
+ * attempting to get these fields back as GValues, they will have the
+ * GStreamer GType.
+ *
+ * @param fieldname The name of the field to set.
+ * @param value The value to set the field to.
+ */
void set_field(const Glib::ustring& fieldname, const Gst::FractionRange& value);
+#ifndef DOXYGEN_SHOULD_SKIP_THIS
//Only for use inside gstreamermm:
static void _set_gstructure_field(GstStructure* cstructure, const Glib::ustring& fieldname, const Glib::ValueBase& value);
+#endif /* DOXYGEN_SHOULD_SKIP_THIS */
- /** Removes the field with the given name. If the field with the given name
- * does not exist, the structure is unchanged. Returns this Gst::Structure
- * for continued setting convenience.
+ /** Removes the field with name @a fieldname. If the field with the given
+ * name does not exist, the structure is unchanged. Returns this
+ * Gst::Structure for continued setting convenience.
*
- * @param fieldname the name of the field to remove
- * @return this Gst::Structure
+ * @param fieldname The name of the field to remove.
+ * @return This Gst::Structure.
*/
Structure& remove_field(const Glib::ustring& fieldname);
@@ -142,7 +253,7 @@
/** Calls the provided slot once for each field in the Gst::Structure. The
* slot must not modify the fields. Also see map_in_place().
*
- * @param slot a slot to call for each field
+ * @param slot A slot to call for each field.
* @return true if the supplied slot returns true For each of the fields,
* false otherwise.
*/
@@ -152,157 +263,166 @@
_WRAP_METHOD(bool has_field(const Glib::ustring& fieldname) const, gst_structure_has_field)
_WRAP_METHOD(bool has_field(const Glib::ustring& fieldname, GType type) const, gst_structure_has_field_typed)
- /** Gets the value of the given boolean field.
- * The caller is responsible for making sure the field exists and has the correct
- * type.
- *
- * @param fieldname the name of a field
- * @param value An output parameter that will be set with the value
- * @return true if the value could be set correctly. If there was no field
+ /** Gets the value of field @a fieldname into boolean @a value.
+ * The caller is responsible for making sure the field exists and has the
+ * correct type.
+ *
+ * @param fieldname The name of a field.
+ * @param value An output parameter that will be set with the value.
+ * @return true if @a value could be set correctly. If there was no field
* with @a fieldname or the existing field did not contain a boolean, this
* function returns false.
*/
bool get_field(const Glib::ustring& fieldname, bool& value) const;
_IGNORE(gst_structure_get_boolean)
- /** Gets the value of the given integer field.
- * The caller is responsible for making sure the field exists and has the correct
- * type.
- *
- * @param fieldname the name of a field
- * @param value An output parameter that will be set with the value
- * @return true if the value could be set correctly. If there was no field
- * with @a fieldname or the existing field did not contain an int, this function
- * returns false.
+ /** Gets the value of field @a fieldname into integer @a value.
+ * The caller is responsible for making sure the field exists and has the
+ * correct type.
+ *
+ * @param fieldname The name of a field.
+ * @param value An output parameter that will be set with the value.
+ * @return true if @a value could be set correctly. If there was no field
+ * with @a fieldname or the existing field did not contain an int, this
+ * function returns false.
*/
bool get_field(const Glib::ustring& fieldname, int& value) const;
_IGNORE(gst_structure_get_int)
- /** Gets the value of the given unsigned integer field.
- * The caller is responsible for making sure the field exists and has the correct
- * type.
- *
- * @param fieldname the name of a field
- * @param value An output parameter that will be set with the value
- * @return true if the value could be set correctly. If there was no field
- * with @a fieldname or the existing field did not contain an uint, this
+ /** Gets the value of field @a fieldname into guint @a value.
+ * The caller is responsible for making sure the field exists and has the
+ * correct type.
+ *
+ * @param fieldname The name of a field.
+ * @param value An output parameter that will be set with the value.
+ * @return true if @a value could be set correctly. If there was no field
+ * with @a fieldname or the existing field did not contain an guint, this
* function returns false.
*/
bool get_field(const Glib::ustring& fieldname, guint& value) const;
_IGNORE(gst_structure_get_uint)
- /** Gets the value of the given Fourcc field.
- * The caller is responsible for making sure the field exists and has the correct
- * type.
- *
- * @param fieldname the name of a field
- * @param value An output parameter that will be set with the value
- * @return true if the value could be set correctly. If there was no field
- * with @a fieldname or the existing field did not contain a fourc, this
- * function returns false.
+ /** Gets the value of field @a fieldname into Gst::Fourcc @a value.
+ * The caller is responsible for making sure the field exists and has the
+ * correct type.
+ *
+ * @param fieldname The name of a field.
+ * @param value An output parameter that will be set with the value.
+ * @return true if @a value could be set correctly. If there was no field
+ * with @a fieldname or the existing field did not contain a Gst::Fourcc,
+ * this function returns false.
*/
bool get_field(const Glib::ustring& fieldname, Fourcc& value) const;
_IGNORE(gst_structure_get_fourcc)
- /** Gets the value of the given double field.
- * The caller is responsible for making sure the field exists and has the correct
- * type.
- *
- * @param fieldname the name of a field
- * @param value An output parameter that will be set with the value
- * @return true if the value could be set correctly. If there was no field
+ /** Gets the value of field @a fieldname into double @a value.
+ * The caller is responsible for making sure the field exists and has the
+ * correct type.
+ *
+ * @param fieldname The name of a field.
+ * @param value An output parameter that will be set with the value.
+ * @return true if @a value could be set correctly. If there was no field
* with @a fieldname or the existing field did not contain a double, this
* function returns false.
*/
bool get_field(const Glib::ustring& fieldname, double& value) const;
_IGNORE(gst_structure_get_double)
- /** Gets the value of the given string field.
- * The caller is responsible for making sure the field exists and has the correct
- * type.
- *
- * @param fieldname the name of a field
- * @param value An output parameter that will be set with the value
- * @return true if the value could be set correctly. If there was no field
+ /** Gets the value of field @a fieldname into Glib::ustring @a value.
+ * The caller is responsible for making sure the field exists and has the
+ * correct type.
+ *
+ * @param fieldname The name of a field.
+ * @param value An output parameter that will be set with the value.
+ * @return true if @a value could be set correctly. If there was no field
* with @a fieldname or the existing field did not contain a string, this
* function returns false.
*/
bool get_field(const Glib::ustring& fieldname, Glib::ustring& value) const;
- /** Gets the value of the given string field.
- * The caller is responsible for making sure the field exists and has the correct
- * type.
- *
- * @param fieldname the name of a field
- * @param value An output parameter that will be set with the value
- * @return true if the value could be set correctly. If there was no field
+ /** Gets the value of field @a fieldname into std::string @a value.
+ * The caller is responsible for making sure the field exists and has the
+ * correct type.
+ *
+ * @param fieldname The name of a field.
+ * @param value An output parameter that will be set with the value.
+ * @return true if @a value could be set correctly. If there was no field
* with @a fieldname or the existing field did not contain a string, this
* function returns false.
*/
bool get_field(const Glib::ustring& fieldname, std::string& value) const;
_IGNORE(gst_structure_get_string)
- /** Gets the value of the given date field.
- * The caller is responsible for making sure the field exists and has the correct
- * type.
- *
- * @param fieldname the name of a field.
- * @param date the Glib::Date to set
- * @return true if the value could be set correctly. If there was no field
- * with @a fieldname or the existing field did not contain a GDate, this
+ /** Gets the value of field @a fieldname into Glib::Date @a value.
+ * The caller is responsible for making sure the field exists and has the
+ * correct type.
+ *
+ * @param fieldname The name of a field.
+ * @param date The Glib::Date to set.
+ * @return true if @a value could be set correctly. If there was no field
+ * with @a fieldname or the existing field did not contain a Glib::Date, this
* function returns false.
*/
bool get_field(const Glib::ustring& fieldname, Glib::Date& value) const;
_IGNORE(gst_structure_get_date)
- /** Gets the value of the given clock time field.
- * The caller is responsible for making sure the field exists and has the correct
- * type.
- *
- * @param fieldname the name of a field.
- * @param value An output parameter that will be set with the value
- * @return true if the value could be set correctly. If there was no field
+ /** Gets the value of field @a fieldname into Gst::ClockTime @a value.
+ * The caller is responsible for making sure the field exists and has the
+ * correct type.
+ *
+ * @param fieldname The name of a field.
+ * @param value An output parameter that will be set with the value.
+ * @return true if @a value could be set correctly. If there was no field
* with @a fieldname or the existing field did not contain a Gst::ClockTime,
* this function returns false.
*/
bool get_field(const Glib::ustring& fieldname, ClockTime& value) const;
_IGNORE(gst_structure_get_clocktime)
- //TODO: Don't use ValueBase.
- /** Sets the GValue of value to the enum value of the given field. Caller
- * is responsible for making sure the field exists and has the correct type.
- *
- * @param fieldname the name of a field
- * @param value An output parameter that will be set with the value
- * @return true if the value could be set correctly. If there was no field
- * with @a fieldname or the existing field did not contain a enum, this
+ /** Gets the value of field @a fieldname with GType enum type @a enumtype
+ * into integer @a value. Caller is responsible for making sure the
+ * field exists and has the correct type. A call to this method would look
+ * like so:
+ * @code
+ * ...
+ * int state;
+ * structure.get_field("state", Glib::Value<Gst::State>::value_type(),
+ * state);
+ * ...
+ * @endcode
+ *
+ * @param fieldname The name of a field.
+ * @param enumtype The enum GType of the field.
+ * @param value An output parameter that will be set with the value.
+ * @return true if @a value could be set correctly. If there was no field
+ * with @a fieldname or the existing field did not contain an enum, this
* function returns false.
*/
- bool get_field(const Glib::ustring& fieldname, GType enumtype, Glib::ValueBase& value) const;
+ bool get_field(const Glib::ustring& fieldname, GType enumtype, int& value) const;
_IGNORE(gst_structure_get_enum)
- /** Gets the value of the given fraction field.
- * The caller is responsible for making sure the field exists and has the correct
- * type.
- *
- * @param fieldname the name of a field
- * @param fraction the Gst::Fraction to set
- * @return true if the value could be set correctly. If there was no field
- * with @a fieldname or the existing field did not contain a Gst::FractionRange, this
- * function returns false.
+ /** Gets the value of field @a fieldname into Gst::Fraction @a value.
+ * The caller is responsible for making sure the field exists and has the
+ * correct type.
+ *
+ * @param fieldname The name of a field.
+ * @param fraction The Gst::Fraction to set.
+ * @return true if @a value could be set correctly. If there was no field
+ * with @a fieldname or the existing field did not contain a Gst::Fraction,
+ * this function returns false.
*/
bool get_field(const Glib::ustring& fieldname, Gst::Fraction& fraction) const;
_IGNORE(gst_structure_get_fraction)
- /** Gets the value of the given fraction-range field.
- * The caller is responsible for making sure the field exists and has the correct
- * type.
- *
- * @param fieldname the name of a field
- * @param fraction the Gst::FractionRange to set
- * @return true if the value could be set correctly. If there was no field
- * with @a fieldname or the existing field did not contain a Gst::Fraction, this
- * function returns false.
+ /** Gets the value of field @a fieldname into Gst::FractionRange @a value.
+ * The caller is responsible for making sure the field exists and has the
+ * correct type.
+ *
+ * @param fieldname The name of a field.
+ * @param fraction The Gst::FractionRange to set.
+ * @return true if @a value could be set correctly. If there was no field
+ * with @a fieldname or the existing field did not contain a
+ * Gst::FractionRange, this function returns false.
*/
bool get_field(const Glib::ustring& fieldname, Gst::FractionRange& fraction) const;
@@ -319,7 +439,7 @@
* contrast to foreach(), the function may modify but not delete the fields.
* The structure must be mutable.
*
- * @param slot a slot to call for each field
+ * @param slot A slot to call for each field.
* @return true if the supplied slot returns true For each of the fields,
* false otherwise.
*/
Modified: gstreamermm/trunk/gstreamer/src/taglist.hg
==============================================================================
--- gstreamermm/trunk/gstreamer/src/taglist.hg (original)
+++ gstreamermm/trunk/gstreamer/src/taglist.hg Thu May 22 03:38:11 2008
@@ -60,7 +60,7 @@
/** Calls the given slot for each tag inside the tag list. Note that if there
* is no tag, the slot won't be called at all.
*
- * @param slot slot to be called for each tag
+ * @param slot Slot to be called for each tag.
*/
void foreach(const SlotForeach& slot);
};
Modified: gstreamermm/trunk/gstreamer/src/task.hg
==============================================================================
--- gstreamermm/trunk/gstreamer/src/task.hg (original)
+++ gstreamermm/trunk/gstreamer/src/task.hg Thu May 22 03:38:11 2008
@@ -76,7 +76,7 @@
* The slot cannot be changed after the task has been created. You must
* create a new Gst::Task to change the slot.
*
- * @param slot The Gst::Task::SlotTask to use
+ * @param slot The Gst::Task::SlotTask to use.
* @return A new Gst::Task. MT safe.
*/
static Glib::RefPtr<Task> create(const SlotTask& slot);
Modified: gstreamermm/trunk/gstreamer/src/xml.hg
==============================================================================
--- gstreamermm/trunk/gstreamer/src/xml.hg (original)
+++ gstreamermm/trunk/gstreamer/src/xml.hg Thu May 22 03:38:11 2008
@@ -45,9 +45,9 @@
/** Fills the Gst::XML object with the corresponding elements from an in
* memory XML buffer.
*
- * @param buffer The in memory XML buffer
- * @param root The name of the root objects to build
- * @return true on success
+ * @param buffer The in memory XML buffer.
+ * @param root The name of the root objects to build.
+ * @return true on success.
*/
bool parse_memory(const std::string& buffer, const std::string& root);
Modified: gstreamermm/trunk/tests/test-structure.cc
==============================================================================
--- gstreamermm/trunk/tests/test-structure.cc (original)
+++ gstreamermm/trunk/tests/test-structure.cc Thu May 22 03:38:11 2008
@@ -36,6 +36,7 @@
Glib::Date date;
date.set_time_current();
structure.set_field("date", date);
+ structure.set_field("state", Glib::Value<Gst::State>::value_type(), Gst::STATE_PAUSED);
Glib::ustring value1;
structure.get_field("string", value1);
@@ -60,5 +61,10 @@
std::cout << "date value = " << value5.get_month() << "/" <<
(int) value5.get_day() << "/" << value5.get_year() << std::endl;
+ int state;
+ structure.get_field("state", Glib::Value<Gst::State>::value_type(), state);
+ if (state = Gst::STATE_PAUSED)
+ std::cout << "state value = Gst::STATE_PAUSED" << std::endl;
+
return 0;
}
Modified: gstreamermm/trunk/tools/m4/class_gstminiobject.m4
==============================================================================
--- gstreamermm/trunk/tools/m4/class_gstminiobject.m4 (original)
+++ gstreamermm/trunk/tools/m4/class_gstminiobject.m4 Thu May 22 03:38:11 2008
@@ -91,7 +91,7 @@
{
/** @relates __NAMESPACE__::__CPPNAME__
* @param object The C instance
- * @param take_copy False if the result should take ownership of the C instance. True if it should take a new copy or ref.
+ * @param take_copy false if the result should take ownership of the C instance. true if it should take a new copy or ref.
* @result A C++ instance that wraps this C instance.
*/
Glib::RefPtr<__NAMESPACE__::__CPPNAME__> wrap(__REAL_CNAME__`'* object, bool take_copy = false);
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]