![]() |
UltraGrid
UltraGrid Low-Latency High-Resolution Transmission System
|
This file defines some common video functions. More...
#include "debug.h"#include "rtp/rtp_types.h"#include "utils/macros.h"#include "video.h"#include <iomanip>#include <sstream>#include <map>
Go to the source code of this file.
Classes | |
| struct | video_mode_info_t |
Macros | |
| #define | MOD_NAME "[video] " |
Functions | |
| struct video_desc | get_video_desc_from_string (const char *string) |
| const char * | get_video_mode_description (enum video_mode video_mode) |
| enum video_mode | get_video_mode_from_str (const char *requested_mode) |
| int | get_video_mode_tiles_x (enum video_mode video_mode) |
| int | get_video_mode_tiles_y (enum video_mode video_mode) |
| enum video_mode | guess_video_mode (int num_substreams) |
| Tries to guess video mode from number of substreams. | |
| std::ostream & | operator<< (std::ostream &os, const codec_t &color_spec) |
| std::ostream & | operator<< (std::ostream &os, const video_desc &desc) |
| std::istream & | operator>> (std::istream &is, video_desc &desc) |
| static double | parse_fps (const char *string, bool interlaced) |
| const char * | video_desc_to_string (struct video_desc d) |
Variables | |
| static const map< enum video_mode, video_mode_info_t > | video_mode_info |
This file defines some common video functions.
These function are neither video frame nor video codec related.
Definition in file video.cpp.
| struct video_desc get_video_desc_from_string | ( | const char * | string | ) |
Definition at line 291 of file video.cpp.
References color_printf(), video_desc::color_spec, desc, video_desc::fps, video_desc::height, INTERLACED_MERGED, video_desc::interlacing, MSG, name, parse_fps(), PROGRESSIVE, STARTS_WITH, TBOLD, video_desc::tile_count, UYVY, and video_desc::width.
Referenced by vidcap_testcard2_init(), and vidcap_testcard_init().

| const char * get_video_mode_description | ( | enum video_mode video_mode | ) |
Definition at line 118 of file video.cpp.
References video_mode_info.
Referenced by decode_video_frame().
| enum video_mode get_video_mode_from_str | ( | const char * | requested_mode | ) |
This function matches string representation of video mode with its respective enumeration value.
| reuqested_mode | textual representation of video mode |
Definition at line 83 of file video.cpp.
References video_mode_info, and VIDEO_UNKNOWN.
Referenced by parse_options_internal().
| int get_video_mode_tiles_x | ( | enum video_mode video_mode | ) |
Definition at line 108 of file video.cpp.
References video_mode_info, and video_mode_info_t::x.
Referenced by decoder_set_video_mode(), decompress_thread(), display_reconfigure(), fec_thread(), and reconfigure_decoder().
| int get_video_mode_tiles_y | ( | enum video_mode video_mode | ) |
Definition at line 113 of file video.cpp.
References video_mode_info.
Referenced by decoder_set_video_mode(), decompress_thread(), display_reconfigure(), fec_thread(), and reconfigure_decoder().
| enum video_mode guess_video_mode | ( | int | num_substreams | ) |
Tries to guess video mode from number of substreams.
| num_substreams | number of received substreams |
| VIDEO_UNKNOWN | if the mode was not guessed. |
Definition at line 123 of file video.cpp.
References VIDEO_3X1, VIDEO_4K, VIDEO_NORMAL, VIDEO_STEREO, and VIDEO_UNKNOWN.
Referenced by decode_video_frame().
| std::ostream & operator<< | ( | std::ostream & | os, |
| const codec_t & | color_spec ) |
Definition at line 157 of file video.cpp.
References get_codec_name().

| std::ostream & operator<< | ( | std::ostream & | os, |
| const video_desc & | desc ) |
Definition at line 141 of file video.cpp.
References video_desc::color_spec, desc, video_desc::fps, get_codec_name(), get_interlacing_suffix(), video_desc::height, video_desc::interlacing, PROGRESSIVE, SEGMENTED_FRAME, video_desc::tile_count, and video_desc::width.

| std::istream & operator>> | ( | std::istream & | is, |
| video_desc & | desc ) |
Definition at line 163 of file video.cpp.
References video_desc::color_spec, desc, video_desc::fps, get_codec_from_name(), get_interlacing_from_suffix(), video_desc::height, video_desc::interlacing, LOG_LEVEL_ERROR, log_msg(), PROGRESSIVE, SEGMENTED_FRAME, video_desc::tile_count, and video_desc::width.

|
static |
| 0.0 | FPS not specified |
| <0.0 | wrong FPS specification |
Definition at line 253 of file video.cpp.
Referenced by get_video_desc_from_string(), init(), parse_fmt(), parse_format(), vidcap_testcard2_init(), and vidcap_testcard_init().
| const char * video_desc_to_string | ( | struct video_desc | d | ) |
Definition at line 241 of file video.cpp.
Referenced by display_reconfigure(), show_help(), vidcap_file_init(), vidcap_testcard_init(), and worker().
|
static |
Definition at line 67 of file video.cpp.
Referenced by get_video_mode_description(), get_video_mode_from_str(), get_video_mode_tiles_x(), and get_video_mode_tiles_y().