CBubbleVideoPlayer Class Reference

class CBubbleVideoPlayer : public CBase

Video ringing tone player

Uses CVideoPlayerUtility to play video clips.

BubbleManager.lib S60 v3.2

Inherits from

Public Member Functions
~CBubbleVideoPlayer()
voidAdjustToWindow(RWindow &, const TRect &, TBool)
voidAdjustToWindow2(RWindow &)
voidMuteAudio()
CBubbleVideoPlayer *New(const TDesC &, TInt, TUint, MBubbleVideoPlayerObserver &, RWindow &)
CBubbleVideoPlayer *NewL(const TDesC &, TInt, TUint, MBubbleVideoPlayerObserver &, RWindow &)
TInt PausePlaying()
voidPlay(TRingingType, TInt)
voidResumePlaying()
TVideoPlayerState State()
voidStopPlaying()
TVideoResolution VideoResolution()
Private Member Functions
CBubbleVideoPlayer()
CBubbleVideoPlayer(MBubbleVideoPlayerObserver &)
voidCalculateClipAndScreenRectSize(const TSize &, const TSize &, TSize &, TSize &)
TSize CalculateScreenRectSize(const TSize &, const TSize &, TBool)
voidConstructL(const TDesC &, TInt, TUint, RWindow &)
TInt DoRingingRepeat()
TInt DoVolumeRamp()
voidMvpuoEvent(const TMMFEvent &)
voidMvpuoFrameReady(CFbsBitmap &, TInt)
voidMvpuoOpenComplete(TInt)
voidMvpuoPlayComplete(TInt)
voidMvpuoPrepareComplete(TInt)
TInt RepeatsTrailPauseTimerCallback(TAny *)
voidSetRingingType(TRingingType)
voidSetVolume(TInt)
TSize VideoFrameSize()
TInt VolumeRampTimerCallback(TAny *)
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
enumTRingingType { ETypeRinging, ETypeRingingOnce, ETypeAscending }
enumTVideoPlayerState {
EVideoError = -1, EVideoClosed, EVideoOpening, EVideoOpen, EVideoPreparing, EVideoReady, EVideoPlaying, EVideoPaused
}
enumTVideoResolution { EVideoOther = -1, EVideoQCIF, EVideoSubQCIF }
Private Attributes
RFile iFileHandle
MBubbleVideoPlayerObserver &iObserver
TVideoPlayerState iPlayerState
TInt iRampedVolume
CPeriodic *iRepeatsTrailPauseTimer
TRingingType iRingingType
TBool iToBePlayed
CVideoPlayerUtility *iVideoPlayer
TInt iVolume
CPeriodic *iVolumeRampTimer

Constructor & Destructor Documentation

CBubbleVideoPlayer()

CBubbleVideoPlayer()[private]

C++ default constructor.

CBubbleVideoPlayer(MBubbleVideoPlayerObserver &)

CBubbleVideoPlayer(MBubbleVideoPlayerObserver &aObserver)[private]

C++ constructor.

Parameters

MBubbleVideoPlayerObserver & aObserver

~CBubbleVideoPlayer()

~CBubbleVideoPlayer()[virtual]

Destructor.

Member Functions Documentation

AdjustToWindow(RWindow &, const TRect &, TBool)

voidAdjustToWindow(RWindow &aDisplayWindow,
const TRect &aUncropPane,
TBoolaArbitaryScalingSupported = EFalse
)

Scales and crops video to cover target window. Series 60 v3.2

Parameters

RWindow & aDisplayWindowWindow for video.
const TRect & aUncropPaneRectangle for cropping control.
TBool aArbitaryScalingSupported = EFalseScaling capability of the device.

AdjustToWindow2(RWindow &)

voidAdjustToWindow2(RWindow &aDisplayWindow)

Scales and crops video to cover target window. This method doens't use uncrop pane and crops video only when needed. Allowed cropping can be set via KPhoneMaxVideoCrop. Cropped video is centered to video pane. This metdod should be used only when video player supports arbitrary scaling of video image. Series 60 v3.2

Parameters

RWindow & aDisplayWindowWindow for video playback.

CalculateClipAndScreenRectSize(const TSize &, const TSize &, TSize &, TSize &)

voidCalculateClipAndScreenRectSize(const TSize &aWindowSize,
const TSize &aVideoFrameSize,
TSize &aClipSize,
TSize &aScreenSize
)[private, static]

Calculates aClipSize and aScreenSize based on aWindowSize and aVideoFrameSize. aScreenSize is set to maximum without exceeding the crop limit (KPhoneMaxVideoCrop). aClipSize is set match to scaled video image to prevent black stripes around video.

Parameters

const TSize & aWindowSize
const TSize & aVideoFrameSize
TSize & aClipSize
TSize & aScreenSize

CalculateScreenRectSize(const TSize &, const TSize &, TBool)

TSize CalculateScreenRectSize(const TSize &aCanvasSize,
const TSize &aVideoFrameSize,
TBoolaArbitraryScalingSupported
)[private, static]

Calculates size for video player screen rectangle based on canvas and video dimensions.

Parameters

const TSize & aCanvasSize
const TSize & aVideoFrameSize
TBool aArbitraryScalingSupported

ConstructL(const TDesC &, TInt, TUint, RWindow &)

voidConstructL(const TDesC &aFileName,
TIntaPriority,
TUintaPreference,
RWindow &aVideoTarget
)[private]

By default Symbian 2nd phase constructor is private.

