xine-lib 1.2.13-20230125hg15249
|
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
#include <inttypes.h>
#include <sys/types.h>
Go to the source code of this file.
Data Structures | |
struct | vdec_hw_h264_frame_t |
struct | vdec_hw_h264_info_ref_frame_t |
struct | vdec_hw_h264_frame_info_s |
Macros | |
#define | VDEC_HW_H264_FRAME_TOP_FIELD 1 |
#define | VDEC_HW_H264_FRAME_BOTTOM_FIELD 2 |
#define | VDEC_HW_H264_FRAME_NEW_SEQ 4 |
Typedefs | |
typedef struct vdec_hw_h264_s | vdec_hw_h264_t |
typedef struct vdec_hw_h264_frame_info_s | vdec_hw_h264_frame_info_t |
Enumerations | |
enum | vdec_hw_h264_logg_t { VDEC_HW_H264_LOGG_ERR = 0 , VDEC_HW_H264_LOGG_INFO , VDEC_HW_H264_LOGG_DEBUG } |
Functions | |
vdec_hw_h264_t * | vdec_hw_h264_new (int __attribute__((format(printf, 3, 4)))(*logg)(void *user_data, vdec_hw_h264_logg_t level, const char *fmt,...), void *user_data, int(*frame_new)(void *user_data, vdec_hw_h264_frame_t *frame), int(*frame_render)(void *user_data, vdec_hw_h264_frame_t *frame), int(*frame_ready)(void *user_data, vdec_hw_h264_frame_t *frame), void(*frame_delete)(void *user_data, vdec_hw_h264_frame_t *frame), int num_frames) |
int | vdec_hw_h264_reset (vdec_hw_h264_t *dec) |
int | vdec_hw_h264_zero_pts (vdec_hw_h264_t *dec) |
int | vdec_hw_h264_flush (vdec_hw_h264_t *dec) |
int | vdec_hw_h264_put_container_info (vdec_hw_h264_t *dec, int width, int height, int duration, double ratio) |
int | vdec_hw_h264_put_config (vdec_hw_h264_t *dec, const uint8_t *bitstream, uint32_t num_bytes) |
int | vdec_hw_h264_put_frame (vdec_hw_h264_t *dec, int64_t pts, const uint8_t *bitstream, uint32_t num_bytes, int frame_end) |
void | vdec_hw_h264_delete (vdec_hw_h264_t **dec) |
#define VDEC_HW_H264_FRAME_BOTTOM_FIELD 2 |
Referenced by _vdec_hw_h264_render(), and vdpau_h264_alter_frame_new().
#define VDEC_HW_H264_FRAME_NEW_SEQ 4 |
#define VDEC_HW_H264_FRAME_TOP_FIELD 1 |
<< in pts
Referenced by _vdec_hw_h264_render(), and vdpau_h264_alter_frame_new().
typedef struct vdec_hw_h264_frame_info_s vdec_hw_h264_frame_info_t |
typedef struct vdec_hw_h264_s vdec_hw_h264_t |
enum vdec_hw_h264_logg_t |
void vdec_hw_h264_delete | ( | vdec_hw_h264_t ** | dec | ) |
done
References _vdec_hw_h264_frame_free(), _vdec_hw_h264_reset_sequence(), vdec_hw_h264_s::frames, LOG_MODULE, MAX_PPS, MAX_REF_FRAMES, MAX_SPS, NULL, vdec_hw_h264_s::ref_frames_used, vdec_hw_h264_s::stats, vdec_hw_h264_s::user_frames, VDEC_HW_H264_LOGG_ERR, VDEC_HW_H264_LOGG_INFO, and vdec_hw_h264_reset().
Referenced by vdpau_h264_alter_dispose().
int vdec_hw_h264_flush | ( | vdec_hw_h264_t * | dec | ) |
frame_ready () / frame_delete () any held frames now
References _vdec_hw_h264_dpb_draw_frames(), _vdec_hw_h264_flush_slices(), _vdec_hw_h264_nal_unit(), DPB_DRAW_REFS, lprintf, MAX_POC, and vdec_hw_h264_s::ref_frames_used.
Referenced by vdpau_h264_alter_flush().
vdec_hw_h264_t * vdec_hw_h264_new | ( | int __attribute__((format(printf, 3, 4)))(*)(void *user_data, vdec_hw_h264_logg_t level, const char *fmt,...) | logg, |
void * | user_data, | ||
int(*)(void *user_data, vdec_hw_h264_frame_t *frame) | frame_new, | ||
int(*)(void *user_data, vdec_hw_h264_frame_t *frame) | frame_render, | ||
int(*)(void *user_data, vdec_hw_h264_frame_t *frame) | frame_ready, | ||
void(*)(void *user_data, vdec_hw_h264_frame_t *frame) | frame_delete, | ||
int | num_frames ) |
user_data | << can be NULL |
frame_new | << passed to logg () and frame_* () verbatim |
frame_render | << get user part of this frame |
frame_ready | << perform hw decoding based on info |
frame_delete | << put this frame to output queue |
num_frames | << unref/free user part << max frames to use |
int vdec_hw_h264_put_config | ( | vdec_hw_h264_t * | dec, |
const uint8_t * | bitstream, | ||
uint32_t | num_bytes ) |
optional global head from media container
References _vdec_hw_h264_read_pps(), _vdec_hw_h264_read_sps(), _vdec_hw_h264_unescape(), bits_set_buf(), lprintf, and vdec_hw_h264_s::tempbuf.
Referenced by vdpau_h264_alter_decode_data().
int vdec_hw_h264_put_container_info | ( | vdec_hw_h264_t * | dec, |
int | width, | ||
int | height, | ||
int | duration, | ||
double | ratio ) |
optional, 0 means "no change".
Referenced by vdpau_h264_alter_decode_data().
int vdec_hw_h264_put_frame | ( | vdec_hw_h264_t * | dec, |
int64_t | pts, | ||
const uint8_t * | bitstream, | ||
uint32_t | num_bytes, | ||
int | frame_end ) |
send what you have
References _vdec_hw_h264_dpb_draw_frames(), _vdec_hw_h264_flush_buffer(), _vdec_hw_h264_flush_slices(), _vdec_hw_h264_nal_unit(), BUF_PAD, DPB_DRAW_CLEAR, LOG_MODULE, lprintf, MAX_BUFFER_SIZE, MAX_POC, NAL_END_SEQUENCE, NAL_SLICE_IDR, NAL_SLICE_NO_IDR, v, VDEC_HW_H264_LOGG_DEBUG, and VDEC_HW_H264_LOGG_ERR.
Referenced by vdpau_h264_alter_decode_data().
int vdec_hw_h264_reset | ( | vdec_hw_h264_t * | dec | ) |
frame_delete () any held frames, set defaults
References _vdec_hw_h264_reset_sequence(), and vdec_hw_h264_s::ref_frames_used.
Referenced by vdec_hw_h264_delete(), and vdpau_h264_alter_reset().
int vdec_hw_h264_zero_pts | ( | vdec_hw_h264_t * | dec | ) |
zero all held frame pts
References vdec_hw_h264_frame_int_s::drop_pts, vdec_hw_h264_frame_int_s::f, vdec_hw_h264_s::frames, MAX_REF_FRAMES, vdec_hw_h264_frame_t::pts, vdec_hw_h264_s::ref_frames_used, and VDEC_HW_H264_FRAME_NEW_SEQ.
Referenced by vdpau_h264_alter_discontinuity().