[gegl] gegl-binary: encode audio with video
- From: Øyvind Kolås <ok src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gegl] gegl-binary: encode audio with video
- Date: Fri, 25 Mar 2016 00:31:20 +0000 (UTC)
commit 1b83b708c539990569a52e012728490138625c79
Author: Øyvind Kolås <pippin gimp org>
Date: Fri Mar 25 01:22:35 2016 +0100
gegl-binary: encode audio with video
bin/gegl.c | 19 +++++++++++++------
1 files changed, 13 insertions(+), 6 deletions(-)
---
diff --git a/bin/gegl.c b/bin/gegl.c
index e8b4f40..017c613 100644
--- a/bin/gegl.c
+++ b/bin/gegl.c
@@ -245,6 +245,7 @@ main (gint argc,
GeglBuffer *tempb;
GeglNode *n0;
GeglNode *iter;
+ GeglAudioFragment *audio = NULL;
int frame_no = 0;
guchar *temp;
@@ -270,17 +271,23 @@ main (gint argc,
while (frame_no < duration)
{
+ gegl_node_blit (gegl, o->scale, &bounds,
+ babl_format("R'G'B'A u8"), temp,
+ GEGL_AUTO_ROWSTRIDE,
+ GEGL_BLIT_DEFAULT);
- gegl_node_blit (gegl, o->scale, &bounds, babl_format("R'G'B'A u8"), temp, GEGL_AUTO_ROWSTRIDE,
- GEGL_BLIT_DEFAULT);
+ gegl_buffer_set (tempb, &bounds, 0.0, babl_format ("R'G'B'A u8"),
+ temp, GEGL_AUTO_ROWSTRIDE);
- gegl_buffer_set (tempb, &bounds, 0.0, babl_format ("R'G'B'A u8"),
- temp, GEGL_AUTO_ROWSTRIDE);
+ gegl_node_get (iter, "audio", &audio, NULL);
+ if (audio)
+ gegl_node_set (output, "audio", audio, NULL);
+ fprintf (stderr, "\r%i/%i %p", frame_no, duration-1, audio);
- gegl_node_set (iter, "frame", frame_no, NULL);
- fprintf (stderr, "\r%i/%i", frame_no, duration-1);
gegl_node_process (output);
+
frame_no ++;
+ gegl_node_set (iter, "frame", frame_no, NULL);
}
fprintf (stderr, "\n");
}
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]