mirror of
https://github.com/danog/libtgvoip.git
synced 2024-12-03 10:07:45 +01:00
30 lines
863 B
C
30 lines
863 B
C
|
//
|
||
|
// libtgvoip is free and unencumbered public domain software.
|
||
|
// For more information, see http://unlicense.org or the UNLICENSE file
|
||
|
// you should have received with this source code distribution.
|
||
|
//
|
||
|
|
||
|
#ifndef LIBTGVOIP_VIDEOTOOLBOXENCODERSOURCE
|
||
|
#define LIBTGVOIP_VIDEOTOOLBOXENCODERSOURCE
|
||
|
|
||
|
#include "../../video/VideoSource.h"
|
||
|
#include <CoreMedia/CoreMedia.h>
|
||
|
#include <VideoToolbox/VideoToolbox.h>
|
||
|
|
||
|
namespace tgvoip{
|
||
|
namespace video{
|
||
|
class VideoToolboxEncoderSource : public VideoSource{
|
||
|
public:
|
||
|
VideoToolboxEncoderSource();
|
||
|
virtual ~VideoToolboxEncoderSource();
|
||
|
virtual void Start() override;
|
||
|
virtual void Stop() override;
|
||
|
virtual void Reset(uint32_t codec, int maxResolution) override;
|
||
|
virtual void RequestKeyFrame() override;
|
||
|
void EncodeFrame(CMSampleBufferRef frame);
|
||
|
};
|
||
|
}
|
||
|
}
|
||
|
|
||
|
#endif /* LIBTGVOIP_VIDEOTOOLBOXENCODERSOURCE */
|