on webos, I have openssh running and would like to take a picture using the command line script.
I suspect this is going to include some luna-send command, or alternatively a gst-launch
But I am not having any luck with the docs.
webos doesn’t have any of the expected capture tools, but I can access the /dev/video0 device.
Edit: i noticed that the touchpad has the ffmpeg utility installed, but it doesn’t recognise the video4linux2 format
So far, I am trying Gopherkhan’s suggestions with the following code;
luna-send -n 1 palm://com.palm.mediad.MediaCapture/startImageCapture \
'{"path":"/media/internal/foo1.png","options":[{"quality" \
:100,"flash":2,'reviewDuration':0,'exifData':{}}]}'
but its just hanging there doing nothing, after a while is says this;
{"serviceName":"com.palm.mediad.MediaCapture","returnValue":false,"errorCode":-1 \
,"errorText":"com.palm.mediad.MediaCapture is not running."} \
(process:8534): LunaService-CRITICAL **: AppId msg type: 17
So to do this with luna-sends is a bit tricky, and technically not supported.
You’re probably going to want to hit the MediaCapture library, which can be found on the device here:
To include it in your enyo app drop the following in your depends.js:
There are three main steps involved.
Here’s a sample:
Declare the component in your scene
Call the initialize method:
In your onInitialized callback
Use the property bag to locate the number of devices that are available. Typically, the descriptions are “Camera/Camcorder”, “Front Microphone”, and “User facing camera”
Take a photo.
Unload the device:
To do this with the old JS frameworks, see:
https://developer.palm.com/content/api/reference/javascript-libraries/media-capture.html
Now, you can do something similar with luna-send, but again, I don’t think it’s technically supported. You might have trouble with starting-up/keeping-alive the media capture service, etc. BUT, if you want to try, you could do something along the lines of:
1. get the media server instance — this returns a port instance number
This will return a location of the capture service with a port number, a la:
Since this is a subscription, don’t kill the request. Just open a new terminal.
2. Open a new terminal. Use the “location” returned in step 1 as your new service uri:
You should see:
if the call completed correctly. You can safely ctrl+c out of this call.
3. Take your picture. (you can ctrl+c out of the last call, and just supply the args here)
Again, you should see:
if the call completed correctly.
You should hear a shutter click, and the image will show up in the Photos app, in your Photo Roll.