本文整理汇总了C++中StreamState::mediaSource方法的典型用法代码示例。如果您正苦于以下问题:C++ StreamState::mediaSource方法的具体用法?C++ StreamState::mediaSource怎么用?C++ StreamState::mediaSource使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类StreamState
的用法示例。
在下文中一共展示了StreamState::mediaSource方法的7个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。
示例1: seekStream
void OnDemandServerMediaSubsession::seekStream(unsigned /*clientSessionId*/,
void* streamToken, char*& absStart, char*& absEnd) {
// Seeking isn't allowed if multiple clients are receiving data from the same source:
if (fReuseFirstSource) return;
StreamState* streamState = (StreamState*)streamToken;
if (streamState != NULL && streamState->mediaSource() != NULL) {
seekStreamSource(streamState->mediaSource(), absStart, absEnd);
}
}
开发者ID:Michael-Lfx,项目名称:Android-RTP-RTSP-Library-Porting,代码行数:10,代码来源:OnDemandServerMediaSubsession.cpp
示例2: setStreamScale
void OnDemandServerMediaSubsession::setStreamScale(unsigned /*clientSessionId*/,
void* streamToken, float scale) {
// Changing the scale factor isn't allowed if multiple clients are receiving data
// from the same source:
if (fReuseFirstSource) return;
StreamState* streamState = (StreamState*)streamToken;
if (streamState != NULL && streamState->mediaSource() != NULL) {
setStreamSourceScale(streamState->mediaSource(), scale);
}
}
示例3: seekStream
void EncoderMediaSubsession::seekStream(unsigned /*clientSessionId*/,
void* streamToken, double seekNPT) {
// Seeking isn't allowed if multiple clients are receiving data from
// the same source:
if (fReuseFirstSource) return;
StreamState* streamState = (StreamState*)streamToken;
if (streamState != NULL && streamState->mediaSource() != NULL) {
seekStreamSource(streamState->mediaSource(), seekNPT);
}
}
示例4: seekStream
void OnDemandServerMediaSubsession::seekStream(unsigned /*clientSessionId*/,
void* streamToken, double& seekNPT, double streamDuration, u_int64_t& numBytes) {
numBytes = 0; // by default: unknown
// Seeking isn't allowed if multiple clients are receiving data from
// the same source:
if (fReuseFirstSource) return;
StreamState* streamState = (StreamState*)streamToken;
if (streamState != NULL && streamState->mediaSource() != NULL) {
seekStreamSource(streamState->mediaSource(), seekNPT, streamDuration, numBytes);
}
}
示例5: nullSeekStream
void OnDemandServerMediaSubsession::nullSeekStream(unsigned /*clientSessionId*/, void* streamToken,
double streamEndTime, u_int64_t& numBytes) {
numBytes = 0; // by default: unknown
StreamState* streamState = (StreamState*)streamToken;
if (streamState != NULL && streamState->mediaSource() != NULL) {
// Because we're not seeking here, get the current NPT, and remember it as the new 'start' NPT:
streamState->startNPT() = getCurrentNPT(streamToken);
double duration = streamEndTime - streamState->startNPT();
if (duration < 0.0) duration = 0.0;
setStreamSourceDuration(streamState->mediaSource(), duration, numBytes);
RTPSink* rtpSink = streamState->rtpSink(); // alias
if (rtpSink != NULL) rtpSink->resetPresentationTimes();
}
}
示例6: getStreamSource
FramedSource* OnDemandServerMediaSubsession::getStreamSource(void* streamToken) {
if (streamToken == NULL) return NULL;
liveLogInfo(" OnDemandServerMediaSubsession::getStreamSource 337 337 337 \n");
StreamState* streamState = (StreamState*)streamToken;
return streamState->mediaSource();
}
示例7: nullSeekStream
void OnDemandServerMediaSubsession::nullSeekStream(unsigned /*clientSessionId*/, void* streamToken) {
StreamState* streamState = (StreamState*)streamToken;
if (streamState != NULL && streamState->mediaSource() != NULL) {
// Because we're not seeking here, get the current NPT, and remember it as the new 'start' NPT:
streamState->startNPT() = getCurrentNPT(streamToken);
RTPSink* rtpSink = streamState->rtpSink(); // alias
if (rtpSink != NULL) rtpSink->resetPresentationTimes();
}
}
开发者ID:Michael-Lfx,项目名称:Android-RTP-RTSP-Library-Porting,代码行数:9,代码来源:OnDemandServerMediaSubsession.cpp