[libcamera-devel] README.rst: Update gstreamer element guidance
diff mbox series

Message ID 20210825102748.3738346-1-kieran.bingham@ideasonboard.com
State Accepted
Headers show
Series
  • [libcamera-devel] README.rst: Update gstreamer element guidance
Related show

Commit Message

Kieran Bingham Aug. 25, 2021, 10:27 a.m. UTC
The Gstreamer gstlibcamerasrc element operates better with the
glimagesink, as it can perform direct renders or hardware accellerated
image format conversion.

Further extend the sample commands to demonstrate how to specify a fixed
width and height parameter to the pipeline.

Signed-off-by: Kieran Bingham <kieran.bingham@ideasonboard.com>
---
 README.rst | 19 +++++++++++++++++--
 1 file changed, 17 insertions(+), 2 deletions(-)

Comments

Laurent Pinchart Aug. 25, 2021, 2:29 p.m. UTC | #1
Hi Kieran,

Thank you for the patch.

On Wed, Aug 25, 2021 at 11:27:48AM +0100, Kieran Bingham wrote:
> The Gstreamer gstlibcamerasrc element operates better with the
> glimagesink, as it can perform direct renders or hardware accellerated
> image format conversion.
> 
> Further extend the sample commands to demonstrate how to specify a fixed
> width and height parameter to the pipeline.
> 
> Signed-off-by: Kieran Bingham <kieran.bingham@ideasonboard.com>
> ---
>  README.rst | 19 +++++++++++++++++--
>  1 file changed, 17 insertions(+), 2 deletions(-)
> 
> diff --git a/README.rst b/README.rst
> index fcf0f47f14c5..61ba8418a62a 100644
> --- a/README.rst
> +++ b/README.rst
> @@ -94,7 +94,7 @@ Using GStreamer plugin
>  ~~~~~~~~~~~~~~~~~~~~~~
>  
>  To use GStreamer plugin from source tree, set the following environment so that
> -GStreamer can find it.
> +GStreamer can find it, (This can be skipped when libcamera is installed)

This looks weird. Did you maybe mean

GStreamer can find it (this can be skipped when libcamera is installed).

or

GStreamer can find it (this can be skipped when libcamera is installed):

? You could also write

GStreamer can find it. This isn't necessary when libcamera is installed.

>  
>    export GST_PLUGIN_PATH=$(pwd)/build/src/gstreamer
>  
> @@ -104,7 +104,22 @@ onto the default video display element on your system.

The above comment isn't accurate anymore.

>  
>  .. code::
>  
> -  gst-launch-1.0 libcamerasrc camera-name="Camera 1" ! videoconvert ! autovideosink
> +  gst-launch-1.0 libcamerasrc camera-name="Camera 1" ! glimagesink
> +
> +To show the first camera found you can omit the camera-name property, or you
> +can identify the camera and capabilities using:
> +
> +.. code::
> +
> +  gst-device-monitor-1.0 Video
> +
> +This will show the supported stream sizes which can be manually selected if

s/will/will also/

> +desired with a pipeline such as:
> +
> +.. code::
> +
> +  gst-launch-1.0 libcamerasrc ! 'video/x-raw,width=1280,height=720' ! \
> +        glimagesink
>  
>  .. section-end-getting-started
>
Kieran Bingham Aug. 25, 2021, 7:46 p.m. UTC | #2
On 25/08/2021 15:29, Laurent Pinchart wrote:
> Hi Kieran,
> 
> Thank you for the patch.
> 
> On Wed, Aug 25, 2021 at 11:27:48AM +0100, Kieran Bingham wrote:
>> The Gstreamer gstlibcamerasrc element operates better with the
>> glimagesink, as it can perform direct renders or hardware accellerated
>> image format conversion.
>>
>> Further extend the sample commands to demonstrate how to specify a fixed
>> width and height parameter to the pipeline.
>>
>> Signed-off-by: Kieran Bingham <kieran.bingham@ideasonboard.com>
>> ---
>>  README.rst | 19 +++++++++++++++++--
>>  1 file changed, 17 insertions(+), 2 deletions(-)
>>
>> diff --git a/README.rst b/README.rst
>> index fcf0f47f14c5..61ba8418a62a 100644
>> --- a/README.rst
>> +++ b/README.rst
>> @@ -94,7 +94,7 @@ Using GStreamer plugin
>>  ~~~~~~~~~~~~~~~~~~~~~~
>>  
>>  To use GStreamer plugin from source tree, set the following environment so that
>> -GStreamer can find it.
>> +GStreamer can find it, (This can be skipped when libcamera is installed)
> 
> This looks weird. Did you maybe mean
> 
> GStreamer can find it (this can be skipped when libcamera is installed).
> 
> or
> 
> GStreamer can find it (this can be skipped when libcamera is installed):
> 
> ? You could also write
> 
> GStreamer can find it. This isn't necessary when libcamera is installed.

I'll take that one.

>>  
>>    export GST_PLUGIN_PATH=$(pwd)/build/src/gstreamer
>>  
>> @@ -104,7 +104,22 @@ onto the default video display element on your system.
> 
> The above comment isn't accurate anymore.

Will this fix it enough for you ?

"""
The following pipeline will stream from the camera named "Camera 1"
onto the OpenGL accelerated display element on your system.
"""

