aboutsummaryrefslogtreecommitdiff
path: root/Src/replicant/mp4/MP4MetadataBase.h
diff options
context:
space:
mode:
authorJean-Francois Mauguit <jfmauguit@mac.com>2024-09-24 09:03:25 -0400
committerGitHub <noreply@github.com>2024-09-24 09:03:25 -0400
commitbab614c421ed7ae329d26bf028c4a3b1d2450f5a (patch)
tree12f17f78986871dd2cfb0a56e5e93b545c1ae0d0 /Src/replicant/mp4/MP4MetadataBase.h
parent4bde6044fddf053f31795b9eaccdd2a5a527d21f (diff)
parent20d28e80a5c861a9d5f449ea911ab75b4f37ad0d (diff)
downloadwinamp-bab614c421ed7ae329d26bf028c4a3b1d2450f5a.tar.gz
Merge pull request #5 from WinampDesktop/community
Merge to main
Diffstat (limited to 'Src/replicant/mp4/MP4MetadataBase.h')
-rw-r--r--Src/replicant/mp4/MP4MetadataBase.h31
1 files changed, 31 insertions, 0 deletions
diff --git a/Src/replicant/mp4/MP4MetadataBase.h b/Src/replicant/mp4/MP4MetadataBase.h
new file mode 100644
index 00000000..ba90692c
--- /dev/null
+++ b/Src/replicant/mp4/MP4MetadataBase.h
@@ -0,0 +1,31 @@
+#pragma once
+
+#include "metadata/ifc_metadata.h"
+#include "mp4.h"
+
+class MP4MetadataBase : public ifc_metadata
+{
+public:
+ MP4MetadataBase();
+ ~MP4MetadataBase();
+ int Initialize(nx_uri_t filename, MP4FileHandle mp4_file);
+
+ int WASABICALL Metadata_GetField(int field, unsigned int index, nx_string_t *value);
+ int WASABICALL Metadata_GetInteger(int field, unsigned int index, int64_t *value);
+ int WASABICALL Metadata_GetReal(int field, unsigned int index, double *value);
+ int WASABICALL Metadata_GetArtwork(int field, unsigned int index, artwork_t *artwork, data_flags_t flags);
+ int WASABICALL Metadata_GetBinary(int field, unsigned int index, nx_data_t *data) { return NErr_NotImplemented; }
+private:
+ MP4FileHandle mp4_file;
+ nx_uri_t mp4_metadata_filename;
+ nx_file_stat_s file_stats;
+ static struct mime_types_t
+ {
+ nx_string_t jpeg;
+ nx_string_t png;
+ nx_string_t bmp;
+ nx_string_t gif;
+ } mime_types;
+ static int NX_ONCE_API InitMIME(nx_once_t, void *, void **);
+ static nx_string_t GetMIMEFromType(uint32_t type);
+}; \ No newline at end of file