Browse Source

Merge commit 'a4baf96abd64cda68e3e4692b182bdf60745a14d'

* commit 'a4baf96abd64cda68e3e4692b182bdf60745a14d':
  avprobe: rename the prettyprint structures
  tools: Wording and formatting cosmetics

Conflicts:
	avprobe.c

Merged-by: Michael Niedermayer <michaelni@gmx.at>
tags/n2.0
Michael Niedermayer 12 years ago
parent
commit
b7ce510003
2 changed files with 9 additions and 9 deletions
  1. +4
    -4
      tools/graph2dot.c
  2. +5
    -5
      tools/pktdumper.c

+ 4
- 4
tools/graph2dot.c View File

@@ -36,7 +36,7 @@


static void usage(void) static void usage(void)
{ {
printf("Convert a libavfilter graph to a dot file\n");
printf("Convert a libavfilter graph to a dot file.\n");
printf("Usage: graph2dot [OPTIONS]\n"); printf("Usage: graph2dot [OPTIONS]\n");
printf("\n" printf("\n"
"Options:\n" "Options:\n"
@@ -137,7 +137,7 @@ int main(int argc, char **argv)
infilename = "/dev/stdin"; infilename = "/dev/stdin";
infile = fopen(infilename, "r"); infile = fopen(infilename, "r");
if (!infile) { if (!infile) {
fprintf(stderr, "Impossible to open input file '%s': %s\n",
fprintf(stderr, "Failed to open input file '%s': %s\n",
infilename, strerror(errno)); infilename, strerror(errno));
return 1; return 1;
} }
@@ -146,7 +146,7 @@ int main(int argc, char **argv)
outfilename = "/dev/stdout"; outfilename = "/dev/stdout";
outfile = fopen(outfilename, "w"); outfile = fopen(outfilename, "w");
if (!outfile) { if (!outfile) {
fprintf(stderr, "Impossible to open output file '%s': %s\n",
fprintf(stderr, "Failed to open output file '%s': %s\n",
outfilename, strerror(errno)); outfilename, strerror(errno));
return 1; return 1;
} }
@@ -179,7 +179,7 @@ int main(int argc, char **argv)
avfilter_register_all(); avfilter_register_all();


if (avfilter_graph_parse(graph, graph_string, NULL, NULL, NULL) < 0) { if (avfilter_graph_parse(graph, graph_string, NULL, NULL, NULL) < 0) {
fprintf(stderr, "Impossible to parse the graph description\n");
fprintf(stderr, "Failed to parse the graph description\n");
return 1; return 1;
} }




+ 5
- 5
tools/pktdumper.c View File

@@ -31,18 +31,18 @@
#include <io.h> #include <io.h>
#endif #endif


#define FILENAME_BUF_SIZE 4096

#include "libavutil/avstring.h" #include "libavutil/avstring.h"
#include "libavutil/time.h" #include "libavutil/time.h"
#include "libavformat/avformat.h" #include "libavformat/avformat.h"


#define FILENAME_BUF_SIZE 4096
#define PKTFILESUFF "_%08" PRId64 "_%02d_%010" PRId64 "_%06d_%c.bin" #define PKTFILESUFF "_%08" PRId64 "_%02d_%010" PRId64 "_%06d_%c.bin"


static int usage(int ret) static int usage(int ret)
{ {
fprintf(stderr, "dump (up to maxpkts) AVPackets as they are demuxed by libavformat.\n");
fprintf(stderr, "each packet is dumped in its own file named like `basename file.ext`_$PKTNUM_$STREAMINDEX_$STAMP_$SIZE_$FLAGS.bin\n");
fprintf(stderr, "Dump (up to maxpkts) AVPackets as they are demuxed by libavformat.\n");
fprintf(stderr, "Each packet is dumped in its own file named like\n");
fprintf(stderr, "$(basename file.ext)_$PKTNUM_$STREAMINDEX_$STAMP_$SIZE_$FLAGS.bin\n");
fprintf(stderr, "pktdumper [-nw] file [maxpkts]\n"); fprintf(stderr, "pktdumper [-nw] file [maxpkts]\n");
fprintf(stderr, "-n\twrite No file at all, only demux.\n"); fprintf(stderr, "-n\twrite No file at all, only demux.\n");
fprintf(stderr, "-w\tWait at end of processing instead of quitting.\n"); fprintf(stderr, "-w\tWait at end of processing instead of quitting.\n");
@@ -79,7 +79,7 @@ int main(int argc, char **argv)
if (strrchr(fntemplate, '.')) if (strrchr(fntemplate, '.'))
*strrchr(fntemplate, '.') = '\0'; *strrchr(fntemplate, '.') = '\0';
if (strchr(fntemplate, '%')) { if (strchr(fntemplate, '%')) {
fprintf(stderr, "can't use filenames containing '%%'\n");
fprintf(stderr, "cannot use filenames containing '%%'\n");
return usage(1); return usage(1);
} }
if (strlen(fntemplate) + sizeof(PKTFILESUFF) >= sizeof(fntemplate) - 1) { if (strlen(fntemplate) + sizeof(PKTFILESUFF) >= sizeof(fntemplate) - 1) {


Loading…
Cancel
Save