The IAMExtTransport interface provides methods which control specific behaviors of an external VCR. These methods generally set and get the transport properties which relate to how the VCR and the computer exchange data. Since this interface controls specific behaviors of transport, it must be implemented in combination with the IAMExtDevice interface, which controls an external device's general behaviors. If you want to control an external device other than a VCR, two options are available. Either use the methods you need and return E_NOTIMPL for the rest, or design a new interface and aggregate it with IAMExtDevice.
This interface also provides methods that enable developers to define edit events which assist in the content authoring process. Edit events are made up of individual edit properties that are grouped together into edit property sets. These edit property sets can define an actual recording sequence on the transport or a simple positional command. They can, for example, specify certain modes of editing, record inpoints and outpoints, or memorize positions called bookmarks. The SetEditPropertySet method creates or registers a group of edit properties, called an edit property set, while the SetEditProperty enables the application to define parameters and values of individual edit properties. Since these are relatively sophisticated situations, their implementation is left to the advanced developer.
For a description of a sample filter which controls a VCR through DirectShow, see VCR Device Control Filter.
When to Implement
Implement this interface if you want to build a filter or application that controls an external device, such as a VCR. Because this interface controls specific information about a device, you should implement it with the IAMExtDevice interface.
An application can directly instantiate and control external device control filters, such as those for VCRs, but it is strongly recommended that you always instantiated them within the context of a filter graph, even if they are the only filter within the graph.
Implementations can vary depending on the type of external device being controlled. With certain devices, methods can return E_NOTIMPL if they are not applicable.
When to Use
Use this interface if you want a filter to control video and audio tape machines that are external to the computer. Typical uses for this interface include the applications that implement "batch capture" and "print to tape" of audio and video.
Applications should use the filter graph to enumerate the filters and then get the IAMExtTransport interface directly from the appropriate filter.
Hardware Requirements
To control an external VCR, certain hardware requirements are recommended. VCRs with an RS-422 serial interface require a special serial port card or an external RS-232-to-RS-422 adapter. In addition, for best performance, your computer should have a serial port card built with a 16,550 high-performance UART to sustain higher baud rates, such as 38.4 baud.
Methods in Vtable Order
IUnknown methods | Description |
QueryInterface | Retrieves pointers to supported interfaces. |
AddRef | Increments the reference count. |
Release | Decrements the reference count. |
IAMExtTransport methods | Description |
GetCapability | Retrieves the general capabilities of an external transport. |
put_MediaState | Sets the current state of the media. |
get_MediaState | Retrieves the current state of the media. |
put_LocalControl | Sets the state of the external device to local or remote control. |
get_LocalControl | Retrieves the state of the external device. |
GetStatus | Determines the status of the external transport. |
GetTransportBasicParameters | Retrieves the external transport's basic parameter settings. |
SetTransportBasicParameters | Sets the external transport's basic parameters. |
GetTransportVideoParameters | Retrieves the external transport's video parameter settings. |
SetTransportVideoParameters | Sets the video parameters for the external transport. |
GetTransportAudioParameters | Retrieves the external transport's audio parameter settings. |
SetTransportAudioParameters | Sets audio parameter setting for the external transport. |
put_Mode | Sets the movement of the transport to a new mode (play, stop, record, edit, and so on). |
get_Mode | Retrieves the mode of the transport (play, stop, record, edit, and so on). |
put_Rate | Sets the playback rate for variable-speed external devices. |
get_Rate | Retrieves the playback rate set in put_Rate for variable speed external devices. |
GetChase | Retrieves the status of chase mode. |
SetChase | Enables or disables chase mode. |
GetBump | Retrieves status of bump mode. |
SetBump | Temporarily changes the speed of playback for synchronization of multiple external devices. |
get_AntiClogControl | Determines if the anti-headclog control is enabled or disabled. |
put_AntiClogControl | Enables or disables the transport's anti-headclog control. |
GetEditPropertySet | Retrieves the current state of an edit property set. |
SetEditPropertySet | Registers an edit property set that describes a group of edit properties. |
GetEditProperty | Retrieves individual parameters and values associated with a particular edit property set. |
SetEditProperty | Defines individual parameters and values associated with a particular edit property set. |
get_EditStart | Determines if the external transport's edit control is active. |
put_EditStart | Activates edit control on a capable transport. |
Retrieves the general capabilities of an external transport.
HRESULT GetCapability(
long Capability,
long *pValue,
double *pdblValue );
Value | Meaning |
ED_TRANSCAP_CAN_BUMP_PLAY | Checks whether transport can vary speed for synchronizing. |
ED_TRANSCAP_CAN_DELAY_AUDIO_IN | Checks whether transport does delayed-in audio edits. |
ED_TRANSCAP_CAN_DELAY_AUDIO_OUT | Checks whether transport does delayed-out audio edits. |
ED_TRANSCAP_CAN_DELAY_VIDEO_IN | Checks whether transport does delayed-in video edits. |
ED_TRANSCAP_CAN_DELAY_VIDEO_OUT | Checks whether transport does delayed-out video edits. |
ED_TRANSCAP_CAN_EJECT | Checks whether transport can eject its media. |
ED_TRANSCAP_CAN_PLAY_BACKWARDS | Checks whether transport can play media in reverse (negative rate). |
ED_TRANSCAP_CAN_SET_EE | Checks whether transport can show its input on its output. |
ED_TRANSCAP_CAN_SET_PB | Checks whether transport can show media playback on its output. |
ED_TRANSCAP_FWD_VARIABLE_MAX | Maximum forward speed (multiple of play speed) in pdblValue. |
ED_TRANSCAP_LTC_TRACK | Track number of linear timecode (LTC) in pValue. |
ED_TRANSCAP_NUM_AUDIO_TRACKS | Number of audio tracks in pValue. |
ED_TRANSCAP_REV_VARIABLE_MAX | Maximum reverse speed (multiple of play speed) in pdblValue. |
Returns an HRESULT value that depends on the implementation of the interface.
All OATRUE and OAFALSE values are returned in pValue; numerical values are returned in pValue or pdblValue. Use the pdblValue parameter to return double values if the pValue parameter is insufficient. Return NULL if one of the parameters is not needed.
Sets the current state of the media.
HRESULT put_MediaState(
long State );
Value | Meaning |
ED_MEDIA_SPIN_DOWN | Stop spinning (for disc media); unthread the tape (for tape media). |
ED_MEDIA_SPIN_UP | Start spinning (for disc media); thread the tape (for tape media). |
ED_MEDIA_UNLOAD | Eject the media from the drive (if device supports it). |
Returns an HRESULT value that depends on the implementation of the interface.
Use the preceding parameters for disk and tape media. For other devices, you might need to specify new parameters.
IAMExtTransport::get_MediaState
Retrieves the current state of the media set in put_MediaState.
HRESULT get_MediaState(
long *pState );
Value | Meaning |
ED_MEDIA_SPIN_DOWN | Stop spinning (for disk media); unthread the tape (for tape media). |
ED_MEDIA_SPIN_UP | Start spinning (for disk media); thread the tape (for tape media). |
ED_MEDIA_UNLOAD | Eject the media from the drive (if device supports it). |
Returns an HRESULT value that depends on the implementation of the interface.
Sets the state of the external device to local or remote control.
HRESULT put_LocalControl(
long State );
Returns an HRESULT value that depends on the implementation of the interface.
IAMExtTransport::get_LocalControl
Retrieves the state of the external device.
HRESULT get_LocalControl(
long *pState );
Returns an HRESULT value that depends on the implementation of the interface.
To control an external device, it must be in remote mode.
IAMExtTransport::put_LocalControl
Determines the external transport's status.
HRESULT GetStatus(
long StatusItem,
long *pValue );
Value | Meaning |
ED_MODE_EDIT_CUE | Checks if device is cueing for an active edit event. |
ED_MODE_FF | Checks if device is fast forwarding. |
ED_MODE_FREEZE | Checks if device is paused. |
ED_MODE_LINK_OFF | Checks if transport control isn't linked to filter graph's run, stop, and pause controls. |
ED_MODE_LINK_ON | Checks if transport control is linked to filter graph's run, stop, pause controls. |
ED_MODE_PLAY | Checks if device is playing. |
ED_MODE_RECORD | Checks if device is recording. |
ED_MODE_RECORD_STROBE | Checks if device is recording single-frame. |
ED_MODE_REW | Checks if device is rewinding. |
ED_MODE_SHUTTLE | Checks if device is shuttling (high-speed movement with visible picture). |
ED_MODE_STEP | Checks if device is single-stepping. |
ED_MODE_STOP | Checks if device is stopped. |
Returns an HRESULT value that depends on the implementation of the interface.
When implementing this interface, be aware that transport StatusItem parameters are more extensive than most Microsoft® DirectShow™ interfaces and code should reflect this variety and feel free to check the transport status of appropriate parameters.
Retrieves the transport's basic parameter settings.
HRESULT GetTransportBasicParameters(
long Param,
long *pValue,
LPOLESTR *ppszData );
Returns an HRESULT value that depends on the implementation of the interface.
IAMExtTransport::SetTransportBasicParameters
Sets basic parameters of external transport.
HRESULT SetTransportBasicParameters(
long Param,
long Value,
LPCOLESTR pszData );
Returns an HRESULT value that depends on the implementation of the interface.
Basic settings include time formats, record formats, preroll setting, servo setting, and others (see Edevdefs.h).
IAMExtTransport::GetTransportBasicParameters
Retrieves video parameter settings for external transport.
HRESULT GetTransportVideoParameters(
long Param,
long *pValue );
Value | Meaning |
ED_E2E | Input video is visible on device's output regardless of transport mode. |
ED_OFF | Video output is disabled. |
ED_PLAYBACK | Video playing from media is displayed on the screen. |
Returns an HRESULT value that depends on the implementation of the interface.
IAMExtTransport::SetTransportVideoParameters
Sets video parameters for external transport.
HRESULT SetTransportVideoParameters(
long Param,
long Value );
Value | Meaning |
ED_E2E | Input video is visible on device's output regardless of transport mode. |
ED_OFF | Video output is disabled. |
ED_PLAYBACK | Video playing from media is displayed on the screen. |
Returns an HRESULT value that depends on the implementation of the interface.
For the ED_TRANSVIDEO_SET_SOURCE flag, an external device filter uses physical pins to describe its inputs. Calls to the filter's pin enumerator will return an index value. The value is passed to this method as its as its Value parameter.
IAMExtTransport::GetTransportVideoParameters
Retrieves audio parameter setting for external transport.
HRESULT GetTransportAudioParameters(
long Param,
long *pValue );
Value | Meaning |
ED_TRANSAUDIO_ENABLE_OUTPUT | Audio output channel(s) |
ED_TRANSAUDIO_ENABLE_RECORD | Audio recording channel(s) |
ED_TRANSAUDIO_ENABLE_SELSYNC | Audio selsync recording channel(s) |
ED_TRANSAUDIO_SET_MONITOR | Monitor output audio channel(s) |
ED_TRANSAUDIO_SET_SOURCE | Audio source channel(s) |
Returns an HRESULT value that depends on the implementation of the interface.
Sets audio parameter setting for external transport.
HRESULT SetTransportAudioParameters(
long Param,
long Value );
Value | Meaning |
ED_TRANSAUDIO_ENABLE_OUTPUT | Enable audio channel(s) for output. |
ED_TRANSAUDIO_ENABLE_RECORD | Enable audio channel(s) for recording. |
ED_TRANSAUDIO_ENABLE_SELSYNC | Enable audio channel(s) for selsync recording. |
ED_TRANSAUDIO_SET_MONITOR | Set the monitor output source. |
ED_TRANSAUDIO_SET_SOURCE | Set the active audio input. |
Returns an HRESULT value that depends on the implementation of the interface.
Specify an exact channel or channels in Value by selecting ED_AUDIO_1 through ED_AUDIO_24 (use an or switch to combine), or all channels by selecting ED_AUDIO_ALL.
IAMExtTransport::GetTransportAudioParameters
Sets the movement of the transport to a new mode (play, stop, record, edit, and so on).
HRESULT put_Mode(
long Mode );
Value | Meaning |
ED_MODE_PLAY | Play |
ED_MODE_STOP | Stop |
ED_MODE_FREEZE | Freeze (pause) |
ED_MODE_THAW | Resume |
ED_MODE_FF | Fast forward |
ED_MODE_REW | Rewind |
ED_MODE_RECORD | Record |
ED_MODE_RECORD_STROBE | Record single frame |
ED_MODE_STEP | Single step |
ED_MODE_SHUTTLE | Shuttle (high-speed movement with visible picture) |
ED_MODE_EDIT_CUE | Cue for an edit event |
ED_MODE_LINK_ON | Link this method to the graph's IMediaControl::Run, Stop, and Pause methods |
ED_MODE_LINK_OFF | Disengage this method from the graph's IMediaControl::Run, Stop, Pause methods. |
Returns an HRESULT value that depends on the implementation of the interface.
Retrieves the mode of the transport (play, stop, record, edit, and so on).
HRESULT get_Mode(
long *pMode );
Returns an HRESULT value that depends on the implementation of the interface.
Sets the playback rate for variable-speed external devices.
HRESULT put_Rate(
double dblRate );
Returns an HRESULT value that depends on the implementation of the interface.
This method enables an application to speed up or slow down playback relative to the normal default playback speed. A rate of 1.0 indicates normal playback speed. Specifying 2.0 causes playback at twice the normal rate.
You can also link this method to the IMediaPosition::put_Rate method as an alternate means of setting rates of playback relative to normal speed.
IAMExtTransport::get_Rate
Retrieves the playback rate for variable-speed external devices.
HRESULT get_Rate(
double *pdblRate );
Returns an HRESULT value that depends on the implementation of the interface.
Retrieves the status of chase mode.
HRESULT GetChase(
long *pEnabled,
long *pOffset,
HEVENT *phEvent );
Returns an HRESULT value that depends on the implementation of the interface.
The time for pOffset is given in the current time format (see "IAMExtTransport Basic Parms" in DXMedia\Include\Edevdefs.h for supported time formats).
Enables or disables chase mode.
HRESULT SetChase(
long Enable,
long Offset,
HEVENT hEvent );
Returns an HRESULT value that depends on the implementation of the interface.
Use the SetChase method when you want an external transport to continuously follow a timecode signal with a fixed offset. For example, if your computer is generating timecode, a VCR capable of chasing can be told by the computer to put itself in play mode and keep its media a fixed offset from the reference timecode. You determine the offset by comparing the timecode on the playback media to the reference (generated) timecode.
This method will stay in effect until canceled or complete and requires the filter to verify (by periodically reading the transport's timecode) that the transport is indeed maintaining the fixed offset.
Time for Offset is specified in current time format (see "IAMExtTransport Basic Parms" in DXMedia\Include\Edevdefs.h for supported time formats).
Retrieves the status of bump mode.
HRESULT GetBump(
long *pSpeed,
long *pDuration );
Returns an HRESULT value that depends on the implementation of the interface.
This method will cause a temporary speed variation of transport used during the physical synchronization process. It will stay in effect until pDuration time has expired.
See "IAMExtTransport Basic Parms" in DXMedia\Include\Edevdefs.h for supported time formats.
Temporarily changes the speed of playback for synchronization of multiple external devices.
HRESULT SetBump(
long Speed,
long Duration );
Returns an HRESULT value that depends on the implementation of the interface.
This method will stay in effect until Duration time has expired.
See "IAMExtTransport Basic Parms" in DXMedia\Include\Edevdefs.h for supported time formats.
Determines if the anti-headclog control is enabled or disabled.
HRESULT get_AntiClogControl(
long *pEnabled );
Returns an HRESULT value that depends on the implementation of the interface.
IAMExtTransport::put_AntiClogControl
Enables or disables transport anti-headclog control.
HRESULT put_AntiClogControl(
long Enable );
Returns an HRESULT value that depends on the implementation of the interface.
Use this method to unclog video heads on VCRs that have an automatic head-cleaning feature.
Retrieves individual parameters and values associated with a particular edit property set.
HRESULT GetEditPropertySet(
long EditID,
long *pState );
Value | Meaning |
DC_SET_ACTIVE | Activates edit property set. |
DC_SET_DELETE | Deletes edit property set. |
DC_SET_INACTIVE | Deactivates edit property set. |
DC_SET_REGISTER | Registers edit property set. |
Returns an HRESULT value that depends on the implementation of the interface.
IAMExtTransport::SetEditPropertySet
Registers an edit property set that describes a group of edit properties.
HRESULT SetEditPropertySet(
long *pEditID,
long State );
Value | Meaning |
DC_SET_ACTIVE | Activates edit property set. |
DC_SET_DELETE | Deletes edit property set. |
DC_SET_INACTIVE | Inactivates edit property set. |
DC_SET_REGISTER | Registers edit property set. |
Returns an HRESULT value that depends on the implementation of the interface.
Edit events refer to a group of predefined properties that define an actual recording sequence on the transport or a simple positional command. They can, for example, specify certain modes of editing, record inpoints and outpoints, or memorize positions called bookmarks. The SetEditPropertySet method defines and registers a group of edit properties, called an edit property set, while the SetEditProperty enables the user to define parameters and values of individual edit event properties.
To define a set of edit properties, first register an edit property set and get an EditID with the SetEditPropertySet method. Then use the SetEditProperty method to define specific parameters and values of individual edit properties. Finally, use the SetEditPropertySet method to activate the edit property set.
For a complete listing of possible parameters and values for edit property sets see Edevdefs.h in the DirectShow SDK's DXMedia\Include folder.
IAMExtTransport::GetEditPropertySet
Retrieves the parameters and values associated with a particular edit event.
HRESULT GetEditProperty(
long EditID,
long Param,
long *pValue );
Returns an HRESULT value that depends on the implementation of the interface.
IAMExtTransport::SetEditProperty
Defines individual parameters and values associated with a particular edit property set.
HRESULT SetEditProperty(
long EditID,
long Param,
long Value );
Returns an HRESULT value that depends on the implementation of the interface.
Edit events can either refer to a group of predefined properties that define an actual recording sequence, or they can refer to simple positional commands. They can, for example, specify certain modes of editing, record inpoints and outpoints, or memorize positions called bookmarks. The SetEditPropertySet method defines and registers a group of edit events, called an edit property set, while the SetEditProperty method enables the user to define parameters and values of individual edit events.
To define a set of edit properties, first register an edit property set and get an EditID with the SetEditPropertySet method. Then use the SetEditProperty method to define specific parameters and values of individual edit properties. Finally, use the SetEditPropertySet method to activate the edit property set.
For a complete listing of possible parameters and values for edit property sets see Edevdefs.h in the DirectShow SDK's DXMedia\Include folder.
IAMExtTransport::GetEditProperty
Determines if the external transport's edit control is active.
HRESULT get_EditStart(
long *pValue );
Returns an HRESULT value that depends on the implementation of the interface.
IAMExtTransport::put_EditStart
Activates the edit control on a capable transport.
HRESULT put_EditStart(
long Value );
Returns an HRESULT value that depends on the implementation of the interface.
Use this method to manually enable edit control. Edit control is defined as the precise enabling of individual, or a set of, record tracks on a VCR; for example, a video-only insert edit, where only the video record head is enabled and a new video signal is recorded — the audio signal is left as is. Use this method to control "on the fly" editing on machines that have this feature.
IAMExtTransport::get_EditStart
© 1997 Microsoft Corporation. All rights reserved. Terms of Use.