/// <summary> /// Re-calc swf binary data. /// </summary> public void UpdateData() { IEnumerator tags = tagList.GetEnumerator(); while (tags.MoveNext()) { BaseTag tag = (BaseTag)tags.Current; tag.Resolve(this); tag.UpdateData(header.Version); } }
/// <summary> /// Injects a range of tags in the current Swf. /// </summary> /// <param name="values">The values.</param> public void InjectTags(BaseTagCollection values) { IEnumerator enums = values.GetEnumerator(); for (int i = 0; enums.MoveNext(); i++) { BaseTag baseTag = (BaseTag)enums.Current; Add(baseTag); } }
/// <summary> /// Read and parse VideoFrameTag, into inner tags and raw byte-array header data /// </summary> private static VideoFrameTag ReadVideoFrameTag(BufferedBinaryReader binaryReader, BaseTagCollection tagList) { VideoFrameTag video = new VideoFrameTag(); ushort streamId = binaryReader.PeekUInt16(); IEnumerator tags = tagList.GetEnumerator(); while (tags.MoveNext()) { BaseTag tag = (BaseTag)tags.Current; if (tag is DefineVideoStreamTag) { if (((DefineVideoStreamTag)tag).CharacterId == streamId) { video.CodecId = ((DefineVideoStreamTag)tag).CodecId; } } } return(video); }