Temporary undo indenting fix (for merge!)
This commit is contained in:
parent
53542a7d3b
commit
b45153d051
2 changed files with 176 additions and 174 deletions
|
@ -20,6 +20,7 @@
|
|||
#include <mist/ts_packet.h> //TS support
|
||||
#include <mist/dtsc.h> //DTSC support
|
||||
#include <mist/mp4.h> //For initdata conversion
|
||||
|
||||
/// The main function of the connector
|
||||
/// \param conn A connection with the client
|
||||
/// \param streamname The name of the stream
|
||||
|
@ -80,7 +81,8 @@ int TS_Handler(Socket::Connection conn, std::string streamname){
|
|||
int TSType;
|
||||
bool FirstPic = true;
|
||||
while( DTMIData.size() ) {
|
||||
ThisNaluSize = (DTMIData[0] << 24) + (DTMIData[1] << 16) + (DTMIData[2] << 8) + DTMIData[3];
|
||||
ThisNaluSize = (DTMIData[0] << 24) + (DTMIData[1] << 16) +
|
||||
(DTMIData[2] << 8) + DTMIData[3];
|
||||
DTMIData.erase(0,4);//Erase the first four characters;
|
||||
TSType = (int)DTMIData[0] & 0x1F;
|
||||
if( TSType == 0x05 ) {
|
||||
|
@ -183,14 +185,11 @@ int TS_Handler(Socket::Connection conn, std::string streamname){
|
|||
|
||||
int main(int argc, char ** argv){
|
||||
Util::Config conf(argv[0], PACKAGE_VERSION);
|
||||
conf.addOption("streamname",
|
||||
JSON::fromString("{\"arg\":\"string\",\"arg_num\":1,\"help\":\"The name of the stream that this connector will transmit.\"}"));
|
||||
conf.addOption("streamname",JSON::fromString("{\"arg\":\"string\",\"arg_num\":1,\"help\":\"The name of the stream that this connector will transmit.\"}"));
|
||||
conf.addConnectorOptions(8888);
|
||||
conf.parseArgs(argc, argv);
|
||||
Socket::Server server_socket = Socket::Server(conf.getInteger("listen_port"), conf.getString("listen_interface"));
|
||||
if ( !server_socket.connected()){
|
||||
return 1;
|
||||
}
|
||||
if (!server_socket.connected()){return 1;}
|
||||
conf.activate();
|
||||
|
||||
while (server_socket.connected() && conf.is_active){
|
||||
|
|
|
@ -10,6 +10,7 @@
|
|||
#include <mist/ts_packet.h> //TS support
|
||||
#include <mist/dtsc.h> //DTSC support
|
||||
#include <mist/mp4.h> //For initdata conversion
|
||||
|
||||
int main( ) {
|
||||
char charBuffer[1024*10];
|
||||
unsigned int charCount;
|
||||
|
@ -30,6 +31,7 @@ int main(){
|
|||
MP4::AVCC avccbox;
|
||||
bool haveAvcc = false;
|
||||
|
||||
|
||||
while( std::cin.good() ) {
|
||||
if ( DTSCStream.parsePacket( StrData ) ) {
|
||||
if( !haveAvcc ) {
|
||||
|
@ -51,7 +53,8 @@ int main(){
|
|||
int TSType;
|
||||
bool FirstPic = true;
|
||||
while( DTMIData.size() ) {
|
||||
ThisNaluSize = (DTMIData[0] << 24) + (DTMIData[1] << 16) + (DTMIData[2] << 8) + DTMIData[3];
|
||||
ThisNaluSize = (DTMIData[0] << 24) + (DTMIData[1] << 16) +
|
||||
(DTMIData[2] << 8) + DTMIData[3];
|
||||
DTMIData.erase(0,4);//Erase the first four characters;
|
||||
TSType = (int)DTMIData[0] & 0x1F;
|
||||
if( TSType == 0x05 ) {
|
||||
|
|
Loading…
Add table
Reference in a new issue