Displaying 20 results from an estimated 57 matches for "g_printerr".
2007 Feb 19
0
2 commits - libswfdec/swfdec_script.c test/swfdec-extract.c
...issing \n to print statements
diff --git a/test/swfdec-extract.c b/test/swfdec-extract.c
index 47e8234..da0964b 100644
--- a/test/swfdec-extract.c
+++ b/test/swfdec-extract.c
@@ -68,7 +68,7 @@ export_sound (SwfdecSound *sound, const
SwfdecBuffer *wav;
if (sound->decoded == NULL) {
- g_printerr ("not a sound event. For streams use the sprite.");
+ g_printerr ("not a sound event. For extraction of streams extract the sprite.\n");
return FALSE;
}
wav = encode_wav (sound->decoded);
@@ -97,7 +97,7 @@ export_sprite_sound (SwfdecSprite *sprit
break;...
2007 Jan 29
0
3 commits - autogen.sh configure.ac player/.gitignore player/Makefile.am player/swfdec_playback_alsa.c player/swfdec_playback.c player/swfdec_playback_none.c
...snd_pcm_t * pcm; /* the pcm we play back to */
- GSource ** sources; /* sources for writing data */
- guint n_sources; /* number of sources */
- guint offset; /* offset into sound */
-} Stream;
-
-#define ALSA_TRY(func,msg) G_STMT_START{ \
- int err = func; \
- if (err < 0) \
- g_printerr (msg ": %s\n", snd_strerror (err)); \
-}G_STMT_END
-
-#define ALSA_ERROR(func,msg,retval) G_STMT_START { \
- int err = func; \
- if (err < 0) { \
- g_printerr (msg ": %s\n", snd_strerror (err)); \
- return retval; \
- } \
-}G_STMT_END
-
-/*** STREAMS ***/
-
-static s...
2007 Jul 16
0
configure.ac libswfdec-gtk/Makefile.am libswfdec-gtk/swfdec_playback_oss.c
...ze of one of our audio samples, in bytes */
+#define SAMPLESIZE 2
+#define CHANNELS 2
+
+/*** STREAMS ***/
+
+static gboolean
+handle_stream (GIOChannel *source, GIOCondition cond, gpointer data)
+{
+ Stream *stream = data;
+ char *frag = malloc(stream->fragsize);
+
+ if (frag == NULL) {
+ g_printerr ("Failed to allocate fragment of size %d\n",
+ stream->fragsize);
+ return FALSE;
+ }
+
+ while (TRUE) {
+ int ret;
+ audio_buf_info spaceinfo;
+
+ ret = ioctl(stream->dsp_fd, SNDCTL_DSP_GETOSPACE, &spaceinfo);
+ if (ret == -1) {
+ g_printerr ("Failed...
2007 Nov 22
0
2 commits - libswfdec-gtk/swfdec_playback_pa.c
...ecAudio *audio, SwfdecPlayback *sound)
g_assert_not_reached ();
}
static void
-context_state_callback (pa_context *pa, void *data) {
+context_state_callback (pa_context *pa, void *data)
+{
+ SwfdecPlayback *sound = data;
+
switch (pa_context_get_state(pa)) {
case PA_CONTEXT_FAILED:
- g_printerr("PA context failed");
+ g_printerr ("PA context failed\n");
+ pa_context_unref (pa);
+ sound->pa = NULL;
break;
default:
@@ -279,7 +291,7 @@ swfdec_playback_open (SwfdecPlayer *player, GMainContext *context)
sound->pa = pa_context_new (pa_api, "...
2007 Nov 08
0
configure.ac libswfdec-gtk/Makefile.am libswfdec-gtk/swfdec_playback_pa.c
...+{
+ Stream *stream = data;
+ char *frag;
+ unsigned int samples = bytes / SAMPLESIZE / CHANNELS;
+ int err;
+
+ if (stream->no_more)
+ return;
+
+ /* Adjust to our rounded-down number */
+ bytes = samples * SAMPLESIZE * CHANNELS;
+
+ frag = malloc (bytes);
+ if (frag == NULL) {
+ g_printerr ("Failed to allocate fragment of size %d\n", bytes);
+ return;
+ }
+
+ /* Set up our fragment and render swfdec's audio into it. The swfdec audio
+ * decoder renders deltas from the existing data in the fragment.
+ */
+ memset (frag, 0, bytes);
+ swfdec_audio_render (stream...
2007 Jan 31
0
Branch 'interpreter' - 20 commits - autogen.sh configure.ac libswfdec/js libswfdec/swfdec_debug.h libswfdec/swfdec_js.c libswfdec/swfdec_js_color.c libswfdec/swfdec_js_movie.c libswfdec/swfdec_movie.c libswfdec/swfdec_movie.h libswfdec/swfdec_script.c
...snd_pcm_t * pcm; /* the pcm we play back to */
- GSource ** sources; /* sources for writing data */
- guint n_sources; /* number of sources */
- guint offset; /* offset into sound */
-} Stream;
-
-#define ALSA_TRY(func,msg) G_STMT_START{ \
- int err = func; \
- if (err < 0) \
- g_printerr (msg ": %s\n", snd_strerror (err)); \
-}G_STMT_END
-
-#define ALSA_ERROR(func,msg,retval) G_STMT_START { \
- int err = func; \
- if (err < 0) { \
- g_printerr (msg ": %s\n", snd_strerror (err)); \
- return retval; \
- } \
-}G_STMT_END
-
-/*** STREAMS ***/
-
-static s...
2007 Apr 02
0
4 commits - configure.ac doc/Makefile.am doc/swfdec-docs.sgml doc/swfdec-sections.txt doc/swfdec.types libswfdec-gtk/Makefile.am libswfdec-gtk/swfdec-gtk.h libswfdec-gtk/swfdec_gtk_loader.c libswfdec-gtk/swfdec_gtk_loader.h
...es
diff --git a/player/swfdebug.c b/player/swfdebug.c
index af7f7dc..8b2e9f2 100644
--- a/player/swfdebug.c
+++ b/player/swfdebug.c
@@ -408,10 +408,10 @@ main (int argc, char *argv[])
return 1;
}
- loader = swfdec_loader_new_from_file (argv[1], &error);
- if (loader == NULL) {
- g_printerr ("Couldn't open file \"%s\": %s\n", argv[1], error->message);
- g_error_free (error);
+ loader = swfdec_loader_new_from_file (argv[1]);
+ if (loader->error) {
+ g_printerr ("Couldn't open file \"%s\": %s\n", argv[1], loader->error);
+...
2007 Oct 15
0
3 commits - libswfdec/swfdec_as_interpret.c libswfdec/swfdec_codec_audio.h test/swfdec-extract.c
...und, const char *filename)
{
GError *error = NULL;
- SwfdecBuffer *wav;
- gint16 tmp[2];
+ SwfdecBuffer *wav, *buffer;
+ SwfdecAudioFormat format;
/* try to render the sound, that should decode it. */
- swfdec_sound_render (sound, tmp, 0, 1);
-
- if (sound->decoded == NULL) {
- g_printerr ("not a sound event. For extraction of streams extract the sprite.\n");
+ buffer = swfdec_sound_get_decoded (sound, &format);
+ if (buffer == NULL) {
+ g_printerr ("Couldn't decode sound. For extraction of streams extract the sprite.\n");
return FALSE;
}
-...
2007 Feb 14
0
7 commits - libswfdec/swfdec_image.c libswfdec/swfdec_script.c libswfdec/swfdec_script.h test/Makefile.am test/swfdec_out.c test/swfdec_out.h test/swfedit.c test/swfedit_list.c test/swfedit_tag.c test/swfedit_token.c test/swfedit_token.h test/swfscript.c
...+{
+ char **actions = g_strsplit (list, ",", -1);
+ guint *ret;
+ guint i, len;
+
+ len = g_strv_length (actions);
+ ret = g_new (guint, len + 1);
+ ret[len] = 0;
+ for (i = 0; i < len; i++) {
+ ret[i] = swfdec_action_get_from_name (actions[i]);
+ if (ret[i] == 0) {
+ g_printerr ("No such action \"%s\"\n", actions[i]);
+ g_free (actions);
+ g_free (ret);
+ return NULL;
+ }
+ }
+ g_free (actions);
+ return ret;
+}
+
+int
+main (int argc, char **argv)
+{
+ SwfeditFile *file;
+ GError *error = NULL;
+ char *add_trace_s = NULL;
+ GO...
2008 Jan 07
0
12 commits - configure.ac doc/swfdec.types Makefile.am test/crashfinder.c test/dump.c test/Makefile.am test/swfdec-extract.c test/swfdec_out.c test/swfdec_out.h test/swfedit.c test/swfedit_file.c test/swfedit_file.h test/swfedit_list.c test/swfedit_list.h
...init
- swfdec_init ();
-
- // read command line params
- context = g_option_context_new ("Run a Flash file trying to crash Swfdec");
- g_option_context_add_main_entries (context, entries, NULL);
-
- if (g_option_context_parse (context, &argc, &argv, &err) == FALSE) {
- g_printerr ("Couldn't parse command-line options: %s\n", err->message);
- g_error_free (err);
- return 1;
- }
-
- if (filenames == NULL || g_strv_length (filenames) < 1) {
- g_printerr ("At least one input filename is required\n");
- return 1;
- }
-
- // make them...
2007 Nov 01
0
4 commits - libswfdec/swfdec_sound_object.c libswfdec/swfdec_text_field_movie_as.c libswfdec/swfdec_text_field_movie.c test/crashfinder.c test/Makefile.am
...init
+ swfdec_init ();
+
+ // read command line params
+ context = g_option_context_new ("Run a Flash file trying to crash Swfdec");
+ g_option_context_add_main_entries (context, entries, NULL);
+
+ if (g_option_context_parse (context, &argc, &argv, &err) == FALSE) {
+ g_printerr ("Couldn't parse command-line options: %s\n", err->message);
+ g_error_free (err);
+ return 1;
+ }
+
+ if (filenames == NULL || g_strv_length (filenames) < 1) {
+ g_printerr ("At least one input filename is required\n");
+ return 1;
+ }
+
+ // make them...
2007 Aug 02
1
player/swfplay.c
...nt argc, char *argv[])
{
@@ -75,6 +95,7 @@ main (int argc, char *argv[])
gboolean use_image = FALSE, no_sound = FALSE;
gboolean trace = FALSE;
char *variables = NULL;
+ char *s;
GtkWidget *window;
GOptionEntry options[] = {
@@ -106,17 +127,10 @@ main (int argc, char *argv[])
g_printerr ("Usage: %s [OPTIONS] filename\n", argv[0]);
return 1;
}
-
-#if HAVE_GNOMEVFS
- {
- char *s;
- s = gnome_vfs_make_uri_from_shell_arg (argv[1]);
- loader = swfdec_gtk_loader_new (s);
- g_free (s);
- }
-#else
- loader = swfdec_gtk_loader_new (argv[1]);
-#endif
+
+...
2007 Nov 10
0
[PATCH] swfdec: better variable parsing.
...s=.-_/",
- { "numbers", "uppercase", "lowercase", "special chars" },
- { "0123456789", "ABCDEFGHIJKLMNOPQRSTUVWXYZ", "abcdefghijklmnopqrstuvwxyz", ".-_/" }, 4 }
-};
-
-#define ERROR(...) G_STMT_START { \
- g_printerr ("ERROR (line %u): ", __LINE__); \
- g_printerr (__VA_ARGS__); \
- g_printerr ("\n"); \
- errors++; \
-}G_STMT_END
-
-static guint
-run_test_encode (Test *test)
-{
- GString *string;
- guint i, errors = 0;
-
- string = g_string_new ("");
- for (i = 0; i < tes...
2008 Jan 08
0
4 commits - configure.ac test/compiler.c test/.gitignore test/Makefile.am test/swfdec_test.c test/swfdec_test_function.c test/swfdec_test_function.h test/swfdec_test_global.c test/swfdec_test_initialize.as test/swfdec_test_initialize.h
...;
+
ctx = g_option_context_new ("");
g_option_context_add_main_entries (ctx, options, "options");
g_option_context_parse (ctx, &argc, &argv, &error);
@@ -95,12 +103,6 @@ main (int argc, char **argv)
return EXIT_FAILURE;
}
- if (argc < 2) {
- g_printerr ("ERROR: Usage: %s [OPTIONS] filename\n", argv[0]);
- return EXIT_FAILURE;
- }
-
- swfdec_init ();
script = load_script (script_filename);
g_free (script_filename);
if (script == NULL)
@@ -117,9 +119,22 @@ main (int argc, char **argv)
g_print ("ERROR: Not enough me...
2007 Nov 12
0
2 commits - libswfdec/swfdec_loader.c libswfdec/swfdec_loader_internal.h libswfdec/swfdec_movie.c libswfdec/swfdec_movie.h libswfdec/swfdec_resource.c test/various
...s=.-_/",
- { "numbers", "uppercase", "lowercase", "special chars" },
- { "0123456789", "ABCDEFGHIJKLMNOPQRSTUVWXYZ", "abcdefghijklmnopqrstuvwxyz", ".-_/" }, 4 }
-};
-
-#define ERROR(...) G_STMT_START { \
- g_printerr ("ERROR (line %u): ", __LINE__); \
- g_printerr (__VA_ARGS__); \
- g_printerr ("\n"); \
- errors++; \
-}G_STMT_END
-
-static guint
-run_test_encode (Test *test)
-{
- GString *string;
- guint i, errors = 0;
-
- string = g_string_new ("");
- for (i = 0; i < tes...
2007 Feb 02
0
Branch 'interpreter' - 6 commits - libswfdec/swfdec_bits.c libswfdec/swfdec_compiler.c libswfdec/swfdec_sprite.c test/swfdec-extract.c
...ing \n
diff --git a/test/swfdec-extract.c b/test/swfdec-extract.c
index bea068e..ac79124 100644
--- a/test/swfdec-extract.c
+++ b/test/swfdec-extract.c
@@ -259,7 +259,7 @@ main (int argc, char *argv[])
if (!export_graphic (SWFDEC_GRAPHIC (character), argv[3]))
ret = 1;
} else {
- g_printerr ("id %ld does not specify an exportable object", id);
+ g_printerr ("id %ld does not specify an exportable object\n", id);
ret = 1;
}
diff-tree 828ab7af700ce3d9b4e44b90c4f7d804b5d243cc (from parents)
Merge: 94e07c556a4e4f471f6700af54f35e55edf79a85 12bf86eb10e873ca73...
2008 Jan 14
0
player/swfdec-player.ui player/swfdec-window.c player/swfdec-window.h
...w));
+ g_return_if_fail (msg != NULL);
+
/* NB: This function can be called during the construction process (like when
* the UI file isn't found, so a window object may not even exist. */
- /* FIXME: disable playback related menu items */
- /* FIXME: output this in a saner way */
- g_printerr ("%s\n", msg);
+ if (window->error)
+ return;
window->error = TRUE;
+ va_start (varargs, format);
+ msg = g_strdup_vprintf (format, varargs);
+ va_end (varargs);
+
+ if (window->window == NULL) {
+ g_printerr ("%s\n", msg);
+ g_free (msg);
+ return;...
2007 Mar 27
0
15 commits - configure.ac doc/Makefile.am doc/swfdec-docs.sgml doc/swfdec-sections.txt doc/swfdec.types libswfdec-gtk/.gitignore libswfdec-gtk/Makefile.am libswfdec-gtk/swfdec-gtk.h libswfdec-gtk/swfdec_gtk_player.c libswfdec-gtk/swfdec_gtk_player.h
...snd_pcm_t * pcm; /* the pcm we play back to */
+ GSource ** sources; /* sources for writing data */
+ guint n_sources; /* number of sources */
+ guint offset; /* offset into sound */
+} Stream;
+
+#define ALSA_TRY(func,msg) G_STMT_START{ \
+ int err = func; \
+ if (err < 0) \
+ g_printerr (msg ": %s\n", snd_strerror (err)); \
+}G_STMT_END
+
+#define ALSA_ERROR(func,msg,retval) G_STMT_START { \
+ int err = func; \
+ if (err < 0) { \
+ g_printerr (msg ": %s\n", snd_strerror (err)); \
+ return retval; \
+ } \
+}G_STMT_END
+
+/*** STREAMS ***/
+
+static s...
2007 Dec 01
1
OpenBSD related patches
Hello, list !
Here is diff of changes, i had to make to get swfdec running on
OpenBSD 4.2-current.
Regards Valery.
P.S. Please cc me, i am not subscribed to the list
-------------- next part --------------
A non-text attachment was scrubbed...
Name: swfdec.diff
Type: application/octet-stream
Size: 11628 bytes
Desc: not available
Url :
2007 Mar 20
0
9 commits - configure.ac libswfdec/swfdec_bits.c libswfdec/swfdec_debug.c libswfdec/swfdec_js.c libswfdec/swfdec_script.c libswfdec/swfdec_sound.c
...,12 +51,8 @@ swfdec_debug_log (unsigned int level, co
s = g_strdup_vprintf (format, varargs);
va_end (varargs);
- if (g_getenv ("SWFDEC_DEBUG_ABORT"))
- g_error ("SWFDEC: %s: %s(%d): %s: %s\n",
- swfdec_debug_level_names[level], file, line, function, s);
- else
- g_printerr ("SWFDEC: %s: %s(%d): %s: %s\n",
- swfdec_debug_level_names[level], file, line, function, s);
+ g_printerr ("SWFDEC: %s: %s(%d): %s: %s\n",
+ swfdec_debug_level_names[level], file, line, function, s);
g_free (s);
}
diff-tree ca2faf15194e5f3003a513950322bad9722d6cae (...