[NUT-devel] [nut]: r548 - in src/trunk/nututils: . Makefile demux_avi.c demux_ogg.c

ods15 subversion at mplayerhq.hu
Sat Feb 2 13:22:10 CET 2008


Author: ods15
Date: Sat Feb  2 13:22:09 2008
New Revision: 548

Log:
remove the old oggreader and avireader


Modified:
   src/trunk/nututils/   (props changed)
   src/trunk/nututils/Makefile
   src/trunk/nututils/demux_avi.c
   src/trunk/nututils/demux_ogg.c

Modified: src/trunk/nututils/Makefile
==============================================================================
--- src/trunk/nututils/Makefile	(original)
+++ src/trunk/nututils/Makefile	Sat Feb  2 13:22:09 2008
@@ -2,10 +2,7 @@ include ../config.mak
 
 CFLAGS += -I../libnut
 
-all: avireader nutmerge nutindex nutparse # oggreader
-
-%reader: demux_%.c
-	$(CC) $(CFLAGS) -DSTANDALONE $^ -o $@
+all: nutmerge nutindex nutparse
 
 nutmerge: demux_ogg.c demux_avi.c framer_vorbis.c framer_mp3.c framer_mpeg4.c nutmerge.c ../libnut/libnut.a # demux_nut.c
 	$(CC) $(CFLAGS) $^ -o $@
@@ -13,9 +10,9 @@ nutmerge: demux_ogg.c demux_avi.c framer
 %: %.c
 	$(CC) $(CFLAGS) $^ -o $@
 
-avireader nutindex nutmerge nutparse oggreader: nutmerge.h
+nutindex nutmerge nutparse: nutmerge.h
 
 clean:
-	rm -f *\~ nutmerge nutindex nutparse avireader oggreader *.o
+	rm -f *\~ nutmerge nutindex nutparse *.o
 
 .PHONY: all clean

Modified: src/trunk/nututils/demux_avi.c
==============================================================================
--- src/trunk/nututils/demux_avi.c	(original)
+++ src/trunk/nututils/demux_avi.c	Sat Feb  2 13:22:09 2008
@@ -402,19 +402,6 @@ static int fill_buffer(demuxer_priv_t * 
 
 	if (avi->cur >= avi->packets) return -1;
 
-	/*if ((avi->stream[0].last_pts % 1000) < N && avi->buf) {
-		p->next_pts = 0;
-		p->len = 5;
-		p->flags = NUT_FLAG_KEY;
-		p->stream = 2;//2 + (avi->stream[0].last_pts % 100);
-		p->pts = avi->stream[0].last_pts;
-		if (avi->stream[0].last_pts % 1000) p->flags |= NUT_FLAG_EOR;
-		*buf = (void*)avi;
-		free(avi->buf);
-		avi->buf = NULL;
-		return 0;
-	}*/
-
 	FREAD(avi->in, 4, fourcc);
 	FREAD(avi->in, 4, &len);
 	FIXENDIAN32(len);
@@ -470,119 +457,3 @@ demuxer_t avi_demuxer = {
 	fill_buffer,
 	uninit
 };
-
-
-#ifdef STANDALONE
-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;
-	int err = 0;
-	int i;
-	if (argc < 2) { printf("bleh, more params you fool...\n"); return 1; }
-
-	in = fopen(argv[1], "r");
-	avi = init(in);
-
-	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);
-	printf("dwReserved1: %u\n", avi->avih->dwReserved1);
-	printf("dwFlags: %u\n", avi->avih->dwFlags);
-	printf("dwTotalFrames: %u\n", avi->avih->dwTotalFrames);
-	printf("dwInitialFrames: %u\n", avi->avih->dwInitialFrames);
-	printf("dwStreams: %u\n", avi->avih->dwStreams);
-	printf("dwSuggestedBufferSize: %u\n", avi->avih->dwSuggestedBufferSize);
-	printf("dwWidth: %u\n", avi->avih->dwWidth);
-	printf("dwHeight: %u\n", avi->avih->dwHeight);
-	printf("dwScale: %u\n", avi->avih->dwScale);
-	printf("dwRate: %u\n", avi->avih->dwRate);
-	printf("dwStart: %u\n", avi->avih->dwStart);
-	printf("dwLength: %u\n", avi->avih->dwLength);
-
-	for (i = 0; i < avi->avih->dwStreams; i++) {
-		printf("\n");
-		printf("Stream header number %d\n", i);
-
-		printf(" fccType: %.4s\n", avi->stream[i].strh->fccType);
-		printf(" fccHandler: %.4s\n", avi->stream[i].strh->fccHandler);
-
-		printf(" dwFlags: %u\n", avi->stream[i].strh->dwFlags);
-		printf(" dwReserved1: %u\n", avi->stream[i].strh->dwReserved1);
-		printf(" dwInitialFrames: %u\n", avi->stream[i].strh->dwInitialFrames);
-		printf(" dwScale: %u\n", avi->stream[i].strh->dwScale);
-		printf(" dwRate: %u\n", avi->stream[i].strh->dwRate);
-		printf(" dwStart: %u\n", avi->stream[i].strh->dwStart);
-		printf(" dwLength: %u\n", avi->stream[i].strh->dwLength);
-		printf(" dwSuggestedBufferSize: %u\n", avi->stream[i].strh->dwSuggestedBufferSize);
-		printf(" dwQuality: %u\n", avi->stream[i].strh->dwQuality);
-		printf(" dwSampleSize: %u\n", avi->stream[i].strh->dwSampleSize);
-
-		printf(" rcframe: %u %u %u %u\n",
-			avi->stream[i].strh->rcframe[0], avi->stream[i].strh->rcframe[1],
-			avi->stream[i].strh->rcframe[2], avi->stream[i].strh->rcframe[3]);
-
-		if (avi->stream[i].type == 0) { // video
-			printf(" video:\n");
-			printf("  biSize: %u\n", avi->stream[i].video->biSize);
-			printf("  biWidth: %u\n", avi->stream[i].video->biWidth);
-			printf("  biHeight: %u\n", avi->stream[i].video->biHeight);
-			printf("  biPlanes: %u\n", avi->stream[i].video->biPlanes);
-			printf("  biBitCount: %u\n", avi->stream[i].video->biBitCount);
-
-			printf("  biCompression: %.4s\n", avi->stream[i].video->biCompression);
-
-			printf("  biSizeImage: %u\n", avi->stream[i].video->biSizeImage);
-			printf("  biXPelsPerMeter: %u\n", avi->stream[i].video->biXPelsPerMeter);
-			printf("  biYPelsPerMeter: %u\n", avi->stream[i].video->biYPelsPerMeter);
-			printf("  biClrUsed: %u\n", avi->stream[i].video->biClrUsed);
-			printf("  biClrImportant: %u\n", avi->stream[i].video->biClrImportant);
-		} else {
-			printf(" audio:\n");
-			printf("  wFormatTag: 0x%04X\n", *(uint16_t*)avi->stream[i].audio->wFormatTag);
-			printf("  nChannels: %u\n", avi->stream[i].audio->nChannels);
-			printf("  nSamplesPerSec: %u\n", avi->stream[i].audio->nSamplesPerSec);
-			printf("  nAvgBytesPerSec: %u\n", avi->stream[i].audio->nAvgBytesPerSec);
-			printf("  nBlockAlign: %u\n", avi->stream[i].audio->nBlockAlign);
-			printf("  wBitsPerSample: %u\n", avi->stream[i].audio->wBitsPerSample);
-			printf("  cbSize: %u\n", avi->stream[i].audio->cbSize);
-		}
-	}
-	printf("\nNum packets: %d\n", avi->packets);
-
-err_out:
-	uninit(avi);
-	fclose(in);
-	return err;
-}
-#endif // STANDALONE

