More timestamp attempts...
This commit is contained in:
parent
e503e9789c
commit
a40270c871
2 changed files with 2 additions and 3 deletions
|
@ -121,14 +121,12 @@ int Connector_RTMP::Connector_RTMP(Socket::Connection conn){
|
||||||
}
|
}
|
||||||
if (viddone && auddone && justdone){
|
if (viddone && auddone && justdone){
|
||||||
if (viddata.len != 0){
|
if (viddata.len != 0){
|
||||||
viddata.tagTime(RTMPStream::getNowMS());
|
|
||||||
Socket.write(RTMPStream::SendMedia(viddata));
|
Socket.write(RTMPStream::SendMedia(viddata));
|
||||||
#if DEBUG >= 8
|
#if DEBUG >= 8
|
||||||
fprintf(stderr, "Sent tag to %i: [%u] %s\n", Socket.getSocket(), viddata.tagTime(), viddata.tagType().c_str());
|
fprintf(stderr, "Sent tag to %i: [%u] %s\n", Socket.getSocket(), viddata.tagTime(), viddata.tagType().c_str());
|
||||||
#endif
|
#endif
|
||||||
}
|
}
|
||||||
if (auddata.len != 0){
|
if (auddata.len != 0){
|
||||||
auddata.tagTime(RTMPStream::getNowMS());
|
|
||||||
Socket.write(RTMPStream::SendMedia(auddata));
|
Socket.write(RTMPStream::SendMedia(auddata));
|
||||||
#if DEBUG >= 8
|
#if DEBUG >= 8
|
||||||
fprintf(stderr, "Sent tag to %i: [%u] %s\n", Socket.getSocket(), auddata.tagTime(), auddata.tagType().c_str());
|
fprintf(stderr, "Sent tag to %i: [%u] %s\n", Socket.getSocket(), auddata.tagTime(), auddata.tagType().c_str());
|
||||||
|
|
|
@ -43,7 +43,6 @@ std::string RTMPStream::Chunk::Pack(){
|
||||||
unsigned int tmpi;
|
unsigned int tmpi;
|
||||||
unsigned char chtype = 0x00;
|
unsigned char chtype = 0x00;
|
||||||
//timestamp -= firsttime;
|
//timestamp -= firsttime;
|
||||||
//if (timestamp < prev.timestamp){timestamp = prev.timestamp;}
|
|
||||||
if ((prev.msg_type_id > 0) && (prev.cs_id == cs_id)){
|
if ((prev.msg_type_id > 0) && (prev.cs_id == cs_id)){
|
||||||
if (msg_stream_id == prev.msg_stream_id){
|
if (msg_stream_id == prev.msg_stream_id){
|
||||||
chtype = 0x40;//do not send msg_stream_id
|
chtype = 0x40;//do not send msg_stream_id
|
||||||
|
@ -56,6 +55,8 @@ std::string RTMPStream::Chunk::Pack(){
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
//override - we always sent type 0x00 if the timestamp has decreased since last chunk in this channel
|
||||||
|
if (timestamp < prev.timestamp){chtype = 0x00;}
|
||||||
}
|
}
|
||||||
if (cs_id <= 63){
|
if (cs_id <= 63){
|
||||||
output += (unsigned char)(chtype | cs_id);
|
output += (unsigned char)(chtype | cs_id);
|
||||||
|
|
Loading…
Add table
Reference in a new issue