Commit 0debb1e9 authored by Sebastien Moutte's avatar Sebastien Moutte

ext\jpeg\smokecodec.c: use of GST_DEBUG instead of DEBUG(a...) for WIN32

Original commit message from CVS:
* 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
parent 629fb234
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:
......
......@@ -36,8 +36,15 @@
#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
{
......
......@@ -841,11 +841,13 @@ static GstCaps *
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);
......
......@@ -26,6 +26,10 @@
#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) \
......
......@@ -263,7 +263,8 @@ gst_cutter_chain (GstPad * pad, GstBuffer * buf)
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;
......@@ -307,13 +308,15 @@ gst_cutter_chain (GstPad * pad, GstBuffer * buf)
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);
......@@ -349,11 +352,12 @@ gst_cutter_set_property (GObject * object, guint prop_id,
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 */
......
......@@ -33,6 +33,10 @@
#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) \
......
......@@ -237,7 +237,8 @@ setPixelRGB_ (Uint * buffer, Uint x, Color c, guint32 resolx, guint32 resoly)
{
#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
......
......@@ -408,7 +408,8 @@ parse_relative_volume_adjustment_two (ID3TagsWorking * work)
}
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);
......
......@@ -238,10 +238,11 @@ gst_level_set_property (GObject * object, guint prop_id,
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);
......@@ -321,7 +322,7 @@ gst_level_set_caps (GstBaseTransform * trans, GstCaps * in, GstCaps * out)
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;
......@@ -476,14 +477,15 @@ gst_level_transform_ip (GstBaseTransform * trans, GstBuffer * in)
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);
......@@ -507,7 +509,7 @@ gst_level_transform_ip (GstBaseTransform * trans, GstBuffer * in)
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;
}
}
......
......@@ -507,7 +507,7 @@ gst_ebml_read_sint (GstEbmlRead * ebml, guint32 * id, gint64 * num)
/* make signed */
if (negative) {
*num = *num - (1LL << ((8 * size) - 1));
*num = *num - (1L << ((8 * size) - 1));
}
gst_buffer_unref (buf);
......
......@@ -1584,7 +1584,7 @@ gst_matroska_demux_parse_info (GstMatroskaDemux * demux)
res = FALSE;
break;
}
demux->duration = num * demux->time_scale;
demux->duration = num * gst_guint64_to_gdouble (demux->time_scale);
break;
}
......@@ -3088,7 +3088,7 @@ gst_matroska_demux_video_caps (GstMatroskaTrackVideoContext *
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);
......
......@@ -1066,7 +1066,7 @@ gst_matroska_mux_start (GstMatroskaMux * mux)
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]) {
......@@ -1232,7 +1232,7 @@ gst_matroska_mux_finish (GstMatroskaMux * mux)
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);
}
......
......@@ -25,6 +25,10 @@
#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)
......
......@@ -56,6 +56,10 @@
#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",
......
......@@ -1178,7 +1178,9 @@ gst_wavparse_stream_data (GstWavParse * wav, gboolean first)
/* 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);
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment