InDesign SDK  20.5
 All Classes Namespaces Functions Variables Typedefs Enumerations Enumerator Friends Groups Pages
IMediaFormatManager Class Referenceabstract

#include <IMediaFormatManager.h>

Inheritance diagram for IMediaFormatManager:
IPMUnknown

Public Types

enum  { kDefaultIID = IID_IMEDIAFORMATMANAGER }
 

Public Member Functions

virtual ErrorCode CanAccess (const MediaLocation &loc, const MediaType mediaType)=0
 
virtual bool16 CanPlay (const MediaLocation &loc)=0
 
virtual ErrorCode GetLastError ()=0
 
virtual IMediaReadFormatFindMediaReadFormat (MediaType mediaType, IPMStream *iPMStream)=0
 
virtual IMediaReadFormatFindMediaReadFormat (ClassID readFormatClassID)=0
 
virtual IMediaReadFormatFindMediaReadFormat (const MediaLocation &loc)=0
 
virtual IMediaReadFormatInfoFindMediaReadFormatInfo (const MediaLocation &loc)=0
 
- Public Member Functions inherited from IPMUnknown
virtual IPMUnknownQueryInterface (PMIID interfaceID) const =0
 
virtual void AddRef () const =0
 
virtual void Release () const =0
 

Detailed Description

This interface provides methods for obtaining read-only access to various media file formats.

Member Function Documentation

virtual ErrorCode IMediaFormatManager::CanAccess (const MediaLocationloc,
const MediaType mediaType 
)
pure virtual

Verifies that a media location can be accessed for a MediaType. This method is especially usefulfor checking whether URLs, though well-formed, can nevertheless be supported.

Parameters
loca MediaLocation to media content.
mediaTypeis either enMovie or enSound.
Returns
kSuccess if the MediaLocation can be accessed, else an ErrorCode that describes why the MediaLocation can not be accessed.
virtual bool16 IMediaFormatManager::CanPlay (const MediaLocationloc)
pure virtual

Tests if the media at the specified location can be played. This could be used, for example, to test if a media item can be previewed.

Returns
kTrue if the media can be played; kFalse otherwise.
virtual IMediaReadFormat* IMediaFormatManager::FindMediaReadFormat (MediaType mediaType,
IPMStreamiPMStream 
)
pure virtual

Finds an IMediaReadFormat capable of reading media content from a stream.

Parameters
mediaTypeis either enMovie or enSound.
iPMStreamis a stream capable of reading the media content.
Returns
valid pointer to an IMediaReadFormat instance if a format filter exists that recognizes the content; nil if a filter was not found.
virtual IMediaReadFormat* IMediaFormatManager::FindMediaReadFormat (ClassID readFormatClassID)
pure virtual

Finds the IMediaReadFormat instance for a specified ClassID.

Parameters
readFormatClassIDthe ID of a boss aggregating the IMediaReadFormat interface.
Returns
valid pointer to an IMediaReadFormat instance, if available; nil if not found.
virtual IMediaReadFormat* IMediaFormatManager::FindMediaReadFormat (const MediaLocationloc)
pure virtual

Finds the IMediaReadFormat instance that can read from a specified MediaLocation.

Parameters
loca MediaLocation to media content.
Returns
valid pointer to an IMediaReadFormat instance which can access the URL and recognize the content. Returns nil if Internet access is not available, or there is no filter available which recognizes the content.
virtual IMediaReadFormatInfo* IMediaFormatManager::FindMediaReadFormatInfo (const MediaLocationloc)
pure virtual

Finds the IMediaReadFormatInfo instance that can provide information for a specified MediaLocation.

Parameters
loca MediaLocation to media content.
Returns
valid pointer to an IMediaReadFormatInfo instance which can provide information about the content referenced by the URL. Returns nil if no information is available.
virtual ErrorCode IMediaFormatManager::GetLastError ()
pure virtual

Retrieves the error status for the last method called. Calling this method resets the error status to kSuccess; thus, calling this method twice in succession without an intervening call to another method, always returns kSuccess for the second call.

Returns
an ErrorCode, or kSuccess if no error occurred during the execution of the last method called.