mirror of
https://gitlab.freedesktop.org/gstreamer/gstreamer.git
synced 2025-04-26 04:26:14 +00:00
rpicamsrc: Move all debug output to go via GStreamer logs
Fixes https://github.com/thaytan/gst-rpicamsrc/issues/9
This commit is contained in:
parent
df3ceb86f7
commit
244091bb5e
5 changed files with 15 additions and 6 deletions
|
@ -31,6 +31,8 @@ SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
||||||
#include <stdio.h>
|
#include <stdio.h>
|
||||||
#include <memory.h>
|
#include <memory.h>
|
||||||
|
|
||||||
|
#include <gst/gst.h>
|
||||||
|
|
||||||
#include "interface/vcos/vcos.h"
|
#include "interface/vcos/vcos.h"
|
||||||
|
|
||||||
#include "interface/vmcs_host/vc_vchi_gencmd.h"
|
#include "interface/vmcs_host/vc_vchi_gencmd.h"
|
||||||
|
@ -40,6 +42,7 @@ SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
||||||
#include "interface/mmal/util/mmal_util_params.h"
|
#include "interface/mmal/util/mmal_util_params.h"
|
||||||
#include "interface/mmal/util/mmal_default_components.h"
|
#include "interface/mmal/util/mmal_default_components.h"
|
||||||
#include "RaspiCamControl.h"
|
#include "RaspiCamControl.h"
|
||||||
|
#include "RaspiCapture.h"
|
||||||
|
|
||||||
#if 0
|
#if 0
|
||||||
/// Structure to cross reference exposure strings against the MMAL parameter equivalent
|
/// Structure to cross reference exposure strings against the MMAL parameter equivalent
|
||||||
|
|
|
@ -798,7 +798,7 @@ static MMAL_STATUS_T create_encoder_component(RASPIVID_STATE *state)
|
||||||
if (encoder_output->buffer_size < encoder_output->buffer_size_min)
|
if (encoder_output->buffer_size < encoder_output->buffer_size_min)
|
||||||
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;
|
encoder_output->buffer_num = encoder_output->buffer_num_recommended;
|
||||||
|
|
||||||
|
|
|
@ -54,6 +54,11 @@
|
||||||
#include "RaspiCamControl.h"
|
#include "RaspiCamControl.h"
|
||||||
#include "RaspiPreview.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
|
G_BEGIN_DECLS
|
||||||
|
|
||||||
/** Structure containing all state information for the current run
|
/** Structure containing all state information for the current run
|
||||||
|
|
|
@ -32,6 +32,7 @@ SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
||||||
#include <stdlib.h>
|
#include <stdlib.h>
|
||||||
#include <string.h>
|
#include <string.h>
|
||||||
#include <memory.h>
|
#include <memory.h>
|
||||||
|
#include <gst/gst.h>
|
||||||
|
|
||||||
#include "interface/vcos/vcos.h"
|
#include "interface/vcos/vcos.h"
|
||||||
|
|
||||||
|
@ -44,6 +45,7 @@ SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
||||||
#include "interface/mmal/util/mmal_connection.h"
|
#include "interface/mmal/util/mmal_connection.h"
|
||||||
|
|
||||||
#include "RaspiPreview.h"
|
#include "RaspiPreview.h"
|
||||||
|
#include "RaspiCapture.h"
|
||||||
|
|
||||||
#if 0
|
#if 0
|
||||||
#define CommandPreview 1
|
#define CommandPreview 1
|
||||||
|
|
|
@ -77,8 +77,7 @@
|
||||||
#include "interface/mmal/util/mmal_default_components.h"
|
#include "interface/mmal/util/mmal_default_components.h"
|
||||||
#include "interface/mmal/util/mmal_connection.h"
|
#include "interface/mmal/util/mmal_connection.h"
|
||||||
|
|
||||||
GST_DEBUG_CATEGORY_STATIC (gst_rpi_cam_src_debug);
|
GST_DEBUG_CATEGORY (gst_rpi_cam_src_debug);
|
||||||
#define GST_CAT_DEFAULT gst_rpi_cam_src_debug
|
|
||||||
|
|
||||||
/* Filter signals and args */
|
/* Filter signals and args */
|
||||||
enum
|
enum
|
||||||
|
@ -514,7 +513,7 @@ static gboolean
|
||||||
gst_rpi_cam_src_start (GstBaseSrc * parent)
|
gst_rpi_cam_src_start (GstBaseSrc * parent)
|
||||||
{
|
{
|
||||||
GstRpiCamSrc *src = GST_RPICAMSRC (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);
|
src->capture_state = raspi_capture_setup (&src->capture_config);
|
||||||
if (src->capture_state == NULL)
|
if (src->capture_state == NULL)
|
||||||
return FALSE;
|
return FALSE;
|
||||||
|
@ -576,7 +575,7 @@ gst_rpi_cam_src_set_caps (GstBaseSrc * bsrc, GstCaps * caps)
|
||||||
static gboolean
|
static gboolean
|
||||||
gst_rpi_cam_src_decide_allocation (GstBaseSrc * bsrc, GstQuery * query)
|
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);
|
return GST_BASE_SRC_CLASS (parent_class)->decide_allocation (bsrc, query);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -622,7 +621,7 @@ gst_rpi_cam_src_create (GstPushSrc * parent, GstBuffer ** buf)
|
||||||
/* FIXME: Use custom allocator */
|
/* FIXME: Use custom allocator */
|
||||||
ret = raspi_capture_fill_buffer (src->capture_state, buf);
|
ret = raspi_capture_fill_buffer (src->capture_state, buf);
|
||||||
if (*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));
|
gst_buffer_get_size (*buf));
|
||||||
|
|
||||||
return ret;
|
return ret;
|
||||||
|
|
Loading…
Reference in a new issue