} else if (message instanceof StatusMessage) {
StatusMessage statusMsg = (StatusMessage) message;
data.sendStatus(statusMsg.getBody());
} else if (message instanceof RTMPMessage) {
RTMPMessage rtmpMsg = (RTMPMessage) message;
IRTMPEvent msg = rtmpMsg.getBody();
Header header = new Header();
int timestamp = streamTracker.add(msg);
if (timestamp < 0) {
log.warn("Skipping message with negative timestamp.");
return;
}
header.setTimerRelative(streamTracker.isRelative());
header.setTimer(timestamp);
switch (msg.getDataType()) {
case Constants.TYPE_STREAM_METADATA:
Notify notify = new Notify(((Notify) msg).getData()
.asReadOnlyBuffer());
notify.setHeader(header);
notify.setTimestamp(header.getTimer());