void MPEG2TransportFileServerMediaSubsession
::startStream(unsigned clientSessionId, void *streamToken, TaskFunc *rtcpRRHandler,
              void *rtcpRRHandlerClientData, unsigned short &rtpSeqNum,
              unsigned &rtpTimestamp,
              ServerRequestAlternativeByteHandler *serverRequestAlternativeByteHandler,
              void *serverRequestAlternativeByteHandlerClientData)
{
    if (fIndexFile != NULL)   // we support 'trick play'
    {
        ClientTrickPlayState *client = lookupClient(clientSessionId);
        if (client != NULL && client->areChangingScale())
        {
            // First, handle this like a "PAUSE", except that we back up to the previous VSH
            client->updateStateOnPlayChange(True);
            OnDemandServerMediaSubsession::pauseStream(clientSessionId, streamToken);

            // Then, adjust for the change of scale:
            client->updateStateOnScaleChange();
        }
    }

    // Call the original, default version of this routine:
    OnDemandServerMediaSubsession::startStream(clientSessionId, streamToken,
            rtcpRRHandler, rtcpRRHandlerClientData,
            rtpSeqNum, rtpTimestamp,
            serverRequestAlternativeByteHandler, serverRequestAlternativeByteHandlerClientData);
}
コード例 #2
0
void MPEG2TransportFileServerMediaSubsession
::pauseStream(unsigned clientSessionId, void* streamToken) {
  if (fIndexFile != NULL) { // we support 'trick play'
    ClientTrickPlayState* client = lookupClient(clientSessionId);
    if (client != NULL) {
      client->updateStateOnPlayChange(False);
    }
  }

  // Call the original, default version of this routine:
  OnDemandServerMediaSubsession::pauseStream(clientSessionId, streamToken);
}