1 /* GStreamer RTMP Library
2 * Copyright (C) 2017 Make.TV, Inc. <info@make.tv>
3 * Contact: Jan Alexander Steffens (heftig) <jsteffens@make.tv>
5 * This library is free software; you can redistribute it and/or
6 * modify it under the terms of the GNU Library General Public
7 * License as published by the Free Software Foundation; either
8 * version 2 of the License, or (at your option) any later version.
10 * This library is distributed in the hope that it will be useful,
11 * but WITHOUT ANY WARRANTY; without even the implied warranty of
12 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
13 * Library General Public License for more details.
15 * You should have received a copy of the GNU Library General Public
16 * License along with this library; if not, write to the
17 * Free Software Foundation, Inc., 51 Franklin St, Fifth Floor,
18 * Boston, MA 02110-1301, USA.
21 #ifndef _GST_RTMP_CLIENT_H_
22 #define _GST_RTMP_CLIENT_H_
24 #include "rtmpconnection.h"
28 #define GST_TYPE_RTMP_SCHEME (gst_rtmp_scheme_get_type ())
32 GST_RTMP_SCHEME_RTMP = 0,
33 GST_RTMP_SCHEME_RTMPS,
36 GType gst_rtmp_scheme_get_type (void);
38 GstRtmpScheme gst_rtmp_scheme_from_string (const gchar * string);
39 GstRtmpScheme gst_rtmp_scheme_from_uri (const GstUri * uri);
40 const gchar * gst_rtmp_scheme_to_string (GstRtmpScheme scheme);
41 const gchar * const * gst_rtmp_scheme_get_strings (void);
42 guint gst_rtmp_scheme_get_default_port (GstRtmpScheme scheme);
46 #define GST_TYPE_RTMP_AUTHMOD (gst_rtmp_authmod_get_type ())
50 GST_RTMP_AUTHMOD_NONE = 0,
51 GST_RTMP_AUTHMOD_AUTO,
52 GST_RTMP_AUTHMOD_ADOBE,
55 GType gst_rtmp_authmod_get_type (void);
59 typedef struct _GstRtmpLocation
69 GstRtmpAuthmod authmod;
71 GTlsCertificateFlags tls_flags;
75 void gst_rtmp_location_copy (GstRtmpLocation * dest,
76 const GstRtmpLocation * src);
77 void gst_rtmp_location_clear (GstRtmpLocation * uri);
78 gchar *gst_rtmp_location_get_string (const GstRtmpLocation * location,
79 gboolean with_stream);
83 void gst_rtmp_client_connect_async (const GstRtmpLocation * location,
84 GCancellable * cancellable, GAsyncReadyCallback callback,
86 GstRtmpConnection *gst_rtmp_client_connect_finish (GAsyncResult * result,
88 void gst_rtmp_client_start_publish_async (GstRtmpConnection * connection,
89 const gchar * stream, GCancellable * cancellable,
90 GAsyncReadyCallback callback, gpointer user_data);
91 gboolean gst_rtmp_client_start_publish_finish (GstRtmpConnection * connection,
92 GAsyncResult * result, guint * stream_id, GError ** error);
94 void gst_rtmp_client_start_play_async (GstRtmpConnection * connection,
95 const gchar * stream, GCancellable * cancellable,
96 GAsyncReadyCallback callback, gpointer user_data);
97 gboolean gst_rtmp_client_start_play_finish (GstRtmpConnection * connection,
98 GAsyncResult * result, guint * stream_id, GError ** error);