Difference between revisions of "Talk:ExternalAPI"

From VideoLAN Wiki
Jump to navigation Jump to search
m (Replace usernames with user page links and talk page links so Special:WantedPages ignores those)
 
(5 intermediate revisions by 4 users not shown)
Line 1: Line 1:
<div id="nolabel" style="overflow:auto;height:1px;">
+
Comments
  
[http://www.action-meds.com cheap butalbital]
+
== Exception ==
[http://www.5stardrugs.com buy tramadol]
 
[http://www.24-7pills.net tramadol online]
 
[http://www.american-meds.net butalbital discount]
 
[http://www.amazing-pills.com butalbital cheap]
 
buy tramadol online. online tramadol from our pharmacy, taking tramadol buy information tramadol, side effects tramadol, purchase tramadol online. cod online tramadol, tramadol india, cheap tramadol online, tramadol online, pharmacy online store
 
tramadol 50 mg. low price tramadol, tramadol pain treatment - tramadol hcl 50? - 120 tramadol. tramadol sales, buying cod tramado l, tramadol for humans, cheap tramadol online, overdose tramadol. order tramadol pictured tramadol pill tramadol seizure. cod tramadol cod, tramadol pdr, order pharmacy tramadol. buy prescription tramadol drug tramadol - tramadol side.
 
is tramadol a, order tramadol online, tramadol hcl, tramadol drug test .tramadol uses order tramadol overnight paypal tramadol
 
tramadol com tramadol tablets tramadol no perscription remove tramadol.
 
[http://20six.co.uk/cheaptramadol cheap tramadol]
 
[http://20six.co.uk/ordertramadol order tramadol]
 
[http://20six.co.uk/onlinetramadol1 online tramadol]
 
[http://20six.co.uk/tramadolonline tramadol online]
 
[http://20six.co.uk/tramadoldiscount tramadol discount]
 
[http://20six.co.uk/purchasetramadol purchase tramadol]
 
[http://20six.co.uk/ordersoma order soma]
 
[http://20six.co.uk/onlinesoma1 online soma]
 
[http://20six.co.uk/online-viagra online viagea]
 
[http://20six.co.uk/orderviagra order viagra]
 
[http://20six.co.uk/cheapviagraonline cheap viagra online]
 
[http://20six.co.uk/purchaseviagra purchase viagra]
 
[http://20six.co.uk/cheap-ultram cheap ultram]
 
  
[http://spaces.msn.com/cheap-tramadol/ cheap tramadol]
+
A "libvcl_exception * libvlc_exception_create(void)" function should be great.
[http://spaces.msn.com/buy-viagra/ buy viagra]
+
Actualy, the API let use an opaque exception structure but you need to know the structure size anyway !
  
SEO: UndoneHeaven
+
== Vout ==
  
[http://www.replicahours.com rolex replica]
+
toggle_fullscreen() is useless from an embedder point of view: if I am writing an application, I need to set the movie fullscreen or not. Which makes me think that the same reasoning should apply to audio_mute: we should rather have set_mute/get_mute: the status of mute is of interest for an application developer.
[http://www.replicahours.com/index.php?cPath=51_25 fake rolex daydate]
 
[http://www.replicahours.com/index.php?cPath=29 replica swiss]
 
[http://www.google.com/search?sourceid=navclient&gfns=1&ie=UTF-8&q=replicahours replicahours]
 
buy replica cheap best price rolex discounf fake. watches fake watch online store using paypal fedex rolex replicahours. order rolex replica now. cheap wholesale fake rolex online free shipping. 80% discount rolex replica and replicas watches. woman how to adjust a chronometer watch authorized rolex dealer, rolex watches rolex dial rolex oyster perpetual date reloj panerai replica en usa rolex watches serial numbers rolex woman daytona daytona watch replica panerai watch rolex 50th anniversary rolex daytona paul newman replica rolex buy rolex watches. ladies rolex yachtmaster white dial faux. rolex daytona manual cellini rolex for sale pictures of rolex oyster perpetual datejust rolex rolex gmt-master ii buying rolex on line fake rolex daytona gold on silver how to tell fake tag rolex oyster perpetual new tell. Replica rolex? Swiss made replica rolex watch! Cost does fake much rolex rolex presidential rolex. Rolex dials rolex sea dweller. Rolex  tudor fake rolex turkey datejust oyster perpetual rolex man rolex submariner cosmograph daytona oyster professional rolex? Datejust rolex rolex replica rolex fake rolexes for sale. Rolex submariner for sale, rolex yachtmaster! Explorer ii rolex preowned rolex watch? Cheap rolex watch, rolex daytona 116520 forum rolex. 18k gold replica ex part rolex daytona review rolex submariner 50 anniversary rolex cellini replica rolex watch fake rolex omega?
 
  
[http://www.customsoftwarenow.com custom software development]
+
[[User:Zorglub|Zorglub]] ([[User talk:Zorglub|talk]]) Yes. I was thinking about actually putting both options for simplicity.
Software Development, custom software development, offshore  software development, outsourcing software development
 
  
[http://www.thepublish.com press release]
+
[[User:OlivierAubert|OlivierAubert]] ([[User talk:OlivierAubert|talk]]) Both options can be a little redundant, but it does not cost much anyway.
press release, articles, business directory, ezines, classifieds, job search,business free  b2b search advertising aerospace defense agriculture airlines automotive chemicals computers electronics semiconductors energy utilities
 
  
[http://www.ez-agents.com wholesale atv]
+
== Playlist ==
</div>
+
 
 +
[[User:Zorglub|Zorglub]] ([[User talk:Zorglub|talk]]) I don't really know how to handle playlist retrieval as VLC playlist is not a simple list ...
 +
 
 +
[[User:OlivierAubert|OlivierAubert]] ([[User talk:OlivierAubert|talk]]) Yes, but it is a needed functionality anyway. We can defined a flattened view of the  playlist, which will not exactly map to the playlist but be a reasonable view.
 +
 
 +
== VLM ==
 +
 
 +
[[User:Dionoea|Dionoea]] ([[User talk:Dionoea|talk]]) Something like libvlc_vlm_cmd( libvlc_instance *, char *cmd, libvlc_exception ) could be usefull. This would let the enduser do whatever he wants with vlm easily.
 +
 
 +
== autogeneration? ==
 +
 
 +
I have been cutting and pasting out of this page into my code, and a number of the function names and arguments are slightly wrong.  I have corrected a few.  Is there a way to autogenerate *just* these API calls out of the sources? [[User:Davidlallen|Davidlallen]] 22:57, 20 August 2007 (CEST)
 +
 
 +
It is possible to have a look to the doxygen [http://www.videolan.org/developers/vlc/doc/doxygen/html/group__libvlc.html autogenerated documentation] to have up-to-date names extracted from the source code. Copy as text the first part (summary docs), paste into a file, then apply a <code>grep -v '^ '</code> on this file and you will have a quite good listing of its API. [[User:Thannoy/stripped_Libvlc_API| Here]] is a fast (not perfect) generation. --[[User:Thannoy|Thannoy]] 11:29, 1 March 2008 (CET)
 +
 
 +
== Delphi port ==
 +
VLC API as changed a lot seens I've made the Delphi port...but there's no up to date documentation of the new API so I will not update my code...in fact, I've tried with last release (0.9.9) with both this Wiki and doxygen, but libvlc_new() just hang the application after some debug messages.
 +
 
 +
<pre>
 +
program VLC99;
 +
 
 +
{$APPTYPE CONSOLE}
 +
 
 +
uses
 +
  Windows;
 +
 
 +
function getLibPath: string;
 +
var
 +
  Handle: HKEY;
 +
  RegType: Integer;
 +
  DataSize: Integer;
 +
begin
 +
  Result := '';
 +
  if (RegOpenKeyEx(HKEY_LOCAL_MACHINE, 'Software\VideoLAN\VLC', 0, KEY_ALL_ACCESS, Handle) = ERROR_SUCCESS) then
 +
  begin
 +
    if RegQueryValueEx(Handle, 'InstallDir', nil, @RegType, nil, @DataSize) = ERROR_SUCCESS then
 +
    begin
 +
      SetLength(Result, Datasize);
 +
      RegQueryValueEx(Handle, 'InstallDir', nil, @RegType, PByte(@Result[1]), @DataSize);
 +
      Result[DataSize]:='\';
 +
    end;
 +
    RegCloseKey(Handle);
 +
  end;
 +
end;
 +
 
 +
type
 +
  libvlc_exception = record
 +
    raised : Integer;
 +
    code  : Integer;
 +
    Msg    : PChar;
 +
  end;
 +
 
 +
var
 +
  path    : string;
 +
  lib    : THandle;
 +
  core    : THandle;
 +
  init    : function(argc: Integer; args: PPChar; var excpt: libvlc_exception): Pointer; cdecl;
 +
  args    : array[0..1] of PChar;
 +
  plugins : string;
 +
  excpt  : libvlc_exception;
 +
  vlc    : Pointer;
 +
begin
 +
  path := getLibPath;
 +
  // load core dll first
 +
  core := LoadLibrary(PChar(path + 'libvlccore.dll'));
 +
  if core = 0 then
 +
    WriteLn('can''t load libvlccore');
 +
  lib := LoadLibrary(PChar(path + 'libvlc.dll'));
 +
  if lib = 0 then
 +
    WriteLn('can''t load libvlc');
 +
  @init := GetProcAddress(lib, 'libvlc_new');
 +
  if @init = nil then
 +
    WriteLn('can''t find libvlc_new()')
 +
  else
 +
  begin
 +
    FillChar(excpt, SizeOf(excpt), 0);
 +
    plugins := '--plugin-path=' + path + 'plugins';
 +
    args[0] := PChar(plugins);
 +
    args[1] := nil;
 +
    vlc := init(1, @args[0], excpt);
 +
    WriteLn('never executed !'); // :(
 +
  end;
 +
  WriteLn('done');
 +
  ReadLn;
 +
end.
 +
</pre>
 +
just display this and never return to the calling delphi application :
 +
<pre>
 +
[00000001] main libvlc debug: VLC media player - version 0.9.9 Grishenko - (c) 1
 +
996-2009 the VideoLAN team
 +
[00000001] main libvlc debug: libvlc was configured with ../configure  '--host=i
 +
586-mingw32msvc' '--build=i386-linux' '--enable-mkv' '--enable-release' '--witho
 +
ut-contrib' '--enable-nls' '--enable-shared-libvlc' '--enable-update-check' '--e
 +
nable-lua' '--enable-faad' '--enable-flac' '--enable-theora' '--enable-twolame'
 +
'--enable-quicktime' '--enable-real' '--enable-realrtsp' '--enable-ffmpeg' '--wi
 +
th-ffmpeg-mp3lame' '--with-ffmpeg-faac' '--with-ffmpeg-config-path=/usr/win32/bi
 +
n' '--with-ffmpeg-zlib' '--enable-live555' '--with-live555-tree=/usr/win32/live.
 +
com' '--en
 +
[00000001] main libvlc debug: translation test: code is "C"
 +
</pre>
 +
 
 +
--[[User:PaulTOTH|PaulTOTH]] 20:38, 3 May 2009 (CEST)

Latest revision as of 11:08, 21 January 2019

Comments

Exception

A "libvcl_exception * libvlc_exception_create(void)" function should be great. Actualy, the API let use an opaque exception structure but you need to know the structure size anyway !

Vout

toggle_fullscreen() is useless from an embedder point of view: if I am writing an application, I need to set the movie fullscreen or not. Which makes me think that the same reasoning should apply to audio_mute: we should rather have set_mute/get_mute: the status of mute is of interest for an application developer.

Zorglub (talk) Yes. I was thinking about actually putting both options for simplicity.

OlivierAubert (talk) Both options can be a little redundant, but it does not cost much anyway.

Playlist

Zorglub (talk) I don't really know how to handle playlist retrieval as VLC playlist is not a simple list ...

OlivierAubert (talk) Yes, but it is a needed functionality anyway. We can defined a flattened view of the playlist, which will not exactly map to the playlist but be a reasonable view.

VLM

Dionoea (talk) Something like libvlc_vlm_cmd( libvlc_instance *, char *cmd, libvlc_exception ) could be usefull. This would let the enduser do whatever he wants with vlm easily.

autogeneration?

I have been cutting and pasting out of this page into my code, and a number of the function names and arguments are slightly wrong. I have corrected a few. Is there a way to autogenerate *just* these API calls out of the sources? Davidlallen 22:57, 20 August 2007 (CEST)

It is possible to have a look to the doxygen autogenerated documentation to have up-to-date names extracted from the source code. Copy as text the first part (summary docs), paste into a file, then apply a grep -v '^ ' on this file and you will have a quite good listing of its API. Here is a fast (not perfect) generation. --Thannoy 11:29, 1 March 2008 (CET)

Delphi port

VLC API as changed a lot seens I've made the Delphi port...but there's no up to date documentation of the new API so I will not update my code...in fact, I've tried with last release (0.9.9) with both this Wiki and doxygen, but libvlc_new() just hang the application after some debug messages.

program VLC99;

{$APPTYPE CONSOLE}

uses
  Windows;

function getLibPath: string;
var
  Handle: HKEY;
  RegType: Integer;
  DataSize: Integer;
begin
  Result := '';
  if (RegOpenKeyEx(HKEY_LOCAL_MACHINE, 'Software\VideoLAN\VLC', 0, KEY_ALL_ACCESS, Handle) = ERROR_SUCCESS) then
  begin
    if RegQueryValueEx(Handle, 'InstallDir', nil, @RegType, nil, @DataSize) = ERROR_SUCCESS then
    begin
      SetLength(Result, Datasize);
      RegQueryValueEx(Handle, 'InstallDir', nil, @RegType, PByte(@Result[1]), @DataSize);
      Result[DataSize]:='\';
    end;
    RegCloseKey(Handle);
  end;
end;

type
  libvlc_exception = record
    raised : Integer;
    code   : Integer;
    Msg    : PChar;
  end;

var
  path    : string;
  lib     : THandle;
  core    : THandle;
  init    : function(argc: Integer; args: PPChar; var excpt: libvlc_exception): Pointer; cdecl;
  args    : array[0..1] of PChar;
  plugins : string;
  excpt   : libvlc_exception;
  vlc     : Pointer;
begin
  path := getLibPath;
  // load core dll first
  core := LoadLibrary(PChar(path + 'libvlccore.dll'));
  if core = 0 then
    WriteLn('can''t load libvlccore');
  lib := LoadLibrary(PChar(path + 'libvlc.dll'));
  if lib = 0 then
    WriteLn('can''t load libvlc');
  @init := GetProcAddress(lib, 'libvlc_new');
  if @init = nil then
    WriteLn('can''t find libvlc_new()')
  else
  begin
    FillChar(excpt, SizeOf(excpt), 0);
    plugins := '--plugin-path=' + path + 'plugins';
    args[0] := PChar(plugins);
    args[1] := nil;
    vlc := init(1, @args[0], excpt);
    WriteLn('never executed !'); // :(
  end;
  WriteLn('done');
  ReadLn;
end.

just display this and never return to the calling delphi application :

[00000001] main libvlc debug: VLC media player - version 0.9.9 Grishenko - (c) 1
996-2009 the VideoLAN team
[00000001] main libvlc debug: libvlc was configured with ../configure  '--host=i
586-mingw32msvc' '--build=i386-linux' '--enable-mkv' '--enable-release' '--witho
ut-contrib' '--enable-nls' '--enable-shared-libvlc' '--enable-update-check' '--e
nable-lua' '--enable-faad' '--enable-flac' '--enable-theora' '--enable-twolame'
'--enable-quicktime' '--enable-real' '--enable-realrtsp' '--enable-ffmpeg' '--wi
th-ffmpeg-mp3lame' '--with-ffmpeg-faac' '--with-ffmpeg-config-path=/usr/win32/bi
n' '--with-ffmpeg-zlib' '--enable-live555' '--with-live555-tree=/usr/win32/live.
com' '--en
[00000001] main libvlc debug: translation test: code is "C"

--PaulTOTH 20:38, 3 May 2009 (CEST)