public void AddTag(Tag tag) { var videoTag = tag as VideoTag; if (videoTag != null && !_hasFirstPFrame) { if (videoTag.FrameType != FrameType.KeyFrame) return; _hasFirstPFrame = true; } tag.Write(_stream); _stream.Write(Utils.Dc.GetBytes(tag.TotalSize), 0, 4); }
public void Decode(byte[] bytes) { Bytes = bytes; FlvTag = new AudioTag(); FlvTag.ReadContents(bytes); }