public CmmbStreamSource2(int channelIdx, Engine engine) { Utility.Trace(String.Format("CmmbStreamSource channel is {0}", channelIdx)); curChannelIdx = channelIdx; _engine = engine; m_MUXprovider = _engine.GetCmmbProvider; m_MUXprovider.ChannelID = channelIdx; m_MUXprovider.StartToProvide(); m_MUXSourceQueue = _engine.GetCmmbStreamQueue; // Init the worker thread m_ParserThread = new Thread(ParserThreadRun); m_ParserThread.Start(); m_ParserThread.Name = "Parser_Thread " + threadid++.ToString(); Utility.Trace("Parser_Thread started! " + m_ParserThread.Name); }
public void Initialize() { //1. initialize the database, _dbEngine = new DBEngine(); //2. init the MBBMS // MBBMSEngine.init(); //3. init the main view data model _uiDataModel = new UIDataModel(this); // 4.init the cmmb demux //StreamResourceInfo streaminfo = Application.GetResourceStream(new Uri("Resources/cmmb.mfs", UriKind.Relative)); //var cmmb_stream = streaminfo.Stream; //_demux = new CmmbDemux(streaminfo.Stream); //cmmb_stream.Close(); //5. init cmmb stream provider _cmmbStreamQueue = new WorkQueue(); _provider = new MUXProvider(_cmmbStreamQueue); }