MSmilMediaRenderer Class Reference

class MSmilMediaRenderer

Interface for concrete media renderers. Each media renderer class is responsible of playback of some media type.

Member Functions Documentation

Close()

void Close ( ) [pure virtual]

Called by the engine to signal a renderer that the engine is no more referencing it. Renderer may be deleted in this call.

ConsumePointerEventL(const TPointerEvent &)

TBool ConsumePointerEventL ( const TPointerEvent & ) [inline, virtual]

Handle pointer events inside the renderer. If this method return ETrue the event is consumed and not processed by the SMIL engine. If it returns EFalse, the event is processed normally.

Parameters

const TPointerEvent &

Draw(CGraphicsContext &, const TRect &, CSmilTransitionFilter *, const MSmilFocus *)

void Draw ( CGraphicsContext & aGc,
const TRect & aRect,
CSmilTransitionFilter * aTransitionFilter,
const MSmilFocus * aFocus
) [pure virtual]

The engine calls this method to make a media renderer to draw its content. The graphics context to draw to is passed as a parameter. In addition, the exact rectangle that needs updating is provided, relative to the graphics context. Renderer may use this information to optimize drawing.All drawing must be performed synchronously during this method call.

Renderer should do the drawing using the transition filter passed as a parameter and draw the focus indicator if needed. Both these parameters may be null.

Parameters

CGraphicsContext & aGc
const TRect & aRect
CSmilTransitionFilter * aTransitionFilter
const MSmilFocus * aFocus

FreezeMedia()

void FreezeMedia ( ) [pure virtual]

Called by the engine to pause the media playback while keeping the visual presentation (for example the current video frame) visible.

HideMedia()

void HideMedia ( ) [pure virtual]

Called by the engine to stop the media playback and remove visual media from the screen. Timeline can be reset.

IntrinsicDuration()

TSmilTime IntrinsicDuration ( ) const [pure virtual]

Returns the intrinsic duration of a media object. This value can also be Indefinite (for media that continues indefinitely, like repeating animation) or Unresolved (for media that's length is not known, like streamed video). Discrete media (like images) have intrinsic duration of zero.

IntrinsicHeight()

TInt IntrinsicHeight ( ) const [pure virtual]

Returns the intrinsic (unscaled) size of a visual media object in pixels.

IntrinsicWidth()

TInt IntrinsicWidth ( ) const [pure virtual]

Returns the intrinsic (unscaled) size of a visual media object in pixels.

IsControl()

TBool IsControl ( ) const [pure virtual]

Returns TRUE if the media renderer has care of updating its drawing area itself, asynchronously to the SMIL engine. A video or audio renderer might work like this.

IsOpaque()

TBool IsOpaque ( ) const [pure virtual]

Returns TRUE if a visual media covers every pixel of its drawing surface fully

IsScrollable()

TBool IsScrollable ( ) const [pure virtual]

Returns TRUE if a visual media is scrollable

IsVisual()

TBool IsVisual ( ) const [pure virtual]

Returns TRUE if the media type is visual. Anything that draws its content is visual media. Audio is an example of non-visual media.

PrepareMediaL()

void PrepareMediaL ( ) [pure virtual]

Called by the engine to signal the renderer that the media is going to be played soon (this might involve reserving some resource, opening connections, decoding headers to find out intrinsic media values, etc)

ResumeMedia()

void ResumeMedia ( ) [pure virtual]

Called by the engine to continue the media playback after freeze

Scroll(TInt, TInt)

void Scroll ( TInt aDirX,
TInt aDirY
) [pure virtual]

Move scrollable media to given direction (-1=left/up, 1=down/right)

Parameters

TInt aDirX
TInt aDirY

SeekMediaL(const TSmilTime &)

void SeekMediaL ( const TSmilTime & aTime ) [pure virtual]

Called by the engine to seek media to given position on its local timeline

Parameters

const TSmilTime & aTime

SetVolume(TInt)

void SetVolume ( TInt aVolume ) [pure virtual]

Set volume of audio media (0-100).

Parameters

TInt aVolume

ShowMediaL()

void ShowMediaL ( ) [pure virtual]

Called by the engine to start media playback and to make visual media visible. The playback is started from the current position on the media timeline.