本文整理汇总了Java中javax.media.rtp.ReceiveStream类的典型用法代码示例。如果您正苦于以下问题:Java ReceiveStream类的具体用法?Java ReceiveStream怎么用?Java ReceiveStream使用的例子?那么恭喜您, 这里精选的类代码示例或许可以为您提供帮助。
ReceiveStream类属于javax.media.rtp包,在下文中一共展示了ReceiveStream类的6个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于我们的系统推荐出更棒的Java代码示例。
示例1: find
import javax.media.rtp.ReceiveStream; //导入依赖的package包/类
PlayerWindow find(ReceiveStream strm) {
for (int i = 0; i < playerWindows.size(); i++) {
PlayerWindow pw = (PlayerWindow)playerWindows.elementAt(i);
if (pw.stream == strm)
return pw;
}
return null;
}
开发者ID:champtar,项目名称:fmj-sourceforge-mirror,代码行数:9,代码来源:AVCustomRecv.java
示例2: updateQuietStatusIfRequired
import javax.media.rtp.ReceiveStream; //导入依赖的package包/类
private void updateQuietStatusIfRequired(SSRCInfo ssrcinfo)
{
if (ssrcinfo.quiet)
{
ssrcinfo.quiet = false;
ActiveReceiveStreamEvent activereceivestreamevent = null;
if (ssrcinfo instanceof ReceiveStream)
activereceivestreamevent = new ActiveReceiveStreamEvent(
cache.sm, ssrcinfo.sourceInfo, (ReceiveStream) ssrcinfo);
else
activereceivestreamevent = new ActiveReceiveStreamEvent(
cache.sm, ssrcinfo.sourceInfo, null);
cache.eventhandler.postEvent(activereceivestreamevent);
}
}
开发者ID:Metaswitch,项目名称:fmj,代码行数:16,代码来源:RTPReceiver.java
示例3: fireNewReceiveStreamEventIfRequired
import javax.media.rtp.ReceiveStream; //导入依赖的package包/类
private void fireNewReceiveStreamEventIfRequired(SSRCInfo ssrcinfo)
{
if (ssrcinfo.newrecvstream)
{
NewReceiveStreamEvent newreceivestreamevent = new NewReceiveStreamEvent(
cache.sm, (ReceiveStream) ssrcinfo);
ssrcinfo.newrecvstream = false;
Log.info("Posting NewReceivedStreamEvent for stream " + ssrcinfo.hashCode());
cache.eventhandler.postEvent(newreceivestreamevent);
}
}
开发者ID:Metaswitch,项目名称:fmj,代码行数:12,代码来源:RTPReceiver.java
示例4: PlayerWindow
import javax.media.rtp.ReceiveStream; //导入依赖的package包/类
PlayerWindow(Player p, ReceiveStream strm) {
player = p;
stream = strm;
}
开发者ID:champtar,项目名称:fmj-sourceforge-mirror,代码行数:5,代码来源:AVCustomRecv.java
示例5: performMisMatchedPayloadCheck
import javax.media.rtp.ReceiveStream; //导入依赖的package包/类
/**
* Check whether the payload type of the current packet is different from
* the previous type on this SSRC. If it's changed, stop the data source
* and fire a <tt>RemotePayloadChangeEvent</tt> so that the
* <tt>MediaStream</tt> will reprogram the codec chain for the new codec.
*
* @param rtpPacket The current RTP packet to check
* @param ssrcinfo The existing SSRC info
*/
private void performMisMatchedPayloadCheck(RTPPacket rtpPacket,
SSRCInfo ssrcinfo)
{
if (ssrcinfo.lastPayloadType != -1 &&
ssrcinfo.lastPayloadType != rtpPacket.payloadType)
{
ssrcinfo.currentformat = null;
if (ssrcinfo.dsource != null)
{
RTPControlImpl rtpcontrolimpl = (RTPControlImpl) ssrcinfo.dsource
.getControl(controlName);
if (rtpcontrolimpl != null)
{
rtpcontrolimpl.currentformat = null;
rtpcontrolimpl.payload = -1;
}
try
{
StringBuffer buf = new StringBuffer("[");
for (PushBufferStream aStream : ssrcinfo.dsource.getStreams())
{
buf.append(aStream.hashCode());
buf.append(" ");
}
buf.append("]");
Log.warning("Stopping datasource " + ssrcinfo.dsource.hashCode() +
" (used by stream(s) " + buf.toString() +
")because of payload type mismatch: expecting pt=" +
ssrcinfo.lastPayloadType + ", got pt=" +
rtpPacket.payloadType);
ssrcinfo.dsource.stop();
}
catch (IOException ioexception)
{
Log.warning("Problem stopping DataSource after PT change " +
ioexception.getMessage());
}
}
ssrcinfo.lastPayloadType = rtpPacket.payloadType;
RemotePayloadChangeEvent remotepayloadchangeevent = new RemotePayloadChangeEvent(
cache.sm, (ReceiveStream) ssrcinfo,
ssrcinfo.lastPayloadType, rtpPacket.payloadType);
cache.eventhandler.postEvent(remotepayloadchangeevent);
}
}
开发者ID:Metaswitch,项目名称:fmj,代码行数:60,代码来源:RTPReceiver.java
示例6: update
import javax.media.rtp.ReceiveStream; //导入依赖的package包/类
public void update(ReceiveStreamEvent evt) {
ReceiveStream stream = evt.getReceiveStream();
BrokerFactory.getLoggingBroker().logDebug("Got RSE: "+evt);
try {
playerDataSource = stream.getDataSource();
if (player == null) {
player = Manager.createProcessor(playerDataSource);
player.configure();
while (player.getState() == Processor.Configuring) {
Thread.sleep(100);
}
TrackControl trackControl = null;
TrackControl[] trackControls = player.getTrackControls();
for (int i = 0; i < trackControls.length; i++) {
if (trackControls[i].getFormat() instanceof AudioFormat) {
trackControls[i].setFormat(new AudioFormat(AudioFormat.LINEAR, 8000, 8, 1,
AudioFormat.LITTLE_ENDIAN, AudioFormat.UNSIGNED));
}
}
player.realize();
while (player.getState() != Player.Realized) {
Thread.sleep(10);
}
DataSource out = player.getDataOutput();
BrokerFactory.getLoggingBroker().logDebug("content type="+out.getContentType());
silenceDS = new SilenceDataSink();
for (int i = 0; i < pickupListeners.size(); i++) {
silenceDS.addPickupListener((PickupListener)pickupListeners.elementAt(i));
}
for (int i = 0; i < silenceListeners.size(); i++) {
silenceDS.addSilenceListener((SilenceListener)silenceListeners.elementAt(i));
}
silenceDS.setSource(out);
silenceDS.addDataSinkListener(this);
silenceDS.start();
player.start();
}
} catch (Exception e) {
e.printStackTrace();
}
}
开发者ID:davidrudder23,项目名称:OpenNotification,代码行数:50,代码来源:SipCall.java
注:本文中的javax.media.rtp.ReceiveStream类示例整理自Github/MSDocs等源码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。 |
请发表评论