2004-01-21 06:57:30 +00:00
|
|
|
/* GStreamer
|
|
|
|
* Copyright (C) <2003> Laurent Vivier <Laurent.Vivier@bull.net>
|
|
|
|
* Copyright (C) <2004> Arwed v. Merkatz <v.merkatz@gmx.net>
|
|
|
|
*
|
|
|
|
* Based on esdsink.c:
|
|
|
|
* Copyright (C) <2001> Richard Boulton <richard-gst@tartarus.org>
|
|
|
|
*
|
|
|
|
* 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.
|
|
|
|
*/
|
|
|
|
|
|
|
|
#ifdef HAVE_CONFIG_H
|
|
|
|
#include "config.h"
|
|
|
|
#endif
|
ext/nas/: Bunch of nassink clean-ups: make build by adding the right CFLAGS and LIBS to Makefile.am; rename structure...
Original commit message from CVS:
* ext/nas/Makefile.am:
* ext/nas/README:
* ext/nas/nassink.c: (gst_nas_sink_get_type),
(gst_nas_sink_base_init), (gst_nas_sink_class_init),
(gst_nas_sink_init), (gst_nas_sink_finalize),
(gst_nas_sink_getcaps), (gst_nas_sink_prepare),
(gst_nas_sink_unprepare), (gst_nas_sink_delay),
(gst_nas_sink_reset), (gst_nas_sink_write),
(gst_nas_sink_set_property), (gst_nas_sink_get_property),
(gst_nas_sink_open), (gst_nas_sink_close), (NAS_flush),
(NAS_sendData), (NAS_EventHandler), (gst_nas_sink_sink_get_format),
(NAS_createFlow), (plugin_init):
* ext/nas/nassink.h:
Bunch of nassink clean-ups: make build by adding the right CFLAGS
and LIBS to Makefile.am; rename structure, macros and functions
according to canonical naming scheme; move some things around a bit;
use GST_CAT_DEFAULT instead of GST_CAT_* everywhere; remove README
file that didn't really contain any useful information anyway (the
useful bits have been moved into the 'host' property description).
2007-03-04 20:35:26 +00:00
|
|
|
|
2004-01-21 06:57:30 +00:00
|
|
|
#include <gst/gst.h>
|
|
|
|
#include <string.h>
|
|
|
|
#include <audio/audiolib.h>
|
|
|
|
#include <audio/soundlib.h>
|
|
|
|
#include "nassink.h"
|
|
|
|
|
2005-12-06 19:55:58 +00:00
|
|
|
#define NAS_SOUND_PORT_DURATION (2)
|
2004-01-21 06:57:30 +00:00
|
|
|
|
ext/nas/: Bunch of nassink clean-ups: make build by adding the right CFLAGS and LIBS to Makefile.am; rename structure...
Original commit message from CVS:
* ext/nas/Makefile.am:
* ext/nas/README:
* ext/nas/nassink.c: (gst_nas_sink_get_type),
(gst_nas_sink_base_init), (gst_nas_sink_class_init),
(gst_nas_sink_init), (gst_nas_sink_finalize),
(gst_nas_sink_getcaps), (gst_nas_sink_prepare),
(gst_nas_sink_unprepare), (gst_nas_sink_delay),
(gst_nas_sink_reset), (gst_nas_sink_write),
(gst_nas_sink_set_property), (gst_nas_sink_get_property),
(gst_nas_sink_open), (gst_nas_sink_close), (NAS_flush),
(NAS_sendData), (NAS_EventHandler), (gst_nas_sink_sink_get_format),
(NAS_createFlow), (plugin_init):
* ext/nas/nassink.h:
Bunch of nassink clean-ups: make build by adding the right CFLAGS
and LIBS to Makefile.am; rename structure, macros and functions
according to canonical naming scheme; move some things around a bit;
use GST_CAT_DEFAULT instead of GST_CAT_* everywhere; remove README
file that didn't really contain any useful information anyway (the
useful bits have been moved into the 'host' property description).
2007-03-04 20:35:26 +00:00
|
|
|
GST_DEBUG_CATEGORY_STATIC (nas_debug);
|
|
|
|
#define GST_CAT_DEFAULT nas_debug
|
2004-01-21 06:57:30 +00:00
|
|
|
|
2004-03-14 22:34:33 +00:00
|
|
|
enum
|
|
|
|
{
|
2004-01-21 06:57:30 +00:00
|
|
|
ARG_0,
|
|
|
|
ARG_MUTE,
|
|
|
|
ARG_HOST
|
|
|
|
};
|
|
|
|
|
ext/nas/: Bunch of nassink clean-ups: make build by adding the right CFLAGS and LIBS to Makefile.am; rename structure...
Original commit message from CVS:
* ext/nas/Makefile.am:
* ext/nas/README:
* ext/nas/nassink.c: (gst_nas_sink_get_type),
(gst_nas_sink_base_init), (gst_nas_sink_class_init),
(gst_nas_sink_init), (gst_nas_sink_finalize),
(gst_nas_sink_getcaps), (gst_nas_sink_prepare),
(gst_nas_sink_unprepare), (gst_nas_sink_delay),
(gst_nas_sink_reset), (gst_nas_sink_write),
(gst_nas_sink_set_property), (gst_nas_sink_get_property),
(gst_nas_sink_open), (gst_nas_sink_close), (NAS_flush),
(NAS_sendData), (NAS_EventHandler), (gst_nas_sink_sink_get_format),
(NAS_createFlow), (plugin_init):
* ext/nas/nassink.h:
Bunch of nassink clean-ups: make build by adding the right CFLAGS
and LIBS to Makefile.am; rename structure, macros and functions
according to canonical naming scheme; move some things around a bit;
use GST_CAT_DEFAULT instead of GST_CAT_* everywhere; remove README
file that didn't really contain any useful information anyway (the
useful bits have been moved into the 'host' property description).
2007-03-04 20:35:26 +00:00
|
|
|
#define DEFAULT_MUTE FALSE
|
|
|
|
#define DEFAULT_HOST NULL
|
|
|
|
|
2004-03-14 22:34:33 +00:00
|
|
|
static GstStaticPadTemplate sink_factory = GST_STATIC_PAD_TEMPLATE ("sink",
|
|
|
|
GST_PAD_SINK,
|
|
|
|
GST_PAD_ALWAYS,
|
|
|
|
GST_STATIC_CAPS ("audio/x-raw-int, "
|
2004-11-09 06:08:22 +00:00
|
|
|
"endianness = (int) BYTE_ORDER, "
|
2004-03-15 19:32:27 +00:00
|
|
|
"signed = (boolean) TRUE, "
|
|
|
|
"width = (int) 16, "
|
|
|
|
"depth = (int) 16, "
|
|
|
|
"rate = (int) [ 1000, 96000 ], "
|
|
|
|
"channels = (int) [ 1, 2 ]; "
|
|
|
|
"audio/x-raw-int, "
|
|
|
|
"signed = (boolean) FALSE, "
|
|
|
|
"width = (int) 8, "
|
|
|
|
"depth = (int) 8, "
|
|
|
|
"rate = (int) [ 1000, 96000 ], " "channels = (int) [ 1, 2 ]")
|
2004-03-14 22:34:33 +00:00
|
|
|
);
|
|
|
|
|
ext/nas/: Bunch of nassink clean-ups: make build by adding the right CFLAGS and LIBS to Makefile.am; rename structure...
Original commit message from CVS:
* ext/nas/Makefile.am:
* ext/nas/README:
* ext/nas/nassink.c: (gst_nas_sink_get_type),
(gst_nas_sink_base_init), (gst_nas_sink_class_init),
(gst_nas_sink_init), (gst_nas_sink_finalize),
(gst_nas_sink_getcaps), (gst_nas_sink_prepare),
(gst_nas_sink_unprepare), (gst_nas_sink_delay),
(gst_nas_sink_reset), (gst_nas_sink_write),
(gst_nas_sink_set_property), (gst_nas_sink_get_property),
(gst_nas_sink_open), (gst_nas_sink_close), (NAS_flush),
(NAS_sendData), (NAS_EventHandler), (gst_nas_sink_sink_get_format),
(NAS_createFlow), (plugin_init):
* ext/nas/nassink.h:
Bunch of nassink clean-ups: make build by adding the right CFLAGS
and LIBS to Makefile.am; rename structure, macros and functions
according to canonical naming scheme; move some things around a bit;
use GST_CAT_DEFAULT instead of GST_CAT_* everywhere; remove README
file that didn't really contain any useful information anyway (the
useful bits have been moved into the 'host' property description).
2007-03-04 20:35:26 +00:00
|
|
|
static void gst_nas_sink_base_init (gpointer g_class);
|
|
|
|
static void gst_nas_sink_class_init (GstNasSinkClass * klass);
|
|
|
|
static void gst_nas_sink_init (GstNasSink * nassink);
|
|
|
|
static void gst_nas_sink_finalize (GObject * object);
|
2004-03-14 22:34:33 +00:00
|
|
|
|
ext/nas/: Bunch of nassink clean-ups: make build by adding the right CFLAGS and LIBS to Makefile.am; rename structure...
Original commit message from CVS:
* ext/nas/Makefile.am:
* ext/nas/README:
* ext/nas/nassink.c: (gst_nas_sink_get_type),
(gst_nas_sink_base_init), (gst_nas_sink_class_init),
(gst_nas_sink_init), (gst_nas_sink_finalize),
(gst_nas_sink_getcaps), (gst_nas_sink_prepare),
(gst_nas_sink_unprepare), (gst_nas_sink_delay),
(gst_nas_sink_reset), (gst_nas_sink_write),
(gst_nas_sink_set_property), (gst_nas_sink_get_property),
(gst_nas_sink_open), (gst_nas_sink_close), (NAS_flush),
(NAS_sendData), (NAS_EventHandler), (gst_nas_sink_sink_get_format),
(NAS_createFlow), (plugin_init):
* ext/nas/nassink.h:
Bunch of nassink clean-ups: make build by adding the right CFLAGS
and LIBS to Makefile.am; rename structure, macros and functions
according to canonical naming scheme; move some things around a bit;
use GST_CAT_DEFAULT instead of GST_CAT_* everywhere; remove README
file that didn't really contain any useful information anyway (the
useful bits have been moved into the 'host' property description).
2007-03-04 20:35:26 +00:00
|
|
|
static gboolean gst_nas_sink_open (GstAudioSink * sink);
|
|
|
|
static gboolean gst_nas_sink_close (GstAudioSink * sink);
|
|
|
|
static gboolean gst_nas_sink_prepare (GstAudioSink * sink,
|
2007-03-02 19:43:48 +00:00
|
|
|
GstRingBufferSpec * spec);
|
ext/nas/: Bunch of nassink clean-ups: make build by adding the right CFLAGS and LIBS to Makefile.am; rename structure...
Original commit message from CVS:
* ext/nas/Makefile.am:
* ext/nas/README:
* ext/nas/nassink.c: (gst_nas_sink_get_type),
(gst_nas_sink_base_init), (gst_nas_sink_class_init),
(gst_nas_sink_init), (gst_nas_sink_finalize),
(gst_nas_sink_getcaps), (gst_nas_sink_prepare),
(gst_nas_sink_unprepare), (gst_nas_sink_delay),
(gst_nas_sink_reset), (gst_nas_sink_write),
(gst_nas_sink_set_property), (gst_nas_sink_get_property),
(gst_nas_sink_open), (gst_nas_sink_close), (NAS_flush),
(NAS_sendData), (NAS_EventHandler), (gst_nas_sink_sink_get_format),
(NAS_createFlow), (plugin_init):
* ext/nas/nassink.h:
Bunch of nassink clean-ups: make build by adding the right CFLAGS
and LIBS to Makefile.am; rename structure, macros and functions
according to canonical naming scheme; move some things around a bit;
use GST_CAT_DEFAULT instead of GST_CAT_* everywhere; remove README
file that didn't really contain any useful information anyway (the
useful bits have been moved into the 'host' property description).
2007-03-04 20:35:26 +00:00
|
|
|
static gboolean gst_nas_sink_unprepare (GstAudioSink * sink);
|
|
|
|
static guint gst_nas_sink_write (GstAudioSink * asink, gpointer data,
|
2007-03-02 19:43:48 +00:00
|
|
|
guint length);
|
ext/nas/: Bunch of nassink clean-ups: make build by adding the right CFLAGS and LIBS to Makefile.am; rename structure...
Original commit message from CVS:
* ext/nas/Makefile.am:
* ext/nas/README:
* ext/nas/nassink.c: (gst_nas_sink_get_type),
(gst_nas_sink_base_init), (gst_nas_sink_class_init),
(gst_nas_sink_init), (gst_nas_sink_finalize),
(gst_nas_sink_getcaps), (gst_nas_sink_prepare),
(gst_nas_sink_unprepare), (gst_nas_sink_delay),
(gst_nas_sink_reset), (gst_nas_sink_write),
(gst_nas_sink_set_property), (gst_nas_sink_get_property),
(gst_nas_sink_open), (gst_nas_sink_close), (NAS_flush),
(NAS_sendData), (NAS_EventHandler), (gst_nas_sink_sink_get_format),
(NAS_createFlow), (plugin_init):
* ext/nas/nassink.h:
Bunch of nassink clean-ups: make build by adding the right CFLAGS
and LIBS to Makefile.am; rename structure, macros and functions
according to canonical naming scheme; move some things around a bit;
use GST_CAT_DEFAULT instead of GST_CAT_* everywhere; remove README
file that didn't really contain any useful information anyway (the
useful bits have been moved into the 'host' property description).
2007-03-04 20:35:26 +00:00
|
|
|
static guint gst_nas_sink_delay (GstAudioSink * asink);
|
|
|
|
static void gst_nas_sink_reset (GstAudioSink * asink);
|
|
|
|
static GstCaps *gst_nas_sink_getcaps (GstBaseSink * pad);
|
2004-03-14 22:34:33 +00:00
|
|
|
|
ext/nas/: Bunch of nassink clean-ups: make build by adding the right CFLAGS and LIBS to Makefile.am; rename structure...
Original commit message from CVS:
* ext/nas/Makefile.am:
* ext/nas/README:
* ext/nas/nassink.c: (gst_nas_sink_get_type),
(gst_nas_sink_base_init), (gst_nas_sink_class_init),
(gst_nas_sink_init), (gst_nas_sink_finalize),
(gst_nas_sink_getcaps), (gst_nas_sink_prepare),
(gst_nas_sink_unprepare), (gst_nas_sink_delay),
(gst_nas_sink_reset), (gst_nas_sink_write),
(gst_nas_sink_set_property), (gst_nas_sink_get_property),
(gst_nas_sink_open), (gst_nas_sink_close), (NAS_flush),
(NAS_sendData), (NAS_EventHandler), (gst_nas_sink_sink_get_format),
(NAS_createFlow), (plugin_init):
* ext/nas/nassink.h:
Bunch of nassink clean-ups: make build by adding the right CFLAGS
and LIBS to Makefile.am; rename structure, macros and functions
according to canonical naming scheme; move some things around a bit;
use GST_CAT_DEFAULT instead of GST_CAT_* everywhere; remove README
file that didn't really contain any useful information anyway (the
useful bits have been moved into the 'host' property description).
2007-03-04 20:35:26 +00:00
|
|
|
static void gst_nas_sink_set_property (GObject * object, guint prop_id,
|
2004-03-14 22:34:33 +00:00
|
|
|
const GValue * value, GParamSpec * pspec);
|
ext/nas/: Bunch of nassink clean-ups: make build by adding the right CFLAGS and LIBS to Makefile.am; rename structure...
Original commit message from CVS:
* ext/nas/Makefile.am:
* ext/nas/README:
* ext/nas/nassink.c: (gst_nas_sink_get_type),
(gst_nas_sink_base_init), (gst_nas_sink_class_init),
(gst_nas_sink_init), (gst_nas_sink_finalize),
(gst_nas_sink_getcaps), (gst_nas_sink_prepare),
(gst_nas_sink_unprepare), (gst_nas_sink_delay),
(gst_nas_sink_reset), (gst_nas_sink_write),
(gst_nas_sink_set_property), (gst_nas_sink_get_property),
(gst_nas_sink_open), (gst_nas_sink_close), (NAS_flush),
(NAS_sendData), (NAS_EventHandler), (gst_nas_sink_sink_get_format),
(NAS_createFlow), (plugin_init):
* ext/nas/nassink.h:
Bunch of nassink clean-ups: make build by adding the right CFLAGS
and LIBS to Makefile.am; rename structure, macros and functions
according to canonical naming scheme; move some things around a bit;
use GST_CAT_DEFAULT instead of GST_CAT_* everywhere; remove README
file that didn't really contain any useful information anyway (the
useful bits have been moved into the 'host' property description).
2007-03-04 20:35:26 +00:00
|
|
|
static void gst_nas_sink_get_property (GObject * object, guint prop_id,
|
2004-03-14 22:34:33 +00:00
|
|
|
GValue * value, GParamSpec * pspec);
|
|
|
|
|
ext/nas/: Bunch of nassink clean-ups: make build by adding the right CFLAGS and LIBS to Makefile.am; rename structure...
Original commit message from CVS:
* ext/nas/Makefile.am:
* ext/nas/README:
* ext/nas/nassink.c: (gst_nas_sink_get_type),
(gst_nas_sink_base_init), (gst_nas_sink_class_init),
(gst_nas_sink_init), (gst_nas_sink_finalize),
(gst_nas_sink_getcaps), (gst_nas_sink_prepare),
(gst_nas_sink_unprepare), (gst_nas_sink_delay),
(gst_nas_sink_reset), (gst_nas_sink_write),
(gst_nas_sink_set_property), (gst_nas_sink_get_property),
(gst_nas_sink_open), (gst_nas_sink_close), (NAS_flush),
(NAS_sendData), (NAS_EventHandler), (gst_nas_sink_sink_get_format),
(NAS_createFlow), (plugin_init):
* ext/nas/nassink.h:
Bunch of nassink clean-ups: make build by adding the right CFLAGS
and LIBS to Makefile.am; rename structure, macros and functions
according to canonical naming scheme; move some things around a bit;
use GST_CAT_DEFAULT instead of GST_CAT_* everywhere; remove README
file that didn't really contain any useful information anyway (the
useful bits have been moved into the 'host' property description).
2007-03-04 20:35:26 +00:00
|
|
|
static void NAS_flush (GstNasSink * sink);
|
|
|
|
static void NAS_sendData (GstNasSink * sink, AuUint32 numBytes);
|
2004-03-14 22:34:33 +00:00
|
|
|
static AuBool NAS_EventHandler (AuServer * aud, AuEvent * ev,
|
|
|
|
AuEventHandlerRec * handler);
|
|
|
|
static AuDeviceID NAS_getDevice (AuServer * aud, int numTracks);
|
ext/nas/: Bunch of nassink clean-ups: make build by adding the right CFLAGS and LIBS to Makefile.am; rename structure...
Original commit message from CVS:
* ext/nas/Makefile.am:
* ext/nas/README:
* ext/nas/nassink.c: (gst_nas_sink_get_type),
(gst_nas_sink_base_init), (gst_nas_sink_class_init),
(gst_nas_sink_init), (gst_nas_sink_finalize),
(gst_nas_sink_getcaps), (gst_nas_sink_prepare),
(gst_nas_sink_unprepare), (gst_nas_sink_delay),
(gst_nas_sink_reset), (gst_nas_sink_write),
(gst_nas_sink_set_property), (gst_nas_sink_get_property),
(gst_nas_sink_open), (gst_nas_sink_close), (NAS_flush),
(NAS_sendData), (NAS_EventHandler), (gst_nas_sink_sink_get_format),
(NAS_createFlow), (plugin_init):
* ext/nas/nassink.h:
Bunch of nassink clean-ups: make build by adding the right CFLAGS
and LIBS to Makefile.am; rename structure, macros and functions
according to canonical naming scheme; move some things around a bit;
use GST_CAT_DEFAULT instead of GST_CAT_* everywhere; remove README
file that didn't really contain any useful information anyway (the
useful bits have been moved into the 'host' property description).
2007-03-04 20:35:26 +00:00
|
|
|
static int NAS_createFlow (GstNasSink * sink, GstRingBufferSpec * spec);
|
2004-01-21 06:57:30 +00:00
|
|
|
|
|
|
|
static GstElementClass *parent_class = NULL;
|
|
|
|
|
ext/nas/: Bunch of nassink clean-ups: make build by adding the right CFLAGS and LIBS to Makefile.am; rename structure...
Original commit message from CVS:
* ext/nas/Makefile.am:
* ext/nas/README:
* ext/nas/nassink.c: (gst_nas_sink_get_type),
(gst_nas_sink_base_init), (gst_nas_sink_class_init),
(gst_nas_sink_init), (gst_nas_sink_finalize),
(gst_nas_sink_getcaps), (gst_nas_sink_prepare),
(gst_nas_sink_unprepare), (gst_nas_sink_delay),
(gst_nas_sink_reset), (gst_nas_sink_write),
(gst_nas_sink_set_property), (gst_nas_sink_get_property),
(gst_nas_sink_open), (gst_nas_sink_close), (NAS_flush),
(NAS_sendData), (NAS_EventHandler), (gst_nas_sink_sink_get_format),
(NAS_createFlow), (plugin_init):
* ext/nas/nassink.h:
Bunch of nassink clean-ups: make build by adding the right CFLAGS
and LIBS to Makefile.am; rename structure, macros and functions
according to canonical naming scheme; move some things around a bit;
use GST_CAT_DEFAULT instead of GST_CAT_* everywhere; remove README
file that didn't really contain any useful information anyway (the
useful bits have been moved into the 'host' property description).
2007-03-04 20:35:26 +00:00
|
|
|
static const GstElementDetails nas_sink_details =
|
|
|
|
GST_ELEMENT_DETAILS ("NAS audio sink",
|
|
|
|
"Sink/Audio",
|
|
|
|
"Plays audio to a Network Audio Server",
|
|
|
|
"Laurent Vivier <Laurent.Vivier@bull.net>, "
|
|
|
|
"Arwed v. Merkatz <v.merkatz@gmx.net>");
|
|
|
|
|
2004-01-21 06:57:30 +00:00
|
|
|
GType
|
ext/nas/: Bunch of nassink clean-ups: make build by adding the right CFLAGS and LIBS to Makefile.am; rename structure...
Original commit message from CVS:
* ext/nas/Makefile.am:
* ext/nas/README:
* ext/nas/nassink.c: (gst_nas_sink_get_type),
(gst_nas_sink_base_init), (gst_nas_sink_class_init),
(gst_nas_sink_init), (gst_nas_sink_finalize),
(gst_nas_sink_getcaps), (gst_nas_sink_prepare),
(gst_nas_sink_unprepare), (gst_nas_sink_delay),
(gst_nas_sink_reset), (gst_nas_sink_write),
(gst_nas_sink_set_property), (gst_nas_sink_get_property),
(gst_nas_sink_open), (gst_nas_sink_close), (NAS_flush),
(NAS_sendData), (NAS_EventHandler), (gst_nas_sink_sink_get_format),
(NAS_createFlow), (plugin_init):
* ext/nas/nassink.h:
Bunch of nassink clean-ups: make build by adding the right CFLAGS
and LIBS to Makefile.am; rename structure, macros and functions
according to canonical naming scheme; move some things around a bit;
use GST_CAT_DEFAULT instead of GST_CAT_* everywhere; remove README
file that didn't really contain any useful information anyway (the
useful bits have been moved into the 'host' property description).
2007-03-04 20:35:26 +00:00
|
|
|
gst_nas_sink_get_type (void)
|
2004-01-21 06:57:30 +00:00
|
|
|
{
|
ext/nas/: Bunch of nassink clean-ups: make build by adding the right CFLAGS and LIBS to Makefile.am; rename structure...
Original commit message from CVS:
* ext/nas/Makefile.am:
* ext/nas/README:
* ext/nas/nassink.c: (gst_nas_sink_get_type),
(gst_nas_sink_base_init), (gst_nas_sink_class_init),
(gst_nas_sink_init), (gst_nas_sink_finalize),
(gst_nas_sink_getcaps), (gst_nas_sink_prepare),
(gst_nas_sink_unprepare), (gst_nas_sink_delay),
(gst_nas_sink_reset), (gst_nas_sink_write),
(gst_nas_sink_set_property), (gst_nas_sink_get_property),
(gst_nas_sink_open), (gst_nas_sink_close), (NAS_flush),
(NAS_sendData), (NAS_EventHandler), (gst_nas_sink_sink_get_format),
(NAS_createFlow), (plugin_init):
* ext/nas/nassink.h:
Bunch of nassink clean-ups: make build by adding the right CFLAGS
and LIBS to Makefile.am; rename structure, macros and functions
according to canonical naming scheme; move some things around a bit;
use GST_CAT_DEFAULT instead of GST_CAT_* everywhere; remove README
file that didn't really contain any useful information anyway (the
useful bits have been moved into the 'host' property description).
2007-03-04 20:35:26 +00:00
|
|
|
static GType nas_sink_type = 0;
|
2004-01-21 06:57:30 +00:00
|
|
|
|
ext/nas/: Bunch of nassink clean-ups: make build by adding the right CFLAGS and LIBS to Makefile.am; rename structure...
Original commit message from CVS:
* ext/nas/Makefile.am:
* ext/nas/README:
* ext/nas/nassink.c: (gst_nas_sink_get_type),
(gst_nas_sink_base_init), (gst_nas_sink_class_init),
(gst_nas_sink_init), (gst_nas_sink_finalize),
(gst_nas_sink_getcaps), (gst_nas_sink_prepare),
(gst_nas_sink_unprepare), (gst_nas_sink_delay),
(gst_nas_sink_reset), (gst_nas_sink_write),
(gst_nas_sink_set_property), (gst_nas_sink_get_property),
(gst_nas_sink_open), (gst_nas_sink_close), (NAS_flush),
(NAS_sendData), (NAS_EventHandler), (gst_nas_sink_sink_get_format),
(NAS_createFlow), (plugin_init):
* ext/nas/nassink.h:
Bunch of nassink clean-ups: make build by adding the right CFLAGS
and LIBS to Makefile.am; rename structure, macros and functions
according to canonical naming scheme; move some things around a bit;
use GST_CAT_DEFAULT instead of GST_CAT_* everywhere; remove README
file that didn't really contain any useful information anyway (the
useful bits have been moved into the 'host' property description).
2007-03-04 20:35:26 +00:00
|
|
|
if (!nas_sink_type) {
|
|
|
|
static const GTypeInfo nas_sink_info = {
|
|
|
|
sizeof (GstNasSinkClass),
|
|
|
|
gst_nas_sink_base_init,
|
2004-01-21 06:57:30 +00:00
|
|
|
NULL,
|
ext/nas/: Bunch of nassink clean-ups: make build by adding the right CFLAGS and LIBS to Makefile.am; rename structure...
Original commit message from CVS:
* ext/nas/Makefile.am:
* ext/nas/README:
* ext/nas/nassink.c: (gst_nas_sink_get_type),
(gst_nas_sink_base_init), (gst_nas_sink_class_init),
(gst_nas_sink_init), (gst_nas_sink_finalize),
(gst_nas_sink_getcaps), (gst_nas_sink_prepare),
(gst_nas_sink_unprepare), (gst_nas_sink_delay),
(gst_nas_sink_reset), (gst_nas_sink_write),
(gst_nas_sink_set_property), (gst_nas_sink_get_property),
(gst_nas_sink_open), (gst_nas_sink_close), (NAS_flush),
(NAS_sendData), (NAS_EventHandler), (gst_nas_sink_sink_get_format),
(NAS_createFlow), (plugin_init):
* ext/nas/nassink.h:
Bunch of nassink clean-ups: make build by adding the right CFLAGS
and LIBS to Makefile.am; rename structure, macros and functions
according to canonical naming scheme; move some things around a bit;
use GST_CAT_DEFAULT instead of GST_CAT_* everywhere; remove README
file that didn't really contain any useful information anyway (the
useful bits have been moved into the 'host' property description).
2007-03-04 20:35:26 +00:00
|
|
|
(GClassInitFunc) gst_nas_sink_class_init,
|
2004-01-21 06:57:30 +00:00
|
|
|
NULL,
|
|
|
|
NULL,
|
ext/nas/: Bunch of nassink clean-ups: make build by adding the right CFLAGS and LIBS to Makefile.am; rename structure...
Original commit message from CVS:
* ext/nas/Makefile.am:
* ext/nas/README:
* ext/nas/nassink.c: (gst_nas_sink_get_type),
(gst_nas_sink_base_init), (gst_nas_sink_class_init),
(gst_nas_sink_init), (gst_nas_sink_finalize),
(gst_nas_sink_getcaps), (gst_nas_sink_prepare),
(gst_nas_sink_unprepare), (gst_nas_sink_delay),
(gst_nas_sink_reset), (gst_nas_sink_write),
(gst_nas_sink_set_property), (gst_nas_sink_get_property),
(gst_nas_sink_open), (gst_nas_sink_close), (NAS_flush),
(NAS_sendData), (NAS_EventHandler), (gst_nas_sink_sink_get_format),
(NAS_createFlow), (plugin_init):
* ext/nas/nassink.h:
Bunch of nassink clean-ups: make build by adding the right CFLAGS
and LIBS to Makefile.am; rename structure, macros and functions
according to canonical naming scheme; move some things around a bit;
use GST_CAT_DEFAULT instead of GST_CAT_* everywhere; remove README
file that didn't really contain any useful information anyway (the
useful bits have been moved into the 'host' property description).
2007-03-04 20:35:26 +00:00
|
|
|
sizeof (GstNasSink),
|
2004-01-21 06:57:30 +00:00
|
|
|
0,
|
ext/nas/: Bunch of nassink clean-ups: make build by adding the right CFLAGS and LIBS to Makefile.am; rename structure...
Original commit message from CVS:
* ext/nas/Makefile.am:
* ext/nas/README:
* ext/nas/nassink.c: (gst_nas_sink_get_type),
(gst_nas_sink_base_init), (gst_nas_sink_class_init),
(gst_nas_sink_init), (gst_nas_sink_finalize),
(gst_nas_sink_getcaps), (gst_nas_sink_prepare),
(gst_nas_sink_unprepare), (gst_nas_sink_delay),
(gst_nas_sink_reset), (gst_nas_sink_write),
(gst_nas_sink_set_property), (gst_nas_sink_get_property),
(gst_nas_sink_open), (gst_nas_sink_close), (NAS_flush),
(NAS_sendData), (NAS_EventHandler), (gst_nas_sink_sink_get_format),
(NAS_createFlow), (plugin_init):
* ext/nas/nassink.h:
Bunch of nassink clean-ups: make build by adding the right CFLAGS
and LIBS to Makefile.am; rename structure, macros and functions
according to canonical naming scheme; move some things around a bit;
use GST_CAT_DEFAULT instead of GST_CAT_* everywhere; remove README
file that didn't really contain any useful information anyway (the
useful bits have been moved into the 'host' property description).
2007-03-04 20:35:26 +00:00
|
|
|
(GInstanceInitFunc) gst_nas_sink_init,
|
2004-01-21 06:57:30 +00:00
|
|
|
};
|
2004-03-15 19:32:27 +00:00
|
|
|
|
ext/nas/: Bunch of nassink clean-ups: make build by adding the right CFLAGS and LIBS to Makefile.am; rename structure...
Original commit message from CVS:
* ext/nas/Makefile.am:
* ext/nas/README:
* ext/nas/nassink.c: (gst_nas_sink_get_type),
(gst_nas_sink_base_init), (gst_nas_sink_class_init),
(gst_nas_sink_init), (gst_nas_sink_finalize),
(gst_nas_sink_getcaps), (gst_nas_sink_prepare),
(gst_nas_sink_unprepare), (gst_nas_sink_delay),
(gst_nas_sink_reset), (gst_nas_sink_write),
(gst_nas_sink_set_property), (gst_nas_sink_get_property),
(gst_nas_sink_open), (gst_nas_sink_close), (NAS_flush),
(NAS_sendData), (NAS_EventHandler), (gst_nas_sink_sink_get_format),
(NAS_createFlow), (plugin_init):
* ext/nas/nassink.h:
Bunch of nassink clean-ups: make build by adding the right CFLAGS
and LIBS to Makefile.am; rename structure, macros and functions
according to canonical naming scheme; move some things around a bit;
use GST_CAT_DEFAULT instead of GST_CAT_* everywhere; remove README
file that didn't really contain any useful information anyway (the
useful bits have been moved into the 'host' property description).
2007-03-04 20:35:26 +00:00
|
|
|
nas_sink_type =
|
|
|
|
g_type_register_static (GST_TYPE_AUDIO_SINK, "GstNasSink",
|
|
|
|
&nas_sink_info, 0);
|
2004-01-21 06:57:30 +00:00
|
|
|
}
|
|
|
|
|
ext/nas/: Bunch of nassink clean-ups: make build by adding the right CFLAGS and LIBS to Makefile.am; rename structure...
Original commit message from CVS:
* ext/nas/Makefile.am:
* ext/nas/README:
* ext/nas/nassink.c: (gst_nas_sink_get_type),
(gst_nas_sink_base_init), (gst_nas_sink_class_init),
(gst_nas_sink_init), (gst_nas_sink_finalize),
(gst_nas_sink_getcaps), (gst_nas_sink_prepare),
(gst_nas_sink_unprepare), (gst_nas_sink_delay),
(gst_nas_sink_reset), (gst_nas_sink_write),
(gst_nas_sink_set_property), (gst_nas_sink_get_property),
(gst_nas_sink_open), (gst_nas_sink_close), (NAS_flush),
(NAS_sendData), (NAS_EventHandler), (gst_nas_sink_sink_get_format),
(NAS_createFlow), (plugin_init):
* ext/nas/nassink.h:
Bunch of nassink clean-ups: make build by adding the right CFLAGS
and LIBS to Makefile.am; rename structure, macros and functions
according to canonical naming scheme; move some things around a bit;
use GST_CAT_DEFAULT instead of GST_CAT_* everywhere; remove README
file that didn't really contain any useful information anyway (the
useful bits have been moved into the 'host' property description).
2007-03-04 20:35:26 +00:00
|
|
|
return nas_sink_type;
|
2004-01-21 06:57:30 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
static void
|
ext/nas/: Bunch of nassink clean-ups: make build by adding the right CFLAGS and LIBS to Makefile.am; rename structure...
Original commit message from CVS:
* ext/nas/Makefile.am:
* ext/nas/README:
* ext/nas/nassink.c: (gst_nas_sink_get_type),
(gst_nas_sink_base_init), (gst_nas_sink_class_init),
(gst_nas_sink_init), (gst_nas_sink_finalize),
(gst_nas_sink_getcaps), (gst_nas_sink_prepare),
(gst_nas_sink_unprepare), (gst_nas_sink_delay),
(gst_nas_sink_reset), (gst_nas_sink_write),
(gst_nas_sink_set_property), (gst_nas_sink_get_property),
(gst_nas_sink_open), (gst_nas_sink_close), (NAS_flush),
(NAS_sendData), (NAS_EventHandler), (gst_nas_sink_sink_get_format),
(NAS_createFlow), (plugin_init):
* ext/nas/nassink.h:
Bunch of nassink clean-ups: make build by adding the right CFLAGS
and LIBS to Makefile.am; rename structure, macros and functions
according to canonical naming scheme; move some things around a bit;
use GST_CAT_DEFAULT instead of GST_CAT_* everywhere; remove README
file that didn't really contain any useful information anyway (the
useful bits have been moved into the 'host' property description).
2007-03-04 20:35:26 +00:00
|
|
|
gst_nas_sink_base_init (gpointer g_class)
|
2004-01-21 06:57:30 +00:00
|
|
|
{
|
|
|
|
GstElementClass *element_class = GST_ELEMENT_CLASS (g_class);
|
|
|
|
|
|
|
|
gst_element_class_add_pad_template (element_class,
|
|
|
|
gst_static_pad_template_get (&sink_factory));
|
ext/nas/: Bunch of nassink clean-ups: make build by adding the right CFLAGS and LIBS to Makefile.am; rename structure...
Original commit message from CVS:
* ext/nas/Makefile.am:
* ext/nas/README:
* ext/nas/nassink.c: (gst_nas_sink_get_type),
(gst_nas_sink_base_init), (gst_nas_sink_class_init),
(gst_nas_sink_init), (gst_nas_sink_finalize),
(gst_nas_sink_getcaps), (gst_nas_sink_prepare),
(gst_nas_sink_unprepare), (gst_nas_sink_delay),
(gst_nas_sink_reset), (gst_nas_sink_write),
(gst_nas_sink_set_property), (gst_nas_sink_get_property),
(gst_nas_sink_open), (gst_nas_sink_close), (NAS_flush),
(NAS_sendData), (NAS_EventHandler), (gst_nas_sink_sink_get_format),
(NAS_createFlow), (plugin_init):
* ext/nas/nassink.h:
Bunch of nassink clean-ups: make build by adding the right CFLAGS
and LIBS to Makefile.am; rename structure, macros and functions
according to canonical naming scheme; move some things around a bit;
use GST_CAT_DEFAULT instead of GST_CAT_* everywhere; remove README
file that didn't really contain any useful information anyway (the
useful bits have been moved into the 'host' property description).
2007-03-04 20:35:26 +00:00
|
|
|
gst_element_class_set_details (element_class, &nas_sink_details);
|
2004-01-21 06:57:30 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
static void
|
ext/nas/: Bunch of nassink clean-ups: make build by adding the right CFLAGS and LIBS to Makefile.am; rename structure...
Original commit message from CVS:
* ext/nas/Makefile.am:
* ext/nas/README:
* ext/nas/nassink.c: (gst_nas_sink_get_type),
(gst_nas_sink_base_init), (gst_nas_sink_class_init),
(gst_nas_sink_init), (gst_nas_sink_finalize),
(gst_nas_sink_getcaps), (gst_nas_sink_prepare),
(gst_nas_sink_unprepare), (gst_nas_sink_delay),
(gst_nas_sink_reset), (gst_nas_sink_write),
(gst_nas_sink_set_property), (gst_nas_sink_get_property),
(gst_nas_sink_open), (gst_nas_sink_close), (NAS_flush),
(NAS_sendData), (NAS_EventHandler), (gst_nas_sink_sink_get_format),
(NAS_createFlow), (plugin_init):
* ext/nas/nassink.h:
Bunch of nassink clean-ups: make build by adding the right CFLAGS
and LIBS to Makefile.am; rename structure, macros and functions
according to canonical naming scheme; move some things around a bit;
use GST_CAT_DEFAULT instead of GST_CAT_* everywhere; remove README
file that didn't really contain any useful information anyway (the
useful bits have been moved into the 'host' property description).
2007-03-04 20:35:26 +00:00
|
|
|
gst_nas_sink_class_init (GstNasSinkClass * klass)
|
2004-01-21 06:57:30 +00:00
|
|
|
{
|
|
|
|
GObjectClass *gobject_class;
|
2007-03-02 19:43:48 +00:00
|
|
|
GstBaseSinkClass *gstbasesink_class;
|
|
|
|
GstAudioSinkClass *gstaudiosink_class;
|
2004-01-21 06:57:30 +00:00
|
|
|
|
2004-03-14 22:34:33 +00:00
|
|
|
gobject_class = (GObjectClass *) klass;
|
2007-03-02 19:43:48 +00:00
|
|
|
gstbasesink_class = (GstBaseSinkClass *) klass;
|
|
|
|
gstaudiosink_class = (GstAudioSinkClass *) klass;
|
2004-01-21 06:57:30 +00:00
|
|
|
|
ext/nas/: Bunch of nassink clean-ups: make build by adding the right CFLAGS and LIBS to Makefile.am; rename structure...
Original commit message from CVS:
* ext/nas/Makefile.am:
* ext/nas/README:
* ext/nas/nassink.c: (gst_nas_sink_get_type),
(gst_nas_sink_base_init), (gst_nas_sink_class_init),
(gst_nas_sink_init), (gst_nas_sink_finalize),
(gst_nas_sink_getcaps), (gst_nas_sink_prepare),
(gst_nas_sink_unprepare), (gst_nas_sink_delay),
(gst_nas_sink_reset), (gst_nas_sink_write),
(gst_nas_sink_set_property), (gst_nas_sink_get_property),
(gst_nas_sink_open), (gst_nas_sink_close), (NAS_flush),
(NAS_sendData), (NAS_EventHandler), (gst_nas_sink_sink_get_format),
(NAS_createFlow), (plugin_init):
* ext/nas/nassink.h:
Bunch of nassink clean-ups: make build by adding the right CFLAGS
and LIBS to Makefile.am; rename structure, macros and functions
according to canonical naming scheme; move some things around a bit;
use GST_CAT_DEFAULT instead of GST_CAT_* everywhere; remove README
file that didn't really contain any useful information anyway (the
useful bits have been moved into the 'host' property description).
2007-03-04 20:35:26 +00:00
|
|
|
parent_class = g_type_class_peek_parent (klass);
|
|
|
|
|
|
|
|
gobject_class->set_property = GST_DEBUG_FUNCPTR (gst_nas_sink_set_property);
|
|
|
|
gobject_class->get_property = GST_DEBUG_FUNCPTR (gst_nas_sink_get_property);
|
|
|
|
gobject_class->finalize = GST_DEBUG_FUNCPTR (gst_nas_sink_finalize);
|
|
|
|
|
|
|
|
g_object_class_install_property (gobject_class, ARG_MUTE,
|
|
|
|
g_param_spec_boolean ("mute", "mute", "Whether to mute playback",
|
|
|
|
DEFAULT_MUTE, G_PARAM_READWRITE | G_PARAM_CONSTRUCT));
|
|
|
|
g_object_class_install_property (gobject_class, ARG_HOST,
|
|
|
|
g_param_spec_string ("host", "host",
|
|
|
|
"host running the NAS daemon (name of X/Terminal, default is "
|
|
|
|
"$AUDIOSERVER or $DISPLAY)", DEFAULT_HOST,
|
|
|
|
G_PARAM_READWRITE | G_PARAM_CONSTRUCT));
|
|
|
|
|
|
|
|
gstbasesink_class->get_caps = GST_DEBUG_FUNCPTR (gst_nas_sink_getcaps);
|
|
|
|
|
|
|
|
gstaudiosink_class->open = GST_DEBUG_FUNCPTR (gst_nas_sink_open);
|
|
|
|
gstaudiosink_class->close = GST_DEBUG_FUNCPTR (gst_nas_sink_close);
|
|
|
|
gstaudiosink_class->prepare = GST_DEBUG_FUNCPTR (gst_nas_sink_prepare);
|
|
|
|
gstaudiosink_class->unprepare = GST_DEBUG_FUNCPTR (gst_nas_sink_unprepare);
|
|
|
|
gstaudiosink_class->write = GST_DEBUG_FUNCPTR (gst_nas_sink_write);
|
|
|
|
gstaudiosink_class->delay = GST_DEBUG_FUNCPTR (gst_nas_sink_delay);
|
|
|
|
gstaudiosink_class->reset = GST_DEBUG_FUNCPTR (gst_nas_sink_reset);
|
2004-01-21 06:57:30 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
static void
|
ext/nas/: Bunch of nassink clean-ups: make build by adding the right CFLAGS and LIBS to Makefile.am; rename structure...
Original commit message from CVS:
* ext/nas/Makefile.am:
* ext/nas/README:
* ext/nas/nassink.c: (gst_nas_sink_get_type),
(gst_nas_sink_base_init), (gst_nas_sink_class_init),
(gst_nas_sink_init), (gst_nas_sink_finalize),
(gst_nas_sink_getcaps), (gst_nas_sink_prepare),
(gst_nas_sink_unprepare), (gst_nas_sink_delay),
(gst_nas_sink_reset), (gst_nas_sink_write),
(gst_nas_sink_set_property), (gst_nas_sink_get_property),
(gst_nas_sink_open), (gst_nas_sink_close), (NAS_flush),
(NAS_sendData), (NAS_EventHandler), (gst_nas_sink_sink_get_format),
(NAS_createFlow), (plugin_init):
* ext/nas/nassink.h:
Bunch of nassink clean-ups: make build by adding the right CFLAGS
and LIBS to Makefile.am; rename structure, macros and functions
according to canonical naming scheme; move some things around a bit;
use GST_CAT_DEFAULT instead of GST_CAT_* everywhere; remove README
file that didn't really contain any useful information anyway (the
useful bits have been moved into the 'host' property description).
2007-03-04 20:35:26 +00:00
|
|
|
gst_nas_sink_init (GstNasSink * nassink)
|
2004-01-21 06:57:30 +00:00
|
|
|
{
|
ext/nas/: Bunch of nassink clean-ups: make build by adding the right CFLAGS and LIBS to Makefile.am; rename structure...
Original commit message from CVS:
* ext/nas/Makefile.am:
* ext/nas/README:
* ext/nas/nassink.c: (gst_nas_sink_get_type),
(gst_nas_sink_base_init), (gst_nas_sink_class_init),
(gst_nas_sink_init), (gst_nas_sink_finalize),
(gst_nas_sink_getcaps), (gst_nas_sink_prepare),
(gst_nas_sink_unprepare), (gst_nas_sink_delay),
(gst_nas_sink_reset), (gst_nas_sink_write),
(gst_nas_sink_set_property), (gst_nas_sink_get_property),
(gst_nas_sink_open), (gst_nas_sink_close), (NAS_flush),
(NAS_sendData), (NAS_EventHandler), (gst_nas_sink_sink_get_format),
(NAS_createFlow), (plugin_init):
* ext/nas/nassink.h:
Bunch of nassink clean-ups: make build by adding the right CFLAGS
and LIBS to Makefile.am; rename structure, macros and functions
according to canonical naming scheme; move some things around a bit;
use GST_CAT_DEFAULT instead of GST_CAT_* everywhere; remove README
file that didn't really contain any useful information anyway (the
useful bits have been moved into the 'host' property description).
2007-03-04 20:35:26 +00:00
|
|
|
/* properties will automatically be set to their default values */
|
2004-01-21 06:57:30 +00:00
|
|
|
nassink->audio = NULL;
|
|
|
|
nassink->flow = AuNone;
|
2007-03-02 19:43:48 +00:00
|
|
|
nassink->need_data = 0;
|
2004-01-21 06:57:30 +00:00
|
|
|
}
|
|
|
|
|
Fixes: #151879, #151881, #151882, #151883, #151884, #151886, #151887, #152102, #152247.
Original commit message from CVS:
Fixes: #151879, #151881, #151882, #151883, #151884, #151886,
#151887, #152102, #152247.
* examples/indexing/indexmpeg.c: 64-bit warning fixes.
* examples/seeking/cdparanoia.c: same
* examples/seeking/cdplayer.c: same
* examples/seeking/seek.c: same
* examples/seeking/spider_seek.c: same
* examples/seeking/vorbisfile.c: same
* examples/stats/mp2ogg.c: same
* ext/esd/esdsink.c: (gst_esdsink_class_init),
(gst_esdsink_dispose): Dispose of element properly.
* ext/ivorbis/vorbisfile.c: (gst_ivorbisfile_seek): 64-bit warning
fixes.
* ext/nas/nassink.c: (gst_nassink_class_init),
(gst_nassink_dispose): Dispose of element correctly.
* gst/wavenc/gstwavenc.c: (gst_wavenc_chain): Fix leak.
* sys/ximage/ximagesink.c: (gst_ximagesink_check_xshm_calls),
(gst_ximagesink_ximage_new), (gst_ximagesink_ximage_destroy):
Fix 64-bit warning.
* sys/xvimage/xvimagesink.c: (gst_xvimagesink_check_xshm_calls),
(gst_xvimagesink_xvimage_new), (gst_xvimagesink_xvimage_destroy):
Fix 64-bit warning.
2004-09-12 22:57:26 +00:00
|
|
|
static void
|
ext/nas/: Bunch of nassink clean-ups: make build by adding the right CFLAGS and LIBS to Makefile.am; rename structure...
Original commit message from CVS:
* ext/nas/Makefile.am:
* ext/nas/README:
* ext/nas/nassink.c: (gst_nas_sink_get_type),
(gst_nas_sink_base_init), (gst_nas_sink_class_init),
(gst_nas_sink_init), (gst_nas_sink_finalize),
(gst_nas_sink_getcaps), (gst_nas_sink_prepare),
(gst_nas_sink_unprepare), (gst_nas_sink_delay),
(gst_nas_sink_reset), (gst_nas_sink_write),
(gst_nas_sink_set_property), (gst_nas_sink_get_property),
(gst_nas_sink_open), (gst_nas_sink_close), (NAS_flush),
(NAS_sendData), (NAS_EventHandler), (gst_nas_sink_sink_get_format),
(NAS_createFlow), (plugin_init):
* ext/nas/nassink.h:
Bunch of nassink clean-ups: make build by adding the right CFLAGS
and LIBS to Makefile.am; rename structure, macros and functions
according to canonical naming scheme; move some things around a bit;
use GST_CAT_DEFAULT instead of GST_CAT_* everywhere; remove README
file that didn't really contain any useful information anyway (the
useful bits have been moved into the 'host' property description).
2007-03-04 20:35:26 +00:00
|
|
|
gst_nas_sink_finalize (GObject * object)
|
Fixes: #151879, #151881, #151882, #151883, #151884, #151886, #151887, #152102, #152247.
Original commit message from CVS:
Fixes: #151879, #151881, #151882, #151883, #151884, #151886,
#151887, #152102, #152247.
* examples/indexing/indexmpeg.c: 64-bit warning fixes.
* examples/seeking/cdparanoia.c: same
* examples/seeking/cdplayer.c: same
* examples/seeking/seek.c: same
* examples/seeking/spider_seek.c: same
* examples/seeking/vorbisfile.c: same
* examples/stats/mp2ogg.c: same
* ext/esd/esdsink.c: (gst_esdsink_class_init),
(gst_esdsink_dispose): Dispose of element properly.
* ext/ivorbis/vorbisfile.c: (gst_ivorbisfile_seek): 64-bit warning
fixes.
* ext/nas/nassink.c: (gst_nassink_class_init),
(gst_nassink_dispose): Dispose of element correctly.
* gst/wavenc/gstwavenc.c: (gst_wavenc_chain): Fix leak.
* sys/ximage/ximagesink.c: (gst_ximagesink_check_xshm_calls),
(gst_ximagesink_ximage_new), (gst_ximagesink_ximage_destroy):
Fix 64-bit warning.
* sys/xvimage/xvimagesink.c: (gst_xvimagesink_check_xshm_calls),
(gst_xvimagesink_xvimage_new), (gst_xvimagesink_xvimage_destroy):
Fix 64-bit warning.
2004-09-12 22:57:26 +00:00
|
|
|
{
|
ext/nas/: Bunch of nassink clean-ups: make build by adding the right CFLAGS and LIBS to Makefile.am; rename structure...
Original commit message from CVS:
* ext/nas/Makefile.am:
* ext/nas/README:
* ext/nas/nassink.c: (gst_nas_sink_get_type),
(gst_nas_sink_base_init), (gst_nas_sink_class_init),
(gst_nas_sink_init), (gst_nas_sink_finalize),
(gst_nas_sink_getcaps), (gst_nas_sink_prepare),
(gst_nas_sink_unprepare), (gst_nas_sink_delay),
(gst_nas_sink_reset), (gst_nas_sink_write),
(gst_nas_sink_set_property), (gst_nas_sink_get_property),
(gst_nas_sink_open), (gst_nas_sink_close), (NAS_flush),
(NAS_sendData), (NAS_EventHandler), (gst_nas_sink_sink_get_format),
(NAS_createFlow), (plugin_init):
* ext/nas/nassink.h:
Bunch of nassink clean-ups: make build by adding the right CFLAGS
and LIBS to Makefile.am; rename structure, macros and functions
according to canonical naming scheme; move some things around a bit;
use GST_CAT_DEFAULT instead of GST_CAT_* everywhere; remove README
file that didn't really contain any useful information anyway (the
useful bits have been moved into the 'host' property description).
2007-03-04 20:35:26 +00:00
|
|
|
GstNasSink *nassink = GST_NAS_SINK (object);
|
Fixes: #151879, #151881, #151882, #151883, #151884, #151886, #151887, #152102, #152247.
Original commit message from CVS:
Fixes: #151879, #151881, #151882, #151883, #151884, #151886,
#151887, #152102, #152247.
* examples/indexing/indexmpeg.c: 64-bit warning fixes.
* examples/seeking/cdparanoia.c: same
* examples/seeking/cdplayer.c: same
* examples/seeking/seek.c: same
* examples/seeking/spider_seek.c: same
* examples/seeking/vorbisfile.c: same
* examples/stats/mp2ogg.c: same
* ext/esd/esdsink.c: (gst_esdsink_class_init),
(gst_esdsink_dispose): Dispose of element properly.
* ext/ivorbis/vorbisfile.c: (gst_ivorbisfile_seek): 64-bit warning
fixes.
* ext/nas/nassink.c: (gst_nassink_class_init),
(gst_nassink_dispose): Dispose of element correctly.
* gst/wavenc/gstwavenc.c: (gst_wavenc_chain): Fix leak.
* sys/ximage/ximagesink.c: (gst_ximagesink_check_xshm_calls),
(gst_ximagesink_ximage_new), (gst_ximagesink_ximage_destroy):
Fix 64-bit warning.
* sys/xvimage/xvimagesink.c: (gst_xvimagesink_check_xshm_calls),
(gst_xvimagesink_xvimage_new), (gst_xvimagesink_xvimage_destroy):
Fix 64-bit warning.
2004-09-12 22:57:26 +00:00
|
|
|
|
|
|
|
g_free (nassink->host);
|
Fixes a bunch of problems with finalize and dispose functions, either assumptions that dispose is only called once, o...
Original commit message from CVS:
* ext/alsa/gstalsa.c: (gst_alsa_class_init), (gst_alsa_dispose),
(gst_alsa_finalize):
* ext/cdaudio/gstcdaudio.c: (gst_cdaudio_class_init),
(gst_cdaudio_finalize):
* ext/cdparanoia/gstcdparanoia.c: (cdparanoia_class_init),
(cdparanoia_finalize):
* ext/divx/gstdivxdec.c: (gst_divxdec_dispose):
* ext/divx/gstdivxenc.c: (gst_divxenc_dispose):
* ext/dvdread/dvdreadsrc.c: (dvdreadsrc_class_init),
(dvdreadsrc_finalize):
* ext/flac/gstflacdec.c: (gst_flacdec_class_init),
(gst_flacdec_finalize):
* ext/flac/gstflacenc.c: (gst_flacenc_class_init),
(gst_flacenc_finalize):
* ext/gnomevfs/gstgnomevfssink.c: (gst_gnomevfssink_class_init),
(gst_gnomevfssink_finalize):
* ext/gnomevfs/gstgnomevfssrc.c: (gst_gnomevfssrc_class_init),
(gst_gnomevfssrc_finalize):
* ext/libfame/gstlibfame.c: (gst_fameenc_class_init),
(gst_fameenc_finalize):
* ext/nas/nassink.c: (gst_nassink_class_init),
(gst_nassink_finalize):
* ext/sdl/sdlvideosink.c: (gst_sdlvideosink_finalize),
(gst_sdlvideosink_class_init):
* ext/sndfile/gstsf.c: (gst_sf_dispose):
* gst-libs/gst/mixer/mixertrack.c: (gst_mixer_track_dispose):
* gst-libs/gst/tuner/tunerchannel.c: (gst_tuner_channel_dispose):
* gst-libs/gst/tuner/tunernorm.c: (gst_tuner_norm_dispose):
* gst-libs/gst/xwindowlistener/xwindowlistener.c:
(gst_x_window_listener_dispose):
* gst/audioscale/gstaudioscale.c:
* gst/playondemand/gstplayondemand.c: (play_on_demand_class_init),
(play_on_demand_finalize):
* gst/videofilter/gstvideobalance.c: (gst_videobalance_dispose):
* gst/videoscale/gstvideoscale.c: (gst_videoscale_chain):
* sys/cdrom/gstcdplayer.c: (cdplayer_class_init),
(cdplayer_finalize):
* sys/glsink/glimagesink.c: (gst_glimagesink_finalize),
(gst_glimagesink_class_init):
* sys/oss/gstosselement.c: (gst_osselement_class_init),
(gst_osselement_finalize):
* sys/oss/gstosssink.c: (gst_osssink_dispose):
* sys/oss/gstosssrc.c: (gst_osssrc_dispose):
* sys/v4l/gstv4lelement.c: (gst_v4lelement_dispose):
Fixes a bunch of problems with finalize and dispose functions,
either assumptions that dispose is only called once, or not calling
the parent class dispose/finalize function
2004-11-01 14:43:38 +00:00
|
|
|
G_OBJECT_CLASS (parent_class)->finalize (object);
|
Fixes: #151879, #151881, #151882, #151883, #151884, #151886, #151887, #152102, #152247.
Original commit message from CVS:
Fixes: #151879, #151881, #151882, #151883, #151884, #151886,
#151887, #152102, #152247.
* examples/indexing/indexmpeg.c: 64-bit warning fixes.
* examples/seeking/cdparanoia.c: same
* examples/seeking/cdplayer.c: same
* examples/seeking/seek.c: same
* examples/seeking/spider_seek.c: same
* examples/seeking/vorbisfile.c: same
* examples/stats/mp2ogg.c: same
* ext/esd/esdsink.c: (gst_esdsink_class_init),
(gst_esdsink_dispose): Dispose of element properly.
* ext/ivorbis/vorbisfile.c: (gst_ivorbisfile_seek): 64-bit warning
fixes.
* ext/nas/nassink.c: (gst_nassink_class_init),
(gst_nassink_dispose): Dispose of element correctly.
* gst/wavenc/gstwavenc.c: (gst_wavenc_chain): Fix leak.
* sys/ximage/ximagesink.c: (gst_ximagesink_check_xshm_calls),
(gst_ximagesink_ximage_new), (gst_ximagesink_ximage_destroy):
Fix 64-bit warning.
* sys/xvimage/xvimagesink.c: (gst_xvimagesink_check_xshm_calls),
(gst_xvimagesink_xvimage_new), (gst_xvimagesink_xvimage_destroy):
Fix 64-bit warning.
2004-09-12 22:57:26 +00:00
|
|
|
}
|
|
|
|
|
2004-03-14 22:34:33 +00:00
|
|
|
static GstCaps *
|
ext/nas/: Bunch of nassink clean-ups: make build by adding the right CFLAGS and LIBS to Makefile.am; rename structure...
Original commit message from CVS:
* ext/nas/Makefile.am:
* ext/nas/README:
* ext/nas/nassink.c: (gst_nas_sink_get_type),
(gst_nas_sink_base_init), (gst_nas_sink_class_init),
(gst_nas_sink_init), (gst_nas_sink_finalize),
(gst_nas_sink_getcaps), (gst_nas_sink_prepare),
(gst_nas_sink_unprepare), (gst_nas_sink_delay),
(gst_nas_sink_reset), (gst_nas_sink_write),
(gst_nas_sink_set_property), (gst_nas_sink_get_property),
(gst_nas_sink_open), (gst_nas_sink_close), (NAS_flush),
(NAS_sendData), (NAS_EventHandler), (gst_nas_sink_sink_get_format),
(NAS_createFlow), (plugin_init):
* ext/nas/nassink.h:
Bunch of nassink clean-ups: make build by adding the right CFLAGS
and LIBS to Makefile.am; rename structure, macros and functions
according to canonical naming scheme; move some things around a bit;
use GST_CAT_DEFAULT instead of GST_CAT_* everywhere; remove README
file that didn't really contain any useful information anyway (the
useful bits have been moved into the 'host' property description).
2007-03-04 20:35:26 +00:00
|
|
|
gst_nas_sink_getcaps (GstBaseSink * bsink)
|
2004-03-08 22:24:47 +00:00
|
|
|
{
|
ext/nas/: Bunch of nassink clean-ups: make build by adding the right CFLAGS and LIBS to Makefile.am; rename structure...
Original commit message from CVS:
* ext/nas/Makefile.am:
* ext/nas/README:
* ext/nas/nassink.c: (gst_nas_sink_get_type),
(gst_nas_sink_base_init), (gst_nas_sink_class_init),
(gst_nas_sink_init), (gst_nas_sink_finalize),
(gst_nas_sink_getcaps), (gst_nas_sink_prepare),
(gst_nas_sink_unprepare), (gst_nas_sink_delay),
(gst_nas_sink_reset), (gst_nas_sink_write),
(gst_nas_sink_set_property), (gst_nas_sink_get_property),
(gst_nas_sink_open), (gst_nas_sink_close), (NAS_flush),
(NAS_sendData), (NAS_EventHandler), (gst_nas_sink_sink_get_format),
(NAS_createFlow), (plugin_init):
* ext/nas/nassink.h:
Bunch of nassink clean-ups: make build by adding the right CFLAGS
and LIBS to Makefile.am; rename structure, macros and functions
according to canonical naming scheme; move some things around a bit;
use GST_CAT_DEFAULT instead of GST_CAT_* everywhere; remove README
file that didn't really contain any useful information anyway (the
useful bits have been moved into the 'host' property description).
2007-03-04 20:35:26 +00:00
|
|
|
GstNasSink *nassink = GST_NAS_SINK (bsink);
|
2007-03-02 19:43:48 +00:00
|
|
|
GstCaps *templatecaps =
|
|
|
|
gst_caps_copy (gst_pad_get_pad_template_caps (GST_BASE_SINK_PAD (bsink)));
|
2004-03-08 22:24:47 +00:00
|
|
|
GstCaps *caps;
|
|
|
|
int i;
|
|
|
|
AuServer *server;
|
|
|
|
|
2004-03-14 22:34:33 +00:00
|
|
|
server = AuOpenServer (nassink->host, 0, NULL, 0, NULL, NULL);
|
2004-03-08 22:24:47 +00:00
|
|
|
if (!server)
|
|
|
|
return templatecaps;
|
2004-03-14 22:34:33 +00:00
|
|
|
|
2004-03-08 22:24:47 +00:00
|
|
|
for (i = 0; i < gst_caps_get_size (templatecaps); i++) {
|
|
|
|
GstStructure *structure = gst_caps_get_structure (templatecaps, i);
|
|
|
|
|
2004-03-14 22:34:33 +00:00
|
|
|
gst_structure_set (structure, "rate", GST_TYPE_INT_RANGE,
|
2004-03-15 19:32:27 +00:00
|
|
|
AuServerMinSampleRate (server), AuServerMaxSampleRate (server), NULL);
|
2004-03-08 22:24:47 +00:00
|
|
|
}
|
2007-03-02 19:43:48 +00:00
|
|
|
caps =
|
|
|
|
gst_caps_intersect (templatecaps,
|
|
|
|
gst_pad_get_pad_template_caps (GST_BASE_SINK_PAD (bsink)));
|
|
|
|
gst_caps_unref (templatecaps);
|
2004-03-08 22:24:47 +00:00
|
|
|
|
|
|
|
return caps;
|
2004-03-14 22:34:33 +00:00
|
|
|
|
2004-03-08 22:24:47 +00:00
|
|
|
}
|
|
|
|
|
2004-01-21 06:57:30 +00:00
|
|
|
static gboolean
|
ext/nas/: Bunch of nassink clean-ups: make build by adding the right CFLAGS and LIBS to Makefile.am; rename structure...
Original commit message from CVS:
* ext/nas/Makefile.am:
* ext/nas/README:
* ext/nas/nassink.c: (gst_nas_sink_get_type),
(gst_nas_sink_base_init), (gst_nas_sink_class_init),
(gst_nas_sink_init), (gst_nas_sink_finalize),
(gst_nas_sink_getcaps), (gst_nas_sink_prepare),
(gst_nas_sink_unprepare), (gst_nas_sink_delay),
(gst_nas_sink_reset), (gst_nas_sink_write),
(gst_nas_sink_set_property), (gst_nas_sink_get_property),
(gst_nas_sink_open), (gst_nas_sink_close), (NAS_flush),
(NAS_sendData), (NAS_EventHandler), (gst_nas_sink_sink_get_format),
(NAS_createFlow), (plugin_init):
* ext/nas/nassink.h:
Bunch of nassink clean-ups: make build by adding the right CFLAGS
and LIBS to Makefile.am; rename structure, macros and functions
according to canonical naming scheme; move some things around a bit;
use GST_CAT_DEFAULT instead of GST_CAT_* everywhere; remove README
file that didn't really contain any useful information anyway (the
useful bits have been moved into the 'host' property description).
2007-03-04 20:35:26 +00:00
|
|
|
gst_nas_sink_prepare (GstAudioSink * asink, GstRingBufferSpec * spec)
|
2004-01-21 06:57:30 +00:00
|
|
|
{
|
ext/nas/: Bunch of nassink clean-ups: make build by adding the right CFLAGS and LIBS to Makefile.am; rename structure...
Original commit message from CVS:
* ext/nas/Makefile.am:
* ext/nas/README:
* ext/nas/nassink.c: (gst_nas_sink_get_type),
(gst_nas_sink_base_init), (gst_nas_sink_class_init),
(gst_nas_sink_init), (gst_nas_sink_finalize),
(gst_nas_sink_getcaps), (gst_nas_sink_prepare),
(gst_nas_sink_unprepare), (gst_nas_sink_delay),
(gst_nas_sink_reset), (gst_nas_sink_write),
(gst_nas_sink_set_property), (gst_nas_sink_get_property),
(gst_nas_sink_open), (gst_nas_sink_close), (NAS_flush),
(NAS_sendData), (NAS_EventHandler), (gst_nas_sink_sink_get_format),
(NAS_createFlow), (plugin_init):
* ext/nas/nassink.h:
Bunch of nassink clean-ups: make build by adding the right CFLAGS
and LIBS to Makefile.am; rename structure, macros and functions
according to canonical naming scheme; move some things around a bit;
use GST_CAT_DEFAULT instead of GST_CAT_* everywhere; remove README
file that didn't really contain any useful information anyway (the
useful bits have been moved into the 'host' property description).
2007-03-04 20:35:26 +00:00
|
|
|
GstNasSink *sink = GST_NAS_SINK (asink);
|
2004-03-14 22:34:33 +00:00
|
|
|
|
2007-03-02 19:43:48 +00:00
|
|
|
/*spec->bytes_per_sample = sink->rate * NAS_SOUND_PORT_DURATION; */
|
|
|
|
/*spec->bytes_per_sample = (spec->width / 8) * spec->channels; */
|
|
|
|
memset (spec->silence_sample, 0, spec->bytes_per_sample);
|
ext/nas/: Bunch of nassink clean-ups: make build by adding the right CFLAGS and LIBS to Makefile.am; rename structure...
Original commit message from CVS:
* ext/nas/Makefile.am:
* ext/nas/README:
* ext/nas/nassink.c: (gst_nas_sink_get_type),
(gst_nas_sink_base_init), (gst_nas_sink_class_init),
(gst_nas_sink_init), (gst_nas_sink_finalize),
(gst_nas_sink_getcaps), (gst_nas_sink_prepare),
(gst_nas_sink_unprepare), (gst_nas_sink_delay),
(gst_nas_sink_reset), (gst_nas_sink_write),
(gst_nas_sink_set_property), (gst_nas_sink_get_property),
(gst_nas_sink_open), (gst_nas_sink_close), (NAS_flush),
(NAS_sendData), (NAS_EventHandler), (gst_nas_sink_sink_get_format),
(NAS_createFlow), (plugin_init):
* ext/nas/nassink.h:
Bunch of nassink clean-ups: make build by adding the right CFLAGS
and LIBS to Makefile.am; rename structure, macros and functions
according to canonical naming scheme; move some things around a bit;
use GST_CAT_DEFAULT instead of GST_CAT_* everywhere; remove README
file that didn't really contain any useful information anyway (the
useful bits have been moved into the 'host' property description).
2007-03-04 20:35:26 +00:00
|
|
|
GST_DEBUG_OBJECT (sink, "Sample %d", spec->bytes_per_sample);
|
2004-01-21 06:57:30 +00:00
|
|
|
|
2007-03-02 19:43:48 +00:00
|
|
|
if (sink->audio == NULL)
|
2004-03-14 22:34:33 +00:00
|
|
|
return TRUE;
|
2004-01-21 06:57:30 +00:00
|
|
|
|
2007-03-02 19:43:48 +00:00
|
|
|
if (sink->flow != AuNone) {
|
ext/nas/: Bunch of nassink clean-ups: make build by adding the right CFLAGS and LIBS to Makefile.am; rename structure...
Original commit message from CVS:
* ext/nas/Makefile.am:
* ext/nas/README:
* ext/nas/nassink.c: (gst_nas_sink_get_type),
(gst_nas_sink_base_init), (gst_nas_sink_class_init),
(gst_nas_sink_init), (gst_nas_sink_finalize),
(gst_nas_sink_getcaps), (gst_nas_sink_prepare),
(gst_nas_sink_unprepare), (gst_nas_sink_delay),
(gst_nas_sink_reset), (gst_nas_sink_write),
(gst_nas_sink_set_property), (gst_nas_sink_get_property),
(gst_nas_sink_open), (gst_nas_sink_close), (NAS_flush),
(NAS_sendData), (NAS_EventHandler), (gst_nas_sink_sink_get_format),
(NAS_createFlow), (plugin_init):
* ext/nas/nassink.h:
Bunch of nassink clean-ups: make build by adding the right CFLAGS
and LIBS to Makefile.am; rename structure, macros and functions
according to canonical naming scheme; move some things around a bit;
use GST_CAT_DEFAULT instead of GST_CAT_* everywhere; remove README
file that didn't really contain any useful information anyway (the
useful bits have been moved into the 'host' property description).
2007-03-04 20:35:26 +00:00
|
|
|
GST_DEBUG_OBJECT (sink, "flushing buffer");
|
2007-03-02 19:43:48 +00:00
|
|
|
NAS_flush (sink);
|
|
|
|
AuStopFlow (sink->audio, sink->flow, NULL);
|
|
|
|
AuReleaseScratchFlow (sink->audio, sink->flow, NULL);
|
|
|
|
sink->flow = AuNone;
|
2004-01-21 06:57:30 +00:00
|
|
|
}
|
|
|
|
|
2007-03-02 19:43:48 +00:00
|
|
|
return NAS_createFlow (sink, spec);
|
2004-01-21 06:57:30 +00:00
|
|
|
}
|
|
|
|
|
2007-03-02 19:43:48 +00:00
|
|
|
static gboolean
|
ext/nas/: Bunch of nassink clean-ups: make build by adding the right CFLAGS and LIBS to Makefile.am; rename structure...
Original commit message from CVS:
* ext/nas/Makefile.am:
* ext/nas/README:
* ext/nas/nassink.c: (gst_nas_sink_get_type),
(gst_nas_sink_base_init), (gst_nas_sink_class_init),
(gst_nas_sink_init), (gst_nas_sink_finalize),
(gst_nas_sink_getcaps), (gst_nas_sink_prepare),
(gst_nas_sink_unprepare), (gst_nas_sink_delay),
(gst_nas_sink_reset), (gst_nas_sink_write),
(gst_nas_sink_set_property), (gst_nas_sink_get_property),
(gst_nas_sink_open), (gst_nas_sink_close), (NAS_flush),
(NAS_sendData), (NAS_EventHandler), (gst_nas_sink_sink_get_format),
(NAS_createFlow), (plugin_init):
* ext/nas/nassink.h:
Bunch of nassink clean-ups: make build by adding the right CFLAGS
and LIBS to Makefile.am; rename structure, macros and functions
according to canonical naming scheme; move some things around a bit;
use GST_CAT_DEFAULT instead of GST_CAT_* everywhere; remove README
file that didn't really contain any useful information anyway (the
useful bits have been moved into the 'host' property description).
2007-03-04 20:35:26 +00:00
|
|
|
gst_nas_sink_unprepare (GstAudioSink * asink)
|
2004-01-21 06:57:30 +00:00
|
|
|
{
|
ext/nas/: Bunch of nassink clean-ups: make build by adding the right CFLAGS and LIBS to Makefile.am; rename structure...
Original commit message from CVS:
* ext/nas/Makefile.am:
* ext/nas/README:
* ext/nas/nassink.c: (gst_nas_sink_get_type),
(gst_nas_sink_base_init), (gst_nas_sink_class_init),
(gst_nas_sink_init), (gst_nas_sink_finalize),
(gst_nas_sink_getcaps), (gst_nas_sink_prepare),
(gst_nas_sink_unprepare), (gst_nas_sink_delay),
(gst_nas_sink_reset), (gst_nas_sink_write),
(gst_nas_sink_set_property), (gst_nas_sink_get_property),
(gst_nas_sink_open), (gst_nas_sink_close), (NAS_flush),
(NAS_sendData), (NAS_EventHandler), (gst_nas_sink_sink_get_format),
(NAS_createFlow), (plugin_init):
* ext/nas/nassink.h:
Bunch of nassink clean-ups: make build by adding the right CFLAGS
and LIBS to Makefile.am; rename structure, macros and functions
according to canonical naming scheme; move some things around a bit;
use GST_CAT_DEFAULT instead of GST_CAT_* everywhere; remove README
file that didn't really contain any useful information anyway (the
useful bits have been moved into the 'host' property description).
2007-03-04 20:35:26 +00:00
|
|
|
//GstNasSink *sink = GST_NAS_SINK (asink);
|
2007-03-02 19:43:48 +00:00
|
|
|
return TRUE;
|
|
|
|
}
|
2004-01-21 06:57:30 +00:00
|
|
|
|
2007-03-02 19:43:48 +00:00
|
|
|
static guint
|
ext/nas/: Bunch of nassink clean-ups: make build by adding the right CFLAGS and LIBS to Makefile.am; rename structure...
Original commit message from CVS:
* ext/nas/Makefile.am:
* ext/nas/README:
* ext/nas/nassink.c: (gst_nas_sink_get_type),
(gst_nas_sink_base_init), (gst_nas_sink_class_init),
(gst_nas_sink_init), (gst_nas_sink_finalize),
(gst_nas_sink_getcaps), (gst_nas_sink_prepare),
(gst_nas_sink_unprepare), (gst_nas_sink_delay),
(gst_nas_sink_reset), (gst_nas_sink_write),
(gst_nas_sink_set_property), (gst_nas_sink_get_property),
(gst_nas_sink_open), (gst_nas_sink_close), (NAS_flush),
(NAS_sendData), (NAS_EventHandler), (gst_nas_sink_sink_get_format),
(NAS_createFlow), (plugin_init):
* ext/nas/nassink.h:
Bunch of nassink clean-ups: make build by adding the right CFLAGS
and LIBS to Makefile.am; rename structure, macros and functions
according to canonical naming scheme; move some things around a bit;
use GST_CAT_DEFAULT instead of GST_CAT_* everywhere; remove README
file that didn't really contain any useful information anyway (the
useful bits have been moved into the 'host' property description).
2007-03-04 20:35:26 +00:00
|
|
|
gst_nas_sink_delay (GstAudioSink * asink)
|
2007-03-02 19:43:48 +00:00
|
|
|
{
|
ext/nas/: Bunch of nassink clean-ups: make build by adding the right CFLAGS and LIBS to Makefile.am; rename structure...
Original commit message from CVS:
* ext/nas/Makefile.am:
* ext/nas/README:
* ext/nas/nassink.c: (gst_nas_sink_get_type),
(gst_nas_sink_base_init), (gst_nas_sink_class_init),
(gst_nas_sink_init), (gst_nas_sink_finalize),
(gst_nas_sink_getcaps), (gst_nas_sink_prepare),
(gst_nas_sink_unprepare), (gst_nas_sink_delay),
(gst_nas_sink_reset), (gst_nas_sink_write),
(gst_nas_sink_set_property), (gst_nas_sink_get_property),
(gst_nas_sink_open), (gst_nas_sink_close), (NAS_flush),
(NAS_sendData), (NAS_EventHandler), (gst_nas_sink_sink_get_format),
(NAS_createFlow), (plugin_init):
* ext/nas/nassink.h:
Bunch of nassink clean-ups: make build by adding the right CFLAGS
and LIBS to Makefile.am; rename structure, macros and functions
according to canonical naming scheme; move some things around a bit;
use GST_CAT_DEFAULT instead of GST_CAT_* everywhere; remove README
file that didn't really contain any useful information anyway (the
useful bits have been moved into the 'host' property description).
2007-03-04 20:35:26 +00:00
|
|
|
GST_DEBUG_OBJECT (asink, "nas_sink_delay");
|
2007-03-02 19:43:48 +00:00
|
|
|
return 0;
|
2004-01-21 06:57:30 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
static void
|
ext/nas/: Bunch of nassink clean-ups: make build by adding the right CFLAGS and LIBS to Makefile.am; rename structure...
Original commit message from CVS:
* ext/nas/Makefile.am:
* ext/nas/README:
* ext/nas/nassink.c: (gst_nas_sink_get_type),
(gst_nas_sink_base_init), (gst_nas_sink_class_init),
(gst_nas_sink_init), (gst_nas_sink_finalize),
(gst_nas_sink_getcaps), (gst_nas_sink_prepare),
(gst_nas_sink_unprepare), (gst_nas_sink_delay),
(gst_nas_sink_reset), (gst_nas_sink_write),
(gst_nas_sink_set_property), (gst_nas_sink_get_property),
(gst_nas_sink_open), (gst_nas_sink_close), (NAS_flush),
(NAS_sendData), (NAS_EventHandler), (gst_nas_sink_sink_get_format),
(NAS_createFlow), (plugin_init):
* ext/nas/nassink.h:
Bunch of nassink clean-ups: make build by adding the right CFLAGS
and LIBS to Makefile.am; rename structure, macros and functions
according to canonical naming scheme; move some things around a bit;
use GST_CAT_DEFAULT instead of GST_CAT_* everywhere; remove README
file that didn't really contain any useful information anyway (the
useful bits have been moved into the 'host' property description).
2007-03-04 20:35:26 +00:00
|
|
|
gst_nas_sink_reset (GstAudioSink * asink)
|
2004-01-21 06:57:30 +00:00
|
|
|
{
|
ext/nas/: Bunch of nassink clean-ups: make build by adding the right CFLAGS and LIBS to Makefile.am; rename structure...
Original commit message from CVS:
* ext/nas/Makefile.am:
* ext/nas/README:
* ext/nas/nassink.c: (gst_nas_sink_get_type),
(gst_nas_sink_base_init), (gst_nas_sink_class_init),
(gst_nas_sink_init), (gst_nas_sink_finalize),
(gst_nas_sink_getcaps), (gst_nas_sink_prepare),
(gst_nas_sink_unprepare), (gst_nas_sink_delay),
(gst_nas_sink_reset), (gst_nas_sink_write),
(gst_nas_sink_set_property), (gst_nas_sink_get_property),
(gst_nas_sink_open), (gst_nas_sink_close), (NAS_flush),
(NAS_sendData), (NAS_EventHandler), (gst_nas_sink_sink_get_format),
(NAS_createFlow), (plugin_init):
* ext/nas/nassink.h:
Bunch of nassink clean-ups: make build by adding the right CFLAGS
and LIBS to Makefile.am; rename structure, macros and functions
according to canonical naming scheme; move some things around a bit;
use GST_CAT_DEFAULT instead of GST_CAT_* everywhere; remove README
file that didn't really contain any useful information anyway (the
useful bits have been moved into the 'host' property description).
2007-03-04 20:35:26 +00:00
|
|
|
GstNasSink *sink = GST_NAS_SINK (asink);
|
|
|
|
|
|
|
|
GST_DEBUG_OBJECT (sink, "reset");
|
2004-03-14 22:34:33 +00:00
|
|
|
|
2007-03-02 19:43:48 +00:00
|
|
|
NAS_flush (sink);
|
|
|
|
}
|
2004-01-21 06:57:30 +00:00
|
|
|
|
2007-03-02 19:43:48 +00:00
|
|
|
static guint
|
ext/nas/: Bunch of nassink clean-ups: make build by adding the right CFLAGS and LIBS to Makefile.am; rename structure...
Original commit message from CVS:
* ext/nas/Makefile.am:
* ext/nas/README:
* ext/nas/nassink.c: (gst_nas_sink_get_type),
(gst_nas_sink_base_init), (gst_nas_sink_class_init),
(gst_nas_sink_init), (gst_nas_sink_finalize),
(gst_nas_sink_getcaps), (gst_nas_sink_prepare),
(gst_nas_sink_unprepare), (gst_nas_sink_delay),
(gst_nas_sink_reset), (gst_nas_sink_write),
(gst_nas_sink_set_property), (gst_nas_sink_get_property),
(gst_nas_sink_open), (gst_nas_sink_close), (NAS_flush),
(NAS_sendData), (NAS_EventHandler), (gst_nas_sink_sink_get_format),
(NAS_createFlow), (plugin_init):
* ext/nas/nassink.h:
Bunch of nassink clean-ups: make build by adding the right CFLAGS
and LIBS to Makefile.am; rename structure, macros and functions
according to canonical naming scheme; move some things around a bit;
use GST_CAT_DEFAULT instead of GST_CAT_* everywhere; remove README
file that didn't really contain any useful information anyway (the
useful bits have been moved into the 'host' property description).
2007-03-04 20:35:26 +00:00
|
|
|
gst_nas_sink_write (GstAudioSink * asink, gpointer data, guint length)
|
2007-03-02 19:43:48 +00:00
|
|
|
{
|
ext/nas/: Bunch of nassink clean-ups: make build by adding the right CFLAGS and LIBS to Makefile.am; rename structure...
Original commit message from CVS:
* ext/nas/Makefile.am:
* ext/nas/README:
* ext/nas/nassink.c: (gst_nas_sink_get_type),
(gst_nas_sink_base_init), (gst_nas_sink_class_init),
(gst_nas_sink_init), (gst_nas_sink_finalize),
(gst_nas_sink_getcaps), (gst_nas_sink_prepare),
(gst_nas_sink_unprepare), (gst_nas_sink_delay),
(gst_nas_sink_reset), (gst_nas_sink_write),
(gst_nas_sink_set_property), (gst_nas_sink_get_property),
(gst_nas_sink_open), (gst_nas_sink_close), (NAS_flush),
(NAS_sendData), (NAS_EventHandler), (gst_nas_sink_sink_get_format),
(NAS_createFlow), (plugin_init):
* ext/nas/nassink.h:
Bunch of nassink clean-ups: make build by adding the right CFLAGS
and LIBS to Makefile.am; rename structure, macros and functions
according to canonical naming scheme; move some things around a bit;
use GST_CAT_DEFAULT instead of GST_CAT_* everywhere; remove README
file that didn't really contain any useful information anyway (the
useful bits have been moved into the 'host' property description).
2007-03-04 20:35:26 +00:00
|
|
|
GstNasSink *nassink = GST_NAS_SINK (asink);
|
2007-03-02 19:43:48 +00:00
|
|
|
int used = 0;
|
2004-01-21 06:57:30 +00:00
|
|
|
|
2007-03-02 19:43:48 +00:00
|
|
|
NAS_flush (nassink);
|
|
|
|
if (!nassink->mute && nassink->audio != NULL && nassink->flow != AuNone) {
|
2004-01-21 06:57:30 +00:00
|
|
|
|
2007-03-02 19:43:48 +00:00
|
|
|
if (nassink->need_data == 0)
|
|
|
|
return 0;
|
2004-01-21 06:57:30 +00:00
|
|
|
|
2007-03-02 19:43:48 +00:00
|
|
|
used = nassink->need_data > length ? length : nassink->need_data;
|
|
|
|
AuWriteElement (nassink->audio, nassink->flow, 0, used, data, AuFalse,
|
|
|
|
NULL);
|
|
|
|
nassink->need_data -= used;
|
|
|
|
if (used == length)
|
2004-03-14 22:34:33 +00:00
|
|
|
AuSync (nassink->audio, AuFalse);
|
2007-03-02 19:43:48 +00:00
|
|
|
} else
|
|
|
|
used = length;
|
|
|
|
return used;
|
2004-01-21 06:57:30 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
static void
|
ext/nas/: Bunch of nassink clean-ups: make build by adding the right CFLAGS and LIBS to Makefile.am; rename structure...
Original commit message from CVS:
* ext/nas/Makefile.am:
* ext/nas/README:
* ext/nas/nassink.c: (gst_nas_sink_get_type),
(gst_nas_sink_base_init), (gst_nas_sink_class_init),
(gst_nas_sink_init), (gst_nas_sink_finalize),
(gst_nas_sink_getcaps), (gst_nas_sink_prepare),
(gst_nas_sink_unprepare), (gst_nas_sink_delay),
(gst_nas_sink_reset), (gst_nas_sink_write),
(gst_nas_sink_set_property), (gst_nas_sink_get_property),
(gst_nas_sink_open), (gst_nas_sink_close), (NAS_flush),
(NAS_sendData), (NAS_EventHandler), (gst_nas_sink_sink_get_format),
(NAS_createFlow), (plugin_init):
* ext/nas/nassink.h:
Bunch of nassink clean-ups: make build by adding the right CFLAGS
and LIBS to Makefile.am; rename structure, macros and functions
according to canonical naming scheme; move some things around a bit;
use GST_CAT_DEFAULT instead of GST_CAT_* everywhere; remove README
file that didn't really contain any useful information anyway (the
useful bits have been moved into the 'host' property description).
2007-03-04 20:35:26 +00:00
|
|
|
gst_nas_sink_set_property (GObject * object, guint prop_id,
|
|
|
|
const GValue * value, GParamSpec * pspec)
|
2004-01-21 06:57:30 +00:00
|
|
|
{
|
ext/nas/: Bunch of nassink clean-ups: make build by adding the right CFLAGS and LIBS to Makefile.am; rename structure...
Original commit message from CVS:
* ext/nas/Makefile.am:
* ext/nas/README:
* ext/nas/nassink.c: (gst_nas_sink_get_type),
(gst_nas_sink_base_init), (gst_nas_sink_class_init),
(gst_nas_sink_init), (gst_nas_sink_finalize),
(gst_nas_sink_getcaps), (gst_nas_sink_prepare),
(gst_nas_sink_unprepare), (gst_nas_sink_delay),
(gst_nas_sink_reset), (gst_nas_sink_write),
(gst_nas_sink_set_property), (gst_nas_sink_get_property),
(gst_nas_sink_open), (gst_nas_sink_close), (NAS_flush),
(NAS_sendData), (NAS_EventHandler), (gst_nas_sink_sink_get_format),
(NAS_createFlow), (plugin_init):
* ext/nas/nassink.h:
Bunch of nassink clean-ups: make build by adding the right CFLAGS
and LIBS to Makefile.am; rename structure, macros and functions
according to canonical naming scheme; move some things around a bit;
use GST_CAT_DEFAULT instead of GST_CAT_* everywhere; remove README
file that didn't really contain any useful information anyway (the
useful bits have been moved into the 'host' property description).
2007-03-04 20:35:26 +00:00
|
|
|
GstNasSink *nassink;
|
2004-01-21 06:57:30 +00:00
|
|
|
|
ext/nas/: Bunch of nassink clean-ups: make build by adding the right CFLAGS and LIBS to Makefile.am; rename structure...
Original commit message from CVS:
* ext/nas/Makefile.am:
* ext/nas/README:
* ext/nas/nassink.c: (gst_nas_sink_get_type),
(gst_nas_sink_base_init), (gst_nas_sink_class_init),
(gst_nas_sink_init), (gst_nas_sink_finalize),
(gst_nas_sink_getcaps), (gst_nas_sink_prepare),
(gst_nas_sink_unprepare), (gst_nas_sink_delay),
(gst_nas_sink_reset), (gst_nas_sink_write),
(gst_nas_sink_set_property), (gst_nas_sink_get_property),
(gst_nas_sink_open), (gst_nas_sink_close), (NAS_flush),
(NAS_sendData), (NAS_EventHandler), (gst_nas_sink_sink_get_format),
(NAS_createFlow), (plugin_init):
* ext/nas/nassink.h:
Bunch of nassink clean-ups: make build by adding the right CFLAGS
and LIBS to Makefile.am; rename structure, macros and functions
according to canonical naming scheme; move some things around a bit;
use GST_CAT_DEFAULT instead of GST_CAT_* everywhere; remove README
file that didn't really contain any useful information anyway (the
useful bits have been moved into the 'host' property description).
2007-03-04 20:35:26 +00:00
|
|
|
nassink = GST_NAS_SINK (object);
|
2004-01-21 06:57:30 +00:00
|
|
|
|
|
|
|
switch (prop_id) {
|
2004-03-14 22:34:33 +00:00
|
|
|
case ARG_MUTE:
|
|
|
|
nassink->mute = g_value_get_boolean (value);
|
|
|
|
break;
|
|
|
|
case ARG_HOST:
|
ext/nas/: Bunch of nassink clean-ups: make build by adding the right CFLAGS and LIBS to Makefile.am; rename structure...
Original commit message from CVS:
* ext/nas/Makefile.am:
* ext/nas/README:
* ext/nas/nassink.c: (gst_nas_sink_get_type),
(gst_nas_sink_base_init), (gst_nas_sink_class_init),
(gst_nas_sink_init), (gst_nas_sink_finalize),
(gst_nas_sink_getcaps), (gst_nas_sink_prepare),
(gst_nas_sink_unprepare), (gst_nas_sink_delay),
(gst_nas_sink_reset), (gst_nas_sink_write),
(gst_nas_sink_set_property), (gst_nas_sink_get_property),
(gst_nas_sink_open), (gst_nas_sink_close), (NAS_flush),
(NAS_sendData), (NAS_EventHandler), (gst_nas_sink_sink_get_format),
(NAS_createFlow), (plugin_init):
* ext/nas/nassink.h:
Bunch of nassink clean-ups: make build by adding the right CFLAGS
and LIBS to Makefile.am; rename structure, macros and functions
according to canonical naming scheme; move some things around a bit;
use GST_CAT_DEFAULT instead of GST_CAT_* everywhere; remove README
file that didn't really contain any useful information anyway (the
useful bits have been moved into the 'host' property description).
2007-03-04 20:35:26 +00:00
|
|
|
g_free (nassink->host);
|
|
|
|
nassink->host = g_value_dup_string (value);
|
|
|
|
if (nassink->host == NULL)
|
|
|
|
nassink->host = g_strdup (getenv ("AUDIOSERVER"));
|
|
|
|
if (nassink->host == NULL)
|
|
|
|
nassink->host = g_strdup (getenv ("DISPLAY"));
|
2004-03-14 22:34:33 +00:00
|
|
|
break;
|
|
|
|
default:
|
|
|
|
G_OBJECT_WARN_INVALID_PROPERTY_ID (object, prop_id, pspec);
|
|
|
|
break;
|
2004-01-21 06:57:30 +00:00
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
static void
|
ext/nas/: Bunch of nassink clean-ups: make build by adding the right CFLAGS and LIBS to Makefile.am; rename structure...
Original commit message from CVS:
* ext/nas/Makefile.am:
* ext/nas/README:
* ext/nas/nassink.c: (gst_nas_sink_get_type),
(gst_nas_sink_base_init), (gst_nas_sink_class_init),
(gst_nas_sink_init), (gst_nas_sink_finalize),
(gst_nas_sink_getcaps), (gst_nas_sink_prepare),
(gst_nas_sink_unprepare), (gst_nas_sink_delay),
(gst_nas_sink_reset), (gst_nas_sink_write),
(gst_nas_sink_set_property), (gst_nas_sink_get_property),
(gst_nas_sink_open), (gst_nas_sink_close), (NAS_flush),
(NAS_sendData), (NAS_EventHandler), (gst_nas_sink_sink_get_format),
(NAS_createFlow), (plugin_init):
* ext/nas/nassink.h:
Bunch of nassink clean-ups: make build by adding the right CFLAGS
and LIBS to Makefile.am; rename structure, macros and functions
according to canonical naming scheme; move some things around a bit;
use GST_CAT_DEFAULT instead of GST_CAT_* everywhere; remove README
file that didn't really contain any useful information anyway (the
useful bits have been moved into the 'host' property description).
2007-03-04 20:35:26 +00:00
|
|
|
gst_nas_sink_get_property (GObject * object, guint prop_id, GValue * value,
|
2004-03-14 22:34:33 +00:00
|
|
|
GParamSpec * pspec)
|
2004-01-21 06:57:30 +00:00
|
|
|
{
|
ext/nas/: Bunch of nassink clean-ups: make build by adding the right CFLAGS and LIBS to Makefile.am; rename structure...
Original commit message from CVS:
* ext/nas/Makefile.am:
* ext/nas/README:
* ext/nas/nassink.c: (gst_nas_sink_get_type),
(gst_nas_sink_base_init), (gst_nas_sink_class_init),
(gst_nas_sink_init), (gst_nas_sink_finalize),
(gst_nas_sink_getcaps), (gst_nas_sink_prepare),
(gst_nas_sink_unprepare), (gst_nas_sink_delay),
(gst_nas_sink_reset), (gst_nas_sink_write),
(gst_nas_sink_set_property), (gst_nas_sink_get_property),
(gst_nas_sink_open), (gst_nas_sink_close), (NAS_flush),
(NAS_sendData), (NAS_EventHandler), (gst_nas_sink_sink_get_format),
(NAS_createFlow), (plugin_init):
* ext/nas/nassink.h:
Bunch of nassink clean-ups: make build by adding the right CFLAGS
and LIBS to Makefile.am; rename structure, macros and functions
according to canonical naming scheme; move some things around a bit;
use GST_CAT_DEFAULT instead of GST_CAT_* everywhere; remove README
file that didn't really contain any useful information anyway (the
useful bits have been moved into the 'host' property description).
2007-03-04 20:35:26 +00:00
|
|
|
GstNasSink *nassink;
|
2004-01-21 06:57:30 +00:00
|
|
|
|
ext/nas/: Bunch of nassink clean-ups: make build by adding the right CFLAGS and LIBS to Makefile.am; rename structure...
Original commit message from CVS:
* ext/nas/Makefile.am:
* ext/nas/README:
* ext/nas/nassink.c: (gst_nas_sink_get_type),
(gst_nas_sink_base_init), (gst_nas_sink_class_init),
(gst_nas_sink_init), (gst_nas_sink_finalize),
(gst_nas_sink_getcaps), (gst_nas_sink_prepare),
(gst_nas_sink_unprepare), (gst_nas_sink_delay),
(gst_nas_sink_reset), (gst_nas_sink_write),
(gst_nas_sink_set_property), (gst_nas_sink_get_property),
(gst_nas_sink_open), (gst_nas_sink_close), (NAS_flush),
(NAS_sendData), (NAS_EventHandler), (gst_nas_sink_sink_get_format),
(NAS_createFlow), (plugin_init):
* ext/nas/nassink.h:
Bunch of nassink clean-ups: make build by adding the right CFLAGS
and LIBS to Makefile.am; rename structure, macros and functions
according to canonical naming scheme; move some things around a bit;
use GST_CAT_DEFAULT instead of GST_CAT_* everywhere; remove README
file that didn't really contain any useful information anyway (the
useful bits have been moved into the 'host' property description).
2007-03-04 20:35:26 +00:00
|
|
|
nassink = GST_NAS_SINK (object);
|
2004-01-21 06:57:30 +00:00
|
|
|
|
|
|
|
switch (prop_id) {
|
2004-03-14 22:34:33 +00:00
|
|
|
case ARG_MUTE:
|
|
|
|
g_value_set_boolean (value, nassink->mute);
|
|
|
|
break;
|
|
|
|
case ARG_HOST:
|
|
|
|
g_value_set_string (value, nassink->host);
|
|
|
|
break;
|
|
|
|
default:
|
|
|
|
G_OBJECT_WARN_INVALID_PROPERTY_ID (object, prop_id, pspec);
|
|
|
|
break;
|
2004-01-21 06:57:30 +00:00
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
static gboolean
|
ext/nas/: Bunch of nassink clean-ups: make build by adding the right CFLAGS and LIBS to Makefile.am; rename structure...
Original commit message from CVS:
* ext/nas/Makefile.am:
* ext/nas/README:
* ext/nas/nassink.c: (gst_nas_sink_get_type),
(gst_nas_sink_base_init), (gst_nas_sink_class_init),
(gst_nas_sink_init), (gst_nas_sink_finalize),
(gst_nas_sink_getcaps), (gst_nas_sink_prepare),
(gst_nas_sink_unprepare), (gst_nas_sink_delay),
(gst_nas_sink_reset), (gst_nas_sink_write),
(gst_nas_sink_set_property), (gst_nas_sink_get_property),
(gst_nas_sink_open), (gst_nas_sink_close), (NAS_flush),
(NAS_sendData), (NAS_EventHandler), (gst_nas_sink_sink_get_format),
(NAS_createFlow), (plugin_init):
* ext/nas/nassink.h:
Bunch of nassink clean-ups: make build by adding the right CFLAGS
and LIBS to Makefile.am; rename structure, macros and functions
according to canonical naming scheme; move some things around a bit;
use GST_CAT_DEFAULT instead of GST_CAT_* everywhere; remove README
file that didn't really contain any useful information anyway (the
useful bits have been moved into the 'host' property description).
2007-03-04 20:35:26 +00:00
|
|
|
gst_nas_sink_open (GstAudioSink * asink)
|
2004-01-21 06:57:30 +00:00
|
|
|
{
|
ext/nas/: Bunch of nassink clean-ups: make build by adding the right CFLAGS and LIBS to Makefile.am; rename structure...
Original commit message from CVS:
* ext/nas/Makefile.am:
* ext/nas/README:
* ext/nas/nassink.c: (gst_nas_sink_get_type),
(gst_nas_sink_base_init), (gst_nas_sink_class_init),
(gst_nas_sink_init), (gst_nas_sink_finalize),
(gst_nas_sink_getcaps), (gst_nas_sink_prepare),
(gst_nas_sink_unprepare), (gst_nas_sink_delay),
(gst_nas_sink_reset), (gst_nas_sink_write),
(gst_nas_sink_set_property), (gst_nas_sink_get_property),
(gst_nas_sink_open), (gst_nas_sink_close), (NAS_flush),
(NAS_sendData), (NAS_EventHandler), (gst_nas_sink_sink_get_format),
(NAS_createFlow), (plugin_init):
* ext/nas/nassink.h:
Bunch of nassink clean-ups: make build by adding the right CFLAGS
and LIBS to Makefile.am; rename structure, macros and functions
according to canonical naming scheme; move some things around a bit;
use GST_CAT_DEFAULT instead of GST_CAT_* everywhere; remove README
file that didn't really contain any useful information anyway (the
useful bits have been moved into the 'host' property description).
2007-03-04 20:35:26 +00:00
|
|
|
GstNasSink *sink = GST_NAS_SINK (asink);
|
2004-01-21 06:57:30 +00:00
|
|
|
|
ext/nas/: Bunch of nassink clean-ups: make build by adding the right CFLAGS and LIBS to Makefile.am; rename structure...
Original commit message from CVS:
* ext/nas/Makefile.am:
* ext/nas/README:
* ext/nas/nassink.c: (gst_nas_sink_get_type),
(gst_nas_sink_base_init), (gst_nas_sink_class_init),
(gst_nas_sink_init), (gst_nas_sink_finalize),
(gst_nas_sink_getcaps), (gst_nas_sink_prepare),
(gst_nas_sink_unprepare), (gst_nas_sink_delay),
(gst_nas_sink_reset), (gst_nas_sink_write),
(gst_nas_sink_set_property), (gst_nas_sink_get_property),
(gst_nas_sink_open), (gst_nas_sink_close), (NAS_flush),
(NAS_sendData), (NAS_EventHandler), (gst_nas_sink_sink_get_format),
(NAS_createFlow), (plugin_init):
* ext/nas/nassink.h:
Bunch of nassink clean-ups: make build by adding the right CFLAGS
and LIBS to Makefile.am; rename structure, macros and functions
according to canonical naming scheme; move some things around a bit;
use GST_CAT_DEFAULT instead of GST_CAT_* everywhere; remove README
file that didn't really contain any useful information anyway (the
useful bits have been moved into the 'host' property description).
2007-03-04 20:35:26 +00:00
|
|
|
GST_DEBUG_OBJECT (sink, "opening, host = '%s'", GST_STR_NULL (sink->host));
|
2007-03-02 19:43:48 +00:00
|
|
|
|
2004-01-21 06:57:30 +00:00
|
|
|
/* Open Server */
|
2004-03-14 22:34:33 +00:00
|
|
|
sink->audio = AuOpenServer (sink->host, 0, NULL, 0, NULL, NULL);
|
2004-01-21 06:57:30 +00:00
|
|
|
if (sink->audio == NULL)
|
|
|
|
return FALSE;
|
|
|
|
sink->flow = AuNone;
|
2007-03-02 19:43:48 +00:00
|
|
|
sink->need_data = 0;
|
2004-01-21 06:57:30 +00:00
|
|
|
|
|
|
|
/* Start a flow */
|
ext/nas/: Bunch of nassink clean-ups: make build by adding the right CFLAGS and LIBS to Makefile.am; rename structure...
Original commit message from CVS:
* ext/nas/Makefile.am:
* ext/nas/README:
* ext/nas/nassink.c: (gst_nas_sink_get_type),
(gst_nas_sink_base_init), (gst_nas_sink_class_init),
(gst_nas_sink_init), (gst_nas_sink_finalize),
(gst_nas_sink_getcaps), (gst_nas_sink_prepare),
(gst_nas_sink_unprepare), (gst_nas_sink_delay),
(gst_nas_sink_reset), (gst_nas_sink_write),
(gst_nas_sink_set_property), (gst_nas_sink_get_property),
(gst_nas_sink_open), (gst_nas_sink_close), (NAS_flush),
(NAS_sendData), (NAS_EventHandler), (gst_nas_sink_sink_get_format),
(NAS_createFlow), (plugin_init):
* ext/nas/nassink.h:
Bunch of nassink clean-ups: make build by adding the right CFLAGS
and LIBS to Makefile.am; rename structure, macros and functions
according to canonical naming scheme; move some things around a bit;
use GST_CAT_DEFAULT instead of GST_CAT_* everywhere; remove README
file that didn't really contain any useful information anyway (the
useful bits have been moved into the 'host' property description).
2007-03-04 20:35:26 +00:00
|
|
|
GST_DEBUG_OBJECT (asink, "opened audio device");
|
2004-01-21 06:57:30 +00:00
|
|
|
return TRUE;
|
|
|
|
}
|
|
|
|
|
2007-03-02 19:43:48 +00:00
|
|
|
static gboolean
|
ext/nas/: Bunch of nassink clean-ups: make build by adding the right CFLAGS and LIBS to Makefile.am; rename structure...
Original commit message from CVS:
* ext/nas/Makefile.am:
* ext/nas/README:
* ext/nas/nassink.c: (gst_nas_sink_get_type),
(gst_nas_sink_base_init), (gst_nas_sink_class_init),
(gst_nas_sink_init), (gst_nas_sink_finalize),
(gst_nas_sink_getcaps), (gst_nas_sink_prepare),
(gst_nas_sink_unprepare), (gst_nas_sink_delay),
(gst_nas_sink_reset), (gst_nas_sink_write),
(gst_nas_sink_set_property), (gst_nas_sink_get_property),
(gst_nas_sink_open), (gst_nas_sink_close), (NAS_flush),
(NAS_sendData), (NAS_EventHandler), (gst_nas_sink_sink_get_format),
(NAS_createFlow), (plugin_init):
* ext/nas/nassink.h:
Bunch of nassink clean-ups: make build by adding the right CFLAGS
and LIBS to Makefile.am; rename structure, macros and functions
according to canonical naming scheme; move some things around a bit;
use GST_CAT_DEFAULT instead of GST_CAT_* everywhere; remove README
file that didn't really contain any useful information anyway (the
useful bits have been moved into the 'host' property description).
2007-03-04 20:35:26 +00:00
|
|
|
gst_nas_sink_close (GstAudioSink * asink)
|
2004-01-21 06:57:30 +00:00
|
|
|
{
|
ext/nas/: Bunch of nassink clean-ups: make build by adding the right CFLAGS and LIBS to Makefile.am; rename structure...
Original commit message from CVS:
* ext/nas/Makefile.am:
* ext/nas/README:
* ext/nas/nassink.c: (gst_nas_sink_get_type),
(gst_nas_sink_base_init), (gst_nas_sink_class_init),
(gst_nas_sink_init), (gst_nas_sink_finalize),
(gst_nas_sink_getcaps), (gst_nas_sink_prepare),
(gst_nas_sink_unprepare), (gst_nas_sink_delay),
(gst_nas_sink_reset), (gst_nas_sink_write),
(gst_nas_sink_set_property), (gst_nas_sink_get_property),
(gst_nas_sink_open), (gst_nas_sink_close), (NAS_flush),
(NAS_sendData), (NAS_EventHandler), (gst_nas_sink_sink_get_format),
(NAS_createFlow), (plugin_init):
* ext/nas/nassink.h:
Bunch of nassink clean-ups: make build by adding the right CFLAGS
and LIBS to Makefile.am; rename structure, macros and functions
according to canonical naming scheme; move some things around a bit;
use GST_CAT_DEFAULT instead of GST_CAT_* everywhere; remove README
file that didn't really contain any useful information anyway (the
useful bits have been moved into the 'host' property description).
2007-03-04 20:35:26 +00:00
|
|
|
GstNasSink *sink = GST_NAS_SINK (asink);
|
2007-03-02 19:43:48 +00:00
|
|
|
|
2004-03-14 22:34:33 +00:00
|
|
|
if (sink->audio == NULL)
|
2007-03-02 19:43:48 +00:00
|
|
|
return TRUE;
|
2004-01-21 06:57:30 +00:00
|
|
|
|
|
|
|
if (sink->flow != AuNone) {
|
2007-03-02 19:43:48 +00:00
|
|
|
NAS_flush (sink);
|
2004-01-21 06:57:30 +00:00
|
|
|
|
2004-03-14 22:34:33 +00:00
|
|
|
AuStopFlow (sink->audio, sink->flow, NULL);
|
|
|
|
AuReleaseScratchFlow (sink->audio, sink->flow, NULL);
|
2004-01-21 06:57:30 +00:00
|
|
|
sink->flow = AuNone;
|
|
|
|
}
|
|
|
|
|
2007-03-02 19:43:48 +00:00
|
|
|
sink->need_data = 0;
|
2004-01-21 06:57:30 +00:00
|
|
|
|
2004-03-14 22:34:33 +00:00
|
|
|
AuCloseServer (sink->audio);
|
2004-01-21 06:57:30 +00:00
|
|
|
sink->audio = NULL;
|
|
|
|
|
ext/nas/: Bunch of nassink clean-ups: make build by adding the right CFLAGS and LIBS to Makefile.am; rename structure...
Original commit message from CVS:
* ext/nas/Makefile.am:
* ext/nas/README:
* ext/nas/nassink.c: (gst_nas_sink_get_type),
(gst_nas_sink_base_init), (gst_nas_sink_class_init),
(gst_nas_sink_init), (gst_nas_sink_finalize),
(gst_nas_sink_getcaps), (gst_nas_sink_prepare),
(gst_nas_sink_unprepare), (gst_nas_sink_delay),
(gst_nas_sink_reset), (gst_nas_sink_write),
(gst_nas_sink_set_property), (gst_nas_sink_get_property),
(gst_nas_sink_open), (gst_nas_sink_close), (NAS_flush),
(NAS_sendData), (NAS_EventHandler), (gst_nas_sink_sink_get_format),
(NAS_createFlow), (plugin_init):
* ext/nas/nassink.h:
Bunch of nassink clean-ups: make build by adding the right CFLAGS
and LIBS to Makefile.am; rename structure, macros and functions
according to canonical naming scheme; move some things around a bit;
use GST_CAT_DEFAULT instead of GST_CAT_* everywhere; remove README
file that didn't really contain any useful information anyway (the
useful bits have been moved into the 'host' property description).
2007-03-04 20:35:26 +00:00
|
|
|
GST_DEBUG_OBJECT (sink, "closed audio device");
|
2007-03-02 19:43:48 +00:00
|
|
|
return TRUE;
|
2004-01-21 06:57:30 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
static void
|
ext/nas/: Bunch of nassink clean-ups: make build by adding the right CFLAGS and LIBS to Makefile.am; rename structure...
Original commit message from CVS:
* ext/nas/Makefile.am:
* ext/nas/README:
* ext/nas/nassink.c: (gst_nas_sink_get_type),
(gst_nas_sink_base_init), (gst_nas_sink_class_init),
(gst_nas_sink_init), (gst_nas_sink_finalize),
(gst_nas_sink_getcaps), (gst_nas_sink_prepare),
(gst_nas_sink_unprepare), (gst_nas_sink_delay),
(gst_nas_sink_reset), (gst_nas_sink_write),
(gst_nas_sink_set_property), (gst_nas_sink_get_property),
(gst_nas_sink_open), (gst_nas_sink_close), (NAS_flush),
(NAS_sendData), (NAS_EventHandler), (gst_nas_sink_sink_get_format),
(NAS_createFlow), (plugin_init):
* ext/nas/nassink.h:
Bunch of nassink clean-ups: make build by adding the right CFLAGS
and LIBS to Makefile.am; rename structure, macros and functions
according to canonical naming scheme; move some things around a bit;
use GST_CAT_DEFAULT instead of GST_CAT_* everywhere; remove README
file that didn't really contain any useful information anyway (the
useful bits have been moved into the 'host' property description).
2007-03-04 20:35:26 +00:00
|
|
|
NAS_flush (GstNasSink * sink)
|
2004-01-21 06:57:30 +00:00
|
|
|
{
|
|
|
|
AuEvent ev;
|
|
|
|
|
2004-03-14 22:34:33 +00:00
|
|
|
AuNextEvent (sink->audio, AuTrue, &ev);
|
|
|
|
AuDispatchEvent (sink->audio, &ev);
|
2004-01-21 06:57:30 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
static void
|
ext/nas/: Bunch of nassink clean-ups: make build by adding the right CFLAGS and LIBS to Makefile.am; rename structure...
Original commit message from CVS:
* ext/nas/Makefile.am:
* ext/nas/README:
* ext/nas/nassink.c: (gst_nas_sink_get_type),
(gst_nas_sink_base_init), (gst_nas_sink_class_init),
(gst_nas_sink_init), (gst_nas_sink_finalize),
(gst_nas_sink_getcaps), (gst_nas_sink_prepare),
(gst_nas_sink_unprepare), (gst_nas_sink_delay),
(gst_nas_sink_reset), (gst_nas_sink_write),
(gst_nas_sink_set_property), (gst_nas_sink_get_property),
(gst_nas_sink_open), (gst_nas_sink_close), (NAS_flush),
(NAS_sendData), (NAS_EventHandler), (gst_nas_sink_sink_get_format),
(NAS_createFlow), (plugin_init):
* ext/nas/nassink.h:
Bunch of nassink clean-ups: make build by adding the right CFLAGS
and LIBS to Makefile.am; rename structure, macros and functions
according to canonical naming scheme; move some things around a bit;
use GST_CAT_DEFAULT instead of GST_CAT_* everywhere; remove README
file that didn't really contain any useful information anyway (the
useful bits have been moved into the 'host' property description).
2007-03-04 20:35:26 +00:00
|
|
|
NAS_sendData (GstNasSink * sink, AuUint32 numBytes)
|
2004-01-21 06:57:30 +00:00
|
|
|
{
|
2007-03-02 19:43:48 +00:00
|
|
|
sink->need_data += numBytes;
|
|
|
|
return;
|
2004-01-21 06:57:30 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
static AuBool
|
2004-03-14 22:34:33 +00:00
|
|
|
NAS_EventHandler (AuServer * aud, AuEvent * ev, AuEventHandlerRec * handler)
|
2004-01-21 06:57:30 +00:00
|
|
|
{
|
ext/nas/: Bunch of nassink clean-ups: make build by adding the right CFLAGS and LIBS to Makefile.am; rename structure...
Original commit message from CVS:
* ext/nas/Makefile.am:
* ext/nas/README:
* ext/nas/nassink.c: (gst_nas_sink_get_type),
(gst_nas_sink_base_init), (gst_nas_sink_class_init),
(gst_nas_sink_init), (gst_nas_sink_finalize),
(gst_nas_sink_getcaps), (gst_nas_sink_prepare),
(gst_nas_sink_unprepare), (gst_nas_sink_delay),
(gst_nas_sink_reset), (gst_nas_sink_write),
(gst_nas_sink_set_property), (gst_nas_sink_get_property),
(gst_nas_sink_open), (gst_nas_sink_close), (NAS_flush),
(NAS_sendData), (NAS_EventHandler), (gst_nas_sink_sink_get_format),
(NAS_createFlow), (plugin_init):
* ext/nas/nassink.h:
Bunch of nassink clean-ups: make build by adding the right CFLAGS
and LIBS to Makefile.am; rename structure, macros and functions
according to canonical naming scheme; move some things around a bit;
use GST_CAT_DEFAULT instead of GST_CAT_* everywhere; remove README
file that didn't really contain any useful information anyway (the
useful bits have been moved into the 'host' property description).
2007-03-04 20:35:26 +00:00
|
|
|
GstNasSink *sink = (GstNasSink *) handler->data;
|
2004-01-21 06:57:30 +00:00
|
|
|
AuElementNotifyEvent *notify;
|
|
|
|
|
|
|
|
switch (ev->type) {
|
|
|
|
|
2004-03-14 22:34:33 +00:00
|
|
|
case AuEventTypeElementNotify:
|
2004-01-21 06:57:30 +00:00
|
|
|
|
2004-03-14 22:34:33 +00:00
|
|
|
notify = (AuElementNotifyEvent *) ev;
|
2004-01-21 06:57:30 +00:00
|
|
|
|
2004-03-14 22:34:33 +00:00
|
|
|
switch (notify->kind) {
|
2004-01-21 06:57:30 +00:00
|
|
|
|
2004-03-15 19:32:27 +00:00
|
|
|
case AuElementNotifyKindLowWater:
|
|
|
|
NAS_sendData (sink, notify->num_bytes);
|
|
|
|
break;
|
2004-01-21 06:57:30 +00:00
|
|
|
|
2004-03-15 19:32:27 +00:00
|
|
|
case AuElementNotifyKindState:
|
2004-01-21 06:57:30 +00:00
|
|
|
|
2004-03-15 19:32:27 +00:00
|
|
|
switch (notify->cur_state) {
|
2004-01-21 06:57:30 +00:00
|
|
|
|
2004-03-15 19:32:27 +00:00
|
|
|
case AuStateStop:
|
2004-01-21 06:57:30 +00:00
|
|
|
|
2004-03-15 19:32:27 +00:00
|
|
|
if (sink->flow != AuNone) {
|
|
|
|
if (notify->reason == AuReasonEOF)
|
|
|
|
AuStopFlow (handler->aud, sink->flow, NULL);
|
|
|
|
AuReleaseScratchFlow (handler->aud, sink->flow, NULL);
|
|
|
|
sink->flow = AuNone;
|
|
|
|
}
|
|
|
|
AuUnregisterEventHandler (handler->aud, handler);
|
|
|
|
break;
|
2004-01-21 06:57:30 +00:00
|
|
|
|
2004-03-15 19:32:27 +00:00
|
|
|
case AuStatePause:
|
2004-01-21 06:57:30 +00:00
|
|
|
|
2004-03-15 19:32:27 +00:00
|
|
|
switch (notify->reason) {
|
|
|
|
case AuReasonUnderrun:
|
|
|
|
case AuReasonOverrun:
|
|
|
|
case AuReasonEOF:
|
|
|
|
case AuReasonWatermark:
|
2004-01-21 06:57:30 +00:00
|
|
|
|
2004-03-15 19:32:27 +00:00
|
|
|
NAS_sendData (sink, notify->num_bytes);
|
2004-01-21 06:57:30 +00:00
|
|
|
|
2004-03-15 19:32:27 +00:00
|
|
|
break;
|
2004-01-21 06:57:30 +00:00
|
|
|
|
2004-03-15 19:32:27 +00:00
|
|
|
case AuReasonHardware:
|
2004-01-21 06:57:30 +00:00
|
|
|
|
2004-03-15 19:32:27 +00:00
|
|
|
if (AuSoundRestartHardwarePauses)
|
|
|
|
AuStartFlow (handler->aud, sink->flow, NULL);
|
|
|
|
else
|
|
|
|
AuStopFlow (handler->aud, sink->flow, NULL);
|
2004-03-14 22:34:33 +00:00
|
|
|
|
2004-03-15 19:32:27 +00:00
|
|
|
break;
|
|
|
|
}
|
|
|
|
break;
|
|
|
|
}
|
|
|
|
break;
|
2004-01-21 06:57:30 +00:00
|
|
|
}
|
|
|
|
break;
|
|
|
|
}
|
|
|
|
|
|
|
|
return AuTrue;
|
|
|
|
}
|
|
|
|
|
|
|
|
static AuDeviceID
|
2004-03-14 22:34:33 +00:00
|
|
|
NAS_getDevice (AuServer * aud, int numTracks)
|
2004-01-21 06:57:30 +00:00
|
|
|
{
|
|
|
|
int i;
|
|
|
|
|
2004-03-14 22:34:33 +00:00
|
|
|
for (i = 0; i < AuServerNumDevices (aud); i++) {
|
|
|
|
if ((AuDeviceKind (AuServerDevice (aud, i))
|
2004-03-15 19:32:27 +00:00
|
|
|
== AuComponentKindPhysicalOutput) &&
|
|
|
|
(AuDeviceNumTracks (AuServerDevice (aud, i)) == numTracks)) {
|
2004-01-21 06:57:30 +00:00
|
|
|
|
2004-03-14 22:34:33 +00:00
|
|
|
return AuDeviceIdentifier (AuServerDevice (aud, i));
|
2004-01-21 06:57:30 +00:00
|
|
|
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
return AuNone;
|
|
|
|
}
|
|
|
|
|
2007-03-02 19:43:48 +00:00
|
|
|
static gint
|
ext/nas/: Bunch of nassink clean-ups: make build by adding the right CFLAGS and LIBS to Makefile.am; rename structure...
Original commit message from CVS:
* ext/nas/Makefile.am:
* ext/nas/README:
* ext/nas/nassink.c: (gst_nas_sink_get_type),
(gst_nas_sink_base_init), (gst_nas_sink_class_init),
(gst_nas_sink_init), (gst_nas_sink_finalize),
(gst_nas_sink_getcaps), (gst_nas_sink_prepare),
(gst_nas_sink_unprepare), (gst_nas_sink_delay),
(gst_nas_sink_reset), (gst_nas_sink_write),
(gst_nas_sink_set_property), (gst_nas_sink_get_property),
(gst_nas_sink_open), (gst_nas_sink_close), (NAS_flush),
(NAS_sendData), (NAS_EventHandler), (gst_nas_sink_sink_get_format),
(NAS_createFlow), (plugin_init):
* ext/nas/nassink.h:
Bunch of nassink clean-ups: make build by adding the right CFLAGS
and LIBS to Makefile.am; rename structure, macros and functions
according to canonical naming scheme; move some things around a bit;
use GST_CAT_DEFAULT instead of GST_CAT_* everywhere; remove README
file that didn't really contain any useful information anyway (the
useful bits have been moved into the 'host' property description).
2007-03-04 20:35:26 +00:00
|
|
|
gst_nas_sink_sink_get_format (const GstRingBufferSpec * spec)
|
2004-01-21 06:57:30 +00:00
|
|
|
{
|
2007-03-02 19:43:48 +00:00
|
|
|
gint result;
|
2004-01-21 06:57:30 +00:00
|
|
|
|
2007-03-02 19:43:48 +00:00
|
|
|
switch (spec->format) {
|
|
|
|
case GST_U8:
|
|
|
|
result = AuFormatLinearUnsigned8;
|
|
|
|
break;
|
|
|
|
case GST_S8:
|
|
|
|
result = AuFormatLinearSigned8;
|
|
|
|
break;
|
|
|
|
case GST_S16_LE:
|
|
|
|
result = AuFormatLinearSigned16LSB;
|
|
|
|
break;
|
|
|
|
case GST_S16_BE:
|
|
|
|
result = AuFormatLinearSigned16MSB;
|
|
|
|
break;
|
|
|
|
case GST_U16_LE:
|
|
|
|
result = AuFormatLinearUnsigned16LSB;
|
|
|
|
break;
|
|
|
|
case GST_U16_BE:
|
|
|
|
result = AuFormatLinearUnsigned16MSB;
|
|
|
|
break;
|
|
|
|
default:
|
|
|
|
result = 0;
|
|
|
|
break;
|
2004-01-21 06:57:30 +00:00
|
|
|
}
|
2007-03-02 19:43:48 +00:00
|
|
|
return result;
|
2004-01-21 06:57:30 +00:00
|
|
|
}
|
|
|
|
|
2007-03-02 19:43:48 +00:00
|
|
|
static gboolean
|
ext/nas/: Bunch of nassink clean-ups: make build by adding the right CFLAGS and LIBS to Makefile.am; rename structure...
Original commit message from CVS:
* ext/nas/Makefile.am:
* ext/nas/README:
* ext/nas/nassink.c: (gst_nas_sink_get_type),
(gst_nas_sink_base_init), (gst_nas_sink_class_init),
(gst_nas_sink_init), (gst_nas_sink_finalize),
(gst_nas_sink_getcaps), (gst_nas_sink_prepare),
(gst_nas_sink_unprepare), (gst_nas_sink_delay),
(gst_nas_sink_reset), (gst_nas_sink_write),
(gst_nas_sink_set_property), (gst_nas_sink_get_property),
(gst_nas_sink_open), (gst_nas_sink_close), (NAS_flush),
(NAS_sendData), (NAS_EventHandler), (gst_nas_sink_sink_get_format),
(NAS_createFlow), (plugin_init):
* ext/nas/nassink.h:
Bunch of nassink clean-ups: make build by adding the right CFLAGS
and LIBS to Makefile.am; rename structure, macros and functions
according to canonical naming scheme; move some things around a bit;
use GST_CAT_DEFAULT instead of GST_CAT_* everywhere; remove README
file that didn't really contain any useful information anyway (the
useful bits have been moved into the 'host' property description).
2007-03-04 20:35:26 +00:00
|
|
|
NAS_createFlow (GstNasSink * sink, GstRingBufferSpec * spec)
|
2004-01-21 06:57:30 +00:00
|
|
|
{
|
|
|
|
AuElement elements[2];
|
|
|
|
AuUint32 buf_samples;
|
2007-03-02 19:43:48 +00:00
|
|
|
unsigned char format;
|
|
|
|
|
ext/nas/: Bunch of nassink clean-ups: make build by adding the right CFLAGS and LIBS to Makefile.am; rename structure...
Original commit message from CVS:
* ext/nas/Makefile.am:
* ext/nas/README:
* ext/nas/nassink.c: (gst_nas_sink_get_type),
(gst_nas_sink_base_init), (gst_nas_sink_class_init),
(gst_nas_sink_init), (gst_nas_sink_finalize),
(gst_nas_sink_getcaps), (gst_nas_sink_prepare),
(gst_nas_sink_unprepare), (gst_nas_sink_delay),
(gst_nas_sink_reset), (gst_nas_sink_write),
(gst_nas_sink_set_property), (gst_nas_sink_get_property),
(gst_nas_sink_open), (gst_nas_sink_close), (NAS_flush),
(NAS_sendData), (NAS_EventHandler), (gst_nas_sink_sink_get_format),
(NAS_createFlow), (plugin_init):
* ext/nas/nassink.h:
Bunch of nassink clean-ups: make build by adding the right CFLAGS
and LIBS to Makefile.am; rename structure, macros and functions
according to canonical naming scheme; move some things around a bit;
use GST_CAT_DEFAULT instead of GST_CAT_* everywhere; remove README
file that didn't really contain any useful information anyway (the
useful bits have been moved into the 'host' property description).
2007-03-04 20:35:26 +00:00
|
|
|
format = gst_nas_sink_sink_get_format (spec);
|
2007-03-02 19:43:48 +00:00
|
|
|
if (format == 0) {
|
|
|
|
GST_ELEMENT_ERROR (sink, RESOURCE, SETTINGS, (NULL),
|
|
|
|
("Unable to get format %d", spec->format));
|
|
|
|
return FALSE;
|
|
|
|
}
|
ext/nas/: Bunch of nassink clean-ups: make build by adding the right CFLAGS and LIBS to Makefile.am; rename structure...
Original commit message from CVS:
* ext/nas/Makefile.am:
* ext/nas/README:
* ext/nas/nassink.c: (gst_nas_sink_get_type),
(gst_nas_sink_base_init), (gst_nas_sink_class_init),
(gst_nas_sink_init), (gst_nas_sink_finalize),
(gst_nas_sink_getcaps), (gst_nas_sink_prepare),
(gst_nas_sink_unprepare), (gst_nas_sink_delay),
(gst_nas_sink_reset), (gst_nas_sink_write),
(gst_nas_sink_set_property), (gst_nas_sink_get_property),
(gst_nas_sink_open), (gst_nas_sink_close), (NAS_flush),
(NAS_sendData), (NAS_EventHandler), (gst_nas_sink_sink_get_format),
(NAS_createFlow), (plugin_init):
* ext/nas/nassink.h:
Bunch of nassink clean-ups: make build by adding the right CFLAGS
and LIBS to Makefile.am; rename structure, macros and functions
according to canonical naming scheme; move some things around a bit;
use GST_CAT_DEFAULT instead of GST_CAT_* everywhere; remove README
file that didn't really contain any useful information anyway (the
useful bits have been moved into the 'host' property description).
2007-03-04 20:35:26 +00:00
|
|
|
GST_DEBUG_OBJECT (sink, "Format: %d %d\n", spec->format, format);
|
2004-01-21 06:57:30 +00:00
|
|
|
|
2004-03-14 22:34:33 +00:00
|
|
|
sink->flow = AuGetScratchFlow (sink->audio, NULL);
|
2004-01-21 06:57:30 +00:00
|
|
|
if (sink->flow == 0) {
|
ext/nas/: Bunch of nassink clean-ups: make build by adding the right CFLAGS and LIBS to Makefile.am; rename structure...
Original commit message from CVS:
* ext/nas/Makefile.am:
* ext/nas/README:
* ext/nas/nassink.c: (gst_nas_sink_get_type),
(gst_nas_sink_base_init), (gst_nas_sink_class_init),
(gst_nas_sink_init), (gst_nas_sink_finalize),
(gst_nas_sink_getcaps), (gst_nas_sink_prepare),
(gst_nas_sink_unprepare), (gst_nas_sink_delay),
(gst_nas_sink_reset), (gst_nas_sink_write),
(gst_nas_sink_set_property), (gst_nas_sink_get_property),
(gst_nas_sink_open), (gst_nas_sink_close), (NAS_flush),
(NAS_sendData), (NAS_EventHandler), (gst_nas_sink_sink_get_format),
(NAS_createFlow), (plugin_init):
* ext/nas/nassink.h:
Bunch of nassink clean-ups: make build by adding the right CFLAGS
and LIBS to Makefile.am; rename structure, macros and functions
according to canonical naming scheme; move some things around a bit;
use GST_CAT_DEFAULT instead of GST_CAT_* everywhere; remove README
file that didn't really contain any useful information anyway (the
useful bits have been moved into the 'host' property description).
2007-03-04 20:35:26 +00:00
|
|
|
GST_DEBUG_OBJECT (sink, "couldn't get flow");
|
2007-03-02 19:43:48 +00:00
|
|
|
return FALSE;
|
2004-01-21 06:57:30 +00:00
|
|
|
}
|
|
|
|
|
2004-03-07 11:24:38 +00:00
|
|
|
/* free old Elements and reconnet to server, needed to change samplerate */
|
|
|
|
{
|
|
|
|
AuBool clocked;
|
|
|
|
int num_elements;
|
|
|
|
AuStatus status;
|
|
|
|
AuElement *oldelems;
|
2004-03-14 22:34:33 +00:00
|
|
|
|
|
|
|
oldelems =
|
2004-03-15 19:32:27 +00:00
|
|
|
AuGetElements (sink->audio, sink->flow, &clocked, &num_elements,
|
|
|
|
&status);
|
2004-03-07 11:24:38 +00:00
|
|
|
if (num_elements > 0) {
|
ext/nas/: Bunch of nassink clean-ups: make build by adding the right CFLAGS and LIBS to Makefile.am; rename structure...
Original commit message from CVS:
* ext/nas/Makefile.am:
* ext/nas/README:
* ext/nas/nassink.c: (gst_nas_sink_get_type),
(gst_nas_sink_base_init), (gst_nas_sink_class_init),
(gst_nas_sink_init), (gst_nas_sink_finalize),
(gst_nas_sink_getcaps), (gst_nas_sink_prepare),
(gst_nas_sink_unprepare), (gst_nas_sink_delay),
(gst_nas_sink_reset), (gst_nas_sink_write),
(gst_nas_sink_set_property), (gst_nas_sink_get_property),
(gst_nas_sink_open), (gst_nas_sink_close), (NAS_flush),
(NAS_sendData), (NAS_EventHandler), (gst_nas_sink_sink_get_format),
(NAS_createFlow), (plugin_init):
* ext/nas/nassink.h:
Bunch of nassink clean-ups: make build by adding the right CFLAGS
and LIBS to Makefile.am; rename structure, macros and functions
according to canonical naming scheme; move some things around a bit;
use GST_CAT_DEFAULT instead of GST_CAT_* everywhere; remove README
file that didn't really contain any useful information anyway (the
useful bits have been moved into the 'host' property description).
2007-03-04 20:35:26 +00:00
|
|
|
GST_DEBUG_OBJECT (sink, "GetElements status: %i", status);
|
2004-03-07 11:24:38 +00:00
|
|
|
if (oldelems)
|
2004-03-15 19:32:27 +00:00
|
|
|
AuFreeElements (sink->audio, num_elements, oldelems);
|
ext/nas/: Bunch of nassink clean-ups: make build by adding the right CFLAGS and LIBS to Makefile.am; rename structure...
Original commit message from CVS:
* ext/nas/Makefile.am:
* ext/nas/README:
* ext/nas/nassink.c: (gst_nas_sink_get_type),
(gst_nas_sink_base_init), (gst_nas_sink_class_init),
(gst_nas_sink_init), (gst_nas_sink_finalize),
(gst_nas_sink_getcaps), (gst_nas_sink_prepare),
(gst_nas_sink_unprepare), (gst_nas_sink_delay),
(gst_nas_sink_reset), (gst_nas_sink_write),
(gst_nas_sink_set_property), (gst_nas_sink_get_property),
(gst_nas_sink_open), (gst_nas_sink_close), (NAS_flush),
(NAS_sendData), (NAS_EventHandler), (gst_nas_sink_sink_get_format),
(NAS_createFlow), (plugin_init):
* ext/nas/nassink.h:
Bunch of nassink clean-ups: make build by adding the right CFLAGS
and LIBS to Makefile.am; rename structure, macros and functions
according to canonical naming scheme; move some things around a bit;
use GST_CAT_DEFAULT instead of GST_CAT_* everywhere; remove README
file that didn't really contain any useful information anyway (the
useful bits have been moved into the 'host' property description).
2007-03-04 20:35:26 +00:00
|
|
|
gst_nas_sink_close (GST_AUDIO_SINK (sink));
|
|
|
|
gst_nas_sink_open (GST_AUDIO_SINK (sink));
|
2004-03-14 22:34:33 +00:00
|
|
|
sink->flow = AuGetScratchFlow (sink->audio, NULL);
|
2004-03-07 11:24:38 +00:00
|
|
|
if (sink->flow == 0) {
|
ext/nas/: Bunch of nassink clean-ups: make build by adding the right CFLAGS and LIBS to Makefile.am; rename structure...
Original commit message from CVS:
* ext/nas/Makefile.am:
* ext/nas/README:
* ext/nas/nassink.c: (gst_nas_sink_get_type),
(gst_nas_sink_base_init), (gst_nas_sink_class_init),
(gst_nas_sink_init), (gst_nas_sink_finalize),
(gst_nas_sink_getcaps), (gst_nas_sink_prepare),
(gst_nas_sink_unprepare), (gst_nas_sink_delay),
(gst_nas_sink_reset), (gst_nas_sink_write),
(gst_nas_sink_set_property), (gst_nas_sink_get_property),
(gst_nas_sink_open), (gst_nas_sink_close), (NAS_flush),
(NAS_sendData), (NAS_EventHandler), (gst_nas_sink_sink_get_format),
(NAS_createFlow), (plugin_init):
* ext/nas/nassink.h:
Bunch of nassink clean-ups: make build by adding the right CFLAGS
and LIBS to Makefile.am; rename structure, macros and functions
according to canonical naming scheme; move some things around a bit;
use GST_CAT_DEFAULT instead of GST_CAT_* everywhere; remove README
file that didn't really contain any useful information anyway (the
useful bits have been moved into the 'host' property description).
2007-03-04 20:35:26 +00:00
|
|
|
GST_DEBUG_OBJECT (sink, "couldn't get flow");
|
2007-03-02 19:43:48 +00:00
|
|
|
return FALSE;
|
2004-03-07 11:24:38 +00:00
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
2004-03-08 22:24:47 +00:00
|
|
|
/* free old Elements and reconnet to server, needed to change samplerate */
|
|
|
|
{
|
|
|
|
AuBool clocked;
|
|
|
|
int num_elements;
|
|
|
|
AuStatus status;
|
|
|
|
AuElement *oldelems;
|
2004-03-14 22:34:33 +00:00
|
|
|
|
|
|
|
oldelems =
|
2004-03-15 19:32:27 +00:00
|
|
|
AuGetElements (sink->audio, sink->flow, &clocked, &num_elements,
|
|
|
|
&status);
|
2004-03-08 22:24:47 +00:00
|
|
|
if (num_elements > 0) {
|
ext/nas/: Bunch of nassink clean-ups: make build by adding the right CFLAGS and LIBS to Makefile.am; rename structure...
Original commit message from CVS:
* ext/nas/Makefile.am:
* ext/nas/README:
* ext/nas/nassink.c: (gst_nas_sink_get_type),
(gst_nas_sink_base_init), (gst_nas_sink_class_init),
(gst_nas_sink_init), (gst_nas_sink_finalize),
(gst_nas_sink_getcaps), (gst_nas_sink_prepare),
(gst_nas_sink_unprepare), (gst_nas_sink_delay),
(gst_nas_sink_reset), (gst_nas_sink_write),
(gst_nas_sink_set_property), (gst_nas_sink_get_property),
(gst_nas_sink_open), (gst_nas_sink_close), (NAS_flush),
(NAS_sendData), (NAS_EventHandler), (gst_nas_sink_sink_get_format),
(NAS_createFlow), (plugin_init):
* ext/nas/nassink.h:
Bunch of nassink clean-ups: make build by adding the right CFLAGS
and LIBS to Makefile.am; rename structure, macros and functions
according to canonical naming scheme; move some things around a bit;
use GST_CAT_DEFAULT instead of GST_CAT_* everywhere; remove README
file that didn't really contain any useful information anyway (the
useful bits have been moved into the 'host' property description).
2007-03-04 20:35:26 +00:00
|
|
|
GST_DEBUG_OBJECT (sink, "GetElements status: %i", status);
|
2004-03-08 22:24:47 +00:00
|
|
|
if (oldelems)
|
2004-03-15 19:32:27 +00:00
|
|
|
AuFreeElements (sink->audio, num_elements, oldelems);
|
ext/nas/: Bunch of nassink clean-ups: make build by adding the right CFLAGS and LIBS to Makefile.am; rename structure...
Original commit message from CVS:
* ext/nas/Makefile.am:
* ext/nas/README:
* ext/nas/nassink.c: (gst_nas_sink_get_type),
(gst_nas_sink_base_init), (gst_nas_sink_class_init),
(gst_nas_sink_init), (gst_nas_sink_finalize),
(gst_nas_sink_getcaps), (gst_nas_sink_prepare),
(gst_nas_sink_unprepare), (gst_nas_sink_delay),
(gst_nas_sink_reset), (gst_nas_sink_write),
(gst_nas_sink_set_property), (gst_nas_sink_get_property),
(gst_nas_sink_open), (gst_nas_sink_close), (NAS_flush),
(NAS_sendData), (NAS_EventHandler), (gst_nas_sink_sink_get_format),
(NAS_createFlow), (plugin_init):
* ext/nas/nassink.h:
Bunch of nassink clean-ups: make build by adding the right CFLAGS
and LIBS to Makefile.am; rename structure, macros and functions
according to canonical naming scheme; move some things around a bit;
use GST_CAT_DEFAULT instead of GST_CAT_* everywhere; remove README
file that didn't really contain any useful information anyway (the
useful bits have been moved into the 'host' property description).
2007-03-04 20:35:26 +00:00
|
|
|
gst_nas_sink_close (GST_AUDIO_SINK (sink));
|
|
|
|
gst_nas_sink_open (GST_AUDIO_SINK (sink));
|
2004-03-14 22:34:33 +00:00
|
|
|
sink->flow = AuGetScratchFlow (sink->audio, NULL);
|
2004-03-08 22:24:47 +00:00
|
|
|
if (sink->flow == 0) {
|
ext/nas/: Bunch of nassink clean-ups: make build by adding the right CFLAGS and LIBS to Makefile.am; rename structure...
Original commit message from CVS:
* ext/nas/Makefile.am:
* ext/nas/README:
* ext/nas/nassink.c: (gst_nas_sink_get_type),
(gst_nas_sink_base_init), (gst_nas_sink_class_init),
(gst_nas_sink_init), (gst_nas_sink_finalize),
(gst_nas_sink_getcaps), (gst_nas_sink_prepare),
(gst_nas_sink_unprepare), (gst_nas_sink_delay),
(gst_nas_sink_reset), (gst_nas_sink_write),
(gst_nas_sink_set_property), (gst_nas_sink_get_property),
(gst_nas_sink_open), (gst_nas_sink_close), (NAS_flush),
(NAS_sendData), (NAS_EventHandler), (gst_nas_sink_sink_get_format),
(NAS_createFlow), (plugin_init):
* ext/nas/nassink.h:
Bunch of nassink clean-ups: make build by adding the right CFLAGS
and LIBS to Makefile.am; rename structure, macros and functions
according to canonical naming scheme; move some things around a bit;
use GST_CAT_DEFAULT instead of GST_CAT_* everywhere; remove README
file that didn't really contain any useful information anyway (the
useful bits have been moved into the 'host' property description).
2007-03-04 20:35:26 +00:00
|
|
|
GST_DEBUG_OBJECT (sink, "couldn't get flow");
|
2007-03-02 19:43:48 +00:00
|
|
|
return FALSE;
|
2004-03-08 22:24:47 +00:00
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
2007-03-02 19:43:48 +00:00
|
|
|
buf_samples = spec->rate * NAS_SOUND_PORT_DURATION;
|
|
|
|
/*
|
|
|
|
spec->segsize = gst_util_uint64_scale (buf_samples * spec->bytes_per_sample,
|
|
|
|
spec->latency_time, GST_SECOND / GST_USECOND);
|
|
|
|
spec->segsize -= spec->segsize % spec->bytes_per_sample;
|
|
|
|
spec->segtotal = spec->buffer_time / spec->latency_time;
|
|
|
|
*/
|
|
|
|
spec->segsize = buf_samples * spec->bytes_per_sample;
|
|
|
|
spec->segtotal = 1;
|
|
|
|
|
ext/nas/: Bunch of nassink clean-ups: make build by adding the right CFLAGS and LIBS to Makefile.am; rename structure...
Original commit message from CVS:
* ext/nas/Makefile.am:
* ext/nas/README:
* ext/nas/nassink.c: (gst_nas_sink_get_type),
(gst_nas_sink_base_init), (gst_nas_sink_class_init),
(gst_nas_sink_init), (gst_nas_sink_finalize),
(gst_nas_sink_getcaps), (gst_nas_sink_prepare),
(gst_nas_sink_unprepare), (gst_nas_sink_delay),
(gst_nas_sink_reset), (gst_nas_sink_write),
(gst_nas_sink_set_property), (gst_nas_sink_get_property),
(gst_nas_sink_open), (gst_nas_sink_close), (NAS_flush),
(NAS_sendData), (NAS_EventHandler), (gst_nas_sink_sink_get_format),
(NAS_createFlow), (plugin_init):
* ext/nas/nassink.h:
Bunch of nassink clean-ups: make build by adding the right CFLAGS
and LIBS to Makefile.am; rename structure, macros and functions
according to canonical naming scheme; move some things around a bit;
use GST_CAT_DEFAULT instead of GST_CAT_* everywhere; remove README
file that didn't really contain any useful information anyway (the
useful bits have been moved into the 'host' property description).
2007-03-04 20:35:26 +00:00
|
|
|
GST_DEBUG_OBJECT (sink, "Rate %d Format %d tracks %d bufs %d %d/%d w %d",
|
2007-03-02 19:43:48 +00:00
|
|
|
spec->rate, format, spec->channels, buf_samples, spec->segsize,
|
|
|
|
spec->segtotal, spec->width);
|
2004-03-15 19:32:27 +00:00
|
|
|
AuMakeElementImportClient (&elements[0], /* element */
|
2007-03-02 19:43:48 +00:00
|
|
|
spec->rate, /* rate */
|
2004-03-15 19:32:27 +00:00
|
|
|
format, /* format */
|
2007-03-02 19:43:48 +00:00
|
|
|
spec->channels, /* number of tracks */
|
2004-03-15 19:32:27 +00:00
|
|
|
AuTrue, /* discart */
|
|
|
|
buf_samples, /* max samples */
|
2004-03-14 22:34:33 +00:00
|
|
|
(AuUint32) (buf_samples / 100 * AuSoundPortLowWaterMark),
|
|
|
|
/* low water mark */
|
2004-03-15 19:32:27 +00:00
|
|
|
0, /* num actions */
|
2004-03-14 22:34:33 +00:00
|
|
|
NULL);
|
|
|
|
|
2007-03-02 19:43:48 +00:00
|
|
|
sink->device = NAS_getDevice (sink->audio, spec->channels);
|
|
|
|
if (sink->device == AuNone) {
|
ext/nas/: Bunch of nassink clean-ups: make build by adding the right CFLAGS and LIBS to Makefile.am; rename structure...
Original commit message from CVS:
* ext/nas/Makefile.am:
* ext/nas/README:
* ext/nas/nassink.c: (gst_nas_sink_get_type),
(gst_nas_sink_base_init), (gst_nas_sink_class_init),
(gst_nas_sink_init), (gst_nas_sink_finalize),
(gst_nas_sink_getcaps), (gst_nas_sink_prepare),
(gst_nas_sink_unprepare), (gst_nas_sink_delay),
(gst_nas_sink_reset), (gst_nas_sink_write),
(gst_nas_sink_set_property), (gst_nas_sink_get_property),
(gst_nas_sink_open), (gst_nas_sink_close), (NAS_flush),
(NAS_sendData), (NAS_EventHandler), (gst_nas_sink_sink_get_format),
(NAS_createFlow), (plugin_init):
* ext/nas/nassink.h:
Bunch of nassink clean-ups: make build by adding the right CFLAGS
and LIBS to Makefile.am; rename structure, macros and functions
according to canonical naming scheme; move some things around a bit;
use GST_CAT_DEFAULT instead of GST_CAT_* everywhere; remove README
file that didn't really contain any useful information anyway (the
useful bits have been moved into the 'host' property description).
2007-03-04 20:35:26 +00:00
|
|
|
GST_DEBUG_OBJECT (sink, "no device with %i tracks found", spec->channels);
|
2007-03-02 19:43:48 +00:00
|
|
|
return FALSE;
|
|
|
|
}
|
|
|
|
|
2004-03-15 19:32:27 +00:00
|
|
|
AuMakeElementExportDevice (&elements[1], /* element */
|
|
|
|
0, /* input */
|
|
|
|
sink->device, /* device */
|
2007-03-02 19:43:48 +00:00
|
|
|
spec->rate, /* rate */
|
2004-03-15 19:32:27 +00:00
|
|
|
AuUnlimitedSamples, /* num samples */
|
|
|
|
0, /* num actions */
|
|
|
|
NULL); /* actions */
|
|
|
|
|
|
|
|
AuSetElements (sink->audio, /* server */
|
|
|
|
sink->flow, /* flow ID */
|
|
|
|
AuTrue, /* clocked */
|
|
|
|
2, /* num elements */
|
|
|
|
elements, /* elements */
|
2004-03-14 22:34:33 +00:00
|
|
|
NULL);
|
|
|
|
|
2004-03-15 19:32:27 +00:00
|
|
|
AuRegisterEventHandler (sink->audio, /* server */
|
|
|
|
AuEventHandlerIDMask, /* value mask */
|
|
|
|
0, /* type */
|
|
|
|
sink->flow, /* flow ID */
|
|
|
|
NAS_EventHandler, /* callback */
|
|
|
|
(AuPointer) sink); /* data */
|
2004-03-14 22:34:33 +00:00
|
|
|
|
|
|
|
AuStartFlow (sink->audio, sink->flow, NULL);
|
2004-01-21 06:57:30 +00:00
|
|
|
|
2007-03-02 19:43:48 +00:00
|
|
|
return TRUE;
|
2004-01-21 06:57:30 +00:00
|
|
|
}
|
ext/nas/: Bunch of nassink clean-ups: make build by adding the right CFLAGS and LIBS to Makefile.am; rename structure...
Original commit message from CVS:
* ext/nas/Makefile.am:
* ext/nas/README:
* ext/nas/nassink.c: (gst_nas_sink_get_type),
(gst_nas_sink_base_init), (gst_nas_sink_class_init),
(gst_nas_sink_init), (gst_nas_sink_finalize),
(gst_nas_sink_getcaps), (gst_nas_sink_prepare),
(gst_nas_sink_unprepare), (gst_nas_sink_delay),
(gst_nas_sink_reset), (gst_nas_sink_write),
(gst_nas_sink_set_property), (gst_nas_sink_get_property),
(gst_nas_sink_open), (gst_nas_sink_close), (NAS_flush),
(NAS_sendData), (NAS_EventHandler), (gst_nas_sink_sink_get_format),
(NAS_createFlow), (plugin_init):
* ext/nas/nassink.h:
Bunch of nassink clean-ups: make build by adding the right CFLAGS
and LIBS to Makefile.am; rename structure, macros and functions
according to canonical naming scheme; move some things around a bit;
use GST_CAT_DEFAULT instead of GST_CAT_* everywhere; remove README
file that didn't really contain any useful information anyway (the
useful bits have been moved into the 'host' property description).
2007-03-04 20:35:26 +00:00
|
|
|
|
|
|
|
static gboolean
|
|
|
|
plugin_init (GstPlugin * plugin)
|
|
|
|
{
|
|
|
|
GST_DEBUG_CATEGORY_INIT (nas_debug, "NAS", 0, NULL);
|
|
|
|
|
|
|
|
if (!gst_element_register (plugin, "nassink", GST_RANK_NONE,
|
|
|
|
GST_TYPE_NAS_SINK)) {
|
|
|
|
return FALSE;
|
|
|
|
}
|
|
|
|
|
|
|
|
return TRUE;
|
|
|
|
}
|
|
|
|
|
|
|
|
GST_PLUGIN_DEFINE (GST_VERSION_MAJOR,
|
|
|
|
GST_VERSION_MINOR,
|
|
|
|
"nas",
|
|
|
|
"NAS (Network Audio System) support for GStreamer",
|
|
|
|
plugin_init, VERSION, GST_LICENSE, GST_PACKAGE_NAME, GST_PACKAGE_ORIGIN);
|