protected AudioTrackSizeTab AddAudio() { AudioTrackSizeTab a = new AudioTrackSizeTab(VideoDuration); a.ValueChanged += (o, s) => Calculate(); audioExtraFlow.Controls.Add(a); return a; }
protected AudioTrackSizeTab AddAudio() { AudioTrackSizeTab a = new AudioTrackSizeTab(VideoDuration); a.ValueChanged += (o, s) => Calculate(); audioExtraFlow.Controls.Add(a); return(a); }
/// <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); } } } }
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); } } } }