コード例 #1
0
ファイル: RawTrackInfo.cs プロジェクト: ctapang/GPUCyclops
 public RawTrackInfo(GenericAudioTrack audio, GenericVideoTrack video)
 {
     AudioTrackInfo = new RawAudioTrackInfo(audio);
       VideoTrackInfo = new RawVideoTrackInfo(video);
 }
コード例 #2
0
ファイル: QBoxStream.cs プロジェクト: ctapang/GPUCyclops
 /// <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");
     }
       }
 }