|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object org.jmythapi.protocol.impl.RemoteEncoder
public class RemoteEncoder
TODO: what exactly is the difference between a Recorder
and a RemoteEncoder
?
Constructor Summary | |
---|---|
RemoteEncoder(IBackendConnection mythtvConnection,
int encoderID)
|
Method Summary | |
---|---|
boolean |
cancelNextRecording(Boolean cancel)
Tells the encoder to cancel the next recording. |
IInputInfoTuned |
getBusyInput()
Queries the currently used input of a busy encoder. |
IInputInfoTuned |
getBusyInput(Integer timeBuffer)
Queries the input that will be used by the encoder in the given amount of seconds. |
IRemoteEncoderBusyStatus |
getBusyStatus()
Query the current busy status of the recorder. |
IRemoteEncoderBusyStatus |
getBusyStatus(Integer timeBuffer)
Query the current busy status of the recorder. |
IProgramInfo |
getCurrentRecording()
Returns the encoders current recording. |
RemoteEncoderFlags |
getFlags()
Gets additional information about the current encoder state. |
IFreeInputList |
getFreeInputs()
Gets the free inputs of the encoder. |
List<IInputInfo> |
getInputs()
Gets a list of all inputs of the encoder. |
long |
getMaxBitrate()
Gets the maximum bitrate the encoder can output. |
IProgramRecordingStatus |
getRecordingStatus()
Gets the current recording status of the tuner. |
int |
getRemoteEncoderID()
Gets the ID of this remote encoder. |
ISleepStatus |
getSleepStatus()
Gets the current sleep status of the encoder. |
IRemoteEncoderState |
getState()
Returns the current encoder state (TvState). |
ProtocolVersion |
getVersionNr()
Gets the protocol-version of an object. |
boolean |
isBusy()
Query whether the recorder is currently busy. |
boolean |
isBusy(Integer timeBuffer)
Query whether the recorder is busy, or will be within the next time_buffer seconds. |
boolean |
matchesRecording(IProgramInfo programInfo)
Checks if this encoder is currently recording the given recording. |
boolean |
matchesRecording(List<String> programInfoArgs)
|
boolean |
startRecording(IProgramInfo programInfo)
TODO: is it possible to pass in a Nextrecorderproiinfo here? |
boolean |
startRecording(List<String> programInfoArgs)
|
boolean |
stopRecording()
Stop a currently active recording on the given recorder. |
String |
toString()
|
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
Constructor Detail |
---|
public RemoteEncoder(IBackendConnection mythtvConnection, int encoderID)
Method Detail |
---|
public ProtocolVersion getVersionNr()
IVersionable
getVersionNr
in interface IVersionable
public int getRemoteEncoderID()
IRemoteEncoder
getRemoteEncoderID
in interface IRemoteEncoder
public long getMaxBitrate() throws IOException
IRemoteEncoder
getMaxBitrate
in interface IRemoteEncoder
IOException
- on communication errorsQUERY_REMOTEENCODER_GET_MAX_BITRATE
public ISleepStatus getSleepStatus() throws IOException
IRemoteEncoder
getSleepStatus
in interface IRemoteEncoder
IOException
- on communication errors.QUERY_REMOTEENCODER_GET_SLEEPSTATUS
public IRemoteEncoderState getState() throws IOException
IRemoteEncoder
For example an idle encoder is in the state NONE
,
whereas a encoder recording a scheduled program is in the state RECORDING_ONLY
.
See State
for all available states.
getState
in interface IRemoteEncoder
IOException
- on communication errors.QUERY_REMOTEENCODER_GET_STATE
public RemoteEncoderFlags getFlags() throws IOException
IRemoteEncoder
In addition to the encoder-state
, various other flags
can be checked to get further information.
For example an idle encoder may currently fetch EIT informations
(See EIT_SCANNER_RUNNING
).
See Flags
for all available flags.
getFlags
in interface IRemoteEncoder
IOException
- on communication errors.QUERY_REMOTEENCODER_GET_FLAGS
public boolean isBusy() throws IOException
IRemoteEncoder
isBusy
in interface IRemoteEncoder
true
if the encoder is currently busy.
IOException
- on communication errors.IRemoteEncoder.isBusy(Integer)
public boolean isBusy(Integer timeBuffer) throws IOException
IRemoteEncoder
isBusy
in interface IRemoteEncoder
true
if the encoder is currently busy or will be busy in the given amount of seconds.
IOException
- on communication errors.IRemoteEncoder.getBusyStatus(Integer)
public IRemoteEncoderBusyStatus getBusyStatus() throws IOException
IRemoteEncoder
If the encoder is busy the response includes informations about the busy encoder input device (since 37).
getBusyStatus
in interface IRemoteEncoder
IOException
IRemoteEncoder.getBusyStatus(Integer)
,
QUERY_REMOTEENCODER_IS_BUSY
public IRemoteEncoderBusyStatus getBusyStatus(Integer timeBuffer) throws IOException
IRemoteEncoder
Query the current busy status of the recorder.
getBusyStatus
in interface IRemoteEncoder
timeBuffer
- in seconds (Since 37)
IOException
- on communication errors.QUERY_REMOTEENCODER_IS_BUSY
public IInputInfoTuned getBusyInput() throws IOException
IRemoteEncoder
This function internally uses IRemoteEncoder.getBusyStatus()
to determine the current
encoder status.
getBusyInput
in interface IRemoteEncoder
null
if the encoder is not busy
IOException
- on communication errors.QUERY_REMOTEENCODER_IS_BUSY
public IInputInfoTuned getBusyInput(Integer timeBuffer) throws IOException
IRemoteEncoder
This function internally uses IRemoteEncoder.getBusyStatus(Integer)
to determine the
encoder status.
getBusyInput
in interface IRemoteEncoder
timeBuffer
- in seconds (Since 37)
null
if the encoder is not busy
IOException
- on communication errors.QUERY_REMOTEENCODER_IS_BUSY
public List<IInputInfo> getInputs() throws IOException
IRemoteEncoder
This method internally uses IRemoteEncoder.getFreeInputs()
to determine all free inputs
and IRemoteEncoder.getBusyInput()
to get the currently used input.
Usage Example:
IRemoteEncoder encoder = ...; // an already connected encoder List<IInputInfo> allInputs = encoder.getInputs(); for(IInputInfo input : allInputs) { System.out.println(String.format( "Input %d (name: %s, source: %d, card: %d, multiplex: %d) is %s.", input.getInputID(), input.getInputName(), input.getSourceID(), input.getCardID(), input.getMultiplexID(), input.isBusy()?"busy":"idle" )); }
getInputs
in interface IRemoteEncoder
IOException
- on communication errors.IRemoteEncoder.getFreeInputs()
,
IRemoteEncoder.getBusyInput()
,
QUERY_REMOTEENCODER_GET_FREE_INPUTS
,
QUERY_REMOTEENCODER_IS_BUSY
public IFreeInputList getFreeInputs() throws IOException
IRemoteEncoder
getFreeInputs
in interface IRemoteEncoder
null
if there is no free input.
IOException
- on communication errors.QUERY_REMOTEENCODER_GET_FREE_INPUTS
public boolean matchesRecording(IProgramInfo programInfo) throws IOException
IRemoteEncoder
matchesRecording
in interface IRemoteEncoder
programInfo
- the recording to check.
true
if the encoder is currently recording the given program.
IOException
- on communication errors.QUERY_REMOTEENCODER_MATCHES_RECORDING
,
IRemoteEncoder.matchesRecording(IProgramInfo)
public boolean matchesRecording(List<String> programInfoArgs) throws IOException
IOException
public boolean startRecording(IProgramInfo programInfo) throws IOException
IRemoteEncoder
startRecording
in interface IRemoteEncoder
programInfo
- the recording to start
true
on success
IOException
- on communication errors.QUERY_REMOTEENCODER_START_RECORDING
public boolean startRecording(List<String> programInfoArgs) throws IOException
IOException
public boolean stopRecording() throws IOException
IRemoteEncoder
stopRecording
in interface IRemoteEncoder
IOException
- on communication errors.QUERY_REMOTEENCODER_STOP_RECORDING
public IProgramInfo getCurrentRecording() throws IOException
IRemoteEncoder
IRemoteEncoder.isBusy()
if this encoder is busy and if it is not, it just returns null
.
getCurrentRecording
in interface IRemoteEncoder
null
if the encoder
is currently not recording.
IOException
- on communication errorsQUERY_REMOTEENCODER_GET_CURRENT_RECORDING
public IProgramRecordingStatus getRecordingStatus() throws IOException
IRemoteEncoder
IRemoteEncoder.getCurrentRecording()
to get the current recording
and calls IProgramInfo.getRecordingStatus()
afterwards, to determine the
current recording status. If there is no current recording, null
is returned.
getRecordingStatus
in interface IRemoteEncoder
null
if unknown.
IOException
- on communication errors.QUERY_REMOTEENCODER_GET_RECORDING_STATUS
public boolean cancelNextRecording(Boolean cancel) throws IOException
IRemoteEncoder
This is used when the user is watching "Live TV" and does not want to allow the recorder to be taken for a pending recording.
cancelNextRecording
in interface IRemoteEncoder
cancel
- if the next recording should be canceled or continued.
IOException
- on communication errorsQUERY_REMOTEENCODER_CANCEL_NEXT_RECORDING
public String toString()
toString
in class Object
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |