Sometimes I want to discard some packages, such as (audio and video) at some time. I wrote a filter for packet loss. For the Declaration, see the following file.
However, during use, when the video is still closed and the stream is opened again, there will still be a picture before it is closed, and the picture after it is turned on will pop up. I wonder if you have any better solutions.
Filter will be passed to my resources.
# Pragma once
/* # UNDEF initguid */
// Stdarg. H, stdlib. H, wtypes. h.
# Ifdef _ cplusplus
Extern "C "{
# Endif
// The clsid used by the minimal, In-Place, null Filter
// Do not reuse it. Run uuidgen.exe to create a new one.
// {08af6540-4f21-11cf-aacb-0020af0b99a3}
Define_guid (clsid_streamx,
0x6aaceafd, 0x6371, 0x4e65, 0x85, 0x11, 0x9e, 0xae, 0x83, 0xac, 0xf2, 0x94 );
// {F13325C7-1605-4f7f-8F78-AD30DD6344B3}
Define_guid (clsid_streamxprop,
0xf13325c7, 0x1605, 0x4f7f, 0x8f, 0x78, 0xad, 0x30, 0xdd, 0x63, 0x44, 0xb3 );
// {51edc64f-01a2-4383-89e8-a51057878a0d}
Define_guid (iid_ipassthrough,
0x51edc64f, 0x1a2, 0x4383, 0x89, 0xe8, 0xa5, 0x10, 0x57, 0x87, 0x8a, 0xd );
// DT is a macro to help debug app by dump useful info,
// It works for debug and release version.
// Usage:
// DT (_ T ("work OK in line % d"), m_nline );
// Define following line to enable dt
Declare_interface _ (ipassthrough, iunknown)
{
Stdmethod (put_pass) (This _
Bool bpass/* [in] * // The media type selected
) Pure;
Stdmethod (get_pass) (This _
Bool * bpass/* [in] * // The media type selected
) Pure;
};
# ifdef _ cplusplus
}< br> # endif