Added support for DX50

This commit is contained in:
Dustin 2022-01-22 16:43:04 -07:00
parent 8d9b895f15
commit 3ce652ead2
2 changed files with 6 additions and 1 deletions

View File

@ -210,13 +210,17 @@ public class AviExtractor implements Extractor {
if (streamFormat != null) {
i++;
if (streamHeader.isVideo()) {
final String mimeType = streamHeader.getMimeType();
if (mimeType == null) {
Log.w(TAG, "Unknown FourCC: " + toString(streamHeader.getFourCC()));
continue;
}
final VideoFormat videoFormat = streamFormat.getVideoFormat();
final TrackOutput trackOutput = output.track(streamId, C.TRACK_TYPE_VIDEO);
final Format.Builder builder = new Format.Builder();
builder.setWidth(videoFormat.getWidth());
builder.setHeight(videoFormat.getHeight());
builder.setFrameRate(streamHeader.getFrameRate());
final String mimeType = streamHeader.getMimeType();
builder.setSampleMimeType(mimeType);
// final StreamDataBox codecBox = (StreamDataBox) peekNext(streamChildren, i, StreamDataBox.STRD);
// final List<byte[]> codecData;

View File

@ -31,6 +31,7 @@ public class StreamHeaderBox extends ResidentBox {
STREAM_MAP.put('3' | ('V' << 8) | ('I' << 16) | ('D' << 24), mimeType);
STREAM_MAP.put('x' | ('v' << 8) | ('i' << 16) | ('d' << 24), mimeType);
STREAM_MAP.put('X' | ('V' << 8) | ('I' << 16) | ('D' << 24), mimeType);
STREAM_MAP.put('D' | ('X' << 8) | ('5' << 16) | ('0' << 24), mimeType);
STREAM_MAP.put('m' | ('j' << 8) | ('p' << 16) | ('g' << 24), MimeTypes.VIDEO_JPEG);
}