InDesign SDK  20.5
 All Classes Namespaces Functions Variables Typedefs Enumerations Enumerator Friends Groups Pages
IMediaSuite Class Referenceabstract
Inheritance diagram for IMediaSuite:
IPMUnknown

Public Types

enum  { kDefaultIID = IID_IMEDIASUITE }
 

Public Member Functions

virtual int32 AddNavigationPoint (uint32 time)=0
 
virtual bool CanAddNavigationPoint () const =0
 
virtual bool CanConvertToMedia () const =0
 
virtual bool CanRemoveNavigationPoint (int32 indexAt) const =0
 
virtual bool CanSelectNavigationPoints () const =0
 
virtual bool CanSetPosterForIndex (uint32 optionIndex) const =0
 
virtual bool CanSetPosters () const =0
 
virtual ErrorCode ChangeNavigationPointDisplayName (const PMString &name, int32 indexAt)=0
 
virtual bool HasMissingLink () const =0
 
virtual ErrorCode GetAttribute (uint32 attributeID, int16 &value) const =0
 
virtual ErrorCode GetAttribute (uint32 attributeID, PMString &value) const =0
 
virtual int GetControllerOptions (K2Vector< PMString > &optionList) const =0
 
virtual uint32 GetControllerOptionIndex () const =0
 
virtual bool IsControllerOptionEnabled (uint32 optionIndex) const =0
 
virtual bool IsControllerSelectionEnabled () const =0
 
virtual void SetControllerOption (uint32 optionIndex)=0
 
virtual UIDRef GetEmptyFrameRef () const =0
 
virtual bool GetMediaLocation (MediaLocation &outLocation) const =0
 
virtual bool GetMediaURL (WideString &outURL) const =0
 
virtual IMediaContent::MediaType GetMediaType () const =0
 
virtual bool GetNavigationPointDisplayName (int32 indexAt, PMString &outName)=0
 
virtual bool GetNextNavigationPoint (INavigationPoints::NavigationPoint &navPoint) const =0
 
virtual uint32 GetNumberOfNavigationPoints () const =0
 
virtual
IMediaAttributes::PosterType 
GetPosterType () const =0
 
virtual bool16 IsAttributeEnabled (uint32 attributeID) const =0
 
virtual bool16 IsFlagSet (uint32 attributeID) const =0
 
virtual bool IsMediaSelection () const =0
 
virtual ErrorCode RemoveNavigationPoints (const K2Vector< int32 > &indexList)=0
 
virtual void ResetNavigationPointsIterator ()=0
 
virtual ErrorCode SetAttribute (uint32 attributeID, int16 value)=0
 
virtual ErrorCode SetAttribute (uint32 attributeID, const PMString &value)=0
 
virtual ErrorCode SetAttribute (uint32 attributeID, const NamedUint32AttributeList &value)=0
 
virtual ErrorCode SetAttributes (const ISetMediaAttrCmdData *inData)=0
 
virtual ErrorCode SetPoster (IMediaAttributes::PosterType posterType, int32 time)=0
 
virtual ErrorCode SetPoster (IDFile &file)=0
 
virtual ErrorCode SetFlag (uint32 attributeID, bool16 b=kTrue)=0
 
virtual ErrorCode SetPoster (IMediaAttributes::PosterType posterType, IPMStream *posterStream, bool setUndoable=false)=0
 
virtual int GetPosterOptions (K2Vector< PMString > &stringList) const =0
 
virtual uint32 GetPosterOptionIndex () const =0
 
virtual bool IsPosterOptionEnabled (uint32 optionIndex) const =0
 
virtual bool IsPosterFromMediaEnabled () const =0
 
virtual ErrorCode SetMediaLocation (IMediaContent::MediaType mediaType, const WideString &loc, bool isURL=false)=0
 
virtual uint32 GetFloatingWindowPositionIndex () const =0
 
virtual uint32 GetFloatingWindowScaleIndex () const =0
 
virtual bool16 AreNavigationPointsEnabled () const =0
 
virtual bool16 CanChangePDFOptions () const =0
 
virtual bool16 CanPlaceMediaFromURL () const =0
 
virtual bool GetMediaName (WideString &outName) const =0
 
virtual ErrorCode PlaceMediaFromURL (IMediaContent::MediaType type, const WideString &url)=0
 
virtual ErrorCode StartMediaPreview (IMediaContent::MediaType type, IObserver *iObserver=nil)=0
 
virtual ErrorCode StopMediaPreview (IMediaContent::MediaType type)=0
 
- Public Member Functions inherited from IPMUnknown
virtual IPMUnknownQueryInterface (PMIID interfaceID) const =0
 
virtual void AddRef () const =0
 
virtual void Release () const =0
 

Member Function Documentation

