- char *res = curl_http_get(url, NULL);
- int pid=0;
- if (res) {
- char *pch, *pst;
- int version;
- pch = strtok_r(res, "\n", &pst);
- while (pch) {
-#if 0 /* DEBUG */
- printf("VideoFileInfo [%i] -> '%s'\n", pid, pch);
-#endif
- switch (pid) {
- case 0:
- version = atoi(pch);
- if (version != 1) break;
- case 1:
- video_file_fps = atof(pch);
- break;
- case 2:
- video_duration = atoll(pch);
- break;
- case 3:
- video_start_offset = atof(pch);
- break;
- case 4:
- video_aspect_ratio = atof(pch);
- break;
- default:
- break;
- }
- pch = strtok_r(NULL,"\n", &pst);
- ++pid;
- }
- free(res);