idr event

This commit is contained in:
pigeatgarlic 2024-04-13 15:09:59 +07:00
parent 78ba877fc2
commit 5e5402685b
3 changed files with 4 additions and 3 deletions

View File

@ -1,5 +1,5 @@
#define QUEUE_SIZE 256
#define PACKET_SIZE 32 * 1024
#define QUEUE_SIZE 32
#define PACKET_SIZE 64 * 1024
enum QueueType {
Video0,

View File

@ -77,6 +77,5 @@ peek_event(Queue* memory, EventType type){
Event
pop_event(Queue* queue, EventType type){
queue->events[type].read = true;
BOOST_LOG(info) << "Receive event " << type;
return queue->events[type];
}

View File

@ -1825,6 +1825,7 @@ namespace video {
}
if (idr_events->peek()) {
BOOST_LOG(info) << "idr frame"sv;
requested_idr_frame = true;
idr_events->pop();
}
@ -2064,6 +2065,7 @@ namespace video {
}
if (ctx->idr_events->peek()) {
BOOST_LOG(info) << "idr frame"sv;
pos->session->request_idr_frame();
ctx->idr_events->pop();
}