/// <summary> /// Zeigt Bild, Ton und Videotext an. /// </summary> /// <param name="audio">Die zu verwendende Tonspur.</param> private void Activate( AudioInformation audio ) { // Stop current StopReceivers( true ); // Reset anything in queue Accessor.ClearBuffers(); // Mode of operation bool mpeg4 = ((0 != CurrentSourceConfiguration.VideoStream) && (VideoTypes.H264 == CurrentSourceConfiguration.VideoType)), ac3 = false; // Configure video if (0 != CurrentSourceConfiguration.VideoStream) VideoId = Device.AddConsumer( CurrentSourceConfiguration.VideoStream, StreamTypes.Video, Accessor.AddVideo ); // Use default audio if (null == audio) if (CurrentSourceConfiguration.AudioTracks.Count > 0) audio = CurrentSourceConfiguration.AudioTracks[0]; // Configure audio if (null != audio) { // Remember the type ac3 = (AudioTypes.AC3 == audio.AudioType); // Create the filter AudioId = Device.AddConsumer( audio.AudioStream, StreamTypes.Audio, Accessor.AddAudio ); } // Remember for update CurrentAudio = audio; // Start streaming Device.SetConsumerState( VideoId, true ); Device.SetConsumerState( AudioId, true ); // Check for video text if (0 != CurrentSourceConfiguration.TextStream) { // Create the PES analyser TTXStream stream = new TTXStream( m_TTXConnector, (short) CurrentSourceConfiguration.TextStream, false ); // Create the filter TextId = Device.AddConsumer( CurrentSourceConfiguration.TextStream, StreamTypes.VideoText, stream.AddPayload ); // Start the filter Device.SetConsumerState( TextId, true ); } // Now restart data transmission Accessor.StartGraph( mpeg4, ac3 ); // Enable service parser if we are allowed to to so if (!Profile.DisableProgramGuide) if (!Profile.GetFilter( CurrentSelection.Source ).DisableProgramGuide) Device.AddProgramGuideConsumer( ReceiveEPG ); }
/// <summary> /// Create a new teletext stream and add it to this transport stream. /// </summary> /// <returns>The newly created teletext stream instance.</returns> public TTXStream AddTeleText() { // Flag bool isPCR; // Run short pid = AddStream( StreamTypes.TeleText, 255, false, true, null, out isPCR ); // Create TTXStream ttx = new TTXStream( this, pid, isPCR ); // Remember m_Streams.Add( ttx ); // Make it the guide if ((null != m_Splitter) && (0 == m_GuidePID)) m_GuidePID = pid; // Report return ttx; }