SkyWay Linux SDK
読み取り中…
検索中…
一致する文字列を見つけられません
h264.hpp
1//
2// h264.hpp
3// skyway
4//
5// Created by sandabu on 2025/07/15.
6// Copyright © 2025 NTT DOCOMO BUSINESS, Inc. All rights reserved.
7//
8
9#ifndef SKYWAY_MEDIA_CODEC_H264_HPP_
10#define SKYWAY_MEDIA_CODEC_H264_HPP_
11
12#include "skyway/media/codec/video_codec.hpp"
13
14namespace skyway {
15namespace media {
16namespace codec {
17
18inline constexpr std::string_view kDefaultH264ProfileLevelId = "42e01f";
29struct H264 : public VideoCodec {
34 H264() : H264(std::string(kDefaultH264ProfileLevelId)) {}
39 H264(const std::string& profile_level_id) {
40 // clang-format off
41 parameters = {
42 // `1` is interleaved mode which is used in WebRTC.
43 { "packetization-mode", "1" },
44 // `1` is asymmetrical mode which is used in WebRTC.
45 { "level-asymmetry-allowed", "1" },
46 { "profile-level-id", profile_level_id }
47 };
48 // clang-format on
49 }
50 std::string Name() const override { return "H264"; }
51 std::map<std::string, std::string> Parameters() const override { return parameters; }
53 webrtc::VideoCodecType CodecType() const override { return webrtc::kVideoCodecH264; }
55private:
56 std::map<std::string, std::string> parameters;
57};
58
59} // namespace codec
60} // namespace media
61} // namespace skyway
62
63#endif /* SKYWAY_MEDIA_CODEC_H264_HPP_ */
H264コーデック
Definition h264.hpp:29
H264()
コンストラクタ
Definition h264.hpp:34
H264(const std::string &profile_level_id)
コンストラクタ
Definition h264.hpp:39
std::map< std::string, std::string > Parameters() const override
コーデックのパラメータ
Definition h264.hpp:51
std::string Name() const override
コーデック名
Definition h264.hpp:50
映像コーデック
Definition video_codec.hpp:32