Christian Heimke commited on 2011-07-15 09:09:52
Showing 22 changed files, with 304 additions and 62 deletions.
| ... | ... |
@@ -1,6 +1,6 @@ |
| 1 | 1 |
/* BlinkenLib |
| 2 |
- * version 0.6.3 date 2009-12-20 |
|
| 3 |
- * Copyright 2004-2009 Stefan Schuermans <stefan@blinkenarea.org> |
|
| 2 |
+ * version 0.6.4 date 2010-12-13 |
|
| 3 |
+ * Copyright 2004-2010 Stefan Schuermans <stefan@blinkenarea.org> |
|
| 4 | 4 |
* Copyleft: GNU public license - http://www.gnu.org/copyleft/gpl.html |
| 5 | 5 |
* a blinkenarea.org project |
| 6 | 6 |
*/ |
| ... | ... |
@@ -1,6 +1,6 @@ |
| 1 | 1 |
/* BlinkenLib |
| 2 |
- * version 0.6.3 date 2009-12-20 |
|
| 3 |
- * Copyright 2004-2009 Stefan Schuermans <stefan@blinkenarea.org> |
|
| 2 |
+ * version 0.6.4 date 2010-12-13 |
|
| 3 |
+ * Copyright 2004-2010 Stefan Schuermans <stefan@blinkenarea.org> |
|
| 4 | 4 |
* Copyleft: GNU public license - http://www.gnu.org/copyleft/gpl.html |
| 5 | 5 |
* a blinkenarea.org project |
| 6 | 6 |
*/ |
| ... | ... |
@@ -1,6 +1,6 @@ |
| 1 | 1 |
/* BlinkenLib |
| 2 |
- * version 0.6.3 date 2009-12-20 |
|
| 3 |
- * Copyright 2004-2009 Stefan Schuermans <stefan@blinkenarea.org> |
|
| 2 |
+ * version 0.6.4 date 2010-12-13 |
|
| 3 |
+ * Copyright 2004-2010 Stefan Schuermans <stefan@blinkenarea.org> |
|
| 4 | 4 |
* Copyleft: GNU public license - http://www.gnu.org/copyleft/gpl.html |
| 5 | 5 |
* a blinkenarea.org project |
| 6 | 6 |
*/ |
| ... | ... |
@@ -1,6 +1,6 @@ |
| 1 | 1 |
/* BlinkenLib |
| 2 |
- * version 0.6.3 date 2009-12-20 |
|
| 3 |
- * Copyright 2004-2009 Stefan Schuermans <stefan@blinkenarea.org> |
|
| 2 |
+ * version 0.6.4 date 2010-12-13 |
|
| 3 |
+ * Copyright 2004-2010 Stefan Schuermans <stefan@blinkenarea.org> |
|
| 4 | 4 |
* Copyleft: GNU public license - http://www.gnu.org/copyleft/gpl.html |
| 5 | 5 |
* a blinkenarea.org project |
| 6 | 6 |
*/ |
| ... | ... |
@@ -14,13 +14,15 @@ |
| 14 | 14 |
static void gen_test_movie( stBlinkenMovie * * ppMovie, const char * str_format, const char * str_mode, const char * str_duration ) |
| 15 | 15 |
{
|
| 16 | 16 |
unsigned int height, width, channels, colors; |
| 17 |
- enum { ModeNone, ModeDots, ModeLines } mode = ModeNone;
|
|
| 17 |
+ enum { ModeNone, ModeDots, ModeLines, ModeTrans } mode = ModeNone;
|
|
| 18 | 18 |
int duration; |
| 19 | 19 |
|
| 20 | 20 |
if( strcmp( str_mode, "dots" ) == 0 ) |
| 21 | 21 |
mode = ModeDots; |
| 22 | 22 |
if( strcmp( str_mode, "lines" ) == 0 ) |
| 23 | 23 |
mode = ModeLines; |
| 24 |
+ if( strcmp( str_mode, "trans" ) == 0 ) |
|
| 25 |
+ mode = ModeTrans; |
|
| 24 | 26 |
if( sscanf( str_format, "%ux%u-%u/%u", &width, &height, &channels, &colors ) != 4 ) |
| 25 | 27 |
printf( "invalid movie format \"%s\"\n", str_format ); |
| 26 | 28 |
else if( mode == ModeNone ) |
| ... | ... |
@@ -38,7 +40,7 @@ static void gen_test_movie( stBlinkenMovie * * ppMovie, const char * str_format, |
| 38 | 40 |
else |
| 39 | 41 |
{
|
| 40 | 42 |
|
| 41 |
- unsigned int y, x, c, yy, xx, cc; |
|
| 43 |
+ unsigned int y, x, c, c2, c3, o, b, yy, xx, cc, oo; |
|
| 42 | 44 |
stBlinkenFrame * pFrame; |
| 43 | 45 |
height = BlinkenMovieGetHeight( *ppMovie ); |
| 44 | 46 |
width = BlinkenMovieGetWidth( *ppMovie ); |
| ... | ... |
@@ -86,6 +88,24 @@ static void gen_test_movie( stBlinkenMovie * * ppMovie, const char * str_format, |
| 86 | 88 |
} |
| 87 | 89 |
break; |
| 88 | 90 |
|
| 91 |
+ case ModeTrans: |
|
| 92 |
+ for( c = 0; c < channels; c++ ) |
|
| 93 |
+ for( b = 0; b < 2; b++ ) |
|
| 94 |
+ for( c2 = 0; c2 < channels; c2++ ) |
|
| 95 |
+ for( o = 0; o < colors - 1; o++ ) {
|
|
| 96 |
+ pFrame = BlinkenFrameNew( height, width, channels, colors - 1, duration ); |
|
| 97 |
+ for( cc = 0; cc < channels; cc++ ) {
|
|
| 98 |
+ c3 = (cc + channels - c) % channels; |
|
| 99 |
+ oo = b ? (c3 < c2 ? 0 : c3 > c2 ? colors - 1 : colors - 1 - o) |
|
| 100 |
+ : (c3 < c2 ? colors - 1 : c3 > c2 ? 0 : o); |
|
| 101 |
+ for( yy = 0; yy < height; yy++ ) |
|
| 102 |
+ for( xx = 0; xx < width; xx++ ) |
|
| 103 |
+ BlinkenFrameSetPixel( pFrame, yy, xx, cc, oo ); |
|
| 104 |
+ } |
|
| 105 |
+ BlinkenMovieAppendFrame( *ppMovie, pFrame ); |
|
| 106 |
+ } |
|
| 107 |
+ break; |
|
| 108 |
+ |
|
| 89 | 109 |
} //switch( mode ) |
| 90 | 110 |
|
| 91 | 111 |
printf( "test movie generated, using format %ux%u-%u/%u and mode %s\n", |
| ... | ... |
@@ -101,14 +121,14 @@ int main( int argCnt, char * * args ) |
| 101 | 121 |
stBlinkenMovie * pMovie; |
| 102 | 122 |
int i; |
| 103 | 123 |
char * str; |
| 104 |
- unsigned int height, width, channels, colors; |
|
| 124 |
+ unsigned int height, width, channels, colors, times; |
|
| 105 | 125 |
int mode; |
| 106 | 126 |
|
| 107 | 127 |
//print info |
| 108 | 128 |
printf( "BlinkenLib - BlinkenConv\n" |
| 109 |
- "version 0.6.3 date 2009-12-20\n" |
|
| 129 |
+ "version 0.6.4 date 2010-12-13\n" |
|
| 110 | 130 |
"config "BLINKENLIB_CONFIG"\n" |
| 111 |
- "Copyright 2004-2009 Stefan Schuermans <stefan@blinkenarea.org>\n" |
|
| 131 |
+ "Copyright 2004-2010 Stefan Schuermans <stefan@blinkenarea.org>\n" |
|
| 112 | 132 |
"Copyleft: GNU public license - http://www.gnu.org/copyleft/gpl.html\n" |
| 113 | 133 |
"a blinkenarea.org project\n\n" ); |
| 114 | 134 |
|
| ... | ... |
@@ -119,6 +139,12 @@ int main( int argCnt, char * * args ) |
| 119 | 139 |
"parameters:\n" |
| 120 | 140 |
" -i <file>\n" |
| 121 | 141 |
" read movie from file (*.blm, *.bmm, *.bml, *.bbm)\n" |
| 142 |
+ " -a <file>\n" |
|
| 143 |
+ " append movie from file (*.blm, *.bmm, *.bml, *.bbm)\n" |
|
| 144 |
+ " -l <number>\n" |
|
| 145 |
+ " loop video a number of times\n" |
|
| 146 |
+ " -f\n" |
|
| 147 |
+ " output format, frame count and duration of movie\n" |
|
| 122 | 148 |
" -p\n" |
| 123 | 149 |
" print movie\n" |
| 124 | 150 |
" -r <width>x<height>-<channels>/<colors>\n" |
| ... | ... |
@@ -127,7 +153,11 @@ int main( int argCnt, char * * args ) |
| 127 | 153 |
" scale movie\n" |
| 128 | 154 |
" -c <channels> [solid|rainbow]\n" |
| 129 | 155 |
" colorize movie\n" |
| 130 |
- " -t <width>x<height>-<channels>/<colors> [dots|lines] <duration>\n" |
|
| 156 |
+ " -R\n" |
|
| 157 |
+ " reverse movie\n" |
|
| 158 |
+ " -d <first> <count>\n" |
|
| 159 |
+ " delete frames\n" |
|
| 160 |
+ " -t <width>x<height>-<channels>/<colors> [dots|lines|trans] <duration>\n" |
|
| 131 | 161 |
" generate a test movie\n" |
| 132 | 162 |
" -o <file>\n" |
| 133 | 163 |
" write movie to file (*.blm, *.bmm, *.bml, *.bbm)\n\n" |
| ... | ... |
@@ -161,6 +191,89 @@ int main( int argCnt, char * * args ) |
| 161 | 191 |
printf( "missing input filename for \"-i\"\n" ); |
| 162 | 192 |
} |
| 163 | 193 |
|
| 194 |
+ //append movie |
|
| 195 |
+ else if( strcmp( args[i], "-a" ) == 0 ) |
|
| 196 |
+ {
|
|
| 197 |
+ if( i + 1 < argCnt ) |
|
| 198 |
+ {
|
|
| 199 |
+ i++; |
|
| 200 |
+ if( pMovie == NULL ) |
|
| 201 |
+ printf( "no movie loaded to append to\n" ); |
|
| 202 |
+ else {
|
|
| 203 |
+ stBlinkenMovie * pMovie2; |
|
| 204 |
+ pMovie2 = BlinkenMovieLoad( args[i] ); |
|
| 205 |
+ if( pMovie2 == NULL ) |
|
| 206 |
+ printf( "could not read movie \"%s\"\n", args[i] ); |
|
| 207 |
+ else {
|
|
| 208 |
+ if( BlinkenMovieConcat( pMovie, pMovie2 ) < 0 ) {
|
|
| 209 |
+ BlinkenMovieFree( pMovie2 ); |
|
| 210 |
+ printf( "movie read from \"%s\" could not be appended\n", args[i] ); |
|
| 211 |
+ } else |
|
| 212 |
+ printf( "movie \"%s\" read and appended\n", args[i] ); |
|
| 213 |
+ } |
|
| 214 |
+ } |
|
| 215 |
+ } |
|
| 216 |
+ else |
|
| 217 |
+ printf( "missing input filename for \"-a\"\n" ); |
|
| 218 |
+ } |
|
| 219 |
+ |
|
| 220 |
+ //loop movie |
|
| 221 |
+ else if( strcmp( args[i], "-l" ) == 0 ) |
|
| 222 |
+ {
|
|
| 223 |
+ if( i + 1 < argCnt ) |
|
| 224 |
+ {
|
|
| 225 |
+ i++; |
|
| 226 |
+ if( sscanf( args[i], "%u", × ) != 1 || times < 1 ) |
|
| 227 |
+ printf( "invalid number of times \"%s\"\n", args[i] ); |
|
| 228 |
+ else if( pMovie == NULL ) |
|
| 229 |
+ printf( "no movie loaded to loop\n" ); |
|
| 230 |
+ else |
|
| 231 |
+ {
|
|
| 232 |
+ stBlinkenMovie * pMovie2, * pMovie3; |
|
| 233 |
+ int err = 0; |
|
| 234 |
+ unsigned int t; |
|
| 235 |
+ pMovie2 = BlinkenMovieClone( pMovie ); |
|
| 236 |
+ if( pMovie2 == NULL ) |
|
| 237 |
+ err = 1; |
|
| 238 |
+ else {
|
|
| 239 |
+ for( t = 1 /* loop one time means nothing to do */; t < times; t++ ) {
|
|
| 240 |
+ pMovie3 = BlinkenMovieClone( pMovie2 ); |
|
| 241 |
+ if( pMovie3 == NULL ) |
|
| 242 |
+ err = 1; |
|
| 243 |
+ else {
|
|
| 244 |
+ if( BlinkenMovieConcat( pMovie, pMovie3 ) < 0 ) {
|
|
| 245 |
+ BlinkenMovieFree( pMovie3 ); |
|
| 246 |
+ err = 1; |
|
| 247 |
+ } |
|
| 248 |
+ } |
|
| 249 |
+ } |
|
| 250 |
+ BlinkenMovieFree( pMovie2 ); |
|
| 251 |
+ } |
|
| 252 |
+ if( err ) |
|
| 253 |
+ printf( "could not loop movie\n" ); |
|
| 254 |
+ else |
|
| 255 |
+ printf( "movie looped %u times\n", times ); |
|
| 256 |
+ } |
|
| 257 |
+ } |
|
| 258 |
+ else |
|
| 259 |
+ printf( "missing movie format for \"-r\"\n" ); |
|
| 260 |
+ } |
|
| 261 |
+ |
|
| 262 |
+ //output format, frame count and duration of movie |
|
| 263 |
+ else if( strcmp( args[i], "-f" ) == 0 ) |
|
| 264 |
+ {
|
|
| 265 |
+ if( pMovie == NULL ) |
|
| 266 |
+ printf( "no movie loaded to output format, frame count and duration of\n" ); |
|
| 267 |
+ else |
|
| 268 |
+ printf( "format: %ux%u-%u/%u\nframe count: %u\nduration: %u ms\n", |
|
| 269 |
+ BlinkenMovieGetWidth( pMovie ), |
|
| 270 |
+ BlinkenMovieGetHeight( pMovie ), |
|
| 271 |
+ BlinkenMovieGetChannels( pMovie ), |
|
| 272 |
+ BlinkenMovieGetMaxval( pMovie ) + 1, |
|
| 273 |
+ BlinkenMovieGetFrameCnt( pMovie ), |
|
| 274 |
+ BlinkenMovieGetDuration( pMovie ) ); |
|
| 275 |
+ } |
|
| 276 |
+ |
|
| 164 | 277 |
//print movie |
| 165 | 278 |
else if( strcmp( args[i], "-p" ) == 0 ) |
| 166 | 279 |
{
|
| ... | ... |
@@ -230,12 +343,12 @@ int main( int argCnt, char * * args ) |
| 230 | 343 |
i++; |
| 231 | 344 |
str_mode = args[i]; |
| 232 | 345 |
if( sscanf( str_channels, "%u", &channels ) != 1 ) |
| 233 |
- printf( "invalid number of channels \"%s\"\n", args[i] ); |
|
| 346 |
+ printf( "invalid number of channels \"%s\"\n", str_channels ); |
|
| 234 | 347 |
else |
| 235 | 348 |
{
|
| 236 | 349 |
mode = BlinkenColorizerStr2Mode( str_mode ); |
| 237 | 350 |
if( mode < 0 ) |
| 238 |
- printf( "invalid colorizing mode \"%s\"\n", args[i] ); |
|
| 351 |
+ printf( "invalid colorizing mode \"%s\"\n", str_mode ); |
|
| 239 | 352 |
else if( pMovie == NULL ) |
| 240 | 353 |
printf( "no movie loaded to colorize\n" ); |
| 241 | 354 |
else |
| ... | ... |
@@ -254,6 +367,54 @@ int main( int argCnt, char * * args ) |
| 254 | 367 |
printf( "missing number of channels for \"-c\"\n" ); |
| 255 | 368 |
} |
| 256 | 369 |
|
| 370 |
+ //reverse movie |
|
| 371 |
+ else if( strcmp( args[i], "-R" ) == 0 ) |
|
| 372 |
+ {
|
|
| 373 |
+ if( pMovie == NULL ) |
|
| 374 |
+ printf( "no movie loaded to reverse\n" ); |
|
| 375 |
+ else {
|
|
| 376 |
+ BlinkenMovieReverse( pMovie ); |
|
| 377 |
+ printf( "movie reversed\n" ); |
|
| 378 |
+ } |
|
| 379 |
+ } |
|
| 380 |
+ |
|
| 381 |
+ //delete frames |
|
| 382 |
+ else if( strcmp( args[i], "-d" ) == 0 ) |
|
| 383 |
+ {
|
|
| 384 |
+ if( i + 2 < argCnt ) |
|
| 385 |
+ {
|
|
| 386 |
+ const char * str_first, * str_count; |
|
| 387 |
+ unsigned int first, count, c; |
|
| 388 |
+ i++; |
|
| 389 |
+ str_first = args[i]; |
|
| 390 |
+ i++; |
|
| 391 |
+ str_count = args[i]; |
|
| 392 |
+ if( sscanf( str_first, "%u", &first ) != 1 ) |
|
| 393 |
+ printf( "invalid number of first frame \"%s\"\n", str_first ); |
|
| 394 |
+ else {
|
|
| 395 |
+ if( sscanf( str_count, "%u", &count ) != 1 ) |
|
| 396 |
+ printf( "invalid number of frames \"%s\"\n", str_count ); |
|
| 397 |
+ else if( pMovie == NULL ) |
|
| 398 |
+ printf( "no movie loaded to delete frames from\n" ); |
|
| 399 |
+ else if( first + count > (unsigned int)BlinkenMovieGetFrameCnt( pMovie ) ) |
|
| 400 |
+ printf( "invalid frame range (%u-%u) for deletion from %u frames\n", |
|
| 401 |
+ first, first + count, (unsigned int)BlinkenMovieGetFrameCnt( pMovie ) ); |
|
| 402 |
+ else {
|
|
| 403 |
+ for( c = 0; c < count; c++ ) |
|
| 404 |
+ BlinkenMovieDeleteFrame( pMovie, first ); |
|
| 405 |
+ printf( "deleted frames %u-%u\n", first, first + count ); |
|
| 406 |
+ } |
|
| 407 |
+ } |
|
| 408 |
+ } |
|
| 409 |
+ else if( i + 1 < argCnt ) |
|
| 410 |
+ {
|
|
| 411 |
+ printf( "missing colorizing mode for \"-c\"\n" ); |
|
| 412 |
+ i++; |
|
| 413 |
+ } |
|
| 414 |
+ else |
|
| 415 |
+ printf( "missing number of channels for \"-c\"\n" ); |
|
| 416 |
+ } |
|
| 417 |
+ |
|
| 257 | 418 |
//generate test movie |
| 258 | 419 |
else if( strcmp( args[i], "-t" ) == 0 ) |
| 259 | 420 |
{
|
| ... | ... |
@@ -1,6 +1,6 @@ |
| 1 | 1 |
/* BlinkenLib |
| 2 |
- * version 0.6.3 date 2009-12-20 |
|
| 3 |
- * Copyright 2004-2009 Stefan Schuermans <stefan@blinkenarea.org> |
|
| 2 |
+ * version 0.6.4 date 2010-12-13 |
|
| 3 |
+ * Copyright 2004-2010 Stefan Schuermans <stefan@blinkenarea.org> |
|
| 4 | 4 |
* Copyleft: GNU public license - http://www.gnu.org/copyleft/gpl.html |
| 5 | 5 |
* a blinkenarea.org project |
| 6 | 6 |
*/ |
| ... | ... |
@@ -1,6 +1,6 @@ |
| 1 | 1 |
/* BlinkenLib |
| 2 |
- * version 0.6.3 date 2009-12-20 |
|
| 3 |
- * Copyright 2004-2009 Stefan Schuermans <stefan@blinkenarea.org> |
|
| 2 |
+ * version 0.6.4 date 2010-12-13 |
|
| 3 |
+ * Copyright 2004-2010 Stefan Schuermans <stefan@blinkenarea.org> |
|
| 4 | 4 |
* Copyleft: GNU public license - http://www.gnu.org/copyleft/gpl.html |
| 5 | 5 |
* a blinkenarea.org project |
| 6 | 6 |
*/ |
| ... | ... |
@@ -1,6 +1,6 @@ |
| 1 | 1 |
/* BlinkenLib |
| 2 |
- * version 0.6.3 date 2009-12-20 |
|
| 3 |
- * Copyright 2004-2009 Stefan Schuermans <stefan@blinkenarea.org> |
|
| 2 |
+ * version 0.6.4 date 2010-12-13 |
|
| 3 |
+ * Copyright 2004-2010 Stefan Schuermans <stefan@blinkenarea.org> |
|
| 4 | 4 |
* Copyleft: GNU public license - http://www.gnu.org/copyleft/gpl.html |
| 5 | 5 |
* a blinkenarea.org project |
| 6 | 6 |
*/ |
| ... | ... |
@@ -1,6 +1,6 @@ |
| 1 | 1 |
/* BlinkenLib |
| 2 |
- * version 0.6.3 date 2009-12-20 |
|
| 3 |
- * Copyright 2004-2009 Stefan Schuermans <stefan@blinkenarea.org> |
|
| 2 |
+ * version 0.6.4 date 2010-12-13 |
|
| 3 |
+ * Copyright 2004-2010 Stefan Schuermans <stefan@blinkenarea.org> |
|
| 4 | 4 |
* Copyleft: GNU public license - http://www.gnu.org/copyleft/gpl.html |
| 5 | 5 |
* a blinkenarea.org project |
| 6 | 6 |
*/ |
| ... | ... |
@@ -1,6 +1,6 @@ |
| 1 | 1 |
/* BlinkenLib |
| 2 |
- * version 0.6.3 date 2009-12-20 |
|
| 3 |
- * Copyright 2004-2009 Stefan Schuermans <stefan@blinkenarea.org> |
|
| 2 |
+ * version 0.6.4 date 2010-12-13 |
|
| 3 |
+ * Copyright 2004-2010 Stefan Schuermans <stefan@blinkenarea.org> |
|
| 4 | 4 |
* Copyleft: GNU public license - http://www.gnu.org/copyleft/gpl.html |
| 5 | 5 |
* a blinkenarea.org project |
| 6 | 6 |
*/ |
| ... | ... |
@@ -1,6 +1,6 @@ |
| 1 | 1 |
/* BlinkenLib |
| 2 |
- * version 0.6.3 date 2009-12-20 |
|
| 3 |
- * Copyright 2004-2009 Stefan Schuermans <stefan@blinkenarea.org> |
|
| 2 |
+ * version 0.6.4 date 2010-12-13 |
|
| 3 |
+ * Copyright 2004-2010 Stefan Schuermans <stefan@blinkenarea.org> |
|
| 4 | 4 |
* Copyleft: GNU public license - http://www.gnu.org/copyleft/gpl.html |
| 5 | 5 |
* a blinkenarea.org project |
| 6 | 6 |
*/ |
| ... | ... |
@@ -463,6 +463,55 @@ void BlinkenMovieDeleteFrames( stBlinkenMovie * pMovie ) |
| 463 | 463 |
pMovie->frameCnt = 0; |
| 464 | 464 |
} |
| 465 | 465 |
|
| 466 |
+int BlinkenMovieConcat( stBlinkenMovie * pMovie, stBlinkenMovie * pMovie2 /* appended and freed */ ) |
|
| 467 |
+{
|
|
| 468 |
+ stBlinkenFrame * * ppNewFrames, * * ppNewFrames2; |
|
| 469 |
+ int i; |
|
| 470 |
+ |
|
| 471 |
+ if( pMovie == NULL || pMovie2 == NULL ) |
|
| 472 |
+ return -1; |
|
| 473 |
+ |
|
| 474 |
+ BlinkenMovieResize( pMovie2, pMovie->height, pMovie->width, pMovie->channels, pMovie->maxval ); |
|
| 475 |
+ |
|
| 476 |
+ ppNewFrames = (stBlinkenFrame * *)malloc1D( pMovie->frameCnt + pMovie2->frameCnt, sizeof( stBlinkenFrame * ) ); |
|
| 477 |
+ if( ppNewFrames == NULL ) |
|
| 478 |
+ return -1; |
|
| 479 |
+ ppNewFrames2 = (stBlinkenFrame * *)malloc1D( 0, sizeof( stBlinkenFrame * ) ); |
|
| 480 |
+ if( ppNewFrames2 == NULL ) {
|
|
| 481 |
+ free( ppNewFrames ); |
|
| 482 |
+ return -1; |
|
| 483 |
+ } |
|
| 484 |
+ |
|
| 485 |
+ for( i = 0; i < pMovie->frameCnt; i++ ) |
|
| 486 |
+ ppNewFrames[i] = pMovie->ppFrames[i]; |
|
| 487 |
+ for( i = 0; i < pMovie2->frameCnt; i++ ) |
|
| 488 |
+ ppNewFrames[pMovie->frameCnt + i] = pMovie2->ppFrames[i]; |
|
| 489 |
+ |
|
| 490 |
+ free( pMovie->ppFrames ); |
|
| 491 |
+ pMovie->ppFrames = ppNewFrames; |
|
| 492 |
+ pMovie->frameCnt += pMovie2->frameCnt; |
|
| 493 |
+ |
|
| 494 |
+ free( pMovie2->ppFrames ); |
|
| 495 |
+ pMovie2->ppFrames = ppNewFrames2; |
|
| 496 |
+ pMovie2->frameCnt = 0; |
|
| 497 |
+ |
|
| 498 |
+ BlinkenMovieFree( pMovie2 ); |
|
| 499 |
+ |
|
| 500 |
+ return 0; |
|
| 501 |
+} |
|
| 502 |
+ |
|
| 503 |
+void BlinkenMovieReverse( stBlinkenMovie * pMovie ) |
|
| 504 |
+{
|
|
| 505 |
+ int i, j; |
|
| 506 |
+ stBlinkenFrame * pFrame; |
|
| 507 |
+ |
|
| 508 |
+ for( i = 0, j = pMovie->frameCnt - 1; i < pMovie->frameCnt / 2; i++, j-- ) {
|
|
| 509 |
+ pFrame = pMovie->ppFrames[i]; |
|
| 510 |
+ pMovie->ppFrames[i] = pMovie->ppFrames[j]; |
|
| 511 |
+ pMovie->ppFrames[j] = pFrame; |
|
| 512 |
+ } |
|
| 513 |
+} |
|
| 514 |
+ |
|
| 466 | 515 |
void BlinkenMovieResize( stBlinkenMovie * pMovie, int height, int width, int channels, int maxval ) |
| 467 | 516 |
{
|
| 468 | 517 |
int i; |
| ... | ... |
@@ -1,6 +1,6 @@ |
| 1 | 1 |
/* BlinkenLib |
| 2 |
- * version 0.6.3 date 2009-12-20 |
|
| 3 |
- * Copyright 2004-2009 Stefan Schuermans <stefan@blinkenarea.org> |
|
| 2 |
+ * version 0.6.4 date 2010-12-13 |
|
| 3 |
+ * Copyright 2004-2010 Stefan Schuermans <stefan@blinkenarea.org> |
|
| 4 | 4 |
* Copyleft: GNU public license - http://www.gnu.org/copyleft/gpl.html |
| 5 | 5 |
* a blinkenarea.org project |
| 6 | 6 |
*/ |
| ... | ... |
@@ -49,6 +49,9 @@ int BlinkenMovieAppendFrame( stBlinkenMovie * pMovie, stBlinkenFrame * pFrame ); |
| 49 | 49 |
void BlinkenMovieDeleteFrame( stBlinkenMovie * pMovie, int frameNo ); |
| 50 | 50 |
void BlinkenMovieDeleteFrames( stBlinkenMovie * pMovie ); |
| 51 | 51 |
|
| 52 |
+int BlinkenMovieConcat( stBlinkenMovie * pMovie, stBlinkenMovie * pMovie2 /* appended and freed */ ); |
|
| 53 |
+void BlinkenMovieReverse( stBlinkenMovie * pMovie ); |
|
| 54 |
+ |
|
| 52 | 55 |
void BlinkenMovieResize( stBlinkenMovie * pMovie, int height, int width, int channels, int maxval ); |
| 53 | 56 |
void BlinkenMovieScale( stBlinkenMovie * pMovie, int height, int width ); |
| 54 | 57 |
void BlinkenMovieColorize( stBlinkenMovie * pMovie, int channels, int mode ); |
| ... | ... |
@@ -1,6 +1,6 @@ |
| 1 | 1 |
/* BlinkenLib |
| 2 |
- * version 0.6.3 date 2009-12-20 |
|
| 3 |
- * Copyright 2004-2009 Stefan Schuermans <stefan@blinkenarea.org> |
|
| 2 |
+ * version 0.6.4 date 2010-12-13 |
|
| 3 |
+ * Copyright 2004-2010 Stefan Schuermans <stefan@blinkenarea.org> |
|
| 4 | 4 |
* Copyleft: GNU public license - http://www.gnu.org/copyleft/gpl.html |
| 5 | 5 |
* a blinkenarea.org project |
| 6 | 6 |
* |
| ... | ... |
@@ -423,9 +423,9 @@ int main( int argCnt, char * * args ) |
| 423 | 423 |
|
| 424 | 424 |
//print info |
| 425 | 425 |
printf( "BlinkenLib - BlinkenOutput\n" |
| 426 |
- "version 0.6.3 date 2009-12-20\n" |
|
| 426 |
+ "version 0.6.4 date 2010-12-13\n" |
|
| 427 | 427 |
"config "BLINKENLIB_CONFIG"\n" |
| 428 |
- "Copyright 2004-2009 Stefan Schuermans <stefan@blinkenarea.org>\n" |
|
| 428 |
+ "Copyright 2004-2010 Stefan Schuermans <stefan@blinkenarea.org>\n" |
|
| 429 | 429 |
"Copyleft: GNU public license - http://www.gnu.org/copyleft/gpl.html\n" |
| 430 | 430 |
"a blinkenarea.org project\n\n" ); |
| 431 | 431 |
|
| ... | ... |
@@ -1,6 +1,6 @@ |
| 1 | 1 |
/* BlinkenLib |
| 2 |
- * version 0.6.3 date 2009-12-20 |
|
| 3 |
- * Copyright 2004-2009 Stefan Schuermans <stefan@blinkenarea.org> |
|
| 2 |
+ * version 0.6.4 date 2010-12-13 |
|
| 3 |
+ * Copyright 2004-2010 Stefan Schuermans <stefan@blinkenarea.org> |
|
| 4 | 4 |
* Copyleft: GNU public license - http://www.gnu.org/copyleft/gpl.html |
| 5 | 5 |
* a blinkenarea.org project |
| 6 | 6 |
*/ |
| ... | ... |
@@ -350,8 +350,8 @@ int main( int argCnt, char * * args ) |
| 350 | 350 |
|
| 351 | 351 |
//print info |
| 352 | 352 |
printf( "BlinkenLib - BlinkenOutput\n" |
| 353 |
- "version 0.6.0 date 2008-05-15" |
|
| 354 |
- "Copyright 2004-2009 Stefan Schuermans <stefan@blinkenarea.org>\n" |
|
| 353 |
+ "version 0.6.4 date 2010-12-13" |
|
| 354 |
+ "Copyright 2004-2010 Stefan Schuermans <stefan@blinkenarea.org>\n" |
|
| 355 | 355 |
"Copyleft: GNU public license - http://www.gnu.org/copyleft/gpl.html\n" |
| 356 | 356 |
"a blinkenarea.org project\n\n" ); |
| 357 | 357 |
|
| ... | ... |
@@ -1,6 +1,6 @@ |
| 1 | 1 |
/* BlinkenLib |
| 2 |
- * version 0.6.3 date 2009-12-20 |
|
| 3 |
- * Copyright 2004-2009 Stefan Schuermans <stefan@blinkenarea.org> |
|
| 2 |
+ * version 0.6.4 date 2010-12-13 |
|
| 3 |
+ * Copyright 2004-2010 Stefan Schuermans <stefan@blinkenarea.org> |
|
| 4 | 4 |
* Copyleft: GNU public license - http://www.gnu.org/copyleft/gpl.html |
| 5 | 5 |
* a blinkenarea.org project |
| 6 | 6 |
*/ |
| ... | ... |
@@ -32,9 +32,9 @@ int main( int argCnt, char * * args ) |
| 32 | 32 |
|
| 33 | 33 |
//print info |
| 34 | 34 |
printf( "BlinkenLib - BlinkenRecv\n" |
| 35 |
- "version 0.6.3 date 2009-12-20\n" |
|
| 35 |
+ "version 0.6.4 date 2010-12-13\n" |
|
| 36 | 36 |
"config "BLINKENLIB_CONFIG"\n" |
| 37 |
- "Copyright 2004-2009 Stefan Schuermans <stefan@blinkenarea.org>\n" |
|
| 37 |
+ "Copyright 2004-2010 Stefan Schuermans <stefan@blinkenarea.org>\n" |
|
| 38 | 38 |
"Copyleft: GNU public license - http://www.gnu.org/copyleft/gpl.html\n" |
| 39 | 39 |
"a blinkenarea.org project\n\n" ); |
| 40 | 40 |
|
| ... | ... |
@@ -1,6 +1,6 @@ |
| 1 | 1 |
/* BlinkenLib |
| 2 |
- * version 0.6.3 date 2009-12-20 |
|
| 3 |
- * Copyright 2004-2009 Stefan Schuermans <stefan@blinkenarea.org> |
|
| 2 |
+ * version 0.6.4 date 2010-12-13 |
|
| 3 |
+ * Copyright 2004-2010 Stefan Schuermans <stefan@blinkenarea.org> |
|
| 4 | 4 |
* Copyleft: GNU public license - http://www.gnu.org/copyleft/gpl.html |
| 5 | 5 |
* a blinkenarea.org project |
| 6 | 6 |
*/ |
| ... | ... |
@@ -35,9 +35,9 @@ int main( int argCnt, char * * args ) |
| 35 | 35 |
|
| 36 | 36 |
//print info |
| 37 | 37 |
printf( "BlinkenLib - BlinkenSend\n" |
| 38 |
- "version 0.6.3 date 2009-12-20\n" |
|
| 38 |
+ "version 0.6.4 date 2010-12-13\n" |
|
| 39 | 39 |
"config "BLINKENLIB_CONFIG"\n" |
| 40 |
- "Copyright 2004-2009 Stefan Schuermans <stefan@blinkenarea.org>\n" |
|
| 40 |
+ "Copyright 2004-2010 Stefan Schuermans <stefan@blinkenarea.org>\n" |
|
| 41 | 41 |
"Copyleft: GNU public license - http://www.gnu.org/copyleft/gpl.html\n" |
| 42 | 42 |
"a blinkenarea.org project\n\n" ); |
| 43 | 43 |
|
| ... | ... |
@@ -1,6 +1,6 @@ |
| 1 | 1 |
# BlinkenLib |
| 2 |
-# version 0.6.3 date 2009-12-20 |
|
| 3 |
-# Copyright 2004-2009 Stefan Schuermans <stefan@blinkenarea.org> |
|
| 2 |
+# version 0.6.4 date 2010-12-13 |
|
| 3 |
+# Copyright 2004-2010 Stefan Schuermans <stefan@blinkenarea.org> |
|
| 4 | 4 |
# Copyleft: GNU public license - http://www.gnu.org/copyleft/gpl.html |
| 5 | 5 |
# a blinkenarea.org project |
| 6 | 6 |
|
| ... | ... |
@@ -12,7 +12,7 @@ RANLIB=ranlib |
| 12 | 12 |
|
| 13 | 13 |
VERSION_MAJOR=0 |
| 14 | 14 |
VERSION_MINOR=6 |
| 15 |
-VERSION_REVISION=3 |
|
| 15 |
+VERSION_REVISION=4 |
|
| 16 | 16 |
VERSION=$(VERSION_MAJOR).$(VERSION_MINOR).$(VERSION_REVISION) |
| 17 | 17 |
|
| 18 | 18 |
include ../config/config.mk |
| ... | ... |
@@ -1,6 +1,6 @@ |
| 1 | 1 |
/* BlinkenLib |
| 2 |
- * version 0.6.3 date 2009-12-20 |
|
| 3 |
- * Copyright 2004-2009 Stefan Schuermans <stefan@blinkenarea.org> |
|
| 2 |
+ * version 0.6.4 date 2010-12-13 |
|
| 3 |
+ * Copyright 2004-2010 Stefan Schuermans <stefan@blinkenarea.org> |
|
| 4 | 4 |
* Copyleft: GNU public license - http://www.gnu.org/copyleft/gpl.html |
| 5 | 5 |
* a blinkenarea.org project |
| 6 | 6 |
*/ |
| ... | ... |
@@ -1,6 +1,6 @@ |
| 1 | 1 |
/* BlinkenLib |
| 2 |
- * version 0.6.3 date 2009-12-20 |
|
| 3 |
- * Copyright 2004-2009 Stefan Schuermans <stefan@blinkenarea.org> |
|
| 2 |
+ * version 0.6.4 date 2010-12-13 |
|
| 3 |
+ * Copyright 2004-2010 Stefan Schuermans <stefan@blinkenarea.org> |
|
| 4 | 4 |
* Copyleft: GNU public license - http://www.gnu.org/copyleft/gpl.html |
| 5 | 5 |
* a blinkenarea.org project |
| 6 | 6 |
*/ |
| ... | ... |
@@ -1,3 +1,10 @@ |
| 1 |
+0.6.4 2010-12-13 |
|
| 2 |
+---------------- |
|
| 3 |
+automatic version update and packaging from top-level makefile |
|
| 4 |
+new test movie mode "trans" for color transitions |
|
| 5 |
+function for concatenating movies |
|
| 6 |
+new actions "append", "loop", "reverse" and "delete" for BlinkenConv |
|
| 7 |
+ |
|
| 1 | 8 |
0.6.3 2009-12-20 |
| 2 | 9 |
---------------- |
| 3 | 10 |
fixed output of movie format in BlinkenConv print |
| ... | ... |
@@ -1,15 +1,22 @@ |
| 1 | 1 |
# BlinkenLib |
| 2 |
-# version 0.6.3 date 2009-12-20 |
|
| 3 |
-# Copyright 2004-2009 Stefan Schuermans <stefan@blinkenarea.org> |
|
| 2 |
+# version 0.6.4 date 2010-12-13 |
|
| 3 |
+# Copyright 2004-2010 Stefan Schuermans <stefan@blinkenarea.org> |
|
| 4 | 4 |
# Copyleft: GNU public license - http://www.gnu.org/copyleft/gpl.html |
| 5 | 5 |
# a blinkenarea.org project |
| 6 | 6 |
|
| 7 | 7 |
VERSION_MAJOR=0 |
| 8 | 8 |
VERSION_MINOR=6 |
| 9 |
-VERSION_REVISION=3 |
|
| 9 |
+VERSION_REVISION=4 |
|
| 10 | 10 |
VERSION=$(VERSION_MAJOR).$(VERSION_MINOR).$(VERSION_REVISION) |
| 11 | 11 |
|
| 12 |
-.phony: all conf clean distclean install uninstall |
|
| 12 |
+DATE:=$(shell date +%Y-%m-%d) |
|
| 13 |
+YEAR:=$(shell date +%Y) |
|
| 14 |
+ |
|
| 15 |
+UPDATE_FILES=Makefile */Makefile */*.c */*.h |
|
| 16 |
+PACK_FILES=BlinkenLib ChangeLog config examples install Makefile |
|
| 17 |
+ |
|
| 18 |
+.PHONY: all conf clean distclean install uninstall update pack |
|
| 19 |
+.SUFFIXES: |
|
| 13 | 20 |
|
| 14 | 21 |
all: conf |
| 15 | 22 |
$(MAKE) -C BlinkenLib all |
| ... | ... |
@@ -22,6 +29,7 @@ clean: conf |
| 22 | 29 |
|
| 23 | 30 |
distclean: clean |
| 24 | 31 |
$(MAKE) -C config clean |
| 32 |
+ rm -rf tmp |
|
| 25 | 33 |
|
| 26 | 34 |
install: all |
| 27 | 35 |
$(MAKE) -C install install |
| ... | ... |
@@ -29,3 +37,17 @@ install: all |
| 29 | 37 |
uninstall: |
| 30 | 38 |
$(MAKE) -C install uninstall |
| 31 | 39 |
|
| 40 |
+update: distclean |
|
| 41 |
+ sed -i "s/version [0-9.]* date [0-9-]*/version $(VERSION) date $(DATE)/" $(UPDATE_FILES) |
|
| 42 |
+ sed -i "s/\(Copyright [0-9]*-\)[0-9]*/\1$(YEAR)/" $(UPDATE_FILES) |
|
| 43 |
+ sed -i "s/^VERSION_MAJOR=.*$$/VERSION_MAJOR=$(VERSION_MAJOR)/" $(UPDATE_FILES) |
|
| 44 |
+ sed -i "s/^VERSION_MINOR=.*$$/VERSION_MINOR=$(VERSION_MINOR)/" $(UPDATE_FILES) |
|
| 45 |
+ sed -i "s/^VERSION_REVISION=.*$$/VERSION_REVISION=$(VERSION_REVISION)/" $(UPDATE_FILES) |
|
| 46 |
+ |
|
| 47 |
+pack: update |
|
| 48 |
+ mkdir -p pack |
|
| 49 |
+ mkdir -p tmp/BlinkenLib-$(VERSION)_$(DATE) |
|
| 50 |
+ cp -r $(PACK_FILES) tmp/BlinkenLib-$(VERSION)_$(DATE) |
|
| 51 |
+ tar -C tmp -jcf pack/BlinkenLib-$(VERSION)_$(DATE).tar.bz2 BlinkenLib-$(VERSION)_$(DATE) |
|
| 52 |
+ rm -rf tmp |
|
| 53 |
+ |
| ... | ... |
@@ -1,6 +1,6 @@ |
| 1 | 1 |
# BlinkenLib |
| 2 |
-# version 0.6.3 date 2009-12-20 |
|
| 3 |
-# Copyright 2004-2008 Stefan Schuermans <stefan@blinkenarea.org> |
|
| 2 |
+# version 0.6.4 date 2010-12-13 |
|
| 3 |
+# Copyright 2004-2010 Stefan Schuermans <stefan@blinkenarea.org> |
|
| 4 | 4 |
# Copyleft: GNU public license - http://www.gnu.org/copyleft/gpl.html |
| 5 | 5 |
# a blinkenarea.org project |
| 6 | 6 |
|
| ... | ... |
@@ -1,6 +1,6 @@ |
| 1 | 1 |
# BlinkenLib |
| 2 |
-# version 0.6.3 date 2009-12-20 |
|
| 3 |
-# Copyright 2004-2009 Stefan Schuermans <stefan@blinkenarea.org> |
|
| 2 |
+# version 0.6.4 date 2010-12-13 |
|
| 3 |
+# Copyright 2004-2010 Stefan Schuermans <stefan@blinkenarea.org> |
|
| 4 | 4 |
# Copyleft: GNU public license - http://www.gnu.org/copyleft/gpl.html |
| 5 | 5 |
# a blinkenarea.org project |
| 6 | 6 |
|
| ... | ... |
@@ -8,7 +8,7 @@ INSTALL=install |
| 8 | 8 |
|
| 9 | 9 |
VERSION_MAJOR=0 |
| 10 | 10 |
VERSION_MINOR=6 |
| 11 |
-VERSION_REVISION=3 |
|
| 11 |
+VERSION_REVISION=4 |
|
| 12 | 12 |
VERSION=$(VERSION_MAJOR).$(VERSION_MINOR).$(VERSION_REVISION) |
| 13 | 13 |
|
| 14 | 14 |
include ../config/config.mk |
| 15 | 15 |