mirror of
https://gitlab.freedesktop.org/gstreamer/gstreamer.git
synced 2024-12-26 10:10:32 +00:00
remove old ones
Original commit message from CVS: remove old ones
This commit is contained in:
parent
5014a9eee6
commit
eeb7984bfd
32 changed files with 0 additions and 3585 deletions
2
gst-libs/gst/mixer/.gitignore
vendored
2
gst-libs/gst/mixer/.gitignore
vendored
|
@ -1,2 +0,0 @@
|
||||||
mixer-enumtypes.[ch]
|
|
||||||
mixer-marshal.[ch]
|
|
|
@ -1,49 +0,0 @@
|
||||||
# variables used for enum/marshal generation
|
|
||||||
glib_enum_headers=$(mixer_headers)
|
|
||||||
glib_enum_define=GST_MIXER
|
|
||||||
glib_enum_prefix=gst_mixer
|
|
||||||
|
|
||||||
|
|
||||||
libgstmixerincludedir = \
|
|
||||||
$(includedir)/gstreamer-@GST_MAJORMINOR@/gst/mixer
|
|
||||||
|
|
||||||
mixer_headers = \
|
|
||||||
mixer.h \
|
|
||||||
mixeroptions.h \
|
|
||||||
mixertrack.h
|
|
||||||
|
|
||||||
built_sources = \
|
|
||||||
mixer-marshal.c \
|
|
||||||
mixer-enumtypes.c
|
|
||||||
|
|
||||||
built_headers = \
|
|
||||||
mixer-marshal.h \
|
|
||||||
mixer-enumtypes.h
|
|
||||||
|
|
||||||
libgstmixerinclude_HEADERS = \
|
|
||||||
$(mixer_headers)
|
|
||||||
|
|
||||||
nodist_libgstmixerinclude_HEADERS = \
|
|
||||||
mixer-enumtypes.h
|
|
||||||
|
|
||||||
noinst_LTLIBRARIES = libgstmixer.la
|
|
||||||
|
|
||||||
libgstmixer_la_SOURCES = \
|
|
||||||
mixer.c \
|
|
||||||
mixeroptions.c \
|
|
||||||
mixertrack.c
|
|
||||||
|
|
||||||
nodist_libgstmixer_la_SOURCES = \
|
|
||||||
$(built_sources)
|
|
||||||
|
|
||||||
libgstmixer_la_CFLAGS = $(GST_CFLAGS)
|
|
||||||
|
|
||||||
BUILT_SOURCES = \
|
|
||||||
$(built_sources) \
|
|
||||||
$(built_headers)
|
|
||||||
|
|
||||||
EXTRA_DIST = mixer-marshal.list
|
|
||||||
|
|
||||||
CLEANFILES = $(BUILT_SOURCES)
|
|
||||||
|
|
||||||
include $(top_srcdir)/common/glib-gen.mak
|
|
|
@ -1,3 +0,0 @@
|
||||||
VOID:OBJECT,BOOLEAN
|
|
||||||
VOID:OBJECT,POINTER
|
|
||||||
VOID:OBJECT,STRING
|
|
|
@ -1,317 +0,0 @@
|
||||||
/* GStreamer Mixer
|
|
||||||
* Copyright (C) 2003 Ronald Bultje <rbultje@ronald.bitfreak.net>
|
|
||||||
*
|
|
||||||
* mixer.c: mixer design virtual class function wrappers
|
|
||||||
*
|
|
||||||
* 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
|
|
||||||
|
|
||||||
#include "mixer.h"
|
|
||||||
#include "mixer-marshal.h"
|
|
||||||
|
|
||||||
enum
|
|
||||||
{
|
|
||||||
SIGNAL_MUTE_TOGGLED,
|
|
||||||
SIGNAL_RECORD_TOGGLED,
|
|
||||||
SIGNAL_VOLUME_CHANGED,
|
|
||||||
SIGNAL_OPTION_CHANGED,
|
|
||||||
LAST_SIGNAL
|
|
||||||
};
|
|
||||||
|
|
||||||
static void gst_mixer_class_init (GstMixerClass * klass);
|
|
||||||
|
|
||||||
static guint gst_mixer_signals[LAST_SIGNAL] = { 0 };
|
|
||||||
|
|
||||||
GType
|
|
||||||
gst_mixer_get_type (void)
|
|
||||||
{
|
|
||||||
static GType gst_mixer_type = 0;
|
|
||||||
|
|
||||||
if (!gst_mixer_type) {
|
|
||||||
static const GTypeInfo gst_mixer_info = {
|
|
||||||
sizeof (GstMixerClass),
|
|
||||||
(GBaseInitFunc) gst_mixer_class_init,
|
|
||||||
NULL,
|
|
||||||
NULL,
|
|
||||||
NULL,
|
|
||||||
NULL,
|
|
||||||
0,
|
|
||||||
0,
|
|
||||||
NULL,
|
|
||||||
};
|
|
||||||
|
|
||||||
gst_mixer_type = g_type_register_static (G_TYPE_INTERFACE,
|
|
||||||
"GstMixer", &gst_mixer_info, 0);
|
|
||||||
g_type_interface_add_prerequisite (gst_mixer_type,
|
|
||||||
GST_TYPE_IMPLEMENTS_INTERFACE);
|
|
||||||
}
|
|
||||||
|
|
||||||
return gst_mixer_type;
|
|
||||||
}
|
|
||||||
|
|
||||||
static void
|
|
||||||
gst_mixer_class_init (GstMixerClass * klass)
|
|
||||||
{
|
|
||||||
static gboolean initialized = FALSE;
|
|
||||||
|
|
||||||
if (!initialized) {
|
|
||||||
gst_mixer_signals[SIGNAL_RECORD_TOGGLED] =
|
|
||||||
g_signal_new ("record-toggled",
|
|
||||||
GST_TYPE_MIXER, G_SIGNAL_RUN_LAST,
|
|
||||||
G_STRUCT_OFFSET (GstMixerClass, record_toggled),
|
|
||||||
NULL, NULL,
|
|
||||||
gst_mixer_marshal_VOID__OBJECT_BOOLEAN, G_TYPE_NONE, 2,
|
|
||||||
GST_TYPE_MIXER_TRACK, G_TYPE_BOOLEAN);
|
|
||||||
gst_mixer_signals[SIGNAL_MUTE_TOGGLED] =
|
|
||||||
g_signal_new ("mute-toggled",
|
|
||||||
GST_TYPE_MIXER, G_SIGNAL_RUN_LAST,
|
|
||||||
G_STRUCT_OFFSET (GstMixerClass, mute_toggled),
|
|
||||||
NULL, NULL,
|
|
||||||
gst_mixer_marshal_VOID__OBJECT_BOOLEAN, G_TYPE_NONE, 2,
|
|
||||||
GST_TYPE_MIXER_TRACK, G_TYPE_BOOLEAN);
|
|
||||||
gst_mixer_signals[SIGNAL_VOLUME_CHANGED] =
|
|
||||||
g_signal_new ("volume-changed",
|
|
||||||
GST_TYPE_MIXER, G_SIGNAL_RUN_LAST,
|
|
||||||
G_STRUCT_OFFSET (GstMixerClass, volume_changed),
|
|
||||||
NULL, NULL,
|
|
||||||
gst_mixer_marshal_VOID__OBJECT_POINTER, G_TYPE_NONE, 2,
|
|
||||||
GST_TYPE_MIXER_TRACK, G_TYPE_POINTER);
|
|
||||||
gst_mixer_signals[SIGNAL_OPTION_CHANGED] =
|
|
||||||
g_signal_new ("option-changed",
|
|
||||||
GST_TYPE_MIXER, G_SIGNAL_RUN_LAST,
|
|
||||||
G_STRUCT_OFFSET (GstMixerClass, option_changed),
|
|
||||||
NULL, NULL,
|
|
||||||
gst_mixer_marshal_VOID__OBJECT_STRING, G_TYPE_NONE, 2,
|
|
||||||
GST_TYPE_MIXER_OPTIONS, G_TYPE_STRING);
|
|
||||||
|
|
||||||
initialized = TRUE;
|
|
||||||
}
|
|
||||||
|
|
||||||
klass->mixer_type = GST_MIXER_SOFTWARE;
|
|
||||||
|
|
||||||
/* default virtual functions */
|
|
||||||
klass->list_tracks = NULL;
|
|
||||||
klass->set_volume = NULL;
|
|
||||||
klass->get_volume = NULL;
|
|
||||||
klass->set_mute = NULL;
|
|
||||||
klass->set_record = NULL;
|
|
||||||
klass->set_option = NULL;
|
|
||||||
klass->get_option = NULL;
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
|
||||||
* gst_mixer_list_tracks:
|
|
||||||
* @mixer: the #GstMixer (a #GstElement) to get the tracks from.
|
|
||||||
*
|
|
||||||
* Returns a list of available tracks for this mixer/element. Note
|
|
||||||
* that it is allowed for sink (output) elements to only provide
|
|
||||||
* the output tracks in this list. Likewise, for sources (inputs),
|
|
||||||
* it is allowed to only provide input elements in this list.
|
|
||||||
*
|
|
||||||
* Returns: A #GList consisting of zero or more #GstMixerTracks.
|
|
||||||
*/
|
|
||||||
|
|
||||||
const GList *
|
|
||||||
gst_mixer_list_tracks (GstMixer * mixer)
|
|
||||||
{
|
|
||||||
GstMixerClass *klass = GST_MIXER_GET_CLASS (mixer);
|
|
||||||
|
|
||||||
if (klass->list_tracks) {
|
|
||||||
return klass->list_tracks (mixer);
|
|
||||||
}
|
|
||||||
|
|
||||||
return NULL;
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
|
||||||
* gst_mixer_set_volume:
|
|
||||||
* @mixer: The #GstMixer (a #GstElement) that owns the track.
|
|
||||||
* @track: The #GstMixerTrack to set the volume on.
|
|
||||||
* @volumes: an array of integers (of size track->num_channels)
|
|
||||||
* that gives the wanted volume for each channel in
|
|
||||||
* this track.
|
|
||||||
*
|
|
||||||
* Sets the volume on each channel in a track. Short note about
|
|
||||||
* naming: a track is defined as one separate stream owned by
|
|
||||||
* the mixer/element, such as 'Line-in' or 'Microphone'. A
|
|
||||||
* channel is said to be a mono-stream inside this track. A
|
|
||||||
* stereo track thus contains two channels.
|
|
||||||
*/
|
|
||||||
|
|
||||||
void
|
|
||||||
gst_mixer_set_volume (GstMixer * mixer, GstMixerTrack * track, gint * volumes)
|
|
||||||
{
|
|
||||||
GstMixerClass *klass = GST_MIXER_GET_CLASS (mixer);
|
|
||||||
|
|
||||||
if (klass->set_volume) {
|
|
||||||
klass->set_volume (mixer, track, volumes);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
/*
|
|
||||||
* gst_mixer_get_volume:
|
|
||||||
* @mixer: the #GstMixer (a #GstElement) that owns the track
|
|
||||||
* @track: the GstMixerTrack to get the volume from.
|
|
||||||
* @volumes: a pre-allocated array of integers (of size
|
|
||||||
* track->num_channels) to store the current volume
|
|
||||||
* of each channel in the given track in.
|
|
||||||
*
|
|
||||||
* Get the current volume(s) on the given track.
|
|
||||||
*/
|
|
||||||
|
|
||||||
void
|
|
||||||
gst_mixer_get_volume (GstMixer * mixer, GstMixerTrack * track, gint * volumes)
|
|
||||||
{
|
|
||||||
GstMixerClass *klass = GST_MIXER_GET_CLASS (mixer);
|
|
||||||
|
|
||||||
if (klass->get_volume) {
|
|
||||||
klass->get_volume (mixer, track, volumes);
|
|
||||||
} else {
|
|
||||||
gint i;
|
|
||||||
|
|
||||||
for (i = 0; i < track->num_channels; i++) {
|
|
||||||
volumes[i] = 0;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
|
||||||
* gst_mixer_set_mute:
|
|
||||||
* @mixer: the #GstMixer (a #GstElement) that owns the track.
|
|
||||||
* @track: the #GstMixerTrack to operate on.
|
|
||||||
* @mute: a boolean value indicating whether to turn on or off
|
|
||||||
* muting.
|
|
||||||
*
|
|
||||||
* Mutes or unmutes the given channel. To find out whether a
|
|
||||||
* track is currently muted, use GST_MIXER_TRACK_HAS_FLAG ().
|
|
||||||
*/
|
|
||||||
|
|
||||||
void
|
|
||||||
gst_mixer_set_mute (GstMixer * mixer, GstMixerTrack * track, gboolean mute)
|
|
||||||
{
|
|
||||||
GstMixerClass *klass = GST_MIXER_GET_CLASS (mixer);
|
|
||||||
|
|
||||||
if (klass->set_mute) {
|
|
||||||
klass->set_mute (mixer, track, mute);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
|
||||||
* gst_mixer_set_record:
|
|
||||||
* @mixer: The #GstMixer (a #GstElement) that owns the track.
|
|
||||||
* @track: the #GstMixerTrack to operate on.
|
|
||||||
* @record: a boolean value that indicates whether to turn on
|
|
||||||
* or off recording.
|
|
||||||
*
|
|
||||||
* Enables or disables recording on the given track. Note that
|
|
||||||
* this is only possible on input tracks, not on output tracks
|
|
||||||
* (see GST_MIXER_TRACK_HAS_FLAG () and the GST_MIXER_TRACK_INPUT
|
|
||||||
* flag).
|
|
||||||
*/
|
|
||||||
|
|
||||||
void
|
|
||||||
gst_mixer_set_record (GstMixer * mixer, GstMixerTrack * track, gboolean record)
|
|
||||||
{
|
|
||||||
GstMixerClass *klass = GST_MIXER_GET_CLASS (mixer);
|
|
||||||
|
|
||||||
if (klass->set_record) {
|
|
||||||
klass->set_record (mixer, track, record);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
|
||||||
* gst_mixer_set_option:
|
|
||||||
* @mixer: The #GstMixer (a #GstElement) that owns the optionlist.
|
|
||||||
* @opts: The #GstMixerOptions that we operate on.
|
|
||||||
* @value: The requested new option value.
|
|
||||||
*
|
|
||||||
* Sets a name/value option in the mixer to the requested value.
|
|
||||||
*/
|
|
||||||
|
|
||||||
void
|
|
||||||
gst_mixer_set_option (GstMixer * mixer, GstMixerOptions * opts, gchar * value)
|
|
||||||
{
|
|
||||||
GstMixerClass *klass = GST_MIXER_GET_CLASS (mixer);
|
|
||||||
|
|
||||||
if (klass->set_option) {
|
|
||||||
klass->set_option (mixer, opts, value);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
|
||||||
* gst_mixer_get_option:
|
|
||||||
* @mixer: The #GstMixer (a #GstElement) that owns the optionlist.
|
|
||||||
* @opts: The #GstMixerOptions that we operate on.
|
|
||||||
*
|
|
||||||
* Get the current value of a name/value option in the mixer.
|
|
||||||
*
|
|
||||||
* Returns: current value of the name/value option.
|
|
||||||
*/
|
|
||||||
|
|
||||||
const gchar *
|
|
||||||
gst_mixer_get_option (GstMixer * mixer, GstMixerOptions * opts)
|
|
||||||
{
|
|
||||||
GstMixerClass *klass = GST_MIXER_GET_CLASS (mixer);
|
|
||||||
|
|
||||||
if (klass->get_option) {
|
|
||||||
return klass->get_option (mixer, opts);
|
|
||||||
}
|
|
||||||
|
|
||||||
return NULL;
|
|
||||||
}
|
|
||||||
|
|
||||||
void
|
|
||||||
gst_mixer_mute_toggled (GstMixer * mixer, GstMixerTrack * track, gboolean mute)
|
|
||||||
{
|
|
||||||
g_signal_emit (G_OBJECT (mixer),
|
|
||||||
gst_mixer_signals[SIGNAL_MUTE_TOGGLED], 0, track, mute);
|
|
||||||
|
|
||||||
g_signal_emit_by_name (G_OBJECT (track), "mute_toggled", mute);
|
|
||||||
}
|
|
||||||
|
|
||||||
void
|
|
||||||
gst_mixer_record_toggled (GstMixer * mixer,
|
|
||||||
GstMixerTrack * track, gboolean record)
|
|
||||||
{
|
|
||||||
g_signal_emit (G_OBJECT (mixer),
|
|
||||||
gst_mixer_signals[SIGNAL_RECORD_TOGGLED], 0, track, record);
|
|
||||||
|
|
||||||
g_signal_emit_by_name (G_OBJECT (track), "record_toggled", record);
|
|
||||||
}
|
|
||||||
|
|
||||||
void
|
|
||||||
gst_mixer_volume_changed (GstMixer * mixer,
|
|
||||||
GstMixerTrack * track, gint * volumes)
|
|
||||||
{
|
|
||||||
g_signal_emit (G_OBJECT (mixer),
|
|
||||||
gst_mixer_signals[SIGNAL_VOLUME_CHANGED], 0, track, volumes);
|
|
||||||
|
|
||||||
g_signal_emit_by_name (G_OBJECT (track), "volume_changed", volumes);
|
|
||||||
}
|
|
||||||
|
|
||||||
void
|
|
||||||
gst_mixer_option_changed (GstMixer * mixer,
|
|
||||||
GstMixerOptions * opts, gchar * value)
|
|
||||||
{
|
|
||||||
g_signal_emit (G_OBJECT (mixer),
|
|
||||||
gst_mixer_signals[SIGNAL_OPTION_CHANGED], 0, opts, value);
|
|
||||||
|
|
||||||
g_signal_emit_by_name (G_OBJECT (opts), "value_changed", value);
|
|
||||||
}
|
|
|
@ -1,141 +0,0 @@
|
||||||
/* GStreamer Mixer
|
|
||||||
* Copyright (C) 2003 Ronald Bultje <rbultje@ronald.bitfreak.net>
|
|
||||||
*
|
|
||||||
* mixer.h: mixer interface design
|
|
||||||
*
|
|
||||||
* 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.
|
|
||||||
*/
|
|
||||||
|
|
||||||
#ifndef __GST_MIXER_H__
|
|
||||||
#define __GST_MIXER_H__
|
|
||||||
|
|
||||||
#include <gst/gst.h>
|
|
||||||
#include <gst/mixer/mixeroptions.h>
|
|
||||||
#include <gst/mixer/mixertrack.h>
|
|
||||||
#include <gst/mixer/mixer-enumtypes.h>
|
|
||||||
|
|
||||||
G_BEGIN_DECLS
|
|
||||||
|
|
||||||
#define GST_TYPE_MIXER \
|
|
||||||
(gst_mixer_get_type ())
|
|
||||||
#define GST_MIXER(obj) \
|
|
||||||
(GST_IMPLEMENTS_INTERFACE_CHECK_INSTANCE_CAST ((obj), GST_TYPE_MIXER, GstMixer))
|
|
||||||
#define GST_MIXER_CLASS(klass) \
|
|
||||||
(G_TYPE_CHECK_CLASS_CAST ((klass), GST_TYPE_MIXER, GstMixerClass))
|
|
||||||
#define GST_IS_MIXER(obj) \
|
|
||||||
(GST_IMPLEMENTS_INTERFACE_CHECK_INSTANCE_TYPE ((obj), GST_TYPE_MIXER))
|
|
||||||
#define GST_IS_MIXER_CLASS(klass) \
|
|
||||||
(G_TYPE_CHECK_CLASS_TYPE ((klass), GST_TYPE_MIXER))
|
|
||||||
#define GST_MIXER_GET_CLASS(inst) \
|
|
||||||
(G_TYPE_INSTANCE_GET_INTERFACE ((inst), GST_TYPE_MIXER, GstMixerClass))
|
|
||||||
|
|
||||||
#define GST_MIXER_TYPE(klass) (klass->mixer_type)
|
|
||||||
|
|
||||||
typedef struct _GstMixer GstMixer;
|
|
||||||
typedef struct _GstMixerClass GstMixerClass;
|
|
||||||
|
|
||||||
typedef enum
|
|
||||||
{
|
|
||||||
GST_MIXER_HARDWARE,
|
|
||||||
GST_MIXER_SOFTWARE
|
|
||||||
} GstMixerType;
|
|
||||||
|
|
||||||
struct _GstMixerClass {
|
|
||||||
GTypeInterface klass;
|
|
||||||
|
|
||||||
GstMixerType mixer_type;
|
|
||||||
|
|
||||||
/* virtual functions */
|
|
||||||
const GList * (* list_tracks) (GstMixer *mixer);
|
|
||||||
|
|
||||||
void (* set_volume) (GstMixer *mixer,
|
|
||||||
GstMixerTrack *track,
|
|
||||||
gint *volumes);
|
|
||||||
void (* get_volume) (GstMixer *mixer,
|
|
||||||
GstMixerTrack *track,
|
|
||||||
gint *volumes);
|
|
||||||
|
|
||||||
void (* set_mute) (GstMixer *mixer,
|
|
||||||
GstMixerTrack *track,
|
|
||||||
gboolean mute);
|
|
||||||
void (* set_record) (GstMixer *mixer,
|
|
||||||
GstMixerTrack *track,
|
|
||||||
gboolean record);
|
|
||||||
|
|
||||||
/* signals */
|
|
||||||
void (* mute_toggled) (GstMixer *mixer,
|
|
||||||
GstMixerTrack *channel,
|
|
||||||
gboolean mute);
|
|
||||||
void (* record_toggled) (GstMixer *mixer,
|
|
||||||
GstMixerTrack *channel,
|
|
||||||
gboolean record);
|
|
||||||
void (* volume_changed) (GstMixer *mixer,
|
|
||||||
GstMixerTrack *channel,
|
|
||||||
gint *volumes);
|
|
||||||
|
|
||||||
/* use padding */
|
|
||||||
void (* set_option) (GstMixer *mixer,
|
|
||||||
GstMixerOptions *opts,
|
|
||||||
gchar *value);
|
|
||||||
const gchar * (* get_option) (GstMixer *mixer,
|
|
||||||
GstMixerOptions *opts);
|
|
||||||
|
|
||||||
void (* option_changed) (GstMixer *mixer,
|
|
||||||
GstMixerOptions *opts,
|
|
||||||
gchar *option);
|
|
||||||
|
|
||||||
gpointer _gst_reserved[GST_PADDING-3];
|
|
||||||
};
|
|
||||||
|
|
||||||
GType gst_mixer_get_type (void);
|
|
||||||
|
|
||||||
/* virtual class function wrappers */
|
|
||||||
const GList * gst_mixer_list_tracks (GstMixer *mixer);
|
|
||||||
void gst_mixer_set_volume (GstMixer *mixer,
|
|
||||||
GstMixerTrack *track,
|
|
||||||
gint *volumes);
|
|
||||||
void gst_mixer_get_volume (GstMixer *mixer,
|
|
||||||
GstMixerTrack *track,
|
|
||||||
gint *volumes);
|
|
||||||
void gst_mixer_set_mute (GstMixer *mixer,
|
|
||||||
GstMixerTrack *track,
|
|
||||||
gboolean mute);
|
|
||||||
void gst_mixer_set_record (GstMixer *mixer,
|
|
||||||
GstMixerTrack *track,
|
|
||||||
gboolean record);
|
|
||||||
void gst_mixer_set_option (GstMixer *mixer,
|
|
||||||
GstMixerOptions *opts,
|
|
||||||
gchar *value);
|
|
||||||
const gchar * gst_mixer_get_option (GstMixer *mixer,
|
|
||||||
GstMixerOptions *opts);
|
|
||||||
|
|
||||||
/* trigger signals */
|
|
||||||
void gst_mixer_mute_toggled (GstMixer *mixer,
|
|
||||||
GstMixerTrack *track,
|
|
||||||
gboolean mute);
|
|
||||||
void gst_mixer_record_toggled (GstMixer *mixer,
|
|
||||||
GstMixerTrack *track,
|
|
||||||
gboolean record);
|
|
||||||
void gst_mixer_volume_changed (GstMixer *mixer,
|
|
||||||
GstMixerTrack *track,
|
|
||||||
gint *volumes);
|
|
||||||
void gst_mixer_option_changed (GstMixer *mixer,
|
|
||||||
GstMixerOptions *opts,
|
|
||||||
gchar *value);
|
|
||||||
|
|
||||||
G_END_DECLS
|
|
||||||
|
|
||||||
#endif /* __GST_MIXER_H__ */
|
|
|
@ -1,156 +0,0 @@
|
||||||
<?xml version="1.0" encoding="Windows-1252"?>
|
|
||||||
<VisualStudioProject
|
|
||||||
ProjectType="Visual C++"
|
|
||||||
Version="7.10"
|
|
||||||
Name="mixer"
|
|
||||||
ProjectGUID="{979C216F-0ACF-4956-AE00-055A42D67897}"
|
|
||||||
RootNamespace="mixer"
|
|
||||||
Keyword="Win32Proj">
|
|
||||||
<Platforms>
|
|
||||||
<Platform
|
|
||||||
Name="Win32"/>
|
|
||||||
</Platforms>
|
|
||||||
<Configurations>
|
|
||||||
<Configuration
|
|
||||||
Name="Debug|Win32"
|
|
||||||
OutputDirectory="../../../win32/Debug"
|
|
||||||
IntermediateDirectory="../../../win32/Debug"
|
|
||||||
ConfigurationType="2"
|
|
||||||
CharacterSet="2">
|
|
||||||
<Tool
|
|
||||||
Name="VCCLCompilerTool"
|
|
||||||
Optimization="0"
|
|
||||||
AdditionalIncludeDirectories="../../../../gstreamer/win32;../../../../gstreamer;../../../../gstreamer/libs;../../../../glib;../../../../glib/glib;../../../../glib/gmodule;"../../../gst-libs";../../../../popt/include;../../../../libxml2/include/libxml2"
|
|
||||||
PreprocessorDefinitions="WIN32;_DEBUG;_WINDOWS;_USRDLL;HAVE_CONFIG_H;_USE_MATH_DEFINES"
|
|
||||||
MinimalRebuild="TRUE"
|
|
||||||
BasicRuntimeChecks="3"
|
|
||||||
RuntimeLibrary="3"
|
|
||||||
UsePrecompiledHeader="0"
|
|
||||||
WarningLevel="3"
|
|
||||||
Detect64BitPortabilityProblems="TRUE"
|
|
||||||
DebugInformationFormat="4"/>
|
|
||||||
<Tool
|
|
||||||
Name="VCCustomBuildTool"/>
|
|
||||||
<Tool
|
|
||||||
Name="VCLinkerTool"
|
|
||||||
AdditionalDependencies="glib-2.0.lib gmodule-2.0.lib gthread-2.0.lib gobject-2.0.lib libgstreamer.lib gstbytestream.lib iconv.lib intl.lib"
|
|
||||||
OutputFile="$(OutDir)/gstmixer.dll"
|
|
||||||
LinkIncremental="2"
|
|
||||||
AdditionalLibraryDirectories="../../../../gstreamer/win32/Debug;../../../../glib/glib;../../../../glib/gmodule;../../../../glib/gthread;../../../../glib/gobject;../../../../gettext/lib;../../../../libiconv/lib"
|
|
||||||
ModuleDefinitionFile="mixer.def"
|
|
||||||
GenerateDebugInformation="TRUE"
|
|
||||||
ProgramDatabaseFile="$(OutDir)/mixer.pdb"
|
|
||||||
SubSystem="2"
|
|
||||||
OptimizeReferences="2"
|
|
||||||
ImportLibrary="$(OutDir)/gstmixer.lib"
|
|
||||||
TargetMachine="1"/>
|
|
||||||
<Tool
|
|
||||||
Name="VCMIDLTool"/>
|
|
||||||
<Tool
|
|
||||||
Name="VCPostBuildEventTool"
|
|
||||||
CommandLine="copy /Y $(TargetPath) c:\gstreamer\plugins"/>
|
|
||||||
<Tool
|
|
||||||
Name="VCPreBuildEventTool"/>
|
|
||||||
<Tool
|
|
||||||
Name="VCPreLinkEventTool"/>
|
|
||||||
<Tool
|
|
||||||
Name="VCResourceCompilerTool"/>
|
|
||||||
<Tool
|
|
||||||
Name="VCWebServiceProxyGeneratorTool"/>
|
|
||||||
<Tool
|
|
||||||
Name="VCXMLDataGeneratorTool"/>
|
|
||||||
<Tool
|
|
||||||
Name="VCWebDeploymentTool"/>
|
|
||||||
<Tool
|
|
||||||
Name="VCManagedWrapperGeneratorTool"/>
|
|
||||||
<Tool
|
|
||||||
Name="VCAuxiliaryManagedWrapperGeneratorTool"/>
|
|
||||||
</Configuration>
|
|
||||||
<Configuration
|
|
||||||
Name="Release|Win32"
|
|
||||||
OutputDirectory="../../../win32/Release"
|
|
||||||
IntermediateDirectory="../../../win32/Release"
|
|
||||||
ConfigurationType="2"
|
|
||||||
CharacterSet="2">
|
|
||||||
<Tool
|
|
||||||
Name="VCCLCompilerTool"
|
|
||||||
AdditionalIncludeDirectories="../../../../gstreamer/win32;../../../../gstreamer;../../../../gstreamer/libs;../../../../glib;../../../../glib/glib;../../../../glib/gmodule;"../../../gst-libs";../../../../popt/include;../../../../libxml2/include/libxml2"
|
|
||||||
PreprocessorDefinitions="WIN32;NDEBUG;GST_DISABLE_GST_DEBUG;_WINDOWS;_USRDLL;HAVE_CONFIG_H;_USE_MATH_DEFINES"
|
|
||||||
RuntimeLibrary="2"
|
|
||||||
UsePrecompiledHeader="0"
|
|
||||||
WarningLevel="3"
|
|
||||||
Detect64BitPortabilityProblems="TRUE"
|
|
||||||
DebugInformationFormat="3"/>
|
|
||||||
<Tool
|
|
||||||
Name="VCCustomBuildTool"/>
|
|
||||||
<Tool
|
|
||||||
Name="VCLinkerTool"
|
|
||||||
AdditionalDependencies="glib-2.0.lib gmodule-2.0.lib gthread-2.0.lib gobject-2.0.lib libgstreamer.lib gstbytestream.lib iconv.lib intl.lib"
|
|
||||||
OutputFile="$(OutDir)/gstmixer.dll"
|
|
||||||
LinkIncremental="1"
|
|
||||||
AdditionalLibraryDirectories="../../../../gstreamer/win32/Release;../../../../glib/glib;../../../../glib/gmodule;../../../../glib/gthread;../../../../glib/gobject;../../../../gettext/lib;../../../../libiconv/lib"
|
|
||||||
ModuleDefinitionFile="mixer.def"
|
|
||||||
GenerateDebugInformation="TRUE"
|
|
||||||
SubSystem="2"
|
|
||||||
OptimizeReferences="2"
|
|
||||||
EnableCOMDATFolding="2"
|
|
||||||
ImportLibrary="$(OutDir)/gstmixer.lib"
|
|
||||||
TargetMachine="1"/>
|
|
||||||
<Tool
|
|
||||||
Name="VCMIDLTool"/>
|
|
||||||
<Tool
|
|
||||||
Name="VCPostBuildEventTool"
|
|
||||||
CommandLine="copy /Y $(TargetPath) c:\gstreamer\plugins"/>
|
|
||||||
<Tool
|
|
||||||
Name="VCPreBuildEventTool"/>
|
|
||||||
<Tool
|
|
||||||
Name="VCPreLinkEventTool"/>
|
|
||||||
<Tool
|
|
||||||
Name="VCResourceCompilerTool"/>
|
|
||||||
<Tool
|
|
||||||
Name="VCWebServiceProxyGeneratorTool"/>
|
|
||||||
<Tool
|
|
||||||
Name="VCXMLDataGeneratorTool"/>
|
|
||||||
<Tool
|
|
||||||
Name="VCWebDeploymentTool"/>
|
|
||||||
<Tool
|
|
||||||
Name="VCManagedWrapperGeneratorTool"/>
|
|
||||||
<Tool
|
|
||||||
Name="VCAuxiliaryManagedWrapperGeneratorTool"/>
|
|
||||||
</Configuration>
|
|
||||||
</Configurations>
|
|
||||||
<References>
|
|
||||||
</References>
|
|
||||||
<Files>
|
|
||||||
<Filter
|
|
||||||
Name="Source Files"
|
|
||||||
Filter="cpp;c;cxx;def;odl;idl;hpj;bat;asm;asmx"
|
|
||||||
UniqueIdentifier="{4FC737F1-C7A5-4376-A066-2A32D752A2FF}">
|
|
||||||
<File
|
|
||||||
RelativePath=".\mixer.c">
|
|
||||||
</File>
|
|
||||||
<File
|
|
||||||
RelativePath=".\mixeroptions.c">
|
|
||||||
</File>
|
|
||||||
<File
|
|
||||||
RelativePath=".\mixertrack.c">
|
|
||||||
</File>
|
|
||||||
</Filter>
|
|
||||||
<Filter
|
|
||||||
Name="Header Files"
|
|
||||||
Filter="h;hpp;hxx;hm;inl;inc;xsd"
|
|
||||||
UniqueIdentifier="{93995380-89BD-4b04-88EB-625FBE52EBFB}">
|
|
||||||
<File
|
|
||||||
RelativePath=".\mixer.h">
|
|
||||||
</File>
|
|
||||||
<File
|
|
||||||
RelativePath=".\mixeroptions.h">
|
|
||||||
</File>
|
|
||||||
<File
|
|
||||||
RelativePath=".\mixertrack.h">
|
|
||||||
</File>
|
|
||||||
</Filter>
|
|
||||||
</Files>
|
|
||||||
<Globals>
|
|
||||||
</Globals>
|
|
||||||
</VisualStudioProject>
|
|
|
@ -1,122 +0,0 @@
|
||||||
/* GStreamer Mixer
|
|
||||||
* Copyright (C) 2003 Ronald Bultje <rbultje@ronald.bitfreak.net>
|
|
||||||
*
|
|
||||||
* mixeroptions.c: mixer track options object design
|
|
||||||
*
|
|
||||||
* 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
|
|
||||||
|
|
||||||
#include "mixeroptions.h"
|
|
||||||
|
|
||||||
enum
|
|
||||||
{
|
|
||||||
/* FILL ME */
|
|
||||||
SIGNAL_OPTION_CHANGED,
|
|
||||||
LAST_SIGNAL
|
|
||||||
};
|
|
||||||
|
|
||||||
static void gst_mixer_options_class_init (GstMixerOptionsClass * klass);
|
|
||||||
static void gst_mixer_options_init (GstMixerOptions * mixer);
|
|
||||||
static void gst_mixer_options_dispose (GObject * object);
|
|
||||||
|
|
||||||
static GObjectClass *parent_class = NULL;
|
|
||||||
static guint signals[LAST_SIGNAL] = { 0 };
|
|
||||||
|
|
||||||
GType
|
|
||||||
gst_mixer_options_get_type (void)
|
|
||||||
{
|
|
||||||
static GType gst_mixer_options_type = 0;
|
|
||||||
|
|
||||||
if (!gst_mixer_options_type) {
|
|
||||||
static const GTypeInfo mixer_options_info = {
|
|
||||||
sizeof (GstMixerOptionsClass),
|
|
||||||
NULL,
|
|
||||||
NULL,
|
|
||||||
(GClassInitFunc) gst_mixer_options_class_init,
|
|
||||||
NULL,
|
|
||||||
NULL,
|
|
||||||
sizeof (GstMixerOptions),
|
|
||||||
0,
|
|
||||||
(GInstanceInitFunc) gst_mixer_options_init,
|
|
||||||
NULL
|
|
||||||
};
|
|
||||||
|
|
||||||
gst_mixer_options_type =
|
|
||||||
g_type_register_static (GST_TYPE_MIXER_TRACK,
|
|
||||||
"GstMixerOptions", &mixer_options_info, 0);
|
|
||||||
}
|
|
||||||
|
|
||||||
return gst_mixer_options_type;
|
|
||||||
}
|
|
||||||
|
|
||||||
static void
|
|
||||||
gst_mixer_options_class_init (GstMixerOptionsClass * klass)
|
|
||||||
{
|
|
||||||
GObjectClass *object_klass = (GObjectClass *) klass;
|
|
||||||
|
|
||||||
parent_class = g_type_class_ref (GST_TYPE_MIXER_TRACK);
|
|
||||||
|
|
||||||
signals[SIGNAL_OPTION_CHANGED] =
|
|
||||||
g_signal_new ("option_changed", G_TYPE_FROM_CLASS (klass),
|
|
||||||
G_SIGNAL_RUN_LAST,
|
|
||||||
G_STRUCT_OFFSET (GstMixerOptionsClass, option_changed),
|
|
||||||
NULL, NULL, g_cclosure_marshal_VOID__STRING,
|
|
||||||
G_TYPE_NONE, 1, G_TYPE_STRING);
|
|
||||||
|
|
||||||
object_klass->dispose = gst_mixer_options_dispose;
|
|
||||||
}
|
|
||||||
|
|
||||||
static void
|
|
||||||
gst_mixer_options_init (GstMixerOptions * mixer_options)
|
|
||||||
{
|
|
||||||
mixer_options->values = NULL;
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
|
||||||
* gst_mixer_options_get_values:
|
|
||||||
* @mixer_optnios: The #GstMixerOptions item that owns the values.
|
|
||||||
*
|
|
||||||
* Get the values for the mixer option.
|
|
||||||
*
|
|
||||||
* Returns: A list of all the possible values for the mixer option.
|
|
||||||
*/
|
|
||||||
|
|
||||||
GList *
|
|
||||||
gst_mixer_options_get_values (GstMixerOptions * mixer_options)
|
|
||||||
{
|
|
||||||
if (!mixer_options->values)
|
|
||||||
return NULL;
|
|
||||||
|
|
||||||
return (GList *) mixer_options->values;
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
static void
|
|
||||||
gst_mixer_options_dispose (GObject * object)
|
|
||||||
{
|
|
||||||
GstMixerOptions *opts = GST_MIXER_OPTIONS (object);
|
|
||||||
|
|
||||||
g_list_foreach (opts->values, (GFunc) g_free, NULL);
|
|
||||||
g_list_free (opts->values);
|
|
||||||
opts->values = NULL;
|
|
||||||
|
|
||||||
if (parent_class->dispose)
|
|
||||||
parent_class->dispose (object);
|
|
||||||
}
|
|
|
@ -1,73 +0,0 @@
|
||||||
/* GStreamer Mixer
|
|
||||||
* Copyright (C) 2003 Ronald Bultje <rbultje@ronald.bitfreak.net>
|
|
||||||
*
|
|
||||||
* mixeroptions.h: mixer track options object
|
|
||||||
* This should be a subclass of MixerItem, along with MixerOptions,
|
|
||||||
* but that's not possible because of API/ABI in 0.8.x. FIXME.
|
|
||||||
*
|
|
||||||
* 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.
|
|
||||||
*/
|
|
||||||
|
|
||||||
#ifndef __GST_MIXER_OPTIONS_H__
|
|
||||||
#define __GST_MIXER_OPTIONS_H__
|
|
||||||
|
|
||||||
#include <gst/gst.h>
|
|
||||||
#include <gst/mixer/mixertrack.h>
|
|
||||||
|
|
||||||
G_BEGIN_DECLS
|
|
||||||
|
|
||||||
#define GST_TYPE_MIXER_OPTIONS \
|
|
||||||
(gst_mixer_options_get_type ())
|
|
||||||
#define GST_MIXER_OPTIONS(obj) \
|
|
||||||
(G_TYPE_CHECK_INSTANCE_CAST ((obj), GST_TYPE_MIXER_OPTIONS, \
|
|
||||||
GstMixerOptions))
|
|
||||||
#define GST_MIXER_OPTIONS_CLASS(klass) \
|
|
||||||
(G_TYPE_CHECK_CLASS_CAST ((klass), GST_TYPE_MIXER_OPTIONS, \
|
|
||||||
GstMixerOptionsClass))
|
|
||||||
#define GST_IS_MIXER_OPTIONS(obj) \
|
|
||||||
(G_TYPE_CHECK_INSTANCE_TYPE ((obj), GST_TYPE_MIXER_OPTIONS))
|
|
||||||
#define GST_IS_MIXER_OPTIONS_CLASS(klass) \
|
|
||||||
(G_TYPE_CHECK_CLASS_TYPE ((klass), GST_TYPE_MIXER_OPTIONS))
|
|
||||||
|
|
||||||
typedef struct _GstMixerOptions GstMixerOptions;
|
|
||||||
typedef struct _GstMixerOptionsClass GstMixerOptionsClass;
|
|
||||||
|
|
||||||
struct _GstMixerOptions {
|
|
||||||
GstMixerTrack parent;
|
|
||||||
|
|
||||||
/* list of strings */
|
|
||||||
GList *values;
|
|
||||||
|
|
||||||
gpointer _gst_reserved[GST_PADDING];
|
|
||||||
};
|
|
||||||
|
|
||||||
struct _GstMixerOptionsClass {
|
|
||||||
GstMixerTrackClass parent;
|
|
||||||
|
|
||||||
/* signals */
|
|
||||||
void (* option_changed) (GstMixerOptions *opts,
|
|
||||||
gchar *value);
|
|
||||||
|
|
||||||
gpointer _gst_reserved[GST_PADDING];
|
|
||||||
};
|
|
||||||
|
|
||||||
GType gst_mixer_options_get_type (void);
|
|
||||||
|
|
||||||
GList * gst_mixer_options_get_values (GstMixerOptions *mixer_options);
|
|
||||||
|
|
||||||
G_END_DECLS
|
|
||||||
|
|
||||||
#endif /* __GST_MIXER_OPTIONS_H__ */
|
|
|
@ -1,193 +0,0 @@
|
||||||
/* GStreamer Mixer
|
|
||||||
* Copyright (C) 2003 Ronald Bultje <rbultje@ronald.bitfreak.net>
|
|
||||||
*
|
|
||||||
* mixertrack.c: mixer track object design
|
|
||||||
*
|
|
||||||
* 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
|
|
||||||
|
|
||||||
#include "mixertrack.h"
|
|
||||||
|
|
||||||
enum
|
|
||||||
{
|
|
||||||
/* FILL ME */
|
|
||||||
SIGNAL_VOLUME_CHANGED,
|
|
||||||
SIGNAL_RECORD_TOGGLED,
|
|
||||||
SIGNAL_MUTE_TOGGLED,
|
|
||||||
LAST_SIGNAL
|
|
||||||
};
|
|
||||||
|
|
||||||
enum
|
|
||||||
{
|
|
||||||
ARG_0,
|
|
||||||
ARG_LABEL,
|
|
||||||
ARG_MIN_VOLUME,
|
|
||||||
ARG_MAX_VOLUME,
|
|
||||||
ARG_FLAGS,
|
|
||||||
ARG_NUM_CHANNELS
|
|
||||||
};
|
|
||||||
|
|
||||||
static void gst_mixer_track_class_init (GstMixerTrackClass * klass);
|
|
||||||
static void gst_mixer_track_init (GstMixerTrack * mixer);
|
|
||||||
static void gst_mixer_track_dispose (GObject * object);
|
|
||||||
|
|
||||||
static void gst_mixer_track_get_property (GObject * object, guint prop_id,
|
|
||||||
GValue * value, GParamSpec * pspec);
|
|
||||||
|
|
||||||
static GObjectClass *parent_class = NULL;
|
|
||||||
static guint signals[LAST_SIGNAL] = { 0 };
|
|
||||||
|
|
||||||
GType
|
|
||||||
gst_mixer_track_get_type (void)
|
|
||||||
{
|
|
||||||
static GType gst_mixer_track_type = 0;
|
|
||||||
|
|
||||||
if (!gst_mixer_track_type) {
|
|
||||||
static const GTypeInfo mixer_track_info = {
|
|
||||||
sizeof (GstMixerTrackClass),
|
|
||||||
NULL,
|
|
||||||
NULL,
|
|
||||||
(GClassInitFunc) gst_mixer_track_class_init,
|
|
||||||
NULL,
|
|
||||||
NULL,
|
|
||||||
sizeof (GstMixerTrack),
|
|
||||||
0,
|
|
||||||
(GInstanceInitFunc) gst_mixer_track_init,
|
|
||||||
NULL
|
|
||||||
};
|
|
||||||
|
|
||||||
gst_mixer_track_type =
|
|
||||||
g_type_register_static (G_TYPE_OBJECT,
|
|
||||||
"GstMixerTrack", &mixer_track_info, 0);
|
|
||||||
}
|
|
||||||
|
|
||||||
return gst_mixer_track_type;
|
|
||||||
}
|
|
||||||
|
|
||||||
static void
|
|
||||||
gst_mixer_track_class_init (GstMixerTrackClass * klass)
|
|
||||||
{
|
|
||||||
GObjectClass *object_klass = G_OBJECT_CLASS (klass);
|
|
||||||
|
|
||||||
parent_class = g_type_class_ref (G_TYPE_OBJECT);
|
|
||||||
|
|
||||||
object_klass->get_property = gst_mixer_track_get_property;
|
|
||||||
|
|
||||||
g_object_class_install_property (object_klass, ARG_LABEL,
|
|
||||||
g_param_spec_string ("label", "Track label",
|
|
||||||
"The label assigned to the track", NULL, G_PARAM_READABLE));
|
|
||||||
|
|
||||||
g_object_class_install_property (object_klass, ARG_MIN_VOLUME,
|
|
||||||
g_param_spec_int ("min_volume", "Minimum volume level",
|
|
||||||
"The minimum possible volume level", G_MININT, G_MAXINT,
|
|
||||||
0, G_PARAM_READABLE));
|
|
||||||
|
|
||||||
g_object_class_install_property (object_klass, ARG_MAX_VOLUME,
|
|
||||||
g_param_spec_int ("max_volume", "Maximum volume level",
|
|
||||||
"The maximum possible volume level", G_MININT, G_MAXINT,
|
|
||||||
0, G_PARAM_READABLE));
|
|
||||||
|
|
||||||
g_object_class_install_property (object_klass, ARG_FLAGS,
|
|
||||||
g_param_spec_uint ("flags", "Flags",
|
|
||||||
"Flags indicating the type of mixer track",
|
|
||||||
0, G_MAXUINT, 0, G_PARAM_READABLE));
|
|
||||||
|
|
||||||
g_object_class_install_property (object_klass, ARG_NUM_CHANNELS,
|
|
||||||
g_param_spec_int ("num_channels", "Number of channels",
|
|
||||||
"The number of channels contained within the track",
|
|
||||||
0, G_MAXINT, 0, G_PARAM_READABLE));
|
|
||||||
|
|
||||||
signals[SIGNAL_RECORD_TOGGLED] =
|
|
||||||
g_signal_new ("record_toggled", G_TYPE_FROM_CLASS (klass),
|
|
||||||
G_SIGNAL_RUN_LAST,
|
|
||||||
G_STRUCT_OFFSET (GstMixerTrackClass,
|
|
||||||
record_toggled),
|
|
||||||
NULL, NULL, g_cclosure_marshal_VOID__BOOLEAN,
|
|
||||||
G_TYPE_NONE, 1, G_TYPE_BOOLEAN);
|
|
||||||
signals[SIGNAL_MUTE_TOGGLED] =
|
|
||||||
g_signal_new ("mute_toggled", G_TYPE_FROM_CLASS (klass),
|
|
||||||
G_SIGNAL_RUN_LAST,
|
|
||||||
G_STRUCT_OFFSET (GstMixerTrackClass,
|
|
||||||
mute_toggled),
|
|
||||||
NULL, NULL, g_cclosure_marshal_VOID__BOOLEAN,
|
|
||||||
G_TYPE_NONE, 1, G_TYPE_BOOLEAN);
|
|
||||||
signals[SIGNAL_VOLUME_CHANGED] =
|
|
||||||
g_signal_new ("volume_changed", G_TYPE_FROM_CLASS (klass),
|
|
||||||
G_SIGNAL_RUN_LAST,
|
|
||||||
G_STRUCT_OFFSET (GstMixerTrackClass,
|
|
||||||
volume_changed),
|
|
||||||
NULL, NULL, g_cclosure_marshal_VOID__POINTER,
|
|
||||||
G_TYPE_NONE, 1, G_TYPE_POINTER);
|
|
||||||
|
|
||||||
object_klass->dispose = gst_mixer_track_dispose;
|
|
||||||
}
|
|
||||||
|
|
||||||
static void
|
|
||||||
gst_mixer_track_init (GstMixerTrack * mixer_track)
|
|
||||||
{
|
|
||||||
mixer_track->label = NULL;
|
|
||||||
mixer_track->min_volume = mixer_track->max_volume = 0;
|
|
||||||
mixer_track->flags = 0;
|
|
||||||
mixer_track->num_channels = 0;
|
|
||||||
}
|
|
||||||
|
|
||||||
static void
|
|
||||||
gst_mixer_track_get_property (GObject * object, guint prop_id, GValue * value,
|
|
||||||
GParamSpec * pspec)
|
|
||||||
{
|
|
||||||
GstMixerTrack *mixer_track;
|
|
||||||
|
|
||||||
mixer_track = GST_MIXER_TRACK (object);
|
|
||||||
|
|
||||||
switch (prop_id) {
|
|
||||||
case ARG_LABEL:
|
|
||||||
g_value_set_string (value, mixer_track->label);
|
|
||||||
break;
|
|
||||||
case ARG_MIN_VOLUME:
|
|
||||||
g_value_set_int (value, mixer_track->min_volume);
|
|
||||||
break;
|
|
||||||
case ARG_MAX_VOLUME:
|
|
||||||
g_value_set_int (value, mixer_track->max_volume);
|
|
||||||
break;
|
|
||||||
case ARG_FLAGS:
|
|
||||||
g_value_set_uint (value, (guint32) mixer_track->flags);
|
|
||||||
break;
|
|
||||||
case ARG_NUM_CHANNELS:
|
|
||||||
g_value_set_int (value, mixer_track->num_channels);
|
|
||||||
break;
|
|
||||||
default:
|
|
||||||
G_OBJECT_WARN_INVALID_PROPERTY_ID (object, prop_id, pspec);
|
|
||||||
break;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
static void
|
|
||||||
gst_mixer_track_dispose (GObject * object)
|
|
||||||
{
|
|
||||||
GstMixerTrack *channel = GST_MIXER_TRACK (object);
|
|
||||||
|
|
||||||
if (channel->label) {
|
|
||||||
g_free (channel->label);
|
|
||||||
channel->label = NULL;
|
|
||||||
}
|
|
||||||
|
|
||||||
if (parent_class->dispose)
|
|
||||||
parent_class->dispose (object);
|
|
||||||
}
|
|
|
@ -1,102 +0,0 @@
|
||||||
/* GStreamer Mixer
|
|
||||||
* Copyright (C) 2003 Ronald Bultje <rbultje@ronald.bitfreak.net>
|
|
||||||
*
|
|
||||||
* mixertrack.h: mixer track object
|
|
||||||
*
|
|
||||||
* 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.
|
|
||||||
*/
|
|
||||||
|
|
||||||
#ifndef __GST_MIXER_TRACK_H__
|
|
||||||
#define __GST_MIXER_TRACK_H__
|
|
||||||
|
|
||||||
#include <gst/gst.h>
|
|
||||||
|
|
||||||
G_BEGIN_DECLS
|
|
||||||
|
|
||||||
#define GST_TYPE_MIXER_TRACK \
|
|
||||||
(gst_mixer_track_get_type ())
|
|
||||||
#define GST_MIXER_TRACK(obj) \
|
|
||||||
(G_TYPE_CHECK_INSTANCE_CAST ((obj), GST_TYPE_MIXER_TRACK, \
|
|
||||||
GstMixerTrack))
|
|
||||||
#define GST_MIXER_TRACK_CLASS(klass) \
|
|
||||||
(G_TYPE_CHECK_CLASS_CAST ((klass), GST_TYPE_MIXER_TRACK, \
|
|
||||||
GstMixerTrackClass))
|
|
||||||
#define GST_IS_MIXER_TRACK(obj) \
|
|
||||||
(G_TYPE_CHECK_INSTANCE_TYPE ((obj), GST_TYPE_MIXER_TRACK))
|
|
||||||
#define GST_IS_MIXER_TRACK_CLASS(klass) \
|
|
||||||
(G_TYPE_CHECK_CLASS_TYPE ((klass), GST_TYPE_MIXER_TRACK))
|
|
||||||
|
|
||||||
/*
|
|
||||||
* Naming:
|
|
||||||
*
|
|
||||||
* A track is a single input/output stream (e.g. line-in,
|
|
||||||
* microphone, etc.). Channels are then single streams
|
|
||||||
* within a track. A mono stream has one channel, a stereo
|
|
||||||
* stream has two, etc.
|
|
||||||
*
|
|
||||||
* Input tracks can have 'recording' enabled, which means
|
|
||||||
* that any input will be hearable into the speakers that
|
|
||||||
* are attached to the output. Mute is obvious. A track
|
|
||||||
* flagged as master is the master volume track on this
|
|
||||||
* mixer, which means that setting this track will change
|
|
||||||
* the hearable volume on any output.
|
|
||||||
*/
|
|
||||||
|
|
||||||
typedef enum {
|
|
||||||
GST_MIXER_TRACK_INPUT = (1<<0),
|
|
||||||
GST_MIXER_TRACK_OUTPUT = (1<<1),
|
|
||||||
GST_MIXER_TRACK_MUTE = (1<<2),
|
|
||||||
GST_MIXER_TRACK_RECORD = (1<<3),
|
|
||||||
GST_MIXER_TRACK_MASTER = (1<<4),
|
|
||||||
GST_MIXER_TRACK_SOFTWARE = (1<<5)
|
|
||||||
} GstMixerTrackFlags;
|
|
||||||
|
|
||||||
#define GST_MIXER_TRACK_HAS_FLAG(channel, flag) \
|
|
||||||
((channel)->flags & flag)
|
|
||||||
|
|
||||||
typedef struct _GstMixerTrack GstMixerTrack;
|
|
||||||
typedef struct _GstMixerTrackClass GstMixerTrackClass;
|
|
||||||
|
|
||||||
struct _GstMixerTrack {
|
|
||||||
GObject parent;
|
|
||||||
|
|
||||||
gchar *label;
|
|
||||||
/* FIXME: flags should be guint32. Change in 0.9 */
|
|
||||||
GstMixerTrackFlags flags;
|
|
||||||
gint num_channels,
|
|
||||||
min_volume,
|
|
||||||
max_volume;
|
|
||||||
};
|
|
||||||
|
|
||||||
struct _GstMixerTrackClass {
|
|
||||||
GObjectClass parent;
|
|
||||||
|
|
||||||
/* signals */
|
|
||||||
void (* mute_toggled) (GstMixerTrack *channel,
|
|
||||||
gboolean mute);
|
|
||||||
void (* record_toggled) (GstMixerTrack *channel,
|
|
||||||
gboolean record);
|
|
||||||
void (* volume_changed) (GstMixerTrack *channel,
|
|
||||||
gint *volumes);
|
|
||||||
|
|
||||||
gpointer _gst_reserved[GST_PADDING];
|
|
||||||
};
|
|
||||||
|
|
||||||
GType gst_mixer_track_get_type (void);
|
|
||||||
|
|
||||||
G_END_DECLS
|
|
||||||
|
|
||||||
#endif /* __GST_MIXER_TRACK_H__ */
|
|
|
@ -1,8 +0,0 @@
|
||||||
noinst_LTLIBRARIES = libgstnavigation.la
|
|
||||||
|
|
||||||
libgstnavigation_la_SOURCES = navigation.c
|
|
||||||
|
|
||||||
libgstnavigationincludedir = $(includedir)/gstreamer-@GST_MAJORMINOR@/gst/navigation
|
|
||||||
libgstnavigationinclude_HEADERS = navigation.h
|
|
||||||
|
|
||||||
libgstnavigation_la_CFLAGS = $(GST_CFLAGS)
|
|
|
@ -1,91 +0,0 @@
|
||||||
/* GStreamer Navigation
|
|
||||||
* Copyright (C) 2003 Ronald Bultje <rbultje@ronald.bitfreak.net>
|
|
||||||
*
|
|
||||||
* navigation.c: navigation design virtual class function wrappers
|
|
||||||
*
|
|
||||||
* 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
|
|
||||||
|
|
||||||
#include <gst/navigation/navigation.h>
|
|
||||||
|
|
||||||
static void gst_navigation_class_init (GstNavigationInterface * iface);
|
|
||||||
|
|
||||||
GType
|
|
||||||
gst_navigation_get_type (void)
|
|
||||||
{
|
|
||||||
static GType gst_navigation_type = 0;
|
|
||||||
|
|
||||||
if (!gst_navigation_type) {
|
|
||||||
static const GTypeInfo gst_navigation_info = {
|
|
||||||
sizeof (GstNavigationInterface),
|
|
||||||
(GBaseInitFunc) gst_navigation_class_init,
|
|
||||||
NULL,
|
|
||||||
NULL,
|
|
||||||
NULL,
|
|
||||||
NULL,
|
|
||||||
0,
|
|
||||||
0,
|
|
||||||
NULL,
|
|
||||||
};
|
|
||||||
|
|
||||||
gst_navigation_type = g_type_register_static (G_TYPE_INTERFACE,
|
|
||||||
"GstNavigation", &gst_navigation_info, 0);
|
|
||||||
}
|
|
||||||
|
|
||||||
return gst_navigation_type;
|
|
||||||
}
|
|
||||||
|
|
||||||
static void
|
|
||||||
gst_navigation_class_init (GstNavigationInterface * iface)
|
|
||||||
{
|
|
||||||
/* default virtual functions */
|
|
||||||
iface->send_event = NULL;
|
|
||||||
}
|
|
||||||
|
|
||||||
/* The interface implementer should make sure that the object can handle
|
|
||||||
* the event. */
|
|
||||||
void
|
|
||||||
gst_navigation_send_event (GstNavigation * navigation, GstStructure * structure)
|
|
||||||
{
|
|
||||||
GstNavigationInterface *iface = GST_NAVIGATION_GET_IFACE (navigation);
|
|
||||||
|
|
||||||
if (iface->send_event) {
|
|
||||||
iface->send_event (navigation, structure);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
void
|
|
||||||
gst_navigation_send_key_event (GstNavigation * navigation, const char *event,
|
|
||||||
const char *key)
|
|
||||||
{
|
|
||||||
gst_navigation_send_event (navigation,
|
|
||||||
gst_structure_new ("application/x-gst-navigation", "event", G_TYPE_STRING,
|
|
||||||
event, "key", G_TYPE_STRING, key, NULL));
|
|
||||||
}
|
|
||||||
|
|
||||||
void
|
|
||||||
gst_navigation_send_mouse_event (GstNavigation * navigation, const char *event,
|
|
||||||
int button, double x, double y)
|
|
||||||
{
|
|
||||||
gst_navigation_send_event (navigation,
|
|
||||||
gst_structure_new ("application/x-gst-navigation", "event", G_TYPE_STRING,
|
|
||||||
event, "button", G_TYPE_INT, button, "pointer_x", G_TYPE_DOUBLE, x,
|
|
||||||
"pointer_y", G_TYPE_DOUBLE, y, NULL));
|
|
||||||
}
|
|
|
@ -1,62 +0,0 @@
|
||||||
/* GStreamer Navigation
|
|
||||||
* Copyright (C) 2003 Ronald Bultje <rbultje@ronald.bitfreak.net>
|
|
||||||
* Copyright (C) 2003 David A. Schleef <ds@schleef.org>
|
|
||||||
*
|
|
||||||
* navigation.h: navigation interface design
|
|
||||||
*
|
|
||||||
* 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.
|
|
||||||
*/
|
|
||||||
|
|
||||||
#ifndef __GST_NAVIGATION_H__
|
|
||||||
#define __GST_NAVIGATION_H__
|
|
||||||
|
|
||||||
#include <gst/gst.h>
|
|
||||||
|
|
||||||
G_BEGIN_DECLS
|
|
||||||
|
|
||||||
#define GST_TYPE_NAVIGATION \
|
|
||||||
(gst_navigation_get_type ())
|
|
||||||
#define GST_NAVIGATION(obj) \
|
|
||||||
(G_TYPE_CHECK_INSTANCE_CAST ((obj), GST_TYPE_NAVIGATION, GstNavigation))
|
|
||||||
#define GST_IS_NAVIGATION(obj) \
|
|
||||||
(G_TYPE_CHECK_INSTANCE_TYPE ((obj), GST_TYPE_NAVIGATION))
|
|
||||||
#define GST_NAVIGATION_GET_IFACE(obj) \
|
|
||||||
(G_TYPE_INSTANCE_GET_INTERFACE ((obj), GST_TYPE_NAVIGATION, GstNavigationInterface))
|
|
||||||
|
|
||||||
typedef struct _GstNavigation GstNavigation;
|
|
||||||
|
|
||||||
typedef struct _GstNavigationInterface {
|
|
||||||
GTypeInterface g_iface;
|
|
||||||
|
|
||||||
/* virtual functions */
|
|
||||||
void (*send_event) (GstNavigation *navigation, GstStructure *structure);
|
|
||||||
|
|
||||||
gpointer _gst_reserved[GST_PADDING];
|
|
||||||
} GstNavigationInterface;
|
|
||||||
|
|
||||||
GType gst_navigation_get_type (void);
|
|
||||||
|
|
||||||
/* virtual class function wrappers */
|
|
||||||
void gst_navigation_send_event (GstNavigation *navigation, GstStructure *structure);
|
|
||||||
|
|
||||||
void gst_navigation_send_key_event (GstNavigation *navigation,
|
|
||||||
const char *event, const char *key);
|
|
||||||
void gst_navigation_send_mouse_event (GstNavigation *navigation,
|
|
||||||
const char *event, int button, double x, double y);
|
|
||||||
|
|
||||||
G_END_DECLS
|
|
||||||
|
|
||||||
#endif /* __GST_NAVIGATION_H__ */
|
|
|
@ -1,144 +0,0 @@
|
||||||
<?xml version="1.0" encoding="Windows-1252"?>
|
|
||||||
<VisualStudioProject
|
|
||||||
ProjectType="Visual C++"
|
|
||||||
Version="7.10"
|
|
||||||
Name="navigation"
|
|
||||||
ProjectGUID="{979C216F-0ACF-4956-AE00-055A42D67898}"
|
|
||||||
RootNamespace="navigation"
|
|
||||||
Keyword="Win32Proj">
|
|
||||||
<Platforms>
|
|
||||||
<Platform
|
|
||||||
Name="Win32"/>
|
|
||||||
</Platforms>
|
|
||||||
<Configurations>
|
|
||||||
<Configuration
|
|
||||||
Name="Debug|Win32"
|
|
||||||
OutputDirectory="../../../win32/Debug"
|
|
||||||
IntermediateDirectory="../../../win32/Debug"
|
|
||||||
ConfigurationType="2"
|
|
||||||
CharacterSet="2">
|
|
||||||
<Tool
|
|
||||||
Name="VCCLCompilerTool"
|
|
||||||
Optimization="0"
|
|
||||||
AdditionalIncludeDirectories="../../../../gstreamer/win32;../../../../gstreamer;../../../../gstreamer/libs;../../../../glib;../../../../glib/glib;../../../../glib/gmodule;"../../../gst-libs";../../../../popt/include;../../../../libxml2/include/libxml2"
|
|
||||||
PreprocessorDefinitions="WIN32;_DEBUG;_WINDOWS;_USRDLL;HAVE_CONFIG_H;_USE_MATH_DEFINES"
|
|
||||||
MinimalRebuild="TRUE"
|
|
||||||
BasicRuntimeChecks="3"
|
|
||||||
RuntimeLibrary="3"
|
|
||||||
UsePrecompiledHeader="0"
|
|
||||||
WarningLevel="3"
|
|
||||||
Detect64BitPortabilityProblems="TRUE"
|
|
||||||
DebugInformationFormat="4"/>
|
|
||||||
<Tool
|
|
||||||
Name="VCCustomBuildTool"/>
|
|
||||||
<Tool
|
|
||||||
Name="VCLinkerTool"
|
|
||||||
AdditionalDependencies="glib-2.0.lib gmodule-2.0.lib gthread-2.0.lib gobject-2.0.lib libgstreamer.lib gstbytestream.lib iconv.lib intl.lib"
|
|
||||||
OutputFile="$(OutDir)/gstnavigation.dll"
|
|
||||||
LinkIncremental="2"
|
|
||||||
AdditionalLibraryDirectories="../../../../gstreamer/win32/Debug;../../../../glib/glib;../../../../glib/gmodule;../../../../glib/gthread;../../../../glib/gobject;../../../../gettext/lib;../../../../libiconv/lib"
|
|
||||||
ModuleDefinitionFile=""
|
|
||||||
GenerateDebugInformation="TRUE"
|
|
||||||
ProgramDatabaseFile="$(OutDir)/navigation.pdb"
|
|
||||||
SubSystem="2"
|
|
||||||
OptimizeReferences="2"
|
|
||||||
ImportLibrary="$(OutDir)/gstnavigation.lib"
|
|
||||||
TargetMachine="1"/>
|
|
||||||
<Tool
|
|
||||||
Name="VCMIDLTool"/>
|
|
||||||
<Tool
|
|
||||||
Name="VCPostBuildEventTool"
|
|
||||||
CommandLine="copy /Y $(TargetPath) c:\gstreamer\plugins"/>
|
|
||||||
<Tool
|
|
||||||
Name="VCPreBuildEventTool"/>
|
|
||||||
<Tool
|
|
||||||
Name="VCPreLinkEventTool"/>
|
|
||||||
<Tool
|
|
||||||
Name="VCResourceCompilerTool"/>
|
|
||||||
<Tool
|
|
||||||
Name="VCWebServiceProxyGeneratorTool"/>
|
|
||||||
<Tool
|
|
||||||
Name="VCXMLDataGeneratorTool"/>
|
|
||||||
<Tool
|
|
||||||
Name="VCWebDeploymentTool"/>
|
|
||||||
<Tool
|
|
||||||
Name="VCManagedWrapperGeneratorTool"/>
|
|
||||||
<Tool
|
|
||||||
Name="VCAuxiliaryManagedWrapperGeneratorTool"/>
|
|
||||||
</Configuration>
|
|
||||||
<Configuration
|
|
||||||
Name="Release|Win32"
|
|
||||||
OutputDirectory="../../../win32/Release"
|
|
||||||
IntermediateDirectory="../../../win32/Release"
|
|
||||||
ConfigurationType="2"
|
|
||||||
CharacterSet="2">
|
|
||||||
<Tool
|
|
||||||
Name="VCCLCompilerTool"
|
|
||||||
AdditionalIncludeDirectories="../../../../gstreamer/win32;../../../../gstreamer;../../../../gstreamer/libs;../../../../glib;../../../../glib/glib;../../../../glib/gmodule;"../../../gst-libs";../../../../popt/include;../../../../libxml2/include/libxml2"
|
|
||||||
PreprocessorDefinitions="WIN32;NDEBUG;GST_DISABLE_GST_DEBUG;_WINDOWS;_USRDLL;HAVE_CONFIG_H;_USE_MATH_DEFINES"
|
|
||||||
RuntimeLibrary="2"
|
|
||||||
UsePrecompiledHeader="0"
|
|
||||||
WarningLevel="3"
|
|
||||||
Detect64BitPortabilityProblems="TRUE"
|
|
||||||
DebugInformationFormat="3"/>
|
|
||||||
<Tool
|
|
||||||
Name="VCCustomBuildTool"/>
|
|
||||||
<Tool
|
|
||||||
Name="VCLinkerTool"
|
|
||||||
AdditionalDependencies="glib-2.0.lib gmodule-2.0.lib gthread-2.0.lib gobject-2.0.lib libgstreamer.lib gstbytestream.lib iconv.lib intl.lib"
|
|
||||||
OutputFile="$(OutDir)/gstnavigation.dll"
|
|
||||||
LinkIncremental="1"
|
|
||||||
AdditionalLibraryDirectories="../../../../gstreamer/win32/Release;../../../../glib/glib;../../../../glib/gmodule;../../../../glib/gthread;../../../../glib/gobject;../../../../gettext/lib;../../../../libiconv/lib"
|
|
||||||
ModuleDefinitionFile=""
|
|
||||||
GenerateDebugInformation="TRUE"
|
|
||||||
SubSystem="2"
|
|
||||||
OptimizeReferences="2"
|
|
||||||
EnableCOMDATFolding="2"
|
|
||||||
ImportLibrary="$(OutDir)/gstnavigation.lib"
|
|
||||||
TargetMachine="1"/>
|
|
||||||
<Tool
|
|
||||||
Name="VCMIDLTool"/>
|
|
||||||
<Tool
|
|
||||||
Name="VCPostBuildEventTool"
|
|
||||||
CommandLine="copy /Y $(TargetPath) c:\gstreamer\plugins"/>
|
|
||||||
<Tool
|
|
||||||
Name="VCPreBuildEventTool"/>
|
|
||||||
<Tool
|
|
||||||
Name="VCPreLinkEventTool"/>
|
|
||||||
<Tool
|
|
||||||
Name="VCResourceCompilerTool"/>
|
|
||||||
<Tool
|
|
||||||
Name="VCWebServiceProxyGeneratorTool"/>
|
|
||||||
<Tool
|
|
||||||
Name="VCXMLDataGeneratorTool"/>
|
|
||||||
<Tool
|
|
||||||
Name="VCWebDeploymentTool"/>
|
|
||||||
<Tool
|
|
||||||
Name="VCManagedWrapperGeneratorTool"/>
|
|
||||||
<Tool
|
|
||||||
Name="VCAuxiliaryManagedWrapperGeneratorTool"/>
|
|
||||||
</Configuration>
|
|
||||||
</Configurations>
|
|
||||||
<References>
|
|
||||||
</References>
|
|
||||||
<Files>
|
|
||||||
<Filter
|
|
||||||
Name="Source Files"
|
|
||||||
Filter="cpp;c;cxx;def;odl;idl;hpj;bat;asm;asmx"
|
|
||||||
UniqueIdentifier="{4FC737F1-C7A5-4376-A066-2A32D752A2FF}">
|
|
||||||
<File
|
|
||||||
RelativePath=".\navigation.c">
|
|
||||||
</File>
|
|
||||||
</Filter>
|
|
||||||
<Filter
|
|
||||||
Name="Header Files"
|
|
||||||
Filter="h;hpp;hxx;hm;inl;inc;xsd"
|
|
||||||
UniqueIdentifier="{93995380-89BD-4b04-88EB-625FBE52EBFB}">
|
|
||||||
<File
|
|
||||||
RelativePath=".\navigation.h">
|
|
||||||
</File>
|
|
||||||
</Filter>
|
|
||||||
</Files>
|
|
||||||
<Globals>
|
|
||||||
</Globals>
|
|
||||||
</VisualStudioProject>
|
|
|
@ -1,9 +0,0 @@
|
||||||
noinst_LTLIBRARIES = libgstpropertyprobe.la
|
|
||||||
|
|
||||||
libgstpropertyprobe_la_SOURCES = propertyprobe.c
|
|
||||||
|
|
||||||
libgstpropertyprobeincludedir = $(includedir)/gstreamer-@GST_MAJORMINOR@/gst/propertyprobe
|
|
||||||
libgstpropertyprobeinclude_HEADERS = propertyprobe.h
|
|
||||||
|
|
||||||
libgstpropertyprobe_la_CFLAGS = $(GST_CFLAGS)
|
|
||||||
|
|
|
@ -1,345 +0,0 @@
|
||||||
/* GStreamer PropertyProbe
|
|
||||||
* Copyright (C) 2003 David Schleef <ds@schleef.org>
|
|
||||||
*
|
|
||||||
* property_probe.c: property_probe design virtual class function wrappers
|
|
||||||
*
|
|
||||||
* 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
|
|
||||||
|
|
||||||
#include <string.h>
|
|
||||||
|
|
||||||
#include "propertyprobe.h"
|
|
||||||
|
|
||||||
enum
|
|
||||||
{
|
|
||||||
SIGNAL_PROBE_NEEDED,
|
|
||||||
LAST_SIGNAL
|
|
||||||
};
|
|
||||||
|
|
||||||
static void gst_property_probe_iface_init (GstPropertyProbeInterface * iface);
|
|
||||||
|
|
||||||
static guint gst_property_probe_signals[LAST_SIGNAL] = { 0 };
|
|
||||||
|
|
||||||
GType
|
|
||||||
gst_property_probe_get_type (void)
|
|
||||||
{
|
|
||||||
static GType gst_property_probe_type = 0;
|
|
||||||
|
|
||||||
if (!gst_property_probe_type) {
|
|
||||||
static const GTypeInfo gst_property_probe_info = {
|
|
||||||
sizeof (GstPropertyProbeInterface),
|
|
||||||
(GBaseInitFunc) gst_property_probe_iface_init,
|
|
||||||
NULL,
|
|
||||||
NULL,
|
|
||||||
NULL,
|
|
||||||
NULL,
|
|
||||||
0,
|
|
||||||
0,
|
|
||||||
NULL,
|
|
||||||
};
|
|
||||||
|
|
||||||
gst_property_probe_type =
|
|
||||||
g_type_register_static (G_TYPE_INTERFACE,
|
|
||||||
"GstPropertyProbe", &gst_property_probe_info, 0);
|
|
||||||
}
|
|
||||||
|
|
||||||
return gst_property_probe_type;
|
|
||||||
}
|
|
||||||
|
|
||||||
static void
|
|
||||||
gst_property_probe_iface_init (GstPropertyProbeInterface * iface)
|
|
||||||
{
|
|
||||||
static gboolean initialized = FALSE;
|
|
||||||
|
|
||||||
if (!initialized) {
|
|
||||||
gst_property_probe_signals[SIGNAL_PROBE_NEEDED] =
|
|
||||||
g_signal_new ("probe-needed", G_TYPE_FROM_CLASS (iface),
|
|
||||||
G_SIGNAL_RUN_LAST, G_STRUCT_OFFSET (GstPropertyProbeInterface,
|
|
||||||
probe_needed), NULL, NULL, g_cclosure_marshal_VOID__POINTER,
|
|
||||||
G_TYPE_NONE, 1, G_TYPE_POINTER);
|
|
||||||
initialized = TRUE;
|
|
||||||
}
|
|
||||||
|
|
||||||
/* default virtual functions */
|
|
||||||
iface->get_properties = NULL;
|
|
||||||
iface->get_values = NULL;
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
|
||||||
* gst_property_probe_get_properties:
|
|
||||||
* @probe: the #GstPropertyProbe to get the properties for.
|
|
||||||
*
|
|
||||||
* Get a list of properties for which probing is supported.
|
|
||||||
*
|
|
||||||
* Returns the list of properties for which probing is supported
|
|
||||||
* by this element.
|
|
||||||
*/
|
|
||||||
|
|
||||||
const GList *
|
|
||||||
gst_property_probe_get_properties (GstPropertyProbe * probe)
|
|
||||||
{
|
|
||||||
GstPropertyProbeInterface *iface;
|
|
||||||
|
|
||||||
g_return_val_if_fail (probe != NULL, NULL);
|
|
||||||
|
|
||||||
iface = GST_PROPERTY_PROBE_GET_IFACE (probe);
|
|
||||||
|
|
||||||
if (iface->get_properties)
|
|
||||||
return iface->get_properties (probe);
|
|
||||||
|
|
||||||
return NULL;
|
|
||||||
}
|
|
||||||
|
|
||||||
const GParamSpec *
|
|
||||||
gst_property_probe_get_property (GstPropertyProbe * probe, const gchar * name)
|
|
||||||
{
|
|
||||||
const GList *pspecs = gst_property_probe_get_properties (probe);
|
|
||||||
|
|
||||||
g_return_val_if_fail (probe != NULL, NULL);
|
|
||||||
g_return_val_if_fail (name != NULL, NULL);
|
|
||||||
|
|
||||||
while (pspecs) {
|
|
||||||
const GParamSpec *pspec = pspecs->data;
|
|
||||||
|
|
||||||
if (!strcmp (pspec->name, name))
|
|
||||||
return pspec;
|
|
||||||
|
|
||||||
pspecs = pspecs->next;
|
|
||||||
}
|
|
||||||
|
|
||||||
return NULL;
|
|
||||||
}
|
|
||||||
|
|
||||||
void
|
|
||||||
gst_property_probe_probe_property (GstPropertyProbe * probe,
|
|
||||||
const GParamSpec * pspec)
|
|
||||||
{
|
|
||||||
GstPropertyProbeInterface *iface;
|
|
||||||
|
|
||||||
g_return_if_fail (probe != NULL);
|
|
||||||
g_return_if_fail (pspec != NULL);
|
|
||||||
|
|
||||||
iface = GST_PROPERTY_PROBE_GET_IFACE (probe);
|
|
||||||
|
|
||||||
if (iface->probe_property)
|
|
||||||
iface->probe_property (probe, pspec->param_id, pspec);
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
|
||||||
* gst_property_probe_probe_property_name:
|
|
||||||
* @probe: the #GstPropertyProbe to check.
|
|
||||||
* @name: name of the property to return.
|
|
||||||
*
|
|
||||||
* Returns the #GParamSpec for the given property. It's similar to
|
|
||||||
* g_object_class_find_property (), except that this function only
|
|
||||||
* takes "probe'able" properties into account.
|
|
||||||
*
|
|
||||||
* Returns: the #GParamSpec that belongs to the given property.
|
|
||||||
*/
|
|
||||||
|
|
||||||
void
|
|
||||||
gst_property_probe_probe_property_name (GstPropertyProbe * probe,
|
|
||||||
const gchar * name)
|
|
||||||
{
|
|
||||||
const GParamSpec *pspec;
|
|
||||||
|
|
||||||
g_return_if_fail (probe != NULL);
|
|
||||||
g_return_if_fail (name != NULL);
|
|
||||||
|
|
||||||
pspec = g_object_class_find_property (G_OBJECT_CLASS (probe), name);
|
|
||||||
if (!pspec) {
|
|
||||||
g_warning ("No such property %s", name);
|
|
||||||
return;
|
|
||||||
}
|
|
||||||
|
|
||||||
gst_property_probe_probe_property (probe, pspec);
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
|
||||||
* gst_property_probe_needs_probe:
|
|
||||||
* @probe: the #GstPropertyProbe object to which the given property belongs.
|
|
||||||
* @pspec: a #GParamSpec that identifies the property to check.
|
|
||||||
*
|
|
||||||
* Checks whether a property needs a probe. This might be because
|
|
||||||
* the property wasn't initialized before, or because host setup
|
|
||||||
* changed. This might be, for example, because a new device was
|
|
||||||
* added, and thus device probing needs to be refreshed to display
|
|
||||||
* the new device.
|
|
||||||
*
|
|
||||||
* Returns: TRUE if the property needs a new probe, FALSE if not.
|
|
||||||
*/
|
|
||||||
|
|
||||||
gboolean
|
|
||||||
gst_property_probe_needs_probe (GstPropertyProbe * probe,
|
|
||||||
const GParamSpec * pspec)
|
|
||||||
{
|
|
||||||
GstPropertyProbeInterface *iface;
|
|
||||||
|
|
||||||
g_return_val_if_fail (probe != NULL, FALSE);
|
|
||||||
g_return_val_if_fail (pspec != NULL, FALSE);
|
|
||||||
|
|
||||||
iface = GST_PROPERTY_PROBE_GET_IFACE (probe);
|
|
||||||
|
|
||||||
if (iface->needs_probe)
|
|
||||||
return iface->needs_probe (probe, pspec->param_id, pspec);
|
|
||||||
|
|
||||||
return FALSE;
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
|
||||||
* gst_property_probe_needs_probe_name:
|
|
||||||
* @probe: the #GstPropertyProbe object to which the given property belongs.
|
|
||||||
* @name: the name of the property to check.
|
|
||||||
*
|
|
||||||
* Same as gst_property_probe_needs_probe ().
|
|
||||||
*
|
|
||||||
* Returns: TRUE if the property needs a new probe, FALSE if not.
|
|
||||||
*/
|
|
||||||
|
|
||||||
gboolean
|
|
||||||
gst_property_probe_needs_probe_name (GstPropertyProbe * probe,
|
|
||||||
const gchar * name)
|
|
||||||
{
|
|
||||||
const GParamSpec *pspec;
|
|
||||||
|
|
||||||
g_return_val_if_fail (probe != NULL, FALSE);
|
|
||||||
g_return_val_if_fail (name != NULL, FALSE);
|
|
||||||
|
|
||||||
pspec = g_object_class_find_property (G_OBJECT_CLASS (probe), name);
|
|
||||||
if (!pspec) {
|
|
||||||
g_warning ("No such property %s", name);
|
|
||||||
return FALSE;
|
|
||||||
}
|
|
||||||
|
|
||||||
return gst_property_probe_needs_probe (probe, pspec);
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
|
||||||
* gst_property_probe_get_values:
|
|
||||||
* @probe: the #GstPropertyProbe object.
|
|
||||||
* @pspec: the #GParamSpec property identifier.
|
|
||||||
*
|
|
||||||
* Gets the possible (probed) values for the given property,
|
|
||||||
* requires the property to have been probed before.
|
|
||||||
*
|
|
||||||
* Returns: A list of valid values for the given property.
|
|
||||||
*/
|
|
||||||
|
|
||||||
GValueArray *
|
|
||||||
gst_property_probe_get_values (GstPropertyProbe * probe,
|
|
||||||
const GParamSpec * pspec)
|
|
||||||
{
|
|
||||||
GstPropertyProbeInterface *iface;
|
|
||||||
|
|
||||||
g_return_val_if_fail (probe != NULL, NULL);
|
|
||||||
g_return_val_if_fail (pspec != NULL, NULL);
|
|
||||||
|
|
||||||
iface = GST_PROPERTY_PROBE_GET_IFACE (probe);
|
|
||||||
|
|
||||||
if (iface->get_values)
|
|
||||||
return iface->get_values (probe, pspec->param_id, pspec);
|
|
||||||
|
|
||||||
return NULL;
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
|
||||||
* gst_property_probe_get_values_name:
|
|
||||||
* @probe: the #GstPropertyProbe object.
|
|
||||||
* @name: the name of the property to get values for.
|
|
||||||
*
|
|
||||||
* Same as gst_property_probe_get_values ().
|
|
||||||
*
|
|
||||||
* Returns: A list of valid values for the given property.
|
|
||||||
*/
|
|
||||||
|
|
||||||
GValueArray *
|
|
||||||
gst_property_probe_get_values_name (GstPropertyProbe * probe,
|
|
||||||
const gchar * name)
|
|
||||||
{
|
|
||||||
const GParamSpec *pspec;
|
|
||||||
|
|
||||||
g_return_val_if_fail (probe != NULL, NULL);
|
|
||||||
g_return_val_if_fail (name != NULL, NULL);
|
|
||||||
|
|
||||||
pspec = g_object_class_find_property (G_OBJECT_CLASS (probe), name);
|
|
||||||
if (!pspec) {
|
|
||||||
g_warning ("No such property %s", name);
|
|
||||||
return NULL;
|
|
||||||
}
|
|
||||||
|
|
||||||
return gst_property_probe_get_values (probe, pspec);
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
|
||||||
* gst_property_probe_probe_and_get_values:
|
|
||||||
* @probe: the #GstPropertyProbe object.
|
|
||||||
* @pspec: The #GParamSpec property identifier.
|
|
||||||
*
|
|
||||||
* Check whether the given property requires a new probe. If so,
|
|
||||||
* fo the probe. After that, retrieve a value list. Meant as a
|
|
||||||
* utility function that wraps the above functions.
|
|
||||||
*
|
|
||||||
* Return: the list of valid values for this property.
|
|
||||||
*/
|
|
||||||
|
|
||||||
GValueArray *
|
|
||||||
gst_property_probe_probe_and_get_values (GstPropertyProbe * probe,
|
|
||||||
const GParamSpec * pspec)
|
|
||||||
{
|
|
||||||
GstPropertyProbeInterface *iface;
|
|
||||||
|
|
||||||
g_return_val_if_fail (probe != NULL, NULL);
|
|
||||||
g_return_val_if_fail (pspec != NULL, NULL);
|
|
||||||
|
|
||||||
iface = GST_PROPERTY_PROBE_GET_IFACE (probe);
|
|
||||||
|
|
||||||
if (gst_property_probe_needs_probe (probe, pspec))
|
|
||||||
gst_property_probe_probe_property (probe, pspec);
|
|
||||||
|
|
||||||
return gst_property_probe_get_values (probe, pspec);
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
|
||||||
* gst_property_probe_probe_and_get_values_name:
|
|
||||||
* @probe: the #GstPropertyProbe object.
|
|
||||||
* @name: the name of the property to get values for.
|
|
||||||
*
|
|
||||||
* Same as gst_property_probe_probe_and_get_values ().
|
|
||||||
*
|
|
||||||
* Return: the list of valid values for this property.
|
|
||||||
*/
|
|
||||||
|
|
||||||
GValueArray *
|
|
||||||
gst_property_probe_probe_and_get_values_name (GstPropertyProbe * probe,
|
|
||||||
const gchar * name)
|
|
||||||
{
|
|
||||||
const GParamSpec *pspec;
|
|
||||||
|
|
||||||
g_return_val_if_fail (probe != NULL, NULL);
|
|
||||||
g_return_val_if_fail (name != NULL, NULL);
|
|
||||||
|
|
||||||
pspec = g_object_class_find_property (G_OBJECT_CLASS (probe), name);
|
|
||||||
if (!pspec) {
|
|
||||||
g_warning ("No such property %s", name);
|
|
||||||
return NULL;
|
|
||||||
}
|
|
||||||
|
|
||||||
return gst_property_probe_probe_and_get_values (probe, pspec);
|
|
||||||
}
|
|
|
@ -1,97 +0,0 @@
|
||||||
/* GStreamer PropertyProbe
|
|
||||||
* Copyright (C) 2003 David A. Schleef <ds@schleef.org>
|
|
||||||
*
|
|
||||||
* property_probe.h: property_probe interface design
|
|
||||||
*
|
|
||||||
* 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.
|
|
||||||
*/
|
|
||||||
|
|
||||||
#ifndef __GST_PROPERTY_PROBE_H__
|
|
||||||
#define __GST_PROPERTY_PROBE_H__
|
|
||||||
|
|
||||||
#include <gst/gst.h>
|
|
||||||
|
|
||||||
G_BEGIN_DECLS
|
|
||||||
|
|
||||||
#define GST_TYPE_PROPERTY_PROBE \
|
|
||||||
(gst_property_probe_get_type ())
|
|
||||||
#define GST_PROPERTY_PROBE(obj) \
|
|
||||||
(G_TYPE_CHECK_INSTANCE_CAST ((obj), GST_TYPE_PROPERTY_PROBE, GstPropertyProbe))
|
|
||||||
#define GST_IS_PROPERTY_PROBE(obj) \
|
|
||||||
(G_TYPE_CHECK_INSTANCE_TYPE ((obj), GST_TYPE_PROPERTY_PROBE))
|
|
||||||
#define GST_PROPERTY_PROBE_GET_IFACE(obj) \
|
|
||||||
(G_TYPE_INSTANCE_GET_INTERFACE ((obj), GST_TYPE_PROPERTY_PROBE, GstPropertyProbeInterface))
|
|
||||||
|
|
||||||
typedef struct _GstPropertyProbe GstPropertyProbe; /* dummy typedef */
|
|
||||||
|
|
||||||
typedef struct _GstPropertyProbeInterface {
|
|
||||||
GTypeInterface klass;
|
|
||||||
|
|
||||||
/* signals */
|
|
||||||
void (*probe_needed) (GstPropertyProbe *probe,
|
|
||||||
const GParamSpec *pspec);
|
|
||||||
|
|
||||||
/* virtual functions */
|
|
||||||
const GList * (*get_properties) (GstPropertyProbe *probe);
|
|
||||||
gboolean (*needs_probe) (GstPropertyProbe *probe,
|
|
||||||
guint prop_id,
|
|
||||||
const GParamSpec *pspec);
|
|
||||||
void (*probe_property) (GstPropertyProbe *probe,
|
|
||||||
guint prop_id,
|
|
||||||
const GParamSpec *pspec);
|
|
||||||
GValueArray * (*get_values) (GstPropertyProbe *probe,
|
|
||||||
guint prop_id,
|
|
||||||
const GParamSpec *pspec);
|
|
||||||
|
|
||||||
gpointer _gst_reserved[GST_PADDING];
|
|
||||||
} GstPropertyProbeInterface;
|
|
||||||
|
|
||||||
GType gst_property_probe_get_type (void);
|
|
||||||
|
|
||||||
/* virtual class function wrappers */
|
|
||||||
|
|
||||||
/* returns list of GParamSpecs */
|
|
||||||
const GList * gst_property_probe_get_properties (GstPropertyProbe *probe);
|
|
||||||
const GParamSpec *gst_property_probe_get_property (GstPropertyProbe *probe,
|
|
||||||
const gchar *name);
|
|
||||||
|
|
||||||
/* probe one property */
|
|
||||||
void gst_property_probe_probe_property (GstPropertyProbe *probe,
|
|
||||||
const GParamSpec *pspec);
|
|
||||||
void gst_property_probe_probe_property_name (GstPropertyProbe *probe,
|
|
||||||
const gchar *name);
|
|
||||||
|
|
||||||
/* do we need a probe? */
|
|
||||||
gboolean gst_property_probe_needs_probe (GstPropertyProbe *probe,
|
|
||||||
const GParamSpec *pspec);
|
|
||||||
gboolean gst_property_probe_needs_probe_name (GstPropertyProbe *probe,
|
|
||||||
const gchar *name);
|
|
||||||
|
|
||||||
/* returns list of GValues */
|
|
||||||
GValueArray * gst_property_probe_get_values (GstPropertyProbe *probe,
|
|
||||||
const GParamSpec *pspec);
|
|
||||||
GValueArray * gst_property_probe_get_values_name (GstPropertyProbe *probe,
|
|
||||||
const gchar *name);
|
|
||||||
|
|
||||||
/* sugar */
|
|
||||||
GValueArray * gst_property_probe_probe_and_get_values (GstPropertyProbe *probe,
|
|
||||||
const GParamSpec *pspec);
|
|
||||||
GValueArray * gst_property_probe_probe_and_get_values_name (GstPropertyProbe *probe,
|
|
||||||
const gchar *name);
|
|
||||||
|
|
||||||
G_END_DECLS
|
|
||||||
|
|
||||||
#endif /* __GST_PROPERTY_PROBE_H__ */
|
|
|
@ -1,144 +0,0 @@
|
||||||
<?xml version="1.0" encoding="Windows-1252"?>
|
|
||||||
<VisualStudioProject
|
|
||||||
ProjectType="Visual C++"
|
|
||||||
Version="7.10"
|
|
||||||
Name="propertyprobe"
|
|
||||||
ProjectGUID="{979C216F-0ACF-4956-AE00-055A42D6789A}"
|
|
||||||
RootNamespace="propertyprobe"
|
|
||||||
Keyword="Win32Proj">
|
|
||||||
<Platforms>
|
|
||||||
<Platform
|
|
||||||
Name="Win32"/>
|
|
||||||
</Platforms>
|
|
||||||
<Configurations>
|
|
||||||
<Configuration
|
|
||||||
Name="Debug|Win32"
|
|
||||||
OutputDirectory="../../../win32/Debug"
|
|
||||||
IntermediateDirectory="../../../win32/Debug"
|
|
||||||
ConfigurationType="2"
|
|
||||||
CharacterSet="2">
|
|
||||||
<Tool
|
|
||||||
Name="VCCLCompilerTool"
|
|
||||||
Optimization="0"
|
|
||||||
AdditionalIncludeDirectories="../../../../gstreamer/win32;../../../../gstreamer;../../../../gstreamer/libs;../../../../glib;../../../../glib/glib;../../../../glib/gmodule;"../../../gst-libs";../../../../popt/include;../../../../libxml2/include/libxml2"
|
|
||||||
PreprocessorDefinitions="WIN32;_DEBUG;_WINDOWS;_USRDLL;HAVE_CONFIG_H;_USE_MATH_DEFINES"
|
|
||||||
MinimalRebuild="TRUE"
|
|
||||||
BasicRuntimeChecks="3"
|
|
||||||
RuntimeLibrary="3"
|
|
||||||
UsePrecompiledHeader="0"
|
|
||||||
WarningLevel="3"
|
|
||||||
Detect64BitPortabilityProblems="TRUE"
|
|
||||||
DebugInformationFormat="4"/>
|
|
||||||
<Tool
|
|
||||||
Name="VCCustomBuildTool"/>
|
|
||||||
<Tool
|
|
||||||
Name="VCLinkerTool"
|
|
||||||
AdditionalDependencies="glib-2.0.lib gmodule-2.0.lib gthread-2.0.lib gobject-2.0.lib libgstreamer.lib gstbytestream.lib iconv.lib intl.lib"
|
|
||||||
OutputFile="$(OutDir)/gstpropertyprobe.dll"
|
|
||||||
LinkIncremental="2"
|
|
||||||
AdditionalLibraryDirectories="../../../../gstreamer/win32/Debug;../../../../glib/glib;../../../../glib/gmodule;../../../../glib/gthread;../../../../glib/gobject;../../../../gettext/lib;../../../../libiconv/lib"
|
|
||||||
ModuleDefinitionFile=""
|
|
||||||
GenerateDebugInformation="TRUE"
|
|
||||||
ProgramDatabaseFile="$(OutDir)/propertyprobe.pdb"
|
|
||||||
SubSystem="2"
|
|
||||||
OptimizeReferences="2"
|
|
||||||
ImportLibrary="$(OutDir)/gstpropertyprobe.lib"
|
|
||||||
TargetMachine="1"/>
|
|
||||||
<Tool
|
|
||||||
Name="VCMIDLTool"/>
|
|
||||||
<Tool
|
|
||||||
Name="VCPostBuildEventTool"
|
|
||||||
CommandLine="copy /Y $(TargetPath) c:\gstreamer\plugins"/>
|
|
||||||
<Tool
|
|
||||||
Name="VCPreBuildEventTool"/>
|
|
||||||
<Tool
|
|
||||||
Name="VCPreLinkEventTool"/>
|
|
||||||
<Tool
|
|
||||||
Name="VCResourceCompilerTool"/>
|
|
||||||
<Tool
|
|
||||||
Name="VCWebServiceProxyGeneratorTool"/>
|
|
||||||
<Tool
|
|
||||||
Name="VCXMLDataGeneratorTool"/>
|
|
||||||
<Tool
|
|
||||||
Name="VCWebDeploymentTool"/>
|
|
||||||
<Tool
|
|
||||||
Name="VCManagedWrapperGeneratorTool"/>
|
|
||||||
<Tool
|
|
||||||
Name="VCAuxiliaryManagedWrapperGeneratorTool"/>
|
|
||||||
</Configuration>
|
|
||||||
<Configuration
|
|
||||||
Name="Release|Win32"
|
|
||||||
OutputDirectory="../../../win32/Release"
|
|
||||||
IntermediateDirectory="../../../win32/Release"
|
|
||||||
ConfigurationType="2"
|
|
||||||
CharacterSet="2">
|
|
||||||
<Tool
|
|
||||||
Name="VCCLCompilerTool"
|
|
||||||
AdditionalIncludeDirectories="../../../../gstreamer/win32;../../../../gstreamer;../../../../gstreamer/libs;../../../../glib;../../../../glib/glib;../../../../glib/gmodule;"../../../gst-libs";../../../../popt/include;../../../../libxml2/include/libxml2"
|
|
||||||
PreprocessorDefinitions="WIN32;NDEBUG;GST_DISABLE_GST_DEBUG;_WINDOWS;_USRDLL;HAVE_CONFIG_H;_USE_MATH_DEFINES"
|
|
||||||
RuntimeLibrary="2"
|
|
||||||
UsePrecompiledHeader="0"
|
|
||||||
WarningLevel="3"
|
|
||||||
Detect64BitPortabilityProblems="TRUE"
|
|
||||||
DebugInformationFormat="3"/>
|
|
||||||
<Tool
|
|
||||||
Name="VCCustomBuildTool"/>
|
|
||||||
<Tool
|
|
||||||
Name="VCLinkerTool"
|
|
||||||
AdditionalDependencies="glib-2.0.lib gmodule-2.0.lib gthread-2.0.lib gobject-2.0.lib libgstreamer.lib gstbytestream.lib iconv.lib intl.lib"
|
|
||||||
OutputFile="$(OutDir)/gstpropertyprobe.dll"
|
|
||||||
LinkIncremental="1"
|
|
||||||
AdditionalLibraryDirectories="../../../../gstreamer/win32/Release;../../../../glib/glib;../../../../glib/gmodule;../../../../glib/gthread;../../../../glib/gobject;../../../../gettext/lib;../../../../libiconv/lib"
|
|
||||||
ModuleDefinitionFile=""
|
|
||||||
GenerateDebugInformation="TRUE"
|
|
||||||
SubSystem="2"
|
|
||||||
OptimizeReferences="2"
|
|
||||||
EnableCOMDATFolding="2"
|
|
||||||
ImportLibrary="$(OutDir)/gstpropertyprobe.lib"
|
|
||||||
TargetMachine="1"/>
|
|
||||||
<Tool
|
|
||||||
Name="VCMIDLTool"/>
|
|
||||||
<Tool
|
|
||||||
Name="VCPostBuildEventTool"
|
|
||||||
CommandLine="copy /Y $(TargetPath) c:\gstreamer\plugins"/>
|
|
||||||
<Tool
|
|
||||||
Name="VCPreBuildEventTool"/>
|
|
||||||
<Tool
|
|
||||||
Name="VCPreLinkEventTool"/>
|
|
||||||
<Tool
|
|
||||||
Name="VCResourceCompilerTool"/>
|
|
||||||
<Tool
|
|
||||||
Name="VCWebServiceProxyGeneratorTool"/>
|
|
||||||
<Tool
|
|
||||||
Name="VCXMLDataGeneratorTool"/>
|
|
||||||
<Tool
|
|
||||||
Name="VCWebDeploymentTool"/>
|
|
||||||
<Tool
|
|
||||||
Name="VCManagedWrapperGeneratorTool"/>
|
|
||||||
<Tool
|
|
||||||
Name="VCAuxiliaryManagedWrapperGeneratorTool"/>
|
|
||||||
</Configuration>
|
|
||||||
</Configurations>
|
|
||||||
<References>
|
|
||||||
</References>
|
|
||||||
<Files>
|
|
||||||
<Filter
|
|
||||||
Name="Source Files"
|
|
||||||
Filter="cpp;c;cxx;def;odl;idl;hpj;bat;asm;asmx"
|
|
||||||
UniqueIdentifier="{4FC737F1-C7A5-4376-A066-2A32D752A2FF}">
|
|
||||||
<File
|
|
||||||
RelativePath=".\propertyprobe.c">
|
|
||||||
</File>
|
|
||||||
</Filter>
|
|
||||||
<Filter
|
|
||||||
Name="Header Files"
|
|
||||||
Filter="h;hpp;hxx;hm;inl;inc;xsd"
|
|
||||||
UniqueIdentifier="{93995380-89BD-4b04-88EB-625FBE52EBFB}">
|
|
||||||
<File
|
|
||||||
RelativePath=".\propertyprobe.h">
|
|
||||||
</File>
|
|
||||||
</Filter>
|
|
||||||
</Files>
|
|
||||||
<Globals>
|
|
||||||
</Globals>
|
|
||||||
</VisualStudioProject>
|
|
2
gst-libs/gst/tuner/.gitignore
vendored
2
gst-libs/gst/tuner/.gitignore
vendored
|
@ -1,2 +0,0 @@
|
||||||
tuner-enumtypes.[ch]
|
|
||||||
tuner-marshal.[ch]
|
|
|
@ -1,49 +0,0 @@
|
||||||
# variables used for enum/marshal generation
|
|
||||||
glib_enum_headers=$(tuner_headers)
|
|
||||||
glib_enum_define=GST_TUNER
|
|
||||||
glib_enum_prefix=gst_tuner
|
|
||||||
|
|
||||||
libgsttunerincludedir = \
|
|
||||||
$(includedir)/gstreamer-@GST_MAJORMINOR@/gst/tuner
|
|
||||||
|
|
||||||
tuner_headers = \
|
|
||||||
tuner.h \
|
|
||||||
tunernorm.h \
|
|
||||||
tunerchannel.h
|
|
||||||
|
|
||||||
built_sources = \
|
|
||||||
tuner-marshal.c \
|
|
||||||
tuner-enumtypes.c
|
|
||||||
|
|
||||||
built_headers = \
|
|
||||||
tuner-marshal.h \
|
|
||||||
tuner-enumtypes.h
|
|
||||||
|
|
||||||
libgsttunerinclude_HEADERS = \
|
|
||||||
$(tuner_headers)
|
|
||||||
|
|
||||||
nodist_libgsttunerinclude_HEADERS = \
|
|
||||||
tuner-enumtypes.h
|
|
||||||
|
|
||||||
noinst_LTLIBRARIES = libgsttuner.la
|
|
||||||
|
|
||||||
libgsttuner_la_SOURCES = \
|
|
||||||
tuner.c \
|
|
||||||
tunernorm.c \
|
|
||||||
tunerchannel.c
|
|
||||||
|
|
||||||
nodist_libgsttuner_la_SOURCES = \
|
|
||||||
$(built_sources) \
|
|
||||||
tuner-marshal.h
|
|
||||||
|
|
||||||
libgsttuner_la_CFLAGS = $(GST_CFLAGS)
|
|
||||||
|
|
||||||
BUILT_SOURCES = \
|
|
||||||
$(built_sources) \
|
|
||||||
$(built_headers)
|
|
||||||
|
|
||||||
EXTRA_DIST = tuner-marshal.list
|
|
||||||
|
|
||||||
CLEANFILES = $(BUILT_SOURCES)
|
|
||||||
|
|
||||||
include $(top_srcdir)/common/glib-gen.mak
|
|
|
@ -1,2 +0,0 @@
|
||||||
VOID:OBJECT,ULONG
|
|
||||||
VOID:OBJECT,INT
|
|
|
@ -1,404 +0,0 @@
|
||||||
/* GStreamer Tuner
|
|
||||||
* Copyright (C) 2003 Ronald Bultje <rbultje@ronald.bitfreak.net>
|
|
||||||
*
|
|
||||||
* tuner.c: tuner design virtual class function wrappers
|
|
||||||
*
|
|
||||||
* 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
|
|
||||||
|
|
||||||
#include "tuner.h"
|
|
||||||
#include "tuner-marshal.h"
|
|
||||||
|
|
||||||
#include <string.h>
|
|
||||||
|
|
||||||
enum
|
|
||||||
{
|
|
||||||
NORM_CHANGED,
|
|
||||||
CHANNEL_CHANGED,
|
|
||||||
FREQUENCY_CHANGED,
|
|
||||||
SIGNAL_CHANGED,
|
|
||||||
LAST_SIGNAL
|
|
||||||
};
|
|
||||||
|
|
||||||
static void gst_tuner_class_init (GstTunerClass * klass);
|
|
||||||
|
|
||||||
static guint gst_tuner_signals[LAST_SIGNAL] = { 0 };
|
|
||||||
|
|
||||||
GType
|
|
||||||
gst_tuner_get_type (void)
|
|
||||||
{
|
|
||||||
static GType gst_tuner_type = 0;
|
|
||||||
|
|
||||||
if (!gst_tuner_type) {
|
|
||||||
static const GTypeInfo gst_tuner_info = {
|
|
||||||
sizeof (GstTunerClass),
|
|
||||||
(GBaseInitFunc) gst_tuner_class_init,
|
|
||||||
NULL,
|
|
||||||
NULL,
|
|
||||||
NULL,
|
|
||||||
NULL,
|
|
||||||
0,
|
|
||||||
0,
|
|
||||||
NULL,
|
|
||||||
};
|
|
||||||
|
|
||||||
gst_tuner_type = g_type_register_static (G_TYPE_INTERFACE,
|
|
||||||
"GstTuner", &gst_tuner_info, 0);
|
|
||||||
g_type_interface_add_prerequisite (gst_tuner_type,
|
|
||||||
GST_TYPE_IMPLEMENTS_INTERFACE);
|
|
||||||
}
|
|
||||||
|
|
||||||
return gst_tuner_type;
|
|
||||||
}
|
|
||||||
|
|
||||||
static void
|
|
||||||
gst_tuner_class_init (GstTunerClass * klass)
|
|
||||||
{
|
|
||||||
static gboolean initialized = FALSE;
|
|
||||||
|
|
||||||
if (!initialized) {
|
|
||||||
gst_tuner_signals[NORM_CHANGED] =
|
|
||||||
g_signal_new ("norm-changed",
|
|
||||||
GST_TYPE_TUNER, G_SIGNAL_RUN_LAST,
|
|
||||||
G_STRUCT_OFFSET (GstTunerClass, norm_changed),
|
|
||||||
NULL, NULL,
|
|
||||||
g_cclosure_marshal_VOID__OBJECT, G_TYPE_NONE, 1, GST_TYPE_TUNER_NORM);
|
|
||||||
gst_tuner_signals[CHANNEL_CHANGED] =
|
|
||||||
g_signal_new ("channel-changed",
|
|
||||||
GST_TYPE_TUNER, G_SIGNAL_RUN_LAST,
|
|
||||||
G_STRUCT_OFFSET (GstTunerClass, channel_changed),
|
|
||||||
NULL, NULL,
|
|
||||||
g_cclosure_marshal_VOID__OBJECT, G_TYPE_NONE, 1,
|
|
||||||
GST_TYPE_TUNER_CHANNEL);
|
|
||||||
gst_tuner_signals[FREQUENCY_CHANGED] =
|
|
||||||
g_signal_new ("frequency-changed",
|
|
||||||
GST_TYPE_TUNER, G_SIGNAL_RUN_LAST,
|
|
||||||
G_STRUCT_OFFSET (GstTunerClass, frequency_changed),
|
|
||||||
NULL, NULL,
|
|
||||||
gst_tuner_marshal_VOID__OBJECT_ULONG, G_TYPE_NONE, 2,
|
|
||||||
GST_TYPE_TUNER_CHANNEL, G_TYPE_ULONG);
|
|
||||||
gst_tuner_signals[SIGNAL_CHANGED] =
|
|
||||||
g_signal_new ("signal-changed",
|
|
||||||
GST_TYPE_TUNER, G_SIGNAL_RUN_LAST,
|
|
||||||
G_STRUCT_OFFSET (GstTunerClass, signal_changed),
|
|
||||||
NULL, NULL,
|
|
||||||
gst_tuner_marshal_VOID__OBJECT_INT, G_TYPE_NONE, 2,
|
|
||||||
GST_TYPE_TUNER_CHANNEL, G_TYPE_INT);
|
|
||||||
|
|
||||||
initialized = TRUE;
|
|
||||||
}
|
|
||||||
|
|
||||||
/* default virtual functions */
|
|
||||||
klass->list_channels = NULL;
|
|
||||||
klass->set_channel = NULL;
|
|
||||||
klass->get_channel = NULL;
|
|
||||||
|
|
||||||
klass->list_norms = NULL;
|
|
||||||
klass->set_norm = NULL;
|
|
||||||
klass->get_norm = NULL;
|
|
||||||
|
|
||||||
klass->set_frequency = NULL;
|
|
||||||
klass->get_frequency = NULL;
|
|
||||||
klass->signal_strength = NULL;
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
|
||||||
* gst_tuner_list_channels:
|
|
||||||
* @tuner: the #GstTuner (a #GstElement) to get the channels from.
|
|
||||||
*
|
|
||||||
* Retrieve a list of channels (e.g. 'composite', 's-video', ...)
|
|
||||||
* from the given tuner object.
|
|
||||||
*
|
|
||||||
* Returns: a list of channels available on this tuner.
|
|
||||||
*/
|
|
||||||
|
|
||||||
const GList *
|
|
||||||
gst_tuner_list_channels (GstTuner * tuner)
|
|
||||||
{
|
|
||||||
GstTunerClass *klass = GST_TUNER_GET_CLASS (tuner);
|
|
||||||
|
|
||||||
if (klass->list_channels) {
|
|
||||||
return klass->list_channels (tuner);
|
|
||||||
}
|
|
||||||
|
|
||||||
return NULL;
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
|
||||||
* gst_tuner_set_channel:
|
|
||||||
* @tuner: the #GstTuner (a #GstElement) that owns the channel.
|
|
||||||
* @channel: the channel to tune to.
|
|
||||||
*
|
|
||||||
* Tunes the object to the given channel.
|
|
||||||
*/
|
|
||||||
|
|
||||||
void
|
|
||||||
gst_tuner_set_channel (GstTuner * tuner, GstTunerChannel * channel)
|
|
||||||
{
|
|
||||||
GstTunerClass *klass = GST_TUNER_GET_CLASS (tuner);
|
|
||||||
|
|
||||||
if (klass->set_channel) {
|
|
||||||
klass->set_channel (tuner, channel);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
|
||||||
* gst_Tuner_get_channel:
|
|
||||||
* @tuner: the #GstTuner (a #GstElement) to get the current channel from.
|
|
||||||
*
|
|
||||||
* Retrieve the current channel from the tuner.
|
|
||||||
*
|
|
||||||
* Returns: the current channel of the tuner object.
|
|
||||||
*/
|
|
||||||
|
|
||||||
GstTunerChannel *
|
|
||||||
gst_tuner_get_channel (GstTuner * tuner)
|
|
||||||
{
|
|
||||||
GstTunerClass *klass = GST_TUNER_GET_CLASS (tuner);
|
|
||||||
|
|
||||||
if (klass->get_channel) {
|
|
||||||
return klass->get_channel (tuner);
|
|
||||||
}
|
|
||||||
|
|
||||||
return NULL;
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
|
||||||
* gst_tuner_get_norms_list:
|
|
||||||
* @tuner: the #GstTuner (*a #GstElement) to get the list of norms from.
|
|
||||||
*
|
|
||||||
* Retrieve a list of available norms on the currently tuned channel
|
|
||||||
* from the given tuner object.
|
|
||||||
*
|
|
||||||
* Returns: A list of norms available on the current channel for this
|
|
||||||
* tuner object.
|
|
||||||
*/
|
|
||||||
|
|
||||||
const GList *
|
|
||||||
gst_tuner_list_norms (GstTuner * tuner)
|
|
||||||
{
|
|
||||||
GstTunerClass *klass = GST_TUNER_GET_CLASS (tuner);
|
|
||||||
|
|
||||||
if (klass->list_norms) {
|
|
||||||
return klass->list_norms (tuner);
|
|
||||||
}
|
|
||||||
|
|
||||||
return NULL;
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
|
||||||
* gst_tuner_set_norm:
|
|
||||||
* @tuner: the #GstTuner (a #GstElement) to set the norm on.
|
|
||||||
* @norm: the norm to use for the current channel.
|
|
||||||
*
|
|
||||||
* Changes the video norm on this tuner to the given norm.
|
|
||||||
*/
|
|
||||||
|
|
||||||
void
|
|
||||||
gst_tuner_set_norm (GstTuner * tuner, GstTunerNorm * norm)
|
|
||||||
{
|
|
||||||
GstTunerClass *klass = GST_TUNER_GET_CLASS (tuner);
|
|
||||||
|
|
||||||
if (klass->set_norm) {
|
|
||||||
klass->set_norm (tuner, norm);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
|
||||||
* gst_tuner_get_norm:
|
|
||||||
* @tuner: the #GstTuner (a #GstElement) to get the current norm from.
|
|
||||||
*
|
|
||||||
* Get the current video norm from the given tuner object for the
|
|
||||||
* currently selected channel.
|
|
||||||
*
|
|
||||||
* Returns: the current norm.
|
|
||||||
*/
|
|
||||||
|
|
||||||
GstTunerNorm *
|
|
||||||
gst_tuner_get_norm (GstTuner * tuner)
|
|
||||||
{
|
|
||||||
GstTunerClass *klass = GST_TUNER_GET_CLASS (tuner);
|
|
||||||
|
|
||||||
if (klass->get_norm) {
|
|
||||||
return klass->get_norm (tuner);
|
|
||||||
}
|
|
||||||
|
|
||||||
return NULL;
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
|
||||||
* gst_tuner_set_frequency:
|
|
||||||
* @tuner: the #Gsttuner (a #GstElement) that owns the given channel.
|
|
||||||
* @channel: the #GstTunerChannel to set the frequency on.
|
|
||||||
* @frequency: the frequency to tune in to.
|
|
||||||
*
|
|
||||||
* Sets a tuning frequency on the given tuner/channel. Note that this
|
|
||||||
* requires the given channel to be a "tuning" channel, which can be
|
|
||||||
* checked using GST_TUNER_CHANNEL_HAS_FLAG (), with the proper flag
|
|
||||||
* being GST_TUNER_CHANNEL_FREQUENCY.
|
|
||||||
*/
|
|
||||||
|
|
||||||
void
|
|
||||||
gst_tuner_set_frequency (GstTuner * tuner,
|
|
||||||
GstTunerChannel * channel, gulong frequency)
|
|
||||||
{
|
|
||||||
GstTunerClass *klass = GST_TUNER_GET_CLASS (tuner);
|
|
||||||
|
|
||||||
g_return_if_fail (GST_TUNER_CHANNEL_HAS_FLAG (channel,
|
|
||||||
GST_TUNER_CHANNEL_FREQUENCY));
|
|
||||||
|
|
||||||
if (klass->set_frequency) {
|
|
||||||
klass->set_frequency (tuner, channel, frequency);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
|
||||||
* gst_tuner_get_frequency:
|
|
||||||
* @tuner: the #GstTuner (a #GstElement) that owns the given channel.
|
|
||||||
* @channel: the #GstTunerChannel to retrieve the frequency from.
|
|
||||||
*
|
|
||||||
* Retrieve the current frequency from the given channel. The same
|
|
||||||
* applies as for set_frequency (): check the flag.
|
|
||||||
*
|
|
||||||
* Returns: the current frequency, or 0 on error.
|
|
||||||
*/
|
|
||||||
|
|
||||||
gulong
|
|
||||||
gst_tuner_get_frequency (GstTuner * tuner, GstTunerChannel * channel)
|
|
||||||
{
|
|
||||||
GstTunerClass *klass = GST_TUNER_GET_CLASS (tuner);
|
|
||||||
|
|
||||||
g_return_val_if_fail (GST_TUNER_CHANNEL_HAS_FLAG (channel,
|
|
||||||
GST_TUNER_CHANNEL_FREQUENCY), 0);
|
|
||||||
|
|
||||||
if (klass->get_frequency) {
|
|
||||||
return klass->get_frequency (tuner, channel);
|
|
||||||
}
|
|
||||||
|
|
||||||
return 0;
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
|
||||||
* gst_tuner_get_signal_strength:
|
|
||||||
* @tuner: the #GstTuner (a #GstElement) that owns the given channel.
|
|
||||||
* @channel: the #GstTunerChannel to get the signal strength from.
|
|
||||||
*
|
|
||||||
* get the strength of the signal on this channel. Note that this
|
|
||||||
* requires the current channel to be a "tuning" channel, e.g. a
|
|
||||||
* channel on which frequency can be set. This can be checked using
|
|
||||||
* GST_TUNER_CHANNEL_HAS_FLAG (), and the appropriate flag to check
|
|
||||||
* for is GST_TUNER_CHANNEL_FREQUENCY.
|
|
||||||
*
|
|
||||||
* Returns: signal strength, or 0 on error.
|
|
||||||
*/
|
|
||||||
|
|
||||||
gint
|
|
||||||
gst_tuner_signal_strength (GstTuner * tuner, GstTunerChannel * channel)
|
|
||||||
{
|
|
||||||
GstTunerClass *klass = GST_TUNER_GET_CLASS (tuner);
|
|
||||||
|
|
||||||
g_return_val_if_fail (GST_TUNER_CHANNEL_HAS_FLAG (channel,
|
|
||||||
GST_TUNER_CHANNEL_FREQUENCY), 0);
|
|
||||||
|
|
||||||
if (klass->signal_strength) {
|
|
||||||
return klass->signal_strength (tuner, channel);
|
|
||||||
}
|
|
||||||
|
|
||||||
return 0;
|
|
||||||
}
|
|
||||||
|
|
||||||
GstTunerNorm *
|
|
||||||
gst_tuner_find_norm_by_name (GstTuner * tuner, gchar * norm)
|
|
||||||
{
|
|
||||||
GList *walk;
|
|
||||||
|
|
||||||
g_return_val_if_fail (GST_TUNER (tuner), NULL);
|
|
||||||
g_return_val_if_fail (norm != NULL, NULL);
|
|
||||||
|
|
||||||
walk = (GList *) gst_tuner_list_norms (tuner);
|
|
||||||
while (walk) {
|
|
||||||
if (strcmp (GST_TUNER_NORM (walk->data)->label, norm) == 0)
|
|
||||||
return GST_TUNER_NORM (walk->data);
|
|
||||||
walk = g_list_next (walk);
|
|
||||||
}
|
|
||||||
return NULL;
|
|
||||||
}
|
|
||||||
|
|
||||||
GstTunerChannel *
|
|
||||||
gst_tuner_find_channel_by_name (GstTuner * tuner, gchar * channel)
|
|
||||||
{
|
|
||||||
GList *walk;
|
|
||||||
|
|
||||||
g_return_val_if_fail (GST_TUNER (tuner), NULL);
|
|
||||||
g_return_val_if_fail (channel != NULL, NULL);
|
|
||||||
|
|
||||||
walk = (GList *) gst_tuner_list_channels (tuner);
|
|
||||||
while (walk) {
|
|
||||||
if (strcmp (GST_TUNER_CHANNEL (walk->data)->label, channel) == 0)
|
|
||||||
return GST_TUNER_CHANNEL (walk->data);
|
|
||||||
walk = g_list_next (walk);
|
|
||||||
}
|
|
||||||
return NULL;
|
|
||||||
}
|
|
||||||
|
|
||||||
void
|
|
||||||
gst_tuner_channel_changed (GstTuner * tuner, GstTunerChannel * channel)
|
|
||||||
{
|
|
||||||
g_return_if_fail (GST_IS_TUNER (tuner));
|
|
||||||
g_return_if_fail (GST_IS_TUNER_CHANNEL (channel));
|
|
||||||
|
|
||||||
g_signal_emit (G_OBJECT (tuner),
|
|
||||||
gst_tuner_signals[CHANNEL_CHANGED], 0, channel);
|
|
||||||
}
|
|
||||||
|
|
||||||
void
|
|
||||||
gst_tuner_norm_changed (GstTuner * tuner, GstTunerNorm * norm)
|
|
||||||
{
|
|
||||||
g_return_if_fail (GST_IS_TUNER (tuner));
|
|
||||||
g_return_if_fail (GST_IS_TUNER_NORM (norm));
|
|
||||||
|
|
||||||
g_signal_emit (G_OBJECT (tuner), gst_tuner_signals[NORM_CHANGED], 0, norm);
|
|
||||||
}
|
|
||||||
|
|
||||||
void
|
|
||||||
gst_tuner_frequency_changed (GstTuner * tuner,
|
|
||||||
GstTunerChannel * channel, gulong frequency)
|
|
||||||
{
|
|
||||||
g_return_if_fail (GST_IS_TUNER (tuner));
|
|
||||||
g_return_if_fail (GST_IS_TUNER_CHANNEL (channel));
|
|
||||||
|
|
||||||
g_signal_emit (G_OBJECT (tuner),
|
|
||||||
gst_tuner_signals[FREQUENCY_CHANGED], 0, channel, frequency);
|
|
||||||
|
|
||||||
g_signal_emit_by_name (G_OBJECT (channel), "frequency_changed", frequency);
|
|
||||||
}
|
|
||||||
|
|
||||||
void
|
|
||||||
gst_tuner_signal_changed (GstTuner * tuner,
|
|
||||||
GstTunerChannel * channel, gint signal)
|
|
||||||
{
|
|
||||||
g_return_if_fail (GST_IS_TUNER (tuner));
|
|
||||||
g_return_if_fail (GST_IS_TUNER_CHANNEL (channel));
|
|
||||||
|
|
||||||
g_signal_emit (G_OBJECT (tuner),
|
|
||||||
gst_tuner_signals[SIGNAL_CHANGED], 0, channel, signal);
|
|
||||||
|
|
||||||
g_signal_emit_by_name (G_OBJECT (channel), "signal_changed", signal);
|
|
||||||
}
|
|
|
@ -1,127 +0,0 @@
|
||||||
/* GStreamer Tuner
|
|
||||||
* Copyright (C) 2003 Ronald Bultje <rbultje@ronald.bitfreak.net>
|
|
||||||
*
|
|
||||||
* tuner.h: tuner interface design
|
|
||||||
*
|
|
||||||
* 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.
|
|
||||||
*/
|
|
||||||
|
|
||||||
#ifndef __GST_TUNER_H__
|
|
||||||
#define __GST_TUNER_H__
|
|
||||||
|
|
||||||
#include <gst/gst.h>
|
|
||||||
#include <gst/tuner/tunernorm.h>
|
|
||||||
#include <gst/tuner/tunerchannel.h>
|
|
||||||
#include <gst/tuner/tuner-enumtypes.h>
|
|
||||||
|
|
||||||
G_BEGIN_DECLS
|
|
||||||
|
|
||||||
#define GST_TYPE_TUNER \
|
|
||||||
(gst_tuner_get_type ())
|
|
||||||
#define GST_TUNER(obj) \
|
|
||||||
(GST_IMPLEMENTS_INTERFACE_CHECK_INSTANCE_CAST ((obj), GST_TYPE_TUNER, GstTuner))
|
|
||||||
#define GST_TUNER_CLASS(klass) \
|
|
||||||
(G_TYPE_CHECK_CLASS_CAST ((klass), GST_TYPE_TUNER, GstTunerClass))
|
|
||||||
#define GST_IS_TUNER(obj) \
|
|
||||||
(GST_IMPLEMENTS_INTERFACE_CHECK_INSTANCE_TYPE ((obj), GST_TYPE_TUNER))
|
|
||||||
#define GST_IS_TUNER_CLASS(klass) \
|
|
||||||
(G_TYPE_CHECK_CLASS_TYPE ((klass), GST_TYPE_TUNER))
|
|
||||||
#define GST_TUNER_GET_CLASS(inst) \
|
|
||||||
(G_TYPE_INSTANCE_GET_INTERFACE ((inst), GST_TYPE_TUNER, GstTunerClass))
|
|
||||||
|
|
||||||
typedef struct _GstTuner GstTuner;
|
|
||||||
|
|
||||||
typedef struct _GstTunerClass {
|
|
||||||
GTypeInterface klass;
|
|
||||||
|
|
||||||
/* virtual functions */
|
|
||||||
const GList * (* list_channels) (GstTuner *tuner);
|
|
||||||
void (* set_channel) (GstTuner *tuner,
|
|
||||||
GstTunerChannel *channel);
|
|
||||||
GstTunerChannel *
|
|
||||||
(* get_channel) (GstTuner *tuner);
|
|
||||||
|
|
||||||
const GList * (* list_norms) (GstTuner *tuner);
|
|
||||||
void (* set_norm) (GstTuner *tuner,
|
|
||||||
GstTunerNorm *norm);
|
|
||||||
GstTunerNorm *(* get_norm) (GstTuner *tuner);
|
|
||||||
|
|
||||||
void (* set_frequency) (GstTuner *tuner,
|
|
||||||
GstTunerChannel *channel,
|
|
||||||
gulong frequency);
|
|
||||||
gulong (* get_frequency) (GstTuner *tuner,
|
|
||||||
GstTunerChannel *channel);
|
|
||||||
gint (* signal_strength) (GstTuner *tuner,
|
|
||||||
GstTunerChannel *channel);
|
|
||||||
|
|
||||||
/* signals */
|
|
||||||
void (*channel_changed) (GstTuner *tuner,
|
|
||||||
GstTunerChannel *channel);
|
|
||||||
void (*norm_changed) (GstTuner *tuner,
|
|
||||||
GstTunerNorm *norm);
|
|
||||||
void (*frequency_changed) (GstTuner *tuner,
|
|
||||||
GstTunerChannel *channel,
|
|
||||||
gulong frequency);
|
|
||||||
void (*signal_changed) (GstTuner *tuner,
|
|
||||||
GstTunerChannel *channel,
|
|
||||||
gint signal);
|
|
||||||
|
|
||||||
gpointer _gst_reserved[GST_PADDING];
|
|
||||||
} GstTunerClass;
|
|
||||||
|
|
||||||
GType gst_tuner_get_type (void);
|
|
||||||
|
|
||||||
/* virtual class function wrappers */
|
|
||||||
const GList * gst_tuner_list_channels (GstTuner *tuner);
|
|
||||||
void gst_tuner_set_channel (GstTuner *tuner,
|
|
||||||
GstTunerChannel *channel);
|
|
||||||
GstTunerChannel *
|
|
||||||
gst_tuner_get_channel (GstTuner *tuner);
|
|
||||||
|
|
||||||
const GList * gst_tuner_list_norms (GstTuner *tuner);
|
|
||||||
void gst_tuner_set_norm (GstTuner *tuner,
|
|
||||||
GstTunerNorm *channel);
|
|
||||||
GstTunerNorm * gst_tuner_get_norm (GstTuner *tuner);
|
|
||||||
|
|
||||||
void gst_tuner_set_frequency (GstTuner *tuner,
|
|
||||||
GstTunerChannel *channel,
|
|
||||||
gulong frequency);
|
|
||||||
gulong gst_tuner_get_frequency (GstTuner *tuner,
|
|
||||||
GstTunerChannel *channel);
|
|
||||||
gint gst_tuner_signal_strength (GstTuner *tuner,
|
|
||||||
GstTunerChannel *channel);
|
|
||||||
|
|
||||||
/* helper functions */
|
|
||||||
GstTunerNorm * gst_tuner_find_norm_by_name (GstTuner *tuner,
|
|
||||||
gchar *norm);
|
|
||||||
GstTunerChannel *gst_tuner_find_channel_by_name (GstTuner *tuner,
|
|
||||||
gchar *channel);
|
|
||||||
|
|
||||||
/* trigger signals */
|
|
||||||
void gst_tuner_channel_changed (GstTuner *tuner,
|
|
||||||
GstTunerChannel *channel);
|
|
||||||
void gst_tuner_norm_changed (GstTuner *tuner,
|
|
||||||
GstTunerNorm *norm);
|
|
||||||
void gst_tuner_frequency_changed (GstTuner *tuner,
|
|
||||||
GstTunerChannel *channel,
|
|
||||||
gulong frequency);
|
|
||||||
void gst_tuner_signal_changed (GstTuner *tuner,
|
|
||||||
GstTunerChannel *channel,
|
|
||||||
gint signal);
|
|
||||||
|
|
||||||
G_END_DECLS
|
|
||||||
|
|
||||||
#endif /* __GST_TUNER_H__ */
|
|
|
@ -1,156 +0,0 @@
|
||||||
<?xml version="1.0" encoding="Windows-1252"?>
|
|
||||||
<VisualStudioProject
|
|
||||||
ProjectType="Visual C++"
|
|
||||||
Version="7.10"
|
|
||||||
Name="tuner"
|
|
||||||
ProjectGUID="{979C216F-0ACF-4956-AE00-055A42D6789C}"
|
|
||||||
RootNamespace="tuner"
|
|
||||||
Keyword="Win32Proj">
|
|
||||||
<Platforms>
|
|
||||||
<Platform
|
|
||||||
Name="Win32"/>
|
|
||||||
</Platforms>
|
|
||||||
<Configurations>
|
|
||||||
<Configuration
|
|
||||||
Name="Debug|Win32"
|
|
||||||
OutputDirectory="../../../win32/Debug"
|
|
||||||
IntermediateDirectory="../../../win32/Debug"
|
|
||||||
ConfigurationType="2"
|
|
||||||
CharacterSet="2">
|
|
||||||
<Tool
|
|
||||||
Name="VCCLCompilerTool"
|
|
||||||
Optimization="0"
|
|
||||||
AdditionalIncludeDirectories="../../../../gstreamer/win32;../../../../gstreamer;../../../../gstreamer/libs;../../../../glib;../../../../glib/glib;../../../../glib/gmodule;"../../../gst-libs";../../../../popt/include;../../../../libxml2/include/libxml2"
|
|
||||||
PreprocessorDefinitions="WIN32;_DEBUG;_WINDOWS;_USRDLL;HAVE_CONFIG_H;_USE_MATH_DEFINES"
|
|
||||||
MinimalRebuild="TRUE"
|
|
||||||
BasicRuntimeChecks="3"
|
|
||||||
RuntimeLibrary="3"
|
|
||||||
UsePrecompiledHeader="0"
|
|
||||||
WarningLevel="3"
|
|
||||||
Detect64BitPortabilityProblems="TRUE"
|
|
||||||
DebugInformationFormat="4"/>
|
|
||||||
<Tool
|
|
||||||
Name="VCCustomBuildTool"/>
|
|
||||||
<Tool
|
|
||||||
Name="VCLinkerTool"
|
|
||||||
AdditionalDependencies="glib-2.0.lib gmodule-2.0.lib gthread-2.0.lib gobject-2.0.lib libgstreamer.lib gstbytestream.lib iconv.lib intl.lib"
|
|
||||||
OutputFile="$(OutDir)/gsttuner.dll"
|
|
||||||
LinkIncremental="2"
|
|
||||||
AdditionalLibraryDirectories="../../../../gstreamer/win32/Debug;../../../../glib/glib;../../../../glib/gmodule;../../../../glib/gthread;../../../../glib/gobject;../../../../gettext/lib;../../../../libiconv/lib"
|
|
||||||
ModuleDefinitionFile="tuner.def"
|
|
||||||
GenerateDebugInformation="TRUE"
|
|
||||||
ProgramDatabaseFile="$(OutDir)/tuner.pdb"
|
|
||||||
SubSystem="2"
|
|
||||||
OptimizeReferences="2"
|
|
||||||
ImportLibrary="$(OutDir)/gsttuner.lib"
|
|
||||||
TargetMachine="1"/>
|
|
||||||
<Tool
|
|
||||||
Name="VCMIDLTool"/>
|
|
||||||
<Tool
|
|
||||||
Name="VCPostBuildEventTool"
|
|
||||||
CommandLine="copy /Y $(TargetPath) c:\gstreamer\plugins"/>
|
|
||||||
<Tool
|
|
||||||
Name="VCPreBuildEventTool"/>
|
|
||||||
<Tool
|
|
||||||
Name="VCPreLinkEventTool"/>
|
|
||||||
<Tool
|
|
||||||
Name="VCResourceCompilerTool"/>
|
|
||||||
<Tool
|
|
||||||
Name="VCWebServiceProxyGeneratorTool"/>
|
|
||||||
<Tool
|
|
||||||
Name="VCXMLDataGeneratorTool"/>
|
|
||||||
<Tool
|
|
||||||
Name="VCWebDeploymentTool"/>
|
|
||||||
<Tool
|
|
||||||
Name="VCManagedWrapperGeneratorTool"/>
|
|
||||||
<Tool
|
|
||||||
Name="VCAuxiliaryManagedWrapperGeneratorTool"/>
|
|
||||||
</Configuration>
|
|
||||||
<Configuration
|
|
||||||
Name="Release|Win32"
|
|
||||||
OutputDirectory="../../../win32/Release"
|
|
||||||
IntermediateDirectory="../../../win32/Release"
|
|
||||||
ConfigurationType="2"
|
|
||||||
CharacterSet="2">
|
|
||||||
<Tool
|
|
||||||
Name="VCCLCompilerTool"
|
|
||||||
AdditionalIncludeDirectories="../../../../gstreamer/win32;../../../../gstreamer;../../../../gstreamer/libs;../../../../glib;../../../../glib/glib;../../../../glib/gmodule;"../../../gst-libs";../../../../popt/include;../../../../libxml2/include/libxml2"
|
|
||||||
PreprocessorDefinitions="WIN32;NDEBUG;GST_DISABLE_GST_DEBUG;_WINDOWS;_USRDLL;HAVE_CONFIG_H;_USE_MATH_DEFINES"
|
|
||||||
RuntimeLibrary="2"
|
|
||||||
UsePrecompiledHeader="0"
|
|
||||||
WarningLevel="3"
|
|
||||||
Detect64BitPortabilityProblems="TRUE"
|
|
||||||
DebugInformationFormat="3"/>
|
|
||||||
<Tool
|
|
||||||
Name="VCCustomBuildTool"/>
|
|
||||||
<Tool
|
|
||||||
Name="VCLinkerTool"
|
|
||||||
AdditionalDependencies="glib-2.0.lib gmodule-2.0.lib gthread-2.0.lib gobject-2.0.lib libgstreamer.lib gstbytestream.lib iconv.lib intl.lib"
|
|
||||||
OutputFile="$(OutDir)/gsttuner.dll"
|
|
||||||
LinkIncremental="1"
|
|
||||||
AdditionalLibraryDirectories="../../../../gstreamer/win32/Release;../../../../glib/glib;../../../../glib/gmodule;../../../../glib/gthread;../../../../glib/gobject;../../../../gettext/lib;../../../../libiconv/lib"
|
|
||||||
ModuleDefinitionFile="tuner.def"
|
|
||||||
GenerateDebugInformation="TRUE"
|
|
||||||
SubSystem="2"
|
|
||||||
OptimizeReferences="2"
|
|
||||||
EnableCOMDATFolding="2"
|
|
||||||
ImportLibrary="$(OutDir)/gsttuner.lib"
|
|
||||||
TargetMachine="1"/>
|
|
||||||
<Tool
|
|
||||||
Name="VCMIDLTool"/>
|
|
||||||
<Tool
|
|
||||||
Name="VCPostBuildEventTool"
|
|
||||||
CommandLine="copy /Y $(TargetPath) c:\gstreamer\plugins"/>
|
|
||||||
<Tool
|
|
||||||
Name="VCPreBuildEventTool"/>
|
|
||||||
<Tool
|
|
||||||
Name="VCPreLinkEventTool"/>
|
|
||||||
<Tool
|
|
||||||
Name="VCResourceCompilerTool"/>
|
|
||||||
<Tool
|
|
||||||
Name="VCWebServiceProxyGeneratorTool"/>
|
|
||||||
<Tool
|
|
||||||
Name="VCXMLDataGeneratorTool"/>
|
|
||||||
<Tool
|
|
||||||
Name="VCWebDeploymentTool"/>
|
|
||||||
<Tool
|
|
||||||
Name="VCManagedWrapperGeneratorTool"/>
|
|
||||||
<Tool
|
|
||||||
Name="VCAuxiliaryManagedWrapperGeneratorTool"/>
|
|
||||||
</Configuration>
|
|
||||||
</Configurations>
|
|
||||||
<References>
|
|
||||||
</References>
|
|
||||||
<Files>
|
|
||||||
<Filter
|
|
||||||
Name="Source Files"
|
|
||||||
Filter="cpp;c;cxx;def;odl;idl;hpj;bat;asm;asmx"
|
|
||||||
UniqueIdentifier="{4FC737F1-C7A5-4376-A066-2A32D752A2FF}">
|
|
||||||
<File
|
|
||||||
RelativePath=".\tuner.c">
|
|
||||||
</File>
|
|
||||||
<File
|
|
||||||
RelativePath=".\tunerchannel.c">
|
|
||||||
</File>
|
|
||||||
<File
|
|
||||||
RelativePath=".\tunernorm.c">
|
|
||||||
</File>
|
|
||||||
</Filter>
|
|
||||||
<Filter
|
|
||||||
Name="Header Files"
|
|
||||||
Filter="h;hpp;hxx;hm;inl;inc;xsd"
|
|
||||||
UniqueIdentifier="{93995380-89BD-4b04-88EB-625FBE52EBFB}">
|
|
||||||
<File
|
|
||||||
RelativePath=".\tuner.h">
|
|
||||||
</File>
|
|
||||||
<File
|
|
||||||
RelativePath=".\tunerchannel.h">
|
|
||||||
</File>
|
|
||||||
<File
|
|
||||||
RelativePath=".\tunernorm.h">
|
|
||||||
</File>
|
|
||||||
</Filter>
|
|
||||||
</Files>
|
|
||||||
<Globals>
|
|
||||||
</Globals>
|
|
||||||
</VisualStudioProject>
|
|
|
@ -1,114 +0,0 @@
|
||||||
/* GStreamer Tuner
|
|
||||||
* Copyright (C) 2003 Ronald Bultje <rbultje@ronald.bitfreak.net>
|
|
||||||
*
|
|
||||||
* tunerchannel.c: tuner channel object design
|
|
||||||
*
|
|
||||||
* 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
|
|
||||||
|
|
||||||
#include "tunerchannel.h"
|
|
||||||
|
|
||||||
enum
|
|
||||||
{
|
|
||||||
/* FILL ME */
|
|
||||||
SIGNAL_FREQUENCY_CHANGED,
|
|
||||||
SIGNAL_SIGNAL_CHANGED,
|
|
||||||
LAST_SIGNAL
|
|
||||||
};
|
|
||||||
|
|
||||||
static void gst_tuner_channel_class_init (GstTunerChannelClass * klass);
|
|
||||||
static void gst_tuner_channel_init (GstTunerChannel * channel);
|
|
||||||
static void gst_tuner_channel_dispose (GObject * object);
|
|
||||||
|
|
||||||
static GObjectClass *parent_class = NULL;
|
|
||||||
static guint signals[LAST_SIGNAL] = { 0 };
|
|
||||||
|
|
||||||
GType
|
|
||||||
gst_tuner_channel_get_type (void)
|
|
||||||
{
|
|
||||||
static GType gst_tuner_channel_type = 0;
|
|
||||||
|
|
||||||
if (!gst_tuner_channel_type) {
|
|
||||||
static const GTypeInfo tuner_channel_info = {
|
|
||||||
sizeof (GstTunerChannelClass),
|
|
||||||
NULL,
|
|
||||||
NULL,
|
|
||||||
(GClassInitFunc) gst_tuner_channel_class_init,
|
|
||||||
NULL,
|
|
||||||
NULL,
|
|
||||||
sizeof (GstTunerChannel),
|
|
||||||
0,
|
|
||||||
(GInstanceInitFunc) gst_tuner_channel_init,
|
|
||||||
NULL
|
|
||||||
};
|
|
||||||
|
|
||||||
gst_tuner_channel_type =
|
|
||||||
g_type_register_static (G_TYPE_OBJECT,
|
|
||||||
"GstTunerChannel", &tuner_channel_info, 0);
|
|
||||||
}
|
|
||||||
|
|
||||||
return gst_tuner_channel_type;
|
|
||||||
}
|
|
||||||
|
|
||||||
static void
|
|
||||||
gst_tuner_channel_class_init (GstTunerChannelClass * klass)
|
|
||||||
{
|
|
||||||
GObjectClass *object_klass = (GObjectClass *) klass;
|
|
||||||
|
|
||||||
parent_class = g_type_class_ref (G_TYPE_OBJECT);
|
|
||||||
|
|
||||||
signals[SIGNAL_FREQUENCY_CHANGED] =
|
|
||||||
g_signal_new ("frequency-changed", G_TYPE_FROM_CLASS (klass),
|
|
||||||
G_SIGNAL_RUN_LAST,
|
|
||||||
G_STRUCT_OFFSET (GstTunerChannelClass,
|
|
||||||
frequency_changed),
|
|
||||||
NULL, NULL, g_cclosure_marshal_VOID__ULONG, G_TYPE_NONE, 1, G_TYPE_ULONG);
|
|
||||||
signals[SIGNAL_SIGNAL_CHANGED] =
|
|
||||||
g_signal_new ("signal-changed", G_TYPE_FROM_CLASS (klass),
|
|
||||||
G_SIGNAL_RUN_LAST,
|
|
||||||
G_STRUCT_OFFSET (GstTunerChannelClass,
|
|
||||||
signal_changed),
|
|
||||||
NULL, NULL, g_cclosure_marshal_VOID__INT, G_TYPE_NONE, 1, G_TYPE_INT);
|
|
||||||
|
|
||||||
object_klass->dispose = gst_tuner_channel_dispose;
|
|
||||||
}
|
|
||||||
|
|
||||||
static void
|
|
||||||
gst_tuner_channel_init (GstTunerChannel * channel)
|
|
||||||
{
|
|
||||||
channel->label = NULL;
|
|
||||||
channel->flags = 0;
|
|
||||||
channel->min_frequency = channel->max_frequency = 0;
|
|
||||||
channel->min_signal = channel->max_signal = 0;
|
|
||||||
}
|
|
||||||
|
|
||||||
static void
|
|
||||||
gst_tuner_channel_dispose (GObject * object)
|
|
||||||
{
|
|
||||||
GstTunerChannel *channel = GST_TUNER_CHANNEL (object);
|
|
||||||
|
|
||||||
if (channel->label) {
|
|
||||||
g_free (channel->label);
|
|
||||||
channel->label = NULL;
|
|
||||||
}
|
|
||||||
|
|
||||||
if (parent_class->dispose)
|
|
||||||
parent_class->dispose (object);
|
|
||||||
}
|
|
|
@ -1,80 +0,0 @@
|
||||||
/* GStreamer Tuner
|
|
||||||
* Copyright (C) 2003 Ronald Bultje <rbultje@ronald.bitfreak.net>
|
|
||||||
*
|
|
||||||
* tunerchannel.h: tuner channel object design
|
|
||||||
*
|
|
||||||
* 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.
|
|
||||||
*/
|
|
||||||
|
|
||||||
#ifndef __GST_TUNER_CHANNEL_H__
|
|
||||||
#define __GST_TUNER_CHANNEL_H__
|
|
||||||
|
|
||||||
#include <gst/gst.h>
|
|
||||||
|
|
||||||
G_BEGIN_DECLS
|
|
||||||
|
|
||||||
#define GST_TYPE_TUNER_CHANNEL \
|
|
||||||
(gst_tuner_channel_get_type ())
|
|
||||||
#define GST_TUNER_CHANNEL(obj) \
|
|
||||||
(G_TYPE_CHECK_INSTANCE_CAST ((obj), GST_TYPE_TUNER_CHANNEL, \
|
|
||||||
GstTunerChannel))
|
|
||||||
#define GST_TUNER_CHANNEL_CLASS(klass) \
|
|
||||||
(G_TYPE_CHECK_CLASS_CAST ((klass), GST_TYPE_TUNER_CHANNEL, \
|
|
||||||
GstTunerChannelClass))
|
|
||||||
#define GST_IS_TUNER_CHANNEL(obj) \
|
|
||||||
(G_TYPE_CHECK_INSTANCE_TYPE ((obj), GST_TYPE_TUNER_CHANNEL))
|
|
||||||
#define GST_IS_TUNER_CHANNEL_CLASS(klass) \
|
|
||||||
(G_TYPE_CHECK_CLASS_TYPE ((klass), GST_TYPE_TUNER_CHANNEL))
|
|
||||||
|
|
||||||
typedef enum {
|
|
||||||
GST_TUNER_CHANNEL_INPUT = (1<<0),
|
|
||||||
GST_TUNER_CHANNEL_OUTPUT = (1<<1),
|
|
||||||
GST_TUNER_CHANNEL_FREQUENCY = (1<<2),
|
|
||||||
GST_TUNER_CHANNEL_AUDIO = (1<<3)
|
|
||||||
} GstTunerChannelFlags;
|
|
||||||
|
|
||||||
#define GST_TUNER_CHANNEL_HAS_FLAG(channel, flag) \
|
|
||||||
((channel)->flags & flag)
|
|
||||||
|
|
||||||
typedef struct _GstTunerChannel {
|
|
||||||
GObject parent;
|
|
||||||
|
|
||||||
gchar *label;
|
|
||||||
GstTunerChannelFlags flags;
|
|
||||||
gfloat freq_multiplicator;
|
|
||||||
gulong min_frequency,
|
|
||||||
max_frequency;
|
|
||||||
gint min_signal,
|
|
||||||
max_signal;
|
|
||||||
} GstTunerChannel;
|
|
||||||
|
|
||||||
typedef struct _GstTunerChannelClass {
|
|
||||||
GObjectClass parent;
|
|
||||||
|
|
||||||
/* signals */
|
|
||||||
void (*frequency_changed) (GstTunerChannel *channel,
|
|
||||||
gulong frequency);
|
|
||||||
void (*signal_changed) (GstTunerChannel *channel,
|
|
||||||
gint signal);
|
|
||||||
|
|
||||||
gpointer _gst_reserved[GST_PADDING];
|
|
||||||
} GstTunerChannelClass;
|
|
||||||
|
|
||||||
GType gst_tuner_channel_get_type (void);
|
|
||||||
|
|
||||||
G_END_DECLS
|
|
||||||
|
|
||||||
#endif /* __GST_TUNER_CHANNEL_H__ */
|
|
|
@ -1,98 +0,0 @@
|
||||||
/* GStreamer Tuner
|
|
||||||
* Copyright (C) 2003 Ronald Bultje <rbultje@ronald.bitfreak.net>
|
|
||||||
*
|
|
||||||
* tunernorm.c: tuner norm object design
|
|
||||||
*
|
|
||||||
* 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
|
|
||||||
|
|
||||||
#include "tunernorm.h"
|
|
||||||
|
|
||||||
enum
|
|
||||||
{
|
|
||||||
/* FILL ME */
|
|
||||||
LAST_SIGNAL
|
|
||||||
};
|
|
||||||
|
|
||||||
static void gst_tuner_norm_class_init (GstTunerNormClass * klass);
|
|
||||||
static void gst_tuner_norm_init (GstTunerNorm * norm);
|
|
||||||
static void gst_tuner_norm_dispose (GObject * object);
|
|
||||||
|
|
||||||
static GObjectClass *parent_class = NULL;
|
|
||||||
|
|
||||||
/*static guint signals[LAST_SIGNAL] = { 0 };*/
|
|
||||||
|
|
||||||
GType
|
|
||||||
gst_tuner_norm_get_type (void)
|
|
||||||
{
|
|
||||||
static GType gst_tuner_norm_type = 0;
|
|
||||||
|
|
||||||
if (!gst_tuner_norm_type) {
|
|
||||||
static const GTypeInfo tuner_norm_info = {
|
|
||||||
sizeof (GstTunerNormClass),
|
|
||||||
NULL,
|
|
||||||
NULL,
|
|
||||||
(GClassInitFunc) gst_tuner_norm_class_init,
|
|
||||||
NULL,
|
|
||||||
NULL,
|
|
||||||
sizeof (GstTunerNorm),
|
|
||||||
0,
|
|
||||||
(GInstanceInitFunc) gst_tuner_norm_init,
|
|
||||||
NULL
|
|
||||||
};
|
|
||||||
|
|
||||||
gst_tuner_norm_type =
|
|
||||||
g_type_register_static (G_TYPE_OBJECT,
|
|
||||||
"GstTunerNorm", &tuner_norm_info, 0);
|
|
||||||
}
|
|
||||||
|
|
||||||
return gst_tuner_norm_type;
|
|
||||||
}
|
|
||||||
|
|
||||||
static void
|
|
||||||
gst_tuner_norm_class_init (GstTunerNormClass * klass)
|
|
||||||
{
|
|
||||||
GObjectClass *object_klass = (GObjectClass *) klass;
|
|
||||||
|
|
||||||
parent_class = g_type_class_ref (G_TYPE_OBJECT);
|
|
||||||
|
|
||||||
object_klass->dispose = gst_tuner_norm_dispose;
|
|
||||||
}
|
|
||||||
|
|
||||||
static void
|
|
||||||
gst_tuner_norm_init (GstTunerNorm * norm)
|
|
||||||
{
|
|
||||||
norm->label = NULL;
|
|
||||||
norm->fps = 0.;
|
|
||||||
}
|
|
||||||
|
|
||||||
static void
|
|
||||||
gst_tuner_norm_dispose (GObject * object)
|
|
||||||
{
|
|
||||||
GstTunerNorm *norm = GST_TUNER_NORM (object);
|
|
||||||
|
|
||||||
if (norm->label) {
|
|
||||||
g_free (norm->label);
|
|
||||||
norm->label = NULL;
|
|
||||||
}
|
|
||||||
|
|
||||||
if (parent_class->dispose)
|
|
||||||
parent_class->dispose (object);
|
|
||||||
}
|
|
|
@ -1,57 +0,0 @@
|
||||||
/* GStreamer Tuner
|
|
||||||
* Copyright (C) 2003 Ronald Bultje <rbultje@ronald.bitfreak.net>
|
|
||||||
*
|
|
||||||
* tunernorm.h: tuner norm object design
|
|
||||||
*
|
|
||||||
* 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.
|
|
||||||
*/
|
|
||||||
|
|
||||||
#ifndef __GST_TUNER_NORM_H__
|
|
||||||
#define __GST_TUNER_NORM_H__
|
|
||||||
|
|
||||||
#include <gst/gst.h>
|
|
||||||
|
|
||||||
G_BEGIN_DECLS
|
|
||||||
|
|
||||||
#define GST_TYPE_TUNER_NORM \
|
|
||||||
(gst_tuner_norm_get_type ())
|
|
||||||
#define GST_TUNER_NORM(obj) \
|
|
||||||
(G_TYPE_CHECK_INSTANCE_CAST ((obj), GST_TYPE_TUNER_NORM, GstTunerNorm))
|
|
||||||
#define GST_TUNER_NORM_CLASS(klass) \
|
|
||||||
(G_TYPE_CHECK_CLASS_CAST ((klass), GST_TYPE_TUNER_NORM, GstTunerNormClass))
|
|
||||||
#define GST_IS_TUNER_NORM(obj) \
|
|
||||||
(G_TYPE_CHECK_INSTANCE_TYPE ((obj), GST_TYPE_TUNER_NORM))
|
|
||||||
#define GST_IS_TUNER_NORM_CLASS(klass) \
|
|
||||||
(G_TYPE_CHECK_CLASS_TYPE ((klass), GST_TYPE_TUNER_NORM))
|
|
||||||
|
|
||||||
typedef struct _GstTunerNorm {
|
|
||||||
GObject parent;
|
|
||||||
|
|
||||||
gchar *label;
|
|
||||||
gfloat fps;
|
|
||||||
} GstTunerNorm;
|
|
||||||
|
|
||||||
typedef struct _GstTunerNormClass {
|
|
||||||
GObjectClass parent;
|
|
||||||
|
|
||||||
gpointer _gst_reserved[GST_PADDING];
|
|
||||||
} GstTunerNormClass;
|
|
||||||
|
|
||||||
GType gst_tuner_norm_get_type (void);
|
|
||||||
|
|
||||||
G_END_DECLS
|
|
||||||
|
|
||||||
#endif /* __GST_TUNER_NORM_H__ */
|
|
|
@ -1,11 +0,0 @@
|
||||||
libgstinterfacesincludedir = \
|
|
||||||
$(includedir)/gstreamer-@GST_MAJORMINOR@/gst/xoverlay
|
|
||||||
|
|
||||||
libgstinterfacesinclude_HEADERS = xoverlay.h
|
|
||||||
|
|
||||||
noinst_LTLIBRARIES = libgstxoverlay.la
|
|
||||||
|
|
||||||
libgstxoverlay_la_SOURCES = xoverlay.c
|
|
||||||
libgstxoverlay_la_CFLAGS = $(GST_CFLAGS)
|
|
||||||
libgstxoverlay_la_LIBADD =
|
|
||||||
|
|
|
@ -1,202 +0,0 @@
|
||||||
/* GStreamer X-based Overlay
|
|
||||||
* Copyright (C) 2003 Ronald Bultje <rbultje@ronald.bitfreak.net>
|
|
||||||
*
|
|
||||||
* tv-mixer.c: tv-mixer design virtual class function wrappers
|
|
||||||
*
|
|
||||||
* 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
|
|
||||||
|
|
||||||
#include "xoverlay.h"
|
|
||||||
|
|
||||||
enum
|
|
||||||
{
|
|
||||||
HAVE_XWINDOW_ID,
|
|
||||||
DESIRED_SIZE,
|
|
||||||
LAST_SIGNAL
|
|
||||||
};
|
|
||||||
|
|
||||||
static guint gst_x_overlay_signals[LAST_SIGNAL] = { 0 };
|
|
||||||
|
|
||||||
static void gst_x_overlay_base_init (gpointer g_class);
|
|
||||||
|
|
||||||
GType
|
|
||||||
gst_x_overlay_get_type (void)
|
|
||||||
{
|
|
||||||
static GType gst_x_overlay_type = 0;
|
|
||||||
|
|
||||||
if (!gst_x_overlay_type) {
|
|
||||||
static const GTypeInfo gst_x_overlay_info = {
|
|
||||||
sizeof (GstXOverlayClass),
|
|
||||||
gst_x_overlay_base_init,
|
|
||||||
NULL,
|
|
||||||
NULL,
|
|
||||||
NULL,
|
|
||||||
NULL,
|
|
||||||
0,
|
|
||||||
0,
|
|
||||||
NULL,
|
|
||||||
};
|
|
||||||
|
|
||||||
gst_x_overlay_type = g_type_register_static (G_TYPE_INTERFACE,
|
|
||||||
"GstXOverlay", &gst_x_overlay_info, 0);
|
|
||||||
g_type_interface_add_prerequisite (gst_x_overlay_type,
|
|
||||||
GST_TYPE_IMPLEMENTS_INTERFACE);
|
|
||||||
}
|
|
||||||
|
|
||||||
return gst_x_overlay_type;
|
|
||||||
}
|
|
||||||
|
|
||||||
/* FIXME: evil hack, we should figure out our marshal handling in this interfaces some day */
|
|
||||||
extern void gst_marshal_VOID__INT_INT (GClosure * closure,
|
|
||||||
GValue * return_value, guint n_param_values, const GValue * param_values,
|
|
||||||
gpointer invocation_hint, gpointer marshal_data);
|
|
||||||
|
|
||||||
static void
|
|
||||||
gst_x_overlay_base_init (gpointer g_class)
|
|
||||||
{
|
|
||||||
GstXOverlayClass *overlay_class = (GstXOverlayClass *) g_class;
|
|
||||||
static gboolean initialized = FALSE;
|
|
||||||
|
|
||||||
if (!initialized) {
|
|
||||||
gst_x_overlay_signals[HAVE_XWINDOW_ID] =
|
|
||||||
g_signal_new ("have-xwindow-id",
|
|
||||||
GST_TYPE_X_OVERLAY, G_SIGNAL_RUN_LAST,
|
|
||||||
G_STRUCT_OFFSET (GstXOverlayClass, have_xwindow_id),
|
|
||||||
NULL, NULL, g_cclosure_marshal_VOID__INT, G_TYPE_NONE, 1, G_TYPE_INT);
|
|
||||||
gst_x_overlay_signals[DESIRED_SIZE] =
|
|
||||||
g_signal_new ("desired-size-changed",
|
|
||||||
GST_TYPE_X_OVERLAY, G_SIGNAL_RUN_LAST,
|
|
||||||
G_STRUCT_OFFSET (GstXOverlayClass, desired_size),
|
|
||||||
NULL, NULL,
|
|
||||||
gst_marshal_VOID__INT_INT, G_TYPE_NONE, 2, G_TYPE_INT, G_TYPE_INT);
|
|
||||||
|
|
||||||
initialized = TRUE;
|
|
||||||
}
|
|
||||||
|
|
||||||
overlay_class->set_xwindow_id = NULL;
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
|
||||||
* gst_x_overlay_set_xwindow_id:
|
|
||||||
* @overlay: a #GstXOverlay to set the XWindow on.
|
|
||||||
* @xwindow_id: a #XID referencing the XWindow.
|
|
||||||
*
|
|
||||||
* This will call the video overlay's set_xwindow_id method. You should
|
|
||||||
* use this method to tell to a XOverlay to display video output to a
|
|
||||||
* specific XWindow. Passing 0 as the xwindow_id will tell the overlay to
|
|
||||||
* stop using that window and create an internal one.
|
|
||||||
*/
|
|
||||||
void
|
|
||||||
gst_x_overlay_set_xwindow_id (GstXOverlay * overlay, gulong xwindow_id)
|
|
||||||
{
|
|
||||||
GstXOverlayClass *klass = GST_X_OVERLAY_GET_CLASS (overlay);
|
|
||||||
|
|
||||||
if (klass->set_xwindow_id) {
|
|
||||||
klass->set_xwindow_id (overlay, xwindow_id);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
|
||||||
* gst_x_overlay_got_xwindow_id:
|
|
||||||
* @overlay: a #GstXOverlay which got a XWindow.
|
|
||||||
* @xwindow_id: a #XID referencing the XWindow.
|
|
||||||
*
|
|
||||||
* This will fire an have_xwindow_id signal.
|
|
||||||
*
|
|
||||||
* This function should be used by video overlay developpers.
|
|
||||||
*/
|
|
||||||
void
|
|
||||||
gst_x_overlay_got_xwindow_id (GstXOverlay * overlay, gulong xwindow_id)
|
|
||||||
{
|
|
||||||
g_return_if_fail (overlay != NULL);
|
|
||||||
g_return_if_fail (GST_IS_X_OVERLAY (overlay));
|
|
||||||
|
|
||||||
g_signal_emit (G_OBJECT (overlay),
|
|
||||||
gst_x_overlay_signals[HAVE_XWINDOW_ID], 0, (gint) xwindow_id);
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
|
||||||
* gst_x_overlay_get_desired_size:
|
|
||||||
* @overlay: a #GstXOverlay which got a XWindow.
|
|
||||||
* @width: pointer to a gint taking the width or NULL.
|
|
||||||
* @height: pointer to a gint taking the height or NULL.
|
|
||||||
*
|
|
||||||
* Gets the desired size of the overlay. If the overlay doesn't know its desired
|
|
||||||
* size, width and height are set to 0.
|
|
||||||
*/
|
|
||||||
void
|
|
||||||
gst_x_overlay_get_desired_size (GstXOverlay * overlay, guint * width,
|
|
||||||
guint * height)
|
|
||||||
{
|
|
||||||
guint width_tmp, height_tmp;
|
|
||||||
GstXOverlayClass *klass;
|
|
||||||
|
|
||||||
g_return_if_fail (G_TYPE_CHECK_INSTANCE_TYPE ((overlay), GST_TYPE_X_OVERLAY));
|
|
||||||
|
|
||||||
klass = GST_X_OVERLAY_GET_CLASS (overlay);
|
|
||||||
if (klass->get_desired_size && GST_IS_X_OVERLAY (overlay)) {
|
|
||||||
/* this ensures that elements don't need to check width and height for NULL
|
|
||||||
but apps may use NULL */
|
|
||||||
klass->get_desired_size (overlay, width ? width : &width_tmp,
|
|
||||||
height ? height : &height_tmp);
|
|
||||||
} else {
|
|
||||||
if (width)
|
|
||||||
*width = 0;
|
|
||||||
if (height)
|
|
||||||
*height = 0;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
|
||||||
* gst_x_overlay_got_desired_size:
|
|
||||||
* @overlay: a #GstXOverlay which changed its desired size.
|
|
||||||
* @width: The new desired width
|
|
||||||
* @height: The new desired height
|
|
||||||
*
|
|
||||||
* This will fire a "desired_size_changed" signal.
|
|
||||||
*
|
|
||||||
* This function should be used by video overlay developpers.
|
|
||||||
*/
|
|
||||||
void
|
|
||||||
gst_x_overlay_got_desired_size (GstXOverlay * overlay, guint width,
|
|
||||||
guint height)
|
|
||||||
{
|
|
||||||
g_return_if_fail (GST_IS_X_OVERLAY (overlay));
|
|
||||||
|
|
||||||
g_signal_emit (G_OBJECT (overlay),
|
|
||||||
gst_x_overlay_signals[DESIRED_SIZE], 0, width, height);
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
|
||||||
* gst_x_overlay_expose:
|
|
||||||
* @overlay: a #GstXOverlay to expose.
|
|
||||||
*
|
|
||||||
* Tell an overlay that it has been exposed. This will redraw the current frame
|
|
||||||
* in the drawable even if the pipeline is PAUSED.
|
|
||||||
*/
|
|
||||||
void
|
|
||||||
gst_x_overlay_expose (GstXOverlay * overlay)
|
|
||||||
{
|
|
||||||
GstXOverlayClass *klass = GST_X_OVERLAY_GET_CLASS (overlay);
|
|
||||||
|
|
||||||
if (klass->expose) {
|
|
||||||
klass->expose (overlay);
|
|
||||||
}
|
|
||||||
}
|
|
|
@ -1,81 +0,0 @@
|
||||||
/* GStreamer X-based Overlay
|
|
||||||
* Copyright (C) 2003 Ronald Bultje <rbultje@ronald.bitfreak.net>
|
|
||||||
* Copyright (C) 2003 Julien Moutte <julien@moutte.net>
|
|
||||||
*
|
|
||||||
* x-overlay.h: X-based overlay interface design
|
|
||||||
*
|
|
||||||
* 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.
|
|
||||||
*/
|
|
||||||
|
|
||||||
#ifndef __GST_X_OVERLAY_H__
|
|
||||||
#define __GST_X_OVERLAY_H__
|
|
||||||
|
|
||||||
#include <gst/gst.h>
|
|
||||||
|
|
||||||
G_BEGIN_DECLS
|
|
||||||
|
|
||||||
#define GST_TYPE_X_OVERLAY \
|
|
||||||
(gst_x_overlay_get_type ())
|
|
||||||
#define GST_X_OVERLAY(obj) \
|
|
||||||
(GST_IMPLEMENTS_INTERFACE_CHECK_INSTANCE_CAST ((obj), GST_TYPE_X_OVERLAY, \
|
|
||||||
GstXOverlay))
|
|
||||||
#define GST_X_OVERLAY_CLASS(klass) \
|
|
||||||
(G_TYPE_CHECK_CLASS_CAST ((klass), GST_TYPE_X_OVERLAY, GstXOverlayClass))
|
|
||||||
#define GST_IS_X_OVERLAY(obj) \
|
|
||||||
(GST_IMPLEMENTS_INTERFACE_CHECK_INSTANCE_TYPE ((obj), GST_TYPE_X_OVERLAY))
|
|
||||||
#define GST_IS_X_OVERLAY_CLASS(klass) \
|
|
||||||
(G_TYPE_CHECK_CLASS_TYPE ((klass), GST_TYPE_X_OVERLAY))
|
|
||||||
#define GST_X_OVERLAY_GET_CLASS(inst) \
|
|
||||||
(G_TYPE_INSTANCE_GET_INTERFACE ((inst), GST_TYPE_X_OVERLAY, GstXOverlayClass))
|
|
||||||
|
|
||||||
typedef struct _GstXOverlay GstXOverlay;
|
|
||||||
|
|
||||||
typedef struct _GstXOverlayClass {
|
|
||||||
GTypeInterface klass;
|
|
||||||
|
|
||||||
/* virtual functions */
|
|
||||||
void (* set_xwindow_id) (GstXOverlay *overlay,
|
|
||||||
gulong xwindow_id);
|
|
||||||
/* optional virtual functions */
|
|
||||||
void (* get_desired_size) (GstXOverlay *overlay,
|
|
||||||
guint *width,
|
|
||||||
guint *height);
|
|
||||||
void (* expose) (GstXOverlay *overlay);
|
|
||||||
|
|
||||||
/* signals */
|
|
||||||
void (*have_xwindow_id) (GstXOverlay *overlay,
|
|
||||||
gulong xwindow_id);
|
|
||||||
void (* desired_size) (GstXOverlay *overlay,
|
|
||||||
guint width,
|
|
||||||
guint height);
|
|
||||||
|
|
||||||
gpointer _gst_reserved[GST_PADDING];
|
|
||||||
} GstXOverlayClass;
|
|
||||||
|
|
||||||
GType gst_x_overlay_get_type (void);
|
|
||||||
|
|
||||||
/* virtual class function wrappers */
|
|
||||||
void gst_x_overlay_set_xwindow_id (GstXOverlay *overlay, gulong xwindow_id);
|
|
||||||
void gst_x_overlay_get_desired_size (GstXOverlay *overlay, guint *width, guint *height);
|
|
||||||
void gst_x_overlay_expose (GstXOverlay *overlay);
|
|
||||||
|
|
||||||
/* public methods to fire signals */
|
|
||||||
void gst_x_overlay_got_xwindow_id (GstXOverlay *overlay, gulong xwindow_id);
|
|
||||||
void gst_x_overlay_got_desired_size (GstXOverlay *overlay, guint width, guint height);
|
|
||||||
|
|
||||||
G_END_DECLS
|
|
||||||
|
|
||||||
#endif /* __GST_X_OVERLAY_H__ */
|
|
|
@ -1,144 +0,0 @@
|
||||||
<?xml version="1.0" encoding="Windows-1252"?>
|
|
||||||
<VisualStudioProject
|
|
||||||
ProjectType="Visual C++"
|
|
||||||
Version="7.10"
|
|
||||||
Name="xoverlay"
|
|
||||||
ProjectGUID="{979C216F-0ACF-4956-AE00-055A42D6789E}"
|
|
||||||
RootNamespace="xoverlay"
|
|
||||||
Keyword="Win32Proj">
|
|
||||||
<Platforms>
|
|
||||||
<Platform
|
|
||||||
Name="Win32"/>
|
|
||||||
</Platforms>
|
|
||||||
<Configurations>
|
|
||||||
<Configuration
|
|
||||||
Name="Debug|Win32"
|
|
||||||
OutputDirectory="../../../win32/Debug"
|
|
||||||
IntermediateDirectory="../../../win32/Debug"
|
|
||||||
ConfigurationType="2"
|
|
||||||
CharacterSet="2">
|
|
||||||
<Tool
|
|
||||||
Name="VCCLCompilerTool"
|
|
||||||
Optimization="0"
|
|
||||||
AdditionalIncludeDirectories="../../../../gstreamer/win32;../../../../gstreamer;../../../../gstreamer/libs;../../../../glib;../../../../glib/glib;../../../../glib/gmodule;"../../../gst-libs";../../../../popt/include;../../../../libxml2/include/libxml2"
|
|
||||||
PreprocessorDefinitions="WIN32;_DEBUG;_WINDOWS;_USRDLL;HAVE_CONFIG_H;_USE_MATH_DEFINES"
|
|
||||||
MinimalRebuild="TRUE"
|
|
||||||
BasicRuntimeChecks="3"
|
|
||||||
RuntimeLibrary="3"
|
|
||||||
UsePrecompiledHeader="0"
|
|
||||||
WarningLevel="3"
|
|
||||||
Detect64BitPortabilityProblems="TRUE"
|
|
||||||
DebugInformationFormat="4"/>
|
|
||||||
<Tool
|
|
||||||
Name="VCCustomBuildTool"/>
|
|
||||||
<Tool
|
|
||||||
Name="VCLinkerTool"
|
|
||||||
AdditionalDependencies="glib-2.0.lib gmodule-2.0.lib gthread-2.0.lib gobject-2.0.lib libgstreamer.lib gstbytestream.lib iconv.lib intl.lib"
|
|
||||||
OutputFile="$(OutDir)/gstxoverlay.dll"
|
|
||||||
LinkIncremental="2"
|
|
||||||
AdditionalLibraryDirectories="../../../../gstreamer/win32/Debug;../../../../glib/glib;../../../../glib/gmodule;../../../../glib/gthread;../../../../glib/gobject;../../../../gettext/lib;../../../../libiconv/lib"
|
|
||||||
ModuleDefinitionFile=""
|
|
||||||
GenerateDebugInformation="TRUE"
|
|
||||||
ProgramDatabaseFile="$(OutDir)/xoverlay.pdb"
|
|
||||||
SubSystem="2"
|
|
||||||
OptimizeReferences="2"
|
|
||||||
ImportLibrary="$(OutDir)/gstxoverlay.lib"
|
|
||||||
TargetMachine="1"/>
|
|
||||||
<Tool
|
|
||||||
Name="VCMIDLTool"/>
|
|
||||||
<Tool
|
|
||||||
Name="VCPostBuildEventTool"
|
|
||||||
CommandLine="copy /Y $(TargetPath) c:\gstreamer\plugins"/>
|
|
||||||
<Tool
|
|
||||||
Name="VCPreBuildEventTool"/>
|
|
||||||
<Tool
|
|
||||||
Name="VCPreLinkEventTool"/>
|
|
||||||
<Tool
|
|
||||||
Name="VCResourceCompilerTool"/>
|
|
||||||
<Tool
|
|
||||||
Name="VCWebServiceProxyGeneratorTool"/>
|
|
||||||
<Tool
|
|
||||||
Name="VCXMLDataGeneratorTool"/>
|
|
||||||
<Tool
|
|
||||||
Name="VCWebDeploymentTool"/>
|
|
||||||
<Tool
|
|
||||||
Name="VCManagedWrapperGeneratorTool"/>
|
|
||||||
<Tool
|
|
||||||
Name="VCAuxiliaryManagedWrapperGeneratorTool"/>
|
|
||||||
</Configuration>
|
|
||||||
<Configuration
|
|
||||||
Name="Release|Win32"
|
|
||||||
OutputDirectory="../../../win32/Release"
|
|
||||||
IntermediateDirectory="../../../win32/Release"
|
|
||||||
ConfigurationType="2"
|
|
||||||
CharacterSet="2">
|
|
||||||
<Tool
|
|
||||||
Name="VCCLCompilerTool"
|
|
||||||
AdditionalIncludeDirectories="../../../../gstreamer/win32;../../../../gstreamer;../../../../gstreamer/libs;../../../../glib;../../../../glib/glib;../../../../glib/gmodule;"../../../gst-libs";../../../../popt/include;../../../../libxml2/include/libxml2"
|
|
||||||
PreprocessorDefinitions="WIN32;NDEBUG;GST_DISABLE_GST_DEBUG;_WINDOWS;_USRDLL;HAVE_CONFIG_H;_USE_MATH_DEFINES"
|
|
||||||
RuntimeLibrary="2"
|
|
||||||
UsePrecompiledHeader="0"
|
|
||||||
WarningLevel="3"
|
|
||||||
Detect64BitPortabilityProblems="TRUE"
|
|
||||||
DebugInformationFormat="3"/>
|
|
||||||
<Tool
|
|
||||||
Name="VCCustomBuildTool"/>
|
|
||||||
<Tool
|
|
||||||
Name="VCLinkerTool"
|
|
||||||
AdditionalDependencies="glib-2.0.lib gmodule-2.0.lib gthread-2.0.lib gobject-2.0.lib libgstreamer.lib gstbytestream.lib iconv.lib intl.lib"
|
|
||||||
OutputFile="$(OutDir)/gstxoverlay.dll"
|
|
||||||
LinkIncremental="1"
|
|
||||||
AdditionalLibraryDirectories="../../../../gstreamer/win32/Release;../../../../glib/glib;../../../../glib/gmodule;../../../../glib/gthread;../../../../glib/gobject;../../../../gettext/lib;../../../../libiconv/lib"
|
|
||||||
ModuleDefinitionFile=""
|
|
||||||
GenerateDebugInformation="TRUE"
|
|
||||||
SubSystem="2"
|
|
||||||
OptimizeReferences="2"
|
|
||||||
EnableCOMDATFolding="2"
|
|
||||||
ImportLibrary="$(OutDir)/gstxoverlay.lib"
|
|
||||||
TargetMachine="1"/>
|
|
||||||
<Tool
|
|
||||||
Name="VCMIDLTool"/>
|
|
||||||
<Tool
|
|
||||||
Name="VCPostBuildEventTool"
|
|
||||||
CommandLine="copy /Y $(TargetPath) c:\gstreamer\plugins"/>
|
|
||||||
<Tool
|
|
||||||
Name="VCPreBuildEventTool"/>
|
|
||||||
<Tool
|
|
||||||
Name="VCPreLinkEventTool"/>
|
|
||||||
<Tool
|
|
||||||
Name="VCResourceCompilerTool"/>
|
|
||||||
<Tool
|
|
||||||
Name="VCWebServiceProxyGeneratorTool"/>
|
|
||||||
<Tool
|
|
||||||
Name="VCXMLDataGeneratorTool"/>
|
|
||||||
<Tool
|
|
||||||
Name="VCWebDeploymentTool"/>
|
|
||||||
<Tool
|
|
||||||
Name="VCManagedWrapperGeneratorTool"/>
|
|
||||||
<Tool
|
|
||||||
Name="VCAuxiliaryManagedWrapperGeneratorTool"/>
|
|
||||||
</Configuration>
|
|
||||||
</Configurations>
|
|
||||||
<References>
|
|
||||||
</References>
|
|
||||||
<Files>
|
|
||||||
<Filter
|
|
||||||
Name="Source Files"
|
|
||||||
Filter="cpp;c;cxx;def;odl;idl;hpj;bat;asm;asmx"
|
|
||||||
UniqueIdentifier="{4FC737F1-C7A5-4376-A066-2A32D752A2FF}">
|
|
||||||
<File
|
|
||||||
RelativePath=".\xoverlay.c">
|
|
||||||
</File>
|
|
||||||
</Filter>
|
|
||||||
<Filter
|
|
||||||
Name="Header Files"
|
|
||||||
Filter="h;hpp;hxx;hm;inl;inc;xsd"
|
|
||||||
UniqueIdentifier="{93995380-89BD-4b04-88EB-625FBE52EBFB}">
|
|
||||||
<File
|
|
||||||
RelativePath=".\xoverlay.h">
|
|
||||||
</File>
|
|
||||||
</Filter>
|
|
||||||
</Files>
|
|
||||||
<Globals>
|
|
||||||
</Globals>
|
|
||||||
</VisualStudioProject>
|
|
Loading…
Reference in a new issue