Roc Toolkit internal modules
Roc Toolkit: real-time audio streaming
Loading...
Searching...
No Matches
parser.h
Go to the documentation of this file.
1/*
2 * Copyright (c) 2022 Roc Streaming authors
3 *
4 * This Source Code Form is subject to the terms of the Mozilla Public
5 * License, v. 2.0. If a copy of the MPL was not distributed with this
6 * file, You can obtain one at http://mozilla.org/MPL/2.0/.
7 */
8
9//! @file roc_rtcp/parser.h
10//! @brief RTCP packet parser.
11
12#ifndef ROC_RTCP_PARSER_H_
13#define ROC_RTCP_PARSER_H_
14
16#include "roc_packet/iparser.h"
17
18namespace roc {
19namespace rtcp {
20
21//! RTCP packet parser.
22//!
23//! @remarks
24//! Unlike other parsers, this one just records the buffer into RTCP part of the packet
25//! and doesn't inspect the packet itself. The actual parsing is done later in
26//! rtcp::Communicator using rtcp::Traverser.
27class Parser : public packet::IParser, public core::NonCopyable<> {
28public:
29 //! Initialization.
31
32 //! Parse packet from buffer.
33 virtual bool parse(packet::Packet& packet, const core::Slice<uint8_t>& buffer);
34};
35
36} // namespace rtcp
37} // namespace roc
38
39#endif // ROC_RTCP_PARSER_H_
Base class for non-copyable objects.
Definition noncopyable.h:23
Shared ownership intrusive pointer.
Definition shared_ptr.h:32
Packet parser interface.
Definition iparser.h:22
RTCP packet parser.
Definition parser.h:27
Parser()
Initialization.
virtual bool parse(packet::Packet &packet, const core::Slice< uint8_t > &buffer)
Parse packet from buffer.
Packet parser interface.
Root namespace.
Non-copyable object.