mirror of
https://github.com/samsonjs/media.git
synced 2026-04-18 13:25:47 +00:00
Merge branch 'everything' into avi
This commit is contained in:
commit
ed2c814837
2 changed files with 5 additions and 10 deletions
|
|
@ -143,13 +143,7 @@ public class MpegAudioChunkHandler extends ChunkHandler {
|
|||
public void setIndex(int index) {
|
||||
super.setIndex(index);
|
||||
syncTime();
|
||||
if (frameRemaining != 0) {
|
||||
// We have a partial frame in the output, no way to clear it, so just send it as is.
|
||||
// Next frame should be key frame, so the codec should recover.
|
||||
trackOutput.sampleMetadata(timeUs, 0, header.frameSize - frameRemaining,
|
||||
0, null);
|
||||
frameRemaining = 0;
|
||||
}
|
||||
frameRemaining = 0;
|
||||
}
|
||||
|
||||
private void syncTime() {
|
||||
|
|
|
|||
|
|
@ -42,11 +42,12 @@ public class VideoFormat {
|
|||
STREAM_MAP.put('a' | ('v' << 8) | ('c' << 16) | ('1' << 24), MimeTypes.VIDEO_H264);
|
||||
STREAM_MAP.put('A' | ('V' << 8) | ('C' << 16) | ('1' << 24), MimeTypes.VIDEO_H264);
|
||||
STREAM_MAP.put('3' | ('V' << 8) | ('I' << 16) | ('D' << 24), mimeType);
|
||||
STREAM_MAP.put('d' | ('i' << 8) | ('v' << 16) | ('x' << 24), mimeType);
|
||||
STREAM_MAP.put('D' | ('I' << 8) | ('V' << 16) | ('X' << 24), mimeType);
|
||||
STREAM_MAP.put('D' | ('X' << 8) | ('5' << 16) | ('0' << 24), mimeType);
|
||||
STREAM_MAP.put('F' | ('M' << 8) | ('P' << 16) | ('4' << 24), mimeType);
|
||||
STREAM_MAP.put('x' | ('v' << 8) | ('i' << 16) | ('d' << 24), mimeType);
|
||||
STREAM_MAP.put(XVID, mimeType);
|
||||
STREAM_MAP.put('D' | ('X' << 8) | ('5' << 16) | ('0' << 24), mimeType);
|
||||
STREAM_MAP.put('d' | ('i' << 8) | ('v' << 16) | ('x' << 24), mimeType);
|
||||
STREAM_MAP.put('F' | ('M' << 8) | ('P' << 16) | ('4' << 24), mimeType);
|
||||
STREAM_MAP.put('M' | ('J' << 8) | ('P' << 16) | ('G' << 24), MimeTypes.VIDEO_MJPEG);
|
||||
STREAM_MAP.put('m' | ('j' << 8) | ('p' << 16) | ('g' << 24), MimeTypes.VIDEO_MJPEG);
|
||||
}
|
||||
|
|
|
|||
Loading…
Reference in a new issue