0136d7be19c628fb9ba6e1d95f79a13f3d75775d
Stefan Schuermans cleanup file headers after...

Stefan Schuermans authored 13 years ago

BlinkenLib/BlinkenMovie.c    1) /* BlinkenLib
Stefan Schuermans move msleep and get_ms to t...

Stefan Schuermans authored 1 year ago

src/BlinkenMovie.c           2)    Copyright 2004-2023 Stefan Schuermans <stefan@schuermans.info>
Stefan Schuermans cleanup file headers after...

Stefan Schuermans authored 13 years ago

BlinkenLib/BlinkenMovie.c    3)    Copyleft GNU public license - http://www.gnu.org/copyleft/gpl.html
BlinkenLib/BlinkenMovie.c    4)    a blinkenarea.org project */
Christian Heimke BlinkenLib v.0.1.1 (2005-01...

Christian Heimke authored 13 years ago

BlinkenMovie.c               5) 
BlinkenMovie.c               6) #include <stdio.h>
BlinkenMovie.c               7) #include <stdlib.h>
BlinkenMovie.c               8) #include <string.h>
Christian Heimke BlinkenLib v.0.5.2 (2006-05...

Christian Heimke authored 13 years ago

BlinkenMovie.c               9) #ifdef WIN32
BlinkenMovie.c              10) #include <windows.h>
Stefan Schuermans format

Stefan Schuermans authored 1 year ago

src/BlinkenMovie.c          11) #include <winsock2.h>
Christian Heimke BlinkenLib v.0.5.2 (2006-05...

Christian Heimke authored 13 years ago

BlinkenMovie.c              12) #else
Stefan Schuermans format

Stefan Schuermans authored 1 year ago

src/BlinkenMovie.c          13) #include <sys/select.h>
src/BlinkenMovie.c          14) #include <sys/socket.h>
Christian Heimke BlinkenLib v.0.3 (2005-02-16)

Christian Heimke authored 13 years ago

BlinkenMovie.c              15) #include <sys/time.h>
BlinkenMovie.c              16) #include <sys/types.h>
Stefan Schuermans format

Stefan Schuermans authored 1 year ago

src/BlinkenMovie.c          17) #include <unistd.h>
Christian Heimke BlinkenLib v.0.5.2 (2006-05...

Christian Heimke authored 13 years ago

BlinkenMovie.c              18) #endif
Christian Heimke BlinkenLib v.0.1.1 (2005-01...

Christian Heimke authored 13 years ago

BlinkenMovie.c              19) 
Christian Heimke BlinkenLib v.0.5.5 (2008-03...

Christian Heimke authored 13 years ago

BlinkenLib/BlinkenMovie.c   20) #include <BlinkenLib/BlinkenFrame.h>
BlinkenLib/BlinkenMovie.c   21) #include <BlinkenLib/BlinkenMovie.h>
Stefan Schuermans make MSleep and GetMS publi...

Stefan Schuermans authored 1 year ago

src/BlinkenMovie.c          22) #include <BlinkenLib/BlinkenTools.h>
Stefan Schuermans restructure directories

Stefan Schuermans authored 5 years ago

src/BlinkenMovie.c          23) 
src/BlinkenMovie.c          24) #include "BlinkenConstants.h"
Stefan Schuermans format

Stefan Schuermans authored 1 year ago

src/BlinkenMovie.c          25) #include "Tools.h"
Christian Heimke BlinkenLib v.0.6.0 (2008-05...

Christian Heimke authored 13 years ago

BlinkenLib/BlinkenMovie.c   26) #ifdef BLINKENLIB_CFG_MNG
Stefan Schuermans restructure directories

Stefan Schuermans authored 5 years ago

src/BlinkenMovie.c          27) #include "BlinkenMng.h"
Christian Heimke BlinkenLib v.0.6.0 (2008-05...

Christian Heimke authored 13 years ago

BlinkenLib/BlinkenMovie.c   28) #endif // #ifdef BLINKENLIB_CFG_MNG
Stefan Schuermans implement reading GIFs

Stefan Schuermans authored 7 years ago

BlinkenLib/BlinkenMovie.c   29) #ifdef BLINKENLIB_CFG_GIF
Stefan Schuermans restructure directories

Stefan Schuermans authored 5 years ago

src/BlinkenMovie.c          30) #include "BlinkenGif.h"
Stefan Schuermans implement reading GIFs

Stefan Schuermans authored 7 years ago

BlinkenLib/BlinkenMovie.c   31) #endif // #ifdef BLINKENLIB_CFG_GIF
Christian Heimke BlinkenLib v.0.1.1 (2005-01...

Christian Heimke authored 13 years ago

BlinkenMovie.c              32) 
Stefan Schuermans changed indenting to be mor...

Stefan Schuermans authored 13 years ago

BlinkenLib/BlinkenMovie.c   33) struct sBlinkenMovie {
Christian Heimke BlinkenLib v.0.1.1 (2005-01...

Christian Heimke authored 13 years ago

BlinkenMovie.c              34)   int height;
BlinkenMovie.c              35)   int width;
BlinkenMovie.c              36)   int channels;
BlinkenMovie.c              37)   int maxval;
BlinkenMovie.c              38)   int infoCnt;
Stefan Schuermans changed indenting to be mor...

Stefan Schuermans authored 13 years ago

BlinkenLib/BlinkenMovie.c   39)   char ***pppInfos;
Christian Heimke BlinkenLib v.0.1.1 (2005-01...

Christian Heimke authored 13 years ago

BlinkenMovie.c              40)   int frameCnt;
Stefan Schuermans changed indenting to be mor...

Stefan Schuermans authored 13 years ago

BlinkenLib/BlinkenMovie.c   41)   stBlinkenFrame **ppFrames;
Christian Heimke BlinkenLib v.0.1.1 (2005-01...

Christian Heimke authored 13 years ago

BlinkenMovie.c              42) };
BlinkenMovie.c              43) 
Stefan Schuermans changed indenting to be mor...

Stefan Schuermans authored 13 years ago

BlinkenLib/BlinkenMovie.c   44) stBlinkenMovie *BlinkenMovieNew(int height, int width, int channels,
Stefan Schuermans format

Stefan Schuermans authored 1 year ago

src/BlinkenMovie.c          45)                                 int maxval) {
Stefan Schuermans changed indenting to be mor...

Stefan Schuermans authored 13 years ago

BlinkenLib/BlinkenMovie.c   46)   stBlinkenMovie *pMovie;
BlinkenLib/BlinkenMovie.c   47) 
BlinkenLib/BlinkenMovie.c   48)   if (height < BlinkenHeightMin)
BlinkenLib/BlinkenMovie.c   49)     height = BlinkenHeightMin;
BlinkenLib/BlinkenMovie.c   50)   if (height > BlinkenHeightMax)
BlinkenLib/BlinkenMovie.c   51)     height = BlinkenHeightMax;
BlinkenLib/BlinkenMovie.c   52)   if (width < BlinkenWidthMin)
BlinkenLib/BlinkenMovie.c   53)     width = BlinkenWidthMin;
BlinkenLib/BlinkenMovie.c   54)   if (width > BlinkenWidthMax)
BlinkenLib/BlinkenMovie.c   55)     width = BlinkenWidthMax;
BlinkenLib/BlinkenMovie.c   56)   if (channels < BlinkenChannelsMin)
BlinkenLib/BlinkenMovie.c   57)     channels = BlinkenChannelsMin;
BlinkenLib/BlinkenMovie.c   58)   if (channels > BlinkenChannelsMax)
BlinkenLib/BlinkenMovie.c   59)     channels = BlinkenMaxvalMax;
BlinkenLib/BlinkenMovie.c   60)   if (maxval < BlinkenMaxvalMin)
BlinkenLib/BlinkenMovie.c   61)     maxval = BlinkenMaxvalMin;
BlinkenLib/BlinkenMovie.c   62)   if (maxval > BlinkenMaxvalMax)
BlinkenLib/BlinkenMovie.c   63)     maxval = BlinkenMaxvalMax;
BlinkenLib/BlinkenMovie.c   64) 
Stefan Schuermans format

Stefan Schuermans authored 1 year ago

src/BlinkenMovie.c          65)   pMovie = (stBlinkenMovie *)malloc(sizeof(stBlinkenMovie));
Stefan Schuermans changed indenting to be mor...

Stefan Schuermans authored 13 years ago

BlinkenLib/BlinkenMovie.c   66)   if (pMovie == NULL)
Christian Heimke BlinkenLib v.0.1.1 (2005-01...

Christian Heimke authored 13 years ago

BlinkenMovie.c              67)     return NULL;
BlinkenMovie.c              68) 
BlinkenMovie.c              69)   pMovie->height = height;
BlinkenMovie.c              70)   pMovie->width = width;
BlinkenMovie.c              71)   pMovie->channels = channels;
BlinkenMovie.c              72)   pMovie->maxval = maxval;
BlinkenMovie.c              73)   pMovie->infoCnt = 0;
Stefan Schuermans adaptions for usage in C++

Stefan Schuermans authored 13 years ago

BlinkenLib/BlinkenMovie.c   74)   pMovie->pppInfos = (char ***)BlinkenMalloc2D(0, 2, sizeof(char *));
Stefan Schuermans changed indenting to be mor...

Stefan Schuermans authored 13 years ago

BlinkenLib/BlinkenMovie.c   75)   if (pMovie->pppInfos == NULL) {
BlinkenLib/BlinkenMovie.c   76)     free(pMovie);
Christian Heimke BlinkenLib v.0.1.1 (2005-01...

Christian Heimke authored 13 years ago

BlinkenMovie.c              77)     return NULL;
BlinkenMovie.c              78)   }
BlinkenMovie.c              79)   pMovie->frameCnt = 0;
Stefan Schuermans changed indenting to be mor...

Stefan Schuermans authored 13 years ago

BlinkenLib/BlinkenMovie.c   80)   pMovie->ppFrames =
Stefan Schuermans format

Stefan Schuermans authored 1 year ago

src/BlinkenMovie.c          81)       (stBlinkenFrame **)BlinkenMalloc1D(0, sizeof(stBlinkenFrame *));
Stefan Schuermans changed indenting to be mor...

Stefan Schuermans authored 13 years ago

BlinkenLib/BlinkenMovie.c   82)   if (pMovie->ppFrames == NULL) {
BlinkenLib/BlinkenMovie.c   83)     free(pMovie->pppInfos);
BlinkenLib/BlinkenMovie.c   84)     free(pMovie);
Christian Heimke BlinkenLib v.0.1.1 (2005-01...

Christian Heimke authored 13 years ago

BlinkenMovie.c              85)     return NULL;
BlinkenMovie.c              86)   }
BlinkenMovie.c              87) 
BlinkenMovie.c              88)   return pMovie;
BlinkenMovie.c              89) }
BlinkenMovie.c              90) 
Stefan Schuermans format

Stefan Schuermans authored 1 year ago

src/BlinkenMovie.c          91) stBlinkenMovie *BlinkenMovieClone(stBlinkenMovie *pSrcMovie) {
Stefan Schuermans changed indenting to be mor...

Stefan Schuermans authored 13 years ago

BlinkenLib/BlinkenMovie.c   92)   stBlinkenMovie *pMovie;
BlinkenLib/BlinkenMovie.c   93)   stBlinkenFrame *pFrame;
Christian Heimke BlinkenLib v.0.1.1 (2005-01...

Christian Heimke authored 13 years ago

BlinkenMovie.c              94)   int i;
BlinkenMovie.c              95) 
Stefan Schuermans format

Stefan Schuermans authored 1 year ago

src/BlinkenMovie.c          96)   pMovie = BlinkenMovieNew(pSrcMovie->height, pSrcMovie->width,
src/BlinkenMovie.c          97)                            pSrcMovie->channels, pSrcMovie->maxval);
Stefan Schuermans changed indenting to be mor...

Stefan Schuermans authored 13 years ago

BlinkenLib/BlinkenMovie.c   98)   if (pMovie == NULL)
Christian Heimke BlinkenLib v.0.1.1 (2005-01...

Christian Heimke authored 13 years ago

BlinkenMovie.c              99)     return NULL;
BlinkenMovie.c             100) 
Stefan Schuermans changed indenting to be mor...

Stefan Schuermans authored 13 years ago

BlinkenLib/BlinkenMovie.c  101)   for (i = 0; i < pSrcMovie->infoCnt; i++)
BlinkenLib/BlinkenMovie.c  102)     BlinkenMovieAppendInfo(pMovie, pSrcMovie->pppInfos[i][0],
BlinkenLib/BlinkenMovie.c  103)                            pSrcMovie->pppInfos[i][1]);
Christian Heimke BlinkenLib v.0.1.1 (2005-01...

Christian Heimke authored 13 years ago

BlinkenMovie.c             104) 
Stefan Schuermans changed indenting to be mor...

Stefan Schuermans authored 13 years ago

BlinkenLib/BlinkenMovie.c  105)   for (i = 0; i < pSrcMovie->frameCnt; i++) {
BlinkenLib/BlinkenMovie.c  106)     pFrame = BlinkenFrameClone(pSrcMovie->ppFrames[i]);
BlinkenLib/BlinkenMovie.c  107)     if (BlinkenMovieAppendFrame(pMovie, pFrame) != 0)
BlinkenLib/BlinkenMovie.c  108)       BlinkenFrameFree(pFrame);
Christian Heimke BlinkenLib v.0.3 (2005-02-16)

Christian Heimke authored 13 years ago

BlinkenMovie.c             109)   }
Christian Heimke BlinkenLib v.0.1.1 (2005-01...

Christian Heimke authored 13 years ago

BlinkenMovie.c             110) 
BlinkenMovie.c             111)   return pMovie;
BlinkenMovie.c             112) }
BlinkenMovie.c             113) 
Stefan Schuermans format

Stefan Schuermans authored 1 year ago

src/BlinkenMovie.c         114) void BlinkenMovieFree(stBlinkenMovie *pMovie) {
Christian Heimke BlinkenLib v.0.1.1 (2005-01...

Christian Heimke authored 13 years ago

BlinkenMovie.c             115)   int i;
BlinkenMovie.c             116) 
Stefan Schuermans changed indenting to be mor...

Stefan Schuermans authored 13 years ago

BlinkenLib/BlinkenMovie.c  117)   if (pMovie == NULL)
Christian Heimke BlinkenLib v.0.1.1 (2005-01...

Christian Heimke authored 13 years ago

BlinkenMovie.c             118)     return;
BlinkenMovie.c             119) 
Stefan Schuermans changed indenting to be mor...

Stefan Schuermans authored 13 years ago

BlinkenLib/BlinkenMovie.c  120)   for (i = 0; i < pMovie->infoCnt; i++) {
BlinkenLib/BlinkenMovie.c  121)     free(pMovie->pppInfos[i][0]);
BlinkenLib/BlinkenMovie.c  122)     free(pMovie->pppInfos[i][1]);
Christian Heimke BlinkenLib v.0.1.1 (2005-01...

Christian Heimke authored 13 years ago

BlinkenMovie.c             123)   }
Stefan Schuermans changed indenting to be mor...

Stefan Schuermans authored 13 years ago

BlinkenLib/BlinkenMovie.c  124)   free(pMovie->pppInfos);
Christian Heimke BlinkenLib v.0.1.1 (2005-01...

Christian Heimke authored 13 years ago

BlinkenMovie.c             125) 
Stefan Schuermans changed indenting to be mor...

Stefan Schuermans authored 13 years ago

BlinkenLib/BlinkenMovie.c  126)   for (i = 0; i < pMovie->frameCnt; i++)
BlinkenLib/BlinkenMovie.c  127)     BlinkenFrameFree(pMovie->ppFrames[i]);
BlinkenLib/BlinkenMovie.c  128)   free(pMovie->ppFrames);
Christian Heimke BlinkenLib v.0.1.1 (2005-01...

Christian Heimke authored 13 years ago

BlinkenMovie.c             129) 
Stefan Schuermans changed indenting to be mor...

Stefan Schuermans authored 13 years ago

BlinkenLib/BlinkenMovie.c  130)   free(pMovie);
Christian Heimke BlinkenLib v.0.1.1 (2005-01...

Christian Heimke authored 13 years ago

BlinkenMovie.c             131) }
BlinkenMovie.c             132) 
Stefan Schuermans format

Stefan Schuermans authored 1 year ago

src/BlinkenMovie.c         133) int BlinkenMovieGetHeight(stBlinkenMovie *pMovie) {
Stefan Schuermans changed indenting to be mor...

Stefan Schuermans authored 13 years ago

BlinkenLib/BlinkenMovie.c  134)   if (pMovie == NULL)
Christian Heimke BlinkenLib v.0.1.1 (2005-01...

Christian Heimke authored 13 years ago

BlinkenMovie.c             135)     return 0;
BlinkenMovie.c             136) 
BlinkenMovie.c             137)   return pMovie->height;
BlinkenMovie.c             138) }
BlinkenMovie.c             139) 
Stefan Schuermans format

Stefan Schuermans authored 1 year ago

src/BlinkenMovie.c         140) int BlinkenMovieGetWidth(stBlinkenMovie *pMovie) {
Stefan Schuermans changed indenting to be mor...

Stefan Schuermans authored 13 years ago

BlinkenLib/BlinkenMovie.c  141)   if (pMovie == NULL)
Christian Heimke BlinkenLib v.0.1.1 (2005-01...

Christian Heimke authored 13 years ago

BlinkenMovie.c             142)     return 0;
BlinkenMovie.c             143) 
BlinkenMovie.c             144)   return pMovie->width;
BlinkenMovie.c             145) }
BlinkenMovie.c             146) 
Stefan Schuermans format

Stefan Schuermans authored 1 year ago

src/BlinkenMovie.c         147) int BlinkenMovieGetChannels(stBlinkenMovie *pMovie) {
Stefan Schuermans changed indenting to be mor...

Stefan Schuermans authored 13 years ago

BlinkenLib/BlinkenMovie.c  148)   if (pMovie == NULL)
Christian Heimke BlinkenLib v.0.1.1 (2005-01...

Christian Heimke authored 13 years ago

BlinkenMovie.c             149)     return 0;
BlinkenMovie.c             150) 
BlinkenMovie.c             151)   return pMovie->channels;
BlinkenMovie.c             152) }
BlinkenMovie.c             153) 
Stefan Schuermans format

Stefan Schuermans authored 1 year ago

src/BlinkenMovie.c         154) int BlinkenMovieGetMaxval(stBlinkenMovie *pMovie) {
Stefan Schuermans changed indenting to be mor...

Stefan Schuermans authored 13 years ago

BlinkenLib/BlinkenMovie.c  155)   if (pMovie == NULL)
Christian Heimke BlinkenLib v.0.1.1 (2005-01...

Christian Heimke authored 13 years ago

BlinkenMovie.c             156)     return 0;
BlinkenMovie.c             157) 
BlinkenMovie.c             158)   return pMovie->maxval;
BlinkenMovie.c             159) }
BlinkenMovie.c             160) 
Stefan Schuermans format

Stefan Schuermans authored 1 year ago

src/BlinkenMovie.c         161) int BlinkenMovieGetDuration(stBlinkenMovie *pMovie) {
Christian Heimke BlinkenLib v.0.1.1 (2005-01...

Christian Heimke authored 13 years ago

BlinkenMovie.c             162)   int i, duration;
BlinkenMovie.c             163) 
Stefan Schuermans changed indenting to be mor...

Stefan Schuermans authored 13 years ago

BlinkenLib/BlinkenMovie.c  164)   if (pMovie == NULL)
Christian Heimke BlinkenLib v.0.1.1 (2005-01...

Christian Heimke authored 13 years ago

BlinkenMovie.c             165)     return 0;
BlinkenMovie.c             166) 
BlinkenMovie.c             167)   duration = 0;
Stefan Schuermans changed indenting to be mor...

Stefan Schuermans authored 13 years ago

BlinkenLib/BlinkenMovie.c  168)   for (i = 0; i < pMovie->frameCnt; i++)
BlinkenLib/BlinkenMovie.c  169)     duration += BlinkenFrameGetDuration(pMovie->ppFrames[i]);
Christian Heimke BlinkenLib v.0.1.1 (2005-01...

Christian Heimke authored 13 years ago

BlinkenMovie.c             170)   return duration;
BlinkenMovie.c             171) }
BlinkenMovie.c             172) 
Stefan Schuermans format

Stefan Schuermans authored 1 year ago

src/BlinkenMovie.c         173) int BlinkenMovieGetInfoCnt(stBlinkenMovie *pMovie) {
Stefan Schuermans changed indenting to be mor...

Stefan Schuermans authored 13 years ago

BlinkenLib/BlinkenMovie.c  174)   if (pMovie == NULL)
Christian Heimke BlinkenLib v.0.1.1 (2005-01...

Christian Heimke authored 13 years ago

BlinkenMovie.c             175)     return 0;
BlinkenMovie.c             176) 
BlinkenMovie.c             177)   return pMovie->infoCnt;
BlinkenMovie.c             178) }
BlinkenMovie.c             179) 
Stefan Schuermans format

Stefan Schuermans authored 1 year ago

src/BlinkenMovie.c         180) char *BlinkenMovieGetInfoType(stBlinkenMovie *pMovie, int infoNo) {
Stefan Schuermans changed indenting to be mor...

Stefan Schuermans authored 13 years ago

BlinkenLib/BlinkenMovie.c  181)   if (pMovie == NULL || pMovie->infoCnt < 1)
Christian Heimke BlinkenLib v.0.1.1 (2005-01...

Christian Heimke authored 13 years ago

BlinkenMovie.c             182)     return "";
BlinkenMovie.c             183) 
Stefan Schuermans changed indenting to be mor...

Stefan Schuermans authored 13 years ago

BlinkenLib/BlinkenMovie.c  184)   if (infoNo < 0)
BlinkenLib/BlinkenMovie.c  185)     infoNo = 0;
BlinkenLib/BlinkenMovie.c  186)   if (infoNo >= pMovie->infoCnt)
BlinkenLib/BlinkenMovie.c  187)     infoNo = pMovie->infoCnt - 1;
Christian Heimke BlinkenLib v.0.1.1 (2005-01...

Christian Heimke authored 13 years ago

BlinkenMovie.c             188)   return pMovie->pppInfos[infoNo][0];
BlinkenMovie.c             189) }
BlinkenMovie.c             190) 
Stefan Schuermans format

Stefan Schuermans authored 1 year ago

src/BlinkenMovie.c         191) char *BlinkenMovieGetInfoData(stBlinkenMovie *pMovie, int infoNo) {
Stefan Schuermans changed indenting to be mor...

Stefan Schuermans authored 13 years ago

BlinkenLib/BlinkenMovie.c  192)   if (pMovie == NULL || pMovie->infoCnt < 1)
Christian Heimke BlinkenLib v.0.1.1 (2005-01...

Christian Heimke authored 13 years ago

BlinkenMovie.c             193)     return "";
BlinkenMovie.c             194) 
Stefan Schuermans changed indenting to be mor...

Stefan Schuermans authored 13 years ago

BlinkenLib/BlinkenMovie.c  195)   if (infoNo < 0)
BlinkenLib/BlinkenMovie.c  196)     infoNo = 0;
BlinkenLib/BlinkenMovie.c  197)   if (infoNo >= pMovie->infoCnt)
BlinkenLib/BlinkenMovie.c  198)     infoNo = pMovie->infoCnt - 1;
Christian Heimke BlinkenLib v.0.1.1 (2005-01...

Christian Heimke authored 13 years ago

BlinkenMovie.c             199)   return pMovie->pppInfos[infoNo][1];
BlinkenMovie.c             200) }
BlinkenMovie.c             201) 
Stefan Schuermans adaptions for usage in C++

Stefan Schuermans authored 13 years ago

BlinkenLib/BlinkenMovie.c  202) void BlinkenMovieSetInfo(stBlinkenMovie *pMovie, int infoNo,
Stefan Schuermans format

Stefan Schuermans authored 1 year ago

src/BlinkenMovie.c         203)                          const char *pInfoType, const char *pInfoData) {
Stefan Schuermans changed indenting to be mor...

Stefan Schuermans authored 13 years ago

BlinkenLib/BlinkenMovie.c  204)   char *pType, *pData;
Christian Heimke BlinkenLib v.0.1.1 (2005-01...

Christian Heimke authored 13 years ago

BlinkenMovie.c             205) 
Stefan Schuermans changed indenting to be mor...

Stefan Schuermans authored 13 years ago

BlinkenLib/BlinkenMovie.c  206)   if (pMovie == NULL || infoNo < 0 || infoNo >= pMovie->infoCnt)
Christian Heimke BlinkenLib v.0.1.1 (2005-01...

Christian Heimke authored 13 years ago

BlinkenMovie.c             207)     return;
BlinkenMovie.c             208) 
Stefan Schuermans changed indenting to be mor...

Stefan Schuermans authored 13 years ago

BlinkenLib/BlinkenMovie.c  209)   pType = strdup(pInfoType);
BlinkenLib/BlinkenMovie.c  210)   if (pType == NULL)
Christian Heimke BlinkenLib v.0.1.1 (2005-01...

Christian Heimke authored 13 years ago

BlinkenMovie.c             211)     return;
Stefan Schuermans changed indenting to be mor...

Stefan Schuermans authored 13 years ago

BlinkenLib/BlinkenMovie.c  212)   pData = strdup(pInfoData);
BlinkenLib/BlinkenMovie.c  213)   if (pData == NULL) {
BlinkenLib/BlinkenMovie.c  214)     free(pType);
Christian Heimke BlinkenLib v.0.1.1 (2005-01...

Christian Heimke authored 13 years ago

BlinkenMovie.c             215)     return;
BlinkenMovie.c             216)   }
BlinkenMovie.c             217) 
Stefan Schuermans changed indenting to be mor...

Stefan Schuermans authored 13 years ago

BlinkenLib/BlinkenMovie.c  218)   free(pMovie->pppInfos[infoNo][0]);
Christian Heimke BlinkenLib v.0.1.1 (2005-01...

Christian Heimke authored 13 years ago

BlinkenMovie.c             219)   pMovie->pppInfos[infoNo][0] = pType;
Stefan Schuermans changed indenting to be mor...

Stefan Schuermans authored 13 years ago

BlinkenLib/BlinkenMovie.c  220)   free(pMovie->pppInfos[infoNo][1]);
Christian Heimke BlinkenLib v.0.1.1 (2005-01...

Christian Heimke authored 13 years ago

BlinkenMovie.c             221)   pMovie->pppInfos[infoNo][1] = pData;
BlinkenMovie.c             222) }
BlinkenMovie.c             223) 
Stefan Schuermans changed indenting to be mor...

Stefan Schuermans authored 13 years ago

BlinkenLib/BlinkenMovie.c  224) void BlinkenMovieInsertInfo(stBlinkenMovie *pMovie, int infoNo,
Stefan Schuermans format

Stefan Schuermans authored 1 year ago

src/BlinkenMovie.c         225)                             const char *pInfoType, const char *pInfoData) {
Stefan Schuermans changed indenting to be mor...

Stefan Schuermans authored 13 years ago

BlinkenLib/BlinkenMovie.c  226)   char ***pppNewInfos, *pType, *pData;
Christian Heimke BlinkenLib v.0.1.1 (2005-01...

Christian Heimke authored 13 years ago

BlinkenMovie.c             227)   int i;
BlinkenMovie.c             228) 
Stefan Schuermans changed indenting to be mor...

Stefan Schuermans authored 13 years ago

BlinkenLib/BlinkenMovie.c  229)   if (pMovie == NULL || infoNo < 0 || infoNo > pMovie->infoCnt)
Christian Heimke BlinkenLib v.0.1.1 (2005-01...

Christian Heimke authored 13 years ago

BlinkenMovie.c             230)     return;
BlinkenMovie.c             231) 
Stefan Schuermans format

Stefan Schuermans authored 1 year ago

src/BlinkenMovie.c         232)   pppNewInfos =
src/BlinkenMovie.c         233)       (char ***)BlinkenMalloc2D(pMovie->infoCnt + 1, 2, sizeof(char *));
Stefan Schuermans changed indenting to be mor...

Stefan Schuermans authored 13 years ago

BlinkenLib/BlinkenMovie.c  234)   if (pppNewInfos == NULL)
Christian Heimke BlinkenLib v.0.1.1 (2005-01...

Christian Heimke authored 13 years ago

BlinkenMovie.c             235)     return;
BlinkenMovie.c             236) 
Stefan Schuermans changed indenting to be mor...

Stefan Schuermans authored 13 years ago

BlinkenLib/BlinkenMovie.c  237)   pType = strdup(pInfoType);
BlinkenLib/BlinkenMovie.c  238)   if (pType == NULL) {
BlinkenLib/BlinkenMovie.c  239)     free(pppNewInfos);
Christian Heimke BlinkenLib v.0.1.1 (2005-01...

Christian Heimke authored 13 years ago

BlinkenMovie.c             240)     return;
BlinkenMovie.c             241)   }
Stefan Schuermans changed indenting to be mor...

Stefan Schuermans authored 13 years ago

BlinkenLib/BlinkenMovie.c  242)   pData = strdup(pInfoData);
BlinkenLib/BlinkenMovie.c  243)   if (pData == NULL) {
BlinkenLib/BlinkenMovie.c  244)     free(pppNewInfos);
BlinkenLib/BlinkenMovie.c  245)     free(pType);
Christian Heimke BlinkenLib v.0.1.1 (2005-01...

Christian Heimke authored 13 years ago

BlinkenMovie.c             246)     return;
BlinkenMovie.c             247)   }
BlinkenMovie.c             248) 
Stefan Schuermans changed indenting to be mor...

Stefan Schuermans authored 13 years ago

BlinkenLib/BlinkenMovie.c  249)   for (i = 0; i < infoNo; i++) {
Christian Heimke BlinkenLib v.0.1.1 (2005-01...

Christian Heimke authored 13 years ago

BlinkenMovie.c             250)     pppNewInfos[i][0] = pMovie->pppInfos[i][0];
BlinkenMovie.c             251)     pppNewInfos[i][1] = pMovie->pppInfos[i][1];
BlinkenMovie.c             252)   }
BlinkenMovie.c             253) 
BlinkenMovie.c             254)   pppNewInfos[infoNo][0] = pType;
BlinkenMovie.c             255)   pppNewInfos[infoNo][1] = pData;
BlinkenMovie.c             256) 
Stefan Schuermans changed indenting to be mor...

Stefan Schuermans authored 13 years ago

BlinkenLib/BlinkenMovie.c  257)   for (i = infoNo; i < pMovie->infoCnt; i++) {
BlinkenLib/BlinkenMovie.c  258)     pppNewInfos[i + 1][0] = pMovie->pppInfos[i][0];
BlinkenLib/BlinkenMovie.c  259)     pppNewInfos[i + 1][1] = pMovie->pppInfos[i][1];
Christian Heimke BlinkenLib v.0.1.1 (2005-01...

Christian Heimke authored 13 years ago

BlinkenMovie.c             260)   }
BlinkenMovie.c             261) 
Stefan Schuermans changed indenting to be mor...

Stefan Schuermans authored 13 years ago

BlinkenLib/BlinkenMovie.c  262)   free(pMovie->pppInfos);
Christian Heimke BlinkenLib v.0.1.1 (2005-01...

Christian Heimke authored 13 years ago

BlinkenMovie.c             263)   pMovie->pppInfos = pppNewInfos;
BlinkenMovie.c             264)   pMovie->infoCnt++;
BlinkenMovie.c             265) }
BlinkenMovie.c             266) 
Stefan Schuermans adaptions for usage in C++

Stefan Schuermans authored 13 years ago

BlinkenLib/BlinkenMovie.c  267) void BlinkenMovieAppendInfo(stBlinkenMovie *pMovie, const char *pInfoType,
Stefan Schuermans format

Stefan Schuermans authored 1 year ago

src/BlinkenMovie.c         268)                             const char *pInfoData) {
Stefan Schuermans changed indenting to be mor...

Stefan Schuermans authored 13 years ago

BlinkenLib/BlinkenMovie.c  269)   if (pMovie == NULL)
Christian Heimke BlinkenLib v.0.1.1 (2005-01...

Christian Heimke authored 13 years ago

BlinkenMovie.c             270)     return;
BlinkenMovie.c             271) 
Stefan Schuermans changed indenting to be mor...

Stefan Schuermans authored 13 years ago

BlinkenLib/BlinkenMovie.c  272)   BlinkenMovieInsertInfo(pMovie, pMovie->infoCnt, pInfoType, pInfoData);
Christian Heimke BlinkenLib v.0.1.1 (2005-01...

Christian Heimke authored 13 years ago

BlinkenMovie.c             273) }
BlinkenMovie.c             274) 
Stefan Schuermans format

Stefan Schuermans authored 1 year ago

src/BlinkenMovie.c         275) void BlinkenMovieDeleteInfo(stBlinkenMovie *pMovie, int infoNo) {
Stefan Schuermans changed indenting to be mor...

Stefan Schuermans authored 13 years ago

BlinkenLib/BlinkenMovie.c  276)   char ***pppNewInfos;
Christian Heimke BlinkenLib v.0.1.1 (2005-01...

Christian Heimke authored 13 years ago

BlinkenMovie.c             277)   int i;
BlinkenMovie.c             278) 
Stefan Schuermans changed indenting to be mor...

Stefan Schuermans authored 13 years ago

BlinkenLib/BlinkenMovie.c  279)   if (pMovie == NULL || infoNo < 0 || infoNo >= pMovie->infoCnt)
Christian Heimke BlinkenLib v.0.1.1 (2005-01...

Christian Heimke authored 13 years ago

BlinkenMovie.c             280)     return;
BlinkenMovie.c             281) 
Stefan Schuermans format

Stefan Schuermans authored 1 year ago

src/BlinkenMovie.c         282)   pppNewInfos =
src/BlinkenMovie.c         283)       (char ***)BlinkenMalloc2D(pMovie->infoCnt - 1, 2, sizeof(char *));
Stefan Schuermans changed indenting to be mor...

Stefan Schuermans authored 13 years ago

BlinkenLib/BlinkenMovie.c  284)   if (pppNewInfos == NULL)
Christian Heimke BlinkenLib v.0.1.1 (2005-01...

Christian Heimke authored 13 years ago

BlinkenMovie.c             285)     return;
BlinkenMovie.c             286) 
Stefan Schuermans changed indenting to be mor...

Stefan Schuermans authored 13 years ago

BlinkenLib/BlinkenMovie.c  287)   for (i = 0; i < infoNo; i++) {
Christian Heimke BlinkenLib v.0.1.1 (2005-01...

Christian Heimke authored 13 years ago

BlinkenMovie.c             288)     pppNewInfos[i][0] = pMovie->pppInfos[i][0];
BlinkenMovie.c             289)     pppNewInfos[i][1] = pMovie->pppInfos[i][1];
BlinkenMovie.c             290)   }
BlinkenMovie.c             291) 
Stefan Schuermans changed indenting to be mor...

Stefan Schuermans authored 13 years ago

BlinkenLib/BlinkenMovie.c  292)   free(pMovie->pppInfos[infoNo][0]);
BlinkenLib/BlinkenMovie.c  293)   free(pMovie->pppInfos[infoNo][1]);
Christian Heimke BlinkenLib v.0.1.1 (2005-01...

Christian Heimke authored 13 years ago

BlinkenMovie.c             294) 
Stefan Schuermans changed indenting to be mor...

Stefan Schuermans authored 13 years ago

BlinkenLib/BlinkenMovie.c  295)   for (i = infoNo; i < pMovie->infoCnt - 1; i++) {
BlinkenLib/BlinkenMovie.c  296)     pppNewInfos[i][0] = pMovie->pppInfos[i + 1][0];
BlinkenLib/BlinkenMovie.c  297)     pppNewInfos[i][1] = pMovie->pppInfos[i + 1][1];
Christian Heimke BlinkenLib v.0.1.1 (2005-01...

Christian Heimke authored 13 years ago

BlinkenMovie.c             298)   }
BlinkenMovie.c             299) 
Stefan Schuermans changed indenting to be mor...

Stefan Schuermans authored 13 years ago

BlinkenLib/BlinkenMovie.c  300)   free(pMovie->pppInfos);
Christian Heimke BlinkenLib v.0.1.1 (2005-01...

Christian Heimke authored 13 years ago

BlinkenMovie.c             301)   pMovie->pppInfos = pppNewInfos;
BlinkenMovie.c             302)   pMovie->infoCnt--;
BlinkenMovie.c             303) }
BlinkenMovie.c             304) 
Stefan Schuermans format

Stefan Schuermans authored 1 year ago

src/BlinkenMovie.c         305) void BlinkenMovieDeleteInfos(stBlinkenMovie *pMovie) {
Stefan Schuermans changed indenting to be mor...

Stefan Schuermans authored 13 years ago

BlinkenLib/BlinkenMovie.c  306)   char ***pppNewInfos;
Christian Heimke BlinkenLib v.0.1.1 (2005-01...

Christian Heimke authored 13 years ago

BlinkenMovie.c             307)   int i;
BlinkenMovie.c             308) 
Stefan Schuermans changed indenting to be mor...

Stefan Schuermans authored 13 years ago

BlinkenLib/BlinkenMovie.c  309)   if (pMovie == NULL)
Christian Heimke BlinkenLib v.0.1.1 (2005-01...

Christian Heimke authored 13 years ago

BlinkenMovie.c             310)     return;
BlinkenMovie.c             311) 
Stefan Schuermans adaptions for usage in C++

Stefan Schuermans authored 13 years ago

BlinkenLib/BlinkenMovie.c  312)   pppNewInfos = (char ***)BlinkenMalloc2D(0, 2, sizeof(char *));
Stefan Schuermans changed indenting to be mor...

Stefan Schuermans authored 13 years ago

BlinkenLib/BlinkenMovie.c  313)   if (pppNewInfos == NULL)
Christian Heimke BlinkenLib v.0.1.1 (2005-01...

Christian Heimke authored 13 years ago

BlinkenMovie.c             314)     return;
BlinkenMovie.c             315) 
Stefan Schuermans changed indenting to be mor...

Stefan Schuermans authored 13 years ago

BlinkenLib/BlinkenMovie.c  316)   for (i = 0; i < pMovie->infoCnt; i++) {
BlinkenLib/BlinkenMovie.c  317)     free(pMovie->pppInfos[i][0]);
BlinkenLib/BlinkenMovie.c  318)     free(pMovie->pppInfos[i][1]);
Christian Heimke BlinkenLib v.0.1.1 (2005-01...

Christian Heimke authored 13 years ago

BlinkenMovie.c             319)   }
BlinkenMovie.c             320) 
Stefan Schuermans changed indenting to be mor...

Stefan Schuermans authored 13 years ago

BlinkenLib/BlinkenMovie.c  321)   free(pMovie->pppInfos);
Christian Heimke BlinkenLib v.0.1.1 (2005-01...

Christian Heimke authored 13 years ago

BlinkenMovie.c             322)   pMovie->pppInfos = pppNewInfos;
BlinkenMovie.c             323)   pMovie->infoCnt = 0;
BlinkenMovie.c             324) }
BlinkenMovie.c             325) 
Stefan Schuermans format

Stefan Schuermans authored 1 year ago

src/BlinkenMovie.c         326) int BlinkenMovieGetFrameCnt(stBlinkenMovie *pMovie) {
Stefan Schuermans changed indenting to be mor...

Stefan Schuermans authored 13 years ago

BlinkenLib/BlinkenMovie.c  327)   if (pMovie == NULL)
Christian Heimke BlinkenLib v.0.1.1 (2005-01...

Christian Heimke authored 13 years ago

BlinkenMovie.c             328)     return 0;
BlinkenMovie.c             329) 
BlinkenMovie.c             330)   return pMovie->frameCnt;
BlinkenMovie.c             331) }
BlinkenMovie.c             332) 
Stefan Schuermans format

Stefan Schuermans authored 1 year ago

src/BlinkenMovie.c         333) stBlinkenFrame *BlinkenMovieGetFrame(stBlinkenMovie *pMovie, int frameNo) {
Stefan Schuermans changed indenting to be mor...

Stefan Schuermans authored 13 years ago

BlinkenLib/BlinkenMovie.c  334)   if (pMovie == NULL || pMovie->frameCnt < 1)
Christian Heimke BlinkenLib v.0.1.1 (2005-01...

Christian Heimke authored 13 years ago

BlinkenMovie.c             335)     return NULL;
BlinkenMovie.c             336) 
Stefan Schuermans changed indenting to be mor...

Stefan Schuermans authored 13 years ago

BlinkenLib/BlinkenMovie.c  337)   if (frameNo < 0)
BlinkenLib/BlinkenMovie.c  338)     frameNo = 0;
BlinkenLib/BlinkenMovie.c  339)   if (frameNo >= pMovie->frameCnt)
BlinkenLib/BlinkenMovie.c  340)     frameNo = pMovie->frameCnt - 1;
Christian Heimke BlinkenLib v.0.1.1 (2005-01...

Christian Heimke authored 13 years ago

BlinkenMovie.c             341)   return pMovie->ppFrames[frameNo];
BlinkenMovie.c             342) }
BlinkenMovie.c             343) 
Stefan Schuermans changed indenting to be mor...

Stefan Schuermans authored 13 years ago

BlinkenLib/BlinkenMovie.c  344) void BlinkenMovieSetFrame(stBlinkenMovie *pMovie, int frameNo,
Stefan Schuermans format

Stefan Schuermans authored 1 year ago

src/BlinkenMovie.c         345)                           stBlinkenFrame *pFrame) {
Stefan Schuermans changed indenting to be mor...

Stefan Schuermans authored 13 years ago

BlinkenLib/BlinkenMovie.c  346)   if (pMovie == NULL || frameNo < 0 || frameNo >= pMovie->frameCnt)
Christian Heimke BlinkenLib v.0.1.1 (2005-01...

Christian Heimke authored 13 years ago

BlinkenMovie.c             347)     return;
BlinkenMovie.c             348) 
Stefan Schuermans changed indenting to be mor...

Stefan Schuermans authored 13 years ago

BlinkenLib/BlinkenMovie.c  349)   BlinkenFrameResize(pFrame, pMovie->height, pMovie->width, pMovie->channels,
BlinkenLib/BlinkenMovie.c  350)                      pMovie->maxval);
Christian Heimke BlinkenLib v.0.1.1 (2005-01...

Christian Heimke authored 13 years ago

BlinkenMovie.c             351)   pMovie->ppFrames[frameNo] = pFrame;
BlinkenMovie.c             352) }
BlinkenMovie.c             353) 
Stefan Schuermans changed indenting to be mor...

Stefan Schuermans authored 13 years ago

BlinkenLib/BlinkenMovie.c  354) int BlinkenMovieInsertFrame(stBlinkenMovie *pMovie, int frameNo,
Stefan Schuermans format

Stefan Schuermans authored 1 year ago

src/BlinkenMovie.c         355)                             stBlinkenFrame *pFrame) {
Stefan Schuermans changed indenting to be mor...

Stefan Schuermans authored 13 years ago

BlinkenLib/BlinkenMovie.c  356)   stBlinkenFrame **ppNewFrames;
Christian Heimke BlinkenLib v.0.1.1 (2005-01...

Christian Heimke authored 13 years ago

BlinkenMovie.c             357)   int i;
BlinkenMovie.c             358) 
Stefan Schuermans changed indenting to be mor...

Stefan Schuermans authored 13 years ago

BlinkenLib/BlinkenMovie.c  359)   if (pMovie == NULL || frameNo < 0 || frameNo > pMovie->frameCnt)
Christian Heimke BlinkenLib v.0.3 (2005-02-16)

Christian Heimke authored 13 years ago

BlinkenMovie.c             360)     return -1;
Christian Heimke BlinkenLib v.0.1.1 (2005-01...

Christian Heimke authored 13 years ago

BlinkenMovie.c             361) 
Stefan Schuermans format

Stefan Schuermans authored 1 year ago

src/BlinkenMovie.c         362)   ppNewFrames = (stBlinkenFrame **)BlinkenMalloc1D(pMovie->frameCnt + 1,
src/BlinkenMovie.c         363)                                                    sizeof(stBlinkenFrame *));
Stefan Schuermans changed indenting to be mor...

Stefan Schuermans authored 13 years ago

BlinkenLib/BlinkenMovie.c  364)   if (ppNewFrames == NULL)
Christian Heimke BlinkenLib v.0.3 (2005-02-16)

Christian Heimke authored 13 years ago

BlinkenMovie.c             365)     return -1;
Christian Heimke BlinkenLib v.0.1.1 (2005-01...

Christian Heimke authored 13 years ago

BlinkenMovie.c             366) 
Stefan Schuermans changed indenting to be mor...

Stefan Schuermans authored 13 years ago

BlinkenLib/BlinkenMovie.c  367)   for (i = 0; i < frameNo; i++)
Christian Heimke BlinkenLib v.0.1.1 (2005-01...

Christian Heimke authored 13 years ago

BlinkenMovie.c             368)     ppNewFrames[i] = pMovie->ppFrames[i];
BlinkenMovie.c             369) 
Stefan Schuermans changed indenting to be mor...

Stefan Schuermans authored 13 years ago

BlinkenLib/BlinkenMovie.c  370)   BlinkenFrameResize(pFrame, pMovie->height, pMovie->width, pMovie->channels,
BlinkenLib/BlinkenMovie.c  371)                      pMovie->maxval);
Christian Heimke BlinkenLib v.0.1.1 (2005-01...

Christian Heimke authored 13 years ago

BlinkenMovie.c             372)   ppNewFrames[frameNo] = pFrame;
BlinkenMovie.c             373) 
Stefan Schuermans changed indenting to be mor...

Stefan Schuermans authored 13 years ago

BlinkenLib/BlinkenMovie.c  374)   for (i = frameNo; i < pMovie->frameCnt; i++)
BlinkenLib/BlinkenMovie.c  375)     ppNewFrames[i + 1] = pMovie->ppFrames[i];
Christian Heimke BlinkenLib v.0.1.1 (2005-01...

Christian Heimke authored 13 years ago

BlinkenMovie.c             376) 
Stefan Schuermans changed indenting to be mor...

Stefan Schuermans authored 13 years ago

BlinkenLib/BlinkenMovie.c  377)   free(pMovie->ppFrames);
Christian Heimke BlinkenLib v.0.1.1 (2005-01...

Christian Heimke authored 13 years ago

BlinkenMovie.c             378)   pMovie->ppFrames = ppNewFrames;
BlinkenMovie.c             379)   pMovie->frameCnt++;
Christian Heimke BlinkenLib v.0.3 (2005-02-16)

Christian Heimke authored 13 years ago

BlinkenMovie.c             380)   return 0;
Christian Heimke BlinkenLib v.0.1.1 (2005-01...

Christian Heimke authored 13 years ago

BlinkenMovie.c             381) }
BlinkenMovie.c             382) 
Stefan Schuermans format

Stefan Schuermans authored 1 year ago

src/BlinkenMovie.c         383) int BlinkenMovieAppendFrame(stBlinkenMovie *pMovie, stBlinkenFrame *pFrame) {
Stefan Schuermans changed indenting to be mor...

Stefan Schuermans authored 13 years ago

BlinkenLib/BlinkenMovie.c  384)   if (pMovie == NULL)
Christian Heimke BlinkenLib v.0.3 (2005-02-16)

Christian Heimke authored 13 years ago

BlinkenMovie.c             385)     return -1;
Christian Heimke BlinkenLib v.0.1.1 (2005-01...

Christian Heimke authored 13 years ago

BlinkenMovie.c             386) 
Stefan Schuermans changed indenting to be mor...

Stefan Schuermans authored 13 years ago

BlinkenLib/BlinkenMovie.c  387)   return BlinkenMovieInsertFrame(pMovie, pMovie->frameCnt, pFrame);
Christian Heimke BlinkenLib v.0.1.1 (2005-01...

Christian Heimke authored 13 years ago

BlinkenMovie.c             388) }
BlinkenMovie.c             389) 
Stefan Schuermans format

Stefan Schuermans authored 1 year ago

src/BlinkenMovie.c         390) void BlinkenMovieDeleteFrame(stBlinkenMovie *pMovie, int frameNo) {
Stefan Schuermans changed indenting to be mor...

Stefan Schuermans authored 13 years ago

BlinkenLib/BlinkenMovie.c  391)   stBlinkenFrame **ppNewFrames;
Christian Heimke BlinkenLib v.0.1.1 (2005-01...

Christian Heimke authored 13 years ago

BlinkenMovie.c             392)   int i;
BlinkenMovie.c             393) 
Stefan Schuermans changed indenting to be mor...

Stefan Schuermans authored 13 years ago

BlinkenLib/BlinkenMovie.c  394)   if (pMovie == NULL || frameNo < 0 || frameNo >= pMovie->frameCnt)
Christian Heimke BlinkenLib v.0.1.1 (2005-01...

Christian Heimke authored 13 years ago

BlinkenMovie.c             395)     return;
BlinkenMovie.c             396) 
Stefan Schuermans adaptions for usage in C++

Stefan Schuermans authored 13 years ago

BlinkenLib/BlinkenMovie.c  397)   ppNewFrames = (stBlinkenFrame **)BlinkenMalloc1D(pMovie->frameCnt - 1,
BlinkenLib/BlinkenMovie.c  398)                                                    sizeof(stBlinkenFrame *));
Stefan Schuermans changed indenting to be mor...

Stefan Schuermans authored 13 years ago

BlinkenLib/BlinkenMovie.c  399)   if (ppNewFrames == NULL)
Christian Heimke BlinkenLib v.0.1.1 (2005-01...

Christian Heimke authored 13 years ago

BlinkenMovie.c             400)     return;
BlinkenMovie.c             401) 
Stefan Schuermans changed indenting to be mor...

Stefan Schuermans authored 13 years ago

BlinkenLib/BlinkenMovie.c  402)   for (i = 0; i < frameNo; i++)
Christian Heimke BlinkenLib v.0.1.1 (2005-01...

Christian Heimke authored 13 years ago

BlinkenMovie.c             403)     ppNewFrames[i] = pMovie->ppFrames[i];
BlinkenMovie.c             404) 
Stefan Schuermans changed indenting to be mor...

Stefan Schuermans authored 13 years ago

BlinkenLib/BlinkenMovie.c  405)   BlinkenFrameFree(pMovie->ppFrames[frameNo]);
Christian Heimke BlinkenLib v.0.1.1 (2005-01...

Christian Heimke authored 13 years ago

BlinkenMovie.c             406) 
Stefan Schuermans changed indenting to be mor...

Stefan Schuermans authored 13 years ago

BlinkenLib/BlinkenMovie.c  407)   for (i = frameNo; i < pMovie->frameCnt - 1; i++)
BlinkenLib/BlinkenMovie.c  408)     ppNewFrames[i] = pMovie->ppFrames[i + 1];
Christian Heimke BlinkenLib v.0.1.1 (2005-01...

Christian Heimke authored 13 years ago

BlinkenMovie.c             409) 
Stefan Schuermans changed indenting to be mor...

Stefan Schuermans authored 13 years ago

BlinkenLib/BlinkenMovie.c  410)   free(pMovie->ppFrames);
Christian Heimke BlinkenLib v.0.1.1 (2005-01...

Christian Heimke authored 13 years ago

BlinkenMovie.c             411)   pMovie->ppFrames = ppNewFrames;
BlinkenMovie.c             412)   pMovie->frameCnt--;
BlinkenMovie.c             413) }
BlinkenMovie.c             414) 
Stefan Schuermans format

Stefan Schuermans authored 1 year ago

src/BlinkenMovie.c         415) void BlinkenMovieDeleteFrames(stBlinkenMovie *pMovie) {
Stefan Schuermans changed indenting to be mor...

Stefan Schuermans authored 13 years ago

BlinkenLib/BlinkenMovie.c  416)   stBlinkenFrame **ppNewFrames;
Christian Heimke BlinkenLib v.0.1.1 (2005-01...

Christian Heimke authored 13 years ago

BlinkenMovie.c             417)   int i;
BlinkenMovie.c             418) 
Stefan Schuermans changed indenting to be mor...

Stefan Schuermans authored 13 years ago

BlinkenLib/BlinkenMovie.c  419)   if (pMovie == NULL)
Christian Heimke BlinkenLib v.0.1.1 (2005-01...

Christian Heimke authored 13 years ago

BlinkenMovie.c             420)     return;
BlinkenMovie.c             421) 
Stefan Schuermans format

Stefan Schuermans authored 1 year ago

src/BlinkenMovie.c         422)   ppNewFrames = (stBlinkenFrame **)BlinkenMalloc1D(0, sizeof(stBlinkenFrame *));
Stefan Schuermans changed indenting to be mor...

Stefan Schuermans authored 13 years ago

BlinkenLib/BlinkenMovie.c  423)   if (ppNewFrames == NULL)
Christian Heimke BlinkenLib v.0.1.1 (2005-01...

Christian Heimke authored 13 years ago

BlinkenMovie.c             424)     return;
BlinkenMovie.c             425) 
Stefan Schuermans changed indenting to be mor...

Stefan Schuermans authored 13 years ago

BlinkenLib/BlinkenMovie.c  426)   for (i = 0; i < pMovie->frameCnt; i++)
BlinkenLib/BlinkenMovie.c  427)     BlinkenFrameFree(pMovie->ppFrames[i]);
Christian Heimke BlinkenLib v.0.1.1 (2005-01...

Christian Heimke authored 13 years ago

BlinkenMovie.c             428) 
Stefan Schuermans changed indenting to be mor...

Stefan Schuermans authored 13 years ago

BlinkenLib/BlinkenMovie.c  429)   free(pMovie->ppFrames);
Christian Heimke BlinkenLib v.0.1.1 (2005-01...

Christian Heimke authored 13 years ago

BlinkenMovie.c             430)   pMovie->ppFrames = ppNewFrames;
BlinkenMovie.c             431)   pMovie->frameCnt = 0;
BlinkenMovie.c             432) }
BlinkenMovie.c             433) 
Stefan Schuermans adaptions for usage in C++

Stefan Schuermans authored 13 years ago

BlinkenLib/BlinkenMovie.c  434) int BlinkenMovieConcat(stBlinkenMovie *pMovie,
Stefan Schuermans format

Stefan Schuermans authored 1 year ago

src/BlinkenMovie.c         435)                        stBlinkenMovie *pMovie2 /* appended and freed */) {
Stefan Schuermans changed indenting to be mor...

Stefan Schuermans authored 13 years ago

BlinkenLib/BlinkenMovie.c  436)   stBlinkenFrame **ppNewFrames, **ppNewFrames2;
Christian Heimke BlinkenLib v.0.6.4 (2010-12...

Christian Heimke authored 13 years ago

BlinkenLib/BlinkenMovie.c  437)   int i;
BlinkenLib/BlinkenMovie.c  438) 
Stefan Schuermans changed indenting to be mor...

Stefan Schuermans authored 13 years ago

BlinkenLib/BlinkenMovie.c  439)   if (pMovie == NULL || pMovie2 == NULL)
Christian Heimke BlinkenLib v.0.6.4 (2010-12...

Christian Heimke authored 13 years ago

BlinkenLib/BlinkenMovie.c  440)     return -1;
BlinkenLib/BlinkenMovie.c  441) 
Stefan Schuermans changed indenting to be mor...

Stefan Schuermans authored 13 years ago

BlinkenLib/BlinkenMovie.c  442)   BlinkenMovieResize(pMovie2, pMovie->height, pMovie->width, pMovie->channels,
BlinkenLib/BlinkenMovie.c  443)                      pMovie->maxval);
Christian Heimke BlinkenLib v.0.6.4 (2010-12...

Christian Heimke authored 13 years ago

BlinkenLib/BlinkenMovie.c  444) 
Stefan Schuermans format

Stefan Schuermans authored 1 year ago

src/BlinkenMovie.c         445)   ppNewFrames = (stBlinkenFrame **)BlinkenMalloc1D(
src/BlinkenMovie.c         446)       pMovie->frameCnt + pMovie2->frameCnt, sizeof(stBlinkenFrame *));
Stefan Schuermans changed indenting to be mor...

Stefan Schuermans authored 13 years ago

BlinkenLib/BlinkenMovie.c  447)   if (ppNewFrames == NULL)
Christian Heimke BlinkenLib v.0.6.4 (2010-12...

Christian Heimke authored 13 years ago

BlinkenLib/BlinkenMovie.c  448)     return -1;
Stefan Schuermans format

Stefan Schuermans authored 1 year ago

src/BlinkenMovie.c         449)   ppNewFrames2 =
src/BlinkenMovie.c         450)       (stBlinkenFrame **)BlinkenMalloc1D(0, sizeof(stBlinkenFrame *));
Stefan Schuermans changed indenting to be mor...

Stefan Schuermans authored 13 years ago

BlinkenLib/BlinkenMovie.c  451)   if (ppNewFrames2 == NULL) {
BlinkenLib/BlinkenMovie.c  452)     free(ppNewFrames);
Christian Heimke BlinkenLib v.0.6.4 (2010-12...

Christian Heimke authored 13 years ago

BlinkenLib/BlinkenMovie.c  453)     return -1;
BlinkenLib/BlinkenMovie.c  454)   }
BlinkenLib/BlinkenMovie.c  455) 
Stefan Schuermans changed indenting to be mor...

Stefan Schuermans authored 13 years ago

BlinkenLib/BlinkenMovie.c  456)   for (i = 0; i < pMovie->frameCnt; i++)
Christian Heimke BlinkenLib v.0.6.4 (2010-12...

Christian Heimke authored 13 years ago

BlinkenLib/BlinkenMovie.c  457)     ppNewFrames[i] = pMovie->ppFrames[i];
Stefan Schuermans changed indenting to be mor...

Stefan Schuermans authored 13 years ago

BlinkenLib/BlinkenMovie.c  458)   for (i = 0; i < pMovie2->frameCnt; i++)
Christian Heimke BlinkenLib v.0.6.4 (2010-12...

Christian Heimke authored 13 years ago

BlinkenLib/BlinkenMovie.c  459)     ppNewFrames[pMovie->frameCnt + i] = pMovie2->ppFrames[i];
BlinkenLib/BlinkenMovie.c  460) 
Stefan Schuermans changed indenting to be mor...

Stefan Schuermans authored 13 years ago

BlinkenLib/BlinkenMovie.c  461)   free(pMovie->ppFrames);
Christian Heimke BlinkenLib v.0.6.4 (2010-12...

Christian Heimke authored 13 years ago

BlinkenLib/BlinkenMovie.c  462)   pMovie->ppFrames = ppNewFrames;
BlinkenLib/BlinkenMovie.c  463)   pMovie->frameCnt += pMovie2->frameCnt;
BlinkenLib/BlinkenMovie.c  464) 
Stefan Schuermans changed indenting to be mor...

Stefan Schuermans authored 13 years ago

BlinkenLib/BlinkenMovie.c  465)   free(pMovie2->ppFrames);
Christian Heimke BlinkenLib v.0.6.4 (2010-12...

Christian Heimke authored 13 years ago

BlinkenLib/BlinkenMovie.c  466)   pMovie2->ppFrames = ppNewFrames2;
BlinkenLib/BlinkenMovie.c  467)   pMovie2->frameCnt = 0;
BlinkenLib/BlinkenMovie.c  468) 
Stefan Schuermans changed indenting to be mor...

