首页 诗词 字典 板报 句子 名言 友答 励志 学校 网站地图
当前位置: 首页 > 教程频道 > 媒体动画 > 多媒体 >

directshow 显示有黑边的有关问题

2012-02-29 
directshow 显示有黑边的问题!C/C++ codebool CDXGraph::SetWindow(HWND inWindow){mVideoWindow-put_Own

directshow 显示有黑边的问题!

C/C++ code
bool CDXGraph::SetWindow(HWND inWindow){    mVideoWindow->put_Owner((OAHWND)inWindow);    mVideoWindow->put_Visible(OATRUE);    mVideoWindow->put_AutoShow(OATRUE);    mVideoWindow->put_MessageDrain((OAHWND) inWindow);    mVideoWindow->put_WindowStyle(WS_CHILD | WS_CLIPSIBLINGS | WS_CLIPCHILDREN);    return S_OK;}bool CDXGraph::SetDisplayWindow(HWND inWindow){        if (mVideoWindow)    {                RECT windowRect;        GetClientRect(inWindow, &windowRect);        HRESULT hr = NULL;                LONG lVideoWidth, lVideoHeight, lNewWidth, lNewHeight, lWidth, lHeight;        //Read the default video size        hr = mBasicVideo->GetVideoSize(&lVideoWidth, &lVideoHeight);        if (FAILED(hr))        {            mBasicVideo->Release();            mVideoWindow->Release();            return FALSE;        }        // Ignore the video's original size and stretch to fit bounding rectangle        hr = mVideoWindow->SetWindowPosition(0,0,windowRect.right, windowRect.bottom );        if (FAILED(hr))        {            return S_FALSE;        }        return S_OK;    }    return S_FALSE;}

上面是我显示的代码!左右会出现黑边!求解

[解决办法]

不懂,帮顶
[解决办法]
有黑边正常的吧,如果视频比例和当前尺寸不符合,会自动填充的。
[解决办法]
看代码没什么问题。
你的视频左右不会有黑边吧?
[解决办法]
你确定原始视频没黑边?

热点排行