
36
Enabling a camera via Crank
2 Application Programming Interface (API)
PHD API Reference
Enabling a camera via Crank
For devices with camera capabilities (PHD50 and PHD70), we rely on Linux's gstreamer
service in order to enable and disable the camera feed. Crank's Storyboard Engine
supports integration with gstreamer, which means that the cameras can be manipulated by
sending built-in Crank events.
Requirements for enabling the camera
The basic Crank actions to use in your Crank application are used for starting and stopping
the video stream.
First, using Crank's "Add" menu item, add a render extension to your project. This render
extension should be of type "external". Give its Object Path parameter a unique name (e.g.
"/video"). Set the size of the extension to your desired video size.
Starting a new video stream requires sending of the gra.media.new.video action. This
action must be initiated when the application wishes to start video.
This action contains a number of built-in parameters which must be set as shown below.
Notes:
- the extra_data parameter should be all on one line. Substitute spaces for the
linebreaks shown for that item.
- the extra_data parameter contains the Gstreamer pipeline and this can be setup to
show different cameras or different video sources such as videotestsrc or perhaps a
video file
- the "use_external" option is required in the extra_data parameter to enable the
external buffer for the video.
- For PHD70, output_width and output_height values need to match the width and
height values in the pipeline string in the extra_data parameter.
- For PHD50, output_width and output_height values in the pipeline string in the
extra_data parameter must always be 720 and 480 respectively.
- bpp and depth should be set to 16 (16-bit)
- output_depth set to 2, this indicates 16-bit depth.
- the object_name parameter must match the external render extension's Object Path
parameter (e.g. "/video").
-
media.sbat
must be present in the Crank project's templates folder.
Summary of Contents for PHD28
Page 1: ...Parker Hannifin Display PHD User Guide UG PHD 1040001 201707 010...
Page 52: ...44 PHD Mounting the PHD 9 1 2 PHD50 Figure 18 PHD50 dimensions mm...
Page 53: ...User Guide 45 Mounting the PHD 9 1 3 PHD70 Figure 19 PHD70 dimensions mm...
Page 58: ...Parker Hannifin Display PHD User Guide HY33 5021 IB US...
Page 59: ...PHD Network Interface Configuration Publ no HY33 5021 M1 UK Edition 2017 02 02...
Page 75: ...PHD API Reference Publ no HY33 5021 M2 UK Edition 2017 02 13...