Beispiel #1
0
        public IJobProcessor GetMuxer(MuxerType type, MeGUISettings settings)
        {
            IMuxing muxer = GetMuxer(type);

            if (muxer == null)
            {
                return(null);
            }
            return(muxer.GetMuxer(settings));
        }
Beispiel #2
0
        public baseMuxWindow(MainForm mainForm, IMuxing muxer) : this()
        {
            this.mainForm = mainForm;
            this.settings = mainForm.Settings;
            this.muxer    = muxer;

            muxProvider = mainForm.MuxProvider;
            cbType.Items.Add("Standard");
            cbType.Items.AddRange(muxProvider.GetSupportedDevices((ContainerType)cbContainer.SelectedItem).ToArray());
            cbType.SelectedIndex = 0;
        }
Beispiel #3
0
 public IJobProcessor GetEncoder(TEncoderType codec, TType outputType, MeGUISettings settings)
 {
     if (supportedEncoderTypes.Contains(codec))
     {
         foreach (TType vto in GetSupportedOutputTypes(codec))
         {
             if (vto.GetType() == outputType.GetType())
             {
                 return(CreateEncoder(settings));
             }
         }
     }
     return(null);
 }
Beispiel #4
0
        /// <summary>
        /// gets an encoder for the given codec and output type
        /// </summary>
        /// <param name="videoCodec">the desired video codec</param>
        /// <param name="outputType">the desired output type</param>
        /// <returns>the encoder found or null if no encoder was found</returns>
        public IJobProcessor GetEncoder(MeGUISettings settings, TEncoderType codec, TType outputType)
        {
            IJobProcessor encoder = null;

            foreach (IEncoding <TCodec, TType, TEncoderType> encodingInterface in this.registeredEncoders)
            {
                if (!encodingInterface.GetSupportedEncoderTypes().Contains(codec))
                {
                    continue;
                }
                if (!encodingInterface.GetSupportedOutputTypes(codec).Contains(outputType))
                {
                    continue;
                }
                encoder = encodingInterface.GetEncoder(codec, outputType, settings);
            }
            return(encoder);
        }
Beispiel #5
0
 public override IJobProcessor GetMuxer(MeGUISettings settings)
 {
     return(new MkvMergeMuxer(settings.MkvmergePath));
 }
Beispiel #6
0
 public override IJobProcessor CreateEncoder(MeGUISettings settings)
 {
     return(new mencoderEncoder(settings.MencoderPath));
 }
Beispiel #7
0
 public override IJobProcessor GetMuxer(MeGUISettings settings)
 {
     return(new MP4BoxMuxer(settings.Mp4boxPath));
 }
Beispiel #8
0
 public override IJobProcessor CreateEncoder(MeGUISettings settings)
 {
     return(new XviDEncoder(settings.XviDEncrawPath));
 }
Beispiel #9
0
 public override IJobProcessor CreateEncoder(MeGUISettings settings)
 {
     return(new x264Encoder(settings.X264Path));
 }
Beispiel #10
0
 private void mnuToolsSettings_Click(object sender, System.EventArgs e)
 {
     using (SettingsForm sform = new SettingsForm())
     {
         sform.Settings = this.settings;
         if (sform.ShowDialog() == DialogResult.OK)
         {
             this.settings = sform.Settings;
             this.saveSettings();
             Jobs.showAfterEncodingStatus(settings);
         }
     }
 }
Beispiel #11
0
 internal AviSynthAudioEncoder(MeGUISettings settings)
 {
     _settings = settings;
 }
Beispiel #12
0
 public abstract IJobProcessor GetMuxer(MeGUISettings meguiSettings);
Beispiel #13
0
 public AudioEncoder(MeGUISettings settings)
 {
     this.settings = settings;
 }
Beispiel #14
0
        public baseMuxWindow(MainForm mainForm)
            : this()
        {
            this.mainForm = mainForm;
            this.settings = mainForm.Settings;

            muxProvider = mainForm.MuxProvider;
            cbType.Items.Add("Standard");
            cbType.Items.AddRange(muxProvider.GetSupportedDevices().ToArray());
            cbType.SelectedIndex = 0;
        }
Beispiel #15
0
 public override Muxer GetMuxer(MeGUISettings settings)
 {
     throw new Exception("AVI-Mux GUI muxer not supported yet");
     //return new AVIMuxGUIMuxer(settings.AviMuxGUIPath);
 }
Beispiel #16
0
 internal AviSynthAudioEncoder(MeGUISettings settings)
 {
     SAMPLES_PER_UPDATE = (int)settings.AudioSamplesPerUpdate;
     _settings          = settings;
 }
Beispiel #17
0
 /// <summary>
 /// loads the global settings
 /// </summary>
 public void loadSettings()
 {
     string fileName = Path.Combine(path, "settings.xml");
     if (File.Exists(fileName))
     {
         XmlSerializer ser = null;
         using (Stream s = File.OpenRead(fileName))
         {
             ser = new XmlSerializer(typeof(MeGUISettings));
             try
             {
                 this.settings = (MeGUISettings)ser.Deserialize(s);
             }
             catch (Exception e)
             {
                 MessageBox.Show("Settings could not be loaded.", "Error loading profile", MessageBoxButtons.OK, MessageBoxIcon.Error);
                 Console.Write(e.Message);
             }
         }
     }
 }
Beispiel #18
0
 /// <summary>
 /// default constructor
 /// initializes all the GUI components, initializes the internal objects and makes a default selection for all the GUI dropdowns
 /// In addition, all the jobs and profiles are being loaded from the harddisk
 /// </summary>
 public void constructMeGUIInfo()
 {
     muxProvider = new MuxProvider(this);
     this.codecs = new CodecManager();
     this.path = System.Windows.Forms.Application.StartupPath;
     this.jobUtil = new JobUtil(this);
     this.settings = new MeGUISettings();
     addPackages();
     this.profileManager = new ProfileManager(this.path);
     this.profileManager.LoadProfiles();
     this.mediaFileFactory = new MediaFileFactory(this);
     this.loadSettings();
     this.dialogManager = new DialogManager(this);
 }
Beispiel #19
0
 public override IJobProcessor GetMuxer(MeGUISettings settings)
 {
     return(new Avc2AviMuxer(settings.Avc2aviPath));
 }
Beispiel #20
0
 public virtual string EncoderPath(MeGUISettings settings)
 {
     return(settings.MencoderPath);
 }
Beispiel #21
0
 public override Muxer GetMuxer(MeGUISettings meguiSettings)
 {
     return(new DivXMuxer(meguiSettings.DivXMuxPath));
 }
Beispiel #22
0
 public baseMuxWindow(MainForm mainForm)
     : this()
 {
     this.mainForm = mainForm;
     this.settings = mainForm.Settings;
 }
Beispiel #23
0
 public abstract IJobProcessor CreateEncoder(MeGUISettings settings);
Beispiel #24
0
 public abstract Muxer GetMuxer(MeGUISettings meguiSettings);
Beispiel #25
0
 public override string EncoderPath(MeGUISettings settings)
 {
     return(settings.X264farmControllerPath);
 }
Beispiel #26
0
 public override IJobProcessor CreateEncoder(MeGUISettings settings)
 {
     return(new AviSynthAudioEncoder(settings));
 }
Beispiel #27
0
 public override string EncoderPath(MeGUISettings settings)
 {
     return(settings.XviDEncrawPath);
 }
Beispiel #28
0
 public VideoEncoder(MeGUISettings settings)
 {
     this.settings = settings;
 }