virtual int32 IMediaSuite::AddNavigationPoint (uint32 time)
pure virtual

Adds a new navigation point for a specified time.

Parameters
timeidentifies a frame of the video to seek to in 1/100s of a second.
Returns
-1 if the add failed; otherwise the index of the added point.
virtual bool16 IMediaSuite::AreNavigationPointsEnabled () const
pure virtual

Tests if navigation points are available for the current selection. Navigation points are currently available only for IMediaContent::enVideo.

Returns
kTrue if navigation points are available; kFalse otherwise.
virtual bool IMediaSuite::CanAddNavigationPoint () const
pure virtual

Tests if a navigation point can be added.

Returns
true if the navigation point can be added; false otherwise.
virtual bool16 IMediaSuite::CanChangePDFOptions () const
pure virtual

Tests if PDF options can be changed for the current selection.

Returns
kTrue if options can be changed; kFalse otherwise.
virtual bool IMediaSuite::CanConvertToMedia () const
pure virtual

Tests if the selection can be converted into a media page item.

Returns
kTrue if the selection can be converted into a media page item.
virtual bool16 IMediaSuite::CanPlaceMediaFromURL () const
pure virtual

Tests if the current selection can be replaced by URL-based media.

Returns
kTrue if the current selection can be replaced; kFalse otherwise.
virtual bool IMediaSuite::CanRemoveNavigationPoint (int32 indexAt) const
pure virtual

Tests if the navigation point at the specified index can be removed.

Parameters
indexAtspecifies the index of an existing navigation point.
Returns
true if the navigation point can be removed; false otherwise.
virtual bool IMediaSuite::CanSelectNavigationPoints () const
pure virtual

Tests if navigation points can be selected.

Returns
true if the navigation points can be selected; false otherwise.
virtual bool IMediaSuite::CanSetPosterForIndex (uint32 optionIndex) const
pure virtual

Tests if a poster can be set for a poster selection option. Since an option may be strictly for information, this method should be called before attempting to change the poster.

Parameters
optionIndexis an index in the list of poster options obtained from GetPosterOptions().
Returns
true if the poster can be set; false otherwise.
virtual bool IMediaSuite::CanSetPosters () const
pure virtual

Tests if posters can be set.

Returns
true if posters can be set; false otherwise.
virtual ErrorCode IMediaSuite::ChangeNavigationPointDisplayName (const PMStringname,
int32 indexAt 
)
pure virtual

Changes the display name for a navigation point.

Parameters
nameis a navigation point display name.
indexAtis the index of the navigation point in the range 0 to GetNumberOfNavigationPoints() - 1.
Returns
kSuccess if the name was changed successfully; fFailure otherwise.
virtual ErrorCode IMediaSuite::GetAttribute (uint32 attributeID,
int16 & value 
) const
pure virtual

Retrieves the value of an attribute of type int16.

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

Retrieves the value of an attribute of type PMString.

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

Gets the model's current controller option index.

Returns
an index in the optionList provided by IMediaSuite::GetControllerOptions().
virtual int IMediaSuite::GetControllerOptions (K2Vector< PMString > & optionList) const
pure virtual

Retrieves the list of controller options for the current selection.

Parameters
optionListis populated with the list of controller option PMStrings.
Returns
the number of items in the list.
virtual UIDRef IMediaSuite::GetEmptyFrameRef () const
pure virtual

Obtains an existing empty frame that can be converted into a multimedia frame.

Precondition
A single empty frame must be selected; multiple selections are not supported.
Returns
UIDRef to a single empty frame.
virtual uint32 IMediaSuite::GetFloatingWindowPositionIndex () const
pure virtual

Retrieves the index for the current floating window position choice for the current selection.

Returns
the index of the floating window position option.
virtual uint32 IMediaSuite::GetFloatingWindowScaleIndex () const
pure virtual

Retrieves the index for the current floating window scale choice for the current selection.

Returns
the index of the floating window scale option.
virtual bool IMediaSuite::GetMediaLocation (MediaLocationoutLocation) const
pure virtual

Obtains the MediaLocation for the page item's content.

Parameters
outLocationis populated with the MediaLocation object.
Returns
true if the location is available; false if not.
virtual bool IMediaSuite::GetMediaName (WideStringoutName) const
pure virtual

Retrieves the media name for the current selection. This is currently the base filename with extension.

Parameters
outNameis set to the media name.
Returns
true if the name is available; otherwise returns false.
virtual IMediaContent::MediaType IMediaSuite::GetMediaType () const
pure virtual

Gets the MultimediaType of the current selection. If the current selection consists of more than one page item or a non-multimedia page item, the MultimediaType is enUndefined.

