VideoToolBox decoder/encoder for MacOS & iOS (#19)
* VideoDecoderFactory wrapper * wip * fix compilation * add notes * upgrade webrtc version
This commit is contained in:
@@ -0,0 +1,15 @@
|
||||
#ifndef OBJC_VIDEO_FACTORY_H
|
||||
#define OBJC_VIDEO_FACTORY_H
|
||||
|
||||
#include <memory>
|
||||
#include "api/video_codecs/video_decoder_factory.h"
|
||||
#include "api/video_codecs/video_encoder_factory.h"
|
||||
|
||||
namespace livekit {
|
||||
|
||||
std::unique_ptr<webrtc::VideoEncoderFactory> CreateObjCVideoEncoderFactory();
|
||||
std::unique_ptr<webrtc::VideoDecoderFactory> CreateObjCVideoDecoderFactory();
|
||||
|
||||
} // namespace livekit
|
||||
|
||||
#endif // OBJC_VIDEO_FACTORY_H
|
||||
@@ -0,0 +1,22 @@
|
||||
#ifndef VIDEO_DECODER_FACTORY_H
|
||||
#define VIDEO_DECODER_FACTORY_H
|
||||
|
||||
#include "api/video_codecs/video_decoder_factory.h"
|
||||
#include "api/video_codecs/video_decoder.h"
|
||||
|
||||
namespace livekit {
|
||||
class VideoDecoderFactory : public webrtc::VideoDecoderFactory {
|
||||
public:
|
||||
VideoDecoderFactory();
|
||||
|
||||
std::vector<webrtc::SdpVideoFormat> GetSupportedFormats() const override;
|
||||
|
||||
std::unique_ptr<webrtc::VideoDecoder> CreateVideoDecoder(
|
||||
const webrtc::SdpVideoFormat& format) override;
|
||||
|
||||
private:
|
||||
std::vector<std::unique_ptr<webrtc::VideoDecoderFactory>> factories_;
|
||||
};
|
||||
} // namespace livekit
|
||||
|
||||
#endif // VIDEO_DECODER_FACTORY_H
|
||||
@@ -0,0 +1,22 @@
|
||||
#ifndef VIDEO_ENCODER_FACTORY_H
|
||||
#define VIDEO_ENCODER_FACTORY_H
|
||||
|
||||
#include "api/video_codecs/video_encoder_factory.h"
|
||||
#include "api/video_codecs/video_encoder.h"
|
||||
|
||||
namespace livekit {
|
||||
class VideoEncoderFactory : public webrtc::VideoEncoderFactory {
|
||||
public:
|
||||
VideoEncoderFactory();
|
||||
|
||||
std::vector<webrtc::SdpVideoFormat> GetSupportedFormats() const override;
|
||||
|
||||
std::unique_ptr<webrtc::VideoEncoder> CreateVideoEncoder(
|
||||
const webrtc::SdpVideoFormat& format) override;
|
||||
|
||||
private:
|
||||
std::vector<std::unique_ptr<webrtc::VideoEncoderFactory>> factories_;
|
||||
};
|
||||
} // namespace livekit
|
||||
|
||||
#endif // VIDEO_ENCODER_FACTORY_H
|
||||
Reference in New Issue
Block a user