本文整理汇总了C++中MediaSubsession::rtcpIsMuxed方法的典型用法代码示例。如果您正苦于以下问题:C++ MediaSubsession::rtcpIsMuxed方法的具体用法?C++ MediaSubsession::rtcpIsMuxed怎么用?C++ MediaSubsession::rtcpIsMuxed使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类MediaSubsession
的用法示例。
在下文中一共展示了MediaSubsession::rtcpIsMuxed方法的1个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。
示例1: continueAfterDESCRIBE
void continueAfterDESCRIBE(RTSPClient*, int resultCode, char* resultString) {
ALOG(TX_LOG_INFO, TAG,"continueAfterDESCRIBE\n");
if (resultCode != 0) {
ALOG(TX_LOG_INFO, TAG,"Failed to get a SDP description for the URL %s, %s\n", streamURL, resultString);
*env << "Failed to get a SDP description for the URL \"" << streamURL << "\": " << resultString << "\n";
delete[] resultString;
shutdown();
}
char* sdpDescription = resultString;
*env << "Opened URL \"" << streamURL << "\", returning a SDP description:\n" << sdpDescription << "\n";
// Create a media session object from this SDP description:
session = MediaSession::createNew(*env, sdpDescription);
delete[] sdpDescription;
if (session == NULL) {
ALOG(TX_LOG_INFO, TAG, "Failed to create a MediaSession object from the SDP description:");
shutdown();
} else if (!session->hasSubsessions()) {
ALOG(TX_LOG_INFO, TAG, "This session has no media subsessions (i.e., no \"m=\" lines)\n");
shutdown();
}
// Then, setup the "RTPSource"s for the session:
MediaSubsessionIterator iter(*session);
MediaSubsession *subsession;
Boolean madeProgress = False;
char const* singleMediumToTest = singleMedium;
while ((subsession = iter.next()) != NULL) {
// If we've asked to receive only a single medium, then check this now:
if (singleMediumToTest != NULL) {
if (strcmp(subsession->mediumName(), singleMediumToTest) != 0) {
ALOG(TX_LOG_INFO, TAG, "Ignoring codecName = %s\n", subsession->codecName());
*env << "Ignoring \"" << subsession->mediumName()
<< "/" << subsession->codecName()
<< "\" subsession, because we've asked to receive a single " << singleMedium
<< " session only\n";
continue;
} else {
// Receive this subsession only
singleMediumToTest = "xxxxx";
// this hack ensures that we get only 1 subsession of this type
}
}
if (desiredPortNum != 0) {
subsession->setClientPortNum(desiredPortNum);
desiredPortNum += 2;
}
if (createReceivers) {
if (!subsession->initiate(simpleRTPoffsetArg)) {
ALOG(TX_LOG_INFO, TAG, "Unable to create receiver for\n");
*env << "Unable to create receiver for \"" << subsession->mediumName()
<< "/" << subsession->codecName()
<< "\" subsession: " << env->getResultMsg() << "\n";
} else {
ALOG(TX_LOG_INFO, TAG, "Created receiver\n");
*env << "Created receiver for \"" << subsession->mediumName()
<< "/" << subsession->codecName() << "\" subsession (";
if (subsession->rtcpIsMuxed()) {
ALOG(TX_LOG_INFO, TAG, "subsession->rtcpIsMuxed() client port = %d\n", subsession->clientPortNum());
*env << "client port " << subsession->clientPortNum();
} else {
ALOG(TX_LOG_INFO, TAG, "subsession->rtcpIsMuxed(),,,,else");
*env << "client ports " << subsession->clientPortNum()
<< "-" << subsession->clientPortNum()+1;
}
*env << ")\n";
madeProgress = True;
if (subsession->rtpSource() != NULL) {
unsigned const thresh = 1000000; // 1 second
subsession->rtpSource()->setPacketReorderingThresholdTime(thresh);
int socketNum = subsession->rtpSource()->RTPgs()->socketNum();
unsigned curBufferSize = getReceiveBufferSize(*env, socketNum);
if (socketInputBufferSize > 0 || fileSinkBufferSize > curBufferSize) {
unsigned newBufferSize = socketInputBufferSize > 0 ? socketInputBufferSize : fileSinkBufferSize;
newBufferSize = setReceiveBufferTo(*env, socketNum, newBufferSize);
if (socketInputBufferSize > 0) {
ALOG(TX_LOG_INFO, TAG, "socketInputBufferSize > 0 Changed socket receive buffer size for the\n");
*env << "Changed socket receive buffer size for the \""
<< subsession->mediumName()
<< "/" << subsession->codecName()
<< "\" subsession from "
<< curBufferSize << " to "
<< newBufferSize << " bytes\n";
}
}
}
}
} else {
ALOG(TX_LOG_INFO, TAG, "socketInputBufferSize > 0=====else\n");
if (subsession->clientPortNum() == 0) {
*env << "No client port was specified for the \""
<< subsession->mediumName()
<< "/" << subsession->codecName()
<< "\" subsession. (Try adding the \"-p <portNum>\" option.)\n";
} else {
//.........这里部分代码省略.........