Deprecation warning

Please note that this is outdated documentation for an older release of the Scandit Barcode Scanner SDK.

We are deprecating the 5.x API on all platforms (except Linux). Release 5.19 in April 2021 will be our final. Applications running 5.x will continue to work, and we will continue to release critical bug fixes and security patches only, for one year. We encourage you to migrate to 6.x and take advantage of our latest / advanced features and improved performance.

You'll find the updated documentation at: Data Capture SDK Documentation for Android

ScCamera.h
Go to the documentation of this file.
1 
10 #ifndef SC_CAMERA_H_
11 #define SC_CAMERA_H_
12 
13 #include <Scandit/ScConfig.h>
14 #include <Scandit/ScCommon.h>
16 
17 #if defined(__cplusplus)
18 extern "C" {
19 #endif
20 
32 typedef struct ScOpaqueCamera ScCamera;
35 
47 typedef struct {
48  uint32_t min_width;
49  uint32_t max_width;
50  uint32_t step_width;
51  uint32_t min_height;
52  uint32_t max_height;
53  uint32_t step_height;
55 
63 typedef struct {
64  uint32_t numerator;
65  uint32_t denominator;
66 } ScFramerate;
67 
76 SC_EXPORT float sc_framerate_get_frame_interval(const ScFramerate *frame_rate);
77 
86 SC_EXPORT float sc_framerate_get_fps(const ScFramerate *frame_rate);
87 
98 typedef struct {
99  ScFramerate min;
100  ScFramerate max;
101  ScFramerate step;
103 
129 typedef enum {
133 } ScCameraMode;
134 
143 SC_EXPORT ScCamera * sc_camera_new(void);
144 
154 SC_EXPORT ScCamera * sc_camera_new_with_buffer_count(uint32_t buffer_count);
155 
168 SC_EXPORT ScCamera * sc_camera_new_from_path(const char *device_path, uint32_t buffer_count);
169 
180 SC_EXPORT void sc_camera_release(ScCamera *camera);
181 
190 SC_EXPORT void sc_camera_retain(ScCamera *camera);
191 
201 SC_EXPORT ScSize
202 sc_camera_get_resolution(const ScCamera *camera);
203 
211 SC_EXPORT ScImageLayout
212 sc_camera_get_image_layout(const ScCamera *camera);
213 
230 SC_EXPORT ScCameraMode
232 
249 SC_EXPORT ScCameraMode
251 
270 SC_EXPORT int32_t
271 sc_camera_query_supported_resolutions(const ScCamera *camera, ScSize *resolution_array,
272  uint32_t resolution_array_length);
273 
286 SC_EXPORT ScBool
288  ScStepwiseResolution *resolutions);
289 
308 SC_EXPORT int32_t
309 sc_camera_query_supported_framerates(const ScCamera *camera, ScSize resolution,
310  ScFramerate *framerate_array,
311  uint32_t framerate_array_length);
312 
325 SC_EXPORT ScBool
327  ScStepwiseFramerate *framerates);
328 
339 SC_EXPORT ScBool
340 sc_camera_request_resolution(ScCamera *camera, ScSize resolution);
341 
353 
364 SC_EXPORT ScBool sc_camera_set_manual_auto_focus_distance(ScCamera *camera, int32_t distance);
365 
374 SC_EXPORT const uint8_t * sc_camera_get_frame(ScCamera *camera, ScImageDescription * image_description);
375 
385 SC_EXPORT ScBool sc_camera_start_stream(ScCamera *camera);
386 
396 SC_EXPORT ScBool sc_camera_stop_stream(ScCamera *camera);
397 
408 SC_EXPORT ScBool sc_camera_enqueue_frame_data(ScCamera *camera, const uint8_t *frame_data);
409 
410 
411 #if defined(__cplusplus)
412 }
413 #endif
414 
415 
416 #endif // SC_CAMERA_H_
417 
418 
ScSize sc_camera_get_resolution(const ScCamera *camera)
Returns the resolution of the camera in pixel (width, height).
uint32_t numerator
numerator of the frameraet
Definition: ScCamera.h:64
float sc_framerate_get_frame_interval(const ScFramerate *frame_rate)
Returns the time between two frames in seconds.
Describes a framerate.
Definition: ScCamera.h:63
ScBool sc_camera_request_resolution(ScCamera *camera, ScSize resolution)
Tries to set the camera resolution.
ScBool sc_camera_enqueue_frame_data(ScCamera *camera, const uint8_t *frame_data)
Requeues the buffer after the data has been used.
uint32_t min_height
minimum y dimension
Definition: ScCamera.h:51
A step-wise description of a framerate.
Definition: ScCamera.h:98
ScBool sc_camera_stop_stream(ScCamera *camera)
Tells the camera to stop capturing images.
ScCameraMode
Describes the resolution mode of the camera.
Definition: ScCamera.h:129
uint32_t step_height
y dimension step size
Definition: ScCamera.h:53
ScCameraMode sc_camera_get_framerate_mode(const ScCamera *camera)
Query the framerate mode of the camera.
ScCamera * sc_camera_new_with_buffer_count(uint32_t buffer_count)
Create a camera object with the requested number of frame buffers.
Opaque handle to a camera object.
uint32_t max_height
maximum y dimension
Definition: ScCamera.h:52
ScImageLayout
Specifies the format of the pixel data.
Definition: ScImageDescription.h:24
ScCamera * sc_camera_new(void)
Create a camera object using default values.
Describes dimensions as well as internal memory layout of an image buffer.
A unsigned step-wise description of a size.
Definition: ScCamera.h:47
the camera captures at a wide range of step-wise generated resolutions
Definition: ScCamera.h:132
ScCameraMode sc_camera_get_resolution_mode(const ScCamera *camera)
Query the resolution mode of the camera.
ScBool sc_camera_set_manual_auto_focus_distance(ScCamera *camera, int32_t distance)
Sets the autofocus distance manually. Only possible when the autofocusmode is OFF.
void sc_camera_retain(ScCamera *camera)
Increase reference count of camera by one.
ScBool sc_camera_set_focus_mode(ScCamera *camera, ScCameraFocusMode mode)
Tries to set the autofocus mode of the camera.
the camera captures at a finite set of discrete resolutions
Definition: ScCamera.h:131
uint32_t min_width
minimum x dimension
Definition: ScCamera.h:48
void sc_camera_release(ScCamera *camera)
Decrease reference count of camera by one.
uint32_t denominator
denominator of the framerate
Definition: ScCamera.h:65
ScBool sc_camera_query_supported_framerates_stepwise(const ScCamera *camera, ScSize resolution, ScStepwiseFramerate *framerates)
Query supported step-wise framerates of the camera at a given resolution.
Common definitions used throughout the ScanditSDK API.
Common functions and data structures.
ScBool sc_camera_start_stream(ScCamera *camera)
Tells the camera to start capturing images.
A 2-dimensional unsigned size.
Definition: ScCommon.h:139
uint32_t step_width
x dimension step size
Definition: ScCamera.h:50
the camera resolution mode is not known
Definition: ScCamera.h:130
ScCamera * sc_camera_new_from_path(const char *device_path, uint32_t buffer_count)
Create a camera object from a device path.
float sc_framerate_get_fps(const ScFramerate *frame_rate)
Returns the number of frames per second.
int32_t sc_camera_query_supported_resolutions(const ScCamera *camera, ScSize *resolution_array, uint32_t resolution_array_length)
Query supported discrete resolutions of the camera.
const uint8_t * sc_camera_get_frame(ScCamera *camera, ScImageDescription *image_description)
ScCameraFocusMode
Describes the focus mode of a camera.
Definition: ScCommon.h:206
ScBool sc_camera_query_supported_resolutions_stepwise(const ScCamera *camera, ScStepwiseResolution *resolutions)
Query supported step-wise resolutions of the camera.
ScImageLayout sc_camera_get_image_layout(const ScCamera *camera)
int32_t sc_camera_query_supported_framerates(const ScCamera *camera, ScSize resolution, ScFramerate *framerate_array, uint32_t framerate_array_length)
Query supported discrete framerates of the camera at a given resolution.
Image Description interface.
uint32_t max_width
maximum x dimension
Definition: ScCamera.h:49
int32_t ScBool
Boolean value, can be SC_TRUE or SC_FALSE.
Definition: ScConfig.h:127