| 1171 | } |
| 1172 | |
| 1173 | void cmd_play(rtsp_server_t *server, tcp::socket &sock, launch_session_t &session, msg_t &&req) { |
| 1174 | OPTION_ITEM option {}; |
| 1175 | |
| 1176 | // I know these string literals will not be modified |
| 1177 | option.option = const_cast<char *>("CSeq"); |
| 1178 | |
| 1179 | auto seqn_str = std::to_string(req->sequenceNumber); |
| 1180 | option.content = const_cast<char *>(seqn_str.c_str()); |
| 1181 | |
| 1182 | respond(sock, session, &option, 200, "OK", req->sequenceNumber, {}); |
| 1183 | } |
| 1184 | |
| 1185 | void start() { |
| 1186 | auto shutdown_event = mail::man->event<bool>(mail::shutdown); |