CCamC3GPDataSinkImp Class Reference

class CCamC3GPDataSinkImp : public CCamC3GPDataSink

CCamC3GPDataSinkImp class. This class implements the 3GP data sink methods.

camc3gpsink
Since
2.1

Inherits from

Public Member Functions
CCamC3GPDataSinkImp()
~CCamC3GPDataSinkImp(void)
voidConstructL(M3GPDataSinkObserver *)
TInt DoIdleDelete()
TTimeIntervalMicroSeconds GetElapsedTime()
TTimeIntervalMicroSeconds GetRemainingTimeL()
voidM3GPMP4LibDeleteTempFileName(MP4FileName)
voidOpenFileL(TFileName, TFourCC, const TDesC8 &, TCamCSinkFileFormat)
voidOpenFileL(CMMFFile *, TFourCC, const TDesC8 &, TCamCSinkFileFormat)
TInt SetAverageAudioBitRate(TInt)
TInt SetAverageVideoBitRate(TInt)
TInt SetMaxVideoBitRate(TInt)
voidSetSizeLimit(TUint)
TInt SetVideoFrameSize(TSize)
voidSinkStopL()
voidWriteBufferL(CCMRMediaBuffer *)
Private Member Functions
voidComposeUDTAL()
voidConvertAVCHeaderByteStreamL(CCMRMediaBuffer *, TDes8 &)
voidConvertAVCHeaderNALL(CCMRMediaBuffer *, TDes8 &)
voidConvertBytestreamHeadersToNALSizes(CCMRMediaBuffer *)
voidConvertNALEncapsulationToNALSizes(CCMRMediaBuffer *)
TUint CurrentFileSize()
TUint CurrentMetadataSize()
voidDetermineAACFrameDurationL(CCMRMediaBuffer *)
TInt64 DriveFreeSpaceL()
TInt IdleDelete(TAny *)
voidLittleEndianPut16(TUint8 *, TUint16)
voidLittleEndianPut32(TUint8 *, TUint32)
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()
CCamC3GPDataSink::CCamC3GPDataSink()
CCamC3GPDataSink::NewL(M3GPDataSinkObserver *)
Inherited Enumerations
CCamC3GPDataSink:TCamCSinkFileFormat
Private Attributes
TInt iAVCOutputLevel
TInt iAudioAACFrameDuration
TInt iAudioAACSamplerate
TInt iAudioAverageBitRate
TUint8 *iAudioBuffer
TUint iAudioBufferFrameSize
TUint iAudioBufferSize
TInt iAudioDecSpecInfoSize
TUint iAudioFrameNumber
TUint iAudioFramesInBuffer
TInt64 iAvailableSpaceAtStart
TTimeIntervalMicroSeconds iAvarageEndTime
TInt iBufferSize
CCMRMediaBuffer::TBufferType iBufferType
TUint iBytesOfMetadata
TUint iBytesReceived
TInt iCriticalDiskVal
RPointerArray< MP4FileName > *iDeleteFileQueue
TBool iDiskFull
TInt iDriveNumber
RFs *iFS
RFile *iFile
TUint iFileCodecType
TBool iFileHandleExists
TFileName iFileName
TBool iFileSizeLimitReached
TTimeIntervalMicroSeconds iFirstVideoFrameTimestamp
TInt64 iFreeDiskSpace
TInt iFreeDiskSpaceCounter
CIdle *iIdleDelete
CMMFFile *iMMFFile
MP4HandleiMP4Handle
M3GPDataSinkObserver *iObserver
TTimeIntervalMicroSeconds iRemainingTime
TInt64 iSizeLimit
TFileName iTmpFileName
TInt iVideoAverageBitRate
TUint8 *iVideoBuffer
TUint iVideoBufferFrameSize
TBool iVideoBufferRandomAccessPoint
TUint iVideoBufferSize
TTimeIntervalMicroSeconds iVideoBufferTimestamp
TInt iVideoDecSpecInfoSize
TUint iVideoFrameDuration
TUint iVideoFrameNumber
TUint iVideoIntraFrameNumber
TInt iVideoMaxBitRate
TBool iVideoRandomAccessPoint
TTimeIntervalMicroSeconds iVideoTimestamp
TInt iVideoXResolution
TInt iVideoYResolution

