Myth Protocol Command QUERY RECORDER

From MythTV

Jump to: navigation, search

Contents

QUERY_RECORDER

This command has a series of subcommands:
- IS_RECORDING (no paramters) returns 1 or 0
- GET_FRAMERATE (no parameters) returns framerate
- GET_FRAMES_WRITTEN (no parameters) returns count of frames written
- GET_FILE_POSITION (no parameters) returns current position of file
- GET_MAX_BITRATE (no parameters) returns maximum bitrate for stream
- GET_CURRENT_RECORDING (no parameters) returns current program info
- GET_KEYFRAME_POS <starting position> returns position of next key frame past starting positon
- FILL_POSITION_MAP <start> <end> returns all key frames in range in keynum[]:[]location pairs
- GET_RECORDING (no parameters) identical to GET_CURRENT_RECORDING
- FRONTEND_READY (no parameters) informs that frontend is ready. Returns "ok"
- CANCEL_NEXT_RECORDING <1> does nothing if something other then 1 is passed. returns "ok"
- SPAWN_LIVETV <chainid> <pip> <channel> starts recording live tv. pip =1 for picture in picture. returns "ok"
- STOP_LIVETV <chainid> stops recording live tv on chain. returns "ok"
- PAUSE (no parameters) pauses recording. returns "ok"
- FINISH_RECORDING (no parameters) finishes recording. returns "ok"
- SET_LIVE_RECORDING <value> unknown. returns "ok"
- GET_CONNECTED_INPUTS (no parameters) Gets all inputs. returns "EMPTY_LIST" if there are none
- GET_INPUT (no parameters) Gets current input. returns "UNKNOWN" if there is none
- SET_INPUT <input> Sets current input, then returns it. returns "UNKNOWN" on error
- TOGGLE_CHANNEL_FAVORITE (no parameters) toggles to and from favorite channel. returns "ok"
- CHANGE_CHANNEL <direction> changes channel based on direction. UP=0, DOWN=1,FAVORITE=2,SAME=3. returns "ok"
- SET_CHANNEL <channel name> Changes to a specific channel. returns "ok"
- SET_SIGNAL_MONITORING_RATE <rate> <notify frontend>. Unknown. returns old rate.
- GET_COLOUR (no parameters) Gets color picture attribute.
- GET_CONTRAST (no parameters) Gets contrast picture attribute.
- GET_BRIGHTNESS (no parameters) Gets brightness picture attribute.
- GET_HUE (no parameters) Gets hue picture attribute.
- CHANGE_COLOUR <type> <up> type is 1=playback, 2=channel, 3=recording. up is 1 or 0. returns new value.
- CHANGE_CONTRAST <type> <up> type is 1=playback, 2=channel, 3=recording. up is 1 or 0. returns new value.
- CHANGE_BRIGHTNESS <type> <up> type is 1=playback, 2=channel, 3=recording. up is 1 or 0. returns new value.
- CHANGE_HUE <type> <up> type is 1=playback, 2=channel, 3=recording. up is 1 or 0. returns new value.
- CHECK_CHANNEL <channel name> returns 1 if channel is valid, 0 if not.
- SHOULD_SWITCH_CARD <chainid> Switches to a different capture card. Return unknown.
- CHECK_CHANNEL_PREFIX <prefix> Checks to see if prefix is valid. returns match,complete_valid_for_record,is_extra_char_useful,spacer.
- GET_NEXT_PROGRAM_INFO <channel name><chanid><direction><starttime> all params optional. returns list of title,subtitle,desc,catagory,starttime,endtime,callsign,iconpath,channelname,chainid,seriesid,programid)
- GET_CHANNEL_INFO <chanid> returns info about channel chaind,sourceid,callsign,channum,channame,xmltv


SPAWN_LIVETV

Arguments

Command arguments: <recorder id>

List arguments: <chain id>

Examples

Command:

79      QUERY_RECORDER 1[]:[]SPAWN_LIVETV[]:[]live-seans-laptop-07-03-23T12:30:32[]:[]0

Response:

2       OK

Description

Tells Myth backend to create a live tv recording.

Returns

Successful response:

OK

Unsuccessful response:

???


IS_RECORDING

Arguments

Command arguments: <recorder id>

List arguments: none

Examples

Command:

33      QUERY_RECORDER 1[]:[]IS_RECORDING

Response:

1       1

Description

Querries the recorder to see if it has started recording yet.

Returns

Successful response:

1

Unsuccessful response:

0

GET_CURRENT_RECORDING

Arguments

Command arguments: <recorder id>

List arguments: none

Examples

Command:

42      QUERY_RECORDER 1[]:[]GET_CURRENT_RECORDING

Response:

372     []:[][]:[][]:[][]:[]4294967295[]:[][]:[][]:[][]:[]/var/lib/mythtv/recordings/4294967295_20070323123032.mpg[]:[]0[]:[]0[]:[]1174667432[]:[]1174671032[]:[]0[]:[]0[]:[]0[]:[]server[]:[]0[]:[]1[]:[]0[]:[]0[]:[]-2[]:[]0[]:[]0[]:[]15[]:[]6[]:[]1174667432[]:[]1174671032[]:[]0[]:[]0[]:[]LiveTV[]:[]0[]:[][]:[][]:[][]:[]1174667432[]:[]0.000000[]:[]-1[]:[]0[]:[]Default[]:[]0[]:[]0

Description

Querries the recorder for information about the currently recorded show. The reply structure is quite large, and needs to be documented. This is where the Myth Protocol Version becomes important. Different version of the myth protocol define a different record structure.

Returns

Successful response:

List of program information

Unsuccessful response:

???

STOP_LIVETV

Arguments

Command arguments: <recorder id>

List arguments: none

Examples

Command:

32      QUERY_RECORDER 1[]:[]STOP_LIVETV

Response: None

Description

Set selected recorder from "watching live tv" to "none"

Returns

Successful response:

???

Unsuccessful response:

???
Personal tools