Note
This API has been available since API level 32.
This API has been available since API level 32.
Provide an interface to record audio and video.
N/A
API level 32
Pauses the recording.
None
Name | Required | Type | Description |
---|---|---|---|
returnValue | Required | Boolean | Indicates method execution status. Possible values are:
|
Error Code | Error Text | Error Description |
---|---|---|
6 | - | For details, see the 'API Error Codes Reference' table. |
Example : pause
# luna-send -n 1 -f luna://com.webos.pipeline.record._QivNm100000mLC/pause '{}'
Response:
{
"returnValue": true
}
API level 32
Resumes the recording.
None
Name | Required | Type | Description |
---|---|---|---|
returnValue | Required | Boolean | Indicates method execution status. Possible values are:
|
Error Code | Error Text | Error Description |
---|---|---|
6 | - | For details, see the 'API Error Codes Reference' table. |
Example : Resume
# luna-send -n 1 -f luna://com.webos.pipeline.record._QivNm100000mLC/resume '{}'
Response:
{
"returnValue": true
}
API level 32
Starts recording.
Name | Required | Type | Description |
---|---|---|---|
video | Optional | Object: video | Indicates the video information. Note: Any one of audio, video, and image must be provided. Note: Audio and video can be provided together. |
audio | Optional | Object: audio | Indicates the audio information. Note: Any one of audio, video, and image must be provided. Note: Audio and video can be provide together. |
image | Optional | Object: image | Indicates the image information. Note: Any one of audio, video, and image must be provided. |
format | Required | String | Format in which data is stored. |
path | Required | String | Path and file names of the saved file. |
Name | Required | Type | Description |
---|---|---|---|
returnValue | Required | Boolean | Indicates method execution status. Possible values are:
|
Error Code | Error Text | Error Description |
---|---|---|
1, 2 | - | For details, see the 'API Error Codes Reference' table. |
Example : Start - using a random ID (_QivNm100000mLC) to identify the pipeline
# luna-send -n 1 -f luna://com.webos.pipeline.record._QivNm100000mLC/start '{
"video": {
"videoSrc": "camera1",
"width": 1280,
"height": 720,
"codec": "H264",
"fps": 30,
"bitRate": 0
},
"audio": {
"codec": "AAC",
"sampleRate": 44100,
"channelCount": 2,
"bitRate": 0
},
"format": "MP4",
"path": "/media/internal/Record02122024-20054355.mp4"
}'
Response:
{
"returnValue":true
}
API level 32
Stops recording and saves the output to file.
None
Name | Required | Type | Description |
---|---|---|---|
returnValue | Required | Boolean | Indicates method execution status. Possible values are:
|
Error Code | Error Text | Error Description |
---|---|---|
3, 4, 5 | - | For details, see the 'API Error Codes Reference' table. |
Example : Stop
# luna-send -n 1 -f luna://com.webos.pipeline.record._QivNm100000mLC/stop '{}'
Response:
{
"returnValue": true
}
API level 32
Gets a notification when there is an event on pipeline.
Name | Required | Type | Description |
---|---|---|---|
subscribe | Optional | Boolean | Subscribe to receive updates from this method. Possible values are:
|
Name | Required | Type | Description |
---|---|---|---|
returnValue | Required | Boolean | Indicates method execution status. Possible values are:
|
Name | Required | Type | Description |
---|---|---|---|
returnValue | Required | Boolean | Indicates method execution status. Possible values are:
|
id | Optional | String | Indicates the id of the camera. |
eventType | Optional | String | Indicates whether there is a device error. |
Error Code | Error Text | Error Description |
---|---|---|
7 | - | For details, see the 'API Error Codes Reference' table. |
Example : Subscribe
# luna-send -i -f luna://com.webos.pipeline.record._QivNm100000mLC/subscribe '{"subscribe": true}'
Response:
{
"returnValue": true
}
Subscription Response:
{
"id":"_APrekk20000lbZ",
"eventType":"endOfStream",
"returnValue":true
}
Details of audio.
Name | Required | Type | Description |
---|---|---|---|
codec | Required | String | Codec used for compression. |
sampleRate | Required | Number | Audio sample rate. |
channelCount | Required | Number | Audio channel. |
bitRate | Required | Number | Audio bit rate. |
Details of image.
Name | Required | Type | Description |
---|---|---|---|
videoSrc | Required | String | Source of the image. |
codec | Required | String | Codec used for compression. |
width | Required | Number | Width of the image. |
height | Required | Number | Height of the image. |
quality | Required | Number | Quality of the image. |
Details of video.
Name | Required | Type | Description |
---|---|---|---|
videoSrc | Required | String | Source of the video. |
width | Required | Number | Width of the video. |
height | Required | Number | Height of the video. |
codec | Required | String | Codec used for compression. |
fps | Required | Number | Video frame rate. |
bitRate | Required | Number | Video bit rate. |
Error Code | Error Text | Error Description |
---|---|---|
1 | recorder not created | Could not create a recorder instance. |
2 | Failed to load recorder | The recorder could not be loaded successfully. |
3 | Already unloaded | The recorder has already been unloaded. |
4 | Fails to unload the recorder | An error while trying to unload the recorder . |
5 | Resource release failed | The attempt to release resources associated with the recorder was unsuccessful. |
6 | Invalid state | The pipeline is in an incorrect state. |
7 | Subscription add fail | There is a problem adding a subscription. |
Contents