GNOME Bugzilla – Bug 641496
New plugin: curlsink
Last modified: 2011-03-01 11:22:50 UTC
Created attachment 180082 [details] CurlSink plugin This is a curl sink plugin for transferring data to a server using (currently) HTTP/HTTPS protocols.
Created attachment 180084 [details] Header file for CurlSink plugin
Please could you add a license header with copyright to the top of both source files? (ideally LGPL v2.1 and later)
Patricia: ping?
Created attachment 180810 [details] CurSink plugin Added license header with copyright.
Created attachment 180811 [details] Header file for CurlSink plugin Added license header with copyright.
Thanks, license headers are fine now. Now, how is one supposed to use this exactly? I tried this, but it errors out before I even had a chance to point the browser towards it: $ gst-launch-0.10 v4l2src ! jpegenc ! multipartmux ! curlsink Setting pipeline to PAUSED ... Pipeline is live and does not need PREROLL ... Setting pipeline to PLAYING ... New clock: GstSystemClock ERROR: from element /GstPipeline:pipeline0/GstCurlSink:curlsink0: 100 continue response missing Additional debug info: gstcurlsink.c(994): gst_curl_sink_handle_transfer (): /GstPipeline:pipeline0/GstCurlSink:curlsink0 Execution ended after 628189737 ns.
When doing POST requests, libcurl sets by defualt the "Expect: 100-Continue" HTTP header. This means that it will not post any data before an "OK" message is received. Example: Upload a JPEG file to an HTTP server: gst-launch-0.10 filesrc blocksize=16384 location=image.jpg ! curlsink file-name=image.jpg location=http://192.168.0.1:8080/cgi-bin/patupload.cgi/ user=test passwd=test content-type=image/jpeg use-content-length=false Setting pipeline to PAUSED ... Pipeline is PREROLLING ... Pipeline is PREROLLED ... Setting pipeline to PLAYING ... New clock: GstSystemClock Got EOS from element "pipeline0". Execution ended after 433697294 ns. Setting pipeline to PAUSED ... Setting pipeline to READY ... Setting pipeline to NULL ... Freeing pipeline ...
Ah, I see. For some reason I was under the impression the sink would implement a simple http *server*, not just a client that posts stuff to a server.
Thanks, pushed: commit c6d7071d938d2acb5481f5e8ea9cf0e671a5c2b4 Author: Tim-Philipp Müller <tim.muller@collabora.co.uk> Date: Tue Mar 1 11:16:56 2011 +0000 docs: add new curl plugin and curlsink element to docs commit 1fe9c8c8ae2bf8456b5ac9b411a52de53ba95c3e Author: Tim-Philipp Müller <tim.muller@collabora.co.uk> Date: Tue Mar 1 10:49:57 2011 +0000 configure: also check for platform socket headers needed by curlsink element commit eb5b3be384fca545273f4eeaeea47d28d9d2e2ab Author: Tim-Philipp Müller <tim.muller@collabora.co.uk> Date: Tue Mar 1 10:03:07 2011 +0000 curlsink: no need for a private instance structure The entire instance structure is private anyway. commit 6f01abd85df9edf2a4592d83cb52fe9ef12f8bcf Author: Tim-Philipp Müller <tim.muller@collabora.co.uk> Date: Tue Mar 1 09:56:51 2011 +0000 curlsink: clean up property registration code Fix some typos, use same style as in all other plugins, avoiding unnecessary temporary GParamSpec variables; use G_PARAM_SPEC_STATIC_STRINGS. commit 56c2cc0f83ce93de97714b119e478960d5dbb02e Author: Tim-Philipp Müller <tim.muller@collabora.co.uk> Date: Sat Feb 26 20:21:25 2011 +0000 curl: add configure check and hook up to build system commit 16b79f6f2dd28db49fa5693a06da045132cb69d6 Author: Patricia Muscalu <patricia@axis.com> Date: Sat Feb 26 20:20:33 2011 +0000 curl: add libcurl-based sink element Sink acts as a client and can connect to servers to upload media. https://bugzilla.gnome.org/show_bug.cgi?id=641496