Fixed RTSP input not counting as input, fixed UDP-style input disconnect bug
# Conflicts: # src/output/output.h
This commit is contained in:
parent
28106cf396
commit
7b1ef6c76e
3 changed files with 12 additions and 2 deletions
|
@ -95,12 +95,12 @@ namespace Mist {
|
||||||
int pageNumMax(long unsigned int trackId);
|
int pageNumMax(long unsigned int trackId);
|
||||||
bool isRecordingToFile;
|
bool isRecordingToFile;
|
||||||
unsigned int lastStats;///<Time of last sending of stats.
|
unsigned int lastStats;///<Time of last sending of stats.
|
||||||
long long unsigned int firstTime;///< Time of first packet after last seek. Used for real-time sending.
|
|
||||||
std::map<unsigned long, unsigned long> nxtKeyNum;///< Contains the number of the next key, for page seeking purposes.
|
std::map<unsigned long, unsigned long> nxtKeyNum;///< Contains the number of the next key, for page seeking purposes.
|
||||||
std::set<sortedPageInfo> buffer;///< A sorted list of next-to-be-loaded packets.
|
std::set<sortedPageInfo> buffer;///< A sorted list of next-to-be-loaded packets.
|
||||||
bool sought;///<If a seek has been done, this is set to true. Used for seeking on prepareNext().
|
bool sought;///<If a seek has been done, this is set to true. Used for seeking on prepareNext().
|
||||||
uint64_t lastRecv;
|
|
||||||
protected://these are to be messed with by child classes
|
protected://these are to be messed with by child classes
|
||||||
|
uint64_t lastRecv;
|
||||||
|
long long unsigned int firstTime;///< Time of first packet after last seek. Used for real-time sending.
|
||||||
virtual std::string getConnectedHost();
|
virtual std::string getConnectedHost();
|
||||||
virtual std::string getConnectedBinHost();
|
virtual std::string getConnectedBinHost();
|
||||||
virtual std::string getStatsName();
|
virtual std::string getStatsName();
|
||||||
|
|
|
@ -147,6 +147,14 @@ namespace Mist {
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
std::string OutRTSP::getStatsName(){
|
||||||
|
if (isPushing){
|
||||||
|
return "INPUT";
|
||||||
|
}else{
|
||||||
|
return Output::getStatsName();
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
/// This request handler also checks for UDP packets
|
/// This request handler also checks for UDP packets
|
||||||
void OutRTSP::requestHandler(){
|
void OutRTSP::requestHandler(){
|
||||||
if (!expectTCP){
|
if (!expectTCP){
|
||||||
|
@ -460,6 +468,7 @@ namespace Mist {
|
||||||
//wrong sending port, ignore packet
|
//wrong sending port, ignore packet
|
||||||
continue;
|
continue;
|
||||||
}
|
}
|
||||||
|
lastRecv = Util::epoch();//prevent disconnect of idle TCP connection when using UDP
|
||||||
RTP::Packet pack(s.data, s.data_len);
|
RTP::Packet pack(s.data, s.data_len);
|
||||||
if (!it->second.rtpSeq){it->second.rtpSeq = pack.getSequence();}
|
if (!it->second.rtpSeq){it->second.rtpSeq = pack.getSequence();}
|
||||||
//packet is very early - assume dropped after 10 packets
|
//packet is very early - assume dropped after 10 packets
|
||||||
|
|
|
@ -170,6 +170,7 @@ namespace Mist {
|
||||||
void handleIncomingRTP(const uint64_t track, const RTP::Packet & pkt);
|
void handleIncomingRTP(const uint64_t track, const RTP::Packet & pkt);
|
||||||
void h264MultiParse(uint64_t ts, const uint64_t track, char * buffer, const uint32_t len);
|
void h264MultiParse(uint64_t ts, const uint64_t track, char * buffer, const uint32_t len);
|
||||||
void h264Packet(uint64_t ts, const uint64_t track, const char * buffer, const uint32_t len, bool isKey);
|
void h264Packet(uint64_t ts, const uint64_t track, const char * buffer, const uint32_t len, bool isKey);
|
||||||
|
std::string getStatsName();
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Add table
Reference in a new issue