Beispiel #1
0
/**
 * Assign a default set of parameters to the state passed in
 *
 * @param state Pointer to state structure to assign defaults to
 */
static void default_status(RASPISTILLYUV_STATE *state)
{
   if (!state)
   {
      vcos_assert(0);
      return;
   }

   // Default everything to zero
   memset(state, 0, sizeof(RASPISTILLYUV_STATE));

   // Now set anything non-zero
   state->timeout = 5000; // 5s delay before take image
   state->width = 2592;
   state->height = 1944;
   state->timelapse = 0;
   state->filename = NULL;
   state->linkname = NULL;
   state->verbose = 0;
   state->fullResPreview = 0;
   state->frameNextMethod = FRAME_NEXT_SINGLE;
   state->settings = 0;
   state->burstCaptureMode=0;

   // Setup preview window defaults
   raspipreview_set_defaults(&state->preview_parameters);

   // Set up the camera_parameters to default
   raspicamcontrol_set_defaults(&state->camera_parameters);
   
   // Set default camera
   state->cameraNum = 0;
}
Beispiel #2
0
/**
 * Assign a default set of parameters to the state passed in
 *
 * @param state Pointer to state structure to assign defaults to
 */
static void default_status(RASPIVID_STATE *state)
{
   if (!state)
   {
      vcos_assert(0);
      return;
   }

   // Default everything to zero
   memset(state, 0, sizeof(RASPIVID_STATE));

   // Now set anything non-zero
   state->timeout = 5000;     // 5s delay before take image
   state->width = 1920;       // Default to 1080p
   state->height = 1080;
   state->bitrate = 17000000; // This is a decent default bitrate for 1080p
   state->framerate = VIDEO_FRAME_RATE_NUM;
   state->intraperiod = 0;    // Not set
   state->demoMode = 0;
   state->demoInterval = 250; // ms
   state->immutableInput = 1;

   // Setup preview window defaults
   raspipreview_set_defaults(&state->preview_parameters);

   // Set up the camera_parameters to default
   raspicamcontrol_set_defaults(&state->camera_parameters);
}
Beispiel #3
0
// default status
static void default_status(RASPIVID_STATE *state)
{
    if (!state)
    {
        vcos_assert(0);
        return;
    }

    // Default everything to zero
    memset(state, 0, sizeof(RASPIVID_STATE));

    // Now set anything non-zero
    state->timeout 			= 10000;     // 5s delay before take image
    state->width 			= 640;      // use a multiple of 320 (640, 1280)
    state->height 			= 480;		// use a multiple of 240 (480, 960)
    state->bitrate 			= 17000000; // This is a decent default bitrate for 1080p
    state->framerate 		= VIDEO_FRAME_RATE_NUM;
    state->immutableInput 	= 1;
    state->graymode 			= 1;		//gray by default, much faster than color (0)

    // Setup preview window defaults
    raspipreview_set_defaults(&state->preview_parameters);

    // Set up the camera_parameters to default
    raspicamcontrol_set_defaults(&state->camera_parameters);
}
Beispiel #4
0
/**
 * Assign a default set of parameters to the state passed in
 *
 * @param state Pointer to state structure to assign defaults to
 */
static void default_status(RASPISTILL_STATE *state)
{
   if (!state)
   {
      vcos_assert(0);
      return;
   }
	
	// *** PR : modif for demo purpose : smaller image
   state->timeout = 0;
   state->width = 320;
   state->height = 200;
   state->quality = 85;
   state->wantRAW = 0;
   state->filename = NULL;
   state->verbose = 0;
   state->thumbnailConfig.enable = 0;
   state->thumbnailConfig.width = 64;
   state->thumbnailConfig.height = 48;
   state->thumbnailConfig.quality = 35;
   state->demoMode = 0;
   state->demoInterval = 250; // ms
   state->camera_component = NULL;
   state->encoder_component = NULL;
   state->preview_connection = NULL;
   state->encoder_connection = NULL;
   state->encoder_pool = NULL;
   state->encoding = MMAL_ENCODING_JPEG;
   state->numExifTags = 0;
   state->timelapse = 0;

   // Setup preview window defaults
   raspipreview_set_defaults(&state->preview_parameters);

   // Set up the camera_parameters to default
   raspicamcontrol_set_defaults(&state->camera_parameters);
   
   //pr
   //state->camera_parameters.awbMode=MMAL_PARAM_AWBMODE_AUTO;
   
}
Beispiel #5
0
/**
 * Assign a default set of parameters to the state passed in
 *
 * @param state Pointer to state structure to assign defaults to
 */
static void default_status(RASPISTILLYUV_STATE *state)
{
   if (!state)
   {
      vcos_assert(0);
      return;
   }

   // Default everything to zero
   memset(state, 0, sizeof(RASPISTILLYUV_STATE));

   // Now set anything non-zero
   state->timeout = 5000; // 5s delay before take image
   state->width = 2592;
   state->height = 1944;
   // Setup preview window defaults
   raspipreview_set_defaults(&state->preview_parameters);

   // Set up the camera_parameters to default
   raspicamcontrol_set_defaults(&state->camera_parameters);
}
Beispiel #6
0
/**
 * Assign a default set of parameters to the state passed in
 *
 * @param state Pointer to state structure to assign defaults to
 */
