/// <summary> /// Erzeugt eine neue Einspieleinheit. /// </summary> /// <param name="filter">Der zugehörige Filter.</param> /// <param name="name">Der Name dieser Einheit.</param> /// <param name="type">Die Beschreibung des Datenstromformates.</param> public ESInjector(TSFilter filter, string name, MediaType type) : base(1000, 8 * 1024) { // Remember m_MajorType = type.MajorType; m_MinorType = type.SubType; m_Filter = filter; // Create the pin m_Pin = new LivePin(filter, name, type); // Connect sink to injector base SetSink(m_Pin.Receive); // Create stream CreateConsumer(); }
/// <summary> /// Initialisiert die Filterstruktur. /// </summary> public void CreateGraph() { // Cleanup DestroyGraph(); // Check log var logFile = BDASettings.BDALogPath; if (logFile != null) m_LogFile = new FileStream( logFile.FullName, FileMode.Create, FileAccess.Write, FileShare.Read ); // Create new graph builder m_Graph = (IGraphBuilder) Activator.CreateInstance( Type.GetTypeFromCLSID( BDAEnvironment.GraphBuilderClassIdentifier ) ); // Enable logging if (m_LogFile != null) m_Graph.SetLogFile( m_LogFile.SafeFileHandle ); // See if we should register the graph m_Register = BDASettings.RegisterBDAGRaph( DirectShowObject, false ); // Create filter InjectorFilter = new TSFilter( this ); try { // Check for statistics InjectorFilter.EnableStatistics = BDASettings.GenerateTSStatistics; // Register in graph AddFilter( Filter_Injector, InjectorFilter ); } catch { // Cleanup InjectorFilter.Dispose(); // Forward throw; } }
/// <summary> /// Erzeugt eine neue Einspieleinheit. /// </summary> /// <param name="filter">Der zugehörige Filter.</param> /// <param name="name">Der Name dieser Einheit.</param> /// <param name="type">Die Beschreibung des Datenstromformates.</param> public ESInjector( TSFilter filter, string name, MediaType type ) : base( 1000, 8 * 1024 ) { // Remember m_MajorType = type.MajorType; m_MinorType = type.SubType; m_Filter = filter; // Create the pin m_Pin = new LivePin( filter, name, type ); // Connect sink to injector base SetSink( m_Pin.Receive ); // Create stream CreateConsumer(); }