Beispiel #1
0
 public RawTrackInfo(GenericAudioTrack audio, GenericVideoTrack video)
 {
     AudioTrackInfo = new RawAudioTrackInfo(audio);
       VideoTrackInfo = new RawVideoTrackInfo(video);
 }
Beispiel #2
0
 /// <summary>
 /// CreateTracksForWriting
 /// Method for creating tracks given a list of RawBaseTrackInfo.
 /// </summary>
 /// <param name="tracksInfo">list of RawBaseTrackInfo</param>
 private void CreateTracksForWriting(List<IsochronousTrackInfo> tracksInfo)
 {
     // We can't just use the input tracksInfo and assign it to our _MediaTracks (that would not work because the types won't match).
       // The input or source media tracks will normally have different types than our _MediaTracks (although they are derived from the same GenericMediaTrack).
       foreach (IsochronousTrackInfo rawTrack in tracksInfo) {
     QBoxTrackFormat trackFormat = new QBoxTrackFormat(rawTrack);
     trackFormat.WriteFirstQBox(_binaryWriter);
     switch (rawTrack.HandlerType) {
       case "Audio":
     GenericAudioTrack audioTrack = new GenericAudioTrack(trackFormat, this);
     base.AddTrack(audioTrack);
     break;
       case "Video":
     GenericVideoTrack videoTrack = new GenericVideoTrack(trackFormat, this);
     base.AddTrack(videoTrack);
     break;
       default:
     throw new Exception("Unknown source handler type");
     }
       }
 }