MCPcopy Create free account
hub / github.com/android/ndk-samples / StartPreview

Method StartPreview

camera/basic/src/main/cpp/camera_manager.cpp:383–394  ·  view source on GitHub ↗

* StartPreview() * Toggle preview start/stop */

Source from the content-addressed store, hash-verified

381 * Toggle preview start/stop
382 */
383void NDKCamera::StartPreview(bool start) {
384 if (start) {
385 CALL_SESSION(setRepeatingRequest(captureSession_, nullptr, 1,
386 &requests_[PREVIEW_REQUEST_IDX].request_,
387 nullptr));
388 } else if (!start && captureSessionState_ == CaptureSessionState::ACTIVE) {
389 ACameraCaptureSession_stopRepeating(captureSession_);
390 } else {
391 ASSERT(false, "Conflict states(%s, %d)", (start ? "true" : "false"),
392 static_cast<int>(captureSessionState_));
393 }
394}
395
396/**
397 * Capture one jpg photo into

Callers 1

OnAppInitWindowMethod · 0.45

Calls

no outgoing calls

Tested by

no test coverage detected