mirror of
https://gitlab.freedesktop.org/pipewire/pipewire.git
synced 2025-11-07 13:30:09 -05:00
more rename PV -> PINOS, Pv -> Pinos, pv -> pinos
This commit is contained in:
parent
0dd41f5e40
commit
a3505fb880
46 changed files with 2333 additions and 2267 deletions
|
|
@ -21,15 +21,15 @@
|
|||
#include <gst/gst.h>
|
||||
#include <gio/gio.h>
|
||||
|
||||
#include "pv-gst-manager.h"
|
||||
#include "pv-gst-source.h"
|
||||
#include "gst-manager.h"
|
||||
#include "gst-source.h"
|
||||
|
||||
#define PV_GST_MANAGER_GET_PRIVATE(obj) \
|
||||
(G_TYPE_INSTANCE_GET_PRIVATE ((obj), PV_TYPE_GST_MANAGER, PvGstManagerPrivate))
|
||||
#define PINOS_GST_MANAGER_GET_PRIVATE(obj) \
|
||||
(G_TYPE_INSTANCE_GET_PRIVATE ((obj), PINOS_TYPE_GST_MANAGER, PinosGstManagerPrivate))
|
||||
|
||||
struct _PvGstManagerPrivate
|
||||
struct _PinosGstManagerPrivate
|
||||
{
|
||||
PvDaemon *daemon;
|
||||
PinosDaemon *daemon;
|
||||
|
||||
GstDeviceMonitor *monitor;
|
||||
};
|
||||
|
|
@ -40,43 +40,47 @@ enum
|
|||
PROP_DAEMON
|
||||
};
|
||||
|
||||
G_DEFINE_TYPE (PvGstManager, pv_gst_manager, G_TYPE_OBJECT);
|
||||
G_DEFINE_TYPE (PinosGstManager, pinos_gst_manager, G_TYPE_OBJECT);
|
||||
|
||||
static void
|
||||
device_added (PvGstManager *manager, GstDevice *device)
|
||||
device_added (PinosGstManager *manager,
|
||||
GstDevice *device)
|
||||
{
|
||||
PvGstManagerPrivate *priv = manager->priv;
|
||||
PinosGstManagerPrivate *priv = manager->priv;
|
||||
gchar *name;
|
||||
GstElement *element;
|
||||
PvSource *source;
|
||||
PinosSource *source;
|
||||
|
||||
name = gst_device_get_display_name (device);
|
||||
g_print("Device added: %s\n", name);
|
||||
|
||||
element = gst_device_create_element (device, NULL);
|
||||
source = pv_gst_source_new (priv->daemon, name, element);
|
||||
g_object_set_data (G_OBJECT (device), "PvSource", source);
|
||||
source = pinos_gst_source_new (priv->daemon, name, element);
|
||||
g_object_set_data (G_OBJECT (device), "PinosSource", source);
|
||||
g_free (name);
|
||||
}
|
||||
|
||||
static void
|
||||
device_removed (PvGstManager *manager, GstDevice *device)
|
||||
device_removed (PinosGstManager *manager,
|
||||
GstDevice *device)
|
||||
{
|
||||
gchar *name;
|
||||
PvSource *source;
|
||||
PinosSource *source;
|
||||
|
||||
name = gst_device_get_display_name (device);
|
||||
g_print("Device removed: %s\n", name);
|
||||
source = g_object_steal_data (G_OBJECT (device), "PvSource");
|
||||
source = g_object_steal_data (G_OBJECT (device), "PinosSource");
|
||||
g_object_unref (source);
|
||||
g_free (name);
|
||||
}
|
||||
|
||||
static gboolean
|
||||
bus_handler (GstBus * bus, GstMessage * message, gpointer user_data)
|
||||
bus_handler (GstBus *bus,
|
||||
GstMessage *message,
|
||||
gpointer user_data)
|
||||
{
|
||||
PvGstManager *manager = user_data;
|
||||
PvGstManagerPrivate *priv = manager->priv;
|
||||
PinosGstManager *manager = user_data;
|
||||
PinosGstManagerPrivate *priv = manager->priv;
|
||||
GstDevice *device;
|
||||
|
||||
switch (GST_MESSAGE_TYPE (message)) {
|
||||
|
|
@ -95,9 +99,9 @@ bus_handler (GstBus * bus, GstMessage * message, gpointer user_data)
|
|||
}
|
||||
|
||||
static void
|
||||
start_monitor (PvGstManager *manager)
|
||||
start_monitor (PinosGstManager *manager)
|
||||
{
|
||||
PvGstManagerPrivate *priv = manager->priv;
|
||||
PinosGstManagerPrivate *priv = manager->priv;
|
||||
GstBus *bus;
|
||||
GList *devices;
|
||||
|
||||
|
|
@ -122,9 +126,9 @@ start_monitor (PvGstManager *manager)
|
|||
}
|
||||
|
||||
static void
|
||||
stop_monitor (PvGstManager *manager)
|
||||
stop_monitor (PinosGstManager *manager)
|
||||
{
|
||||
PvGstManagerPrivate *priv = manager->priv;
|
||||
PinosGstManagerPrivate *priv = manager->priv;
|
||||
|
||||
if (priv->monitor) {
|
||||
gst_device_monitor_stop (priv->monitor);
|
||||
|
|
@ -134,13 +138,13 @@ stop_monitor (PvGstManager *manager)
|
|||
}
|
||||
|
||||
static void
|
||||
pv_gst_manager_get_property (GObject *object,
|
||||
guint prop_id,
|
||||
GValue *value,
|
||||
GParamSpec *pspec)
|
||||
pinos_gst_manager_get_property (GObject *object,
|
||||
guint prop_id,
|
||||
GValue *value,
|
||||
GParamSpec *pspec)
|
||||
{
|
||||
PvGstManager *manager = PV_GST_MANAGER (object);
|
||||
PvGstManagerPrivate *priv = manager->priv;
|
||||
PinosGstManager *manager = PINOS_GST_MANAGER (object);
|
||||
PinosGstManagerPrivate *priv = manager->priv;
|
||||
|
||||
switch (prop_id) {
|
||||
case PROP_DAEMON:
|
||||
|
|
@ -154,13 +158,13 @@ pv_gst_manager_get_property (GObject *object,
|
|||
}
|
||||
|
||||
static void
|
||||
pv_gst_manager_set_property (GObject *object,
|
||||
guint prop_id,
|
||||
const GValue *value,
|
||||
GParamSpec *pspec)
|
||||
pinos_gst_manager_set_property (GObject *object,
|
||||
guint prop_id,
|
||||
const GValue *value,
|
||||
GParamSpec *pspec)
|
||||
{
|
||||
PvGstManager *manager = PV_GST_MANAGER (object);
|
||||
PvGstManagerPrivate *priv = manager->priv;
|
||||
PinosGstManager *manager = PINOS_GST_MANAGER (object);
|
||||
PinosGstManagerPrivate *priv = manager->priv;
|
||||
|
||||
switch (prop_id) {
|
||||
case PROP_DAEMON:
|
||||
|
|
@ -176,54 +180,54 @@ pv_gst_manager_set_property (GObject *object,
|
|||
static void
|
||||
gst_manager_constructed (GObject * object)
|
||||
{
|
||||
PvGstManager *manager = PV_GST_MANAGER (object);
|
||||
PinosGstManager *manager = PINOS_GST_MANAGER (object);
|
||||
|
||||
start_monitor (manager);
|
||||
|
||||
G_OBJECT_CLASS (pv_gst_manager_parent_class)->constructed (object);
|
||||
G_OBJECT_CLASS (pinos_gst_manager_parent_class)->constructed (object);
|
||||
}
|
||||
|
||||
static void
|
||||
gst_manager_finalize (GObject * object)
|
||||
{
|
||||
PvGstManager *manager = PV_GST_MANAGER (object);
|
||||
PinosGstManager *manager = PINOS_GST_MANAGER (object);
|
||||
|
||||
stop_monitor (manager);
|
||||
|
||||
G_OBJECT_CLASS (pv_gst_manager_parent_class)->finalize (object);
|
||||
G_OBJECT_CLASS (pinos_gst_manager_parent_class)->finalize (object);
|
||||
}
|
||||
|
||||
static void
|
||||
pv_gst_manager_class_init (PvGstManagerClass * klass)
|
||||
pinos_gst_manager_class_init (PinosGstManagerClass * klass)
|
||||
{
|
||||
GObjectClass *gobject_class = G_OBJECT_CLASS (klass);
|
||||
|
||||
g_type_class_add_private (klass, sizeof (PvGstManagerPrivate));
|
||||
g_type_class_add_private (klass, sizeof (PinosGstManagerPrivate));
|
||||
|
||||
gobject_class->constructed = gst_manager_constructed;
|
||||
gobject_class->finalize = gst_manager_finalize;
|
||||
gobject_class->set_property = pv_gst_manager_set_property;
|
||||
gobject_class->get_property = pv_gst_manager_get_property;
|
||||
gobject_class->set_property = pinos_gst_manager_set_property;
|
||||
gobject_class->get_property = pinos_gst_manager_get_property;
|
||||
|
||||
g_object_class_install_property (gobject_class,
|
||||
PROP_DAEMON,
|
||||
g_param_spec_object ("daemon",
|
||||
"Daemon",
|
||||
"The daemon",
|
||||
PV_TYPE_DAEMON,
|
||||
PINOS_TYPE_DAEMON,
|
||||
G_PARAM_READWRITE |
|
||||
G_PARAM_CONSTRUCT_ONLY |
|
||||
G_PARAM_STATIC_STRINGS));
|
||||
}
|
||||
|
||||
static void
|
||||
pv_gst_manager_init (PvGstManager * manager)
|
||||
pinos_gst_manager_init (PinosGstManager * manager)
|
||||
{
|
||||
manager->priv = PV_GST_MANAGER_GET_PRIVATE (manager);
|
||||
manager->priv = PINOS_GST_MANAGER_GET_PRIVATE (manager);
|
||||
}
|
||||
|
||||
PvGstManager *
|
||||
pv_gst_manager_new (PvDaemon *daemon)
|
||||
PinosGstManager *
|
||||
pinos_gst_manager_new (PinosDaemon *daemon)
|
||||
{
|
||||
return g_object_new (PV_TYPE_GST_MANAGER, "daemon", daemon, NULL);
|
||||
return g_object_new (PINOS_TYPE_GST_MANAGER, "daemon", daemon, NULL);
|
||||
}
|
||||
60
src/modules/gst/gst-manager.h
Normal file
60
src/modules/gst/gst-manager.h
Normal file
|
|
@ -0,0 +1,60 @@
|
|||
/* Pinos
|
||||
* Copyright (C) 2015 Wim Taymans <wim.taymans@gmail.com>
|
||||
*
|
||||
* 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., 51 Franklin St, Fifth Floor,
|
||||
* Boston, MA 02110-1301, USA.
|
||||
*/
|
||||
|
||||
#ifndef __PINOS_GST_MANAGER_H__
|
||||
#define __PINOS_GST_MANAGER_H__
|
||||
|
||||
#include <glib-object.h>
|
||||
|
||||
#include <client/pinos.h>
|
||||
#include <server/daemon.h>
|
||||
|
||||
G_BEGIN_DECLS
|
||||
|
||||
#define PINOS_TYPE_GST_MANAGER (pinos_gst_manager_get_type ())
|
||||
#define PINOS_IS_GST_MANAGER(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), PINOS_TYPE_GST_MANAGER))
|
||||
#define PINOS_IS_GST_MANAGER_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), PINOS_TYPE_GST_MANAGER))
|
||||
#define PINOS_GST_MANAGER_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), PINOS_TYPE_GST_MANAGER, PinosGstManagerClass))
|
||||
#define PINOS_GST_MANAGER(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), PINOS_TYPE_GST_MANAGER, PinosGstManager))
|
||||
#define PINOS_GST_MANAGER_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), PINOS_TYPE_GST_MANAGER, PinosGstManagerClass))
|
||||
#define PINOS_GST_MANAGER_CAST(obj) ((PinosGstManager*)(obj))
|
||||
#define PINOS_GST_MANAGER_CLASS_CAST(klass) ((PinosGstManagerClass*)(klass))
|
||||
|
||||
typedef struct _PinosGstManager PinosGstManager;
|
||||
typedef struct _PinosGstManagerClass PinosGstManagerClass;
|
||||
typedef struct _PinosGstManagerPrivate PinosGstManagerPrivate;
|
||||
|
||||
struct _PinosGstManager {
|
||||
GObject object;
|
||||
|
||||
PinosGstManagerPrivate *priv;
|
||||
};
|
||||
|
||||
struct _PinosGstManagerClass {
|
||||
GObjectClass parent_class;
|
||||
};
|
||||
|
||||
GType pinos_gst_manager_get_type (void);
|
||||
|
||||
PinosGstManager * pinos_gst_manager_new (PinosDaemon *daemon);
|
||||
|
||||
G_END_DECLS
|
||||
|
||||
#endif /* __PINOS_GST_MANAGER_H__ */
|
||||
|
||||
|
|
@ -21,12 +21,12 @@
|
|||
#include <gst/gst.h>
|
||||
#include <gio/gio.h>
|
||||
|
||||
#include "pv-gst-source.h"
|
||||
#include "gst-source.h"
|
||||
|
||||
#define PV_GST_SOURCE_GET_PRIVATE(obj) \
|
||||
(G_TYPE_INSTANCE_GET_PRIVATE ((obj), PV_TYPE_GST_SOURCE, PvGstSourcePrivate))
|
||||
#define PINOS_GST_SOURCE_GET_PRIVATE(obj) \
|
||||
(G_TYPE_INSTANCE_GET_PRIVATE ((obj), PINOS_TYPE_GST_SOURCE, PinosGstSourcePrivate))
|
||||
|
||||
struct _PvGstSourcePrivate
|
||||
struct _PinosGstSourcePrivate
|
||||
{
|
||||
GstElement *pipeline;
|
||||
GstElement *element;
|
||||
|
|
@ -41,13 +41,15 @@ enum {
|
|||
PROP_ELEMENT,
|
||||
};
|
||||
|
||||
G_DEFINE_TYPE (PvGstSource, pv_gst_source, PV_TYPE_SOURCE);
|
||||
G_DEFINE_TYPE (PinosGstSource, pinos_gst_source, PINOS_TYPE_SOURCE);
|
||||
|
||||
static gboolean
|
||||
bus_handler (GstBus * bus, GstMessage * message, gpointer user_data)
|
||||
bus_handler (GstBus *bus,
|
||||
GstMessage *message,
|
||||
gpointer user_data)
|
||||
{
|
||||
PvSource *source = user_data;
|
||||
PvGstSourcePrivate *priv = PV_GST_SOURCE (source)->priv;
|
||||
PinosSource *source = user_data;
|
||||
PinosGstSourcePrivate *priv = PINOS_GST_SOURCE (source)->priv;
|
||||
|
||||
switch (GST_MESSAGE_TYPE (message)) {
|
||||
case GST_MESSAGE_ERROR:
|
||||
|
|
@ -59,7 +61,7 @@ bus_handler (GstBus * bus, GstMessage * message, gpointer user_data)
|
|||
g_warning ("got error %s (%s)\n", error->message, debug);
|
||||
g_free (debug);
|
||||
|
||||
pv_source_report_error (source, error);
|
||||
pinos_source_report_error (source, error);
|
||||
gst_element_set_state (priv->pipeline, GST_STATE_NULL);
|
||||
break;
|
||||
}
|
||||
|
|
@ -70,9 +72,9 @@ bus_handler (GstBus * bus, GstMessage * message, gpointer user_data)
|
|||
}
|
||||
|
||||
static void
|
||||
setup_pipeline (PvGstSource *source)
|
||||
setup_pipeline (PinosGstSource *source)
|
||||
{
|
||||
PvGstSourcePrivate *priv = source->priv;
|
||||
PinosGstSourcePrivate *priv = source->priv;
|
||||
GstBus *bus;
|
||||
GstElement *elem;
|
||||
|
||||
|
|
@ -84,7 +86,7 @@ setup_pipeline (PvGstSource *source)
|
|||
gst_bin_add (GST_BIN (priv->pipeline), priv->filter);
|
||||
gst_element_link (priv->element, priv->filter);
|
||||
|
||||
elem = gst_element_factory_make ("pvfdpay", NULL);
|
||||
elem = gst_element_factory_make ("pinosfdpay", NULL);
|
||||
gst_bin_add (GST_BIN (priv->pipeline), elem);
|
||||
gst_element_link (priv->filter, elem);
|
||||
|
||||
|
|
@ -107,9 +109,9 @@ setup_pipeline (PvGstSource *source)
|
|||
}
|
||||
|
||||
static void
|
||||
destroy_pipeline (PvGstSource *source)
|
||||
destroy_pipeline (PinosGstSource *source)
|
||||
{
|
||||
PvGstSourcePrivate *priv = source->priv;
|
||||
PinosGstSourcePrivate *priv = source->priv;
|
||||
|
||||
if (priv->pipeline) {
|
||||
gst_element_set_state (priv->pipeline, GST_STATE_NULL);
|
||||
|
|
@ -119,9 +121,10 @@ destroy_pipeline (PvGstSource *source)
|
|||
}
|
||||
|
||||
static GstCaps *
|
||||
collect_caps (PvSource * source, GstCaps *filter)
|
||||
collect_caps (PinosSource *source,
|
||||
GstCaps *filter)
|
||||
{
|
||||
PvGstSourcePrivate *priv = PV_GST_SOURCE (source)->priv;
|
||||
PinosGstSourcePrivate *priv = PINOS_GST_SOURCE (source)->priv;
|
||||
GstCaps *res;
|
||||
GstQuery *query;
|
||||
|
||||
|
|
@ -135,36 +138,38 @@ collect_caps (PvSource * source, GstCaps *filter)
|
|||
}
|
||||
|
||||
static gboolean
|
||||
set_state (PvSource *source, PvSourceState state)
|
||||
set_state (PinosSource *source,
|
||||
PinosSourceState state)
|
||||
{
|
||||
PvGstSourcePrivate *priv = PV_GST_SOURCE (source)->priv;
|
||||
PinosGstSourcePrivate *priv = PINOS_GST_SOURCE (source)->priv;
|
||||
|
||||
switch (state) {
|
||||
case PV_SOURCE_STATE_SUSPENDED:
|
||||
case PINOS_SOURCE_STATE_SUSPENDED:
|
||||
gst_element_set_state (priv->pipeline, GST_STATE_NULL);
|
||||
break;
|
||||
|
||||
case PV_SOURCE_STATE_INIT:
|
||||
case PINOS_SOURCE_STATE_INIT:
|
||||
gst_element_set_state (priv->pipeline, GST_STATE_READY);
|
||||
break;
|
||||
|
||||
case PV_SOURCE_STATE_IDLE:
|
||||
case PINOS_SOURCE_STATE_IDLE:
|
||||
gst_element_set_state (priv->pipeline, GST_STATE_PAUSED);
|
||||
break;
|
||||
|
||||
case PV_SOURCE_STATE_RUNNING:
|
||||
case PINOS_SOURCE_STATE_RUNNING:
|
||||
gst_element_set_state (priv->pipeline, GST_STATE_PLAYING);
|
||||
break;
|
||||
|
||||
case PV_SOURCE_STATE_ERROR:
|
||||
case PINOS_SOURCE_STATE_ERROR:
|
||||
break;
|
||||
}
|
||||
pv_source_update_state (source, state);
|
||||
pinos_source_update_state (source, state);
|
||||
return TRUE;
|
||||
}
|
||||
|
||||
static GBytes *
|
||||
get_formats (PvSource *source, GBytes *filter)
|
||||
get_formats (PinosSource *source,
|
||||
GBytes *filter)
|
||||
{
|
||||
GstCaps *caps, *cfilter;
|
||||
gchar *str;
|
||||
|
|
@ -187,8 +192,8 @@ on_socket_notify (GObject *gobject,
|
|||
GParamSpec *pspec,
|
||||
gpointer user_data)
|
||||
{
|
||||
PvGstSource *source = user_data;
|
||||
PvGstSourcePrivate *priv = source->priv;
|
||||
PinosGstSource *source = user_data;
|
||||
PinosGstSourcePrivate *priv = source->priv;
|
||||
GSocket *socket;
|
||||
guint num_handles;
|
||||
GstCaps *caps;
|
||||
|
|
@ -243,14 +248,14 @@ on_socket_notify (GObject *gobject,
|
|||
}
|
||||
}
|
||||
|
||||
static PvSourceOutput *
|
||||
create_source_output (PvSource *source,
|
||||
static PinosSourceOutput *
|
||||
create_source_output (PinosSource *source,
|
||||
const gchar *client_path,
|
||||
GBytes *format_filter,
|
||||
const gchar *prefix,
|
||||
GError **error)
|
||||
{
|
||||
PvSourceOutput *output;
|
||||
PinosSourceOutput *output;
|
||||
GstCaps *caps, *filtered;
|
||||
gchar *str;
|
||||
|
||||
|
|
@ -266,7 +271,7 @@ create_source_output (PvSource *source,
|
|||
str = gst_caps_to_string (filtered);
|
||||
format_filter = g_bytes_new_take (str, strlen (str) + 1);
|
||||
|
||||
output = PV_SOURCE_CLASS (pv_gst_source_parent_class)
|
||||
output = PINOS_SOURCE_CLASS (pinos_gst_source_parent_class)
|
||||
->create_source_output (source,
|
||||
client_path,
|
||||
format_filter,
|
||||
|
|
@ -299,9 +304,10 @@ no_format:
|
|||
}
|
||||
|
||||
static gboolean
|
||||
release_source_output (PvSource *source, PvSourceOutput *output)
|
||||
release_source_output (PinosSource *source,
|
||||
PinosSourceOutput *output)
|
||||
{
|
||||
return PV_SOURCE_CLASS (pv_gst_source_parent_class)->release_source_output (source, output);
|
||||
return PINOS_SOURCE_CLASS (pinos_gst_source_parent_class)->release_source_output (source, output);
|
||||
}
|
||||
|
||||
static void
|
||||
|
|
@ -310,8 +316,8 @@ get_property (GObject *object,
|
|||
GValue *value,
|
||||
GParamSpec *pspec)
|
||||
{
|
||||
PvGstSource *source = PV_GST_SOURCE (object);
|
||||
PvGstSourcePrivate *priv = source->priv;
|
||||
PinosGstSource *source = PINOS_GST_SOURCE (object);
|
||||
PinosGstSourcePrivate *priv = source->priv;
|
||||
|
||||
switch (prop_id) {
|
||||
case PROP_ELEMENT:
|
||||
|
|
@ -330,8 +336,8 @@ set_property (GObject *object,
|
|||
const GValue *value,
|
||||
GParamSpec *pspec)
|
||||
{
|
||||
PvGstSource *source = PV_GST_SOURCE (object);
|
||||
PvGstSourcePrivate *priv = source->priv;
|
||||
PinosGstSource *source = PINOS_GST_SOURCE (object);
|
||||
PinosGstSourcePrivate *priv = source->priv;
|
||||
|
||||
switch (prop_id) {
|
||||
case PROP_ELEMENT:
|
||||
|
|
@ -347,30 +353,30 @@ set_property (GObject *object,
|
|||
static void
|
||||
source_constructed (GObject * object)
|
||||
{
|
||||
PvGstSource *source = PV_GST_SOURCE (object);
|
||||
PinosGstSource *source = PINOS_GST_SOURCE (object);
|
||||
|
||||
setup_pipeline (source);
|
||||
|
||||
G_OBJECT_CLASS (pv_gst_source_parent_class)->constructed (object);
|
||||
G_OBJECT_CLASS (pinos_gst_source_parent_class)->constructed (object);
|
||||
}
|
||||
|
||||
static void
|
||||
source_finalize (GObject * object)
|
||||
{
|
||||
PvGstSource *source = PV_GST_SOURCE (object);
|
||||
PinosGstSource *source = PINOS_GST_SOURCE (object);
|
||||
|
||||
destroy_pipeline (source);
|
||||
|
||||
G_OBJECT_CLASS (pv_gst_source_parent_class)->finalize (object);
|
||||
G_OBJECT_CLASS (pinos_gst_source_parent_class)->finalize (object);
|
||||
}
|
||||
|
||||
static void
|
||||
pv_gst_source_class_init (PvGstSourceClass * klass)
|
||||
pinos_gst_source_class_init (PinosGstSourceClass * klass)
|
||||
{
|
||||
GObjectClass *gobject_class = G_OBJECT_CLASS (klass);
|
||||
PvSourceClass *source_class = PV_SOURCE_CLASS (klass);
|
||||
PinosSourceClass *source_class = PINOS_SOURCE_CLASS (klass);
|
||||
|
||||
g_type_class_add_private (klass, sizeof (PvGstSourcePrivate));
|
||||
g_type_class_add_private (klass, sizeof (PinosGstSourcePrivate));
|
||||
|
||||
gobject_class->constructed = source_constructed;
|
||||
gobject_class->finalize = source_finalize;
|
||||
|
|
@ -395,13 +401,18 @@ pv_gst_source_class_init (PvGstSourceClass * klass)
|
|||
}
|
||||
|
||||
static void
|
||||
pv_gst_source_init (PvGstSource * source)
|
||||
pinos_gst_source_init (PinosGstSource * source)
|
||||
{
|
||||
source->priv = PV_GST_SOURCE_GET_PRIVATE (source);
|
||||
source->priv = PINOS_GST_SOURCE_GET_PRIVATE (source);
|
||||
}
|
||||
|
||||
PvSource *
|
||||
pv_gst_source_new (PvDaemon *daemon, const gchar *name, GstElement *element)
|
||||
PinosSource *
|
||||
pinos_gst_source_new (PinosDaemon *daemon,
|
||||
const gchar *name,
|
||||
GstElement *element)
|
||||
{
|
||||
return g_object_new (PV_TYPE_GST_SOURCE, "daemon", daemon, "name", name, "element", element, NULL);
|
||||
return g_object_new (PINOS_TYPE_GST_SOURCE,
|
||||
"daemon", daemon,
|
||||
"name", name,
|
||||
"element", element, NULL);
|
||||
}
|
||||
63
src/modules/gst/gst-source.h
Normal file
63
src/modules/gst/gst-source.h
Normal file
|
|
@ -0,0 +1,63 @@
|
|||
/* Pinos
|
||||
* Copyright (C) 2015 Wim Taymans <wim.taymans@gmail.com>
|
||||
*
|
||||
* 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., 51 Franklin St, Fifth Floor,
|
||||
* Boston, MA 02110-1301, USA.
|
||||
*/
|
||||
|
||||
#ifndef __PINOS_GST_SOURCE_H__
|
||||
#define __PINOS_GST_SOURCE_H__
|
||||
|
||||
#include <glib-object.h>
|
||||
|
||||
#include <client/pinos.h>
|
||||
#include <server/daemon.h>
|
||||
#include <server/source.h>
|
||||
|
||||
G_BEGIN_DECLS
|
||||
|
||||
#define PINOS_TYPE_GST_SOURCE (pinos_gst_source_get_type ())
|
||||
#define PINOS_IS_GST_SOURCE(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), PINOS_TYPE_GST_SOURCE))
|
||||
#define PINOS_IS_GST_SOURCE_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), PINOS_TYPE_GST_SOURCE))
|
||||
#define PINOS_GST_SOURCE_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), PINOS_TYPE_GST_SOURCE, PinosGstSourceClass))
|
||||
#define PINOS_GST_SOURCE(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), PINOS_TYPE_GST_SOURCE, PinosGstSource))
|
||||
#define PINOS_GST_SOURCE_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), PINOS_TYPE_GST_SOURCE, PinosGstSourceClass))
|
||||
#define PINOS_GST_SOURCE_CAST(obj) ((PinosGstSource*)(obj))
|
||||
#define PINOS_GST_SOURCE_CLASS_CAST(klass) ((PinosGstSourceClass*)(klass))
|
||||
|
||||
typedef struct _PinosGstSource PinosGstSource;
|
||||
typedef struct _PinosGstSourceClass PinosGstSourceClass;
|
||||
typedef struct _PinosGstSourcePrivate PinosGstSourcePrivate;
|
||||
|
||||
struct _PinosGstSource {
|
||||
PinosSource object;
|
||||
|
||||
PinosGstSourcePrivate *priv;
|
||||
};
|
||||
|
||||
struct _PinosGstSourceClass {
|
||||
PinosSourceClass parent_class;
|
||||
};
|
||||
|
||||
GType pinos_gst_source_get_type (void);
|
||||
|
||||
PinosSource * pinos_gst_source_new (PinosDaemon *daemon,
|
||||
const gchar *name,
|
||||
GstElement *element);
|
||||
|
||||
G_END_DECLS
|
||||
|
||||
#endif /* __PINOS_GST_SOURCE_H__ */
|
||||
|
||||
|
|
@ -1,60 +0,0 @@
|
|||
/* Pinos
|
||||
* Copyright (C) 2015 Wim Taymans <wim.taymans@gmail.com>
|
||||
*
|
||||
* 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., 51 Franklin St, Fifth Floor,
|
||||
* Boston, MA 02110-1301, USA.
|
||||
*/
|
||||
|
||||
#ifndef __PV_GST_MANAGER_H__
|
||||
#define __PV_GST_MANAGER_H__
|
||||
|
||||
#include <glib-object.h>
|
||||
|
||||
#include <client/pinos.h>
|
||||
#include <server/pv-daemon.h>
|
||||
|
||||
G_BEGIN_DECLS
|
||||
|
||||
#define PV_TYPE_GST_MANAGER (pv_gst_manager_get_type ())
|
||||
#define PV_IS_GST_MANAGER(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), PV_TYPE_GST_MANAGER))
|
||||
#define PV_IS_GST_MANAGER_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), PV_TYPE_GST_MANAGER))
|
||||
#define PV_GST_MANAGER_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), PV_TYPE_GST_MANAGER, PvGstManagerClass))
|
||||
#define PV_GST_MANAGER(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), PV_TYPE_GST_MANAGER, PvGstManager))
|
||||
#define PV_GST_MANAGER_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), PV_TYPE_GST_MANAGER, PvGstManagerClass))
|
||||
#define PV_GST_MANAGER_CAST(obj) ((PvGstManager*)(obj))
|
||||
#define PV_GST_MANAGER_CLASS_CAST(klass) ((PvGstManagerClass*)(klass))
|
||||
|
||||
typedef struct _PvGstManager PvGstManager;
|
||||
typedef struct _PvGstManagerClass PvGstManagerClass;
|
||||
typedef struct _PvGstManagerPrivate PvGstManagerPrivate;
|
||||
|
||||
struct _PvGstManager {
|
||||
GObject object;
|
||||
|
||||
PvGstManagerPrivate *priv;
|
||||
};
|
||||
|
||||
struct _PvGstManagerClass {
|
||||
GObjectClass parent_class;
|
||||
};
|
||||
|
||||
GType pv_gst_manager_get_type (void);
|
||||
|
||||
PvGstManager * pv_gst_manager_new (PvDaemon *daemon);
|
||||
|
||||
G_END_DECLS
|
||||
|
||||
#endif /* __PV_GST_MANAGER_H__ */
|
||||
|
||||
|
|
@ -1,61 +0,0 @@
|
|||
/* Pinos
|
||||
* Copyright (C) 2015 Wim Taymans <wim.taymans@gmail.com>
|
||||
*
|
||||
* 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., 51 Franklin St, Fifth Floor,
|
||||
* Boston, MA 02110-1301, USA.
|
||||
*/
|
||||
|
||||
#ifndef __PV_GST_SOURCE_H__
|
||||
#define __PV_GST_SOURCE_H__
|
||||
|
||||
#include <glib-object.h>
|
||||
|
||||
#include <client/pinos.h>
|
||||
#include <server/pv-daemon.h>
|
||||
#include <server/pv-source.h>
|
||||
|
||||
G_BEGIN_DECLS
|
||||
|
||||
#define PV_TYPE_GST_SOURCE (pv_gst_source_get_type ())
|
||||
#define PV_IS_GST_SOURCE(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), PV_TYPE_GST_SOURCE))
|
||||
#define PV_IS_GST_SOURCE_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), PV_TYPE_GST_SOURCE))
|
||||
#define PV_GST_SOURCE_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), PV_TYPE_GST_SOURCE, PvGstSourceClass))
|
||||
#define PV_GST_SOURCE(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), PV_TYPE_GST_SOURCE, PvGstSource))
|
||||
#define PV_GST_SOURCE_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), PV_TYPE_GST_SOURCE, PvGstSourceClass))
|
||||
#define PV_GST_SOURCE_CAST(obj) ((PvGstSource*)(obj))
|
||||
#define PV_GST_SOURCE_CLASS_CAST(klass) ((PvGstSourceClass*)(klass))
|
||||
|
||||
typedef struct _PvGstSource PvGstSource;
|
||||
typedef struct _PvGstSourceClass PvGstSourceClass;
|
||||
typedef struct _PvGstSourcePrivate PvGstSourcePrivate;
|
||||
|
||||
struct _PvGstSource {
|
||||
PvSource object;
|
||||
|
||||
PvGstSourcePrivate *priv;
|
||||
};
|
||||
|
||||
struct _PvGstSourceClass {
|
||||
PvSourceClass parent_class;
|
||||
};
|
||||
|
||||
GType pv_gst_source_get_type (void);
|
||||
|
||||
PvSource * pv_gst_source_new (PvDaemon *daemon, const gchar *name, GstElement *element);
|
||||
|
||||
G_END_DECLS
|
||||
|
||||
#endif /* __PV_GST_SOURCE_H__ */
|
||||
|
||||
Loading…
Add table
Add a link
Reference in a new issue