e71a0ffa079c886110e57e05ef15a7200a0409bc
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 restructure directories

Stefan Schuermans authored 5 years ago

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

Stefan Schuermans authored 1 year ago

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

Christian Heimke authored 13 years ago

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

Stefan Schuermans authored 5 years ago

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

Christian Heimke authored 13 years ago

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

Stefan Schuermans authored 7 years ago

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

Stefan Schuermans authored 5 years ago

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

Stefan Schuermans authored 7 years ago

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

Christian Heimke authored 13 years ago

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

Stefan Schuermans authored 13 years ago

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

Christian Heimke authored 13 years ago

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

Stefan Schuermans authored 13 years ago

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

Christian Heimke authored 13 years ago

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

Stefan Schuermans authored 13 years ago

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

Christian Heimke authored 13 years ago

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

Stefan Schuermans authored 13 years ago

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

Stefan Schuermans authored 1 year ago

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

Stefan Schuermans authored 13 years ago

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

Stefan Schuermans authored 1 year ago

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

Stefan Schuermans authored 13 years ago

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

Christian Heimke authored 13 years ago

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

Stefan Schuermans authored 13 years ago

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

Stefan Schuermans authored 13 years ago

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

Christian Heimke authored 13 years ago

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

Stefan Schuermans authored 13 years ago

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

Stefan Schuermans authored 1 year ago

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

Stefan Schuermans authored 13 years ago

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

Christian Heimke authored 13 years ago

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

Stefan Schuermans authored 1 year ago

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

Stefan Schuermans authored 13 years ago

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

Christian Heimke authored 13 years ago

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

Stefan Schuermans authored 1 year ago

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

Stefan Schuermans authored 13 years ago

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

Christian Heimke authored 13 years ago

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

Stefan Schuermans authored 13 years ago

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

Christian Heimke authored 13 years ago

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

Stefan Schuermans authored 13 years ago

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

Christian Heimke authored 13 years ago

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

Christian Heimke authored 13 years ago

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

Stefan Schuermans authored 1 year ago

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

Christian Heimke authored 13 years ago

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

Stefan Schuermans authored 13 years ago

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

Christian Heimke authored 13 years ago

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

Stefan Schuermans authored 13 years ago

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

Christian Heimke authored 13 years ago

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

Stefan Schuermans authored 13 years ago

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

Christian Heimke authored 13 years ago

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

Stefan Schuermans authored 13 years ago

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

Christian Heimke authored 13 years ago

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

Stefan Schuermans authored 13 years ago

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

Christian Heimke authored 13 years ago

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

Stefan Schuermans authored 1 year ago

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

Stefan Schuermans authored 13 years ago

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

Christian Heimke authored 13 years ago

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

Stefan Schuermans authored 1 year ago

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

Stefan Schuermans authored 13 years ago

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

Christian Heimke authored 13 years ago

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

Stefan Schuermans authored 1 year ago

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

Stefan Schuermans authored 13 years ago

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

Christian Heimke authored 13 years ago

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

Stefan Schuermans authored 1 year ago

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

Stefan Schuermans authored 13 years ago

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

Christian Heimke authored 13 years ago

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

Stefan Schuermans authored 1 year ago

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

Christian Heimke authored 13 years ago

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

Stefan Schuermans authored 13 years ago

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

Christian Heimke authored 13 years ago

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

Stefan Schuermans authored 13 years ago

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

Christian Heimke authored 13 years ago

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

Stefan Schuermans authored 1 year ago

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

Stefan Schuermans authored 13 years ago

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

Christian Heimke authored 13 years ago

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

Stefan Schuermans authored 1 year ago

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

Stefan Schuermans authored 13 years ago

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

Christian Heimke authored 13 years ago

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

Stefan Schuermans authored 13 years ago

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

Christian Heimke authored 13 years ago

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

Stefan Schuermans authored 1 year ago

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

Stefan Schuermans authored 13 years ago

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

Christian Heimke authored 13 years ago

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

Stefan Schuermans authored 13 years ago

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

Christian Heimke authored 13 years ago

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

Stefan Schuermans authored 13 years ago

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

Stefan Schuermans authored 1 year ago

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

Stefan Schuermans authored 13 years ago

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

Christian Heimke authored 13 years ago

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

Stefan Schuermans authored 13 years ago

BlinkenLib/BlinkenMovie.c  205)   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             206)     return;
BlinkenMovie.c             207) 
Stefan Schuermans changed indenting to be mor...

Stefan Schuermans authored 13 years ago

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

Christian Heimke authored 13 years ago

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

Stefan Schuermans authored 13 years ago

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

Christian Heimke authored 13 years ago

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

Stefan Schuermans authored 13 years ago

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

Christian Heimke authored 13 years ago

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

Stefan Schuermans authored 13 years ago

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

Christian Heimke authored 13 years ago

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

Stefan Schuermans authored 13 years ago

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

Stefan Schuermans authored 1 year ago

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

Stefan Schuermans authored 13 years ago

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

Christian Heimke authored 13 years ago

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

Stefan Schuermans authored 13 years ago

BlinkenLib/BlinkenMovie.c  228)   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             229)     return;
BlinkenMovie.c             230) 
Stefan Schuermans format

Stefan Schuermans authored 1 year ago

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

Stefan Schuermans authored 13 years ago

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

Christian Heimke authored 13 years ago

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

Stefan Schuermans authored 13 years ago

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

Christian Heimke authored 13 years ago

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

Stefan Schuermans authored 13 years ago

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

Christian Heimke authored 13 years ago

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

Stefan Schuermans authored 13 years ago

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

Christian Heimke authored 13 years ago

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

Stefan Schuermans authored 13 years ago

BlinkenLib/BlinkenMovie.c  256)   for (i = infoNo; i < pMovie->infoCnt; i++) {
BlinkenLib/BlinkenMovie.c  257)     pppNewInfos[i + 1][0] = pMovie->pppInfos[i][0];
BlinkenLib/BlinkenMovie.c  258)     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             259)   }
BlinkenMovie.c             260) 
Stefan Schuermans changed indenting to be mor...

