PrevNextUpHome SophiaFramework UNIVERSE 5.3
SFBCamera
Wrapper Class for the ICamera interface.
#include <SFBCamera.h.hpp>
class SFBCamera : public SFBQuery;
SFMTYPEDEFWRAPPER(SFBCamera)

Inheritance diagram

 Inheritance diagram of SFBCameraClass

Version

BREW 2.0 BREW 2.1 BREW 3.1 BREW 4.0
X O O O

Reference

BREW API ICamera

Member

Public Functions
SFCError AddOverlay( SFBBitmapSmpConstRef bmp )
Set the overlay image that will be part of the recorded picture. This operation is done any camera mode.
SFCError ClearOverlay( Void )
Clear all the overlaid images.
SFCError DeferEncode( Bool defer )
Defer the encoding of the snapshot done by SFBCamera::RecordSnapshot() API. You need to explicitly call SFBCamera::EncodeSnapshot() to encode the snapshot.
SFCError EncodeSnapshot( Void )
Encode the recorded snapshot/frame.
SFCError GetDisplaySizeList( AEESize** list , BoolPtr range )
Retrieve the list of discrete display sizes supported for specified mode or continuous range (for example, any size between 10x10 to 100x150).
SFCError GetFrame( SFBBitmapSmpPtr frame )
Return the current frame captured by the camera.
SFCError GetMode( SInt16Ptr mode , BoolPtr paused )
Return the current camera mode.
SFCError GetParm( SInt16 parmId , SInt32Ptr p1 , SInt32Ptr p2 )
Get the camera control parameters.
SFCError GetSizeList( AEESize** list , BoolPtr range )
Retrieve the list of discrete sizes supported for specified mode or continuos range (for example, any size between 10x10 to 100x150).
SFCError IsBrightness( BoolPtr support )
Check if camera has brightness setting capability.
SFCError IsContrast( BoolPtr support )
Check if camera has contrast setting capability.
SFCError IsMovie( BoolPtr support )
Check if camera has movie recording capability.
SFCError IsSharpness( BoolPtr support )
Check if camera has sharpness setting capability.
SFCError IsSupport( SInt16 parmId , BoolPtr support )
Check if specified parameter is supported by ICamera Interface.
SFCError IsZoom( BoolPtr support )
Check if camera has zoom capability.
static
SFBCameraSmp
NewInstance( SFCErrorPtr exception = null )
Create a new SFBCamera instance.
static
SFBCameraSmp
NewInstance( AEECLSID id , SFCErrorPtr exception = null )
Create a new SFBCamera instance.
SFCError Pause( Void )
Pause the camera operation.
SFCError Preview( Void )
Start the camera operation in preview mode, which causes SFBCamera to start sending frames to the client.
SFCError RecordMovie( Void )
Start the camera operation in movie mode, which causes recorded frames to be sent to the caller while encoding those frames.
SFCError RecordSnapshot( Void )
Start the camera operation in snapshot mode which causes the camera to take a snapshot. If Defer Encoding is not enabled (default), this function causes the snapshot to be encoded.
SFCError RegisterNotify( PFNCAMERANOTIFY notify , VoidPtr data )
Register a callback notification function with SFBCamera object. SFBCamera reports asynchronous events using this callback.
SFCError Resume( Void )
Resume the camera operation.
SFCError RotateEncode( SInt32 value )
Rotate the recorded and encoded frame. Only snapshot and movie modes are affected.
SFCError RotatePreview( SInt32 value )
Rotate the preview frame. Only preview mode is affected.
SFCError SetAudioEncode( AEECLSID clsid , UInt32 extra )
Set the active audio encoding type used to encode along with the recorded snapshot/movie.
SFCError SetBrightness( SInt32 value )
Set the brightness of the camera.
SFCError SetContrast( SInt32 value )
Set the contrast of the camera.
SFCError SetDisplaySize( AEESize* size )
Set the frame display size where the captured data is displayed.
SFCError SetFramesPerSecond( UInt32 fps )
Set the frames per second setting of camera in preview or movie mode.
SFCError SetMediaData( AEEMediaData* pmd , ACharConstPtr mime )
Set the media data where the recorded and encoded data will be saved.
SFCError SetMediaData( AEEMediaData* pmd , SFXAnsiStringConstRef mime )
Set the media data where the recorded and encoded data will be saved.
SFCError SetParm( SInt16 parmId , SInt32 p1 , SInt32 p2 )
Set the camera control parameters.
SFCError SetQuality( SInt16 quality )
Set the camera to capture specified picture quality.
SFCError SetSharpness( SInt32 value )
Set the sharpness of the camera.
SFCError SetSize( AEESize* size )
Set the camera to record a snapshot or movie in specified size.
SFCError SetVideoEncode( AEECLSID clsid , UInt32 extra )
Set the active video/image encoding type used to encode the recorded snapshot/movie.
SFCError SetZoom( SInt32 value )
Set the zoom of the camera.
SFCError Start( SInt16 mode , UInt32 param )
Start camera operation in preview, snapshot, or movie mode.
SFCError Stop( Void )
Stop the current camera operation and puts it in Ready state.
SFCError UnregisterNotify( Void )
Unregister the Callback Notify.
SFCError QueryInterface( AEECLSID clsid , VoidHandle handle ) (inherits from SFBQuery)
Ask an object for another API contract from the object in question.
SFCError QueryInterface( AEECLSID clsid , SFBBaseSmpPtr handle ) (inherits from SFBQuery)
Ask an object for another API contract from the object in question.
SFBBaseSmp QueryInterface( AEECLSID clsid ) (inherits from SFBQuery)
Ask an object for another API contract from the object in question.
Void Self( AEECLSID clsidReq , SFBQuerySmpPtr clone , AEECLSID clsidImp ) (inherits from SFBQuery)
Helper macro for those implementing an object with a single interface.
SFBQuerySmp Self( AEECLSID clsidReq , AEECLSID clsidImp ) (inherits from SFBQuery)
Helper macro for those implementing an object with a single interface.
Protected Functions
static
SFBBaseSmp
FactoryByCreate( AEECLSID id , SFCErrorPtr exception = null ) (inherits from SFBBase)
Create the instance for the specified ClassID's interface.
static
SFBBaseSmp
FactoryByQuery( SFBQuerySmpConstRef query , AEECLSID id , SFCErrorPtr exception = null ) (inherits from SFBBase)
Create the instance for the specified ClassID's interface using the SFBQuery instance.

