erlug
[Top] [All Lists]

[Erlug] Fwd: RFC: The KWinTV rewrite

To: erlug@xxxxxxxxxxxxxx
Subject: [Erlug] Fwd: RFC: The KWinTV rewrite
From: Daniele Medri <madrid@xxxxxxxx>
Date: Tue, 19 Mar 2002 18:37:28 +0100
Per gli amatori della tv-su-pc (e in particolar modo gli utenti di kwintv)... 
eccovi serviti!


----------  Messaggio inoltrato  ----------

Subject: RFC: The KWinTV rewrite
Date: Tue, 19 Mar 2002 01:33:45 +0000
From: Richard Moore <rich@xxxxxxxxxxxxxx>
To: kwintv@xxxxxxxxxxxx
Cc: kde-core-devel@xxxxxxx

   ****************
                             Introduction
                           ****************

This document is an overview of the changes I've been making to the
rewrite of the kwintv code that George added to cvs last week. As
you'll see I've been pretty busy, so I've tried to break things down
into managable chunks. If you just want the raw data, then skip to the
bottom for links to the latest class documentation and the
changelog. If you have any comments or suggestions please

Richard Moore, <rich@xxxxxxx>


                        *********************
                          Executive Summary
                        *********************

I've been hacking at the kwintv3 (qtvision) code that George imported
last week, and the changes are becoming significant enough to warrant
some discussion. The main things I've done so far are as follows:

- Ported the code to Qt/KDE 3, and made it use the XMLGUI framework.

- Split the old main window class into two, with the back end being a
  standalone QObject that can be reused.

- Written a generic I/O framework for channel files.

- Tried to make the code into a collection of reusable objects so that
  it can be split into a library for accessing TV devices and a
  collection of user interfaces that use the library.

- Cleaned things up a bit.

- Improved the scan wizard.

- Added a bunch of kdoc comments to explain how things work to other
  developers (hint!).


                          *****************
                            Current Plans
                          *****************

General
=======

- At the moment I can't actually use this app as PAL support seems to
  be broken, so obviously I plan to fix this.

- There are still more code cleanups needed.

- Write a channel editor.


Channel Wizard
==============

There are a number of obvious improvements that can be made to the
channel wizard. At the moment the ones I'm planning are:

- Get the region data from V2 working using the XML region data
  format.

- Extending the GUI to work with the region stuff.

- Adding the ability to import old channel files.

- Making the wizard look cooler.


Improved Code-Reuse
===================

I'd like to provide a range of ways this code can be used, the things
that I'm tempted to work on at the moment are:

- A KPart that can be embedded in Konq as a viewer for channel files.

- A kicker applet and extension that contains a small TV.

- A QWidget for displaying a TV.

- A screensaver that shows a TV.

- A hack that makes the desktop background a TV.

- A DCOP interface to the QtVision back-end.


Wouldn't It Be Nice If...
=========================

There are a number of things my ideal TV application would have:

- An integrated TV listings viewer.

- The ability to set alarms that trigger when a program is starting.

- Teletext (videotext) support.

- A good way to channel hop and find what's on.

- Knowledge of the stations available in a given area, so that when
  you've found your channels you can just say 'this one is BBC 1' and
  the app will automatically assign the name, icons, a link to the
  website, listings etc.


                         ********************
                           Detailed Changes
                         ********************

General
=======

I've made various cleanups to the code while I've been working on it,
partly to make it work nicely with my other changes, and partly just
to make it easier to work with. I've tried to add kdoc comments to the
part of the code I've worked on to make it easier to understand how it
all works. I've also added a build target that creates a ChangeLog
file from the log recorded by cvs using cvs2cl (see links) so people
can keep track of what's being worked on. To make this useful, please
try to give a decent explanation when you commit changes.

Main Window
===========

I converted the QMainWindow of the embedded code into a KMainWindow
and ported it to use the XMLGUI framework. In addition I've split the
code into two classes making the backend code and the application
shell independent. Finally, I've started re-adding some of the
features of the old KWinTV main window, with the aim of doing it all
cleanly this time.

Most of the basics are now in place and working, so it might even be
possible to use the app already. I've re-implemented the fullscreen,
hide all, and LCD channel number features of V2 as custom KActions,
this is much cleaner than the old code and it might be worth using
them in the next release of the V2 code too.


Channel File Handling
=====================

I've written a generic API for loading and saving channel files. The
framework is designed along the lines of KImageIO, and allows new
filters to be added as required. The code is independent of the
Video4Linux code, as shown by the command-line test_channelio tool
which converts between different channel formats.

The filters currently working are:

- KwinTV 0.8.x channel format version 4 (Read-Only).

- CSV format of the original QtVision code (Read-Write).

- A new XML channel format (Read-Write).

The only other formats I see a need for are the xawtv format and the
format used by the win32 TV app that came with my Haupage card.


Channel Wizard
==============

The channel wizard in the embedded version of QtVision could afford to
block the UI, but that is not acceptable here so I've rewritten it to
be non-blocking. I also made the actual scanning code stand-alone so
it should be possible to write a command line version etc. later.

I've started adding the ability to use the region the user is in to
speed up the scan. The data for a region is loaded from another XML
file (instead of being hard-coded C++ as in the old kwintv) so it
should be easy to add new regions. You can test this using the
test_channelscannerregion tool. At the moment this code doesn't work
as there are problems converting the frequency data I have into
something the V4LDev class can understand.


                              *********
                                Links
                              *********

Developer Documentation
=======================

I've put a copy of the change log, and the latest kdoc output on my
website so you can take a look even if you don't want to download the
code.

http://xmelegance.org/devel/kwintv3-docs/
http://xmelegance.org/devel/kwintv3-ChangeLog

WebCVS
======

The code is in the KDE cvs in the directory kdenonbeta/kwintv3/ which
can be seen online via webCVS.

http://webcvs.kde.org/cgi-bin/cvsweb.cgi/kdenonbeta/kwintv3/

cvs2cl
======

This is a great tool that builds a ChangeLog file by analysing the
logs recorded by cvs.

http://www.red-bean.com/cvs2cl/


                             ***********
                               The End
                             ***********

Document Revision: $Id: README.rich,v 1.1 2002/03/19 01:35:16 rich Exp $

-------------------------------------------------------

-- 
Daniele Medri - http://www.linux.it/~madrid/
fingerprint: 5E13 8A5F 9FE3 6857 BF6B  9EE7 1693 81ED 211F C4C1
"Per molti il giudizio e' un dente da estrarre"


<Prev in Thread] Current Thread [Next in Thread>