RFX-GIMP

Check-in [f3d192ee3d]
Login

Many hyperlinks are disabled.
Use anonymous login to enable hyperlinks.

Overview
Comment:Experimenting with using a 'shm' (tmpfs) for ex/importing GAP clips (requires 'sudo' privileges to 'mount').
Timelines: family | ancestors | gap-shm
Files: files | file ages | folders
SHA1:f3d192ee3df6ee957b6285e37c2105f4a72326bd
User & Date: saul 2012-05-03 19:08:29
Context
2012-05-03
19:08
Experimenting with using a 'shm' (tmpfs) for ex/importing GAP clips (requires 'sudo' privileges to 'mount'). Leaf check-in: f3d192ee3d user: saul tags: gap-shm
19:06
Create new branch named "gap-shm" check-in: e7c2f4d3f3 user: saul tags: gap-shm
Changes
Hide Diffs Unified Diffs Ignore Whitespace Patch

Changes to effects/gap-edit.init.

193
194
195
196
197
198
199

200
201
202
203
204
205
206
207
208
209




210
211
212
213
214
215
216
            (set! value (if (and period (>= (+ value delta) (+ start period)))
                          (- (+ value delta) period)
                          (+ value delta) ))
            temp ))))
    )
  }
  );


$rfx_gap_dir = $curtmpdir . "/gap-clip";
if (-d $rfx_gap_dir) {
  &sig_error("Clip buffer already exists",
             "Perhaps clip is in use?",
             "Run GAP Cleanup utility before continuing");
  }
else {
  mkdir $rfx_gap_dir or &sig_error("Could not create directory", $rfx_gap_dir);
  };




for ($i = $start; $i <= $end; $i++) {
  $gap_frame=&mkname($i);
  &rfx_sendmsg( qq{
    (begin
      (let* ((input-file (string-append "$curtmpdir" DIR-SEPARATOR "$gap_frame" "$img_ext"))
             (image (car (gimp-file-load RUN-NONINTERACTIVE input-file input-file)))
             (layer (car (gimp-image-get-active-layer image)))







>










>
>
>
>







193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
            (set! value (if (and period (>= (+ value delta) (+ start period)))
                          (- (+ value delta) period)
                          (+ value delta) ))
            temp ))))
    )
  }
  );


$rfx_gap_dir = $curtmpdir . "/gap-clip";
if (-d $rfx_gap_dir) {
  &sig_error("Clip buffer already exists",
             "Perhaps clip is in use?",
             "Run GAP Cleanup utility before continuing");
  }
else {
  mkdir $rfx_gap_dir or &sig_error("Could not create directory", $rfx_gap_dir);
  };
if (($rfx_gap_tmpfs == 1) && ($end - $start < 500)) {
  system ("sudo", "mount", "-t", "tmpfs", "tmpfs", "$rfx_gap_dir");
  };

for ($i = $start; $i <= $end; $i++) {
  $gap_frame=&mkname($i);
  &rfx_sendmsg( qq{
    (begin
      (let* ((input-file (string-append "$curtmpdir" DIR-SEPARATOR "$gap_frame" "$img_ext"))
             (image (car (gimp-file-load RUN-NONINTERACTIVE input-file input-file)))
             (layer (car (gimp-image-get-active-layer image)))

Changes to effects/gap-edit.post.

1
2
3
4




5
6



use File::Path;
my $rfx_gap_dir = "./gap-clip";
#-- remove the GAP directory
if (-d $rfx_gap_dir) {




  rmtree($rfx_gap_dir);
  };







>
>
>
>
|
|
>
>
>
1
2
3
4
5
6
7
8
9
10
11
12
13
use File::Path;
my $rfx_gap_dir = "./gap-clip";
#-- remove the GAP directory
if (-d $rfx_gap_dir) {
  if (`mount | grep gap-clip`) {
    system ("sudo", "umount", "$rfx_gap_dir");
    }
  else {
    rmtree($rfx_gap_dir);
    };
  };