private void removeReceiveStream(ReceiveStreamDesc receiveStream, boolean emptyJB) { if (receiveStream.format instanceof VideoFormat) { rtpConnector.packetBuffer.disable(receiveStream.ssrc); emptyPacketBuffer(receiveStream.ssrc); } if (receiveStream.dataSink != null) { try { receiveStream.dataSink.stop(); } catch (IOException e) { logger.error("Failed to stop DataSink " + e); } receiveStream.dataSink.close(); } if (receiveStream.processor != null) { receiveStream.processor.stop(); receiveStream.processor.close(); } DataSource dataSource = receiveStream.receiveStream.getDataSource(); if (dataSource != null) { try { dataSource.stop(); } catch (IOException ioe) { logger.warn("Failed to stop DataSource"); } dataSource.disconnect(); } synchronized (receiveStreams) { receiveStreams.remove(receiveStream); } }
// // Find all the objects inside the DataSource and vet them. // private void vetDataSource(HashSet<String> unsupportedList, HashSet<String> notUnderstoodList) throws Exception { DataSource ds = JDBCDataSource.getDataSource(); Connection conn = ds.getConnection(); vetObject(ds, unsupportedList, notUnderstoodList); connectionWorkhorse(conn, unsupportedList, notUnderstoodList); }