Constructor & Destructor Documentation

CCamC3GPDataSinkImp()

CCamC3GPDataSinkImp()[inline]

Default constructor.

~CCamC3GPDataSinkImp(void)

~CCamC3GPDataSinkImp(void)

Destructor.

Parameters

void

Member Functions Documentation

ComposeUDTAL()

voidComposeUDTAL()[private]
Compose UDTA (User Data) to video file
Since
5.2

ConstructL(M3GPDataSinkObserver *)

voidConstructL(M3GPDataSinkObserver *aObserver)

Constructor.

Parameters

M3GPDataSinkObserver * aObserver

ConvertAVCHeaderByteStreamL(CCMRMediaBuffer *, TDes8 &)

voidConvertAVCHeaderByteStreamL(CCMRMediaBuffer *aBuffer,
TDes8 &aDstBuf
)[private]
Convert AVC specific decoder config info from Bytestream (ElementaryStream) encapsulation to AVC Decoder Configuration Record -format
Since
3.2

Parameters

CCMRMediaBuffer * aBuffer
TDes8 & aDstBuf

ConvertAVCHeaderNALL(CCMRMediaBuffer *, TDes8 &)

voidConvertAVCHeaderNALL(CCMRMediaBuffer *aBuffer,
TDes8 &aDstBuf
)[private]
Convert AVC specific decoder config info from NAL (GenericPayload) encapsulation to AVC Decoder Configuration Record -format
Since
3.2

Parameters

CCMRMediaBuffer * aBuffer
TDes8 & aDstBuf

ConvertBytestreamHeadersToNALSizes(CCMRMediaBuffer *)

voidConvertBytestreamHeadersToNALSizes(CCMRMediaBuffer *aBuffer)[private]
Converts AVC frame from Bytestream (ElementaryStream) encapsulation to file format AVC sample structure by replacing bytestream headers with NAL unit sizes.
Since
5.0

Parameters

CCMRMediaBuffer * aBuffer

ConvertNALEncapsulationToNALSizes(CCMRMediaBuffer *)

voidConvertNALEncapsulationToNALSizes(CCMRMediaBuffer *aBuffer)[private]
Converts AVC frame from NAL (EGenericPayload) encapsulation to file format AVC sample structure by replacing NAL encapsulation with NAL unit sizes.
Since
5.0

Parameters

CCMRMediaBuffer * aBuffer

CurrentFileSize()

TUint CurrentFileSize()const [private]
Estimate current file size
Since
2.1

CurrentMetadataSize()

TUint CurrentMetadataSize()const [private]
Estimate current metadata size
Since
2.1

DetermineAACFrameDurationL(CCMRMediaBuffer *)

voidDetermineAACFrameDurationL(CCMRMediaBuffer *aBuffer)[private]
Determines AAC audio frame duration.
Since
2.8

Parameters

CCMRMediaBuffer * aBuffer

DoIdleDelete()

TInt DoIdleDelete()

DriveFreeSpaceL()

TInt64 DriveFreeSpaceL()[private]
Calculate free space on a drive in bytes.
Since
2.1

GetElapsedTime()

TTimeIntervalMicroSeconds GetElapsedTime()[virtual]
Return the amount of time recording has been on in microseconds.
Since
2.1

GetRemainingTimeL()

TTimeIntervalMicroSeconds GetRemainingTimeL()[virtual]
Return the estimated remaining time for the recording in microseconds.
Since
2.1

IdleDelete(TAny *)

TInt IdleDelete(TAny *aCont)[private, static]

Parameters

TAny * aCont

LittleEndianPut16(TUint8 *, TUint16)

