[gegl] gcut: remove SourceClip vestige
- From: Øyvind Kolås <ok src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gegl] gcut: remove SourceClip vestige
- Date: Sun, 16 Jul 2017 11:59:27 +0000 (UTC)
commit 65b7dfc17d77bb2ce8258b7c34d6994d731cbc0b
Author: Øyvind Kolås <pippin gimp org>
Date: Sun Jul 16 13:42:04 2017 +0200
gcut: remove SourceClip vestige
gcut/gcut.c | 47 ++++++-----------------------------------------
gcut/gcut.h | 28 ++++++++++++----------------
2 files changed, 18 insertions(+), 57 deletions(-)
---
diff --git a/gcut/gcut.c b/gcut/gcut.c
index 0252346..f64ed37 100644
--- a/gcut/gcut.c
+++ b/gcut/gcut.c
@@ -525,36 +525,6 @@ int gcut_get_duration (GeglEDL *edl)
}
#include <string.h>
-static void gcut_parse_clip (GeglEDL *edl, const char *line)
-{
- int start = 0; int end = 0; int duration = 0;
- const char *rest = NULL;
- char path[1024];
- if (line[0] == '#' ||
- line[1] == '#' ||
- strlen (line) < 4)
- return;
-
- if (strstr (line, "--"))
- rest = strstr (line, "--") + 2;
-
- if (rest) while (*rest == ' ')rest++;
-
- sscanf (line, "%s %i %i %i", path, &start, &end, &duration);
- if (strlen (path) > 3)
- {
- SourceClip *sclip = g_new0 (SourceClip, 1);
- edl->clip_db = g_list_append (edl->clip_db, sclip);
- sclip->path = g_strdup (path);
- sclip->start = start;
- sclip->end = end;
- sclip->duration = duration;
- if (rest)
- sclip->title = g_strdup (rest);
- }
- /* todo: parse hh:mm:ss.nn timestamps,
- */
-}
void gcut_parse_line (GeglEDL *edl, const char *line)
{
@@ -709,8 +679,8 @@ GeglEDL *gcut_new_from_string (const char *string, const char *parent_path)
case '\n':
if (clips_done)
{
- if (line->len > 2)
- gcut_parse_clip (edl, line->str);
+ // if (line->len > 2)
+ // gcut_parse_clip (edl, line->str);
g_string_assign (line, "");
}
else
@@ -1248,12 +1218,14 @@ gint str_has_video_suffix (const gchar *edl_path);
gint str_has_video_suffix (const gchar *edl_path)
{
if (g_str_has_suffix (edl_path, ".mp4") ||
+ g_str_has_suffix (edl_path, ".avi") ||
g_str_has_suffix (edl_path, ".ogv") ||
g_str_has_suffix (edl_path, ".mkv") ||
- g_str_has_suffix (edl_path, ".MKV") ||
- g_str_has_suffix (edl_path, ".avi") ||
+ g_str_has_suffix (edl_path, ".webm") ||
g_str_has_suffix (edl_path, ".MP4") ||
g_str_has_suffix (edl_path, ".OGV") ||
+ g_str_has_suffix (edl_path, ".MKV") ||
+ g_str_has_suffix (edl_path, ".WEBM") ||
g_str_has_suffix (edl_path, ".AVI"))
return 1;
return 0;
@@ -1480,13 +1452,6 @@ char *gcut_serialize (GeglEDL *edl)
}
}
g_string_append_printf (ser, "-----\n");
- for (l = edl->clip_db; l; l = l->next)
- {
- SourceClip *clip = l->data;
- g_string_append_printf (ser, "%s %d %d %d%s%s%s\n", clip->path, clip->start, clip->end, clip->duration,
- "", //(edl->active_source == clip)?" [active]":"",
- clip->title?" -- ":"",clip->title?clip->title:"");
- }
ret=ser->str;
g_string_free (ser, FALSE);
return ret;
diff --git a/gcut/gcut.h b/gcut/gcut.h
index 8074111..5391870 100644
--- a/gcut/gcut.h
+++ b/gcut/gcut.h
@@ -1,4 +1,4 @@
-#if TODO // this is the projects todo-list
+#if TODO
bugs
huge video files cause (cairo) thumtrack overflow, vertical also has this problem - how to split?
@@ -16,7 +16,14 @@
fidelity as GEGL processing allows - rather than sharing tuning for
preview rendering.
- support for other timecodes, mm:ss:ff and s
+ support for other timecodes, mm:ss:ff and s, maybe mandate that? or permit frame count for native,
+ and timecodes for all others - needing a pass through to update if changing the target fps?
+
+
+ currently changing target fps changes duration of project - this is probably wrong, the focus should
+ be on making video/animation - that can be sampled, thus for motion graphics rendering different fps
+ should
+
using edl files as clip sources - hopefully without even needing caches.
global filters
@@ -105,7 +112,7 @@ guchar *gcut_get_cache_bitmap (GeglEDL *edl, int *length_ret);
Clip *clip_new (GeglEDL *edl);
void clip_free (Clip *clip);
-const char *clip_get_path (Clip *clip);
+const char *clip_get_path (Clip *clip);
void clip_set_path (Clip *clip, const char *path);
int clip_get_start (Clip *clip);
int clip_get_end (Clip *clip);
@@ -138,27 +145,16 @@ extern char *gcut_binary_path;
/*********/
-typedef struct SourceClip
-{
- char *path;
- int start;
- int end;
- char *title;
- int duration;
- int editing;
- char *filter_graph; /* chain of gegl filters */
-} SourceClip;
-
struct _Clip
{
char *path; /*path to media file */
+ char *title;
int start; /*frame number starting with 0 */
int end; /*last frame, inclusive fro single frame, make equal to start */
- char *title;
int duration;
int editing;
char *filter_graph; /* chain of gegl filters */
- /* to here Clip must match start of SourceClip */
+
GeglEDL *edl;
double fps;
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]