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

#include <IMediaContent.h>

Inheritance diagram for IMediaContent:
IPMUnknown

Public Types

enum  { kDefaultIID = IID_IMEDIACONTENT }
 
enum  MediaType {
  enUndefined, enVideo, enAudio, enLegacyVideo = 4,
  enLegacyAudio
}
 

Public Member Functions

virtual IPMStreamCreateContentStreamRead (bool16 rawContentRequired=kFalse)=0
 
virtual PMString GetMimeType ()=0
 
virtual const MediaLocation GetLocation () const =0
 
virtual const PMString GetMediaFileName () const =0
 
virtual const PMString GetMediaFilePath () const =0
 
virtual const PMString GetPosterPath () const =0
 
virtual
IMediaAttributes::PosterType 
GetPosterType () const =0
 
virtual const UID GetPosterUID () const =0
 
virtual bool16 HasContent () const =0
 
virtual bool16 IsPosterAvailable () const =0
 
virtual IMediaContent::MediaType GetMediaType () const =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

Provides access to media content.

Member Function Documentation

virtual IPMStream* IMediaContent::CreateContentStreamRead (bool16 rawContentRequired = kFalse)
pure virtual

Provides an IPMStream to read the media content.

Parameters
rawContentRequiredset to kTrue to assure that the stream provides raw, unfiltered content. For file-based content, this is equivalent to reading directly from the file.
virtual const MediaLocation IMediaContent::GetLocation () const
pure virtual

Retrieves the location of the media content.

Returns
MediaLocation object.
See Also
MediaLocation.
virtual const PMString IMediaContent::GetMediaFileName () const
pure virtual

Retrieves the media base file name (without the path).

Returns
a PMString object representing the base file name of the media content. The string may be null; i.e., it may have zero length.
virtual const PMString IMediaContent::GetMediaFilePath () const
pure virtual

Retrieves the full media file path.

Returns
a PMString object representing the absolute path to the media content. The string may be null; i.e., it may have zero length.
virtual IMediaContent::MediaType IMediaContent::GetMediaType () const
pure virtual

Retrieves the MediaType.

Returns
IMediaContent::MediaType.
virtual PMString IMediaContent::GetMimeType ()
pure virtual

Retrieves the standard MIME type for the media content.

Returns
a PMString populated with the mime type; if the MIME type is unknown or unavailable, returns a null string.
virtual const PMString IMediaContent::GetPosterPath () const
pure virtual

Retrieves the full path for a poster image.

Returns
a PMString representing the absolute local path to an image file.
virtual IMediaAttributes::PosterType IMediaContent::GetPosterType () const
pure virtual

Retrieves the IMediaAttributes::PosterType for the media page item.

Returns
the IMediaAttributes::PosterType.
virtual const UID IMediaContent::GetPosterUID () const
pure virtual

Retrieves the UID of the media poster page item.

Returns
a page item UID. If the poster page item does not exist, returns kInvalidUID.
virtual bool16 IMediaContent::HasContent () const
pure virtual

Tests if content has been set. Useful to test when deciding if the media page item can be exported or is simply acting as a placeholder.

Returns
kTrue if there is content; kFalse if there is none.
virtual bool16 IMediaContent::IsPosterAvailable () const
pure virtual

Tests if a poster is available by determining if (1) the content has a poster, and (2) the content can be accessed to obtain the poster.

Returns
kTrue if poster can be accessed; kFalse if not.