AGB  ·  Datenschutz  ·  Impressum  







Anmelden
Nützliche Links
Registrieren
Zurück Delphi-PRAXiS Programmierung allgemein Multimedia Delphi DirectX9 Header für 64Bit
Thema durchsuchen
Ansicht
Themen-Optionen

DirectX9 Header für 64Bit

Ein Thema von EWeiss · begonnen am 17. Sep 2018 · letzter Beitrag vom 18. Sep 2018
 
EWeiss
(Gast)

n/a Beiträge
 
#9

AW: DirectX9 Header für 64Bit

  Alt 17. Sep 2018, 22:31
Geht immer noch nicht wirklich.
1 Fehler in VMR7 Renderer funktioniert in 32Bit aber nicht in 64Bit

Fehler!
COM Error 0x80040227, The operation could not be performed because the filter is in the wrong state.
oder
COM Error 0x80040227, Der Vorgang konnte nicht ausgeführt werden, da der Filterstatus falsch ist.'

Delphi-Quellcode:
function TVMR7.SetBitmapFromImage(Image_: TBitmap; nAlpha: word; bitmapRect: TRECT): BOOL;
var
  hr: HRESULT;
  nRect: VMR9NormalizedRect;
  sRect, dRect: TRECT;
begin
  result := false;

  if (VMR7MixerBitmap = nil) then
  begin
       m_ErrorDescription := ReportError('Can''t set bitmap, no VMR7MixerBitmap', E_FAIL);
    exit;
  end;

  if Image_ = nil then
  begin
    alphaBitmap7.dwFlags := VMRBITMAP_DISABLE;
    hr := VMR7MixerBitmap.SetAlphaBitmap(alphaBitmap7);
    result := (SUCCEEDED(hr));
    if result then
      bIsOverlayImage := false;
    exit;
  end;

  // Accept only 32bit ARGB or 24bit RGB formatted image
  if (Image_.PixelFormat <> pf32bit) and (Image_.PixelFormat <> pf24bit) then
  begin
       m_ErrorDescription := ReportError('not a supported bitmap format', E_FAIL);
    exit;
  end;

  if not PrepareDDSurface(Image_, bitmapRect) then
    exit;

  if FAILED(m_pWindowless.GetVideoPosition(sRect, dRect)) then
    exit;

  nRect := NormalizeRect(sRect, bitmapRect);
  alphaBitmap7.dwFlags    := VMRBITMAP_ENTIREDDS;
  alphaBitmap7.hdc            := 0;
  alphaBitmap7.pDDS         := m_pDDSurface;
  alphaBitmap7.rDest.top   := nRect.top;
  alphaBitmap7.rDest.left := nRect.left;
  alphaBitmap7.rDest.bottom := nRect.bottom;
  alphaBitmap7.rDest.right    := nRect.right;
  alphaBitmap7.fAlpha       := nAlpha / 255.0;
  alphaBitmap7.clrSrcKey   := 0;

  // SHOW the bitmap
  hr := VMR7MixerBitmap.SetAlphaBitmap(alphaBitmap7); // Fehler nur unter 64Bit

  m_pWindowless.RepaintVideo(m_hMediaWindow, m_hMediaDC);
  result := (SUCCEEDED(hr));
  if result then
    bIsOverlayImage := true;
end;
getestet mit meinen und den direkten Headern von Emba /rtl/win
Der Video Renderer meldet keine Fehler (Filme spielen gut ab) nur das mit dem Overlay Bitmap will nicht.

gruss

Geändert von EWeiss (17. Sep 2018 um 23:25 Uhr)
  Mit Zitat antworten Zitat
 


Forumregeln

Es ist dir nicht erlaubt, neue Themen zu verfassen.
Es ist dir nicht erlaubt, auf Beiträge zu antworten.
Es ist dir nicht erlaubt, Anhänge hochzuladen.
Es ist dir nicht erlaubt, deine Beiträge zu bearbeiten.

BB-Code ist an.
Smileys sind an.
[IMG] Code ist an.
HTML-Code ist aus.
Trackbacks are an
Pingbacks are an
Refbacks are aus

Gehe zu:

Impressum · AGB · Datenschutz · Nach oben
Alle Zeitangaben in WEZ +1. Es ist jetzt 21:29 Uhr.
Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
LinkBacks Enabled by vBSEO © 2011, Crawlability, Inc.
Delphi-PRAXiS (c) 2002 - 2023 by Daniel R. Wolf, 2024-2025 by Thomas Breitkreuz