R
rpatel4
I'm running on a pocket pc, windows mobile 5, embedding media player
into my app.
But I can't seem to get the video to stretch to fit its window, or
shrink to to fit its window.
When the media is smaller than the screen, it remains centered at its
original size. When its larger than the screen, its getting clipped
off at the edges.
This is a segment of my code...
long APIENTRY PlayMedia(HWND hParent)
{
long res = 0;
// Get the window
CQMPHostWindow * pWindow =
CQMPHostWindow::m_QQWindowMap.FindEntry(hParent);
if (pWindow)
{
res = pWindow->OnPlay(); //this works fine as the vid
starts playing
pWindow->OnStretch2Fit();
}
return res;
}
long OnStretch2Fit()
{
VARIANT_BOOL fValue = -1; //tried value 'true' as well
m_spIPlayer->put_stretchToFit(fValue);
return 0;
}
Similarly, if the video res is larger than the screen portion I'm
alloting it, parts of the video are being clipped. Any idea on what
I'm doing wrong? Do I need to set something that allows the video to
be resized?
into my app.
But I can't seem to get the video to stretch to fit its window, or
shrink to to fit its window.
When the media is smaller than the screen, it remains centered at its
original size. When its larger than the screen, its getting clipped
off at the edges.
This is a segment of my code...
long APIENTRY PlayMedia(HWND hParent)
{
long res = 0;
// Get the window
CQMPHostWindow * pWindow =
CQMPHostWindow::m_QQWindowMap.FindEntry(hParent);
if (pWindow)
{
res = pWindow->OnPlay(); //this works fine as the vid
starts playing
pWindow->OnStretch2Fit();
}
return res;
}
long OnStretch2Fit()
{
VARIANT_BOOL fValue = -1; //tried value 'true' as well
m_spIPlayer->put_stretchToFit(fValue);
return 0;
}
Similarly, if the video res is larger than the screen portion I'm
alloting it, parts of the video are being clipped. Any idea on what
I'm doing wrong? Do I need to set something that allows the video to
be resized?