f544b7eb4775000b6c9efc50cf4bc6014f0da3a5
Stefan Schuermans first version, plays videos...

Stefan Schuermans authored 13 years ago

src/noarch/Player.cpp   1) /* Blinker
Stefan Schuermans update copyright years

Stefan Schuermans authored 10 years ago

src/noarch/Player.cpp   2)    Copyright 2011-2014 Stefan Schuermans <stefan@blinkenarea.org>
Stefan Schuermans first version, plays videos...

Stefan Schuermans authored 13 years ago

src/noarch/Player.cpp   3)    Copyleft GNU public license - http://www.gnu.org/copyleft/gpl.html
src/noarch/Player.cpp   4)    a blinkenarea.org project */
src/noarch/Player.cpp   5) 
src/noarch/Player.cpp   6) #include <list>
src/noarch/Player.cpp   7) #include <string>
src/noarch/Player.cpp   8) 
src/noarch/Player.cpp   9) #include <BlinkenLib/BlinkenFrame.h>
src/noarch/Player.cpp  10) #include <BlinkenLib/BlinkenMovie.h>
src/noarch/Player.cpp  11) 
src/noarch/Player.cpp  12) #include "Directory.h"
src/noarch/Player.cpp  13) #include "File.h"
Stefan Schuermans implemented halting player...

Stefan Schuermans authored 12 years ago

src/noarch/Player.cpp  14) #include "InStreamFile.h"
Stefan Schuermans converted player module to...

Stefan Schuermans authored 12 years ago

src/noarch/Player.cpp  15) #include "ListTracker.h"
src/noarch/Player.cpp  16) #include "ListTracker_impl.h"
Stefan Schuermans put all managers in one str...

Stefan Schuermans authored 12 years ago

src/noarch/Player.cpp  17) #include "Mgrs.h"
Stefan Schuermans implemented halting player...

Stefan Schuermans authored 12 years ago

src/noarch/Player.cpp  18) #include "Module.h"
Stefan Schuermans implemented specialized set...

Stefan Schuermans authored 12 years ago

src/noarch/Player.cpp  19) #include "OutStreamFile.h"
Stefan Schuermans first version, plays videos...

Stefan Schuermans authored 13 years ago

src/noarch/Player.cpp  20) #include "Player.h"
Stefan Schuermans converted player module to...

Stefan Schuermans authored 12 years ago

src/noarch/Player.cpp  21) #include "PlayerMovie.h"
Stefan Schuermans implemented halting player...

Stefan Schuermans authored 12 years ago

src/noarch/Player.cpp  22) #include "StreamRecv.h"
Stefan Schuermans first version, plays videos...

Stefan Schuermans authored 13 years ago

src/noarch/Player.cpp  23) #include "Time.h"
src/noarch/Player.cpp  24) #include "TimeCallee.h"
src/noarch/Player.cpp  25) 
src/noarch/Player.cpp  26) namespace Blinker {
src/noarch/Player.cpp  27) 
src/noarch/Player.cpp  28) /**
src/noarch/Player.cpp  29)  * @brief constructor
Stefan Schuermans make modules know their name

Stefan Schuermans authored 12 years ago

src/noarch/Player.cpp  30)  * @param[in] name module name
Stefan Schuermans put all managers in one str...

Stefan Schuermans authored 12 years ago

src/noarch/Player.cpp  31)  * @param[in] mgrs managers
Stefan Schuermans first version, plays videos...

Stefan Schuermans authored 13 years ago

src/noarch/Player.cpp  32)  * @param[in] dirBase base directory
src/noarch/Player.cpp  33)  */
Stefan Schuermans make modules know their name

Stefan Schuermans authored 12 years ago

src/noarch/Player.cpp  34) Player::Player(const std::string &name, Mgrs &mgrs,
Stefan Schuermans first version, plays videos...

Stefan Schuermans authored 13 years ago

src/noarch/Player.cpp  35)                const Directory &dirBase):
Stefan Schuermans make modules know their name

Stefan Schuermans authored 12 years ago

src/noarch/Player.cpp  36)   Module(name, mgrs, dirBase),
Stefan Schuermans put all managers in one str...

Stefan Schuermans authored 12 years ago

src/noarch/Player.cpp  37)   m_fileOutStream(dirBase.getFile("outstream"), mgrs.m_streamMgr),
src/noarch/Player.cpp  38)   m_fileHaltStream(dirBase.getFile("haltstream"), mgrs.m_streamMgr),
Stefan Schuermans implement synchronization f...

Stefan Schuermans authored 10 years ago

src/common/Player.cpp  39)   m_fileInSync(dirBase.getFile("insync"), mgrs.m_syncMgr),
Stefan Schuermans converted player module to...

Stefan Schuermans authored 12 years ago

src/noarch/Player.cpp  40)   m_playlistTracker(*this, dirBase.getSubdir("playlist")),
Stefan Schuermans implemented automatic check...

Stefan Schuermans authored 13 years ago

src/noarch/Player.cpp  41)   m_curValid(false),
Stefan Schuermans converted player module to...

Stefan Schuermans authored 12 years ago

src/noarch/Player.cpp  42)   m_curEntry(m_playlistTracker.m_list.begin()),
src/noarch/Player.cpp  43)   m_curFrame(0),
Stefan Schuermans implement synchronization f...

Stefan Schuermans authored 10 years ago

src/common/Player.cpp  44)   m_curFrameStart(0),
src/common/Player.cpp  45)   m_curFrameEnd(0),
Stefan Schuermans implemented halting player...

Stefan Schuermans authored 12 years ago

src/noarch/Player.cpp  46)   m_curChange(false),
src/noarch/Player.cpp  47)   m_halted(false)
Stefan Schuermans first version, plays videos...

Stefan Schuermans authored 13 years ago

src/noarch/Player.cpp  48) {
Stefan Schuermans implement synchronization f...

Stefan Schuermans authored 10 years ago

src/common/Player.cpp  49)   m_maxDeviation.fromMs(30);
src/common/Player.cpp  50) 
src/common/Player.cpp  51)   // init and load playlist
Stefan Schuermans implemented halting player...

Stefan Schuermans authored 12 years ago

src/noarch/Player.cpp  52)   m_fileHaltStream.setStreamRecv(this);
Stefan Schuermans implement synchronization f...

Stefan Schuermans authored 10 years ago

src/common/Player.cpp  53)   m_fileInSync.setSyncRecv(this);
Stefan Schuermans converted player module to...

Stefan Schuermans authored 12 years ago

src/noarch/Player.cpp  54)   m_playlistTracker.init();
src/noarch/Player.cpp  55)   checkCurChanged();
Stefan Schuermans first version, plays videos...

Stefan Schuermans authored 13 years ago

src/noarch/Player.cpp  56) }
src/noarch/Player.cpp  57) 
src/noarch/Player.cpp  58) /// virtual destructor
src/noarch/Player.cpp  59) Player::~Player()
src/noarch/Player.cpp  60) {
Stefan Schuermans cancel time callback reques...

Stefan Schuermans authored 13 years ago

src/noarch/Player.cpp  61)   // cancel time callback request
Stefan Schuermans put all managers in one str...

Stefan Schuermans authored 12 years ago

src/noarch/Player.cpp  62)   m_mgrs.m_callMgr.cancelTimeCall(this);
Stefan Schuermans cancel time callback reques...

Stefan Schuermans authored 13 years ago

src/noarch/Player.cpp  63) 
Stefan Schuermans implement synchronization f...

Stefan Schuermans authored 10 years ago

src/common/Player.cpp  64)   // free all movies, detach from stream sources
Stefan Schuermans converted player module to...

Stefan Schuermans authored 12 years ago

src/noarch/Player.cpp  65)   m_playlistTracker.clear();
Stefan Schuermans implemented halting player...

Stefan Schuermans authored 12 years ago

src/noarch/Player.cpp  66)   m_fileHaltStream.setStreamRecv(NULL);
Stefan Schuermans implement synchronization f...

Stefan Schuermans authored 10 years ago

src/common/Player.cpp  67)   m_fileInSync.setSyncRecv(NULL);
Stefan Schuermans first version, plays videos...

Stefan Schuermans authored 13 years ago

src/noarch/Player.cpp  68) }
src/noarch/Player.cpp  69) 
Stefan Schuermans implemented base class for...

Stefan Schuermans authored 13 years ago

src/noarch/Player.cpp  70) /// check for update of configuration
src/noarch/Player.cpp  71) void Player::updateConfig()
src/noarch/Player.cpp  72) {
Stefan Schuermans implemented automatic check...

Stefan Schuermans authored 13 years ago

src/noarch/Player.cpp  73)   // output stream name file was modified -> re-get output stream
src/noarch/Player.cpp  74)   if (m_fileOutStream.checkModified()) {
Stefan Schuermans implemented specialized set...

Stefan Schuermans authored 12 years ago

src/noarch/Player.cpp  75)     m_fileOutStream.update();
src/noarch/Player.cpp  76)     sendFrame();
Stefan Schuermans implemented automatic check...

Stefan Schuermans authored 13 years ago

src/noarch/Player.cpp  77)   }
src/noarch/Player.cpp  78) 
Stefan Schuermans implemented halting player...

Stefan Schuermans authored 12 years ago

src/noarch/Player.cpp  79)   // halt stream name file was modified -> re-get halt stream
src/noarch/Player.cpp  80)   if (m_fileHaltStream.checkModified())
src/noarch/Player.cpp  81)     m_fileHaltStream.update();
src/noarch/Player.cpp  82) 
Stefan Schuermans implement synchronization f...

Stefan Schuermans authored 10 years ago

src/common/Player.cpp  83)   // input sync stream name file was modified -> re-get input sync stream
src/common/Player.cpp  84)   if (m_fileInSync.checkModified())
src/common/Player.cpp  85)     m_fileInSync.update();
src/common/Player.cpp  86) 
Stefan Schuermans converted player module to...

Stefan Schuermans authored 12 years ago

src/noarch/Player.cpp  87)   // playlist update
src/noarch/Player.cpp  88)   m_playlistTracker.updateConfig();
src/noarch/Player.cpp  89)   checkCurChanged();
Stefan Schuermans implemented base class for...

Stefan Schuermans authored 13 years ago

src/noarch/Player.cpp  90) }
src/noarch/Player.cpp  91) 
Stefan Schuermans implemented halting player...

Stefan Schuermans authored 12 years ago

src/noarch/Player.cpp  92) /**
src/noarch/Player.cpp  93)  * @brief set current frame
src/noarch/Player.cpp  94)  * @param[in] stream stream name
src/noarch/Player.cpp  95)  * @param[in] pFrame current frame (NULL for none)
src/noarch/Player.cpp  96)  */
src/noarch/Player.cpp  97) void Player::setFrame(const std::string &stream, stBlinkenFrame *pFrame)
src/noarch/Player.cpp  98) {
src/noarch/Player.cpp  99)   // this is coming from the halt stream, which will halt the player
src/noarch/Player.cpp 100)   // whenever a frame is available on this halt stream
src/noarch/Player.cpp 101) 
Stefan Schuermans implement synchronization f...

Stefan Schuermans authored 10 years ago

src/common/Player.cpp 102)   // halt stream active -> halt player
src/common/Player.cpp 103)   if (pFrame)
src/common/Player.cpp 104)     halt();
src/common/Player.cpp 105) 
src/common/Player.cpp 106)   // halt stream inactive -> continue playing
src/common/Player.cpp 107)   else
src/common/Player.cpp 108)     cont();
src/common/Player.cpp 109) 
src/common/Player.cpp 110)   (void)stream; // unused
src/common/Player.cpp 111) }
src/common/Player.cpp 112) 
src/common/Player.cpp 113) /**
src/common/Player.cpp 114)  * @brief send synchronization information
src/common/Player.cpp 115)  * @param[in] sync sync stream name
src/common/Player.cpp 116)  * @param[in] pInfo synchronization information
src/common/Player.cpp 117)  */
src/common/Player.cpp 118) void Player::sendInfo(const std::string &sync, Info &info)
src/common/Player.cpp 119) {
src/common/Player.cpp 120)   bool change = false, seekPos = true;
src/common/Player.cpp 121) 
src/common/Player.cpp 122)   // halt player if pause flag is set
src/common/Player.cpp 123)   if (info.pause)
src/common/Player.cpp 124)     halt();
src/common/Player.cpp 125) 
src/common/Player.cpp 126)   // seek to other movie if not correct one
src/common/Player.cpp 127)   if (m_curEntry != m_playlistTracker.m_list.end() &&
src/common/Player.cpp 128)       !checkName(m_curEntry->m_name, info.name)) {
src/common/Player.cpp 129)     // find movie by name
src/common/Player.cpp 130)     PlaylistIt it = m_playlistTracker.m_list.begin();
src/common/Player.cpp 131)     while (it != m_playlistTracker.m_list.end()) {
src/common/Player.cpp 132)       if (checkName(it->m_name, info.name))
src/common/Player.cpp 133)         break;
src/common/Player.cpp 134)       ++it;
src/common/Player.cpp 135)     }
src/common/Player.cpp 136)     // movie found -> seek to it
src/common/Player.cpp 137)     if (it != m_playlistTracker.m_list.end()) {
src/common/Player.cpp 138)       change = true;
src/common/Player.cpp 139)       m_curValid = false;
src/common/Player.cpp 140)       m_curEntry = it;
src/common/Player.cpp 141)       m_curFrame = 0;
src/common/Player.cpp 142)       m_remainTime = Time::zero;
src/common/Player.cpp 143)       if (m_curEntry->m_pObj->m_pMovie) {
src/common/Player.cpp 144)         stBlinkenFrame *pFrame =
src/common/Player.cpp 145)           BlinkenMovieGetFrame(m_curEntry->m_pObj->m_pMovie, m_curFrame);
src/common/Player.cpp 146)         if (pFrame) {
src/common/Player.cpp 147)           m_remainTime.fromMs(BlinkenFrameGetDuration(pFrame));
src/common/Player.cpp 148)           m_curValid = true;
src/common/Player.cpp 149)         }
src/common/Player.cpp 150)       }
src/common/Player.cpp 151)       m_curFrameStart = Time::zero;
src/common/Player.cpp 152)       m_curFrameEnd = m_remainTime;
src/common/Player.cpp 153)       m_nextTime = Time::now() + m_remainTime;
src/common/Player.cpp 154)     }
src/common/Player.cpp 155)     // movie not found -> do not seek to position
src/common/Player.cpp 156)     else {
src/common/Player.cpp 157)       seekPos = false;
src/common/Player.cpp 158)     }
src/common/Player.cpp 159)   }
src/common/Player.cpp 160) 
src/common/Player.cpp 161)   Time now = Time::now();
src/common/Player.cpp 162) 
src/common/Player.cpp 163)   if (m_curValid && seekPos) {
src/common/Player.cpp 164) 
src/common/Player.cpp 165)     // get frame count of current movie
src/common/Player.cpp 166)     int frameCnt = BlinkenMovieGetFrameCnt(m_curEntry->m_pObj->m_pMovie);
src/common/Player.cpp 167) 
src/common/Player.cpp 168)     // get remaining frame time and current position in movie
src/common/Player.cpp 169)     if (!m_halted) { // remaining frame time always up-to-date in halted mode
src/common/Player.cpp 170)       m_remainTime = m_nextTime - now;
Stefan Schuermans implemented halting player...

Stefan Schuermans authored 12 years ago

src/noarch/Player.cpp 171)       if (m_remainTime < Time::zero)
src/noarch/Player.cpp 172)         m_remainTime = Time::zero;
src/noarch/Player.cpp 173)     }
Stefan Schuermans implement synchronization f...

Stefan Schuermans authored 10 years ago

src/common/Player.cpp 174)     Time pos = m_curFrameEnd - m_remainTime;
Stefan Schuermans implemented halting player...

Stefan Schuermans authored 12 years ago

src/noarch/Player.cpp 175) 
Stefan Schuermans implement synchronization f...

Stefan Schuermans authored 10 years ago

src/common/Player.cpp 176)     // seek to earlier position in movie if needed
src/common/Player.cpp 177)     while (pos > info.pos + m_maxDeviation) {
src/common/Player.cpp 178)       change = true;
src/common/Player.cpp 179)       Time frame = m_curFrameEnd - m_curFrameStart;
src/common/Player.cpp 180)       Time shown = frame - m_remainTime;
src/common/Player.cpp 181)       Time goback = pos - info.pos;
src/common/Player.cpp 182)       // correct by just showing current frame some time longer
src/common/Player.cpp 183)       if (goback <= shown) {
src/common/Player.cpp 184)         pos -= goback;
src/common/Player.cpp 185)         m_remainTime += goback;
src/common/Player.cpp 186)         break;
src/common/Player.cpp 187)       }
src/common/Player.cpp 188)       // go back to begin of current frame
src/common/Player.cpp 189)       goback -= shown;
src/common/Player.cpp 190)       pos -= shown;
src/common/Player.cpp 191)       m_remainTime = frame;
src/common/Player.cpp 192)       // go back to end of previous frame
src/common/Player.cpp 193)       if (m_curFrame <= 0)
src/common/Player.cpp 194)         break;
src/common/Player.cpp 195)       m_curFrame--;
src/common/Player.cpp 196)       m_curFrameEnd = m_curFrameStart;
src/common/Player.cpp 197)       frame = Time::zero;
src/common/Player.cpp 198)       stBlinkenFrame *pFrame =
src/common/Player.cpp 199)         BlinkenMovieGetFrame(m_curEntry->m_pObj->m_pMovie, m_curFrame);
src/common/Player.cpp 200)       if (pFrame)
src/common/Player.cpp 201)         frame.fromMs(BlinkenFrameGetDuration(pFrame));
src/common/Player.cpp 202)       m_curFrameStart = m_curFrameEnd - frame;
src/common/Player.cpp 203)       m_remainTime = Time::zero;
src/common/Player.cpp 204)     } // while (pos > info.pos + m_maxDeviation)
src/common/Player.cpp 205) 
src/common/Player.cpp 206)     // seek to later position in movie if needed
src/common/Player.cpp 207)     while (pos + m_maxDeviation < info.pos) {
src/common/Player.cpp 208)       change = true;
src/common/Player.cpp 209)       Time frame = m_curFrameEnd - m_curFrameStart;
src/common/Player.cpp 210)       Time go = info.pos - pos;
src/common/Player.cpp 211)       // correct by just showing current frame some time shorter
src/common/Player.cpp 212)       if (go <= m_remainTime) {
src/common/Player.cpp 213)         pos += go;
src/common/Player.cpp 214)         m_remainTime -= go;
src/common/Player.cpp 215)         break;
src/common/Player.cpp 216)       }
src/common/Player.cpp 217)       // go to end of current frame
src/common/Player.cpp 218)       go -= m_remainTime;
src/common/Player.cpp 219)       pos += m_remainTime;
src/common/Player.cpp 220)       m_remainTime = Time::zero;
src/common/Player.cpp 221)       // go to begin of next frame
src/common/Player.cpp 222)       if (m_curFrame >= frameCnt)
src/common/Player.cpp 223)         break;
src/common/Player.cpp 224)       m_curFrame++;
src/common/Player.cpp 225)       m_curFrameStart = m_curFrameEnd;
src/common/Player.cpp 226)       frame = Time::zero;
src/common/Player.cpp 227)       stBlinkenFrame *pFrame =
src/common/Player.cpp 228)         BlinkenMovieGetFrame(m_curEntry->m_pObj->m_pMovie, m_curFrame);
src/common/Player.cpp 229)       if (pFrame)
src/common/Player.cpp 230)         frame.fromMs(BlinkenFrameGetDuration(pFrame));
src/common/Player.cpp 231)       m_curFrameEnd = m_curFrameStart + frame;
src/common/Player.cpp 232)       m_remainTime = frame;
src/common/Player.cpp 233)     } // while (pos + m_maxDeviation < info.pos)
src/common/Player.cpp 234) 
src/common/Player.cpp 235)   } // if (m_curValid)
src/common/Player.cpp 236) 
src/common/Player.cpp 237)   // send frame and update timed callback if something changed
src/common/Player.cpp 238)   if (change) {
src/common/Player.cpp 239)     sendFrame();
src/common/Player.cpp 240)     if (m_curValid && !m_halted) {
src/common/Player.cpp 241)       m_nextTime = now + m_remainTime; // remaining time changed -> update
Stefan Schuermans put all managers in one str...

Stefan Schuermans authored 12 years ago

src/noarch/Player.cpp 242)       m_mgrs.m_callMgr.requestTimeCall(this, m_nextTime);
Stefan Schuermans implemented halting player...

Stefan Schuermans authored 12 years ago

src/noarch/Player.cpp 243)     }
src/noarch/Player.cpp 244)   }
src/noarch/Player.cpp 245) 
Stefan Schuermans implement synchronization f...

Stefan Schuermans authored 10 years ago

src/common/Player.cpp 246)   // continue playing if pause flag is not set
src/common/Player.cpp 247)   if (!info.pause)
src/common/Player.cpp 248)     cont();
src/common/Player.cpp 249) 
src/common/Player.cpp 250)   (void)sync; // unused
Stefan Schuermans implemented halting player...

Stefan Schuermans authored 12 years ago

src/noarch/Player.cpp 251) }
src/noarch/Player.cpp 252) 
Stefan Schuermans fixed comment typo

Stefan Schuermans authored 12 years ago

src/noarch/Player.cpp 253) /// callback when requested time reached
Stefan Schuermans first version, plays videos...

Stefan Schuermans authored 13 years ago

src/noarch/Player.cpp 254) void Player::timeCall()
src/noarch/Player.cpp 255) {
Stefan Schuermans implemented halting player...

Stefan Schuermans authored 12 years ago

src/noarch/Player.cpp 256)   // leave if halted
src/noarch/Player.cpp 257)   if (m_halted)
src/noarch/Player.cpp 258)     return;
src/noarch/Player.cpp 259) 
Stefan Schuermans implement synchronization f...

Stefan Schuermans authored 10 years ago

src/common/Player.cpp 260)   // leave if time is not yet ready for next frame
Stefan Schuermans implemented automatic check...

Stefan Schuermans authored 13 years ago

src/noarch/Player.cpp 261)   if (Time::now() < m_nextTime) {
src/noarch/Player.cpp 262)     // request call at time for next frame
Stefan Schuermans put all managers in one str...

Stefan Schuermans authored 12 years ago

src/noarch/Player.cpp 263)     m_mgrs.m_callMgr.requestTimeCall(this, m_nextTime);
Stefan Schuermans implemented automatic check...

Stefan Schuermans authored 13 years ago

src/noarch/Player.cpp 264)     return;
src/noarch/Player.cpp 265)   }
src/noarch/Player.cpp 266) 
src/noarch/Player.cpp 267)   // go to next frame
src/noarch/Player.cpp 268)   ++m_curFrame;
Stefan Schuermans implement synchronization f...

Stefan Schuermans authored 10 years ago

src/common/Player.cpp 269)   m_curFrameStart = m_curFrameEnd;
Stefan Schuermans implemented automatic check...

Stefan Schuermans authored 13 years ago

src/noarch/Player.cpp 270) 
src/noarch/Player.cpp 271)   // process new current frame
src/noarch/Player.cpp 272)   procFrame();
Stefan Schuermans first version, plays videos...

Stefan Schuermans authored 13 years ago

src/noarch/Player.cpp 273) }
src/noarch/Player.cpp 274) 
Stefan Schuermans implement synchronization f...

Stefan Schuermans authored 10 years ago

src/common/Player.cpp 275) /// halt player
src/common/Player.cpp 276) void Player::halt()
src/common/Player.cpp 277) {
src/common/Player.cpp 278)   // player already halted -> leave
src/common/Player.cpp 279)   if (m_halted)
src/common/Player.cpp 280)     return;
src/common/Player.cpp 281) 
src/common/Player.cpp 282)   m_halted = true;
src/common/Player.cpp 283) 
src/common/Player.cpp 284)   if (m_curValid) {
src/common/Player.cpp 285)     // store remaining frame time
src/common/Player.cpp 286)     m_remainTime = m_nextTime - Time::now();
src/common/Player.cpp 287)     if (m_remainTime < Time::zero)
src/common/Player.cpp 288)       m_remainTime = Time::zero;
src/common/Player.cpp 289)   }
src/common/Player.cpp 290) 
src/common/Player.cpp 291)   // cancel time call
src/common/Player.cpp 292)   m_mgrs.m_callMgr.cancelTimeCall(this);
src/common/Player.cpp 293) }
src/common/Player.cpp 294) 
src/common/Player.cpp 295) /// continue playing
src/common/Player.cpp 296) void Player::cont()
src/common/Player.cpp 297) {
src/common/Player.cpp 298)   // player not halted -> leave
src/common/Player.cpp 299)   if (!m_halted)
src/common/Player.cpp 300)     return;
src/common/Player.cpp 301) 
src/common/Player.cpp 302)   m_halted = false;
src/common/Player.cpp 303) 
src/common/Player.cpp 304)   if (m_curValid) {
src/common/Player.cpp 305)     // determine time for next frame
src/common/Player.cpp 306)     m_nextTime = Time::now() + m_remainTime;
src/common/Player.cpp 307)     // schedule time call
src/common/Player.cpp 308)     m_mgrs.m_callMgr.requestTimeCall(this, m_nextTime);
src/common/Player.cpp 309)   }
src/common/Player.cpp 310) }
src/common/Player.cpp 311) 
Stefan Schuermans converted player module to...

Stefan Schuermans authored 12 years ago

src/noarch/Player.cpp 312) /// check if current movie changed and react
src/noarch/Player.cpp 313) void Player::checkCurChanged()
Stefan Schuermans implemented automatic check...

Stefan Schuermans authored 13 years ago

src/noarch/Player.cpp 314) {
Stefan Schuermans converted player module to...

Stefan Schuermans authored 12 years ago

src/noarch/Player.cpp 315)   // current movie changed
src/noarch/Player.cpp 316)   if (m_curChange) {
src/noarch/Player.cpp 317)     m_curChange = false;
Stefan Schuermans implemented automatic check...

Stefan Schuermans authored 13 years ago

src/noarch/Player.cpp 318) 
src/noarch/Player.cpp 319)     // go to begin of new current movie and start playing now
src/noarch/Player.cpp 320)     m_curFrame = 0;
Stefan Schuermans implement synchronization f...

Stefan Schuermans authored 10 years ago

src/common/Player.cpp 321)     m_curFrameStart = 0;
src/common/Player.cpp 322)     m_curFrameEnd = 0;
Stefan Schuermans implemented halting player...

Stefan Schuermans authored 12 years ago

src/noarch/Player.cpp 323)     m_remainTime = Time::zero;
Stefan Schuermans implemented automatic check...

Stefan Schuermans authored 13 years ago

src/noarch/Player.cpp 324)     m_nextTime = Time::now();
src/noarch/Player.cpp 325)     procFrame();
src/noarch/Player.cpp 326) 
Stefan Schuermans converted player module to...

Stefan Schuermans authored 12 years ago

src/noarch/Player.cpp 327)   } // if (m_curChange)
Stefan Schuermans first version, plays videos...

Stefan Schuermans authored 13 years ago

src/noarch/Player.cpp 328) }
src/noarch/Player.cpp 329) 
Stefan Schuermans implemented automatic check...

Stefan Schuermans authored 13 years ago

src/noarch/Player.cpp 330) /// process current frame
src/noarch/Player.cpp 331) void Player::procFrame()
src/noarch/Player.cpp 332) {
Stefan Schuermans first version, plays videos...

Stefan Schuermans authored 13 years ago

src/noarch/Player.cpp 333)   // movie finished -> next movie
src/noarch/Player.cpp 334)   //   use while loops to handle empty movies / empty playlist
Stefan Schuermans implemented automatic check...

Stefan Schuermans authored 13 years ago

src/noarch/Player.cpp 335)   m_curValid = true;
Stefan Schuermans first version, plays videos...

Stefan Schuermans authored 13 years ago

src/noarch/Player.cpp 336)   bool wrapped = false;
src/noarch/Player.cpp 337)   while (true) {
src/noarch/Player.cpp 338)     // playlist finished -> re-start from beginning
Stefan Schuermans converted player module to...

Stefan Schuermans authored 12 years ago

src/noarch/Player.cpp 339)     while (m_curEntry == m_playlistTracker.m_list.end()) {
src/noarch/Player.cpp 340)       m_curEntry = m_playlistTracker.m_list.begin();
Stefan Schuermans first version, plays videos...

Stefan Schuermans authored 13 years ago

src/noarch/Player.cpp 341)       m_curFrame = 0;
Stefan Schuermans implement synchronization f...

Stefan Schuermans authored 10 years ago

src/common/Player.cpp 342)       m_curFrameStart = 0;
src/common/Player.cpp 343)       m_curFrameEnd = 0;
Stefan Schuermans first version, plays videos...

Stefan Schuermans authored 13 years ago

src/noarch/Player.cpp 344)       // detect empty playlist or playlist with only empty movies
src/noarch/Player.cpp 345)       if (wrapped) {
Stefan Schuermans implemented automatic check...

Stefan Schuermans authored 13 years ago

src/noarch/Player.cpp 346)         m_curValid = false;
src/noarch/Player.cpp 347)         break;
Stefan Schuermans first version, plays videos...

Stefan Schuermans authored 13 years ago

src/noarch/Player.cpp 348)       }
src/noarch/Player.cpp 349)       wrapped = true;
src/noarch/Player.cpp 350)     }
Stefan Schuermans implemented automatic check...

Stefan Schuermans authored 13 years ago

src/noarch/Player.cpp 351)     if (!m_curValid)
src/noarch/Player.cpp 352)       break;
Stefan Schuermans first version, plays videos...

Stefan Schuermans authored 13 years ago

src/noarch/Player.cpp 353)     // movie not yet finished -> done
Stefan Schuermans fix bug in player module: c...

Stefan Schuermans authored 12 years ago

src/noarch/Player.cpp 354)     if (m_curEntry->m_pObj->m_pMovie &&
src/noarch/Player.cpp 355)         m_curFrame < BlinkenMovieGetFrameCnt(m_curEntry->m_pObj->m_pMovie))
Stefan Schuermans first version, plays videos...

Stefan Schuermans authored 13 years ago

