tor-browser

The Tor Browser
git clone https://git.dasho.dev/tor-browser.git
Log | Files | Refs | README | LICENSE

video_rtp_depacketizer_vp8.h (1502B)


      1 /*
      2 *  Copyright (c) 2019 The WebRTC project authors. All Rights Reserved.
      3 *
      4 *  Use of this source code is governed by a BSD-style license
      5 *  that can be found in the LICENSE file in the root of the source
      6 *  tree. An additional intellectual property rights grant can be found
      7 *  in the file PATENTS.  All contributing project authors may
      8 *  be found in the AUTHORS file in the root of the source tree.
      9 */
     10 
     11 #ifndef MODULES_RTP_RTCP_SOURCE_VIDEO_RTP_DEPACKETIZER_VP8_H_
     12 #define MODULES_RTP_RTCP_SOURCE_VIDEO_RTP_DEPACKETIZER_VP8_H_
     13 
     14 #include <cstdint>
     15 #include <optional>
     16 
     17 #include "api/array_view.h"
     18 #include "modules/rtp_rtcp/source/rtp_video_header.h"
     19 #include "modules/rtp_rtcp/source/video_rtp_depacketizer.h"
     20 #include "rtc_base/copy_on_write_buffer.h"
     21 
     22 namespace webrtc {
     23 
     24 class VideoRtpDepacketizerVp8 : public VideoRtpDepacketizer {
     25 public:
     26  VideoRtpDepacketizerVp8() = default;
     27  VideoRtpDepacketizerVp8(const VideoRtpDepacketizerVp8&) = delete;
     28  VideoRtpDepacketizerVp8& operator=(const VideoRtpDepacketizerVp8&) = delete;
     29  ~VideoRtpDepacketizerVp8() override = default;
     30 
     31  // Parses vp8 rtp payload descriptor.
     32  // Returns zero on error or vp8 payload header offset on success.
     33  static int ParseRtpPayload(ArrayView<const uint8_t> rtp_payload,
     34                             RTPVideoHeader* video_header);
     35 
     36  std::optional<ParsedRtpPayload> Parse(CopyOnWriteBuffer rtp_payload) override;
     37 };
     38 
     39 }  // namespace webrtc
     40 
     41 #endif  // MODULES_RTP_RTCP_SOURCE_VIDEO_RTP_DEPACKETIZER_VP8_H_