Beispiel #1
0
        private void updateTags()
        {
            MsvTags mp4 = new MsvTags(this.textBoxFileName.Text);

            if (!textBoxUSMTName.ReadOnly)
            {
                mp4.SetTagTitle(textBoxUSMTName.Text);
            }
            if (!textBoxUSMTEncoder.ReadOnly)
            {
                mp4.SetTagEncoder(textBoxUSMTEncoder.Text);
            }
            // finished with MP4, must dispose to free file handle
            mp4.Dispose();
            readTags();
        }
Beispiel #2
0
        private void readTags()
        {
            MsvTags mp4 = new MsvTags(this.textBoxFileName.Text);

            // get title
            try
            {
                textBoxUSMTName.Text     = mp4.GetTagTitle();
                textBoxUSMTName.ReadOnly = false;
            }
            catch (MsvTagNotFoundException caught)
            {
                textBoxUSMTName.Text     = "<" + caught.Message.ToUpper() + ">";
                textBoxUSMTName.ReadOnly = true;
            }
            catch (Exception caught) { textBoxUSMTName.Text = "<" + caught.Message.ToUpper() + ">"; }
            // get date
            try
            { textBoxUSMTDate.Text = mp4.GetTagDate(); }
            catch (MsvTagNotFoundException caught) { textBoxUSMTDate.Text = "<" + caught.Message.ToUpper() + ">"; }
            catch (Exception caught) { textBoxUSMTDate.Text = "<" + caught.Message.ToUpper() + ">"; }
            // get encoder
            try
            {
                textBoxUSMTEncoder.Text     = mp4.GetTagEncoder();
                textBoxUSMTEncoder.ReadOnly = false;
            }
            catch (MsvTagNotFoundException caught)
            {
                textBoxUSMTEncoder.Text     = "<" + caught.Message.ToUpper() + ">";
                textBoxUSMTEncoder.ReadOnly = true;
            }
            catch (Exception caught) { textBoxUSMTEncoder.Text = "<" + caught.Message.ToUpper() + ">"; }
            // get MSV data segment list
            try { textBoxSegmentsFound.Text = mp4.GetTagSegmentListString(); }
            catch (Exception caught) { textBoxSegmentsFound.Text = "<" + caught.Message.ToUpper() + ">"; }
            // finished with MP4, must dispose to free file handle
            // THIS IS REQUIRED, or you will be unable to later open your file until mp4 is disposed!!!
            mp4.Dispose();
        }