1/* Metadata extraction 2 * 3 * Project : minidlna 4 * Website : http://sourceforge.net/projects/minidlna/ 5 * Author : Justin Maggard 6 * Copyright (c) 2008-2009 Justin Maggard 7 * This software is subject to the conditions detailed in the 8 * LICENCE file provided in this distribution. 9 * */ 10#ifndef __METADATA_H__ 11#define __METADATA_H__ 12 13typedef struct metadata_s { 14 char *title; 15 char *artist; 16 char *creator; 17 char *album; 18 char *genre; 19 char *comment; 20 char *channels; 21 char *bitrate; 22 char *frequency; 23 char *bps; 24 char *resolution; 25 char *duration; 26 char *date; 27 char *mime; 28 char *dlna_pn; 29} metadata_t; 30 31typedef struct tsinfo_s { 32 int x; 33 int packet_size; 34} tsinfo_t; 35 36typedef enum { 37 AAC_INVALID = 0, 38 AAC_MAIN = 1, /* AAC Main */ 39 AAC_LC = 2, /* AAC Low complexity */ 40 AAC_SSR = 3, /* AAC SSR */ 41 AAC_LTP = 4, /* AAC Long term prediction */ 42 AAC_HE = 5, /* AAC High efficiency (SBR) */ 43 AAC_SCALE = 6, /* Scalable */ 44 AAC_TWINVQ = 7, /* TwinVQ */ 45 AAC_CELP = 8, /* CELP */ 46 AAC_HVXC = 9, /* HVXC */ 47 AAC_TTSI = 12, /* TTSI */ 48 AAC_MS = 13, /* Main synthetic */ 49 AAC_WAVE = 14, /* Wavetable synthesis */ 50 AAC_MIDI = 15, /* General MIDI */ 51 AAC_FX = 16, /* Algorithmic Synthesis and Audio FX */ 52 AAC_LC_ER = 17, /* AAC Low complexity with error recovery */ 53 AAC_LTP_ER = 19, /* AAC Long term prediction with error recovery */ 54 AAC_SCALE_ER = 20, /* AAC scalable with error recovery */ 55 AAC_TWINVQ_ER = 21, /* TwinVQ with error recovery */ 56 AAC_BSAC_ER = 22, /* BSAC with error recovery */ 57 AAC_LD_ER = 23, /* AAC LD with error recovery */ 58 AAC_CELP_ER = 24, /* CELP with error recovery */ 59 AAC_HXVC_ER = 25, /* HXVC with error recovery */ 60 AAC_HILN_ER = 26, /* HILN with error recovery */ 61 AAC_PARAM_ER = 27, /* Parametric with error recovery */ 62 AAC_SSC = 28, /* AAC SSC */ 63 AAC_HE_L3 = 31, /* Reserved : seems to be HeAAC L3 */ 64} aac_object_type_t; 65 66typedef enum { 67 NONE, 68 EMPTY, 69 VALID 70} ts_timestamp_t; 71 72int 73ends_with(const char * haystack, const char * needle); 74 75char * 76modifyString(char * string, const char * before, const char * after, short like); 77 78void 79check_for_captions(const char * path, sqlite_int64 detailID); 80 81sqlite_int64 82GetFolderMetadata(const char * name, const char * path, const char * artist, const char * genre, const char * album_art); 83 84sqlite_int64 85GetAudioMetadata(const char * path, char * name); 86 87sqlite_int64 88GetImageMetadata(const char * path, char * name); 89 90sqlite_int64 91GetVideoMetadata(const char * path, char * name); 92 93#endif 94