2013-07-23 6 views
1

WPF MediaKit을 사용하여 DirectShow 그래프를 렌더링하고 있습니다. 디스플레이 프레임 속도는 wpf D3DRender가 작 으면 좋을 것입니다. 디스플레이 (컨트롤)의 크기를 늘리면 프레임 속도가 크게 떨어집니다.WPF MediaKit VMR9를 사용하는 대형 디스플레이의 낮은 프레임 속도

프레임 율 저하를 방지하려면 어떻게합니까? 디스플레이에서 그래프 전체 화면을 가끔씩 표시해야하므로 프레임 속도가 허용되지 않는 값으로 떨어집니다.

EVR (Enhanced Video Render)이 VMR9보다 훨씬 좋다고 들었습니다. 디스플레이 크기를 늘리면 EVR이 프레임 속도를 유지합니까?

+0

EVR (Enhanced Video Renderer)은 VMR-9 (Video Mixing Renderer 9)보다 우수한 성능과 훨씬 우수한 화질을 제공합니다. 이러한 링크 [1] (http://directshownet.sourceforge.net/about. html) 및 [2] (http://www.codeproject.com/Articles/419286/EVR-Presenter-in-pure-Csharp-with-Direct3D-Video-R) – Steven

+0

EVR은 VMR-9보다 우수하지만 당신이 가진 문제는 다른 것, CPU 나 데이터 밴드 위디를 초과했을 때 발생할 수 있습니다. –

+0

일부 D3DRenderer 최적화가 포함 된 최신 [WPF-Media] (https://github.com/Sascha-L/WPF-MediaKit) 키트 소스를 사용해보십시오. – xmedeko

답변

1

DirectShow 그래프를 초기화 할 때 비디오 압축 코덱 (MediaSubType)을 지정해야합니다. 기본 압축을 사용하여 웹 카메라에서 비디오를 캡처하려고 할 때도 동일한 문제가 발생했습니다 (제 경우에는 YUY2 임).

예 :

/// <summary> 
/// Configures the DirectShow graph to play the selected video capture 
/// device with the selected parameters 
/// </summary> 
private void SetupGraph() 
{ 
    ... 

    if (UseYuv && !EnableSampleGrabbing) 
    { 
     /* Configure the video output pin with our parameters and if it fails 
     * then just use the default media subtype*/ 
     if (!SetVideoCaptureParameters(graphBuilder, m_captureDevice, MediaSubType.YUY2)) 
      SetVideoCaptureParameters(graphBuilder, m_captureDevice, Guid.Empty); 
    } 
    else 
     /* Configure the video output pin with our parameters */ 
     SetVideoCaptureParameters(graphBuilder, m_captureDevice, MediaSubType.MJPG); // Change default compression to MJPG. 

    ... 
} 

WPFMediaKit.DirectShow.MediaPlayers.VideoCapturePlayer 예에서 찾을 수있다.