52#define DECOMPRESS_MAGIC 0xdff34f21u
66 " Forces specified decompress module (will fail if not able to decompress\n"
67 " the received compression). Optionally also force codec to decode to."
68 " See 'uv --list-modules' to see available decompress modules.\n");
82 int best_priority = prio_max + 1;
87 if (strchr(tmp,
':')) {
93 *strchr(tmp,
':') =
'\0';
99 for (
const auto & d : decomps) {
101 if (!force_module.empty() && d.first != force_module) {
109 if (priority <= prio_max && priority >= prio_min && priority < best_priority) {
110 best_priority = priority;
116 if(best_priority == prio_max + 1)
118 return best_priority;
135 if (s->
state == NULL) {
153 for(
int i = 0; i < substreams; ++i) {
156 if (!decompress_state[i]) {
157 for(
int j = 0; j < i; ++j) {
158 if (decompress_state[j] !=
nullptr) {
161 decompress_state[j] =
nullptr;
194 prio_min, prio_max, &vdi,
name);
203 prio_min = prio_cur + 1;
225 unsigned char *compressed,
226 unsigned int compressed_len,
codec_t get_codec_from_name(const char *name)
#define LOG_LEVEL_VERBOSE
decompress_status decompress_frame(struct state_decompress *s, unsigned char *dst, unsigned char *compressed, unsigned int compressed_len, int frame_seq, struct video_frame_callbacks *callbacks, struct pixfmt_desc *internal_prop)
Decompresses video frame.
int decompress_get_property(struct state_decompress *s, int property, void *val, size_t *len)
void decompress_done(struct state_decompress *s)
int decompress_reconfigure(struct state_decompress *s, struct video_desc desc, int rshift, int gshift, int bshift, int pitch, codec_t out_codec)
bool decompress_init_multi(codec_t compression, struct pixfmt_desc internal_prop, codec_t out_codec, struct state_decompress **out, int count)
Initializes (multiple) decompress states.
std::unordered_map< std::string, std::string > commandline_params
#define ADD_TO_PARAM(param, doc)
map< string, const void * > get_libraries_for_class(enum library_class cls, int abi_version, bool include_hidden)
@ LIBRARY_CLASS_VIDEO_DECOMPRESS
const struct video_decompress_info * functions
pointer to selected decoder functions
void * state
decoder driver state
uint32_t magic
selected decoder magic
decompress_get_priority_t get_decompress_priority
decompress_get_property_t get_property
decompress_reconfigure_t reconfigure
decompress_decompress_t decompress
Struct containing callbacks of a video_frame.
static int find_best_decompress(codec_t compression, struct pixfmt_desc internal_prop, codec_t out_pixfmt, int prio_min, int prio_max, const struct video_decompress_info **vdi, string &name)
static bool try_initialize_decompress(const video_decompress_info *vdi, struct state_decompress **decompress_state, int substreams)
static struct state_decompress * decompress_init(const video_decompress_info *vdi)
API for video decompress drivers.
#define VIDEO_DECOMPRESS_ABI_VERSION