GV

GeezerVison

The World Wide Web, restored to 800 pixels of glory.

Home|About|Gaming cabinet|Archives|How it works|Starter sites

On this site

  • Sign in
  • ActionsCI/CD and automation
  • CodespacesCloud development environments
  • All Features
  • Documentation
  • Training
  • Certifications
  • Build with Copilot
  • Customize Copilot
  • Integrations
  • Trending repos
  • GitHub Sponsors
  • Developer articles
  • Enterprises

This view

  • Original page
  • New address

GeezerVison is showing github.com — OpenMaxIL-cpp/src/VideoRender.cpp at master · dridri/OpenMaxIL-cpp

Expand file tree

/

VideoRender.cpp

Copy path
More file actions
More file actions

Latest commit

 

History

History
History
63 lines (53 loc) · 1.83 KB
/

VideoRender.cpp

Copy path

File metadata and controls

63 lines (53 loc) · 1.83 KB
Raw
Copy raw file
Download raw file
Open symbols panel
Edit and raw actions
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
#include "VideoRender.h"
#include <IL/OMX_Video.h>
#include <IL/OMX_Types.h>
#include <IL/OMX_Component.h>
#include <IL/OMX_Broadcom.h>
using namespace IL;
VideoRender::VideoRender( int32_t offset_x, int32_t offset_y, int32_t width, int32_t height, bool verbose )
: Component( "OMX.broadcom.video_render", { PortInit( 90, Video ) }, std::vector< PortInit >(), verbose )
{
OMX_CONFIG_DISPLAYREGIONTYPE region;
OMX_INIT_STRUCTURE( region );
region.nPortIndex = 90;
region.set = (OMX_DISPLAYSETTYPE)( OMX_DISPLAY_SET_FULLSCREEN | OMX_DISPLAY_SET_NOASPECT | OMX_DISPLAY_SET_LAYER | ( width != 0 and height != 0 ? OMX_DISPLAY_SET_DEST_RECT : 0 ) );
region.fullscreen = (OMX_BOOL)( width == 0 and height == 0 );
if ( width != 0 and height != 0 ) {
region.dest_rect.x_offset = offset_x;
region.dest_rect.y_offset = offset_y;
region.dest_rect.width = width;
region.dest_rect.height = height;
}
region.noaspect = OMX_TRUE;
region.layer = 0;
SetConfig( OMX_IndexConfigDisplayRegion, &region );
// SendCommand( OMX_CommandStateSet, OMX_StateIdle, nullptr );
}
VideoRender::~VideoRender()
{
}
OMX_ERRORTYPE VideoRender::setMirror( bool hrzn, bool vert )
{
OMX_MIRRORTYPE eMirror = OMX_MirrorNone;
if ( hrzn and not vert ) {
eMirror = OMX_MirrorHorizontal;
} else if ( vert and not hrzn ) {
eMirror = OMX_MirrorVertical;
} else if ( hrzn and vert ) {
eMirror = OMX_MirrorBoth;
}
OMX_CONFIG_MIRRORTYPE mirror;
OMX_INIT_STRUCTURE(mirror);
mirror.nPortIndex = 90;
mirror.eMirror = eMirror;
return SetConfig( OMX_IndexConfigCommonMirror, &mirror );
}
OMX_ERRORTYPE VideoRender::setStereo( bool stereo )
{
OMX_CONFIG_DISPLAYREGIONTYPE region;
OMX_INIT_STRUCTURE( region );
region.nPortIndex = 90;
region.set = OMX_DISPLAY_SET_MODE;
region.mode = OMX_DISPLAY_MODE_STEREO_LEFT_TO_LEFT;
return SetConfig( OMX_IndexConfigDisplayRegion, &region );
}
You are visitor 01402775 — GeezerVison does not store the pages you look up.
Best viewed with Netscape Navigator 4.7 or Internet Explorer 6 at 800×600. No cookies required.