Exemple #1
0
        private void SetParam(MetadataEditorAttr attr, string value)
        {
            if (_isFileReadOnly)
            {
                throw new InvalidOperationException("The media file is read-only.");
            }

            Interop.MetadataEditor.SetMetadata(Handle, attr, value).ThrowIfError("Failed to set value");
        }
Exemple #2
0
        private string GetParam(MetadataEditorAttr attr)
        {
            IntPtr val = IntPtr.Zero;

            try
            {
                Interop.MetadataEditor.GetMetadata(Handle, attr, out val)
                .ThrowIfError("Failed to get metadata");

                return(Marshal.PtrToStringAnsi(val));
            }
            finally
            {
                Interop.Libc.Free(val);
            }
        }
Exemple #3
0
 internal static extern MetadataEditorError SetMetadata(IntPtr handle, MetadataEditorAttr attribute, string value);
Exemple #4
0
 internal static extern MetadataEditorError GetMetadata(IntPtr handle, MetadataEditorAttr attribute, out IntPtr value);