[mythtv] [PATCH] MediaMonitor data and MythVideo support

Xavier Hervy maxpower44 at tiscali.fr
Tue Jun 29 14:29:04 EDT 2004


J. Donavan Stanley wrote:

> Xavier Hervy wrote:
> 
>> J. Donavan Stanley wrote:
>>
>>>
>>> As it turns out, the only disks I stick in my machines are either 
>>> DVDs or Music CDs so the current handlers work well enough for me.  I 
>>> tried to plan ahead to make it fairly easy to extend this, it's just 
>>> not been on my radar.
>>
>>
>>
>> Media handler is not enougth. for example (in my patch) when you try 
>> to play a movie on a cd, mythvideo ask for cd , but when i insert it, 
>> mythvideo is closed and open a new time.
> 
> 
> 
> How about adding the notion of a "currentHandler" to the Mediamonitor?  
> That way the notification system could do something like "If I found a 
> handler and it's not the same handler as is currently active then fire 
> the event"..
> 
> This would take care of quite a few "isms" I've seen..

create a QMediaEvent send by mediamonitor

MyDialog::contentsMediaChangeEvent( QMediaEvent *me )
{
      //if the event interest my dialog then
      if (me->MediaType == MEDIATYPE_DATA)
          // do something
      else
         MythDialog::contentsMediaChangeEvent( me );
}

and  MythDialog implement like this
MythDialog::contentsMediaChangeEvent( QMediaEvent *me )
{
     // nobody catch this event then run appropriate mediahandler

}

Xavier



More information about the mythtv-dev mailing list