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

#include <IMediaContentData.h>

Inheritance diagram for IMediaContentData:
IPMUnknown

Public Types

enum  { kDefaultIID = IID_IMEDIACONTENTDATA }
 
enum  MediaContentAttributeID {
  enFormatClassID = kMediaPrefix + 0, enIntrinsicBounds = kMediaPrefix + 1, enPosterImageIsAvailable = kMediaPrefix + 2, enURL = kMediaPrefix + 3,
  enCanChoosePosters = kMediaPrefix + 4, enNameOfEncodedFile = kMediaPrefix + 5, enDuration = kMediaPrefix + 6, enBackgroundColor = kMediaPrefix + 7,
  enNavigationCuePoints = kMediaPrefix + 8, enEventCuePoints = kMediaPrefix + 9, enH264Encoded = kMediaPrefix + 10, enReserved = kMediaPrefix + 0xff
}
 

Public Member Functions

virtual ErrorCode GetAttribute (uint32 attributeID, int16 &value) const =0
 
virtual ErrorCode GetAttribute (uint32 attributeID, int32 &value) const =0
 
virtual ErrorCode GetAttribute (uint32 attributeID, ClassID &value) const =0
 
virtual ErrorCode GetAttribute (uint32 attributeID, PMPoint &value) const =0
 
virtual ErrorCode GetAttribute (uint32 attributeID, PMReal &value) const =0
 
virtual ErrorCode GetAttribute (uint32 attributeID, PMRect &value) const =0
 
virtual ErrorCode GetAttribute (uint32 attributeID, PMString &value) const =0
 
virtual ErrorCode GetAttribute (uint32 attributeID, NamedUint32AttributeList &value) const =0
 
virtual void SetAttribute (uint32 attributeID, int16 value)=0
 
virtual void SetAttribute (uint32 attributeID, int32 value)=0
 
virtual void SetAttribute (uint32 attributeID, ClassID value)=0
 
virtual void SetAttribute (uint32 attributeID, const PMPoint &value)=0
 
virtual void SetAttribute (uint32 attributeID, const PMReal &value)=0
 
virtual void SetAttribute (uint32 attributeID, const PMRect &value)=0
 
virtual void SetAttribute (uint32 attributeID, const PMString &value)=0
 
virtual void SetAttribute (uint32 attributeID, const NamedUint32AttributeList &value)=0
 
virtual bool16 IsFlagSet (uint32 attributeID) const =0
 
virtual void SetFlag (uint32 attributeID, bool16 b)=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 a convenient way to cache metadata for media content. There are two sets of methods: accessors and mutators (i.e., "getters" and "setters"). In general, mutators are invoked by media filters to store information about a specific media source. For example, an MPEG filter would store information about a particular MPEG movie file. This information could then be retrieved without the need to reinterpret the file. Since the attributes are stored as name/value pairs (i.e., they are "tagged"), it's not necessary for a filter to set all of the attributes; simply setting the relevant attributes is sufficient. Likewise, interface users that invoke the accessors, should allow for the fact that a value for a particular attribute ID may or may not exist, and that its absence is not necessarily an error.

Member Enumeration Documentation

This enum defines the IDs for attributes common to all media types.
Enumerator
enFormatClassID 

The ClassID of the media filter boss that aggregates the IID_IMEDIAREADFORMAT interface

enIntrinsicBounds 

The intrinsic geometric bounds of the media item, which may be empty; type is PMRect.

enPosterImageIsAvailable 

A flag which when set, indicates that a poster image is available from the media content.

enURL 

The URL to the media content; type is PMString

enCanChoosePosters 

A flag that indicates (when set) that poster images can be taken from the media.

enNameOfEncodedFile 

A PMString of the encoded media file

enDuration 

A PMReal representing seconds.

enBackgroundColor 

A uint32 representing the RGB background color (currently applies only to SWFs).

enNavigationCuePoints 

A NamedUint32AttributeList of navigation cue points from a video.

enEventCuePoints 

A NamedUint32AttributeList of event cue points from a video (not currently used).

enH264Encoded 

A flag. When set, indicates that the media content is H.264 encoded.

enReserved 

This value must not be used as an attribute ID outside of the Media plugin.

Member Function Documentation

virtual ErrorCode IMediaContentData::GetAttribute (uint32 attributeID,
int16 & value 
) const
pure virtual

Retrieves an attribute of type int16.

Parameters
attributeIDmay be either a MediaContentAttributeID or a media-specific ID.
valuea variable to contain the attribute's value.
Returns
kSuccess if the attribute exists; kFailure otherwise.
virtual ErrorCode IMediaContentData::GetAttribute (uint32 attributeID,
int32 & value 
) const
pure virtual

Retrieves the value of an attribute of type int32.

Parameters
attributeIDmay be either a MediaContentAttributeID or a media-specific ID.
valuea variable to contain the attribute's value.
Returns
kSuccess if the attribute exists; kFailure otherwise.
virtual ErrorCode IMediaContentData::GetAttribute (uint32 attributeID,
ClassIDvalue 
) const
pure virtual

Retrieves the value of an attribute of type ClassID.

