2019-12-03 19:23:33 +00:00
|
|
|
//
|
|
|
|
// Created by loki on 6/9/19.
|
|
|
|
//
|
|
|
|
|
|
|
|
#ifndef SUNSHINE_VIDEO_H
|
|
|
|
#define SUNSHINE_VIDEO_H
|
|
|
|
|
2019-12-11 18:06:52 +00:00
|
|
|
#include "thread_safe.h"
|
2019-12-03 19:23:33 +00:00
|
|
|
|
|
|
|
struct AVPacket;
|
|
|
|
namespace video {
|
|
|
|
void free_packet(AVPacket *packet);
|
|
|
|
|
2019-12-08 20:16:02 +00:00
|
|
|
using packet_t = util::safe_ptr<AVPacket, free_packet>;
|
|
|
|
using packet_queue_t = std::shared_ptr<safe::queue_t<packet_t>>;
|
2019-12-11 18:06:52 +00:00
|
|
|
using idr_event_t = std::shared_ptr<safe::event_t<std::pair<int64_t, int64_t>>>;
|
2019-12-03 19:23:33 +00:00
|
|
|
|
|
|
|
struct config_t {
|
|
|
|
int width;
|
|
|
|
int height;
|
|
|
|
int framerate;
|
|
|
|
int bitrate;
|
|
|
|
int slicesPerFrame;
|
|
|
|
};
|
|
|
|
|
2019-12-11 18:06:52 +00:00
|
|
|
void capture_display(packet_queue_t packets, idr_event_t idr_events, config_t config);
|
2019-12-03 19:23:33 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
#endif //SUNSHINE_VIDEO_H
|