[Mplayer-cvslog] CVS: main/libmp1e/systems mpeg.h,1.1,1.2 mpeg1.c,1.1,1.2 mpeg2.c,1.1,1.2 rte_output.c,1.1,1.2 systems.c,1.1,1.2 vcd.c,1.1,1.2

David Holm mswitch at mplayer.dev.hu
Thu Jan 10 22:01:11 CET 2002


Update of /cvsroot/mplayer/main/libmp1e/systems
In directory mplayer:/var/tmp.root/cvs-serv32532/libmp1e/systems

Modified Files:
	mpeg.h mpeg1.c mpeg2.c rte_output.c systems.c vcd.c 
Log Message:
Quickly removed all audio stuff, audio subdir should be removed from cvs


Index: mpeg.h
===================================================================
RCS file: /cvsroot/mplayer/main/libmp1e/systems/mpeg.h,v
retrieving revision 1.1
retrieving revision 1.2
diff -u -r1.1 -r1.2
--- mpeg.h	4 Dec 2001 23:57:32 -0000	1.1
+++ mpeg.h	10 Jan 2002 21:01:08 -0000	1.2
@@ -25,14 +25,12 @@
 #define PACK_START_CODE			0x000001BAL
 #define SYSTEM_HEADER_CODE		0x000001BBL
 
-#define ALL_AUDIO_STREAMS		0xB8
 #define ALL_VIDEO_STREAMS		0xB9
 
 #define PROGRAM_STREAM_MAP		0xBC
 #define PRIVATE_STREAM_1		0xBD
 #define PADDING_STREAM			0xBE
 #define PRIVATE_STREAM_2		0xBF
-#define AUDIO_STREAM			0xC0		// 0xC0 ... 0xDF
 #define VIDEO_STREAM			0xE0		// 0xE0 ... 0xEF
 #define ECM_STREAM			0xF0
 #define EMM_STREAM			0xF1
@@ -41,7 +39,6 @@
 /* RESERVED_STREAM 0xF4 ... 0xFE */
 #define PROGRAM_STREAM_DIRECTORY	0xFF
 
-#define IS_AUDIO_STREAM(stream_id) (((unsigned int)(stream_id) & (~0x1F)) == AUDIO_STREAM)
 #define IS_VIDEO_STREAM(stream_id) (((unsigned int)(stream_id) & (~0x0F)) == VIDEO_STREAM)
 
 #define MARKER_SCR			2

Index: mpeg1.c
===================================================================
RCS file: /cvsroot/mplayer/main/libmp1e/systems/mpeg1.c,v
retrieving revision 1.1
retrieving revision 1.2
diff -u -r1.1 -r1.2
--- mpeg1.c	4 Dec 2001 23:57:32 -0000	1.1
+++ mpeg1.c	10 Jan 2002 21:01:08 -0000	1.2
@@ -28,7 +28,6 @@
 #include <limits.h>
 #include "../video/mpeg.h"
 #include "../video/video.h"
-#include "../audio/libaudio.h"
 #include "../common/log.h"
 #include "../common/fifo.h"
 #include "../common/math.h"
@@ -98,7 +97,6 @@
 system_header(multiplexer *mux, unsigned char *p, double system_rate_bound)
 {
 	int mux_rate_bound = ((unsigned int) ceil(system_rate_bound + 49)) / 50;
-	int audio_bound = 0;
 	int video_bound = 0;
 	unsigned char *ph;
 	stream *str;
@@ -114,9 +112,6 @@
 		if (IS_VIDEO_STREAM(str->stream_id)) {
 			put(p + 1, (0x3 << 14) + (1 << 13) + ((40960 + 1023) >> 10), 2);
 			video_bound++;
-		} else if (IS_AUDIO_STREAM(str->stream_id)) {
-			put(p + 1, (0x3 << 14) + (0 << 13) + ((4096 + 127) >> 7), 2);
-			audio_bound++;
 		} else if (str->stream_id == PRIVATE_STREAM_1) {
 			put(p + 1, (0x3 << 14) + (0 << 13) + ((1504 + 127) >> 7), 2);
 		} else if (0 < (1 << (13 + 7))) {
@@ -133,7 +128,7 @@
 	put(ph + 6, (mux_rate_bound >> 15) | 0x80, 1);
 	put(ph + 7, mux_rate_bound >> 7, 1);
 	put(ph + 8, (mux_rate_bound << 1) | 1, 1);
-	put(ph + 9, (audio_bound << 2) + (0 << 1) + (0 << 0), 1);
+	put(ph + 9, (0 << 2) + (0 << 1) + (0 << 0), 1);
 	put(ph + 10, (0 << 7) + (0 << 6) + (0x1 << 5) + (video_bound << 0), 1);
 	put(ph + 11, 0xFF, 1);
 	/*
@@ -191,11 +186,6 @@
 		return FALSE;
 	}
 
-	if (!IS_AUDIO_STREAM(str->stream_id))
-		str->eff_bit_rate +=
-			((buf->used * 8 * str->frame_rate)
-			 - str->eff_bit_rate) * Rvid;
-
 #if CDLOG
 	if (IS_VIDEO_STREAM(str->stream_id)) {
 		double stime = str->cap_t0 +
@@ -205,13 +195,6 @@
 			str->stream_id, buf->time, stime, buf->time - stime);
 
 		str->frame_count++;
-	} else if (IS_AUDIO_STREAM(str->stream_id)) {
-		double stime = str->cap_t0 + str->frame_count / str->frame_rate;
-
-		fprintf(cdlog, "%02x: I%15.10f S%15.10f %+15.10f\n",
-			str->stream_id, buf->time, stime, buf->time - stime);
-
-		str->frame_count++;
 	}
 #endif
 
@@ -484,12 +467,6 @@
 				printv(1, ", %5.2f %% dropped",
 					100.0 * video_frames_dropped / video_frame_count);
 
-
-#if 0 /* garetxe: num_buffers_queued doesn't exist any longer */
-			printv(1, ", fifo v=%5.2f%% a=%5.2f%%",
-			       100.0 * num_buffers_queued(video_fifo) / video_fifo->num_buffers,
-			       100.0 * num_buffers_queued(audio_fifo) / audio_fifo->num_buffers);
-#endif
 			printv(1, (verbose > 3) ? "\n" : "  \r");
 
 			fflush(stderr);

Index: mpeg2.c
===================================================================
RCS file: /cvsroot/mplayer/main/libmp1e/systems/mpeg2.c,v
retrieving revision 1.1
retrieving revision 1.2
diff -u -r1.1 -r1.2
--- mpeg2.c	4 Dec 2001 23:57:32 -0000	1.1
+++ mpeg2.c	10 Jan 2002 21:01:08 -0000	1.2
@@ -28,7 +28,6 @@
 #include <limits.h>
 #include "../video/mpeg.h"
 #include "../video/video.h"
-#include "../audio/libaudio.h"
 #include "../common/log.h"
 #include "../common/fifo.h"
 #include "../common/math.h"
@@ -121,7 +120,6 @@
 PS_system_header(multiplexer *mux, unsigned char *p, double system_rate_bound)
 {
 	int mux_rate_bound = ((unsigned int) ceil(system_rate_bound + 49)) / 50;
-	int audio_bound = 0;
 	int video_bound = 0;
 	unsigned char *ph;
 	stream *str;
@@ -137,9 +135,6 @@
 		if (IS_VIDEO_STREAM(str->stream_id)) {
 			put(p + 1, (0x3 << 14) + (1 << 13) + ((40960 + 1023) >> 10), 2);
 			video_bound++;
-		} else if (IS_AUDIO_STREAM(str->stream_id)) {
-			put(p + 1, (0x3 << 14) + (0 << 13) + ((4096 + 127) >> 7), 2);
-			audio_bound++;
 		} else if (str->stream_id == PRIVATE_STREAM_1) {
 			put(p + 1, (0x3 << 14) + (0 << 13) + ((1504 + 127) >> 7), 2);
 		} else if (0 < (1 << (13 + 7))) {
@@ -159,7 +154,7 @@
 	put(ph + 6, (mux_rate_bound >> 15) | 0x80, 1);
 	put(ph + 7, mux_rate_bound >> 7, 1);
 	put(ph + 8, (mux_rate_bound << 1) | 1, 1);
-	put(ph + 9, (audio_bound << 2) + (0 << 1) + (0 << 0), 1);
+	put(ph + 9, (0 << 2) + (0 << 1) + (0 << 0), 1);
 	put(ph + 10, (0 << 7) + (0 << 6) + (0x1 << 5) + (video_bound << 0), 1);
 	put(ph + 11, 0xFF, 1);
 	/*
@@ -226,11 +221,6 @@
 		str->left = 0; /* XXX */
 		return FALSE;
 	}
-
-	if (!IS_AUDIO_STREAM(str->stream_id))
-		str->eff_bit_rate +=
-			((buf->used * 8 * str->frame_rate)
-			 - str->eff_bit_rate) * Rvid;
 
 	if (ph) {
 		if (IS_VIDEO_STREAM(str->stream_id)) {

Index: rte_output.c
===================================================================
RCS file: /cvsroot/mplayer/main/libmp1e/systems/rte_output.c,v
retrieving revision 1.1
retrieving revision 1.2
diff -u -r1.1 -r1.2
--- rte_output.c	4 Dec 2001 23:57:32 -0000	1.1
+++ rte_output.c	10 Jan 2002 21:01:08 -0000	1.2
@@ -28,7 +28,6 @@
 #include <assert.h>
 #include "../video/mpeg.h"
 #include "../video/video.h"
-#include "../audio/mpeg.h"
 #include "../options.h"
 #include "../common/fifo.h"
 #include "../common/log.h"

Index: systems.c
===================================================================
RCS file: /cvsroot/mplayer/main/libmp1e/systems/systems.c,v
retrieving revision 1.1
retrieving revision 1.2
diff -u -r1.1 -r1.2
--- systems.c	4 Dec 2001 23:57:32 -0000	1.1
+++ systems.c	10 Jan 2002 21:01:08 -0000	1.2
@@ -26,7 +26,6 @@
 #include <errno.h>
 #include <assert.h>
 #include "../video/mpeg.h"
-#include "../audio/libaudio.h"
 #include "../video/video.h"
 #include "../common/math.h"
 #include "../options.h"
@@ -367,12 +366,6 @@
 
 	case PACKET_START_CODE + PRIVATE_STREAM_2:
 		return "private_stream_2";
-		break;
-
-	case PACKET_START_CODE + AUDIO_STREAM ... 
-	     PACKET_START_CODE + AUDIO_STREAM + 0x1F:
-		sprintf(buf, "audio_stream_%d", code & 0x1F);
-		return buf;
 		break;
 
 	case PACKET_START_CODE + VIDEO_STREAM ... 

Index: vcd.c
===================================================================
RCS file: /cvsroot/mplayer/main/libmp1e/systems/vcd.c,v
retrieving revision 1.1
retrieving revision 1.2
diff -u -r1.1 -r1.2
--- vcd.c	4 Dec 2001 23:57:32 -0000	1.1
+++ vcd.c	10 Jan 2002 21:01:08 -0000	1.2
@@ -41,7 +41,6 @@
 #include <limits.h>
 #include "../video/mpeg.h"
 #include "../video/video.h"
-#include "../audio/libaudio.h"
 #include "../common/log.h"
 #include "../common/fifo.h"
 #include "../common/math.h"
@@ -111,7 +110,6 @@
 system_header(unsigned char *p, stream *str, double system_rate_bound)
 {
 	int mux_rate_bound = ((unsigned int) ceil(system_rate_bound + 49)) / 50;
-	int audio_bound = 0;
 	int video_bound = 0;
 
 	assert(mux_rate_bound > 0);
@@ -121,9 +119,6 @@
 	if (str->stream_id == VIDEO_STREAM + 0) {
 		put(p + 13, (0x3 << 14) + (1 << 13) + (47104 >> 10), 2);
 		video_bound++;
-	} else if (str->stream_id == AUDIO_STREAM + 0) {
-		put(p + 13, (0x3 << 14) + (0 << 13) + (4096 >> 7), 2);
-		audio_bound++;
 	} else {
 		FAIL("Stream id mismatch\n");
 	}
@@ -133,7 +128,7 @@
 	put(p + 6, (mux_rate_bound >> 15) | 0x80, 1);
 	put(p + 7, mux_rate_bound >> 7, 1);
 	put(p + 8, (mux_rate_bound << 1) | 1, 1);
-	put(p + 9, (audio_bound << 2) + (0 << 1) + (0 << 0), 1);
+	put(p + 9, (0 << 2) + (0 << 1) + (0 << 0), 1);
 	put(p + 10, (0 << 7) + (0 << 6) + (0x1 << 5) + (video_bound << 0), 1);
 	put(p + 11, 0xFF, 1);
 	/*
@@ -256,7 +251,6 @@
 	double ticks_per_pack, tscr;
 	double scr, pts, front_pts = 0.0;
 	stream *str, *video_stream = NULL;
-	stream *audio_stream = NULL;
 	bool do_pad = TRUE;
 	buffer *buf;
 
@@ -281,10 +275,6 @@
 				video_frame_rate = frame_rate;
 				if (abs(str->bit_rate - 1152000) > 20000)
 					do_pad = FALSE;
-			} else {
-				audio_stream = str;
-				if (abs(str->bit_rate - 224000) > 5000)
-					do_pad = FALSE;
 			}
 
 			buf = wait_full_buffer(&str->cons);
@@ -299,8 +289,8 @@
 			nstreams++;
 		}
 
-		if (!video_stream || !audio_stream || nstreams != 2)
-			FAIL("One video, one audio stream required");
+		if (!video_stream || nstreams != 2)
+			FAIL("One video stream required");
 
 		buf = mux_output(mux, NULL);
 
@@ -332,7 +322,7 @@
 
 	p = buf->data;
 	p = pack_header(p, scr, system_rate);
-	p = system_header(p, audio_stream, system_rate_bound);
+	p = system_header(p, 0, system_rate_bound);
 
 	if (do_pad)
 		p = padding_packet(p, buf->data + buf->size - p);




More information about the MPlayer-cvslog mailing list