|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
public interface IRemoteEncoder
This interface represents a special view to a MythTV-recorder. It is mainly used to query and control the recording state of a recorder.
MythProtoVersion
annotation. Additionally the lower bound of the version range is documented with the @since
javadoc
tag, whereas the upper bound is documented with the @deprecated
tag.
Extended Version Ranges:
Please note that many functions are usable (maybe with some restrictions) beyond the given protocol range,
if an alternative set of functions can be used to achieve the same result. If such an "extended" version-range is
available for a function, this is mentioned as "fallback-from"- and "fallback-to"-version in the functions javadoc.
Supported Versions:
Which protocol versions are in general supported by the jMythAPI can be seen in the enumeration ProtocolVersion
.
backend
and register as a client:IBackend backend = BackendFactory.createBackend(...);
backend.connect();
backend.annotatePlayback(...);
recorder
:IRecorderInfo recorderInfo = backend.getNextFreeRecorder();
orIRecorderInfo recorderInfo = backend.getRecorderForNum(Integer);
orIRecorderInfo recorderInfo = backend.getRecorderForProgram(IProgramInfo);
IRemoteEncoder encoder = recorder.getRemoteEncoder();
Use the encoder:
Afterwards you can use any function provided by this interface to query and control your encoder.
See the usage examples for some examples.
Disconnect from the encoder:
This is not required, because an encoder shares a connection with its recorder.
// the connected backend IBackend backend = ...; // get a specific recorder IRecorderInfo recorderInfo = backend.getRecorderForNum(1); if(recorderInfo != null) { // connect to the recorder IRecorder recorder = backend.getRecorder(recorderInfo); // query the current recording state if(recorder.isRecording()) { // getting a reference to the encoder IRemoteEncoder encoder = recorder.getRemoteEncoder(); // check the encoder state IRemoteEncoderState encoderState = encoder.getState(); System.out.println(String.format("The encoder is in state '%s'.",encoderState.getState())); } // close recorder connection recorder.close(); }
getRemoteEncoder
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. |
IRemoteEncoderFlags |
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). |
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 |
startRecording(IProgramInfo programInfo)
TODO: is it possible to pass in a Nextrecorderproiinfo here? |
boolean |
stopRecording()
Stop a currently active recording on the given recorder. |
Methods inherited from interface org.jmythapi.IVersionable |
---|
getVersionNr |
Method Detail |
---|
int getRemoteEncoderID()
long getMaxBitrate() throws IOException
ISleepStatus getSleepStatus() throws IOException
IRemoteEncoderState getState() throws IOException
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.
IRemoteEncoderFlags getFlags() throws IOException
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.
boolean isBusy() throws IOException
boolean isBusy(Integer timeBuffer) throws IOException
IRemoteEncoderBusyStatus getBusyStatus() throws IOException
If the encoder is busy the response includes informations about the busy encoder input device (since 37).
IOException
getBusyStatus(Integer)
,
QUERY_REMOTEENCODER_IS_BUSY
Version | Date | Additional Version Info | |
---|---|---|---|
Added | 00 | ||
Changed | 37 | 2008-01-14 | Changelog, SVN-Rev.: 15437 |
Removed | -1 |
IRemoteEncoderBusyStatus getBusyStatus(Integer timeBuffer) throws IOException
Query the current busy status of the recorder.
IInputInfoTuned getBusyInput() throws IOException
This function internally uses getBusyStatus()
to determine the current
encoder status.
IInputInfoTuned getBusyInput(Integer timeBuffer) throws IOException
This function internally uses getBusyStatus(Integer)
to determine the
encoder status.
timeBuffer
- in seconds (Since 37)
null
if the encoder is not busy
IOException
- on communication errors.QUERY_REMOTEENCODER_IS_BUSY
Version | Date | Additional Version Info | |
---|---|---|---|
Added | 37 | 2008-01-14 | Changelog, SVN-Rev.: 15437 |
Removed | -1 |
IFreeInputList getFreeInputs() throws IOException
List<IInputInfo> getInputs() throws IOException
This method internally uses getFreeInputs()
to determine all free inputs
and 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" )); }
IOException
- on communication errors.getFreeInputs()
,
getBusyInput()
,
QUERY_REMOTEENCODER_GET_FREE_INPUTS
,
QUERY_REMOTEENCODER_IS_BUSY
Version | Date | Additional Version Info | |
---|---|---|---|
Added | 37 | 2008-01-14 | Changelog, SVN-Rev.: 15437 |
Removed | -1 |
boolean matchesRecording(IProgramInfo programInfo) throws IOException
programInfo
- the recording to check.
true
if the encoder is currently recording the given program.
IOException
- on communication errors.QUERY_REMOTEENCODER_MATCHES_RECORDING
,
matchesRecording(IProgramInfo)
Version | Date | Additional Version Info | |
---|---|---|---|
Added | 00 | ||
Removed | -1 |
boolean startRecording(IProgramInfo programInfo) throws IOException
boolean stopRecording() throws IOException
IProgramInfo getCurrentRecording() throws IOException
isBusy()
if this encoder is busy and if it is not, it just returns null
.
null
if the encoder
is currently not recording.
IOException
- on communication errorsQUERY_REMOTEENCODER_GET_CURRENT_RECORDING
Version | Date | Additional Version Info | |
---|---|---|---|
Added | 19 | 2005-10-09 | Changelog, SVN-Rev.: 7427 |
Removed | -1 |
IProgramRecordingStatus getRecordingStatus() throws IOException
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.
null
if unknown.
IOException
- on communication errors.QUERY_REMOTEENCODER_GET_RECORDING_STATUS
Version | Date | Additional Version Info | |
---|---|---|---|
Added | 63 | 2010-09-25 | Changelog, MythBuntu-Release: 11.04, MythTV-Release: 0.24, SVN-Rev.: 26518 |
Removed | -1 |
boolean cancelNextRecording(Boolean cancel) throws IOException
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.
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |