mirror of
https://github.com/mii443/libdatachannel.git
synced 2025-08-23 15:48:03 +00:00
Cleaned up addVideoCodec
This commit is contained in:
@ -190,17 +190,21 @@ public:
|
||||
public:
|
||||
Audio(string mid = "audio", Direction dir = Direction::SendOnly);
|
||||
|
||||
void addAudioCodec(int payloadType, const string &codec);
|
||||
void addAudioCodec(int payloadType, const string &codec, const std::optional<std::string>& profile=
|
||||
"minptime=10; maxaveragebitrate=96000; stereo=1; sprop-stereo=1; useinbandfec=1");
|
||||
void addOpusCodec(int payloadType);
|
||||
|
||||
void addRTXCodec(unsigned int payloadType, unsigned int originalPayloadType, unsigned int clockRate);
|
||||
};
|
||||
|
||||
class RTC_CPP_EXPORT Video : public Media {
|
||||
public:
|
||||
Video(string mid = "video", Direction dir = Direction::SendOnly);
|
||||
|
||||
void addVideoCodec(int payloadType, const string &codec);
|
||||
// Use Constrained Baseline profile Level 4.2 (necessary for Firefox)
|
||||
// https://developer.mozilla.org/en-US/docs/Web/Media/Formats/WebRTC_codecs#Supported_video_codecs
|
||||
// TODO: Should be 42E0 but 42C0 appears to be more compatible. Investigate this.
|
||||
void addVideoCodec(int payloadType, const string &codec, const std::optional<std::string>&
|
||||
profile="profile-level-id=42e01f;packetization-mode=1;level-asymmetry-allowed=1");
|
||||
|
||||
void addH264Codec(int payloadType);
|
||||
void addVP8Codec(int payloadType);
|
||||
void addVP9Codec(int payloadType);
|
||||
|
Reference in New Issue
Block a user