File tree Expand file tree Collapse file tree 1 file changed +0
-13
lines changed
lib/src/main/java/net/ypresto/androidtranscoder/engine Expand file tree Collapse file tree 1 file changed +0
-13
lines changed Original file line number Diff line number Diff line change 18
18
import android .media .MediaFormat ;
19
19
20
20
import 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 ;
25
21
26
22
class MediaFormatValidator {
27
- // Refer: http://en.wikipedia.org/wiki/H.264/MPEG-4_AVC#Profiles
28
- private static final byte PROFILE_IDC_BASELINE = 66 ;
29
- private static final byte PROFILE_IDC_HI = 100 ;
30
23
31
24
public static void validateVideoOutputFormat (MediaFormat format ) {
32
25
String mime = format .getString (MediaFormat .KEY_MIME );
@@ -35,12 +28,6 @@ public static void validateVideoOutputFormat(MediaFormat format) {
35
28
if (!MediaFormatExtraConstants .MIMETYPE_VIDEO_AVC .equals (mime )) {
36
29
throw new InvalidOutputFormatException ("Video codecs other than AVC is not supported, actual mime type: " + mime );
37
30
}
38
- ByteBuffer spsBuffer = AvcCsdUtils .getSpsBuffer (format );
39
- byte profileIdc = AvcSpsUtils .getProfileIdc (spsBuffer );
40
- boolean availableProfile = (profileIdc == PROFILE_IDC_BASELINE || profileIdc == PROFILE_IDC_HI );
41
- if (!availableProfile ) {
42
- throw new InvalidOutputFormatException ("Non-baseline AVC video profile is not supported by Android OS, actual profile_idc: " + profileIdc );
43
- }
44
31
}
45
32
46
33
public static void validateAudioOutputFormat (MediaFormat format ) {
You can’t perform that action at this time.
0 commit comments