[gegl/video-rejuvenation] rename/refactor GeglAudio to GeglAudioFragment



commit 9eff95c2a26dcc89f3d9bebf6c0053fd5325ec4a
Author: Øyvind Kolås <pippin gimp org>
Date:   Thu Nov 19 16:37:33 2015 +0100

    rename/refactor GeglAudio to GeglAudioFragment

 bin/mrg-ui.c                                       |    4 +-
 examples/gegl-video.c                              |   20 +++---
 examples/video-invert.c                            |    2 +-
 gegl/Makefile.am                                   |    2 +-
 gegl/gegl-op.h                                     |   34 ++++----
 gegl/gegl-plugin.h                                 |    2 +-
 gegl/gegl-types.h                                  |   10 +-
 gegl/property-types/Makefile.am                    |    4 +-
 .../{gegl-audio.c => gegl-audio-fragment.c}        |   86 ++++++++++----------
 .../{gegl-audio.h => gegl-audio-fragment.h}        |   66 +++++----------
 gegl/property-types/gegl-paramspecs.c              |    2 +-
 operations/external/ff-load.c                      |    8 +-
 operations/external/ff-save.c                      |    8 +-
 13 files changed, 113 insertions(+), 135 deletions(-)
---
diff --git a/bin/mrg-ui.c b/bin/mrg-ui.c
index 49f1b10..f1b14f4 100644
--- a/bin/mrg-ui.c
+++ b/bin/mrg-ui.c
@@ -40,7 +40,7 @@
 #include <gexiv2/gexiv2.h>
 #include <gegl-paramspecs.h>
 #include <SDL.h>
-#include <gegl-audio.h>
+#include <gegl-audio-fragment.h>
 
 /* comment this out, and things render more correctly but much slower
  * for images larger than your screen/window resolution
@@ -1027,7 +1027,7 @@ static void gegl_ui (Mrg *mrg, void *data)
 
   if (o->is_video)
   {
-    GeglAudio *audio = NULL;
+    GeglAudioFragment *audio = NULL;
     gdouble fps;
     gegl_node_get (o->load, "audio", &audio, "frame-rate", &fps, NULL);
     if (audio)
diff --git a/examples/gegl-video.c b/examples/gegl-video.c
index 21d923a..bf86d29 100644
--- a/examples/gegl-video.c
+++ b/examples/gegl-video.c
@@ -20,7 +20,7 @@
  */
 
 #include <gegl.h>
-#include <gegl-audio.h>
+#include <gegl-audio-fragment.h>
 #include <glib/gprintf.h>
 #include <gexiv2/gexiv2.h>
 #include <stdint.h>
@@ -47,11 +47,11 @@ int run_mode = NEGL_NO_UI;
 int show_progress = 0;
 
 void
-gegl_meta_set_audio (const char *path,
-                     GeglAudio  *audio);
+gegl_meta_set_audio (const char         *path,
+                     GeglAudioFragment  *audio);
 void
-gegl_meta_get_audio (const char *path,
-                     GeglAudio  *audio);
+gegl_meta_get_audio (const char         *path,
+                     GeglAudioFragment  *audio);
 
 void usage(void);
 void usage(void)