Parameters
attributeIDmay be either a MediaContentAttributeID or a media-specific ID.
valuea variable to contain the attribute's value.
Returns
kSuccess if the attribute exists; kFailure otherwise.
virtual ErrorCode IMediaContentData::GetAttribute (uint32 attributeID,
PMPointvalue 
) const
pure virtual

Retrieves the value of an attribute of type PMPoint.

Parameters
attributeIDmay be either a MediaContentAttributeID or a media-specific ID.
valuea variable to contain the attribute's value.
Returns
kSuccess if the attribute exists; kFailure otherwise.
virtual ErrorCode IMediaContentData::GetAttribute (uint32 attributeID,
PMRealvalue 
) const
pure virtual

Retrieves the value of an attribute of type PMReal.

Parameters
attributeIDmay be either a MediaContentAttributeID or a media-specific ID.
valuea variable to contain the attribute's value.
Returns
kSuccess if the attribute exists; kFailure otherwise.
virtual ErrorCode IMediaContentData::GetAttribute (uint32 attributeID,
PMRectvalue 
) const
pure virtual

Retrieves the value of an attribute of type PMRect.

Parameters
attributeIDmay be either a MediaContentAttributeID or a media-specific ID.
valuea variable to contain the attribute's value.
Returns
kSuccess if the attribute exists; kFailure otherwise.
virtual ErrorCode IMediaContentData::GetAttribute (uint32 attributeID,
PMStringvalue 
) const
pure virtual

Retrieves the value of an attribute of type PMString.

Parameters
attributeIDmay be either a MediaContentAttributeID or a media-specific ID.
valuea variable to contain the attribute's value.
Returns
kSuccess if the attribute exists; kFailure otherwise.
virtual ErrorCode IMediaContentData::GetAttribute (uint32 attributeID,
NamedUint32AttributeListvalue 
) const
pure virtual

Retrieves the value of an attribute of type NamedInt32AttributeList.

Parameters
attributeIDmay be either a MediaContentAttributeID or a media-specific ID.
valuea variable to contain the attribute's value.
Returns
kSuccess if the attribute exists; kFailure otherwise.
virtual bool16 IMediaContentData::IsFlagSet (uint32 attributeID) const
pure virtual

Tests if a flag attribute is set.

Parameters
attributeIDmay be either a MediaContentAttributeID or a media-specific ID.
Returns
kTrue if the flag is set; kFalse otherwise.
virtual void IMediaContentData::SetAttribute (uint32 attributeID,
int16 value 
)
pure virtual

Sets the value of an attribute of type int16.

Parameters
attributeIDmay be either a MediaContentAttributeID or a media-specific ID.
valuethe contents of this are copied to the attribute.
virtual void IMediaContentData::SetAttribute (uint32 attributeID,
int32 value 
)
pure virtual

Sets the value of an attribute of type int32.

Parameters
attributeIDmay be either a MediaContentAttributeID or a media-specific ID.
valuethe contents of this are copied to the attribute.
virtual void IMediaContentData::SetAttribute (uint32 attributeID,
ClassID value 
)
pure virtual

Sets the value of an attribute of type ClassID.

Parameters
attributeIDmay be either a MediaContentAttributeID or a media-specific ID.
valuethe contents of this are copied to the attribute.
virtual void IMediaContentData::SetAttribute (uint32 attributeID,
const PMPointvalue 
)
pure virtual

Sets the value of an attribute of type PMPoint.

Parameters
attributeIDmay be either a MediaContentAttributeID or a media-specific ID.
valuethe contents of this are copied to the attribute.
virtual void IMediaContentData::SetAttribute (uint32 attributeID,
const PMRealvalue 
)
pure virtual

Sets the value of an attribute of type PMReal.

Parameters
attributeIDmay be either a MediaContentAttributeID or a media-specific ID.
valuethe contents of this are copied to the attribute.
virtual void IMediaContentData::SetAttribute (uint32 attributeID,
const PMRectvalue 
)
pure virtual

Sets the value of an attribute of type PMRect.

Parameters
attributeIDmay be either a MediaContentAttributeID or a media-specific ID.
valuethe contents of this are copied to the attribute.
virtual void IMediaContentData::SetAttribute (uint32 attributeID,
const PMStringvalue 
)
pure virtual

Sets the value of an attribute of type PMString.

Parameters
attributeIDmay be either a MediaContentAttributeID or a media-specific ID.
valuethe contents of this are copied to the attribute.
virtual void IMediaContentData::SetAttribute (uint32 attributeID,
const NamedUint32AttributeListvalue 
)
pure virtual

Sets the value of an attribute of type NamedInt32AttributeList.

Parameters
attributeIDmay be either a MediaContentAttributeID or a media-specific ID.
valuethe contents of this are copied to the attribute.
virtual void IMediaContentData::SetFlag (uint32 attributeID,
bool16 b 
)
pure virtual

Sets or clears a flag attribute.

Parameters
attributeIDmay be either a MediaContentAttributeID or a media-specific ID.
bflag value; specify kTrue to set the flag, or kFalse to clear it.