/// <summary>
 /// Instantiates vlc library using specific parameters and logger class name. Also allows you to
 /// customize logging thread spawning.
 /// </summary>
 /// <param name="parameters">Parameters for vlc core.</param>
 /// <param name="loggerClassName">Name of logger to use for vlc logs.</param>
 /// <param name="spawnLoggingThread">User should pass <code>false</code> here if he doesn't want to
 /// spawn logging thread which will integrate vlc logging into Common.Logging.</param>
 public VlcMediaLibraryFactory(string[] parameters, string loggerClassName, bool spawnLoggingThread)
 {
     if (parameters == null)
     {
         throw new ArgumentNullException("parameters");
     }
     if (loggerClassName == null)
     {
         throw new ArgumentNullException("loggerClassName");
     }
     if (loggerClassName.Length == 0)
     {
         throw new ArgumentException("String is empty.", "loggerClassName");
     }
     //
     Deployment.VlcDeployment.RunOSDependentTasks();
     //
     try {
         descriptor      = createInstance(parameters);
         internalFactory = new InternalObjectsFactory(descriptor);
         //
         logger = LogManager.GetLogger(loggerClassName);
         vlcLog = internalFactory.CreateVlcLog(logger, this);
         if (spawnLoggingThread)
         {
             initializeAndStartLoggingThread();
         }
     } catch (DllNotFoundException exc) {
         throw new VlcDeploymentException("Vlc library is not deployed. Use VlcDeployment class to deploy vlc libraries.", exc);
     }
 }
示例#2
0
 /// <summary>
 /// Instantiates vlc library using specific parameters and logger class name.
 /// </summary>
 /// <param name="parameters">Parameters for vlc core.</param>
 /// <param name="loggerClassName">Name of logger to use for vlc logs.</param>
 public VlcMediaLibraryFactory(string[] parameters, string loggerClassName)
 {
     if (parameters == null)
     {
         throw new ArgumentNullException("parameters");
     }
     if (loggerClassName == null)
     {
         throw new ArgumentNullException("loggerClassName");
     }
     if (loggerClassName.Length == 0)
     {
         throw new ArgumentException("String is empty.", "loggerClassName");
     }
     try {
         descriptor = createInstance(addFilterRequestToParameters(parameters));
         //
         logger = LogManager.GetLogger(loggerClassName);
         vlcLog = new InternalObjectsFactory(descriptor).CreateVlcLog(logger, this);
         initializeAndStartLoggingThread();
     } catch (DllNotFoundException exc) {
         throw new VlcDeploymentException("Vlc library is not deployed. Use VlcDeployment class to deploy vlc libraries.", exc);
     }
 }