CMediaRecognizer Class Reference

class CMediaRecognizer : public CBase

Inherits from

Public Member Functions
~CMediaRecognizer ()
IMPORT_C void FreeFilehandle ()
IMPORT_C TMediaType IdentifyMediaTypeL (const TDesC &, TBool )
IMPORT_C TMediaType IdentifyMediaTypeL (const TDesC &, RFile &, TBool )
IMPORT_C TBool IsValidStreamingPrefix (const TDesC &)
IMPORT_C TBool IsValidUrlPrefix (const TDesC &)
IMPORT_C TBool IsValidUrlPrefix (const TDesC8 &)
IMPORT_C TBuf < KMaxDataTypeLength > MimeTypeL (const TDesC &)
IMPORT_C TBuf < KMaxDataTypeLength > MimeTypeL ( RFile &)
IMPORT_C CMediaRecognizer * NewL ()
Private Member Functions
CMediaRecognizer ()
void ConstructL ()
void CreateAudioFormatsArrayL ( RMMFControllerImplInfoArray &)
void CreateVideoFormatsArrayL ( RMMFControllerImplInfoArray &)
TBool FileHandleExists ()
TBool FileHasAudioSupport (const TDesC &, TDataRecognitionResult &, RMMFControllerImplInfoArray &, RMMFControllerImplInfoArray &)
TBool FileHasVideoSupportL (const TDesC &, TDataRecognitionResult &, RMMFControllerImplInfoArray &)
TMediaType MediaTypeL (const TDesC &)
TInt ReadFile (const TDesC &, TDes8 &, TInt )
TInt ReadFileViaNewFileHandle (const TDesC &, TDes8 &, TInt )
void RecognizeFileL (const TDesC &, TDataRecognitionResult &)
Inherited Functions
CBase::CBase()
CBase::Delete(CBase *)
CBase::Extension_(TUint,TAny *&,TAny *)
CBase::operator new(TUint)
CBase::operator new(TUint,TAny *)
CBase::operator new(TUint,TLeave)
CBase::operator new(TUint,TLeave,TUint)
CBase::operator new(TUint,TUint)
CBase::~CBase()
Public Member Enumerations
enum TMediaType {
ELocalVideoFile , ELocalAudioFile , ELocalRamFile , ELocalSdpFile , EUrl , ELocalAudioPlaylist , EProgressiveDownload , EFlashVideoFile , ELocalAsxFile , EUnidentified
}
Private Attributes
RFile iFileHandle
RFs iFs

Constructor & Destructor Documentation

CMediaRecognizer()

CMediaRecognizer ( ) [private]

C++ default constructor.

~CMediaRecognizer()

IMPORT_C ~CMediaRecognizer ( ) [virtual]

Destructor.

Member Functions Documentation

ConstructL()

void ConstructL ( ) [private]

By default Symbian 2nd phase constructor is private.

CreateAudioFormatsArrayL(RMMFControllerImplInfoArray &)

void CreateAudioFormatsArrayL ( RMMFControllerImplInfoArray & aAudioController ) [private]
Creates array to hold all the controller plugins that support audio.
Since
2.0

Parameters

RMMFControllerImplInfoArray & aAudioController

CreateVideoFormatsArrayL(RMMFControllerImplInfoArray &)

void CreateVideoFormatsArrayL ( RMMFControllerImplInfoArray & aVideoController ) [private]
Creates array to hold all the controller plugins that support video.
Since
2.0

Parameters

RMMFControllerImplInfoArray & aVideoController

FileHandleExists()

TBool FileHandleExists ( ) [private]
Determines presence of file handle.
Since
3.0

FileHasAudioSupport(const TDesC &, TDataRecognitionResult &, RMMFControllerImplInfoArray &, RMMFControllerImplInfoArray &)

TBool FileHasAudioSupport ( const TDesC & aFileName,
TDataRecognitionResult & aFileRecognitionResult,
RMMFControllerImplInfoArray & aAudioControllers,
RMMFControllerImplInfoArray & aVideoControllers
) [private]
Checks if there is audio playback support.
Since
2.0

Parameters

const TDesC & aFileName
TDataRecognitionResult & aFileRecognitionResult Recognition result
RMMFControllerImplInfoArray & aAudioControllers
RMMFControllerImplInfoArray & aVideoControllers

