mirror of
https://github.com/outbackdingo/UltraGrid.git
synced 2026-03-22 01:40:28 +00:00
added magic to change_pixfmt and cf/vo_pp wrap.
This commit is contained in:
@@ -41,17 +41,22 @@
|
||||
#include "config_win32.h"
|
||||
#endif /* HAVE_CONFIG_H */
|
||||
|
||||
#include <stdint.h>
|
||||
|
||||
#include "capture_filter.h"
|
||||
#include "debug.h"
|
||||
#include "lib_common.h"
|
||||
#include "utils/color_out.h"
|
||||
#include "video.h"
|
||||
#include "video_codec.h"
|
||||
#include "utils/macros.h"
|
||||
#include "vo_postprocess/capture_filter_wrapper.h"
|
||||
|
||||
#define MAGIC to_fourcc('C', 'F', 'C', 'P')
|
||||
#define MOD_NAME "[change pixfmt cap. f.] "
|
||||
|
||||
struct state_capture_filter_change_pixfmt {
|
||||
uint32_t magic;
|
||||
codec_t to_codec;
|
||||
void *vo_pp_out_buffer; ///< buffer to write to if we use vo_pp wrapper (otherwise unused)
|
||||
};
|
||||
@@ -68,6 +73,7 @@ static int init(struct module *parent, const char *cfg, void **state)
|
||||
}
|
||||
|
||||
struct state_capture_filter_change_pixfmt *s = calloc(1, sizeof(struct state_capture_filter_change_pixfmt));
|
||||
s->magic = MAGIC;
|
||||
s->to_codec = get_codec_from_name(cfg);
|
||||
if (!s->to_codec) {
|
||||
log_msg(LOG_LEVEL_ERROR, MOD_NAME "Wrong codec: %s\n", cfg);
|
||||
|
||||
@@ -44,12 +44,17 @@
|
||||
#define CAPTURE_FILTER_WRAPPER_H_4106D5BE_4B1D_4367_B506_67B358514C50
|
||||
|
||||
#include <assert.h>
|
||||
#include <stdint.h>
|
||||
|
||||
#include "capture_filter.h"
|
||||
#include "utils/macros.h"
|
||||
#include "video_display.h"
|
||||
#include "vo_postprocess.h"
|
||||
|
||||
#define CFW_MAGIC to_fourcc('V', 'P', 'C', 'F')
|
||||
|
||||
struct vo_pp_capture_filter_wrapper {
|
||||
uint32_t magic;
|
||||
void *state; ///< capture filter state
|
||||
vo_postprocess_get_property_t get_property;
|
||||
struct video_frame *f;
|
||||
@@ -65,6 +70,7 @@ static void *CF_WRAPPER_MERGE(vo_pp_init_, name)(const char *cfg) {\
|
||||
}\
|
||||
struct vo_pp_capture_filter_wrapper *s = (struct vo_pp_capture_filter_wrapper *) \
|
||||
calloc(1, sizeof(struct vo_pp_capture_filter_wrapper));\
|
||||
s->magic = CFW_MAGIC;\
|
||||
s->state = state;\
|
||||
s->get_property = get_prop_callb;\
|
||||
return s;\
|
||||
|
||||
Reference in New Issue
Block a user