Added a couple of IO convenience functions
This commit is contained in:
parent
ae448d6e8a
commit
c56b72dbca
2 changed files with 15 additions and 0 deletions
12
src/io.cpp
12
src/io.cpp
|
@ -520,10 +520,22 @@ namespace Mist {
|
|||
nProxy.continueNegotiate(tid, myMeta, quickNegotiate);
|
||||
}
|
||||
|
||||
void InOutBase::continueNegotiate() {
|
||||
nProxy.continueNegotiate(myMeta);
|
||||
}
|
||||
|
||||
negotiationProxy::negotiationProxy(){
|
||||
negTimer = 0;
|
||||
}
|
||||
|
||||
void negotiationProxy::continueNegotiate(DTSC::Meta & myMeta) {
|
||||
for (std::map<unsigned int, DTSC::Track>::iterator it = myMeta.tracks.begin(); it != myMeta.tracks.end(); it++){
|
||||
if (!trackState.count(it->first) || (trackState[it->first] != FILL_ACC && trackState[it->first] != FILL_DEC)){
|
||||
continueNegotiate(it->first, myMeta);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
void negotiationProxy::continueNegotiate(unsigned long tid, DTSC::Meta & myMeta, bool quickNegotiate) {
|
||||
if (!tid) {
|
||||
return;
|
||||
|
|
3
src/io.h
3
src/io.h
|
@ -56,6 +56,8 @@ namespace Mist {
|
|||
std::string streamName;///< Name of the stream to connect to
|
||||
|
||||
void continueNegotiate(unsigned long tid, DTSC::Meta & myMeta, bool quickNegotiate = false);
|
||||
void continueNegotiate(DTSC::Meta & myMeta);
|
||||
|
||||
uint32_t negTimer; ///< How long we've been negotiating, in packets.
|
||||
};
|
||||
|
||||
|
@ -70,6 +72,7 @@ namespace Mist {
|
|||
virtual void bufferLivePacket(DTSC::Packet & packet);
|
||||
protected:
|
||||
void continueNegotiate(unsigned long tid, bool quickNegotiate = false);
|
||||
void continueNegotiate();
|
||||
|
||||
|
||||
|
||||
|
|
Loading…
Add table
Reference in a new issue