Stefan Schuermans authored 13 years ago

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

Christian Heimke authored 13 years ago

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

Stefan Schuermans authored 13 years ago

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

Stefan Schuermans authored 1 year ago

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

Stefan Schuermans authored 13 years ago

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

Christian Heimke authored 13 years ago

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

Stefan Schuermans authored 13 years ago

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

Christian Heimke authored 13 years ago

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

Stefan Schuermans authored 1 year ago

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

Stefan Schuermans authored 13 years ago

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

Christian Heimke authored 13 years ago

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

Stefan Schuermans authored 13 years ago

BlinkenLib/BlinkenMovie.c  278)   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             279)     return;
BlinkenMovie.c             280) 
Stefan Schuermans format

Stefan Schuermans authored 1 year ago

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

Stefan Schuermans authored 13 years ago

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

Christian Heimke authored 13 years ago

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

Stefan Schuermans authored 13 years ago

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

Christian Heimke authored 13 years ago

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

Stefan Schuermans authored 13 years ago

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

Christian Heimke authored 13 years ago

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

Stefan Schuermans authored 13 years ago

BlinkenLib/BlinkenMovie.c  294)   for (i = infoNo; i < pMovie->infoCnt - 1; i++) {
BlinkenLib/BlinkenMovie.c  295)     pppNewInfos[i][0] = pMovie->pppInfos[i + 1][0];
BlinkenLib/BlinkenMovie.c  296)     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             297)   }
BlinkenMovie.c             298) 
Stefan Schuermans changed indenting to be mor...

Stefan Schuermans authored 13 years ago

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

Christian Heimke authored 13 years ago

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

Stefan Schuermans authored 1 year ago

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

Stefan Schuermans authored 13 years ago

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

Christian Heimke authored 13 years ago

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

Stefan Schuermans authored 13 years ago

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

Christian Heimke authored 13 years ago

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

Stefan Schuermans authored 13 years ago

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

Stefan Schuermans authored 13 years ago

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

Christian Heimke authored 13 years ago

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

Stefan Schuermans authored 13 years ago

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

Christian Heimke authored 13 years ago

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

Stefan Schuermans authored 13 years ago

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

Christian Heimke authored 13 years ago

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

Stefan Schuermans authored 1 year ago

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

Stefan Schuermans authored 13 years ago

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

Christian Heimke authored 13 years ago

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

Stefan Schuermans authored 1 year ago

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

Stefan Schuermans authored 13 years ago

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

Christian Heimke authored 13 years ago

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

Stefan Schuermans authored 13 years ago

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

Christian Heimke authored 13 years ago

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

Stefan Schuermans authored 13 years ago

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

Stefan Schuermans authored 1 year ago

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

Stefan Schuermans authored 13 years ago

BlinkenLib/BlinkenMovie.c  345)   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             346)     return;
BlinkenMovie.c             347) 
Stefan Schuermans changed indenting to be mor...

Stefan Schuermans authored 13 years ago

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

Christian Heimke authored 13 years ago

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

Stefan Schuermans authored 13 years ago

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

Stefan Schuermans authored 1 year ago

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

Stefan Schuermans authored 13 years ago

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

Christian Heimke authored 13 years ago

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

Stefan Schuermans authored 13 years ago

BlinkenLib/BlinkenMovie.c  358)   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             359)     return -1;
Christian Heimke BlinkenLib v.0.1.1 (2005-01...

Christian Heimke authored 13 years ago

BlinkenMovie.c             360) 
Stefan Schuermans format

Stefan Schuermans authored 1 year ago

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

Stefan Schuermans authored 13 years ago

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

Christian Heimke authored 13 years ago

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

Christian Heimke authored 13 years ago

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

Stefan Schuermans authored 13 years ago

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

Christian Heimke authored 13 years ago

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

Stefan Schuermans authored 13 years ago

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

Christian Heimke authored 13 years ago

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

Stefan Schuermans authored 13 years ago

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

Christian Heimke authored 13 years ago

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

Stefan Schuermans authored 13 years ago

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

Christian Heimke authored 13 years ago

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

Christian Heimke authored 13 years ago

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

Christian Heimke authored 13 years ago

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

Stefan Schuermans authored 1 year ago

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

Stefan Schuermans authored 13 years ago

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

Christian Heimke authored 13 years ago

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

Christian Heimke authored 13 years ago

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

Stefan Schuermans authored 13 years ago

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

Christian Heimke authored 13 years ago

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

Stefan Schuermans authored 1 year ago

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

Stefan Schuermans authored 13 years ago

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

Christian Heimke authored 13 years ago

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

Stefan Schuermans authored 13 years ago

BlinkenLib/BlinkenMovie.c  393)   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             394)     return;
BlinkenMovie.c             395) 
Stefan Schuermans adaptions for usage in C++

Stefan Schuermans authored 13 years ago

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

Stefan Schuermans authored 13 years ago

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

Christian Heimke authored 13 years ago

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

Stefan Schuermans authored 13 years ago

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

Christian Heimke authored 13 years ago

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

Stefan Schuermans authored 13 years ago

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

Christian Heimke authored 13 years ago

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

Stefan Schuermans authored 13 years ago

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

Christian Heimke authored 13 years ago

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

Stefan Schuermans authored 13 years ago

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

Christian Heimke authored 13 years ago

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

Stefan Schuermans authored 1 year ago

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

Stefan Schuermans authored 13 years ago

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

Christian Heimke authored 13 years ago

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

Stefan Schuermans authored 13 years ago

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

Christian Heimke authored 13 years ago

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

Stefan Schuermans authored 1 year ago

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

Stefan Schuermans authored 13 years ago

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

Christian Heimke authored 13 years ago

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

Stefan Schuermans authored 13 years ago

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

Christian Heimke authored 13 years ago

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

Stefan Schuermans authored 13 years ago

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

Christian Heimke authored 13 years ago

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

Stefan Schuermans authored 13 years ago

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

