mirror of
https://github.com/outbackdingo/UltraGrid.git
synced 2026-03-20 06:40:03 +00:00
Rpi callbacks moved to rpi4_out.cpp
av_frame_wrapper_recycle() and av_frame_wrapper_copy() moved from header to rpi4_out.cpp.
This commit is contained in:
@@ -59,27 +59,6 @@ typedef struct av_frame_wrapper{
|
||||
struct AVFrame *av_frame;
|
||||
} av_frame_wrapper;
|
||||
|
||||
#ifdef HAVE_LAVC
|
||||
|
||||
#include "libavcodec_common.h"
|
||||
|
||||
static inline void av_frame_wrapper_recycle(struct video_frame *f){
|
||||
for(unsigned i = 0; i < f->tile_count; i++){
|
||||
av_frame_wrapper *wrapper = (av_frame_wrapper *)(void *) f->tiles[i].data;
|
||||
|
||||
av_frame_unref(wrapper->av_frame);
|
||||
}
|
||||
}
|
||||
|
||||
static inline void av_frame_wrapper_copy(struct video_frame *f){
|
||||
for(unsigned i = 0; i < f->tile_count; i++){
|
||||
av_frame_wrapper *wrapper = (av_frame_wrapper *)(void *) f->tiles[i].data;
|
||||
|
||||
wrapper->av_frame = av_frame_clone(wrapper->av_frame);
|
||||
}
|
||||
}
|
||||
#endif // HAVE_LAVC
|
||||
|
||||
#ifdef __cplusplus
|
||||
}
|
||||
#endif
|
||||
|
||||
@@ -443,6 +443,22 @@ static void frame_data_deleter(struct video_frame *buf){
|
||||
delete wrapper;
|
||||
}
|
||||
|
||||
static inline void av_frame_wrapper_recycle(struct video_frame *f){
|
||||
for(unsigned i = 0; i < f->tile_count; i++){
|
||||
av_frame_wrapper *wrapper = (av_frame_wrapper *)(void *) f->tiles[i].data;
|
||||
|
||||
av_frame_unref(wrapper->av_frame);
|
||||
}
|
||||
}
|
||||
|
||||
static inline void av_frame_wrapper_copy(struct video_frame *f){
|
||||
for(unsigned i = 0; i < f->tile_count; i++){
|
||||
av_frame_wrapper *wrapper = (av_frame_wrapper *)(void *) f->tiles[i].data;
|
||||
|
||||
wrapper->av_frame = av_frame_clone(wrapper->av_frame);
|
||||
}
|
||||
}
|
||||
|
||||
static struct video_frame *alloc_new_frame(rpi4_display_state *s){
|
||||
auto new_frame = vf_alloc_desc(s->current_desc);
|
||||
|
||||
|
||||
Reference in New Issue
Block a user