Modified: src/trunk/nututils/demux_ogg.c
==============================================================================
--- src/trunk/nututils/demux_ogg.c	(original)
+++ src/trunk/nututils/demux_ogg.c	Sat Feb  2 13:22:09 2008
@@ -155,45 +155,3 @@ demuxer_t ogg_demuxer = {
 	uninit,
 	NULL
 };
-
-#ifdef STANDALONE
-int main(int argc, char *argv[]) {
-	FILE * in;
-	demuxer_priv_t * ogg = NULL;
-	int err = 0;
-	int i;
-	nut_packet_t p;
-	uint8_t * buf;
-
-	if (argc < 2) { printf("bleh, more params you fool...\n"); return 1; }
-
-	in = fopen(argv[1], "r");
-	ogg = init(in);
-	if ((err = get_headers(ogg))) return err;
-	printf("Streams: %d\n", ogg->nstreams);
-
-	for (i = 0; i < ogg->nstreams; i++) {
-		ogg_stream_t * os = &ogg->streams[i];
-		printf("\n");
-		printf("Stream: %d\n", i);
-		printf(" serial: %d\n", os->serial);
-		printf(" codec: %s\n", os->oc->fourcc);
-		printf(" timebase: %d / %d\n", os->time_base_nom, os->time_base_denom);
-		printf(" type: %d\n", os->oc->type);
-		if (!os->oc->type) { // video
-			printf("  res: %dx%d\n", os->width, os->height);
-		} else {
-			printf("  samplerate: %d / %d\n", os->samplerate_nom, os->samplerate_denom);
-			printf("  channels: %d\n", os->channel_count);
-		}
-	}
-	printf("\n");
-	while (!(err = get_packet(ogg, &p, &buf))) {
-		printf("pos: 0x%X stream: %d pts: %d len: %d key: %d\n", (int)ftell(in), p.stream, (int)p.pts, p.len, p.flags);
-	}
-	uninit(ogg);
-	fclose(in);
-	if (err == -1) err = 0;
-	return err;
-}
-#endif // STANDALONE



More information about the NUT-devel mailing list