/// <summary> /// Reads a video packet, assigning the video header and /// advancing the position to the next packet position. /// </summary> /// <param name="position"> /// A <see cref="long" /> value reference specifying the /// position at which to start reading the packet. This value /// is updated to the position of the next packet. /// </param> void ReadVideoPacket(ref long position) { Seek(position + 4); int length = ReadBlock(2).ToUShort(); long offset = position + 6; while (!video_found && offset < position + length) { if (FindMarker(ref offset) == Marker.VideoSyncPacket) { video_header = new VideoHeader(this, offset + 4); video_found = true; } } position += length; }
/// <summary> /// Reads a video packet, assigning the video header and /// advancing the position to the next packet position. /// </summary> /// <param name="position"> /// A <see cref="long" /> value reference specifying the /// position at which to start reading the packet. This value /// is updated to the position of the next packet. /// </param> void ReadVideoPacket (ref long position) { Seek (position + 4); int length = ReadBlock (2).ToUShort (); long offset = position + 6; while (!video_found && offset < position + length) if (FindMarker (ref offset) == Marker.VideoSyncPacket) { video_header = new VideoHeader (this, offset + 4); video_found = true; } position += length; }