-
Notifications
You must be signed in to change notification settings - Fork 14
/
PasLibVlcPlayerUnit.txt
515 lines (333 loc) · 16.3 KB
/
PasLibVlcPlayerUnit.txt
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
2018.09.18 Fix Play declaration for compatible with D4
2018.07.13 Fix resize bug under FPC 1.8.x
reported by Mukataï Mukatai <[email protected]>
affected procedures:
procedure WMEraseBkgnd(var msg: ...); message ...;
2018.07.01 Add support for media callbacks
inspired by Mark Adamson <[email protected]>
new procedure:
procedure Play(stm : TStream, ...); overload;
2018.06.29 Remove duplicated code
affected procedures:
procedure Play (...); overload;
procedure PlayNormal (...); overload;
procedure PlayYoutube(...); overload;
2018.06.25 Fix copy paste bug
reported by bnop90 <[email protected]>
affected procedures:
procedure Play(mrl: WideString; mediaOptions : array of WideString; ...); overload;
2018.06.11 Extend parameters:
inspired by Wortmann Sándor <[email protected]>
affected procedures:
procedure TPasLibVlcMediaList.Add(mrl : WideString; mediaOptions : array of WideString);
2018.06.05 Correct PlayYoutube
reported by Ahmet Yeşilçimen <[email protected]>
2018.04.26 Correct version comment
2018.03.11 Update for better compatibility with libvlc 3.0.0
New events:
libvlc_MediaPlayerESAdded,
libvlc_MediaPlayerESDeleted,
libvlc_MediaPlayerESSelected,
libvlc_MediaPlayerAudioDevice,
libvlc_MediaPlayerChapterChanged,
libvlc_RendererDiscovererItemAdded,
libvlc_RendererDiscovererItemDeleted,
2018.01.02 Extend parameters:
inspired by "Christian Koch" <[email protected]>
required to add ":cdda-track=1" as option to the media
affected procedures:
procedure Play (mrl: WideString; mediaOptions : array of WideString; ...); overload;
procedure PlayNormal (mrl: WideString; mediaOptions : array of WideString; ...); overload;
procedure PlayYoutube(mrl: WideString; mediaOptions : array of WideString; ...); overload;
2017.12.05 New functions:
GetVideoSampleAspectRatio
2017.04.11 Correct media list event handler WillAddItem
reported by "Adolfo Ramirez" <[email protected]>
OnItemAdded => OnWillAddItem
2016.11.28 Update Equalizer function declarations for compile with BC6.
reported by "Woldemar Unknown" <[email protected]>
2016.10.18 Updated for compile under Lazarus 1.6.0 + FPC 3.0.0.
2016.10.08 Cleanup and add support for adjust video:
procedure SetVideoAdjustEnable(value : Boolean);
procedure SetVideoAdjustContrast(value : Single);
procedure SetVideoAdjustBrightness(value : Single);
procedure SetVideoAdjustHue(value : Single);
procedure SetVideoAdjustSaturation(value : Single);
procedure SetVideoAdjustGamma(value : Single);
function GetVideoAdjustEnable(): Boolean;
function GetVideoAdjustContrast() : Single;
function GetVideoAdjustBrightness() : Single;
function GetVideoAdjustHue():Single;
function GetVideoAdjustSaturation():Single;
function GetVideoAdjustGamma():Single;
2016.10.04 Update for better compatibility with libvlc 2.2.4
New functions:
GetAudioFilterList(): TStringList;
GetVideoFilterList(): TStringList;
2016.05.08 Update for allow change audio output
New functions:
GetAudioOutputList
GetAudioOutputDeviceList
GetAudioOutputDeviceEnum
SetAudioOutput
SetAudioOutputDevice
SetAudioOutputDevice
Changed functions:
Play
PlayNormal
PlayYoutube
New properties:
LastAudioOutput
LastAudioOutputDeviceId
2016.02.12 Update for better compatibility with libvlc 2.2.2
New events:
libvlc_MediaPlayerCorked
libvlc_MediaPlayerUncorked,
libvlc_MediaPlayerMuted,
libvlc_MediaPlayerUnmuted,
libvlc_MediaPlayerAudioVolume
2015.02.28 Updated for better support version 2.2.0
New functions:
EqualizerGetPresetList(): TStringList;
EqualizerGetBandCount(): Word;
EqualizerGetBandFrequency(bandIndex : Word): Single;
EqualizerCreate(APreset : Word = $FFFF) : TPasLibVlcEqualizer;
EqualizerApply(AEqualizer : TPasLibVlcEqualizer);
EqualizerSetPreset(APreset : Word = $FFFF);
GetAudioOutputDeviceEnumList(): TStringList;
SetAudioOutputDevice(aOut: WideString; device_id: WideString);
SetAudioOutputDevice(device_id: WideString);
New events:
libvlc_MediaPlayerVout
libvlc_MediaPlayerScrambledChanged
fix function SetAudioMute
reported by "Moisés Ribeiro" <[email protected]>
2015.02.01 New property:
MouseEventsHandler
inspired by: Beat Schlösser <[email protected]>
New functions:
GetAudioOutputList(): TStringList;
GetAudioOutputDeviceList(aOut : WideString): TStringList;
inspired by: Tom Wideroe <[email protected]>
GetVideoDimension(var width, height: LongWord): Boolean;
GetVideoChapterCountByTitleId(const title_id : Integer): Integer;
GetVideoSubtitleList(): TStringList;
GetVideoSubtitleCount(): Integer;
GetVideoSubtitleCountByTitleId(const title_id : Integer): Integer;
GetVideoSubtitleId(): Integer;
SetVideoSubtitleById(const subtitle_id : Integer);
GetVideoSubtitleNo(): Integer;
SetVideoSubtitleByNo(subtitle_no : Integer);
GetVideoSubtitleDescriptionById(const subtitle_id : Integer): WideString;
GetVideoSubtitleDescriptionByNo(subtitle_no : Integer): WideString;
SetVideoSubtitleFile(filename : WideString);
GetVideoTitleList() : TStringList;
GetVideoTitleCount(): Integer;
GetVideoTitleId():Integer;
SetVideoTitleById(const title_id:Integer);
GetVideoTitleNo(): Integer;
SetVideoTitleByNo(title_no : Integer);
GetVideoTitleDescriptionById(const track_id : Integer): WideString;
GetVideoTitleDescriptionByNo(title_no : Integer): WideString;
inspired by: Sebastián Mayorá <[email protected]>
Rename functions:
GetAspectRatio() to GetVideoAspectRatio()
SetAspectRatio() to SetVideoAspectRatio()
GetChannel() to GetAudioChannel()
SetChannel() to SetAudioChannel()
2015.01.31 New functions:
GetAudioOutputList(): TStringList;
GetAudioOutputDeviceList(aOut : WideString): TStringList;
inspired by: Tom Widerøe <[email protected]>
2015.01.06 New property
MouseEventsHandler
inspired by: Beat Schlösser <[email protected]>
New function:
GetVideoDimension(var width, height: LongWord): Boolean;
2014.07.12 Add new functions:
GetVideoChapterCountByTitleId(const title_id : Integer): Integer;
GetVideoSubtitleList(): TStringList;
GetVideoSubtitleCount(): Integer;
GetVideoSubtitleCountByTitleId(const title_id : Integer): Integer;
GetVideoSubtitleId(): Integer;
SetVideoSubtitleById(const subtitle_id : Integer);
GetVideoSubtitleNo(): Integer;
SetVideoSubtitleByNo(subtitle_no : Integer);
GetVideoSubtitleDescriptionById(const subtitle_id : Integer): WideString;
GetVideoSubtitleDescriptionByNo(subtitle_no : Integer): WideString;
SetVideoSubtitleFile(filename : WideString);
GetVideoTitleList() : TStringList;
GetVideoTitleCount(): Integer;
GetVideoTitleId():Integer;
SetVideoTitleById(const title_id:Integer);
GetVideoTitleNo(): Integer;
SetVideoTitleByNo(title_no : Integer);
GetVideoTitleDescriptionById(const track_id : Integer): WideString;
GetVideoTitleDescriptionByNo(title_no : Integer): WideString;
inspired by: Sebastián Mayorá <[email protected]>
rename functions:
GetAspectRatio() to GetVideoAspectRatio()
SetAspectRatio() to SetVideoAspectRatio()
GetChannel() to GetAudioChannel()
SetChannel() to SetAudioChannel()
2014.06.28 Add new functions:
MarqueeShowText();
MarqueeHide();
MarqueeSetText(marquee_text : WideString);
MarqueeSetPosition(position_x, position_y : Integer); overload;
MarqueeSetPosition(position : libvlc_position_t); overload;
MarqueeSetColor(color : libvlc_video_marquee_color_t);
MarqueeSetFontSize(font_size: Integer);
MarqueeSetOpacity(opacity: libvlc_opacity_t);
MarqueeSetTimeOut(time_out_ms: Integer);
MarqueeSetRefresh(refresh_after_ms: Integer);
MarqueeSetEnable(enable : Integer);
LogoShowFile();
LogoShowFiles();
LogoHide();
LogoSetFile();
LogoSetFiles();
LogoSetPosition();
LogoSetOpacity();
LogoSetDelay();
LogoSetRepeat();
LogoSetEnable();
GetAudioTrackList();
GetAudioTrackId();
SetAudioTrackById();
SetAudioTrackByNo();
GetAudioTrackDescriptionByNo();
GetAudioTrackDescriptionById();
Remove functions:
SetAudioTrack();
GetAudioTrackDescription();
Add new deinterlace filters:
dmPHOSPHOR, dmIVTC
inspired by Chris <[email protected]>
Improve to play normal and youtube streams
Play();
2013.12.11 Add new functions:
IsPause()
GetMediaMrl();
GetStateName();
writed by John Brookman <[email protected]>
Add better support for Delphi XE2 and up
Add 64 bit demo compiled with Delphi XE2
this demo request 64 bit VideoLAN
requested by John Brookman <[email protected]>
Repair small bug in function TPasLibVlcPlayer.GetVideoHeight(): LongInt;
return wideo width not height
Reported by: "Dr Christoph Camphausen" <[email protected]>
Rewrite OnMediaChanged event handler
Now report current media MRL
Requested by: "Eduan Slabbert" <[email protected]>
Check compatibility with version 2.1.2
2013.11.23 New properties
AudioOutput
VideoOutput
2013.10.20 Verify compatibility with libvlc 2.1.0
Add local UTF8Encode and UTF8Decode for Delphi 3, 4, 5
Requested by: "Johan Keizer" <[email protected]>
2013.08.25 Add support for FPC LCL QT4 and FPC LCL GTK2 (LINUX, WIN)
Test on Kubuntu and Windows XP SP2 + VLC 2.0.8
2013.08.18 Fix incorrect position of MouseEventWinCtrl if Player
placed inside TPanel control aligned to right side of form.
Request by: [email protected]
2013.04.26 Improve events handling
Add new properties:
OsdShow default true
SpuShow default true
SnapshotPrv default false
Add conditional code compilation for support Delphi 7
Thanks to: [email protected]
2013.01.31 Rewrite events handling
2012.10.28 Add compiler options {$A4,Z4} or {A+,Z+} for Delphi < 6
Add property TPasLibVlcPlayer.StartOptions
Now each player component use own instance of libvlc.
2012.07.27 new property TPasLibVlcPlayer.UseEvents default FALSE
fix bug in TPasLibVlcPlayer.function EventsEnable:
if (p_mi = NIL) then -> if (p_mi <> NIL) then
add function TPasLibVlcPlayer.Stop
add try..finally in TPasLibVlcPlayer.Destroy
2012.07.20 Add critical section to improve calls from event handlers
2011.08.22 Crossplatform modifications (Linux)
Request by: "Maloupi" <[email protected]>
2011.08.20 add new functions:
function GetChannel(): Integer;
function GetAudioDelay(): Int64;
procedure SetChannel(chanel: Integer);
procedure SetAudioDelay(delay: Int64);
2011.08.20 add new functions:
function GetAudioTrackCount(): Integer;
function GetAudioTrackDescription(track: Integer): String;
function GetAudioTrack(): Integer;
procedure SetAudioTrack(track: Integer);
Request by: Mark Schneider <[email protected]>
2011.08.20 add new feature: load vlc.dll from custom path
VLC.Path := YOUR CUSTOM PATH
Requested by: "Mark Schneider" <[email protected]>
2011.08.19 add properties to deinterlace filter
Requested by: "Mark Schneider" <[email protected]
2011.04.07 add new component: TPasLibVlcMediaList
Methods for change play list mode:
PlayerSetPlayModeNormal;
PlayerSetPlayModeLoop;
PlayerSetPlayModeRepeat;
Methods for play, stop, pause:
Play;
Pause;
Stop;
Next;
Prev;
IsPlay(): Boolean;
GetState(): TPasLibVlcPlayerState;
PlayItem(item: libvlc_media_t_ptr);
Methods for operate on play list:
Add(mrl: WideString);
Get(index: Integer);
Count(): Integer;
Delete(index: Integer);
Insert(index: Integer; mrl: WideString);
GetItemAtIndex(index: Integer): libvlc_media_t_ptr;
IndexOfItem(item: libvlc_media_t_ptr): Integer;
After execute any method application will be notified about it via events:
OnItemAdded - after LIBVLC add item to play list
OnWillAddItem - before LIBVLC add item to play list
OnItemDeleted - after LIBVLC del item from play list
OnWillDeleteItem - before LIBVLC del item from play list
OnPlayed - after player start play
OnStopped - after player stop
OnNextItemSet - afer player play next item
Requested by: Christian cf. Fillion <[email protected]>
2011.04.06 add new functions:
SetPlayRate() - change current play rate
GetPlayRate() - return current play rate
playRate = 100 - play with normal speed
playRate = 200 - play with speed x 2
playRate = 50 - play with slow speed is 0.5
Requested by: Johann Mitterhauser <>
2011.02.11 make compatibile with Lazarus
Requested by: Christian cf. Fillion <[email protected]>
2011.02.08 simple help for play YouTube video links
Now Play function detect YouTube link, and play it correctly.
Requested by: Christian cf. Fillion <[email protected]>
2011.01.05 add new functions:
GetVideoLenStr() - return video length as time string
GetVideoPosStr() - return video position as time string
Requested by: Edijs van Kole de McSnikovics <[email protected]>
2011.01.05 add new properties: PopupMenu, etc.
Requested by: Edijs van Kole de McSnikovics <[email protected]>
2011.01.04 correct creation of VCL at runtime, error: control '' has no parent window
This error will be found by: Edijs van Kole de McSnikovics <[email protected]>
2011.01.03 rename variable: FHideTitle to FShowTitle
if ShowTitle = TRUE then SHOW title at begin of play
if ShowTitle = FALSE then HIDE title at begin of play
default value: FALSE
2010.12.08 Add support for version 1.1.5, new properties:
HideTitle - if TRUE prevent display title at begin of play, default TRUE
UseEvents - if TRUE then enable event propagation, default FALSE
2010.10.01 Add support for unicode file names
2010.07.22 Add support for set/get Audio Volume Level
2010.09.02 Add support for version 1.1.4
2010.07.14 Change PChar to PAnsiChar
Requested by: David Nottage, [email protected]