@@ -0,0 +1,1896 @@
+/*%0A * Copyright (c) 2015 Mario Guggenberger %3Cmg@itec.aau.at%3E%0A *%0A * This file is part of ITEC MediaPlayer.%0A *%0A * ITEC MediaPlayer is free software: you can redistribute it and/or modify%0A * it under the terms of the GNU General Public License as published by%0A * the Free Software Foundation, either version 3 of the License, or%0A * (at your option) any later version.%0A *%0A * ITEC MediaPlayer is distributed in the hope that it will be useful,%0A * but WITHOUT ANY WARRANTY; without even the implied warranty of%0A * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the%0A * GNU General Public License for more details.%0A *%0A * You should have received a copy of the GNU General Public License%0A * along with ITEC MediaPlayer.  If not, see %3Chttp://www.gnu.org/licenses/%3E.%0A */%0A%0Apackage at.aau.itec.android.mediaplayer.dash;%0A%0Aimport java.util.ArrayList;%0Aimport java.util.List;%0A%0A/**%0A * Created by Mario on 13.08.2015.%0A */%0Apublic class Period %7B%0A%0A    String id;%0A    long startUs;%0A    long durationUs;%0A    boolean bitstreamSwitching;%0A    List%3CAdaptationSet%3E adaptationSets;%0A%0A    Period() %7B%0A        adaptationSets = new ArrayList%3CAdaptationSet%3E();%0A    %7D%0A%0A    public List%3CAdaptationSet%3E getAdaptationSets() %7B%0A        return adaptationSets;%0A    %7D%0A%0A    public AdaptationSet getFirstSetOfType(String mime) %7B%0A        for(AdaptationSet as : adaptationSets) %7B%0A            if(as.mimeType != null && as.mimeType.startsWith(mime)) %7B%0A                return as;%0A            %7D else %7B%0A                for(Representation r : as.representations) %7B%0A                    if(r.mimeType.startsWith(mime)) %7B%0A                        return as;%0A                    %7D%0A                %7D%0A            %7D%0A        %7D%0A        return null;%0A    %7D%0A%0A    public AdaptationSet getFirstVideoSet() %7B%0A        return getFirstSetOfType(%22video/%22);%0A    %7D%0A%0A    public AdaptationSet getFirstAudioSet() %7B%0A        return getFirstSetOfType(%22audio/%22);%0A    %7D%0A%7D%0A

Add period class