2 * Copyright (C) 2018, Collabora Ltd.
3 * Copyright (C) 2018, SK Telecom, Co., Ltd.
4 * Author: Jeongseok Kim <jeongseok.kim@sk.com>
6 * This library is free software; you can redistribute it and/or
7 * modify it under the terms of the GNU Library General Public
8 * License as published by the Free Software Foundation; either
9 * version 2 of the License, or (at your option) any later version.
11 * This library is distributed in the hope that it will be useful,
12 * but WITHOUT ANY WARRANTY; without even the implied warranty of
13 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
14 * Library General Public License for more details.
16 * You should have received a copy of the GNU Library General Public
17 * License along with this library; if not, write to the
18 * Free Software Foundation, Inc., 51 Franklin St, Fifth Floor,
19 * Boston, MA 02110-1301, USA.
22 #ifndef __GST_SRT_SINK_H__
23 #define __GST_SRT_SINK_H__
26 #include <gst/base/gstbasesink.h>
29 #include "gstsrtobject.h"
33 #define GST_TYPE_SRT_SINK (gst_srt_sink_get_type ())
34 #define GST_IS_SRT_SINK(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), GST_TYPE_SRT_SINK))
35 #define GST_IS_SRT_SINK_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), GST_TYPE_SRT_SINK))
36 #define GST_SRT_SINK_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), GST_TYPE_SRT_SINK, GstSRTSinkClass))
37 #define GST_SRT_SINK(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), GST_TYPE_SRT_SINK, GstSRTSink))
38 #define GST_SRT_SINK_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), GST_TYPE_SRT_SINK, GstSRTSinkClass))
39 #define GST_SRT_SINK_CAST(obj) ((GstSRTSink*)(obj))
40 #define GST_SRT_SINK_CLASS_CAST(klass) ((GstSRTSinkClass*)(klass))
42 typedef struct _GstSRTSink GstSRTSink;
43 typedef struct _GstSRTSinkClass GstSRTSinkClass;
48 GstBufferList *headers;
50 GstSRTObject *srtobject;
51 GCancellable *cancellable;
54 struct _GstSRTSinkClass {
55 GstBaseSinkClass parent_class;
57 void (*caller_added) (GstSRTSink *self, int sock, GSocketAddress * addr);
58 void (*caller_removed) (GstSRTSink *self, int sock, GSocketAddress * addr);
59 void (*caller_rejected) (GstSRTSink *self, GSocketAddress * peer_address,
60 const gchar * stream_id, gpointer data);
61 gboolean (*caller_connecting) (GstSRTSink *self, GSocketAddress * peer_address,
62 const gchar * stream_id, gpointer data);
65 GType gst_srt_sink_get_type (void);
69 #endif // __GST_SRT_SINK_H__