Available in LEADTOOLS Multimedia toolkits. |
A system for Streaming Windows Media data usually involves the use of an encoder (which compresses the data) and a server (which handles the streaming, load balancing, etc). The LEAD MMS Sink filter allows you to create high performance advanced encoders, which can compress on the fly video using all the processing filters provided by LEADTOOLS, supports all the file formats supported by LEADTOOLS or DirectShow®, gives more control over the compression process, etc.
The LEAD MMS Sink Filter acts as a Push filter, sending the data to a Windows Media Server using a TCP/IP connection to a certain port (80 by default).
The MMS Sink will keep the connection with the server open after the graph stops, and will not close the connection until the target filename or format is changed. This helps prevent the connection from being broken before all media clients have finished viewing the streamed video. It also allows the user to stream a different source across the same connection if needed.
The filter dynamically creates a publishing point, so you do not have to create one in the server.
When you push the data, you can specify an optional username and password for authentication purposes.
All of the above settings are specified in the output URL that you pass to IFileSinkFilter::SetFileName. When you use the toolkit, you do not need to use this interface. You just need to set the target filename to the following URL:
mms://[username:password@]serveraddress[:serverport]/publishingpoint
The optional components are enclosed in square brackets ('[]'). So "username:password@" and ":serverport" are optional and can be omitted. Therefore, you can also use the following URL:
mms://serveraddress/publishingpoint
For example, let's say 192.168.1.100 is the encoder and that 192.168.1.101 is the server. Further, assume that we want to create a "MyTest1" publishing point. In this case, perform the following steps:
On the encoder, run the Windows Media Publisher demo and push data to 192.168.1.101 with a publishing point of MyTest1. (Programmatically, you set the target filename in the LEAD MMS Sink to mms://username:password@192.168.1.101:80/MyTest1 ).
On the server, you don't need to do anything, provided that the HTTP Server Control Protocol is enabled and that the 'username' user is allowed to send data to the server
On any other computer, run Media Player or a player based on our toolkit and open the following URL: mms://192.168.1.101/MyTest1
Common errors generated when you try to push data to a server are as
follows:
Error |
Cause |
Solution |
E_ACCESSDENIED (0x80070005) |
The server denied access. |
Check the username/password provided. Check whether the IP address of your computer is in the list of IP addresses allowed to push data to the server. |
NS_E_INVALID_PUSH_PUBLISHING_POINT (0xC00D151B) |
The publishing point is invalid: it exists or might have an invalid filename. |
Use a different publishing point. |
NS_E_PUSH_CANNOTCONNECT (0xC00D2F0B) |
The server rejected connection in push mode. |
Configure the server to accept push connection. Enable WMS HTTP Server Control Protocol.
|
NS_E_CONNECTION_FAILURE (0xC00D0029) |
The connection to the server failed. |
Check the Authorization settings and make sure the IP address of your computer is allowed to push data. |
Enable the WMS HTTP Server Control Protocol as shown in the following figure (for Windows Media Services 9.0):