#N canvas 475 510 682 509 10;
#X declare -lib Gem;
#X text 433 9 GEM object;
#X obj 9 415 cnv 15 430 30 empty empty empty 20 12 0 14 #bcbcbc #404040 0;
#X text 18 414 Arguments:;
#X obj 8 56 cnv 15 430 350 empty empty empty 20 12 0 14 #e0e0e0 #404040 0;
#X obj 449 53 cnv 15 170 410 empty empty empty 20 12 0 14 #dce4fc #404040 0;
#X text 453 36 Example:;
#X obj 479 419 cnv 15 100 60 empty empty empty 20 12 0 14 #bcbcbc #404040 0;
#X obj 451 166 cnv 15 167 250 empty empty empty 20 12 0 14 #14e814 #404040 0;
#X obj 451 59 gemhead;
#X text 64 425 <none>;
#X text 50 12 Synopsis: [pix_record];
#X text 71 31 Class: pix object (output);
#X obj 451 363 pix_record;
#X text 18 114 You can choose the codec you want to use either via a graphical dialog or by directly sending a "codec" with either the name or the enumeration number of the codec. Use "codeclist" to query the available codecs \, their names and their number., f 69;
#X obj 470 315 cnv 15 145 25 empty empty empty 20 12 0 14 #d8fcd8 #404040 0;
#X msg 480 319 bang;
#X msg 552 319 auto \$1;
#X obj 533 320 tgl 15 0 empty empty empty 0 -6 0 8 #fcfcfc #000000 #000000 0 1;
#X obj 470 171 cnv 15 145 65 empty empty empty 20 12 0 14 #d8fcd8 #404040 0;
#X msg 476 196 codeclist;
#X msg 472 175 dialog;
#X obj 460 243 cnv 15 155 65 empty empty empty 20 12 0 14 #d8fcd8 #404040 0;
#X msg 463 264 file /tmp/mymovie.mov;
#X obj 464 245 bng 15 250 50 0 empty empty empty 0 -6 0 8 #fc2828 #000000 #000000;
#N canvas 0 0 450 300 savepanel 0;
#X obj 114 62 inlet;
#X obj 114 254 outlet;
#X obj 114 199 t b a;
#X obj 114 125 savepanel;
#X msg 114 162 set file \$1;
#X connect 0 0 3 0;
#X connect 2 0 1 0;
#X connect 2 1 1 0;
#X connect 3 0 4 0;
#X connect 4 0 2 0;
#X restore 484 244 pd savepanel;
#X msg 540 287 record \$1;
#X obj 520 289 tgl 15 0 empty \$0-record empty 0 -6 0 8 #fcfcfc #000000 #000000 0 1;
#X text 18 174 When file and codec are specified \, you can open the writing connection with the message "record 1"., f 69;
#X text 18 212 To actually do record a frame into the file \, send the object a "bang" message. If you want to record a consecutive number of frames \, use the "auto" message. This allows you to have full control on which frames are to be recorded., f 69;
#X text 525 125 (monitoring);
#X obj 8 454 cnv 15 430 30 empty empty empty 20 12 0 14 #e0e0e0 #404040 0;
#N canvas 6 49 459 361 MESSAGES 0;
#X obj 9 15 cnv 15 430 340 empty empty empty 20 12 0 14 #e0e0e0 #404040 0;
#X text 34 17 Inlets:;
#X text 34 293 Outlets:;
#X text 12 307 Outlet 1: gemlist;
#X text 18 31 Inlet 1: gemlist;
#X text 18 50 Inlet 1: file <filename>: specify the file for writing;
#X text 18 62 Inlet 1: record <0|1>: start recording (no actual grabbing is done!) or stop recording (flush movie to disk);
#X text 18 91 Inlet 1: bang: grab the next incoming pix.;
#X text 18 103 Inlet 1: auto <0|1>: start/stop grabbing all incoming pixes;
#X text 12 321 Outlet 2: number of frames written;
#X text 12 335 Outlet 3: info on available codecs/properties;
#X text 18 148 Inlet 1: codeclist: enumerate a list of available codecs to the outlet#3;
#X text 18 178 Inlet 1: codec <int>: select codec #<int> from the codec-list (and enumerate codec-properties to outlet#3);
#X text 18 203 Inlet 1: codec <symbol>: select codec by short name (and enumerate codec-properties to outlet#3);
#X text 18 233 Inlet 1: set <symbol> <float>: set a property named <symbol> to the value <float>. properties are persistent across codec-changes. properties unknown to the currently selected coded are ignored.;
#X text 18 123 Inlet 1: dialog: popup a dialog to select the codec (if available);
#X restore 83 460 pd MESSAGES;
#X floatatom 479 387 3 0 0 0 - - - 0;
#X msg 532 216 codec mjpa;
#X msg 552 197 codec 3;
#N canvas 129 512 599 344 PROPERTIES 0;
#N canvas 607 622 561 319 PropertyLogic 0;
#X obj 54 6 inlet;
#X obj 293 70 r \$0-info;
#X obj 54 45 route codeclist codec;
#X obj 126 67 f;
#N canvas 82 113 577 363 codecs 0;
#X obj 54 222 i;
#X text 90 229 numcodecs;
#X obj 241 132 max;
#X obj 241 154 t f f;
#X obj 54 8 inlet bang;
#X obj 241 47 inlet info;
#X obj 241 69 route codec;
#X obj 241 91 unpack 0 s;
#X msg 154 76 0;
#N canvas 504 68 565 365 id2name 0;
#X obj 95 197 list prepend;
#X obj 95 176 t b f;
#X obj 95 219 list split;
#X obj 195 286 symbol;
#X msg 195 261 symbol \$1;
#X obj 95 91 route float;
#X obj 128 238 route bang;
#X obj 95 69 inlet ID;
#X obj 338 77 route reset;
#X obj 338 55 inlet name#N | reset;
#X obj 412 128 list prepend;
#X obj 412 150 t l l;
#X obj 195 308 outlet name;
#X obj 412 107 symbol;
#X obj 338 99 t b;
#X connect 0 0 2 0;
#X connect 1 0 0 0;
#X connect 1 1 2 1;
#X connect 2 1 6 0;
#X connect 3 0 12 0;
#X connect 4 0 3 0;
#X connect 5 0 1 0;
#X connect 6 1 4 0;
#X connect 7 0 5 0;
#X connect 8 0 14 0;
#X connect 8 1 13 0;
#X connect 9 0 8 0;
#X connect 10 0 11 0;
#X connect 11 0 0 1;
#X connect 11 1 10 1;
#X connect 13 0 10 0;
#X connect 14 0 11 0;
#X restore 347 249 pd id2name;
#X obj 154 54 t b b;
#X msg 347 220 reset;
#X obj 77 76 s \$0-ctl;
#X msg 77 53 codeclist;
#X obj 54 30 t b b b;
#X obj 434 41 inlet query;
#X obj 434 63 t f;
#X obj 54 311 s \$0-numcodecs;
#X obj 347 292 s \$0-numcodecs;
#X msg 347 271 label \$1;
#X msg 146 113 label;
#X msg 54 292 set 0 \, number \$1;
#X connect 0 0 21 0;
#X connect 2 0 3 0;
#X connect 3 0 0 1;
#X connect 3 1 2 1;
#X connect 4 0 14 0;
#X connect 5 0 6 0;
#X connect 6 0 7 0;
#X connect 7 0 2 0;
#X connect 7 1 9 1;
#X connect 8 0 3 0;
#X connect 9 0 19 0;
#X connect 10 0 8 0;
#X connect 10 1 11 0;
#X connect 10 1 20 0;
#X connect 11 0 9 0;
#X connect 13 0 12 0;
#X connect 14 0 0 0;
#X connect 14 1 13 0;
#X connect 14 2 10 0;
#X connect 15 0 16 0;
#X connect 16 0 9 0;
#X connect 19 0 18 0;
#X connect 20 0 18 0;
#X connect 21 0 17 0;
#X restore 77 210 pd codecs;
#N canvas 1512 420 639 552 properties 0;
#X obj 283 56 inlet info;
#X obj 66 57 inlet codec;
#X msg 66 137 codec \$1;
#X obj 66 79 route float;
#X obj 66 159 s \$0-ctl;
#N canvas 506 60 565 365 id2name 0;
#X obj 95 197 list prepend;
#X obj 95 176 t b f;
#X obj 95 219 list split;
#X obj 195 286 symbol;
#X msg 195 261 symbol \$1;
#X obj 95 91 route float;
#X obj 128 238 route bang;
#X obj 95 69 inlet ID;
#X obj 338 77 route reset;
#X obj 338 55 inlet name#N | reset;
#X obj 412 128 list prepend;
#X obj 412 150 t l l;
#X obj 195 308 outlet name;
#X obj 412 107 symbol;
#X obj 338 99 t b;
#X connect 0 0 2 0;
#X connect 1 0 0 0;
#X connect 1 1 2 1;
#X connect 2 1 6 0;
#X connect 3 0 12 0;
#X connect 4 0 3 0;
#X connect 5 0 1 0;
#X connect 6 1 4 0;
#X connect 7 0 5 0;
#X connect 8 0 14 0;
#X connect 8 1 13 0;
#X connect 9 0 8 0;
#X connect 10 0 11 0;
#X connect 11 0 0 1;
#X connect 11 1 10 1;
#X connect 13 0 10 0;
#X connect 14 0 11 0;
#X restore 347 249 pd id2name;
#X msg 347 200 reset;
#X msg 301 249 label;
#X obj 66 101 t b f b;
#X msg 347 271 label \$1;
#X obj 301 200 t b b;
#X obj 283 79 route numprops property;
#X obj 236 354 s \$0-numproperties;
#X msg 236 326 number \$1 \, set 0;
#X obj 283 100 t f;
#X obj 507 250 r \$0-selprop;
#X obj 507 277 route float;
#X obj 342 459 s \$0-makeprop;
#X msg 342 437 set set \$1 \, adddollar 1;
#X obj 507 299 t f f;
#N canvas 505 64 565 365 id2name 0;
#X obj 95 197 list prepend;
#X obj 95 176 t b f;
#X obj 95 219 list split;
#X obj 95 91 route float;
#X obj 128 238 route bang;
#X obj 95 69 inlet ID;
#X obj 338 77 route reset;
#X obj 338 55 inlet name#N | reset;
#X obj 412 128 list prepend;
#X obj 412 150 t l l;
#X obj 195 308 outlet name;
#X obj 412 107 symbol;
#X obj 338 99 t b;
#X obj 195 286 symbol;
#X msg 195 261 symbol \$1;
#X connect 0 0 2 0;
#X connect 1 0 0 0;
#X connect 1 1 2 1;
#X connect 2 1 4 0;
#X connect 3 0 1 0;
#X connect 4 1 14 0;
#X connect 5 0 3 0;
#X connect 6 0 12 0;
#X connect 6 1 11 0;
#X connect 7 0 6 0;
#X connect 8 0 9 0;
#X connect 9 0 0 1;
#X connect 9 1 8 1;
#X connect 11 0 8 0;
#X connect 12 0 9 0;
#X connect 13 0 10 0;
#X connect 14 0 13 0;
#X restore 427 249 pd id2name;
#X obj 347 222 t a a;
#X obj 397 126 list;
#X msg 397 181 symbol \$1(\$2:\$3);
#X obj 397 149 t l s;
#X connect 0 0 11 0;
#X connect 1 0 3 0;
#X connect 2 0 4 0;
#X connect 3 0 8 0;
#X connect 5 0 9 0;
#X connect 6 0 21 0;
#X connect 7 0 12 0;
#X connect 8 1 2 0;
#X connect 8 2 10 0;
#X connect 9 0 12 0;
#X connect 10 0 7 0;
#X connect 10 1 6 0;
#X connect 11 0 14 0;
#X connect 11 1 22 0;
#X connect 13 0 12 0;
#X connect 14 0 13 0;
#X connect 15 0 16 0;
#X connect 16 0 19 0;
#X connect 18 0 17 0;
#X connect 19 0 5 0;
#X connect 19 1 20 0;
#X connect 20 0 18 0;
#X connect 21 0 5 1;
#X connect 21 1 20 1;
#X connect 22 0 24 0;
#X connect 23 0 5 1;
#X connect 24 0 23 0;
#X connect 24 1 20 1;
#X restore 254 200 pd properties;
#X obj 126 95 t b f f b;
#X msg 186 116 2;
#X obj 293 92 list prepend 0;
#X msg 100 159 1;
#X obj 293 134 route 0 1 2;
#X obj 54 137 t b b b;
#X msg 54 159 0;
#X obj 100 181 t f;
#X msg 126 117 0;
#X obj 126 139 t f;
#X obj 293 156 s \$0-infoprint;
#N canvas 4 49 450 300 reset 0;
#X obj 99 217 s \$0-numcodecs;
#X obj 99 195 t a a;
#X obj 219 217 s \$0-numproperties;
#X obj 99 28 inlet;
#X obj 99 50 t b b;
#X msg 99 173 number 0 \, label;
#X obj 270 180 s \$0-makeprop;
#X msg 270 154 set;
#X connect 1 0 0 0;
#X connect 1 1 2 0;
#X connect 3 0 4 0;
#X connect 4 0 5 0;
#X connect 4 1 7 0;
#X connect 5 0 1 0;
#X connect 7 0 6 0;
#X restore 174 266 pd reset;
#X msg 174 246 bang;
#X text 219 242 <-- clear for saving;
#X connect 0 0 2 0;
#X connect 1 0 8 0;
#X connect 2 0 11 0;
#X connect 2 1 3 0;
#X connect 3 0 6 0;
#X connect 6 0 14 0;
#X connect 6 1 5 0;
#X connect 6 2 4 2;
#X connect 6 3 7 0;
#X connect 7 0 15 0;
#X connect 8 0 10 0;
#X connect 9 0 13 0;
#X connect 10 0 16 0;
#X connect 10 1 4 1;
#X connect 10 2 5 1;
#X connect 11 0 12 0;
#X connect 11 1 4 0;
#X connect 11 2 9 0;
#X connect 12 0 13 0;
#X connect 13 0 8 1;
#X connect 14 0 15 0;
#X connect 15 0 8 1;
#X connect 18 0 17 0;
#X restore 68 299 pd PropertyLogic;
#X msg 68 25 codeclist;
#X text 142 25 INIT: query all available codecs;
#X msg 96 275 set framerate \$1;
#X floatatom 96 257 3 0 100 0 - - - 0;
#X obj 82 71 cnv 15 100 60 empty empty empty 20 12 0 14 #e0e0e0 #404040 0;
#X obj 87 88 hradio 15 1 0 1 empty \$0-numcodecs empty 0 -8 0 10 #fcfcfc #000000 #000000 0;
#X msg 87 108 codec \$1;
#X obj 82 152 cnv 15 200 90 empty empty empty 20 12 0 14 #e0e0e0 #404040 0;
#X obj 87 181 hradio 15 1 0 1 \$0-selprop \$0-numproperties empty 0 -8 0 10 #fcfcfc #000000 #000000 0;
#X msg 87 217;
#X floatatom 87 197 0 0 0 0 - \$0-propvalue - 0;
#X obj 297 199 r \$0-makeprop;
#X text 121 257 override the framerate (default: Gem's framerate);
#X text 82 149 set a codec-property:;
#X text 86 51 select an available codec (and query available properties):;
#X connect 1 0 0 0;
#X connect 3 0 0 0;
#X connect 4 0 3 0;
#X connect 6 0 7 0;
#X connect 7 0 0 0;
#X connect 10 0 0 0;
#X connect 11 0 10 0;
#X connect 12 0 10 0;
#X restore 243 460 pd PROPERTIES;
#X obj 553 345 r \$0-ctl;
#N canvas 6 49 515 369 print 0;
#X obj 102 176 inlet;
#X obj 102 198 s \$0-info;
#X obj 102 220 r \$0-infoprint;
#X obj 102 242 print INFO;
#X text 62 90 actually you can just hook a [print] to the 3rd outlet.;
#X text 64 115 here it's a bit more complicated \, as we want to filter out the messages generated from the [pd PROPERTIES] window.;
#X obj 272 179 r \$0-ctl;
#X obj 272 202 route record;
#X obj 272 225 route float;
#X msg 272 248 set \$1;
#X obj 272 271 s \$0-record;
#X connect 0 0 1 0;
#X connect 2 0 3 0;
#X connect 6 0 7 0;
#X connect 7 0 8 0;
#X connect 8 0 9 0;
#X connect 9 0 10 0;
#X restore 508 386 pd print;
#N canvas 484 243 450 300 META 0;
#X obj 10 25 declare -lib Gem;
#X text 10 45 DESCRIPTION output sequences of pixes;
#X text 10 65 KEYWORDS Gem pix image;
#X text 20 85 INLET_0 gemlist file record bang auto dialog codeclist codec set;
#X text 20 105 OUTLET_0 gemlist;
#X text 20 125 OUTLET_1 number;
#X text 20 145 OUTLET_2 info;
#X text 10 165 AUTHOR IOhannes m zmölnig;
#X text 10 185 LICENSE GPL v2;
#X restore 518 8 pd META;
#X text 29 57 Description: output sequences of pixes;
#X text 13 73 [pix_record] outputs a series of pixes \, e.g. into a movie file. You can set the file to write to via the "file" message., f 70;
#X text 14 331 [pix_record] has a number of output methods \, like movies \, pipes or videodevices. Not all may be available on your system. Check here which backends you can use:, f 70;
#X text 17 273 The recording is finished and the file flushed to disk after a "record 0" message is received. You might not be able to access the file for reading before recording has finished., f 69;
#X obj 197 366 _backendinfo \$0 record;
#X obj 451 87 pix_test 720 468;
#X obj 451 140 _pix2rectangle 3;
#X text 515 72 (some input);
#X obj 484 425 _gemwin;
#X obj 472 216 s \$0-ctl;
#X obj 463 287 s \$0-ctl;
#X connect 8 0 44 0;
#X connect 12 1 32 0;
#X connect 12 2 37 0;
#X connect 15 0 12 0;
#X connect 16 0 12 0;
#X connect 17 0 16 0;
#X connect 19 0 48 0;
#X connect 20 0 48 0;
#X connect 22 0 49 0;
#X connect 23 0 24 0;
#X connect 24 0 22 0;
#X connect 25 0 49 0;
#X connect 26 0 25 0;
#X connect 33 0 48 0;
#X connect 34 0 48 0;
#X connect 36 0 12 0;
#X connect 44 0 45 0;
#X connect 45 0 12 0;