Stefan Schuermans authored 13 years ago

BlinkenLib/BlinkenMovie.c  469)   BlinkenMovieFree(pMovie2);
Christian Heimke BlinkenLib v.0.6.4 (2010-12...

Christian Heimke authored 13 years ago

BlinkenLib/BlinkenMovie.c  470) 
BlinkenLib/BlinkenMovie.c  471)   return 0;
BlinkenLib/BlinkenMovie.c  472) }
BlinkenLib/BlinkenMovie.c  473) 
Stefan Schuermans format

Stefan Schuermans authored 1 year ago

src/BlinkenMovie.c         474) void BlinkenMovieReverse(stBlinkenMovie *pMovie) {
Christian Heimke BlinkenLib v.0.6.4 (2010-12...

Christian Heimke authored 13 years ago

BlinkenLib/BlinkenMovie.c  475)   int i, j;
Stefan Schuermans changed indenting to be mor...

Stefan Schuermans authored 13 years ago

BlinkenLib/BlinkenMovie.c  476)   stBlinkenFrame *pFrame;
Christian Heimke BlinkenLib v.0.6.4 (2010-12...

Christian Heimke authored 13 years ago

BlinkenLib/BlinkenMovie.c  477) 
Stefan Schuermans changed indenting to be mor...

Stefan Schuermans authored 13 years ago

BlinkenLib/BlinkenMovie.c  478)   for (i = 0, j = pMovie->frameCnt - 1; i < pMovie->frameCnt / 2; i++, j--) {
Christian Heimke BlinkenLib v.0.6.4 (2010-12...

Christian Heimke authored 13 years ago

BlinkenLib/BlinkenMovie.c  479)     pFrame = pMovie->ppFrames[i];
BlinkenLib/BlinkenMovie.c  480)     pMovie->ppFrames[i] = pMovie->ppFrames[j];
BlinkenLib/BlinkenMovie.c  481)     pMovie->ppFrames[j] = pFrame;
BlinkenLib/BlinkenMovie.c  482)   }
BlinkenLib/BlinkenMovie.c  483) }
BlinkenLib/BlinkenMovie.c  484) 
Stefan Schuermans format

Stefan Schuermans authored 1 year ago

src/BlinkenMovie.c         485) void BlinkenMovieCutTime(stBlinkenMovie *pMovie, int begin /* in ms */,
src/BlinkenMovie.c         486)                          int end /* in ms */) {
Stefan Schuermans implement cutting movie in...

Stefan Schuermans authored 10 years ago

BlinkenLib/BlinkenMovie.c  487)   int i, duration, curtime, idx_begin, idx_end, duration_begin, duration_end;
BlinkenLib/BlinkenMovie.c  488)   int frameCnt;
BlinkenLib/BlinkenMovie.c  489)   stBlinkenFrame **ppNewFrames;
BlinkenLib/BlinkenMovie.c  490) 
Stefan Schuermans implement changing duration...

Stefan Schuermans authored 10 years ago

BlinkenLib/BlinkenMovie.c  491)   // do nothing if no movie or empty movie
BlinkenLib/BlinkenMovie.c  492)   if (pMovie == NULL || pMovie->frameCnt < 1)
Stefan Schuermans implement cutting movie in...

Stefan Schuermans authored 10 years ago

BlinkenLib/BlinkenMovie.c  493)     return;
BlinkenLib/BlinkenMovie.c  494) 
BlinkenLib/BlinkenMovie.c  495)   // get movie duration
BlinkenLib/BlinkenMovie.c  496)   duration = 0;
BlinkenLib/BlinkenMovie.c  497)   for (i = 0; i < pMovie->frameCnt; i++)
BlinkenLib/BlinkenMovie.c  498)     duration += BlinkenFrameGetDuration(pMovie->ppFrames[i]);
BlinkenLib/BlinkenMovie.c  499) 
BlinkenLib/BlinkenMovie.c  500)   // sanitize inputs
BlinkenLib/BlinkenMovie.c  501)   if (begin < 0)
BlinkenLib/BlinkenMovie.c  502)     begin = 0;
BlinkenLib/BlinkenMovie.c  503)   if (begin > duration)
BlinkenLib/BlinkenMovie.c  504)     begin = duration;
BlinkenLib/BlinkenMovie.c  505)   if (end < begin)
BlinkenLib/BlinkenMovie.c  506)     end = begin;
BlinkenLib/BlinkenMovie.c  507)   if (end > duration)
BlinkenLib/BlinkenMovie.c  508)     end = duration;
BlinkenLib/BlinkenMovie.c  509) 
BlinkenLib/BlinkenMovie.c  510)   // get begin and end indices, also get duration of begin and end frames
BlinkenLib/BlinkenMovie.c  511)   if (begin >= end) {
BlinkenLib/BlinkenMovie.c  512)     // empty result movie
BlinkenLib/BlinkenMovie.c  513)     idx_begin = 1;
BlinkenLib/BlinkenMovie.c  514)     idx_end = 0;
BlinkenLib/BlinkenMovie.c  515)     duration_begin = 0;
BlinkenLib/BlinkenMovie.c  516)     duration_end = 0;
BlinkenLib/BlinkenMovie.c  517)   } else {
BlinkenLib/BlinkenMovie.c  518)     // at least one frame in result movie
BlinkenLib/BlinkenMovie.c  519)     curtime = 0;
BlinkenLib/BlinkenMovie.c  520)     idx_begin = 0;
BlinkenLib/BlinkenMovie.c  521)     duration_begin = BlinkenFrameGetDuration(pMovie->ppFrames[idx_begin]);
BlinkenLib/BlinkenMovie.c  522)     idx_end = pMovie->frameCnt - 1;
BlinkenLib/BlinkenMovie.c  523)     duration_end = BlinkenFrameGetDuration(pMovie->ppFrames[idx_end]);
BlinkenLib/BlinkenMovie.c  524)     for (i = 0; i < pMovie->frameCnt; i++) {
BlinkenLib/BlinkenMovie.c  525)       duration = BlinkenFrameGetDuration(pMovie->ppFrames[i]);
BlinkenLib/BlinkenMovie.c  526)       // begin and end in current frame
BlinkenLib/BlinkenMovie.c  527)       if (curtime <= begin && curtime + duration >= end) {
BlinkenLib/BlinkenMovie.c  528)         idx_begin = i;
BlinkenLib/BlinkenMovie.c  529)         idx_end = i;
BlinkenLib/BlinkenMovie.c  530)         duration_begin = end - begin;
BlinkenLib/BlinkenMovie.c  531)         duration_end = end - begin;
BlinkenLib/BlinkenMovie.c  532)         break;
BlinkenLib/BlinkenMovie.c  533)       }
BlinkenLib/BlinkenMovie.c  534)       // begin in current frame
BlinkenLib/BlinkenMovie.c  535)       if (curtime <= begin && curtime + duration > begin) {
BlinkenLib/BlinkenMovie.c  536)         idx_begin = i;
BlinkenLib/BlinkenMovie.c  537)         duration_begin = curtime + duration - begin;
BlinkenLib/BlinkenMovie.c  538)       }
BlinkenLib/BlinkenMovie.c  539)       // end in current frame
BlinkenLib/BlinkenMovie.c  540)       if (curtime < end && curtime + duration >= end) {
BlinkenLib/BlinkenMovie.c  541)         idx_end = i;
BlinkenLib/BlinkenMovie.c  542)         duration_end = end - curtime;
BlinkenLib/BlinkenMovie.c  543)         break;
BlinkenLib/BlinkenMovie.c  544)       }
BlinkenLib/BlinkenMovie.c  545)       curtime += duration;
BlinkenLib/BlinkenMovie.c  546)     }
BlinkenLib/BlinkenMovie.c  547)   }
BlinkenLib/BlinkenMovie.c  548) 
BlinkenLib/BlinkenMovie.c  549)   // remove/free unneeded frames
BlinkenLib/BlinkenMovie.c  550) 
BlinkenLib/BlinkenMovie.c  551)   frameCnt = idx_end - idx_begin + 1;
Stefan Schuermans format

Stefan Schuermans authored 1 year ago

src/BlinkenMovie.c         552)   ppNewFrames =
src/BlinkenMovie.c         553)       (stBlinkenFrame **)BlinkenMalloc1D(frameCnt, sizeof(stBlinkenFrame *));
Stefan Schuermans implement cutting movie in...

Stefan Schuermans authored 10 years ago

BlinkenLib/BlinkenMovie.c  554)   if (ppNewFrames == NULL)
BlinkenLib/BlinkenMovie.c  555)     return;
BlinkenLib/BlinkenMovie.c  556) 
BlinkenLib/BlinkenMovie.c  557)   for (i = 0; i < idx_begin; i++)
BlinkenLib/BlinkenMovie.c  558)     BlinkenFrameFree(pMovie->ppFrames[i]);
BlinkenLib/BlinkenMovie.c  559)   for (; i <= idx_end; i++)
BlinkenLib/BlinkenMovie.c  560)     ppNewFrames[i - idx_begin] = pMovie->ppFrames[i];
BlinkenLib/BlinkenMovie.c  561)   for (; i < pMovie->frameCnt; i++)
BlinkenLib/BlinkenMovie.c  562)     BlinkenFrameFree(pMovie->ppFrames[i]);
BlinkenLib/BlinkenMovie.c  563) 
BlinkenLib/BlinkenMovie.c  564)   free(pMovie->ppFrames);
BlinkenLib/BlinkenMovie.c  565)   pMovie->ppFrames = ppNewFrames;
BlinkenLib/BlinkenMovie.c  566)   pMovie->frameCnt = frameCnt;
BlinkenLib/BlinkenMovie.c  567) 
BlinkenLib/BlinkenMovie.c  568)   // change duration of begin and end frame
BlinkenLib/BlinkenMovie.c  569)   if (frameCnt > 0) {
BlinkenLib/BlinkenMovie.c  570)     BlinkenFrameSetDuration(pMovie->ppFrames[0], duration_begin);
BlinkenLib/BlinkenMovie.c  571)     BlinkenFrameSetDuration(pMovie->ppFrames[frameCnt - 1], duration_end);
BlinkenLib/BlinkenMovie.c  572)   }
BlinkenLib/BlinkenMovie.c  573) }
BlinkenLib/BlinkenMovie.c  574) 
Stefan Schuermans implement changing duration...

Stefan Schuermans authored 10 years ago

BlinkenLib/BlinkenMovie.c  575) void BlinkenMovieAdaptDuration(stBlinkenMovie *pMovie,
Stefan Schuermans format

Stefan Schuermans authored 1 year ago

src/BlinkenMovie.c         576)                                int duration /* in ms */) {
Stefan Schuermans implement changing duration...

Stefan Schuermans authored 10 years ago

BlinkenLib/BlinkenMovie.c  577)   int old_duration, old_curtime, curtime;
BlinkenLib/BlinkenMovie.c  578)   int i, old_dur, dur, old_end, end;
BlinkenLib/BlinkenMovie.c  579) 
BlinkenLib/BlinkenMovie.c  580)   // do nothing if no movie, empty movie or invalid duration
BlinkenLib/BlinkenMovie.c  581)   if (pMovie == NULL || pMovie->frameCnt < 1 || duration <= 0)
BlinkenLib/BlinkenMovie.c  582)     return;
BlinkenLib/BlinkenMovie.c  583) 
BlinkenLib/BlinkenMovie.c  584)   // get movie duration
BlinkenLib/BlinkenMovie.c  585)   old_duration = 0;
BlinkenLib/BlinkenMovie.c  586)   for (i = 0; i < pMovie->frameCnt; i++)
BlinkenLib/BlinkenMovie.c  587)     old_duration += BlinkenFrameGetDuration(pMovie->ppFrames[i]);
BlinkenLib/BlinkenMovie.c  588) 
BlinkenLib/BlinkenMovie.c  589)   // adapt duration of frames
BlinkenLib/BlinkenMovie.c  590)   old_curtime = 0;
BlinkenLib/BlinkenMovie.c  591)   curtime = 0;
BlinkenLib/BlinkenMovie.c  592)   for (i = 0; i < pMovie->frameCnt; i++) {
BlinkenLib/BlinkenMovie.c  593)     // get old end time of current frame
BlinkenLib/BlinkenMovie.c  594)     old_dur = BlinkenFrameGetDuration(pMovie->ppFrames[i]);
BlinkenLib/BlinkenMovie.c  595)     old_end = old_curtime + old_dur;
BlinkenLib/BlinkenMovie.c  596)     // compute new end time and new duration
Stefan Schuermans format

Stefan Schuermans authored 1 year ago

src/BlinkenMovie.c         597)     end =
src/BlinkenMovie.c         598)         (int)((double)old_end / (double)old_duration * (double)duration + 0.5);
Stefan Schuermans implement changing duration...

Stefan Schuermans authored 10 years ago

BlinkenLib/BlinkenMovie.c  599)     dur = end - curtime;
BlinkenLib/BlinkenMovie.c  600)     if (dur < BlinkenDurationMin)
BlinkenLib/BlinkenMovie.c  601)       dur = BlinkenDurationMin;
BlinkenLib/BlinkenMovie.c  602)     if (dur > BlinkenDurationMax)
BlinkenLib/BlinkenMovie.c  603)       dur = BlinkenDurationMax;
BlinkenLib/BlinkenMovie.c  604)     // update frame duration
BlinkenLib/BlinkenMovie.c  605)     BlinkenFrameSetDuration(pMovie->ppFrames[i], dur);
BlinkenLib/BlinkenMovie.c  606)     // advance time
BlinkenLib/BlinkenMovie.c  607)     old_curtime += old_dur;
BlinkenLib/BlinkenMovie.c  608)     curtime += dur;
BlinkenLib/BlinkenMovie.c  609)   }
BlinkenLib/BlinkenMovie.c  610) }
BlinkenLib/BlinkenMovie.c  611) 
Stefan Schuermans implement adapting maximum...

Stefan Schuermans authored 5 years ago

BlinkenLib/BlinkenMovie.c  612) void BlinkenMovieAdaptMaxFrameDuration(stBlinkenMovie *pMovie,
Stefan Schuermans format

Stefan Schuermans authored 1 year ago

src/BlinkenMovie.c         613)                                        int maxDuration /* in ms */) {
Stefan Schuermans implement adapting maximum...

Stefan Schuermans authored 5 years ago

BlinkenLib/BlinkenMovie.c  614)   int i, j, cmp, dur, lastdur;
BlinkenLib/BlinkenMovie.c  615)   unsigned int extraFrames;
BlinkenLib/BlinkenMovie.c  616)   stBlinkenFrame **ppNewFrames;
BlinkenLib/BlinkenMovie.c  617)   stBlinkenFrame *pNewFrame;
BlinkenLib/BlinkenMovie.c  618) 
BlinkenLib/BlinkenMovie.c  619)   if (pMovie == NULL)
BlinkenLib/BlinkenMovie.c  620)     return;
BlinkenLib/BlinkenMovie.c  621)   if (maxDuration < BlinkenDurationMin) {
BlinkenLib/BlinkenMovie.c  622)     maxDuration = BlinkenDurationMin;
BlinkenLib/BlinkenMovie.c  623)   }
BlinkenLib/BlinkenMovie.c  624)   if (maxDuration > BlinkenDurationMax) {
BlinkenLib/BlinkenMovie.c  625)     maxDuration = BlinkenDurationMax;
BlinkenLib/BlinkenMovie.c  626)   }
BlinkenLib/BlinkenMovie.c  627) 
BlinkenLib/BlinkenMovie.c  628)   // compute how many extra frames are needed
BlinkenLib/BlinkenMovie.c  629)   extraFrames = 0;
BlinkenLib/BlinkenMovie.c  630)   for (i = 0; i < pMovie->frameCnt; i++) {
BlinkenLib/BlinkenMovie.c  631)     dur = BlinkenFrameGetDuration(pMovie->ppFrames[i]);
BlinkenLib/BlinkenMovie.c  632)     extraFrames += (dur + maxDuration - 1) / maxDuration - 1;
BlinkenLib/BlinkenMovie.c  633)   }
BlinkenLib/BlinkenMovie.c  634) 
BlinkenLib/BlinkenMovie.c  635)   // allocate new frame array
Stefan Schuermans format

Stefan Schuermans authored 1 year ago

src/BlinkenMovie.c         636)   ppNewFrames = (stBlinkenFrame **)BlinkenMalloc1D(
src/BlinkenMovie.c         637)       pMovie->frameCnt + extraFrames, sizeof(stBlinkenFrame *));
src/BlinkenMovie.c         638)   if (!ppNewFrames) {
Stefan Schuermans implement adapting maximum...

Stefan Schuermans authored 5 years ago

BlinkenLib/BlinkenMovie.c  639)     return;
BlinkenLib/BlinkenMovie.c  640)   }
BlinkenLib/BlinkenMovie.c  641) 
BlinkenLib/BlinkenMovie.c  642)   // merge/split frames in time
BlinkenLib/BlinkenMovie.c  643)   j = 0;
BlinkenLib/BlinkenMovie.c  644)   for (i = 0; i < pMovie->frameCnt; i++) {
BlinkenLib/BlinkenMovie.c  645)     // join frame with last one if equal
BlinkenLib/BlinkenMovie.c  646)     if (j > 0) {
BlinkenLib/BlinkenMovie.c  647)       cmp = BlinkenFrameCompare(pMovie->ppFrames[i], ppNewFrames[j - 1]);
BlinkenLib/BlinkenMovie.c  648)       if (cmp == 0) {
BlinkenLib/BlinkenMovie.c  649)         // frame equal to last one
BlinkenLib/BlinkenMovie.c  650)         dur = BlinkenFrameGetDuration(pMovie->ppFrames[i]);
BlinkenLib/BlinkenMovie.c  651)         lastdur = BlinkenFrameGetDuration(ppNewFrames[j - 1]);
BlinkenLib/BlinkenMovie.c  652)         if (lastdur + dur <= maxDuration) {
BlinkenLib/BlinkenMovie.c  653)           // merge frame completely
BlinkenLib/BlinkenMovie.c  654)           BlinkenFrameSetDuration(ppNewFrames[j - 1], lastdur + dur);
BlinkenLib/BlinkenMovie.c  655)           BlinkenFrameFree(pMovie->ppFrames[i]);
BlinkenLib/BlinkenMovie.c  656)           pMovie->ppFrames[i] = NULL;
BlinkenLib/BlinkenMovie.c  657)           continue; // frame completely merged
BlinkenLib/BlinkenMovie.c  658)         } else {
BlinkenLib/BlinkenMovie.c  659)           // move as much duration to previous frame
BlinkenLib/BlinkenMovie.c  660)           BlinkenFrameSetDuration(ppNewFrames[j - 1], maxDuration);
BlinkenLib/BlinkenMovie.c  661)           BlinkenFrameSetDuration(pMovie->ppFrames[i],
BlinkenLib/BlinkenMovie.c  662)                                   lastdur + dur - maxDuration);
BlinkenLib/BlinkenMovie.c  663)         }
BlinkenLib/BlinkenMovie.c  664)       }
BlinkenLib/BlinkenMovie.c  665)     }
BlinkenLib/BlinkenMovie.c  666)     // split frames longer than maxDuration
BlinkenLib/BlinkenMovie.c  667)     while (1) {
BlinkenLib/BlinkenMovie.c  668)       dur = BlinkenFrameGetDuration(pMovie->ppFrames[i]);
BlinkenLib/BlinkenMovie.c  669)       if (dur <= maxDuration) {
BlinkenLib/BlinkenMovie.c  670)         break;
BlinkenLib/BlinkenMovie.c  671)       }
BlinkenLib/BlinkenMovie.c  672)       pNewFrame = BlinkenFrameClone(pMovie->ppFrames[i]);
Stefan Schuermans format

Stefan Schuermans authored 1 year ago

src/BlinkenMovie.c         673)       if (!pNewFrame) {
Stefan Schuermans implement adapting maximum...

Stefan Schuermans authored 5 years ago

BlinkenLib/BlinkenMovie.c  674)         break;
BlinkenLib/BlinkenMovie.c  675)       }
BlinkenLib/BlinkenMovie.c  676)       // add new frame with max duration
BlinkenLib/BlinkenMovie.c  677)       BlinkenFrameSetDuration(pNewFrame, maxDuration);
BlinkenLib/BlinkenMovie.c  678)       ppNewFrames[j++] = pNewFrame;
BlinkenLib/BlinkenMovie.c  679)       // reduce duration of current frame
BlinkenLib/BlinkenMovie.c  680)       BlinkenFrameSetDuration(pMovie->ppFrames[i], dur - maxDuration);
BlinkenLib/BlinkenMovie.c  681)     } // while (1)
BlinkenLib/BlinkenMovie.c  682)     // overtake current frame
BlinkenLib/BlinkenMovie.c  683)     ppNewFrames[j++] = pMovie->ppFrames[i];
BlinkenLib/BlinkenMovie.c  684)     pMovie->ppFrames[i] = NULL;
BlinkenLib/BlinkenMovie.c  685)   } // for (i ...
BlinkenLib/BlinkenMovie.c  686) 
BlinkenLib/BlinkenMovie.c  687)   // use new frames array in movie
BlinkenLib/BlinkenMovie.c  688)   free(pMovie->ppFrames);
BlinkenLib/BlinkenMovie.c  689)   pMovie->ppFrames = ppNewFrames;
BlinkenLib/BlinkenMovie.c  690)   pMovie->frameCnt = j;
BlinkenLib/BlinkenMovie.c  691) }
BlinkenLib/BlinkenMovie.c  692) 
Stefan Schuermans changed indenting to be mor...

Stefan Schuermans authored 13 years ago

BlinkenLib/BlinkenMovie.c  693) void BlinkenMovieResize(stBlinkenMovie *pMovie, int height, int width,
Stefan Schuermans format

Stefan Schuermans authored 1 year ago

src/BlinkenMovie.c         694)                         int channels, int maxval) {
Christian Heimke BlinkenLib v.0.1.1 (2005-01...

Christian Heimke authored 13 years ago

BlinkenMovie.c             695)   int i;
BlinkenMovie.c             696) 
Stefan Schuermans changed indenting to be mor...

Stefan Schuermans authored 13 years ago

BlinkenLib/BlinkenMovie.c  697)   if (pMovie == NULL)
Christian Heimke BlinkenLib v.0.1.1 (2005-01...

Christian Heimke authored 13 years ago

BlinkenMovie.c             698)     return;
BlinkenMovie.c             699) 
Stefan Schuermans changed indenting to be mor...

Stefan Schuermans authored 13 years ago

BlinkenLib/BlinkenMovie.c  700)   if (height < BlinkenHeightMin)
BlinkenLib/BlinkenMovie.c  701)     height = BlinkenHeightMin;
BlinkenLib/BlinkenMovie.c  702)   if (height > BlinkenHeightMax)
BlinkenLib/BlinkenMovie.c  703)     height = BlinkenHeightMax;
BlinkenLib/BlinkenMovie.c  704)   if (width < BlinkenWidthMin)
BlinkenLib/BlinkenMovie.c  705)     width = BlinkenWidthMin;
BlinkenLib/BlinkenMovie.c  706)   if (width > BlinkenWidthMax)
BlinkenLib/BlinkenMovie.c  707)     width = BlinkenWidthMax;
BlinkenLib/BlinkenMovie.c  708)   if (channels < BlinkenChannelsMin)
BlinkenLib/BlinkenMovie.c  709)     channels = BlinkenChannelsMin;
BlinkenLib/BlinkenMovie.c  710)   if (channels > BlinkenChannelsMax)
BlinkenLib/BlinkenMovie.c  711)     channels = BlinkenMaxvalMax;
BlinkenLib/BlinkenMovie.c  712)   if (maxval < BlinkenMaxvalMin)
BlinkenLib/BlinkenMovie.c  713)     maxval = BlinkenMaxvalMin;
BlinkenLib/BlinkenMovie.c  714)   if (maxval > BlinkenMaxvalMax)
BlinkenLib/BlinkenMovie.c  715)     maxval = BlinkenMaxvalMax;
Christian Heimke BlinkenLib v.0.1.1 (2005-01...

Christian Heimke authored 13 years ago

BlinkenMovie.c             716) 
BlinkenMovie.c             717)   pMovie->height = height;
BlinkenMovie.c             718)   pMovie->width = width;
BlinkenMovie.c             719)   pMovie->channels = channels;
BlinkenMovie.c             720)   pMovie->maxval = maxval;
BlinkenMovie.c             721) 
Stefan Schuermans changed indenting to be mor...

Stefan Schuermans authored 13 years ago

BlinkenLib/BlinkenMovie.c  722)   for (i = 0; i < pMovie->frameCnt; i++)
BlinkenLib/BlinkenMovie.c  723)     BlinkenFrameResize(pMovie->ppFrames[i], height, width, channels, maxval);
Christian Heimke BlinkenLib v.0.1.1 (2005-01...

Christian Heimke authored 13 years ago

BlinkenMovie.c             724) }
BlinkenMovie.c             725) 
Stefan Schuermans format

Stefan Schuermans authored 1 year ago

src/BlinkenMovie.c         726) void BlinkenMovieCrop(stBlinkenMovie *pMovie, int top, int left, int height,
src/BlinkenMovie.c         727)                       int width) {
Stefan Schuermans implement cropping movies

Stefan Schuermans authored 10 years ago

BlinkenLib/BlinkenMovie.c  728)   int i;
BlinkenLib/BlinkenMovie.c  729) 
BlinkenLib/BlinkenMovie.c  730)   if (pMovie == NULL)
BlinkenLib/BlinkenMovie.c  731)     return;
BlinkenLib/BlinkenMovie.c  732) 
BlinkenLib/BlinkenMovie.c  733)   if (top < 0)
BlinkenLib/BlinkenMovie.c  734)     top = 0;
BlinkenLib/BlinkenMovie.c  735)   if (top > pMovie->height - BlinkenHeightMin)
BlinkenLib/BlinkenMovie.c  736)     top = pMovie->height - BlinkenHeightMin;
BlinkenLib/BlinkenMovie.c  737)   if (height < BlinkenHeightMin)
BlinkenLib/BlinkenMovie.c  738)     height = BlinkenHeightMin;
BlinkenLib/BlinkenMovie.c  739)   if (height > pMovie->height - top)
BlinkenLib/BlinkenMovie.c  740)     height = pMovie->height - top;
BlinkenLib/BlinkenMovie.c  741)   if (left < 0)
BlinkenLib/BlinkenMovie.c  742)     left = 0;
BlinkenLib/BlinkenMovie.c  743)   if (left > pMovie->width - BlinkenWidthMin)
BlinkenLib/BlinkenMovie.c  744)     left = pMovie->width - BlinkenWidthMin;
BlinkenLib/BlinkenMovie.c  745)   if (width < BlinkenWidthMin)
BlinkenLib/BlinkenMovie.c  746)     width = BlinkenWidthMin;
BlinkenLib/BlinkenMovie.c  747)   if (width > pMovie->width - left)
BlinkenLib/BlinkenMovie.c  748)     width = pMovie->width - left;
BlinkenLib/BlinkenMovie.c  749) 
Stefan Schuermans format

Stefan Schuermans authored 1 year ago

src/BlinkenMovie.c         750)   if (top == 0 && left == 0 && height == pMovie->height &&
src/BlinkenMovie.c         751)       width == pMovie->width)
Stefan Schuermans implement cropping movies

Stefan Schuermans authored 10 years ago

BlinkenLib/BlinkenMovie.c  752)     return;
BlinkenLib/BlinkenMovie.c  753) 
BlinkenLib/BlinkenMovie.c  754)   pMovie->height = height;
BlinkenLib/BlinkenMovie.c  755)   pMovie->width = width;
BlinkenLib/BlinkenMovie.c  756) 
BlinkenLib/BlinkenMovie.c  757)   for (i = 0; i < pMovie->frameCnt; i++)
BlinkenLib/BlinkenMovie.c  758)     BlinkenFrameCrop(pMovie->ppFrames[i], top, left, height, width);
BlinkenLib/BlinkenMovie.c  759) }
BlinkenLib/BlinkenMovie.c  760) 
Stefan Schuermans format

Stefan Schuermans authored 1 year ago

src/BlinkenMovie.c         761) void BlinkenMovieScale(stBlinkenMovie *pMovie, int height, int width) {
Christian Heimke BlinkenLib v.0.1.1 (2005-01...

Christian Heimke authored 13 years ago

BlinkenMovie.c             762)   int i;
BlinkenMovie.c             763) 
Stefan Schuermans changed indenting to be mor...

Stefan Schuermans authored 13 years ago

BlinkenLib/BlinkenMovie.c  764)   if (pMovie == NULL)
Christian Heimke BlinkenLib v.0.1.1 (2005-01...

Christian Heimke authored 13 years ago

BlinkenMovie.c             765)     return;
BlinkenMovie.c             766) 
Stefan Schuermans changed indenting to be mor...

Stefan Schuermans authored 13 years ago

BlinkenLib/BlinkenMovie.c  767)   if (height < BlinkenHeightMin)
BlinkenLib/BlinkenMovie.c  768)     height = BlinkenHeightMin;
BlinkenLib/BlinkenMovie.c  769)   if (height > BlinkenHeightMax)
BlinkenLib/BlinkenMovie.c  770)     height = BlinkenHeightMax;
BlinkenLib/BlinkenMovie.c  771)   if (width < BlinkenWidthMin)
BlinkenLib/BlinkenMovie.c  772)     width = BlinkenWidthMin;
BlinkenLib/BlinkenMovie.c  773)   if (width > BlinkenWidthMax)
BlinkenLib/BlinkenMovie.c  774)     width = BlinkenWidthMax;
Christian Heimke BlinkenLib v.0.1.1 (2005-01...

Christian Heimke authored 13 years ago

BlinkenMovie.c             775) 
BlinkenMovie.c             776)   pMovie->height = height;
BlinkenMovie.c             777)   pMovie->width = width;
BlinkenMovie.c             778) 
Stefan Schuermans changed indenting to be mor...

