public void AddSubCategory(SubCategory subcat, TagsStore tags) { if (subcat.Options.Count == 0) { return; } StringTaggerWidget tagger = new StringTaggerWidget(subcat, tags); table1.Attach(tagger, 0, 1, table1.NRows - 1, table1.NRows); table1.NRows++; tagger.Show(); }
public static void GetVideoAndAudioTags(TagsStore tagsStore, byte[] data) { MemoryStream stream = null; try { stream = new MemoryStream(data); using (HDSBinaryReader br = new HDSBinaryReader(stream)) { stream = null; FLVTag tag = Parse(br); while (tag != null) { // only audio or video and skipping small sized packet if (tag.DataSize > 2 && (tag.Type == TagType.AUDIO || tag.Type == TagType.AKAMAI_ENC_AUDIO || tag.Type == TagType.VIDEO || tag.Type == TagType.AKAMAI_ENC_VIDEO)) { if (!tagsStore.hasAudio && tag is FLVTagAudio audioTag) { tagsStore.hasAudio = true; tagsStore.AudioFormat = audioTag.SoundFormat; tagsStore.AudioRate = audioTag.SoundRate; tagsStore.AudioChannels = audioTag.SoundChannels; } if (!tagsStore.hasVideo && tag is FLVTagVideo videoTag) { tagsStore.hasVideo = true; tagsStore.VideoCodec = videoTag.CodecID; } tagsStore.Enqueue(tag); if (tag.Timestamp > tagsStore.lastTS) { tagsStore.lastTS = tag.Timestamp; } if (!tagsStore.isAkamaiEncrypted && tag.IsAkamaiEncrypted) { tagsStore.isAkamaiEncrypted = true; } } tag = Parse(br); } } } finally { if (stream != null) { stream.Dispose(); } } }
public void AddTagSubcategory(SubCategory subcat, TagsStore tags) { /* the notebook starts invisible */ taggerwidget1.AddSubCategory(subcat, tags); subcategoryAdded = true; }