I tried to make very crude patch (attached), it seems to work but may be
you dislike double directory creation (first pathname + "_" dir, then
"/Proxy/" inside it?) feel free to simplify...
diff --git a/cinelerra-5.1/cinelerra/proxy.C b/cinelerra-5.1/cinelerra/proxy.C
index 0012fd19..dd47a384 100644
--- a/cinelerra-5.1/cinelerra/proxy.C
+++ b/cinelerra-5.1/cinelerra/proxy.C
@@ -207,7 +207,12 @@ void ProxyRender::to_proxy_path(char *new_path, Indexable *indexable, int scale)
sprintf(new_path, "%s/%s", proxy_path, ifn);
}
else
- strcpy(new_path, indexable->path);
+ { strcpy(new_path, indexable->path);
+ strcat(new_path, "_");
+ if(mkdir(new_path, 0700)) printf("mkdir 1 err! \n");
+ strcat(new_path, "/Proxy/");
+ if(mkdir(new_path, 0700)) printf("mkdir err!\n");
+ strcat(new_path, basename(indexable->path)); }
char prxy[BCSTRLEN];
int n = sprintf(prxy, ".proxy%d", scale);
// insert proxy, path.sfx => path.proxy#-sfx.ext
@@ -229,7 +234,7 @@ void ProxyRender::to_proxy_path(char *new_path, Indexable *indexable, int scale)
File::get_tag(format_asset->format);
while( *ext ) *ep++ = *ext++;
*ep = 0;
-//printf("ProxyRender::to_proxy_path %d %s %s\n", __LINE__, new_path), asset->path);
+//printf("ProxyRender::to_proxy_path %d %s %s\n", __LINE__, new_path, indexable->path);
}
int ProxyRender::from_proxy_path(char *new_path, Asset *asset, int scale)
@@ -237,6 +242,9 @@ int ProxyRender::from_proxy_path(char *new_path, Asset *asset, int scale)
char prxy[BCTEXTLEN];
int n = sprintf(prxy, ".proxy%d", scale);
strcpy(new_path, asset->path);
+ strcpy(new_path, "_");
+ strcat(new_path, "/Proxy/");
+ strcat(new_path, basename(asset->path));
char *ptr = strstr(new_path, prxy);
if( !ptr || (ptr[n] != '-' && ptr[n] != '.') ) return 1;
// remove proxy, path.proxy#-sfx.ext => path.sfx
--
Cin mailing list
[email protected]
https://lists.cinelerra-gg.org/mailman/listinfo/cin