Example #1
0
 public CacheManager(GenericMediaStream cachedStream)
 {
     stream = cachedStream;
     if (!stream.IsForReading)
     {
         return;
     }
     stream.Stream.Position = 0L;
     //stream.Read(); // first read (cache all header data in the file)
     stream.LazyRead(GenericMediaStream.MAX_BOXES_TO_READ);
     foreach (GenericMediaTrack track in stream.MediaTracks)
     {
         track.CacheMgr = GenericCacheManager.CreateCacheManager(); // the cache manager maybe format-specific
         track.CacheMgr.Initialize(track);
     }
 }
Example #2
0
 /// <summary>
 /// Constructor to use when reading from a stream.
 /// </summary>
 /// <param name="TrackFormat"></param>
 public GenericAudioTrack(GenericTrackFormat trackFormat, GenericMediaStream stream) : base(trackFormat)
 {
     base.ParentStream = stream;
 }
Example #3
0
 public CacheManager(GenericMediaStream cachedStream)
 {
     stream = cachedStream;
       if (!stream.IsForReading)
     return;
       stream.Stream.Position = 0L;
       //stream.Read(); // first read (cache all header data in the file)
       stream.LazyRead(GenericMediaStream.MAX_BOXES_TO_READ);
       foreach (GenericMediaTrack track in stream.MediaTracks)
       {
     track.CacheMgr = GenericCacheManager.CreateCacheManager(); // the cache manager maybe format-specific
     track.CacheMgr.Initialize(track);
       }
 }
Example #4
0
 /// <summary>
 /// Constructor to use when reading from a stream.
 /// </summary>
 /// <param name="TrackFormat"></param>
 public GenericAudioTrack(GenericTrackFormat trackFormat, GenericMediaStream stream)
     : base(trackFormat)
 {
     base.ParentStream = stream;
 }