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)
void ConstructL ( M3GPDataSinkObserver *)
TInt DoIdleDelete ()
TTimeIntervalMicroSeconds GetElapsedTime ()
TTimeIntervalMicroSeconds GetRemainingTimeL ()
void M3GPMP4LibDeleteTempFileName ( MP4FileName )
void OpenFileL ( TFileName , TFourCC , const TDesC8 &, TCamCSinkFileFormat )
void OpenFileL ( CMMFFile *, TFourCC , const TDesC8 &, TCamCSinkFileFormat )
TInt SetAverageAudioBitRate ( TInt )
TInt SetAverageVideoBitRate ( TInt )
TInt SetMaxVideoBitRate ( TInt )
void SetSizeLimit ( TUint )
TInt SetVideoFrameSize ( TSize )
void SinkStopL ()
void WriteBufferL ( CCMRMediaBuffer *)
Private Member Functions
void ComposeUDTAL ()
void ConvertAVCHeaderByteStreamL ( CCMRMediaBuffer *, TDes8 &)
void ConvertAVCHeaderNALL ( CCMRMediaBuffer *, TDes8 &)
void ConvertBytestreamHeadersToNALSizes ( CCMRMediaBuffer *)
void ConvertNALEncapsulationToNALSizes ( CCMRMediaBuffer *)
TUint CurrentFileSize ()
TUint CurrentMetadataSize ()
void DetermineAACFrameDurationL ( CCMRMediaBuffer *)
TInt64 DriveFreeSpaceL ()
TInt IdleDelete ( TAny *)
void LittleEndianPut16 ( TUint8 *, TUint16 )
void LittleEndianPut32 ( 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
MP4Handle iMP4Handle
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()

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

ConstructL(M3GPDataSinkObserver *)

void ConstructL ( M3GPDataSinkObserver * aObserver )

Constructor.

Parameters

M3GPDataSinkObserver * aObserver

ConvertAVCHeaderByteStreamL(CCMRMediaBuffer *, TDes8 &)

void ConvertAVCHeaderByteStreamL ( 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 &)

void ConvertAVCHeaderNALL ( 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 *)

void ConvertBytestreamHeadersToNALSizes ( 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 *)

void ConvertNALEncapsulationToNALSizes ( 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 *)

void DetermineAACFrameDurationL ( 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)

void LittleEndianPut16 ( TUint8 * aPtr,
TUint16 aVal
) [private]
Convert 16bit unsigned value to little endian format into buffer
Since
5.2

Parameters

TUint8 * aPtr
TUint16 aVal

LittleEndianPut32(TUint8 *, TUint32)

void LittleEndianPut32 ( TUint8 * aPtr,
TUint32 aVal
) [private]
Convert 32bit unsigned value to little endian format into buffer
Since
5.2

Parameters

TUint8 * aPtr
TUint32 aVal

M3GPMP4LibDeleteTempFileName(MP4FileName)

void M3GPMP4LibDeleteTempFileName ( MP4FileName tempFileName )

Parameters

MP4FileName tempFileName

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

void OpenFileL ( TFileName aFileName,
TFourCC aAudioCodecType,
const TDesC8 & aVideoCodecType,
TCamCSinkFileFormat aFileFormat
) [virtual]
Open a file for writing.
Since
2.1

Parameters

TFileName aFileName File name
TFourCC aAudioCodecType Four CC code of the used audio codec
const TDesC8 & aVideoCodecType Four CC code of the used video codec
TCamCSinkFileFormat aFileFormat Used file format TCamCSinkFileFormat

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

void OpenFileL ( CMMFFile * aMMFFile,
TFourCC aAudioCodecType,
const TDesC8 & aVideoCodecType,
TCamCSinkFileFormat aFileFormat
) [virtual]
Open a 3GP file for writing.
Since
3.2

Parameters

CMMFFile * aMMFFile CMMFFile from MMF
TFourCC aAudioCodecType Four CC code of the used audio codec
const TDesC8 & aVideoCodecType Four CC code of the used video codec
TCamCSinkFileFormat aFileFormat Used file format TCamCSinkFileFormat

SetAverageAudioBitRate(TInt)

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

Parameters

TInt aBitRate Average bitrate

SetAverageVideoBitRate(TInt)

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

Parameters

TInt aBitRate Average bitrate

SetMaxVideoBitRate(TInt)

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

Parameters

TInt aBitRate Maximum bitrate

SetSizeLimit(TUint)

void SetSizeLimit ( TUint aSize ) [virtual]
Set size limit of the 3GP file to be recorded in bytes.
Since
2.1

Parameters

TUint aSize Limit

SetVideoFrameSize(TSize)

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

Parameters

TSize aSize Frame size

SinkStopL()

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

WriteBufferL(CCMRMediaBuffer *)

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

Parameters

CCMRMediaBuffer * aBuffer Buffer 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

MP4Handle iMP4Handle [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]