[gegl] search and replace gedl with gcut
- From: Øyvind Kolås <ok src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gegl] search and replace gedl with gcut
- Date: Fri, 14 Jul 2017 19:23:27 +0000 (UTC)
commit 874d0624746273daeb68de81339fc3f4c6346be3
Author: Øyvind Kolås <pippin gimp org>
Date: Thu Jul 13 20:08:01 2017 +0200
search and replace gedl with gcut
gcut/Makefile.am | 11 ++-
gcut/clip.c | 6 +-
gcut/default.edl | 4 +-
gcut/{gedl-ui.c => gcut-ui.c} | 154 ++++++++++++++--------------
gcut/{gedl.c => gcut.c} | 228 ++++++++++++++++++++--------------------
gcut/{gedl.h => gcut.h} | 66 ++++++------
gcut/renderer.c | 14 ++--
7 files changed, 243 insertions(+), 240 deletions(-)
---
diff --git a/gcut/Makefile.am b/gcut/Makefile.am
index e6ccedb..72721bf 100644
--- a/gcut/Makefile.am
+++ b/gcut/Makefile.am
@@ -2,6 +2,8 @@ if OS_WIN32
no_undefined = -no-undefined
endif
+EXTRA_DIST = default.edl default.edl.inc
+
AM_CPPFLAGS = \
-I$(top_srcdir) \
-I$(top_builddir)/gegl \
@@ -19,7 +21,8 @@ AM_CPPFLAGS = \
-I$(top_builddir)/gegl/process \
-I$(top_srcdir)/gegl/process \
-I$(top_builddir)/gegl/property-types \
- -I$(top_srcdir)/gegl/property-types
+ -I$(top_srcdir)/gegl/property-types \
+ -Wno-missing-prototypes
AM_CFLAGS = \
$(DEP_CFLAGS) $(BABL_CFLAGS) $(PNG_CFLAGS) \
@@ -41,8 +44,8 @@ default.edl.inc: default.edl
sed 's/$$/\\n"/' > $@
gcut_SOURCES = \
- gedl.c \
- gedl.h \
+ gcut.c \
+ gcut.h \
renderer.c \
iconographer.c \
clip.c
@@ -51,7 +54,7 @@ gcut_SOURCES = \
if HAVE_MRG
if HAVE_GEXIV2
if HAVE_SDL
-gcut_SOURCES += gedl-ui.c
+gcut_SOURCES += gcut-ui.c
AM_CFLAGS += $(SDL_CFLAGS)
AM_LDFLAGS += $(SDL_LIBS)
endif
diff --git a/gcut/clip.c b/gcut/clip.c
index 4a509cf..f7fc703 100644
--- a/gcut/clip.c
+++ b/gcut/clip.c
@@ -4,7 +4,7 @@
#include <stdio.h>
#include <gegl.h>
#include <gegl-audio-fragment.h>
-#include "gedl.h"
+#include "gcut.h"
Clip *clip_new (GeglEDL *edl)
{
@@ -244,7 +244,7 @@ static void clip_set_proxied (Clip *clip)
if (clip->edl->use_proxies)
{
- char *path = gedl_make_proxy_path (clip->edl, clip->path);
+ char *path = gcut_make_proxy_path (clip->edl, clip->path);
gchar *old = NULL;
gegl_node_get (clip->proxy_loader, "path", &old, NULL);
@@ -421,7 +421,7 @@ gchar *clip_get_frame_hash (Clip *clip, int clip_frame_no)
int is_static_source = clip_is_static_source (clip);
frame_recipe = g_strdup_printf ("%s: %s %i %s %ix%i",
- "gedl-pre-4",
+ "gcut-pre-4",
clip_get_path (clip),
clip->filter_graph || (!is_static_source) ? clip_frame_no : 0,
clip->filter_graph,
diff --git a/gcut/default.edl b/gcut/default.edl
index 089269b..1e7b129 100644
--- a/gcut/default.edl
+++ b/gcut/default.edl
@@ -1,6 +1,6 @@
proxy-width=320
proxy-height=240
-output-path=gedl.mp4
+output-path=gcut.mp4
video-width=800
video-height=600
fps=25.000000
@@ -11,7 +11,7 @@ t0=56.702866
frame-no=291
gegl:color value=black gegl:crop width=400 height=400 31 50 --
-gegl:color opi=0:0 gegl:crop opi=0:0 width=400 height=400 0 50 -- [fade=26] svg:src-over opi=0:0 aux=[
gegl:text opi=0:0 string='note: this is a gedl video\nproject for testing features\nit relies on synthetic
GEGL\npatterns instead of\nvideo footage\nto be to minimie size\nfor inclusion in gedl sources\nbeing able to
create this project \nfrom scratch in the gcut ui\nis a current goal.' size=0.071811296045780182rel
color='rgb(1.0000, 1.0000, 1.0000)' width=3 height=1 gegl:translate opi=0:0 x=0.10000000000000001rel
y=0.051874876022338867rel ]
+gegl:color opi=0:0 gegl:crop opi=0:0 width=400 height=400 0 50 -- [fade=26] svg:src-over opi=0:0 aux=[
gegl:text opi=0:0 string='note: this is a gcut video\nproject for testing features\nit relies on synthetic
GEGL\npatterns instead of\nvideo footage\nto be to minimie size\nfor inclusion in gcut sources\nbeing able to
create this project \nfrom scratch in the gcut ui\nis a current goal.' size=0.071811296045780182rel
color='rgb(1.0000, 1.0000, 1.0000)' width=3 height=1 gegl:translate opi=0:0 x=0.10000000000000001rel
y=0.051874876022338867rel ]
-- #annotations
gegl:color opi=0:0 gegl:crop opi=0:0 width=400 height=400 reset-origin=true 0 80 -- svg:src-over opi=0:0
aux=[ gegl:text opi=0:0 string='gcut' font='sans' size=0.20000000000000001rel color='rgb(1.0000, 1.0000,
1.0000)' width=1 height=1 gegl:gaussian-blur opi=0:0 std-dev-x={ 0.000000=0.400000rel 64.000000=0.000084rel
} std-dev-y={ 0.000000=0.200000rel } clip-extent=false gegl:translate opi=0:0 x=0.10000000000000001rel
y=0.3304142951965332rel ] gegl:lens-flare opi=0:0 pos-x={ 0.000000=-2.000000 60.000000=0.293004
100.000000=2.000000 } pos-y={ 0.000000=0.100000 60.000000=0.360697 100.000000=0.910000 }
gegl:color opi=0:0 gegl:crop opi=0:0 width=400 height=400 0 50 -- [fade=64] svg:src-over opi=0:0 aux=[
gegl:text opi=0:0 string='video editing\nfileformat+render / ui' size=0.10000000000000001rel
color='rgb(1.0000, 1.0000, 1.0000)' width=1 height=1 gegl:translate opi=0:0 x=0.10000000000000001rel
y=0.55924856662750244rel ]
diff --git a/gcut/gedl-ui.c b/gcut/gcut-ui.c
similarity index 95%
rename from gcut/gedl-ui.c
rename to gcut/gcut-ui.c
index 455f578..5d9012f 100644
--- a/gcut/gedl-ui.c
+++ b/gcut/gcut-ui.c
@@ -8,7 +8,7 @@
#include <stdio.h>
#include <mrg.h>
#include <gegl.h>
-#include "gedl.h"
+#include "gcut.h"
#include <gegl-paramspecs.h>
static int exited = 0;
@@ -180,7 +180,7 @@ static void insert_clip (GeglEDL *edl, const char *path,
}
else
{
- gedl_get_video_info (path, &duration, NULL);
+ gcut_get_video_info (path, &duration, NULL);
out = duration;
}
if (out < in)
@@ -189,14 +189,14 @@ static void insert_clip (GeglEDL *edl, const char *path,
clip = clip_new_full (edl, path, in, out);
clip->title = g_strdup (basename (path));
int clip_frame_no;
- cur_clip = gedl_get_clip (edl, edl->frame_no, &clip_frame_no);
+ cur_clip = gcut_get_clip (edl, edl->frame_no, &clip_frame_no);
if (empty_selection (edl))
{
- gedl_get_duration (edl);
+ gcut_get_duration (edl);
if (edl->frame_no != cur_clip->abs_start)
{
- gedl_get_duration (edl);
+ gcut_get_duration (edl);
clip_split (cur_clip, clip_frame_no);
cur_clip = edl_get_clip_for_frame (edl, edl->frame_no);
}
@@ -213,12 +213,12 @@ static void insert_clip (GeglEDL *edl, const char *path,
sin = edl->selection_end;
}
int cur_clip_frame_no;
- cur_clip = gedl_get_clip (edl, sin, &cur_clip_frame_no);
+ cur_clip = gcut_get_clip (edl, sin, &cur_clip_frame_no);
clip_split (cur_clip, cur_clip_frame_no);
- gedl_get_duration (edl);
+ gcut_get_duration (edl);
int last_clip_frame_no;
- cur_clip = gedl_get_clip (edl, sin, &cur_clip_frame_no);
- last_clip = gedl_get_clip (edl, sout, &last_clip_frame_no);
+ cur_clip = gcut_get_clip (edl, sin, &cur_clip_frame_no);
+ last_clip = gcut_get_clip (edl, sout, &last_clip_frame_no);
if (cur_clip == last_clip)
{
clip_split (last_clip, last_clip_frame_no);
@@ -242,7 +242,7 @@ static void insert_clip (GeglEDL *edl, const char *path,
edl->active_clip = edl_get_clip_for_frame (edl, edl->frame_no);
- gedl_make_proxies (edl);
+ gcut_make_proxies (edl);
}
static void drag_dropped (MrgEvent *ev, void *data1, void *data2)
@@ -351,14 +351,14 @@ static void stop_playing (MrgEvent *event, void *data1, void *data2)
static void select_all (MrgEvent *event, void *data1, void *data2)
{
GeglEDL *edl = data1;
- gint end = gedl_get_duration (edl) - 1;
+ gint end = gcut_get_duration (edl) - 1;
if (edl->selection_start == 0 && edl->selection_end == end)
{
- gedl_set_selection (edl, 0, 0);
+ gcut_set_selection (edl, 0, 0);
}
else
{
- gedl_set_selection (edl, 0, end);
+ gcut_set_selection (edl, 0, end);
}
mrg_event_stop_propagate (event);
mrg_queue_draw (event->mrg, NULL);
@@ -422,10 +422,10 @@ static void extend_selection_to_previous_cut (MrgEvent *event, void *data1, void
int sel_start, sel_end;
edl->active_clip = edl_get_clip_for_frame (edl, edl->frame_no);
- gedl_get_selection (edl, &sel_start, &sel_end);
+ gcut_get_selection (edl, &sel_start, &sel_end);
prev_cut (event, data1, data2);
sel_start = edl->frame_no;
- gedl_set_selection (edl, sel_start, sel_end);
+ gcut_set_selection (edl, sel_start, sel_end);
mrg_event_stop_propagate (event);
mrg_queue_draw (event->mrg, NULL);
@@ -438,10 +438,10 @@ static void extend_selection_to_next_cut (MrgEvent *event, void *data1, void *da
GeglEDL *edl = data1;
int sel_start, sel_end;
- gedl_get_selection (edl, &sel_start, &sel_end);
+ gcut_get_selection (edl, &sel_start, &sel_end);
next_cut (event, data1, data2);
sel_start = edl->frame_no;
- gedl_set_selection (edl, sel_start, sel_end);
+ gcut_set_selection (edl, sel_start, sel_end);
mrg_event_stop_propagate (event);
mrg_queue_draw (event->mrg, NULL);
@@ -453,7 +453,7 @@ static void extend_selection_to_the_left (MrgEvent *event, void *data1, void *da
GeglEDL *edl = data1;
int sel_start, sel_end;
- gedl_get_selection (edl, &sel_start, &sel_end);
+ gcut_get_selection (edl, &sel_start, &sel_end);
if (edl->frame_no == sel_end)
{
sel_end --;
@@ -470,7 +470,7 @@ static void extend_selection_to_the_left (MrgEvent *event, void *data1, void *da
sel_end --;
edl->frame_no --;
}
- gedl_set_selection (edl, sel_start, sel_end);
+ gcut_set_selection (edl, sel_start, sel_end);
mrg_event_stop_propagate (event);
mrg_queue_draw (event->mrg, NULL);
@@ -483,7 +483,7 @@ static void extend_selection_to_the_right (MrgEvent *event, void *data1, void *d
GeglEDL *edl = data1;
int sel_start, sel_end;
- gedl_get_selection (edl, &sel_start, &sel_end);
+ gcut_get_selection (edl, &sel_start, &sel_end);
if (edl->frame_no == sel_end)
{
sel_end ++;
@@ -500,7 +500,7 @@ static void extend_selection_to_the_right (MrgEvent *event, void *data1, void *d
sel_end ++;
edl->frame_no ++;
}
- gedl_set_selection (edl, sel_start, sel_end);
+ gcut_set_selection (edl, sel_start, sel_end);
mrg_event_stop_propagate (event);
mrg_queue_draw (event->mrg, NULL);
@@ -588,7 +588,7 @@ static void remove_clip (MrgEvent *event, void *data1, void *data2)
clip_remove (edl->active_clip);
}
- gedl_cache_invalid (edl);
+ gcut_cache_invalid (edl);
mrg_event_stop_propagate (event);
mrg_queue_draw (event->mrg, NULL);
}
@@ -681,11 +681,11 @@ static void toggle_use_proxies (MrgEvent *event, void *data1, void *data2)
if (!edl->playing) // disallowing - to avoid some races
{
- gedl_set_use_proxies (edl, edl->use_proxies?0:1);
- gedl_cache_invalid (edl);
+ gcut_set_use_proxies (edl, edl->use_proxies?0:1);
+ gcut_cache_invalid (edl);
if (edl->use_proxies)
- gedl_make_proxies (edl);
+ gcut_make_proxies (edl);
}
if (event)
@@ -713,7 +713,7 @@ static void split_clip (MrgEvent *event, void *data1, void *data2)
{
GeglEDL *edl = data1;
int clip_frame_no = 0;
- Clip *clip = gedl_get_clip (edl, edl->frame_no, &clip_frame_no);
+ Clip *clip = gcut_get_clip (edl, edl->frame_no, &clip_frame_no);
if (!edl->active_clip)
return;
@@ -727,7 +727,7 @@ static void split_clip (MrgEvent *event, void *data1, void *data2)
{
//edl->active_clip = clip;
}
- gedl_cache_invalid (edl);
+ gcut_cache_invalid (edl);
mrg_event_stop_propagate (event);
mrg_queue_draw (event->mrg, NULL);
changed++;
@@ -748,7 +748,7 @@ static void toggle_fade (MrgEvent *event, void *data1, void *data2)
{
edl->active_clip->fade = (edl->frame - edl->active_clip->abs_start)*2;
}
- gedl_cache_invalid (edl);
+ gcut_cache_invalid (edl);
mrg_event_stop_propagate (event);
mrg_queue_draw (event->mrg, NULL);
changed++;
@@ -768,7 +768,7 @@ static void duplicate_clip (MrgEvent *event, void *data1, void *data2)
clip->filter_graph = g_strdup (edl->active_clip->filter_graph);
edl->active_clip = clip;
}
- gedl_cache_invalid (edl);
+ gcut_cache_invalid (edl);
mrg_event_stop_propagate (event);
mrg_queue_draw (event->mrg, NULL);
changed++;
@@ -787,7 +787,7 @@ static void save_edl (GeglEDL *edl)
{
if (edl->path)
{
- gedl_save_path (edl, edl->path);
+ gcut_save_path (edl, edl->path);
}
}
@@ -814,8 +814,8 @@ static void set_range (MrgEvent *event, void *data1, void *data2)
GeglEDL *edl = data1;
int start, end;
- gedl_get_selection (edl, &start, &end);
- gedl_set_range (edl, start, end);
+ gcut_get_selection (edl, &start, &end);
+ gcut_set_range (edl, start, end);
mrg_queue_draw (event->mrg, NULL);
}
@@ -973,7 +973,7 @@ static void clip_end_start_dec (MrgEvent *event, void *data1, void *data2)
clip1->end--;
clip2->start--;
edl->frame_no--;
- gedl_cache_invalid (edl);
+ gcut_cache_invalid (edl);
mrg_event_stop_propagate (event);
mrg_queue_draw (event->mrg, NULL);
}
@@ -998,7 +998,7 @@ static void clip_end_start_inc (MrgEvent *event, void *data1, void *data2)
clip2->start++;
edl->frame_no++;
- gedl_cache_invalid (edl);
+ gcut_cache_invalid (edl);
mrg_event_stop_propagate (event);
mrg_queue_draw (event->mrg, NULL);
}
@@ -1011,7 +1011,7 @@ static void clip_start_end_inc (MrgEvent *event, void *data1, void *data2)
edl->active_clip->end++;
edl->active_clip->start++;
}
- gedl_cache_invalid (edl);
+ gcut_cache_invalid (edl);
mrg_event_stop_propagate (event);
mrg_queue_draw (event->mrg, NULL);
}
@@ -1024,7 +1024,7 @@ static void clip_start_end_dec (MrgEvent *event, void *data1, void *data2)
edl->active_clip->end--;
edl->active_clip->start--;
}
- gedl_cache_invalid (edl);
+ gcut_cache_invalid (edl);
mrg_event_stop_propagate (event);
mrg_queue_draw (event->mrg, NULL);
}
@@ -1037,7 +1037,7 @@ static void clip_end_inc (MrgEvent *event, void *data1, void *data2)
edl->active_clip->end++;
edl->frame_no++;
}
- gedl_cache_invalid (edl);
+ gcut_cache_invalid (edl);
mrg_event_stop_propagate (event);
mrg_queue_draw (event->mrg, NULL);
}
@@ -1049,7 +1049,7 @@ static void clip_end_dec (MrgEvent *event, void *data1, void *data2)
{
edl->active_clip->end--;
edl->frame_no--;
- gedl_cache_invalid (edl);
+ gcut_cache_invalid (edl);
}
mrg_event_stop_propagate (event);
mrg_queue_draw (event->mrg, NULL);
@@ -1062,7 +1062,7 @@ static void clip_start_inc (MrgEvent *event, void *data1, void *data2)
if (edl->active_clip)
{
edl->active_clip->start++;
- gedl_cache_invalid (edl);
+ gcut_cache_invalid (edl);
}
mrg_event_stop_propagate (event);
mrg_queue_draw (event->mrg, NULL);
@@ -1074,7 +1074,7 @@ static void clip_start_dec (MrgEvent *event, void *data1, void *data2)
if (edl->active_clip)
{
edl->active_clip->start--;
- gedl_cache_invalid (edl);
+ gcut_cache_invalid (edl);
}
mrg_event_stop_propagate (event);
mrg_queue_draw (event->mrg, NULL);
@@ -1088,7 +1088,7 @@ static void toggle_edit_source (MrgEvent *event, void *data1, void *data2)
edl->active_source->editing = !edl->active_source->editing;
if (edl->active_source->editing)
mrg_set_cursor_pos (event->mrg, strlen (edl->active_source->title));
- gedl_cache_invalid (edl);
+ gcut_cache_invalid (edl);
mrg_queue_draw (event->mrg, NULL);
}
#endif
@@ -1102,7 +1102,7 @@ static void do_quit (MrgEvent *event, void *data1, void *data2)
long last_frame = 0;
-void gedl_ui (Mrg *mrg, void *data);
+void gcut_ui (Mrg *mrg, void *data);
static void zoom_timeline (MrgEvent *event, void *data1, void *data2)
{
@@ -1141,7 +1141,7 @@ void render_clip (Mrg *mrg, GeglEDL *edl, const char *clip_path, int clip_start,
{
return; // XXX: draw string!
}
- thumb_path = gedl_make_thumb_path (edl, clip_path);
+ thumb_path = gcut_make_thumb_path (edl, clip_path);
cairo_t *cr = mrg_cr (mrg);
if (fade || fade2)
@@ -1200,7 +1200,7 @@ static void scroll_to_fit (GeglEDL *edl, Mrg *mrg)
static void shuffle_forward (MrgEvent *event, void *data1, void *data2)
{
GeglEDL *edl = data1;
- gedl_cache_invalid (edl);
+ gcut_cache_invalid (edl);
GList *prev = NULL,
*next = NULL,
@@ -1234,7 +1234,7 @@ static void shuffle_forward (MrgEvent *event, void *data1, void *data2)
static void shuffle_back (MrgEvent *event, void *data1, void *data2)
{
GeglEDL *edl = data1;
- gedl_cache_invalid (edl);
+ gcut_cache_invalid (edl);
GList *prev = NULL,
*prevprev = NULL,
@@ -1271,7 +1271,7 @@ static void shuffle_back (MrgEvent *event, void *data1, void *data2)
static void slide_forward (MrgEvent *event, void *data1, void *data2)
{
GeglEDL *edl = data1;
- gedl_cache_invalid (edl);
+ gcut_cache_invalid (edl);
edl->active_clip = edl_get_clip_for_frame (edl, edl->frame_no);
GList *prev = NULL,
@@ -1350,7 +1350,7 @@ static void slide_forward (MrgEvent *event, void *data1, void *data2)
static void slide_back (MrgEvent *event, void *data1, void *data2)
{
GeglEDL *edl = data1;
- gedl_cache_invalid (edl);
+ gcut_cache_invalid (edl);
edl->active_clip = edl_get_clip_for_frame (edl, edl->frame_no);
GList *prev = NULL,
@@ -1430,7 +1430,7 @@ static void slide_back (MrgEvent *event, void *data1, void *data2)
static void zoom_1 (MrgEvent *event, void *data1, void *data2)
{
GeglEDL *edl = data1;
- gedl_cache_invalid (edl);
+ gcut_cache_invalid (edl);
edl->scale = 1.0;
scroll_to_fit (edl, event->mrg);
mrg_event_stop_propagate (event);
@@ -1440,9 +1440,9 @@ static void zoom_1 (MrgEvent *event, void *data1, void *data2)
static void zoom_fit (MrgEvent *event, void *data1, void *data2)
{
GeglEDL *edl = data1;
- gedl_cache_invalid (edl);
+ gcut_cache_invalid (edl);
edl->t0 = 0.0;
- edl->scale = gedl_get_duration (edl) * 1.0 / mrg_width (event->mrg);
+ edl->scale = gcut_get_duration (edl) * 1.0 / mrg_width (event->mrg);
mrg_event_stop_propagate (event);
mrg_queue_draw (event->mrg, NULL);
}
@@ -1533,7 +1533,7 @@ static void drag_double_slider (MrgEvent *e, void *data1, void *data2)
int i;
int clip_frame_no=0;
GeglPathItem path_item;
- gedl_get_clip (edl, edl->frame_no, &clip_frame_no);
+ gcut_get_clip (edl, edl->frame_no, &clip_frame_no);
for (i = 0; i < nodes; i ++)
{
@@ -1593,7 +1593,7 @@ static void remove_key (MrgEvent *e, void *data1, void *data2)
int i;
int clip_frame_no=0;
GeglPathItem path_item;
- gedl_get_clip (edl, edl->frame_no, &clip_frame_no);
+ gcut_get_clip (edl, edl->frame_no, &clip_frame_no);
for (i = 0; i < nodes; i ++)
{
@@ -1804,7 +1804,7 @@ float print_props (Mrg *mrg, GeglEDL *edl, GeglNode *node, float x, float y)
{
GeglPath *path = g_object_get_qdata (G_OBJECT (node), anim_quark);
int clip_frame_no;
- gedl_get_clip (edl, edl->frame_no, &clip_frame_no);
+ gcut_get_clip (edl, edl->frame_no, &clip_frame_no);
mrg_printf (mrg, "{anim}");
{
GeglPathItem path_item;
@@ -2066,7 +2066,7 @@ void update_ui_clip (Clip *clip, int clip_frame_no)
ui_tweaks = 0;
changed ++;
- gedl_cache_invalid (clip->edl);
+ gcut_cache_invalid (clip->edl);
}
GParamSpec ** props = gegl_operation_list_properties (gegl_node_get_operation (selected_node), &n_props);
@@ -2093,7 +2093,7 @@ void update_ui_clip (Clip *clip, int clip_frame_no)
* being a specific subclass - as well as sort, so that best (prefix_) match
* comes first
*/
-char **gedl_get_completions (const char *filter_query)
+char **gcut_get_completions (const char *filter_query)
{
gchar **completions = NULL;
gchar **operations = gegl_list_operations (NULL);
@@ -2139,7 +2139,7 @@ char **gedl_get_completions (const char *filter_query)
static void complete_filter_query_edit (MrgEvent *e, void *data1, void *data2)
{
GeglEDL *edl = data1;
- gchar **completions = gedl_get_completions (filter_query);
+ gchar **completions = gcut_get_completions (filter_query);
if (!selected_node)
selected_node = filter_start;
@@ -2157,7 +2157,7 @@ static void complete_filter_query_edit (MrgEvent *e, void *data1, void *data2)
g_free (completions);
ui_tweaks++;
- gedl_cache_invalid (edl);
+ gcut_cache_invalid (edl);
mrg_queue_draw (e->mrg, NULL);
mrg_event_stop_propagate (e);
}
@@ -2171,7 +2171,7 @@ static void end_filter_query_edit (MrgEvent *e, void *data1, void *data2)
mrg_event_stop_propagate (e);
ui_tweaks++;
- gedl_cache_invalid (edl);
+ gcut_cache_invalid (edl);
mrg_queue_draw (e->mrg, NULL);
}
@@ -2183,7 +2183,7 @@ static void update_filter_query (const char *new_string, void *user_data)
}
-void gedl_draw (Mrg *mrg,
+void gcut_draw (Mrg *mrg,
GeglEDL *edl,
double x0,
double y,
@@ -2194,7 +2194,7 @@ void gedl_draw (Mrg *mrg,
GList *l;
cairo_t *cr = mrg_cr (mrg);
double t;
- int duration = gedl_get_duration (edl); // causes update of abs_start
+ int duration = gcut_get_duration (edl); // causes update of abs_start
VID_HEIGHT = mrg_height (mrg) * (1.0 - SPLIT_VER) * 0.8;
int scroll_height = mrg_height (mrg) * (1.0 - SPLIT_VER) * 0.2;
@@ -2206,7 +2206,7 @@ void gedl_draw (Mrg *mrg,
float y2 = y - mrg_em (mrg) * 1.5;
- edl->active_clip = gedl_get_clip (edl, edl->frame_no, &clip_frame_no);
+ edl->active_clip = gcut_get_clip (edl, edl->frame_no, &clip_frame_no);
if (edl->active_clip) // && edl->active_clip->filter_graph)
{
@@ -2245,7 +2245,7 @@ void gedl_draw (Mrg *mrg,
// XXX: print completions that are clickable?
{
- gchar **operations = gedl_get_completions (filter_query);
+ gchar **operations = gcut_get_completions (filter_query);
mrg_start (mrg, NULL, NULL);
mrg_set_xy (mrg, mrg_em(mrg) * 1, mrg_height (mrg) * SPLIT_VER + mrg_em (mrg));
gint matches=0;
@@ -2300,7 +2300,7 @@ void gedl_draw (Mrg *mrg,
}
int start = 0, end = 0;
- gedl_get_range (edl, &start, &end);
+ gcut_get_range (edl, &start, &end);
cairo_rectangle (cr, start, y, end - start, scroll_height);
cairo_set_source_rgba (cr, 0, 0.11, 0.0, 0.5);
cairo_fill_preserve (cr);
@@ -2328,7 +2328,7 @@ void gedl_draw (Mrg *mrg,
cairo_scale (cr, 1.0/fpx, 1);
cairo_translate (cr, -t0, 0);
- gedl_get_selection (edl, &start, &end);
+ gcut_get_selection (edl, &start, &end);
cairo_rectangle (cr, start + 0.5, y - PAD_DIM, end - start, VID_HEIGHT + PAD_DIM * 2);
cairo_set_source_rgba (cr, 1, 0, 0, 0.75);
cairo_fill (cr);
@@ -2389,7 +2389,7 @@ void gedl_draw (Mrg *mrg,
if (bitlen == 0)
{
- bitmap = gedl_get_cache_bitmap (edl, &bitlen);
+ bitmap = gcut_get_cache_bitmap (edl, &bitlen);
bitticks = babl_ticks ();
}
cairo_set_source_rgba (cr, 0.3, 1, 0.3, 1.0);
@@ -2460,7 +2460,7 @@ static void update_filter (const char *new_string, void *user_data)
if (edl->active_clip->filter_graph)
g_free (edl->active_clip->filter_graph);
edl->active_clip->filter_graph = g_strdup (new_string);
- gedl_cache_invalid (edl);
+ gcut_cache_invalid (edl);
mrg_queue_draw (edl->mrg, NULL);
}
#endif
@@ -2513,7 +2513,7 @@ extern int cache_misses;
long babl_ticks (void);
-void gedl_ui (Mrg *mrg, void *data)
+void gcut_ui (Mrg *mrg, void *data)
{
State *o = data;
GeglEDL *edl = o->edl;
@@ -2574,7 +2574,7 @@ void gedl_ui (Mrg *mrg, void *data)
case GEDL_UI_MODE_FULL:
case GEDL_UI_MODE_TIMELINE:
case GEDL_UI_MODE_PART:
- gedl_draw (mrg, edl, 0, mrg_height (mrg) * SPLIT_VER, edl->scale, edl->t0);
+ gcut_draw (mrg, edl, 0, mrg_height (mrg) * SPLIT_VER, edl->scale, edl->t0);
@@ -2761,8 +2761,8 @@ void gedl_ui (Mrg *mrg, void *data)
}
}
else {
- Clip *start_clip = gedl_get_clip (edl, edl->selection_start, NULL);
- Clip *end_clip = gedl_get_clip (edl, edl->selection_end, NULL);
+ Clip *start_clip = gcut_get_clip (edl, edl->selection_start, NULL);
+ Clip *end_clip = gcut_get_clip (edl, edl->selection_end, NULL);
GList *start_iter = g_list_find (edl->clips, start_clip);
GList *end_iter = g_list_find (edl->clips, end_clip);
@@ -2813,7 +2813,7 @@ gboolean cache_renderer_iteration (Mrg *mrg, gpointer data)
for (i = 0; i < render_slaves; i ++)
{
char *cmd = g_strdup_printf ("%s %s cache %i %i&",
- gedl_binary_path,
+ gcut_binary_path,
edl->path, i, render_slaves);
save_edl (edl);
system (cmd);
@@ -2823,8 +2823,8 @@ gboolean cache_renderer_iteration (Mrg *mrg, gpointer data)
return TRUE;
}
-int gedl_ui_main (GeglEDL *edl);
-int gedl_ui_main (GeglEDL *edl)
+int gcut_ui_main (GeglEDL *edl);
+int gcut_ui_main (GeglEDL *edl)
{
Mrg *mrg = mrg_new (800, 600, NULL);
//Mrg *mrg = mrg_new (-1, -1, NULL);
@@ -2835,20 +2835,20 @@ int gedl_ui_main (GeglEDL *edl)
edl->mrg = mrg;
edl->cache_flags = CACHE_TRY_ALL;// | CACHE_MAKE_ALL;
- mrg_set_ui (mrg, gedl_ui, &o);
+ mrg_set_ui (mrg, gcut_ui, &o);
mrg_add_timeout (mrg, 10100, save_idle, edl);
cache_renderer_iteration (mrg, edl);
mrg_add_timeout (mrg, 90 /* seconds */ * 1000, cache_renderer_iteration, edl);
- gedl_get_duration (edl);
+ gcut_get_duration (edl);
//mrg_set_target_fps (mrg, -1);
-// gedl_set_use_proxies (edl, 1);
+// gcut_set_use_proxies (edl, 1);
toggle_use_proxies (NULL, edl, NULL);
renderer_start (edl);
mrg_main (mrg);
- gedl_free (edl);
+ gcut_free (edl);
gegl_exit ();
return 0;
diff --git a/gcut/gedl.c b/gcut/gcut.c
similarity index 87%
rename from gcut/gedl.c
rename to gcut/gcut.c
index 1ac5a36..da7923a 100644
--- a/gcut/gedl.c
+++ b/gcut/gcut.c
@@ -15,7 +15,7 @@
if topology of graphs match..
*/
-#include "gedl.h"
+#include "gcut.h"
#define DEFAULT_output_path "output.mp4"
#define DEFAULT_video_codec "auto"
@@ -37,7 +37,7 @@
#define DEFAULT_range_end 0
#define DEFAULT_framedrop 0
-char *gedl_binary_path = NULL;
+char *gcut_binary_path = NULL;
const char *default_edl =
#include "default.edl.inc"
@@ -70,20 +70,20 @@ static char *escaped_base_path (GeglEDL *edl, const char *clip_path)
return ret;
}
-char *gedl_make_thumb_path (GeglEDL *edl, const char *clip_path)
+char *gcut_make_thumb_path (GeglEDL *edl, const char *clip_path)
{
gchar *ret;
gchar *path = escaped_base_path (edl, clip_path);
- ret = g_strdup_printf ("%s.gedl/thumb/%s.png", edl->parent_path, path); // XXX: should escape
relative/absolute path instead of basename - or add bit of its hash
+ ret = g_strdup_printf ("%s.gcut/thumb/%s.png", edl->parent_path, path); // XXX: should escape
relative/absolute path instead of basename - or add bit of its hash
g_free (path);
return ret;
}
-char *gedl_make_proxy_path (GeglEDL *edl, const char *clip_path)
+char *gcut_make_proxy_path (GeglEDL *edl, const char *clip_path)
{
gchar *ret;
gchar *path = escaped_base_path (edl, clip_path);
- ret = g_strdup_printf ("%s.gedl/proxy/%s-%ix%i.mp4", edl->parent_path, path, edl->proxy_width,
edl->proxy_height);
+ ret = g_strdup_printf ("%s.gcut/proxy/%s-%ix%i.mp4", edl->parent_path, path, edl->proxy_width,
edl->proxy_height);
g_free (path);
return ret;
}
@@ -91,7 +91,7 @@ char *gedl_make_proxy_path (GeglEDL *edl, const char *clip_path)
#include <stdlib.h>
-GeglEDL *gedl_new (void)
+GeglEDL *gcut_new (void)
{
GeglRectangle roi = {0,0,1024, 1024};
GeglEDL *edl = g_malloc0(sizeof (GeglEDL));
@@ -134,14 +134,14 @@ GeglEDL *gedl_new (void)
return edl;
}
-void gedl_set_size (GeglEDL *edl, int width, int height);
-void gedl_set_size (GeglEDL *edl, int width, int height)
+void gcut_set_size (GeglEDL *edl, int width, int height);
+void gcut_set_size (GeglEDL *edl, int width, int height)
{
edl->width = width;
edl->height = height;
}
-void gedl_free (GeglEDL *edl)
+void gcut_free (GeglEDL *edl)
{
while (edl->clips)
{
@@ -165,7 +165,7 @@ void gedl_free (GeglEDL *edl)
}
-Clip *gedl_get_clip (GeglEDL *edl, int frame, int *clip_frame_no)
+Clip *gcut_get_clip (GeglEDL *edl, int frame, int *clip_frame_no)
{
GList *l;
int clip_start = 0;
@@ -192,21 +192,21 @@ Clip *gedl_get_clip (GeglEDL *edl, int frame, int *clip_frame_no)
int cache_hits = 0;
int cache_misses = 0;
-void gedl_set_use_proxies (GeglEDL *edl, int use_proxies)
+void gcut_set_use_proxies (GeglEDL *edl, int use_proxies)
{
int frame;
edl->use_proxies = use_proxies;
if (edl->use_proxies)
- gedl_set_size (edl, edl->proxy_width, edl->proxy_height);
+ gcut_set_size (edl, edl->proxy_width, edl->proxy_height);
else
- gedl_set_size (edl, edl->video_width, edl->video_height);
+ gcut_set_size (edl, edl->video_width, edl->video_height);
frame = edl->frame;
if (frame > 0)
{
edl->frame--;
- gedl_set_frame (edl, frame);
+ gcut_set_frame (edl, frame);
}
}
@@ -214,7 +214,7 @@ void gedl_set_use_proxies (GeglEDL *edl, int use_proxies)
/* computes the hash of a given rendered frame - without altering
* any state
*/
-gchar *gedl_get_frame_hash_full (GeglEDL *edl, int frame,
+gchar *gcut_get_frame_hash_full (GeglEDL *edl, int frame,
Clip **clip0, int *clip0_frame,
Clip **clip1, int *clip1_frame,
double *mix)
@@ -342,12 +342,12 @@ gchar *gedl_get_frame_hash_full (GeglEDL *edl, int frame,
return NULL;
}
-gchar *gedl_get_frame_hash (GeglEDL *edl, int frame)
+gchar *gcut_get_frame_hash (GeglEDL *edl, int frame)
{
- return gedl_get_frame_hash_full (edl, frame, NULL, NULL, NULL, NULL, NULL);
+ return gcut_get_frame_hash_full (edl, frame, NULL, NULL, NULL, NULL, NULL);
}
-void gedl_update_buffer (GeglEDL *edl)
+void gcut_update_buffer (GeglEDL *edl)
{
g_mutex_lock (&edl->buffer_copy_mutex);
{
@@ -358,9 +358,9 @@ void gedl_update_buffer (GeglEDL *edl)
}
g_mutex_unlock (&edl->buffer_copy_mutex);
}
-/* calling this causes gedl to rig up its graphs for providing/rendering this frame
+/* calling this causes gcut to rig up its graphs for providing/rendering this frame
*/
-void gedl_set_frame (GeglEDL *edl, int frame)
+void gcut_set_frame (GeglEDL *edl, int frame)
{
if ((edl->frame) == frame && (frame != 0))
{
@@ -373,8 +373,8 @@ void gedl_set_frame (GeglEDL *edl, int frame)
Clip *clip1; int clip1_frame;
double mix;
- char *frame_hash = gedl_get_frame_hash_full (edl, frame, &clip0, &clip0_frame, &clip1, &clip1_frame, &mix);
- char *cache_path = g_strdup_printf ("%s.gedl/cache/%s", edl->parent_path, frame_hash);
+ char *frame_hash = gcut_get_frame_hash_full (edl, frame, &clip0, &clip0_frame, &clip1, &clip1_frame, &mix);
+ char *cache_path = g_strdup_printf ("%s.gcut/cache/%s", edl->parent_path, frame_hash);
g_free (frame_hash);
if (g_file_test (cache_path, G_FILE_TEST_IS_REGULAR) &&
(edl->cache_flags & CACHE_TRY_ALL))
@@ -397,7 +397,7 @@ void gedl_set_frame (GeglEDL *edl, int frame)
gegl_buffer_set_extent (edl->buffer, &ext);
gegl_node_process (edl->store_final_buf);
- gedl_update_buffer (edl);
+ gcut_update_buffer (edl);
g_free (cache_path);
return;
}
@@ -422,11 +422,11 @@ void gedl_set_frame (GeglEDL *edl, int frame)
gegl_node_connect_to (clip1->nop_crop, "output", edl->mix, "aux");
}
gegl_node_process (edl->store_final_buf);
- gedl_update_buffer (edl);
+ gcut_update_buffer (edl);
/* write cached render of this frame */
if (cache_path &&
- !strstr (clip0->path, ".gedl/cache") && (!edl->use_proxies))
+ !strstr (clip0->path, ".gcut/cache") && (!edl->use_proxies))
{
const gchar *cache_path_final = cache_path;
gchar *cache_path = g_strdup_printf ("%s~", cache_path_final);
@@ -458,39 +458,39 @@ void gedl_set_frame (GeglEDL *edl, int frame)
g_free (cache_path);
}
-void gedl_set_time (GeglEDL *edl, double seconds)
+void gcut_set_time (GeglEDL *edl, double seconds)
{
- gedl_set_frame (edl, seconds * edl->fps);
+ gcut_set_frame (edl, seconds * edl->fps);
}
-void gedl_set_fps (GeglEDL *edl, double fps)
+void gcut_set_fps (GeglEDL *edl, double fps)
{
edl->fps = fps;
}
-double gedl_get_fps (GeglEDL *edl)
+double gcut_get_fps (GeglEDL *edl)
{
return edl->fps;
}
-int gedl_get_frame (GeglEDL *edl)
+int gcut_get_frame (GeglEDL *edl)
{
return edl->frame;
}
-double gedl_get_time (GeglEDL *edl)
+double gcut_get_time (GeglEDL *edl)
{
return edl->frame / edl->fps;
}
-GeglAudioFragment *gedl_get_audio (GeglEDL *edl)
+GeglAudioFragment *gcut_get_audio (GeglEDL *edl)
{
Clip * clip = edl_get_clip_for_frame (edl, edl->frame);
return clip?clip->audio:NULL;
}
-const char *gedl_get_clip_path (GeglEDL *edl)
+const char *gcut_get_clip_path (GeglEDL *edl)
{
Clip * clip = edl_get_clip_for_frame (edl, edl->frame);
return clip?clip->clip_path:"";
}
-void gedl_get_video_info (const char *path, int *duration, double *fps)
+void gcut_get_video_info (const char *path, int *duration, double *fps)
{
GeglNode *gegl = gegl_node_new ();
GeglNode *probe = gegl_node_new_child (gegl, "operation",
@@ -504,7 +504,7 @@ void gedl_get_video_info (const char *path, int *duration, double *fps)
g_object_unref (gegl);
}
-int gedl_get_duration (GeglEDL *edl)
+int gcut_get_duration (GeglEDL *edl)
{
int count = 0;
GList *l;
@@ -517,7 +517,7 @@ int gedl_get_duration (GeglEDL *edl)
}
#include <string.h>
-void gedl_parse_clip (GeglEDL *edl, const char *line)
+void gcut_parse_clip (GeglEDL *edl, const char *line)
{
int start = 0; int end = 0; int duration = 0;
const char *rest = NULL;
@@ -548,7 +548,7 @@ void gedl_parse_clip (GeglEDL *edl, const char *line)
*/
}
-void gedl_parse_line (GeglEDL *edl, const char *line)
+void gcut_parse_line (GeglEDL *edl, const char *line)
{
int start = 0; int end = 0;
const char *rest = NULL;
@@ -567,7 +567,7 @@ void gedl_parse_line (GeglEDL *edl, const char *line)
while (value[strlen(value)-1]==' ' ||
value[strlen(value)-1]=='\n')
value[strlen(value)-1]='\0';
- if (!strcmp (key, "fps")) gedl_set_fps (edl, g_strtod (value, NULL));
+ if (!strcmp (key, "fps")) gcut_set_fps (edl, g_strtod (value, NULL));
if (!strcmp (key, "framedrop")) edl->framedrop = g_strtod (value, NULL);
if (!strcmp (key, "output-path")) edl->output_path = g_strdup (value);
if (!strcmp (key, "video-codec")) edl->video_codec = g_strdup (value);
@@ -652,11 +652,11 @@ void gedl_parse_line (GeglEDL *edl, const char *line)
if (ff_probe && !clip_is_static_source (clip))
{
- gedl_get_video_info (clip->path, &clip->duration, &clip->fps);
+ gcut_get_video_info (clip->path, &clip->duration, &clip->fps);
if (edl->fps == 0.0)
{
- gedl_set_fps (edl, clip->fps);
+ gcut_set_fps (edl, clip->fps);
}
}
@@ -683,12 +683,12 @@ void gedl_parse_line (GeglEDL *edl, const char *line)
#include <string.h>
-void gedl_update_video_size (GeglEDL *edl);
-GeglEDL *gedl_new_from_string (const char *string, const char *parent_path);
-GeglEDL *gedl_new_from_string (const char *string, const char *parent_path)
+void gcut_update_video_size (GeglEDL *edl);
+GeglEDL *gcut_new_from_string (const char *string, const char *parent_path);
+GeglEDL *gcut_new_from_string (const char *string, const char *parent_path)
{
GString *line = g_string_new ("");
- GeglEDL *edl = gedl_new ();
+ GeglEDL *edl = gcut_new ();
int clips_done = 0;
int newlines = 0;
edl->parent_path = g_strdup (parent_path);
@@ -702,7 +702,7 @@ GeglEDL *gedl_new_from_string (const char *string, const char *parent_path)
if (clips_done)
{
if (line->len > 2)
- gedl_parse_clip (edl, line->str);
+ gcut_parse_clip (edl, line->str);
g_string_assign (line, "");
}
else
@@ -733,7 +733,7 @@ GeglEDL *gedl_new_from_string (const char *string, const char *parent_path)
if (newlines >= 2)
{
- gedl_parse_line (edl, line->str);
+ gcut_parse_line (edl, line->str);
g_string_assign (line, "");
}
else
@@ -747,16 +747,16 @@ GeglEDL *gedl_new_from_string (const char *string, const char *parent_path)
}
g_string_free (line, TRUE);
- gedl_update_video_size (edl);
- gedl_set_use_proxies (edl, edl->use_proxies);
+ gcut_update_video_size (edl);
+ gcut_set_use_proxies (edl, edl->use_proxies);
return edl;
}
-void gedl_save_path (GeglEDL *edl, const char *path)
+void gcut_save_path (GeglEDL *edl, const char *path)
{
char *serialized;
- serialized = gedl_serialize (edl);
+ serialized = gcut_serialize (edl);
if (g_file_test (path, G_FILE_TEST_IS_REGULAR))
{
@@ -779,7 +779,7 @@ void gedl_save_path (GeglEDL *edl, const char *path)
g_free (old_contents);
}
- sprintf (backup_path, "%s.gedl/history/%s-", edl->parent_path, basename(edl->path));
+ sprintf (backup_path, "%s.gcut/history/%s-", edl->parent_path, basename(edl->path));
time_t now = time(NULL);
tim = gmtime(&now);
@@ -803,7 +803,7 @@ void gedl_save_path (GeglEDL *edl, const char *path)
fclose (file);
}
-void gedl_update_video_size (GeglEDL *edl)
+void gcut_update_video_size (GeglEDL *edl)
{
if ((edl->video_width == 0 || edl->video_height == 0) && edl->clips)
{
@@ -829,9 +829,9 @@ void gedl_update_video_size (GeglEDL *edl)
}
}
-static void generate_gedl_dir (GeglEDL *edl)
+static void generate_gcut_dir (GeglEDL *edl)
{
- char *tmp = g_strdup_printf ("cd %s; mkdir .gedl 2>/dev/null ; mkdir .gedl/cache 2>/dev/null mkdir
.gedl/proxy 2>/dev/null mkdir .gedl/thumb 2>/dev/null ; mkdir .gedl/video 2>/dev/null; mkdir .gedl/history
2>/dev/null", edl->parent_path);
+ char *tmp = g_strdup_printf ("cd %s; mkdir .gcut 2>/dev/null ; mkdir .gcut/cache 2>/dev/null mkdir
.gcut/proxy 2>/dev/null mkdir .gcut/thumb 2>/dev/null ; mkdir .gcut/video 2>/dev/null; mkdir .gcut/history
2>/dev/null", edl->parent_path);
system (tmp);
g_free (tmp);
}
@@ -840,9 +840,9 @@ static GTimer * timer = NULL;
static guint timeout_id = 0;
static gdouble throttle = 4.0;
-void gedl_reread (GeglEDL *edl)
+void gcut_reread (GeglEDL *edl)
{
- GeglEDL *new_edl = gedl_new_from_path (edl->path);
+ GeglEDL *new_edl = gcut_new_from_path (edl->path);
GList *l;
/* swap clips */
@@ -863,13 +863,13 @@ void gedl_reread (GeglEDL *edl)
clip->edl = new_edl;
}
- gedl_free (new_edl);
+ gcut_free (new_edl);
}
static gboolean timeout (gpointer user_data)
{
GeglEDL *edl = user_data;
- gedl_reread (edl);
+ gcut_reread (edl);
// system (user_data);
g_timer_start (timer);
timeout_id = 0;
@@ -899,12 +899,12 @@ static void file_changed (GFileMonitor *monitor,
}
void
-gedl_monitor_start (GeglEDL *edl)
+gcut_monitor_start (GeglEDL *edl)
{
if (!edl->path)
return;
/* save to make sure file exists */
- gedl_save_path (edl, edl->path);
+ gcut_save_path (edl, edl->path);
/* start monitor */
timer = g_timer_new ();
edl->monitor = g_file_monitor_file (g_file_new_for_path (edl->path),
@@ -913,7 +913,7 @@ gedl_monitor_start (GeglEDL *edl)
if(0)g_signal_connect (edl->monitor, "changed", G_CALLBACK (file_changed), edl);
}
-GeglEDL *gedl_new_from_path (const char *path)
+GeglEDL *gcut_new_from_path (const char *path)
{
GeglEDL *edl = NULL;
gchar *string = NULL;
@@ -925,7 +925,7 @@ GeglEDL *gedl_new_from_path (const char *path)
char *parent = g_strdup (rpath);
strrchr(parent, '/')[1]='\0';
- edl = gedl_new_from_string (string, parent);
+ edl = gcut_new_from_string (string, parent);
g_free (parent);
g_free (string);
@@ -945,7 +945,7 @@ GeglEDL *gedl_new_from_path (const char *path)
parent = g_malloc0 (PATH_MAX);
getcwd (parent, PATH_MAX);
}
- edl = gedl_new_from_string ("", parent);
+ edl = gcut_new_from_string ("", parent);
if (!edl->path)
{
if (path[0] == '/')
@@ -959,7 +959,7 @@ GeglEDL *gedl_new_from_path (const char *path)
}
g_free (parent);
}
- generate_gedl_dir (edl);
+ generate_gcut_dir (edl);
return edl;
}
@@ -970,7 +970,7 @@ static void setup (GeglEDL *edl)
edl->mix = gegl_node_new_child (edl->gegl, "operation", "gegl:mix", NULL);
edl->encode = gegl_node_new_child (edl->gegl, "operation", "gegl:ff-save",
"path", edl->output_path,
- "frame-rate", gedl_get_fps (edl),
+ "frame-rate", gcut_get_fps (edl),
"video-bit-rate", edl->video_bitrate,
"video-bufsize", edl->video_bufsize,
"audio-bit-rate", edl->audio_bitrate,
@@ -998,13 +998,13 @@ static void encode_frames (GeglEDL *edl)
for (frame_no = edl->range_start; frame_no <= edl->range_end; frame_no++)
{
edl->frame_no = frame_no;
- gedl_set_frame (edl, edl->frame_no);
+ gcut_set_frame (edl, edl->frame_no);
fprintf (stdout, "\r%1.2f%% %04d / %04d ",
100.0 * (frame_no-edl->range_start) * 1.0 / (edl->range_end - edl->range_start),
frame_no, edl->range_end);
- gegl_node_set (edl->encode, "audio", gedl_get_audio (edl), NULL);
+ gegl_node_set (edl->encode, "audio", gcut_get_audio (edl), NULL);
gegl_node_process (edl->encode);
fflush (0);
}
@@ -1037,7 +1037,7 @@ static void process_frames_cache (GeglEDL *edl)
int frame_start = edl->frame_no;
int duration;
signal(SIGUSR2, handler1);
- duration = gedl_get_duration (edl);
+ duration = gcut_get_duration (edl);
GList *l;
int clip_start = 0;
@@ -1046,7 +1046,7 @@ static void process_frames_cache (GeglEDL *edl)
edl->frame_no = frame_start;
if (this_cacher (edl->frame_no))
- gedl_set_frame (edl, edl->frame_no);
+ gcut_set_frame (edl, edl->frame_no);
if (stop_cacher)
return;
@@ -1057,7 +1057,7 @@ static void process_frames_cache (GeglEDL *edl)
edl->frame_no = clip_start;
if (this_cacher (edl->frame_no))
{
- gedl_set_frame (edl, edl->frame_no);
+ gcut_set_frame (edl, edl->frame_no);
}
clip_start += clip_frames;
@@ -1069,7 +1069,7 @@ static void process_frames_cache (GeglEDL *edl)
{
edl->frame_no = frame_no;
if (this_cacher (edl->frame_no))
- gedl_set_frame (edl, edl->frame_no);
+ gcut_set_frame (edl, edl->frame_no);
if (stop_cacher)
return;
}
@@ -1077,7 +1077,7 @@ static void process_frames_cache (GeglEDL *edl)
{
edl->frame_no = frame_no;
if (this_cacher (edl->frame_no))
- gedl_set_frame (edl, edl->frame_no);
+ gcut_set_frame (edl, edl->frame_no);
if (stop_cacher)
return;
}
@@ -1088,9 +1088,9 @@ static inline void set_bit (guchar *bitmap, int no)
bitmap[no/8] |= (1 << (no % 8));
}
-guchar *gedl_get_cache_bitmap (GeglEDL *edl, int *length_ret)
+guchar *gcut_get_cache_bitmap (GeglEDL *edl, int *length_ret)
{
- int duration = gedl_get_duration (edl);
+ int duration = gcut_get_duration (edl);
int frame_no;
int length = (duration / 8) + 1;
guchar *ret = g_malloc0 (length);
@@ -1100,8 +1100,8 @@ guchar *gedl_get_cache_bitmap (GeglEDL *edl, int *length_ret)
for (frame_no = 0; frame_no < duration; frame_no++)
{
- const gchar *hash = gedl_get_frame_hash (edl, frame_no);
- gchar *path = g_strdup_printf ("%s.gedl/cache/%s", edl->parent_path, hash);
+ const gchar *hash = gcut_get_frame_hash (edl, frame_no);
+ gchar *path = g_strdup_printf ("%s.gcut/cache/%s", edl->parent_path, hash);
if (g_file_test (path, G_FILE_TEST_IS_REGULAR))
set_bit (ret, frame_no);
g_free (path);
@@ -1115,7 +1115,7 @@ static void process_frames_cache_stat (GeglEDL *edl)
int frame_no = edl->frame_no;
int duration;
signal(SIGUSR2, handler1);
- duration = gedl_get_duration (edl);
+ duration = gcut_get_duration (edl);
/* XXX: should probably do first frame of each clip - since
these are used for quick keyboard navigation of the
@@ -1124,8 +1124,8 @@ static void process_frames_cache_stat (GeglEDL *edl)
for (frame_no = 0; frame_no < duration; frame_no++)
{
- const gchar *hash = gedl_get_frame_hash (edl, frame_no);
- gchar *path = g_strdup_printf ("%s.gedl/cache/%s", edl->parent_path, hash);
+ const gchar *hash = gcut_get_frame_hash (edl, frame_no);
+ gchar *path = g_strdup_printf ("%s.gcut/cache/%s", edl->parent_path, hash);
if (g_file_test (path, G_FILE_TEST_IS_REGULAR))
fprintf (stdout, "%i ", frame_no);
// fprintf (stdout, ". %i %s\n", frame_no, hash);
@@ -1142,7 +1142,7 @@ int gegl_make_thumb_image (GeglEDL *edl, const char *path, const char *icon_path
g_string_assign (str, "");
g_string_append_printf (str, "%s iconographer -p -h -f 'mid-col 96 audio' %s -a %s",
//g_string_append_printf (str, "iconographer -p -h -f 'thumb 96' %s -a %s",
- gedl_binary_path, path, icon_path);
+ gcut_binary_path, path, icon_path);
system (str->str);
g_string_free (str, TRUE);
@@ -1163,23 +1163,23 @@ int gegl_make_thumb_video (GeglEDL *edl, const char *path, const char *thumb_pat
#if 0 // much slower and worse for fps/audio than ffmpeg method for creating thumbs
int tot_frames; //
g_string_append_printf (str,
"video-bitrate=100\n\noutput-path=%s\nvideo-width=256\nvideo-height=144\n\n%s\n", thumb_path, path);
- edl = gedl_new_from_string (str->str);
+ edl = gcut_new_from_string (str->str);
setup (edl);
- tot_frames = gedl_get_duration (edl);
+ tot_frames = gcut_get_duration (edl);
if (edl->range_end == 0)
edl->range_end = tot_frames-1;
process_frames (edl);
- gedl_free (edl);
+ gcut_free (edl);
g_string_free (str, TRUE);
return 0;
#endif
}
-int gedl_ui_main (GeglEDL *edl);
+int gcut_ui_main (GeglEDL *edl);
int gegl_make_thumb_video (GeglEDL *edl, const char *path, const char *thumb_path);
-void gedl_make_proxies (GeglEDL *edl)
+void gcut_make_proxies (GeglEDL *edl)
{
GList *l;
for (l = edl->clips; l; l = l->next)
@@ -1187,8 +1187,8 @@ void gedl_make_proxies (GeglEDL *edl)
Clip *clip = l->data;
if (clip->is_chain == 0 && clip->static_source == 0 && clip->is_meta == 0)
{
- char *proxy_path = gedl_make_proxy_path (edl, clip->path);
- char *thumb_path = gedl_make_thumb_path (edl, clip->path);
+ char *proxy_path = gcut_make_proxy_path (edl, clip->path);
+ char *thumb_path = gcut_make_thumb_path (edl, clip->path);
if (!g_file_test (proxy_path, G_FILE_TEST_IS_REGULAR))
gegl_make_thumb_video (edl, clip->path, proxy_path);
if (!g_file_test (thumb_path, G_FILE_TEST_IS_REGULAR))
@@ -1199,22 +1199,22 @@ void gedl_make_proxies (GeglEDL *edl)
}
}
-void gedl_start_sanity (void)
+void gcut_start_sanity (void)
{
int fails = 0;
if (system("which ffmpeg > /dev/null") != 0)
{
- fprintf (stderr, "gedl missing runtime dependency: ffmpeg command in PATH\n");
+ fprintf (stderr, "gcut missing runtime dependency: ffmpeg command in PATH\n");
fails ++;
}
if (!gegl_has_operation ("gegl:ff-load"))
{
- fprintf (stderr, "gedl missing runtime dependenct: gegl:ff-load operation\n");
+ fprintf (stderr, "gcut missing runtime dependenct: gegl:ff-load operation\n");
fails ++;
}
if (!gegl_has_operation ("gegl:ff-save"))
{
- fprintf (stderr, "gedl missing runtime dependenct: gegl:ff-save operation\n");
+ fprintf (stderr, "gcut missing runtime dependenct: gegl:ff-save operation\n");
fails ++;
}
if (fails)
@@ -1229,9 +1229,9 @@ int main (int argc, char **argv)
const char *edl_path = "input.edl";
int tot_frames;
- gedl_binary_path = realpath (argv[0], NULL);
- if (!gedl_binary_path)
- gedl_binary_path = "gedl";
+ gcut_binary_path = realpath (argv[0], NULL);
+ if (!gcut_binary_path)
+ gcut_binary_path = "gcut";
if (argv[1] && !strcmp (argv[1], "iconographer"))
{
@@ -1243,11 +1243,11 @@ int main (int argc, char **argv)
setenv ("GEGL_MIPMAP_RENDERING", "1", 1);
init (argc, argv);
- gedl_start_sanity ();
+ gcut_start_sanity ();
if (!argv[1])
{
- static char *new_argv[3]={NULL, "gedl.edl", NULL};
+ static char *new_argv[3]={NULL, "gcut.edl", NULL};
new_argv[0] = argv[0];
argv = new_argv;
argc++;
@@ -1284,16 +1284,16 @@ int main (int argc, char **argv)
char * rpath = g_strdup_printf ("%s.edl", path);
char * parent = g_strdup (rpath);
strrchr(parent, '/')[1]='\0';
- edl = gedl_new_from_string (str, parent);
+ edl = gcut_new_from_string (str, parent);
g_free (parent);
edl->path = rpath;
free (path);
}
- generate_gedl_dir (edl);
+ generate_gcut_dir (edl);
}
else
{
- edl = gedl_new_from_path (edl_path);
+ edl = gcut_new_from_path (edl_path);
}
chdir (edl->parent_path); /* we try as good as we can to deal with absolute
@@ -1328,40 +1328,40 @@ int main (int argc, char **argv)
switch (runmode)
{
case RUNMODE_RESERIALIZE:
- printf ("%s", gedl_serialize (edl));
+ printf ("%s", gcut_serialize (edl));
exit (0);
break;
case RUNMODE_UI:
signal(SIGUSR2, nop_handler);
- gedl_monitor_start (edl);
+ gcut_monitor_start (edl);
- return gedl_ui_main (edl);
+ return gcut_ui_main (edl);
case RUNMODE_RENDER:
- tot_frames = gedl_get_duration (edl);
+ tot_frames = gcut_get_duration (edl);
if (edl->range_end == 0)
edl->range_end = tot_frames-1;
encode_frames (edl);
- gedl_free (edl);
+ gcut_free (edl);
return 0;
case RUNMODE_CACHE:
- tot_frames = gedl_get_duration (edl);
+ tot_frames = gcut_get_duration (edl);
if (edl->range_end == 0)
edl->range_end = tot_frames-1;
process_frames_cache (edl);
- gedl_free (edl);
+ gcut_free (edl);
return 0;
case RUNMODE_CACHE_STAT:
process_frames_cache_stat (edl);
- gedl_free (edl);
+ gcut_free (edl);
return 0;
}
}
return -1;
}
-char *gedl_serialize (GeglEDL *edl)
+char *gcut_serialize (GeglEDL *edl)
{
GList *l;
char *ret;
@@ -1395,7 +1395,7 @@ char *gedl_serialize (GeglEDL *edl)
if (edl->audio_samplerate != DEFAULT_audio_samplerate)
g_string_append_printf (ser, "audio-samplerate=%i\n", edl->audio_samplerate);
- g_string_append_printf (ser, "fps=%f\n", gedl_get_fps (edl));
+ g_string_append_printf (ser, "fps=%f\n", gcut_get_fps (edl));
if (edl->range_start != DEFAULT_range_start)
g_string_append_printf (ser, "range-start=%i\n", edl->range_start);
@@ -1559,13 +1559,13 @@ gegl_meta_get_audio (const char *path,
g_object_unref (e2m);
}
-void gedl_set_selection (GeglEDL *edl, int start_frame, int end_frame)
+void gcut_set_selection (GeglEDL *edl, int start_frame, int end_frame)
{
edl->selection_start = start_frame;
edl->selection_end = end_frame;
}
-void gedl_get_selection (GeglEDL *edl,
+void gcut_get_selection (GeglEDL *edl,
int *start_frame,
int *end_frame)
{
@@ -1575,13 +1575,13 @@ void gedl_get_selection (GeglEDL *edl,
*end_frame = edl->selection_end;
}
-void gedl_set_range (GeglEDL *edl, int start_frame, int end_frame)
+void gcut_set_range (GeglEDL *edl, int start_frame, int end_frame)
{
edl->range_start = start_frame;
edl->range_end = end_frame;
}
-void gedl_get_range (GeglEDL *edl,
+void gcut_get_range (GeglEDL *edl,
int *start_frame,
int *end_frame)
{
diff --git a/gcut/gedl.h b/gcut/gcut.h
similarity index 80%
rename from gcut/gedl.h
rename to gcut/gcut.h
index b47b6d6..e51c4dc 100644
--- a/gcut/gedl.h
+++ b/gcut/gcut.h
@@ -6,7 +6,7 @@
ogv render files are more compatible than generated mp4 files, firefox among few that renders the mp4 in
audio sync
roadmap/missing features
- move gedl to gegl git repo
+ move gcut to gegl git repo
engine
rescaling playback speed of clips
@@ -25,7 +25,7 @@
subtitles
ui
- port gedl-ui.c to lua
+ port gcut-ui.c to lua
detect locked or crashed ui, kill and respawn
trimming by mouse / dragging clips around by mouse
show a modal ui-block when generating proxies/thumbtrack on media import, instead of blocking/being
blank
@@ -47,9 +47,9 @@
typedef struct _GeglEDL GeglEDL;
typedef struct _Clip Clip;
-void gedl_set_use_proxies (GeglEDL *edl, int use_proxies);
+void gcut_set_use_proxies (GeglEDL *edl, int use_proxies);
int gegl_make_thumb_video (GeglEDL *edl, const char *path, const char *thumb_path);
-char *gedl_make_proxy_path (GeglEDL *edl, const char *clip_path);
+char *gcut_make_proxy_path (GeglEDL *edl, const char *clip_path);
const char *compute_cache_path (const char *path);
#define CACHE_TRY_SIMPLE (1<<0)
@@ -70,36 +70,36 @@ enum {
#define GEDL_LAST_UI_MODE 1
-GeglEDL *gedl_new (void);
-void gedl_free (GeglEDL *edl);
-void gedl_set_fps (GeglEDL *edl,
+GeglEDL *gcut_new (void);
+void gcut_free (GeglEDL *edl);
+void gcut_set_fps (GeglEDL *edl,
double fps);
-double gedl_get_fps (GeglEDL *edl);
-int gedl_get_duration (GeglEDL *edl);
-double gedl_get_time (GeglEDL *edl);
-void gedl_parse_line (GeglEDL *edl, const char *line);
-GeglEDL *gedl_new_from_path (const char *path);
-void gedl_load_path (GeglEDL *edl, const char *path);
-void gedl_save_path (GeglEDL *edl, const char *path);
-GeglAudioFragment *gedl_get_audio (GeglEDL *edl);
-Clip *gedl_get_clip (GeglEDL *edl, int frame, int *clip_frame_no);
-
-void gedl_set_frame (GeglEDL *edl, int frame);
-void gedl_set_time (GeglEDL *edl, double seconds);
-int gedl_get_frame (GeglEDL *edl);
-char *gedl_serialize (GeglEDL *edl);
-
-void gedl_set_range (GeglEDL *edl, int start_frame, int end_frame);
-void gedl_get_range (GeglEDL *edl,
+double gcut_get_fps (GeglEDL *edl);
+int gcut_get_duration (GeglEDL *edl);
+double gcut_get_time (GeglEDL *edl);
+void gcut_parse_line (GeglEDL *edl, const char *line);
+GeglEDL *gcut_new_from_path (const char *path);
+void gcut_load_path (GeglEDL *edl, const char *path);
+void gcut_save_path (GeglEDL *edl, const char *path);
+GeglAudioFragment *gcut_get_audio (GeglEDL *edl);
+Clip *gcut_get_clip (GeglEDL *edl, int frame, int *clip_frame_no);
+
+void gcut_set_frame (GeglEDL *edl, int frame);
+void gcut_set_time (GeglEDL *edl, double seconds);
+int gcut_get_frame (GeglEDL *edl);
+char *gcut_serialize (GeglEDL *edl);
+
+void gcut_set_range (GeglEDL *edl, int start_frame, int end_frame);
+void gcut_get_range (GeglEDL *edl,
int *start_frame,
int *end_frame);
-void gedl_set_selection (GeglEDL *edl, int start_frame, int end_frame);
-void gedl_get_selection (GeglEDL *edl,
+void gcut_set_selection (GeglEDL *edl, int start_frame, int end_frame);
+void gcut_get_selection (GeglEDL *edl,
int *start_frame,
int *end_frame);
-char *gedl_make_thumb_path (GeglEDL *edl, const char *clip_path);
-guchar *gedl_get_cache_bitmap (GeglEDL *edl, int *length_ret);
+char *gcut_make_thumb_path (GeglEDL *edl, const char *clip_path);
+guchar *gcut_get_cache_bitmap (GeglEDL *edl, int *length_ret);
Clip *clip_new (GeglEDL *edl);
@@ -124,8 +124,8 @@ Clip * clip_new_full (GeglEDL *edl, const char *path, int start, i
void clip_render_frame (Clip *clip, int clip_frame_no);
Clip * edl_get_clip_for_frame (GeglEDL *edl, int frame);
-void gedl_make_proxies (GeglEDL *edl);
-void gedl_get_video_info (const char *path, int *duration, double *fps);
+void gcut_make_proxies (GeglEDL *edl);
+void gcut_get_video_info (const char *path, int *duration, double *fps);
void gegl_meta_set_audio (const char *path,
GeglAudioFragment *audio);
void gegl_meta_get_audio (const char *path,
@@ -133,7 +133,7 @@ void gegl_meta_get_audio (const char *path,
#define SPLIT_VER 0.8
-extern char *gedl_binary_path;
+extern char *gcut_binary_path;
/*********/
@@ -245,12 +245,12 @@ struct _GeglEDL
void update_size (GeglEDL *edl, Clip *clip);
void remove_in_betweens (GeglNode *nop_scaled, GeglNode *nop_filtered);
int is_connected (GeglNode *a, GeglNode *b);
-void gedl_update_buffer (GeglEDL *edl);
+void gcut_update_buffer (GeglEDL *edl);
#ifdef MICRO_RAPTOR_GUI
/* renderer.h */
void renderer_toggle_playing (MrgEvent *event, void *data1, void *data2);
-void gedl_cache_invalid (GeglEDL *edl);
+void gcut_cache_invalid (GeglEDL *edl);
int renderer_done (GeglEDL *edl);
void renderer_start (GeglEDL *edl);
diff --git a/gcut/renderer.c b/gcut/renderer.c
index 0cdd139..2774a59 100644
--- a/gcut/renderer.c
+++ b/gcut/renderer.c
@@ -5,7 +5,7 @@
#include <signal.h>
#include <stdio.h>
#include <gegl.h>
-#include "gedl.h"
+#include "gcut.h"
#include <mrg.h>
#include <SDL.h>
#include <gegl-audio-fragment.h>
@@ -24,7 +24,7 @@ static int audio_post = 0;
int16_t audio_data[AUDIO_BUF_LEN];
-void gedl_cache_invalid (GeglEDL *edl)
+void gcut_cache_invalid (GeglEDL *edl)
{
edl->frame = -1;
done_frame=-1;
@@ -120,7 +120,7 @@ static gpointer renderer_thread (gpointer data)
//GeglRectangle ext = gegl_node_get_bounding_box (edl->result);
gegl_buffer_set_extent (edl->buffer, &ext);
}
- gedl_set_frame (edl, edl->frame_no); /* this does the frame-set, which causes render */
+ gcut_set_frame (edl, edl->frame_no); /* this does the frame-set, which causes render */
#if 0
{
GeglRectangle ext = gegl_node_get_bounding_box (edl->result);
@@ -129,7 +129,7 @@ static gpointer renderer_thread (gpointer data)
#endif
{
- GeglAudioFragment *audio = gedl_get_audio (edl);
+ GeglAudioFragment *audio = gcut_get_audio (edl);
if (audio)
{
int sample_count = gegl_audio_fragment_get_sample_count (audio);
@@ -193,7 +193,7 @@ static int max_frame (GeglEDL *edl)
int t = 0;
int start, end;
- gedl_get_range (edl, &start, &end);
+ gcut_get_range (edl, &start, &end);
if (end)
return end;
@@ -217,7 +217,7 @@ void playing_iteration (Mrg *mrg, GeglEDL *edl)
if (edl->playing)
{
#if 0
- if (prev_ticks - ticks < 1000000.0 / gedl_get_fps (edl))
+ if (prev_ticks - ticks < 1000000.0 / gcut_get_fps (edl))
return;
#endif
delta = (((ticks - prev_ticks) / 1000000.0) * ( edl->fps ));
@@ -267,7 +267,7 @@ void playing_iteration (Mrg *mrg, GeglEDL *edl)
{
edl->frame_no += delta;
int start, end;
- gedl_get_range (edl, &start, &end);
+ gcut_get_range (edl, &start, &end);
if (edl->frame_no > max_frame (edl))
{
edl->frame_no = 0;
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]