362c1f4c3b5ce9e3fce11167a51fbe4cdb2174de
Stefan Schuermans first version, plays videos...

Stefan Schuermans authored 13 years ago

src/noarch/Stream.cpp  1) /* Blinker
Stefan Schuermans update copyright header

Stefan Schuermans authored 5 years ago

src/common/Stream.cpp  2)    Copyright 2011-2019 Stefan Schuermans <stefan@blinkenarea.org>
Stefan Schuermans first version, plays videos...

Stefan Schuermans authored 13 years ago

src/noarch/Stream.cpp  3)    Copyleft GNU public license - http://www.gnu.org/copyleft/gpl.html
src/noarch/Stream.cpp  4)    a blinkenarea.org project */
src/noarch/Stream.cpp  5) 
src/noarch/Stream.cpp  6) #include <set>
src/noarch/Stream.cpp  7) 
src/noarch/Stream.cpp  8) #include <BlinkenLib/BlinkenFrame.h>
src/noarch/Stream.cpp  9) 
src/noarch/Stream.cpp 10) #include "Stream.h"
src/noarch/Stream.cpp 11) #include "StreamRecv.h"
src/noarch/Stream.cpp 12) 
src/noarch/Stream.cpp 13) namespace Blinker {
src/noarch/Stream.cpp 14) 
src/noarch/Stream.cpp 15) /// constructor
Stefan Schuermans implemented stream printer...

Stefan Schuermans authored 13 years ago

src/noarch/Stream.cpp 16) Stream::Stream():
src/noarch/Stream.cpp 17)   m_pFrame(NULL)
Stefan Schuermans first version, plays videos...

Stefan Schuermans authored 13 years ago

src/noarch/Stream.cpp 18) {
src/noarch/Stream.cpp 19) }
src/noarch/Stream.cpp 20) 
Stefan Schuermans Stream does not have to use...

Stefan Schuermans authored 12 years ago

src/noarch/Stream.cpp 21) /// destructor
Stefan Schuermans first version, plays videos...

Stefan Schuermans authored 13 years ago

src/noarch/Stream.cpp 22) Stream::~Stream()
src/noarch/Stream.cpp 23) {
Stefan Schuermans implemented stream printer...

Stefan Schuermans authored 13 years ago

src/noarch/Stream.cpp 24)   // free current frame
src/noarch/Stream.cpp 25)   if (m_pFrame)
src/noarch/Stream.cpp 26)     BlinkenFrameFree(m_pFrame);
Stefan Schuermans first version, plays videos...

Stefan Schuermans authored 13 years ago

src/noarch/Stream.cpp 27) }
src/noarch/Stream.cpp 28) 
src/noarch/Stream.cpp 29) /**
src/noarch/Stream.cpp 30)  * @brief attach a stream receiver
src/noarch/Stream.cpp 31)  * @param[in] recv stream receiver to attach
src/noarch/Stream.cpp 32)  */
src/noarch/Stream.cpp 33) void Stream::attach(StreamRecv *recv)
src/noarch/Stream.cpp 34) {
src/noarch/Stream.cpp 35)   m_recvs.insert(recv);
Stefan Schuermans implemented stream printer...

Stefan Schuermans authored 13 years ago

src/noarch/Stream.cpp 36) 
src/noarch/Stream.cpp 37)   // send current frame to receiver
Stefan Schuermans merged frame processing wit...

Stefan Schuermans authored 12 years ago

src/noarch/Stream.cpp 38)   recv->setFrame(m_name, m_pFrame);
Stefan Schuermans first version, plays videos...

Stefan Schuermans authored 13 years ago

src/noarch/Stream.cpp 39) }
src/noarch/Stream.cpp 40) 
src/noarch/Stream.cpp 41) /**
src/noarch/Stream.cpp 42)  * @brief detach a stream receiver
src/noarch/Stream.cpp 43)  * @param[in] recv stream receiver to detach
src/noarch/Stream.cpp 44)  */
src/noarch/Stream.cpp 45) void Stream::detach(StreamRecv *recv)
src/noarch/Stream.cpp 46) {
src/noarch/Stream.cpp 47)   m_recvs.erase(recv);
src/noarch/Stream.cpp 48) }
src/noarch/Stream.cpp 49) 
src/noarch/Stream.cpp 50) /**
src/noarch/Stream.cpp 51)  * @brief set current frame
Stefan Schuermans merged frame processing wit...

Stefan Schuermans authored 12 years ago

src/noarch/Stream.cpp 52)  * @param[in] pFrame current frame (NULL for none)
Stefan Schuermans first version, plays videos...

Stefan Schuermans authored 13 years ago

src/noarch/Stream.cpp 53)  */
src/noarch/Stream.cpp 54) void Stream::setFrame(stBlinkenFrame *pFrame)
src/noarch/Stream.cpp 55) {
Stefan Schuermans avoid passing on same frame...

Stefan Schuermans authored 12 years ago

src/noarch/Stream.cpp 56)   // leave if frame is already set to an identical one
Stefan Schuermans merged frame processing wit...

