Opened 18 years ago

Closed 18 years ago

#1092 closed defect (fixed)

Add the ability to control Mythfrontend via a network socket.

Reported by: cpinkham Owned by: cpinkham
Priority: trivial Milestone: 0.19
Component: mythtv Version: head
Severity: low Keywords:
Cc: Ticket locked: no

Description

This ticket is being created so I can track all changes related to the patches I'm about to apply that will add the ability to control Mythfrontend via a socket connection.

Change History (9)

comment:1 Changed 18 years ago by cpinkham

(In [8678]) Add ability to track location of what Myth screen is currently being displayed. The hooks in mythfrontend screens are enabled, hooks still need to be added to the plugins to track those.

References #1092.

NOTE: This changes the myth binary version and will require a make clean.

comment:2 Changed 18 years ago by cpinkham

(In [8679]) Add a "Main Menu" jump point. As a side-effect, you can now hit CTRL-L on the main menu to reload the menu.

References #1092.

Note: This also requires a myth binary version change since it changes libmyth, so you'll need to make clean again. Hopefully you haven't done one in the past 5 minutes since my last commit so you can just do it once instead of twice. :) This should be the last of these type changes related to #1092.

comment:3 Changed 18 years ago by cpinkham

(In [8680]) Add code and a jump point for starting LiveTV and immediately going to the EPG. The jump point is called "Live TV In Guide" to go with the existing "Live TV" jump point.

Hook up "Status Screen" and "Previously Recorded" jump points for their respective mythfrontend screens.

References #1092.

comment:4 Changed 18 years ago by cpinkham

(In [8681]) Bugfix: Don't mute the audio in TV::SetFFRew() if we're playing at 1x forward speed.

References #1092 because this fix is in my svn tree because I found it while working on the socket stuff.

comment:5 Changed 18 years ago by cpinkham

(In [8682]) In TV::ChangeChannel?(), if the channum passed in is empty, then retrieve it from the DB using the passed in chanid. This allows us to explicitly change channels by specifying a chanid.

References #1092.

comment:6 Changed 18 years ago by cpinkham

(In [8683]) Add a line that I missed committing in [8681]. References #1092.

comment:7 Changed 18 years ago by cpinkham

(In [8684]) Re-enable the ability to create a dummy "tuner" for testing purposes using the "file:/path/to/MPEG-2/filename.mpg" syntax in the capturecard.videodevice. This patch adds a "DummyChannel?" object that is used in this case since a lot of the recording code requires a valid channel instance.

References #1092 only because it's in my tree because of the changes in #1092, but this is not required for the socket control.

comment:8 Changed 18 years ago by cpinkham

(In [8686]) Fix SetFFRew rewinding that I broke in [8683] by changing speed from a float to an unsigned int. References #1092.

comment:9 Changed 18 years ago by cpinkham

Resolution: fixed
Status: newclosed

(In [8688]) This commit adds the ability to control mythfrontend via a socket interface. Commands are sent and replies are received in text mode, there is no fancy xml interface or anything, it is meant to be able to be used via something as simple as telnet.

This feature is disabled by default, you need to turn it on via the mythfrontend setup screen under the Default settings page and then restart mythfrontend. The default port is 6545, so after restarting mythfrontend, you can test by telnetting to localhost on port 6545 ("telnet localhost 6545"). For a list of supported commands, type "help". For help on a specific command, type "help COMMAND" (where COMMAND is the name of the command like "help jump").

Notes:

The integer 1x, etc. play speeds come from the FFRewSpeed settings in the database, otherwise they use the defaults of (3, 5, 10, 20, 30, 60, 120, 180) defined in tv_play.cpp.

The pre-defined fraction speeds (1/2, 1/4, etc.) are listed in the "help play" help text.

There can be only one socket connection to mythfrontend at a time, if a new connection is opened, the old one will be automatically closed.

Closes #1092. If there are any bugs found, they can be submitted under another ticket.

Note: See TracTickets for help on using tickets.