protected override void ExtractTag(MetadataExtractor.Tag tag)
        {
            try
            {
                if (quickTimeMovieHeaderDir != null && tag.DirectoryName.Equals(quickTimeMovieHeaderDir.Name))
                {
                    if (tag.Type.Equals(QuickTimeMovieHeaderDirectory.TagDuration))
                    {
                        MediaInformation.Duration = tag.Description;
                    }
                }

                if (quickTimeTrackHeaderDir != null && tag.DirectoryName.Equals(quickTimeTrackHeaderDir.Name))
                {
                    if (tag.Type.Equals(QuickTimeTrackHeaderDirectory.TagCreated))
                    {
                        MediaInformation.CreatedDate = tag.Description;
                    }
                    //                    MediaInformation.CreatedDate = Utility.ParseDate(tag.Description, "ddd MMM dd HH:mm:ss yyyy");


                    if (tag.Type.Equals(QuickTimeTrackHeaderDirectory.TagHeight))
                    {
                        if (int.TryParse(tag.Description, out int H) && H > 0)
                        {
                            MediaInformation.Height = tag.Description;
                        }
                    }

                    if (tag.Type.Equals(QuickTimeTrackHeaderDirectory.TagWidth))
                    {
                        if (int.TryParse(tag.Description, out int W) && W > 0)
                        {
                            MediaInformation.Width = tag.Description;
                        }
                    }
                }

                if (quickTimeMetadataHeaderDir != null && tag.DirectoryName.Equals(quickTimeMetadataHeaderDir.Name))
                {
                    if (tag.Type.Equals(QuickTimeMetadataHeaderDirectory.TagCopyright))
                    {
                        MediaInformation.CopyRight = tag.Description;
                    }
                }
            }
            catch (Exception ex)
            {
            }
        }
示例#2
0
 //for sub class to extract additional tags
 protected abstract void ExtractTag(MetadataExtractor.Tag tag);