Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Commit c0ee729

Browse files
authored
Merge pull request #73 from shts/master
Make high-profile available
2 parents 012c3ab + df7ee27 commit c0ee729

File tree

1 file changed

+0
-11
lines changed

1 file changed

+0
-11
lines changed

‎lib/src/main/java/net/ypresto/androidtranscoder/engine/MediaFormatValidator.java‎

Lines changed: 0 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -18,14 +18,8 @@
1818
import android.media.MediaFormat;
1919

2020
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;
2521

2622
class 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) {

0 commit comments

Comments
(0)

AltStyle によって変換されたページ (->オリジナル) /