Compartilhar via


IAMExtTransport::put_Mode

 
Microsoft DirectShow 9.0

IAMExtTransport::put_Mode

The put_Mode method sets the transport mode; for example, play, stop, or record.

Syntax

  HRESULT put_Mode(
  long Mode
);

Parameters

Mode

[in]  Specifies the transport mode as a long integer. Use one of the following values.

Value Description
ED_MODE_PLAY Play.
ED_MODE_STOP Stop.
ED_MODE_FREEZE Pause.
ED_MODE_THAW Resume.
ED_MODE_FF Fast forward.
ED_MODE_REW Rewind.
ED_MODE_RECORD Record.
ED_MODE_RECORD_FREEZE Pause recording.
ED_MODE_RECORD_STROBE Record single frame.
ED_MODE_STEP_FWD Single step forward.
ED_MODE_STEP_REV Single step backward.
ED_MODE_SHUTTLE Shuttle (high-speed movement with visible picture). Use with IAMExtTransport::put_Rate to set the transport speed.
ED_MODE_EDIT_CUE Position transport to the cue point for an active edit event.
ED_MODE_LINK_ON Link this method to the graph's IMediaControl::Run, IMediaControl::Stop, and IMediaControl::Pause methods.
ED_MODE_LINK_OFF Disengage this method from the graph's IMediaControl methods.

Return Values

Returns an HRESULT. Possible errors include the following.

Value Description
HRESULT_FROM_WIN32(ERROR_REQ_NOT_ACCEP) The device did not accept the command.
S_OK Success.

DV Implementation

Of the constants listed previously, MSDV supports the following:

  • ED_MODE_PLAY
  • ED_MODE_STOP
  • ED_MODE_FREEZE
  • ED_MODE_FF
  • ED_MODE_REW
  • ED_MODE_RECORD
  • ED_MODE_RECORD_FREEZE
  • ED_MODE_STEP_FW
  • ED_MODE_STEP_REV

MSDV supports some additional modes that are defined in the header file Xprtdefs.h.

Value Description
ED_MODE_PLAY_FASTEST_FWD Fastest forward.
ED_MODE_PLAY_SLOWEST_FWD Slowest forward.
ED_MODE_PLAY_FASTEST_REV Fastest reverse.
ED_MODE_PLAY_SLOWEST_REV Slowest reverse.

Windows XP Service Pack 2

In Windows XP Service Pack 2 and later, the following additional play modes are defined for ED_MODE.

Constant Description
ED_MODE_PLAY_SLOW_FWD_6 Slow forward 6
ED_MODE_PLAY_SLOW_FWD_5 Slow forward 5
ED_MODE_PLAY_SLOW_FWD_4 Slow forward 4
ED_MODE_PLAY_SLOW_FWD_3 Slow forward 3
ED_MODE_PLAY_SLOW_FWD_2 Slow forward 2
ED_MODE_PLAY_SLOW_FWD_1 Slow forward 1
ED_MODE_PLAY_FAST_FWD_1 Fast forward 1
ED_MODE_PLAY_FAST_FWD_2 Fast forward 2
ED_MODE_PLAY_FAST_FWD_3 Fast forward 3
ED_MODE_PLAY_FAST_FWD_4 Fast forward 4
ED_MODE_PLAY_FAST_FWD_5 Fast forward 5
ED_MODE_PLAY_FAST_FWD_6 Fast forward 6
ED_MODE_PLAY_SLOW_REV_6 Slow reverse 6 
ED_MODE_PLAY_SLOW_REV_5 Slow reverse 5
ED_MODE_PLAY_SLOW_REV_4 Slow reverse 4
ED_MODE_PLAY_SLOW_REV_3 Slow reverse 3
ED_MODE_PLAY_SLOW_REV_2 Slow reverse 2
ED_MODE_PLAY_SLOW_REV_1 Slow reverse 1
ED_MODE_PLAY_FAST_REV_1 Fast reverse 1
ED_MODE_PLAY_FAST_REV_2 Fast reverse 2
ED_MODE_PLAY_FAST_REV_3 Fast reverse 3
ED_MODE_PLAY_FAST_REV_4 Fast reverse 4
ED_MODE_PLAY_FAST_REV_5 Fast reverse 5
ED_MODE_PLAY_FAST_REV_6 Fast reverse 6
ED_MODE_REVERSE Reverse
ED_MODE_REVERSE_FREEZE Reverse pause

Playback speeds other than 1x are known as trick mode. In forward trick mode, the playback speeds are ordered as follows:

Slowest Forward <= Slow Forward 6

Slow Forward 6 <= Slow Forward 5

...

Slow Forward 1 <= Fast Forward 1

...

Fast Forward 5 <= Fast Forward 6

Fast Forward 6 <= Fastest Forward

Playback speeds in reverse trick mode have the same relationship. The actual speeds corresponding to these values depend on the device.

To use these constants, include the header file Xprtdefs.h from the Windows SDK.

Requirements

Header: Declared in Strmif.h; include Dshow.h.

Library: Use Strmiids.lib.

See Also