SFBCamera::AddOverlay
Set the overlay image that will be part of the recorded picture. This operation is done any camera mode.
[ public ]
SFCError AddOverlay(
    SFBBitmapSmpConstRef bmp   // SFBBitmap Interface representing the overlay
);

Reference

BREW API ICAMERA_AddOverlay


SFBCamera::ClearOverlay
Clear all the overlaid images.
[ public ]
SFCError ClearOverlay(Void);

Reference

BREW API ICAMERA_ClearOverlay


SFBCamera::DeferEncode
Defer the encoding of the snapshot done by SFBCamera::RecordSnapshot() API. You need to explicitly call SFBCamera::EncodeSnapshot() to encode the snapshot.
[ public ]
SFCError DeferEncode(
    Bool defer   // true implies the encoding will be done by user
);

Reference

BREW API ICAMERA_DeferEncode


SFBCamera::EncodeSnapshot
Encode the recorded snapshot/frame.
[ public ]
SFCError EncodeSnapshot(Void);

Reference

BREW API ICAMERA_EncodeSnapshot


SFBCamera::GetDisplaySizeList
Retrieve the list of discrete display sizes supported for specified mode or continuous range (for example, any size between 10x10 to 100x150).
[ public ]
SFCError GetDisplaySizeList(
    AEESize** list   // when input *List contains CAM_MODE_PREVIEW/CAM_MODE_MOVIE.
                     // when output it is a pointer to null- terminated size list 
    BoolPtr range    // pointer to boolean when true indicates the passed list is a null-terminated 
                     // paired list (that is, a multiple of 2) of ranges
);

Reference

BREW API ICAMERA_GetDisplaySizeList


SFBCamera::GetFrame
Return the current frame captured by the camera.
[ public ]
SFCError GetFrame(
    SFBBitmapSmpPtr frame   // frame SFBBitmap returned
);

Reference

BREW API ICAMERA_GetFrame


SFBCamera::GetMode
Return the current camera mode.
[ public ]
SFCError GetMode(
    SInt16Ptr mode   // pointer to mode. CAM_MODE_XXX 
    BoolPtr paused   // true / false => Paused/Resumed 
);

Reference

BREW API ICAMERA_GetMode


SFBCamera::GetParm
Get the camera control parameters.
[ public ]
SFCError GetParm(
    SInt16 parmId   // CAM_PARM_XXX
    SInt32Ptr p1    // depends on the nParmID parameter 
    SInt32Ptr p2    // depends on the nParmID parameter 
);

Reference

BREW API ICAMERA_GetParm


