Archived
diag: name the build's media capability; docs(GUIDE): the ffmpeg row
An AUTO probe that misses leaves one STATUS line in the configure log, and the engine boots green and 500s every media request; the startup report -- the part of a log to paste into an issue -- said nothing about the capability that decides it. mm::decoder_version() names it (the libavformat version, or "absent (built without libav*)"), reported on the startup report and /diagnostics (hardware.host.media), and GUIDE 1.1 lists the five -dev packages, the RAD_WITH_FFMPEG tri-state and the symptom.
This commit is contained in:
1 parent
0bb00a836d
commit
1720ed3f4a
6 files changed
+23
No files matched your search
@@ -5,6 +5,7 @@
|
||||
#include "rad_internal.h"
|
||||
|
||||
#include <algorithm>
|
||||
#include <cstdio>
|
||||
#include <cstring>
|
||||
|
||||
#ifdef RAD_HAVE_FFMPEG
|
||||
@@ -26,6 +27,8 @@ namespace mm {
|
||||
|
||||
bool decoder_available() { return false; }
|
||||
|
||||
std::string decoder_version() { return "absent (built without libav*)"; }
|
||||
|
||||
static int no_decoder(std::string* why) {
|
||||
if (why) *why = "this build has no media decoder: it was configured without libavformat / "
|
||||
"libavcodec / libswscale (RAD_WITH_FFMPEG)";
|
||||
@@ -57,6 +60,14 @@ int decode_audio(const uint8_t*, size_t, int32_t, int64_t, std::vector<float>*,
|
||||
|
||||
bool decoder_available() { return true; }
|
||||
|
||||
std::string decoder_version() {
|
||||
const unsigned v = avformat_version();
|
||||
char b[48];
|
||||
std::snprintf(b, sizeof(b), "libavformat %u.%u.%u", AV_VERSION_MAJOR(v), AV_VERSION_MINOR(v),
|
||||
AV_VERSION_MICRO(v));
|
||||
return b;
|
||||
}
|
||||
|
||||
namespace {
|
||||
|
||||
/* The only demuxers a request may reach. A format that can name another file (a playlist, a
|
||||
|
||||
Reference in new issue
Block a user