|
1 | | -package com.google.android.exoplayer2.source.sabr.parser.processor; |
| 1 | +package com.google.android.exoplayer2.source.sabr.parser; |
2 | 2 |
|
3 | 3 | import android.util.Base64; |
4 | 4 | import android.util.Pair; |
|
22 | 22 | import com.google.android.exoplayer2.source.sabr.parser.parts.MediaSegmentInitSabrPart; |
23 | 23 | import com.google.android.exoplayer2.source.sabr.parser.parts.PoTokenStatusSabrPart; |
24 | 24 | import com.google.android.exoplayer2.source.sabr.parser.parts.PoTokenStatusSabrPart.PoTokenStatus; |
| 25 | +import com.google.android.exoplayer2.source.sabr.parser.results.ProcessFormatInitializationMetadataResult; |
| 26 | +import com.google.android.exoplayer2.source.sabr.parser.results.ProcessLiveMetadataResult; |
| 27 | +import com.google.android.exoplayer2.source.sabr.parser.results.ProcessMediaEndResult; |
| 28 | +import com.google.android.exoplayer2.source.sabr.parser.results.ProcessMediaHeaderResult; |
| 29 | +import com.google.android.exoplayer2.source.sabr.parser.results.ProcessMediaResult; |
| 30 | +import com.google.android.exoplayer2.source.sabr.parser.results.ProcessSabrSeekResult; |
| 31 | +import com.google.android.exoplayer2.source.sabr.parser.results.ProcessStreamProtectionStatusResult; |
| 32 | +import com.google.android.exoplayer2.source.sabr.parser.misc.Utils; |
25 | 33 | import com.google.android.exoplayer2.source.sabr.protos.videostreaming.BufferedRange; |
26 | 34 | import com.google.android.exoplayer2.source.sabr.protos.videostreaming.ClientAbrState; |
27 | 35 | import com.google.android.exoplayer2.source.sabr.protos.videostreaming.StreamerContext.ClientInfo; |
@@ -685,7 +693,7 @@ public int getLiveSegmentTargetDurationSec() { |
685 | 693 | //} |
686 | 694 |
|
687 | 695 | public VideoPlaybackAbrRequest buildVideoPlaybackAbrRequest(int trackType, boolean isInit) { |
688 | | - int resolution = trackType == C.TRACK_TYPE_VIDEO ? 720 : 0; // current track height (if video) |
| 696 | + int resolution = trackType == C.TRACK_TYPE_VIDEO && videoFormatSelector != null ? Utils.parseHeight(videoFormatSelector.displayName) : 0; |
689 | 697 | int bandwidthEstimate = 1350000; // ??? |
690 | 698 |
|
691 | 699 | ClientAbrState clientAbrStateTest = ClientAbrState.newBuilder() |
@@ -893,7 +901,7 @@ private Pair<List<BufferedRange>, FormatId> createBufferedRangesAndDiscardFormat |
893 | 901 | } |
894 | 902 |
|
895 | 903 | boolean shouldDiscard = currentFormatITag != activeFormat.getItag(); |
896 | | - FormatId initializedFormat = null; |
| 904 | + SelectedFormat initializedFormat = null; // TODO: not implemented |
897 | 905 |
|
898 | 906 | BufferedRange bufferedRange = shouldDiscard ? createFullBufferRange(activeFormat) : createPartialBufferRange(initializedFormat); |
899 | 907 |
|
@@ -935,7 +943,7 @@ private BufferedRange createFullBufferRange(@NonNull FormatId format) { |
935 | 943 | * @param initializedFormat - The format with initialization data. |
936 | 944 | * @return A BufferedRange object with segment information, or null if no metadata is available. |
937 | 945 | */ |
938 | | - private BufferedRange createPartialBufferRange(FormatId initializedFormat) { |
| 946 | + private BufferedRange createPartialBufferRange(SelectedFormat initializedFormat) { |
939 | 947 | if (initializedFormat == null) { |
940 | 948 | return null; |
941 | 949 | } |
|
0 commit comments