}
}
public void addRecordingByStreamId(IConnection conn, String streamId, Client rcl, Long flvRecordingId) {
try {
FlvRecording flvRecording = flvRecordingDaoImpl.get(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.isScreenPublishStarted()) {
String streamName_Screen = generateFileName(flvRecordingId, rcl.getStreamPublishName().toString());
log.debug("############## ADD SCREEN OF SHARER :: " + rcl.getStreamPublishName());
Long flvRecordingMetaDataId = metaDataDao.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);
sessionManager.updateClientByStreamId(rcl.getStreamid(), rcl, false, null);
}
} else if (rcl.getIsAVClient()
&& (rcl.getAvsettings().equals("av") || rcl.getAvsettings().equals("a") || rcl.getAvsettings().equals("v"))) {
// if the user does publish av, a, v
// But we only record av or a, video only is not interesting
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 = metaDataDao.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);
sessionManager.updateClientByStreamId(rcl.getStreamid(), rcl, false, null);