Stefan Schuermans authored 1 year ago

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

Stefan Schuermans authored 13 years ago

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

Christian Heimke authored 13 years ago

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

Stefan Schuermans authored 13 years ago

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

Christian Heimke authored 13 years ago

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

Stefan Schuermans authored 13 years ago

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

Christian Heimke authored 13 years ago

BlinkenLib/BlinkenMovie.c  443) 
Stefan Schuermans format

Stefan Schuermans authored 1 year ago

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

Stefan Schuermans authored 13 years ago

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

Christian Heimke authored 13 years ago

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

Stefan Schuermans authored 1 year ago

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

Stefan Schuermans authored 13 years ago

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

Christian Heimke authored 13 years ago

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

Stefan Schuermans authored 13 years ago

BlinkenLib/BlinkenMovie.c  455)   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  456)     ppNewFrames[i] = pMovie->ppFrames[i];
Stefan Schuermans changed indenting to be mor...

Stefan Schuermans authored 13 years ago

BlinkenLib/BlinkenMovie.c  457)   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  458)     ppNewFrames[pMovie->frameCnt + i] = pMovie2->ppFrames[i];
BlinkenLib/BlinkenMovie.c  459) 
Stefan Schuermans changed indenting to be mor...

Stefan Schuermans authored 13 years ago

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

Christian Heimke authored 13 years ago

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

Stefan Schuermans authored 13 years ago

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

Christian Heimke authored 13 years ago

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

Stefan Schuermans authored 13 years ago

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

Christian Heimke authored 13 years ago

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

Stefan Schuermans authored 1 year ago

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

Christian Heimke authored 13 years ago

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

Stefan Schuermans authored 13 years ago

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

Christian Heimke authored 13 years ago

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

Stefan Schuermans authored 13 years ago

BlinkenLib/BlinkenMovie.c  477)   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  478)     pFrame = pMovie->ppFrames[i];
BlinkenLib/BlinkenMovie.c  479)     pMovie->ppFrames[i] = pMovie->ppFrames[j];
BlinkenLib/BlinkenMovie.c  480)     pMovie->ppFrames[j] = pFrame;
BlinkenLib/BlinkenMovie.c  481)   }
BlinkenLib/BlinkenMovie.c  482) }
BlinkenLib/BlinkenMovie.c  483) 
Stefan Schuermans format

Stefan Schuermans authored 1 year ago

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

Stefan Schuermans authored 10 years ago

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

Stefan Schuermans authored 10 years ago

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

Stefan Schuermans authored 10 years ago

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

Stefan Schuermans authored 1 year ago

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

Stefan Schuermans authored 10 years ago

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

Stefan Schuermans authored 10 years ago

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

Stefan Schuermans authored 1 year ago

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

Stefan Schuermans authored 10 years ago

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

Stefan Schuermans authored 1 year ago

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

Stefan Schuermans authored 5 years ago

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

Stefan Schuermans authored 1 year ago

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

Stefan Schuermans authored 5 years ago

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

Stefan Schuermans authored 1 year ago

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

Stefan Schuermans authored 5 years ago

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

Stefan Schuermans authored 1 year ago

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

Stefan Schuermans authored 5 years ago

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

Stefan Schuermans authored 13 years ago

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

Stefan Schuermans authored 1 year ago

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

Christian Heimke authored 13 years ago

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

Stefan Schuermans authored 13 years ago

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

Christian Heimke authored 13 years ago

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

Stefan Schuermans authored 13 years ago

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

Christian Heimke authored 13 years ago

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

Stefan Schuermans authored 13 years ago

BlinkenLib/BlinkenMovie.c  721)   for (i = 0; i < pMovie->frameCnt; i++)
BlinkenLib/BlinkenMovie.c  722)     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             723) }
BlinkenMovie.c             724) 
Stefan Schuermans format

Stefan Schuermans authored 1 year ago

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

Stefan Schuermans authored 10 years ago

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

Stefan Schuermans authored 1 year ago

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

Stefan Schuermans authored 10 years ago

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

Stefan Schuermans authored 1 year ago

src/BlinkenMovie.c         760) 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             761)   int i;
BlinkenMovie.c             762) 
Stefan Schuermans changed indenting to be mor...

Stefan Schuermans authored 13 years ago

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

Christian Heimke authored 13 years ago

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

Stefan Schuermans authored 13 years ago

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

Christian Heimke authored 13 years ago

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

Stefan Schuermans authored 13 years ago

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

Christian Heimke authored 13 years ago

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

Stefan Schuermans authored 1 year ago

src/BlinkenMovie.c         782) 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             783)   int i, step;
BlinkenMovie.c             784) 
Stefan Schuermans changed indenting to be mor...

Stefan Schuermans authored 13 years ago

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

Christian Heimke authored 13 years ago

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

Stefan Schuermans authored 13 years ago

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

Christian Heimke authored 13 years ago

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

Stefan Schuermans authored 13 years ago

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

Christian Heimke authored 13 years ago

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

Stefan Schuermans authored 13 years ago

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

Stefan Schuermans authored 1 year ago

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

Stefan Schuermans authored 13 years ago

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

Stefan Schuermans authored 1 year ago

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

Stefan Schuermans authored 13 years ago

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

Stefan Schuermans authored 1 year ago

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

Stefan Schuermans authored 13 years ago

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

Stefan Schuermans authored 1 year ago

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

Stefan Schuermans authored 13 years ago

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

Stefan Schuermans authored 1 year ago

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

Stefan Schuermans authored 13 years ago

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

Stefan Schuermans authored 1 year ago

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

Stefan Schuermans authored 11 years ago

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

Stefan Schuermans authored 1 year ago

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

Stefan Schuermans authored 11 years ago

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

Stefan Schuermans authored 1 year ago

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

Stefan Schuermans authored 11 years ago

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

Stefan Schuermans authored 1 year ago

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

Stefan Schuermans authored 11 years ago

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

Stefan Schuermans authored 1 year ago

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

Stefan Schuermans authored 11 years ago

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

