Direct Viewfinder Tutorials

This tutorial introduces you to the Direct Viewfinder API of the Ecam component.

Purpose

This documents provides a detailed description about the Direct Viewfinder API.

Setup and Configuration Requirements

The following are the setup and configuration requirements you need to follow before Direct Viewfinder implementation:

  • Client needs to implement the MdirectViewFinderObserver, an observer class to use version 2 direct viewfinder API. This class contains the call-backs necessary to provide notifications in relation to version2 direct viewfinder operations.

  • Licensee must provide concrete implementation for an interface class MCameraV2DirectViewFinder, and McameraViewFinder.

Direct viewfinder

Direct viewfinder provides the necessary framework for multiple direct viewfinder support. The direct viewfinder classes are provided as a part of Version2 direct viewfinder implementation.

Direct Viewfinder Implementation

The following tasks will be covered during Direct Viewfinder implementation:

Working with Direct Viewfinder

The following steps describe working with direct viewfinder.

  1. Before starting the direct viewfinder, client has the following options:

  2. Use CCameraV2DirectViewFinder::StartViewFinderDirectL() method to start direct viewfinder. In case of direct viewfinder, you can specify the in-screen co-ordinates, to which view finder data is to be transferred. The in-screen co-ordinates can be modified, for example, the camera requires the destination to have a certain byte alignment.

  3. If there is a conflict, the size of image returned by the view finder will not be the exact size requested. This occurs when the requirement of the view finder to show the unclipped view in the ratio required for image capture or video capture. The camera will return the best match.

  4. Implementation issues callback MDirectViewFinderObserver::DirectViewFinderFirstFrameDisplayed() and notifies the client that the first viewfinder frame has been displayed successfully. Implementation passes the viewfinder handle along with the callback.

  5. If the implementation finds any error during direct viewfinder processing, it stops the specific direct viewfinder and issue the callback MDirectViewFinderObserver::DirectViewFinderFailed().

  6. Client can use direct snapshot for still images captured over the direct viewfinder screen by creating a dedicated direct snapshot object through CCamera::CCameraV2DirectViewFinder::GetDirectSnapshotHandleL().

    See also CCamera::CCameraDirectSnapshot and their related M class MCameraDirectSnapshot.