SFBCamera::GetSizeList
Retrieve the list of discrete sizes supported for specified mode or continuos range (for example, any size between 10x10 to 100x150).
[ public ]
SFCError GetSizeList(
    AEESize** list   // when input List contains CAM_MODE_SNAPSHOT/CAM_MODE_MOVIE 
                     // when output it is a pointer to null- terminated size list
    BoolPtr range    // pointer to boolean.
                     // when true indicates the passed list is a null-terminated paired list (multiple of 2) of ranges
);

Reference

BREW API ICAMERA_GetSizeList


SFBCamera::IsBrightness
Check if camera has brightness setting capability.
[ public ]
SFCError IsBrightness(
    BoolPtr support   // pointer to boolean.
                      // true / false => Supported / Unsupported
);

Reference

BREW API ICAMERA_IsBrightness


SFBCamera::IsContrast
Check if camera has contrast setting capability.
[ public ]
SFCError IsContrast(
    BoolPtr support   // pointer to boolean.
                      // true / false => Supported / Unsupported
);

Reference

BREW API ICAMERA_IsContrast


SFBCamera::IsMovie
Check if camera has movie recording capability.
[ public ]
SFCError IsMovie(
    BoolPtr support   Pointer to boolean.
                      // true / false => Supported / Unsupported
);

Reference

BREW API ICAMERA_IsMovie


SFBCamera::IsSharpness
Check if camera has sharpness setting capability.
[ public ]
SFCError IsSharpness(
    BoolPtr support   // pointer to boolean.
                      // true / false => Supported / Unsupported
);

Reference

BREW API ICAMERA_IsSharpness


SFBCamera::IsSupport
Check if specified parameter is supported by ICamera Interface.
[ public ]
SFCError IsSupport(
    SInt16 parmId     // CAM_PARM_XXX parameter ID.See Camera Control Parameters
        
    BoolPtr support   // pointer to boolean.
                      // true / false => Supported / Unsupported
);

Description

This function is useful to check the camera capabilities like setting of brightness, zoom, etc.

Reference

BREW API ICAMERA_IsSupport


SFBCamera::IsZoom
Check if camera has zoom capability.
[ public ]
SFCError IsZoom(
    BoolPtr support   // pointer to boolean.
                      // true / false => Supported / Unsupported
);

Reference

BREW API ICAMERA_IsZoom


SFBCamera::NewInstance
Create a new SFBCamera instance.
[ public, static ]
SFBCameraSmp NewInstance(
    SFCErrorPtr exception = null   // Error
);
[ public, static ]
SFBCameraSmp NewInstance(
    AEECLSID id                    // Class ID
    SFCErrorPtr exception = null   // Error
);

SFBCamera::Pause
Pause the camera operation.
[ public ]
SFCError Pause(Void);

Description

In preview and record modes, the frame callbacks are paused. In record mode, the encoding is also paused. .

Reference

BREW API ICAMERA_Pause


SFBCamera::Preview
Start the camera operation in preview mode, which causes SFBCamera to start sending frames to the client.
[ public ]
SFCError Preview(Void);

Reference

BREW API ICAMERA_Preview


SFBCamera::RecordMovie
Start the camera operation in movie mode, which causes recorded frames to be sent to the caller while encoding those frames.
[ public ]
SFCError RecordMovie(Void);

Reference

BREW API ICAMERA_RecordMovie


SFBCamera::RecordSnapshot
Start the camera operation in snapshot mode which causes the camera to take a snapshot. If Defer Encoding is not enabled (default), this function causes the snapshot to be encoded.
[ public ]
SFCError RecordSnapshot(Void);

Reference

BREW API ICAMERA_RecordSnapshot


SFBCamera::RegisterNotify
Register a callback notification function with SFBCamera object. SFBCamera reports asynchronous events using this callback.
[ public ]
SFCError RegisterNotify(
    PFNCAMERANOTIFY notify   // user callback function pointer
    VoidPtr data             // user data to be used when calling notify() 
);

Reference

BREW API ICAMERA_RegisterNotify


SFBCamera::Resume
Resume the camera operation.
[ public ]
SFCError Resume(Void);

Description

In preview and record modes, the frame callbacks are resumed. In record mode, the encoding is also resumed.

Reference

BREW API ICAMERA_Resume


SFBCamera::RotateEncode
Rotate the recorded and encoded frame. Only snapshot and movie modes are affected.
[ public ]
SFCError RotateEncode(
    SInt32 value   // rotation angle
);

Reference

BREW API ICAMERA_RotateEncode


SFBCamera::RotatePreview
Rotate the preview frame. Only preview mode is affected.
[ public ]
SFCError RotatePreview(
    SInt32 value   // rotation angle
);