Stefan Schuermans authored 1 year ago

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

Stefan Schuermans authored 11 years ago

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

Stefan Schuermans authored 1 year ago

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

Stefan Schuermans authored 11 years ago

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

Stefan Schuermans authored 1 year ago

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

Stefan Schuermans authored 13 years ago

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

Christian Heimke authored 13 years ago

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

Stefan Schuermans authored 13 years ago

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

Christian Heimke authored 13 years ago

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

Stefan Schuermans authored 13 years ago

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

Stefan Schuermans authored 13 years ago

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

Christian Heimke authored 13 years ago

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

Stefan Schuermans authored 13 years ago

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

Christian Heimke authored 13 years ago

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

Stefan Schuermans authored 13 years ago

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

Stefan Schuermans authored 1 year ago

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

Christian Heimke authored 13 years ago

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

Stefan Schuermans authored 13 years ago

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

Christian Heimke authored 13 years ago

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

Stefan Schuermans authored 13 years ago

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

Christian Heimke authored 13 years ago

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

Stefan Schuermans authored 13 years ago

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

Christian Heimke authored 13 years ago

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

Stefan Schuermans authored 13 years ago

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

Christian Heimke authored 13 years ago

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

Stefan Schuermans authored 13 years ago

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

Christian Heimke authored 13 years ago

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

Stefan Schuermans authored 1 year ago

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

Stefan Schuermans authored 13 years ago

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

Christian Heimke authored 13 years ago

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

Stefan Schuermans authored 13 years ago

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

Christian Heimke authored 13 years ago

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

Stefan Schuermans authored 13 years ago

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

Christian Heimke authored 13 years ago

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

Christian Heimke authored 13 years ago

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

Stefan Schuermans authored 13 years ago

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

Christian Heimke authored 13 years ago

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

Stefan Schuermans authored 13 years ago

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

Christian Heimke authored 13 years ago

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

Stefan Schuermans authored 13 years ago

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

Christian Heimke authored 13 years ago

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

Stefan Schuermans authored 13 years ago

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

Stefan Schuermans authored 1 year ago

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

Christian Heimke authored 13 years ago

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

Stefan Schuermans authored 13 years ago

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

Stefan Schuermans authored 1 year ago

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

Stefan Schuermans authored 13 years ago

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

Christian Heimke authored 13 years ago

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

Stefan Schuermans authored 13 years ago

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

Christian Heimke authored 13 years ago

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

Christian Heimke authored 13 years ago

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

Stefan Schuermans authored 13 years ago

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

Stefan Schuermans authored 1 year ago

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

Stefan Schuermans authored 13 years ago

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

Stefan Schuermans authored 1 year ago

src/BlinkenMovie.c        1074)           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            1075)             break;
Stefan Schuermans changed indenting to be mor...

Stefan Schuermans authored 13 years ago

BlinkenLib/BlinkenMovie.c 1076)         }
Stefan Schuermans format

Stefan Schuermans authored 1 year ago

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

Christian Heimke authored 13 years ago

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

Stefan Schuermans authored 1 year ago

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

Christian Heimke authored 13 years ago

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

Stefan Schuermans authored 13 years ago

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

Christian Heimke authored 13 years ago

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

Stefan Schuermans authored 1 year ago

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

Stefan Schuermans authored 13 years ago

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

Christian Heimke authored 13 years ago

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

Stefan Schuermans authored 13 years ago

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

Christian Heimke authored 13 years ago

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

Stefan Schuermans authored 13 years ago

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

Christian Heimke authored 13 years ago

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

Christian Heimke authored 13 years ago

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

Stefan Schuermans authored 13 years ago

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

Christian Heimke authored 13 years ago

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

Stefan Schuermans authored 13 years ago

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

Christian Heimke authored 13 years ago

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

Stefan Schuermans authored 13 years ago

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

Christian Heimke authored 13 years ago

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

Stefan Schuermans authored 13 years ago

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

Stefan Schuermans authored 1 year ago

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

Christian Heimke authored 13 years ago

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

Stefan Schuermans authored 13 years ago

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

Stefan Schuermans authored 1 year ago

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

Stefan Schuermans authored 13 years ago

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

Christian Heimke authored 13 years ago

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

Stefan Schuermans authored 13 years ago

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

Christian Heimke authored 13 years ago

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

Christian Heimke authored 13 years ago

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

Stefan Schuermans authored 13 years ago

BlinkenLib/BlinkenMovie.c 1143)     // data line
BlinkenLib/BlinkenMovie.c 1144)     else if (fscanf(pFile, "%7[0-9A-FXa-fx]", pixel) == 1) {
BlinkenLib/BlinkenMovie.c 1145)       if (pFrame != NULL) {
BlinkenLib/BlinkenMovie.c 1146)         for (x = 0;; x++) {
BlinkenLib/BlinkenMovie.c 1147)           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            1148)             break;
Stefan Schuermans adaptions for usage in C++

Stefan Schuermans authored 13 years ago

BlinkenLib/BlinkenMovie.c 1149)           BlinkenFrameSetPixel(pFrame, y, x, 0, // set pixel
BlinkenLib/BlinkenMovie.c 1150)                                (unsigned char)val);
Stefan Schuermans format

Stefan Schuermans authored 1 year ago

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

Stefan Schuermans authored 8 years ago

BlinkenLib/BlinkenMovie.c 1152)             break;
BlinkenLib/BlinkenMovie.c 1153)           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            1154)             break;
Stefan Schuermans changed indenting to be mor...

Stefan Schuermans authored 13 years ago

BlinkenLib/BlinkenMovie.c 1155)         }
Stefan Schuermans format

Stefan Schuermans authored 1 year ago

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

Christian Heimke authored 13 years ago

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

Stefan Schuermans authored 1 year ago

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

Christian Heimke authored 13 years ago

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

Stefan Schuermans authored 13 years ago

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

Christian Heimke authored 13 years ago

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

Stefan Schuermans authored 1 year ago

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

Stefan Schuermans authored 13 years ago

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

