//
// }
}
ITag tag = new Tag();
tag.setDataType(streampacket.getDataType());
//log.debug("data.limit() :: "+data.limit());
tag.setBodySize(data.limit());
tag.setTimestamp(timeStamp);
tag.setBody(data);
//log.debug("duration: "+flvWriter.getDuration());
if (debug) {
String filePath = folderPath + File.separatorChar
+ "Packet"
+"_t_"+tag.getTimestamp()
+"_d_"+deltaTime
+"_s_"+tag.getBodySize()
+".flv";
//File out = new File();
FLVDebugWriter flvWriterDebug = new FLVDebugWriter( new File( filePath ), false);
flvWriterDebug.writeBytesFromTag(streampacket.getData().asReadOnlyBuffer());
flvWriterDebug.closeBytesFile();
}
writer.writeTag(tag);
} else if (streampacket.getDataType() == 9) {
//Video data is handled just without calculating deltas
int timeStamp = streampacket.getTimestamp();
timeStamp -= startTimeStamp;
ITag tag = new Tag();
tag.setDataType(streampacket.getDataType());
//log.debug("data.limit() :: "+data.limit());
tag.setBodySize(data.limit());
tag.setTimestamp(timeStamp);
tag.setBody(data);
writer.writeTag(tag);
}