From: Thomas V. S. <tho...@pd...> - 2004-07-02 13:24:48
|
CVS Root: /cvs/gstreamer Module: gstreamer Changes by: thomasvs Date: Fri Jul 02 2004 23:24:45 EST Log message: fix some dparams stuff Modified files: . : ChangeLog libs/gst/control: control.c dparam.c dparam_smooth.c dparammanager.c dparammanager.h testsuite/dynparams: Makefile.am dparamstest.c Links: http://freedesktop.org/cgi-bin/viewcvs.cgi/gstreamer/gstreamer/ChangeLog.diff?r1=1.620&r2=1.621 http://freedesktop.org/cgi-bin/viewcvs.cgi/gstreamer/gstreamer/libs/gst/control/control.c.diff?r1=1.7&r2=1.8 http://freedesktop.org/cgi-bin/viewcvs.cgi/gstreamer/gstreamer/libs/gst/control/dparam.c.diff?r1=1.23&r2=1.24 http://freedesktop.org/cgi-bin/viewcvs.cgi/gstreamer/gstreamer/libs/gst/control/dparam_smooth.c.diff?r1=1.13&r2=1.14 http://freedesktop.org/cgi-bin/viewcvs.cgi/gstreamer/gstreamer/libs/gst/control/dparammanager.c.diff?r1=1.23&r2=1.24 http://freedesktop.org/cgi-bin/viewcvs.cgi/gstreamer/gstreamer/libs/gst/control/dparammanager.h.diff?r1=1.12&r2=1.13 http://freedesktop.org/cgi-bin/viewcvs.cgi/gstreamer/gstreamer/testsuite/dynparams/Makefile.am.diff?r1=1.8&r2=1.9 http://freedesktop.org/cgi-bin/viewcvs.cgi/gstreamer/gstreamer/testsuite/dynparams/dparamstest.c.diff?r1=1.11&r2=1.12 ====Begin Diffs==== Index: ChangeLog =================================================================== RCS file: /cvs/gstreamer/gstreamer/ChangeLog,v retrieving revision 1.620 retrieving revision 1.621 diff -u -d -r1.620 -r1.621 --- ChangeLog 2 Jul 2004 10:15:14 -0000 1.620 +++ ChangeLog 2 Jul 2004 13:24:32 -0000 1.621 @@ -1,5 +1,18 @@ 2004-07-02 Thomas Vander Stichele <thomas at apestaart dot org> + * libs/gst/control/control.c: + * libs/gst/control/dparam.c: + * libs/gst/control/dparam_smooth.c: (gst_dpsmooth_get_type): + * libs/gst/control/dparammanager.c: + * libs/gst/control/dparammanager.h: + * testsuite/dynparams/Makefile.am: + * testsuite/dynparams/dparamstest.c: (gst_dptest_base_init), + (gst_dptest_change_state), (gst_dptest_chain), (main): + fix testcase for dparams + add debugging category + +2004-07-02 Thomas Vander Stichele <thomas at apestaart dot org> * testsuite/Rules: change path Index: control.c RCS file: /cvs/gstreamer/gstreamer/libs/gst/control/control.c,v retrieving revision 1.7 retrieving revision 1.8 diff -u -d -r1.7 -r1.8 --- control.c 13 Mar 2004 15:26:54 -0000 1.7 +++ control.c 2 Jul 2004 13:24:33 -0000 1.8 @@ -24,6 +24,7 @@ #include "control.h" GST_DEBUG_CATEGORY (_gst_control_debug); +#define GST_CAT_DEFAULT _gst_control_debug void gst_control_init (int *argc, char **argv[]) Index: dparam.c RCS file: /cvs/gstreamer/gstreamer/libs/gst/control/dparam.c,v retrieving revision 1.23 retrieving revision 1.24 diff -u -d -r1.23 -r1.24 --- dparam.c 24 Mar 2004 15:51:27 -0000 1.23 +++ dparam.c 2 Jul 2004 13:24:33 -0000 1.24 @@ -32,6 +32,7 @@ #include <gst/gstmarshal.h> GST_DEBUG_CATEGORY_EXTERN (_gst_control_debug); static void gst_dparam_class_init (GstDParamClass * klass); static void gst_dparam_init (GstDParam * dparam); Index: dparam_smooth.c RCS file: /cvs/gstreamer/gstreamer/libs/gst/control/dparam_smooth.c,v retrieving revision 1.13 retrieving revision 1.14 diff -u -d -r1.13 -r1.14 --- dparam_smooth.c 15 Mar 2004 19:27:11 -0000 1.13 +++ dparam_smooth.c 2 Jul 2004 13:24:33 -0000 1.14 @@ -31,6 +31,7 @@ #include "dparammanager.h" static void gst_dpsmooth_class_init (GstDParamSmoothClass * klass); static void gst_dpsmooth_init (GstDParamSmooth * dparam); Index: dparammanager.c RCS file: /cvs/gstreamer/gstreamer/libs/gst/control/dparammanager.c,v --- dparammanager.c 24 Mar 2004 15:51:27 -0000 1.23 +++ dparammanager.c 2 Jul 2004 13:24:33 -0000 1.24 @@ -25,6 +25,7 @@ #include <gst/gstinfo.h> static GHashTable *_element_registry = NULL; static gboolean _gst_dpman_init_done = FALSE; @@ -145,10 +146,10 @@ /** * gst_dpman_new: - * @name: name of the GstDParamManager instance - * @parent: element which created this instance + * @name: name of the new #GstDParamManager instance to create + * @parent: #GstElement which creates this instance * - * Returns: a new instance of GstDParamManager + * Returns: a new instance of #GstDParamManager. */ GstDParamManager * gst_dpman_new (gchar * name, GstElement * parent) Index: dparammanager.h RCS file: /cvs/gstreamer/gstreamer/libs/gst/control/dparammanager.h,v retrieving revision 1.12 diff -u -d -r1.12 -r1.13 --- dparammanager.h 28 Apr 2004 23:26:06 -0000 1.12 +++ dparammanager.h 2 Jul 2004 13:24:33 -0000 1.13 @@ -73,14 +73,14 @@ /* mode state */ GstDPMMode* mode; gchar *mode_name; - - guint frames_to_process; /* the number of frames in the current buffer */ - guint next_update_frame; /* the frame when the next update is required */ + guint frames_to_process; /* number of frames in the current buffer */ + guint next_update_frame; /* frame when the next update is required */ /* the following data is only used for async mode */ guint rate; /* the frame/sample rate - */ - guint rate_ratio; /* number used to convert between samples and time */ - guint num_frames; /* the number of frames in the current buffer */ + guint rate_ratio; /* used to convert between samples and time */ + guint num_frames; /* number of frames in the current buffer */ gint64 time_buffer_ends; gint64 time_buffer_starts; @@ -106,11 +106,11 @@ GstDParam *dparam; guint next_update_frame; GstDPMUpdateMethod update_method; gpointer update_data; GstDPMUpdateFunction update_func; gchar *unit_name; GstDParamUpdateInfo update_info; }; @@ -131,7 +131,8 @@ #define GST_DPMAN_PROCESS(dpman, frame_count) \ (frame_count < dpman->next_update_frame || \ - (dpman->next_update_frame < dpman->num_frames && (GST_DPMAN_PROCESSFUNC(dpman)(dpman, frame_count)))) + (dpman->next_update_frame < dpman->num_frames \ + && (GST_DPMAN_PROCESSFUNC(dpman)(dpman, frame_count)))) #define GST_DPMAN_CALLBACK_UPDATE(dpwrap, value) ((dpwrap->update_func)(value, dpwrap->update_data)) Index: Makefile.am RCS file: /cvs/gstreamer/gstreamer/testsuite/dynparams/Makefile.am,v retrieving revision 1.9 diff -u -d -r1.8 -r1.9 --- Makefile.am 4 May 2004 12:38:36 -0000 1.8 +++ Makefile.am 2 Jul 2004 13:24:33 -0000 1.9 @@ -1,7 +1,7 @@ include ../Rules -tests_pass = -tests_fail = dparamstest +tests_pass = dparamstest +tests_fail = tests_ignore = dparamstest_CFLAGS = $(GST_OBJ_CFLAGS) Index: dparamstest.c RCS file: /cvs/gstreamer/gstreamer/testsuite/dynparams/dparamstest.c,v retrieving revision 1.11 diff -u -d -r1.11 -r1.12 --- dparamstest.c 15 Mar 2004 19:27:16 -0000 1.11 +++ dparamstest.c 2 Jul 2004 13:24:33 -0000 1.12 @@ -111,8 +111,6 @@ GstElementClass *element_class = GST_ELEMENT_CLASS (g_class); gst_element_class_set_details (element_class, &dptest_details); - - g_print ("got here %d\n", __LINE__); } static void @@ -177,7 +175,6 @@ GstDpTest *dptest; g_return_val_if_fail (GST_IS_DPTEST (element), GST_STATE_FAILURE); - g_print ("changing state\n"); dptest = GST_DPTEST (element); if (GST_ELEMENT_CLASS (parent_class)->change_state) @@ -190,17 +187,21 @@ gst_dptest_chain (GstPad * pad, GstData * data) { - gint frame_countdown; + gint frame_count; dptest = GST_DPTEST (gst_pad_get_parent (pad)); g_assert (dptest); + g_print ("dp chain\n"); /* we're using a made up buffer size of 64 and a timestamp of zero */ - frame_countdown = GST_DPMAN_PREPROCESS (dptest->dpman, 64, 0LL); - while (GST_DPMAN_PROCESS (dptest->dpman, frame_countdown)); + g_print ("preprocess\n"); + frame_count = 0; + GST_DPMAN_PREPROCESS (dptest->dpman, 64, 0LL); - g_print ("dp chain\n"); + while (GST_DPMAN_PROCESS (dptest->dpman, frame_count)) { + ++frame_count; + } + g_print ("dp chain done\n"); gboolean @@ -235,8 +236,6 @@ GstDParam *dp_float1; GValue *dp_float1_value; - alarm (10); gst_init (&argc, &argv); gst_control_init (&argc, &argv); @@ -261,10 +260,10 @@ gst_bin_add (GST_BIN (pipeline), testelement); gst_bin_add (GST_BIN (pipeline), sink); - g_print ("playing pipeline\n"); g_object_set (G_OBJECT (src), "num_buffers", 1, NULL); + g_print ("setting pipeline to play\n"); gst_element_set_state (GST_ELEMENT (pipeline), GST_STATE_PLAYING); /* test that dparam manager is accessable */ |