Giter Site home page Giter Site logo

How can i resize the video? about omxplayer HOT 3 CLOSED

neviaumi avatar neviaumi commented on July 24, 2024
How can i resize the video?

from omxplayer.

Comments (3)

torarin avatar torarin commented on July 24, 2024

Take a look at https://github.com/huceke/omxplayer/blob/master/OMXVideo.cpp#L600

from omxplayer.

neviaumi avatar neviaumi commented on July 24, 2024

Hi torarin,
I attempted to uncommend Line 593 to 608,But it not work!
It not response any error message but not any affect of the video too.
So , i try to other mode (Set transform, set src dis...etc.)
It is working properly .
My code following, could you mind let me know where is issue??
Set src dis (It work)
OMX_ERRORTYPE omx_err = OMX_ErrorNone;
OMX_CONFIG_DISPLAYREGIONTYPE configDisplay;
OMX_INIT_STRUCTURE(configDisplay);
configDisplay.nPortIndex = m_omx_render.GetInputPort();
configDisplay.set = OMX_DISPLAY_SET_SRC_RECT;
configDisplay.src_rect = src;
omx_err=m_omx_render.SetConfig(OMX_IndexConfigDisplayRegion,&configDisplay);
if (omx_err != OMX_ErrorNone)
{
printf("Get The Error!omx_err(0x%08x)\r\n",omx_err);
}
else
{
printf("Src width:\t%d\r\n",src.width);
printf("Src Height:\t%d\r\n",src.height);
printf("Src x offset:\t%d\r\n",src.x_offset);
printf("Src y offset:\t%d\r\n",src.y_offset);
}
Set transform(It work)
OMX_ERRORTYPE omx_err = OMX_ErrorNone;
OMX_CONFIG_DISPLAYREGIONTYPE configDisplay;
OMX_INIT_STRUCTURE(configDisplay);
configDisplay.nPortIndex = m_omx_render.GetInputPort();
configDisplay.set = OMX_DISPLAY_SET_TRANSFORM;
configDisplay.transform = trans;
omx_err=m_omx_render.SetConfig(OMX_IndexConfigDisplayRegion,&configDisplay);
if (omx_err != OMX_ErrorNone)
{
printf("Get The Error!omx_err(0x%08x)\r\n",omx_err);
}
else
{
printf("Transforms:\t%d\r\n",trans);
}
Set dist (It not work:()
OMX_ERRORTYPE omx_err = OMX_ErrorNone;
OMX_CONFIG_DISPLAYREGIONTYPE configDisplay;
OMX_INIT_STRUCTURE(configDisplay);
configDisplay.nPortIndex = m_omx_render.GetInputPort();
configDisplay.set = OMX_DISPLAY_SET_DEST_RECT;
configDisplay.dest_rect = dest;
omx_err=m_omx_render.SetConfig(OMX_IndexConfigDisplayRegion,&configDisplay);
if (omx_err != OMX_ErrorNone)
{
printf("Get The Error!omx_err(0x%08x)\r\n",omx_err);
}
else
{
printf("Dest width:\t%d\r\n",dest.width);
printf("Dest Height:\t%d\r\n",dest.height);
printf("Dest x offset:\t%d\r\n",dest.x_offset);
printf("Dest y offset:\t%d\r\n",dest.y_offset);
}

from omxplayer.

neviaumi avatar neviaumi commented on July 24, 2024

Hi, i found the solution
It must specify layer before set dest.

from omxplayer.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.