IFileSinkFilter Interface

This is a standard DirectShow interface exposed by several sink filters.

This page documents its use in the LEAD DICOM Writer (2.0) filter.

If you are using it with one of the streaming sink filters like LEAD MPEG2 Transport UDP Sink, LEAD MMS Sink, and LEAD RTSP Sink), you should go to IFileSinkFilter Interface (UDP, RTSP, MMS).

Interface Methods:

HRESULT SetFileName(LPCOLESTR pszFileName, const AM_MEDIA_TYPE * pmt)

Parameters

pszFileName

Pointer to a string that contains the name of the file to receive the media samples, as an OLESTR type.

pmt

Pointer to an AM_MEDIA_TYPE structure that indicates the type of media samples to be written to the file and the media type of the sink filter's input pin. This parameter is ignored and is provided only for compatibility. Always pass NULL.

Description

Sets the name of the output DICOM file. If pszFileName does not exist, a file by that name will be created. If pszFileName currently exists, the existing file will be overwritten. For more information, refer to the DirectShow 9.0  IFileSinkFilter::SetFileName and AM_MEDIA_TYPE documentation in the DirectX documentation on MSDN.

Returns

ERROR_FILENAME_EXCED_RANGE

The file name is longer than 260 characters, so the name cannot be set.

S_FALSE

The filter is in the streaming state, so the name cannot be set.

E_POINTER

pszFileName is NULL, so the name cannot be set.

S_OK

Success.

HRESULT GetCurFile (LPOLESTR * ppszFileName, AM_MEDIA_TYPE * pmt)

Parameters

ppszFileName

Address of a pointer to a string to be updated with the name of the current file receiving the media samples, as an OLESTR type. The method allocates the memory for the string returned in ppszFileName. The caller must free it by calling CoTaskMemFree.

pmt

Pointer to an AM_MEDIA_TYPE structure to be updated with the type of media samples being written to the file. This parameter can be NULL, in which case the method does not return the media type. If the filters input pin is not connected this variable will not be updated. If this method succeeds the caller must free the memory allocated for the structure by calling the FreeMediaType function in the base DirectShow class library.

  

Description

Gets the name of the current file along with its media type information. For more information, refer to the DirectShow 9.0  IFileSinkFilter::GetCurFile and AM_MEDIA_TYPE documentation in the DirectX documentation on MSDN.

Returns

E_OUTOFMEMORY

Insufficient memory.

E_FAIL

No file is open.

E_POINTER

ppszFileName is NULL.

S_OK

Success.

This filter is included as part of the following modules:

LEADTOOLS Medical Multimedia Module

Help Version 20.0.2020.3.31
Products | Support | Contact Us | Intellectual Property Notices
© 1991-2020 LEAD Technologies, Inc. All Rights Reserved.

LEADTOOLS Filters C API Help