B2C2, Inc. - Software Development Kit |
B2C2MPEG2Filter (Windows Only) | |||||
B2C2MPEG2Filter Specifications | |||||
Note |
The B2C2 MPEG-2 Source Filter (B2C2MPEG2Filter) is a DirectShow compatible filter that allows application software access to B2C2's broadband device. The filter's interfaces allow configuration of the B2C2 tuner hardware as well as the setting of Audio, Video, Raw TS, and IP data PIDs. The B2C2 MPEG-2 Source filter is installed as part of the normal driver installation.
B2C2MPEG2Filter is a COM (Microsoft Component Object Model) object that can be used as part of a filter graph (a set of connected filters) controlled by DirectShow's Filter Graph Manager.
Playing media involves creating an instance of the filter graph manager, using the filter graph manager to create a filter graph, and using the filter graph manager to control media streaming in the filter graph. To accomplish this, two interfaces are used: IGraphBuilder constructs the filter graph, and IMediaControl handles media streaming (such as run, stop, or pause) in the filter graph.
An application might need to handle a number of event codes, depending on the purpose of the application. For example, an event code might signal the end of a data stream. Another event code might signal that a user has interrupted playback by closing the video window. A filter sends an event notification to the filter graph manager, which maintains a queue. The filter graph manager posts a WM_GRAPHNOTIFY message to the application window. In the event handler function, and IMediaEvent methods would retrieve the events code from the queue and invoke a clean-up function.
For more detailed information, consult Microsoft DirectShow and COM documentation.
A COM interface supports standardized COM methods for the type of interface in order to create object-oriented software. B2C2MPEG2Filter's COM interfaces including IPin output, IMediaControl, IGraphBuilder, and IMediaEvent interfaces in addition to other interfaces: IB2C2MPEG2TunerCtrl2, IB2C2MPEG2AVCtrl2, and IB2C2MPEG2DataCtrl4.
COM requires that the only way to gain access to the methods of an interface is through a pointer to that interface. Therefore, after adding the B2C2MPEG2Filter to the DirectShow filter graph, pointers to IB2C2MPEG2TunerCtrl2, IB2C2MPEG2AVCtrl2, and IB2C2MPEG2DataCtrl4 filter interfaces can be received through the QueryInterface method of the B2C2MPEG2Filter. The B2C2MPEG2Adapter adapter class can be used to encapsulate all of the above COM-specific functions and return other interfaces required for media handling.
Filter Interfaces |
IB2C2MPEG2TunerCtrl2, IB2C2MPEG2AVCtrl2, IB2C2MPEG2DataCtrl4, IFileSourceFilter (see note). | ||
---|---|---|---|
Input Pin Media Types |
Not applicable | ||
Input Pin Interfaces |
Not applicable | ||
Output Pin Media Types |
Pin Name | Major Type | Subtype |
"Audio" | MEDIATYPE_Audio | MEDIASUBTYPE_MPEG1Payload | |
"Video" | MEDIATYPE_Video | MEDIASUBTYPE_MPEG2_VIDEO | |
"Data 0" | MEDIATYPE_NULL | MEDIASUBTYPE_None | |
"Data 1" | MEDIATYPE_NULL | MEDIASUBTYPE_None | |
"Data 2" | MEDIATYPE_NULL | MEDIASUBTYPE_None | |
"Data 3" | MEDIATYPE_NULL | MEDIASUBTYPE_None | |
Output Pin Interfaces |
IPin | ||
Filter CLSID |
CLSID_B2C2MPEG2Filter | ||
Property Page CLSID |
CLSID_B2C2MPEG2FilterProperties | ||
Executable |
Sky2PCAVSrc.ax | ||
Merit |
MERIT_UNLIKELY | ||
Category |
CLSID_VideoInputDeviceCategory |
The DirectShow IFileSourceFilter interface should not be used from within an application. The IFileSourceFilter interface uses a filename to read a source file from disk. The B2C2 MPEG-2 Source Filter implementation of this interface uses the filename to configure Video and Audio PIDs. For example, a filename such as B2C2SRC://5154-5155.mpg will set the Video PID to 5154 and Audio PID to 5155. In reality, no such file exists on the system. Also, this interface does not allow configuration of data PID(s).
Similarly, when the DirectX utility Graph Edit is used and B2C2 MPEG-2 Source Filter is inserted into a graph, the user will be prompted for a filename. The user should cancel out of this dialog box and instead use the filter property page to set Video and Audio PIDs.