public OutputTarget(PluginManager.PluginManager manager, string filename)
        {
            m_Plugin = SearchForSupportedPlugin(manager, filename);
              if (m_Plugin == null)
            throw new NotSupportedException("Output target: " + filename + " is not supported by any of the loaded output plugins.");

              m_Filename = filename;
              m_Plugin.Open(m_Filename);
        }
        public InputSource(PluginManager.PluginManager manager, string filename)
        {
            m_Plugin = SearchForSupportedPlugin(manager, filename);
              if (m_Plugin == null)
            throw new NotSupportedException("Input source: " + filename + " is not supported by any of the loaded input plugins.");

              m_Filename = filename;
              FillTrackArray();
        }
 private IBaseOutputPlugin SearchForSupportedPlugin(PluginManager.PluginManager manager, string filename)
 {
     foreach (IBaseOutputPlugin plugin in manager.OutputPlugins)
       {
     if (plugin.IsSupported(filename))
     {
       return plugin;
     }
       }
       return null;
 }
Exemple #4
0
 public MuxEngine(PluginManager.PluginManager manager)
 {
     m_Manager = manager;
 }
 public void UnloadPluginManager()
 {
     if (pm != null)
       {
     try
     {
       pm.Unload();
       if (plugdom != null)
     AppDomain.Unload(plugdom);
     }
     finally
     {
       pm = null;
       plugdom = null;
     }
       }
 }
        private void Init()
        {
            UnloadPluginManager();

              plugdom = AppDomain.CreateDomain("Plugins");

              string assname = typeof(PluginManager).Assembly.FullName;
              string typename = typeof(PluginManager).FullName;
              try
              {
            pm = plugdom.CreateInstanceAndUnwrap(assname, typename,
              true, BindingFlags.Default, null, this.objs, null, null, null) as PluginManager;
              }
              catch (TargetInvocationException ex)
              {
            //fsw.EnableRaisingEvents = false;
            Console.WriteLine(ex.Message);
            UnloadPluginManager();
              }
        }