FileHasVideoSupportL(const TDesC &, TDataRecognitionResult &, RMMFControllerImplInfoArray &)

TBool FileHasVideoSupportL ( const TDesC & aFileName,
TDataRecognitionResult & aFileRecognitionResult,
RMMFControllerImplInfoArray & aVideoControllers
) [private]
Checks if there is video playback support.
Since
2.0

Parameters

const TDesC & aFileName
TDataRecognitionResult & aFileRecognitionResult Recognition result
RMMFControllerImplInfoArray & aVideoControllers

FreeFilehandle()

IMPORT_C void FreeFilehandle ( )
Frees recognizer's filehandle.
Since
3.0

IdentifyMediaTypeL(const TDesC &, TBool)

IMPORT_C TMediaType IdentifyMediaTypeL ( const TDesC & aMediaName,
TBool aIncludeUrls = EFalse
)
Recognizes media type.
Since
2.0

Parameters

const TDesC & aMediaName Media file name or Url
TBool aIncludeUrls = EFalse Are Urls included or not

IdentifyMediaTypeL(const TDesC &, RFile &, TBool)

IMPORT_C TMediaType IdentifyMediaTypeL ( const TDesC & aMediaName,
RFile & aFile,
TBool aIncludeUrls = EFalse
)
Recognizes media type.
Since
3.0

Parameters

const TDesC & aMediaName Media file name or Url
RFile & aFile file handle
TBool aIncludeUrls = EFalse Are Urls included or not

IsValidStreamingPrefix(const TDesC &)

IMPORT_C TBool IsValidStreamingPrefix ( const TDesC & aUrl )

Parameters

const TDesC & aUrl

IsValidUrlPrefix(const TDesC &)

IMPORT_C TBool IsValidUrlPrefix ( const TDesC & aUrl )

Parameters

const TDesC & aUrl

IsValidUrlPrefix(const TDesC8 &)

IMPORT_C TBool IsValidUrlPrefix ( const TDesC8 & aUrl )

Parameters

const TDesC8 & aUrl

MediaTypeL(const TDesC &)

TMediaType MediaTypeL ( const TDesC & aMediaName ) [private]

Recognizes media type for non-url type

Parameters

const TDesC & aMediaName

MimeTypeL(const TDesC &)

IMPORT_C TBuf < KMaxDataTypeLength > MimeTypeL ( const TDesC & aLocalFile )
Recognizes Media files MimeType.
Since
2.0

Parameters

const TDesC & aLocalFile File name

MimeTypeL(RFile &)

IMPORT_C TBuf < KMaxDataTypeLength > MimeTypeL ( RFile & aFile )
Recognizes Media files MimeType.
Since
3.0

Parameters

RFile & aFile File handle

NewL()

IMPORT_C CMediaRecognizer * NewL ( ) [static]

Two-phased constructor.

ReadFile(const TDesC &, TDes8 &, TInt)

TInt ReadFile ( const TDesC & aFileName,
TDes8 & aBuf,
TInt aBufSize
) [private]
Reads local file to buffer
Since
2.0

Parameters

const TDesC & aFileName
TDes8 & aBuf
TInt aBufSize

ReadFileViaNewFileHandle(const TDesC &, TDes8 &, TInt)

TInt ReadFileViaNewFileHandle ( const TDesC & aFileName,
TDes8 & aBuf,
TInt aBufSize
) [private]
Reads local file to buffer using new RFile handle
Since
9.2

Parameters

const TDesC & aFileName
TDes8 & aBuf
TInt aBufSize

RecognizeFileL(const TDesC &, TDataRecognitionResult &)

void RecognizeFileL ( const TDesC & aFileName,
TDataRecognitionResult & aResult
) [private]
Recognizes local file
Since
2.0

Parameters

const TDesC & aFileName
TDataRecognitionResult & aResult

Member Enumerations Documentation

Enum TMediaType

Enumerators

ELocalVideoFile
ELocalAudioFile
ELocalRamFile
ELocalSdpFile
EUrl
ELocalAudioPlaylist
EProgressiveDownload
EFlashVideoFile
ELocalAsxFile
EUnidentified

Member Data Documentation

RFile iFileHandle

RFile iFileHandle [private]

RFs iFs

RFs iFs [private]