예제 #1
0
        /// <summary>
        /// DEPRECATA! NON FUNZIONANTE
        /// </summary>
        /// <param name="nodo"></param>
        /// <param name="mfsp"></param>
        /// <param name="EndFormat"></param>
        /// <returns></returns>
        private long CalcoloSpazio(FileSystemNodePlus<MyAddittionalData> nodo, MyFileSystemPlus mfsp, FFMpegMediaMetadata EndFormat)
        {
            if (EndFormat is FFMpegMediaMetadataMp3 )
            {
                long t = 0;
                foreach (FileSystemNodePlus<MyAddittionalData> n in nodo.GetAllNode())
                {
                    while (Pause)
                        Thread.Sleep(100);

                    if (n.Type == FileSystemNodePlusType.Directory)
                        t += CalcoloSpazio(n, mfsp, EndFormat);
                    else if (n.Type == FileSystemNodePlusType.File)
                    {
                        String p = mfsp.GetFullPath(n);
                        if (SystemService.FileExist(p))
                        {
                            textBox_source.SetTextInvoke(p);
                            if(FFmpeg.GetMetadata(p).MediaMetadata!=null)
                            {
                                String temp = FFmpeg.GetMetadata(p).MediaMetadata.Duration;
                                string[] st = temp.Split(':');
                                long tt = 0;
                                if (st.Length == 3)
                                {
                                    try
                                    {
                                        tt = st[0].ParseInt() * 144000; //trovo i secondi e moltiplico x 320/8 -> 3600*40
                                        tt += st[1].ParseInt() * 2400; //trovo i secondi e moltiplico x 320/8 -> 60*40
                                        tt += st[2].Split('.')[0].ParseInt() * 40; //trovo i secondi e moltiplico x 320/8 -> 60*40
                                    }
                                    catch (Exception e) { }
                                    t += tt;
                                }
                            }
                        }
                        progressBar_total.SetValueInvoke(progressBar_total.Value + 1);
                    }
                }
                return t;
            }
            return 0;
        }
예제 #2
0
 public ConversionParameter(ConversinType TipoConversione, FFMpegMediaMetadata ConvertiIn, bool OverrideIfExist = true)
 {
     this.OverrideIfExist = OverrideIfExist;
     this.TipoConversione = TipoConversione;
     this.ConvertiIn = ConvertiIn;
 }
예제 #3
0
 public FFMpegMediaMetadataFlac(FFMpegMediaMetadata data)
     : base(data)
 {
     if (data is FFMpegMediaMetadataFlac)
     {
         Bit = (data as FFMpegMediaMetadataFlac).Bit;
         SamplingRate = (data as FFMpegMediaMetadataFlac).SamplingRate;
     }
 }
예제 #4
0
 public FFMpegMediaMetadataMp3(FFMpegMediaMetadata data)
     : base(data)
 {
     if (data is FFMpegMediaMetadataMp3)
     {
         BitRateMp3 = (data as FFMpegMediaMetadataMp3).BitRateMp3;
         SamplingRate = (data as FFMpegMediaMetadataMp3).SamplingRate;
     }
 }
예제 #5
0
 object ICloneablePlus.Clone()
 {
     FFMpegMediaMetadata t = new FFMpegMediaMetadata(this);
     return t;
 }
예제 #6
0
 public FFMpegMediaMetadata(FFMpegMediaMetadata Clone)
 {
     Duration = Clone.Duration;
     start = Clone.start;
     bitrate = Clone.bitrate;
 }
예제 #7
0
 public ConvertionEntity(String Path, FFMpegMediaMetadata MediaMetadata)
 {
     this.Path = Path;
     this.MediaMetadata = MediaMetadata;
 }
예제 #8
0
 public FFmpegMetadata()
 {
     MediaMetadata = new FFMpegMediaMetadata();
 }
예제 #9
0
 public FFMpegMediaMetadataWav(FFMpegMediaMetadata data)
     : base(data)
 {
     if(data is FFMpegMediaMetadataWav)
     {
         SamplingRate = (data as FFMpegMediaMetadataWav).SamplingRate;
     }
 }