Esempio n. 1
0
        /// <summary>
        /// Create a new audio stream and add it to this transport stream.
        /// </summary>
        /// <param name="name">The ISO name of the language for this audio stream.</param>
        /// <returns>The newly created audio stream instance.</returns>
        public AudioStream AddAudio( string name )
        {
            // Flag
            bool isPCR;

            // Run
            short pid = AddStream( StreamTypes.Audio, 255, false, false, null, out isPCR );

            // Set the name of the language
            if (!string.IsNullOrEmpty( name )) ProgramMap.SetAudioLanguage( pid, name );

            // Create
            AudioStream audio = new AudioStream( this, pid, isPCR );

            // Remember
            m_Streams.Add( audio );

            // Make it the guide
            if ((null != m_Splitter) && (0 == m_GuidePID)) m_GuidePID = pid;

            // Report
            return audio;
        }
Esempio n. 2
0
		/// <summary>
		/// Erzeugt eine neue Instanz und bindet sie an einen <i>Transport
		/// Stream</i>.
		/// </summary>
		/// <param name="tsFile">Der <i>Transport Stream</i>, zu dem noch keine
		/// <param name="audioName">Der ISO Name der Sprache.</param>
		/// Datenströme hinzugefügt wurden.</param>
		public PVASplitter(Manager tsFile, string audioName)
		{
			// Remember
			TransportStream = tsFile;

			// Open streams
			m_Video = TransportStream.AddVideo(255);
			m_Audio = TransportStream.AddAudio(audioName);

			// Register self for PTS guidance
			TransportStream.PVASplitter = this;

			// Create reader
			m_Worker = new Thread(new ThreadStart(Worker));

			// Configure
			m_Worker.SetApartmentState(ApartmentState.MTA);

			// Run it
			m_Worker.Start();
		}