Documented and nicified AMF parsing. Updated all existing code for this change, except for RTMP connector (which gets a rewrite, like, today).
This commit is contained in:
parent
1b86b9a5ef
commit
fab932253d
10 changed files with 404 additions and 341 deletions
|
@ -1,18 +1,16 @@
|
|||
#define DEBUG 10 //maximum debugging level evah
|
||||
#define DEBUG 10 //maximum debugging level
|
||||
#include <cstdlib>
|
||||
#include <iostream>
|
||||
#include <fstream>
|
||||
#include <string>
|
||||
#include "amf.cpp"
|
||||
#include "../util/amf.h"
|
||||
|
||||
int main() {
|
||||
std::string temp;
|
||||
while( std::cin.good() ) {
|
||||
temp += std::cin.get();
|
||||
}
|
||||
static AMFType amfdata("empty", (unsigned char)AMF0_DDV_CONTAINER);
|
||||
amfdata = parseAMF( (const unsigned char*)temp.c_str(), temp.length()-1 );
|
||||
amfdata.Print( );
|
||||
while (std::cin.good()){temp += std::cin.get();}//read all of std::cin to temp
|
||||
temp.erase(temp.size()-1, 1);//strip the invalid last character
|
||||
AMF::Object amfdata = AMF::parse(temp);//parse temp into an AMF::Object
|
||||
amfdata.Print();//pretty-print the object
|
||||
return 0;
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue