BlinkenArea - GitList
Repositories
Blog
Wiki
Blinker
Code
Commits
Branches
Tags
Search
Tree:
99ee20e
Branches
Tags
master
Blinker
src
noarch
.Player.cpp.swp
implemented halting player by another stream
Stefan Schuermans
commited
99ee20e
at 2011-12-21 20:08:38
.Player.cpp.swp
Blame
History
Raw
b0VIM 7.2 ;�Ndd M stefan stefan ~stefan/Blinker/src/noarch/Player.cpp utf-8 3210 #"! U tp 0 y 1 / � ad $ 0 � � r R Q A / . � � � � � � r T @ % � � � � � � � � � o H ! � � � � p 4 � � � v e O = ; ( � � � � � � � � � q T R Q + � � � s o n 0 � � � � � � � � w V # � � � X W M L 2 0 / � � � � � � � f ; � � � � � � � � � � t U S 8 # � � � z i h P N M 3 � � � � y E � � } h g if (wrapped) { // detect empty playlist or playlist with only empty movies m_curFrame = 0; m_curEntry = m_playlistTracker.m_list.begin(); while (m_curEntry == m_playlistTracker.m_list.end()) { // playlist finished -> re-start from beginning while (true) { bool wrapped = false; m_curValid = true; // use while loops to handle empty movies / empty playlist // movie finished -> next movie { void Player::procFrame() /// process current frame } } // if (m_curChange) procFrame(); m_nextTime = Time::now(); m_remainTime = Time::zero; m_curFrame = 0; // go to begin of new current movie and start playing now m_curChange = false; if (m_curChange) { // current movie changed { void Player::checkCurChanged() /// check if current movie changed and react } procFrame(); // process new current frame ++m_curFrame; // go to next frame } return; m_callMgr.requestTimeCall(this, m_nextTime); // request call at time for next frame if (Time::now() < m_nextTime) { // leave if time is not yet ready to next frame return; if (m_halted) // leave if halted { void Player::timeCall() /// callback when requested time reached } (void)stream; // unused // TODO // whenever a frame is available on this halt stream // this is coming from the halt stream, which will halt the player { void Player::setFrame(const std::string &stream, stBlinkenFrame *pFrame) */ * @param[in] pFrame current frame (NULL for none) * @param[in] stream stream name * @brief set current frame /** } checkCurChanged(); m_playlistTracker.updateConfig(); // playlist update m_fileHaltStream.update(); if (m_fileHaltStream.checkModified()) // halt stream name file was modified -> re-get halt stream } sendFrame(); m_fileOutStream.update(); if (m_fileOutStream.checkModified()) { // output stream name file was modified -> re-get output stream { void Player::updateConfig() /// check for update of configuration } m_playlistTracker.clear(); // free all movies m_callMgr.cancelTimeCall(this); // cancel time callback request { Player::~Player() /// virtual destructor } che m_fileHaltStream.setStreamRecv(this); // load playlist { m_halted(false) m_curChange(false), m_curFrame(0), m_curEntry(m_playlistTracker.m_list.begin()), m_curValid(false), m_playlistTracker(*this, dirBase.getSubdir("playlist")), m_fileHaltStream(dirBase.getFile("haltstream"), streamMgr), m_fileOutStream(dirBase.getFile("outstream"), streamMgr), Module(callMgr, streamMgr, dirBase), const Directory &dirBase): Player::Player(CallMgr &callMgr, StreamMgr &streamMgr, */ * @param[in] dirBase base directory * @param[in] streamMgr stream manager * @param[in] callMgr callback manager * @brief constructor /** namespace Blinker { #include "TimeCallee.h"