It's actually a bit overly complicated admittedly. It's annoying, the current revision is just sub-par and poorly designed (my fault). I apologize for that, and hopefully in the future I will fix this.
Do you have any question about any specific part or are you trying to get some sort of generalized overview? Video sources are derived from the "Source" base class. Audio sources are derived from the "AudioSource" base class. The video loop is in OBSVideoCapture.cpp, OBS::MainCaptureLoop(). The audio loop is in OBSCapture.cpp, OBS::MainAudioLoop().