[mythtv] How does HandleMedia / RegisterMediaHandler work?

Leo Weppelman leo at wau.mis.ah.nl
Mon May 29 06:22:24 UTC 2006


On Mon, May 29, 2006 at 12:37:36AM +0100, Matthew Wire wrote:
> When MythTV starts up with a DVD-video in the drive it is handled by
> MythGallery instead of MythDVD.  Both are registered as mediahandlers.
> 
> I thought I'd try and fix this but can't work out how the media handler
> code works.  The plugin obviously has to declare a handlemedia function
> but I assumed it should call a registermediahandler function as well.
> However, I can find no reference to this in mythgallery. So:
> 
> How does a plugin register a media handler?
> How does a plugin register it's handler for specific types only?

Take a look at ticket #303. I saw that daniel added an up-to-date patch.
If you fill in the extensions in the REG_MEDIA_HANDLER to suit your needs
it should work. As an example, I have the mythgallery mediahandler defined
as:
  REG_MEDIA_HANDLER("MythGallery Media Handler", "", "", handleMedia,
                      MEDIATYPE_MGALLERY, "jpg,jpeg,png,tiff,bmp,gif");

Leo.
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 189 bytes
Desc: Digital signature
Url : http://mythtv.org/pipermail/mythtv-dev/attachments/20060529/66ebee5d/attachment.pgp 


More information about the mythtv-dev mailing list