Caching and Proxying On-Demand Streams
Unlike a live broadcast, on-demand content has been archived and indexed is available on demand. That is, the content is stored in a fixed file that the client can control during playback. Each requested on-demand stream requires a unique connection to the server, and each can be controlled by the client. That is, a client can start, stop, and seek within an on-demand stream.
When a client requests content, the cache plug-in typically checks local storage. If the content exists locally and has not expired, the plug-in requests that the server deliver the content to the client.
If the content is not stored locally or has expired, the cache plug-in can direct the cache server to open a data path to the origin server and begin downloading the content. Also, the cache server can perform any of the following actions.
Deny the client access to the content.
Redirect the client to an alternate proxy server or URL.
Redirect the client to an alternate proxy server or URL while downloading the content from the origin server into local cache.
Open two data paths to the origin server. One path proxies the content to the client. The other path downloads the content into local storage.
Proxy the stream on demand.
To avoid unauthorized access, a Windows Media proxy server does not cache content from any upstream server that issues an authentication challenge. If the cache plug-in requests that the content be cached, the cache proxy server rejects the request. Furthermore, the WMS_DATA_ CONTAINER_VERSION_ALLOW_PROXY_CACHING flag must be set. The flags are stored in a content information context that is downloaded with the content. Your plug-in can retrieve the flags by using the GetCacheFlags method on the IWMSDataContainerVersion interface.
To determine whether the content requested by the client is of the on-demand type, a cache plug-in can call GetContentInformation on the IWMSCacheProxyServer interface.
The Windows Media server queries the origin server for information about the requested content and responds to the plug-in by calling OnGetContentInformation on the IWMSCacheProxyServerCallback interface.
The server returns a pointer to a Cache Content Information Context. If the WMS_CACHE_CONTENT_INFORMATION_CONTENT_TYPE field contains WMS_CACHE_CONTENT_TYPE_BROADCAST, the content is a broadcast. If the broadcast flag is not set, the content is on-demand.
Note
The WMS_CACHE_CONTENT_INFORMATION_CONTENT_TYPE field can contain any combination of the flags in the WMS_CACHE_CONTENT_TYPE_FLAGS enumeration type.
See Also (General)
See Also (Visual Basic .NET)
IWMSCacheProxyServerIWMSCacheProxyServer Object (Visual Basic .NET)
IWMSCacheProxyServerCallbackIWMSCacheProxyServerCallback Object (Visual Basic .NET)
IWMSDataContainerVersionIWMSDataContainerVersion Object (Visual Basic .NET)
IWMSOnDemandPublishingPointIWMSOnDemandPublishingPoint Object (Visual Basic .NET)
IWMSPublishingPointIWMSPublishingPoint Object (Visual Basic .NET)
See Also (C#)
IWMSCacheProxyServerIWMSCacheProxyServer Object (C#)
IWMSCacheProxyServerCallbackIWMSCacheProxyServerCallback Object (C#)
IWMSDataContainerVersionIWMSDataContainerVersion Object (C#)
IWMSOnDemandPublishingPointIWMSOnDemandPublishingPoint Object (C#)
IWMSPublishingPointIWMSPublishingPoint Object (C#)
See Also (C++)
IWMSCacheProxyServerIWMSCacheProxyServer Interface
IWMSCacheProxyServerCallbackIWMSCacheProxyServerCallback Interface
IWMSDataContainerVersionIWMSDataContainerVersion Interface
IWMSOnDemandPublishingPointIWMSOnDemandPublishingPoint Interface
IWMSPublishingPointIWMSPublishingPoint Interface