Use VecDeque in recorder

The packets queued for recording were wrapped in a dynamically allocated
structure with a "next" field.

To avoid this additional layer of allocation and indirection, use a
VecDeque.
This commit is contained in:
Romain Vimont
2023-03-01 21:42:51 +01:00
parent 33df484912
commit efc15744da
2 changed files with 84 additions and 94 deletions

View File

@@ -9,15 +9,10 @@
#include "coords.h"
#include "options.h"
#include "trait/packet_sink.h"
#include "util/queue.h"
#include "util/thread.h"
#include "util/vecdeque.h"
struct sc_record_packet {
AVPacket *packet;
struct sc_record_packet *next;
};
struct sc_recorder_queue SC_QUEUE(struct sc_record_packet);
struct sc_recorder_queue SC_VECDEQUE(AVPacket *);
struct sc_recorder {
struct sc_packet_sink video_packet_sink;