Stefan Schuermans authored 13 years ago

BlinkenLib/BlinkenMovie.c  779)   for (i = 0; i < pMovie->frameCnt; i++)
BlinkenLib/BlinkenMovie.c  780)     BlinkenFrameScale(pMovie->ppFrames[i], height, width);
Christian Heimke BlinkenLib v.0.1.1 (2005-01...

Christian Heimke authored 13 years ago

BlinkenMovie.c             781) }
BlinkenMovie.c             782) 
Stefan Schuermans format

Stefan Schuermans authored 1 year ago

src/BlinkenMovie.c         783) void BlinkenMovieColorize(stBlinkenMovie *pMovie, int channels, int mode) {
Christian Heimke BlinkenLib v.0.5.3 (2007-12...

Christian Heimke authored 13 years ago

BlinkenMovie.c             784)   int i, step;
BlinkenMovie.c             785) 
Stefan Schuermans changed indenting to be mor...

Stefan Schuermans authored 13 years ago

BlinkenLib/BlinkenMovie.c  786)   if (pMovie == NULL)
Christian Heimke BlinkenLib v.0.5.3 (2007-12...

Christian Heimke authored 13 years ago

BlinkenMovie.c             787)     return;
BlinkenMovie.c             788) 
Stefan Schuermans changed indenting to be mor...

Stefan Schuermans authored 13 years ago

BlinkenLib/BlinkenMovie.c  789)   if (channels < BlinkenChannelsMin)
BlinkenLib/BlinkenMovie.c  790)     channels = BlinkenChannelsMin;
BlinkenLib/BlinkenMovie.c  791)   if (channels > BlinkenChannelsMax)
BlinkenLib/BlinkenMovie.c  792)     channels = BlinkenMaxvalMax;
Christian Heimke BlinkenLib v.0.5.3 (2007-12...

Christian Heimke authored 13 years ago

BlinkenMovie.c             793) 
BlinkenMovie.c             794)   pMovie->channels = channels;
BlinkenMovie.c             795)   pMovie->maxval = BlinkenMaxvalMax;
BlinkenMovie.c             796) 
BlinkenMovie.c             797)   step = 0;
Stefan Schuermans changed indenting to be mor...

Stefan Schuermans authored 13 years ago

BlinkenLib/BlinkenMovie.c  798)   for (i = 0; i < pMovie->frameCnt; i++) {
BlinkenLib/BlinkenMovie.c  799)     BlinkenFrameColorize(pMovie->ppFrames[i], channels, mode, step);
BlinkenLib/BlinkenMovie.c  800)     step += BlinkenFrameGetDuration(pMovie->ppFrames[i]);
Christian Heimke BlinkenLib v.0.5.3 (2007-12...

Christian Heimke authored 13 years ago

BlinkenMovie.c             801)   }
BlinkenMovie.c             802) }
BlinkenMovie.c             803) 
Stefan Schuermans implemented copying rectang...

Stefan Schuermans authored 13 years ago

BlinkenLib/BlinkenMovie.c  804) void BlinkenMovieCopyRect(stBlinkenMovie *pDest, int destY, int destX,
Stefan Schuermans format

Stefan Schuermans authored 1 year ago

src/BlinkenMovie.c         805)                           stBlinkenMovie *pSrc, int srcY, int srcX, int height,
src/BlinkenMovie.c         806)                           int width) {
Stefan Schuermans implemented copying rectang...

Stefan Schuermans authored 13 years ago

BlinkenLib/BlinkenMovie.c  807)   int dcnt, scnt, di, si, dest_dur, src_dur, src_time_ofs;
BlinkenLib/BlinkenMovie.c  808)   stBlinkenFrame *pFrame;
BlinkenLib/BlinkenMovie.c  809) 
BlinkenLib/BlinkenMovie.c  810)   if (pDest == NULL || pSrc == NULL)
BlinkenLib/BlinkenMovie.c  811)     return;
BlinkenLib/BlinkenMovie.c  812) 
BlinkenLib/BlinkenMovie.c  813)   // exit if both movies empty
BlinkenLib/BlinkenMovie.c  814)   dcnt = pDest->frameCnt;
BlinkenLib/BlinkenMovie.c  815)   scnt = pSrc->frameCnt;
BlinkenLib/BlinkenMovie.c  816)   if (dcnt == 0 || scnt == 0)
BlinkenLib/BlinkenMovie.c  817)     return;
BlinkenLib/BlinkenMovie.c  818) 
BlinkenLib/BlinkenMovie.c  819)   // go throuh all source frames
BlinkenLib/BlinkenMovie.c  820)   di = 0;
BlinkenLib/BlinkenMovie.c  821)   si = 0;
BlinkenLib/BlinkenMovie.c  822)   dest_dur = dcnt > 0 ? BlinkenFrameGetDuration(pDest->ppFrames[0]) : 0;
BlinkenLib/BlinkenMovie.c  823)   src_dur = scnt > 0 ? BlinkenFrameGetDuration(pSrc->ppFrames[0]) : 0;
BlinkenLib/BlinkenMovie.c  824)   src_time_ofs = 0;
BlinkenLib/BlinkenMovie.c  825)   while (si < scnt) {
BlinkenLib/BlinkenMovie.c  826) 
BlinkenLib/BlinkenMovie.c  827)     // make sure there is a frame in destination movie
BlinkenLib/BlinkenMovie.c  828)     if (di >= dcnt) {
BlinkenLib/BlinkenMovie.c  829)       // append new empty frame that last until end of source frame
Stefan Schuermans format

Stefan Schuermans authored 1 year ago

src/BlinkenMovie.c         830)       pFrame = BlinkenFrameNew(pDest->height, pDest->width, pDest->channels,
src/BlinkenMovie.c         831)                                pDest->maxval, src_dur - src_time_ofs);
Stefan Schuermans implemented copying rectang...

Stefan Schuermans authored 13 years ago

BlinkenLib/BlinkenMovie.c  832)       if (pFrame == NULL)
BlinkenLib/BlinkenMovie.c  833)         return;
BlinkenLib/BlinkenMovie.c  834)       BlinkenFrameClear(pFrame);
BlinkenLib/BlinkenMovie.c  835)       if (BlinkenMovieAppendFrame(pDest, pFrame) != 0)
BlinkenLib/BlinkenMovie.c  836)         return;
BlinkenLib/BlinkenMovie.c  837)       dcnt++;
BlinkenLib/BlinkenMovie.c  838)       dest_dur = src_dur - src_time_ofs;
BlinkenLib/BlinkenMovie.c  839)     }
BlinkenLib/BlinkenMovie.c  840) 
BlinkenLib/BlinkenMovie.c  841)     // make sure destination frame does not last longer than source frame
BlinkenLib/BlinkenMovie.c  842)     if (dest_dur > src_dur - src_time_ofs) {
BlinkenLib/BlinkenMovie.c  843)       // split destination frame into two
BlinkenLib/BlinkenMovie.c  844)       pFrame = BlinkenFrameClone(pDest->ppFrames[di]);
BlinkenLib/BlinkenMovie.c  845)       if (pFrame == NULL)
BlinkenLib/BlinkenMovie.c  846)         return;
Stefan Schuermans format

Stefan Schuermans authored 1 year ago

src/BlinkenMovie.c         847)       if (BlinkenMovieInsertFrame(pDest, di + 1, pFrame) != 0)
Stefan Schuermans implemented copying rectang...

Stefan Schuermans authored 13 years ago

BlinkenLib/BlinkenMovie.c  848)         return;
BlinkenLib/BlinkenMovie.c  849)       dcnt++;
Stefan Schuermans format

Stefan Schuermans authored 1 year ago

src/BlinkenMovie.c         850)       BlinkenFrameSetDuration(pDest->ppFrames[di], src_dur - src_time_ofs);
src/BlinkenMovie.c         851)       BlinkenFrameSetDuration(pDest->ppFrames[di + 1],
Stefan Schuermans implemented copying rectang...

Stefan Schuermans authored 13 years ago

BlinkenLib/BlinkenMovie.c  852)                               dest_dur - (src_dur - src_time_ofs));
BlinkenLib/BlinkenMovie.c  853)       dest_dur = src_dur - src_time_ofs;
BlinkenLib/BlinkenMovie.c  854)     }
BlinkenLib/BlinkenMovie.c  855) 
BlinkenLib/BlinkenMovie.c  856)     // copy from source frame to destination frame
Stefan Schuermans format

Stefan Schuermans authored 1 year ago

src/BlinkenMovie.c         857)     BlinkenFrameCopyRect(pDest->ppFrames[di], destY, destX, pSrc->ppFrames[si],
src/BlinkenMovie.c         858)                          srcY, srcX, height, width);
Stefan Schuermans implemented copying rectang...

Stefan Schuermans authored 13 years ago

BlinkenLib/BlinkenMovie.c  859)     src_time_ofs += dest_dur;
BlinkenLib/BlinkenMovie.c  860)     di++;
BlinkenLib/BlinkenMovie.c  861)     dest_dur = di < dcnt ? BlinkenFrameGetDuration(pDest->ppFrames[di]) : 0;
BlinkenLib/BlinkenMovie.c  862) 
BlinkenLib/BlinkenMovie.c  863)     // go to next source frame
BlinkenLib/BlinkenMovie.c  864)     if (src_time_ofs >= src_dur) {
BlinkenLib/BlinkenMovie.c  865)       si++;
BlinkenLib/BlinkenMovie.c  866)       src_dur = si < scnt ? BlinkenFrameGetDuration(pSrc->ppFrames[si]) : 0;
BlinkenLib/BlinkenMovie.c  867)       src_time_ofs = 0;
BlinkenLib/BlinkenMovie.c  868)     }
BlinkenLib/BlinkenMovie.c  869) 
BlinkenLib/BlinkenMovie.c  870)   } // while (si < scnt)
BlinkenLib/BlinkenMovie.c  871) }
BlinkenLib/BlinkenMovie.c  872) 
Stefan Schuermans format

Stefan Schuermans authored 1 year ago

src/BlinkenMovie.c         873) void BlinkenMovieRotateCw(stBlinkenMovie *pMovie) {
Stefan Schuermans implemented rotationg and m...

Stefan Schuermans authored 11 years ago

BlinkenLib/BlinkenMovie.c  874)   int tmp, i;
BlinkenLib/BlinkenMovie.c  875) 
BlinkenLib/BlinkenMovie.c  876)   if (pMovie == NULL)
BlinkenLib/BlinkenMovie.c  877)     return;
BlinkenLib/BlinkenMovie.c  878) 
BlinkenLib/BlinkenMovie.c  879)   tmp = pMovie->height;
BlinkenLib/BlinkenMovie.c  880)   pMovie->height = pMovie->width;
BlinkenLib/BlinkenMovie.c  881)   pMovie->width = tmp;
BlinkenLib/BlinkenMovie.c  882) 
BlinkenLib/BlinkenMovie.c  883)   for (i = 0; i < pMovie->frameCnt; i++)
BlinkenLib/BlinkenMovie.c  884)     BlinkenFrameRotateCw(pMovie->ppFrames[i]);
BlinkenLib/BlinkenMovie.c  885) }
BlinkenLib/BlinkenMovie.c  886) 
Stefan Schuermans format

Stefan Schuermans authored 1 year ago

src/BlinkenMovie.c         887) void BlinkenMovieRotateCcw(stBlinkenMovie *pMovie) {
Stefan Schuermans implemented rotationg and m...

Stefan Schuermans authored 11 years ago

BlinkenLib/BlinkenMovie.c  888)   int tmp, i;
BlinkenLib/BlinkenMovie.c  889) 
BlinkenLib/BlinkenMovie.c  890)   if (pMovie == NULL)
BlinkenLib/BlinkenMovie.c  891)     return;
BlinkenLib/BlinkenMovie.c  892) 
BlinkenLib/BlinkenMovie.c  893)   tmp = pMovie->height;
BlinkenLib/BlinkenMovie.c  894)   pMovie->height = pMovie->width;
BlinkenLib/BlinkenMovie.c  895)   pMovie->width = tmp;
BlinkenLib/BlinkenMovie.c  896) 
BlinkenLib/BlinkenMovie.c  897)   for (i = 0; i < pMovie->frameCnt; i++)
BlinkenLib/BlinkenMovie.c  898)     BlinkenFrameRotateCcw(pMovie->ppFrames[i]);
BlinkenLib/BlinkenMovie.c  899) }
BlinkenLib/BlinkenMovie.c  900) 
Stefan Schuermans format

Stefan Schuermans authored 1 year ago

src/BlinkenMovie.c         901) void BlinkenMovieRotateHalf(stBlinkenMovie *pMovie) {
Stefan Schuermans implemented rotationg and m...

Stefan Schuermans authored 11 years ago

BlinkenLib/BlinkenMovie.c  902)   int i;
BlinkenLib/BlinkenMovie.c  903) 
BlinkenLib/BlinkenMovie.c  904)   if (pMovie == NULL)
BlinkenLib/BlinkenMovie.c  905)     return;
BlinkenLib/BlinkenMovie.c  906) 
BlinkenLib/BlinkenMovie.c  907)   for (i = 0; i < pMovie->frameCnt; i++)
BlinkenLib/BlinkenMovie.c  908)     BlinkenFrameRotateHalf(pMovie->ppFrames[i]);
BlinkenLib/BlinkenMovie.c  909) }
BlinkenLib/BlinkenMovie.c  910) 
Stefan Schuermans format

Stefan Schuermans authored 1 year ago

src/BlinkenMovie.c         911) void BlinkenMovieMirrorHor(stBlinkenMovie *pMovie) {
Stefan Schuermans implemented rotationg and m...

Stefan Schuermans authored 11 years ago

BlinkenLib/BlinkenMovie.c  912)   int i;
BlinkenLib/BlinkenMovie.c  913) 
BlinkenLib/BlinkenMovie.c  914)   if (pMovie == NULL)
BlinkenLib/BlinkenMovie.c  915)     return;
BlinkenLib/BlinkenMovie.c  916) 
BlinkenLib/BlinkenMovie.c  917)   for (i = 0; i < pMovie->frameCnt; i++)
BlinkenLib/BlinkenMovie.c  918)     BlinkenFrameMirrorHor(pMovie->ppFrames[i]);
BlinkenLib/BlinkenMovie.c  919) }
BlinkenLib/BlinkenMovie.c  920) 
Stefan Schuermans format

Stefan Schuermans authored 1 year ago

src/BlinkenMovie.c         921) void BlinkenMovieMirrorVer(stBlinkenMovie *pMovie) {
Stefan Schuermans implemented rotationg and m...

Stefan Schuermans authored 11 years ago

BlinkenLib/BlinkenMovie.c  922)   int i;
BlinkenLib/BlinkenMovie.c  923) 
BlinkenLib/BlinkenMovie.c  924)   if (pMovie == NULL)
BlinkenLib/BlinkenMovie.c  925)     return;
BlinkenLib/BlinkenMovie.c  926) 
BlinkenLib/BlinkenMovie.c  927)   for (i = 0; i < pMovie->frameCnt; i++)
BlinkenLib/BlinkenMovie.c  928)     BlinkenFrameMirrorVer(pMovie->ppFrames[i]);
BlinkenLib/BlinkenMovie.c  929) }
BlinkenLib/BlinkenMovie.c  930) 
Stefan Schuermans format

Stefan Schuermans authored 1 year ago

src/BlinkenMovie.c         931) void BlinkenMovieMirrorDiag(stBlinkenMovie *pMovie) {
Stefan Schuermans implemented rotationg and m...

Stefan Schuermans authored 11 years ago

BlinkenLib/BlinkenMovie.c  932)   int tmp, i;
BlinkenLib/BlinkenMovie.c  933) 
BlinkenLib/BlinkenMovie.c  934)   if (pMovie == NULL)
BlinkenLib/BlinkenMovie.c  935)     return;
BlinkenLib/BlinkenMovie.c  936) 
BlinkenLib/BlinkenMovie.c  937)   tmp = pMovie->height;
BlinkenLib/BlinkenMovie.c  938)   pMovie->height = pMovie->width;
BlinkenLib/BlinkenMovie.c  939)   pMovie->width = tmp;
BlinkenLib/BlinkenMovie.c  940) 
BlinkenLib/BlinkenMovie.c  941)   for (i = 0; i < pMovie->frameCnt; i++)
BlinkenLib/BlinkenMovie.c  942)     BlinkenFrameMirrorDiag(pMovie->ppFrames[i]);
BlinkenLib/BlinkenMovie.c  943) }
BlinkenLib/BlinkenMovie.c  944) 
Stefan Schuermans format

Stefan Schuermans authored 1 year ago

src/BlinkenMovie.c         945) void BlinkenMovieMirrorDiag2(stBlinkenMovie *pMovie) {
Stefan Schuermans implemented rotationg and m...

Stefan Schuermans authored 11 years ago

BlinkenLib/BlinkenMovie.c  946)   int tmp, i;
BlinkenLib/BlinkenMovie.c  947) 
BlinkenLib/BlinkenMovie.c  948)   if (pMovie == NULL)
BlinkenLib/BlinkenMovie.c  949)     return;
BlinkenLib/BlinkenMovie.c  950) 
BlinkenLib/BlinkenMovie.c  951)   tmp = pMovie->height;
BlinkenLib/BlinkenMovie.c  952)   pMovie->height = pMovie->width;
BlinkenLib/BlinkenMovie.c  953)   pMovie->width = tmp;
BlinkenLib/BlinkenMovie.c  954) 
BlinkenLib/BlinkenMovie.c  955)   for (i = 0; i < pMovie->frameCnt; i++)
BlinkenLib/BlinkenMovie.c  956)     BlinkenFrameMirrorDiag2(pMovie->ppFrames[i]);
BlinkenLib/BlinkenMovie.c  957) }
BlinkenLib/BlinkenMovie.c  958) 
Stefan Schuermans format

Stefan Schuermans authored 1 year ago

src/BlinkenMovie.c         959) char *BlinkenMovieToString(stBlinkenMovie *pMovie) {
Stefan Schuermans changed indenting to be mor...

Stefan Schuermans authored 13 years ago

BlinkenLib/BlinkenMovie.c  960)   char **strs, *str, *ptr;
Christian Heimke BlinkenLib v.0.1.1 (2005-01...

Christian Heimke authored 13 years ago

BlinkenMovie.c             961)   int i, size;
BlinkenMovie.c             962) 
Stefan Schuermans changed indenting to be mor...

Stefan Schuermans authored 13 years ago

BlinkenLib/BlinkenMovie.c  963)   if (pMovie == NULL)
Christian Heimke BlinkenLib v.0.1.1 (2005-01...

Christian Heimke authored 13 years ago

BlinkenMovie.c             964)     return NULL;
BlinkenMovie.c             965) 
Stefan Schuermans adaptions for usage in C++

Stefan Schuermans authored 13 years ago

BlinkenLib/BlinkenMovie.c  966)   strs = (char **)BlinkenMalloc1D(pMovie->frameCnt, sizeof(char *));
Stefan Schuermans changed indenting to be mor...

Stefan Schuermans authored 13 years ago

BlinkenLib/BlinkenMovie.c  967)   if (strs == NULL)
Christian Heimke BlinkenLib v.0.1.1 (2005-01...

Christian Heimke authored 13 years ago

BlinkenMovie.c             968)     return NULL;
BlinkenMovie.c             969) 
Stefan Schuermans changed indenting to be mor...

Stefan Schuermans authored 13 years ago

BlinkenLib/BlinkenMovie.c  970)   for (i = 0; i < pMovie->frameCnt; i++) {
BlinkenLib/BlinkenMovie.c  971)     strs[i] = BlinkenFrameToString(pMovie->ppFrames[i]);
BlinkenLib/BlinkenMovie.c  972)     if (strs[i] == NULL) {
BlinkenLib/BlinkenMovie.c  973)       for (i--; i >= 0; i--)
BlinkenLib/BlinkenMovie.c  974)         free(strs[i]);
BlinkenLib/BlinkenMovie.c  975)       free(strs);
Christian Heimke BlinkenLib v.0.1.1 (2005-01...

Christian Heimke authored 13 years ago

BlinkenMovie.c             976)       return NULL;
BlinkenMovie.c             977)     }
BlinkenMovie.c             978)   }
BlinkenMovie.c             979) 
BlinkenMovie.c             980)   size = 128;
Stefan Schuermans changed indenting to be mor...

Stefan Schuermans authored 13 years ago

BlinkenLib/BlinkenMovie.c  981)   for (i = 0; i < pMovie->infoCnt; i++)
Stefan Schuermans format

Stefan Schuermans authored 1 year ago

src/BlinkenMovie.c         982)     size += strlen(pMovie->pppInfos[i][0]) + strlen(pMovie->pppInfos[i][1]) + 8;
Stefan Schuermans changed indenting to be mor...

Stefan Schuermans authored 13 years ago

BlinkenLib/BlinkenMovie.c  983)   for (i = 0; i < pMovie->frameCnt; i++)
BlinkenLib/BlinkenMovie.c  984)     size += strlen(strs[i]) + 32;
BlinkenLib/BlinkenMovie.c  985) 
BlinkenLib/BlinkenMovie.c  986)   str = (char *)malloc(size);
BlinkenLib/BlinkenMovie.c  987)   if (str == NULL) {
BlinkenLib/BlinkenMovie.c  988)     for (i = 0; i < pMovie->frameCnt; i++)
BlinkenLib/BlinkenMovie.c  989)       free(strs[i]);
BlinkenLib/BlinkenMovie.c  990)     free(strs);
Christian Heimke BlinkenLib v.0.1.1 (2005-01...

Christian Heimke authored 13 years ago

BlinkenMovie.c             991)     return NULL;
BlinkenMovie.c             992)   }
BlinkenMovie.c             993) 
BlinkenMovie.c             994)   ptr = str;
BlinkenMovie.c             995) 
Stefan Schuermans changed indenting to be mor...

Stefan Schuermans authored 13 years ago

BlinkenLib/BlinkenMovie.c  996)   sprintf(ptr, "BlinkenMovie %ux%u-%u/%u\n", pMovie->width, pMovie->height,
BlinkenLib/BlinkenMovie.c  997)           pMovie->channels, pMovie->maxval + 1);
BlinkenLib/BlinkenMovie.c  998)   ptr += strlen(ptr);
Christian Heimke BlinkenLib v.0.1.1 (2005-01...

Christian Heimke authored 13 years ago

BlinkenMovie.c             999) 
Stefan Schuermans changed indenting to be mor...

Stefan Schuermans authored 13 years ago

BlinkenLib/BlinkenMovie.c 1000)   for (i = 0; i < pMovie->infoCnt; i++) {
BlinkenLib/BlinkenMovie.c 1001)     sprintf(ptr, "%s = %s\n", pMovie->pppInfos[i][0], pMovie->pppInfos[i][1]);
BlinkenLib/BlinkenMovie.c 1002)     ptr += strlen(ptr);
Christian Heimke BlinkenLib v.0.1.1 (2005-01...

Christian Heimke authored 13 years ago

BlinkenMovie.c            1003)   }
BlinkenMovie.c            1004) 
Stefan Schuermans changed indenting to be mor...

Stefan Schuermans authored 13 years ago

BlinkenLib/BlinkenMovie.c 1005)   for (i = 0; i < pMovie->frameCnt; i++) {
BlinkenLib/BlinkenMovie.c 1006)     sprintf(ptr, "frame %u\n%s", i, strs[i]);
BlinkenLib/BlinkenMovie.c 1007)     ptr += strlen(ptr);
BlinkenLib/BlinkenMovie.c 1008)     free(strs[i]);
Christian Heimke BlinkenLib v.0.1.1 (2005-01...

Christian Heimke authored 13 years ago

BlinkenMovie.c            1009)   }
Stefan Schuermans changed indenting to be mor...

Stefan Schuermans authored 13 years ago

BlinkenLib/BlinkenMovie.c 1010)   free(strs);
Christian Heimke BlinkenLib v.0.1.1 (2005-01...

Christian Heimke authored 13 years ago

BlinkenMovie.c            1011) 
Stefan Schuermans changed indenting to be mor...

Stefan Schuermans authored 13 years ago

BlinkenLib/BlinkenMovie.c 1012)   return str;
Christian Heimke BlinkenLib v.0.1.1 (2005-01...

Christian Heimke authored 13 years ago

BlinkenMovie.c            1013) }
BlinkenMovie.c            1014) 
Stefan Schuermans format

Stefan Schuermans authored 1 year ago

src/BlinkenMovie.c        1015) stBlinkenMovie *BlinkenMovieLoadBlm(const char *pFilename) {
Stefan Schuermans changed indenting to be mor...

Stefan Schuermans authored 13 years ago

BlinkenLib/BlinkenMovie.c 1016)   FILE *pFile;
BlinkenLib/BlinkenMovie.c 1017)   stBlinkenMovie *pMovie;
BlinkenLib/BlinkenMovie.c 1018)   stBlinkenFrame *pFrame;
Christian Heimke BlinkenLib v.0.1.1 (2005-01...

Christian Heimke authored 13 years ago

BlinkenMovie.c            1019)   int width, height, y, x, chr, duration;
BlinkenMovie.c            1020)   char infoType[256], infoData[1024], pixel[2];
BlinkenMovie.c            1021) 
Stefan Schuermans changed indenting to be mor...

Stefan Schuermans authored 13 years ago

BlinkenLib/BlinkenMovie.c 1022)   if (pFilename == NULL)
Christian Heimke BlinkenLib v.0.1.1 (2005-01...

Christian Heimke authored 13 years ago

BlinkenMovie.c            1023)     return NULL;
BlinkenMovie.c            1024) 
Stefan Schuermans changed indenting to be mor...

Stefan Schuermans authored 13 years ago

BlinkenLib/BlinkenMovie.c 1025)   // open file
BlinkenLib/BlinkenMovie.c 1026)   pFile = fopen(pFilename, "rt");
BlinkenLib/BlinkenMovie.c 1027)   if (pFile == NULL)
Christian Heimke BlinkenLib v.0.2 (2005-01-27)

Christian Heimke authored 13 years ago

BlinkenMovie.c            1028)     return NULL;
Christian Heimke BlinkenLib v.0.1.1 (2005-01...

Christian Heimke authored 13 years ago

BlinkenMovie.c            1029) 
Stefan Schuermans changed indenting to be mor...

Stefan Schuermans authored 13 years ago

BlinkenLib/BlinkenMovie.c 1030)   // read magic and size
BlinkenLib/BlinkenMovie.c 1031)   if (fscanf(pFile, " # BlinkenLights Movie %ux%u", &width, &height) != 2) {
BlinkenLib/BlinkenMovie.c 1032)     fclose(pFile);
Christian Heimke BlinkenLib v.0.1.1 (2005-01...

Christian Heimke authored 13 years ago

BlinkenMovie.c            1033)     return NULL;
BlinkenMovie.c            1034)   }
Stefan Schuermans changed indenting to be mor...

Stefan Schuermans authored 13 years ago

BlinkenLib/BlinkenMovie.c 1035)   // allocate a new movie
BlinkenLib/BlinkenMovie.c 1036)   pMovie = BlinkenMovieNew(height, width, 1, 1);
BlinkenLib/BlinkenMovie.c 1037)   if (pMovie == NULL) {
BlinkenLib/BlinkenMovie.c 1038)     fclose(pFile);
Christian Heimke BlinkenLib v.0.1.1 (2005-01...

Christian Heimke authored 13 years ago

BlinkenMovie.c            1039)     return NULL;
BlinkenMovie.c            1040)   }
Stefan Schuermans changed indenting to be mor...

Stefan Schuermans authored 13 years ago

BlinkenLib/BlinkenMovie.c 1041)   // no frame yet
Christian Heimke BlinkenLib v.0.1.1 (2005-01...

Christian Heimke authored 13 years ago

BlinkenMovie.c            1042)   pFrame = NULL;
BlinkenMovie.c            1043)   y = 0;
BlinkenMovie.c            1044) 
Stefan Schuermans changed indenting to be mor...

Stefan Schuermans authored 13 years ago

BlinkenLib/BlinkenMovie.c 1045)   // read frames
BlinkenLib/BlinkenMovie.c 1046)   while (!feof(pFile)) {
BlinkenLib/BlinkenMovie.c 1047)     // skip rest of previous line (including newline)
Stefan Schuermans format

Stefan Schuermans authored 1 year ago

src/BlinkenMovie.c        1048)     while ((chr = fgetc(pFile)) != '\n' && chr != EOF)
src/BlinkenMovie.c        1049)       ;
Christian Heimke BlinkenLib v.0.1.1 (2005-01...

Christian Heimke authored 13 years ago

BlinkenMovie.c            1050) 
Stefan Schuermans changed indenting to be mor...

Stefan Schuermans authored 13 years ago

BlinkenLib/BlinkenMovie.c 1051)     // info line
Stefan Schuermans format

Stefan Schuermans authored 1 year ago

src/BlinkenMovie.c        1052)     if (fscanf(pFile, " # %255[A-Za-z0-9] %*[=:] %1023[^\n]", infoType,
src/BlinkenMovie.c        1053)                infoData) == 2) {
Stefan Schuermans changed indenting to be mor...

Stefan Schuermans authored 13 years ago

BlinkenLib/BlinkenMovie.c 1054)       BlinkenMovieAppendInfo(pMovie, infoType, infoData);
Christian Heimke BlinkenLib v.0.1.1 (2005-01...

Christian Heimke authored 13 years ago

BlinkenMovie.c            1055)     }
Stefan Schuermans changed indenting to be mor...

