本文整理汇总了C++中StreamState::startPlaying方法的典型用法代码示例。如果您正苦于以下问题:C++ StreamState::startPlaying方法的具体用法?C++ StreamState::startPlaying怎么用?C++ StreamState::startPlaying使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类StreamState
的用法示例。
在下文中一共展示了StreamState::startPlaying方法的5个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。
示例1: startStream
void OnDemandServerMediaSubsession::startStream(unsigned clientSessionId,
void* streamToken,
TaskFunc* rtcpRRHandler,
void* rtcpRRHandlerClientData,
unsigned short& rtpSeqNum,
unsigned& rtpTimestamp,
ServerRequestAlternativeByteHandler* serverRequestAlternativeByteHandler,
void* serverRequestAlternativeByteHandlerClientData) {
StreamState* streamState = (StreamState*)streamToken;
/* :TODO:2014/9/12 13:59:55:Sean: */
printf("startStream\n");
/* :TODO:End--- */
Destinations* destinations
= (Destinations*)(fDestinationsHashTable->Lookup((char const*)clientSessionId));
if (streamState != NULL) {
streamState->startPlaying(destinations,
rtcpRRHandler, rtcpRRHandlerClientData,
serverRequestAlternativeByteHandler, serverRequestAlternativeByteHandlerClientData);
RTPSink* rtpSink = streamState->rtpSink(); // alias
if (rtpSink != NULL) {
rtpSeqNum = rtpSink->currentSeqNo();
rtpTimestamp = rtpSink->presetNextTimestamp();
}
}
}
示例2: startStream
void EncoderMediaSubsession::startStream(unsigned clientSessionId,
void* streamToken,
TaskFunc* rtcpRRHandler,
void* rtcpRRHandlerClientData,
unsigned short& rtpSeqNum,
unsigned& rtpTimestamp,
ServerRequestAlternativeByteHandler* serverRequestAlternativeByteHandler,
void* serverRequestAlternativeByteHandlerClientData,
void* videofp,
unsigned int fMagic,
Boolean isResponse) {
struct timeval tv;
// struct timezone tz;
unsigned int t_time = 0;
Debug(ckite_log_message, "startStream %x\n", (int)this);
StreamState* streamState = (StreamState*)streamToken;
Destinations* destinations
= (Destinations*)(fDestinationsHashTable->Lookup((char const*)clientSessionId));
if (streamState != NULL) {
if( gettimeofday(&tv, NULL) == 0 )
{
if (!fIsAudio)
{
t_time = tv.tv_sec * 1000 + tv.tv_usec/1000;
Debug(ckite_log_message, "pauseStream sec time is of %d\n", tv.tv_sec);
Debug(ckite_log_message, "pauseStream usec time is of %d\n", tv.tv_usec);
Debug(ckite_log_message, "startStream fMediaSource = %x\n", fMediaSource);
((EncoderVideoSource*)fMediaSource)->setPlayTime(t_time);
}
}
if(isResponse)
{
if(!fIsAudio)
{
if(videofp != NULL)
((EncoderVideoSource*)fMediaSource)->setPlayFile((FILE *)videofp);
if (fMagic != 0xffffffff)
streamState->rtpSink()->setMagic((unsigned char)fMagic);
if (fChannel > 0)
((EncoderVideoSource*)fMediaSource)->setChannelNumber(fChannel);
}
streamState->startPlaying(destinations,
rtcpRRHandler, rtcpRRHandlerClientData,
serverRequestAlternativeByteHandler, serverRequestAlternativeByteHandlerClientData);
}
if (streamState->rtpSink() != NULL) {
rtpSeqNum = streamState->rtpSink()->currentSeqNo();
rtpTimestamp = streamState->rtpSink()->presetNextTimestamp();
}
}
}
示例3: startStream
void OnDemandServerMediaSubsession::startStream(unsigned clientSessionId,
void* streamToken,
TaskFunc* rtcpRRHandler,
void* rtcpRRHandlerClientData,
unsigned short& rtpSeqNum,
unsigned& rtpTimestamp) {
StreamState* streamState = (StreamState*)streamToken;
Destinations* destinations
= (Destinations*)(fDestinationsHashTable->Lookup((char const*)clientSessionId));
if (streamState != NULL) {
DEBUG_LOG(INF, "StartPlaying to %s", inet_ntoa(destinations->addr));
streamState->startPlaying(destinations,
rtcpRRHandler, rtcpRRHandlerClientData);
DEBUG_LOG(INF, "StartPlaying to %s end", inet_ntoa(destinations->addr));
if (streamState->rtpSink() != NULL) {
rtpSeqNum = streamState->rtpSink()->currentSeqNo();
rtpTimestamp = streamState->rtpSink()->presetNextTimestamp();
}
}
}
示例4: startStream
void OnDemandServerMediaSubsession::startStream(unsigned clientSessionId,
void* streamToken,
TaskFunc* rtcpRRHandler,
void* rtcpRRHandlerClientData,
unsigned short& rtpSeqNum,
unsigned& rtpTimestamp,
ServerRequestAlternativeByteHandler* serverRequestAlternativeByteHandler,
void* serverRequestAlternativeByteHandlerClientData) {
StreamState* streamState = (StreamState*)streamToken;
Destinations* destinations
= (Destinations*)(fDestinationsHashTable->Lookup((char const*)clientSessionId));
if (streamState != NULL) {
streamState->startPlaying(destinations,
rtcpRRHandler, rtcpRRHandlerClientData,
serverRequestAlternativeByteHandler, serverRequestAlternativeByteHandlerClientData);
if (streamState->rtpSink() != NULL) {
rtpSeqNum = streamState->rtpSink()->currentSeqNo();
rtpTimestamp = streamState->rtpSink()->presetNextTimestamp();
}
}
}
示例5: startStream
void OnDemandServerMediaSubsession::startStream(unsigned clientSessionId,
void* streamToken,
TaskFunc* rtcpRRHandler,
void* rtcpRRHandlerClientData,
unsigned short& rtpSeqNum,
unsigned& rtpTimestamp) {
StreamState* streamState = (StreamState*)streamToken;
printf("startStream\n");
Destinations* destinations
= (Destinations*)(fDestinationsHashTable->Lookup((char const*)clientSessionId));
if (streamState != NULL) {
if (streamState->rtpSink() != NULL) {
rtpSeqNum = streamState->rtpSink()->currentSeqNo();
if (streamState->isPlaying())
rtpTimestamp = streamState->rtpSink()->currentTimeStamp();
else
rtpTimestamp = streamState->rtpSink()->presetNextTimestamp();
}
}
streamState->startPlaying(destinations,
rtcpRRHandler, rtcpRRHandlerClientData);
}