Skip to content

Commit

Permalink
mmalrender: Include dimensions in init_vout
Browse files Browse the repository at this point in the history
  • Loading branch information
popcornmix committed Jul 13, 2016
1 parent ca7d9d1 commit 4b67854
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 7 deletions.
Expand Up @@ -84,7 +84,7 @@ CMMALPool::~CMMALPool()
m_input = nullptr;
}

bool CMMALRenderer::init_vout(uint32_t encoding)
bool CMMALRenderer::init_vout(uint32_t width, uint32_t height, uint32_t aligned_width, uint32_t aligned_height, uint32_t encoding)
{
CSingleLock lock(m_sharedSection);
bool formatChanged = m_encoding != encoding;
Expand Down Expand Up @@ -126,10 +126,10 @@ bool CMMALRenderer::init_vout(uint32_t encoding)
else if (CONF_FLAGS_YUVCOEF_MASK(m_iFlags) == CONF_FLAGS_YUVCOEF_240M)
es_format->es->video.color_space = MMAL_COLOR_SPACE_SMPTE240M;

es_format->es->video.crop.width = m_sourceWidth;
es_format->es->video.crop.height = m_sourceHeight;
es_format->es->video.width = m_sourceWidth;
es_format->es->video.height = m_sourceHeight;
es_format->es->video.crop.width = width;
es_format->es->video.crop.height = height;
es_format->es->video.width = aligned_width;
es_format->es->video.height = aligned_height;

es_format->encoding = encoding;

Expand Down Expand Up @@ -838,7 +838,7 @@ bool CMMALRenderer::CheckConfigurationVout(uint32_t width, uint32_t height, uint
{
MMAL_STATUS_T status;

m_bMMALConfigured = init_vout(encoding);
m_bMMALConfigured = init_vout(width, height, aligned_width, aligned_height, encoding);

if (width == m_vout_width && height == m_vout_height && aligned_width == m_vout_aligned_width && aligned_height == m_vout_aligned_height)
return true;
Expand Down
Expand Up @@ -131,7 +131,7 @@ class CMMALRenderer : public CBaseRenderer, public CThread, public IRunnable
double m_frameIntervalDiff;
uint32_t m_vout_width, m_vout_height, m_vout_aligned_width, m_vout_aligned_height;

bool init_vout(uint32_t encoding);
bool init_vout(uint32_t width, uint32_t height, uint32_t aligned_width, uint32_t aligned_height, uint32_t encoding);
void ReleaseBuffers();
void UnInitMMAL();
void UpdateFramerateStats(double pts);
Expand Down

0 comments on commit 4b67854

Please sign in to comment.