curl*sink: fix some gst-indent problems

https://bugzilla.gnome.org/show_bug.cgi?id=728960
This commit is contained in:
Sebastian Rasmussen 2014-04-16 01:50:03 +02:00 committed by Sebastian Dröge
parent db68e036e9
commit bdd2676a67
9 changed files with 37 additions and 37 deletions

View file

@ -1012,8 +1012,8 @@ gst_curl_base_sink_transfer_thread_func (gpointer data)
/* Start driving the transfer. */ /* Start driving the transfer. */
klass->handle_transfer (sink); klass->handle_transfer (sink);
/* easy handle will be possibly re-used for next transfer, thus it needs to /* easy handle will be possibly re-used for next transfer, thus it needs
* be removed from the multi stack and re-added again */ * to be removed from the multi stack and re-added again */
if (!gst_curl_base_sink_is_live (sink)) { if (!gst_curl_base_sink_is_live (sink)) {
curl_multi_remove_handle (sink->multi_handle, sink->curl); curl_multi_remove_handle (sink->multi_handle, sink->curl);
} }

View file

@ -102,7 +102,7 @@ struct _GstCurlBaseSinkClass
size_t block_size, guint * last_chunk); size_t block_size, guint * last_chunk);
size_t (*flush_data_unlocked) (GstCurlBaseSink * sink, void *curl_ptr, size_t (*flush_data_unlocked) (GstCurlBaseSink * sink, void *curl_ptr,
size_t block_size, gboolean new_file, gboolean close_transfer); size_t block_size, gboolean new_file, gboolean close_transfer);
gboolean (*has_buffered_data_unlocked) (GstCurlBaseSink * sink); gboolean (*has_buffered_data_unlocked) (GstCurlBaseSink * sink);
}; };
GType gst_curl_base_sink_get_type (void); GType gst_curl_base_sink_get_type (void);

View file

