[mythtv] [PATCH] MediaMonitor data and MythVideo support
Matt Porter
mporter at kernel.crashing.org
Tue Jun 29 13:32:10 EDT 2004
On Tue, Jun 29, 2004 at 01:08:44PM -0400, J. Donavan Stanley wrote:
> Matt Porter wrote:
> >Oh, and my thoughts on DATA type detection were to use extensions
> >from the videotype table in a QDir search to determine a
> >MEDIATYPE_VIDEODATA media. We can use a static set of extensions
> >(those known to be handled by mythmusic/mythgallery to determine
> >a MEDIATYPE_AUDIODATA and MEDIATYPE_IMAGEDATA media). Adding this
> >finer-grained DATA type detection would require it moving out of
> >mythcdrom.cpp since it would be used by a mythhotplug.cpp (I
> >might have any of those data types on a hotplug device).
> >
> >
> The way I had originally envisioned this working was that multiple
> handlers could register for the same type. Then when we handler the
> event we can prompt the user if there's more than one handler. That's
> the reason why I kept the text information in the structs when I copied
> over the jump point logic to use for media handlers.
>
> Trying to add detectors for all the different media types is a losing
> battle... It's one thing for fixed types such as DVDs, but once you
> start dealing with a bunch of files on a disk it could be anything, or
> even a mix of things. The user knows what they stuck in the drive, it's
> better to just ask them:
>
> What do you want to do with this disk?
> Open in MythVideo
> Open in MythMusic
> Open in SomeOtherRegisteredHandlerFor_MEDIATYPE_DATA
> Do nothing.
That seems reasonable. However, I think it would better if it were
the fallback. So, for the folks who archive only audio, images,
or video files to a disk, the extension detector can detect a
specific data disk type and launch the correct handler. If we
don't detect any of them OR we detect multiple type extensions,
the it's MEDIATYPE_DATA and we fallback to "What do you want to
do with this disk?".
-Matt
More information about the mythtv-dev
mailing list