2018-03-15 19:21:40 +00:00
|
|
|
#ifndef METADATA_H
|
|
|
|
#define METADATA_H
|
|
|
|
|
|
|
|
#include "units.h"
|
|
|
|
|
|
|
|
struct metadata {
|
|
|
|
timestamp_t timestamp;
|
2018-07-10 18:03:26 +00:00
|
|
|
duration_t duration;
|
2018-03-15 19:21:40 +00:00
|
|
|
degrees_t latitude;
|
|
|
|
degrees_t longitude;
|
|
|
|
};
|
|
|
|
|
|
|
|
enum mediatype_t {
|
2018-05-15 18:47:35 +00:00
|
|
|
MEDIATYPE_UNKNOWN, // Couldn't (yet) identify file
|
|
|
|
MEDIATYPE_IO_ERROR, // Couldn't read file
|
2018-03-15 19:21:40 +00:00
|
|
|
MEDIATYPE_PICTURE,
|
|
|
|
MEDIATYPE_VIDEO,
|
2018-05-15 18:47:35 +00:00
|
|
|
MEDIATYPE_STILL_LOADING, // Still processing in the background
|
2018-03-15 19:21:40 +00:00
|
|
|
};
|
|
|
|
|
|
|
|
#ifdef __cplusplus
|
|
|
|
extern "C" {
|
|
|
|
#endif
|
|
|
|
|
|
|
|
enum mediatype_t get_metadata(const char *filename, struct metadata *data);
|
|
|
|
timestamp_t picture_get_timestamp(const char *filename);
|
|
|
|
|
|
|
|
#ifdef __cplusplus
|
|
|
|
}
|
|
|
|
#endif
|
|
|
|
|
|
|
|
#endif // METADATA_H
|