voidLittleEndianPut16(TUint8 *aPtr,
TUint16aVal
)[private]
Convert 16bit unsigned value to little endian format into buffer
Since
5.2

Parameters

TUint8 * aPtr
TUint16 aVal

LittleEndianPut32(TUint8 *, TUint32)

voidLittleEndianPut32(TUint8 *aPtr,
TUint32aVal
)[private]
Convert 32bit unsigned value to little endian format into buffer
Since
5.2

Parameters

TUint8 * aPtr
TUint32 aVal

M3GPMP4LibDeleteTempFileName(MP4FileName)

voidM3GPMP4LibDeleteTempFileName(MP4FileNametempFileName)

Parameters

MP4FileName tempFileName

OpenFileL(TFileName, TFourCC, const TDesC8 &, TCamCSinkFileFormat)

voidOpenFileL(TFileNameaFileName,
TFourCCaAudioCodecType,
const TDesC8 &aVideoCodecType,
TCamCSinkFileFormataFileFormat
)[virtual]
Open a file for writing.
Since
2.1

Parameters

TFileName aFileNameFile name
TFourCC aAudioCodecTypeFour CC code of the used audio codec
const TDesC8 & aVideoCodecTypeFour CC code of the used video codec
TCamCSinkFileFormat aFileFormatUsed file format TCamCSinkFileFormat

OpenFileL(CMMFFile *, TFourCC, const TDesC8 &, TCamCSinkFileFormat)

voidOpenFileL(CMMFFile *aMMFFile,
TFourCCaAudioCodecType,
const TDesC8 &aVideoCodecType,
TCamCSinkFileFormataFileFormat
)[virtual]
Open a 3GP file for writing.
Since
3.2

Parameters

CMMFFile * aMMFFileCMMFFile from MMF
TFourCC aAudioCodecTypeFour CC code of the used audio codec
const TDesC8 & aVideoCodecTypeFour CC code of the used video codec
TCamCSinkFileFormat aFileFormatUsed file format TCamCSinkFileFormat

SetAverageAudioBitRate(TInt)

TInt SetAverageAudioBitRate(TIntaBitRate)[virtual]
Give average audio bitrate to sink.
Since
2.1

Parameters

TInt aBitRateAverage bitrate

SetAverageVideoBitRate(TInt)

TInt SetAverageVideoBitRate(TIntaBitRate)[virtual]
Give average video bitrate to sink.
Since
2.1

Parameters

TInt aBitRateAverage bitrate

SetMaxVideoBitRate(TInt)

TInt SetMaxVideoBitRate(TIntaBitRate)[virtual]
Give maximum video bitrate to sink.
Since
2.1

Parameters

TInt aBitRateMaximum bitrate

SetSizeLimit(TUint)

voidSetSizeLimit(TUintaSize)[virtual]
Set size limit of the 3GP file to be recorded in bytes.
Since
2.1

Parameters

TUint aSizeLimit

SetVideoFrameSize(TSize)

TInt SetVideoFrameSize(TSizeaSize)[virtual]
Give video frame size to sink.
Since
2.1

Parameters

TSize aSizeFrame size

SinkStopL()

voidSinkStopL()[virtual]
Order the sink to finalize and close the current 3GP file.
Since
2.1

WriteBufferL(CCMRMediaBuffer *)

voidWriteBufferL(CCMRMediaBuffer *aBuffer)[virtual]
Write an audio/video buffer to the sink.
Since
2.1

Parameters

CCMRMediaBuffer * aBufferBuffer containing audio/video data

Member Data Documentation

TInt iAVCOutputLevel

TInt iAVCOutputLevel[private]

TInt iAudioAACFrameDuration

TInt iAudioAACFrameDuration[private]

TInt iAudioAACSamplerate

TInt iAudioAACSamplerate[private]

TInt iAudioAverageBitRate

TInt iAudioAverageBitRate[private]

TUint8 * iAudioBuffer

TUint8 *iAudioBuffer[private]

TUint iAudioBufferFrameSize

