Merge branch 'upstream/1.16' into tizen_gst_1.16.2
[platform/upstream/gst-plugins-good.git] / ext / soup / gstsouphttpsrc.h
index 3f71f41..458fa2a 100644 (file)
@@ -9,7 +9,7 @@
  * This library is distributed in the hope that it will be useful,
  * but WITHOUT ANY WARRANTY; without even the implied warranty of
  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
- * Library General Public License for more 
+ * Library General Public License for more
  */
 
 #ifndef __GST_SOUP_HTTP_SRC_H__
@@ -50,6 +50,7 @@ struct _GstSoupHTTPSrc {
 
   gchar *location;             /* Full URI. */
   gchar *redirection_uri;      /* Full URI after redirections. */
+  gboolean redirection_permanent; /* Permanent or temporary redirect? */
   gchar *user_agent;           /* User-Agent HTTP header. */
   gboolean automatic_redirect; /* Follow redirects. */
   SoupURI *proxy;              /* HTTP proxy URI. */
@@ -58,16 +59,14 @@ struct _GstSoupHTTPSrc {
   gchar *proxy_id;             /* Authentication user id for proxy URI. */
   gchar *proxy_pw;             /* Authentication user password for proxy URI. */
   gchar **cookies;             /* HTTP request cookies. */
-  GMainContext *context;       /* I/O context. */
-  GMainLoop *loop;             /* Event loop. */
   SoupSession *session;        /* Async context. */
-  GstSoupHTTPSrcSessionIOStatus session_io_status;
-                               /* Async I/O status. */
+  gboolean session_is_shared;
+  SoupSession *external_session; /* Shared via GstContext */
+  gboolean forced_external_session; /* If session was explicitly set from application */
   SoupMessage *msg;            /* Request message. */
-  GstFlowReturn ret;           /* Return code from callback. */
-  GstBuffer **outbuf;          /* Return buffer allocated by callback. */
-  gboolean interrupted;        /* Signal unlock(). */
-  gboolean retry;              /* Should attempt to reconnect. */
+  gint retry_count;            /* Number of retries since we received data */
+  gint max_retries;            /* Maximum number of retries */
+  gchar *method;               /* HTTP method */
 
   gboolean got_headers;        /* Already received headers from the server */
   gboolean have_size;          /* Received and parsed Content-Length
@@ -83,6 +82,19 @@ struct _GstSoupHTTPSrc {
                                 * decide if an out of range request should be
                                 * handled as an error or EOS when the content
                                 * size is unknown */
+  gboolean keep_alive;         /* Use keep-alive sessions */
+  gboolean ssl_strict;
+  gchar *ssl_ca_file;
+  gboolean ssl_use_system_ca_file;
+  GTlsDatabase *tls_database;
+  GTlsInteraction *tls_interaction;
+
+  GCancellable *cancellable;
+  GInputStream *input_stream;
+
+  gint reduce_blocksize_count;
+  gint increase_blocksize_count;
+  guint minimum_blocksize;
 
   /* Shoutcast/icecast metadata extraction handling. */
   gboolean iradio_mode;
@@ -92,7 +104,9 @@ struct _GstSoupHTTPSrc {
   gchar *iradio_url;
 
   GstStructure *extra_headers;
-
+#ifdef TIZEN_FEATURE_SOUP_MODIFICATION
+  SoupCookieJar *cookie_jar;
+#endif
   SoupLoggerLogLevel log_level;/* Soup HTTP session logger level */
 
   gboolean compress;
@@ -100,7 +114,18 @@ struct _GstSoupHTTPSrc {
   guint timeout;
 
   GMutex mutex;
-  GCond request_finished_cond;
+  GCond have_headers_cond;
+
+  GstEvent *http_headers_event;
+
+  gint64 last_socket_read_time;
+
+#ifdef TIZEN_FEATURE_SOUP_MODIFICATION
+  gchar *dash_oldest_segment;
+  gchar *dash_newest_segment;
+  guint64 received_total;    /* temp: for debugging */
+  guint dlna_opt;            /* DLNA server option */
+#endif  
 };
 
 struct _GstSoupHTTPSrcClass {