Add verbose option to stagefright command

Currently this prints out the format of each buffer being read from
the input during 'dump' operation.

Change-Id: I44e59b96bfb07181d03903dab30c1b65f5eb6fcd
gugelfrei
Marco Nelissen 6 years ago
parent c22b754fa9
commit fffc153839

@ -78,6 +78,7 @@ static bool gForceToUseHardwareCodec;
static bool gPlaybackAudio;
static bool gWriteMP4;
static bool gDisplayHistogram;
static bool gVerbose = false;
static bool showProgress = true;
static String8 gWriteMP4Filename;
static String8 gComponentNameOverride;
@ -159,6 +160,11 @@ static void dumpSource(const sp<MediaSource> &source, const String8 &filename) {
break;
}
if (gVerbose) {
MetaDataBase &meta = mbuf->meta_data();
fprintf(stdout, "sample format: %s\n", meta.toString().c_str());
}
CHECK_EQ(
fwrite((const uint8_t *)mbuf->data() + mbuf->range_offset(),
1,
@ -630,6 +636,7 @@ static void usage(const char *me) {
fprintf(stderr, " -T allocate buffers from a surface texture\n");
fprintf(stderr, " -d(ump) output_filename (raw stream data to a file)\n");
fprintf(stderr, " -D(ump) output_filename (decoded PCM data to a file)\n");
fprintf(stderr, " -v be more verbose\n");
}
static void dumpCodecProfiles(bool queryDecoders) {
@ -708,7 +715,7 @@ int main(int argc, char **argv) {
sp<ALooper> looper;
int res;
while ((res = getopt(argc, argv, "haqn:lm:b:ptsrow:kN:xSTd:D:")) >= 0) {
while ((res = getopt(argc, argv, "vhaqn:lm:b:ptsrow:kN:xSTd:D:")) >= 0) {
switch (res) {
case 'a':
{
@ -832,6 +839,12 @@ int main(int argc, char **argv) {
break;
}
case 'v':
{
gVerbose = true;
break;
}
case '?':
case 'h':
default:

Loading…
Cancel
Save