Reference

BREW API ICAMERA_RotatePreview


SFBCamera::SetAudioEncode
Set the active audio encoding type used to encode along with the recorded snapshot/movie.
[ public ]
SFCError SetAudioEncode(
    AEECLSID clsid   // encoding class ID.
                     // e.g. AEECLSID_MEDIAQCP, etc
    UInt32 extra     // extra info regarding the encoding like sub formats.
                     // example:For AEECLSID_MEDIAQCP, sub-format can be specified as MM_QCP_FORMAT_FIXED_FULL_EVRC
);

Reference

BREW API ICAMERA_SetAudioEncode


SFBCamera::SetBrightness
Set the brightness of the camera.
[ public ]
SFCError SetBrightness(
    SInt32 value   // brightness value
);

Reference

BREW API ICAMERA_SetBrightness


SFBCamera::SetContrast
Set the contrast of the camera.
[ public ]
SFCError SetContrast(
    SInt32 value   // contrast value
);

Reference

BREW API ICAMERA_SetContrast


SFBCamera::SetDisplaySize
Set the frame display size where the captured data is displayed.
[ public ]
SFCError SetDisplaySize(
    AEESize* size   // frame display size within the main display/off-srceen buffer area
);

Reference

BREW API ICAMERA_SetDisplaySize


SFBCamera::SetFramesPerSecond
Set the frames per second setting of camera in preview or movie mode.
[ public ]
SFCError SetFramesPerSecond(
    UInt32 fps   // frames per second. See dwFPS format in CAM_PARM_FPS documentation
);

Reference

BREW API ICAMERA_SetFramesPerSecond


SFBCamera::SetMediaData
Set the media data where the recorded and encoded data will be saved.
[ public ]
SFCError SetMediaData(
    AEEMediaData* pmd    // pointer to media data
    ACharConstPtr mime   // optional MIME type of the media
);
[ public ]
SFCError SetMediaData(
    AEEMediaData* pmd            // pointer to media data
    SFXAnsiStringConstRef mime   // optional MIME type of the media
);

Reference

BREW API ICAMERA_SetMediaData


SFBCamera::SetParm
Set the camera control parameters.
[ public ]
SFCError SetParm(
    SInt16 parmId   // CAM_PARM_XXX. 
                    // see Camera Control Parameters
    SInt32 p1       // depends on the nParmID parameter
    SInt32 p2       // depends on the nParmID parameter
);

Reference

BREW API ICAMERA_SetParm


SFBCamera::SetQuality
Set the camera to capture specified picture quality.
[ public ]
SFCError SetQuality(
    SInt16 quality   // picture quality
);

Reference

BREW API ICAMERA_SetQuality


SFBCamera::SetSharpness
Set the sharpness of the camera.
[ public ]
SFCError SetSharpness(
    SInt32 value   // sharpness value
);

Reference

BREW API ICAMERA_SetSharpness


SFBCamera::SetSize
Set the camera to record a snapshot or movie in specified size.
[ public ]
SFCError SetSize(
    AEESize* size   // size of the picture
);

Reference

BREW API ICAMERA_SetSize


SFBCamera::SetVideoEncode
Set the active video/image encoding type used to encode the recorded snapshot/movie.
[ public ]
SFCError SetVideoEncode(
    AEECLSID clsid   // encoding class ID: 
                     // CAM_ENCODE_RAW, AEECLSID_JPEG, AEECLSID_MEDIAMPEG4, etc
    UInt32 extra     // extra info regarding the encoding like sub formats
);

Reference

BREW API ICAMERA_SetVideoEncode


SFBCamera::SetZoom
Set the zoom of the camera.
[ public ]
SFCError SetZoom(
    SInt32 value   // zoom value
);

Reference

BREW API ICAMERA_SetZoom


SFBCamera::Start
Start camera operation in preview, snapshot, or movie mode.
[ public ]
SFCError Start(
    SInt16 mode    // CAM_MODE_PREVIEW / CAM_MODE_SNAPSHOT / CAM_MODE_MOVIE
    UInt32 param   // reserved
);

Reference

BREW API ICAMERA_Start


SFBCamera::Stop
Stop the current camera operation and puts it in Ready state.
[ public ]
SFCError Stop(Void);

Reference

BREW API ICAMERA_Stop


SFBCamera::UnregisterNotify
Unregister the Callback Notify.
[ public ]
SFCError UnregisterNotify(Void);

Description

Equals to SFBCamera::RegisterNotify( null , null ); .

Reference

SFBCamera::RegisterNotify