setRecordOptions.lua
[INDEX]

ABSTRACT

Set recording options

NOTE: The changed options can only be brought to effect in next starting record time.

ARGUMENTS

HTTP Arguments submit: GET; POST

Test this API over HTTP - (URL):

Stream
STRING (MUST)

Which stream to set options:

main

Main stream

sub

Sub stream

Test value:

AutoRecord

Auto record enabling when plugging in a disk:

1

Enabled

0

Disabled

Test value:

DiskSelection

The disk selection policy:

first

"First plugged disk"- Use the first plugged disk (never care what disk type it is) to record files.

largest

"Largest disk"- Use the largest disk to record files, never care what disk type it is.

mark

"Marked disk"- If a disk with file 'RECORD_HERE' or 'RECORD_HERE.txt' in root (it's marked), use that disk to record files.

usb-first

"First plugged USB disk"- Use the first plugged USB disk to record files.

usb

"Largest USB disk"- Use the largest USB disk to record files.

usb-mark

"Marked USB disk"- If an USB disk with file 'RECORD_HERE' or 'RECORD_HERE.txt' in root (it's marked), use that disk to record files.

sdmmc-first

"First plugged SD/MMC disk"- Use the first plugged SD/MMC disk to record files.

sdmmc

"Largest SD/MMC disk"- Use the largest SD/MMC disk to record files.

sdmmc-mark

"Marked SD/MMC disk"- If an SD/MMC disk with file 'RECORD_HERE' or 'RECORD_HERE.txt' in root (it's marked), use that disk to record files.

Test value:

Format

Recording format:

ts

TS

mp4

MP4 (Unsupport yet)

Test value:

Prefix

Recording file prefix. The recording file name is started with this prefix, followed 8 digitals (auto increment). The default prefix is "REC".

Test value:

Limitation

File limitation:

time

Limit the recording time, if time limitation arrived, stop record

size

Limit the recording size, if size limitation arrived, stop record

time-loop

Limit the single file time duration, separate to multiple files

size-loop

Limit the single file size, separate to multiple files

none

No limitation

Test value:

LimitSize
INTEGER

If the Limitation is 'size' or 'size-loop', specify the size limitation, in KB

Test value:

LimitTime
INTEGER

If the Limitation is 'time' or 'time-loop', specify the time limitation, in seconds.

Test value:

Overwrite

If the disk full, how to process recording:

overwrite

Overwrite the old records

full-stop

Stop record

Test value:

RETURNS

Return a JSON style result. The JSON format is:

{
/*OBJECT*/

"Result":
NUMBER

200 means OK, other error code meanings are similar to HTTP Response.

"Status":
"STRING"

Status message. Responsing result status of API executive, if there errors, it will describe reasons.

}

OTHER NOTES

Device HTTP API, v1.0