com.webos.pipeline.record

Note
This API has been available since API level 32.

API Summary

Provide an interface to record audio and video.

Overview of the API

N/A

Methods

pause

ACG: None
  • Added: API level 32

Description

Pauses the recording.

Parameters

None

Call Returns

Name

Required

Type

Description

returnValueRequiredBoolean

Indicates method execution status.

Possible values are:

  • true: Successful.
  • false: Not successful. For details, see the 'Error Codes' table.

Error Codes Reference

Error Code

Error Text

Error Description

6-

For details, see the 'API Error Codes Reference' table.

Example

Example : pause

# luna-send -n 1 -f luna://com.webos.pipeline.record._QivNm100000mLC/pause '{}'

Response:

{
  "returnValue": true
}

resume

ACG: None
  • Added: API level 32

Description

Resumes the recording.

Parameters

None

Call Returns

Name

Required

Type

Description

returnValueRequiredBoolean

Indicates method execution status.

Possible values are:

  • true: Successful.
  • false: Not successful. For details, see the 'Error Codes' table.

Error Codes Reference

Error Code

Error Text

Error Description

6-

For details, see the 'API Error Codes Reference' table.

Example

Example : Resume

# luna-send -n 1 -f luna://com.webos.pipeline.record._QivNm100000mLC/resume '{}'

Response:

{
  "returnValue": true
}

start

ACG: None
  • Added: API level 32

Description

Starts recording.

Parameters

Name

Required

Type

Description

videoOptionalObject: video

Indicates the video information.

Note: Any one of audio, video, and image must be provided.

Note: Audio and video can be provided together. 

audioOptionalObject: audio

Indicates the audio information.

Note: Any one of audio, video, and image must be provided.

Note: Audio and video can be provide together. 

imageOptionalObject: image

Indicates the image information.

Note: Any one of audio, video, and image must be provided.

formatRequiredString

Format in which data is stored.

pathRequiredString

Path and file names of the saved file.

Call Returns

Name

Required

Type

Description

returnValueRequiredBoolean

Indicates method execution status.

Possible values are:

  • true: Successful.
  • false: Not successful. For details, see the 'Error Codes' table.

Error Codes Reference

Error Code

Error Text

Error Description

1, 2-

For details, see the 'API Error Codes Reference' table.

Example

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
}

stop

ACG: None
  • Added: API level 32

Description

Stops recording and saves the output to file.

Parameters

None

Call Returns

Name

Required

Type

Description

returnValueRequiredBoolean

Indicates method execution status.

Possible values are:

  • true: Successful.
  • false: Not successful. For details, see the 'Error Codes' table.

Error Codes Reference

Error Code

Error Text

Error Description

3, 4, 5-

For details, see the 'API Error Codes Reference' table.

Example

Example : Stop

# luna-send -n 1 -f luna://com.webos.pipeline.record._QivNm100000mLC/stop '{}'

Response:

{
  "returnValue": true
}

subscribe

ACG: None
  • Added: API level 32

Description

Gets a notification when there is an event on pipeline.

Parameters

Name

Required

Type

Description

subscribeOptionalBoolean

Subscribe to receive updates from this method.

Possible values are:

  • true: Subscribed.
  • false: Not subscribed.

Call Returns

Name

Required

Type

Description

returnValueRequiredBoolean

Indicates method execution status.

Possible values are:

  • true: Successful.
  • false: Not successful. For details, see the 'Error Codes' table.

Subscription Returns

Name

Required

Type

Description

returnValueRequiredBoolean

Indicates method execution status.

Possible values are:

  • true: Successful.
  • false: Not successful. For details, see the 'Error Codes' table.
idOptionalString

Indicates the id of the camera.

eventTypeOptionalString

Indicates whether there is a device error.

Error Codes Reference

Error Code

Error Text

Error Description

7-

For details, see the 'API Error Codes Reference' table.

Example

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
}

Objects

audio

Details of audio.

Name

Required

Type

Description

codecRequiredString

Codec used for compression.

sampleRateRequiredNumber

Audio sample rate.

channelCountRequiredNumber

Audio channel.

bitRateRequiredNumber

Audio bit rate.

image

Details of image.

Name

Required

Type

Description

videoSrcRequiredString

Source of the image.

codecRequiredString

Codec used for compression.

widthRequiredNumber

Width of the image.

heightRequiredNumber

Height of the image.

qualityRequiredNumber

Quality of the image.

video

Details of video.

Name

Required

Type

Description

videoSrcRequiredString

Source of the video.

widthRequiredNumber

Width of the video.

heightRequiredNumber

Height of the video.

codecRequiredString

Codec used for compression.

fpsRequiredNumber

Video frame rate.

bitRateRequiredNumber

Video bit rate.

API Error Codes Reference

Error Code

Error Text

Error Description

1recorder not created

Could not create a recorder instance.

2Failed to load recorder

The recorder could not be loaded successfully.

3Already unloaded

The recorder has already been unloaded.

4Fails to unload the recorder

An error while trying to unload the recorder .

5Resource release failed

The attempt to release resources associated with the recorder was unsuccessful.

6Invalid state

The pipeline is in an incorrect state.

7Subscription add fail

There is a problem adding a subscription.

Contents