2 * Copyright (C) <1999> Erik Walthinsen <omega@cse.ogi.edu>
3 * Copyright (C) <2004> Thomas Vander Stichele <thomas at apestaart dot org>
4 * Copyright (C) <2011> Collabora Ltd.
5 * Author: Sebastian Dröge <sebastian.droege@collabora.co.uk>
7 * This library is free software; you can redistribute it and/or
8 * modify it under the terms of the GNU Library General Public
9 * License as published by the Free Software Foundation; either
10 * version 2 of the License, or (at your option) any later version.
12 * This library is distributed in the hope that it will be useful,
13 * but WITHOUT ANY WARRANTY; without even the implied warranty of
14 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
15 * Library General Public License for more details.
17 * You should have received a copy of the GNU Library General Public
18 * License along with this library; if not, write to the
19 * Free Software Foundation, Inc., 51 Franklin St, Fifth Floor,
20 * Boston, MA 02110-1301, USA.
24 #ifndef __GST_MULTI_SOCKET_SINK_H__
25 #define __GST_MULTI_SOCKET_SINK_H__
30 #include <gst/base/gstbasesink.h>
32 #include "gstmultihandlesink.h"
36 #define GST_TYPE_MULTI_SOCKET_SINK \
37 (gst_multi_socket_sink_get_type())
38 #define GST_MULTI_SOCKET_SINK(obj) \
39 (G_TYPE_CHECK_INSTANCE_CAST((obj),GST_TYPE_MULTI_SOCKET_SINK,GstMultiSocketSink))
40 #define GST_MULTI_SOCKET_SINK_CLASS(klass) \
41 (G_TYPE_CHECK_CLASS_CAST((klass),GST_TYPE_MULTI_SOCKET_SINK,GstMultiSocketSinkClass))
42 #define GST_IS_MULTI_SOCKET_SINK(obj) \
43 (G_TYPE_CHECK_INSTANCE_TYPE((obj),GST_TYPE_MULTI_SOCKET_SINK))
44 #define GST_IS_MULTI_SOCKET_SINK_CLASS(klass) \
45 (G_TYPE_CHECK_CLASS_TYPE((klass),GST_TYPE_MULTI_SOCKET_SINK))
46 #define GST_MULTI_SOCKET_SINK_GET_CLASS(klass) \
47 (G_TYPE_INSTANCE_GET_CLASS ((klass), GST_TYPE_MULTI_SOCKET_SINK, GstMultiSocketSinkClass))
50 typedef struct _GstMultiSocketSink GstMultiSocketSink;
51 typedef struct _GstMultiSocketSinkClass GstMultiSocketSinkClass;
53 /* structure for a client
56 GstMultiHandleClient client;
64 * The multisocketsink object structure.
66 struct _GstMultiSocketSink {
67 GstMultiHandleSink element;
70 GMainContext *main_context;
71 GCancellable *cancellable;
74 struct _GstMultiSocketSinkClass {
75 GstMultiHandleSinkClass parent_class;
78 void (*add) (GstMultiSocketSink *sink, GSocket *socket);
79 void (*add_full) (GstMultiSocketSink *sink, GSocket *socket,
81 GstFormat format, guint64 value,
82 GstFormat max_format, guint64 max_value);
83 void (*remove) (GstMultiSocketSink *sink, GSocket *socket);
84 void (*remove_flush) (GstMultiSocketSink *sink, GSocket *socket);
85 GstStructure* (*get_stats) (GstMultiSocketSink *sink, GSocket *socket);
90 GType gst_multi_socket_sink_get_type (void);
94 #endif /* __GST_MULTI_SOCKET_SINK_H__ */