gst/gstevent.c: Little documentation improvment.

Original commit message from CVS:
* gst/gstevent.c:
Little documentation improvment.
* gst/gstpreset.c:
More TODO cleanups. Remove c++ comments.
* libs/gst/controller/gstcontroller.c:
Add TODO and use quark from static string.
* tests/check/gst/gstmessage.c:
* tests/check/gst/gststructure.c:
Use quark from static string.
This commit is contained in:
Stefan Kost 2007-11-17 17:50:21 +00:00
parent 3aca801f4d
commit d8e77f9bf8
6 changed files with 36 additions and 18 deletions

View file

@ -1,3 +1,18 @@
2007-11-17 Stefan Kost <ensonic@users.sf.net>
* gst/gstevent.c:
Little documentation improvment.
* gst/gstpreset.c:
More TODO cleanups. Remove c++ comments.
* libs/gst/controller/gstcontroller.c:
Add TODO and use quark from static string.
* tests/check/gst/gstmessage.c:
* tests/check/gst/gststructure.c:
Use quark from static string.
2007-11-17 Stefan Kost <ensonic@users.sf.net>
* gst/gstpreset.c:

View file

@ -37,7 +37,7 @@
* The event should be unreffed with gst_event_unref() if it has not been sent.
*
* Events that have been received can be parsed with their respective
* gst_event_parse_*() functions.
* gst_event_parse_*() functions. It is valid to pass %NULL for unwanted details.
*
* Events are passed between elements in parallel to the data stream. Some events
* are serialized with buffers, others are not. Some events only travel downstream,

View file

@ -30,15 +30,22 @@
* on demand, if presets are not used, the list is not created.
*
*/
/* @TODO:
/* @todo:
* - we need locks to avoid two instances manipulating the preset list -> flock
* - need to add support for GstChildProxy
* - how can we support both Preferences and Presets, a flag for _get_preset_names ?
* - how can we support both Preferences and Presets,
* - preferences = static settings (non controlable)
* - preset = a snapshot of dynamic params
* - flag
* - we could save all, but have a flag when loading
* - we could use a flag for _get_preset_names()
*
* - should there be a 'preset-list' property to get the preset list
* (and to connect a notify:: to to listen for changes)
* - do we want to ship presets for some elements?
* - should there be a 'preset-name' property so that we can set a preset via
* gst-launch
*
* http://www.buzztard.org/index.php/Preset_handling_interface
* - do we want to ship presets for some elements?
*/
#include "gst_private.h"
@ -202,7 +209,7 @@ gst_preset_default_get_preset_names (GstPreset * self)
}
if (!fgets (line, LINE_LEN, in))
goto eof_error;
/* @todo: what version */
/* @todo: what version (core?) */
if (!fgets (line, LINE_LEN, in))
goto eof_error;
if (strcmp (g_strchomp (line), element_name)) {
@ -421,7 +428,7 @@ gst_preset_default_save_presets_file (GstPreset * self)
GST_DEBUG ("saving preset file: '%s'", preset_path);
// create backup if possible
/* create backup if possible */
bak_file_name = g_strdup_printf ("%s.bak", preset_path);
if (g_file_test (bak_file_name, G_FILE_TEST_EXISTS)) {
if (g_unlink (bak_file_name)) {
@ -436,9 +443,6 @@ gst_preset_default_save_presets_file (GstPreset * self)
}
g_free (bak_file_name);
/* @todo: create backup */
/* write presets */
if ((out = fopen (preset_path, "wb"))) {
const gchar *element_name = G_OBJECT_TYPE_NAME (self);
@ -449,7 +453,7 @@ gst_preset_default_save_presets_file (GstPreset * self)
/* write header */
if (!(fputs ("GStreamer Preset\n", out)))
goto eof_error;
/* @todo: what version */
/* @todo: what version (core?) */
if (!(fputs ("1.0\n", out)))
goto eof_error;
if (!(fputs (element_name, out)))
@ -771,13 +775,11 @@ gst_preset_default_create_preset (GstPreset * self)
(self)), &number_of_properties))) {
gdouble rnd;
/* @todo: what about voice properties */
GST_INFO ("nr of values : %d", number_of_properties);
for (i = 0; i < number_of_properties; i++) {
property = properties[i];
/* skip non-controlable, trigger params & voice params */
/* skip non-controlable, and non persistent params */
if (!(property->flags & GST_PARAM_CONTROLLABLE))
continue;
/* we do not want to create a setting for trigger properties, buzztard
@ -836,10 +838,10 @@ gst_preset_default_create_preset (GstPreset * self)
enum_class->minimum) * rnd)), NULL);
} break;
default:
//GST_WARNING("unhandled GType=%d:'%s'",param_type,G_VALUE_TYPE_NAME(param_type));
GST_WARNING ("unhandled GType=%d", param_type);
}
}
/* @todo: handle childproxy properties as well */
}
}

View file

@ -188,6 +188,7 @@ gst_controller_find_controlled_property (GstController * self,
for (node = self->properties; node; node = g_list_next (node)) {
prop = node->data;
/* FIXME: eventually use GQuark to speed it up */
if (!strcmp (prop->name, name)) {
return prop;
}
@ -909,7 +910,7 @@ _gst_controller_class_init (GstControllerClass * klass)
gobject_class->dispose = _gst_controller_dispose;
gobject_class->finalize = _gst_controller_finalize;
__gst_controller_key = g_quark_from_string ("gst::controller");
__gst_controller_key = g_quark_from_static_string ("gst::controller");
/* register properties */
g_object_class_install_property (gobject_class, PROP_CONTROL_RATE,

View file

@ -28,7 +28,7 @@ GST_START_TEST (test_parsing)
{
GstMessage *message;
domain = g_quark_from_string ("test");
domain = g_quark_from_static_string ("test");
/* GST_MESSAGE_EOS */
{

View file

@ -234,7 +234,7 @@ GST_START_TEST (test_structure_new)
gst_structure_free (s);
domain = g_quark_from_string ("test");
domain = g_quark_from_static_string ("test");
e = g_error_new (domain, 0, "a test error");
s = gst_structure_new ("name", "key", GST_TYPE_G_ERROR, e, NULL);
g_error_free (e);