Example #1
0
File: source.cpp Project: 01org/wds
bool SourceImpl::Pause() {
  auto m5 = CreateM5(delegate_->GetNextCSeq(),
                     rtsp::TriggerMethod::PAUSE);

  if (!state_machine_->CanSend(m5.get()))
    return false;
  state_machine_->Send(std::move(m5));
  return true;
}
Example #2
0
File: source.cpp Project: 01org/wds
void SourceImpl::SendKeepAlive() {
  delegate_->ReleaseTimer(keep_alive_timer_);
  auto get_param = std::unique_ptr<Request>(
      new rtsp::GetParameter("rtsp://localhost/wfd1.0"));
  get_param->header().set_cseq(delegate_->GetNextCSeq());
  get_param->set_id(Request::M16);

  assert(state_machine_->CanSend(get_param.get()));
  state_machine_->Send(std::move(get_param));
  keep_alive_timer_ =
      delegate_->CreateTimer(kDefaultKeepAliveTimeout - kDefaultTimeoutValue);
  assert(keep_alive_timer_);
}