Subtitles issues v1.3.0.0 (1 Viewer)

Sebastiii

Development Group
  • Team MediaPortal
  • November 12, 2007
    16,523
    10,466
    France
    Home Country
    France France
    When talking with Tourette about the issue :
    1) D3DERR_INVALIDCALL - more infor would be needed. He needs to use DirectX debug logging from the DirectX itself to be able to see why the call is invalid
    2) Timeout=1,84467440737096E+19 <--- almost infinite subtitle timeout - not sure how it can happen

    Since all is working with DVBSub2 but maybe something wrong with DirectX and new implementation in DVBSub3.
     

    burr

    MP Donator
  • Premium Supporter
  • May 13, 2006
    175
    47
    Home Country
    Sweden Sweden
    I have tested your build to fix the enumeration exception and this error is not there anymore but the directx exceptions still remain.

    I have also tested to do a clean install of the client but still the same.
     
    Last edited:

    Sebastiii

    Development Group
  • Team MediaPortal
  • November 12, 2007
    16,523
    10,466
    France
    Home Country
    France France
    Last edited:

    burr

    MP Donator
  • Premium Supporter
  • May 13, 2006
    175
    47
    Home Country
    Sweden Sweden
    Do i have to download directx SDK to get to debug mode, i can't move the slider when i open "directx.cpl"?
     

    Sebastiii

    Development Group
  • Team MediaPortal
  • November 12, 2007
    16,523
    10,466
    France
    Home Country
    France France
    Ah good question, it's possible i have the sdk and i can move the slider.
     

    burr

    MP Donator
  • Premium Supporter
  • May 13, 2006
    175
    47
    Home Country
    Sweden Sweden
    The SDK was the trick here is the logs

    00020862 20:46:06 [3524] Direct3D9: (ERROR) :D3DUSAGE_DYNAMIC cannot be used with managed vertex buffers
    00020863 20:46:06 [3524]
    00020864 20:46:06 [3524] Direct3D9: (ERROR) :Failure trying to create Vertex Buffer
     

    Scythe42

    Retired Team Member
  • Premium Supporter
  • June 20, 2009
    2,065
    2,703
    52
    Berlin
    Home Country
    Germany Germany
    Dynamic Textures cannot be used with a managed D3D Pool. Or in D3D terms. D3DUSAGE_DYNAMIC and D3DPOOL_MANAGED are incompatible.

    In this case it's about the Vertex Buffers. Static Vertex Buffers are placed into video memory and dynamic ones in the AGP memory. If D3DUSAGE_DYNAMIC is not specified the vertex buffers are made static.

    The only reason to use dynamic vertex buffers is that you don't have to lock them. Locking has huge performance penalties as the lock forces a wait until the GPU finished reading vertex/inde data from the buffer before control is given back to an app. Locking a static buffer several times per frame prevents the GPU from buffering rendering commands. Without buffered commands the GPU remains idle until the app finished filling the vertex buffer/index buffer.

    Normally the vertex or index data should not change. There are of course applications where this is needed on every frame. This is the only reason to use D3DUSAGE_DYNAMIC.

    So if we don't change vertex/index data no need of D3DUSAGE_DYNAMIC should be given. Need to take a look at the code itself what we do with the vertex buffers. But honestly the vertex buffer should be the always the same. At least during one frame. Locking between frames would be OK, but still has performance penalties.

    Subtitles should be rendered to a texture, and the texture is displayed with the same vertices anyway. Don't really see the need to change the vertices here. Rendering each letter as it's own object would be a bit of an overkill. Rendering them to a texture and them pumping this texture to the GPU should be faster.

    I need to take a look at the code itself to see what we are doing. But if this can be fixed easily I guess as it seems to be introduced recently. But let me take a look at the code first.

     

    burr

    MP Donator
  • Premium Supporter
  • May 13, 2006
    175
    47
    Home Country
    Sweden Sweden
    Dynamic Textures cannot be used with a managed D3D Pool. Or in D3D terms. D3DUSAGE_DYNAMIC and D3DPOOL_MANAGED are incompatible.

    In this case it's about the Vertex Buffers. Static Vertex Buffers are placed into video memory and dynamic ones in the AGP memory. If D3DUSAGE_DYNAMIC is not specified the vertex buffers are made static.

    The only reason to use dynamic vertex buffers is that you don't have to lock them. Locking has huge performance penalties as the lock forces a wait until the GPU finished reading vertex/inde data from the buffer before control is given back to an app. Locking a static buffer several times per frame prevents the GPU from buffering rendering commands. Without buffered commands the GPU remains idle until the app finished filling the vertex buffer/index buffer.

    Normally the vertex or index data should not change. There are of course applications where this is needed on every frame. This is the only reason to use D3DUSAGE_DYNAMIC.

    So if we don't change vertex/index data no need of D3DUSAGE_DYNAMIC should be given. Need to take a look at the code itself what we do with the vertex buffers. But honestly the vertex buffer should be the always the same. At least during one frame. Locking between frames would be OK, but still has performance penalties.

    Subtitles should be rendered to a texture, and the texture is displayed with the same vertices anyway. Don't really see the need to change the vertices here. Rendering each letter as it's own object would be a bit of an overkill. Rendering them to a texture and them pumping this texture to the GPU should be faster.

    I need to take a look at the code itself to see what we are doing. But if this can be fixed easily I guess as it seems to be introduced recently. But let me take a look at the code first.


    Have you had any time to look at the code?
     

    Users who are viewing this thread

    Similar threads

    I'm running 2.5 with the WMC skin. I have .mp4 files, along with the related .srt files in the same folder. I can watch the movies just fine. In past versions of MP, like 2.4x, I could press the More Info button on my remote twice, and on the second press, an option for showing/choosing the subtitles was listed. I'd select the...
    I'm running 2.5 with the WMC skin. I have .mp4 files, along with the related .srt files in the same folder. I can watch the...
    I'm running 2.5 with the WMC skin. I have .mp4 files, along with the related .srt files in the same folder. I can watch the...
    Replies
    0
    Views
    3K
    Maybe [News] - MediaPortal 1.33 Pre-Release with new x64 version ready for testing
    Maybe [News] - MediaPortal 1.33 Pre-Release with new x64 version ready for testing
    After a long time I built a new HTPC. Everything went well. Just one problem. I imported the old recordings and can see them in the...
    Replies
    4
    Views
    424
    Reading through your code, I can see it's more than a couple steps above my paygrade. :cry:
    Reading through your code, I can see it's more than a couple steps above my paygrade. :cry:
    I used to run the TVService under the "NT Service\TVService" account to follow least privileges principal (not exposing my whole...
    Replies
    3
    Views
    2K
    Hi mate, As usual, you are always first up with an offer of assistance, and I really appreciate it. So sorry I haven't replied. I'll send you a PM now. Cheers, Steve.
    Hi mate, As usual, you are always first up with an offer of assistance, and I really appreciate it. So sorry I haven't replied...
    It appears that MP somehow caches previously used subtitle files for subsequent use next time the same video is played. My problem...
    Replies
    2
    Views
    2K
    If you’re planning to submit a pull request, let’s go through the list of issues and their solutions. I or someone from the team will create a Jira ticket, and for each ticket, you’ll make the changes and submit a pull request. This will be transparent and straightforward.
    If you’re planning to submit a pull request, let’s go through the list of issues and their solutions. I or someone from the team...
    I'm very glad to see that mediaportal 1 is on github, where ordinary devs with github accounts can make contributions. Please can...
    Replies
    7
    Views
    1K
    Top Bottom