From e9f5d94c9304aaae4ffc27ffeae1f7c49c4d3e57 Mon Sep 17 00:00:00 2001 From: Julien Date: Tue, 23 Jun 2020 12:41:27 -0700 Subject: gs: add source and sink for Google Cloud Storage Useful when having a service that runs a GStreamer pipeline or application in Google Cloud to avoid storing the inputs and outputs in the running container or service. For example when analyzing a video from a Google Cloud Storage bucket and extracting images or converting the video and then uploading the results into another Google Cloud Storage bucket. - gssrc allows to read from a file located in Google Cloud Storage and it supports seeking. - gssink allows to write to a file located in Google Cloud Storage. There are 2 modes, one similar to multifilesink and the other similar to filesink. Example: gst-launch-1.0 gssrc location=gs://mybucket/videos/sample.mp4 ! decodebin ! glimagesink gst-launch-1.0 playbin uri=gs://mybucket/videos/sample.mp4 gst-launch-1.0 videotestsrc num-buffers=5 ! pngenc ! gssink object-name="img/img%05d.png" bucket-name="mybucket" next-file=buffer gst-launch-1.0 filesrc location=sample.mp4 ! gssink object-name="videos/video.mp4" bucket-name="mybucket" next-file=none When running locally simply set GOOGLE_APPLICATION_CREDENTIALS. But when running in Google Cloud Run or Google Cloud Engine, just set the "service-account-email" property on each element. Closes #1264 Part-of: --- docs/plugins/gst_plugins_cache.json | 189 ++++++++++++++++++++++++++++++++++++ 1 file changed, 189 insertions(+) (limited to 'docs') diff --git a/docs/plugins/gst_plugins_cache.json b/docs/plugins/gst_plugins_cache.json index 6eae76468..02da7405d 100644 --- a/docs/plugins/gst_plugins_cache.json +++ b/docs/plugins/gst_plugins_cache.json @@ -25898,6 +25898,195 @@ "tracers": {}, "url": "Unknown package origin" }, + "gs": { + "description": "Read and write from and to a Google Cloud Storage", + "elements": { + "gssink": { + "author": "Julien Isorce ", + "description": "Write buffers to a sequentially named set of files on Google Cloud Storage", + "hierarchy": [ + "GstGsSink", + "GstBaseSink", + "GstElement", + "GstObject", + "GInitiallyUnowned", + "GObject" + ], + "klass": "Sink/File", + "long-name": "Google Cloud Storage Sink", + "pad-templates": { + "sink": { + "caps": "ANY", + "direction": "sink", + "presence": "always" + } + }, + "properties": { + "bucket-name": { + "blurb": "Google Cloud Storage Bucket Name", + "conditionally-available": false, + "construct": false, + "construct-only": false, + "controllable": false, + "default": "NULL", + "mutable": "null", + "readable": true, + "type": "gchararray", + "writable": true + }, + "index": { + "blurb": "Index to use with location property to create file names. The index is incremented by one for each buffer written.", + "conditionally-available": false, + "construct": false, + "construct-only": false, + "controllable": false, + "default": "0", + "max": "2147483647", + "min": "0", + "mutable": "null", + "readable": true, + "type": "gint", + "writable": true + }, + "next-file": { + "blurb": "When to start a new file", + "conditionally-available": false, + "construct": false, + "construct-only": false, + "controllable": false, + "default": "buffer (0)", + "mutable": "null", + "readable": true, + "type": "GstGsSinkNext", + "writable": true + }, + "object-name": { + "blurb": "Full path name of the remote file", + "conditionally-available": false, + "construct": false, + "construct-only": false, + "controllable": false, + "default": "%%s_%%05d", + "mutable": "null", + "readable": true, + "type": "gchararray", + "writable": true + }, + "post-messages": { + "blurb": "Post a message for each file with information of the buffer", + "conditionally-available": false, + "construct": false, + "construct-only": false, + "controllable": false, + "default": "false", + "mutable": "null", + "readable": true, + "type": "gboolean", + "writable": true + }, + "service-account-email": { + "blurb": "Service Account Email to use for credentials", + "conditionally-available": false, + "construct": false, + "construct-only": false, + "controllable": false, + "default": "NULL", + "mutable": "ready", + "readable": true, + "type": "gchararray", + "writable": true + }, + "start-date": { + "blurb": "Start date in iso8601 format", + "conditionally-available": false, + "construct": false, + "construct-only": false, + "controllable": false, + "default": "NULL", + "mutable": "ready", + "readable": true, + "type": "gchararray", + "writable": true + } + }, + "rank": "none" + }, + "gssrc": { + "author": "Julien Isorce ", + "description": "Read from arbitrary point from a file in a Google Cloud Storage", + "hierarchy": [ + "GstGsSrc", + "GstBaseSrc", + "GstElement", + "GstObject", + "GInitiallyUnowned", + "GObject" + ], + "interfaces": [ + "GstURIHandler" + ], + "klass": "Source/File", + "long-name": "Google Cloud Storage Source", + "pad-templates": { + "src": { + "caps": "ANY", + "direction": "src", + "presence": "always" + } + }, + "properties": { + "location": { + "blurb": "Location of the file to read", + "conditionally-available": false, + "construct": false, + "construct-only": false, + "controllable": false, + "default": "NULL", + "mutable": "ready", + "readable": true, + "type": "gchararray", + "writable": true + }, + "service-account-email": { + "blurb": "Service Account Email to use for credentials", + "conditionally-available": false, + "construct": false, + "construct-only": false, + "controllable": false, + "default": "NULL", + "mutable": "ready", + "readable": true, + "type": "gchararray", + "writable": true + } + }, + "rank": "none" + } + }, + "filename": "gstgs", + "license": "LGPL", + "other-types": { + "GstGsSinkNext": { + "kind": "enum", + "values": [ + { + "desc": "New file for each buffer", + "name": "buffer", + "value": "0" + }, + { + "desc": "New file for each buffer", + "name": "Only one file, no next file", + "value": "1" + } + ] + } + }, + "package": "GStreamer Bad Plug-ins", + "source": "gst-plugins-bad", + "tracers": {}, + "url": "Unknown package origin" + }, "gsm": { "description": "GSM encoder/decoder", "elements": { -- cgit v1.2.1