MP4MetadataBase.h 1.0 KB

12345678910111213141516171819202122232425262728293031
  1. #pragma once
  2. #include "metadata/ifc_metadata.h"
  3. #include "mp4.h"
  4. class MP4MetadataBase : public ifc_metadata
  5. {
  6. public:
  7. MP4MetadataBase();
  8. ~MP4MetadataBase();
  9. int Initialize(nx_uri_t filename, MP4FileHandle mp4_file);
  10. int WASABICALL Metadata_GetField(int field, unsigned int index, nx_string_t *value);
  11. int WASABICALL Metadata_GetInteger(int field, unsigned int index, int64_t *value);
  12. int WASABICALL Metadata_GetReal(int field, unsigned int index, double *value);
  13. int WASABICALL Metadata_GetArtwork(int field, unsigned int index, artwork_t *artwork, data_flags_t flags);
  14. int WASABICALL Metadata_GetBinary(int field, unsigned int index, nx_data_t *data) { return NErr_NotImplemented; }
  15. private:
  16. MP4FileHandle mp4_file;
  17. nx_uri_t mp4_metadata_filename;
  18. nx_file_stat_s file_stats;
  19. static struct mime_types_t
  20. {
  21. nx_string_t jpeg;
  22. nx_string_t png;
  23. nx_string_t bmp;
  24. nx_string_t gif;
  25. } mime_types;
  26. static int NX_ONCE_API InitMIME(nx_once_t, void *, void **);
  27. static nx_string_t GetMIMEFromType(uint32_t type);
  28. };