Mailing List Archive

Documentation patches
Hi again.

It seems that some documentation is needed for newbies like me to understand
the code. So I am slowly beginning to tamper with my sources, and have come
up with the following:

--- cvs/MC/README Sun Aug 18 18:41:56 2002
+++ new/MC/README Tue Sep 17 17:54:16 2002
@@ -62,6 +62,16 @@
and 'mythfrontend' in your /usr/local/bin directory, and create
/usr/local/share/mythtv for you.

+The programs are:
+mythfrontend -- main program, contains the scheduler, handles playing, etc.
+mythtv -- small wrapper around the TV class, only does live-tv.
+mythepg -- small wrapper program around the program guide
+mythdialog -- small program to just pop up a dialog box
+mythfilldatabase -- fills the database =)
+And - for development purposes:
+menutest (not installed, in the menutest subdir) -- a little program for
+displaying the menu files.
+
IMPORTANT: You _must_ edit the settings.txt file in
/usr/local/share/mythtv/
before running the application.




--- cvs/MC/libmythtv/channel.h Thu Aug 22 21:19:44 2002
+++ new/MC/libmythtv/channel.h Tue Sep 17 17:49:39 2002
@@ -9,32 +9,62 @@

class TV;

+/*
+ * This class handles the shown channel.
+ * You use this class to change channels etc..
+ */
class Channel
{
public:
+ /* Creates a channel, setting the liaison between the display and the
capture device. */
Channel(TV *parent, const QString &videodevice);
~Channel(void);

+ /* Opens the video device. */
bool Open(void);
+ /* Closes the video device. */
void Close(void);

+ /* Sets the TV format (PAL, SECAM etc..) */
void SetFormat(const QString &format);
+
+ /* Sets the frequence table (europe-west, us-cable etc..) */
void SetFreqTable(const QString &name);

- bool SetChannelByString(const QString &chan);
+ /* Sets channel to channel with the indicated name. */
+ /* Returns true if succesful, false otherwise. */
+ bool SetChannelByString(const QString &chan);
+
+ /* Sets channel to to he indicated channel number. */
+ /* Returns true if succesful, false otherwise. */
+ /* FIXME: Should accept the channel as a QString. */
bool SetChannel(int i);
+
+ /* Changes channel to the next. */
+ /* Returns true if succesful, false otherwise. */
bool ChannelUp(void);
+
+ /* Changes channel to the previous. */
+ /* Returns true if succesful, false otherwise. */
bool ChannelDown(void);

+ /* Does something with currentcapchannel.... */
void ToggleInputs(void);
+ /* Does something with currentcapchannel.... */
void SwitchToInput(const QString &input);

+ /* Returns the current channel name. */
QString GetCurrentName(void);
+
+ /* Returns the current channel number. */
+ /* FIXME: Should return the channel number as a QString. */
+ /* FIXME: Should be renamed to GetChannel, as it is the opposite of
SetChannel. */
int GetCurrent(void) { return curchannel + 1; }
-
- void SetFd(int fd) { videofd = fd; }
+
+ /* Sets the video device file descriptor - useful for some reason? */
+ void SetFd(int fd) { videofd = fd; }
+
private:
-
QString device;
bool isopen;
int videofd;

I hope the stuff is readable (and usable). As you can see from my comments I
maybe don't quite understand what's going on. I haven't really changed
code - only added comments.

/Jens