diff --git a/inc/VideoDecoderFactory.h b/inc/VideoDecoderFactory.h index bf29ea90..e0a6b81d 100644 --- a/inc/VideoDecoderFactory.h +++ b/inc/VideoDecoderFactory.h @@ -14,7 +14,9 @@ class VideoDecoderFactory : public webrtc::VideoDecoderFactory { public: - VideoDecoderFactory(): supported_formats_({webrtc::SdpVideoFormat(cricket::kH264CodecName),webrtc::SdpVideoFormat("H265")}) {} + VideoDecoderFactory(): supported_formats_(webrtc::SupportedH264Codecs()) { + supported_formats_.push_back(webrtc::SdpVideoFormat(cricket::kH265CodecName)); + } virtual ~VideoDecoderFactory() override {} std::unique_ptr CreateVideoDecoder(const webrtc::SdpVideoFormat& format) override { diff --git a/inc/VideoEncoderFactory.h b/inc/VideoEncoderFactory.h index a78ec659..8d7e299d 100644 --- a/inc/VideoEncoderFactory.h +++ b/inc/VideoEncoderFactory.h @@ -17,7 +17,9 @@ class VideoEncoderFactory : public webrtc::VideoEncoderFactory { public: - VideoEncoderFactory(): supported_formats_({webrtc::SdpVideoFormat(cricket::kH264CodecName),webrtc::SdpVideoFormat("H265")}) {} + VideoEncoderFactory(): supported_formats_(webrtc::SupportedH264Codecs()) { + supported_formats_.push_back(webrtc::SdpVideoFormat(cricket::kH265CodecName)); + } virtual ~VideoEncoderFactory() override {} std::unique_ptr CreateVideoEncoder(const webrtc::SdpVideoFormat& format) override { diff --git a/src/PeerConnectionManager.cpp b/src/PeerConnectionManager.cpp index d4f6b9f7..df58d449 100755 --- a/src/PeerConnectionManager.cpp +++ b/src/PeerConnectionManager.cpp @@ -401,7 +401,7 @@ std::tuple,Json::Value> PeerConnectionMan } else { std::string offersdp(in.asString()); - RTC_LOG(LS_ERROR) << "offer:" << offersdp; + RTC_LOG(LS_WARNING) << "offer:" << offersdp; std::unique_ptr desc = this->getAnswer(peerid, offersdp, videourl, audiourl, options, true); if (desc.get()) { desc->ToString(&answersdp); @@ -413,7 +413,7 @@ std::tuple,Json::Value> PeerConnectionMan } else { RTC_LOG(LS_ERROR) << "Failed to create answer - no SDP"; } - RTC_LOG(LS_INFO) << "anwser:" << answersdp; + RTC_LOG(LS_WARNING) << "anwser:" << answersdp; } return std::make_tuple(httpcode, headers, answersdp);