本文整理汇总了C++中Metadata::get方法的典型用法代码示例。如果您正苦于以下问题:C++ Metadata::get方法的具体用法?C++ Metadata::get怎么用?C++ Metadata::get使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类Metadata
的用法示例。
在下文中一共展示了Metadata::get方法的6个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。
示例1: initManualTemplate
int UsbCamera::initManualTemplate(Metadata m) {
int res = m.add1UInt8(ANDROID_CONTROL_CAPTURE_INTENT,
ANDROID_CONTROL_CAPTURE_INTENT_MANUAL);
// Setup manual controls
if (res)
return res;
// TODO: set reprocessing parameters for zsl input queue
return setTemplate(CAMERA3_TEMPLATE_MANUAL, m.get());
}
示例2: initZslTemplate
int UsbCamera::initZslTemplate(Metadata m) {
int res = m.add1UInt8(ANDROID_CONTROL_CAPTURE_INTENT,
ANDROID_CONTROL_CAPTURE_INTENT_ZERO_SHUTTER_LAG);
// Setup default zero shutter lag controls
if (res)
return res;
// TODO: set reprocessing parameters for zsl input queue
return setTemplate(CAMERA3_TEMPLATE_ZERO_SHUTTER_LAG, m.get());
}
示例3: initSnapshotTemplate
int UsbCamera::initSnapshotTemplate(Metadata m) {
int res = m.add1UInt8(ANDROID_CONTROL_CAPTURE_INTENT,
ANDROID_CONTROL_CAPTURE_INTENT_VIDEO_SNAPSHOT);
// Setup default video snapshot controls
if (res)
return res;
// TODO: set slow auto-focus, auto-whitebalance, auto-exposure, flash off
return setTemplate(CAMERA3_TEMPLATE_VIDEO_SNAPSHOT, m.get());
}
示例4: initStillTemplate
int UsbCamera::initStillTemplate(Metadata m) {
int res = m.add1UInt8(ANDROID_CONTROL_CAPTURE_INTENT,
ANDROID_CONTROL_CAPTURE_INTENT_STILL_CAPTURE);
// Setup default still capture controls
if (res)
return res;
// TODO: set fast auto-focus, auto-whitebalance, auto-exposure, auto flash
return setTemplate(CAMERA3_TEMPLATE_STILL_CAPTURE, m.get());
}
示例5: initPreviewTemplate
int UsbCamera::initPreviewTemplate(Metadata m) {
// Setup default preview controls
int res = m.add1UInt8(ANDROID_CONTROL_CAPTURE_INTENT,
ANDROID_CONTROL_CAPTURE_INTENT_PREVIEW);
if (res)
return res;
// TODO: set fast auto-focus, auto-whitebalance, auto-exposure, auto flash
return setTemplate(CAMERA3_TEMPLATE_PREVIEW, m.get());
}
示例6: initStaticInfo
int UsbCamera::initStaticInfo() {
/*
* Setup static camera info. This will have to customized per camera
* device.
* TODO: this is just some sample code, need tailor for USB cameras.
*/
if (mStaticInfo != NULL) {
free_camera_metadata(mStaticInfo);
}
Metadata m;
/* android.control */
int32_t android_control_ae_available_target_fps_ranges[] = {30, 30};
m.addInt32(ANDROID_CONTROL_AE_AVAILABLE_TARGET_FPS_RANGES,
ARRAY_SIZE(android_control_ae_available_target_fps_ranges),
android_control_ae_available_target_fps_ranges);
int32_t android_control_ae_compensation_range[] = {-4, 4};
m.addInt32(ANDROID_CONTROL_AE_COMPENSATION_RANGE,
ARRAY_SIZE(android_control_ae_compensation_range),
android_control_ae_compensation_range);
camera_metadata_rational_t android_control_ae_compensation_step[] = {{2,1}};
m.addRational(ANDROID_CONTROL_AE_COMPENSATION_STEP,
ARRAY_SIZE(android_control_ae_compensation_step),
android_control_ae_compensation_step);
int32_t android_control_max_regions[] = {/*AE*/ 1,/*AWB*/ 1,/*AF*/ 1};
m.addInt32(ANDROID_CONTROL_MAX_REGIONS,
ARRAY_SIZE(android_control_max_regions),
android_control_max_regions);
/* android.jpeg */
int32_t android_jpeg_available_thumbnail_sizes[] = {0, 0, 128, 96};
m.addInt32(ANDROID_JPEG_AVAILABLE_THUMBNAIL_SIZES,
ARRAY_SIZE(android_jpeg_available_thumbnail_sizes),
android_jpeg_available_thumbnail_sizes);
int32_t android_jpeg_max_size[] = {13 * 1024 * 1024}; // 13MB
m.addInt32(ANDROID_JPEG_MAX_SIZE,
ARRAY_SIZE(android_jpeg_max_size),
android_jpeg_max_size);
/* android.lens */
float android_lens_info_available_focal_lengths[] = {1.0};
m.addFloat(ANDROID_LENS_INFO_AVAILABLE_FOCAL_LENGTHS,
ARRAY_SIZE(android_lens_info_available_focal_lengths),
android_lens_info_available_focal_lengths);
/* android.request */
int32_t android_request_max_num_output_streams[] = {0, 3, 1};
m.addInt32(ANDROID_REQUEST_MAX_NUM_OUTPUT_STREAMS,
ARRAY_SIZE(android_request_max_num_output_streams),
android_request_max_num_output_streams);
/* android.scaler */
int32_t android_scaler_available_formats[] = {
HAL_PIXEL_FORMAT_RAW16,
HAL_PIXEL_FORMAT_BLOB,
HAL_PIXEL_FORMAT_RGBA_8888,
HAL_PIXEL_FORMAT_IMPLEMENTATION_DEFINED,
// These are handled by YCbCr_420_888
// HAL_PIXEL_FORMAT_YV12,
// HAL_PIXEL_FORMAT_YCrCb_420_SP,
HAL_PIXEL_FORMAT_YCbCr_420_888};
m.addInt32(ANDROID_SCALER_AVAILABLE_FORMATS,
ARRAY_SIZE(android_scaler_available_formats),
android_scaler_available_formats);
int64_t android_scaler_available_jpeg_min_durations[] = {1};
m.addInt64(ANDROID_SCALER_AVAILABLE_JPEG_MIN_DURATIONS,
ARRAY_SIZE(android_scaler_available_jpeg_min_durations),
android_scaler_available_jpeg_min_durations);
int32_t android_scaler_available_jpeg_sizes[] = {640, 480};
m.addInt32(ANDROID_SCALER_AVAILABLE_JPEG_SIZES,
ARRAY_SIZE(android_scaler_available_jpeg_sizes),
android_scaler_available_jpeg_sizes);
float android_scaler_available_max_digital_zoom[] = {1};
m.addFloat(ANDROID_SCALER_AVAILABLE_MAX_DIGITAL_ZOOM,
ARRAY_SIZE(android_scaler_available_max_digital_zoom),
android_scaler_available_max_digital_zoom);
int64_t android_scaler_available_processed_min_durations[] = {1};
m.addInt64(ANDROID_SCALER_AVAILABLE_PROCESSED_MIN_DURATIONS,
ARRAY_SIZE(android_scaler_available_processed_min_durations),
android_scaler_available_processed_min_durations);
int32_t android_scaler_available_processed_sizes[] = {640, 480};
m.addInt32(ANDROID_SCALER_AVAILABLE_PROCESSED_SIZES,
ARRAY_SIZE(android_scaler_available_processed_sizes),
android_scaler_available_processed_sizes);
int64_t android_scaler_available_raw_min_durations[] = {1};
m.addInt64(ANDROID_SCALER_AVAILABLE_RAW_MIN_DURATIONS,
ARRAY_SIZE(android_scaler_available_raw_min_durations),
android_scaler_available_raw_min_durations);
//.........这里部分代码省略.........