This is a standard DirectShow interface. It is used by several filters, including the LEAD RTSP Source, LEAD MPEG2 Transport UDP Source, LEAD Windows Media Reader and LEAD Elementary Stream Source Filter filters to specify parameters that control the filters' behavior.
Gets the current URL string.
A valid pointer to a pointer that will receive a copy of the URL string. This cannot be NULL.
A pointer to an AM_MEDIA_TYPE structure. This pointer is optional and you can pass NULL if you do not need the media type.
The URL string contains the IP address, the port and the network card address.
If the method succeeds, the ppszFileName pointer gets updated with a pointer to a buffer containing the URL. This buffer was allocated with CoTaskMemAlloc. You are responsible for freeing this buffer when you are done with it by calling CoTaskMemFree.
If the method succeeds and pmt is set to a valid pointer to AM_MEDIA_TYPE structure, this structure gets initialized with a copy of the stream media type. You are responsible for freeing the data allocated in this structure by calling the FreeMediaType function. Please refer to the Microsoft documentation for more information on this method.
|< 0||An error occurred.|
|E_POINTER||ppszFilename is NULL|
A valid pointer to a buffer containing the filename or the URL of the stream. This cannot be NULL.
A pointer to an AM_MEDIA_TYPE structure indicating the media type of the data being streamed. This pointer can be NULL, in which case a default media type will be assumed.
For the Elementary Source Filter, the pszFileName string points to a filename (absolute or relative).
For the Windows Media Reader, the pszFileName string can point to a filename or a URL.
IP address of the server sending the data
(Optional) The IP address of network card receiving the data. If no network card is specified, the default network connection will be used.
The format of the string for UDP streaming is as follows:
The format of the string for TCP streaming is as follows:
The format of the string for RTSP streaming is as follows:
To determine the IP addresses of the network connections on your a computer running Windows XP, type the ipconfig command at the DOS prompt. For more information on obtaining your machine's host name, refer to How to Get Your Own IP Address Programmatically.
One might want to use a particular network card when the system has two network connections and one is faster than the other. For example, a laptop might be connected to the network with a wireless network card and a regular network wire. In this case, it would be better to use the wired connection because it is faster and more reliable.
|< 0||An error occurred.|
|HRESULT_FROM_WIN32(WSAHOST_NOT_FOUND)||(0x80072AF9) The URL is invalid.|
|HRESULT_FROM_WIN32(WSAETIMEDOUT)||(0x8007274C) The URL might be valid, but the remote end is not sending data.|
|E_OUTOFMEMORY||(0x8007000E) Out of memory.|
|E_FAIL||(0x80004005) Unspecified error.|
|HRESULT_FROM_WIN32(xxx)||A Windows error xxx has occurred. Consult the Microsoft documentation for the definition of the HRESULT_FROM_WIN32 macro and the complete list of Windows error codes.|