aboutsummaryrefslogtreecommitdiffhomepage
path: root/libmpdemux
diff options
context:
space:
mode:
authorGravatar arpi <arpi@b3059339-0415-0410-9bf9-f77b7e298cf2>2002-08-27 23:01:54 +0000
committerGravatar arpi <arpi@b3059339-0415-0410-9bf9-f77b7e298cf2>2002-08-27 23:01:54 +0000
commitce0b26ac75c3f2d09622c237e685d6d906f6cfe8 (patch)
tree98ee47bb97ba68a9991619c9a40fd8045788807b /libmpdemux
parentfd234b141e88754e0b33913b61e296f6b73453fc (diff)
- added matrix cracking/debugging code - disabled
- use real codec headers for sipr git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@7106 b3059339-0415-0410-9bf9-f77b7e298cf2
Diffstat (limited to 'libmpdemux')
-rw-r--r--libmpdemux/demux_real.c29
1 files changed, 28 insertions, 1 deletions
diff --git a/libmpdemux/demux_real.c b/libmpdemux/demux_real.c
index f3ecf1c121..cb7864b492 100644
--- a/libmpdemux/demux_real.c
+++ b/libmpdemux/demux_real.c
@@ -8,6 +8,10 @@
TODO: fix the whole syncing mechanism
$Log$
+ Revision 1.25 2002/08/27 23:01:54 arpi
+ - added matrix cracking/debugging code - disabled
+ - use real codec headers for sipr
+
Revision 1.24 2002/08/25 00:07:15 arpi
some files has some shit before teh audio/video headers...
@@ -525,9 +529,30 @@ loop:
/* if DNET, swap bytes! */
if (sh_audio != NULL) {
+#ifdef CRACK_MATRIX
+ int spos=stream_tell(demuxer->stream);
+ static int cnt=0;
+ static int cnt2=CRACK_MATRIX;
+#endif
dp = new_demux_packet(len);
stream_read(demuxer->stream, dp->buffer, len);
- mp_dbg(MSGT_DEMUX,MSGL_DBG2,"audio block len=%d\n",len);
+#ifdef CRACK_MATRIX
+ printf("*** audio block len=%d\n",len);
+ { // HACK - used for reverse engineering the descrambling matrix
+ FILE* f=fopen("test.rm","r+");
+ fseek(f,spos,SEEK_SET);
+ ++cnt;
+// for(i=0;i<len;i++) dp->buffer[i]=i/0x12;
+// for(i=0;i<len;i++) dp->buffer[i]=i;
+// for(i=0;i<len;i++) dp->buffer[i]=cnt;
+// for(i=0;i<len;i++) dp->buffer[i]=cnt<<4;
+ for(i=0;i<len;i++) dp->buffer[i]=(i==cnt2) ? (cnt+16*(8+cnt)) : 0;
+ if(cnt==6){ cnt=0; ++cnt2; }
+ fwrite(dp->buffer, len, 1, f);
+ fclose(f);
+ if(cnt2>0x150) *((int*)NULL)=1; // sig11 :)
+ }
+#endif
if (sh_audio->format == 0x2000)
{
char *ptr = dp->buffer;
@@ -982,6 +1007,7 @@ void demux_open_real(demuxer_t* demuxer)
sh->format = 0x2000;
break;
case MKTAG('s', 'i', 'p', 'r'):
+#if 0
mp_msg(MSGT_DEMUX,MSGL_V,"Audio: SiproLab's ACELP.net\n");
sh->format = 0x130;
/* for buggy directshow loader */
@@ -1001,6 +1027,7 @@ void demux_open_real(demuxer_t* demuxer)
// sh->wf[sizeof(WAVEFORMATEX)+3] = 1;
// sh->wf[sizeof(WAVEFORMATEX)+4] = 0;
break;
+#endif
case MKTAG('c', 'o', 'o', 'k'):
mp_msg(MSGT_DEMUX,MSGL_V,"Audio: Real's GeneralCooker (?) (RealAudio G2?) (unsupported)\n");
sh->wf->cbSize = 4+2+24;