Skip to content

Commit

Permalink
Really add SILK support
Browse files Browse the repository at this point in the history
  • Loading branch information
ibc committed Mar 11, 2017
1 parent a92b34a commit 896e9c6
Showing 1 changed file with 31 additions and 8 deletions.
39 changes: 31 additions & 8 deletions worker/include/RTC/RtpDictionaries.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -59,6 +59,7 @@ namespace RTC
ISAC,
G722,
ILBC,
SILK,
// Video codecs:
VP8 = 200,
VP9,
Expand Down Expand Up @@ -123,6 +124,26 @@ namespace RTC
std::string name;
};

class RtpHeaderExtensionUri
{
public:
enum class Type : uint8_t
{
UNKNOWN = 0,
SSRC_AUDIO_LEVEL = 1,
TO_OFFSET = 2,
ABS_SEND_TIME = 3,
VIDEO_ORIENTATION = 4,
RTP_STREAM_ID = 5
};

private:
static std::unordered_map<std::string, Type> string2Type;

public:
static Type GetType(std::string& uri);
};

class RtcpFeedback
{
public:
Expand Down Expand Up @@ -172,10 +193,11 @@ namespace RTC
Json::Value toJson();

public:
Media::Kind kind = Media::Kind::ALL;
std::string uri;
uint16_t preferredId = 0;
bool preferredEncrypt = false;
Media::Kind kind = Media::Kind::ALL;
std::string uri;
RtpHeaderExtensionUri::Type type;
uint16_t preferredId = 0;
bool preferredEncrypt = false;
};

class RtpCapabilities
Expand Down Expand Up @@ -254,10 +276,11 @@ namespace RTC
Json::Value toJson();

public:
std::string uri;
uint16_t id = 0;
bool encrypt = false;
RTC::Parameters parameters;
std::string uri;
RtpHeaderExtensionUri::Type type;
uint16_t id = 0;
bool encrypt = false;
RTC::Parameters parameters;
};

class RtcpParameters
Expand Down

0 comments on commit 896e9c6

Please sign in to comment.