[mythtv] Ticket #4270: MythTV on Windows (with MinGW)

Anduin Withers awithers at anduin.com
Tue Jan 1 21:01:33 UTC 2008


> My thought was to make an assumption/requirement that relative video
> paths be unique within a storage group. I'd do it either formally, by
> creating a unique index on SG + filename, or informally by refusing
> to scan duplicate paths.

I'm fine with the relative path restricted to being unique within a SG,
otherwise things would only be relative to the parent of the actual prefix.

> Building the video tree then becomes a matter of tearing through the
> relative paths in videometadata (or the list returned by
> SG::GetAllFiles) and passing them to smart_dir_node. There will be a
> slight performance gain there but I doubt it's much.

It is only this easy because you want to skip the prefix name part, and
scans will need to do that same prefix placing (currently done with string
compares) with file existence tests.

> As a aside, before too long I'd also like to add lazy loading for
> metadata. I have > 1,700 videos in my table but a given folder will
> have 6-30 entries so it's kind of a waste to load up the whole list
> each time. Anyway that's for another time.

Profile the load before you spend too much time, I do tests with 10000
"video" files. Things could be faster especially for file browsing but the
initial load wasn't the bottleneck last time I looked.

> One remaining issue - the current code creates a folder for each
> entry in VideoStartupDir. I hate this behaviour and have a kludgy
> patch to get rid of it for the current code. In the new setup I'd
> either get rid of those folders entirely or have per-storage group
> attribute for root level folder. Again, if you must have a top-level
> folder for each directory you can go with multiple storage groups.

It isn't something I created and I didn't enjoy keeping it (extra code as
you've seen) but I'm always hesitant to change the way things work. Removing
them would result in:

SG foo
/var/media/FUDCon
/opt/extra/Lectures/Prog Session

Contents:
/var/media/FUDCon/005_FUDCon.mov
/opt/extra/Lectures/Prog Session/Lecture-1a.avi

Proposed:
+ foo
  + 005_FUDCon.mov
  + Lecture-1a.avi

Current:
+ FUDCon
  + 005_FUDCon.mov
+ Prog Session
  + Lecture-1a.avi

Splitting them off in to separate SGs does solve that though the merging
still seems odd to me.

We should probably start that other thread; most of this has nothing to do
with the Windows effort.

-- 
Anduin Withers



More information about the mythtv-dev mailing list