Stefan Schuermans authored 13 years ago

BlinkenLib/BlinkenMovie.c 1056)     // start of frame
BlinkenLib/BlinkenMovie.c 1057)     else if (fscanf(pFile, " @ %u", &duration) == 1) {
BlinkenLib/BlinkenMovie.c 1058)       // create new frame and append it to movie
BlinkenLib/BlinkenMovie.c 1059)       pFrame = BlinkenFrameNew(height, width, 1, 1, duration);
BlinkenLib/BlinkenMovie.c 1060)       if (pFrame != NULL) {
BlinkenLib/BlinkenMovie.c 1061)         BlinkenFrameClear(pFrame);
BlinkenLib/BlinkenMovie.c 1062)         if (BlinkenMovieAppendFrame(pMovie, pFrame) != 0) {
BlinkenLib/BlinkenMovie.c 1063)           BlinkenFrameFree(pFrame);
Christian Heimke BlinkenLib v.0.3 (2005-02-16)

Christian Heimke authored 13 years ago

BlinkenMovie.c            1064)           pFrame = NULL;
BlinkenMovie.c            1065)         }
Christian Heimke BlinkenLib v.0.1.1 (2005-01...

Christian Heimke authored 13 years ago

BlinkenMovie.c            1066)         y = 0;
BlinkenMovie.c            1067)       }
BlinkenMovie.c            1068)     }
Stefan Schuermans changed indenting to be mor...

Stefan Schuermans authored 13 years ago

BlinkenLib/BlinkenMovie.c 1069)     // data line
BlinkenLib/BlinkenMovie.c 1070)     else if (fscanf(pFile, "%1[01]", pixel) == 1) {
BlinkenLib/BlinkenMovie.c 1071)       if (pFrame != NULL) {
BlinkenLib/BlinkenMovie.c 1072)         for (x = 0;; x++) {
Stefan Schuermans make MSleep and GetMS publi...

Stefan Schuermans authored 1 year ago

src/BlinkenMovie.c        1073)           BlinkenFrameSetPixel(pFrame, y, x, 0, // set pixel
Stefan Schuermans adaptions for usage in C++

Stefan Schuermans authored 13 years ago

BlinkenLib/BlinkenMovie.c 1074)                                (unsigned char)(pixel[0] == '1' ? 1 : 0));
Stefan Schuermans format

Stefan Schuermans authored 1 year ago

src/BlinkenMovie.c        1075)           if (fscanf(pFile, "%1[01]", pixel) != 1) // read next pixel
Christian Heimke BlinkenLib v.0.1.1 (2005-01...

Christian Heimke authored 13 years ago

BlinkenMovie.c            1076)             break;
Stefan Schuermans changed indenting to be mor...

Stefan Schuermans authored 13 years ago

BlinkenLib/BlinkenMovie.c 1077)         }
Stefan Schuermans format

Stefan Schuermans authored 1 year ago

src/BlinkenMovie.c        1078)         y++; // next row
Christian Heimke BlinkenLib v.0.1.1 (2005-01...

Christian Heimke authored 13 years ago

BlinkenMovie.c            1079)       }
BlinkenMovie.c            1080)     }
BlinkenMovie.c            1081) 
Stefan Schuermans format

Stefan Schuermans authored 1 year ago

src/BlinkenMovie.c        1082)   } // while( ! feof( pFile ) )
Christian Heimke BlinkenLib v.0.1.1 (2005-01...

Christian Heimke authored 13 years ago

BlinkenMovie.c            1083) 
Stefan Schuermans changed indenting to be mor...

Stefan Schuermans authored 13 years ago

BlinkenLib/BlinkenMovie.c 1084)   // close file
BlinkenLib/BlinkenMovie.c 1085)   fclose(pFile);
Christian Heimke BlinkenLib v.0.1.1 (2005-01...

Christian Heimke authored 13 years ago

BlinkenMovie.c            1086) 
BlinkenMovie.c            1087)   return pMovie;
BlinkenMovie.c            1088) }
BlinkenMovie.c            1089) 
Stefan Schuermans format

Stefan Schuermans authored 1 year ago

src/BlinkenMovie.c        1090) stBlinkenMovie *BlinkenMovieLoadBmm(const char *pFilename) {
Stefan Schuermans changed indenting to be mor...

Stefan Schuermans authored 13 years ago

BlinkenLib/BlinkenMovie.c 1091)   FILE *pFile;
BlinkenLib/BlinkenMovie.c 1092)   stBlinkenMovie *pMovie;
BlinkenLib/BlinkenMovie.c 1093)   stBlinkenFrame *pFrame;
Christian Heimke BlinkenLib v.0.1.1 (2005-01...

Christian Heimke authored 13 years ago

BlinkenMovie.c            1094)   int width, height, y, x, chr, duration, val;
BlinkenMovie.c            1095)   char infoType[256], infoData[1024], pixel[8];
BlinkenMovie.c            1096) 
Stefan Schuermans changed indenting to be mor...

Stefan Schuermans authored 13 years ago

BlinkenLib/BlinkenMovie.c 1097)   if (pFilename == NULL)
Christian Heimke BlinkenLib v.0.1.1 (2005-01...

Christian Heimke authored 13 years ago

BlinkenMovie.c            1098)     return NULL;
BlinkenMovie.c            1099) 
Stefan Schuermans changed indenting to be mor...

Stefan Schuermans authored 13 years ago

BlinkenLib/BlinkenMovie.c 1100)   // open file
BlinkenLib/BlinkenMovie.c 1101)   pFile = fopen(pFilename, "rt");
BlinkenLib/BlinkenMovie.c 1102)   if (pFile == NULL)
Christian Heimke BlinkenLib v.0.2 (2005-01-27)

Christian Heimke authored 13 years ago

BlinkenMovie.c            1103)     return NULL;
Christian Heimke BlinkenLib v.0.1.1 (2005-01...

Christian Heimke authored 13 years ago

BlinkenMovie.c            1104) 
Stefan Schuermans changed indenting to be mor...

Stefan Schuermans authored 13 years ago

BlinkenLib/BlinkenMovie.c 1105)   // read magic and size
BlinkenLib/BlinkenMovie.c 1106)   if (fscanf(pFile, " # BlinkenMini Movie %ux%u", &width, &height) != 2) {
BlinkenLib/BlinkenMovie.c 1107)     fclose(pFile);
Christian Heimke BlinkenLib v.0.1.1 (2005-01...

Christian Heimke authored 13 years ago

BlinkenMovie.c            1108)     return NULL;
BlinkenMovie.c            1109)   }
Stefan Schuermans changed indenting to be mor...

Stefan Schuermans authored 13 years ago

BlinkenLib/BlinkenMovie.c 1110)   // allocate a new movie
BlinkenLib/BlinkenMovie.c 1111)   pMovie = BlinkenMovieNew(height, width, 1, 255);
BlinkenLib/BlinkenMovie.c 1112)   if (pMovie == NULL) {
BlinkenLib/BlinkenMovie.c 1113)     fclose(pFile);
Christian Heimke BlinkenLib v.0.1.1 (2005-01...

Christian Heimke authored 13 years ago

BlinkenMovie.c            1114)     return NULL;
BlinkenMovie.c            1115)   }
Stefan Schuermans changed indenting to be mor...

Stefan Schuermans authored 13 years ago

BlinkenLib/BlinkenMovie.c 1116)   // no frame yet
Christian Heimke BlinkenLib v.0.1.1 (2005-01...

Christian Heimke authored 13 years ago

BlinkenMovie.c            1117)   pFrame = NULL;
BlinkenMovie.c            1118)   y = 0;
BlinkenMovie.c            1119) 
Stefan Schuermans changed indenting to be mor...

Stefan Schuermans authored 13 years ago

BlinkenLib/BlinkenMovie.c 1120)   // read frames
BlinkenLib/BlinkenMovie.c 1121)   while (!feof(pFile)) {
BlinkenLib/BlinkenMovie.c 1122)     // skip rest of previous line (including newline)
Stefan Schuermans format

Stefan Schuermans authored 1 year ago

src/BlinkenMovie.c        1123)     while ((chr = fgetc(pFile)) != '\n' && chr != EOF)
src/BlinkenMovie.c        1124)       ;
Christian Heimke BlinkenLib v.0.1.1 (2005-01...

Christian Heimke authored 13 years ago

BlinkenMovie.c            1125) 
Stefan Schuermans changed indenting to be mor...

Stefan Schuermans authored 13 years ago

BlinkenLib/BlinkenMovie.c 1126)     // info line
Stefan Schuermans format

Stefan Schuermans authored 1 year ago

src/BlinkenMovie.c        1127)     if (fscanf(pFile, " # %255[A-Za-z0-9] %*[=:] %1023[^\n]", infoType,
src/BlinkenMovie.c        1128)                infoData) == 2) {
Stefan Schuermans changed indenting to be mor...

Stefan Schuermans authored 13 years ago

BlinkenLib/BlinkenMovie.c 1129)       BlinkenMovieAppendInfo(pMovie, infoType, infoData);
Christian Heimke BlinkenLib v.0.1.1 (2005-01...

Christian Heimke authored 13 years ago

BlinkenMovie.c            1130)     }
Stefan Schuermans changed indenting to be mor...

Stefan Schuermans authored 13 years ago

BlinkenLib/BlinkenMovie.c 1131)     // start of frame
BlinkenLib/BlinkenMovie.c 1132)     else if (fscanf(pFile, " @ %u", &duration) == 1) {
BlinkenLib/BlinkenMovie.c 1133)       // create new frame and append it to movie
BlinkenLib/BlinkenMovie.c 1134)       pFrame = BlinkenFrameNew(height, width, 1, 255, duration);
BlinkenLib/BlinkenMovie.c 1135)       if (pFrame != NULL) {
BlinkenLib/BlinkenMovie.c 1136)         BlinkenFrameClear(pFrame);
BlinkenLib/BlinkenMovie.c 1137)         if (BlinkenMovieAppendFrame(pMovie, pFrame) != 0) {
BlinkenLib/BlinkenMovie.c 1138)           BlinkenFrameFree(pFrame);
Christian Heimke BlinkenLib v.0.3 (2005-02-16)

Christian Heimke authored 13 years ago

BlinkenMovie.c            1139)           pFrame = NULL;
BlinkenMovie.c            1140)         }
Christian Heimke BlinkenLib v.0.1.1 (2005-01...

Christian Heimke authored 13 years ago

BlinkenMovie.c            1141)         y = 0;
BlinkenMovie.c            1142)       }
BlinkenMovie.c            1143)     }
Stefan Schuermans changed indenting to be mor...

Stefan Schuermans authored 13 years ago

BlinkenLib/BlinkenMovie.c 1144)     // data line
BlinkenLib/BlinkenMovie.c 1145)     else if (fscanf(pFile, "%7[0-9A-FXa-fx]", pixel) == 1) {
BlinkenLib/BlinkenMovie.c 1146)       if (pFrame != NULL) {
BlinkenLib/BlinkenMovie.c 1147)         for (x = 0;; x++) {
Stefan Schuermans make MSleep and GetMS publi...

Stefan Schuermans authored 1 year ago

src/BlinkenMovie.c        1148)           if (sscanf(pixel, "%i", &val) != 1) // convert pixel to number
Christian Heimke BlinkenLib v.0.1.1 (2005-01...

Christian Heimke authored 13 years ago

BlinkenMovie.c            1149)             break;
Stefan Schuermans adaptions for usage in C++

Stefan Schuermans authored 13 years ago

BlinkenLib/BlinkenMovie.c 1150)           BlinkenFrameSetPixel(pFrame, y, x, 0, // set pixel
BlinkenLib/BlinkenMovie.c 1151)                                (unsigned char)val);
Stefan Schuermans make MSleep and GetMS publi...

Stefan Schuermans authored 1 year ago

src/BlinkenMovie.c        1152)           if (fscanf(pFile, "%*[ \t]") != 0) // kill space
Stefan Schuermans fixes for gcc 5.4

Stefan Schuermans authored 8 years ago

BlinkenLib/BlinkenMovie.c 1153)             break;
BlinkenLib/BlinkenMovie.c 1154)           if (fscanf(pFile, "%7[0-9A-FXa-fx]", pixel) != 1) // read next pixel
Christian Heimke BlinkenLib v.0.1.1 (2005-01...

Christian Heimke authored 13 years ago

BlinkenMovie.c            1155)             break;
Stefan Schuermans changed indenting to be mor...

Stefan Schuermans authored 13 years ago

BlinkenLib/BlinkenMovie.c 1156)         }
Stefan Schuermans format

Stefan Schuermans authored 1 year ago

src/BlinkenMovie.c        1157)         y++; // next row
Christian Heimke BlinkenLib v.0.1.1 (2005-01...

Christian Heimke authored 13 years ago

BlinkenMovie.c            1158)       }
BlinkenMovie.c            1159)     }
BlinkenMovie.c            1160) 
Stefan Schuermans format

Stefan Schuermans authored 1 year ago

src/BlinkenMovie.c        1161)   } // while( ! feof( pFile ) )
Christian Heimke BlinkenLib v.0.1.1 (2005-01...

Christian Heimke authored 13 years ago

BlinkenMovie.c            1162) 
Stefan Schuermans changed indenting to be mor...

Stefan Schuermans authored 13 years ago

BlinkenLib/BlinkenMovie.c 1163)   // close file
BlinkenLib/BlinkenMovie.c 1164)   fclose(pFile);
Christian Heimke BlinkenLib v.0.1.1 (2005-01...

Christian Heimke authored 13 years ago

BlinkenMovie.c            1165) 
BlinkenMovie.c            1166)   return pMovie;
BlinkenMovie.c            1167) }
BlinkenMovie.c            1168) 
Stefan Schuermans format

Stefan Schuermans authored 1 year ago

src/BlinkenMovie.c        1169) stBlinkenMovie *BlinkenMovieLoadBml(const char *pFilename) {
Stefan Schuermans changed indenting to be mor...

Stefan Schuermans authored 13 years ago

BlinkenLib/BlinkenMovie.c 1170)   FILE *pFile;
BlinkenLib/BlinkenMovie.c 1171)   stBlinkenMovie *pMovie;
BlinkenLib/BlinkenMovie.c 1172)   stBlinkenFrame *pFrame;
Christian Heimke BlinkenLib v.0.1.1 (2005-01...

Christian Heimke authored 13 years ago

BlinkenMovie.c            1173)   int width, height, channels, bits, maxval, chrs, y, x, c, duration, val;
Stefan Schuermans adapt to newer compiler wit...

Stefan Schuermans authored 5 years ago

src/BlinkenMovie.c        1174)   char buffer[2048], infoType[256], infoData[1024], pixelFormat[24], pixel[8],
Stefan Schuermans changed indenting to be mor...

Stefan Schuermans authored 13 years ago

BlinkenLib/BlinkenMovie.c 1175)       *ptr, chr;
Christian Heimke BlinkenLib v.0.1.1 (2005-01...

Christian Heimke authored 13 years ago

BlinkenMovie.c            1176) 
Stefan Schuermans changed indenting to be mor...

Stefan Schuermans authored 13 years ago

BlinkenLib/BlinkenMovie.c 1177)   if (pFilename == NULL)
Christian Heimke BlinkenLib v.0.1.1 (2005-01...

Christian Heimke authored 13 years ago

BlinkenMovie.c            1178)     return NULL;
BlinkenMovie.c            1179) 
Stefan Schuermans changed indenting to be mor...

Stefan Schuermans authored 13 years ago

BlinkenLib/BlinkenMovie.c 1180)   // open file
BlinkenLib/BlinkenMovie.c 1181)   pFile = fopen(pFilename, "rt");
BlinkenLib/BlinkenMovie.c 1182)   if (pFile == NULL)
Christian Heimke BlinkenLib v.0.2 (2005-01-27)

Christian Heimke authored 13 years ago

BlinkenMovie.c            1183)     return NULL;
Christian Heimke BlinkenLib v.0.1.1 (2005-01...

Christian Heimke authored 13 years ago

BlinkenMovie.c            1184) 
Stefan Schuermans changed indenting to be mor...

Stefan Schuermans authored 13 years ago

BlinkenLib/BlinkenMovie.c 1185)   // no movie yet - blm tag not yet found
Christian Heimke BlinkenLib v.0.1.1 (2005-01...

Christian Heimke authored 13 years ago

BlinkenMovie.c            1186)   pMovie = NULL;
BlinkenMovie.c            1187) 
Stefan Schuermans changed indenting to be mor...

Stefan Schuermans authored 13 years ago

BlinkenLib/BlinkenMovie.c 1188)   // no frame yet
Christian Heimke BlinkenLib v.0.1.1 (2005-01...

Christian Heimke authored 13 years ago

BlinkenMovie.c            1189)   pFrame = NULL;
BlinkenMovie.c            1190)   y = 0;
BlinkenMovie.c            1191) 
Stefan Schuermans changed indenting to be mor...

Stefan Schuermans authored 13 years ago

BlinkenLib/BlinkenMovie.c 1192)   // read tags
Christian Heimke BlinkenLib v.0.1.1 (2005-01...

Christian Heimke authored 13 years ago

BlinkenMovie.c            1193)   maxval = 0;
Stefan Schuermans changed indenting to be mor...

Stefan Schuermans authored 13 years ago

BlinkenLib/BlinkenMovie.c 1194)   while (!feof(pFile)) {
Christian Heimke BlinkenLib v.0.1.1 (2005-01...

Christian Heimke authored 13 years ago

BlinkenMovie.c            1195) 
Stefan Schuermans changed indenting to be mor...

Stefan Schuermans authored 13 years ago

BlinkenLib/BlinkenMovie.c 1196)     // skip to just before beginning of next tag
Stefan Schuermans fixes for gcc 5.4

Stefan Schuermans authored 8 years ago

BlinkenLib/BlinkenMovie.c 1197)     if (fscanf(pFile, "%*[^<]") != 0)
BlinkenLib/BlinkenMovie.c 1198)       // end loop (error)
BlinkenLib/BlinkenMovie.c 1199)       break;
Stefan Schuermans changed indenting to be mor...

Stefan Schuermans authored 13 years ago

BlinkenLib/BlinkenMovie.c 1200)     // skip beginning character of next tag
BlinkenLib/BlinkenMovie.c 1201)     if (fgetc(pFile) != '<')
BlinkenLib/BlinkenMovie.c 1202)       // end loop (no more tags)
Christian Heimke BlinkenLib v.0.1.1 (2005-01...

Christian Heimke authored 13 years ago

BlinkenMovie.c            1203)       break;
BlinkenMovie.c            1204) 
Stefan Schuermans changed indenting to be mor...

Stefan Schuermans authored 13 years ago

BlinkenLib/BlinkenMovie.c 1205)     // no blm tag yet
BlinkenLib/BlinkenMovie.c 1206)     if (pMovie == NULL) {
Christian Heimke BlinkenLib v.0.1.1 (2005-01...

Christian Heimke authored 13 years ago

BlinkenMovie.c            1207) 
Stefan Schuermans changed indenting to be mor...

Stefan Schuermans authored 13 years ago

BlinkenLib/BlinkenMovie.c 1208)       // blm tag
BlinkenLib/BlinkenMovie.c 1209)       if (fscanf(pFile, "blm%2047[^>]", buffer) == 1) {
BlinkenLib/BlinkenMovie.c 1210)         // get attributes
Christian Heimke BlinkenLib v.0.1.1 (2005-01...

Christian Heimke authored 13 years ago

BlinkenMovie.c            1211)         width = 0;
BlinkenMovie.c            1212)         height = 0;
Christian Heimke BlinkenLib v.0.3.1 (2005-03...

Christian Heimke authored 13 years ago

BlinkenMovie.c            1213)         channels = 1;
BlinkenMovie.c            1214)         bits = 4;
BlinkenMovie.c            1215)         maxval = 15;
Stefan Schuermans make MSleep and GetMS publi...

Stefan Schuermans authored 1 year ago

src/BlinkenMovie.c        1216)         if ((ptr = strstr(buffer, "height=\"")) != NULL) // height
Stefan Schuermans changed indenting to be mor...

Stefan Schuermans authored 13 years ago

BlinkenLib/BlinkenMovie.c 1217)           sscanf(ptr + 8, "%u", &height);
Stefan Schuermans make MSleep and GetMS publi...

Stefan Schuermans authored 1 year ago

src/BlinkenMovie.c        1218)         if ((ptr = strstr(buffer, "width=\"")) != NULL) // width
Stefan Schuermans changed indenting to be mor...

Stefan Schuermans authored 13 years ago

BlinkenLib/BlinkenMovie.c 1219)           sscanf(ptr + 7, "%u", &width);
Stefan Schuermans format

Stefan Schuermans authored 1 year ago

src/BlinkenMovie.c        1220)         if ((ptr = strstr(buffer, "channels=\"")) != NULL) // channels
Stefan Schuermans changed indenting to be mor...

Stefan Schuermans authored 13 years ago

BlinkenLib/BlinkenMovie.c 1221)           sscanf(ptr + 10, "%u", &channels);
Stefan Schuermans make MSleep and GetMS publi...

Stefan Schuermans authored 1 year ago

src/BlinkenMovie.c        1222)         if ((ptr = strstr(buffer, "bits=\"")) != NULL) // bits
Stefan Schuermans changed indenting to be mor...

Stefan Schuermans authored 13 years ago

BlinkenLib/BlinkenMovie.c 1223)           sscanf(ptr + 6, "%u", &bits);
Stefan Schuermans make MSleep and GetMS publi...

Stefan Schuermans authored 1 year ago

src/BlinkenMovie.c        1224)         maxval = (1 << bits) - 1; // maxval
Stefan Schuermans changed indenting to be mor...

Stefan Schuermans authored 13 years ago

BlinkenLib/BlinkenMovie.c 1225) 
BlinkenLib/BlinkenMovie.c 1226)         // allocate a new movie
BlinkenLib/BlinkenMovie.c 1227)         pMovie = BlinkenMovieNew(height, width, channels, maxval);
BlinkenLib/BlinkenMovie.c 1228)         if (pMovie == NULL) {
BlinkenLib/BlinkenMovie.c 1229)           fclose(pFile);
Christian Heimke BlinkenLib v.0.1.1 (2005-01...

Christian Heimke authored 13 years ago

BlinkenMovie.c            1230)           return NULL;
BlinkenMovie.c            1231)         }
Stefan Schuermans changed indenting to be mor...

Stefan Schuermans authored 13 years ago

BlinkenLib/BlinkenMovie.c 1232)         // get number of characters per channel
Christian Heimke BlinkenLib v.0.1.1 (2005-01...

Christian Heimke authored 13 years ago

BlinkenMovie.c            1233)         chrs = (bits + 3) >> 2;
Stefan Schuermans changed indenting to be mor...

Stefan Schuermans authored 13 years ago

BlinkenLib/BlinkenMovie.c 1234)         // get fscanf formart string for reading a pixel
Stefan Schuermans adaptions for usage in C++

Stefan Schuermans authored 13 years ago

BlinkenLib/BlinkenMovie.c 1235)         //   read max 5 chars (2 already in use by prefix)
BlinkenLib/BlinkenMovie.c 1236)         sprintf(pixelFormat, "%%%d[0-9A-Fa-f]", chrs > 4 ? 5 : chrs);
Stefan Schuermans changed indenting to be mor...

Stefan Schuermans authored 13 years ago

BlinkenLib/BlinkenMovie.c 1237)         // initialize pixel buffer with hex prefix
BlinkenLib/BlinkenMovie.c 1238)         strcpy(pixel, "0x");
Christian Heimke BlinkenLib v.0.1.1 (2005-01...

Christian Heimke authored 13 years ago

BlinkenMovie.c            1239)       }
BlinkenMovie.c            1240) 
Stefan Schuermans format

Stefan Schuermans authored 1 year ago

src/BlinkenMovie.c        1241)     } // if( pMovie == NULL )
Christian Heimke BlinkenLib v.0.1.1 (2005-01...

Christian Heimke authored 13 years ago

BlinkenMovie.c            1242) 
Stefan Schuermans changed indenting to be mor...

Stefan Schuermans authored 13 years ago

BlinkenLib/BlinkenMovie.c 1243)     // blm tag was already found
Stefan Schuermans format

Stefan Schuermans authored 1 year ago

src/BlinkenMovie.c        1244)     else // if( pMovie == NULL )
Christian Heimke BlinkenLib v.0.1.1 (2005-01...

Christian Heimke authored 13 years ago

BlinkenMovie.c            1245)     {
BlinkenMovie.c            1246) 
Stefan Schuermans changed indenting to be mor...

Stefan Schuermans authored 13 years ago

BlinkenLib/BlinkenMovie.c 1247)       // title tag
BlinkenLib/BlinkenMovie.c 1248)       if (fscanf(pFile, "title>%2047[^<]", buffer) == 1) {
BlinkenLib/BlinkenMovie.c 1249)         // add info to movie
BlinkenLib/BlinkenMovie.c 1250)         BlinkenMovieAppendInfo(pMovie, "title", buffer);
Christian Heimke BlinkenLib v.0.1.1 (2005-01...

Christian Heimke authored 13 years ago

BlinkenMovie.c            1251)       }
Stefan Schuermans changed indenting to be mor...

Stefan Schuermans authored 13 years ago

BlinkenLib/BlinkenMovie.c 1252)       // description tag
BlinkenLib/BlinkenMovie.c 1253)       else if (fscanf(pFile, "description>%2047[^<]", buffer) == 1) {
BlinkenLib/BlinkenMovie.c 1254)         // check if generic info
Stefan Schuermans format

Stefan Schuermans authored 1 year ago

src/BlinkenMovie.c        1255)         if (sscanf(buffer, "%255[A-Za-z0-9] %*[=:] %1023[^\n]", infoType,
src/BlinkenMovie.c        1256)                    infoData) == 2)
Stefan Schuermans changed indenting to be mor...

Stefan Schuermans authored 13 years ago

BlinkenLib/BlinkenMovie.c 1257)           // add info to movie
BlinkenLib/BlinkenMovie.c 1258)           BlinkenMovieAppendInfo(pMovie, infoType, infoData);
Christian Heimke BlinkenLib v.0.1.1 (2005-01...

Christian Heimke authored 13 years ago

BlinkenMovie.c            1259)         else
Stefan Schuermans changed indenting to be mor...

Stefan Schuermans authored 13 years ago

BlinkenLib/BlinkenMovie.c 1260)           // add info to movie
BlinkenLib/BlinkenMovie.c 1261)           BlinkenMovieAppendInfo(pMovie, "description", buffer);
Christian Heimke BlinkenLib v.0.1.1 (2005-01...

Christian Heimke authored 13 years ago

BlinkenMovie.c            1262)       }
Stefan Schuermans changed indenting to be mor...

Stefan Schuermans authored 13 years ago

BlinkenLib/BlinkenMovie.c 1263)       // creator tag
BlinkenLib/BlinkenMovie.c 1264)       else if (fscanf(pFile, "creator>%2047[^<]", buffer) == 1) {
BlinkenLib/BlinkenMovie.c 1265)         // add info to movie
BlinkenLib/BlinkenMovie.c 1266)         BlinkenMovieAppendInfo(pMovie, "creator", buffer);
Christian Heimke BlinkenLib v.0.1.1 (2005-01...

Christian Heimke authored 13 years ago

BlinkenMovie.c            1267)       }
Stefan Schuermans changed indenting to be mor...

Stefan Schuermans authored 13 years ago

BlinkenLib/BlinkenMovie.c 1268)       // author tag
BlinkenLib/BlinkenMovie.c 1269)       else if (fscanf(pFile, "author>%2047[^<]", buffer) == 1) {
BlinkenLib/BlinkenMovie.c 1270)         // add info to movie
BlinkenLib/BlinkenMovie.c 1271)         BlinkenMovieAppendInfo(pMovie, "author", buffer);
Christian Heimke BlinkenLib v.0.1.1 (2005-01...

Christian Heimke authored 13 years ago

BlinkenMovie.c            1272)       }
Stefan Schuermans changed indenting to be mor...

Stefan Schuermans authored 13 years ago

BlinkenLib/BlinkenMovie.c 1273)       // email tag
BlinkenLib/BlinkenMovie.c 1274)       else if (fscanf(pFile, "email>%2047[^<]", buffer) == 1) {
BlinkenLib/BlinkenMovie.c 1275)         // add info to movie
BlinkenLib/BlinkenMovie.c 1276)         BlinkenMovieAppendInfo(pMovie, "email", buffer);
Christian Heimke BlinkenLib v.0.1.1 (2005-01...

Christian Heimke authored 13 years ago

BlinkenMovie.c            1277)       }
Stefan Schuermans changed indenting to be mor...

Stefan Schuermans authored 13 years ago

BlinkenLib/BlinkenMovie.c 1278)       // url tag
BlinkenLib/BlinkenMovie.c 1279)       else if (fscanf(pFile, "url>%2047[^<]", buffer) == 1) {
BlinkenLib/BlinkenMovie.c 1280)         // add info to movie
BlinkenLib/BlinkenMovie.c 1281)         BlinkenMovieAppendInfo(pMovie, "url", buffer);
Christian Heimke BlinkenLib v.0.1.1 (2005-01...

Christian Heimke authored 13 years ago

BlinkenMovie.c            1282)       }
Stefan Schuermans changed indenting to be mor...

Stefan Schuermans authored 13 years ago

BlinkenLib/BlinkenMovie.c 1283)       // frame tag
BlinkenLib/BlinkenMovie.c 1284)       else if (fscanf(pFile, "frame%2047[^>]", buffer) == 1) {
BlinkenLib/BlinkenMovie.c 1285)         // get attributes
Christian Heimke BlinkenLib v.0.1.1 (2005-01...

Christian Heimke authored 13 years ago

BlinkenMovie.c            1286)         duration = 0;
Stefan Schuermans format