@ -26,7 +26,8 @@
* a local or network drive. * a local or network drive.
* *
* <refsect2> * <refsect2>
* <title>Example launch line (upload a JPEG file to /home/test/images directory)</title> * <title>Example launch line (upload a JPEG file to /home/test/images
* directory)</title>
* |[ * |[
* gst-launch filesrc location=image.jpg ! jpegparse ! curlfilesink \ * gst-launch filesrc location=image.jpg ! jpegparse ! curlfilesink \
* file-name=image.jpg \ * file-name=image.jpg \

View file

@ -26,7 +26,8 @@
* an FTP server. * an FTP server.
* *
* <refsect2> * <refsect2>
* <title>Example launch line (upload a JPEG file to /home/test/images directory)</title> * <title>Example launch line (upload a JPEG file to /home/test/images
* directory)</title>
* |[ * |[
* gst-launch filesrc location=image.jpg ! jpegparse ! curlftpsink \ * gst-launch filesrc location=image.jpg ! jpegparse ! curlftpsink \
* file-name=image.jpg \ * file-name=image.jpg \

View file

@ -48,7 +48,7 @@ struct _GstCurlFtpSink
gchar *ftp_port_arg; gchar *ftp_port_arg;
gboolean epsv_mode; gboolean epsv_mode;
gboolean tmpfile_create; gboolean tmpfile_create;
gchar *tmpfile_name; gchar *tmpfile_name;
gboolean create_dirs; gboolean create_dirs;
}; };

View file

@ -26,7 +26,6 @@
#include "gstcurlsshsink.h" #include "gstcurlsshsink.h"
G_BEGIN_DECLS G_BEGIN_DECLS
#define GST_TYPE_CURL_SFTP_SINK \ #define GST_TYPE_CURL_SFTP_SINK \
(gst_curl_sftp_sink_get_type()) (gst_curl_sftp_sink_get_type())
#define GST_CURL_SFTP_SINK(obj) \ #define GST_CURL_SFTP_SINK(obj) \
@ -37,7 +36,6 @@ G_BEGIN_DECLS
(G_TYPE_CHECK_INSTANCE_TYPE((obj),GST_TYPE_CURL_SFTP_SINK)) (G_TYPE_CHECK_INSTANCE_TYPE((obj),GST_TYPE_CURL_SFTP_SINK))
#define GST_IS_CURL_SFTP_SINK_CLASS(klass) \ #define GST_IS_CURL_SFTP_SINK_CLASS(klass) \
(G_TYPE_CHECK_CLASS_TYPE((klass),GST_TYPE_CURL_SFTP_SINK)) (G_TYPE_CHECK_CLASS_TYPE((klass),GST_TYPE_CURL_SFTP_SINK))
typedef struct _GstCurlSftpSink GstCurlSftpSink; typedef struct _GstCurlSftpSink GstCurlSftpSink;
typedef struct _GstCurlSftpSinkClass GstCurlSftpSinkClass; typedef struct _GstCurlSftpSinkClass GstCurlSftpSinkClass;
@ -46,7 +44,7 @@ struct _GstCurlSftpSink
{ {
GstCurlSshSink parent; GstCurlSshSink parent;
/*< private >*/ /*< private > */
gboolean create_dirs; gboolean create_dirs;
}; };
@ -58,5 +56,4 @@ struct _GstCurlSftpSinkClass
GType gst_curl_sftp_sink_get_type (void); GType gst_curl_sftp_sink_get_type (void);
G_END_DECLS G_END_DECLS
#endif #endif

View file

@ -167,7 +167,8 @@ add_final_boundary_unlocked (GstCurlSmtpSink * sink)
g_assert (array); g_assert (array);
/* it will need up to 5 bytes if line-breaking is enabled /* it will need up to 5 bytes if line-breaking is enabled
* additional byte is needed for <CR> as it is not automatically added by glib */ * additional byte is needed for <CR> as it is not automatically added by
* glib */
data_out = g_malloc (6); data_out = g_malloc (6);
save = sink->base64_chunk->save; save = sink->base64_chunk->save;
state = sink->base64_chunk->state; state = sink->base64_chunk->state;
@ -719,7 +720,8 @@ gst_curl_smtp_sink_set_transfer_options_unlocked (GstCurlBaseSink * bcsink)
return TRUE; return TRUE;
} }
static void // FIXME: exactly the same function as in http sink /* FIXME: exactly the same function as in http sink */
static void
gst_curl_smtp_sink_set_mime_type (GstCurlBaseSink * bcsink, GstCaps * caps) gst_curl_smtp_sink_set_mime_type (GstCurlBaseSink * bcsink, GstCaps * caps)
{ {
GstCurlSmtpSink *sink = GST_CURL_SMTP_SINK (bcsink); GstCurlSmtpSink *sink = GST_CURL_SMTP_SINK (bcsink);
@ -769,7 +771,8 @@ gst_curl_smtp_sink_flush_data_unlocked (GstCurlBaseSink * bcsink,
} }
/* it will need up to 5 bytes if line-breaking is enabled, however an /* it will need up to 5 bytes if line-breaking is enabled, however an
* additional byte is needed for <CR> as it is not automatically added by glib */ * additional byte is needed for <CR> as it is not automatically added by
* glib */
data_out = g_malloc (6); data_out = g_malloc (6);
len = g_base64_encode_close (TRUE, data_out, &state, &save); len = g_base64_encode_close (TRUE, data_out, &state, &save);
chunk->state = state; chunk->state = state;
@ -834,8 +837,8 @@ transfer_chunk (void *curl_ptr, TransferBuffer * buffer, Base64Chunk * chunk,
gint i; gint i;
/* if line-breaking is enabled, at least: ((len / 3 + 1) * 4 + 4) / 72 + 1 /* if line-breaking is enabled, at least: ((len / 3 + 1) * 4 + 4) / 72 + 1
* bytes of extra space is required. However, additional <CR>'s are required, * bytes of extra space is required. However, additional <CR>'s are
* thus we need ((len / 3 + 2) * 4 + 4) / 72 + 2 extra bytes. * required, thus we need ((len / 3 + 2) * 4 + 4) / 72 + 2 extra bytes.
*/ */
size_out = (bytes_to_send / 3 + 1) * 4 + 4 + bytes_to_send + size_out = (bytes_to_send / 3 + 1) * 4 + 4 + bytes_to_send +
((bytes_to_send / 3 + 2) * 4 + 4) / 72 + 2; ((bytes_to_send / 3 + 2) * 4 + 4) / 72 + 2;

View file

@ -26,7 +26,6 @@
#include "gstcurlbasesink.h" #include "gstcurlbasesink.h"
G_BEGIN_DECLS G_BEGIN_DECLS
#define GST_TYPE_CURL_SSH_SINK \ #define GST_TYPE_CURL_SSH_SINK \
(gst_curl_ssh_sink_get_type()) (gst_curl_ssh_sink_get_type())
#define GST_CURL_SSH_SINK(obj) \ #define GST_CURL_SSH_SINK(obj) \
@ -39,9 +38,9 @@ G_BEGIN_DECLS
(G_TYPE_CHECK_INSTANCE_TYPE((obj),GST_TYPE_CURL_SSH_SINK)) (G_TYPE_CHECK_INSTANCE_TYPE((obj),GST_TYPE_CURL_SSH_SINK))
#define GST_IS_CURL_SSH_SINK_CLASS(klass) \ #define GST_IS_CURL_SSH_SINK_CLASS(klass) \
(G_TYPE_CHECK_CLASS_TYPE((klass),GST_TYPE_CURL_SSH_SINK)) (G_TYPE_CHECK_CLASS_TYPE((klass),GST_TYPE_CURL_SSH_SINK))
/* see <curl/curl.h> */ /* see <curl/curl.h> */
typedef enum { typedef enum
{
GST_CURLSSH_AUTH_NONE = CURLSSH_AUTH_NONE, GST_CURLSSH_AUTH_NONE = CURLSSH_AUTH_NONE,
GST_CURLSSH_AUTH_PUBLICKEY = CURLSSH_AUTH_PUBLICKEY, GST_CURLSSH_AUTH_PUBLICKEY = CURLSSH_AUTH_PUBLICKEY,
GST_CURLSSH_AUTH_PASSWORD = CURLSSH_AUTH_PASSWORD GST_CURLSSH_AUTH_PASSWORD = CURLSSH_AUTH_PASSWORD
@ -55,22 +54,22 @@ struct _GstCurlSshSink
{ {
GstCurlBaseSink parent; GstCurlBaseSink parent;
/*< private >*/ /*< private > */
guint ssh_auth_type; /* for now, supporting only: guint ssh_auth_type; /* for now, supporting only:
CURLSSH_AUTH_PASSWORD (passwd auth) OR CURLSSH_AUTH_PASSWORD (passwd auth) OR
CURLSSH_AUTH_PUBLICKEY (pub/pvt key auth) */ CURLSSH_AUTH_PUBLICKEY (pub/pvt key auth) */
gchar *ssh_pub_keyfile; /* filename for the public key: gchar *ssh_pub_keyfile; /* filename for the public key:
CURLOPT_SSH_PUBLIC_KEYFILE */ CURLOPT_SSH_PUBLIC_KEYFILE */
gchar *ssh_priv_keyfile; /* filename for the private key: gchar *ssh_priv_keyfile; /* filename for the private key:
CURLOPT_SSH_PRIVATE_KEYFILE */ CURLOPT_SSH_PRIVATE_KEYFILE */
gchar *ssh_key_passphrase; /* passphrase for the pvt key: gchar *ssh_key_passphrase; /* passphrase for the pvt key:
CURLOPT_KEYPASSWD */ CURLOPT_KEYPASSWD */
gchar *ssh_knownhosts; /* filename of the 'known_hosts' file: gchar *ssh_knownhosts; /* filename of the 'known_hosts' file:
CURLOPT_SSH_KNOWN_HOSTS */ CURLOPT_SSH_KNOWN_HOSTS */
gboolean ssh_accept_unknownhost; /* accept or reject unknown public key gboolean ssh_accept_unknownhost; /* accept or reject unknown public key
from remote host */ from remote host */
}; };
struct _GstCurlSshSinkClass struct _GstCurlSshSinkClass
@ -78,11 +77,10 @@ struct _GstCurlSshSinkClass
GstCurlBaseSinkClass parent_class; GstCurlBaseSinkClass parent_class;
/* vmethods */ /* vmethods */
gboolean (*set_options_unlocked) (GstCurlBaseSink *sink); gboolean (*set_options_unlocked) (GstCurlBaseSink * sink);
}; };
GType gst_curl_ssh_sink_get_type (void); GType gst_curl_ssh_sink_get_type (void);
G_END_DECLS G_END_DECLS
#endif #endif

View file

@ -253,9 +253,9 @@ gst_curl_tls_sink_set_options_unlocked (GstCurlBaseSink * bcsink)
} }
} }
/* note that, using ca-path can allow libcurl to make SSL-connections much more /* note that, using ca-path can allow libcurl to make SSL-connections much
* efficiently than using ca-cert if the ca-cert ile * more efficiently than using ca-cert if the ca-cert ile contains many CA
* contains many CA certificates. */ * certificates. */
if (sink->ca_cert != NULL && strlen (sink->ca_cert)) { if (sink->ca_cert != NULL && strlen (sink->ca_cert)) {
GST_DEBUG ("setting ca cert"); GST_DEBUG ("setting ca cert");
curl_easy_setopt (bcsink->curl, CURLOPT_CAINFO, sink->ca_cert); curl_easy_setopt (bcsink->curl, CURLOPT_CAINFO, sink->ca_cert);