/** * Set transmit activity. If the active is true, the instance should transmit. * If it is set to false, the instance should pause transmit. * * @param active active state */ public void setTrasmit(boolean active) { for (SendStream sendStream : sendStreams) { try { if (active) { sendStream.start(); LOGGER.fine("START"); } else { sendStream.stop(); LOGGER.fine("STOP"); } } catch (IOException e) { LOGGER.log(Level.WARNING, "exception", e); } } }
sendStream.start();
sendStream.getDataSource().stop(); sendStream.stop(); sendStream.close();
= sendStream.getDataSource(); sendStream.start(); sendStreamDataSource.start();
synchronized void stop(SendStreamImpl sendStream) throws IOException { if (sendStreams.contains(sendStream)) { if (started == 1) { this.sendStream.stop(); started = 0; } else if (started > 1) started--; } } }
@Override public long getSSRC() { return sendStreamDesc.sendStream.getSSRC(); }
@Override public DataSource getDataSource() { return sendStreamDesc.sendStream.getDataSource(); }
@Override public Participant getParticipant() { return sendStreamDesc.sendStream.getParticipant(); }
@Override public SenderReport getSenderReport() { return sendStreamDesc.sendStream.getSenderReport(); }
sendStream.close();
synchronized void start(SendStreamImpl sendStream) throws IOException { if (sendStreams.contains(sendStream)) { if (started < 1) { this.sendStream.start(); started = 1; } else started++; } }
/** * Notifies this <tt>SendStreamListener</tt> that the <tt>RTPManager</tt> it * is registered with has generated an event related to a * <tt>SendStream</tt>. * * @param ev the <tt>SendStreamEvent</tt> which specifies the * <tt>SendStream</tt> that is the cause of the event and the very type of * the event * @see SendStreamListener#update(SendStreamEvent) */ @Override public void update(SendStreamEvent ev) { if (ev instanceof NewSendStreamEvent) { /* * JMF stores the synchronization source (SSRC) identifier as a * 32-bit signed integer, we store it as unsigned. */ long localSourceID = ev.getSendStream().getSSRC() & 0xFFFFFFFFL; if (getLocalSourceID() != localSourceID) setLocalSourceID(localSourceID); } }
/** * Set transmit activity. If the active is true, the instance should trasmit. * If it is set to false, the instance should pause transmit. * * @param active active state */ public void setTrasmit(boolean active) { for (SendStream sendStream : sendStreams) { try { if (active) { sendStream.start(); LOGGER.fine("START"); } else { sendStream.stop(); LOGGER.fine("STOP"); } } catch (IOException e) { e.printStackTrace(); } } }
sendStream.start();
long localSSRC = sendStream.getSSRC() & 0xFFFFFFFFL;
/** * Set transmit activity. If the active is true, the instance should trasmit. * If it is set to false, the instance should pause transmit. * * @param active active state */ public void setTrasmit(boolean active) { for (SendStream sendStream : sendStreams) { try { if (active) { sendStream.start(); LOGGER.debug("START"); } else { sendStream.stop(); LOGGER.debug("STOP"); } } catch (IOException e) { e.printStackTrace(); } } }
sendStream.start();