VLC kurulumu yapmadan sadece sisteminizde kurulu VLC'nin iki DLL dosyasını ve PLUGINS klasörünü alsanız, proje klasörüne sizin programınızın eki şeklinde kopyalasanız sizi kurtarır mı ?
VLC dll'leri LGPL lisansı olduğundan araştırın ve teyit edin ancak bildiğim kadarıyla yanında adını kodunu değiştirmediğinizde serbest olarak biliyorum. bkz:
https://www.videolan.org/legal.html
What are the usage restrictions for VideoLAN software?
Short answer: there are none.
You can use the software in the way you want (within the boundary of law), for personal, educational, research, military, governmental, professional purpose or any other way…
May I redistribute a piece of VideoLAN software?
Yes, you may distribute an original or a modified version of a piece of VideoLAN software as long as you comply with its license terms.
Most pieces of software from VideoLAN are licensed under the GNU General Public License Version 2 (referred herein as GPL).
You will find a license file named COPYING in all our products.
Note: You do not need to ask VideoLAN the permission to distribute VideoLAN software!
İLAVE :
----------
Bilgisayar başına geçtim bir örnek (eski test projelerimden birinden devşirdim)
Boş bir VCL proje açın bir Button br Panel koyun bu kadar aşağıdaki kodu uygulayın.
Derlediğiniz EXE klasörüne aşağıdaki VLC DLL dosyalarını koyun :
libvlccore.dll
libvlc.dll
bir de bu DLL dosyaların aldığınız klasördeki
plugins klasörünü olduğu gibi koyun.
Sonra sistemde kurulu olan VLCPlayer uygulamasını UYGULAMALAR altında UNINSTALL ederek kaldırın ki kullanıcı yakasında kurulu değilken de çalışabildiğini canlı olarak test etmiş olun.
Projeyi çalıştırın butona basıp bir tane video dosyası seçin.
Sonuç sizi tatmin ediyorsa bu işlemi PasLibVLC paketiyle (eski bildiğiniz şekilde) yapabilirsiniz. Zaten o paketin bir kısmı kod örneğindeki DLL erişimini yapıyor diğeri de HELPER CLASS olarak Player oluşturuyor.
const
Flibvlc = 'libvlc.dll';
type
Flibvlc_instance_t = Pointer;
Flibvlc_media_t = Pointer;
Flibvlc_media_player_t = Pointer;
function libvlc_new(argc: Integer; argv: PPAnsiChar): Flibvlc_instance_t; cdecl; external Flibvlc;
procedure libvlc_release(inst: Flibvlc_instance_t); cdecl; external Flibvlc;
function libvlc_media_new_path(inst: Flibvlc_instance_t; path: PAnsiChar): Flibvlc_media_t; cdecl; external Flibvlc;
procedure libvlc_media_release(media: Flibvlc_media_t); cdecl; external Flibvlc;
function libvlc_media_player_new_from_media(media: Flibvlc_media_t): Flibvlc_media_player_t; cdecl; external Flibvlc;
procedure libvlc_media_player_release(mp: Flibvlc_media_player_t); cdecl; external Flibvlc;
procedure libvlc_media_player_set_hwnd(mp: Flibvlc_media_player_t; drawable: HWND); cdecl; external Flibvlc;
procedure libvlc_media_player_play(mp: Flibvlc_media_player_t); cdecl; external Flibvlc;
procedure libvlc_media_player_stop(mp: Flibvlc_media_player_t); cdecl; external Flibvlc;
var
FVLC : Flibvlc_instance_t;
FMedia : Flibvlc_media_t;
FPlayer : Flibvlc_media_player_t;
procedure TForm1.BitBtn1Click(Sender: TObject);
var
LFileName: String;
begin
with TOpenDialog.Create(nil) do
try
if NOT Execute then exit;
LFileName := FileName;
if FPlayer <> nil then
begin
libvlc_media_player_stop(FPlayer);
libvlc_media_player_release(FPlayer);
FPlayer := nil;
end;
FMedia := libvlc_media_new_path(FVLC, PAnsiChar( AnsiString(LFileName) ));
FPlayer := libvlc_media_player_new_from_media(FMedia);
libvlc_media_player_set_hwnd(FPlayer, Panel1.Handle);
libvlc_media_player_play(FPlayer);
finally
Free;
end;
end;
procedure TForm1.FormCreate(Sender: TObject);
begin
ReportMemoryLeaksOnShutdown := TRUE;
FVLC := libvlc_new(0, nil);
FMedia := nil;
FPlayer := nil;
end;
procedure TForm1.FormDestroy(Sender: TObject);
begin
if FPlayer <> nil then
begin
libvlc_media_player_stop(FPlayer);
libvlc_media_player_release(FPlayer);
end;
if FMedia <> nil then
libvlc_media_release(FMedia);
if FVLC <> nil then
libvlc_release(FVLC);
end;