[gegl/video-rejuvenation] GeglAudioFragment: make MAX_SAMPLES private
- From: Øyvind Kolås <ok src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gegl/video-rejuvenation] GeglAudioFragment: make MAX_SAMPLES private
- Date: Fri, 20 Nov 2015 23:29:00 +0000 (UTC)
commit 65bd4d4bbb754a8b1d9c2bd704cddb22d7cf1a79
Author: Øyvind Kolås <pippin gimp org>
Date: Sat Nov 21 00:24:43 2015 +0100
GeglAudioFragment: make MAX_SAMPLES private
gegl/property-types/gegl-audio-fragment.c | 1 +
gegl/property-types/gegl-audio-fragment.h | 3 +--
operations/external/ff-load.c | 4 ++--
3 files changed, 4 insertions(+), 4 deletions(-)
---
diff --git a/gegl/property-types/gegl-audio-fragment.c b/gegl/property-types/gegl-audio-fragment.c
index 8b019ba..ae027e5 100644
--- a/gegl/property-types/gegl-audio-fragment.c
+++ b/gegl/property-types/gegl-audio-fragment.c
@@ -75,6 +75,7 @@ static void allocate_data (GeglAudioFragment *audio)
}
}
+#define GEGL_MAX_AUDIO_SAMPLES 2400
static void
gegl_audio_fragment_init (GeglAudioFragment *self)
diff --git a/gegl/property-types/gegl-audio-fragment.h b/gegl/property-types/gegl-audio-fragment.h
index 5ac49a2..1d8e115 100644
--- a/gegl/property-types/gegl-audio-fragment.h
+++ b/gegl/property-types/gegl-audio-fragment.h
@@ -34,8 +34,7 @@ G_BEGIN_DECLS
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
+#define GEGL_MAX_AUDIO_CHANNELS 8
/* the values for channel_layout are designed to match and be compatible with
diff --git a/operations/external/ff-load.c b/operations/external/ff-load.c
index 8f77c2e..5f3feec 100644
--- a/operations/external/ff-load.c
+++ b/operations/external/ff-load.c
@@ -227,10 +227,10 @@ decode_audio (GeglOperation *operation,
while (samples_left)
{
- int sample_count = MIN (samples_left, GEGL_MAX_AUDIO_SAMPLES);
+ int sample_count = samples_left;
int channels = MIN(p->audio_stream->codec->channels, GEGL_MAX_AUDIO_CHANNELS);
GeglAudioFragment *af = gegl_audio_fragment_new (o->audio_sample_rate, channels,
- AV_CH_LAYOUT_STEREO, GEGL_MAX_AUDIO_SAMPLES); // XXX : use samples_left directly?
+ AV_CH_LAYOUT_STEREO, samples_left);
//);
//af->channels = MIN(p->audio_stream->codec->channels, GEGL_MAX_AUDIO_CHANNELS);
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]