至今比較滿意的delphi多媒體組件PasLibVlc3.0最新(可以播放各種視頻格式)


1、PasLibVlc是vlc for delphi的組件

2、可以播放已知的各種視頻格式:avi,mp4,wmv,kmv,rm等等。

3、使用方法也非常容易:

  播放:

var
  p_mi: libvlc_media_player_t_ptr;
begin
  PasLibVlcPlayer1.Play(Self.CheckListBox1.items[
    Self.CheckListBox1.itemindex]);
  ProgBar.OnChange := nil;

  Sleep(2000);

  p_mi := PasLibVlcPlayer1.GetPlayerHandle();

  libvlc_video_set_marquee_string(p_mi, libvlc_marquee_Text, 'ABC');
  libvlc_video_set_marquee_int(p_mi, libvlc_marquee_Color, libvlc_video_marquee_color_White);
  libvlc_video_set_marquee_int(p_mi, libvlc_marquee_Opacity, libvlc_video_marquee_opacity_full);
libvlc_video_marquee_position_Center);
  libvlc_video_set_marquee_int(p_mi, libvlc_marquee_X, 10);
  libvlc_video_set_marquee_int(p_mi, libvlc_marquee_Y, 10);
after xx ms, 0 - show always
  libvlc_video_set_marquee_int(p_mi, libvlc_marquee_Enable, 1);

  libvlc_video_set_logo_string(p_mi, libvlc_logo_File, PAnsiChar(UTF8Encode(ExtractFilePath(Application.ExeName) + 'logo.png')));
  libvlc_video_set_logo_int(p_mi, libvlc_logo_Delay, 10);
  libvlc_video_set_logo_int(p_mi, libvlc_logo_Repeat, 10);
  libvlc_video_set_logo_int(p_mi, libvlc_logo_Position, libvlc_video_logo_position_Center);
  libvlc_video_set_logo_int(p_mi, libvlc_logo_Opacity, 255);
  libvlc_video_set_logo_int(p_mi, libvlc_logo_Enable, 1);

end;

  暫停:

  PasLibVlcPlayer1.Pause();
  ProgBar.OnChange := ProgBarChange;

  繼續:

  PasLibVlcPlayer1.Resume();
  ProgBar.OnChange := nil;

  截圖:

  PasLibVlcPlayer1.SnapShot(ChangeFileExt(Application.ExeName, '.png'));

  到指定的時間處播放:

 PasLibVlcPlayer1.SetVideoPosInMs(1000*60*5);//到視頻的5分鍾處

  顯示當前播放時間:

     ProgLabel1.Caption := PasLibVlcPlayer1.GetVideoPosStr('hh:mm:ss.ms');
     ProgBar.Position := PasLibVlcPlayer1.GetVideoPosInMs();

  總時間:

  ProgLabel2.Caption := PasLibVlcPlayer1.GetVideoLenStr();
  ProgBar.Max := PasLibVlcPlayer1.GetVideoLenInMs();

  引用:

uses PasLibVlcUnit, PasLibVlcClassUnit, PasLibVlcPlayerUnit;

  

  最新PasLibVlc 3.0組件下載地址(支持  • Delphi 10.2.2 Tokyo  • Lazarus 1.8.0 (FPC 3.0.4).)


免責聲明!

本站轉載的文章為個人學習借鑒使用,本站對版權不負任何法律責任。如果侵犯了您的隱私權益,請聯系本站郵箱yoyou2525@163.com刪除。



 
粵ICP備18138465號   © 2018-2025 CODEPRJ.COM