[NUT-devel] [NUT] (ods15): r121 - in /trunk: README nututils/ nututils/Makefile nututils/demux_avi.c
syncmail at mplayerhq.hu
syncmail at mplayerhq.hu
Sun Apr 2 20:02:52 CEST 2006
Author: ods15
Date: Sun Apr 2 20:02:52 2006
New Revision: 121
Log:
merge riffreader and avireader
Modified:
trunk/README
trunk/nututils/ (props changed)
trunk/nututils/Makefile
trunk/nututils/demux_avi.c
Modified: trunk/README
==============================================================================
--- trunk/README (original)
+++ trunk/README Sun Apr 2 20:02:52 2006
@@ -24,7 +24,7 @@
to debug:
Always look at $? !
-./riffreader bla.avi; ./avireader bla.avi
+./avireader bla.avi
./oggreader bla.ogg
Modified: trunk/nututils/Makefile
==============================================================================
--- trunk/nututils/Makefile (original)
+++ trunk/nututils/Makefile Sun Apr 2 20:02:52 2006
@@ -2,10 +2,8 @@
CFLAGS += -I../libnut -lm
-all: riffreader avireader nutmerge nutindex # oggreader
+all: avireader nutmerge nutindex # oggreader
-riffreader: demux_avi.c
- ${CC} ${CFLAGS} -DRIFF_PROG $^ -o $@
avireader: demux_avi.c
${CC} ${CFLAGS} -DAVI_PROG $^ -o $@
oggreader: demux_ogg.c
@@ -16,4 +14,4 @@
${CC} ${CFLAGS} $^ -o $@
clean:
- rm -f *\~ nutmerge nutindex avireader oggreader riffreader *.o
+ rm -f *\~ nutmerge nutindex avireader oggreader *.o
Modified: trunk/nututils/demux_avi.c
==============================================================================
--- trunk/nututils/demux_avi.c (original)
+++ trunk/nututils/demux_avi.c Sun Apr 2 20:02:52 2006
@@ -477,56 +477,31 @@
};
-#ifdef RIFF_PROG
-void ready_stream(stream_t * streams){}
-void push_packet(stream_t * stream, packet_t * p){}
-void free_streams(stream_t * streams){}
-int get_stream_packet(stream_t * stream, packet_t * p){return 0;}
-void print_riff_tree(riff_tree_t * tree, int indent) {
- char ind[indent + 1];
- int i;
- memset(ind, ' ', indent);
- ind[indent] = 0;
-
- if (tree->type == 0) {
- printf("%s%4.4s: offset: %d name: `%4.4s', len: %u (amount: %d)\n",
- ind, tree->name, tree->offset, tree->listname, tree->len, tree->amount);
- for (i = 0; i < tree->amount; i++) {
- print_riff_tree(&tree->tree[i], indent + 4);
- }
- } else {
- printf("%sDATA: offset: %d name: `%4.4s', len: %u\n",
- ind, tree->offset, tree->name, tree->len);
- }
-}
-
-FILE * stats = NULL;
-int main(int argc, char * argv []) {
- FILE * in;
- full_riff_tree_t * full = init_riff();
- int err = 0;
- int i;
- if (argc < 2) { printf("bleh, more params you fool...\n"); return 1; }
- in = fopen(argv[1], "r");
-
- if ((err = get_full_riff_tree(in, full))) goto err_out;
- for (i = 0; i < full->amount; i++) {
- print_riff_tree(&full->tree[i], 0);
- }
-
-err_out:
- uninit_riff(full);
- fclose(in);
- return err;
-}
-#endif
-
#ifdef AVI_PROG
void ready_stream(stream_t * streams){}
void push_packet(stream_t * stream, packet_t * p){}
void free_streams(stream_t * streams){}
int get_stream_packet(stream_t * stream, packet_t * p){return 0;}
FILE * stats = NULL;
+
+void print_riff_tree(riff_tree_t * tree, int indent) {
+ char ind[indent + 1];
+ int i;
+ memset(ind, ' ', indent);
+ ind[indent] = 0;
+
+ if (tree->type == 0) {
+ printf("%s%4.4s: offset: %d name: `%4.4s', len: %u (amount: %d)\n",
+ ind, tree->name, tree->offset, tree->listname, tree->len, tree->amount);
+ for (i = 0; i < tree->amount; i++) {
+ print_riff_tree(&tree->tree[i], indent + 4);
+ }
+ } else {
+ printf("%sDATA: offset: %d name: `%4.4s', len: %u\n",
+ ind, tree->offset, tree->name, tree->len);
+ }
+}
+
int main(int argc, char * argv []) {
FILE * in;
demuxer_priv_t * avi = NULL;
@@ -539,6 +514,11 @@
if ((err = avi_read_headers(avi))) goto err_out;
+ for (i = 0; i < avi->riff->amount; i++) {
+ print_riff_tree(&avi->riff->tree[i], 0);
+ }
+
+ printf("\n");
printf("Main AVI Header:\n");
printf("dwMicroSecPerFrame: %u\n", avi->avih->dwMicroSecPerFrame);
printf("dwMaxBytesPerSec: %u\n", avi->avih->dwMaxBytesPerSec);
More information about the NUT-devel
mailing list