public void addRecordingByStreamId(IConnection conn, String streamId,
RoomClient rcl, Long flvRecordingId) {
try {
FlvRecording flvRecording = this.flvRecordingDaoImpl.getFlvRecordingById(flvRecordingId);
Date now = new Date();
//If its the recording client we need another type of Meta Data
if (rcl.getIsScreenClient()) {
if (rcl.getFlvRecordingId() != null && rcl.getScreenPublishStarted() != null && rcl.getScreenPublishStarted()) {
String streamName_Screen = generateFileName(flvRecordingId, rcl.getStreamPublishName().toString());
log.debug("############## ADD SCREEN OF SHARER :: "+rcl.getStreamPublishName());
Long flvRecordingMetaDataId = this.flvRecordingMetaDataDaoImpl.addFlvRecordingMetaData(flvRecordingId,
rcl.getFirstname()+" "+rcl.getLastname(), now,
false, false, true, streamName_Screen, rcl.getInterviewPodId());
//Start FLV Recording
recordShow(conn, rcl.getStreamPublishName(), streamName_Screen, flvRecordingMetaDataId, true, flvRecording.getIsInterview());
//Add Meta Data
rcl.setFlvRecordingMetaDataId(flvRecordingMetaDataId);
this.clientListManager.updateClientByStreamId(rcl.getStreamid(), rcl);
}
} else if
//if the user does publish av, a, v
//But we only record av or a, video only is not interesting
(rcl.getAvsettings().equals("av") ||
rcl.getAvsettings().equals("a") ||
rcl.getAvsettings().equals("v")){
String streamName = generateFileName(flvRecordingId, String.valueOf(rcl.getBroadCastID()).toString());
//Add Meta Data
boolean isAudioOnly = false;
if (rcl.getAvsettings().equals("a")){
isAudioOnly = true;
}
boolean isVideoOnly = false;
if (rcl.getAvsettings().equals("v")){
isVideoOnly = true;
}
Long flvRecordingMetaDataId = this.flvRecordingMetaDataDaoImpl.addFlvRecordingMetaData(flvRecordingId,
rcl.getFirstname()+" "+rcl.getLastname(), now,
isAudioOnly, isVideoOnly, false, streamName, rcl.getInterviewPodId());
//Start FLV recording
recordShow(conn, String.valueOf(rcl.getBroadCastID()).toString(), streamName, flvRecordingMetaDataId, false, flvRecording.getIsInterview());
rcl.setFlvRecordingMetaDataId(flvRecordingMetaDataId);
this.clientListManager.updateClientByStreamId(rcl.getStreamid(), rcl);