Christian Heimke authored 13 years ago

BlinkenMovie.c            1172)   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        1173)   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 1174)       *ptr, chr;
Christian Heimke BlinkenLib v.0.1.1 (2005-01...

Christian Heimke authored 13 years ago

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

Stefan Schuermans authored 13 years ago

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

Christian Heimke authored 13 years ago

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

Stefan Schuermans authored 13 years ago

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

Christian Heimke authored 13 years ago

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

Christian Heimke authored 13 years ago

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

Stefan Schuermans authored 13 years ago

BlinkenLib/BlinkenMovie.c 1184)   // 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            1185)   pMovie = NULL;
BlinkenMovie.c            1186) 
Stefan Schuermans changed indenting to be mor...

Stefan Schuermans authored 13 years ago

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

Christian Heimke authored 13 years ago

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

Stefan Schuermans authored 13 years ago

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

Christian Heimke authored 13 years ago

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

Stefan Schuermans authored 13 years ago

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

Christian Heimke authored 13 years ago

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

Stefan Schuermans authored 13 years ago

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

Stefan Schuermans authored 8 years ago

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

Stefan Schuermans authored 13 years ago

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

Christian Heimke authored 13 years ago

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

Stefan Schuermans authored 13 years ago

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

Christian Heimke authored 13 years ago

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

Stefan Schuermans authored 13 years ago

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

Christian Heimke authored 13 years ago

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

Christian Heimke authored 13 years ago

BlinkenMovie.c            1212)         channels = 1;
BlinkenMovie.c            1213)         bits = 4;
BlinkenMovie.c            1214)         maxval = 15;
Stefan Schuermans format

Stefan Schuermans authored 1 year ago

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

Stefan Schuermans authored 13 years ago

BlinkenLib/BlinkenMovie.c 1216)           sscanf(ptr + 8, "%u", &height);
Stefan Schuermans format

Stefan Schuermans authored 1 year ago

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

Stefan Schuermans authored 13 years ago

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

Stefan Schuermans authored 1 year ago

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

Stefan Schuermans authored 13 years ago

BlinkenLib/BlinkenMovie.c 1220)           sscanf(ptr + 10, "%u", &channels);
Stefan Schuermans format

Stefan Schuermans authored 1 year ago

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

Stefan Schuermans authored 13 years ago

BlinkenLib/BlinkenMovie.c 1222)           sscanf(ptr + 6, "%u", &bits);
Stefan Schuermans format

Stefan Schuermans authored 1 year ago

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

Stefan Schuermans authored 13 years ago

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

Christian Heimke authored 13 years ago

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

Stefan Schuermans authored 13 years ago

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

Christian Heimke authored 13 years ago

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

Stefan Schuermans authored 13 years ago

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

Stefan Schuermans authored 13 years ago

BlinkenLib/BlinkenMovie.c 1234)         //   read max 5 chars (2 already in use by prefix)
BlinkenLib/BlinkenMovie.c 1235)         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 1236)         // initialize pixel buffer with hex prefix
BlinkenLib/BlinkenMovie.c 1237)         strcpy(pixel, "0x");
Christian Heimke BlinkenLib v.0.1.1 (2005-01...

Christian Heimke authored 13 years ago

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

Stefan Schuermans authored 1 year ago

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

Christian Heimke authored 13 years ago

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

Stefan Schuermans authored 13 years ago

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

Stefan Schuermans authored 1 year ago

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

Christian Heimke authored 13 years ago

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

Stefan Schuermans authored 13 years ago

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

Christian Heimke authored 13 years ago

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

Stefan Schuermans authored 13 years ago

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

Stefan Schuermans authored 1 year ago

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

Stefan Schuermans authored 13 years ago

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

Christian Heimke authored 13 years ago

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

Stefan Schuermans authored 13 years ago

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

Christian Heimke authored 13 years ago

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

Stefan Schuermans authored 13 years ago

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

Christian Heimke authored 13 years ago

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

Stefan Schuermans authored 13 years ago

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

Christian Heimke authored 13 years ago

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

Stefan Schuermans authored 13 years ago

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

Christian Heimke authored 13 years ago

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

Stefan Schuermans authored 13 years ago

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

Christian Heimke authored 13 years ago

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

Stefan Schuermans authored 13 years ago

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

Christian Heimke authored 13 years ago

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

Stefan Schuermans authored 1 year ago

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

Stefan Schuermans authored 13 years ago

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

Christian Heimke authored 13 years ago

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

Christian Heimke authored 13 years ago

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

Stefan Schuermans authored 13 years ago

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

Stefan Schuermans authored 1 year ago

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

Christian Heimke authored 13 years ago

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

Stefan Schuermans authored 13 years ago

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

Stefan Schuermans authored 1 year ago

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

Christian Heimke authored 13 years ago

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

Stefan Schuermans authored 13 years ago

BlinkenLib/BlinkenMovie.c 1315)               // set pixel (one channel of pixel)
BlinkenLib/BlinkenMovie.c 1316)               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            1317)             }
BlinkenMovie.c            1318)           }
Stefan Schuermans format

Stefan Schuermans authored 1 year ago

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

Christian Heimke authored 13 years ago

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

Stefan Schuermans authored 1 year ago

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

Christian Heimke authored 13 years ago

BlinkenMovie.c            1324) 
Stefan Schuermans format

Stefan Schuermans authored 1 year ago

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

Christian Heimke authored 13 years ago

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

Stefan Schuermans authored 13 years ago

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

Christian Heimke authored 13 years ago

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

Stefan Schuermans authored 1 year ago

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

Stefan Schuermans authored 13 years ago

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

Christian Heimke authored 13 years ago

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

Stefan Schuermans authored 11 years ago

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

Christian Heimke authored 13 years ago

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

Stefan Schuermans authored 13 years ago

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

Christian Heimke authored 13 years ago

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

Stefan Schuermans authored 13 years ago

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

Christian Heimke authored 13 years ago

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

Stefan Schuermans authored 13 years ago

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

Christian Heimke authored 13 years ago

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

