exporting sounds

fixed movies export
This commit is contained in:
Jindra Pet��k
2013-03-05 20:04:28 +01:00
parent ba7b092236
commit b0dd6bc2fd
14 changed files with 392 additions and 75 deletions
@@ -0,0 +1,36 @@
package com.jpexs.decompiler.flash.flv;
import java.io.ByteArrayOutputStream;
import java.io.IOException;
/**
*
* @author JPEXS
*/
public class VIDEODATA extends DATA{
public int frameType;
public int codecId;
public byte[] videoData;
public VIDEODATA(int frameType, int codecId, byte[] videoData) {
this.frameType = frameType;
this.codecId = codecId;
this.videoData = videoData;
}
@Override
public byte[] getBytes() {
ByteArrayOutputStream baos=new ByteArrayOutputStream();
try{
FLVOutputStream flv=new FLVOutputStream(baos);
flv.writeUB(4, frameType);
flv.writeUB(4, codecId);
flv.write(videoData);
}catch(IOException ex){
//ignore
}
return baos.toByteArray();
}
}