-bool
-ContentSorter::operator() (shared_ptr<Content> a, shared_ptr<Content> b)
-{
- if (a->position() != b->position()) {
- return a->position() < b->position();
- }
-
- /* Put video before audio if they start at the same time */
- if (a->video && !b->video) {
- return true;
- } else if (!a->video && b->video) {
- return false;
- }
-
- /* Last resort */
- return a->digest() < b->digest();
-}