Stefan Schuermans authored 1 year ago

src/BlinkenMovie.c        1287)         if ((ptr = strstr(buffer, "duration=\"")) != NULL) // duration
Stefan Schuermans changed indenting to be mor...

Stefan Schuermans authored 13 years ago

BlinkenLib/BlinkenMovie.c 1288)           sscanf(ptr + 10, "%u", &duration);
BlinkenLib/BlinkenMovie.c 1289)         // create new frame and append it to movie
BlinkenLib/BlinkenMovie.c 1290)         pFrame = BlinkenFrameNew(height, width, channels, maxval, duration);
BlinkenLib/BlinkenMovie.c 1291)         if (pFrame != NULL) {
BlinkenLib/BlinkenMovie.c 1292)           BlinkenFrameClear(pFrame);
BlinkenLib/BlinkenMovie.c 1293)           if (BlinkenMovieAppendFrame(pMovie, pFrame) != 0) {
BlinkenLib/BlinkenMovie.c 1294)             BlinkenFrameFree(pFrame);
Christian Heimke BlinkenLib v.0.3 (2005-02-16)

Christian Heimke authored 13 years ago

BlinkenMovie.c            1295)             pFrame = NULL;
BlinkenMovie.c            1296)           }
Christian Heimke BlinkenLib v.0.1.1 (2005-01...

Christian Heimke authored 13 years ago

BlinkenMovie.c            1297)           y = 0;
BlinkenMovie.c            1298)         }
BlinkenMovie.c            1299)       }
Stefan Schuermans changed indenting to be mor...

Stefan Schuermans authored 13 years ago

BlinkenLib/BlinkenMovie.c 1300)       // row tag
BlinkenLib/BlinkenMovie.c 1301)       else if (fscanf(pFile, "row%c", &chr) == 1 && chr == '>') {
BlinkenLib/BlinkenMovie.c 1302)         if (pFrame != NULL) {
BlinkenLib/BlinkenMovie.c 1303)           // parse row
BlinkenLib/BlinkenMovie.c 1304)           for (x = 0; x < width; x++) {
BlinkenLib/BlinkenMovie.c 1305)             for (c = 0; c < channels; c++) {
BlinkenLib/BlinkenMovie.c 1306)               // read next pixel (one channel of pixel)
BlinkenLib/BlinkenMovie.c 1307)               if (fscanf(pFile, pixelFormat, pixel + 2) != 1) {
Stefan Schuermans format

Stefan Schuermans authored 1 year ago

src/BlinkenMovie.c        1308)                 x = width; // also terminate x loop
Christian Heimke BlinkenLib v.0.1.1 (2005-01...

Christian Heimke authored 13 years ago

BlinkenMovie.c            1309)                 break;
BlinkenMovie.c            1310)               }
Stefan Schuermans changed indenting to be mor...

Stefan Schuermans authored 13 years ago

BlinkenLib/BlinkenMovie.c 1311)               // convert pixel (one channel of pixel) to number
BlinkenLib/BlinkenMovie.c 1312)               if (sscanf(pixel, "%i", &val) != 1) {
Stefan Schuermans format

Stefan Schuermans authored 1 year ago

src/BlinkenMovie.c        1313)                 x = width; // also terminate x loop
Christian Heimke BlinkenLib v.0.1.1 (2005-01...

Christian Heimke authored 13 years ago

BlinkenMovie.c            1314)                 break;
BlinkenMovie.c            1315)               }
Stefan Schuermans changed indenting to be mor...

Stefan Schuermans authored 13 years ago

BlinkenLib/BlinkenMovie.c 1316)               // set pixel (one channel of pixel)
BlinkenLib/BlinkenMovie.c 1317)               BlinkenFrameSetPixel(pFrame, y, x, c, (unsigned char)val);
Christian Heimke BlinkenLib v.0.1.1 (2005-01...

Christian Heimke authored 13 years ago

BlinkenMovie.c            1318)             }
BlinkenMovie.c            1319)           }
Stefan Schuermans format

Stefan Schuermans authored 1 year ago

src/BlinkenMovie.c        1320)           y++; // next row
Christian Heimke BlinkenLib v.0.1.1 (2005-01...

Christian Heimke authored 13 years ago

BlinkenMovie.c            1321)         }
BlinkenMovie.c            1322)       }
BlinkenMovie.c            1323) 
Stefan Schuermans format

Stefan Schuermans authored 1 year ago

src/BlinkenMovie.c        1324)     } // if( pMovie == NULL ) ... else
Christian Heimke BlinkenLib v.0.1.1 (2005-01...

Christian Heimke authored 13 years ago

BlinkenMovie.c            1325) 
Stefan Schuermans make MSleep and GetMS publi...

Stefan Schuermans authored 1 year ago

src/BlinkenMovie.c        1326)   } // while( ! feof( pFile ) )
Christian Heimke BlinkenLib v.0.1.1 (2005-01...

Christian Heimke authored 13 years ago

BlinkenMovie.c            1327) 
Stefan Schuermans changed indenting to be mor...

Stefan Schuermans authored 13 years ago

BlinkenLib/BlinkenMovie.c 1328)   // close file
BlinkenLib/BlinkenMovie.c 1329)   fclose(pFile);
Christian Heimke BlinkenLib v.0.1.1 (2005-01...

Christian Heimke authored 13 years ago

BlinkenMovie.c            1330) 
BlinkenMovie.c            1331)   return pMovie;
BlinkenMovie.c            1332) }
BlinkenMovie.c            1333) 
Stefan Schuermans format

Stefan Schuermans authored 1 year ago

src/BlinkenMovie.c        1334) stBlinkenMovie *BlinkenMovieLoadBbm(const char *pFilename) {
Stefan Schuermans changed indenting to be mor...

Stefan Schuermans authored 13 years ago

BlinkenLib/BlinkenMovie.c 1335)   FILE *pFile;
BlinkenLib/BlinkenMovie.c 1336)   stBlinkenMovie *pMovie;
BlinkenLib/BlinkenMovie.c 1337)   stBlinkenFrame *pFrame;
Christian Heimke BlinkenLib v.0.1.1 (2005-01...

Christian Heimke authored 13 years ago

BlinkenMovie.c            1338)   unsigned char header[24], subHeader[6], frameStartMarker[4];
Stefan Schuermans implemented rotationg and m...

Stefan Schuermans authored 11 years ago

BlinkenLib/BlinkenMovie.c 1339)   unsigned long headerMagic, headerFramePtr;
Christian Heimke BlinkenLib v.0.1.1 (2005-01...

Christian Heimke authored 13 years ago

BlinkenMovie.c            1340)   unsigned short headerHeight, headerWidth, headerChannels, headerMaxval;
BlinkenMovie.c            1341)   unsigned long subHeaderMagic, frameStartMarkerMagic;
BlinkenMovie.c            1342)   unsigned short subHeaderSize;
Stefan Schuermans changed indenting to be mor...

Stefan Schuermans authored 13 years ago

BlinkenLib/BlinkenMovie.c 1343)   char *pInfoHeader, *pInfoHeaderX;
BlinkenLib/BlinkenMovie.c 1344)   unsigned char *pFrameData;
Christian Heimke BlinkenLib v.0.1.1 (2005-01...

Christian Heimke authored 13 years ago

BlinkenMovie.c            1345)   int len, duration, y, x, c, i;
BlinkenMovie.c            1346) 
Stefan Schuermans changed indenting to be mor...

Stefan Schuermans authored 13 years ago

BlinkenLib/BlinkenMovie.c 1347)   if (pFilename == NULL)
Christian Heimke BlinkenLib v.0.1.1 (2005-01...

Christian Heimke authored 13 years ago

BlinkenMovie.c            1348)     return NULL;
BlinkenMovie.c            1349) 
Stefan Schuermans changed indenting to be mor...

Stefan Schuermans authored 13 years ago

BlinkenLib/BlinkenMovie.c 1350)   // open file
BlinkenLib/BlinkenMovie.c 1351)   pFile = fopen(pFilename, "rb");
BlinkenLib/BlinkenMovie.c 1352)   if (pFile == NULL)
Christian Heimke BlinkenLib v.0.2 (2005-01-27)

Christian Heimke authored 13 years ago

BlinkenMovie.c            1353)     return NULL;
Christian Heimke BlinkenLib v.0.1.1 (2005-01...

Christian Heimke authored 13 years ago

BlinkenMovie.c            1354) 
Stefan Schuermans changed indenting to be mor...

Stefan Schuermans authored 13 years ago

BlinkenLib/BlinkenMovie.c 1355)   // read header
BlinkenLib/BlinkenMovie.c 1356)   if (fread(header, 1, 24, pFile) != 24) {
BlinkenLib/BlinkenMovie.c 1357)     fclose(pFile);
Christian Heimke BlinkenLib v.0.1.1 (2005-01...

Christian Heimke authored 13 years ago

BlinkenMovie.c            1358)     return NULL;
BlinkenMovie.c            1359)   }
Stefan Schuermans format

Stefan Schuermans authored 1 year ago

src/BlinkenMovie.c        1360)   headerMagic = (unsigned long)header[0] << 24 |
src/BlinkenMovie.c        1361)                 (unsigned long)header[1] << 16 | (unsigned long)header[2] << 8 |
src/BlinkenMovie.c        1362)                 (unsigned long)header[3];
Christian Heimke BlinkenLib v.0.1.1 (2005-01...

Christian Heimke authored 13 years ago

BlinkenMovie.c            1363)   headerHeight = (unsigned short)header[4] << 8 | (unsigned short)header[5];
BlinkenMovie.c            1364)   headerWidth = (unsigned short)header[6] << 8 | (unsigned short)header[7];
BlinkenMovie.c            1365)   headerChannels = (unsigned short)header[8] << 8 | (unsigned short)header[9];
BlinkenMovie.c            1366)   headerMaxval = (unsigned short)header[10] << 8 | (unsigned short)header[11];
Stefan Schuermans format

Stefan Schuermans authored 1 year ago

src/BlinkenMovie.c        1367)   headerFramePtr = (unsigned long)header[20] << 24 |
src/BlinkenMovie.c        1368)                    (unsigned long)header[21] << 16 |
src/BlinkenMovie.c        1369)                    (unsigned long)header[22] << 8 | (unsigned long)header[23];
Stefan Schuermans changed indenting to be mor...

Stefan Schuermans authored 13 years ago

BlinkenLib/BlinkenMovie.c 1370)   // check magic
BlinkenLib/BlinkenMovie.c 1371)   if (headerMagic != 0x23542666) {
BlinkenLib/BlinkenMovie.c 1372)     fclose(pFile);
Christian Heimke BlinkenLib v.0.1.1 (2005-01...

Christian Heimke authored 13 years ago

BlinkenMovie.c            1373)     return NULL;
BlinkenMovie.c            1374)   }
Stefan Schuermans changed indenting to be mor...

Stefan Schuermans authored 13 years ago

BlinkenLib/BlinkenMovie.c 1375)   // allocate a new movie
BlinkenLib/BlinkenMovie.c 1376)   pMovie =
Stefan Schuermans format

Stefan Schuermans authored 1 year ago

src/BlinkenMovie.c        1377)       BlinkenMovieNew(headerHeight, headerWidth, headerChannels, headerMaxval);
Stefan Schuermans changed indenting to be mor...

Stefan Schuermans authored 13 years ago

BlinkenLib/BlinkenMovie.c 1378)   if (pMovie == NULL) {
BlinkenLib/BlinkenMovie.c 1379)     fclose(pFile);
Christian Heimke BlinkenLib v.0.1.1 (2005-01...

Christian Heimke authored 13 years ago

BlinkenMovie.c            1380)     return NULL;
BlinkenMovie.c            1381)   }
Stefan Schuermans changed indenting to be mor...

Stefan Schuermans authored 13 years ago

BlinkenLib/BlinkenMovie.c 1382)   // read subheaders
BlinkenLib/BlinkenMovie.c 1383)   while (ftell(pFile) + 6 <= (long)headerFramePtr) {
BlinkenLib/BlinkenMovie.c 1384)     if (fread(subHeader, 1, 6, pFile) != 6) {
BlinkenLib/BlinkenMovie.c 1385)       BlinkenMovieFree(pMovie);
BlinkenLib/BlinkenMovie.c 1386)       fclose(pFile);
Christian Heimke BlinkenLib v.0.1.1 (2005-01...

Christian Heimke authored 13 years ago

BlinkenMovie.c            1387)       return NULL;
BlinkenMovie.c            1388)     }
Stefan Schuermans changed indenting to be mor...

Stefan Schuermans authored 13 years ago

BlinkenLib/BlinkenMovie.c 1389)     subHeaderMagic =
Stefan Schuermans format

Stefan Schuermans authored 1 year ago

src/BlinkenMovie.c        1390)         (unsigned long)subHeader[0] << 24 | (unsigned long)subHeader[1] << 16 |
src/BlinkenMovie.c        1391)         (unsigned long)subHeader[2] << 8 | (unsigned long)subHeader[3];
Stefan Schuermans changed indenting to be mor...

Stefan Schuermans authored 13 years ago

BlinkenLib/BlinkenMovie.c 1392)     subHeaderSize =
BlinkenLib/BlinkenMovie.c 1393)         (unsigned short)subHeader[4] << 8 | (unsigned short)subHeader[5];
BlinkenLib/BlinkenMovie.c 1394) 
BlinkenLib/BlinkenMovie.c 1395)     // header fits into gap to frame start
Stefan Schuermans format

Stefan Schuermans authored 1 year ago

src/BlinkenMovie.c        1396)     if (subHeaderSize >= 6 &&
src/BlinkenMovie.c        1397)         ftell(pFile) + subHeaderSize - 6 <= (long)headerFramePtr) {
Stefan Schuermans changed indenting to be mor...

Stefan Schuermans authored 13 years ago

BlinkenLib/BlinkenMovie.c 1398)       // info header
BlinkenLib/BlinkenMovie.c 1399)       if (subHeaderMagic == 0x696E666F) // 'i' 'n' 'f' 'o'
Christian Heimke BlinkenLib v.0.1.1 (2005-01...

Christian Heimke authored 13 years ago

BlinkenMovie.c            1400)       {
Stefan Schuermans changed indenting to be mor...

Stefan Schuermans authored 13 years ago

BlinkenLib/BlinkenMovie.c 1401)         // read rest of info header
BlinkenLib/BlinkenMovie.c 1402)         pInfoHeader = (char *)malloc(subHeaderSize - 6);
BlinkenLib/BlinkenMovie.c 1403)         if (pInfoHeader == NULL) {
BlinkenLib/BlinkenMovie.c 1404)           BlinkenMovieFree(pMovie);
BlinkenLib/BlinkenMovie.c 1405)           fclose(pFile);
Christian Heimke BlinkenLib v.0.1.1 (2005-01...

Christian Heimke authored 13 years ago

BlinkenMovie.c            1406)           return NULL;
BlinkenMovie.c            1407)         }
Stefan Schuermans changed indenting to be mor...

Stefan Schuermans authored 13 years ago

BlinkenLib/BlinkenMovie.c 1408)         if (fread(pInfoHeader, 1, subHeaderSize - 6, pFile) !=
BlinkenLib/BlinkenMovie.c 1409)             (unsigned short)(subHeaderSize - 6)) {
BlinkenLib/BlinkenMovie.c 1410)           free(pInfoHeader);
BlinkenLib/BlinkenMovie.c 1411)           BlinkenMovieFree(pMovie);
BlinkenLib/BlinkenMovie.c 1412)           fclose(pFile);
Christian Heimke BlinkenLib v.0.1.1 (2005-01...

Christian Heimke authored 13 years ago

BlinkenMovie.c            1413)           return NULL;
BlinkenMovie.c            1414)         }
Stefan Schuermans changed indenting to be mor...

Stefan Schuermans authored 13 years ago

BlinkenLib/BlinkenMovie.c 1415)         // parse information
Stefan Schuermans format

Stefan Schuermans authored 1 year ago

src/BlinkenMovie.c        1416)         if ((pInfoHeaderX = memchr(pInfoHeader, 0, subHeaderSize - 6)) !=
src/BlinkenMovie.c        1417)             NULL) {
Christian Heimke BlinkenLib v.0.1.1 (2005-01...

Christian Heimke authored 13 years ago

BlinkenMovie.c            1418)           pInfoHeaderX++;
BlinkenMovie.c            1419)           len = pInfoHeaderX - pInfoHeader;
Stefan Schuermans changed indenting to be mor...

Stefan Schuermans authored 13 years ago

BlinkenLib/BlinkenMovie.c 1420)           if (memchr(pInfoHeaderX, 0, subHeaderSize - 6 - len) != NULL)
BlinkenLib/BlinkenMovie.c 1421)             BlinkenMovieAppendInfo(pMovie, pInfoHeader, pInfoHeaderX);
Christian Heimke BlinkenLib v.0.1.1 (2005-01...

Christian Heimke authored 13 years ago

BlinkenMovie.c            1422)         }
Stefan Schuermans changed indenting to be mor...

Stefan Schuermans authored 13 years ago

BlinkenLib/BlinkenMovie.c 1423)         free(pInfoHeader);
Christian Heimke BlinkenLib v.0.1.1 (2005-01...

Christian Heimke authored 13 years ago

BlinkenMovie.c            1424)       }
Stefan Schuermans changed indenting to be mor...

Stefan Schuermans authored 13 years ago

BlinkenLib/BlinkenMovie.c 1425)       // unknown subHeader
Christian Heimke BlinkenLib v.0.1.1 (2005-01...

Christian Heimke authored 13 years ago

BlinkenMovie.c            1426)       else
Stefan Schuermans changed indenting to be mor...

Stefan Schuermans authored 13 years ago

BlinkenLib/BlinkenMovie.c 1427)         // skip
BlinkenLib/BlinkenMovie.c 1428)         fseek(pFile, subHeaderSize - 6, SEEK_CUR);
Christian Heimke BlinkenLib v.0.1.1 (2005-01...

Christian Heimke authored 13 years ago

BlinkenMovie.c            1429) 
Stefan Schuermans format

Stefan Schuermans authored 1 year ago

src/BlinkenMovie.c        1430)     } // if( ftell( pFile ) ...
src/BlinkenMovie.c        1431)   }   // while( ftell( pFile ) ...
Christian Heimke BlinkenLib v.0.1.1 (2005-01...

Christian Heimke authored 13 years ago

BlinkenMovie.c            1432) 
Stefan Schuermans changed indenting to be mor...

Stefan Schuermans authored 13 years ago

BlinkenLib/BlinkenMovie.c 1433)   // seek to start of frames
BlinkenLib/BlinkenMovie.c 1434)   fseek(pFile, headerFramePtr, SEEK_SET);
Christian Heimke BlinkenLib v.0.1.1 (2005-01...

Christian Heimke authored 13 years ago

BlinkenMovie.c            1435) 
Stefan Schuermans changed indenting to be mor...

Stefan Schuermans authored 13 years ago

BlinkenLib/BlinkenMovie.c 1436)   // read frame start marker
BlinkenLib/BlinkenMovie.c 1437)   if (fread(frameStartMarker, 1, 4, pFile) != 4) {
BlinkenLib/BlinkenMovie.c 1438)     BlinkenMovieFree(pMovie);
BlinkenLib/BlinkenMovie.c 1439)     fclose(pFile);
Christian Heimke BlinkenLib v.0.1.1 (2005-01...

Christian Heimke authored 13 years ago

BlinkenMovie.c            1440)     return NULL;
BlinkenMovie.c            1441)   }
Stefan Schuermans format

Stefan Schuermans authored 1 year ago

src/BlinkenMovie.c        1442)   frameStartMarkerMagic = (unsigned long)frameStartMarker[0] << 24 |
src/BlinkenMovie.c        1443)                           (unsigned long)frameStartMarker[1] << 16 |
src/BlinkenMovie.c        1444)                           (unsigned long)frameStartMarker[2] << 8 |
src/BlinkenMovie.c        1445)                           (unsigned long)frameStartMarker[3];
src/BlinkenMovie.c        1446)   if (frameStartMarkerMagic != 0x66726D73) // 'f' 'r' 'm' 's'
Christian Heimke BlinkenLib v.0.1.1 (2005-01...

Christian Heimke authored 13 years ago

BlinkenMovie.c            1447)   {
Stefan Schuermans changed indenting to be mor...

Stefan Schuermans authored 13 years ago

BlinkenLib/BlinkenMovie.c 1448)     BlinkenMovieFree(pMovie);
BlinkenLib/BlinkenMovie.c 1449)     fclose(pFile);
Christian Heimke BlinkenLib v.0.1.1 (2005-01...

Christian Heimke authored 13 years ago

BlinkenMovie.c            1450)     return NULL;
BlinkenMovie.c            1451)   }
Stefan Schuermans changed indenting to be mor...

Stefan Schuermans authored 13 years ago

BlinkenLib/BlinkenMovie.c 1452)   // allocate buffer for frame data
Christian Heimke BlinkenLib v.0.1.1 (2005-01...

Christian Heimke authored 13 years ago

BlinkenMovie.c            1453)   len = 2 + headerHeight * headerWidth * headerChannels;
Stefan Schuermans changed indenting to be mor...

Stefan Schuermans authored 13 years ago

BlinkenLib/BlinkenMovie.c 1454)   pFrameData = (unsigned char *)malloc(len);
BlinkenLib/BlinkenMovie.c 1455)   if (pFrameData == NULL) {
BlinkenLib/BlinkenMovie.c 1456)     BlinkenMovieFree(pMovie);
BlinkenLib/BlinkenMovie.c 1457)     fclose(pFile);
Christian Heimke BlinkenLib v.0.1.1 (2005-01...

Christian Heimke authored 13 years ago

BlinkenMovie.c            1458)     return NULL;
BlinkenMovie.c            1459)   }
Stefan Schuermans changed indenting to be mor...

Stefan Schuermans authored 13 years ago

BlinkenLib/BlinkenMovie.c 1460)   // read frames
BlinkenLib/BlinkenMovie.c 1461)   for (;;) {
BlinkenLib/BlinkenMovie.c 1462)     // read frame
BlinkenLib/BlinkenMovie.c 1463)     if (fread(pFrameData, 1, len, pFile) != (unsigned int)len)
Christian Heimke BlinkenLib v.0.1.1 (2005-01...

Christian Heimke authored 13 years ago

BlinkenMovie.c            1464)       break;
Stefan Schuermans changed indenting to be mor...

Stefan Schuermans authored 13 years ago

BlinkenLib/BlinkenMovie.c 1465)     duration =
BlinkenLib/BlinkenMovie.c 1466)         (unsigned short)pFrameData[0] << 8 | (unsigned short)pFrameData[1];
BlinkenLib/BlinkenMovie.c 1467)     // build frame and append it to movie
Stefan Schuermans format

Stefan Schuermans authored 1 year ago

src/BlinkenMovie.c        1468)     pFrame = BlinkenFrameNew(headerHeight, headerWidth, headerChannels,
src/BlinkenMovie.c        1469)                              headerMaxval, duration);
Stefan Schuermans changed indenting to be mor...

Stefan Schuermans authored 13 years ago

BlinkenLib/BlinkenMovie.c 1470)     if (pFrame == NULL)
Christian Heimke BlinkenLib v.0.1.1 (2005-01...

Christian Heimke authored 13 years ago

BlinkenMovie.c            1471)       break;
BlinkenMovie.c            1472)     i = 2;
Stefan Schuermans changed indenting to be mor...

Stefan Schuermans authored 13 years ago

BlinkenLib/BlinkenMovie.c 1473)     for (y = 0; y < headerHeight; y++)
BlinkenLib/BlinkenMovie.c 1474)       for (x = 0; x < headerWidth; x++)
BlinkenLib/BlinkenMovie.c 1475)         for (c = 0; c < headerChannels; c++, i++)
BlinkenLib/BlinkenMovie.c 1476)           BlinkenFrameSetPixel(pFrame, y, x, c, pFrameData[i]);
BlinkenLib/BlinkenMovie.c 1477)     if (BlinkenMovieAppendFrame(pMovie, pFrame) != 0) {
BlinkenLib/BlinkenMovie.c 1478)       BlinkenFrameFree(pFrame);
Christian Heimke BlinkenLib v.0.3 (2005-02-16)

Christian Heimke authored 13 years ago

BlinkenMovie.c            1479)       pFrame = NULL;
BlinkenMovie.c            1480)     }
Christian Heimke BlinkenLib v.0.1.1 (2005-01...

Christian Heimke authored 13 years ago

BlinkenMovie.c            1481) 
Stefan Schuermans format

Stefan Schuermans authored 1 year ago

src/BlinkenMovie.c        1482)   } // for( ; ; )
Christian Heimke BlinkenLib v.0.1.1 (2005-01...

Christian Heimke authored 13 years ago

BlinkenMovie.c            1483) 
Stefan Schuermans changed indenting to be mor...

Stefan Schuermans authored 13 years ago

BlinkenLib/BlinkenMovie.c 1484)   // free buffer for frame data
BlinkenLib/BlinkenMovie.c 1485)   free(pFrameData);
Christian Heimke BlinkenLib v.0.1.1 (2005-01...

Christian Heimke authored 13 years ago

BlinkenMovie.c            1486) 
Stefan Schuermans changed indenting to be mor...

Stefan Schuermans authored 13 years ago

BlinkenLib/BlinkenMovie.c 1487)   // close file
BlinkenLib/BlinkenMovie.c 1488)   fclose(pFile);
Christian Heimke BlinkenLib v.0.1.1 (2005-01...

Christian Heimke authored 13 years ago

BlinkenMovie.c            1489) 
BlinkenMovie.c            1490)   return pMovie;
BlinkenMovie.c            1491) }
BlinkenMovie.c            1492) 
Christian Heimke BlinkenLib v.0.6.0 (2008-05...

Christian Heimke authored 13 years ago

BlinkenLib/BlinkenMovie.c 1493) #ifdef BLINKENLIB_CFG_MNG
BlinkenLib/BlinkenMovie.c 1494) 
Stefan Schuermans format

Stefan Schuermans authored 1 year ago

src/BlinkenMovie.c        1495) stBlinkenMovie *BlinkenMovieLoadMng(const char *pFilename) {
Stefan Schuermans changed indenting to be mor...

Stefan Schuermans authored 13 years ago

BlinkenLib/BlinkenMovie.c 1496)   return BlinkenMngLoad(pFilename);
Christian Heimke BlinkenLib v.0.6.0 (2008-05...

Christian Heimke authored 13 years ago

BlinkenLib/BlinkenMovie.c 1497) }
BlinkenLib/BlinkenMovie.c 1498) 
BlinkenLib/BlinkenMovie.c 1499) #endif // #ifdef BLINKENLIB_CFG_MNG
BlinkenLib/BlinkenMovie.c 1500) 
Stefan Schuermans implement reading GIFs

Stefan Schuermans authored 7 years ago

BlinkenLib/BlinkenMovie.c 1501) #ifdef BLINKENLIB_CFG_GIF
BlinkenLib/BlinkenMovie.c 1502) 
Stefan Schuermans format

Stefan Schuermans authored 1 year ago

src/BlinkenMovie.c        1503) stBlinkenMovie *BlinkenMovieLoadGif(const char *pFilename) {
Stefan Schuermans implement reading GIFs

Stefan Schuermans authored 7 years ago

BlinkenLib/BlinkenMovie.c 1504)   return BlinkenGifLoad(pFilename);
BlinkenLib/BlinkenMovie.c 1505) }
BlinkenLib/BlinkenMovie.c 1506) 
BlinkenLib/BlinkenMovie.c 1507) #endif // #ifdef BLINKENLIB_CFG_GIF
BlinkenLib/BlinkenMovie.c 1508) 
Stefan Schuermans format

Stefan Schuermans authored 1 year ago

src/BlinkenMovie.c        1509) stBlinkenMovie *BlinkenMovieLoad(const char *pFilename) {
Christian Heimke BlinkenLib v.0.1.1 (2005-01...

Christian Heimke authored 13 years ago

BlinkenMovie.c            1510)   int len;
BlinkenMovie.c            1511) 
Stefan Schuermans changed indenting to be mor...

Stefan Schuermans authored 13 years ago

BlinkenLib/BlinkenMovie.c 1512)   if (pFilename == NULL)
Christian Heimke BlinkenLib v.0.1.1 (2005-01...

Christian Heimke authored 13 years ago

BlinkenMovie.c            1513)     return NULL;
BlinkenMovie.c            1514) 
Stefan Schuermans changed indenting to be mor...

Stefan Schuermans authored 13 years ago

BlinkenLib/BlinkenMovie.c 1515)   len = strlen(pFilename);
BlinkenLib/BlinkenMovie.c 1516)   if (len > 4 && strcmp(pFilename + len - 4, ".blm") == 0)
BlinkenLib/BlinkenMovie.c 1517)     return BlinkenMovieLoadBlm(pFilename);
BlinkenLib/BlinkenMovie.c 1518)   if (len > 4 && strcmp(pFilename + len - 4, ".bmm") == 0)
BlinkenLib/BlinkenMovie.c 1519)     return BlinkenMovieLoadBmm(pFilename);
BlinkenLib/BlinkenMovie.c 1520)   if (len > 4 && strcmp(pFilename + len - 4, ".bml") == 0)
BlinkenLib/BlinkenMovie.c 1521)     return BlinkenMovieLoadBml(pFilename);
BlinkenLib/BlinkenMovie.c 1522)   if (len > 4 && strcmp(pFilename + len - 4, ".bbm") == 0)
BlinkenLib/BlinkenMovie.c 1523)     return BlinkenMovieLoadBbm(pFilename);
Christian Heimke BlinkenLib v.0.6.0 (2008-05...

Christian Heimke authored 13 years ago

BlinkenLib/BlinkenMovie.c 1524) #ifdef BLINKENLIB_CFG_MNG
Stefan Schuermans changed indenting to be mor...

