Recent

Author Topic: libmpv media player control  (Read 10708 times)

domasz

  • Hero Member
  • *****
  • Posts: 625
Re: libmpv media player control
« Reply #30 on: January 08, 2024, 05:25:00 pm »
Fixed my FullScreen code above. It was making main form a bit too big. Now it's good.

Espectr0

  • Full Member
  • ***
  • Posts: 240
Re: libmpv media player control
« Reply #31 on: January 08, 2024, 08:46:41 pm »
Fixed my FullScreen code above. It was making main form a bit too big. Now it's good.

Excellent! Thanks for sharing!  :D

domasz

  • Hero Member
  • *****
  • Posts: 625
Re: libmpv media player control
« Reply #32 on: January 10, 2024, 12:35:11 pm »
Here's something that would be nice to have but I can't figure out the params.
https://mpv.io/manual/master/#command-interface-screenshot-raw

Espectr0

  • Full Member
  • ***
  • Posts: 240
Re: libmpv media player control
« Reply #33 on: January 17, 2024, 01:52:40 am »
Here's something that would be nice to have but I can't figure out the params.
https://mpv.io/manual/master/#command-interface-screenshot-raw

I think the easiest way would be a procedure like this:

Code: Pascal  [Select][+][-]
  1. procedure TMPVPlayer.ScreenshotToClipboard(const AScreenshotMode: TMPVPlayerScreenshotMode = smVideo);
  2. var
  3.   s : String;
  4.   p : TPicture;
  5. begin
  6.   s := ChangeFileExt(GetTempFileName, '.png');
  7.   ScreenshotToFile(s, AScreenshotMode);
  8.   if FileExists(s) then
  9.   begin
  10.     p := TPicture.Create;
  11.     try
  12.       p.LoadFromFile(s);
  13.       Clipboard.Assign(p.Bitmap);
  14.     finally
  15.       p.Free;
  16.     end;
  17.     DeleteFile(s);
  18.   end;
  19. end;                                                                          
  20.  

 

TinyPortal © 2005-2018