Returns
IMediaContent::MediaType.
virtual bool IMediaSuite::GetMediaURL (WideStringoutURL) const
pure virtual

Obtains the URL to the media page item's content.

Parameters
outLocationis populated with the URL.
Returns
true if the location is available; false if not.
virtual bool IMediaSuite::GetNavigationPointDisplayName (int32 indexAt,
PMStringoutName 
)
pure virtual

Retrieves the display name for a specified navigation point.

Parameters
indexAtis the index of the navigation point in the range 0 to GetNumberOfNavigationPoints() - 1.
outNameis populated with the display name.
Returns
true if outName was populated; false otherwise.
virtual bool IMediaSuite::GetNextNavigationPoint (INavigationPoints::NavigationPointnavPoint) const
pure virtual

Retrieves the next navigation point or none if iteration passed the end of the list.

Parameters
navPointis populated with the next navigation point data.
Returns
true if the next navigation point was available; otherwise returns false.
virtual uint32 IMediaSuite::GetNumberOfNavigationPoints () const
pure virtual

Returns the number of navigation points currently defined.

Returns
the number of navigation points.
virtual uint32 IMediaSuite::GetPosterOptionIndex () const
pure virtual

Gets the model's current poster option index.

Returns
an index in the stringList provided by IMediaSuite::GetPosterOptions().
virtual int IMediaSuite::GetPosterOptions (K2Vector< PMString > & stringList) const
pure virtual

Retrieves the list of poster selection options.

Parameters
stringListis populated with the list of option PMStrings.
Returns
the number of options.
virtual IMediaAttributes::PosterType IMediaSuite::GetPosterType () const
pure virtual

Obtains the poster type associated with the media page item.

Returns
the IMediaAttributes::PosterType.
virtual bool IMediaSuite::HasMissingLink () const
pure virtual

Tests if the current selection has a missing link.

Returns
true if the current selection has a link to a file and the link is missing; false otherwise.
virtual bool16 IMediaSuite::IsAttributeEnabled (uint32 attributeID) const
pure virtual

Tests if a media attribute may be enabled for changing by the UI.

Returns
kTrue if enabled; kFalse otherwise.
virtual bool IMediaSuite::IsControllerOptionEnabled (uint32 optionIndex) const
pure virtual

Tests if a specific controller option is enabled.

Parameters
optionIndexis an index in the controller option list obtained by calling GetControllerOptions().
Returns
true if the option is enabled; false otherwise.
virtual bool IMediaSuite::IsControllerSelectionEnabled () const
pure virtual

Tests if controller selection is enabled.

Returns
true if the controller selection is enabled; false otherwise.
virtual bool16 IMediaSuite::IsFlagSet (uint32 attributeID) const
pure virtual

Tests if a flag attribute is set.

Parameters
attributeIDmay be either a MediaAttributeID or a media-specific ID.
Returns
kTrue if the flag is set; kFalse otherwise.
virtual bool IMediaSuite::IsMediaSelection () const
pure virtual

Tests the current selection for multimedia page items.

Returns
true if the selection contains all multimedia page items (or default selection); false otherwise.
virtual bool IMediaSuite::IsPosterFromMediaEnabled () const
pure virtual

Tests if a poster can be obtained from the current selection's media content (i.e, tests if a poster can be obtained from a frame of the video).

Returns
true if a poster can be created from the media; false otherwise.
virtual bool IMediaSuite::IsPosterOptionEnabled (uint32 optionIndex) const
pure virtual

Tests if a poster option is enabled.

Parameters
optionIndexis a valid poster option index.
Returns
true if the option is enabled; false otherwise.
virtual ErrorCode IMediaSuite::PlaceMediaFromURL (IMediaContent::MediaType type,
const WideStringurl 
)
pure virtual

Places a URL-based movie in an empty graphic frame or if the frame is not empty, replaces an existing movie.

Parameters
typemust be IMediaContent::enVideo.
urla valid url to an FLV or F4V video.
Returns
kSuccess if the movie was replaced or created successfully; otherwise a failure code.
virtual ErrorCode IMediaSuite::RemoveNavigationPoints (const K2Vector< int32 > & indexList)
pure virtual

Removes one or more navigation points.

Parameters
indexListis a list of indices. Each index must be in the range 0 to GetNumberOfNavigationPoints() - 1.
Returns
kSuccess indicating that a navigation point no longer exists for any index in the list; kFailure if one or more navigation points could not be removed.
virtual void IMediaSuite::ResetNavigationPointsIterator ()
pure virtual

Resets the navigation point list interator so that the next call to GetNextNavigationPoint() will return the first navigation point in the list.

virtual ErrorCode IMediaSuite::SetAttribute (uint32 attributeID,
int16 value 
)
pure virtual

Sets the value of an attribute of type int16.

