F4V Box Parsers
This commit is contained in:
parent
302765e7c8
commit
ea61c0b3a1
2 changed files with 40 additions and 0 deletions
19
ABST_Parser/Makefile
Normal file
19
ABST_Parser/Makefile
Normal file
|
@ -0,0 +1,19 @@
|
|||
SRC = main.cpp
|
||||
OBJ = $(SRC:.cpp=.o)
|
||||
OUT = Blah
|
||||
INCLUDES =
|
||||
CCFLAGS = -Wall -Wextra -funsigned-char -g
|
||||
CC = $(CROSS)g++
|
||||
LD = $(CROSS)ld
|
||||
AR = $(CROSS)ar
|
||||
LIBS = -lssl -lcrypto
|
||||
.SUFFIXES: .cpp
|
||||
.PHONY: clean default
|
||||
default: $(OUT)
|
||||
.cpp.o:
|
||||
$(CC) $(INCLUDES) $(CCFLAGS) -c $< -o $@
|
||||
$(OUT): $(OBJ)
|
||||
$(CC) $(LIBS) -o $(OUT) $(OBJ)
|
||||
clean:
|
||||
rm -rf $(OBJ) $(OUT) Makefile.bak *~
|
||||
|
21
ABST_Parser/main.cpp
Normal file
21
ABST_Parser/main.cpp
Normal file
|
@ -0,0 +1,21 @@
|
|||
#include <stdint.h>
|
||||
#include <iostream>
|
||||
#include <string>
|
||||
#include "../util/MP4/box_includes.h"
|
||||
|
||||
int main( ) {
|
||||
std::string temp;
|
||||
bool validinp = true;
|
||||
char thischar;
|
||||
while(validinp) {
|
||||
thischar = std::cin.get( );
|
||||
if(std::cin.good( ) ) {
|
||||
temp += thischar;
|
||||
} else {
|
||||
validinp = false;
|
||||
}
|
||||
}
|
||||
Box * TestBox = new Box((uint8_t*)temp.c_str( ), temp.size( ));
|
||||
TestBox->Parse( );
|
||||
delete TestBox;
|
||||
}
|
Loading…
Add table
Reference in a new issue