Design doc?

Looking for a guide to understanding the code
Is there a high-level design doc somewhere which could help me understand the organization of the source code? There's like 800+ .cpp/.h files, spread semi-randomly (it seems) through a number of directories. The XCode project file seems even less organized than the filesystem...

Is there a brief write-up somewhere of how things are organized? For plex specifically, or xbmc? For plex stuff I did some analysis of git commits to see which files are the most-often changed, and that's kind of useful at least for discovering which are the "main" files.

I'd really love to restructure the xcode project file to group files by functional area or something (not necessarily but maybe moving files around in the filesystem too), but to even get started on that is pretty daunting with so many ambiguously-named files and no immediately evident way of sorting out which is which. I guess doxygen with EXTRACT_ALL might be useful, I'll take a look at that. The goal would be not only to help me understand what's what in the codebase, but also help anyone else who's coming to it, so they can be more efficient in digging in and making improvements.

Any other suggestions?

Hey Craig,



I agree, the codebase has a pretty steep learning curve, most of it having to do with the long history of the project and all the many different contributors over the years. We’ve avoided doing too much of the “janitorial” stuff because of the possible additional difficulty in merging upstream XBMC changes over. Perhaps I should put more faith in Git :slight_smile:



There is no high level design document that I’m aware of. If you tell me what section you’re interested in contributing to, perhaps I can give you some specific pointers, but most of us just used grep and Eclipse’s nice xreferences to spelunk through the code.



Yeah, I was thinking about the xbmc merge issues, which is why I think the first cut would be to fix up the structure within the XCode project, leaving the filesystem basically alone. Then you can have essentially "virtual folders" within the XCode project which won't impact xbmc merges, since xbmc doesn't have Plex.xcodeproject/project.pbxproj in it.



As to what parts I'm looking to work on -- primarily the UI/menu layout; I'd like to build a stripped-down simplified version basically which merges "Video", "TV shows", "Movies" into just "Videos", and then removes all the other stuff like photos, music, applications (actually I want these, but accessed from under videos). I also desperately want to "fix" the "quit" popup thing. When I choose "quit" at the top level in an application, it does not mean I want favorites or help. I want to quit. So basically first thing I'm looking at here is UI/menu changes.


Yep, makes sense to me. I develop inside Eclipse, so I don't live inside XCode. The one thing to watch out for is that the file format for the XCode project doesn't merge well, so if you're planning to do some work on it, do it quickly, rebase, and issue a pull request :)



In terms of the Quit thing, that was fixed in 0.8.2 :)

damn, I was just gonna ask the same question, to bad there is no documention for this.



there is a lot of code, don’t know when I will have the time to dig into the source and really make anything out of it. might just looks for something in your lighthouse tickets and try to get it sorted… getting acquainted with the code by fixing very easy bugs…



I think that's how all of us started :)

This topic was automatically closed 90 days after the last reply. New replies are no longer allowed.