Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • World
  • Users
  • Groups
Skins
  • Light
  • Cerulean
  • Cosmo
  • Flatly
  • Journal
  • Litera
  • Lumen
  • Lux
  • Materia
  • Minty
  • Morph
  • Pulse
  • Sandstone
  • Simplex
  • Sketchy
  • Spacelab
  • United
  • Yeti
  • Zephyr
  • Dark
  • Cyborg
  • Darkly
  • Quartz
  • Slate
  • Solar
  • Superhero
  • Vapor

  • Default (No Skin)
  • No Skin
Collapse
Code Project
  1. Home
  2. General Programming
  3. C / C++ / MFC
  4. IDirect3DSurface9 Problem after Windows 10 Update Creator

IDirect3DSurface9 Problem after Windows 10 Update Creator

Scheduled Pinned Locked Moved C / C++ / MFC
helpdatabaseannouncement
6 Posts 2 Posters 0 Views 1 Watching
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • 0 Offline
    0 Offline
    002comp
    wrote on last edited by
    #1

    Hello Guys I am creating a direct3D surface for further creation of OffScreenplainSurface for video sample. And This Code was working fine before Windows10 Update. After Update, I found that IDirect3DSurface not returning the right D3DSURFACE_DESC.format which I am using to createOffScreenPlainSurface. Here is the Code

    CComPtr sampleSurface;
    MFGetService(mediaBuffer, MR_BUFFER_SERVICE, __uuidof(IDirect3DSurface9), (void**)&sampleSurface);

    D3DSURFACE_DESC surfaceDesc;
    sampleSurface->GetDesc(&surfaceDesc);

    CComPtr sharedSampleSurface;
    HANDLE shareHandleSurface = 0;
    device3D->CreateOffscreenPlainSurface(
    surfaceDesc.Width,
    surfaceDesc.Height,
    surfaceDesc.Format,
    D3DPOOL_DEFAULT,
    &sharedSampleSurface,
    &shareHandleSurface
    );

    Now, after windows10 Update surfaceDesc.format = 842094158 not the D3DFMT_YUY2 And I realized that sometimes after restart of Machine, it returns D3DFMT_YUY2 which looks like some services in windows10 update obstructing MFGetService. I found one service sppsvc which automatic delayed start and Trigger start but I am not able to get much of it. Any Help will be Appreciated. Thank You.

    J 1 Reply Last reply
    0
    • 0 002comp

      Hello Guys I am creating a direct3D surface for further creation of OffScreenplainSurface for video sample. And This Code was working fine before Windows10 Update. After Update, I found that IDirect3DSurface not returning the right D3DSURFACE_DESC.format which I am using to createOffScreenPlainSurface. Here is the Code

      CComPtr sampleSurface;
      MFGetService(mediaBuffer, MR_BUFFER_SERVICE, __uuidof(IDirect3DSurface9), (void**)&sampleSurface);

      D3DSURFACE_DESC surfaceDesc;
      sampleSurface->GetDesc(&surfaceDesc);

      CComPtr sharedSampleSurface;
      HANDLE shareHandleSurface = 0;
      device3D->CreateOffscreenPlainSurface(
      surfaceDesc.Width,
      surfaceDesc.Height,
      surfaceDesc.Format,
      D3DPOOL_DEFAULT,
      &sharedSampleSurface,
      &shareHandleSurface
      );

      Now, after windows10 Update surfaceDesc.format = 842094158 not the D3DFMT_YUY2 And I realized that sometimes after restart of Machine, it returns D3DFMT_YUY2 which looks like some services in windows10 update obstructing MFGetService. I found one service sppsvc which automatic delayed start and Trigger start but I am not able to get much of it. Any Help will be Appreciated. Thank You.

      J Offline
      J Offline
      Jochen Arndt
      wrote on last edited by
      #2

      842094158 is 0x3231564E which is MAKEFOURCC('N', 'V', '1', '2'). So your mediaBuffer seems to contain frames in that format. I don't know much about Direct3D but I guess that the format has changed with the video driver installed with Windows 10.

      0 2 Replies Last reply
      0
      • J Jochen Arndt

        842094158 is 0x3231564E which is MAKEFOURCC('N', 'V', '1', '2'). So your mediaBuffer seems to contain frames in that format. I don't know much about Direct3D but I guess that the format has changed with the video driver installed with Windows 10.

        0 Offline
        0 Offline
        002comp
        wrote on last edited by
        #3

        Thanks Jochen for your Reply. It makes a sense that As I read on many formuns that latest windows10 update had problem with Graphic drivers beacause it is not behaving correctly with the updates so some of them choose to roll back. Again Thanks a Lot.

        1 Reply Last reply
        0
        • J Jochen Arndt

          842094158 is 0x3231564E which is MAKEFOURCC('N', 'V', '1', '2'). So your mediaBuffer seems to contain frames in that format. I don't know much about Direct3D but I guess that the format has changed with the video driver installed with Windows 10.

          0 Offline
          0 Offline
          002comp
          wrote on last edited by
          #4

          Hello Is that possible that I get different Format from particular one machine and unchanged hardware? As after Windows 10 Update, sometimes I am getting NV12 surface format and sometimes YUY2. Thank you.

          J 1 Reply Last reply
          0
          • 0 002comp

            Hello Is that possible that I get different Format from particular one machine and unchanged hardware? As after Windows 10 Update, sometimes I am getting NV12 surface format and sometimes YUY2. Thank you.

            J Offline
            J Offline
            Jochen Arndt
            wrote on last edited by
            #5

            As I wrote, I don't know much about Direct3D. But there are some components like drivers and decoders involved which also have their own configuration. A quick research shows that Windows is providing decompressed video streams in the YUY2 or NV12 format. So an application should probably support both formats.

            0 1 Reply Last reply
            0
            • J Jochen Arndt

              As I wrote, I don't know much about Direct3D. But there are some components like drivers and decoders involved which also have their own configuration. A quick research shows that Windows is providing decompressed video streams in the YUY2 or NV12 format. So an application should probably support both formats.

              0 Offline
              0 Offline
              002comp
              wrote on last edited by
              #6

              Thanks Jochen for your reply. I also found that Windows Supports both formats YUY2 or NV12. But, I am struggling why it is randomly showing either format which proves that there are some setting that needs to be set As I did not get any theory/description on getting random format from these two formats. Thanks Again for your Reply.

              1 Reply Last reply
              0
              Reply
              • Reply as topic
              Log in to reply
              • Oldest to Newest
              • Newest to Oldest
              • Most Votes


              • Login

              • Don't have an account? Register

              • Login or register to search.
              • First post
                Last post
              0
              • Categories
              • Recent
              • Tags
              • Popular
              • World
              • Users
              • Groups