3

I am trying with no success to output video using LibVLC dll (www.videolan.org) from Delphi firemonkey, the only function I found is libvlc_media_player_set_hwnd(p_mi,Handle); where handle is a windows handle.
However in my case I would like to run the video in 3D surface created with Firemonkey (FMX library). Tlayer3d or Tlayout3D compo does not expose any handle directy useable with LibVcl.. any idea welcome !

Thanks

RRUZ
  • 134,889
  • 20
  • 356
  • 483
Safirxps
  • 37
  • 2
  • 3
    In FMX, the handle has to be converted. In unit `FMX.PlatForm.Win` there is a function to convert a FMX handle to a valid windows handle. In this case use it like :`FmxHandleToHWND(Form1.Handle)` in your call. I don't think the `TLayer3D` or `TLayout3D` exposes any handles at all. – LU RD Jan 08 '12 at 22:45
  • You may also have some more input by this SO question : [delphi-xe2-how-can-i-play-video-files-with-firemonkey](http://stackoverflow.com/questions/8130097/delphi-xe2-how-can-i-play-video-files-with-firemonkey). – LU RD Jan 08 '12 at 23:01
  • I tried FmxHandleToHWND and it returns correctly the window handle which is already a good progress, however I have to investigate more in order to draw direct on the surface like Tlayer3D or Tlayout3D where these components does not have any valid window handle. – Safirxps Jan 09 '12 at 18:31
  • I don't think playing videos is as easy as that. Take a look at the sample application and adapt it for Delphi. Also, take a look at questions by relativ, who is doing the same thing, and got it working: http://stackoverflow.com/questions/8206763/delphi-xe2-how-to-define-not-members-of-a-class-functions-in-the-component-unit – Marcus Adams Jan 10 '12 at 18:37
  • This is right playing video is not so easy, I succesfully play video on FMX form now, but tried to embed this fmx form into any fmx 3D object like TLayout3D, I saw relativ did the job, but does know how to do yet. by the way thanks for the link. – Safirxps Jan 11 '12 at 19:31

1 Answers1

0

you can use my opensource delphi component

https://github.com/relativ/firemonkey-libvlc

relativ
  • 665
  • 1
  • 7
  • 18