camerabin2: Adding debug categories

Adding debug categories to v4l2camerasrc and camerabin2, also
removing generic category from camerabingeneral.
This commit is contained in:
Thiago Santos 2010-11-29 10:45:30 -03:00
parent 8fb8822532
commit dee167edc8
4 changed files with 11 additions and 11 deletions

View file

@ -31,8 +31,6 @@
#include "camerabingeneral.h"
#include <glib.h>
GST_DEBUG_CATEGORY (gst_camerabin_debug);
/**
* gst_camerabin_add_element:
* @bin: add an element to this bin

View file

@ -35,8 +35,4 @@ void gst_camerabin_remove_elements_from_bin (GstBin * bin);
gboolean gst_camerabin_drop_eos_probe (GstPad * pad, GstEvent * event, gpointer u_data);
/* debug logging category */
GST_DEBUG_CATEGORY_EXTERN (gst_camerabin_debug);
#define GST_CAT_DEFAULT gst_camerabin_debug
#endif /* #ifndef __CAMERABIN_GENERAL_H_ */

View file

@ -28,8 +28,10 @@
#include "gstcamerabin2.h"
/* prototypes */
GST_DEBUG_CATEGORY_STATIC (gst_camera_bin_debug);
#define GST_CAT_DEFAULT gst_camera_bin_debug
/* prototypes */
enum
{
@ -138,8 +140,10 @@ gst_camera_bin_change_state (GstElement * element, GstStateChange trans);
static void
gst_camera_bin_start_capture (GstCameraBin * camerabin)
{
GST_DEBUG_OBJECT (camerabin, "Received start-capture");
g_mutex_lock (camerabin->capture_mutex);
if (!camerabin->capturing) {
GST_INFO_OBJECT (camerabin, "Starting capture, mode: %d", camerabin->mode);
g_object_set (camerabin->src, "mode", camerabin->mode, NULL);
camerabin->capturing = TRUE;
} else {
@ -381,6 +385,8 @@ gst_camerabin_get_property (GObject * object, guint prop_id,
gboolean
gst_camera_bin_plugin_init (GstPlugin * plugin)
{
GST_DEBUG_CATEGORY_INIT (gst_camera_bin_debug, "camerabin2", 0, "CameraBin2");
return gst_element_register (plugin, "camerabin2", GST_RANK_NONE,
gst_camera_bin_get_type ());
}

View file

@ -41,8 +41,8 @@
/* Using "bilinear" as default zoom method */
#define CAMERABIN_DEFAULT_ZOOM_METHOD 1
//GST_DEBUG_CATEGORY (v4l2_camera_src_debug);
//#define GST_CAT_DEFAULT v4l2_camera_src_debug
GST_DEBUG_CATEGORY (v4l2_camera_src_debug);
#define GST_CAT_DEFAULT v4l2_camera_src_debug
GST_BOILERPLATE (GstV4l2CameraSrc, gst_v4l2_camera_src, GstBaseCameraSrc,
GST_TYPE_BASE_CAMERA_SRC);
@ -999,8 +999,8 @@ gst_v4l2_camera_src_base_init (gpointer g_class)
{
GstElementClass *gstelement_class = GST_ELEMENT_CLASS (g_class);
// GST_DEBUG_CATEGORY_INIT (v4l2_camera_src_debug, "v4l2_camera_src", 0,
// "V4l2 camera src");
GST_DEBUG_CATEGORY_INIT (v4l2_camera_src_debug, "v4l2camerasrc", 0,
"V4l2 camera src");
gst_element_class_set_details_simple (gstelement_class,
"V4l2 camera src element for camerabin", "Source/Video",