#ifndef _MJPEG_ENCODER_H
#define _MJPEG_ENCODER_H 1
-#include "defs.h"
#include "shared/ffmpeg_raii.h"
+#include "shared/ff_maybe_const.h"
#include "shared/httpd.h"
#include "shared/va_resource_pool.h"
#include "ref_counted_frame.h"
#include <atomic>
#include <bmusb/bmusb.h>
#include <condition_variable>
-#include <list>
+#include <map>
+#include <memory>
#include <mutex>
#include <queue>
+#include <stddef.h>
#include <stdint.h>
#include <string>
#include <thread>
+#include <vector>
#include <movit/effect.h>
#include <va/va.h>
+#include <va/va_enc_jpeg.h>
struct jpeg_compress_struct;
struct VADisplayWithCleanup;
HTTPD::StreamID stream_id;
};
std::map<HTTPD::StreamID, WritePacket2Context> ffmpeg_contexts; // Statically set up, so we never need to worry about dangling pointers.
- static int write_packet2_thunk(void *opaque, uint8_t *buf, int buf_size, AVIODataMarkerType type, int64_t time);
- int write_packet2(HTTPD::StreamID stream_id, uint8_t *buf, int buf_size, AVIODataMarkerType type, int64_t time);
+ static int write_packet2_thunk(void *opaque, FF_MAYBE_CONST uint8_t *buf, int buf_size, AVIODataMarkerType type, int64_t time);
+ int write_packet2(HTTPD::StreamID stream_id, FF_MAYBE_CONST uint8_t *buf, int buf_size, AVIODataMarkerType type, int64_t time);
std::thread encoder_thread, va_receiver_thread;