[mythtv] Myth Protocol Questions
moyerg at syphr.com
Mon Mar 21 14:09:22 UTC 2011
I am currently implementing several pieces of MythTV network
communication in Java (i.e. myth protocol, the new backend http api,
etc). However, for the socket protocol, I have come up with a few
questions. If anyone who knows how these things work could shed some
light on it for me, I will be glad to update the wiki. Thanks in
1) There seems to be a lot of duplication between QUERY_RECORDER and
QUERY_REMOTEENCODER sub-commands (i.e. CANCEL_NEXT_RECORDING,
GET_CURRENT_RECORDING, GET_FREE_INPUTS, GET_MAX_BITRATE,
GET_RECORDING_STATUS). Is there a reason for the distinction between
these two groups?
2) Within QUERY_RECORDER, the sub-commands GET_RECORDING and
GET_CURRENT_RECORDING (the latter of which is also in
QUERY_REMOTEENCODER), seem to be identical. Is this correct?
3) The documentation for QUERY_RECORDER FINISH_RECORDING and
QUERY_REMOTEENCODER STOP_RECORDING inside
mythtv/programs/mythbackend/EncoderLink.cpp indicate that the commands
only work on recorders local to that backend, but the code changes the
start and end recording times (only end time for FINISH_RECORDING).
This seems to affect other functionality within EncoderLink.cpp. Am I
mistaken and there really is no effect when the recorder is remote?
4) Does QUERY_RECORDER FRONTEND_READY (or more specifically, setting
the flag kFlagFrontendReady) have any effect? The flag does not seem
to be used. If so, what does it do? The documentation refers to the
frontend signalling that it is ready to receive messages, but I'm not
sure what kind of messages that means.
5) How does QUERY_(RECORDER|REMOTEENCODER) GET_FREE_INPUTS work
exactly (especially the excluded card IDs part)? For example, I have a
protocol 65 backend (master v0.25pre-1456-g6c7a2ea) connected to an
HDHomeRun. I configured the second tuner as the one and only card and
tell it to record at most 2 simulataneous programs on the same
multiplex. When I send the command "QUERY_RECORDER
1:GET_FREE_INPUTS" I get back "MPEG2TS:1:1:1:0"
which is expected. However, if I specify an exclusion, there does not
seem to be any change, such as "QUERY_RECORDER
1:GET_FREE_INPUTS:1". Since I am specifying the recorder in
the main command, I'm really not sure what I could be excluding.
Perhaps different hardware would lead to more functionality here? I'm
Thanks again for any information you can provide.
- Greg (syphr42)
P.S. The work I am doing is open source (Apache 2.0 license) and
available at https://github.com/syphr42/libmythtv-java if anyone is
interested. The artifacts are also in Maven central staging (currently
SNAPSHOT only) under the group ID syphr.org and will be released to
Maven central starting with version 0.1 soon.
More information about the mythtv-dev