Christian Heimke authored 13 years ago

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

Stefan Schuermans authored 13 years ago

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

Christian Heimke authored 13 years ago

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

Stefan Schuermans authored 1 year ago

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

Christian Heimke authored 13 years ago

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

Stefan Schuermans authored 1 year ago

src/BlinkenMovie.c        1366)   headerFramePtr = (unsigned long)header[20] << 24 |
src/BlinkenMovie.c        1367)                    (unsigned long)header[21] << 16 |
src/BlinkenMovie.c        1368)                    (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 1369)   // check magic
BlinkenLib/BlinkenMovie.c 1370)   if (headerMagic != 0x23542666) {
BlinkenLib/BlinkenMovie.c 1371)     fclose(pFile);
Christian Heimke BlinkenLib v.0.1.1 (2005-01...

Christian Heimke authored 13 years ago

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

Stefan Schuermans authored 13 years ago

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

Stefan Schuermans authored 1 year ago

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

Stefan Schuermans authored 13 years ago

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

Christian Heimke authored 13 years ago

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

Stefan Schuermans authored 13 years ago

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

Christian Heimke authored 13 years ago

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

Stefan Schuermans authored 13 years ago

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

Stefan Schuermans authored 1 year ago

src/BlinkenMovie.c        1389)         (unsigned long)subHeader[0] << 24 | (unsigned long)subHeader[1] << 16 |
src/BlinkenMovie.c        1390)         (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 1391)     subHeaderSize =
BlinkenLib/BlinkenMovie.c 1392)         (unsigned short)subHeader[4] << 8 | (unsigned short)subHeader[5];
BlinkenLib/BlinkenMovie.c 1393) 
BlinkenLib/BlinkenMovie.c 1394)     // header fits into gap to frame start
Stefan Schuermans format

Stefan Schuermans authored 1 year ago

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

Stefan Schuermans authored 13 years ago

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

Christian Heimke authored 13 years ago

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

Stefan Schuermans authored 13 years ago

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

Christian Heimke authored 13 years ago

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

Stefan Schuermans authored 13 years ago

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

Christian Heimke authored 13 years ago

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

Stefan Schuermans authored 13 years ago

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

Stefan Schuermans authored 1 year ago

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

Christian Heimke authored 13 years ago

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

Stefan Schuermans authored 13 years ago

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

Christian Heimke authored 13 years ago

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

Stefan Schuermans authored 13 years ago

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

Christian Heimke authored 13 years ago

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

Stefan Schuermans authored 13 years ago

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

Christian Heimke authored 13 years ago

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

Stefan Schuermans authored 13 years ago

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

Christian Heimke authored 13 years ago

BlinkenMovie.c            1428) 
Stefan Schuermans format

Stefan Schuermans authored 1 year ago

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

Christian Heimke authored 13 years ago

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

Stefan Schuermans authored 13 years ago

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

Christian Heimke authored 13 years ago

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

Stefan Schuermans authored 13 years ago

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

Christian Heimke authored 13 years ago

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

Stefan Schuermans authored 1 year ago

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

Christian Heimke authored 13 years ago

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

Stefan Schuermans authored 13 years ago

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

Christian Heimke authored 13 years ago

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

Stefan Schuermans authored 13 years ago

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

Christian Heimke authored 13 years ago

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

Stefan Schuermans authored 13 years ago

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

Christian Heimke authored 13 years ago

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

Stefan Schuermans authored 13 years ago

BlinkenLib/BlinkenMovie.c 1459)   // read frames
BlinkenLib/BlinkenMovie.c 1460)   for (;;) {
BlinkenLib/BlinkenMovie.c 1461)     // read frame
BlinkenLib/BlinkenMovie.c 1462)     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            1463)       break;
Stefan Schuermans changed indenting to be mor...

Stefan Schuermans authored 13 years ago

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

Stefan Schuermans authored 1 year ago

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

Stefan Schuermans authored 13 years ago

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

Christian Heimke authored 13 years ago

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

Stefan Schuermans authored 13 years ago

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

Christian Heimke authored 13 years ago

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

Christian Heimke authored 13 years ago

BlinkenMovie.c            1480) 
Stefan Schuermans format

Stefan Schuermans authored 1 year ago

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

Christian Heimke authored 13 years ago

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

Stefan Schuermans authored 13 years ago

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

Christian Heimke authored 13 years ago

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

Stefan Schuermans authored 13 years ago

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

Christian Heimke authored 13 years ago

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

Christian Heimke authored 13 years ago

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

Stefan Schuermans authored 1 year ago

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

Stefan Schuermans authored 13 years ago

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

Christian Heimke authored 13 years ago

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

Stefan Schuermans authored 7 years ago

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

Stefan Schuermans authored 1 year ago

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

Stefan Schuermans authored 7 years ago

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

Stefan Schuermans authored 1 year ago

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

Christian Heimke authored 13 years ago

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

Stefan Schuermans authored 13 years ago

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

Christian Heimke authored 13 years ago

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

Stefan Schuermans authored 13 years ago

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

Christian Heimke authored 13 years ago

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

Stefan Schuermans authored 13 years ago

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

Christian Heimke authored 13 years ago

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

Stefan Schuermans authored 7 years ago

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

Christian Heimke authored 13 years ago

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

Stefan Schuermans authored 1 year ago

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

Stefan Schuermans authored 13 years ago

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

Christian Heimke authored 13 years ago

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

Stefan Schuermans authored 13 years ago

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

Christian Heimke authored 13 years ago

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

Stefan Schuermans authored 13 years ago

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

Christian Heimke authored 13 years ago

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

Stefan Schuermans authored 13 years ago

BlinkenLib/BlinkenMovie.c 1546)   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            1547) 
Stefan Schuermans changed indenting to be mor...

Stefan Schuermans authored 13 years ago

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

Christian Heimke authored 13 years ago

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

Stefan Schuermans authored 13 years ago

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

Stefan Schuermans authored 1 year ago

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

Christian Heimke authored 13 years ago

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

Stefan Schuermans authored 13 years ago

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

Christian Heimke authored 13 years ago

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

Stefan Schuermans authored 13 years ago

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

Christian Heimke authored 13 years ago

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

Stefan Schuermans authored 13 years ago

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

Christian Heimke authored 13 years ago

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

Stefan Schuermans authored 13 years ago

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

Christian Heimke authored 13 years ago

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

Stefan Schuermans authored 13 years ago

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

Christian Heimke authored 13 years ago

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

Stefan Schuermans authored 1 year ago

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

Stefan Schuermans authored 13 years ago

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

Christian Heimke authored 13 years ago

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

Stefan Schuermans authored 13 years ago

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

Christian Heimke authored 13 years ago

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

Stefan Schuermans authored 13 years ago

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

Christian Heimke authored 13 years ago

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

Stefan Schuermans authored 13 years ago

BlinkenLib/BlinkenMovie.c 1599)   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            1600) 
Stefan Schuermans changed indenting to be mor...

Stefan Schuermans authored 13 years ago

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

Christian Heimke authored 13 years ago

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

Stefan Schuermans authored 13 years ago

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

Stefan Schuermans authored 1 year ago

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

Christian Heimke authored 13 years ago

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

Stefan Schuermans authored 13 years ago

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

Christian Heimke authored 13 years ago

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

Stefan Schuermans authored 13 years ago

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

Christian Heimke authored 13 years ago

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

Stefan Schuermans authored 13 years ago

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

Christian Heimke authored 13 years ago

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

Stefan Schuermans authored 1 year ago

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

Stefan Schuermans authored 13 years ago

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

Christian Heimke authored 13 years ago

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

Stefan Schuermans authored 13 years ago

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

Christian Heimke authored 13 years ago

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

Stefan Schuermans authored 13 years ago

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

Christian Heimke authored 13 years ago

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

Stefan Schuermans authored 1 year ago

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

Stefan Schuermans authored 13 years ago

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

Christian Heimke authored 13 years ago

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

Stefan Schuermans authored 13 years ago

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

Stefan Schuermans authored 1 year ago

src/BlinkenMovie.c        1680)       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 1681)     else if (strcmp(pOutMovie->pppInfos[i][0], "author") == 0)
BlinkenLib/BlinkenMovie.c 1682)       fprintf(pFile, "\t\t<author>%s</author>\n", pOutMovie->pppInfos[i][1]);
BlinkenLib/BlinkenMovie.c 1683)     else if (strcmp(pOutMovie->pppInfos[i][0], "email") == 0)
BlinkenLib/BlinkenMovie.c 1684)       fprintf(pFile, "\t\t<email>%s</email>\n", pOutMovie->pppInfos[i][1]);
BlinkenLib/BlinkenMovie.c 1685)     else if (strcmp(pOutMovie->pppInfos[i][0], "url") == 0)
BlinkenLib/BlinkenMovie.c 1686)       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            1687)     else
Stefan Schuermans changed indenting to be mor...

Stefan Schuermans authored 13 years ago

BlinkenLib/BlinkenMovie.c 1688)       fprintf(pFile, "\t\t<description>%s: %s</description>\n",
BlinkenLib/BlinkenMovie.c 1689)               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            1690)   }
Stefan Schuermans changed indenting to be mor...

Stefan Schuermans authored 13 years ago

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

Christian Heimke authored 13 years ago

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

Stefan Schuermans authored 13 years ago

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

Christian Heimke authored 13 years ago

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

Stefan Schuermans authored 13 years ago

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

Christian Heimke authored 13 years ago

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

Stefan Schuermans authored 13 years ago

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

Christian Heimke authored 13 years ago

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

Stefan Schuermans authored 13 years ago

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

Christian Heimke authored 13 years ago

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

Stefan Schuermans authored 13 years ago

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

Christian Heimke authored 13 years ago

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

Stefan Schuermans authored 1 year ago

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

Stefan Schuermans authored 13 years ago

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

Stefan Schuermans authored 1 year ago

src/BlinkenMovie.c        1724)   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            1725)   int duration, len, len0, len1, i, j, y, x, c, val;
BlinkenMovie.c            1726)   long pos;
BlinkenMovie.c            1727) 
Stefan Schuermans changed indenting to be mor...

Stefan Schuermans authored 13 years ago

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

Christian Heimke authored 13 years ago

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

Stefan Schuermans authored 13 years ago

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

Stefan Schuermans authored 1 year ago

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

Stefan Schuermans authored 13 years ago

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

Christian Heimke authored 13 years ago

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

Stefan Schuermans authored 13 years ago

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

Christian Heimke authored 13 years ago

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

Stefan Schuermans authored 13 years ago

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

Stefan Schuermans authored 1 year ago

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

Christian Heimke authored 13 years ago

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

Stefan Schuermans authored 13 years ago

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

Christian Heimke authored 13 years ago

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

Stefan Schuermans authored 1 year ago

src/BlinkenMovie.c        1767)   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            1768)   header[21] = 0;
BlinkenMovie.c            1769)   header[22] = 0;
BlinkenMovie.c            1770)   header[23] = 0;
Stefan Schuermans changed indenting to be mor...

Stefan Schuermans authored 13 years ago

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

Christian Heimke authored 13 years ago

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

Stefan Schuermans authored 13 years ago

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

Christian Heimke authored 13 years ago

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

Stefan Schuermans authored 13 years ago

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

Christian Heimke authored 13 years ago

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

Stefan Schuermans authored 1 year ago

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

Christian Heimke authored 13 years ago

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

Stefan Schuermans authored 13 years ago

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

Christian Heimke authored 13 years ago

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

Stefan Schuermans authored 13 years ago

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

Christian Heimke authored 13 years ago

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

Stefan Schuermans authored 13 years ago

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

Stefan Schuermans authored 1 year ago

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

Stefan Schuermans authored 13 years ago

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

Christian Heimke authored 13 years ago

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

Stefan Schuermans authored 13 years ago

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

Christian Heimke authored 13 years ago

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

