File tree Expand file tree Collapse file tree 1 file changed +0
-11
lines changed
lib/src/main/java/net/ypresto/androidtranscoder/engine Expand file tree Collapse file tree 1 file changed +0
-11
lines changed Original file line number Diff line number Diff line change 1818import android .media .MediaFormat ;
1919
2020import net .ypresto .androidtranscoder .format .MediaFormatExtraConstants ;
21- import net .ypresto .androidtranscoder .utils .AvcCsdUtils ;
22- import net .ypresto .androidtranscoder .utils .AvcSpsUtils ;
23-
24- import java .nio .ByteBuffer ;
2521
2622class MediaFormatValidator {
27- // Refer: http://en.wikipedia.org/wiki/H.264/MPEG-4_AVC#Profiles
28- private static final byte PROFILE_IDC_BASELINE = 66 ;
2923
3024 public static void validateVideoOutputFormat (MediaFormat format ) {
3125 String mime = format .getString (MediaFormat .KEY_MIME );
@@ -34,11 +28,6 @@ public static void validateVideoOutputFormat(MediaFormat format) {
3428 if (!MediaFormatExtraConstants .MIMETYPE_VIDEO_AVC .equals (mime )) {
3529 throw new InvalidOutputFormatException ("Video codecs other than AVC is not supported, actual mime type: " + mime );
3630 }
37- ByteBuffer spsBuffer = AvcCsdUtils .getSpsBuffer (format );
38- byte profileIdc = AvcSpsUtils .getProfileIdc (spsBuffer );
39- if (profileIdc != PROFILE_IDC_BASELINE ) {
40- throw new InvalidOutputFormatException ("Non-baseline AVC video profile is not supported by Android OS, actual profile_idc: " + profileIdc );
41- }
4231 }
4332
4433 public static void validateAudioOutputFormat (MediaFormat format ) {
You can’t perform that action at this time.
0 commit comments