![]() |
UltraGrid
UltraGrid Low-Latency High-Resolution Transmission System
|
Files | |
| file | video_decoders.cpp |
| file | video_decoders.h |
| Video RTP decoder. | |
Functions | |
| int | decode_video_frame (struct coded_data *received_data, void *decoder_data, struct pbuf_stats *stats) |
| Decodes a participant buffer representing one video frame. | |
| bool | parse_video_hdr (const uint32_t *hdr, struct video_desc *desc) |
| void | video_decoder_destroy (struct state_video_decoder *decoder) |
| Destroys decoder created with decoder_init() | |
| struct state_video_decoder * | video_decoder_init (struct module *parent, enum video_mode, struct display *display, const char *encryption) |
| bool | video_decoder_register_display (struct state_video_decoder *decoder, struct display *display) |
| Registers video display to be used for displaying decoded video frames. | |
| void | video_decoder_remove_display (struct state_video_decoder *decoder) |
| This removes display from current decoder. | |
| int decode_video_frame | ( | struct coded_data * | cdata, |
| void * | decoder_data, | ||
| struct pbuf_stats * | stats ) |
Decodes a participant buffer representing one video frame.
| cdata | PBUF buffer |
| decoder_data | vcodec_state containing decoder state and some additional data |
| true | if decoding was successful. It stil doesn't mean that the frame will be correctly displayed, decoding may fail in some subsequent (asynchronous) steps. |
| false | if decoding failed |
Zero missing parts of framebuffer - this may be useful for compressed video (which may be also with FEC - but we use systematic codes therefore it may benefit from that as well).
Definition at line 1502 of file video_decoders.cpp.
References state_video_decoder::buffer_swapped, video_frame::callbacks, check_for_mode_change(), cleanup(), state_video_decoder::control, count, coded_data::data, tile::data, video_frame_callbacks::data_deleter, tile::data_len, state_video_decoder::dec_funcs, vcodec_state::decoded, vcodec_state::decoder, decoder_set_video_mode(), state_video_decoder::decoder_type, openssl_decrypt_info::decrypt, state_video_decoder::decrypt, state_video_decoder::display, state_video_decoder::display_desc, ENCRYPTED_ERR, ERROR_GOTO_CLEANUP, pbuf_stats::expected_pkts_cum, video_frame::fec_params, state_video_decoder::fec_queue, fec::fec_type_from_pt(), video_desc::fps, frame, state_video_decoder::frame, FRAMEBUFFER_NOT_READY, get_video_mode_description(), guess_video_mode(), handle_error(), len, state_video_decoder::line_decoder, state_video_decoder::lock, LOG, LOG_LEVEL_ERROR, LOG_LEVEL_FATAL, LOG_LEVEL_NOTICE, LOG_LEVEL_VERBOSE, LOG_LEVEL_WARNING, log_msg(), log_msg_once(), max, vcodec_state::max_frame_size, state_video_decoder::max_substreams, state_video_decoder::merged_fb, MOD_NAME, MODE_AES128_MAX, MODE_AES128_NONE, state_video_decoder::msg_queue, NOT_ENCRYPTED_ERR, coded_data::nxt, offset, PADDING, synchronized_queue< T, max_len >::pop(), timed_message< log_level >::print(), PT_ENCRYPT_VIDEO, PT_ENCRYPT_VIDEO_LDGM, PT_ENCRYPT_VIDEO_RS, PT_Unassign_Type95, PT_VIDEO, PT_VIDEO_HAS_FEC, PT_VIDEO_IS_ENCRYPTED, PT_VIDEO_LDGM, PT_VIDEO_RS, synchronized_queue< T, max_len >::push(), pbuf_stats::received_pkts_cum, state_video_decoder::received_vid_desc, reconfigure_helper(), reconfigure_if_needed(), RTP_MAX_PACKET_LEN, rtp_packet, state_video_decoder::slow_msg, video_frame::ssrc, start(), state_video_decoder::stats, video_frame::tiles, video_frame::timestamp, to_fourcc, vf_alloc(), vf_data_deleter(), vf_free(), vf_get_tile(), state_video_decoder::video_mode, VIDEO_UNKNOWN, wait_for_framebuffer_swap(), and video_desc::width.
Referenced by ultragrid_rtp_video_rxtx::receiver_loop().

| bool parse_video_hdr | ( | const uint32_t * | hdr, |
| struct video_desc * | desc ) |
Definition at line 1405 of file video_decoders.cpp.
References video_desc::color_spec, compute_fps(), desc, video_desc::fps, get_codec_from_fcc(), video_desc::height, video_desc::interlacing, LOG_LEVEL_ERROR, LOG_LEVEL_WARNING, log_msg(), log_msg_once(), MOD_NAME, video_desc::tile_count, to_fourcc, VIDEO_CODEC_NONE, and video_desc::width.
Referenced by check_for_mode_change(), decode_yuri_video_frame(), and fec_thread().

| void video_decoder_destroy | ( | struct state_video_decoder * | decoder | ) |
Destroys decoder created with decoder_init()
| decoder | decoder to be destroyed. If NULL, no action is performed. |
Definition at line 976 of file video_decoders.cpp.
References cleanup(), state_video_decoder::dec_funcs, state_video_decoder::decrypt, openssl_decrypt_info::destroy, state_video_decoder::disp_supported_il, and video_decoder_remove_display().
Referenced by ultragrid_rtp_video_rxtx::destroy_video_decoder().

| struct state_video_decoder * video_decoder_init | ( | struct module * | parent, |
| enum | video_mode, | ||
| struct display * | display, | ||
| const char * | encryption ) |
| bool video_decoder_register_display | ( | struct state_video_decoder * | decoder, |
| struct display * | display ) |
Registers video display to be used for displaying decoded video frames.
No display should be managed by this decoder when this function is called.
| decoder | decoder state |
| display | new display to be registered |
Definition at line 859 of file video_decoders.cpp.
References codec_list_to_str(), state_video_decoder::disp_supported_il, state_video_decoder::disp_supported_il_cnt, state_video_decoder::display, display_ctl_property(), DISPLAY_PROPERTY_CODECS, DISPLAY_PROPERTY_SUPPORTED_IL_MODES, get_codec_from_name(), get_commandline_param(), INTERLACED_MERGED, len, LOG, LOG_LEVEL_ERROR, LOG_LEVEL_INFO, LOG_LEVEL_NOTICE, log_msg(), MOD_NAME, state_video_decoder::native_codecs, PROGRESSIVE, SEGMENTED_FRAME, VIDEO_CODEC_COUNT, VIDEO_CODEC_NONE, and video_decoder_start_threads().
Referenced by video_decoder_init().

| void video_decoder_remove_display | ( | struct state_video_decoder * | decoder | ) |
This removes display from current decoder.
From now on, no video frames will be decoded with current decoder.
| decoder | decoder from which will the decoder be removed |
Definition at line 941 of file video_decoders.cpp.
References state_video_decoder::display, state_video_decoder::display_desc, display_put_frame(), state_video_decoder::frame, PUTF_DISCARD, and video_decoder_stop_threads().
Referenced by ultragrid_rtp_video_rxtx::remove_display_from_decoders(), and video_decoder_destroy().
