#include <stdio.h>
#include <memory.h>
+#include <gst/gst.h>
+
#include "interface/vcos/vcos.h"
#include "interface/vmcs_host/vc_vchi_gencmd.h"
#include "interface/mmal/util/mmal_util_params.h"
#include "interface/mmal/util/mmal_default_components.h"
#include "RaspiCamControl.h"
+#include "RaspiCapture.h"
#if 0
/// Structure to cross reference exposure strings against the MMAL parameter equivalent
if (encoder_output->buffer_size < encoder_output->buffer_size_min)
encoder_output->buffer_size = encoder_output->buffer_size_min;
- g_print("encoder buffer size is %u\n", (guint)encoder_output->buffer_size);
+ GST_DEBUG ("encoder buffer size is %u", (guint)encoder_output->buffer_size);
encoder_output->buffer_num = encoder_output->buffer_num_recommended;
#include "RaspiCamControl.h"
#include "RaspiPreview.h"
+GST_DEBUG_CATEGORY_EXTERN (gst_rpi_cam_src_debug);
+#define GST_CAT_DEFAULT gst_rpi_cam_src_debug
+
+#undef fprintf
+#define fprintf(f,...) GST_LOG(__VA_ARGS__)
G_BEGIN_DECLS
/** Structure containing all state information for the current run
#include "interface/mmal/util/mmal_default_components.h"
#include "interface/mmal/util/mmal_connection.h"
-GST_DEBUG_CATEGORY_STATIC (gst_rpi_cam_src_debug);
-#define GST_CAT_DEFAULT gst_rpi_cam_src_debug
+GST_DEBUG_CATEGORY (gst_rpi_cam_src_debug);
/* Filter signals and args */
enum
gst_rpi_cam_src_start (GstBaseSrc * parent)
{
GstRpiCamSrc *src = GST_RPICAMSRC (parent);
- g_print ("In src_start()\n");
+ GST_LOG_OBJECT (src, "In src_start()");
src->capture_state = raspi_capture_setup (&src->capture_config);
if (src->capture_state == NULL)
return FALSE;
static gboolean
gst_rpi_cam_src_decide_allocation (GstBaseSrc * bsrc, GstQuery * query)
{
- g_print ("In decide_allocation\n");
+ GST_LOG_OBJECT (bsrc, "In decide_allocation");
return GST_BASE_SRC_CLASS (parent_class)->decide_allocation (bsrc, query);
}
/* FIXME: Use custom allocator */
ret = raspi_capture_fill_buffer (src->capture_state, buf);
if (*buf)
- GST_LOG_OBJECT (src, "Made buffer of size %" G_GSIZE_FORMAT "\n",
+ GST_LOG_OBJECT (src, "Made buffer of size %" G_GSIZE_FORMAT,
gst_buffer_get_size (*buf));
return ret;