- Timestamp:
- 08/22/10 20:05:34 (21 months ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/sources/applications/applestreamingclient/src/clientcontext.cpp
r87 r88 44 44 _currentItemIndex = 0; 45 45 _optimalBw = 0; 46 _lastUsedBw = 0; 46 47 _pSpeedComputer = NULL; 47 48 _tsId = 0; … … 52 53 _pStreamsManager = NULL; 53 54 _lastWallClock = 0; 54 _lastStreamClock = 0;55 55 _avData.EnsureSize(_maxAVBufferSize * 3); 56 56 INFO("Context created: %d (%p)", _id, this); … … 103 103 pResult = new ClientContext(); 104 104 pResult->_applicationId = applicationId; 105 pResult->_pEventSink = BaseEventSink::GetInstance(masterProtocolType); 105 pResult->_pEventSink = BaseEventSink::GetInstance(masterProtocolType, 106 pResult->_id); 106 107 contextId = pResult->_id; 107 108 _contexts[pResult->_id] = pResult; … … 579 580 customParameters["itemUri"] = itemUri; 580 581 customParameters["bw"] = bw; 582 //replace(keyUri, "http://www.mlb.com", "https://qa.mlb.com"); 581 583 return FetchURI(keyUri, "key", customParameters); 582 584 } 583 585 584 586 bool ClientContext::FetchTS(string uri, uint32_t bw, string key, uint64_t iv) { 587 //1. Prepare custom parameters 585 588 Variant customParameters; 586 589 if (key == "") { … … 602 605 customParameters["iv"] = iv; 603 606 customParameters["bw"] = bw; 607 608 //2. setup last bw used 609 if (_lastUsedBw == 0) 610 _lastUsedBw = bw; 611 612 if (_lastUsedBw != bw) { 613 if (_pEventSink->GetType() == EVENT_SYNC_VARIANT) { 614 _avData.IgnoreAll(); 615 } 616 if (_lastUsedBw < bw) { 617 _pEventSink->SignalUpgradeBandwidth(_lastUsedBw, bw); 618 } else { 619 _pEventSink->SignalDowngradeBandwidth(_lastUsedBw, bw); 620 } 621 } 622 623 _lastUsedBw = bw; 624 625 604 626 return FetchURI(uri, "ts", customParameters); 605 627 }
Note: See TracChangeset
for help on using the changeset viewer.