Stefan Schuermans authored 13 years ago

BlinkenLib/BlinkenMovie.c 1525)   if (len > 4 && strcmp(pFilename + len - 4, ".mng") == 0)
BlinkenLib/BlinkenMovie.c 1526)     return BlinkenMovieLoadMng(pFilename);
Christian Heimke BlinkenLib v.0.6.0 (2008-05...

Christian Heimke authored 13 years ago

BlinkenLib/BlinkenMovie.c 1527) #endif // #ifdef BLINKENLIB_CFG_MNG
Stefan Schuermans implement reading GIFs

Stefan Schuermans authored 7 years ago

BlinkenLib/BlinkenMovie.c 1528) #ifdef BLINKENLIB_CFG_GIF
BlinkenLib/BlinkenMovie.c 1529)   if (len > 4 && strcmp(pFilename + len - 4, ".gif") == 0)
BlinkenLib/BlinkenMovie.c 1530)     return BlinkenMovieLoadGif(pFilename);
BlinkenLib/BlinkenMovie.c 1531) #endif // #ifdef BLINKENLIB_CFG_GIF
Christian Heimke BlinkenLib v.0.1.1 (2005-01...

Christian Heimke authored 13 years ago

BlinkenMovie.c            1532)   return NULL;
BlinkenMovie.c            1533) }
BlinkenMovie.c            1534) 
Stefan Schuermans format

Stefan Schuermans authored 1 year ago

src/BlinkenMovie.c        1535) int BlinkenMovieSaveBlm(stBlinkenMovie *pMovie, const char *pFilename) {
Stefan Schuermans changed indenting to be mor...

Stefan Schuermans authored 13 years ago

BlinkenLib/BlinkenMovie.c 1536)   stBlinkenMovie *pOutMovie;
BlinkenLib/BlinkenMovie.c 1537)   FILE *pFile;
Christian Heimke BlinkenLib v.0.1.1 (2005-01...

Christian Heimke authored 13 years ago

BlinkenMovie.c            1538)   int i, y, x;
BlinkenMovie.c            1539) 
Stefan Schuermans changed indenting to be mor...

Stefan Schuermans authored 13 years ago

BlinkenLib/BlinkenMovie.c 1540)   if (pMovie == NULL || pFilename == NULL)
Christian Heimke BlinkenLib v.0.1.1 (2005-01...

Christian Heimke authored 13 years ago

BlinkenMovie.c            1541)     return -1;
BlinkenMovie.c            1542) 
Stefan Schuermans changed indenting to be mor...

Stefan Schuermans authored 13 years ago

BlinkenLib/BlinkenMovie.c 1543)   // convert movie to suitable format
BlinkenLib/BlinkenMovie.c 1544)   pOutMovie = BlinkenMovieClone(pMovie);
BlinkenLib/BlinkenMovie.c 1545)   if (pOutMovie == NULL)
Christian Heimke BlinkenLib v.0.1.1 (2005-01...

Christian Heimke authored 13 years ago

BlinkenMovie.c            1546)     return -1;
Stefan Schuermans changed indenting to be mor...

Stefan Schuermans authored 13 years ago

BlinkenLib/BlinkenMovie.c 1547)   BlinkenMovieResize(pOutMovie, pOutMovie->height, pOutMovie->width, 1, 1);
Christian Heimke BlinkenLib v.0.1.1 (2005-01...

Christian Heimke authored 13 years ago

BlinkenMovie.c            1548) 
Stefan Schuermans changed indenting to be mor...

Stefan Schuermans authored 13 years ago

BlinkenLib/BlinkenMovie.c 1549)   // open file
BlinkenLib/BlinkenMovie.c 1550)   pFile = fopen(pFilename, "wt");
BlinkenLib/BlinkenMovie.c 1551)   if (pFile == NULL) {
BlinkenLib/BlinkenMovie.c 1552)     BlinkenMovieFree(pOutMovie);
Christian Heimke BlinkenLib v.0.1.1 (2005-01...

Christian Heimke authored 13 years ago

BlinkenMovie.c            1553)     return -1;
BlinkenMovie.c            1554)   }
Stefan Schuermans changed indenting to be mor...

Stefan Schuermans authored 13 years ago

BlinkenLib/BlinkenMovie.c 1555)   // write header line
BlinkenLib/BlinkenMovie.c 1556)   fprintf(pFile, "# BlinkenLights Movie %ux%u\n", pOutMovie->width,
BlinkenLib/BlinkenMovie.c 1557)           pOutMovie->height);
BlinkenLib/BlinkenMovie.c 1558) 
BlinkenLib/BlinkenMovie.c 1559)   // write information lines
BlinkenLib/BlinkenMovie.c 1560)   for (i = 0; i < pOutMovie->infoCnt; i++)
BlinkenLib/BlinkenMovie.c 1561)     fprintf(pFile, "# %s = %s\n", pOutMovie->pppInfos[i][0],
BlinkenLib/BlinkenMovie.c 1562)             pOutMovie->pppInfos[i][1]);
BlinkenLib/BlinkenMovie.c 1563) 
BlinkenLib/BlinkenMovie.c 1564)   // write frames
BlinkenLib/BlinkenMovie.c 1565)   for (i = 0; i < pOutMovie->frameCnt; i++) {
Stefan Schuermans format

Stefan Schuermans authored 1 year ago

src/BlinkenMovie.c        1566)     fprintf(pFile, "\n@%u\n", BlinkenFrameGetDuration(pOutMovie->ppFrames[i]));
Stefan Schuermans changed indenting to be mor...

Stefan Schuermans authored 13 years ago

BlinkenLib/BlinkenMovie.c 1567)     for (y = 0; y < pOutMovie->height; y++) {
BlinkenLib/BlinkenMovie.c 1568)       for (x = 0; x < pOutMovie->width; x++) {
BlinkenLib/BlinkenMovie.c 1569)         if (BlinkenFrameGetPixel(pOutMovie->ppFrames[i], y, x, 0) != 0)
BlinkenLib/BlinkenMovie.c 1570)           fprintf(pFile, "1");
Christian Heimke BlinkenLib v.0.1.1 (2005-01...

Christian Heimke authored 13 years ago

BlinkenMovie.c            1571)         else
Stefan Schuermans changed indenting to be mor...

Stefan Schuermans authored 13 years ago

BlinkenLib/BlinkenMovie.c 1572)           fprintf(pFile, "0");
Christian Heimke BlinkenLib v.0.1.1 (2005-01...

Christian Heimke authored 13 years ago

BlinkenMovie.c            1573)       }
Stefan Schuermans changed indenting to be mor...

Stefan Schuermans authored 13 years ago

BlinkenLib/BlinkenMovie.c 1574)       fprintf(pFile, "\n");
Christian Heimke BlinkenLib v.0.1.1 (2005-01...

Christian Heimke authored 13 years ago

BlinkenMovie.c            1575)     }
BlinkenMovie.c            1576)   }
BlinkenMovie.c            1577) 
Stefan Schuermans changed indenting to be mor...

Stefan Schuermans authored 13 years ago

BlinkenLib/BlinkenMovie.c 1578)   // close file
BlinkenLib/BlinkenMovie.c 1579)   fclose(pFile);
Christian Heimke BlinkenLib v.0.1.1 (2005-01...

Christian Heimke authored 13 years ago

BlinkenMovie.c            1580) 
Stefan Schuermans changed indenting to be mor...

Stefan Schuermans authored 13 years ago

BlinkenLib/BlinkenMovie.c 1581)   // free copied movie
BlinkenLib/BlinkenMovie.c 1582)   BlinkenMovieFree(pOutMovie);
Christian Heimke BlinkenLib v.0.1.1 (2005-01...

Christian Heimke authored 13 years ago

BlinkenMovie.c            1583) 
Stefan Schuermans changed indenting to be mor...

Stefan Schuermans authored 13 years ago

BlinkenLib/BlinkenMovie.c 1584)   // success
Christian Heimke BlinkenLib v.0.1.1 (2005-01...

Christian Heimke authored 13 years ago

BlinkenMovie.c            1585)   return 0;
BlinkenMovie.c            1586) }
BlinkenMovie.c            1587) 
Stefan Schuermans format

Stefan Schuermans authored 1 year ago

src/BlinkenMovie.c        1588) int BlinkenMovieSaveBmm(stBlinkenMovie *pMovie, const char *pFilename) {
Stefan Schuermans changed indenting to be mor...

Stefan Schuermans authored 13 years ago

BlinkenLib/BlinkenMovie.c 1589)   stBlinkenMovie *pOutMovie;
BlinkenLib/BlinkenMovie.c 1590)   FILE *pFile;
Christian Heimke BlinkenLib v.0.1.1 (2005-01...

Christian Heimke authored 13 years ago

BlinkenMovie.c            1591)   int i, y, x;
BlinkenMovie.c            1592) 
Stefan Schuermans changed indenting to be mor...

Stefan Schuermans authored 13 years ago

BlinkenLib/BlinkenMovie.c 1593)   if (pMovie == NULL || pFilename == NULL)
Christian Heimke BlinkenLib v.0.1.1 (2005-01...

Christian Heimke authored 13 years ago

BlinkenMovie.c            1594)     return -1;
BlinkenMovie.c            1595) 
Stefan Schuermans changed indenting to be mor...

Stefan Schuermans authored 13 years ago

BlinkenLib/BlinkenMovie.c 1596)   // convert movie to suitable format
BlinkenLib/BlinkenMovie.c 1597)   pOutMovie = BlinkenMovieClone(pMovie);
BlinkenLib/BlinkenMovie.c 1598)   if (pOutMovie == NULL)
Christian Heimke BlinkenLib v.0.1.1 (2005-01...

Christian Heimke authored 13 years ago

BlinkenMovie.c            1599)     return -1;
Stefan Schuermans changed indenting to be mor...

Stefan Schuermans authored 13 years ago

BlinkenLib/BlinkenMovie.c 1600)   BlinkenMovieResize(pOutMovie, pOutMovie->height, pOutMovie->width, 1, 255);
Christian Heimke BlinkenLib v.0.1.1 (2005-01...

Christian Heimke authored 13 years ago

BlinkenMovie.c            1601) 
Stefan Schuermans changed indenting to be mor...

Stefan Schuermans authored 13 years ago

BlinkenLib/BlinkenMovie.c 1602)   // open file
BlinkenLib/BlinkenMovie.c 1603)   pFile = fopen(pFilename, "wt");
BlinkenLib/BlinkenMovie.c 1604)   if (pFile == NULL) {
BlinkenLib/BlinkenMovie.c 1605)     BlinkenMovieFree(pOutMovie);
Christian Heimke BlinkenLib v.0.1.1 (2005-01...

Christian Heimke authored 13 years ago

BlinkenMovie.c            1606)     return -1;
BlinkenMovie.c            1607)   }
Stefan Schuermans changed indenting to be mor...

Stefan Schuermans authored 13 years ago

BlinkenLib/BlinkenMovie.c 1608)   // write header line
BlinkenLib/BlinkenMovie.c 1609)   fprintf(pFile, "# BlinkenMini Movie %ux%u\n", pOutMovie->width,
BlinkenLib/BlinkenMovie.c 1610)           pOutMovie->height);
BlinkenLib/BlinkenMovie.c 1611) 
BlinkenLib/BlinkenMovie.c 1612)   // write information lines
BlinkenLib/BlinkenMovie.c 1613)   for (i = 0; i < pOutMovie->infoCnt; i++)
BlinkenLib/BlinkenMovie.c 1614)     fprintf(pFile, "# %s = %s\n", pOutMovie->pppInfos[i][0],
BlinkenLib/BlinkenMovie.c 1615)             pOutMovie->pppInfos[i][1]);
BlinkenLib/BlinkenMovie.c 1616) 
BlinkenLib/BlinkenMovie.c 1617)   // write frames
BlinkenLib/BlinkenMovie.c 1618)   for (i = 0; i < pOutMovie->frameCnt; i++) {
Stefan Schuermans format

Stefan Schuermans authored 1 year ago

src/BlinkenMovie.c        1619)     fprintf(pFile, "\n@%u\n", BlinkenFrameGetDuration(pOutMovie->ppFrames[i]));
Stefan Schuermans changed indenting to be mor...

Stefan Schuermans authored 13 years ago

BlinkenLib/BlinkenMovie.c 1620)     for (y = 0; y < pOutMovie->height; y++) {
BlinkenLib/BlinkenMovie.c 1621)       fprintf(pFile, "0x%02X",
BlinkenLib/BlinkenMovie.c 1622)               BlinkenFrameGetPixel(pOutMovie->ppFrames[i], y, 0, 0));
BlinkenLib/BlinkenMovie.c 1623)       for (x = 1; x < pOutMovie->width; x++)
BlinkenLib/BlinkenMovie.c 1624)         fprintf(pFile, " 0x%02X",
BlinkenLib/BlinkenMovie.c 1625)                 BlinkenFrameGetPixel(pOutMovie->ppFrames[i], y, x, 0));
BlinkenLib/BlinkenMovie.c 1626)       fprintf(pFile, "\n");
Christian Heimke BlinkenLib v.0.1.1 (2005-01...

Christian Heimke authored 13 years ago

BlinkenMovie.c            1627)     }
BlinkenMovie.c            1628)   }
BlinkenMovie.c            1629) 
Stefan Schuermans changed indenting to be mor...

Stefan Schuermans authored 13 years ago

BlinkenLib/BlinkenMovie.c 1630)   // close file
BlinkenLib/BlinkenMovie.c 1631)   fclose(pFile);
Christian Heimke BlinkenLib v.0.1.1 (2005-01...

Christian Heimke authored 13 years ago

BlinkenMovie.c            1632) 
Stefan Schuermans changed indenting to be mor...

Stefan Schuermans authored 13 years ago

BlinkenLib/BlinkenMovie.c 1633)   // free copied movie
BlinkenLib/BlinkenMovie.c 1634)   BlinkenMovieFree(pOutMovie);
Christian Heimke BlinkenLib v.0.1.1 (2005-01...

Christian Heimke authored 13 years ago

BlinkenMovie.c            1635) 
Stefan Schuermans changed indenting to be mor...

Stefan Schuermans authored 13 years ago

BlinkenLib/BlinkenMovie.c 1636)   // success
Christian Heimke BlinkenLib v.0.1.1 (2005-01...

Christian Heimke authored 13 years ago

BlinkenMovie.c            1637)   return 0;
BlinkenMovie.c            1638) }
BlinkenMovie.c            1639) 
Stefan Schuermans format

Stefan Schuermans authored 1 year ago

src/BlinkenMovie.c        1640) int BlinkenMovieSaveBml(stBlinkenMovie *pMovie, const char *pFilename) {
Stefan Schuermans changed indenting to be mor...

Stefan Schuermans authored 13 years ago

BlinkenLib/BlinkenMovie.c 1641)   stBlinkenMovie *pOutMovie;
BlinkenLib/BlinkenMovie.c 1642)   FILE *pFile;
Christian Heimke BlinkenLib v.0.1.1 (2005-01...

Christian Heimke authored 13 years ago

BlinkenMovie.c            1643)   int bits, val, i, y, x, c;
BlinkenMovie.c            1644) 
Stefan Schuermans changed indenting to be mor...

Stefan Schuermans authored 13 years ago

BlinkenLib/BlinkenMovie.c 1645)   if (pMovie == NULL || pFilename == NULL)
Christian Heimke BlinkenLib v.0.1.1 (2005-01...

Christian Heimke authored 13 years ago

BlinkenMovie.c            1646)     return -1;
BlinkenMovie.c            1647) 
Stefan Schuermans changed indenting to be mor...

Stefan Schuermans authored 13 years ago

BlinkenLib/BlinkenMovie.c 1648)   // convert movie to suitable format
BlinkenLib/BlinkenMovie.c 1649)   pOutMovie = BlinkenMovieClone(pMovie);
BlinkenLib/BlinkenMovie.c 1650)   if (pOutMovie == NULL)
Christian Heimke BlinkenLib v.0.1.1 (2005-01...

Christian Heimke authored 13 years ago

BlinkenMovie.c            1651)     return -1;
Stefan Schuermans format

Stefan Schuermans authored 1 year ago

src/BlinkenMovie.c        1652)   val = pOutMovie->maxval; // get number of bits
src/BlinkenMovie.c        1653)   for (bits = 0; val != 0; val >>= 1, bits++)
src/BlinkenMovie.c        1654)     ;
Stefan Schuermans changed indenting to be mor...

Stefan Schuermans authored 13 years ago

BlinkenLib/BlinkenMovie.c 1655)   BlinkenMovieResize(pOutMovie, pOutMovie->height, pOutMovie->width,
BlinkenLib/BlinkenMovie.c 1656)                      pOutMovie->channels, (1 << bits) - 1);
BlinkenLib/BlinkenMovie.c 1657) 
BlinkenLib/BlinkenMovie.c 1658)   // open file
BlinkenLib/BlinkenMovie.c 1659)   pFile = fopen(pFilename, "wt");
BlinkenLib/BlinkenMovie.c 1660)   if (pFile == NULL) {
BlinkenLib/BlinkenMovie.c 1661)     BlinkenMovieFree(pOutMovie);
Christian Heimke BlinkenLib v.0.1.1 (2005-01...

Christian Heimke authored 13 years ago

BlinkenMovie.c            1662)     return -1;
BlinkenMovie.c            1663)   }
Stefan Schuermans changed indenting to be mor...

Stefan Schuermans authored 13 years ago

BlinkenLib/BlinkenMovie.c 1664)   // write header line
BlinkenLib/BlinkenMovie.c 1665)   fprintf(pFile, "<?xml version=\"1.0\" encoding=\"UTF-8\"?>\n");
BlinkenLib/BlinkenMovie.c 1666) 
BlinkenLib/BlinkenMovie.c 1667)   // write blm start tag
BlinkenLib/BlinkenMovie.c 1668)   fprintf(pFile,
BlinkenLib/BlinkenMovie.c 1669)           "<blm width=\"%u\" height=\"%u\" bits=\"%u\" channels=\"%u\">\n",
BlinkenLib/BlinkenMovie.c 1670)           pOutMovie->width, pOutMovie->height, bits, pOutMovie->channels);
BlinkenLib/BlinkenMovie.c 1671) 
BlinkenLib/BlinkenMovie.c 1672)   // write information lines
BlinkenLib/BlinkenMovie.c 1673)   fprintf(pFile, "\t<header>\n");
BlinkenLib/BlinkenMovie.c 1674)   for (i = 0; i < pOutMovie->infoCnt; i++) {
BlinkenLib/BlinkenMovie.c 1675)     if (strcmp(pOutMovie->pppInfos[i][0], "title") == 0)
BlinkenLib/BlinkenMovie.c 1676)       fprintf(pFile, "\t\t<title>%s</title>\n", pOutMovie->pppInfos[i][1]);
BlinkenLib/BlinkenMovie.c 1677)     else if (strcmp(pOutMovie->pppInfos[i][0], "description") == 0)
BlinkenLib/BlinkenMovie.c 1678)       fprintf(pFile, "\t\t<description>%s</description>\n",
BlinkenLib/BlinkenMovie.c 1679)               pOutMovie->pppInfos[i][1]);
BlinkenLib/BlinkenMovie.c 1680)     else if (strcmp(pOutMovie->pppInfos[i][0], "creator") == 0)
Stefan Schuermans format

Stefan Schuermans authored 1 year ago

src/BlinkenMovie.c        1681)       fprintf(pFile, "\t\t<creator>%s</creator>\n", pOutMovie->pppInfos[i][1]);
Stefan Schuermans changed indenting to be mor...

Stefan Schuermans authored 13 years ago

BlinkenLib/BlinkenMovie.c 1682)     else if (strcmp(pOutMovie->pppInfos[i][0], "author") == 0)
BlinkenLib/BlinkenMovie.c 1683)       fprintf(pFile, "\t\t<author>%s</author>\n", pOutMovie->pppInfos[i][1]);
BlinkenLib/BlinkenMovie.c 1684)     else if (strcmp(pOutMovie->pppInfos[i][0], "email") == 0)
BlinkenLib/BlinkenMovie.c 1685)       fprintf(pFile, "\t\t<email>%s</email>\n", pOutMovie->pppInfos[i][1]);
BlinkenLib/BlinkenMovie.c 1686)     else if (strcmp(pOutMovie->pppInfos[i][0], "url") == 0)
BlinkenLib/BlinkenMovie.c 1687)       fprintf(pFile, "\t\t<url>%s</url>\n", pOutMovie->pppInfos[i][1]);
Christian Heimke BlinkenLib v.0.1.1 (2005-01...

Christian Heimke authored 13 years ago

BlinkenMovie.c            1688)     else
Stefan Schuermans changed indenting to be mor...

Stefan Schuermans authored 13 years ago

BlinkenLib/BlinkenMovie.c 1689)       fprintf(pFile, "\t\t<description>%s: %s</description>\n",
BlinkenLib/BlinkenMovie.c 1690)               pOutMovie->pppInfos[i][0], pOutMovie->pppInfos[i][1]);
Christian Heimke BlinkenLib v.0.1.1 (2005-01...

Christian Heimke authored 13 years ago

BlinkenMovie.c            1691)   }
Stefan Schuermans changed indenting to be mor...

Stefan Schuermans authored 13 years ago

BlinkenLib/BlinkenMovie.c 1692)   fprintf(pFile, "\t</header>\n");
BlinkenLib/BlinkenMovie.c 1693) 
BlinkenLib/BlinkenMovie.c 1694)   // write frames
BlinkenLib/BlinkenMovie.c 1695)   for (i = 0; i < pOutMovie->frameCnt; i++) {
BlinkenLib/BlinkenMovie.c 1696)     fprintf(pFile, "\n\t<frame duration=\"%u\">\n",
BlinkenLib/BlinkenMovie.c 1697)             BlinkenFrameGetDuration(pOutMovie->ppFrames[i]));
BlinkenLib/BlinkenMovie.c 1698)     for (y = 0; y < pOutMovie->height; y++) {
BlinkenLib/BlinkenMovie.c 1699)       fprintf(pFile, "\t\t<row>");
BlinkenLib/BlinkenMovie.c 1700)       for (x = 0; x < pOutMovie->width; x++)
BlinkenLib/BlinkenMovie.c 1701)         for (c = 0; c < pOutMovie->channels; c++)
BlinkenLib/BlinkenMovie.c 1702)           fprintf(pFile, bits > 4 ? "%02X" : "%01X",
BlinkenLib/BlinkenMovie.c 1703)                   BlinkenFrameGetPixel(pOutMovie->ppFrames[i], y, x, c));
BlinkenLib/BlinkenMovie.c 1704)       fprintf(pFile, "</row>\n");
Christian Heimke BlinkenLib v.0.1.1 (2005-01...

Christian Heimke authored 13 years ago

BlinkenMovie.c            1705)     }
Stefan Schuermans changed indenting to be mor...

Stefan Schuermans authored 13 years ago

BlinkenLib/BlinkenMovie.c 1706)     fprintf(pFile, "\t</frame>\n");
Christian Heimke BlinkenLib v.0.1.1 (2005-01...

Christian Heimke authored 13 years ago

BlinkenMovie.c            1707)   }
BlinkenMovie.c            1708) 
Stefan Schuermans changed indenting to be mor...

Stefan Schuermans authored 13 years ago

BlinkenLib/BlinkenMovie.c 1709)   // write blm end tag
BlinkenLib/BlinkenMovie.c 1710)   fprintf(pFile, "</blm>\n");
Christian Heimke BlinkenLib v.0.1.1 (2005-01...

Christian Heimke authored 13 years ago

BlinkenMovie.c            1711) 
Stefan Schuermans changed indenting to be mor...

Stefan Schuermans authored 13 years ago

BlinkenLib/BlinkenMovie.c 1712)   // close file
BlinkenLib/BlinkenMovie.c 1713)   fclose(pFile);
Christian Heimke BlinkenLib v.0.1.1 (2005-01...

Christian Heimke authored 13 years ago

BlinkenMovie.c            1714) 
Stefan Schuermans changed indenting to be mor...

Stefan Schuermans authored 13 years ago

BlinkenLib/BlinkenMovie.c 1715)   // free copied movie
BlinkenLib/BlinkenMovie.c 1716)   BlinkenMovieFree(pOutMovie);
Christian Heimke BlinkenLib v.0.1.1 (2005-01...

Christian Heimke authored 13 years ago

BlinkenMovie.c            1717) 
Stefan Schuermans changed indenting to be mor...

Stefan Schuermans authored 13 years ago

BlinkenLib/BlinkenMovie.c 1718)   // success
Christian Heimke BlinkenLib v.0.1.1 (2005-01...

Christian Heimke authored 13 years ago

BlinkenMovie.c            1719)   return 0;
BlinkenMovie.c            1720) }
BlinkenMovie.c            1721) 
Stefan Schuermans format

Stefan Schuermans authored 1 year ago

src/BlinkenMovie.c        1722) int BlinkenMovieSaveBbm(stBlinkenMovie *pMovie, const char *pFilename) {
Stefan Schuermans changed indenting to be mor...

Stefan Schuermans authored 13 years ago

BlinkenLib/BlinkenMovie.c 1723)   unsigned char *pFrameData;
BlinkenLib/BlinkenMovie.c 1724)   FILE *pFile;
Stefan Schuermans format

Stefan Schuermans authored 1 year ago

src/BlinkenMovie.c        1725)   unsigned char header[24], infoHeader[6], framePointer[4], frameStartMarker[4];
Christian Heimke BlinkenLib v.0.1.1 (2005-01...

Christian Heimke authored 13 years ago

BlinkenMovie.c            1726)   int duration, len, len0, len1, i, j, y, x, c, val;
BlinkenMovie.c            1727)   long pos;
BlinkenMovie.c            1728) 
Stefan Schuermans changed indenting to be mor...

Stefan Schuermans authored 13 years ago

BlinkenLib/BlinkenMovie.c 1729)   if (pMovie == NULL || pFilename == NULL)
Christian Heimke BlinkenLib v.0.1.1 (2005-01...

Christian Heimke authored 13 years ago

BlinkenMovie.c            1730)     return -1;
BlinkenMovie.c            1731) 
Stefan Schuermans changed indenting to be mor...

Stefan Schuermans authored 13 years ago

BlinkenLib/BlinkenMovie.c 1732)   // allocate frame data buffer
Stefan Schuermans format

Stefan Schuermans authored 1 year ago

src/BlinkenMovie.c        1733)   pFrameData = (unsigned char *)malloc(2 + pMovie->height * pMovie->width *
src/BlinkenMovie.c        1734)                                                pMovie->channels);
Stefan Schuermans changed indenting to be mor...

Stefan Schuermans authored 13 years ago

BlinkenLib/BlinkenMovie.c 1735)   if (pFrameData == NULL)
Christian Heimke BlinkenLib v.0.1.1 (2005-01...

Christian Heimke authored 13 years ago

BlinkenMovie.c            1736)     return -1;
BlinkenMovie.c            1737) 
Stefan Schuermans changed indenting to be mor...

Stefan Schuermans authored 13 years ago

BlinkenLib/BlinkenMovie.c 1738)   // open file
BlinkenLib/BlinkenMovie.c 1739)   pFile = fopen(pFilename, "wb");
BlinkenLib/BlinkenMovie.c 1740)   if (pFile == NULL) {
BlinkenLib/BlinkenMovie.c 1741)     free(pFrameData);
Christian Heimke BlinkenLib v.0.1.1 (2005-01...

Christian Heimke authored 13 years ago

BlinkenMovie.c            1742)     return -1;
BlinkenMovie.c            1743)   }
Stefan Schuermans changed indenting to be mor...

Stefan Schuermans authored 13 years ago

BlinkenLib/BlinkenMovie.c 1744)   // write header
Stefan Schuermans format

Stefan Schuermans authored 1 year ago

src/BlinkenMovie.c        1745)   header[0] = 0x23; // magic
Christian Heimke BlinkenLib v.0.1.1 (2005-01...

Christian Heimke authored 13 years ago

BlinkenMovie.c            1746)   header[1] = 0x54;
BlinkenMovie.c            1747)   header[2] = 0x26;
BlinkenMovie.c            1748)   header[3] = 0x66;
BlinkenMovie.c            1749)   header[4] = (unsigned char)(pMovie->height >> 8);
BlinkenMovie.c            1750)   header[5] = (unsigned char)pMovie->height;
BlinkenMovie.c            1751)   header[6] = (unsigned char)(pMovie->width >> 8);
BlinkenMovie.c            1752)   header[7] = (unsigned char)pMovie->width;
BlinkenMovie.c            1753)   header[8] = (unsigned char)(pMovie->channels >> 8);
BlinkenMovie.c            1754)   header[9] = (unsigned char)pMovie->channels;
BlinkenMovie.c            1755)   header[10] = (unsigned char)(pMovie->maxval >> 8);
BlinkenMovie.c            1756)   header[11] = (unsigned char)pMovie->maxval;
BlinkenMovie.c            1757)   header[12] = (unsigned char)(pMovie->frameCnt >> 24);
BlinkenMovie.c            1758)   header[13] = (unsigned char)(pMovie->frameCnt >> 16);
BlinkenMovie.c            1759)   header[14] = (unsigned char)(pMovie->frameCnt >> 8);
BlinkenMovie.c            1760)   header[15] = (unsigned char)pMovie->frameCnt;
BlinkenMovie.c            1761)   duration = 0;
Stefan Schuermans changed indenting to be mor...

Stefan Schuermans authored 13 years ago

