[gst-devel] Re: Gnome Sound API (urgent)

Erik Walthinsen omega at temple-baptist.com
Fri Aug 3 21:05:27 CEST 2001


So, the first thing I want to do here is to clarify the scope of this API.
Is it just a "ding" API, or a somewhat more general sound-server API?  Is
the intent for this to handle any kind of file format (trivial with
gstreamer)?  How is the implementation intended to do things async?  With
threads, or sending the sound to a server process, or does it matter?

TIA,
   Omega

> > can you please have a short look at the new GNOME Sound API which
> > I just committed in libgnome/gnome-sound.h ?
> >
> > Unfortunately, this stuff is a little bit urgent since I want to
> > make the libgnome release tonight. We can still change the API
> > later on if absolutely necessary, but we should try hard to do it
> > correctly in the the first place.
> >
> > Below is what's currently in gnome-sound.h - if you want to use
> > GStreamer as backend or at least have support for this, we need
> > to make sure that the `GnomeSoundPlugin' struct suits your needs.
> >
> > =====
> > typedef struct _GnomeSoundSample GnomeSoundSample;
> > typedef struct _GnomeSoundPlugin GnomeSoundPlugin;
> >
> > struct _GnomeSoundPlugin {
> >     gulong version;
> >     const gchar *name;
> >
> >     gboolean (*init) (const gchar *backend_args,
> > 		      GError **error);
> >     void (*shutdown) (GError **error);
> >
> >     void (*play_file) (const gchar *filename,
> > 		       GError **error);
> >
> >     GnomeSoundSample * (*sample_new) (const gchar *name,
> > 				      GError **error);
> >     int (*sample_write) (GnomeSoundSample *gs,
> > 			 guint n_bytes, gpointer bytes,
> > 			 GError **error);
> >     void (*sample_write_done) (GnomeSoundSample *gs,
> > 			       GError **error);
> >
> >     GnomeSoundSample * (*sample_new_from_file) (const gchar *filename,
> > 						GError **error);
> >     void (*sample_play) (GnomeSoundSample *gs,
> > 			 GError **error);
> >     gboolean (*sample_is_playing) (GnomeSoundSample *gs,
> > 				   GError **error);
> >     void (*sample_stop) (GnomeSoundSample *gs,
> > 			 GError **error);
> >     void (*sample_wait_done) (GnomeSoundSample *gs,
> > 			      GError **error);
> >     void (*sample_release) (GnomeSoundSample *gs,
> > 			    GError **error);
> > };
> >
> > typedef enum
> > {
> >     /* no sound driver */
> >     GNOME_SOUND_ERROR_NODRIVER,
> >     /* not implemented */
> >     GNOME_SOUND_ERROR_NOT_IMPLEMENTED,
> >     /* device busy */
> >     GNOME_SOUND_ERROR_DEVICE_BUSY,
> >     /* I/O eror */
> >     GNOME_SOUND_ERROR_IO,
> >     /* Insufficient permissions */
> >     GNOME_SOUND_ERROR_PERMS,
> >     /* misc error */
> >     GNOME_SOUND_ERROR_MISC
> > } GnomeSoundError;
> >
> > #define GNOME_SOUND_ERROR gnome_sound_error_quark ()
> > GQuark gnome_sound_error_quark (void) G_GNUC_CONST;
> >
> > void gnome_sound_init (const gchar *driver_name,
> > 		       const gchar *backend_args,
> > 		       const GnomeSoundPlugin *opt_plugin,
> > 		       GError **error);
> >
> > void gnome_sound_shutdown (GError **error);
> >
> > void gnome_sound_play (const char *filename,
> > 		       GError **error);
> >
> > GnomeSoundSample *
> > gnome_sound_sample_new_from_file (const char *filename,
> > 				  GError **error);
> >
> > GnomeSoundSample *
> > gnome_sound_sample_new (const char *sample_name,
> > 			GError **error);
> >
> > int
> > gnome_sound_sample_write (GnomeSoundSample *gs,
> > 			  guint n_bytes, gpointer bytes,
> > 			  GError **error);
> >
> > void
> > gnome_sound_sample_write_done (GnomeSoundSample *gs,
> > 			       GError **error);
> >
> > void
> > gnome_sound_sample_play (GnomeSoundSample *gs,
> > 			 GError **error);
> >
> > gboolean
> > gnome_sound_sample_is_playing (GnomeSoundSample *gs,
> > 			       GError **error);
> >
> > void
> > gnome_sound_sample_stop (GnomeSoundSample *gs,
> > 			 GError **error);
> >
> > void
> > gnome_sound_sample_wait_done (GnomeSoundSample *gs,
> > 			      GError **error);
> >
> > void
> > gnome_sound_sample_release (GnomeSoundSample *gs,
> > 			    GError **error);
> > =====
> >
> > --
> > Martin Baulig
> > martin at gnome.org (private)
> > baulig at suse.de (work)
> >
>
>
>
> _______________________________________________
> gstreamer-devel mailing list
> gstreamer-devel at lists.sourceforge.net
> http://lists.sourceforge.net/lists/listinfo/gstreamer-devel
>

      Erik Walthinsen <omega at temple-baptist.com> - System Administrator
        __
       /  \                GStreamer - The only way to stream!
      |    | M E G A        ***** http://gstreamer.net/ *****
      _\  /_






More information about the gstreamer-devel mailing list