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_SRC_H__
23 #define __GST_SRT_SRC_H__
27 #include <gst/base/gstpushsrc.h>
29 #include "gstsrtobject.h"
33 #define GST_TYPE_SRT_SRC (gst_srt_src_get_type ())
34 #define GST_IS_SRT_SRC(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), GST_TYPE_SRT_SRC))
35 #define GST_IS_SRT_SRC_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), GST_TYPE_SRT_SRC))
36 #define GST_SRT_SRC_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), GST_TYPE_SRT_SRC, GstSRTSrcClass))
37 #define GST_SRT_SRC(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), GST_TYPE_SRT_SRC, GstSRTSrc))
38 #define GST_SRT_SRC_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), GST_TYPE_SRT_SRC, GstSRTSrcClass))
39 #define GST_SRT_SRC_CAST(obj) ((GstSRTSrc*)(obj))
40 #define GST_SRT_SRC_CLASS_CAST(klass) ((GstSRTSrcClass*)(klass))
42 typedef struct _GstSRTSrc GstSRTSrc;
43 typedef struct _GstSRTSrcClass GstSRTSrcClass;
50 GstSRTObject *srtobject;
51 GCancellable *cancellable;
56 struct _GstSRTSrcClass {
57 GstPushSrcClass parent_class;
59 void (*caller_added) (GstSRTSrc *self, int sock, GSocketAddress * addr);
60 void (*caller_removed) (GstSRTSrc *self, int sock, GSocketAddress * addr);
61 void (*caller_rejected) (GstSRTSrc *self, GSocketAddress * peer_address,
62 const gchar * stream_id, gpointer data);
63 gboolean (*caller_connecting) (GstSRTSrc *self, GSocketAddress * peer_address,
64 const gchar * stream_id, gpointer data);
67 GType gst_srt_src_get_type (void);
71 #endif // __GST_SRT_SRC_H__