[mythtv] [PATCH] mythvideo cd support

Xavier Hervy maxpower44 at tiscali.fr
Thu Jul 1 17:09:55 EDT 2004

J. Donavan Stanley wrote:

> Xavier Hervy wrote:
>> About warning, for one of them i made a stupid test on a parameter to 
>> remove the warning (if (modetree != modetree) return "";)
>> For the two others, i made something now with parameter then they 
>> should be removed.
> Anywhere that you have an unused parameter just leave the name off the 
> function declaration so "void foo(int bar)" becomes "void foo(int)" that 
> will remove the warning without inserting unneeded code.

Ok I do what you say to remove warning, and you know what, it's work ! ;-)

I made a patch for media monitoring that allow MythDialog to intercept 
mediahandler before that mediamonitoring close activewindow and open the 
good plugin.

For this i made a virtual function in MythDialog like this :
virtual bool MythDialog::onMediaEvent(MythMediaDevice * mediadevice)
     return false;

then mediamonitor run the onMediaEvent function of the active dialog, if 
the function return false that means that dialog don't need to use the 
media, then mediamonitor run the default handler like before.

To use this, simply create a virtual function in the dialog you want. I 
made this for the popup wich is waiting for insert media.

virtual bool VideoPlayerPopup::onMediaEvent(MythMediaDevice * mediadevice)
    if (mediadevice->getMediaType()==MEDIATYPE_DATA)
       // do some stuff
       return true;
       return MythPopupBox::onMediaEvent(mediadevice);

Actually it's work great in mythvideo.

I also update my patch to remove some cout, i have forget to remove, fix 
  few little bug in videofilter.

-------------- next part --------------
A non-text attachment was scrubbed...
Name: dialog_mediamonitoring.bz2
Type: application/octet-stream
Size: 1068 bytes
Desc: not available
Url : http://mythtv.org/pipermail/mythtv-dev/attachments/20040701/4f72d732/dialog_mediamonitoring.obj
-------------- next part --------------
A non-text attachment was scrubbed...
Name: mythvideocdsupport.tar.bz2
Type: application/octet-stream
Size: 24907 bytes
Desc: not available
Url : http://mythtv.org/pipermail/mythtv-dev/attachments/20040701/4f72d732/mythvideocdsupport.tar.obj

More information about the mythtv-dev mailing list