www in docker support
This commit is contained in:
parent
539a848e95
commit
c227fce036
2145 changed files with 399596 additions and 58 deletions
|
|
@ -0,0 +1,42 @@
|
|||
package org.jcodec.containers.raw;
|
||||
|
||||
import java.io.IOException;
|
||||
import org.jcodec.common.AudioCodecMeta;
|
||||
import org.jcodec.common.Codec;
|
||||
import org.jcodec.common.Muxer;
|
||||
import org.jcodec.common.MuxerTrack;
|
||||
import org.jcodec.common.VideoCodecMeta;
|
||||
import org.jcodec.common.io.SeekableByteChannel;
|
||||
import org.jcodec.common.model.Packet;
|
||||
|
||||
public class RawMuxer implements Muxer, MuxerTrack {
|
||||
private SeekableByteChannel ch;
|
||||
|
||||
private boolean hasVideo;
|
||||
|
||||
private boolean hasAudio;
|
||||
|
||||
public RawMuxer(SeekableByteChannel destStream) {
|
||||
this.ch = destStream;
|
||||
}
|
||||
|
||||
public MuxerTrack addVideoTrack(Codec codec, VideoCodecMeta meta) {
|
||||
if (this.hasAudio)
|
||||
throw new RuntimeException("Raw muxer supports either video or audio track but not both.");
|
||||
this.hasVideo = true;
|
||||
return this;
|
||||
}
|
||||
|
||||
public MuxerTrack addAudioTrack(Codec codec, AudioCodecMeta meta) {
|
||||
if (this.hasVideo)
|
||||
throw new RuntimeException("Raw muxer supports either video or audio track but not both.");
|
||||
this.hasAudio = true;
|
||||
return this;
|
||||
}
|
||||
|
||||
public void finish() throws IOException {}
|
||||
|
||||
public void addFrame(Packet outPacket) throws IOException {
|
||||
this.ch.write(outPacket.getData().duplicate());
|
||||
}
|
||||
}
|
||||
Loading…
Add table
Add a link
Reference in a new issue