MSmilMediaFactory Class Reference

class MSmilMediaFactory

Factory interface for constructing media renderers.

Member Functions Documentation

CreateRendererL(const TDesC &, MSmilMedia *, MSmilMediaRenderer *&)

TMediaFactoryError CreateRendererL(const TDesC &aUrl,
MSmilMedia *aMedia,
MSmilMediaRenderer *&aRender
)[pure virtual]

Creates a renderer object for a given media URL. If the method fails, an error code is returned. Media may not be fully loaded when this method completes (in case of a stream it can't be), but at least enough must be known about it to construct a correct media specific renderer object.

This method is synchronous and might block for a while. The ownership of the returned renderer object is moved to whoever called this method.

Return values: EOk - renderer created succefully ENoRenderer - there is no renderer object available for this media type ENotFound - given URL was not found EConnectionError - getting the URL failed, possibly by timeout

Parameters

const TDesC & aUrl
MSmilMedia * aMedia
MSmilMediaRenderer *& aRender

PrefetchMediaL(const TDesC &)

voidPrefetchMediaL(const TDesC &aUrl)[pure virtual]

As above, except with a strong hint that the media should be prefetched and cached.

Parameters

const TDesC & aUrl

PrefetchStatus(const TDesC &, TInt &, TInt &)

TPrefetchStatus PrefetchStatus(const TDesC &aUrl,
TInt &aDown,
TInt &aSize
)[pure virtual]

Returns the current status of media prefetching of given URL. This includes amount downloaded so far (aDown) and total size (aSize, if known, 0 otherwise) in bytes.

Return values: ENone - no prefetch has been asked EWaiting - prefetch is waiting, for example to establish network connection EPrefeching - prefetch is in progress EReady - prefetch has completed ENotFound - given URL was not found EConnectionError - getting the URL failed, possibly by timeout

Parameters

const TDesC & aUrl
TInt & aDown
TInt & aSize

PresentationEnd()

voidPresentationEnd()[pure virtual]

The presentation has ended (though it might restart). The factory may free some resources, cut connections, etc.

PresentationReady()

voidPresentationReady()[pure virtual]

The parsing of presentation has finished and initial layout has been calculated.

QueryContentType(const TDesC &)

TBool QueryContentType(const TDesC &aMimeType)const [pure virtual]

Query for supported content type. Returns ETrue if the given type (for example "application/xhtml+xml") is supported by this factory implementation.

The method is used by the SMIL engine for resolving values like "ContentType:application/xhtml+xml" of the systemComponent content control attribute.

Parameters

const TDesC & aMimeType

RendererDeleted(MSmilMediaRenderer *)

voidRendererDeleted(MSmilMediaRenderer *aRenderer)[pure virtual]

Called by the engine to signal the factory that a renderer is being deleted. If the factory maintains any references to the renderer, they must be removed here. (DEPRECATED)

Parameters

MSmilMediaRenderer * aRenderer

RequestMediaL(const TDesC &, MSmilMedia *)

voidRequestMediaL(const TDesC &aUrl,
MSmilMedia *aMedia
)[pure virtual]

Instructs the factory that a media component from the given URL will be needed later. The factory should proceed to fetch at least enough of the media to be able to instantiate a correct renderer object for it later. Some factory implementation might start downloading and caching some media types already because of this call.

This method should return fast. If there is need for slow downloads, they should be performed asynchronously. This method is called when the engine sees a new URL, typically during parsing of SMIL file.

Parameters

const TDesC & aUrl
MSmilMedia * aMedia

SetBaseUrlL(const TDesC &)

voidSetBaseUrlL(const TDesC &aBaseUrl)[pure virtual]

Sets the base URL that is to be used for resolving relative URLs

Parameters

const TDesC & aBaseUrl

Member Enumerations Documentation

Enum TMediaFactoryError

Enumerators

EOk
ENoRenderer
ENotFound
EConnectionError

Enum TPrefetchStatus

Enumerators

EPrefetchNone
EPrefetchWaiting
EPrefeching
EPrefetchReady
EPrefetchNotFound
EPrefetchConnectionError