Stefan Schuermans authored 13 years ago

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

Christian Heimke authored 13 years ago

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

Stefan Schuermans authored 13 years ago

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

Christian Heimke authored 13 years ago

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

Stefan Schuermans authored 13 years ago

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

Christian Heimke authored 13 years ago

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

Christian Heimke authored 13 years ago

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

Stefan Schuermans authored 1 year ago

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

Stefan Schuermans authored 13 years ago

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

Christian Heimke authored 13 years ago

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

Stefan Schuermans authored 7 years ago

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

Stefan Schuermans authored 1 year ago

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

Stefan Schuermans authored 7 years ago

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

Stefan Schuermans authored 1 year ago

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

Christian Heimke authored 13 years ago

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

Stefan Schuermans authored 13 years ago

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

Christian Heimke authored 13 years ago

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

Stefan Schuermans authored 13 years ago

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

Christian Heimke authored 13 years ago

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

Stefan Schuermans authored 13 years ago

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

Christian Heimke authored 13 years ago

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

Stefan Schuermans authored 7 years ago

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

Christian Heimke authored 13 years ago

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

Stefan Schuermans authored 13 years ago

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

Stefan Schuermans authored 13 years ago

BlinkenLib/BlinkenMovie.c 1877)                       etBlinkenProto proto, int maxidle)
BlinkenLib/BlinkenMovie.c 1878) // udp socket must be "connected"
BlinkenLib/BlinkenMovie.c 1879) // maxidle is the maximum idle time between two frames in ms (last frame is
BlinkenLib/BlinkenMovie.c 1880) // 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            1881) {
Christian Heimke BlinkenLib v.0.5.4 (2008-01...

Christian Heimke authored 13 years ago

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

Stefan Schuermans authored 1 year ago

src/BlinkenMovie.c        1883)   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 1884) 
BlinkenLib/BlinkenMovie.c 1885)   for (i = 0; i < pMovie->frameCnt; i++) {
Stefan Schuermans format

Stefan Schuermans authored 1 year ago

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

Stefan Schuermans authored 13 years ago

BlinkenLib/BlinkenMovie.c 1888)     duration = BlinkenFrameGetDuration(pMovie->ppFrames[i]);
BlinkenLib/BlinkenMovie.c 1889)     if (len > 0) {
BlinkenLib/BlinkenMovie.c 1890)       while (duration > 0) {
BlinkenLib/BlinkenMovie.c 1891)         send(udpSocket, buffer, len, 0);
BlinkenLib/BlinkenMovie.c 1892)         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        1893)         BlinkenMSleep(dur);
Stefan Schuermans changed indenting to be mor...

Stefan Schuermans authored 13 years ago

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

Christian Heimke authored 13 years ago

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

Christian Heimke authored 13 years ago

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

Stefan Schuermans authored 13 years ago

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

Stefan Schuermans authored 1 year ago

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

Stefan Schuermans authored 13 years ago

BlinkenLib/BlinkenMovie.c 1902) // udp socket must be "bound" and should be "connected"
BlinkenLib/BlinkenMovie.c 1903) // after timeout ms of no reception, the movie is considered to be complete
BlinkenLib/BlinkenMovie.c 1904) // 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            1905) {
Stefan Schuermans changed indenting to be mor...

Stefan Schuermans authored 13 years ago

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

Christian Heimke authored 13 years ago

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

Christian Heimke authored 13 years ago

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

Stefan Schuermans authored 1 year ago

src/BlinkenMovie.c        1912)   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            1913)   int len;
BlinkenMovie.c            1914) 
Stefan Schuermans changed indenting to be mor...

Stefan Schuermans authored 13 years ago

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

Christian Heimke authored 13 years ago

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

Stefan Schuermans authored 13 years ago

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

Christian Heimke authored 13 years ago

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

Stefan Schuermans authored 1 year ago

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

Stefan Schuermans authored 13 years ago

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

Christian Heimke authored 13 years ago

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

Stefan Schuermans authored 13 years ago

BlinkenLib/BlinkenMovie.c 1930)     // timeout or error
BlinkenLib/BlinkenMovie.c 1931)     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            1932)       break;
BlinkenMovie.c            1933) 
Stefan Schuermans changed indenting to be mor...

Stefan Schuermans authored 13 years ago

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

Christian Heimke authored 13 years ago

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

Stefan Schuermans authored 13 years ago

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

Stefan Schuermans authored 1 year ago

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

Stefan Schuermans authored 13 years ago

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

Stefan Schuermans authored 1 year ago

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

Stefan Schuermans authored 13 years ago

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

Christian Heimke authored 13 years ago

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

Stefan Schuermans authored 13 years ago

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

Stefan Schuermans authored 1 year ago

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

Stefan Schuermans authored 13 years ago

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

Christian Heimke authored 13 years ago

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

Stefan Schuermans authored 13 years ago

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

Stefan Schuermans authored 1 year ago

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

Stefan Schuermans authored 13 years ago

BlinkenLib/BlinkenMovie.c 1972)             // set duration of last frame
BlinkenLib/BlinkenMovie.c 1973)             if (pLastFrame != NULL)
BlinkenLib/BlinkenMovie.c 1974)               BlinkenFrameSetDuration(pLastFrame, curTime - lastTime);
BlinkenLib/BlinkenMovie.c 1975)             // 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            1976)             pLastFrame = pFrame;
Stefan Schuermans changed indenting to be mor...

Stefan Schuermans authored 13 years ago

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

Christian Heimke authored 13 years ago

BlinkenMovie.c            1979)           }
Stefan Schuermans format

Stefan Schuermans authored 1 year ago

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

Stefan Schuermans authored 13 years ago

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

Stefan Schuermans authored 1 year ago

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

Stefan Schuermans authored 13 years ago

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

Stefan Schuermans authored 1 year ago

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

Stefan Schuermans authored 13 years ago

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

Christian Heimke authored 13 years ago

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

Stefan Schuermans authored 13 years ago

BlinkenLib/BlinkenMovie.c 1997)   // return movie