source: ipk/source.sh4/network_xupnpd/_path_/etc/xupnpd/xupnpd_mime.lua @ 27918

Last change on this file since 27918 was 27918, checked in by caliban, 6 years ago

[xupnpd] fixes

File size: 8.4 KB
Line 
1-- Copyright (C) 2011-2013 Anton Burdinuk
2-- clark15b@gmail.com
3-- https://tsdemuxer.googlecode.com/svn/trunk/xupnpd
4
5upnp_type=
6{
7    ['video'] = 1,
8    ['audio'] = 2,
9    ['image'] = 3,
10    ['text']  = 4,
11}
12
13upnp_class=
14{
15    ['video']     = 'object.item.videoItem',
16    ['audio']     = 'object.item.audioItem.musicTrack',
17    ['image']     = 'object.item.imageItem.photo',
18    ['text']      = 'object.item.textItem'
19}               
20
21upnp_proto=
22{
23    ['avi']   = 'http-get:*:video/avi:',
24    ['asf']   = 'http-get:*:video/x-ms-asf:',
25    ['wmv']   = 'http-get:*:video/x-ms-wmv:',
26    ['mp4']   = 'http-get:*:video/mp4:',
27    ['mpeg']  = 'http-get:*:video/mpeg:',
28    ['mpeg2'] = 'http-get:*:video/mpeg2:',
29    ['mp2t']  = 'http-get:*:video/mp2t:',
30    ['mp2p']  = 'http-get:*:video/mp2p:',
31    ['mov']   = 'http-get:*:video/quicktime:',
32    ['mkv']   = 'http-get:*:video/x-matroska:',
33    ['mka']   = 'http-get:*:audio/x-matroska:',
34    ['3gp']   = 'http-get:*:video/3gpp:',
35    ['flv']   = 'http-get:*:video/x-flv:',
36    ['aac']   = 'http-get:*:audio/x-aac:',
37    ['ac3']   = 'http-get:*:audio/x-ac3:',
38    ['mp3']   = 'http-get:*:audio/mpeg:',
39    ['ogg']   = 'http-get:*:audio/x-ogg:',
40    ['wma']   = 'http-get:*:audio/x-ms-wma:',
41    ['xml']   = 'http-get:*:text/xml:',
42    ['jpg']   = 'http-get:*:image/ipeg:',
43}
44
45-- DLNA.ORG_PN, DLNA.ORG_OP, DLNA.ORG_CI, DLNA.ORG_FLAGS
46-- DLNA.ORG_OP=00 - no seek; DLNA.ORG_OP=01 - seek
47dlna_org_extras=
48{
49    ['none']                  = '*',
50
51    -- video
52    ['mpeg_ps_pal']           = 'DLNA.ORG_PN=MPEG_PS_PAL;DLNA.ORG_OP=00;DLNA.ORG_CI=0;DLNA.ORG_FLAGS=01700000000000000000000000000000',
53    ['mpeg_ps_pal_ac3']       = 'DLNA.ORG_PN=MPEG_PS_PAL_XAC3;DLNA.ORG_OP=00;DLNA.ORG_CI=0;DLNA.ORG_FLAGS=01700000000000000000000000000000',
54    ['mpeg_ps_ntsc']          = 'DLNA.ORG_PN=MPEG_PS_NTSC;DLNA.ORG_OP=00;DLNA.ORG_CI=0;DLNA.ORG_FLAGS=01700000000000000000000000000000',
55    ['mpeg_ps_ntsc_ac3']      = 'DLNA.ORG_PN=MPEG_PS_NTSC_XAC3;DLNA.ORG_OP=00;DLNA.ORG_CI=0;DLNA.ORG_FLAGS=01700000000000000000000000000000',
56    ['mpeg1']                 = 'DLNA.ORG_PN=MPEG1;DLNA.ORG_OP=00;DLNA.ORG_CI=0;DLNA.ORG_FLAGS=01700000000000000000000000000000',
57    ['mpeg_ts_sd']            = 'DLNA.ORG_PN=MPEG_TS_SD_NA_ISO;DLNA.ORG_OP=00;DLNA.ORG_CI=0;DLNA.ORG_FLAGS=01700000000000000000000000000000',
58    ['mpeg_ts_hd']            = 'DLNA.ORG_PN=MPEG_TS_HD_NA;DLNA.ORG_OP=00;DLNA.ORG_CI=0;DLNA.ORG_FLAGS=01700000000000000000000000000000',
59    ['avchd']                 = 'DLNA.ORG_PN=AVC_TS_HD_50_AC3;DLNA.ORG_OP=00;DLNA.ORG_CI=0;DLNA.ORG_FLAGS=01700000000000000000000000000000',
60    ['wmv_med_base']          = 'DLNA.ORG_PN=WMVMED_BASE;DLNA.ORG_OP=00;DLNA.ORG_CI=0;DLNA.ORG_FLAGS=01700000000000000000000000000000',
61    ['wmv_med_full']          = 'DLNA.ORG_PN=WMVMED_FULL;DLNA.ORG_OP=00;DLNA.ORG_CI=0;DLNA.ORG_FLAGS=01700000000000000000000000000000',
62    ['wmv_med_pro']           = 'DLNA.ORG_PN=WMVMED_PRO;DLNA.ORG_OP=00;DLNA.ORG_CI=0;DLNA.ORG_FLAGS=01700000000000000000000000000000',
63    ['wmv_high_full']         = 'DLNA.ORG_PN=WMVHIGH_FULL;DLNA.ORG_OP=00;DLNA.ORG_CI=0;DLNA.ORG_FLAGS=01700000000000000000000000000000',
64    ['wmv_high_pro']          = 'DLNA.ORG_PN=WMVHIGH_PRO;DLNA.ORG_OP=00;DLNA.ORG_CI=0;DLNA.ORG_FLAGS=01700000000000000000000000000000',
65    ['asf_mpeg4_sp']          = 'DLNA.ORG_PN=MPEG4_P2_ASF_SP_G726;DLNA.ORG_OP=00;DLNA.ORG_CI=0;DLNA.ORG_FLAGS=01700000000000000000000000000000',
66    ['asf_mpeg4_asp_l4']      = 'DLNA.ORG_PN=MPEG4_P2_ASF_ASP_L4_SO_G726;DLNA.ORG_OP=00;DLNA.ORG_CI=0;DLNA.ORG_FLAGS=01700000000000000000000000000000',
67    ['asf_mpeg4_asp_l5']      = 'DLNA.ORG_PN=MPEG4_P2_ASF_ASP_L5_SO_G726;DLNA.ORG_OP=00;DLNA.ORG_CI=0;DLNA.ORG_FLAGS=01700000000000000000000000000000',
68    ['asf_vc1_l1']            = 'DLNA.ORG_PN=VC1_ASF_AP_L1_WMA;DLNA.ORG_OP=00;DLNA.ORG_CI=0;DLNA.ORG_FLAGS=01700000000000000000000000000000',
69    ['mp4_avc_sd_mp3']        = 'DLNA.ORG_PN=AVC_MP4_MP_SD_MPEG1_L3;DLNA.ORG_OP=00;DLNA.ORG_CI=0;DLNA.ORG_FLAGS=01700000000000000000000000000000',
70    ['mp4_avc_sd_ac3']        = 'DLNA.ORG_PN=AVC_MP4_MP_SD_AC3;DLNA.ORG_OP=00;DLNA.ORG_CI=0;DLNA.ORG_FLAGS=01700000000000000000000000000000',
71    ['mp4_avc_hd_ac3']        = 'DLNA.ORG_PN=AVC_MP4_MP_HD_AC3;DLNA.ORG_OP=00;DLNA.ORG_CI=0;DLNA.ORG_FLAGS=01700000000000000000000000000000',
72    ['mp4_avc_sd_aac']        = 'DLNA.ORG_PN=AVC_MP4_MP_SD_AAC_MULT5;DLNA.ORG_OP=00;DLNA.ORG_CI=0;DLNA.ORG_FLAGS=01700000000000000000000000000000', 
73    ['mpeg_ts_hd_mp3']        = 'DLNA.ORG_PN=AVC_TS_MP_HD_MPEG1_L3;DLNA.ORG_OP=00;DLNA.ORG_CI=0;DLNA.ORG_FLAGS=01700000000000000000000000000000',
74    ['mpeg_ts_hd_ac3']        = 'DLNA.ORG_PN=AVC_TS_MP_HD_AC3;DLNA.ORG_OP=00;DLNA.ORG_CI=0;DLNA.ORG_FLAGS=01700000000000000000000000000000',
75    ['mpeg_ts_mpeg4_asp_mp3'] = 'DLNA.ORG_PN=MPEG4_P2_TS_ASP_MPEG1_L3;DLNA.ORG_OP=00;DLNA.ORG_CI=0;DLNA.ORG_FLAGS=01700000000000000000000000000000',
76    ['mpeg_ts_mpeg4_asp_ac3'] = 'DLNA.ORG_PN=MPEG4_P2_TS_ASP_AC3;DLNA.ORG_OP=00;DLNA.ORG_CI=0;DLNA.ORG_FLAGS=01700000000000000000000000000000',
77    ['avi']                   = 'DLNA.ORG_PN=AVI;DLNA.ORG_OP=11;DLNA.ORG_CI=0;DLNA.ORG_FLAGS=01700000000000000000000000000000',
78    ['divx5']                 = 'DLNA.ORG_PN=PV_DIVX_DX50;DLNA.ORG_OP=11;DLNA.ORG_CI=0;DLNA.ORG_FLAGS=01700000000000000000000000000000',
79
80    -- audio
81    ['mp3']                   = 'DLNA.ORG_PN=MP3;DLNA.ORG_OP=11;DLNA.ORG_CI=0;DLNA.ORG_FLAGS=01700000000000000000000000000000',
82    ['ac3']                   = 'DLNA.ORG_PN=AC3;DLNA.ORG_OP=00;DLNA.ORG_CI=0;DLNA.ORG_FLAGS=01700000000000000000000000000000',
83    ['wma_base']              = 'DLNA.ORG_PN=WMABASE;DLNA.ORG_OP=00;DLNA.ORG_CI=0;DLNA.ORG_FLAGS=01700000000000000000000000000000',
84    ['wma_full']              = 'DLNA.ORG_PN=WMAFULL;DLNA.ORG_OP=00;DLNA.ORG_CI=0;DLNA.ORG_FLAGS=01700000000000000000000000000000',
85    ['wma_pro']               = 'DLNA.ORG_PN=WMAPRO;DLNA.ORG_OP=00;DLNA.ORG_CI=0;DLNA.ORG_FLAGS=01700000000000000000000000000000'
86}
87
88mime=
89{
90    ['avi']    = { upnp_type.video, upnp_class.video, 'video/avi',       upnp_proto.avi,   dlna_org_extras.divx5 },
91    ['asf']    = { upnp_type.video, upnp_class.video, 'video/x-ms-asf',  upnp_proto.asf,   dlna_org_extras.asf_mpeg4_sp },
92    ['wmv']    = { upnp_type.video, upnp_class.video, 'video/x-ms-wmv',  upnp_proto.wmv,   dlna_org_extras.wmv_med_full },
93    ['mp4']    = { upnp_type.video, upnp_class.video, 'video/mp4',       upnp_proto.mp4,   dlna_org_extras.none },
94    ['mpeg']   = { upnp_type.video, upnp_class.video, 'video/mpeg',      upnp_proto.mpeg,  dlna_org_extras.mpeg_ps_pal },        -- video/x-mpeg
95    ['mpeg_ts']= { upnp_type.video, upnp_class.video, 'video/mpeg',      upnp_proto.mpeg,  dlna_org_extras.mpeg_ts_sd },         -- for Sharp
96    ['mpeg1']  = { upnp_type.video, upnp_class.video, 'video/mpeg',      upnp_proto.mpeg,  dlna_org_extras.mpeg1 },
97    ['mpeg2']  = { upnp_type.video, upnp_class.video, 'video/mpeg2',     upnp_proto.mpeg2, dlna_org_extras.mpeg_ps_pal },
98    ['ts']     = { upnp_type.video, upnp_class.video, 'video/mp2t',      upnp_proto.mp2t,  dlna_org_extras.mpeg_ts_hd },
99    ['mp2t']   = { upnp_type.video, upnp_class.video, 'video/mp2t',      upnp_proto.mp2t,  dlna_org_extras.mpeg_ts_hd },
100    ['mp2p']   = { upnp_type.video, upnp_class.video, 'video/mp2p',      upnp_proto.mp2p,  dlna_org_extras.mpeg_ps_pal },
101    ['mov']    = { upnp_type.video, upnp_class.video, 'video/quicktime', upnp_proto.mov,   dlna_org_extras.none },
102    ['mkv']    = { upnp_type.video, upnp_class.video, 'video/x-mkv',     upnp_proto.mkv,   dlna_org_extras.none },               -- video/x-matroska
103    ['3gp']    = { upnp_type.video, upnp_class.video, 'video/3gpp',      upnp_proto['3gp'],dlna_org_extras.none },
104    ['flv']    = { upnp_type.video, upnp_class.video, 'video/x-flv',     upnp_proto.flv,   dlna_org_extras.none },
105    ['aac']    = { upnp_type.audio, upnp_class.audio, 'audio/x-aac',     upnp_proto.aac,   dlna_org_extras.none },
106    ['ac3']    = { upnp_type.audio, upnp_class.audio, 'audio/x-ac3',     upnp_proto.ac3,   dlna_org_extras.ac3 },
107    ['mp3']    = { upnp_type.audio, upnp_class.audio, 'audio/mpeg',      upnp_proto.mp3,   dlna_org_extras.mp3 },
108    ['ogg']    = { upnp_type.audio, upnp_class.audio, 'application/ogg', upnp_proto.ogg,   dlna_org_extras.none },
109    ['wma']    = { upnp_type.audio, upnp_class.audio, 'audio/x-ms-wma',  upnp_proto.wma,   dlna_org_extras.wma_full },
110    ['xml']    = { upnp_type.text,  upnp_class.text,  'text/xml',        upnp_proto.xml,   dlna_org_extras.none },
111    ['jpg']    = { upnp_type.image, upnp_class.video, 'image/jpeg',      upnp_proto.jpg,   dlna_org_extras.none },
112}
Note: See TracBrowser for help on using the repository browser.