//
unit bspplg;

interface

uses Windows;

type pluginInfo=record
  description:array[0..255] of char; //Filled in by plugin
  plgCallback:function(const cmdID:DWORD;param1,param2:pointer):integer;stdcall; //Filled in by plugin

  hwndParent:HWND;//Filled in by BSPlayer
  hwndVideoWin:HWND;//Filled in by BSPlayer

  execAction:procedure(const a_action:integer);stdcall;//Filled in by BSPlayer

  //Subtitle functions
  // Register additional extension for subtitles
  //  subRegisterExt('*.mysub1;*.mysub2');
  //  for every registered extension function plgCallback will be called with cmdID EV_LOAD_SUB and param1 as file name
  subRegisterExt:procedure(const ext:Pchar);stdcall;//Filled in by BSPlayer
  createSubs:function(const subName:PChar):integer;stdcall;//Filled in by BSPlayer
  addLine:function(const subID,substart,substop:DWORD;subLine:Pchar):integer;stdcall;//Filled in by BSPlayer
  activateSubs:procedure(const subID:integer);stdcall;//Filled in by BSPlayer

  //OSD functions
  // showTime - How long should OSD be displayed
  // OSDid - must be >=50000 or 0
  ShowOSDText:procedure(const osdText:Pchar;const showTime,OSDid:DWORD);stdcall;//Filled in by BSPlayer

end;
type PpluginInfo=^pluginInfo;

//events
const
  EV_UNLOAD              = 40000; //plugin is unloading
  EV_BEFORE_FILE_OPEN    = 40001; //Called before file is loaded, param1 - pointer to filename
  EV_FILE_OPEN           = 40002; //Called after file is loaded (movie is open), param1 - pointer to filename
  EV_CONFIG              = 40003; //param1 - window handle
  EV_ABOUT               = 40004; //param1 - window handle
  EV_LOAD_SUB            = 40005; //param1 - file name and path to subtitle file
  EV_PLAY                = 40006;
  EV_STOP                = 40007;
//  EV_OSD                 = 40008; //Called on every OSD message, param1 pointer to OSD text


implementation

end.