CMediaRecognizer Class Reference

class CMediaRecognizer : public CBase

Inherits from

Public Member Functions
~CMediaRecognizer()
IMPORT_C voidFreeFilehandle()
IMPORT_C TMediaTypeIdentifyMediaTypeL(const TDesC &, TBool)
IMPORT_C TMediaTypeIdentifyMediaTypeL(const TDesC &, RFile &, TBool)
IMPORT_C TBoolIsValidStreamingPrefix(const TDesC &)
IMPORT_C TBoolIsValidUrlPrefix(const TDesC &)
IMPORT_C TBoolIsValidUrlPrefix(const TDesC8 &)
IMPORT_C TBuf< KMaxDataTypeLength >MimeTypeL(const TDesC &)
IMPORT_C TBuf< KMaxDataTypeLength >MimeTypeL(RFile &)
IMPORT_C CMediaRecognizer *NewL()
Private Member Functions
CMediaRecognizer()
voidConstructL()
voidCreateAudioFormatsArrayL(RMMFControllerImplInfoArray &)
voidCreateVideoFormatsArrayL(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)
voidRecognizeFileL(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
enumTMediaType {
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()

voidConstructL()[private]

By default Symbian 2nd phase constructor is private.

CreateAudioFormatsArrayL(RMMFControllerImplInfoArray &)

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

Parameters

RMMFControllerImplInfoArray & aAudioController

CreateVideoFormatsArrayL(RMMFControllerImplInfoArray &)

voidCreateVideoFormatsArrayL(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 & aFileRecognitionResultRecognition 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 & aFileRecognitionResultRecognition result
RMMFControllerImplInfoArray & aVideoControllers

FreeFilehandle()

IMPORT_C voidFreeFilehandle()
Frees recognizer's filehandle.
Since
3.0

IdentifyMediaTypeL(const TDesC &, TBool)

IMPORT_C TMediaTypeIdentifyMediaTypeL(const TDesC &aMediaName,
TBoolaIncludeUrls = EFalse
)
Recognizes media type.
Since
2.0

Parameters

const TDesC & aMediaNameMedia file name or Url
TBool aIncludeUrls = EFalseAre Urls included or not

IdentifyMediaTypeL(const TDesC &, RFile &, TBool)

IMPORT_C TMediaTypeIdentifyMediaTypeL(const TDesC &aMediaName,
RFile &aFile,
TBoolaIncludeUrls = EFalse
)
Recognizes media type.
Since
3.0

Parameters

const TDesC & aMediaNameMedia file name or Url
RFile & aFilefile handle
TBool aIncludeUrls = EFalseAre Urls included or not

IsValidStreamingPrefix(const TDesC &)

IMPORT_C TBoolIsValidStreamingPrefix(const TDesC &aUrl)

Parameters

const TDesC & aUrl

IsValidUrlPrefix(const TDesC &)

IMPORT_C TBoolIsValidUrlPrefix(const TDesC &aUrl)

Parameters

const TDesC & aUrl

IsValidUrlPrefix(const TDesC8 &)

IMPORT_C TBoolIsValidUrlPrefix(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 & aLocalFileFile name

MimeTypeL(RFile &)

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

Parameters

RFile & aFileFile handle

NewL()

IMPORT_C CMediaRecognizer *NewL()[static]

Two-phased constructor.

ReadFile(const TDesC &, TDes8 &, TInt)

TInt ReadFile(const TDesC &aFileName,
TDes8 &aBuf,
TIntaBufSize
)[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,
TIntaBufSize
)[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 &)

voidRecognizeFileL(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]