Implemented FMS encryption. Dat betekend werkend H264 en AAC, bitches!

This commit is contained in:
Thulinma 2010-08-24 16:17:19 +02:00
parent 94f587563c
commit 471de8614f
7 changed files with 671 additions and 12 deletions

View file

@ -205,11 +205,12 @@ void parseChunk(){
amfreply.getContentP(3)->addContent(AMFType("details", "PLS"));
amfreply.getContentP(3)->addContent(AMFType("clientid", (double)1));
SendChunk(4, 20, 1, amfreply.Pack());
amfreply = AMFType("container", (unsigned char)0xFF);
amfreply.addContent(AMFType("", "|RtmpSampleAccess"));//status reply
amfreply.addContent(AMFType("", (double)1, 0x01));//bool true - audioaccess
amfreply.addContent(AMFType("", (double)1, 0x01));//bool true - videoaccess
SendChunk(4, 20, next.msg_stream_id, amfreply.Pack());
//No clue what this does. Most real servers send it, though...
// amfreply = AMFType("container", (unsigned char)0xFF);
// amfreply.addContent(AMFType("", "|RtmpSampleAccess"));//status reply
// amfreply.addContent(AMFType("", (double)1, 0x01));//bool true - audioaccess
// amfreply.addContent(AMFType("", (double)1, 0x01));//bool true - videoaccess
// SendChunk(4, 20, next.msg_stream_id, amfreply.Pack());
chunk_snd_max = 1024*1024;
SendCTL(1, chunk_snd_max);//send chunk size max (msg 1)
ready4data = true;//start sending video data!
@ -231,7 +232,7 @@ void parseChunk(){
break;
default:
#ifdef DEBUG
fprintf(stderr, "Unknown chunk received! Probably protocol corruption, stopping parsing of incoming data.\n", next.msg_type_id);
fprintf(stderr, "Unknown chunk received! Probably protocol corruption, stopping parsing of incoming data.\n");
#endif
stopparsing = true;
break;