Пример #1
0
 protected AudioTrackSizeTab AddAudio()
 {
     AudioTrackSizeTab a = new AudioTrackSizeTab(VideoDuration);
     a.ValueChanged += (o, s) => Calculate();
     audioExtraFlow.Controls.Add(a);
     return a;
 }
Пример #2
0
        protected AudioTrackSizeTab AddAudio()
        {
            AudioTrackSizeTab a = new AudioTrackSizeTab(VideoDuration);

            a.ValueChanged += (o, s) => Calculate();
            audioExtraFlow.Controls.Add(a);
            return(a);
        }
Пример #3
0
 /// <summary>
 /// Gets the audio streams by finding them in the form
 /// </summary>
 /// <returns></returns>
 protected IEnumerable <AudioTrack> GetAudio()
 {
     foreach (Control c in audioExtraFlow.Controls)
     {
         if (c is AudioTrackSizeTab)
         {
             AudioTrackSizeTab a = (AudioTrackSizeTab)c;
             if (a.AudioTrack != null)
             {
                 yield return(a.AudioTrack);
             }
         }
     }
 }
Пример #4
0
 private void UpdateAudioExtraDurations(TimeSpan duration)
 {
     foreach (Control c in audioExtraFlow.Controls)
     {
         if (c is AudioTrackSizeTab)
         {
             AudioTrackSizeTab a = (AudioTrackSizeTab)c;
             if (a.AudioTrack != null)
             {
                 a.AudioTrack = new AudioTrack(duration)
                 {
                     RawBytes     = a.AudioTrack.RawBytes,
                     SamplingRate = a.AudioTrack.SamplingRate,
                     AudioCodec   = a.AudioTrack.AudioCodec
                 };
             }
             else
             {
                 a.AudioTrack = new AudioTrack(duration);
             }
         }
         else if (c is ExtraSizeTab)
         {
             ExtraSizeTab a = (ExtraSizeTab)c;
             if (a.ExtraTrack != null)
             {
                 a.ExtraTrack = new ExtraTrack(duration)
                 {
                     RawBytes = a.ExtraTrack.RawBytes
                 };
             }
             else
             {
                 a.ExtraTrack = new ExtraTrack(duration);
             }
         }
     }
 }