make docs now works (needs doxygen installed), added documentation to a LOT of stuff, refactored most utility functions, complete rewrites of DDV sockets and the FLV parsers, updated HTTP_Box_Parser and Connector_HTTP to be able to cope with these new changes - Connector_RTMP, Buffer and Connector_RAW are currently broken. Need to be fixed ASAP.

This commit is contained in:
Thulinma 2011-04-06 03:53:30 +02:00
parent 1ea85a27df
commit cc78697ba2
19 changed files with 1470 additions and 918 deletions

View file

@ -1,4 +1,4 @@
SRC = main.cpp
SRC = main.cpp ../util/flv_tag.cpp ../util/http_parser.cpp ../util/ddv_socket.cpp
OBJ = $(SRC:.cpp=.o)
OUT = Box_Parser
INCLUDES =

View file

@ -2,25 +2,25 @@
#include <iostream>
#include <string>
#include <stdio.h>
#include "../util/http_parser.cpp"
#include "../util/http_parser.h"
#include "../util/MP4/box_includes.h"
#include "../util/flv_data.cpp"
#include "../util/flv_tag.h"
int main(){
HTTPReader H;
FLV_Pack * F = 0;
FLV::Tag F;
unsigned int P = 0;
char * Payload = 0;
while (H.ReadSocket(stdin) || H.CleanForNext()){
while (H.Read(stdin) || H.CleanForNext()){
if (H.body.size() > 10000){
Box * TestBox = new Box((uint8_t*)H.body.c_str(), H.body.size());
Payload = (char*)TestBox->GetPayload();
printf("First bytes: %2hhu %2hhu %2hhu %2hhu\n", Payload[0], Payload[1], Payload[2], Payload[3]);
P = 0;
while (TestBox->GetPayloadSize() > P){
if (FLV_GetPacket(F, Payload, TestBox->GetPayloadSize(), P)){
std::cout << "Got a " << F->len << " bytes " << F->tagType() << " FLV tag of time " << F->tagTime() << "." << std::endl;
if (F.MemLoader(Payload, TestBox->GetPayloadSize(), P)){
std::cout << "Got a " << F.len << " bytes " << F.tagType() << " FLV tag of time " << F.tagTime() << "." << std::endl;
}
}
delete TestBox;