DR Developer's Guide
DR Interfaces | DR Methods | DR Types and Misc API
IMoaDrMediaAccess
Interface ID: IID_IMoaDrMediaAccess
Pointer type: PIMoaDrMediaAccess
Inheritance: IMoaUnknown
Header file: driservc.h
Description
-
This interface contains the core methods supported by all MediaAccess classes. MediaAccess objects, such as ScoreAccess,
handle communication with the media owner object to provide a
task-specific interface for accessing its media.
MediaAccess is typically
buffered; the MediaAccess interface operates on a copy of media data owned by an associated IMoaDrMediaOwner object.
Changes are only reflected in the associated owner object when Commit() is called.
Using SetAccessInfo(),
the owner object can be changed on-the-fly, allowing you to obtain
media data from one object, modify it, and commit it back to a
different object.
In Director 5.0, the only type of MediaAccess interface supported is IMoaDrScoreAccess,
used for editing score data associated with a filmloop cast member
or Director movie. Director API provides three ways to obtain
a MediaAccess interface.
- IMoaDrMovie::GetScoreAccess() - This method returns a score access interface for the Director
movie.
- IMoaDrCastMem::GetScoreAccess() - This method returns a score access interface for a filmloop
cast member
- IMoaDrPlayer::NewScoreAccess() - This method creates a new score access interface without an
owner. To save the resulting score to a filmloop cast member or
movie, use IMoaDrScoreAccess::SetOwner() or MoaDrMediaAccess::SetAccessInfo() to set the owner before committing.
-
Methods
-
Creating
-
- New()
Editing
-
- Refresh()
Commit()
Access Information
-
- GetAccessInfo()
SetAccessInfo()
Syntax
- Commit(PIMoaDrMediaAccessThis)
Parameters
-
This
- Pointer to the
IMoaDrMediaAccess
interface
Returns
-
MoaError
Description
-
Commits changes made to the media being accessed back to the object
owning the media data. Changes are not reflected in the media-owning
object unless this method is called. For example, after creating
a sequence of score frames using IMoaDrScoreAccess,
calling Commit()updates
the corresponding movie or film loop cast member. If no media
owner has been set, this call fails and returns kMoaDrErr_OwnerNotSet.
The media owner is set automatically if the IMoaDrScoreAccess interface was obtained directly from the owner using
a GetScoreAccess() call.
If you have created a new ScoreAccess object from scratch (using IMoaDrPlayer::NewScoreAccess()),
it is up to you to associate the media owner object using SetAccessInfo() (or SetOwner() in IMoaDrScoreAccess).
The owner is the object that gets updates when Commit() is called
Syntax
- GetAccessInfo(PIMoaDrMediaAccessThis,
- PMoaDrAccessInfopAccessInfo)
Parameters
-
This
- Pointer to the
IMoaDrMediaAccess
interface
pAccessInfo
PMoaDrAccessInfo
Pointer to MoaDrAccessInfo structure to receive information
Returns
-
MoaError
Description
-
Obtains the current accessInfo for the media accessor. pAccessInfo is a pointer to a MoaDrAccessInfo structure to receive the information. This call populates the
structure with the PIMoaDrMediaOwner for the media owner, the label symbol for the media
being accessed, and the format symbol for the media being accessed.
Since an interface is being supplied in this structure (pOwner),
the caller is responsible for releasing it.
Syntax
- New(PIMoaDrMediaAccessThis)
Parameters
-
This
- Pointer to the
IMoaDrMediaAccess
interface
Returns
-
MoaError
Description
-
Obtains the current accessInfo for the media accessor. pAccessInfo is a pointer to a MoaDrAccessInfo structure to receive the information. This call populates the
structure with the PIMoaDrMediaOwner for the media owner, the label symbol for the media
being accessed, and the format symbol for the media being accessed.
Since an interface is being supplied in this structure (pOwner),
the caller is responsible for releasing it.
Syntax
- Refresh(PIMoaDrMediaAccessThis)
Parameters
-
This
- Pointer to the
IMoaDrMediaAccess
interface
Returns
-
MoaError
Description
-
Disposes of the current working media and obtains a fresh copy
of the media data from the associated media owner object. If there
is no media owner, the call fails and kMoaDrErr_OwnerNotSet is returned. This call causes you to lose any edits
made to your media data since the last Refresh() or Commit() calls.
Syntax
- SetAccessInfo(PIMoaDrMediaAccessThis,
- ConstPMoaDrAccessInfopAccessInfo)
Parameters
-
This
- Pointer to the
IMoaDrMediaAccess
interface
pAccessInfo
ConstPMoaDrAccessInfo
Pointer to a MoaDrAccessInfo structure to receive the information
Returns
-
MoaError
Description
-
Sets the current accessInfo for
the media accessor. pAccessInfo is a pointer to a MoaDrAccessInfo structure containing the new access information to
be used. This call sets a new media owner, media label, and media
format for the media being accessed. If a mediaOwner is already set, the media accessor's hold on the previous owner
interface is released. The caller owns the owner interface (pOwner)
provided in the structure.
You may change the accessInfo during an editing session. For example, you could
obtain an IMoaDrScoreAccess interface
for a film loop cast member, edit the score, set the access information
to different film loop cast member (or movie), and call Commit().
This leaves the original film loop untouched, and updates the
new filmloop or movie with the edited version of the source film
loop score.
Copyright © 1995-2007 Adobe Macromedia Software LLC, Inc.