TUint iAudioBufferFrameSize[private]

TUint iAudioBufferSize

TUint iAudioBufferSize[private]

TInt iAudioDecSpecInfoSize

TInt iAudioDecSpecInfoSize[private]

TUint iAudioFrameNumber

TUint iAudioFrameNumber[private]

TUint iAudioFramesInBuffer

TUint iAudioFramesInBuffer[private]

TInt64 iAvailableSpaceAtStart

TInt64 iAvailableSpaceAtStart[private]

TTimeIntervalMicroSeconds iAvarageEndTime

TTimeIntervalMicroSeconds iAvarageEndTime[private]

TInt iBufferSize

TInt iBufferSize[private]

CCMRMediaBuffer::TBufferType iBufferType

CCMRMediaBuffer::TBufferType iBufferType[private]

TUint iBytesOfMetadata

TUint iBytesOfMetadata[private]

TUint iBytesReceived

TUint iBytesReceived[private]

TInt iCriticalDiskVal

TInt iCriticalDiskVal[private]

RPointerArray< MP4FileName > * iDeleteFileQueue

RPointerArray< MP4FileName > *iDeleteFileQueue[private]

TBool iDiskFull

TBool iDiskFull[private]

TInt iDriveNumber

TInt iDriveNumber[private]

RFs * iFS

RFs *iFS[private]

RFile * iFile

RFile *iFile[private]

TUint iFileCodecType

TUint iFileCodecType[private]

TBool iFileHandleExists

TBool iFileHandleExists[private]

TFileName iFileName

TFileName iFileName[private]

TBool iFileSizeLimitReached

TBool iFileSizeLimitReached[private]

TTimeIntervalMicroSeconds iFirstVideoFrameTimestamp

TTimeIntervalMicroSeconds iFirstVideoFrameTimestamp[private]

TInt64 iFreeDiskSpace

TInt64 iFreeDiskSpace[private]

TInt iFreeDiskSpaceCounter

TInt iFreeDiskSpaceCounter[private]

CIdle * iIdleDelete

CIdle *iIdleDelete[private]

CMMFFile * iMMFFile

CMMFFile *iMMFFile[private]

MP4Handle iMP4Handle

MP4HandleiMP4Handle[private]

M3GPDataSinkObserver * iObserver

M3GPDataSinkObserver *iObserver[private]

TTimeIntervalMicroSeconds iRemainingTime

TTimeIntervalMicroSeconds iRemainingTime[private]

TInt64 iSizeLimit

TInt64 iSizeLimit[private]

TFileName iTmpFileName

TFileName iTmpFileName[private]

TInt iVideoAverageBitRate

TInt iVideoAverageBitRate[private]

TUint8 * iVideoBuffer

TUint8 *iVideoBuffer[private]

TUint iVideoBufferFrameSize

TUint iVideoBufferFrameSize[private]

TBool iVideoBufferRandomAccessPoint

TBool iVideoBufferRandomAccessPoint[private]

TUint iVideoBufferSize

TUint iVideoBufferSize[private]

TTimeIntervalMicroSeconds iVideoBufferTimestamp

TTimeIntervalMicroSeconds iVideoBufferTimestamp[private]

TInt iVideoDecSpecInfoSize

TInt iVideoDecSpecInfoSize[private]

TUint iVideoFrameDuration

TUint iVideoFrameDuration[private]

TUint iVideoFrameNumber

TUint iVideoFrameNumber[private]

TUint iVideoIntraFrameNumber

TUint iVideoIntraFrameNumber[private]

TInt iVideoMaxBitRate

TInt iVideoMaxBitRate[private]

TBool iVideoRandomAccessPoint

TBool iVideoRandomAccessPoint[private]

TTimeIntervalMicroSeconds iVideoTimestamp

TTimeIntervalMicroSeconds iVideoTimestamp[private]

TInt iVideoXResolution

TInt iVideoXResolution[private]

TInt iVideoYResolution

TInt iVideoYResolution[private]