Parameters

const TDesC & aFileName
TInt aPriority
TUint aPreference
RWindow & aVideoTarget

DoRingingRepeat()

TInt DoRingingRepeat()[private]

DoRingingRepeat

DoVolumeRamp()

TInt DoVolumeRamp()[private]

DoVolumeRamp

MuteAudio()

voidMuteAudio()

Make video to play silent. Series 60 v3.2

MvpuoEvent(const TMMFEvent &)

voidMvpuoEvent(const TMMFEvent &aEvent)[private]

MvpuoEvent

Parameters

const TMMFEvent & aEvent

MvpuoFrameReady(CFbsBitmap &, TInt)

voidMvpuoFrameReady(CFbsBitmap &aFrame,
TIntaError
)[private]

MvpuoFrameReady

Parameters

CFbsBitmap & aFrame
TInt aError

MvpuoOpenComplete(TInt)

voidMvpuoOpenComplete(TIntaError)[private]

MvpuoOpenComplete

Parameters

TInt aError

MvpuoPlayComplete(TInt)

voidMvpuoPlayComplete(TIntaError)[private]

MvpuoPlayComplete

Parameters

TInt aError

MvpuoPrepareComplete(TInt)

voidMvpuoPrepareComplete(TIntaError)[private]

MvpuoPrepareComplete

Parameters

TInt aError

New(const TDesC &, TInt, TUint, MBubbleVideoPlayerObserver &, RWindow &)

CBubbleVideoPlayer *New(const TDesC &aRingingTone,
TIntaPriority,
TUintaPreference,
MBubbleVideoPlayerObserver &aObserver,
RWindow &aVideoTarget
)[static]

Two-phased constructor (non leaving). The instance of the video player. NULL is returned if creation failed.

Parameters

const TDesC & aRingingTone
TInt aPriorityThe priority for the playing
TUint aPreferenceThe preference value
MBubbleVideoPlayerObserver & aObserverVideo player observer
RWindow & aVideoTarget

NewL(const TDesC &, TInt, TUint, MBubbleVideoPlayerObserver &, RWindow &)

CBubbleVideoPlayer *NewL(const TDesC &aRingingTone,
TIntaPriority,
TUintaPreference,
MBubbleVideoPlayerObserver &aObserver,
RWindow &aVideoTarget
)[static]

Two-phased constructor. The instance of the video player.

Parameters

const TDesC & aRingingToneThe ringing tone
TInt aPriorityThe priority for the playing
TUint aPreferenceThe preference value
MBubbleVideoPlayerObserver & aObserverVideo player observer
RWindow & aVideoTarget

PausePlaying()

TInt PausePlaying()

Pauses video playback. Series 60 v3.2

KErrNone is successful.

Play(TRingingType, TInt)

voidPlay(TRingingTypeaRingType,
TIntaVolume
)

Plays the loaded video. Series 60 v3.2

Parameters

TRingingType aRingType
TInt aVolumetake value from 1 to 10

RepeatsTrailPauseTimerCallback(TAny *)

TInt RepeatsTrailPauseTimerCallback(TAny *aObj)[private, static]

RepeatsTrailPauseTimerCallback

Parameters

TAny * aObj

ResumePlaying()

voidResumePlaying()

Resumes video playback. Series 60 v3.2

SetRingingType(TRingingType)

voidSetRingingType(TRingingTypeaRingingType)[private]

SetRingingType

Parameters

TRingingType aRingingType

SetVolume(TInt)

voidSetVolume(TIntaVolume)[private]

SetVolume

Parameters

TInt aVolume

State()

TVideoPlayerState State()const

Get the state of the phone video player. Series 60 v3.2

The status of video player

StopPlaying()

voidStopPlaying()

Stops video playback. Series 60 v3.2

VideoFrameSize()

TSize VideoFrameSize()const [private]

Frame size

VideoResolution()

TVideoResolution VideoResolution()const

Get the resolution of the loaded video. Series 60 v3.2

The resolution.

VolumeRampTimerCallback(TAny *)

TInt VolumeRampTimerCallback(TAny *aObj)[private, static]

VolumeRampTimerCallback

Parameters

TAny * aObj

Member Enumerations Documentation

Enum TRingingType

Enumerators

ETypeRinging
ETypeRingingOnce
ETypeAscending

Enum TVideoPlayerState

Enumerators

EVideoError = -1
EVideoClosed
EVideoOpening
EVideoOpen
EVideoPreparing
EVideoReady
EVideoPlaying
EVideoPaused

Enum TVideoResolution

Enumerators

EVideoOther = -1
EVideoQCIF
EVideoSubQCIF

Member Data Documentation

RFile iFileHandle

RFile iFileHandle[private]

MBubbleVideoPlayerObserver & iObserver

MBubbleVideoPlayerObserver &iObserver[private]

TVideoPlayerState iPlayerState

TVideoPlayerState iPlayerState[private]

TInt iRampedVolume

TInt iRampedVolume[private]

CPeriodic * iRepeatsTrailPauseTimer

CPeriodic *iRepeatsTrailPauseTimer[private]

TRingingType iRingingType

TRingingType iRingingType[private]

TBool iToBePlayed

TBool iToBePlayed[private]

CVideoPlayerUtility * iVideoPlayer

CVideoPlayerUtility *iVideoPlayer[private]

TInt iVolume

TInt iVolume[private]

CPeriodic * iVolumeRampTimer

CPeriodic *iVolumeRampTimer[private]