Parameters
attributeIDmay be either a MediaAttributeID or a media-specific ID.
valuethe contents of this are copied to the attribute.
Returns
kSuccess if the attribute was set; kFailure otherwise.
virtual ErrorCode IMediaSuite::SetAttribute (uint32 attributeID,
const PMStringvalue 
)
pure virtual

Sets the value of an attribute of type PMString.

Parameters
attributeIDmay be either a MediaAttributeID or a media-specific ID.
valuethe contents of this are copied to the attribute.
Returns
kSuccess if the attribute was set; kFailure otherwise.
virtual ErrorCode IMediaSuite::SetAttribute (uint32 attributeID,
const NamedUint32AttributeListvalue 
)
pure virtual

Sets the value of an attribute of type NamedUint32AttributeList.

Parameters
attributeIDmay be either a MediaAttributeID or a media-specific ID.
valuethe contents of this are copied to the attribute.
Returns
kSuccess if the attribute was set; kFailure otherwise.
virtual ErrorCode IMediaSuite::SetAttributes (const ISetMediaAttrCmdDatainData)
pure virtual

Sets one or more attributes taken from an ISetMediaAttrCmdData instance. This method has no effect if the ISetMediaAttrCmdData instance has no data.

Parameters
inDataan ISetMediaAttrCmdData prepopulated with attribute data.
Returns
kSuccess if all attributes were set; kFailure otherwise.
virtual void IMediaSuite::SetControllerOption (uint32 optionIndex)
pure virtual

Sets the controller option for the current selection.

Parameters
optionIndexindex of an entry in the controller option list.
See Also
method IMediaSuite::GetControllerOptions.
virtual ErrorCode IMediaSuite::SetFlag (uint32 attributeID,
bool16 b = kTrue 
)
pure virtual

Sets or clears a flag attribute.

Parameters
attributeIDmay be either a MediaAttributeID or a media-specific ID.
bflag value; specify kTrue to set the flag, or kFalse to clear it.
Returns
kSuccess if the method succeeded; otherwise returns kFailure.
virtual ErrorCode IMediaSuite::SetMediaLocation (IMediaContent::MediaType mediaType,
const WideStringloc,
bool isURL = false 
)
pure virtual

Sets the IMediaContent::MediaType and location for the current selection.

Parameters
mediaTypethe IMediaContent::MediaType to set.
avalid location which can be either a file path or a url.
isURLif true, specifies that the location is a url.
Returns
kSuccess if the location was changed; otherwise returns an error code.
virtual ErrorCode IMediaSuite::SetPoster (IMediaAttributes::PosterType posterType,
int32 time 
)
pure virtual

Sets the poster pageitem to a specified PosterType.

Parameters
posterTypespecifies the desired poster.
timeidentifies the video frame to use as the poster for IMediaAttributes::eFromMedia.
Returns
kSuccess if the method succeeded; otherwise returns an error code that may or may not be kFailure.
virtual ErrorCode IMediaSuite::SetPoster (IDFilefile)
pure virtual

Sets the poster pageitem to a specified image.

Parameters
filespecifies an image file.
Returns
kSuccess if the method succeeded; otherwise returns an error code that may or may not be kFailure.
virtual ErrorCode IMediaSuite::SetPoster (IMediaAttributes::PosterType posterType,
IPMStreamposterStream,
bool setUndoable = false 
)
pure virtual

Sets the poster to a stream image. The image data is embedded in the poster page item.

Parameters
posterTypespecifies the type of poster to set.
posterStreamis a valid pointer to an IPMStream that will supply the poster image.
setUndoablespecifies whether the poster command is undoable.
Returns
kSuccess if the method succeeded; otherwise returns an error code that may or may not be kFailure.
virtual ErrorCode IMediaSuite::StartMediaPreview (IMediaContent::MediaType type,
IObserveriObserver = nil 
)
pure virtual

Starts previewing the media content for the current selection in the media player. Does not reload the media the player if there is no change in selection or media location.

Parameters
typemust be IMediaContent::enVideo, IMediaContent::enAudio or IMediaContent::enSWFAnimation.
iObserveris an optional pointer to an IObserver to notify of player events. Notification occurs via IObserver::Update with protocol IID_IMEDIAPLAYERACCESS. The IObserver should update any widgets that depend on player functionality.
Returns
kSuccess if the player loaded the content successfully; kFailure otherwise.
virtual ErrorCode IMediaSuite::StopMediaPreview (IMediaContent::MediaType type)
pure virtual

Stops previewing the media content for a specified media type.

Parameters
typemust be IMediaContent::enVideo, IMediaContent::enAudio or IMediaContent::enSWFAnimation.
Returns
kSuccess if the media was unloaded (or there was no media to unload); kFailure otherwise.