This is a standard DirectShow interface. It is used by several filters, including the LEAD MPEG2 Transport UDP Sink, LEAD MMS Sink, LEAD RTSP Sink and LEAD SSF Writer filters to specify parameters that control the filters' behavior. See below the discussion for the SetFileName method for the syntax used for each filter.
ppszFileName |
A valid pointer to a pointer that will receive a copy of the URL string. This cannot be NULL. |
pmt |
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. |
Gets the current URL string. This string contains the IP address, the port and (optional) the network card address. See the SetFileName method for more information on the format of the URL string.
If the function succeeds, the ppszFileName pointer will be updated with a pointer to a buffer containing the URL. This buffer has been allocated with CoTaskMemAlloc. You are responsible for freeing this buffer when you are done with it by calling CoTaskMemFree.
If the function succeeds and you set pmt to a valid pointer to AM_MEDIA_TYPE structure, this structure will be 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 function.
S_OK if successful, < 0 if an error occurred.
Value |
Meaning |
E_POINTER |
ppszFilename is NULL |
pszFileName |
A valid pointer to a buffer containing the URL of the stream. This cannot be NULL. |
pmt |
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. |
This function sets the URL of the stream or output filename/folder. The syntax depends on the filter. Here are the URLs used by each filter (optional components are in square brackets):
LEAD MPEG2 Transport UDP Sink:
udp://ip_address[:udp_port][/network_card]
rtp://ip_address[:rtp_port][/network_card]
tcp://ip_address[:rtp_port][/network_card]
mms://[username[:password]@]serveraddress[:port]/publishingpoint
rtsp://serveraddress[:rtsp_port]
Name of the output folder that will contain the generated files. It is the usual Windows filename (e.g.: c:\MySSFOutputDirectory).
See the MPEG2 Transport UDP Sink Syntax, MMS Sink Syntax, and RTSP Source URL Syntax topics for more details.
S_OK if successful, < 0 if an error occurred.
Value |
Meaning |
E_OUTOFMEMORY |
(0x8007000E) Out of memory |
E_FAIL |
(0x80004005) Unspecified error |
HRESULT_FROM_WIN32(xxx) |
Windows error xxx has occurred. You can consult the Microsoft documentation for the definition of the HRESULT_FROM_WIN32 macro and the complete list of Windows error codes. |