MiniDLNA update: 1.0.19.1 to 1.0.20
[tomato.git] / release / src / router / minidlna / metadata.h
blob5e9344da41e06cbeca832637aa0532a4487ce6c9
1 /* Metadata extraction
3 * Project : minidlna
4 * Website : http://sourceforge.net/projects/minidlna/
5 * Author : Justin Maggard
7 * MiniDLNA media server
8 * Copyright (C) 2008-2009 Justin Maggard
10 * This file is part of MiniDLNA.
12 * MiniDLNA is free software; you can redistribute it and/or modify
13 * it under the terms of the GNU General Public License version 2 as
14 * published by the Free Software Foundation.
16 * MiniDLNA is distributed in the hope that it will be useful,
17 * but WITHOUT ANY WARRANTY; without even the implied warranty of
18 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
19 * GNU General Public License for more details.
21 * You should have received a copy of the GNU General Public License
22 * along with MiniDLNA. If not, see <http://www.gnu.org/licenses/>.
24 #ifndef __METADATA_H__
25 #define __METADATA_H__
27 typedef struct metadata_s {
28 char *title;
29 char *artist;
30 char *creator;
31 char *album;
32 char *genre;
33 char *comment;
34 char *channels;
35 char *bitrate;
36 char *frequency;
37 char *bps;
38 char *resolution;
39 char *duration;
40 char *date;
41 char *mime;
42 char *dlna_pn;
43 } metadata_t;
45 typedef struct tsinfo_s {
46 int x;
47 int packet_size;
48 } tsinfo_t;
50 typedef enum {
51 AAC_INVALID = 0,
52 AAC_MAIN = 1, /* AAC Main */
53 AAC_LC = 2, /* AAC Low complexity */
54 AAC_SSR = 3, /* AAC SSR */
55 AAC_LTP = 4, /* AAC Long term prediction */
56 AAC_HE = 5, /* AAC High efficiency (SBR) */
57 AAC_SCALE = 6, /* Scalable */
58 AAC_TWINVQ = 7, /* TwinVQ */
59 AAC_CELP = 8, /* CELP */
60 AAC_HVXC = 9, /* HVXC */
61 AAC_TTSI = 12, /* TTSI */
62 AAC_MS = 13, /* Main synthetic */
63 AAC_WAVE = 14, /* Wavetable synthesis */
64 AAC_MIDI = 15, /* General MIDI */
65 AAC_FX = 16, /* Algorithmic Synthesis and Audio FX */
66 AAC_LC_ER = 17, /* AAC Low complexity with error recovery */
67 AAC_LTP_ER = 19, /* AAC Long term prediction with error recovery */
68 AAC_SCALE_ER = 20, /* AAC scalable with error recovery */
69 AAC_TWINVQ_ER = 21, /* TwinVQ with error recovery */
70 AAC_BSAC_ER = 22, /* BSAC with error recovery */
71 AAC_LD_ER = 23, /* AAC LD with error recovery */
72 AAC_CELP_ER = 24, /* CELP with error recovery */
73 AAC_HXVC_ER = 25, /* HXVC with error recovery */
74 AAC_HILN_ER = 26, /* HILN with error recovery */
75 AAC_PARAM_ER = 27, /* Parametric with error recovery */
76 AAC_SSC = 28, /* AAC SSC */
77 AAC_HE_L3 = 31, /* Reserved : seems to be HeAAC L3 */
78 } aac_object_type_t;
80 typedef enum {
81 NONE,
82 EMPTY,
83 VALID
84 } ts_timestamp_t;
86 int
87 ends_with(const char * haystack, const char * needle);
89 char *
90 modifyString(char * string, const char * before, const char * after, short like);
92 void
93 check_for_captions(const char * path, sqlite_int64 detailID);
95 sqlite_int64
96 GetFolderMetadata(const char * name, const char * path, const char * artist, const char * genre, const char * album_art);
98 sqlite_int64
99 GetAudioMetadata(const char * path, char * name);
101 sqlite_int64
102 GetImageMetadata(const char * path, char * name);
104 sqlite_int64
105 GetVideoMetadata(const char * path, char * name);
107 #endif