src/noarch/Player.cpp 356)       break;
src/noarch/Player.cpp 357)     // movie finished -> next movie
src/noarch/Player.cpp 358)     ++m_curEntry;
src/noarch/Player.cpp 359)     m_curFrame = 0;
Stefan Schuermans implement synchronization f...

Stefan Schuermans authored 10 years ago

src/common/Player.cpp 360)     m_curFrame = 0;
src/common/Player.cpp 361)     m_curFrameStart = 0;
src/common/Player.cpp 362)   } // while (true)
Stefan Schuermans first version, plays videos...

Stefan Schuermans authored 13 years ago

src/noarch/Player.cpp 363) 
Stefan Schuermans implemented automatic check...

Stefan Schuermans authored 13 years ago

src/noarch/Player.cpp 364)   // send new frame to stream
src/noarch/Player.cpp 365)   sendFrame();
Stefan Schuermans first version, plays videos...

Stefan Schuermans authored 13 years ago

src/noarch/Player.cpp 366) 
Stefan Schuermans implemented automatic check...

Stefan Schuermans authored 13 years ago

src/noarch/Player.cpp 367)   // if a frame is there
src/noarch/Player.cpp 368)   if (m_curValid) {
Stefan Schuermans implemented halting player...

Stefan Schuermans authored 12 years ago

src/noarch/Player.cpp 369)     // get frame time and calculate absolute time for next frame
Stefan Schuermans implemented automatic check...

Stefan Schuermans authored 13 years ago

src/noarch/Player.cpp 370)     stBlinkenFrame *pFrame =
Stefan Schuermans converted player module to...

Stefan Schuermans authored 12 years ago

src/noarch/Player.cpp 371)       BlinkenMovieGetFrame(m_curEntry->m_pObj->m_pMovie, m_curFrame);
Stefan Schuermans implemented halting player...

Stefan Schuermans authored 12 years ago

src/noarch/Player.cpp 372)     m_remainTime.fromMs(BlinkenFrameGetDuration(pFrame));
src/noarch/Player.cpp 373)     m_nextTime += m_remainTime;
Stefan Schuermans implement synchronization f...

Stefan Schuermans authored 10 years ago

src/common/Player.cpp 374)     m_curFrameEnd = m_curFrameStart + m_remainTime;
Stefan Schuermans implemented automatic check...

Stefan Schuermans authored 13 years ago

src/noarch/Player.cpp 375)     // request call at time for next frame
Stefan Schuermans implemented halting player...

Stefan Schuermans authored 12 years ago

src/noarch/Player.cpp 376)     if (!m_halted)
Stefan Schuermans put all managers in one str...

Stefan Schuermans authored 12 years ago

src/noarch/Player.cpp 377)       m_mgrs.m_callMgr.requestTimeCall(this, m_nextTime);
Stefan Schuermans implemented automatic check...

Stefan Schuermans authored 13 years ago

src/noarch/Player.cpp 378)   }
src/noarch/Player.cpp 379) }
Stefan Schuermans first version, plays videos...

Stefan Schuermans authored 13 years ago

src/noarch/Player.cpp 380) 
Stefan Schuermans implemented automatic check...

Stefan Schuermans authored 13 years ago

src/noarch/Player.cpp 381) /// send current frame to output stream
src/noarch/Player.cpp 382) void Player::sendFrame()
src/noarch/Player.cpp 383) {
Stefan Schuermans typo

Stefan Schuermans authored 12 years ago

src/noarch/Player.cpp 384)   // frame available -> send it
Stefan Schuermans implemented specialized set...

Stefan Schuermans authored 12 years ago

src/noarch/Player.cpp 385)   if (m_curValid) {
src/noarch/Player.cpp 386)     stBlinkenFrame *pFrame =
Stefan Schuermans converted player module to...

Stefan Schuermans authored 12 years ago

src/noarch/Player.cpp 387)       BlinkenMovieGetFrame(m_curEntry->m_pObj->m_pMovie, m_curFrame);
Stefan Schuermans implemented specialized set...

Stefan Schuermans authored 12 years ago

src/noarch/Player.cpp 388)     m_fileOutStream.setFrame(pFrame);
Stefan Schuermans implemented automatic check...

Stefan Schuermans authored 13 years ago

src/noarch/Player.cpp 389)   }
Stefan Schuermans implemented specialized set...

Stefan Schuermans authored 12 years ago

src/noarch/Player.cpp 390)   // no frame available -> send this information
src/noarch/Player.cpp 391)   else
src/noarch/Player.cpp 392)     m_fileOutStream.setFrame(NULL);