简体   繁体   中英

Delphi XE2: firemonkey playing video with libvlc?

I am still trying to play video on firemonkey using directx api with libvlc! I have played video using by different way already but I want to play video on directx surface.

please looked this link first : http://forum.videolan.org/viewtopic.php?f=32&t=82618

someone write a delphi code about how to use libvlc on directx and that code working well, but this code is pure directx code. I want to integrate this code to firemonkey! How can I do it with firemonkey library(I know for windows firemonkey using directx library too but firemonkey libraries (interfaces, classes, objects) naming and using so different then directx!

Where I am now:

I almost integrate this pure directx code to firemonkey using with "Winapi.Direct3D9, Winapi.D3DX9, FMX.Context.DX9" libraries

I can access to IDirect3DDevice9 object in firemonkey Context!

var
   Device: IDirect3DDevice9;
begin
   Device := TCustomDirectXContext(TCustomForm3D(ParentForm).Context).Device;
   Device.CreateTexture(video_width, video_height, 1, D3DUSAGE_DYNAMIC, D3DFMT_A8R8G8B8, D3DPOOL_DEFAULT, vlcVideoTexture, nil);
   Device.CreateTexture(video_width, video_height, 1, 0, D3DFMT_A8R8G8B8, D3DPOOL_SYSTEMMEM, vlcMemoryTexture, nil);
end;

That code in here working completely in firemonkey but you will see the result object of this code type is IDirect3DTexture9 , this object contains frame buffer of video, i just need to render this object to on some control in firemonkey form.

How can I draw this buffer to firemonkey canvas?

I am waiting good delphi developers solutions.

Thanks

我认为用LibVlc尝试Direct3D是不可能的,因为libvlc请求到任何窗口播放视频的句柄,以任何形式播放都可以,因为它们具有有效的句柄。

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM