Changeset 44333
- Timestamp:
- 11/11/19 23:20:39 (4 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
titan/titan/httpdfunc.h
r44325 r44333 1124 1124 { 1125 1125 char* buf = NULL, *param1 = NULL, *tmpbuf = NULL; 1126 printf("#############################################\n");1127 1128 printf("[webvideo] param: %s\n",param);1129 printf("[webvideo] fmt: %d\n",fmt);1130 1126 1131 1127 if(param == NULL) return NULL; 1132 1128 1133 // if(ostrcmp("play=", param) == 0)1134 if(ostrstr(param, "play=") == param)1135 {1136 printf("[webvideo] free: %s\n",status.webplayfile);1137 1138 free(status.webplayfile); status.webplayfile = NULL;1139 printf("[webvideo] free: %s\n",status.webplayfile);1140 }1141 1142 1129 if(ostrcmp("status", param) == 0) // status is only available for queryraw 1143 1130 { 1144 printf("[webvideo] 111111111\n");1145 1146 1131 char buf[30]; 1147 1132 int active = (status.webplayfile != NULL ? 1 : 0); … … 1163 1148 return ostrcat(buf, NULL, 0, 0); 1164 1149 } 1165 printf("[webvideo] 222222222\n");1166 1150 1167 1151 //create param1 … … 1172 1156 if(param1 == NULL) return NULL; 1173 1157 1174 printf("[webvideo] 3333333333\n");1175 1176 1158 htmldecode(param1, param1); 1177 1159 if(param1 != NULL) 1178 1160 { 1179 printf("[webvideo] 4444444444\n");1180 1181 1161 if(status.play == 0 && status.webplayfile == NULL) 1182 1162 { 1183 printf("[webvideo] 5555555555\n");1184 1185 1163 if(ostrstr(param1, "url=") == param1) 1186 {1187 printf("[webvideo] 666666666666\n");1188 1189 1164 status.webplayfile = ostrcat(param1 + 4, NULL, 0, 0); 1190 }1191 1165 else if(ostrstr(param1, "hosterurl=") == param1) 1192 1166 { 1193 printf("[webvideo] 7777777777777\n");1194 1195 1167 status.webplayfile = ostrcat(param1 + 10, NULL, 0, 0); 1196 1168 … … 1212 1184 } 1213 1185 else 1214 {1215 printf("[webvideo] 88888888\n");1216 1217 1186 status.webplayfile = ostrcat(param1, NULL, 0, 0); 1218 } 1219 } 1220 printf("[webvideo] 99999999999999\n"); 1221 1187 } 1222 1188 } 1223 1189 tmpbuf = ostrcat("not in play mode", NULL, 0, 0); 1224 1225 printf("[webvideo] aaaaaaaaaaaaa\n");1226 printf("[webvideo] aaaaaaaaaaaaa status.play: %d\n",status.play);1227 printf("[webvideo] aaaaaaaaaaaaa status.timeshift: %d\n",status.timeshift);1228 printf("[webvideo] aaaaaaaaaaaaa status.webplayfile: %s\n",status.webplayfile);1229 1230 1190 1231 1191 int count = 0; 1232 1192 if(status.timeshift == 0 && status.play == 0 && (ostrcmp("play", param) == 0 || ostrcmp("play=", param) == 0)) 1233 1193 { 1234 printf("[webvideo] bbbbbbbbbbbb\n");1235 1236 1194 int count = 0; 1237 1195 … … 1247 1205 } 1248 1206 else 1249 {1250 printf("[webvideo] ccccccccccccccc\n");1251 1252 1207 count = 31; 1253 }1254 printf("[webvideo] dddddddddddddd\n");1255 1208 1256 1209 if(count >= 30 && status.play == 0) 1257 1210 { 1258 printf("[webvideo] eeeeeeeeeee\n");1259 1260 1211 free(status.webplayfile); status.webplayfile = NULL; 1261 1212 free(tmpbuf); tmpbuf = NULL; 1262 1213 tmpbuf = ostrcat("can not start playback", NULL, 0, 0); 1263 1214 } 1264 printf("[webvideo] fffffffffffffff\n");1265 1215 1266 1216 if(status.timeshift == 0 && status.play == 1) 1267 1217 { 1268 printf("[webvideo] ggggggggggggg\n");1269 1270 1218 if(ostrcmp("stop", param) == 0 || ostrcmp("stop=", param) == 0) 1271 1219 writerc(getrcconfigint("rcstop", NULL)); … … 1316 1264 } 1317 1265 } 1318 printf("[webvideo] hhhhhhhhhhhhh\n");1319 1266 1320 1267 if(fmt == 0) 1321 1268 { 1322 printf("[webvideo] iiiiiiiiiiiiiiiii\n");1323 1324 1269 buf = webcreatehead(buf, NULL, 1); 1325 1270 buf = ostrcat(buf, "<tr><td align=center valign=top><font class=biglabel><br><br>Video ", 1, 0); … … 1329 1274 } 1330 1275 else 1331 {1332 printf("[webvideo] jjjjjjjjjjjjjjjjjj\n");1333 1334 1276 buf = ostrcat(buf, tmpbuf, 1, 1); 1335 }1336 printf("[webvideo] kkkkkkkkkkkk \n");1337 printf("#############################################\n");1338 1277 1339 1278 return buf;
Note: See TracChangeset
for help on using the changeset viewer.