static void default_status(RASPISTILL_STATE *state)
{
   if (!state)
   {
      vcos_assert(0);
      return;
   }

   state->timeout = 5000; // 5s delay before take image
   state->width = 2592;
   state->height = 1944;
   state->quality = 85;
   state->wantRAW = 0;
   state->filename = NULL;
   state->linkname = NULL;
   state->verbose = 0;
   state->thumbnailConfig.enable = 1;
   state->thumbnailConfig.width = 64;
   state->thumbnailConfig.height = 48;
   state->thumbnailConfig.quality = 35;
   state->demoMode = 0;
   state->demoInterval = 250; // ms
   state->camera_component = NULL;
   state->encoder_component = NULL;
   state->preview_connection = NULL;
   state->encoder_connection = NULL;
   state->encoder_pool = NULL;
   state->encoding = MMAL_ENCODING_JPEG;
   state->numExifTags = 0;
   state->timelapse = 0;
   state->fullResPreview = 0;

   // Setup preview window defaults
   raspipreview_set_defaults(&state->preview_parameters);

   // Set up the camera_parameters to default
   raspicamcontrol_set_defaults(&state->camera_parameters);
}
/**
 * Assign a default set of parameters to the state passed in
 *
 * @param state Pointer to state structure to assign defaults to
 */
static void default_status(RASPISTILL_STATE *state)
{
   if (!state)
   {
      vcos_assert(0);
      return;
   }
   	
   state->timeout = 1000;// 1s delay before take image   
   // MODIFICATION: modified for demo purpose -> smaller image
   state->width = 324;
   state->height = 243;
   state->quality = 25;
   state->wantRAW = 0;
   // *** USER: change the name of the file.
   state->filename = "cam_image.jpg";
   state->verbose = 0;
   state->thumbnailConfig.enable = 1;
   state->thumbnailConfig.width = 64;
   state->thumbnailConfig.height = 48;
   state->thumbnailConfig.quality = 35;
   state->demoMode = 0;
   state->demoInterval = 250; // ms
   state->camera_component = NULL;
   state->encoder_component = NULL;
   state->preview_connection = NULL;
   state->encoder_connection = NULL;
   state->encoder_pool = NULL;
   state->encoding = MMAL_ENCODING_JPEG;
   state->numExifTags = 0;
   state->timelapse = 0;

   // Setup preview window defaults
   raspipreview_set_defaults(&state->preview_parameters);

   // Set up the camera_parameters to default
   raspicamcontrol_set_defaults(&state->camera_parameters);
}
/**
 * Assign a default set of parameters to the state passed in
 *
 * @param state Pointer to state structure to assign defaults to
 */
void default_status(RASPIVID_STATE *state)
{
    if (!state)
    {
        vcos_assert(0);
        return;
    }

    // Default everything to zero
    memset(state, 0, sizeof(RASPIVID_STATE));

#ifdef __WEBRTC_DEFAULT__
    state->width = RASPI_CAM_FIXED_WIDTH;	// default width for FOV
    state->height = RASPI_CAM_FIXED_HEIGHT;	// default width for FOV
    state->encoding = MMAL_ENCODING_H264;
    // state->bitrate = 17000000; 			// This is a decent default bitrate for 1080p
    state->bitrate = 0; 			// For variable bitrate setttings
    state->framerate = VIDEO_FRAME_RATE_NUM;
    state->intra_refresh_type = MMAL_VIDEO_INTRA_REFRESH_BOTH;		// cyclic intra rehash type
    state->intraperiod = VIDEO_FRAME_RATE_NUM * 3;	// every 3 second
    state->bInlineHeaders = MMAL_TRUE;	    // enabling Inline Header
    state->profile = MMAL_VIDEO_PROFILE_H264_CONSTRAINED_BASELINE;  
    // state->profile = MMAL_VIDEO_PROFILE_H264_MAIN;  
    state->verbose = MMAL_TRUE;

#define __RATECONTROL_DISABLE__

#ifdef __RATECONTROL_DISABLE__
    state->videoRateControl = MMAL_FALSE;
    state->quantisationParameter = MMAL_TRUE;
    state->quantisationInitialParameter = 26;   // Initial quantization parameter
    state->quantisationMaxParameter	= 35;       /// Maximum quantization parameter
    state->quantisationMinParameter  = 24;       /// Minimum quantization parameter
#else
    state->videoRateControl = MMAL_TRUE;
    state->quantisationParameter = MMAL_FALSE;   // disable quatization, Not working
    state->quantisationInitialParameter = 26;   // Initial quantization parameter
    state->quantisationMaxParameter	= 35;       /// Maximum quantization parameter
    state->quantisationMinParameter  = 22;       /// Minimum quantization parameter
#endif // __RATECONTROL_DISABLE__

    // state->settings = MMAL_TRUE;				// camera setting
    state->settings = MMAL_FALSE;

#else	/* RaspiVid defaults */
    state->width = 1920;       // Default to 1080p
    state->height = 1080;
    state->encoding = MMAL_ENCODING_H264;
    state->bitrate = 17000000; // This is a decent default bitrate for 1080p
    state->framerate = VIDEO_FRAME_RATE_NUM;
    state->intraperiod = -1;    // Not set
    state->intra_refresh_type = -1;
    state->bInlineHeaders = 0;
    state->quantisationParameter = MMAL_FALSE;
    state->profile = MMAL_VIDEO_PROFILE_H264_HIGH;
    state->verbose = MMAL_TRUE;
    state->videoRateControl = 0;
    state->settings = 0;
#endif

    state->immutableInput = 1;
    state->bCapturing = 0;

    state->cameraNum = 0;
    state->sensor_mode = 0;


    // Setup preview window defaults
    raspipreview_set_defaults(&state->preview_parameters);

    // Set up the camera_parameters to default
    raspicamcontrol_set_defaults(&state->camera_parameters);
}