当前位置: 首页>>代码示例>>C++>>正文


C++ StreamState::startPlaying方法代码示例

本文整理汇总了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();
    }
  }
}
开发者ID:houwentaoff,项目名称:live555,代码行数:25,代码来源:OnDemandServerMediaSubsession.cpp

示例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();
		}
	}
}
开发者ID:akaminnya,项目名称:openpernet,代码行数:54,代码来源:EncoderMediaSubsession.cpp

示例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();
    }
  }
}
开发者ID:eeharold,项目名称:livevideoserver,代码行数:20,代码来源:OnDemandServerMediaSubsession.cpp

示例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();
    }
  }
}
开发者ID:DayDayUpCQ,项目名称:live555,代码行数:21,代码来源:OnDemandServerMediaSubsession.cpp

示例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);
}
开发者ID:ShawnOfMisfit,项目名称:ambarella,代码行数:22,代码来源:OnDemandServerMediaSubsession.cpp


注:本文中的StreamState::startPlaying方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。