+2006-03-31 Sebastien Moutte <sebastien@moutte.net>
+
+ * ext\jpeg\smokecodec.c:
+ use of GST_DEBUG instead of DEBUG(a...) for WIN32
+ * ext\speex\gstspeexenc.c: (gst_speexenc_set_header_on_caps):
+ move first instruction after all variables declarations
+ * gst\alpha\gstalpha.c:
+ * gst\effectv\gstshagadelic.c:
+ * gst\smpte\paint.c:
+ * gst\videofilter\gstvideobalance.c:
+ define M_PI if it's not defined (it's not defined on WIN32)
+ * gst\cutter\gstcutter.c: (gst_cutter_chain):
+ * gst\id3demux\id3v2frames.c: (parse_relative_volume_adjustment_two):
+ * gst\level\gstlevel.c: (gst_level_set_property), (gst_level_transform_ip):
+ * gst\matroska\matroska-demux.c: (gst_matroska_demux_parse_info),
+ (gst_matroska_demux_video_caps):
+ * gst\matroska\matroska-mux.c: (gst_matroska_mux_start), (gst_matroska_mux_finish):
+ * gst\wavparse\gstwavparse.c: (gst_wavparse_stream_data):
+ use gst_guint64_to_gdouble for conversions
+ * gst\goom\filters.c: (setPixelRGB_):
+ fix a debug which was using undefined variable
+ * gst\level\gstlevel.c: (gst_level_set_caps), (gst_level_transform_ip):
+ * gst\matroska\ebml-read.c: (gst_ebml_read_sint):
+ replace LL suffix with L suffix (LL isn't supported by MSVC6.0)
+ * win32/vs6:
+ add vs6 projects files for most of plugins-good
+
2006-03-30 j^ <j@bootlab.org>
* ext/aalib/gstaasink.c:
#include "smokecodec.h"
#include "smokeformat.h"
+#ifndef WIN32
//#define DEBUG(a...) printf( a );
#define DEBUG(a,...)
+#else
+#include <gst/gstinfo.h>
+#define DEBUG GST_DEBUG
+#endif
+
+
struct _SmokeCodecInfo
{
gst_speexenc_set_header_on_caps (GstCaps * caps, GstBuffer * buf1,
GstBuffer * buf2)
{
- caps = gst_caps_make_writable (caps);
- GstStructure *structure = gst_caps_get_structure (caps, 0);
+ GstStructure *structure = NULL;
GValue array = { 0 };
GValue value = { 0 };
+ caps = gst_caps_make_writable (caps);
+ structure = gst_caps_get_structure (caps, 0);
+
/* mark buffers */
GST_BUFFER_FLAG_SET (buf1, GST_BUFFER_FLAG_IN_CAPS);
GST_BUFFER_FLAG_SET (buf2, GST_BUFFER_FLAG_IN_CAPS);
#include <string.h>
#include <math.h>
+#ifndef M_PI
+#define M_PI 3.14159265358979323846
+#endif
+
#define GST_TYPE_ALPHA \
(gst_alpha_get_type())
#define GST_ALPHA(obj) \
NMS, RMS, gst_audio_duration_from_pad_buffer (filter->sinkpad, buf));
if (RMS < filter->threshold_level)
filter->silent_run_length +=
- gst_audio_duration_from_pad_buffer (filter->sinkpad, buf);
+ gst_guint64_to_gdouble (gst_audio_duration_from_pad_buffer (filter->
+ sinkpad, buf));
else {
filter->silent_run_length = 0 * GST_SECOND;
filter->silent = FALSE;
if (filter->silent) {
filter->pre_buffer = g_list_append (filter->pre_buffer, buf);
filter->pre_run_length +=
- gst_audio_duration_from_pad_buffer (filter->sinkpad, buf);
+ gst_guint64_to_gdouble (gst_audio_duration_from_pad_buffer (filter->
+ sinkpad, buf));
while (filter->pre_run_length > filter->pre_length) {
prebuf = (g_list_first (filter->pre_buffer))->data;
g_assert (GST_IS_BUFFER (prebuf));
filter->pre_buffer = g_list_remove (filter->pre_buffer, prebuf);
filter->pre_run_length -=
- gst_audio_duration_from_pad_buffer (filter->sinkpad, prebuf);
+ gst_guint64_to_gdouble (gst_audio_duration_from_pad_buffer (filter->
+ sinkpad, prebuf));
/* only pass buffers if we don't leak */
if (!filter->leaky)
gst_pad_push (filter->srcpad, prebuf);
break;
case PROP_RUN_LENGTH:
/* set the minimum length of the silent run required */
- filter->threshold_length = g_value_get_uint64 (value);
+ filter->threshold_length =
+ gst_guint64_to_gdouble (g_value_get_uint64 (value));
break;
case PROP_PRE_LENGTH:
/* set the length of the pre-record block */
- filter->pre_length = g_value_get_uint64 (value);
+ filter->pre_length = gst_guint64_to_gdouble (g_value_get_uint64 (value));
break;
case PROP_LEAKY:
/* set if the pre-record buffer is leaky or not */
#include <gst/video/video.h>
+#ifndef M_PI
+#define M_PI 3.14159265358979323846
+#endif
+
#define GST_TYPE_SHAGADELICTV \
(gst_shagadelictv_get_type())
#define GST_SHAGADELICTV(obj) \
{
#ifdef _DEBUG
if (x >= resolx * resoly) {
- printf ("setPixel ERROR : hors du tableau... %i, %i\n", x, y);
+ printf ("setPixel ERROR : hors du tableau... %i >= %i*%i (%i)\n", x, resolx,
+ resoly, resolx * resoly);
exit (1);
}
#endif
}
peak = peak << (64 - GST_ROUND_UP_8 (peak_bits));
- peak_val = (gdouble) peak / gst_util_guint64_to_gdouble (G_MAXINT64);
+ peak_val =
+ gst_guint64_to_gdouble (peak) / gst_util_guint64_to_gdouble (G_MAXINT64);
GST_LOG ("RVA2 frame: id=%s, chan=%u, adj=%.2fdB, peak_bits=%u, peak=%.2f",
id, chan, gain_dB, (guint) peak_bits, peak_val);
filter->message = g_value_get_boolean (value);
break;
case PROP_SIGNAL_INTERVAL:
- filter->interval = g_value_get_uint64 (value);
+ filter->interval = gst_guint64_to_gdouble (g_value_get_uint64 (value));
break;
case PROP_PEAK_TTL:
- filter->decay_peak_ttl = g_value_get_uint64 (value);
+ filter->decay_peak_ttl =
+ gst_guint64_to_gdouble (g_value_get_uint64 (value));
break;
case PROP_PEAK_FALLOFF:
filter->decay_peak_falloff = g_value_get_double (value);
for (i = 0; i < filter->channels; ++i) {
filter->CS[i] = filter->peak[i] = filter->last_peak[i] =
filter->decay_peak[i] = filter->decay_peak_base[i] = 0.0;
- filter->decay_peak_age[i] = 0LL;
+ filter->decay_peak_age[i] = 0L;
}
return TRUE;
filter->last_peak[i] = filter->peak[i];
/* make decay peak fall off if too old */
- if (filter->decay_peak_age[i] > filter->decay_peak_ttl) {
+ if (gst_guint64_to_gdouble (filter->decay_peak_age[i]) >
+ filter->decay_peak_ttl) {
double falloff_dB;
double falloff;
GstClockTimeDiff falloff_time;
double length; /* length of falloff time in seconds */
falloff_time = GST_CLOCK_DIFF (filter->decay_peak_ttl,
- filter->decay_peak_age[i]);
+ gst_guint64_to_gdouble (filter->decay_peak_age[i]));
length = (gdouble) falloff_time / GST_SECOND;
falloff_dB = filter->decay_peak_falloff * length;
falloff = pow (10, falloff_dB / -20.0);
GST_LOG_OBJECT (filter, "new peak, %f", filter->peak[i]);
filter->decay_peak[i] = filter->peak[i];
filter->decay_peak_base[i] = filter->peak[i];
- filter->decay_peak_age[i] = 0LL;
+ filter->decay_peak_age[i] = 0L;
}
}
/* make signed */
if (negative) {
- *num = *num - (1LL << ((8 * size) - 1));
+ *num = *num - (1L << ((8 * size) - 1));
}
gst_buffer_unref (buf);
res = FALSE;
break;
}
- demux->duration = num * demux->time_scale;
+ demux->duration = num * gst_guint64_to_gdouble (demux->time_scale);
break;
}
g_value_init (&fps_double, G_TYPE_DOUBLE);
g_value_init (&fps_fraction, GST_TYPE_FRACTION);
g_value_set_double (&fps_double,
- GST_SECOND / context->default_duration);
+ gst_guint64_to_gdouble (GST_SECOND / context->default_duration));
g_value_transform (&fps_double, &fps_fraction);
gst_structure_set_value (structure, "framerate", &fps_fraction);
gst_object_unref (peerpad);
}
gst_ebml_write_float (ebml, GST_MATROSKA_ID_DURATION,
- duration / mux->time_scale);
+ duration / gst_guint64_to_gdouble (mux->time_scale));
gst_ebml_write_utf8 (ebml, GST_MATROSKA_ID_MUXINGAPP,
"GStreamer plugin version " GST_PLUGINS_GOOD_VERSION);
if (mux->writing_app && mux->writing_app[0]) {
pos = mux->ebml_write->pos;
gst_ebml_write_seek (ebml, mux->duration_pos);
gst_ebml_write_float (ebml, GST_MATROSKA_ID_DURATION,
- (gdouble) duration / mux->time_scale);
+ gst_guint64_to_gdouble (duration / mux->time_scale));
gst_ebml_write_seek (ebml, pos);
}
#include <stdlib.h>
#include "paint.h"
+#ifndef M_PI
+#define M_PI 3.14159265358979323846
+#endif
+
void
gst_smpte_paint_vbox (guint32 * dest, gint stride,
gint x0, gint y0, gint c0, gint x1, gint y1, gint c1)
#include <gst/video/video.h>
#include <gst/interfaces/colorbalance.h>
+#ifndef M_PI
+#define M_PI 3.14159265358979323846
+#endif
+
static GstElementDetails video_balance_details =
GST_ELEMENT_DETAILS ("Video balance",
"Filter/Effect/Video",
/* scale the amount of data by the segment rate so we get equal
* amounts of data regardless of the playback rate */
- desired = MIN (wav->dataleft, MAX_BUFFER_SIZE * ABS (wav->segment.rate));
+ desired =
+ MIN (gst_guint64_to_gdouble (wav->dataleft),
+ MAX_BUFFER_SIZE * ABS (wav->segment.rate));
if (desired >= wav->blockalign && wav->blockalign > 0)
desired -= (desired % wav->blockalign);