/* Ekiga -- A VoIP and Video-Conferencing application
 * Copyright (C) 2000-2007 Damien Sandras
 *
 * This library is free software; you can redistribute it and/or
 * modify it under the terms of the GNU Library General Public
 * License as published by the Free Software Foundation; either
 * version 2 of the License, or (at your option) any later version.
 *
 * This library is distributed in the hope that it will be useful,
 * but WITHOUT ANY WARRANTY; without even the implied warranty of
 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
 * Library General Public License for more details.
 *
 * You should have received a copy of the GNU Library General Public
 * License along with this library; if not, write to the
 * Free Software Foundation, Inc., 59 Temple Place - Suite 330,
 * Boston, MA 02111-1307, USA.
 */

/*
 *                         gmaudiosrc.h  -  description
 *                         ------------------------------------------
 *   begin                : written in 2007 by Julien Puydt
 *   copyright            : (c) 2007 by Julien Puydt
 *   description          : declaration of a gstreamer source to push data
 *                          from pwlib to a gstreamer pipeline
 *
 */

#ifndef __GM_AUDIO_SRC_H__
#define __GM_AUDIO_SRC_H__

#include <gst/gst.h>
#include <gst/base/gstbasesrc.h>

G_BEGIN_DECLS

#define GM_TYPE_AUDIO_SRC \
  (gm_audio_src_get_type())
#define GM_AUDIO_SRC(obj) \
  (G_TYPE_CHECK_INSTANCE_CAST((obj),GM_TYPE_AUDIO_SRC,GmAudioSrc))
#define GM_AUDIO_SRC_CLASS(klass) \
  (G_TYPE_CHECK_CLASS_CAST((klass),GM_TYPE_AUDIO_SRC,GmAudioSrcClass))
#define GM_IS_AUDIO_SRC(obj) \
  (G_TYPE_CHECK_INSTANCE_TYPE((obj),GM_TYPE_AUDIO_SRC))
#define GM_IS_AUDIO_SRC_CLASS(klass) \
  (G_TYPE_CHECK_CLASS_TYPE((klass),GM_TYPE_AUDIO_SRC))

typedef struct _GmAudioSrc GmAudioSrc;
typedef struct _GmAudioSrcClass GmAudioSrcClass;

struct _GmAudioSrc {
  GstBaseSrc     element;

  GstBuffer *buffer;
  guint64 offset;
};

struct _GmAudioSrcClass {
  GstBaseSrcClass parent_class;

};

GType gm_audio_src_get_type (void);

void gm_audio_src_push_data (GmAudioSrc *src,
			     const void *data,
			     guint length);

G_END_DECLS

#endif /* __GM_AUDIO_SRC_H__ */