@@ -275,7 +275,7 @@ main (gint    argc,
 
        decode_frame_no (frame);
         {
-        GeglAudio *audio;
+        GeglAudioFragment *audio;
         gdouble fps;
         gegl_node_get (load, "audio", &audio,
                              "frame-rate", &fps, NULL);
@@ -345,8 +345,8 @@ main (gint    argc,
 }
 
 void
-gegl_meta_set_audio (const char *path,
-                     GeglAudio  *audio)
+gegl_meta_set_audio (const char        *path,
+                     GeglAudioFragment *audio)
 {
   GError *error = NULL; 
   GExiv2Metadata *e2m = gexiv2_metadata_new ();
@@ -381,8 +381,8 @@ gegl_meta_set_audio (const char *path,
 }
 
 void
-gegl_meta_get_audio (const char *path,
-                     GeglAudio  *audio)
+gegl_meta_get_audio (const char        *path,
+                     GeglAudioFragment *audio)
 {
   //gchar  *ret   = NULL;
   GError *error = NULL;
diff --git a/examples/video-invert.c b/examples/video-invert.c
index 1b1b7ca..268c151 100644
--- a/examples/video-invert.c
+++ b/examples/video-invert.c
@@ -52,7 +52,7 @@ main (gint argc,
 
     for (frame_no = 0; frame_no < frame_count; frame_no++)
     {
-      GeglAudio *audio;
+      GeglAudioFragment *audio;
       fprintf (stderr, "\r%i/%i", frame_no, frame_count);
       gegl_node_set (decode, "frame", frame_no, NULL);
       if (buffer){
diff --git a/gegl/Makefile.am b/gegl/Makefile.am
index 683386e..e26099c 100644
--- a/gegl/Makefile.am
+++ b/gegl/Makefile.am
@@ -66,7 +66,7 @@ GEGL_introspectable_headers = \
        process/gegl-processor.h                \
        property-types/gegl-paramspecs.h        \
        property-types/gegl-color.h             \
-       property-types/gegl-audio.h             \
+       property-types/gegl-audio-fragment.h    \
        property-types/gegl-path.h              \
        property-types/gegl-curve.h
 
diff --git a/gegl/gegl-op.h b/gegl/gegl-op.h
index 06efa9a..09f9df0 100644
--- a/gegl/gegl-op.h
+++ b/gegl/gegl-op.h
@@ -268,7 +268,7 @@ gegl_module_register (GTypeModule *module)
 #define property_curve(name, label, def_val)      ITEM2(name,label,def_val,object)
 #define property_path(name, label, def_val)       ITEM2(name,label,def_val,object)
 #define property_color(name, label, def_val)      ITEM2(name,label,def_val,object)
-#define property_audio(name, label, def_val)      ITEM2(name,label,NULL,object)
+#define property_audio_fragment(name, label, def_val)      ITEM2(name,label,NULL,object)
 
 #define enum_start(enum_name)   typedef enum {
 #define enum_value(value, nick, name)    value ,
@@ -332,7 +332,7 @@ static GType enum_name ## _get_type (void)               \
 #undef property_seed
 #undef property_curve
 #undef property_color
-#undef property_audio
+#undef property_audio_fragment
 #undef property_path
 #undef enum_start
 #undef enum_value
@@ -355,7 +355,7 @@ struct _GeglProperties
 #define property_object(name, label, def_val)          GObject    *name;
 #define property_curve(name, label, def_val)           GeglCurve  *name;
 #define property_color(name, label, def_val)           GeglColor  *name;
-#define property_audio(name, label, def_val)           GeglAudio  *name;
+#define property_audio_fragment(name, label, def_val)  GeglAudioFragment  *name;
 #define property_path(name, label, def_val)            GeglPath   *name; gulong path_changed_handler;
 #define property_pointer(name, label, def_val)         gpointer    name;
 #define property_format(name, label, def_val)          gpointer    name;
@@ -378,7 +378,7 @@ struct _GeglProperties
 #undef property_seed
 #undef property_curve
 #undef property_color
-#undef property_audio
+#undef property_audio_fragment
 #undef property_path
 };
 
@@ -401,7 +401,7 @@ enum
 #define property_object(name, label, def_val)     ITEM2(name,label,def_val,object)
 #define property_curve(name, label, def_val)      ITEM2(name,label,def_val,object)
 #define property_color(name, label, def_val)      ITEM2(name,label,def_val,object)
-#define property_audio(name, label, def_val)      ITEM2(name,label,def_val,object)
+#define property_audio_fragment(name, label, def_val) ITEM2(name,label,def_val,object)
 #define property_path(name, label, def_val)       ITEM2(name,label,def_val,object)
 #define property_pointer(name, label, def_val)    ITEM(name,label,def_val,pointer)
 #define property_format(name, label, def_val)     ITEM(name,label,def_val,pointer)
@@ -448,7 +448,7 @@ get_property (GObject      *gobject,
 #undef property_seed
 #undef property_curve
 #undef property_color
-#undef property_audio
+#undef property_audio_fragment
 #undef property_path
     default:
       G_OBJECT_WARN_INVALID_PROPERTY_ID (gobject, property_id, pspec);
@@ -517,7 +517,7 @@ set_property (GObject      *gobject,
          g_object_unref (properties->name);                           \
       properties->name = g_value_dup_object (value);                  \
       break;
-#define property_audio(name, label, def_val)                          \
+#define property_audio_fragment(name, label, def_val)                 \
     case PROP_##name:                                                 \
       if (properties->name != NULL)                                   \
          g_object_unref (properties->name);                           \
@@ -574,7 +574,7 @@ set_property (GObject      *gobject,
 #undef property_pointer
 #undef property_curve
 #undef property_color
-#undef property_audio
+#undef property_audio_fragment
 #undef property_path
 #undef property_format
 #undef property_enum
@@ -631,13 +631,13 @@ static void gegl_op_destroy_notify (gpointer data)
       g_object_unref (properties->name);            \
       properties->name = NULL;                      \
     }
-#define property_audio(name, label, def_val)       \
+#define property_audio_fragment(name, label, def_val) \
   if (properties->name)                             \
     {                                               \
       g_object_unref (properties->name);            \
       properties->name = NULL;                      \
     }
-#define property_path(name, label, def_val)       \
+#define property_path(name, label, def_val)         \
   if (properties->name)                             \
     {                                               \
       g_object_unref (properties->name);            \
@@ -663,7 +663,7 @@ static void gegl_op_destroy_notify (gpointer data)
 #undef property_seed
 #undef property_curve
 #undef property_color
-#undef property_audio
+#undef property_audio_fragment
 #undef property_path
 
   g_slice_free (GeglProperties, properties);
@@ -693,9 +693,9 @@ gegl_op_constructor (GType                  type,
 #define property_pointer(name, label, def_val)
 #define property_format(name, label, def_val)
 #define property_curve(name, label, def_val)
-#define property_audio(name, label, def_val)\
+#define property_audio_fragment(name, label, def_val)\
     if (properties->name == NULL)                   \
-    {properties->name = gegl_audio_new();}
+    {properties->name = gegl_audio_fragment_new();}
 #define property_color(name, label, def_val)\
     if (properties->name == NULL)                   \
     {properties->name = gegl_color_new(def_val?def_val:"black");}
@@ -720,7 +720,7 @@ gegl_op_constructor (GType                  type,
 #undef property_seed
 #undef property_curve
 #undef property_color
-#undef property_audio
+#undef property_audio_fragment
 #undef property_path
 
   g_object_set_data_full (obj, "chant-data", obj, gegl_op_destroy_notify);
@@ -964,10 +964,10 @@ gegl_op_class_intern_init (gpointer klass)
        gegl_param_spec_color_from_string (#name, label, NULL, def_val, flags);\
      current_prop = PROP_##name ;
 
-#define property_audio(name, label, def_val) \
+#define property_audio_fragment(name, label, def_val) \
     REGISTER_IF_ANY  \
   }{ GParamSpec *pspec = \
-       gegl_param_spec_audio (#name, label, NULL, flags);\
+       gegl_param_spec_audio_fragment (#name, label, NULL, flags);\
      current_prop = PROP_##name ;
 
 #define property_path(name, label, def_val) \
@@ -1019,7 +1019,7 @@ gegl_op_class_intern_init (gpointer klass)
 #undef property_path
 #undef property_curve
 #undef property_color
-#undef property_audio
+#undef property_audio_fragment
 #undef property_object
 #undef property_format
 
diff --git a/gegl/gegl-plugin.h b/gegl/gegl-plugin.h
index 7ca428a..a1f82e8 100644
--- a/gegl/gegl-plugin.h
+++ b/gegl/gegl-plugin.h
@@ -30,7 +30,7 @@
 #include <gegl.h>
 #include <gegl-types.h>
 #include <gegl-paramspecs.h>
-#include <gegl-audio.h>
+#include <gegl-audio-fragment.h>
 
 G_BEGIN_DECLS
 
diff --git a/gegl/gegl-types.h b/gegl/gegl-types.h
index 2c54f54..1464727 100644
--- a/gegl/gegl-types.h
+++ b/gegl/gegl-types.h
@@ -46,11 +46,11 @@ GType gegl_config_get_type (void) G_GNUC_CONST;
 #define GEGL_CONFIG(obj)            (G_TYPE_CHECK_INSTANCE_CAST ((obj), GEGL_TYPE_CONFIG, GeglConfig))
 #define GEGL_IS_CONFIG(obj)         (G_TYPE_CHECK_INSTANCE_TYPE ((obj), GEGL_TYPE_CONFIG))
 
-typedef struct _GeglSampler GeglSampler;
-typedef struct _GeglCurve   GeglCurve;
-typedef struct _GeglPath    GeglPath;
-typedef struct _GeglColor   GeglColor;
-typedef struct _GeglAudio   GeglAudio;
+typedef struct _GeglSampler       GeglSampler;
+typedef struct _GeglCurve         GeglCurve;
+typedef struct _GeglPath          GeglPath;
+typedef struct _GeglColor         GeglColor;
+typedef struct _GeglAudioFragment GeglAudioFragment;
 
 typedef struct _GeglRectangle GeglRectangle;
 
diff --git a/gegl/property-types/Makefile.am b/gegl/property-types/Makefile.am
index 1acd124..018f995 100644
--- a/gegl/property-types/Makefile.am
+++ b/gegl/property-types/Makefile.am
@@ -20,13 +20,13 @@ AM_CFLAGS = $(DEP_CFLAGS) $(BABL_CFLAGS)
 noinst_LTLIBRARIES = libpropertytypes.la
 
 libpropertytypes_la_SOURCES = \
-       gegl-audio.c \
+       gegl-audio-fragment.c \
        gegl-color.c \
        gegl-curve.c \
        gegl-path.c \
        gegl-paramspecs.c \
        \
-       gegl-audio.h            \
+       gegl-audio-fragment.h   \
        gegl-color.h            \
        gegl-curve.h            \
        gegl-path.h             \
diff --git a/gegl/property-types/gegl-audio.c b/gegl/property-types/gegl-audio-fragment.c
similarity index 56%
rename from gegl/property-types/gegl-audio.c
rename to gegl/property-types/gegl-audio-fragment.c
index 601c1fe..20349f7 100644
--- a/gegl/property-types/gegl-audio.c
+++ b/gegl/property-types/gegl-audio-fragment.c
@@ -20,7 +20,7 @@
 
 #include "gegl.h"
 #include "gegl-types-internal.h"
-#include "gegl-audio.h"
+#include "gegl-audio-fragment.h"
 
 enum
 {
@@ -28,7 +28,7 @@ enum
   PROP_STRING
 };
 
-struct _GeglAudioPrivate
+struct _GeglAudioFragmentPrivate
 {
   int foo;
 };
@@ -42,16 +42,16 @@ static void      get_property (GObject    *gobject,
                                GValue     *value,
                                GParamSpec *pspec);
 
-G_DEFINE_TYPE (GeglAudio, gegl_audio, G_TYPE_OBJECT)
+G_DEFINE_TYPE (GeglAudioFragment, gegl_audio_fragment, G_TYPE_OBJECT)
 
 static void
-gegl_audio_init (GeglAudio *self)
+gegl_audio_fragment_init (GeglAudioFragment *self)
 {
-  self->priv = G_TYPE_INSTANCE_GET_PRIVATE ((self), GEGL_TYPE_AUDIO, GeglAudioPrivate);
+  self->priv = G_TYPE_INSTANCE_GET_PRIVATE ((self), GEGL_TYPE_AUDIO_FRAGMENT, GeglAudioFragmentPrivate);
 }
 
 static void
-gegl_audio_class_init (GeglAudioClass *klass)
+gegl_audio_fragment_class_init (GeglAudioFragmentClass *klass)
 {
   GObjectClass *gobject_class = G_OBJECT_CLASS (klass);
 
@@ -61,11 +61,11 @@ gegl_audio_class_init (GeglAudioClass *klass)
   g_object_class_install_property (gobject_class, PROP_STRING,
                                    g_param_spec_string ("string",
                                                         "String",
-                                                        "A String representation of the GeglAudio",
+                                                        "A String representation of the GeglAudioFragment",
                                                         "",
                                                         G_PARAM_READWRITE));
 
-  g_type_class_add_private (klass, sizeof (GeglAudioPrivate));
+  g_type_class_add_private (klass, sizeof (GeglAudioFragmentPrivate));
 }
 
 static void
@@ -74,7 +74,7 @@ set_property (GObject      *gobject,
               const GValue *value,
               GParamSpec   *pspec)
 {
-  //GeglAudio *audio = GEGL_AUDIO (gobject);
+  //GeglAudioFragment *audio = GEGL_AUDIO_FRAGMENT (gobject);
 
   switch (property_id)
     {
@@ -90,7 +90,7 @@ get_property (GObject    *gobject,
               GValue     *value,
               GParamSpec *pspec)
 {
-  //GeglAudio *audio = GEGL_AUDIO (gobject);
+  //GeglAudioFragment *audio = GEGL_AUDIO_FRAGMENT (gobject);
 
   switch (property_id)
     {
@@ -100,88 +100,88 @@ get_property (GObject    *gobject,
     }
 }
 
-GeglAudio *
-gegl_audio_new (void)
+GeglAudioFragment *
+gegl_audio_fragment_new (void)
 {
   void *string = NULL;
   if (string)
-    return g_object_new (GEGL_TYPE_AUDIO, "string", string, NULL);
+    return g_object_new (GEGL_TYPE_AUDIO_FRAGMENT, "string", string, NULL);
 
-  return g_object_new (GEGL_TYPE_AUDIO, NULL);
+  return g_object_new (GEGL_TYPE_AUDIO_FRAGMENT, NULL);
 }
 
 /* --------------------------------------------------------------------------
- * A GParamSpec class to describe behavior of GeglAudio as an object property
+ * A GParamSpec class to describe behavior of GeglAudioFragment as an object property
  * follows.
  * --------------------------------------------------------------------------
  */
 
-#define GEGL_PARAM_AUDIO(obj)            (G_TYPE_CHECK_INSTANCE_CAST ((obj), GEGL_TYPE_PARAM_AUDIO, 
GeglParamAudio))
-#define GEGL_IS_PARAM_AUDIO_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), GEGL_TYPE_PARAM_AUDIO))
+#define GEGL_PARAM_AUDIO_FRAGMENT (obj)            (G_TYPE_CHECK_INSTANCE_CAST ((obj), 
GEGL_TYPE_PARAM_AUDIO_FRAGMENT, GeglParamAudioFragment))
+#define GEGL_IS_PARAM_AUDIO_FRAGMENT_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), 
GEGL_TYPE_PARAM_AUDIO_FRAGMENT))
 
-typedef struct _GeglParamAudio GeglParamAudio;
+typedef struct _GeglParamAudioFragment GeglParamAudioFragment;
 
-struct _GeglParamAudio
+struct _GeglParamAudioFragment
 {
   GParamSpec parent_instance;
 };
 
 static void
-gegl_param_audio_init (GParamSpec *self)
+gegl_param_audio_fragment_init (GParamSpec *self)
 {
 }
 
 static void
-gegl_param_audio_finalize (GParamSpec *self)
+gegl_param_audio_fragment_finalize (GParamSpec *self)
 {
-  //GeglParamAudio  *param_audio  = GEGL_PARAM_AUDIO (self);
-  GParamSpecClass *parent_class = g_type_class_peek (g_type_parent (GEGL_TYPE_PARAM_AUDIO));
+  //GeglParamAudioFragment  *param_audio  = GEGL_PARAM_AUDIO (self);
+  GParamSpecClass *parent_class = g_type_class_peek (g_type_parent (GEGL_TYPE_PARAM_AUDIO_FRAGMENT));
 
   parent_class->finalize (self);
 }
 
 static void
-gegl_param_audio_set_default (GParamSpec *param_spec,
+gegl_param_audio_fragment_set_default (GParamSpec *param_spec,
                               GValue     *value)
 {
-  //GeglParamAudio *gegl_audio = GEGL_PARAM_AUDIO (param_spec);
+  //GeglParamAudioFragment *gegl_audio_fragment = GEGL_PARAM_AUDIO (param_spec);
 }
 
 GType
-gegl_param_audio_get_type (void)
+gegl_param_audio_fragment_get_type (void)
 {
-  static GType param_audio_type = 0;
+  static GType param_audio_fragment_type = 0;
 
-  if (G_UNLIKELY (param_audio_type == 0))
+  if (G_UNLIKELY (param_audio_fragment_type == 0))
     {
-      static GParamSpecTypeInfo param_audio_type_info = {
-        sizeof (GeglParamAudio),
+      static GParamSpecTypeInfo param_audio_fragment_type_info = {
+        sizeof (GeglParamAudioFragment),
         0,
-        gegl_param_audio_init,
+        gegl_param_audio_fragment_init,
         0,
-        gegl_param_audio_finalize,
-        gegl_param_audio_set_default,
+        gegl_param_audio_fragment_finalize,
+        gegl_param_audio_fragment_set_default,
         NULL,
         NULL
       };
-      param_audio_type_info.value_type = GEGL_TYPE_AUDIO;
+      param_audio_fragment_type_info.value_type = GEGL_TYPE_AUDIO_FRAGMENT;
 
-      param_audio_type = g_param_type_register_static ("GeglParamAudio",
-                                                       &param_audio_type_info);
+      param_audio_fragment_type = g_param_type_register_static ("GeglParamAudioFragment",
+                                                       &param_audio_fragment_type_info);
     }
 
-  return param_audio_type;
+  return param_audio_fragment_type;
 }
 
 GParamSpec *
-gegl_param_spec_audio (const gchar *name,
-                       const gchar *nick,
-                       const gchar *blurb,
-                       GParamFlags  flags)
+gegl_param_spec_audio_fragment (const gchar *name,
+                                const gchar *nick,
+                                const gchar *blurb,
+                                GParamFlags  flags)
 {
-  GeglParamAudio *param_audio;
+  GeglParamAudioFragment *param_audio;
 
-  param_audio = g_param_spec_internal (GEGL_TYPE_PARAM_AUDIO,
+  param_audio = g_param_spec_internal (GEGL_TYPE_PARAM_AUDIO_FRAGMENT,
                                        name, nick, blurb, flags);
 
   return G_PARAM_SPEC (param_audio);
diff --git a/gegl/property-types/gegl-audio.h b/gegl/property-types/gegl-audio-fragment.h
similarity index 52%
rename from gegl/property-types/gegl-audio.h
rename to gegl/property-types/gegl-audio-fragment.h
index b58a6f5..a7506e3 100644
--- a/gegl/property-types/gegl-audio.h
+++ b/gegl/property-types/gegl-audio-fragment.h
@@ -14,29 +14,30 @@
  * License along with GEGL; if not, see <http://www.gnu.org/licenses/>.
  *
  * Copyright 2006 Martin Nordholts <enselic hotmail com>
+ *           2015 OEyvind Kolaas   <pippin gimp org>
  */
 
-#ifndef __GEGL_AUDIO_H__
-#define __GEGL_AUDIO_H__
+#ifndef __GEGL_AUDIO_FRAGMENT_H__
+#define __GEGL_AUDIO_FRAGMENT_H__
 
 #include <glib-object.h>
 
 G_BEGIN_DECLS
 
-#define GEGL_TYPE_AUDIO            (gegl_audio_get_type ())
-#define GEGL_AUDIO(obj)            (G_TYPE_CHECK_INSTANCE_CAST ((obj), GEGL_TYPE_AUDIO, GeglAudio))
-#define GEGL_AUDIO_CLASS(klass)    (G_TYPE_CHECK_CLASS_CAST ((klass),  GEGL_TYPE_AUDIO, GeglAudioClass))
-#define GEGL_IS_AUDIO(obj)         (G_TYPE_CHECK_INSTANCE_TYPE ((obj), GEGL_TYPE_AUDIO))
-#define GEGL_IS_AUDIO_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass),  GEGL_TYPE_AUDIO))
-#define GEGL_AUDIO_GET_CLASS(obj)  (G_TYPE_INSTANCE_GET_CLASS ((obj),  GEGL_TYPE_AUDIO, GeglAudioClass))
+#define GEGL_TYPE_AUDIO_FRAGMENT            (gegl_audio_fragment_get_type ())
+#define GEGL_AUDIO_FRAGMENT(obj)            (G_TYPE_CHECK_INSTANCE_CAST ((obj), GEGL_TYPE_AUDIO_FRAGMENT, 
GeglAudioFragment))
+#define GEGL_AUDIO_FRAGMENT_CLASS(klass)    (G_TYPE_CHECK_CLASS_CAST ((klass),  GEGL_TYPE_AUDIO_FRAGMENT, 
GeglAudioFragmentClass))
+#define GEGL_IS_AUDIO(obj)         (G_TYPE_CHECK_INSTANCE_TYPE ((obj), GEGL_TYPE_AUDIO_FRAGMENT))
+#define GEGL_IS_AUDIO_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass),  GEGL_TYPE_AUDIO_FRAGMENT))
+#define GEGL_AUDIO_FRAGMENT_GET_CLASS(obj)  (G_TYPE_INSTANCE_GET_CLASS ((obj),  GEGL_TYPE_AUDIO_FRAGMENT, 
GeglAudioFragmentClass))
 
-typedef struct _GeglAudioClass   GeglAudioClass;
-typedef struct _GeglAudioPrivate GeglAudioPrivate;
+typedef struct _GeglAudioFragmentClass   GeglAudioFragmentClass;
+typedef struct _GeglAudioFragmentPrivate GeglAudioFragmentPrivate;
 
 #define GEGL_MAX_AUDIO_CHANNELS 6
 #define GEGL_MAX_AUDIO_SAMPLES  2400   // this limits us to 20fps and higher for regular sample rates
 
-struct _GeglAudio
+struct _GeglAudioFragment
 {
   GObject parent_instance;
   int   sample_rate;
@@ -45,32 +46,22 @@ struct _GeglAudio
   int   channels;
   int   channel_layout;/* unused - assumed channels = 1 is mono 2 stereo */
   float data[GEGL_MAX_AUDIO_CHANNELS][GEGL_MAX_AUDIO_SAMPLES]; 
-  GeglAudioPrivate *priv;
+  GeglAudioFragmentPrivate *priv;
 };
 
-struct _GeglAudioClass
+struct _GeglAudioFragmentClass
 {
   GObjectClass parent_class;
 };
 
-GType gegl_audio_get_type (void) G_GNUC_CONST;
+GType gegl_audio_fragment_get_type (void) G_GNUC_CONST;
 
-GeglAudio *  gegl_audio_new                    (void);
+GeglAudioFragment *  gegl_audio_fragment_new                    (void);
 
-/**
- * gegl_audio_duplicate:
- * @audio: the audio to duplicate.
- *
- * Creates a copy of @audio.
- *
- * Return value: (transfer full): A new copy of @audio.
- */
-GeglAudio *  gegl_audio_duplicate              (GeglAudio   *audio);
-
-#define GEGL_TYPE_PARAM_AUDIO           (gegl_param_audio_get_type ())
-#define GEGL_IS_PARAM_SPEC_AUDIO(pspec) (G_TYPE_CHECK_INSTANCE_TYPE ((pspec), GEGL_TYPE_PARAM_AUDIO))
+#define GEGL_TYPE_PARAM_AUDIO_FRAGMENT  (gegl_param_audio_fragment_get_type ())
+#define GEGL_IS_PARAM_SPEC_AUDIO_FRAGMENT(pspec) (G_TYPE_CHECK_INSTANCE_TYPE ((pspec), 
GEGL_TYPE_PARAM_AUDIO_FRAGMENT))
 
-GType        gegl_param_audio_get_type         (void) G_GNUC_CONST;
+GType        gegl_param_audio_fragment_get_type         (void) G_GNUC_CONST;
 
 /**
  * gegl_param_spec_audio:
@@ -79,27 +70,14 @@ GType        gegl_param_audio_get_type         (void) G_GNUC_CONST;
  * @blurb: description of the property specified
  * @flags: flags for the property specified
  *
- * Creates a new #GParamSpec instance specifying a #GeglAudio property.
+ * Creates a new #GParamSpec instance specifying a #GeglAudioFragment property.
  *
  * Returns: (transfer full): a newly created parameter specification
  */
-GParamSpec * gegl_param_spec_audio             (const gchar *name,
+GParamSpec * gegl_param_spec_audio_fragment    (const gchar *name,
                                                 const gchar *nick,
                                                 const gchar *blurb,
                                                 GParamFlags  flags);
-#if 0
-/**
- * gegl_param_spec_audio_get_default:
- * @self: a #GeglAudio #GParamSpec
- *
- * Get the default audio value of the param spec
- *
- * Returns: (transfer none): the default #GeglAudio
- */
-GeglAudio *
-gegl_param_spec_audio_get_default (GParamSpec *self);
-#endif
-
 G_END_DECLS
 
-#endif /* __GEGL_AUDIO_H__ */
+#endif /* __GEGL_AUDIO_FRAGMENT_H__ */
diff --git a/gegl/property-types/gegl-paramspecs.c b/gegl/property-types/gegl-paramspecs.c
index 3e26a26..9e7b88a 100644
--- a/gegl/property-types/gegl-paramspecs.c
+++ b/gegl/property-types/gegl-paramspecs.c
@@ -28,7 +28,7 @@
 #include "gegl-types.h"
 #include <babl/babl.h>
 #include "gegl-color.h"
-#include "gegl-audio.h"
+#include "gegl-audio-fragment.h"
 #include "gegl-curve.h"
 #include "gegl-path.h"
 
diff --git a/operations/external/ff-load.c b/operations/external/ff-load.c
index 9fe6d8e..4133c7e 100644
--- a/operations/external/ff-load.c
+++ b/operations/external/ff-load.c
@@ -44,7 +44,7 @@ property_double (frame_rate, _("frame-rate"), 0)
 property_string (video_codec, _("video-codec"), "")
 property_string (audio_codec, _("audio-codec"), "")
 
-property_audio (audio, _("audio"), 0)
+property_audio_fragment (audio, _("audio"), 0)
 
 #else
 
@@ -229,7 +229,7 @@ decode_audio (GeglOperation *operation,
             {
                int sample_count = MIN (samples_left, GEGL_MAX_AUDIO_SAMPLES);
 
-               GeglAudio *af = g_malloc0 (sizeof (GeglAudio));
+               GeglAudioFragment *af = g_malloc0 (sizeof (GeglAudioFragment));
           
                af->channels = MIN(p->audio_stream->codec->channels, GEGL_MAX_AUDIO_CHANNELS);
 
@@ -567,7 +567,7 @@ static void get_sample_data (Priv *p, long sample_no, float *left, float *right)
     return;
   for (; l; l = l->next)
   {
-    GeglAudio *af = l->data;
+    GeglAudioFragment *af = l->data;
     if (sample_no > af->pos + af->samples)
     {
       to_remove ++;
@@ -588,7 +588,7 @@ static void get_sample_data (Priv *p, long sample_no, float *left, float *right)
           again:
           for (l = p->audio_track; l; l = l->next)
           {
-            GeglAudio *af = l->data;
+            GeglAudioFragment *af = l->data;
             if (sample_no > af->pos + af->samples)
             {
               p->audio_track = g_list_remove (p->audio_track, af);
diff --git a/operations/external/ff-save.c b/operations/external/ff-save.c
index dffd015..1d8efd4 100644
--- a/operations/external/ff-save.c
+++ b/operations/external/ff-save.c
@@ -45,7 +45,7 @@ property_int    (max_b_frames,         _("maximum number of consequetive b frame
 property_string (audio_codec, _("Audio codec"), "auto")
 property_int (audio_bit_rate, _("Audio bitrate"), 810000)
 
-property_audio (audio, _("audio"), 0)
+property_audio_fragment (audio, _("audio"), 0)
 
 #else
 
@@ -124,7 +124,7 @@ static void get_sample_data (Priv *p, long sample_no, float *left, float *right)
     return;
   for (; l; l = l->next)
   {
-    GeglAudio *af = l->data;
+    GeglAudioFragment *af = l->data;
     if (sample_no > af->pos + af->samples)
     {
       to_remove ++;
@@ -145,7 +145,7 @@ static void get_sample_data (Priv *p, long sample_no, float *left, float *right)
           again:
           for (l = p->audio_track; l; l = l->next)
           {
-            GeglAudio *af = l->data;
+            GeglAudioFragment *af = l->data;
             if (sample_no > af->pos + af->samples)
             {
               p->audio_track = g_list_remove (p->audio_track, af);
@@ -327,7 +327,7 @@ write_audio_frame (GeglProperties *o, AVFormatContext * oc, AVStream * st)
   /* first we add incoming frames audio samples */
   {
     int i;
-    GeglAudio *af = g_malloc0 (sizeof (GeglAudio));
+    GeglAudioFragment *af = g_malloc0 (sizeof (GeglAudioFragment));
     af->channels = 2; //o->audio->channels;
     af->samples = o->audio->samples;
     for (i = 0; i < af->samples; i++)


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]