>>  .. code::
>>  
>> -  gst-launch-1.0 libcamerasrc camera-name="Camera 1" ! videoconvert ! autovideosink
>> +  gst-launch-1.0 libcamerasrc camera-name="Camera 1" ! glimagesink
>> +
>> +To show the first camera found you can omit the camera-name property, or you
>> +can identify the camera and capabilities using:
>> +
>> +.. code::
>> +
>> +  gst-device-monitor-1.0 Video
>> +
>> +This will show the supported stream sizes which can be manually selected if
> 
> s/will/will also/


>> +desired with a pipeline such as:
>> +
>> +.. code::
>> +
>> +  gst-launch-1.0 libcamerasrc ! 'video/x-raw,width=1280,height=720' ! \
>> +        glimagesink
>>  
>>  .. section-end-getting-started
>>  
>
Laurent Pinchart Aug. 25, 2021, 7:52 p.m. UTC | #3
Hi Kieran,

On Wed, Aug 25, 2021 at 08:46:48PM +0100, Kieran Bingham wrote:
> On 25/08/2021 15:29, Laurent Pinchart wrote:
> > On Wed, Aug 25, 2021 at 11:27:48AM +0100, Kieran Bingham wrote:
> >> The Gstreamer gstlibcamerasrc element operates better with the
> >> glimagesink, as it can perform direct renders or hardware accellerated
> >> image format conversion.
> >>
> >> Further extend the sample commands to demonstrate how to specify a fixed
> >> width and height parameter to the pipeline.
> >>
> >> Signed-off-by: Kieran Bingham <kieran.bingham@ideasonboard.com>
> >> ---
> >>  README.rst | 19 +++++++++++++++++--
> >>  1 file changed, 17 insertions(+), 2 deletions(-)
> >>
> >> diff --git a/README.rst b/README.rst
> >> index fcf0f47f14c5..61ba8418a62a 100644
> >> --- a/README.rst
> >> +++ b/README.rst
> >> @@ -94,7 +94,7 @@ Using GStreamer plugin
> >>  ~~~~~~~~~~~~~~~~~~~~~~
> >>  
> >>  To use GStreamer plugin from source tree, set the following environment so that
> >> -GStreamer can find it.
> >> +GStreamer can find it, (This can be skipped when libcamera is installed)
> > 
> > This looks weird. Did you maybe mean
> > 
> > GStreamer can find it (this can be skipped when libcamera is installed).
> > 
> > or
> > 
> > GStreamer can find it (this can be skipped when libcamera is installed):
> > 
> > ? You could also write
> > 
> > GStreamer can find it. This isn't necessary when libcamera is installed.
> 
> I'll take that one.
> 
> >>  
> >>    export GST_PLUGIN_PATH=$(pwd)/build/src/gstreamer
> >>  
> >> @@ -104,7 +104,22 @@ onto the default video display element on your system.
> > 
> > The above comment isn't accurate anymore.
> 
> Will this fix it enough for you ?
> 
> """
> The following pipeline will stream from the camera named "Camera 1"
> onto the OpenGL accelerated display element on your system.
> """

Works for me.

> >>  .. code::
> >>  
> >> -  gst-launch-1.0 libcamerasrc camera-name="Camera 1" ! videoconvert ! autovideosink
> >> +  gst-launch-1.0 libcamerasrc camera-name="Camera 1" ! glimagesink
> >> +
> >> +To show the first camera found you can omit the camera-name property, or you
> >> +can identify the camera and capabilities using:
> >> +
> >> +.. code::
> >> +
> >> +  gst-device-monitor-1.0 Video
> >> +
> >> +This will show the supported stream sizes which can be manually selected if
> > 
> > s/will/will also/
> > 
> >> +desired with a pipeline such as:
> >> +
> >> +.. code::
> >> +
> >> +  gst-launch-1.0 libcamerasrc ! 'video/x-raw,width=1280,height=720' ! \
> >> +        glimagesink
> >>  
> >>  .. section-end-getting-started
> >>

Patch
diff mbox series

diff --git a/README.rst b/README.rst
index fcf0f47f14c5..61ba8418a62a 100644
--- a/README.rst
+++ b/README.rst
@@ -94,7 +94,7 @@  Using GStreamer plugin
 ~~~~~~~~~~~~~~~~~~~~~~
 
 To use GStreamer plugin from source tree, set the following environment so that
-GStreamer can find it.
+GStreamer can find it, (This can be skipped when libcamera is installed)
 
   export GST_PLUGIN_PATH=$(pwd)/build/src/gstreamer
 
@@ -104,7 +104,22 @@  onto the default video display element on your system.
 
 .. code::
 
-  gst-launch-1.0 libcamerasrc camera-name="Camera 1" ! videoconvert ! autovideosink
+  gst-launch-1.0 libcamerasrc camera-name="Camera 1" ! glimagesink
+
+To show the first camera found you can omit the camera-name property, or you
+can identify the camera and capabilities using:
+
+.. code::
+
+  gst-device-monitor-1.0 Video
+
+This will show the supported stream sizes which can be manually selected if
+desired with a pipeline such as:
+
+.. code::
+
+  gst-launch-1.0 libcamerasrc ! 'video/x-raw,width=1280,height=720' ! \
+        glimagesink
 
 .. section-end-getting-started