private Representation calculateRepresentation(AdaptationSet adaptationSet) {
        if(adaptationSet.representations.isEmpty()) {
            throw new RuntimeException("invalid state, an adaptation set must not be empty");
        }

        /* Under the assumption that the representations are always ordered by ascending bandwidth
         * in an MPD, the representation is solely chosen upon the index.
         * TODO order by bitrate to make sure
         */
        switch (mMode) {
            case LOWEST_BITRATE:
                return adaptationSet.representations.get(0);
            case HIGHEST_BITRATE:
                 return adaptationSet.representations.get(adaptationSet.representations.size() - 1);
            default:
                throw new RuntimeException("invalid state");
        }
    }
Does not do any adaptation and always recommends the same representation as
specified in the constructor.

Created by Mario on 05.09.2014.
MediaPlayer-DASH/src/main/java/net/protyposis/android/mediaplayer/dash/ConstantPropertyBasedLogic.java