search for: gmaincontext

Displaying 12 results from an estimated 12 matches for "gmaincontext".

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
...ly supported on 10 driver APIs depending on kernel. So if your - * sound card seems to do weird stuff, that is not my fault. - * Welcome to Linux sound in the 21st century. - */ - -/*** DEFINITIONS ***/ - -typedef struct { - SwfdecPlayer * player; - GList * streams; /* all Stream objects */ - GMainContext * context; /* context we work in */ -} Sound; - -typedef struct { - Sound * sound; /* reference to sound object */ - SwfdecAudio * audio; /* the audio we play back */ - snd_pcm_t * pcm; /* the pcm we play back to */ - GSource ** sources; /* sources for writing data */ - guint n_source...
2007 Jul 16
0
configure.ac libswfdec-gtk/Makefile.am libswfdec-gtk/swfdec_playback_oss.c
...* Allowing multiple access to /dev/dsp is not required by the OSS API spec, + * but FreeBSD's sound system lets you, which is what this file was written + * for. + */ + +/*** DEFINITIONS ***/ + +struct _SwfdecPlayback { + SwfdecPlayer * player; + GList * streams; /* all Stream objects */ + GMainContext * context; /* context we work in */ +}; + +typedef struct { + SwfdecPlayback * sound; /* reference to sound object */ + SwfdecAudio * audio; /* the audio we play back */ + int dsp_fd; + int fragsize; /* Audio fragment size */ + GSource * source; /* source for writing data */ + g...
2007 Nov 08
0
configure.ac libswfdec-gtk/Makefile.am libswfdec-gtk/swfdec_playback_pa.c
...lseaudio.h" +#include "pulse/glib-mainloop.h" + +/** @file Implements swfdec audio playback by dumping swfdec streams out + * using pulseaudio streams. + */ + +/*** DEFINITIONS ***/ + +struct _SwfdecPlayback { + SwfdecPlayer * player; + GList * streams; /* all Stream objects */ + GMainContext * context; /* glib context we work in */ + pa_glib_mainloop * pa_mainloop; /* PA to glib mainloop connection */ + pa_context * pa; /* PA context for sound rendering */ +}; + +typedef struct { + SwfdecPlayback * sound; /* reference to sound object */ + SwfdecAudio * audio; /* the audio...
2007 Nov 22
0
2 commits - libswfdec-gtk/swfdec_playback_pa.c
...(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, "swfdec"); - pa_context_set_state_callback (sound->pa, context_state_callback, NULL); + pa_context_set_state_callback (sound->pa, context_state_callback, sound); pa_context_connect (sound->pa, NULL, /* default...
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
...more errors diff --git a/libswfdec-gtk/swfdec_playback.h b/libswfdec-gtk/swfdec_playback.h index 8b894cf..8be67dd 100644 --- a/libswfdec-gtk/swfdec_playback.h +++ b/libswfdec-gtk/swfdec_playback.h @@ -24,10 +24,12 @@ G_BEGIN_DECLS -gpointer swfdec_playback_open (SwfdecPlayer * player, - GMainContext * context); +typedef struct _SwfdecPlayback SwfdecPlayback; -void swfdec_playback_close (gpointer sound); +SwfdecPlayback *swfdec_playback_open (SwfdecPlayer * player, + GMainContext * context); + +void swfdec_playback_close (SwfdecPlayback * sound); G_END_DECLS #endif diff --git a/l...
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
...ly supported on 10 driver APIs depending on kernel. So if your - * sound card seems to do weird stuff, that is not my fault. - * Welcome to Linux sound in the 21st century. - */ - -/*** DEFINITIONS ***/ - -typedef struct { - SwfdecPlayer * player; - GList * streams; /* all Stream objects */ - GMainContext * context; /* context we work in */ -} Sound; - -typedef struct { - Sound * sound; /* reference to sound object */ - SwfdecAudio * audio; /* the audio we play back */ - snd_pcm_t * pcm; /* the pcm we play back to */ - GSource ** sources; /* sources for writing data */ - guint n_source...
2019 Jul 15
2
[PATCH libnbd] examples: Include an example of integrating with the glibc main loop.
** NOT WORKING ** This patch shows how to integrate libnbd and the glib main loop. Posted mainly as a point of discussion as it doesn't quite work yet. Rich.
2019 Jul 17
1
Re: [PATCH libnbd] examples: Include an example of integrating with the glib main loop.
...static int finished_read (void *vp, int64_t cookie, int *error); > +static gboolean write_data (gpointer user_data); > +static int finished_write (void *vp, int64_t cookie, int *error); > + > +int > +main (int argc, char *argv[]) > +{ > + struct nbd_handle *src, *dest; > + GMainContext *loopctx = NULL; > + > + /* Create the main loop. */ > + loop = g_main_loop_new (loopctx, FALSE); > + > + /* Create the two NBD handles and nbdkit instances. */ > + src = nbd_create (); > + if (!src) { > + fprintf (stderr, "%s\n", nbd_get_error ()); > +...
2019 Jul 15
0
[PATCH libnbd] examples: Include an example of integrating with the glib main loop.
...oolean read_data (gpointer user_data); +static int finished_read (void *vp, int64_t cookie, int *error); +static gboolean write_data (gpointer user_data); +static int finished_write (void *vp, int64_t cookie, int *error); + +int +main (int argc, char *argv[]) +{ + struct nbd_handle *src, *dest; + GMainContext *loopctx = NULL; + + /* Create the main loop. */ + loop = g_main_loop_new (loopctx, FALSE); + + /* Create the two NBD handles and nbdkit instances. */ + src = nbd_create (); + if (!src) { + fprintf (stderr, "%s\n", nbd_get_error ()); + exit (EXIT_FAILURE); + } + dest = nbd_cr...
2019 Jul 17
0
[PATCH libnbd v2] examples: Include an example of integrating with the glib main loop.
...lean read_data (gpointer user_data); +static int finished_read (void *vp, int64_t rcookie, int *error); +static gboolean write_data (gpointer user_data); +static int finished_write (void *vp, int64_t wcookie, int *error); + +int +main (int argc, char *argv[]) +{ + struct nbd_handle *src, *dest; + GMainContext *loopctx = NULL; + + /* Create the main loop. */ + loop = g_main_loop_new (loopctx, FALSE); + + /* Create the two NBD handles and nbdkit instances. */ + src = nbd_create (); + if (!src) { + fprintf (stderr, "%s\n", nbd_get_error ()); + exit (EXIT_FAILURE); + } + dest = nbd_cr...
2019 Jul 17
2
[PATCH libnbd v2] examples: Include an example of integrating with glib main loop.
This is working now, and incorporates all of the changes in Eric's review, *except* that it still doesn't retire commands (although this seems to make no obvious difference, except possibly a performance and memory impact). Rich.
2008 Jan 21
0
70 commits - configure.ac libswfdec-gtk/Makefile.am libswfdec-gtk/swfdec-gtk.h libswfdec-gtk/swfdec_gtk_loader.c libswfdec-gtk/swfdec_gtk_player.c libswfdec-gtk/swfdec_gtk_socket.c libswfdec-gtk/swfdec_gtk_socket.h libswfdec-gtk/swfdec_playback_alsa.c
...= sound->streams; walk; walk = walk->next) { Stream *stream = walk->data; if (stream->audio == audio) { - swfdec_stream_close (stream); + swfdec_playback_stream_close (stream); return; } } @@ -330,7 +330,7 @@ swfdec_playback_open (SwfdecPlayer *player, GMainContext *context) g_signal_connect (player, "audio-added", G_CALLBACK (audio_added), sound); g_signal_connect (player, "audio-removed", G_CALLBACK (audio_removed), sound); for (walk = swfdec_player_get_audio (player); walk; walk = walk->next) { - swfdec_stream_open (sound...