次の方法で共有


Command Context

The command context contains a name-value pair that describes the requests issued by the client to the server and the response issued by the server to the client. The command context lasts only as long as the request or response that it describes is being performed or evaluated.

Each RTSP and HTTP header line gets an entry in the command context. In order to prevent name clashes between the header lines and additional command context properties that you define, properties always begin with @ because the @ character is not valid in header line names.

You must call the GetCommandRequest method on the IWMSCommandContext interface to retrieve an IWMSContext interface that contains a client request, and call the GetCommandResponse method to retrieve a server response. The following table identifies the context values defined by Windows Media Services.

Name

Value (data type)

Key

Description

@ STREAM SWITCH

IUnknown*

25

Contains an IUnknown pointer that you can use to retrieve a pointer to an IWMSStreamSwitchDescriptionList interface. You can call the GetAndQueryIUnknownValue method on the IWMSContext interface to retrieve a pointer to IWMSStreamSwitchDescriptionList.

@ TRANSPORT PROPERTIES

IUnknown*

13

Contains an IUnknown pointer that you can use to retrieve a pointer to an IWMSTransportProperties interface. You can call the GetAndQueryIUnknownValue method on the IWMSContext interface to retrieve a pointer to IWMSTransportProperties.

@WMS_COMMAND_CONTEXT_ACTIVE_ENTRY_URL

String

164

Contains the name of the playlist entry that is currently being played. This is available for the WMS_EVENT_PLAY and WMS_EVENT_STOP events.

@WMS_COMMAND_CONTEXT_BODY

String or IUnknown*

11

Contains the payload of the command. If the data type is IUnknown*, you can call the GetAndQueryIUnknownValue method on the IWMSContext interface to retrieve a pointer to INSSBuffer. This is used by logging plug-ins. For more information, see Creating Logging Plug-ins. It can also be used by control protocol plug-ins and is filled with a Windows Media file header when Windows Media Encoder pushes a distribution stream to the server. You cannot create a custom control protocol plug-in.

@WMS_COMMAND_CONTEXT_BODY_TYPE

String

12

Contains the MIME type of the payload in @WMS_COMMAND_CONTEXT_BODY

@WMS_COMMAND_CONTEXT_CACHE_MONIKER

String

87

Contains the cache moniker.

@WMS_COMMAND_CONTEXT_EVENT

long

52

Contains an ID for the specific event that occurred. This is a member of the WMS_EVENT_TYPE enumeration type.

@WMS_COMMAND_CONTEXT_EVENT_ADMINNAME

String

53

Contains the username of the administrator that caused the event. This value will be set only of the username can be retrieved. Typically, an event is raised when an administrator modifies the server.

@WMS_COMMAND_CONTEXT_EVENT_NEW_VALUE

VARIANT

65

Contains a new value. For example, if you change the name of a publishing point, the new value is set here and the previous value is set in the @WMS_COMMAND_CONTEXT_EVENT_OLD_VALUE context value.

@WMS_COMMAND_CONTEXT_EVENT_OLD_VALUE

VARIANT

64

Contains an old value. For example, if you change the name of a publishing point, the old value is set here and the new value is set in the @WMS_COMMAND_CONTEXT_EVENT_NEW_VALUE context value.

@WMS_COMMAND_CONTEXT_EVENT_PROPERTY_NAME

String

66

Contains the name of the name-value pair that changed in the IWMSNamedValues collection.

@WMS_COMMAND_CONTEXT_LIMIT_CLIENTID

long

55

Contains the ID of the client that was disconnected when a server or publishing point limit was hit. This number is randomly generated by the server and assigned to each connected client. It is also stored in the WMS_USER_ID context.

@WMS_COMMAND_CONTEXT_LIMIT_CLIENTIP

String

56

Contains the IP address of the client that was disconnected when a server or publishing point limit was hit.

@WMS_COMMAND_CONTEXT_LIMIT_NEW_VALUE

long

72

Contains a new value for a server or publishing point limit. When you change a limit, the new value is stored here and the previous value is stored in the WMS_COMMAND_CONTEXT_LIMIT_OLD_VALUE context value.

@WMS_COMMAND_CONTEXT_LIMIT_OLD_VALUE

long

57

Contains the old value for the server or publishing point limit. When you change a limit, the old value is stored here and the new value is stored in the WMS_COMMAND_CONTEXT_LIMIT_OLD_VALUE context value.

