annotate libdlna-0.2.3/src/av_wmv9.c @ 129:4f6d9621ee00

add multi session streaming & add depending librarys. - libupnp-1.6.6 - libdlna-0.2.3
author Naoya OYAMA <naoya.oyama@gmail.com>
date Sun, 10 Oct 2010 15:33:18 +0900
parents
children
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
rev   line source
129
4f6d9621ee00 add multi session streaming & add depending librarys.
Naoya OYAMA <naoya.oyama@gmail.com>
parents:
diff changeset
1 /*
4f6d9621ee00 add multi session streaming & add depending librarys.
Naoya OYAMA <naoya.oyama@gmail.com>
parents:
diff changeset
2 * libdlna: reference DLNA standards implementation.
4f6d9621ee00 add multi session streaming & add depending librarys.
Naoya OYAMA <naoya.oyama@gmail.com>
parents:
diff changeset
3 * Copyright (C) 2007 Benjamin Zores <ben@geexbox.org>
4f6d9621ee00 add multi session streaming & add depending librarys.
Naoya OYAMA <naoya.oyama@gmail.com>
parents:
diff changeset
4 *
4f6d9621ee00 add multi session streaming & add depending librarys.
Naoya OYAMA <naoya.oyama@gmail.com>
parents:
diff changeset
5 * This file is part of libdlna.
4f6d9621ee00 add multi session streaming & add depending librarys.
Naoya OYAMA <naoya.oyama@gmail.com>
parents:
diff changeset
6 *
4f6d9621ee00 add multi session streaming & add depending librarys.
Naoya OYAMA <naoya.oyama@gmail.com>
parents:
diff changeset
7 * libdlna is free software; you can redistribute it and/or
4f6d9621ee00 add multi session streaming & add depending librarys.
Naoya OYAMA <naoya.oyama@gmail.com>
parents:
diff changeset
8 * modify it under the terms of the GNU Lesser General Public
4f6d9621ee00 add multi session streaming & add depending librarys.
Naoya OYAMA <naoya.oyama@gmail.com>
parents:
diff changeset
9 * License as published by the Free Software Foundation; either
4f6d9621ee00 add multi session streaming & add depending librarys.
Naoya OYAMA <naoya.oyama@gmail.com>
parents:
diff changeset
10 * version 2.1 of the License, or (at your option) any later version.
4f6d9621ee00 add multi session streaming & add depending librarys.
Naoya OYAMA <naoya.oyama@gmail.com>
parents:
diff changeset
11 *
4f6d9621ee00 add multi session streaming & add depending librarys.
Naoya OYAMA <naoya.oyama@gmail.com>
parents:
diff changeset
12 * libdlna is distributed in the hope that it will be useful,
4f6d9621ee00 add multi session streaming & add depending librarys.
Naoya OYAMA <naoya.oyama@gmail.com>
parents:
diff changeset
13 * but WITHOUT ANY WARRANTY; without even the implied warranty of
4f6d9621ee00 add multi session streaming & add depending librarys.
Naoya OYAMA <naoya.oyama@gmail.com>
parents:
diff changeset
14 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
4f6d9621ee00 add multi session streaming & add depending librarys.
Naoya OYAMA <naoya.oyama@gmail.com>
parents:
diff changeset
15 * Lesser General Public License for more details.
4f6d9621ee00 add multi session streaming & add depending librarys.
Naoya OYAMA <naoya.oyama@gmail.com>
parents:
diff changeset
16 *
4f6d9621ee00 add multi session streaming & add depending librarys.
Naoya OYAMA <naoya.oyama@gmail.com>
parents:
diff changeset
17 * You should have received a copy of the GNU Lesser General Public
4f6d9621ee00 add multi session streaming & add depending librarys.
Naoya OYAMA <naoya.oyama@gmail.com>
parents:
diff changeset
18 * License along with libdlna; if not, write to the Free Software
4f6d9621ee00 add multi session streaming & add depending librarys.
Naoya OYAMA <naoya.oyama@gmail.com>
parents:
diff changeset
19 * Foundation, Inc, 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
4f6d9621ee00 add multi session streaming & add depending librarys.
Naoya OYAMA <naoya.oyama@gmail.com>
parents:
diff changeset
20 */
4f6d9621ee00 add multi session streaming & add depending librarys.
Naoya OYAMA <naoya.oyama@gmail.com>
parents:
diff changeset
21
4f6d9621ee00 add multi session streaming & add depending librarys.
Naoya OYAMA <naoya.oyama@gmail.com>
parents:
diff changeset
22 /* Summary of VMW9 Profiles
4f6d9621ee00 add multi session streaming & add depending librarys.
Naoya OYAMA <naoya.oyama@gmail.com>
parents:
diff changeset
23 * Simple and Main profiles are identified by FourCC WMV3
4f6d9621ee00 add multi session streaming & add depending librarys.
Naoya OYAMA <naoya.oyama@gmail.com>
parents:
diff changeset
24 * Advanced profile is identified by FourCC WVC1
4f6d9621ee00 add multi session streaming & add depending librarys.
Naoya OYAMA <naoya.oyama@gmail.com>
parents:
diff changeset
25 *
4f6d9621ee00 add multi session streaming & add depending librarys.
Naoya OYAMA <naoya.oyama@gmail.com>
parents:
diff changeset
26 * Profile Level Max. Bitrate Format
4f6d9621ee00 add multi session streaming & add depending librarys.
Naoya OYAMA <naoya.oyama@gmail.com>
parents:
diff changeset
27 *
4f6d9621ee00 add multi session streaming & add depending librarys.
Naoya OYAMA <naoya.oyama@gmail.com>
parents:
diff changeset
28 * Simple Low 96 Kbps 176 x 144 @ 15 Hz (QCIF)
4f6d9621ee00 add multi session streaming & add depending librarys.
Naoya OYAMA <naoya.oyama@gmail.com>
parents:
diff changeset
29 * Medium 384 Kbps 240 x 176 @ 30 Hz
4f6d9621ee00 add multi session streaming & add depending librarys.
Naoya OYAMA <naoya.oyama@gmail.com>
parents:
diff changeset
30 * 352 x 288 @ 15 Hz (CIF)
4f6d9621ee00 add multi session streaming & add depending librarys.
Naoya OYAMA <naoya.oyama@gmail.com>
parents:
diff changeset
31 *
4f6d9621ee00 add multi session streaming & add depending librarys.
Naoya OYAMA <naoya.oyama@gmail.com>
parents:
diff changeset
32 * Main Low 2 Mbps 320 x 240 @ 24 Hz (QVGA)
4f6d9621ee00 add multi session streaming & add depending librarys.
Naoya OYAMA <naoya.oyama@gmail.com>
parents:
diff changeset
33 * Medium 10 Mbps 720 x 480 @ 30 Hz (480p)
4f6d9621ee00 add multi session streaming & add depending librarys.
Naoya OYAMA <naoya.oyama@gmail.com>
parents:
diff changeset
34 * 720 x 576 @ 25 Hz (576p)
4f6d9621ee00 add multi session streaming & add depending librarys.
Naoya OYAMA <naoya.oyama@gmail.com>
parents:
diff changeset
35 * High 20 Mbps 1920 x 1080 @ 30 Hz (1080p)
4f6d9621ee00 add multi session streaming & add depending librarys.
Naoya OYAMA <naoya.oyama@gmail.com>
parents:
diff changeset
36 *
4f6d9621ee00 add multi session streaming & add depending librarys.
Naoya OYAMA <naoya.oyama@gmail.com>
parents:
diff changeset
37 * Advanced L0 2 Mbps 352 x 288 @ 30 Hz (CIF)
4f6d9621ee00 add multi session streaming & add depending librarys.
Naoya OYAMA <naoya.oyama@gmail.com>
parents:
diff changeset
38 * L1 10 Mbps 720 x 480 @ 30 Hz (NTSC-SD)
4f6d9621ee00 add multi session streaming & add depending librarys.
Naoya OYAMA <naoya.oyama@gmail.com>
parents:
diff changeset
39 * 720 x 576 @ 25 Hz (PAL-SD)
4f6d9621ee00 add multi session streaming & add depending librarys.
Naoya OYAMA <naoya.oyama@gmail.com>
parents:
diff changeset
40 * L2 20 Mbps 720 x 480 @ 60 Hz (480p)
4f6d9621ee00 add multi session streaming & add depending librarys.
Naoya OYAMA <naoya.oyama@gmail.com>
parents:
diff changeset
41 * 1280 x 720 @ 30 Hz (720p)
4f6d9621ee00 add multi session streaming & add depending librarys.
Naoya OYAMA <naoya.oyama@gmail.com>
parents:
diff changeset
42 * L3 45 Mbps 1920 x 1080 @ 24 Hz (1080p)
4f6d9621ee00 add multi session streaming & add depending librarys.
Naoya OYAMA <naoya.oyama@gmail.com>
parents:
diff changeset
43 * 1920 x 1080 @ 30 Hz (1080i)
4f6d9621ee00 add multi session streaming & add depending librarys.
Naoya OYAMA <naoya.oyama@gmail.com>
parents:
diff changeset
44 * 1280 x 720 @ 60 Hz (720p)
4f6d9621ee00 add multi session streaming & add depending librarys.
Naoya OYAMA <naoya.oyama@gmail.com>
parents:
diff changeset
45 * L4 135 Mbps 1920 x 1080 @ 60 Hz (1080p)
4f6d9621ee00 add multi session streaming & add depending librarys.
Naoya OYAMA <naoya.oyama@gmail.com>
parents:
diff changeset
46 * 2048 x 1536 @ 24 Hz
4f6d9621ee00 add multi session streaming & add depending librarys.
Naoya OYAMA <naoya.oyama@gmail.com>
parents:
diff changeset
47 */
4f6d9621ee00 add multi session streaming & add depending librarys.
Naoya OYAMA <naoya.oyama@gmail.com>
parents:
diff changeset
48
4f6d9621ee00 add multi session streaming & add depending librarys.
Naoya OYAMA <naoya.oyama@gmail.com>
parents:
diff changeset
49 #include <stdlib.h>
4f6d9621ee00 add multi session streaming & add depending librarys.
Naoya OYAMA <naoya.oyama@gmail.com>
parents:
diff changeset
50 #include <string.h>
4f6d9621ee00 add multi session streaming & add depending librarys.
Naoya OYAMA <naoya.oyama@gmail.com>
parents:
diff changeset
51
4f6d9621ee00 add multi session streaming & add depending librarys.
Naoya OYAMA <naoya.oyama@gmail.com>
parents:
diff changeset
52 #include "dlna_internals.h"
4f6d9621ee00 add multi session streaming & add depending librarys.
Naoya OYAMA <naoya.oyama@gmail.com>
parents:
diff changeset
53 #include "profiles.h"
4f6d9621ee00 add multi session streaming & add depending librarys.
Naoya OYAMA <naoya.oyama@gmail.com>
parents:
diff changeset
54 #include "containers.h"
4f6d9621ee00 add multi session streaming & add depending librarys.
Naoya OYAMA <naoya.oyama@gmail.com>
parents:
diff changeset
55
4f6d9621ee00 add multi session streaming & add depending librarys.
Naoya OYAMA <naoya.oyama@gmail.com>
parents:
diff changeset
56 typedef enum {
4f6d9621ee00 add multi session streaming & add depending librarys.
Naoya OYAMA <naoya.oyama@gmail.com>
parents:
diff changeset
57 WMV_VIDEO_PROFILE_INVALID,
4f6d9621ee00 add multi session streaming & add depending librarys.
Naoya OYAMA <naoya.oyama@gmail.com>
parents:
diff changeset
58 WMV_VIDEO_PROFILE_SIMPLE_LOW,
4f6d9621ee00 add multi session streaming & add depending librarys.
Naoya OYAMA <naoya.oyama@gmail.com>
parents:
diff changeset
59 WMV_VIDEO_PROFILE_SIMPLE_MEDIUM,
4f6d9621ee00 add multi session streaming & add depending librarys.
Naoya OYAMA <naoya.oyama@gmail.com>
parents:
diff changeset
60 WMV_VIDEO_PROFILE_MAIN_MEDIUM,
4f6d9621ee00 add multi session streaming & add depending librarys.
Naoya OYAMA <naoya.oyama@gmail.com>
parents:
diff changeset
61 WMV_VIDEO_PROFILE_MAIN_HIGH
4f6d9621ee00 add multi session streaming & add depending librarys.
Naoya OYAMA <naoya.oyama@gmail.com>
parents:
diff changeset
62 } wmv_video_profile_t;
4f6d9621ee00 add multi session streaming & add depending librarys.
Naoya OYAMA <naoya.oyama@gmail.com>
parents:
diff changeset
63
4f6d9621ee00 add multi session streaming & add depending librarys.
Naoya OYAMA <naoya.oyama@gmail.com>
parents:
diff changeset
64 typedef struct wmv9_profile_s {
4f6d9621ee00 add multi session streaming & add depending librarys.
Naoya OYAMA <naoya.oyama@gmail.com>
parents:
diff changeset
65 int max_width;
4f6d9621ee00 add multi session streaming & add depending librarys.
Naoya OYAMA <naoya.oyama@gmail.com>
parents:
diff changeset
66 int max_height;
4f6d9621ee00 add multi session streaming & add depending librarys.
Naoya OYAMA <naoya.oyama@gmail.com>
parents:
diff changeset
67 int fps_num;
4f6d9621ee00 add multi session streaming & add depending librarys.
Naoya OYAMA <naoya.oyama@gmail.com>
parents:
diff changeset
68 int fps_den;
4f6d9621ee00 add multi session streaming & add depending librarys.
Naoya OYAMA <naoya.oyama@gmail.com>
parents:
diff changeset
69 int max_bitrate;
4f6d9621ee00 add multi session streaming & add depending librarys.
Naoya OYAMA <naoya.oyama@gmail.com>
parents:
diff changeset
70 } wmv9_profile_t;
4f6d9621ee00 add multi session streaming & add depending librarys.
Naoya OYAMA <naoya.oyama@gmail.com>
parents:
diff changeset
71
4f6d9621ee00 add multi session streaming & add depending librarys.
Naoya OYAMA <naoya.oyama@gmail.com>
parents:
diff changeset
72 static wmv9_profile_t wmv9_profile_simple_low[] = {
4f6d9621ee00 add multi session streaming & add depending librarys.
Naoya OYAMA <naoya.oyama@gmail.com>
parents:
diff changeset
73 { 176, 144, 15, 1, 96000}
4f6d9621ee00 add multi session streaming & add depending librarys.
Naoya OYAMA <naoya.oyama@gmail.com>
parents:
diff changeset
74 };
4f6d9621ee00 add multi session streaming & add depending librarys.
Naoya OYAMA <naoya.oyama@gmail.com>
parents:
diff changeset
75
4f6d9621ee00 add multi session streaming & add depending librarys.
Naoya OYAMA <naoya.oyama@gmail.com>
parents:
diff changeset
76 static wmv9_profile_t wmv9_profile_simple_medium[] = {
4f6d9621ee00 add multi session streaming & add depending librarys.
Naoya OYAMA <naoya.oyama@gmail.com>
parents:
diff changeset
77 { 240, 176, 30, 1, 384000},
4f6d9621ee00 add multi session streaming & add depending librarys.
Naoya OYAMA <naoya.oyama@gmail.com>
parents:
diff changeset
78 { 240, 176, 30000, 1001, 384000},
4f6d9621ee00 add multi session streaming & add depending librarys.
Naoya OYAMA <naoya.oyama@gmail.com>
parents:
diff changeset
79 { 352, 288, 15, 1, 384000}
4f6d9621ee00 add multi session streaming & add depending librarys.
Naoya OYAMA <naoya.oyama@gmail.com>
parents:
diff changeset
80 };
4f6d9621ee00 add multi session streaming & add depending librarys.
Naoya OYAMA <naoya.oyama@gmail.com>
parents:
diff changeset
81
4f6d9621ee00 add multi session streaming & add depending librarys.
Naoya OYAMA <naoya.oyama@gmail.com>
parents:
diff changeset
82 static wmv9_profile_t wmv9_profile_main_medium[] = {
4f6d9621ee00 add multi session streaming & add depending librarys.
Naoya OYAMA <naoya.oyama@gmail.com>
parents:
diff changeset
83 { 720, 480, 30, 1, 10000000},
4f6d9621ee00 add multi session streaming & add depending librarys.
Naoya OYAMA <naoya.oyama@gmail.com>
parents:
diff changeset
84 { 720, 480, 30000, 1001, 10000000},
4f6d9621ee00 add multi session streaming & add depending librarys.
Naoya OYAMA <naoya.oyama@gmail.com>
parents:
diff changeset
85 { 720, 576, 25, 1, 10000000}
4f6d9621ee00 add multi session streaming & add depending librarys.
Naoya OYAMA <naoya.oyama@gmail.com>
parents:
diff changeset
86 };
4f6d9621ee00 add multi session streaming & add depending librarys.
Naoya OYAMA <naoya.oyama@gmail.com>
parents:
diff changeset
87
4f6d9621ee00 add multi session streaming & add depending librarys.
Naoya OYAMA <naoya.oyama@gmail.com>
parents:
diff changeset
88 static wmv9_profile_t wmv9_profile_main_high[] = {
4f6d9621ee00 add multi session streaming & add depending librarys.
Naoya OYAMA <naoya.oyama@gmail.com>
parents:
diff changeset
89 { 1920, 1080, 30, 1, 20000000},
4f6d9621ee00 add multi session streaming & add depending librarys.
Naoya OYAMA <naoya.oyama@gmail.com>
parents:
diff changeset
90 { 1920, 1080, 30000, 1001, 20000000}
4f6d9621ee00 add multi session streaming & add depending librarys.
Naoya OYAMA <naoya.oyama@gmail.com>
parents:
diff changeset
91 };
4f6d9621ee00 add multi session streaming & add depending librarys.
Naoya OYAMA <naoya.oyama@gmail.com>
parents:
diff changeset
92
4f6d9621ee00 add multi session streaming & add depending librarys.
Naoya OYAMA <naoya.oyama@gmail.com>
parents:
diff changeset
93 /* Medium resolution video (Main profile at Medium Level)
4f6d9621ee00 add multi session streaming & add depending librarys.
Naoya OYAMA <naoya.oyama@gmail.com>
parents:
diff changeset
94 with baseline WMA audio */
4f6d9621ee00 add multi session streaming & add depending librarys.
Naoya OYAMA <naoya.oyama@gmail.com>
parents:
diff changeset
95 static dlna_profile_t wmvmed_base = {
4f6d9621ee00 add multi session streaming & add depending librarys.
Naoya OYAMA <naoya.oyama@gmail.com>
parents:
diff changeset
96 .id = "WMVMED_BASE",
4f6d9621ee00 add multi session streaming & add depending librarys.
Naoya OYAMA <naoya.oyama@gmail.com>
parents:
diff changeset
97 .mime = MIME_VIDEO_WMV,
4f6d9621ee00 add multi session streaming & add depending librarys.
Naoya OYAMA <naoya.oyama@gmail.com>
parents:
diff changeset
98 .label = LABEL_VIDEO_SD
4f6d9621ee00 add multi session streaming & add depending librarys.
Naoya OYAMA <naoya.oyama@gmail.com>
parents:
diff changeset
99 };
4f6d9621ee00 add multi session streaming & add depending librarys.
Naoya OYAMA <naoya.oyama@gmail.com>
parents:
diff changeset
100
4f6d9621ee00 add multi session streaming & add depending librarys.
Naoya OYAMA <naoya.oyama@gmail.com>
parents:
diff changeset
101 /* Medium resolution video (Main profile at Medium Level)
4f6d9621ee00 add multi session streaming & add depending librarys.
Naoya OYAMA <naoya.oyama@gmail.com>
parents:
diff changeset
102 with full WMA audio */
4f6d9621ee00 add multi session streaming & add depending librarys.
Naoya OYAMA <naoya.oyama@gmail.com>
parents:
diff changeset
103 static dlna_profile_t wmvmed_full = {
4f6d9621ee00 add multi session streaming & add depending librarys.
Naoya OYAMA <naoya.oyama@gmail.com>
parents:
diff changeset
104 .id = "WMVMED_FULL",
4f6d9621ee00 add multi session streaming & add depending librarys.
Naoya OYAMA <naoya.oyama@gmail.com>
parents:
diff changeset
105 .mime = MIME_VIDEO_WMV,
4f6d9621ee00 add multi session streaming & add depending librarys.
Naoya OYAMA <naoya.oyama@gmail.com>
parents:
diff changeset
106 .label = LABEL_VIDEO_SD
4f6d9621ee00 add multi session streaming & add depending librarys.
Naoya OYAMA <naoya.oyama@gmail.com>
parents:
diff changeset
107 };
4f6d9621ee00 add multi session streaming & add depending librarys.
Naoya OYAMA <naoya.oyama@gmail.com>
parents:
diff changeset
108
4f6d9621ee00 add multi session streaming & add depending librarys.
Naoya OYAMA <naoya.oyama@gmail.com>
parents:
diff changeset
109 /* Medium resolution video (Main profile at Medium Level)
4f6d9621ee00 add multi session streaming & add depending librarys.
Naoya OYAMA <naoya.oyama@gmail.com>
parents:
diff changeset
110 with WMA professional audio */
4f6d9621ee00 add multi session streaming & add depending librarys.
Naoya OYAMA <naoya.oyama@gmail.com>
parents:
diff changeset
111 static dlna_profile_t wmvmed_pro = {
4f6d9621ee00 add multi session streaming & add depending librarys.
Naoya OYAMA <naoya.oyama@gmail.com>
parents:
diff changeset
112 .id = "WMVMED_PRO",
4f6d9621ee00 add multi session streaming & add depending librarys.
Naoya OYAMA <naoya.oyama@gmail.com>
parents:
diff changeset
113 .mime = MIME_VIDEO_WMV,
4f6d9621ee00 add multi session streaming & add depending librarys.
Naoya OYAMA <naoya.oyama@gmail.com>
parents:
diff changeset
114 .label = LABEL_VIDEO_HD
4f6d9621ee00 add multi session streaming & add depending librarys.
Naoya OYAMA <naoya.oyama@gmail.com>
parents:
diff changeset
115 };
4f6d9621ee00 add multi session streaming & add depending librarys.
Naoya OYAMA <naoya.oyama@gmail.com>
parents:
diff changeset
116
4f6d9621ee00 add multi session streaming & add depending librarys.
Naoya OYAMA <naoya.oyama@gmail.com>
parents:
diff changeset
117 /* High resolution video (Main profile at High Level)
4f6d9621ee00 add multi session streaming & add depending librarys.
Naoya OYAMA <naoya.oyama@gmail.com>
parents:
diff changeset
118 with full WMA audio */
4f6d9621ee00 add multi session streaming & add depending librarys.
Naoya OYAMA <naoya.oyama@gmail.com>
parents:
diff changeset
119 static dlna_profile_t wmvhigh_full = {
4f6d9621ee00 add multi session streaming & add depending librarys.
Naoya OYAMA <naoya.oyama@gmail.com>
parents:
diff changeset
120 .id = "WMVHIGH_FULL",
4f6d9621ee00 add multi session streaming & add depending librarys.
Naoya OYAMA <naoya.oyama@gmail.com>
parents:
diff changeset
121 .mime = MIME_VIDEO_WMV,
4f6d9621ee00 add multi session streaming & add depending librarys.
Naoya OYAMA <naoya.oyama@gmail.com>
parents:
diff changeset
122 .label = LABEL_VIDEO_HD
4f6d9621ee00 add multi session streaming & add depending librarys.
Naoya OYAMA <naoya.oyama@gmail.com>
parents:
diff changeset
123 };
4f6d9621ee00 add multi session streaming & add depending librarys.
Naoya OYAMA <naoya.oyama@gmail.com>
parents:
diff changeset
124
4f6d9621ee00 add multi session streaming & add depending librarys.
Naoya OYAMA <naoya.oyama@gmail.com>
parents:
diff changeset
125 /* High resolution video (Main profile at High Level)
4f6d9621ee00 add multi session streaming & add depending librarys.
Naoya OYAMA <naoya.oyama@gmail.com>
parents:
diff changeset
126 with WMA professional audio */
4f6d9621ee00 add multi session streaming & add depending librarys.
Naoya OYAMA <naoya.oyama@gmail.com>
parents:
diff changeset
127 static dlna_profile_t wmvhigh_pro = {
4f6d9621ee00 add multi session streaming & add depending librarys.
Naoya OYAMA <naoya.oyama@gmail.com>
parents:
diff changeset
128 .id = "WMVHIGH_PRO",
4f6d9621ee00 add multi session streaming & add depending librarys.
Naoya OYAMA <naoya.oyama@gmail.com>
parents:
diff changeset
129 .mime = MIME_VIDEO_WMV,
4f6d9621ee00 add multi session streaming & add depending librarys.
Naoya OYAMA <naoya.oyama@gmail.com>
parents:
diff changeset
130 .label = LABEL_VIDEO_HD
4f6d9621ee00 add multi session streaming & add depending librarys.
Naoya OYAMA <naoya.oyama@gmail.com>
parents:
diff changeset
131 };
4f6d9621ee00 add multi session streaming & add depending librarys.
Naoya OYAMA <naoya.oyama@gmail.com>
parents:
diff changeset
132
4f6d9621ee00 add multi session streaming & add depending librarys.
Naoya OYAMA <naoya.oyama@gmail.com>
parents:
diff changeset
133 /* HighMAT profile */
4f6d9621ee00 add multi session streaming & add depending librarys.
Naoya OYAMA <naoya.oyama@gmail.com>
parents:
diff changeset
134 static dlna_profile_t wmvhm_base dlna_unused = {
4f6d9621ee00 add multi session streaming & add depending librarys.
Naoya OYAMA <naoya.oyama@gmail.com>
parents:
diff changeset
135 .id = "WMVHM_BASE",
4f6d9621ee00 add multi session streaming & add depending librarys.
Naoya OYAMA <naoya.oyama@gmail.com>
parents:
diff changeset
136 .mime = MIME_VIDEO_WMV,
4f6d9621ee00 add multi session streaming & add depending librarys.
Naoya OYAMA <naoya.oyama@gmail.com>
parents:
diff changeset
137 .label = LABEL_VIDEO_SD
4f6d9621ee00 add multi session streaming & add depending librarys.
Naoya OYAMA <naoya.oyama@gmail.com>
parents:
diff changeset
138 };
4f6d9621ee00 add multi session streaming & add depending librarys.
Naoya OYAMA <naoya.oyama@gmail.com>
parents:
diff changeset
139
4f6d9621ee00 add multi session streaming & add depending librarys.
Naoya OYAMA <naoya.oyama@gmail.com>
parents:
diff changeset
140 /* Low resolution video (Simple Profile at Low Level)
4f6d9621ee00 add multi session streaming & add depending librarys.
Naoya OYAMA <naoya.oyama@gmail.com>
parents:
diff changeset
141 with baseline WMA audio */
4f6d9621ee00 add multi session streaming & add depending librarys.
Naoya OYAMA <naoya.oyama@gmail.com>
parents:
diff changeset
142 static dlna_profile_t wmvspll_base = {
4f6d9621ee00 add multi session streaming & add depending librarys.
Naoya OYAMA <naoya.oyama@gmail.com>
parents:
diff changeset
143 .id = "WMVSPLL_BASE",
4f6d9621ee00 add multi session streaming & add depending librarys.
Naoya OYAMA <naoya.oyama@gmail.com>
parents:
diff changeset
144 .mime = MIME_VIDEO_WMV,
4f6d9621ee00 add multi session streaming & add depending librarys.
Naoya OYAMA <naoya.oyama@gmail.com>
parents:
diff changeset
145 .label = LABEL_VIDEO_QCIF15
4f6d9621ee00 add multi session streaming & add depending librarys.
Naoya OYAMA <naoya.oyama@gmail.com>
parents:
diff changeset
146 };
4f6d9621ee00 add multi session streaming & add depending librarys.
Naoya OYAMA <naoya.oyama@gmail.com>
parents:
diff changeset
147
4f6d9621ee00 add multi session streaming & add depending librarys.
Naoya OYAMA <naoya.oyama@gmail.com>
parents:
diff changeset
148 /* Low resolution video (Simple Profile at Medium Level)
4f6d9621ee00 add multi session streaming & add depending librarys.
Naoya OYAMA <naoya.oyama@gmail.com>
parents:
diff changeset
149 with baseline WMA audio */
4f6d9621ee00 add multi session streaming & add depending librarys.
Naoya OYAMA <naoya.oyama@gmail.com>
parents:
diff changeset
150 static dlna_profile_t wmvspml_base = {
4f6d9621ee00 add multi session streaming & add depending librarys.
Naoya OYAMA <naoya.oyama@gmail.com>
parents:
diff changeset
151 .id = "WMVSPML_BASE",
4f6d9621ee00 add multi session streaming & add depending librarys.
Naoya OYAMA <naoya.oyama@gmail.com>
parents:
diff changeset
152 .mime = MIME_VIDEO_WMV,
4f6d9621ee00 add multi session streaming & add depending librarys.
Naoya OYAMA <naoya.oyama@gmail.com>
parents:
diff changeset
153 .label = LABEL_VIDEO_CIF15
4f6d9621ee00 add multi session streaming & add depending librarys.
Naoya OYAMA <naoya.oyama@gmail.com>
parents:
diff changeset
154 };
4f6d9621ee00 add multi session streaming & add depending librarys.
Naoya OYAMA <naoya.oyama@gmail.com>
parents:
diff changeset
155
4f6d9621ee00 add multi session streaming & add depending librarys.
Naoya OYAMA <naoya.oyama@gmail.com>
parents:
diff changeset
156 /* Low resolution video (Simple Profile at Medium Level) with MP3 audio */
4f6d9621ee00 add multi session streaming & add depending librarys.
Naoya OYAMA <naoya.oyama@gmail.com>
parents:
diff changeset
157 static dlna_profile_t wmvspml_mp3 = {
4f6d9621ee00 add multi session streaming & add depending librarys.
Naoya OYAMA <naoya.oyama@gmail.com>
parents:
diff changeset
158 .id = "WMVSPML_MP3",
4f6d9621ee00 add multi session streaming & add depending librarys.
Naoya OYAMA <naoya.oyama@gmail.com>
parents:
diff changeset
159 .mime = MIME_VIDEO_WMV,
4f6d9621ee00 add multi session streaming & add depending librarys.
Naoya OYAMA <naoya.oyama@gmail.com>
parents:
diff changeset
160 .label = LABEL_VIDEO_CIF15
4f6d9621ee00 add multi session streaming & add depending librarys.
Naoya OYAMA <naoya.oyama@gmail.com>
parents:
diff changeset
161 };
4f6d9621ee00 add multi session streaming & add depending librarys.
Naoya OYAMA <naoya.oyama@gmail.com>
parents:
diff changeset
162
4f6d9621ee00 add multi session streaming & add depending librarys.
Naoya OYAMA <naoya.oyama@gmail.com>
parents:
diff changeset
163 static const struct {
4f6d9621ee00 add multi session streaming & add depending librarys.
Naoya OYAMA <naoya.oyama@gmail.com>
parents:
diff changeset
164 dlna_profile_t *profile;
4f6d9621ee00 add multi session streaming & add depending librarys.
Naoya OYAMA <naoya.oyama@gmail.com>
parents:
diff changeset
165 wmv_video_profile_t vp;
4f6d9621ee00 add multi session streaming & add depending librarys.
Naoya OYAMA <naoya.oyama@gmail.com>
parents:
diff changeset
166 audio_profile_t ap;
4f6d9621ee00 add multi session streaming & add depending librarys.
Naoya OYAMA <naoya.oyama@gmail.com>
parents:
diff changeset
167 } wmv_profiles_mapping[] = {
4f6d9621ee00 add multi session streaming & add depending librarys.
Naoya OYAMA <naoya.oyama@gmail.com>
parents:
diff changeset
168 { &wmvmed_base, WMV_VIDEO_PROFILE_MAIN_MEDIUM,
4f6d9621ee00 add multi session streaming & add depending librarys.
Naoya OYAMA <naoya.oyama@gmail.com>
parents:
diff changeset
169 AUDIO_PROFILE_WMA_BASELINE },
4f6d9621ee00 add multi session streaming & add depending librarys.
Naoya OYAMA <naoya.oyama@gmail.com>
parents:
diff changeset
170 { &wmvmed_full, WMV_VIDEO_PROFILE_MAIN_MEDIUM,
4f6d9621ee00 add multi session streaming & add depending librarys.
Naoya OYAMA <naoya.oyama@gmail.com>
parents:
diff changeset
171 AUDIO_PROFILE_WMA_FULL },
4f6d9621ee00 add multi session streaming & add depending librarys.
Naoya OYAMA <naoya.oyama@gmail.com>
parents:
diff changeset
172 { &wmvmed_pro, WMV_VIDEO_PROFILE_MAIN_MEDIUM,
4f6d9621ee00 add multi session streaming & add depending librarys.
Naoya OYAMA <naoya.oyama@gmail.com>
parents:
diff changeset
173 AUDIO_PROFILE_WMA_PRO },
4f6d9621ee00 add multi session streaming & add depending librarys.
Naoya OYAMA <naoya.oyama@gmail.com>
parents:
diff changeset
174 { &wmvhigh_full, WMV_VIDEO_PROFILE_MAIN_HIGH,
4f6d9621ee00 add multi session streaming & add depending librarys.
Naoya OYAMA <naoya.oyama@gmail.com>
parents:
diff changeset
175 AUDIO_PROFILE_WMA_FULL },
4f6d9621ee00 add multi session streaming & add depending librarys.
Naoya OYAMA <naoya.oyama@gmail.com>
parents:
diff changeset
176 { &wmvhigh_pro, WMV_VIDEO_PROFILE_MAIN_HIGH,
4f6d9621ee00 add multi session streaming & add depending librarys.
Naoya OYAMA <naoya.oyama@gmail.com>
parents:
diff changeset
177 AUDIO_PROFILE_WMA_FULL },
4f6d9621ee00 add multi session streaming & add depending librarys.
Naoya OYAMA <naoya.oyama@gmail.com>
parents:
diff changeset
178 { &wmvspll_base, WMV_VIDEO_PROFILE_SIMPLE_LOW,
4f6d9621ee00 add multi session streaming & add depending librarys.
Naoya OYAMA <naoya.oyama@gmail.com>
parents:
diff changeset
179 AUDIO_PROFILE_WMA_BASELINE },
4f6d9621ee00 add multi session streaming & add depending librarys.
Naoya OYAMA <naoya.oyama@gmail.com>
parents:
diff changeset
180 { &wmvspml_base, WMV_VIDEO_PROFILE_SIMPLE_MEDIUM,
4f6d9621ee00 add multi session streaming & add depending librarys.
Naoya OYAMA <naoya.oyama@gmail.com>
parents:
diff changeset
181 AUDIO_PROFILE_WMA_BASELINE },
4f6d9621ee00 add multi session streaming & add depending librarys.
Naoya OYAMA <naoya.oyama@gmail.com>
parents:
diff changeset
182 { &wmvspml_mp3, WMV_VIDEO_PROFILE_SIMPLE_MEDIUM,
4f6d9621ee00 add multi session streaming & add depending librarys.
Naoya OYAMA <naoya.oyama@gmail.com>
parents:
diff changeset
183 AUDIO_PROFILE_MP3 },
4f6d9621ee00 add multi session streaming & add depending librarys.
Naoya OYAMA <naoya.oyama@gmail.com>
parents:
diff changeset
184 { NULL, 0, 0, }
4f6d9621ee00 add multi session streaming & add depending librarys.
Naoya OYAMA <naoya.oyama@gmail.com>
parents:
diff changeset
185 };
4f6d9621ee00 add multi session streaming & add depending librarys.
Naoya OYAMA <naoya.oyama@gmail.com>
parents:
diff changeset
186
4f6d9621ee00 add multi session streaming & add depending librarys.
Naoya OYAMA <naoya.oyama@gmail.com>
parents:
diff changeset
187 static int
4f6d9621ee00 add multi session streaming & add depending librarys.
Naoya OYAMA <naoya.oyama@gmail.com>
parents:
diff changeset
188 is_valid_wmv9_video_profile (wmv9_profile_t profile[], int size,
4f6d9621ee00 add multi session streaming & add depending librarys.
Naoya OYAMA <naoya.oyama@gmail.com>
parents:
diff changeset
189 AVStream *vs, AVCodecContext *vc)
4f6d9621ee00 add multi session streaming & add depending librarys.
Naoya OYAMA <naoya.oyama@gmail.com>
parents:
diff changeset
190 {
4f6d9621ee00 add multi session streaming & add depending librarys.
Naoya OYAMA <naoya.oyama@gmail.com>
parents:
diff changeset
191 int i;
4f6d9621ee00 add multi session streaming & add depending librarys.
Naoya OYAMA <naoya.oyama@gmail.com>
parents:
diff changeset
192
4f6d9621ee00 add multi session streaming & add depending librarys.
Naoya OYAMA <naoya.oyama@gmail.com>
parents:
diff changeset
193 for (i = 0; i < size / (int) sizeof (wmv9_profile_t); i++)
4f6d9621ee00 add multi session streaming & add depending librarys.
Naoya OYAMA <naoya.oyama@gmail.com>
parents:
diff changeset
194 if (vc->width <= profile[i].max_width &&
4f6d9621ee00 add multi session streaming & add depending librarys.
Naoya OYAMA <naoya.oyama@gmail.com>
parents:
diff changeset
195 vc->height <= profile[i].max_height &&
4f6d9621ee00 add multi session streaming & add depending librarys.
Naoya OYAMA <naoya.oyama@gmail.com>
parents:
diff changeset
196 vs->r_frame_rate.num == profile[i].fps_num &&
4f6d9621ee00 add multi session streaming & add depending librarys.
Naoya OYAMA <naoya.oyama@gmail.com>
parents:
diff changeset
197 vs->r_frame_rate.den == profile[i].fps_den &&
4f6d9621ee00 add multi session streaming & add depending librarys.
Naoya OYAMA <naoya.oyama@gmail.com>
parents:
diff changeset
198 vc->bit_rate <= profile[i].max_bitrate)
4f6d9621ee00 add multi session streaming & add depending librarys.
Naoya OYAMA <naoya.oyama@gmail.com>
parents:
diff changeset
199 return 1;
4f6d9621ee00 add multi session streaming & add depending librarys.
Naoya OYAMA <naoya.oyama@gmail.com>
parents:
diff changeset
200
4f6d9621ee00 add multi session streaming & add depending librarys.
Naoya OYAMA <naoya.oyama@gmail.com>
parents:
diff changeset
201 /* video properties do not fit the requested profile */
4f6d9621ee00 add multi session streaming & add depending librarys.
Naoya OYAMA <naoya.oyama@gmail.com>
parents:
diff changeset
202 return 0;
4f6d9621ee00 add multi session streaming & add depending librarys.
Naoya OYAMA <naoya.oyama@gmail.com>
parents:
diff changeset
203 }
4f6d9621ee00 add multi session streaming & add depending librarys.
Naoya OYAMA <naoya.oyama@gmail.com>
parents:
diff changeset
204
4f6d9621ee00 add multi session streaming & add depending librarys.
Naoya OYAMA <naoya.oyama@gmail.com>
parents:
diff changeset
205 static wmv_video_profile_t
4f6d9621ee00 add multi session streaming & add depending librarys.
Naoya OYAMA <naoya.oyama@gmail.com>
parents:
diff changeset
206 wmv_video_profile_get (AVStream *vs, AVCodecContext *vc)
4f6d9621ee00 add multi session streaming & add depending librarys.
Naoya OYAMA <naoya.oyama@gmail.com>
parents:
diff changeset
207 {
4f6d9621ee00 add multi session streaming & add depending librarys.
Naoya OYAMA <naoya.oyama@gmail.com>
parents:
diff changeset
208 if (!vs || !vc)
4f6d9621ee00 add multi session streaming & add depending librarys.
Naoya OYAMA <naoya.oyama@gmail.com>
parents:
diff changeset
209 return WMV_VIDEO_PROFILE_INVALID;
4f6d9621ee00 add multi session streaming & add depending librarys.
Naoya OYAMA <naoya.oyama@gmail.com>
parents:
diff changeset
210
4f6d9621ee00 add multi session streaming & add depending librarys.
Naoya OYAMA <naoya.oyama@gmail.com>
parents:
diff changeset
211 if (is_valid_wmv9_video_profile (wmv9_profile_simple_low,
4f6d9621ee00 add multi session streaming & add depending librarys.
Naoya OYAMA <naoya.oyama@gmail.com>
parents:
diff changeset
212 sizeof (wmv9_profile_simple_low), vs, vc))
4f6d9621ee00 add multi session streaming & add depending librarys.
Naoya OYAMA <naoya.oyama@gmail.com>
parents:
diff changeset
213 return WMV_VIDEO_PROFILE_SIMPLE_LOW;
4f6d9621ee00 add multi session streaming & add depending librarys.
Naoya OYAMA <naoya.oyama@gmail.com>
parents:
diff changeset
214
4f6d9621ee00 add multi session streaming & add depending librarys.
Naoya OYAMA <naoya.oyama@gmail.com>
parents:
diff changeset
215 if (is_valid_wmv9_video_profile (wmv9_profile_simple_medium,
4f6d9621ee00 add multi session streaming & add depending librarys.
Naoya OYAMA <naoya.oyama@gmail.com>
parents:
diff changeset
216 sizeof (wmv9_profile_simple_medium),
4f6d9621ee00 add multi session streaming & add depending librarys.
Naoya OYAMA <naoya.oyama@gmail.com>
parents:
diff changeset
217 vs, vc))
4f6d9621ee00 add multi session streaming & add depending librarys.
Naoya OYAMA <naoya.oyama@gmail.com>
parents:
diff changeset
218 return WMV_VIDEO_PROFILE_SIMPLE_MEDIUM;
4f6d9621ee00 add multi session streaming & add depending librarys.
Naoya OYAMA <naoya.oyama@gmail.com>
parents:
diff changeset
219
4f6d9621ee00 add multi session streaming & add depending librarys.
Naoya OYAMA <naoya.oyama@gmail.com>
parents:
diff changeset
220 if (is_valid_wmv9_video_profile (wmv9_profile_main_medium,
4f6d9621ee00 add multi session streaming & add depending librarys.
Naoya OYAMA <naoya.oyama@gmail.com>
parents:
diff changeset
221 sizeof (wmv9_profile_main_medium), vs, vc))
4f6d9621ee00 add multi session streaming & add depending librarys.
Naoya OYAMA <naoya.oyama@gmail.com>
parents:
diff changeset
222 return WMV_VIDEO_PROFILE_MAIN_MEDIUM;
4f6d9621ee00 add multi session streaming & add depending librarys.
Naoya OYAMA <naoya.oyama@gmail.com>
parents:
diff changeset
223
4f6d9621ee00 add multi session streaming & add depending librarys.
Naoya OYAMA <naoya.oyama@gmail.com>
parents:
diff changeset
224 if (is_valid_wmv9_video_profile (wmv9_profile_main_high,
4f6d9621ee00 add multi session streaming & add depending librarys.
Naoya OYAMA <naoya.oyama@gmail.com>
parents:
diff changeset
225 sizeof (wmv9_profile_main_high), vs, vc))
4f6d9621ee00 add multi session streaming & add depending librarys.
Naoya OYAMA <naoya.oyama@gmail.com>
parents:
diff changeset
226 return WMV_VIDEO_PROFILE_MAIN_HIGH;
4f6d9621ee00 add multi session streaming & add depending librarys.
Naoya OYAMA <naoya.oyama@gmail.com>
parents:
diff changeset
227
4f6d9621ee00 add multi session streaming & add depending librarys.
Naoya OYAMA <naoya.oyama@gmail.com>
parents:
diff changeset
228 return WMV_VIDEO_PROFILE_INVALID;
4f6d9621ee00 add multi session streaming & add depending librarys.
Naoya OYAMA <naoya.oyama@gmail.com>
parents:
diff changeset
229 }
4f6d9621ee00 add multi session streaming & add depending librarys.
Naoya OYAMA <naoya.oyama@gmail.com>
parents:
diff changeset
230
4f6d9621ee00 add multi session streaming & add depending librarys.
Naoya OYAMA <naoya.oyama@gmail.com>
parents:
diff changeset
231 static dlna_profile_t *
4f6d9621ee00 add multi session streaming & add depending librarys.
Naoya OYAMA <naoya.oyama@gmail.com>
parents:
diff changeset
232 probe_wmv9 (AVFormatContext *ctx dlna_unused,
4f6d9621ee00 add multi session streaming & add depending librarys.
Naoya OYAMA <naoya.oyama@gmail.com>
parents:
diff changeset
233 dlna_container_type_t st,
4f6d9621ee00 add multi session streaming & add depending librarys.
Naoya OYAMA <naoya.oyama@gmail.com>
parents:
diff changeset
234 av_codecs_t *codecs)
4f6d9621ee00 add multi session streaming & add depending librarys.
Naoya OYAMA <naoya.oyama@gmail.com>
parents:
diff changeset
235 {
4f6d9621ee00 add multi session streaming & add depending librarys.
Naoya OYAMA <naoya.oyama@gmail.com>
parents:
diff changeset
236 wmv_video_profile_t vp;
4f6d9621ee00 add multi session streaming & add depending librarys.
Naoya OYAMA <naoya.oyama@gmail.com>
parents:
diff changeset
237 audio_profile_t ap;
4f6d9621ee00 add multi session streaming & add depending librarys.
Naoya OYAMA <naoya.oyama@gmail.com>
parents:
diff changeset
238 int i;
4f6d9621ee00 add multi session streaming & add depending librarys.
Naoya OYAMA <naoya.oyama@gmail.com>
parents:
diff changeset
239
4f6d9621ee00 add multi session streaming & add depending librarys.
Naoya OYAMA <naoya.oyama@gmail.com>
parents:
diff changeset
240 if (!stream_ctx_is_av (codecs))
4f6d9621ee00 add multi session streaming & add depending librarys.
Naoya OYAMA <naoya.oyama@gmail.com>
parents:
diff changeset
241 return NULL;
4f6d9621ee00 add multi session streaming & add depending librarys.
Naoya OYAMA <naoya.oyama@gmail.com>
parents:
diff changeset
242
4f6d9621ee00 add multi session streaming & add depending librarys.
Naoya OYAMA <naoya.oyama@gmail.com>
parents:
diff changeset
243 /* need to be in ASF container only */
4f6d9621ee00 add multi session streaming & add depending librarys.
Naoya OYAMA <naoya.oyama@gmail.com>
parents:
diff changeset
244 if (st != CT_ASF)
4f6d9621ee00 add multi session streaming & add depending librarys.
Naoya OYAMA <naoya.oyama@gmail.com>
parents:
diff changeset
245 return NULL;
4f6d9621ee00 add multi session streaming & add depending librarys.
Naoya OYAMA <naoya.oyama@gmail.com>
parents:
diff changeset
246
4f6d9621ee00 add multi session streaming & add depending librarys.
Naoya OYAMA <naoya.oyama@gmail.com>
parents:
diff changeset
247 /* check for WMV3 (Simple and Main profiles) video codec */
4f6d9621ee00 add multi session streaming & add depending librarys.
Naoya OYAMA <naoya.oyama@gmail.com>
parents:
diff changeset
248 if (codecs->vc->codec_id != CODEC_ID_WMV3)
4f6d9621ee00 add multi session streaming & add depending librarys.
Naoya OYAMA <naoya.oyama@gmail.com>
parents:
diff changeset
249 return NULL;
4f6d9621ee00 add multi session streaming & add depending librarys.
Naoya OYAMA <naoya.oyama@gmail.com>
parents:
diff changeset
250
4f6d9621ee00 add multi session streaming & add depending librarys.
Naoya OYAMA <naoya.oyama@gmail.com>
parents:
diff changeset
251 /* get video profile */
4f6d9621ee00 add multi session streaming & add depending librarys.
Naoya OYAMA <naoya.oyama@gmail.com>
parents:
diff changeset
252 vp = wmv_video_profile_get (codecs->vs, codecs->vc);
4f6d9621ee00 add multi session streaming & add depending librarys.
Naoya OYAMA <naoya.oyama@gmail.com>
parents:
diff changeset
253 if (vp == WMV_VIDEO_PROFILE_INVALID)
4f6d9621ee00 add multi session streaming & add depending librarys.
Naoya OYAMA <naoya.oyama@gmail.com>
parents:
diff changeset
254 return NULL;
4f6d9621ee00 add multi session streaming & add depending librarys.
Naoya OYAMA <naoya.oyama@gmail.com>
parents:
diff changeset
255
4f6d9621ee00 add multi session streaming & add depending librarys.
Naoya OYAMA <naoya.oyama@gmail.com>
parents:
diff changeset
256 /* get audio profile */
4f6d9621ee00 add multi session streaming & add depending librarys.
Naoya OYAMA <naoya.oyama@gmail.com>
parents:
diff changeset
257 ap = audio_profile_guess (codecs->ac);
4f6d9621ee00 add multi session streaming & add depending librarys.
Naoya OYAMA <naoya.oyama@gmail.com>
parents:
diff changeset
258 if (ap == AUDIO_PROFILE_INVALID)
4f6d9621ee00 add multi session streaming & add depending librarys.
Naoya OYAMA <naoya.oyama@gmail.com>
parents:
diff changeset
259 return NULL;
4f6d9621ee00 add multi session streaming & add depending librarys.
Naoya OYAMA <naoya.oyama@gmail.com>
parents:
diff changeset
260
4f6d9621ee00 add multi session streaming & add depending librarys.
Naoya OYAMA <naoya.oyama@gmail.com>
parents:
diff changeset
261 /* find profile according to container type, video and audio profiles */
4f6d9621ee00 add multi session streaming & add depending librarys.
Naoya OYAMA <naoya.oyama@gmail.com>
parents:
diff changeset
262 for (i = 0; wmv_profiles_mapping[i].profile; i++)
4f6d9621ee00 add multi session streaming & add depending librarys.
Naoya OYAMA <naoya.oyama@gmail.com>
parents:
diff changeset
263 if (wmv_profiles_mapping[i].vp == vp &&
4f6d9621ee00 add multi session streaming & add depending librarys.
Naoya OYAMA <naoya.oyama@gmail.com>
parents:
diff changeset
264 wmv_profiles_mapping[i].ap == ap)
4f6d9621ee00 add multi session streaming & add depending librarys.
Naoya OYAMA <naoya.oyama@gmail.com>
parents:
diff changeset
265 return wmv_profiles_mapping[i].profile;
4f6d9621ee00 add multi session streaming & add depending librarys.
Naoya OYAMA <naoya.oyama@gmail.com>
parents:
diff changeset
266
4f6d9621ee00 add multi session streaming & add depending librarys.
Naoya OYAMA <naoya.oyama@gmail.com>
parents:
diff changeset
267 return NULL;
4f6d9621ee00 add multi session streaming & add depending librarys.
Naoya OYAMA <naoya.oyama@gmail.com>
parents:
diff changeset
268 }
4f6d9621ee00 add multi session streaming & add depending librarys.
Naoya OYAMA <naoya.oyama@gmail.com>
parents:
diff changeset
269
4f6d9621ee00 add multi session streaming & add depending librarys.
Naoya OYAMA <naoya.oyama@gmail.com>
parents:
diff changeset
270 dlna_registered_profile_t dlna_profile_av_wmv9 = {
4f6d9621ee00 add multi session streaming & add depending librarys.
Naoya OYAMA <naoya.oyama@gmail.com>
parents:
diff changeset
271 .id = DLNA_PROFILE_AV_WMV9,
4f6d9621ee00 add multi session streaming & add depending librarys.
Naoya OYAMA <naoya.oyama@gmail.com>
parents:
diff changeset
272 .class = DLNA_CLASS_AV,
4f6d9621ee00 add multi session streaming & add depending librarys.
Naoya OYAMA <naoya.oyama@gmail.com>
parents:
diff changeset
273 .extensions = "asf,wmv",
4f6d9621ee00 add multi session streaming & add depending librarys.
Naoya OYAMA <naoya.oyama@gmail.com>
parents:
diff changeset
274 .probe = probe_wmv9,
4f6d9621ee00 add multi session streaming & add depending librarys.
Naoya OYAMA <naoya.oyama@gmail.com>
parents:
diff changeset
275 .next = NULL
4f6d9621ee00 add multi session streaming & add depending librarys.
Naoya OYAMA <naoya.oyama@gmail.com>
parents:
diff changeset
276 };