1 /* GStreamer 2 * Copyright (C) 2011 David Schleef <ds@entropywave.com> 3 * Copyright (C) 2021 Igalia S.L. 4 * 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. 9 * 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. 14 * 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. 19 */ 20 21 #ifndef _GST_SOUP_HTTP_CLIENT_SINK_H_ 22 #define _GST_SOUP_HTTP_CLIENT_SINK_H_ 23 24 #include "gstsouploader.h" 25 #include "gstsouputils.h" 26 #include <gst/base/gstbasesink.h> 27 28 G_BEGIN_DECLS 29 30 #define GST_TYPE_SOUP_HTTP_CLIENT_SINK (gst_soup_http_client_sink_get_type()) 31 G_DECLARE_FINAL_TYPE (GstSoupHttpClientSink, gst_soup_http_client_sink, 32 GST, SOUP_HTTP_CLIENT_SINK, GstBaseSink) 33 34 struct _GstSoupHttpClientSink 35 { 36 GstBaseSink base_souphttpsink; 37 38 GMutex mutex; 39 GCond cond; 40 GMainContext *context; 41 GMainLoop *loop; 42 GThread *thread; 43 GSource *timer; 44 SoupMessage *message; 45 SoupSession *session; 46 GList *queued_buffers; 47 GList *sent_buffers; 48 GList *streamheader_buffers; 49 GBytes *request_body; 50 51 int status_code; 52 char *reason_phrase; 53 54 guint64 offset; 55 int timeout; 56 gint failures; 57 58 /* properties */ 59 SoupSession *prop_session; 60 char *location; 61 char *user_id; 62 char *user_pw; 63 GstSoupUri *proxy; 64 char *proxy_id; 65 char *proxy_pw; 66 char *user_agent; 67 gboolean automatic_redirect; 68 gchar **cookies; 69 SoupLoggerLogLevel log_level; 70 gint retry_delay; 71 gint retries; 72 }; 73 74 G_END_DECLS 75 76 #endif 77