Nagram/TMessagesProj/jni/voip/tgcalls/CodecSelectHelper.h

36 lines
812 B
C
Raw Normal View History

2020-08-14 16:58:22 +00:00
#ifndef TGCALLS_CODEC_SELECT_HELPER_H
#define TGCALLS_CODEC_SELECT_HELPER_H
#include "Message.h"
#include "media/base/codec.h"
namespace tgcalls {
2020-08-21 23:59:49 +00:00
class PlatformContext;
2020-08-14 16:58:22 +00:00
struct CommonFormats {
std::vector<webrtc::SdpVideoFormat> list;
int myEncoderIndex = -1;
};
struct CommonCodecs {
std::vector<cricket::VideoCodec> list;
int myEncoderIndex = -1;
};
VideoFormatsMessage ComposeSupportedFormats(
std::vector<webrtc::SdpVideoFormat> encoders,
2020-08-15 21:06:36 +00:00
std::vector<webrtc::SdpVideoFormat> decoders,
2020-08-21 23:59:49 +00:00
const std::vector<std::string> &preferredCodecs,
std::shared_ptr<PlatformContext> platformContext);
2020-08-14 16:58:22 +00:00
CommonFormats ComputeCommonFormats(
const VideoFormatsMessage &my,
VideoFormatsMessage theirs);
CommonCodecs AssignPayloadTypesAndDefaultCodecs(CommonFormats &&formats);
} // namespace tgcalls
#endif