Stefan Schuermans authored 12 years ago

src/noarch/Stream.cpp 57)   if (pFrame && m_pFrame && !BlinkenFrameCompare(pFrame, m_pFrame))
Stefan Schuermans avoid passing on same frame...

Stefan Schuermans authored 12 years ago

src/noarch/Stream.cpp 58)     return;
Stefan Schuermans merged frame processing wit...

Stefan Schuermans authored 12 years ago

src/noarch/Stream.cpp 59)   if (!pFrame && !m_pFrame)
Stefan Schuermans avoid passing on same frame...

Stefan Schuermans authored 12 years ago

src/noarch/Stream.cpp 60)     return;
src/noarch/Stream.cpp 61) 
Stefan Schuermans merged frame processing wit...

Stefan Schuermans authored 12 years ago

src/noarch/Stream.cpp 62)   // update local copy of current frame
Stefan Schuermans implemented stream printer...

Stefan Schuermans authored 13 years ago

src/noarch/Stream.cpp 63)   if (m_pFrame) {
src/noarch/Stream.cpp 64)     BlinkenFrameFree(m_pFrame);
src/noarch/Stream.cpp 65)     m_pFrame = NULL;
src/noarch/Stream.cpp 66)   }
Stefan Schuermans merged frame processing wit...

Stefan Schuermans authored 12 years ago

src/noarch/Stream.cpp 67)   if (pFrame) {
src/noarch/Stream.cpp 68)     m_pFrame = BlinkenFrameClone(pFrame);
Stefan Schuermans comment typo fix

Stefan Schuermans authored 12 years ago

src/noarch/Stream.cpp 69)     // in case of NULL returned: out of memory - go on without frame
Stefan Schuermans merged frame processing wit...

Stefan Schuermans authored 12 years ago

src/noarch/Stream.cpp 70)   }
Stefan Schuermans first version, plays videos...

Stefan Schuermans authored 13 years ago

src/noarch/Stream.cpp 71) 
Stefan Schuermans merged frame processing wit...

Stefan Schuermans authored 12 years ago

src/noarch/Stream.cpp 72)   // pass frame to all receivers
Stefan Schuermans first version, plays videos...

Stefan Schuermans authored 13 years ago

src/noarch/Stream.cpp 73)   Recvs::iterator it;
src/noarch/Stream.cpp 74)   for (it = m_recvs.begin(); it != m_recvs.end(); ++it)
Stefan Schuermans merged frame processing wit...

Stefan Schuermans authored 12 years ago

src/noarch/Stream.cpp 75)     (*it)->setFrame(m_name, m_pFrame);
Stefan Schuermans first version, plays videos...

Stefan Schuermans authored 13 years ago

src/noarch/Stream.cpp 76) }
src/noarch/Stream.cpp 77) 
Stefan Schuermans add function to get current...

Stefan Schuermans authored 12 years ago

src/noarch/Stream.cpp 78) /**
src/noarch/Stream.cpp 79)  * @brief get current frame
Stefan Schuermans simplified interface of get...

Stefan Schuermans authored 12 years ago

src/noarch/Stream.cpp 80)  * @return current frame (NULL for none)
Stefan Schuermans add function to get current...

Stefan Schuermans authored 12 years ago

src/noarch/Stream.cpp 81)  */
Stefan Schuermans simplified interface of get...

Stefan Schuermans authored 12 years ago

src/noarch/Stream.cpp 82) stBlinkenFrame * Stream::getCurFrame() const
Stefan Schuermans add function to get current...

Stefan Schuermans authored 12 years ago

src/noarch/Stream.cpp 83) {
Stefan Schuermans simplified interface of get...

Stefan Schuermans authored 12 years ago

src/noarch/Stream.cpp 84)   return m_pFrame;
Stefan Schuermans add function to get current...

Stefan Schuermans authored 12 years ago

src/noarch/Stream.cpp 85) }
src/noarch/Stream.cpp 86)