Mdat functies toegvoegd
This commit is contained in:
parent
8bfc5d87c0
commit
5ca7a72b86
3 changed files with 17 additions and 1 deletions
|
@ -97,6 +97,7 @@ int mainHandler(int CONN_fd){
|
||||||
int ReqFragment = -1;
|
int ReqFragment = -1;
|
||||||
int temp;
|
int temp;
|
||||||
int CurrentFragment = -1;
|
int CurrentFragment = -1;
|
||||||
|
Interface * Flash_Interface = new Interface;
|
||||||
|
|
||||||
while (!socketError && !All_Hell_Broke_Loose){
|
while (!socketError && !All_Hell_Broke_Loose){
|
||||||
//only parse input if available or not yet init'ed
|
//only parse input if available or not yet init'ed
|
||||||
|
@ -207,6 +208,9 @@ int mainHandler(int CONN_fd){
|
||||||
if (handler == HANDLER_FLASH){
|
if (handler == HANDLER_FLASH){
|
||||||
if(tag->data[0] != 0x12 ) {
|
if(tag->data[0] != 0x12 ) {
|
||||||
FlashBuf.append(tag->data,tag->len);
|
FlashBuf.append(tag->data,tag->len);
|
||||||
|
//JARON:er is een Interface * Flash_Interface aangemaakt, met de functie Setmdat( std::string )
|
||||||
|
//JARON:kun je data setten( de hele string in 1 keer ) en met Getmdat krijg je de boxed
|
||||||
|
//JARON:versie als string terug.
|
||||||
} else {
|
} else {
|
||||||
FlashMeta = "";
|
FlashMeta = "";
|
||||||
FlashMeta.append(tag->data,tag->len);
|
FlashMeta.append(tag->data,tag->len);
|
||||||
|
|
|
@ -484,3 +484,13 @@ std::string Interface::GenerateLiveBootstrap( uint32_t CurMediaTime ) {
|
||||||
Result.append( (char*)abst->GetBox( )->GetBoxedData( ), (int)abst->GetBox( )->GetBoxedDataSize( ) );
|
Result.append( (char*)abst->GetBox( )->GetBoxedData( ), (int)abst->GetBox( )->GetBoxedDataSize( ) );
|
||||||
return Result;
|
return Result;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
void Interface::Setmdat( std::string data ) {
|
||||||
|
mdat->SetContent( data.c_str(), data.size( ) );
|
||||||
|
}
|
||||||
|
|
||||||
|
std::string Interface::Getmdat( ) {
|
||||||
|
std::string Result;
|
||||||
|
Result.append( (char*)mdat->GetBox( )->GetBoxedData( ), (int)mdat->GetBox( )->GetBoxedDataSize( ) );
|
||||||
|
return Result;
|
||||||
|
}
|
||||||
|
|
|
@ -1,5 +1,7 @@
|
||||||
#include "box_includes.h"
|
#include "box_includes.h"
|
||||||
|
|
||||||
|
#include <string>
|
||||||
|
|
||||||
class Interface {
|
class Interface {
|
||||||
public:
|
public:
|
||||||
Interface();
|
Interface();
|
||||||
|
@ -17,7 +19,7 @@ class Interface {
|
||||||
void AddSTSCEntry( uint32_t FirstChunk, uint32_t SamplesPerChunk, uint32_t Track );
|
void AddSTSCEntry( uint32_t FirstChunk, uint32_t SamplesPerChunk, uint32_t Track );
|
||||||
void EmptySTSC( uint32_t Track );
|
void EmptySTSC( uint32_t Track );
|
||||||
void SetOffsets( std::vector<uint32_t> NewOffsets, uint32_t Track );
|
void SetOffsets( std::vector<uint32_t> NewOffsets, uint32_t Track );
|
||||||
void SetData( uint8_t * Data, uint32_t DataSize );
|
void SetData( std::string data );
|
||||||
|
|
||||||
std::string GenerateLiveBootstrap( uint32_t CurMediaTime );
|
std::string GenerateLiveBootstrap( uint32_t CurMediaTime );
|
||||||
private:
|
private:
|
||||||
|
|
Loading…
Add table
Reference in a new issue