ExoPlayer icon indicating copy to clipboard operation
ExoPlayer copied to clipboard

Customizing the TrackSelectors

Open ram992 opened this issue 9 years ago • 4 comments

Hello @ojw28

Is there a way to remove some tracks of DASH file from Default track adapter but make them available in Track Selection Helper class so the user can choose to override the default ones.

Sorry for raising this as an issue as I could not find any other straight way of doing it basing on bitrate of the track. And I am on very tight schedule.

it would do me a lot of help if you can even provide me with some other source of getting it

ram992 avatar Jan 07 '17 14:01 ram992

any help on this question

ram992 avatar Jan 09 '17 07:01 ram992

Sorry for being rude but any help for this question

ram992 avatar Jan 15 '17 17:01 ram992

From what I understand, you want to avoid adapting into a specific subset of the available representations. Have you looked into the TrackSelector hierarchy? This is one of the things you can do with it. I'd also suggest trying stack overflow or a similar Q&A.

AquilesCanta avatar Jan 16 '17 10:01 AquilesCanta

Hello @AquilesCanta I have solved it after reading the classes (cause I got some time) sorry for bugging you guys. I am posting here the solution (it's very simple) you can refer it to any other person if needed.

private static boolean isSupportedAdaptiveVideoTrack(Format format, String mimeType, int formatSupport, int requiredAdaptiveSupport, int maxVideoWidth, int maxVideoHeight) { return isSupported(formatSupport) && ((formatSupport & requiredAdaptiveSupport) != 0) && (mimeType == null || Util.areEqual(format.sampleMimeType, mimeType)) && (format.width == Format.NO_VALUE || format.width <= maxVideoWidth) && (format.height == Format.NO_VALUE || format.height <= maxVideoHeight) &&(format.bitrate < 3000000); } this method is in DefaultTrackSelector.java class extra param &&(format.bitrate < 3000000);

Thanks for your reply

ram992 avatar Jan 16 '17 12:01 ram992