DataSource ds = stream.getDataSource(); if (stream != null && stream.getDataSource() != null) { DataSource ds = stream.getDataSource();
long receiveStreamSSRC = 0xFFFFFFFFL & receiveStream.getSSRC(); if(participant.equals(receiveStream.getParticipant()) && !participant.getStreams().contains( receiveStream) DataSource dataSource = receiveStream.getDataSource(); receiveStream.getDataSource());
Participant part = stream.getParticipant(); if (part != null) cname = part.getCNAME(); DataSource dsource = stream.getDataSource();
addSSRC(0xFFFFFFFFL & receiveStream.getSSRC()); = receiveStream.getDataSource();
/** * Gets the SSRC of a <tt>ReceiveStream</tt> as a (non-negative) * <tt>long</tt>. * * FMJ stores the 32-bit SSRC values in <tt>int</tt>s, and the * <tt>ReceiveStream.getSSRC()</tt> implementation(s) don't take care of * converting the negative <tt>int</tt> values sometimes resulting from * reading of a 32-bit field into the correct unsigned <tt>long</tt> value. * So do the conversion here. * * @param receiveStream the <tt>ReceiveStream</tt> for which to get the SSRC. * @return the SSRC of <tt>receiveStream</tt> an a (non-negative) * <tt>long</tt>. */ private long getReceiveStreamSSRC(ReceiveStream receiveStream) { return 0xffffffffL & receiveStream.getSSRC(); }
= new RTCPExtendedReport.VoIPMetricsReportBlock(); voipMetrics.setSourceSSRC((int) receiveStream.getSSRC()); ReceptionStats receptionStats = receiveStream.getSourceReceptionStats(); double lossRate;
/** * Returns the number of lost packets for the receive streams. * @return the number of lost packets for the receive streams. */ public long getDownloadNbPacketLost() { long downloadLost = 0; for(ReceiveStream stream : mediaStreamImpl.getReceiveStreams()) { downloadLost += stream.getSourceReceptionStats().getPDUlost(); } return downloadLost; }
/** * Adds a specific <tt>ReceiveStream</tt> to the list of * <tt>ReceiveStream</tt>s known to this instance to be contributing * audio to the mix produced by its associated <tt>AudioMixer</tt>. * * @param receiveStream the <tt>ReceiveStream</tt> to be added to the * list of <tt>ReceiveStream</tt>s known to this instance to be * contributing audio to the mix produced by its associated * <tt>AudioMixer</tt> */ @Override public void addReceiveStream(ReceiveStream receiveStream) { addSSRC(0xFFFFFFFFL & receiveStream.getSSRC()); }
/** * Returns the number of Protocol Data Units (PDU) lost in download since * the beginning of the session. * * @return the number of packets lost for this stream. */ private long getDownloadNbPDULost() { MediaDeviceSession devSession = mediaStreamImpl.getDeviceSession(); int nbLost = 0; if (devSession != null) { for(ReceiveStream receiveStream : devSession.getReceiveStreams()) nbLost += receiveStream.getSourceReceptionStats().getPDUlost(); } return nbLost; }
/** * Returns the <tt>TranscodingDataSource</tt> associated with * <tt>receiveStream</tt>. * * @param receiveStream the <tt>ReceiveStream</tt> to use * * @return the <tt>TranscodingDataSource</tt> associated with * <tt>receiveStream</tt>. */ public TranscodingDataSource getTranscodingDataSource( ReceiveStream receiveStream) { TranscodingDataSource transcodingDataSource = null; if(device instanceof AudioMixerMediaDevice) { transcodingDataSource = ((AudioMixerMediaDevice) device) .getTranscodingDataSource(receiveStream.getDataSource()); } return transcodingDataSource; }
/** * Gets the <tt>Player</tt> rendering the <tt>ReceiveStream</tt> with a * specific SSRC. * * @param ssrc the SSRC of the <tt>ReceiveStream</tt> to get the rendering * the <tt>Player</tt> of * @return the <tt>Player</tt> rendering the <tt>ReceiveStream</tt> with the * specified <tt>ssrc</tt> */ protected Player getPlayer(long ssrc) { Lock readLock = playbacksLock.readLock(); readLock.lock(); try { for (Playback playback : playbacks) { long playbackSSRC = 0xFFFFFFFFL & playback.receiveStream.getSSRC(); if (playbackSSRC == ssrc) return playback.player; } } finally { readLock.unlock(); } return null; }
/** * Gets the <tt>JitterBufferControl</tt> of a <tt>ReceiveStream</tt>. * * @param receiveStream the <tt>ReceiveStream</tt> to get the * <tt>JitterBufferControl</tt> of * @return the <tt>JitterBufferControl</tt> of <tt>receiveStream</tt>. */ public static JitterBufferControl getJitterBufferControl( ReceiveStream receiveStream) { DataSource ds = receiveStream.getDataSource(); if (ds instanceof PushBufferDataSource) { for (PushBufferStream pbs : ((PushBufferDataSource) ds).getStreams()) { JitterBufferControl pqc = (JitterBufferControl) pbs.getControl(JitterBufferControl.class.getName()); if (pqc != null) return pqc; } } return null; }
/** * Gets a <tt>ReceiveStream</tt> which this instance plays back on its * associated <tt>MediaDevice</tt> and which has a specific synchronization * source identifier (SSRC). * * @param ssrc the synchronization source identifier of the * <tt>ReceiveStream</tt> to return * @return a <tt>ReceiveStream</tt> which this instance plays back on its * associated <tt>MediaDevice</tt> and which has the specified <tt>ssrc</tt> */ public ReceiveStream getReceiveStream(int ssrc) { for (ReceiveStream receiveStream : getReceiveStreams()) { int receiveStreamSSRC = (int) receiveStream.getSSRC(); if (receiveStreamSSRC == ssrc) return receiveStream; } return null; }
DataSource ds = stream.getDataSource(); if (stream != null && stream.getDataSource() != null) { DataSource ds = stream.getDataSource();
/** * Removes a specific <tt>ReceiveStream</tt> from the list of * <tt>ReceiveStream</tt>s known to this instance to be contributing * audio to the mix produced by its associated <tt>AudioMixer</tt>. * * @param receiveStream the <tt>ReceiveStream</tt> to be removed from * the list of <tt>ReceiveStream</tt>s known to this instance to be * contributing audio to the mix produced by its associated * <tt>AudioMixer</tt> */ @Override public void removeReceiveStream(ReceiveStream receiveStream) { long ssrc = 0xFFFFFFFFL & receiveStream.getSSRC(); removeSSRC(ssrc); //make sure we no longer cache levels for that stream. audioLevelCache.removeLevel(ssrc); } }
= receiveStream.getDataSource();
int receiveSSRC = (int) receiveStream.getSSRC();
DataSource dataSource = receiveStream.getDataSource();
removeSSRC(0xFFFFFFFFL & receiveStream.getSSRC()); if (playback.dataSource != null) removePlaybackDataSource(playback.dataSource);
= receiveStream.getDataSource();