Recent

Author Topic: How can I draw bitmap above vlc component ?  (Read 5673 times)

Muhannad.Alrusayni

  • Newbie
  • Posts: 6
How can I draw bitmap above vlc component ?
« on: February 21, 2015, 08:02:50 pm »
Hi all, this is my first time in this community

I'm working in my first project , it's for makeing a lessons.
it will be for Linux and Windows in the begin. anyway .. the idea of my project will be
Get a video that has the lessons .. and put it into my program and add some messages and arrows.. these stuffs.
then merge the video with these image and make a new video.. that's it.

now, in my way to do this project .. I got problem
I want play the video useing vlc(TPasLibVlcPlayer) and I did that, but I coudn't draw in images above the TPasLibVlcPlayer..

now the qestion is how can I draw bitmap above vlc component ?


I'll be hapy if give my some hints and sugestions in my project
and sorry for my English if I made some mistakes
note : I'm not sure if the this is the right section for my qestion .. sorry if I put it in the wrong section

Muhannad.Alrusayni

  • Newbie
  • Posts: 6
Re: How can I draw bitmap above vlc component ?
« Reply #1 on: February 21, 2015, 11:59:10 pm »
if I coulde draw the output in Tbitmap insted of TPanel, I think this will solve the probelm
...
I could do something like this :
Code: [Select]
var
  Bmp: TBitmap;
begin
  if Player.IsPlay() then
  begin
    Bmp := TBitmap.Create;
    try
      Bmp.Width := Player.Width;
      Bmp.Height := Player.Height;
      Bmp.Canvas.Lock;
      Player.PaintTo(Bmp.Canvas, 0, 0);  // Player = TPasLibVlcPlayer
      Bmp.Canvas.Unlock;
      Image.Picture.Bitmap.Assign(Bmp); // TImage
    finally
      Bmp.Free;
    end;
  end;
end;
but when I hide the Player I don't get a picture in image .. becuse PaintTo can't get the image for Player.

so any idea will be helpful, thanks in advance.

engkin

  • Hero Member
  • *****
  • Posts: 3112
Re: How can I draw bitmap above vlc component ?
« Reply #2 on: February 22, 2015, 12:37:21 am »
I think you should get the video streamed to memory and install callback functions. I got this idea from this page. You still need to deal with finer details, like image format for instance.

Muhannad.Alrusayni

  • Newbie
  • Posts: 6
Re: How can I draw bitmap above vlc component ?
« Reply #3 on: February 22, 2015, 07:30:35 pm »
thx I'll check this

 

TinyPortal © 2005-2018