Viewfinder Window
By default, the Camera library creates a viewfinder window.
The viewfinder window is a child Screen window that's managed by the Sensor service. This conveniently allows you to create a parent Screen window in your application and then join the viewfinder window to your application. This simplifies the application code you need to write to work with the image buffers (because the Sensor service handles the logic of managing these buffers) and to refresh the video stream.
- encode the image buffers and write them to files
- run algorithms on the image buffers
- process the image buffers and manipulate them
- handle posting the image buffers in your application
camera_set_vf_property(cameraHandle, CAMERA_IMGPROP_CREATEWINDOW, 0);
Start the viewfinder using camera_start_viewfinder(). When you are finished using the camera, you can call camera_stop_viewfinder() to stop the viewfinder.
If you want to change the video mode, you must first stop the viewfinder, then call camera_set_vf_mode() to change its mode. Keep in mind that any previous settings on the camera are lost when you do this. For that reason, you may want to reapply any sensor configuration settings before you do anything else. To start getting image buffers again, you must restart the viewfinder.
