Lines Matching refs:mfi
312 struct media_file_info *mfi;
362 mfi = db_file_fetch_byid(id);
363 if (!mfi)
371 if (mfi->data_kind != 0)
390 transcode = transcode_needed(req->input_headers, mfi->codectype);
394 DPRINTF(E_INFO, L_HTTPD, "Preparing to transcode %s\n", mfi->path);
398 st->xcode = transcode_setup(mfi, &st->size, 1);
414 DPRINTF(E_INFO, L_HTTPD, "Preparing to stream %s\n", mfi->path);
428 st->fd = open(mfi->path, O_RDONLY);
431 DPRINTF(E_LOG, L_HTTPD, "Could not open %s: %s\n", mfi->path, strerror(errno));
438 ret = stat(mfi->path, &sb);
441 DPRINTF(E_LOG, L_HTTPD, "Could not stat() %s: %s\n", mfi->path, strerror(errno));
452 DPRINTF(E_LOG, L_HTTPD, "Could not seek into %s: %s\n", mfi->path, strerror(errno));
465 if (mfi->has_video)
468 ret = snprintf(buf, sizeof(buf), "video/%s", mfi->type);
481 else if (!evhttp_find_header(req->output_headers, "Content-Type") && mfi->type)
483 ret = snprintf(buf, sizeof(buf), "audio/%s", mfi->type);
527 st->id = mfi->id;
586 DPRINTF(E_INFO, L_HTTPD, "Kicking off streaming for %s\n", mfi->path);
588 free_mfi(mfi, 0);
604 free_mfi(mfi, 0);