Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Type Error - libvlc_video_set_logo_string #272

Open
Amaanboon opened this issue Mar 28, 2024 · 1 comment
Open

Type Error - libvlc_video_set_logo_string #272

Amaanboon opened this issue Mar 28, 2024 · 1 comment

Comments

@Amaanboon
Copy link

Amaanboon commented Mar 28, 2024

I am trying to display a logo using VideLogoOption

vlc.libvlc_video_set_logo_int(pi,vlc.VideoLogoOption.logo_enable,1)
vlc.libvlc_video_set_logo_string(pi,vlc.VideoLogoOption.logo_file,"Media/GUI.png")

Error: "argument 3: TypeError: wrong type" error
error

How to pass the file path?

@Amaanboon Amaanboon changed the title sting logo issue Type Error - libvlc_video_set_logo_string Mar 28, 2024
@mrJean1
Copy link
Collaborator

mrJean1 commented Mar 28, 2024

Take a look at the cocoavlc.py example, specifically the method AppVLC._VLClogo on line 568.

Here is a copy of that method. The logostr argument is the file name of the logo image.

    def _VLClogo(self, logostr):
        # add a video logo image, example "... -logo
        p = self.player
        g = vlc.VideoLogoOption  # Enum
        # <https://Wiki.VideoLan.org/Documentation:Modules/logo>
        _g_int = p.video_set_logo_int
        _g_int(g.logo_enable, 1)
        _g_int(g.logo_position, 0)  # FIXME: 0 == vlc.Position.center.value
        _g_int(g.logo_opacity, 128)  # 0-255
        # _g_int(g.logo_delay, 1000)  # millisec
        # _g_int(g.logo_repeat, -1)  # forever
        p.video_set_logo_string(g.logo_file, logostr)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants