[Mplayer-cvslog] CVS: main/libmpcodecs ad_hwac3.c,1.1,1.2

Arpi of Ize arpi at mplayer.dev.hu
Wed Mar 27 22:05:50 CET 2002


Update of /cvsroot/mplayer/main/libmpcodecs
In directory mplayer:/var/tmp.root/cvs-serv23030

Modified Files:
	ad_hwac3.c 
Log Message:
ac3_iec958_build_burst moved from ac3-iec958.c

Index: ad_hwac3.c
===================================================================
RCS file: /cvsroot/mplayer/main/libmpcodecs/ad_hwac3.c,v
retrieving revision 1.1
retrieving revision 1.2
diff -u -r1.1 -r1.2
--- ad_hwac3.c	25 Mar 2002 21:06:01 -0000	1.1
+++ ad_hwac3.c	27 Mar 2002 21:05:39 -0000	1.2
@@ -1,5 +1,9 @@
+
+// Reference: DOCS/tech/hwac3.txt !!!!!
+
 #include <stdio.h>
 #include <stdlib.h>
+#include <string.h>
 #include <unistd.h>
 
 #include "config.h"
@@ -9,7 +13,6 @@
 #include "ad_internal.h"
 
 #include "../liba52/a52.h"
-#include "../ac3-iec958.h"
 
 extern int a52_fillbuff(sh_audio_t *sh_audio);
 
@@ -81,8 +84,23 @@
 {
   int len=-1;
   if(!sh_audio->a_in_buffer_len)
-    if((len=a52_fillbuff(sh_audio))<0) return len; /*EOF*/
+    if((len=a52_fillbuff(sh_audio))<=0) return len; /*EOF*/
   sh_audio->a_in_buffer_len=0;
-  len = ac3_iec958_build_burst(len, 0x01, 1, sh_audio->a_in_buffer, buf);
-  return len;
+
+//    int ac3_iec958_build_burst(int length, int data_type, int big_endian, unsigned char * data, unsigned char * out)
+//  len = ac3_iec958_build_burst(len, 0x01, 1, sh_audio->a_in_buffer, buf);
+
+	buf[0] = 0x72;
+	buf[1] = 0xF8;
+	buf[2] = 0x1F;
+	buf[3] = 0x4E;
+	buf[4] = 0x01; //(length) ? data_type : 0; /* & 0x1F; */
+	buf[5] = 0x00;
+	buf[6] = (len << 3) & 0xFF;
+	buf[7] = (len >> 5) & 0xFF;
+	swab(sh_audio->a_in_buffer, buf + 8, len);
+	//memcpy(buf + 8, sh_audio->a_in_buffer, len);
+	memset(buf + 8 + len, 0, 6144 - 8 - len);
+
+	return 6144;
 }




More information about the MPlayer-cvslog mailing list