Commit ffaaa752 authored by Andy Wingo's avatar Andy Wingo

sys/oss/gstosssrc.*: Totally ported, dude.

Original commit message from CVS:
2005-08-23  Andy Wingo  <wingo@pobox.com>

* sys/oss/gstosssrc.h:
* sys/oss/gstosssrc.c: Totally ported, dude.

* sys/oss/Makefile.am:
* sys/oss/gstossaudio.c: Add osssrc.

* sys/oss/gstosssink.c: We do native byte order.
parent 86eb113d
2005-08-23 Andy Wingo <wingo@pobox.com>
* sys/oss/gstosssrc.h:
* sys/oss/gstosssrc.c: Totally ported, dude.
* sys/oss/Makefile.am:
* sys/oss/gstossaudio.c: Add osssrc.
* sys/oss/gstosssink.c: We do native byte order.
2005-08-23 Owen Fraser-Green <owen@discobabe.net>
* gst/realmedia/rmdemux.c (gst_rmdemux_src_event): Fixed bug
......
......@@ -4,7 +4,8 @@ libgstossaudio_la_SOURCES = gstossaudio.c \
gstosselement.c \
gstosshelper.c \
gstossmixer.c \
gstosssink.c
gstosssink.c \
gstosssrc.c
# gstossdmabuffer.c
......
......@@ -35,9 +35,9 @@ static gboolean
plugin_init (GstPlugin * plugin)
{
if ( /*!gst_element_register (plugin, "ossmixer", GST_RANK_PRIMARY,
GST_TYPE_OSSELEMENT) ||
!gst_element_register (plugin, "osssrc", GST_RANK_PRIMARY,
GST_TYPE_OSSSRC) || */
GST_TYPE_OSSELEMENT) || */
!gst_element_register (plugin, "osssrc", GST_RANK_PRIMARY,
GST_TYPE_OSS_SRC) ||
!gst_element_register (plugin, "osssink", GST_RANK_SECONDARY,
GST_TYPE_OSSSINK)) {
return FALSE;
......
......@@ -69,10 +69,8 @@ static GstStaticPadTemplate osssink_sink_factory =
GST_PAD_SINK,
GST_PAD_ALWAYS,
GST_STATIC_CAPS ("audio/x-raw-int, "
//"endianness = (int) { LITTLE_ENDIAN, BIG_ENDIAN }, "
//"signed = (boolean) { TRUE, FALSE }, "
"endianness = (int) LITTLE_ENDIAN, "
"signed = (boolean) TRUE, "
"endianness = (int) { " G_STRINGIFY (G_BYTE_ORDER) " }, "
"signed = (boolean) { TRUE, FALSE }, "
"width = (int) 16, "
"depth = (int) 16, "
"rate = (int) [ 1, MAX ], " "channels = (int) [ 1, 2 ]; "
......
This diff is collapsed.
......@@ -21,58 +21,44 @@
*/
#ifndef __GST_OSSSRC_H__
#define __GST_OSSSRC_H__
#ifndef __GST_OSS_SRC_H__
#define __GST_OSS_SRC_H__
#include <gst/gst.h>
#include <gst/audio/gstaudiosrc.h>
#include "gstosselement.h"
G_BEGIN_DECLS
#define GST_TYPE_OSSSRC \
(gst_oss_src_get_type())
#define GST_OSSSRC(obj) \
(G_TYPE_CHECK_INSTANCE_CAST((obj),GST_TYPE_OSSSRC,GstOssSrc))
#define GST_OSSSRC_CLASS(klass) \
(G_TYPE_CHECK_CLASS_CAST((klass),GST_TYPE_OSSSRC,GstOssSrcClass))
#define GST_IS_OSSSRC(obj) \
(G_TYPE_CHECK_INSTANCE_TYPE((obj),GST_TYPE_OSSSRC))
#define GST_IS_OSSSRC_CLASS(obj) \
(G_TYPE_CHECK_CLASS_TYPE((klass),GST_TYPE_OSSSRC))
typedef enum {
GST_OSSSRC_OPEN = GST_ELEMENT_FLAG_LAST,
GST_OSSSRC_FLAG_LAST = GST_ELEMENT_FLAG_LAST+2,
} GstOssSrcFlags;
#define GST_TYPE_OSS_SRC (gst_oss_src_get_type())
#define GST_OSS_SRC(obj) (G_TYPE_CHECK_INSTANCE_CAST((obj),GST_TYPE_OSS_SRC,GstOssSrc))
#define GST_OSS_SRC_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST((klass),GST_TYPE_OSS_SRC,GstOssSrcClass))
#define GST_IS_OSS_SRC(obj) (G_TYPE_CHECK_INSTANCE_TYPE((obj),GST_TYPE_OSS_SRC))
#define GST_IS_OSS_SRC_CLASS(obj) (G_TYPE_CHECK_CLASS_TYPE((klass),GST_TYPE_OSS_SRC))
typedef struct _GstOssSrc GstOssSrc;
typedef struct _GstOssSrcClass GstOssSrcClass;
struct _GstOssSrc {
GstOssElement element;
GstAudioSrc src;
/* pads */
GstPad *srcpad;
GstOssElement *element;
gboolean need_eos; /* Do we need to emit an EOS? */
/* blocking.
* curoffset is in *samples*. */
gulong curoffset;
gulong buffersize;
gint fd;
gint bytes_per_sample;
/* clocks */
GstClock *provided_clock, *clock;
gchar *device;
gchar *device_name;
};
struct _GstOssSrcClass {
GstOssElementClass parent_class;
GstAudioSrcClass parent_class;
};
GType gst_oss_src_get_type(void);
G_END_DECLS
#endif /* __GST_OSSSRC_H__ */
#endif /* __GST_OSS_SRC_H__ */
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