mirror of
https://github.com/outbackdingo/UltraGrid.git
synced 2026-03-20 03:08:39 +00:00
video display: added new FB mode
merge pred prechozi komit a uprav Added a mode SEPARATE_3D that is somehow inbetween MERGED and SEPARATE_TILES - if receiving only 2 streams, 2 separated 3D streams are expected, otherwise merged framebuffer is used.
This commit is contained in:
@@ -1204,18 +1204,20 @@ static bool reconfigure_decoder(struct state_video_decoder *decoder,
|
||||
decoder->out_codec = out_codec;
|
||||
struct video_desc display_desc = desc;
|
||||
|
||||
int display_mode;
|
||||
int display_mode = DISPLAY_PROPERTY_VIDEO_MERGED; // default
|
||||
size_t len = sizeof(int);
|
||||
int ret;
|
||||
|
||||
ret = display_ctl_property(decoder->display, DISPLAY_PROPERTY_VIDEO_MODE,
|
||||
&display_mode, &len);
|
||||
if(!ret) {
|
||||
if (!display_ctl_property(decoder->display, DISPLAY_PROPERTY_VIDEO_MODE,
|
||||
&display_mode, &len)) {
|
||||
debug_msg("Failed to get video display mode.\n");
|
||||
display_mode = DISPLAY_PROPERTY_VIDEO_MERGED;
|
||||
}
|
||||
|
||||
if(display_mode == DISPLAY_PROPERTY_VIDEO_MERGED) {
|
||||
if (display_mode == DISPLAY_PROPERTY_VIDEO_SEPARATE_3D) {
|
||||
display_mode = display_desc.tile_count == 2 ? DISPLAY_PROPERTY_VIDEO_SEPARATE_TILES :
|
||||
DISPLAY_PROPERTY_VIDEO_MERGED;
|
||||
}
|
||||
|
||||
if (display_mode == DISPLAY_PROPERTY_VIDEO_MERGED) {
|
||||
display_desc.width *= get_video_mode_tiles_x(decoder->video_mode);
|
||||
display_desc.height *= get_video_mode_tiles_y(decoder->video_mode);
|
||||
display_desc.tile_count = 1;
|
||||
|
||||
@@ -138,7 +138,8 @@ enum display_property {
|
||||
|
||||
enum display_prop_vid_mode {
|
||||
DISPLAY_PROPERTY_VIDEO_MERGED = 0, ///< monolithic framebuffer
|
||||
DISPLAY_PROPERTY_VIDEO_SEPARATE_TILES = 1 ///< framebuffer consists of separate tiles
|
||||
DISPLAY_PROPERTY_VIDEO_SEPARATE_TILES = 1, ///< framebuffer consists of separate tiles
|
||||
DISPLAY_PROPERTY_VIDEO_SEPARATE_3D = 2, ///< same as MERGED but 2 streams should be handled as separate 3D tiles
|
||||
};
|
||||
/// @}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user