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 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
23
30
24
public static void validateVideoOutputFormat (MediaFormat format ) {
31
25
String mime = format .getString (MediaFormat .KEY_MIME );
@@ -34,11 +28,6 @@ public static void validateVideoOutputFormat(MediaFormat format) {
34
28
if (!MediaFormatExtraConstants .MIMETYPE_VIDEO_AVC .equals (mime )) {
35
29
throw new InvalidOutputFormatException ("Video codecs other than AVC is not supported, actual mime type: " + mime );
36
30
}
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
- }
42
31
}
43
32
44
33
public static void validateAudioOutputFormat (MediaFormat format ) {
You can’t perform that action at this time.
0 commit comments