BlinkenLib/BlinkenMovie.c 1762)   for (i = 0; i < pMovie->frameCnt; i++)
BlinkenLib/BlinkenMovie.c 1763)     duration += BlinkenFrameGetDuration(pMovie->ppFrames[i]);
Christian Heimke BlinkenLib v.0.1.1 (2005-01...

Christian Heimke authored 13 years ago

BlinkenMovie.c            1764)   header[16] = (unsigned char)(duration >> 24);
BlinkenMovie.c            1765)   header[17] = (unsigned char)(duration >> 16);
BlinkenMovie.c            1766)   header[18] = (unsigned char)(duration >> 8);
BlinkenMovie.c            1767)   header[19] = (unsigned char)duration;
Stefan Schuermans format

Stefan Schuermans authored 1 year ago

src/BlinkenMovie.c        1768)   header[20] = 0; // frame pointer is written later
Christian Heimke BlinkenLib v.0.1.1 (2005-01...

Christian Heimke authored 13 years ago

BlinkenMovie.c            1769)   header[21] = 0;
BlinkenMovie.c            1770)   header[22] = 0;
BlinkenMovie.c            1771)   header[23] = 0;
Stefan Schuermans changed indenting to be mor...

Stefan Schuermans authored 13 years ago

BlinkenLib/BlinkenMovie.c 1772)   fwrite(header, 1, 24, pFile);
Christian Heimke BlinkenLib v.0.1.1 (2005-01...

Christian Heimke authored 13 years ago

BlinkenMovie.c            1773) 
Stefan Schuermans changed indenting to be mor...

Stefan Schuermans authored 13 years ago

BlinkenLib/BlinkenMovie.c 1774)   // write information
BlinkenLib/BlinkenMovie.c 1775)   for (i = 0; i < pMovie->infoCnt; i++) {
BlinkenLib/BlinkenMovie.c 1776)     len0 = strlen(pMovie->pppInfos[i][0]);
BlinkenLib/BlinkenMovie.c 1777)     if (len0 > 32760)
Christian Heimke BlinkenLib v.0.1.1 (2005-01...

Christian Heimke authored 13 years ago

BlinkenMovie.c            1778)       len0 = 32760;
Stefan Schuermans changed indenting to be mor...

Stefan Schuermans authored 13 years ago

BlinkenLib/BlinkenMovie.c 1779)     len1 = strlen(pMovie->pppInfos[i][1]);
BlinkenLib/BlinkenMovie.c 1780)     if (len1 > 32760)
Christian Heimke BlinkenLib v.0.1.1 (2005-01...

Christian Heimke authored 13 years ago

BlinkenMovie.c            1781)       len1 = 32760;
BlinkenMovie.c            1782)     len = 8 + len0 + len1;
Stefan Schuermans format

Stefan Schuermans authored 1 year ago

src/BlinkenMovie.c        1783)     infoHeader[0] = 0x69; // 'i'
src/BlinkenMovie.c        1784)     infoHeader[1] = 0x6E; // 'n'
src/BlinkenMovie.c        1785)     infoHeader[2] = 0x66; // 'f'
src/BlinkenMovie.c        1786)     infoHeader[3] = 0x6F; // 'o'
Christian Heimke BlinkenLib v.0.1.1 (2005-01...

Christian Heimke authored 13 years ago

BlinkenMovie.c            1787)     infoHeader[4] = (unsigned char)(len >> 8);
BlinkenMovie.c            1788)     infoHeader[5] = (unsigned char)len;
Stefan Schuermans changed indenting to be mor...

Stefan Schuermans authored 13 years ago

BlinkenLib/BlinkenMovie.c 1789)     fwrite(infoHeader, 1, 6, pFile);
BlinkenLib/BlinkenMovie.c 1790)     fwrite(pMovie->pppInfos[i][0], 1, len0, pFile);
BlinkenLib/BlinkenMovie.c 1791)     fwrite("\0", 1, 1, pFile);
BlinkenLib/BlinkenMovie.c 1792)     fwrite(pMovie->pppInfos[i][1], 1, len1, pFile);
BlinkenLib/BlinkenMovie.c 1793)     fwrite("\0", 1, 1, pFile);
Christian Heimke BlinkenLib v.0.1.1 (2005-01...

Christian Heimke authored 13 years ago

BlinkenMovie.c            1794)   }
BlinkenMovie.c            1795) 
Stefan Schuermans changed indenting to be mor...

Stefan Schuermans authored 13 years ago

BlinkenLib/BlinkenMovie.c 1796)   // write frame pointer
BlinkenLib/BlinkenMovie.c 1797)   pos = ftell(pFile);
Christian Heimke BlinkenLib v.0.1.1 (2005-01...

Christian Heimke authored 13 years ago

BlinkenMovie.c            1798)   framePointer[0] = (unsigned char)(pos >> 24);
BlinkenMovie.c            1799)   framePointer[1] = (unsigned char)(pos >> 16);
BlinkenMovie.c            1800)   framePointer[2] = (unsigned char)(pos >> 8);
BlinkenMovie.c            1801)   framePointer[3] = (unsigned char)pos;
Stefan Schuermans changed indenting to be mor...

Stefan Schuermans authored 13 years ago

BlinkenLib/BlinkenMovie.c 1802)   fseek(pFile, 20, SEEK_SET);
BlinkenLib/BlinkenMovie.c 1803)   fwrite(framePointer, 1, 4, pFile);
BlinkenLib/BlinkenMovie.c 1804)   fseek(pFile, pos, SEEK_SET);
BlinkenLib/BlinkenMovie.c 1805) 
BlinkenLib/BlinkenMovie.c 1806)   // write frame start marker
Stefan Schuermans format

Stefan Schuermans authored 1 year ago

src/BlinkenMovie.c        1807)   frameStartMarker[0] = 0x66; // 'f'
src/BlinkenMovie.c        1808)   frameStartMarker[1] = 0x72; // 'r'
src/BlinkenMovie.c        1809)   frameStartMarker[2] = 0x6D; // 'm'
src/BlinkenMovie.c        1810)   frameStartMarker[3] = 0x73; // 's'
Stefan Schuermans changed indenting to be mor...

Stefan Schuermans authored 13 years ago

BlinkenLib/BlinkenMovie.c 1811)   fwrite(frameStartMarker, 1, 4, pFile);
BlinkenLib/BlinkenMovie.c 1812) 
BlinkenLib/BlinkenMovie.c 1813)   // write frames
BlinkenLib/BlinkenMovie.c 1814)   for (i = 0; i < pMovie->frameCnt; i++) {
BlinkenLib/BlinkenMovie.c 1815)     val = BlinkenFrameGetDuration(pMovie->ppFrames[i]);
Christian Heimke BlinkenLib v.0.1.1 (2005-01...

Christian Heimke authored 13 years ago

BlinkenMovie.c            1816)     pFrameData[0] = (unsigned char)(val >> 8);
BlinkenMovie.c            1817)     pFrameData[1] = (unsigned char)val;
Stefan Schuermans changed indenting to be mor...

Stefan Schuermans authored 13 years ago

BlinkenLib/BlinkenMovie.c 1818)     for (j = 2, y = 0; y < pMovie->height; y++)
BlinkenLib/BlinkenMovie.c 1819)       for (x = 0; x < pMovie->width; x++)
BlinkenLib/BlinkenMovie.c 1820)         for (c = 0; c < pMovie->channels; c++, j++)
BlinkenLib/BlinkenMovie.c 1821)           pFrameData[j] = BlinkenFrameGetPixel(pMovie->ppFrames[i], y, x, c);
BlinkenLib/BlinkenMovie.c 1822)     fwrite(pFrameData, 1, j, pFile);
Christian Heimke BlinkenLib v.0.1.1 (2005-01...

Christian Heimke authored 13 years ago

BlinkenMovie.c            1823)   }
BlinkenMovie.c            1824) 
Stefan Schuermans changed indenting to be mor...

Stefan Schuermans authored 13 years ago

BlinkenLib/BlinkenMovie.c 1825)   // free frame data buffer
BlinkenLib/BlinkenMovie.c 1826)   free(pFrameData);
Christian Heimke BlinkenLib v.0.1.1 (2005-01...

Christian Heimke authored 13 years ago

BlinkenMovie.c            1827) 
Stefan Schuermans changed indenting to be mor...

Stefan Schuermans authored 13 years ago

BlinkenLib/BlinkenMovie.c 1828)   // close file
BlinkenLib/BlinkenMovie.c 1829)   fclose(pFile);
Christian Heimke BlinkenLib v.0.1.1 (2005-01...

Christian Heimke authored 13 years ago

BlinkenMovie.c            1830) 
Stefan Schuermans changed indenting to be mor...

Stefan Schuermans authored 13 years ago

BlinkenLib/BlinkenMovie.c 1831)   // success
Christian Heimke BlinkenLib v.0.1.1 (2005-01...

Christian Heimke authored 13 years ago

BlinkenMovie.c            1832)   return 0;
BlinkenMovie.c            1833) }
BlinkenMovie.c            1834) 
Christian Heimke BlinkenLib v.0.6.0 (2008-05...

Christian Heimke authored 13 years ago

BlinkenLib/BlinkenMovie.c 1835) #ifdef BLINKENLIB_CFG_MNG
BlinkenLib/BlinkenMovie.c 1836) 
Stefan Schuermans format

Stefan Schuermans authored 1 year ago

src/BlinkenMovie.c        1837) int BlinkenMovieSaveMng(stBlinkenMovie *pMovie, const char *pFilename) {
Stefan Schuermans changed indenting to be mor...

Stefan Schuermans authored 13 years ago

BlinkenLib/BlinkenMovie.c 1838)   return BlinkenMngSave(pMovie, pFilename);
Christian Heimke BlinkenLib v.0.6.0 (2008-05...

Christian Heimke authored 13 years ago

BlinkenLib/BlinkenMovie.c 1839) }
BlinkenLib/BlinkenMovie.c 1840) 
BlinkenLib/BlinkenMovie.c 1841) #endif // #ifdef BLINKENLIB_CFG_MNG
BlinkenLib/BlinkenMovie.c 1842) 
Stefan Schuermans implement writing GIFs

Stefan Schuermans authored 7 years ago

BlinkenLib/BlinkenMovie.c 1843) #ifdef BLINKENLIB_CFG_GIF
BlinkenLib/BlinkenMovie.c 1844) 
Stefan Schuermans format

Stefan Schuermans authored 1 year ago

src/BlinkenMovie.c        1845) int BlinkenMovieSaveGif(stBlinkenMovie *pMovie, const char *pFilename) {
Stefan Schuermans implement writing GIFs

Stefan Schuermans authored 7 years ago

BlinkenLib/BlinkenMovie.c 1846)   return BlinkenGifSave(pMovie, pFilename);
BlinkenLib/BlinkenMovie.c 1847) }
BlinkenLib/BlinkenMovie.c 1848) 
BlinkenLib/BlinkenMovie.c 1849) #endif // #ifdef BLINKENLIB_CFG_GIF
BlinkenLib/BlinkenMovie.c 1850) 
Stefan Schuermans format

Stefan Schuermans authored 1 year ago

src/BlinkenMovie.c        1851) int BlinkenMovieSave(stBlinkenMovie *pMovie, const char *pFilename) {
Christian Heimke BlinkenLib v.0.1.1 (2005-01...

Christian Heimke authored 13 years ago

BlinkenMovie.c            1852)   int len;
BlinkenMovie.c            1853) 
Stefan Schuermans changed indenting to be mor...

Stefan Schuermans authored 13 years ago

BlinkenLib/BlinkenMovie.c 1854)   if (pMovie == NULL || pFilename == NULL)
Christian Heimke BlinkenLib v.0.1.1 (2005-01...

Christian Heimke authored 13 years ago

BlinkenMovie.c            1855)     return -1;
BlinkenMovie.c            1856) 
Stefan Schuermans changed indenting to be mor...

Stefan Schuermans authored 13 years ago

BlinkenLib/BlinkenMovie.c 1857)   len = strlen(pFilename);
BlinkenLib/BlinkenMovie.c 1858)   if (len > 4 && strcmp(pFilename + len - 4, ".blm") == 0)
BlinkenLib/BlinkenMovie.c 1859)     return BlinkenMovieSaveBlm(pMovie, pFilename);
BlinkenLib/BlinkenMovie.c 1860)   if (len > 4 && strcmp(pFilename + len - 4, ".bmm") == 0)
BlinkenLib/BlinkenMovie.c 1861)     return BlinkenMovieSaveBmm(pMovie, pFilename);
BlinkenLib/BlinkenMovie.c 1862)   if (len > 4 && strcmp(pFilename + len - 4, ".bml") == 0)
BlinkenLib/BlinkenMovie.c 1863)     return BlinkenMovieSaveBml(pMovie, pFilename);
BlinkenLib/BlinkenMovie.c 1864)   if (len > 4 && strcmp(pFilename + len - 4, ".bbm") == 0)
BlinkenLib/BlinkenMovie.c 1865)     return BlinkenMovieSaveBbm(pMovie, pFilename);
Christian Heimke BlinkenLib v.0.6.0 (2008-05...

Christian Heimke authored 13 years ago

BlinkenLib/BlinkenMovie.c 1866) #ifdef BLINKENLIB_CFG_MNG
Stefan Schuermans changed indenting to be mor...

Stefan Schuermans authored 13 years ago

BlinkenLib/BlinkenMovie.c 1867)   if (len > 4 && strcmp(pFilename + len - 4, ".mng") == 0)
BlinkenLib/BlinkenMovie.c 1868)     return BlinkenMovieSaveMng(pMovie, pFilename);
Christian Heimke BlinkenLib v.0.6.0 (2008-05...

Christian Heimke authored 13 years ago

BlinkenLib/BlinkenMovie.c 1869) #endif // #ifdef BLINKENLIB_CFG_MNG
Stefan Schuermans implement writing GIFs

Stefan Schuermans authored 7 years ago

BlinkenLib/BlinkenMovie.c 1870) #ifdef BLINKENLIB_CFG_GIF
BlinkenLib/BlinkenMovie.c 1871)   if (len > 4 && strcmp(pFilename + len - 4, ".gif") == 0)
BlinkenLib/BlinkenMovie.c 1872)     return BlinkenMovieSaveGif(pMovie, pFilename);
BlinkenLib/BlinkenMovie.c 1873) #endif // #ifdef BLINKENLIB_CFG_GIF
Christian Heimke BlinkenLib v.0.1.1 (2005-01...

Christian Heimke authored 13 years ago

BlinkenMovie.c            1874)   return -1;
BlinkenMovie.c            1875) }
BlinkenMovie.c            1876) 
Stefan Schuermans changed indenting to be mor...

Stefan Schuermans authored 13 years ago

BlinkenLib/BlinkenMovie.c 1877) void BlinkenMovieSend(stBlinkenMovie *pMovie, SOCKET udpSocket,
Stefan Schuermans changed indenting to be mor...

Stefan Schuermans authored 13 years ago

BlinkenLib/BlinkenMovie.c 1878)                       etBlinkenProto proto, int maxidle)
BlinkenLib/BlinkenMovie.c 1879) // udp socket must be "connected"
BlinkenLib/BlinkenMovie.c 1880) // maxidle is the maximum idle time between two frames in ms (last frame is
BlinkenLib/BlinkenMovie.c 1881) // repeated after this time), use 0 to turn off this feature
Christian Heimke BlinkenLib v.0.3 (2005-02-16)

Christian Heimke authored 13 years ago

BlinkenMovie.c            1882) {
Christian Heimke BlinkenLib v.0.5.4 (2008-01...

Christian Heimke authored 13 years ago

BlinkenMovie.c            1883)   int i, len, duration, dur;
Stefan Schuermans format

Stefan Schuermans authored 1 year ago

src/BlinkenMovie.c        1884)   char buffer[65536]; // 64kB is more than maximum UDP size
Stefan Schuermans changed indenting to be mor...

Stefan Schuermans authored 13 years ago

BlinkenLib/BlinkenMovie.c 1885) 
BlinkenLib/BlinkenMovie.c 1886)   for (i = 0; i < pMovie->frameCnt; i++) {
Stefan Schuermans format

Stefan Schuermans authored 1 year ago

src/BlinkenMovie.c        1887)     len = BlinkenFrameToNetwork(pMovie->ppFrames[i], proto, buffer,
src/BlinkenMovie.c        1888)                                 sizeof(buffer));
Stefan Schuermans changed indenting to be mor...

Stefan Schuermans authored 13 years ago

BlinkenLib/BlinkenMovie.c 1889)     duration = BlinkenFrameGetDuration(pMovie->ppFrames[i]);
BlinkenLib/BlinkenMovie.c 1890)     if (len > 0) {
BlinkenLib/BlinkenMovie.c 1891)       while (duration > 0) {
BlinkenLib/BlinkenMovie.c 1892)         send(udpSocket, buffer, len, 0);
BlinkenLib/BlinkenMovie.c 1893)         dur = maxidle > 0 ? mini(maxidle, duration) : duration;
Stefan Schuermans move msleep and get_ms to t...

Stefan Schuermans authored 1 year ago

src/BlinkenMovie.c        1894)         BlinkenMSleep(dur);
Stefan Schuermans changed indenting to be mor...

Stefan Schuermans authored 13 years ago

BlinkenLib/BlinkenMovie.c 1895)         duration -= dur;
Christian Heimke BlinkenLib v.0.5.4 (2008-01...

Christian Heimke authored 13 years ago

BlinkenMovie.c            1896)       }
BlinkenMovie.c            1897)     }
Christian Heimke BlinkenLib v.0.3 (2005-02-16)

Christian Heimke authored 13 years ago

BlinkenMovie.c            1898)   }
BlinkenMovie.c            1899) }
BlinkenMovie.c            1900) 
Stefan Schuermans changed indenting to be mor...

Stefan Schuermans authored 13 years ago

BlinkenLib/BlinkenMovie.c 1901) stBlinkenMovie *BlinkenMovieReceive(SOCKET udpSocket, int timeout,
Stefan Schuermans format

Stefan Schuermans authored 1 year ago

src/BlinkenMovie.c        1902)                                     etBlinkenProto *pProto)
Stefan Schuermans changed indenting to be mor...

Stefan Schuermans authored 13 years ago

BlinkenLib/BlinkenMovie.c 1903) // udp socket must be "bound" and should be "connected"
BlinkenLib/BlinkenMovie.c 1904) // after timeout ms of no reception, the movie is considered to be complete
BlinkenLib/BlinkenMovie.c 1905) // returns protocol in *pProto if pProto not NULL
Christian Heimke BlinkenLib v.0.3 (2005-02-16)

Christian Heimke authored 13 years ago

BlinkenMovie.c            1906) {
Stefan Schuermans changed indenting to be mor...

Stefan Schuermans authored 13 years ago

BlinkenLib/BlinkenMovie.c 1907)   stBlinkenMovie *pMovie;
BlinkenLib/BlinkenMovie.c 1908)   stBlinkenFrame *pLastFrame, *pFrame;
Christian Heimke BlinkenLib v.0.3 (2005-02-16)

Christian Heimke authored 13 years ago

BlinkenMovie.c            1909)   etBlinkenProto proto, p;
BlinkenMovie.c            1910)   fd_set readFds;
Christian Heimke BlinkenLib v.0.5.2 (2006-05...

Christian Heimke authored 13 years ago

BlinkenMovie.c            1911)   struct timeval timeo;
BlinkenMovie.c            1912)   unsigned int lastTime, curTime;
Stefan Schuermans format

Stefan Schuermans authored 1 year ago

src/BlinkenMovie.c        1913)   char buffer[65536]; // 64kB is more than maximum UDP size
Christian Heimke BlinkenLib v.0.3 (2005-02-16)

Christian Heimke authored 13 years ago

BlinkenMovie.c            1914)   int len;
BlinkenMovie.c            1915) 
Stefan Schuermans changed indenting to be mor...

Stefan Schuermans authored 13 years ago

BlinkenLib/BlinkenMovie.c 1916)   // correct timeout
BlinkenLib/BlinkenMovie.c 1917)   if (timeout < 0)
Christian Heimke BlinkenLib v.0.3 (2005-02-16)

Christian Heimke authored 13 years ago

BlinkenMovie.c            1918)     timeout = 0;
BlinkenMovie.c            1919) 
Stefan Schuermans changed indenting to be mor...

Stefan Schuermans authored 13 years ago

BlinkenLib/BlinkenMovie.c 1920)   // wait for frames
Christian Heimke BlinkenLib v.0.3 (2005-02-16)

Christian Heimke authored 13 years ago

BlinkenMovie.c            1921)   pMovie = NULL;
BlinkenMovie.c            1922)   proto = BlinkenProtoNone;
BlinkenMovie.c            1923)   pLastFrame = NULL;
Stefan Schuermans move msleep and get_ms to t...

Stefan Schuermans authored 1 year ago

src/BlinkenMovie.c        1924)   lastTime = BlinkenGetMs();
Stefan Schuermans changed indenting to be mor...

Stefan Schuermans authored 13 years ago

BlinkenLib/BlinkenMovie.c 1925)   for (;;) {
BlinkenLib/BlinkenMovie.c 1926)     // wait for next frame
BlinkenLib/BlinkenMovie.c 1927)     FD_ZERO(&readFds);
BlinkenLib/BlinkenMovie.c 1928)     FD_SET(udpSocket, &readFds);
Christian Heimke BlinkenLib v.0.3 (2005-02-16)

Christian Heimke authored 13 years ago

BlinkenMovie.c            1929)     timeo.tv_sec = timeout / 1000;
BlinkenMovie.c            1930)     timeo.tv_usec = (timeout % 1000) * 1000;
Stefan Schuermans adaptions for usage in C++

Stefan Schuermans authored 13 years ago

BlinkenLib/BlinkenMovie.c 1931)     // timeout or error
BlinkenLib/BlinkenMovie.c 1932)     if (select(udpSocket + 1, &readFds, NULL, NULL, &timeo) <= 0)
Christian Heimke BlinkenLib v.0.3 (2005-02-16)

Christian Heimke authored 13 years ago

BlinkenMovie.c            1933)       break;
BlinkenMovie.c            1934) 
Stefan Schuermans changed indenting to be mor...

Stefan Schuermans authored 13 years ago

BlinkenLib/BlinkenMovie.c 1935)     // fetch data
BlinkenLib/BlinkenMovie.c 1936)     len = recv(udpSocket, buffer, sizeof(buffer), 0);
BlinkenLib/BlinkenMovie.c 1937)     if (len <= 0)
Christian Heimke BlinkenLib v.0.3 (2005-02-16)

Christian Heimke authored 13 years ago

BlinkenMovie.c            1938)       break;
BlinkenMovie.c            1939) 
Stefan Schuermans changed indenting to be mor...

Stefan Schuermans authored 13 years ago

BlinkenLib/BlinkenMovie.c 1940)     // get frame from data
BlinkenLib/BlinkenMovie.c 1941)     pFrame = BlinkenFrameFromNetwork(buffer, len, &p);
BlinkenLib/BlinkenMovie.c 1942)     if (pFrame != NULL) {
BlinkenLib/BlinkenMovie.c 1943)       // valid protocol
BlinkenLib/BlinkenMovie.c 1944)       if (p != BlinkenProtoNone) {
BlinkenLib/BlinkenMovie.c 1945)         // first frame
BlinkenLib/BlinkenMovie.c 1946)         if (proto == BlinkenProtoNone)
Stefan Schuermans format

Stefan Schuermans authored 1 year ago

src/BlinkenMovie.c        1947)           proto = p; // use this protocol
Stefan Schuermans changed indenting to be mor...

Stefan Schuermans authored 13 years ago

BlinkenLib/BlinkenMovie.c 1948)         // protocol matches
BlinkenLib/BlinkenMovie.c 1949)         if (p == proto) {
BlinkenLib/BlinkenMovie.c 1950)           // no movie yet
BlinkenLib/BlinkenMovie.c 1951)           if (pMovie == NULL) {
BlinkenLib/BlinkenMovie.c 1952)             // allocate a new movie
Stefan Schuermans format

Stefan Schuermans authored 1 year ago

src/BlinkenMovie.c        1953)             pMovie = BlinkenMovieNew(
src/BlinkenMovie.c        1954)                 BlinkenFrameGetHeight(pFrame), BlinkenFrameGetWidth(pFrame),
src/BlinkenMovie.c        1955)                 BlinkenFrameGetChannels(pFrame), BlinkenFrameGetMaxval(pFrame));
Stefan Schuermans changed indenting to be mor...

Stefan Schuermans authored 13 years ago

BlinkenLib/BlinkenMovie.c 1956)             if (pMovie == NULL) {
BlinkenLib/BlinkenMovie.c 1957)               BlinkenFrameFree(pFrame);
Christian Heimke BlinkenLib v.0.3 (2005-02-16)

Christian Heimke authored 13 years ago

BlinkenMovie.c            1958)               break;
BlinkenMovie.c            1959)             }
BlinkenMovie.c            1960)           }
Stefan Schuermans changed indenting to be mor...

Stefan Schuermans authored 13 years ago

BlinkenLib/BlinkenMovie.c 1961)           // ignore frame if it is equal to last one
BlinkenLib/BlinkenMovie.c 1962)           if (pMovie->frameCnt > 0) {
Stefan Schuermans format

Stefan Schuermans authored 1 year ago

src/BlinkenMovie.c        1963)             if (BlinkenFrameCompare(
src/BlinkenMovie.c        1964)                     pFrame, pMovie->ppFrames[pMovie->frameCnt - 1]) == 0) {
Stefan Schuermans changed indenting to be mor...

Stefan Schuermans authored 13 years ago

BlinkenLib/BlinkenMovie.c 1965)               BlinkenFrameFree(pFrame);
Christian Heimke BlinkenLib v.0.5.4 (2008-01...

Christian Heimke authored 13 years ago

BlinkenMovie.c            1966)               continue;
BlinkenMovie.c            1967)             }
BlinkenMovie.c            1968)           }
Stefan Schuermans changed indenting to be mor...

Stefan Schuermans authored 13 years ago

BlinkenLib/BlinkenMovie.c 1969)           // append frame to movie
BlinkenLib/BlinkenMovie.c 1970)           if (BlinkenMovieAppendFrame(pMovie, pFrame) == 0) {
BlinkenLib/BlinkenMovie.c 1971)             // get current time
Stefan Schuermans move msleep and get_ms to t...

Stefan Schuermans authored 1 year ago

src/BlinkenMovie.c        1972)             curTime = BlinkenGetMs();
Stefan Schuermans changed indenting to be mor...

Stefan Schuermans authored 13 years ago

BlinkenLib/BlinkenMovie.c 1973)             // set duration of last frame
BlinkenLib/BlinkenMovie.c 1974)             if (pLastFrame != NULL)
BlinkenLib/BlinkenMovie.c 1975)               BlinkenFrameSetDuration(pLastFrame, curTime - lastTime);
BlinkenLib/BlinkenMovie.c 1976)             // remember this frame as last frame appended to movie
Christian Heimke BlinkenLib v.0.3 (2005-02-16)

Christian Heimke authored 13 years ago

BlinkenMovie.c            1977)             pLastFrame = pFrame;
Stefan Schuermans changed indenting to be mor...

Stefan Schuermans authored 13 years ago

BlinkenLib/BlinkenMovie.c 1978)             pFrame = NULL;      // do not free this frame (it was appended)
BlinkenLib/BlinkenMovie.c 1979)             lastTime = curTime; // remember time of this frame
Christian Heimke BlinkenLib v.0.3 (2005-02-16)

Christian Heimke authored 13 years ago

BlinkenMovie.c            1980)           }
Stefan Schuermans make MSleep and GetMS publi...

Stefan Schuermans authored 1 year ago

src/BlinkenMovie.c        1981)         } // if( p == proto )
src/BlinkenMovie.c        1982)       }   // if( p != BlinkenProtoNone )
Stefan Schuermans changed indenting to be mor...

Stefan Schuermans authored 13 years ago

BlinkenLib/BlinkenMovie.c 1983)       // free frame if it was not appended
BlinkenLib/BlinkenMovie.c 1984)       if (pFrame != NULL)
BlinkenLib/BlinkenMovie.c 1985)         BlinkenFrameFree(pFrame);
Stefan Schuermans format

Stefan Schuermans authored 1 year ago

src/BlinkenMovie.c        1986)     } // if( pFrame != NULL )
src/BlinkenMovie.c        1987)   }   // for( ; ; )
Stefan Schuermans changed indenting to be mor...

Stefan Schuermans authored 13 years ago

BlinkenLib/BlinkenMovie.c 1988) 
BlinkenLib/BlinkenMovie.c 1989)   // get current time
Stefan Schuermans move msleep and get_ms to t...

Stefan Schuermans authored 1 year ago

src/BlinkenMovie.c        1990)   curTime = BlinkenGetMs();
Stefan Schuermans changed indenting to be mor...

Stefan Schuermans authored 13 years ago

BlinkenLib/BlinkenMovie.c 1991)   // set duration of last frame
BlinkenLib/BlinkenMovie.c 1992)   if (pLastFrame != NULL)
BlinkenLib/BlinkenMovie.c 1993)     BlinkenFrameSetDuration(pLastFrame, curTime - lastTime);
BlinkenLib/BlinkenMovie.c 1994) 
BlinkenLib/BlinkenMovie.c 1995)   // return protocol
BlinkenLib/BlinkenMovie.c 1996)   if (pProto != NULL)
Christian Heimke BlinkenLib v.0.3 (2005-02-16)

Christian Heimke authored 13 years ago

BlinkenMovie.c            1997)     *pProto = proto;
Stefan Schuermans changed indenting to be mor...

Stefan Schuermans authored 13 years ago

BlinkenLib/BlinkenMovie.c 1998)   // return movie