[mythtv] Re: [patch]building a tree for video{tree|gallery}

Leo Weppelman leo at wau.mis.ah.nl
Wed Sep 29 03:07:21 EDT 2004


On Tue, Sep 28, 2004 at 06:44:45PM -0400, thor wrote:
> On Tuesday 28 September 2004 02:42 am, Leo Weppelman wrote:
> 
> > > It is my first major c++ project, so beware ;-) Thor was willing to
> > > preview it, but he didn't have the time to actually do it. So we decided
> > > to throw it on this list.
> 
> 	And look who ends up responding, eventually ....

After it took me an extra 2 days to get it actually appearing on the list ;-))

>  In general, it's definitely moving in the right direction. One thing, the 
> buildVideoList() is a little rambling. Would probably be clearer (at least to 
> me) to break it out into separate methods that are called for file_browser 
> TRUE | FALSE. Might also be possible for those two methods to call common 
> bits of code, dunno.

Yup, you are absolutely correct. I'll rip that function apart. I will
keep the outside view as-is though. I don't think that there should be
2 types of buildVideoList().

> > > There is one 'bug' in the code that I know of, but have no fix for yet:
> > >    In the videotree, you now see the 'updir's popping up. They have no
> > >    in this view. But I couldn't find an easy way to suppress them. An
> > >    opion would be to pass a flag to videolist::buildVideoList() to
> > >    not include them. But that would be harmfull to the next item...
> > >
> 
>  Well, first though is that the tree never needs a node that means "up", 
> because it's inherent in the notion of a tree. The root node(s) have no up, 
> everything else does. Of course, that would mean slight changes in the way 
> the views work, but nothing too extreme. That make sense?

Makes sense. I'll see if I can figure out how to make the gallery code
cope without the updirs.... Suggestions/help is appreciated.

> > > Another thing that is missing is actually an idea from Thor, that it
> > > would be nice to be able to pass the tree around between the various
> > > views without the need to rebuild it. I haven't implemented it, because I
> > > could not find a good way to do it and because the current patch is
> > > already pretty big.
> 
> One fairly straightforward way to do this would be to pass trees to the views 
> in their constructors. If the tree is null, they build it, otherwise, they 
> just use what they've been handed.
> 
>  If you can keep at it, would be really nice to keep proceeding in this 
> direction. You probably also want to watch for any responses from J. Donavan 
> Stanley, as he's done the bulk of the work on MythVideo recently and 
> understands how the current code works better than I do.

I am definitely hoping he has ideas on passing the tree around. Especially
since he is the author of videodlg.cpp that provides the various jump-points.


Thanks,

Leo.


More information about the mythtv-dev mailing list