Fixed some RTMP input header isssues, removed empty tracks in listing sent from buffer to controller.
This commit is contained in:
parent
7334296ce1
commit
909df1f24e
2 changed files with 12 additions and 1 deletions
|
@ -72,8 +72,9 @@ namespace Buffer {
|
||||||
it->second.removeMember("keys");
|
it->second.removeMember("keys");
|
||||||
it->second.removeMember("frags");
|
it->second.removeMember("frags");
|
||||||
}
|
}
|
||||||
|
//delete empty trackname if present - these are never interesting
|
||||||
|
Storage["meta"]["tracks"].removeMember("");
|
||||||
}
|
}
|
||||||
|
|
||||||
ret = Storage.toString();
|
ret = Storage.toString();
|
||||||
Storage["log"].null();
|
Storage["log"].null();
|
||||||
return ret;
|
return ret;
|
||||||
|
|
|
@ -29,6 +29,7 @@ namespace Connector_RTMP {
|
||||||
bool inited = false; ///< Indicates whether we are ready to connect to the Buffer.
|
bool inited = false; ///< Indicates whether we are ready to connect to the Buffer.
|
||||||
bool noStats = false; ///< Indicates when no stats should be sent anymore. Used in push mode.
|
bool noStats = false; ///< Indicates when no stats should be sent anymore. Used in push mode.
|
||||||
bool stopParsing = false; ///< Indicates when to stop all parsing.
|
bool stopParsing = false; ///< Indicates when to stop all parsing.
|
||||||
|
bool streamReset = false;
|
||||||
|
|
||||||
//for reply to play command
|
//for reply to play command
|
||||||
int playTransaction = -1;///<The transaction number of the reply.
|
int playTransaction = -1;///<The transaction number of the reply.
|
||||||
|
@ -194,6 +195,7 @@ namespace Connector_RTMP {
|
||||||
ss.Send("P ");
|
ss.Send("P ");
|
||||||
ss.Send(Socket.getHost().c_str());
|
ss.Send(Socket.getHost().c_str());
|
||||||
ss.Send("\n");
|
ss.Send("\n");
|
||||||
|
streamReset = true;
|
||||||
noStats = true;
|
noStats = true;
|
||||||
}
|
}
|
||||||
//send a _result reply
|
//send a _result reply
|
||||||
|
@ -413,6 +415,14 @@ namespace Connector_RTMP {
|
||||||
case 9: //video data
|
case 9: //video data
|
||||||
case 18: //meta data
|
case 18: //meta data
|
||||||
if (ss.connected()){
|
if (ss.connected()){
|
||||||
|
if (streamReset){
|
||||||
|
//reset push data to empty, in case stream properties change
|
||||||
|
meta_out.null();
|
||||||
|
prebuffer.str("");
|
||||||
|
sending = false;
|
||||||
|
counter = 0;
|
||||||
|
streamReset = false;
|
||||||
|
}
|
||||||
F.ChunkLoader(next);
|
F.ChunkLoader(next);
|
||||||
JSON::Value pack_out = F.toJSON(meta_out);
|
JSON::Value pack_out = F.toJSON(meta_out);
|
||||||
if ( !pack_out.isNull()){
|
if ( !pack_out.isNull()){
|
||||||
|
|
Loading…
Add table
Reference in a new issue