-
Method Summary
Modifier and TypeMethodDescriptionvoid
enable
(boolean enable) Enable/disable the logo.void
Set a logo from a builder.void
setDuration
(int duration) Set the time that the logo will be displayed.void
Set the logo file.void
setImage
(RenderedImage logoImage) Set the logo image.void
setLocation
(int x, int y) Set the logo location.void
setOpacity
(float opacity) Set the logo opacity.void
setOpacity
(int opacity) Set the logo opacity.void
setPosition
(LogoPosition position) Set the logo position.void
setRepeat
(int repeat) Set how many times the logo sequence should repeat.
-
Method Details
-
enable
public void enable(boolean enable) Enable/disable the logo.The logo will not be enabled if there is currently no video being played.
- Parameters:
enable
-true
to show the logo,false
to hide it
-
setDuration
public void setDuration(int duration) Set the time that the logo will be displayed.After this time passes, the logo will be removed and the next one (if there is one) displayed.
- Parameters:
duration
- duration, milliseconds
-
setOpacity
public void setOpacity(int opacity) Set the logo opacity.- Parameters:
opacity
- opacity in the range 0 to 255 where 255 is fully opaque
-
setOpacity
public void setOpacity(float opacity) Set the logo opacity.- Parameters:
opacity
- opacity percentage in the range 0.0 to 1.0 where 1.0 is fully opaque
-
setLocation
public void setLocation(int x, int y) Set the logo location.- Parameters:
x
- x co-ordinate for the top left of the logoy
- y co-ordinate for the top left of the logo
-
setPosition
Set the logo position.- Parameters:
position
- position
-
setRepeat
public void setRepeat(int repeat) Set how many times the logo sequence should repeat.Note that with current versions of VLC you may need to set a repeat count one more than you might expect - this is because on the last loop iteration it appears to stop after only the first logo has been displayed.
- Parameters:
repeat
- number of times to repeat the logos, or -1 for indefinite, or 0 to disable looping
-
setFile
Set the logo file.It is possible to set multiple logo files here, each with their own optional delay and opacity.
The format of the string is:
filename1[,delay1[,opacity1];filename2[,delay2[,opacity2];filename3[,delay3[,opacity3];
Since the delay and opacity values are optional, simply leave them out but make sure to include the expected number of commas.When an optional value is not present, a default will be used as per
setOpacity(int)
amdsetDuration(int)
.In addition,
setRepeat(int)
can be used to loop the sequence of logos.- Parameters:
logoFile
- logo file name
-
setImage
Set the logo image.The image will first be written to a temporary file, before invoking
setFile(String)
. This is not optimal, but creating a temporary file for the logo in this way is unavoidable.The temporary file will persist until the JVM exits. The file can not be deleted immediately due to the asynchronous nature of the native API call that sets the logo from the file.
There are circumstances under which this temporary file may fail to be deleted, as per
File.deleteOnExit()
- i.e. "Deletion will be attempted only for normal termination of the virtual machine".- Parameters:
logoImage
- logo image
-
set
-