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