//------------------------------------------------------------------------------ // // Copyright (c) Microsoft Corporation. All rights reserved. // // The use and distribution terms for this software are covered by the // Microsoft Limited Public License (Ms-LPL) // which can be found in the file MS-LPL.txt at the root of this distribution. // By using this software in any fashion, you are agreeing to be bound by // the terms of this license. // // The software is licensed “as-is.” // // You must not remove this notice, or any other, from this software. // // // // Demux code for Windows CE // //------------------------------------------------------------------------- //====================================================================== // Demux code for Windows CE //====================================================================== /*++ Module Name: main.cpp Abstract: This module contains 1. DirectShow global data structures used for COM registration purposes. Revision History: 02-Jul-1999 created 18-Jan-2000 merged with mpg2splt --*/ #include "precomp.h" #include // for ksmedia.h #include // for bdamedia.h #include // for KSDATAFORMAT_SUBTYPE_BDA_MPEG2_TRANSPORT #include #include "mp2demux.h" #include "tsstats.h" #include "mp2seek.h" #include "pin_out.h" #include "filter.h" // define for input pin, which only accepts these types // for now static AMOVIESETUP_MEDIATYPE sudMediaTypes [] = { { & MEDIATYPE_Stream, & MEDIASUBTYPE_MPEG2_TRANSPORT }, // transport stream { & MEDIATYPE_Stream, & KSDATAFORMAT_SUBTYPE_BDA_MPEG2_TRANSPORT }, // transport stream for BDA graphs { & MEDIATYPE_Stream, & MEDIASUBTYPE_MPEG2_PROGRAM }, // program stream } ; // don't know our output pin(s), so we don't specify them here static AMOVIESETUP_PIN sudPins [] = { { INPUT_PIN_NAME, // pin name FALSE, // rendered ? FALSE, // output pin ? FALSE, // zero instances of pin ? FALSE, // many instances of this pin ? & CLSID_NULL, // CLSID of the filter to which this pin connects (directly) NULL, // name of the pin to which this pin connects NUMELMS (sudMediaTypes), // number of media types sudMediaTypes // AMOVIESETUP_MEDIATYPES [] address }, // some graph building scenarios requires >= 1 output pin to be registered #ifdef UNDER_CE // one CE we must have more info in the struct or registering the filter will crash { L"Optional", // pin name FALSE, // rendered ? TRUE, // output pin ? FALSE, // zero instances of pin ? FALSE, // many instances of this pin ? & CLSID_NULL, // CLSID of the filter to which this pin connects (directly) NULL, // name of the pin to which this pin connects 0, // number of media types NULL // AMOVIESETUP_MEDIATYPES [] address }, #else // UNDER_CE { NULL, // pin name FALSE, // rendered ? TRUE, // output pin ? FALSE, // zero instances of pin ? FALSE, // many instances of this pin ? NULL, // CLSID of the filter to which this pin connects (directly) NULL, // name of the pin to which this pin connects 0, // number of media types NULL // AMOVIESETUP_MEDIATYPES [] address }, #endif // UNDER_CE } ; AMOVIESETUP_FILTER g_sudTransportDemuxFilter = { & CLSID_MPEG2Demultiplexer, FILTER_NAME, MERIT_NORMAL, NUMELMS (sudPins), sudPins } ;