So I've got this problem where file_entity is ignoring the configured video formatter despite triple-checking the GUI configuration. Instead it's being rendered by theme_file_entity_file_video(), which shouldn't be happening.
But it is. So I'm digging back into core to see where the theme function responsible was established. I'm in drupal_render but I'm already seeing the theme function set improperly...
So my question: Where does drupal determine which theme file/function to use for an entity field?
Clarification: my question is, "How/where does the theme registry get built for an entity?" I want to watch it get built with a debugger.