- Timestamp:
- 08/24/10 23:22:35 (21 months ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/sources/applications/applestreamingclient/src/clientcontext.cpp
r102 r103 291 291 292 292 //4. Is this the last item in the playlis? 293 FINEST("---------------------------------------------------"); 293 294 if (_currentItemIndex >= pPlaylist->GetItemsCount()) { 294 FINEST("End of list. Wait one sec and try again"); 295 return EnqueueFetchChildPlaylist(_childPlaylists[optimalBw]->GetPlaylistUri(), optimalBw); 296 } 295 if (ReloadPlaylist(optimalBw)) { 296 WARN("End of list. Wait one sec and try again"); 297 FINEST("---------------------------------------------------"); 298 return EnqueueFetchChildPlaylist(_childPlaylists[optimalBw]->GetPlaylistUri(), optimalBw); 299 } else { 300 WARN("No playlist reload"); 301 _currentItemIndex--; 302 } 303 } 304 FINEST("_currentItemIndex: %d", _currentItemIndex); 305 FINEST("---------------------------------------------------"); 297 306 298 307 //4. Get the item URI and the key URI if available 299 308 string uri = pPlaylist->GetItemUri(_currentItemIndex); 300 309 string keyUri = pPlaylist->GetItemKeyUri(_currentItemIndex); 310 _mediaSequences[optimalBw] = pPlaylist->GetItemMediaSequence(_currentItemIndex); 301 311 if (keyUri != "") 302 312 keyUri += "&" + _connectingString.sessionId; … … 392 402 //7. Done 393 403 return true; 404 } 405 406 bool ClientContext::ReloadPlaylist(uint32_t bw) { 407 if (!MAP_HAS1(_mediaSequences, bw)) { 408 FINEST("bw %d not in _mediaSequences", bw); 409 return true; 410 } 411 if (!MAP_HAS1(_childPlaylists, bw)) { 412 FINEST("bw %d not in playlists", bw); 413 return true; 414 } 415 416 uint32_t lastSequence = _mediaSequences[bw]; 417 FINEST("lastSequence: %d", lastSequence); 418 uint32_t playlistSequnece = _childPlaylists[bw]->GetLastMediaSequence(); 419 FINEST("playlistSequnece: %d", playlistSequnece); 420 421 return lastSequence == playlistSequnece; 394 422 } 395 423
Note: See TracChangeset
for help on using the changeset viewer.
