Compile for Multicasting
This commit is contained in:
+29
-2
@@ -6,14 +6,37 @@
|
||||
#define SUNSHINE_VIDEO_H
|
||||
|
||||
#include "thread_safe.h"
|
||||
#include "platform/common.h"
|
||||
|
||||
extern "C" {
|
||||
#include <libavcodec/avcodec.h>
|
||||
}
|
||||
|
||||
struct AVPacket;
|
||||
namespace video {
|
||||
void free_packet(AVPacket *packet);
|
||||
|
||||
using packet_t = util::safe_ptr<AVPacket, free_packet>;
|
||||
struct packet_raw_t : public AVPacket {
|
||||
template<class P>
|
||||
explicit packet_raw_t(P *user_data) : channel_data { user_data } {
|
||||
av_init_packet(this);
|
||||
}
|
||||
|
||||
explicit packet_raw_t(std::nullptr_t null) : channel_data { nullptr } {
|
||||
av_init_packet(this);
|
||||
}
|
||||
|
||||
~packet_raw_t() {
|
||||
av_packet_unref(this);
|
||||
}
|
||||
|
||||
void *channel_data;
|
||||
};
|
||||
|
||||
using packet_t = std::unique_ptr<packet_raw_t>;
|
||||
using packet_queue_t = std::shared_ptr<safe::queue_t<packet_t>>;
|
||||
using idr_event_t = std::shared_ptr<safe::event_t<std::pair<int64_t, int64_t>>>;
|
||||
using img_event_t = std::shared_ptr<safe::event_t<std::shared_ptr<platf::img_t>>>;
|
||||
|
||||
struct config_t {
|
||||
int width;
|
||||
@@ -27,7 +50,11 @@ struct config_t {
|
||||
int dynamicRange;
|
||||
};
|
||||
|
||||
void capture_display(packet_queue_t packets, idr_event_t idr_events, config_t config);
|
||||
void capture(
|
||||
packet_queue_t packets,
|
||||
idr_event_t idr_events,
|
||||
config_t config,
|
||||
void *channel_data);
|
||||
}
|
||||
|
||||
#endif //SUNSHINE_VIDEO_H
|
||||
|
||||
Reference in New Issue
Block a user