Skip to content

Commit

Permalink
Move referenced urls from http: to https:
Browse files Browse the repository at this point in the history
  • Loading branch information
oaubert committed Oct 6, 2024
1 parent e2fbaf7 commit f4ec69a
Show file tree
Hide file tree
Showing 3 changed files with 12 additions and 7 deletions.
6 changes: 3 additions & 3 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ under the GNU Lesser General Public License 2.1 or later.

You can get the latest version of the code generator from
<https://github.com/oaubert/python-vlc/> or
<http://git.videolan.org/?p=vlc/bindings/python.git>.
<https://git.videolan.org/?p=vlc/bindings/python.git>.

The code expects to be placed inside a VLC source tree, in
vlc/bindings/python, so that it finds the development include files,
Expand Down Expand Up @@ -82,8 +82,8 @@ preferably inside a virtualenv. You can uninstall it later with
python setup.py develop --uninstall
```

Documentation building needs epydoc. An online build is available at
<http://olivieraubert.net/vlc/python-ctypes/>
Documentation building needs sphinx. An online build is available at
<https://python-vlc.readthedocs.io/en/latest/>

## Packaging

Expand Down
4 changes: 2 additions & 2 deletions generator/templates/footer.py
Original file line number Diff line number Diff line change
Expand Up @@ -89,7 +89,7 @@ def print_python():
t = t, ("iOS" if sys.platform == "ios" else "macOS"), mac_ver()[0], machine()
else:
try:
import distro # <http://GitHub.com/nir0s/distro>
import distro # <https://github.com/nir0s/distro>

t = t, bytes_to_str(distro.name()), bytes_to_str(distro.version())
except ImportError:
Expand Down Expand Up @@ -181,7 +181,7 @@ def pos_callback(event, player):
player.play()

# Some marquee examples. Marquee requires '--sub-source marq' in the
# Instance() call above, see <http://www.videolan.org/doc/play-howto/en/ch04.html>
# Instance() call above, see <https://www.videolan.org/doc/play-howto/en/ch04.html>
player.video_set_marquee_int(VideoMarqueeOption.Enable, 1)
player.video_set_marquee_int(VideoMarqueeOption.Size, 24) # pixels
# FIXME: This crashes the module - it should be investigated
Expand Down
9 changes: 7 additions & 2 deletions generator/templates/header.py
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@
# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston MA 02110-1301 USA

"""This module provides bindings for the LibVLC public API, see
http://wiki.videolan.org/LibVLC.
https://wiki.videolan.org/LibVLC.
You can find the documentation and a README file with some examples
at https://www.olivieraubert.net/vlc/python-ctypes/.
Expand Down Expand Up @@ -59,24 +59,28 @@
# esp. on windows.
DEFAULT_ENCODING = "utf-8"


def str_to_bytes(s):
"""Translate string or bytes to bytes."""
if isinstance(s, str):
return bytes(s, DEFAULT_ENCODING)
else:
return s


def bytes_to_str(b):
"""Translate bytes to string."""
if isinstance(b, bytes):
return b.decode(DEFAULT_ENCODING)
else:
return b


def len_args(func):
"""Return number of positional arguments."""
return len(_inspect.signature(func).parameters)


# Internal guard to prevent internal classes to be directly
# instanciated.
_internal_guard = object()
Expand Down Expand Up @@ -106,6 +110,7 @@ def find_lib():
try: # some registry settings
# leaner than win32api, win32con
import winreg as w

for r in w.HKEY_LOCAL_MACHINE, w.HKEY_CURRENT_USER:
try:
r = w.OpenKey(r, "Software\\VideoLAN\\VLC")
Expand Down Expand Up @@ -374,7 +379,7 @@ def __new__(cls, *args):


# FILE* ctypes wrapper, copied from
# http://svn.python.org/projects/ctypes/trunk/ctypeslib/ctypeslib/contrib/pythonhdr.py
# https://svn.python.org/projects/ctypes/trunk/ctypeslib/ctypeslib/contrib/pythonhdr.py
class FILE(ctypes.Structure):
pass

Expand Down

0 comments on commit f4ec69a

Please sign in to comment.