@WMS_COMMAND_CONTEXT_PLAYLIST_ENTRY_UNIQUE_RUNTIME_ID

long

100

Contains a unique identifier for the playlist element associated with the event. The server assigns a unique value to each element in a playlist when it creates an IWMSPlaylist object. If a playlist contains nested playlists, each nested object also has a unique ID.

@WMS_COMMAND_CONTEXT_PLAYLIST_OBJECT

IUnknown*

59

Contains an IUnknown pointer to the IWMSPlaylist object. You can call the GetAndQueryIUnknownValue method on the IWMSContext interface to retrieve a pointer to IWMSPlaylist.

@WMS_COMMAND_CONTEXT_PLUGIN_MONIKER

String

70

Contains the moniker display name of a plug-in.

@WMS_COMMAND_CONTEXT_PLUGIN_NAME

String

69

Contains the name of the plug-in object. This is the name that the creator of a plug-in specifies during registration. For more information, see Registering Plug-in Properties.

@WMS_COMMAND_CONTEXT_PUBPOINT_IDENTIFIER

String

40

Contains a GUID that uniquely identifies the publishing point. You can also retrieve the GUID by using the ID property on the IWMSPublishingPoint interface.

@WMS_COMMAND_CONTEXT_PUBPOINT_MONIKER

String

63

Contains the moniker display name for the IWMSPublishingPoint interface.

@WMS_COMMAND_CONTEXT_PUBPOINT_NAME

String

62

Contains the name of the IWMSPublishingPoint interface.

@WMS_COMMAND_CONTEXT_PUSH_CREATING_NEW_PUBLISHING_POINT

DWORD

99

Contains 1 (one) if a new publishing point was created by a push distribution from an encoder and 0 (zero) otherwise.

@WMS_COMMAND_CONTEXT_PUSH_DISTRIBUTION_TEMPLATE

String

97

Contains the name of the publishing point used as a template by the encoder.

@WMS_COMMAND_CONTEXT_RATE

double

21

Contains the rate at which the presentation is streamed. A value of 1 indicates normal forward speed. A value greater that 1 indicates that the content is being fast-forwarded. A value less than 0 indicates that the content is being rewound. For example, a value of 2 indicates that the content is being fast forwarded at twice the normal rate, and -2 indicates that it is being rewound at twice the normal rate. This value is copied into the WMS_PRESENT_PLAY_RATE context value.

@WMS_COMMAND_CONTEXT_DOWNLOAD_URL

String

88

Contains the URL from which content can be downloaded.

@WMS_COMMAND_CONTEXT_REDIRECT_URL

String

89

Contains a URL to redirect the client.

@WMS_COMMAND_CONTEXT_REQUEST_URL

String

105

Contains the URL requested by the client.

@WMS_COMMAND_CONTEXT_START_OFFSET

QWORD

16

Contains an offset from which the server should begin streaming the requested content. The type of offset varies depending on the value contained in @WMS_COMMAND_CONTEXT_START_OFFSET_TYPE. If that value is WMS_SEEK_TO_TIME, the offset is specified in milliseconds. If the value is WMS_SEEK_TO_PACKET, the offset is specified by a packet number. If the value is WMS_SEEK_TO_PLAYLIST_ENTRY, the offset is specified by an index into a playlist. If the value is WMS_SEEK_TO_BYTE_OFFSET, the offset is specified in bytes.

@WMS_COMMAND_CONTEXT_START_OFFSET_TYPE

DWORD

17

Contains information needed to interpret the @WMS_COMMAND_CONTEXT_START_OFFSET. This is one of the values in the WMS_SEEK_TYPE enumeration type.

@WMS_COMMAND_CONTEXT_URL

String

2

Contains the URL of the requested content that is associated with a WMS_EVENT_TYPE event.

@WMS_COMMAND_CONTEXT_URL_EXTRAINFO

String

7

Contains the URL extension of a client request. This includes the URL fragment and query string.

@WMS_COMMAND_CONTEXT_URL_HOSTNAME

String

4

Contains the host name of the URL.

@WMS_COMMAND_CONTEXT_URL_PATH

String

6

Contains the URL path.

@WMS_COMMAND_CONTEXT_URL_PORT

String

5

Contains the URL port.

@WMS_COMMAND_CONTEXT_URL_SCHEME

String

3

Contains the URL scheme. For example, file:// is a scheme type.

See Also (General)

See Also (Visual Basic .NET)

See Also (C#)

See Also (C++)