add AVC "high 10" profile test
enable AllowVideoStreamCopy, setAllowAudioStream
(cherry picked from commit 90d0e7ed13)
This commit is contained in:
committed by
Niels van Velzen
parent
21c7b6de09
commit
36fd201113
@@ -58,6 +58,8 @@ public class PlaybackManager {
|
||||
request.setDeviceProfile(options.getProfile());
|
||||
request.setMaxAudioChannels(options.getMaxAudioChannels());
|
||||
|
||||
request.setAllowAudioStreamCopy(true);
|
||||
|
||||
apiClient.GetPlaybackInfoWithPost(request, new GetPlaybackInfoResponse(this, deviceInfo, apiClient, options, response, false, startPositionTicks));
|
||||
}
|
||||
|
||||
@@ -75,6 +77,9 @@ public class PlaybackManager {
|
||||
request.setEnableDirectPlay(options.getEnableDirectPlay());
|
||||
request.setMaxAudioChannels(options.getMaxAudioChannels());
|
||||
|
||||
request.setAllowVideoStreamCopy(true);
|
||||
request.setAllowAudioStreamCopy(true);
|
||||
|
||||
apiClient.GetPlaybackInfoWithPost(request, new GetPlaybackInfoResponse(this, deviceInfo, apiClient, options, response, true, startPositionTicks));
|
||||
|
||||
}
|
||||
|
||||
@@ -1,9 +1,12 @@
|
||||
package org.jellyfin.androidtv.util.profile;
|
||||
|
||||
import static android.media.MediaCodecInfo.CodecProfileLevel.AVCLevel4;
|
||||
import static android.media.MediaCodecInfo.CodecProfileLevel.AVCProfileHigh10;
|
||||
import static android.media.MediaCodecInfo.CodecProfileLevel.H263Level10;
|
||||
import static android.media.MediaCodecInfo.CodecProfileLevel.H263Level45;
|
||||
import static android.media.MediaCodecInfo.CodecProfileLevel.HEVCMainTierLevel5;
|
||||
import static android.media.MediaCodecInfo.CodecProfileLevel.HEVCProfileMain10;
|
||||
import static android.media.MediaFormat.MIMETYPE_VIDEO_AVC;
|
||||
import static android.media.MediaFormat.MIMETYPE_VIDEO_H263;
|
||||
import static android.media.MediaFormat.MIMETYPE_VIDEO_HEVC;
|
||||
|
||||
@@ -36,6 +39,10 @@ public class MediaCodecCapabilitiesTest {
|
||||
return hasDecoder(MIMETYPE_VIDEO_HEVC, HEVCProfileMain10, HEVCMainTierLevel5);
|
||||
}
|
||||
|
||||
public boolean supportsAVCHigh10() {
|
||||
return hasDecoder(MIMETYPE_VIDEO_AVC, AVCProfileHigh10, AVCLevel4);
|
||||
}
|
||||
|
||||
private boolean checkDecoder(String mime, int profile, int level) {
|
||||
if (!hasDecoder(mime, profile, level)) {
|
||||
Timber.i("no %s decoder for profile %d and level %d", mime, profile, level);
|
||||
|
||||
@@ -84,11 +84,12 @@ object ProfileHelper {
|
||||
ProfileCondition(
|
||||
ProfileConditionType.EqualsAny,
|
||||
ProfileConditionValue.VideoProfile,
|
||||
arrayOf(
|
||||
listOfNotNull(
|
||||
"high",
|
||||
"main",
|
||||
"baseline",
|
||||
"constrained baseline"
|
||||
"constrained baseline",
|
||||
if (MediaTest.supportsAVCHigh10()) "high 10" else null
|
||||
).joinToString("|")
|
||||
)
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user