Showing preview only (1,901K chars total). Download the full file or copy to clipboard to get everything.
Repository: oaubert/python-vlc
Branch: master
Commit: d93ef9c259ee
Files: 95
Total size: 1.8 MB
Directory structure:
gitextract_1eilci4j/
├── .github/
│ └── workflows/
│ ├── ruff.yml
│ └── tests.yml
├── .gitignore
├── .gitmodules
├── .pre-commit-config.yaml
├── .readthedocs.yaml
├── .travis.yml
├── AUTHORS
├── COPYING
├── COPYING.generator
├── MANIFEST.in
├── Makefile
├── README.md
├── README.module
├── TODO
├── dev_setup.py
├── dev_setup.sh
├── distribute_setup.py
├── docs/
│ ├── Makefile
│ ├── api.rst
│ ├── conf.py
│ ├── fullapi.rst
│ ├── index.rst
│ ├── make.bat
│ └── requirements.txt
├── examples/
│ ├── cocoavlc.py
│ ├── gtk2vlc.py
│ ├── gtkvlc.py
│ ├── play_buffer.py
│ ├── psgvlc.py
│ ├── pyobjcvlc.py
│ ├── pyqt5vlc.py
│ ├── qtvlc.py
│ ├── tkvlc.py
│ ├── video_sync/
│ │ ├── README.md
│ │ ├── main.py
│ │ ├── mini_player.py
│ │ └── network.py
│ └── wxvlc.py
├── generated/
│ ├── 2.2/
│ │ ├── COPYING
│ │ ├── MANIFEST.in
│ │ ├── README.module
│ │ ├── distribute_setup.py
│ │ ├── examples/
│ │ │ ├── gtk2vlc.py
│ │ │ ├── gtkvlc.py
│ │ │ ├── qtvlc.py
│ │ │ ├── tkvlc.py
│ │ │ └── wxvlc.py
│ │ ├── setup.py
│ │ └── vlc.py
│ ├── 3.0/
│ │ ├── COPYING
│ │ ├── MANIFEST.in
│ │ ├── README.module
│ │ ├── examples/
│ │ │ ├── cocoavlc.py
│ │ │ ├── glsurface.py
│ │ │ ├── gtk2vlc.py
│ │ │ ├── gtkvlc.py
│ │ │ ├── play_buffer.py
│ │ │ ├── psgvlc.py
│ │ │ ├── pyobjcvlc.py
│ │ │ ├── pyqt5vlc.py
│ │ │ ├── qtvlc.py
│ │ │ ├── tkvlc.py
│ │ │ ├── video_sync/
│ │ │ │ ├── README.md
│ │ │ │ ├── main.py
│ │ │ │ ├── mini_player.py
│ │ │ │ └── network.py
│ │ │ └── wxvlc.py
│ │ ├── pyproject.toml
│ │ └── vlc.py
│ ├── __init__.py
│ └── dev/
│ └── vlc.py
├── generator/
│ ├── __init__.py
│ ├── generate.py
│ └── templates/
│ ├── LibVlc-footer.java
│ ├── LibVlc-header.java
│ ├── MANIFEST.in
│ ├── boilerplate.java
│ ├── footer.py
│ ├── header.py
│ ├── override.py
│ └── pyproject.toml
├── pyproject.toml
├── requirements.txt
├── ruff.toml
└── tests/
├── gctest.py
├── samples/
│ └── README
├── test_bindings.py
├── test_generator.py
└── test_parser_inputs/
├── callbacks.h
├── enums.h
├── funcs.h
├── libvlc_version_with_extra.h
├── libvlc_version_without_extra.h
└── structs.h
================================================
FILE CONTENTS
================================================
================================================
FILE: .github/workflows/ruff.yml
================================================
name: Ruff
on: [push, pull_request]
jobs:
linting:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: chartboost/ruff-action@v1
with:
args: "check --config ruff.toml"
src: "./generator/generate.py ./tests ./dev_setup.py"
================================================
FILE: .github/workflows/tests.yml
================================================
name: Tests
on: [push, pull_request]
jobs:
tests:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- run: |
sudo apt-get install -y vlc pulseaudio libvlc-dev
pulseaudio --start
bash ./dev_setup.sh
. .venv/bin/activate
make test_generator
make test_bindings
================================================
FILE: .gitignore
================================================
# Hidden files
*~
*.py[cod]
# C extensions
*.so
# Packages
*.egg
*.egg-info
dist
build
eggs
parts
bin
var
sdist
develop-eggs
.installed.cfg
lib
lib64
__pycache__
*.tar.gz
# Installer logs
pip-log.txt
# Unit test / coverage reports
.coverage
.tox
nosetests.xml
# Translations
*.mo
# Mr Developer
.mr.developer.cfg
.project
.pydevproject
# Virtual environment
.venv
venv
# pyenv version
.python-version
# Preprocessed libvlc header files
*.preprocessed*
# Documentation
docs/_build/
================================================
FILE: .gitmodules
================================================
[submodule "vendor/tree-sitter-c"]
path = vendor/tree-sitter-c
url = https://github.com/tree-sitter/tree-sitter-c
ignore = dirty
================================================
FILE: .pre-commit-config.yaml
================================================
# See https://pre-commit.com for more information
# See https://pre-commit.com/hooks.html for more hooks
repos:
- repo: local
hooks:
# Abort the commit if there is one or more linting errors
- id: lint
name: Check no linting errors
entry: ruff check --config ruff.toml
language: python
files: |
(?x)^(
generator/generate\.py|
tests/.*\.py|
generated/3.0/vlc\.py|
generated/dev/vlc\.py|
dev_setup\.py
)$
minimum_pre_commit_version: "2.9.2"
# Abort the commit if code wasn't formatted
- id: format
name: Check code is formatted
entry: ruff format --config ruff.toml --check --diff
language: python
files: |
(?x)^(
generator/generate\.py|
tests/.*\.py|
dev_setup\.py|
generator/templates/.*\.py
)$
minimum_pre_commit_version: "2.9.2"
================================================
FILE: .readthedocs.yaml
================================================
version: 2
build:
os: ubuntu-22.04
tools:
python: "3.12"
# Build documentation in the "docs/" directory with Sphinx
sphinx:
configuration: docs/conf.py
python:
install:
- requirements: docs/requirements.txt
================================================
FILE: .travis.yml
================================================
group: travis_latest
language: python
cache: pip
python:
- 3.8
install:
#- pip install -r requirements.txt
- pip install flake8 # pytest # add another testing frameworks later
before_script:
- EXCLUDE=./generated/2.2,./generator/templates
# stop the build if there are Python syntax errors or undefined names
- flake8 . --count --exclude=$EXCLUDE --select=E901,E999,F821,F822,F823 --show-source --statistics
# exit-zero treats all errors as warnings. The GitHub editor is 127 chars wide
- flake8 . --count --exclude=$EXCLUDE --exit-zero --max-complexity=10 --max-line-length=127 --statistics
script:
- true # pytest --capture=sys # add other tests here
notifications:
on_success: change
on_failure: change # `always` will be the setting once code changes slow down
================================================
FILE: AUTHORS
================================================
These bindings and example code have been implemented and improved by
the following contributors:
Olivier Aubert <contact@olivieraubert.net>
Jean Brouwers <MrJean1@Gmail.com>
Alberto Invernizzi <alby.inve@gmail.com>
Christian Clauss <cclauss@bluewin.ch>
Geoff Salmon <geoff.salmon@gmail.com>
Yann Salmon <yannsalmon.pro@gmail.com>
Wafa Harir <harir.wafa.harir@gmail.com>
Marwa Tabib <marwatabib21@gmail.com>
Odin Hørthe Omdal <odin.omdal@gmail.com>
Saveliy Yusufov <saveliy.m.yusufov@gmail.com>
Tomas Groth <second@tgc.dk>
Michel Zou <xantares09@hotmail.com>
Dražen Lučanin <kermit666@gmail.com>
Chris Venter <chris.venter@gmail.com>
Cimbali <me@cimba.li>
Denis Charmet <typx@dinauz.org>
Hendrik Buschmeier <hbuschme@uni-bielefeld.de>
Hukadan <hukadan@protonmail.ch>
Jonas Haag <jonas@lophus.org>
Patrick Fay <pf5151@gmail.com>
Vaksick <vaksick@gmail.com>
Kim Wiktorén <kim.wiktoren@gmail.com>
================================================
FILE: COPYING
================================================
GNU LESSER GENERAL PUBLIC LICENSE
Version 2.1, February 1999
Copyright (C) 1991, 1999 Free Software Foundation, Inc.
51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
Everyone is permitted to copy and distribute verbatim copies
of this license document, but changing it is not allowed.
[This is the first released version of the Lesser GPL. It also counts
as the successor of the GNU Library Public License, version 2, hence
the version number 2.1.]
Preamble
The licenses for most software are designed to take away your
freedom to share and change it. By contrast, the GNU General Public
Licenses are intended to guarantee your freedom to share and change
free software--to make sure the software is free for all its users.
This license, the Lesser General Public License, applies to some
specially designated software packages--typically libraries--of the
Free Software Foundation and other authors who decide to use it. You
can use it too, but we suggest you first think carefully about whether
this license or the ordinary General Public License is the better
strategy to use in any particular case, based on the explanations below.
When we speak of free software, we are referring to freedom of use,
not price. Our General Public Licenses are designed to make sure that
you have the freedom to distribute copies of free software (and charge
for this service if you wish); that you receive source code or can get
it if you want it; that you can change the software and use pieces of
it in new free programs; and that you are informed that you can do
these things.
To protect your rights, we need to make restrictions that forbid
distributors to deny you these rights or to ask you to surrender these
rights. These restrictions translate to certain responsibilities for
you if you distribute copies of the library or if you modify it.
For example, if you distribute copies of the library, whether gratis
or for a fee, you must give the recipients all the rights that we gave
you. You must make sure that they, too, receive or can get the source
code. If you link other code with the library, you must provide
complete object files to the recipients, so that they can relink them
with the library after making changes to the library and recompiling
it. And you must show them these terms so they know their rights.
We protect your rights with a two-step method: (1) we copyright the
library, and (2) we offer you this license, which gives you legal
permission to copy, distribute and/or modify the library.
To protect each distributor, we want to make it very clear that
there is no warranty for the free library. Also, if the library is
modified by someone else and passed on, the recipients should know
that what they have is not the original version, so that the original
author's reputation will not be affected by problems that might be
introduced by others.
Finally, software patents pose a constant threat to the existence of
any free program. We wish to make sure that a company cannot
effectively restrict the users of a free program by obtaining a
restrictive license from a patent holder. Therefore, we insist that
any patent license obtained for a version of the library must be
consistent with the full freedom of use specified in this license.
Most GNU software, including some libraries, is covered by the
ordinary GNU General Public License. This license, the GNU Lesser
General Public License, applies to certain designated libraries, and
is quite different from the ordinary General Public License. We use
this license for certain libraries in order to permit linking those
libraries into non-free programs.
When a program is linked with a library, whether statically or using
a shared library, the combination of the two is legally speaking a
combined work, a derivative of the original library. The ordinary
General Public License therefore permits such linking only if the
entire combination fits its criteria of freedom. The Lesser General
Public License permits more lax criteria for linking other code with
the library.
We call this license the "Lesser" General Public License because it
does Less to protect the user's freedom than the ordinary General
Public License. It also provides other free software developers Less
of an advantage over competing non-free programs. These disadvantages
are the reason we use the ordinary General Public License for many
libraries. However, the Lesser license provides advantages in certain
special circumstances.
For example, on rare occasions, there may be a special need to
encourage the widest possible use of a certain library, so that it becomes
a de-facto standard. To achieve this, non-free programs must be
allowed to use the library. A more frequent case is that a free
library does the same job as widely used non-free libraries. In this
case, there is little to gain by limiting the free library to free
software only, so we use the Lesser General Public License.
In other cases, permission to use a particular library in non-free
programs enables a greater number of people to use a large body of
free software. For example, permission to use the GNU C Library in
non-free programs enables many more people to use the whole GNU
operating system, as well as its variant, the GNU/Linux operating
system.
Although the Lesser General Public License is Less protective of the
users' freedom, it does ensure that the user of a program that is
linked with the Library has the freedom and the wherewithal to run
that program using a modified version of the Library.
The precise terms and conditions for copying, distribution and
modification follow. Pay close attention to the difference between a
"work based on the library" and a "work that uses the library". The
former contains code derived from the library, whereas the latter must
be combined with the library in order to run.
GNU LESSER GENERAL PUBLIC LICENSE
TERMS AND CONDITIONS FOR COPYING, DISTRIBUTION AND MODIFICATION
0. This License Agreement applies to any software library or other
program which contains a notice placed by the copyright holder or
other authorized party saying it may be distributed under the terms of
this Lesser General Public License (also called "this License").
Each licensee is addressed as "you".
A "library" means a collection of software functions and/or data
prepared so as to be conveniently linked with application programs
(which use some of those functions and data) to form executables.
The "Library", below, refers to any such software library or work
which has been distributed under these terms. A "work based on the
Library" means either the Library or any derivative work under
copyright law: that is to say, a work containing the Library or a
portion of it, either verbatim or with modifications and/or translated
straightforwardly into another language. (Hereinafter, translation is
included without limitation in the term "modification".)
"Source code" for a work means the preferred form of the work for
making modifications to it. For a library, complete source code means
all the source code for all modules it contains, plus any associated
interface definition files, plus the scripts used to control compilation
and installation of the library.
Activities other than copying, distribution and modification are not
covered by this License; they are outside its scope. The act of
running a program using the Library is not restricted, and output from
such a program is covered only if its contents constitute a work based
on the Library (independent of the use of the Library in a tool for
writing it). Whether that is true depends on what the Library does
and what the program that uses the Library does.
1. You may copy and distribute verbatim copies of the Library's
complete source code as you receive it, in any medium, provided that
you conspicuously and appropriately publish on each copy an
appropriate copyright notice and disclaimer of warranty; keep intact
all the notices that refer to this License and to the absence of any
warranty; and distribute a copy of this License along with the
Library.
You may charge a fee for the physical act of transferring a copy,
and you may at your option offer warranty protection in exchange for a
fee.
2. You may modify your copy or copies of the Library or any portion
of it, thus forming a work based on the Library, and copy and
distribute such modifications or work under the terms of Section 1
above, provided that you also meet all of these conditions:
a) The modified work must itself be a software library.
b) You must cause the files modified to carry prominent notices
stating that you changed the files and the date of any change.
c) You must cause the whole of the work to be licensed at no
charge to all third parties under the terms of this License.
d) If a facility in the modified Library refers to a function or a
table of data to be supplied by an application program that uses
the facility, other than as an argument passed when the facility
is invoked, then you must make a good faith effort to ensure that,
in the event an application does not supply such function or
table, the facility still operates, and performs whatever part of
its purpose remains meaningful.
(For example, a function in a library to compute square roots has
a purpose that is entirely well-defined independent of the
application. Therefore, Subsection 2d requires that any
application-supplied function or table used by this function must
be optional: if the application does not supply it, the square
root function must still compute square roots.)
These requirements apply to the modified work as a whole. If
identifiable sections of that work are not derived from the Library,
and can be reasonably considered independent and separate works in
themselves, then this License, and its terms, do not apply to those
sections when you distribute them as separate works. But when you
distribute the same sections as part of a whole which is a work based
on the Library, the distribution of the whole must be on the terms of
this License, whose permissions for other licensees extend to the
entire whole, and thus to each and every part regardless of who wrote
it.
Thus, it is not the intent of this section to claim rights or contest
your rights to work written entirely by you; rather, the intent is to
exercise the right to control the distribution of derivative or
collective works based on the Library.
In addition, mere aggregation of another work not based on the Library
with the Library (or with a work based on the Library) on a volume of
a storage or distribution medium does not bring the other work under
the scope of this License.
3. You may opt to apply the terms of the ordinary GNU General Public
License instead of this License to a given copy of the Library. To do
this, you must alter all the notices that refer to this License, so
that they refer to the ordinary GNU General Public License, version 2,
instead of to this License. (If a newer version than version 2 of the
ordinary GNU General Public License has appeared, then you can specify
that version instead if you wish.) Do not make any other change in
these notices.
Once this change is made in a given copy, it is irreversible for
that copy, so the ordinary GNU General Public License applies to all
subsequent copies and derivative works made from that copy.
This option is useful when you wish to copy part of the code of
the Library into a program that is not a library.
4. You may copy and distribute the Library (or a portion or
derivative of it, under Section 2) in object code or executable form
under the terms of Sections 1 and 2 above provided that you accompany
it with the complete corresponding machine-readable source code, which
must be distributed under the terms of Sections 1 and 2 above on a
medium customarily used for software interchange.
If distribution of object code is made by offering access to copy
from a designated place, then offering equivalent access to copy the
source code from the same place satisfies the requirement to
distribute the source code, even though third parties are not
compelled to copy the source along with the object code.
5. A program that contains no derivative of any portion of the
Library, but is designed to work with the Library by being compiled or
linked with it, is called a "work that uses the Library". Such a
work, in isolation, is not a derivative work of the Library, and
therefore falls outside the scope of this License.
However, linking a "work that uses the Library" with the Library
creates an executable that is a derivative of the Library (because it
contains portions of the Library), rather than a "work that uses the
library". The executable is therefore covered by this License.
Section 6 states terms for distribution of such executables.
When a "work that uses the Library" uses material from a header file
that is part of the Library, the object code for the work may be a
derivative work of the Library even though the source code is not.
Whether this is true is especially significant if the work can be
linked without the Library, or if the work is itself a library. The
threshold for this to be true is not precisely defined by law.
If such an object file uses only numerical parameters, data
structure layouts and accessors, and small macros and small inline
functions (ten lines or less in length), then the use of the object
file is unrestricted, regardless of whether it is legally a derivative
work. (Executables containing this object code plus portions of the
Library will still fall under Section 6.)
Otherwise, if the work is a derivative of the Library, you may
distribute the object code for the work under the terms of Section 6.
Any executables containing that work also fall under Section 6,
whether or not they are linked directly with the Library itself.
6. As an exception to the Sections above, you may also combine or
link a "work that uses the Library" with the Library to produce a
work containing portions of the Library, and distribute that work
under terms of your choice, provided that the terms permit
modification of the work for the customer's own use and reverse
engineering for debugging such modifications.
You must give prominent notice with each copy of the work that the
Library is used in it and that the Library and its use are covered by
this License. You must supply a copy of this License. If the work
during execution displays copyright notices, you must include the
copyright notice for the Library among them, as well as a reference
directing the user to the copy of this License. Also, you must do one
of these things:
a) Accompany the work with the complete corresponding
machine-readable source code for the Library including whatever
changes were used in the work (which must be distributed under
Sections 1 and 2 above); and, if the work is an executable linked
with the Library, with the complete machine-readable "work that
uses the Library", as object code and/or source code, so that the
user can modify the Library and then relink to produce a modified
executable containing the modified Library. (It is understood
that the user who changes the contents of definitions files in the
Library will not necessarily be able to recompile the application
to use the modified definitions.)
b) Use a suitable shared library mechanism for linking with the
Library. A suitable mechanism is one that (1) uses at run time a
copy of the library already present on the user's computer system,
rather than copying library functions into the executable, and (2)
will operate properly with a modified version of the library, if
the user installs one, as long as the modified version is
interface-compatible with the version that the work was made with.
c) Accompany the work with a written offer, valid for at
least three years, to give the same user the materials
specified in Subsection 6a, above, for a charge no more
than the cost of performing this distribution.
d) If distribution of the work is made by offering access to copy
from a designated place, offer equivalent access to copy the above
specified materials from the same place.
e) Verify that the user has already received a copy of these
materials or that you have already sent this user a copy.
For an executable, the required form of the "work that uses the
Library" must include any data and utility programs needed for
reproducing the executable from it. However, as a special exception,
the materials to be distributed need not include anything that is
normally distributed (in either source or binary form) with the major
components (compiler, kernel, and so on) of the operating system on
which the executable runs, unless that component itself accompanies
the executable.
It may happen that this requirement contradicts the license
restrictions of other proprietary libraries that do not normally
accompany the operating system. Such a contradiction means you cannot
use both them and the Library together in an executable that you
distribute.
7. You may place library facilities that are a work based on the
Library side-by-side in a single library together with other library
facilities not covered by this License, and distribute such a combined
library, provided that the separate distribution of the work based on
the Library and of the other library facilities is otherwise
permitted, and provided that you do these two things:
a) Accompany the combined library with a copy of the same work
based on the Library, uncombined with any other library
facilities. This must be distributed under the terms of the
Sections above.
b) Give prominent notice with the combined library of the fact
that part of it is a work based on the Library, and explaining
where to find the accompanying uncombined form of the same work.
8. You may not copy, modify, sublicense, link with, or distribute
the Library except as expressly provided under this License. Any
attempt otherwise to copy, modify, sublicense, link with, or
distribute the Library is void, and will automatically terminate your
rights under this License. However, parties who have received copies,
or rights, from you under this License will not have their licenses
terminated so long as such parties remain in full compliance.
9. You are not required to accept this License, since you have not
signed it. However, nothing else grants you permission to modify or
distribute the Library or its derivative works. These actions are
prohibited by law if you do not accept this License. Therefore, by
modifying or distributing the Library (or any work based on the
Library), you indicate your acceptance of this License to do so, and
all its terms and conditions for copying, distributing or modifying
the Library or works based on it.
10. Each time you redistribute the Library (or any work based on the
Library), the recipient automatically receives a license from the
original licensor to copy, distribute, link with or modify the Library
subject to these terms and conditions. You may not impose any further
restrictions on the recipients' exercise of the rights granted herein.
You are not responsible for enforcing compliance by third parties with
this License.
11. If, as a consequence of a court judgment or allegation of patent
infringement or for any other reason (not limited to patent issues),
conditions are imposed on you (whether by court order, agreement or
otherwise) that contradict the conditions of this License, they do not
excuse you from the conditions of this License. If you cannot
distribute so as to satisfy simultaneously your obligations under this
License and any other pertinent obligations, then as a consequence you
may not distribute the Library at all. For example, if a patent
license would not permit royalty-free redistribution of the Library by
all those who receive copies directly or indirectly through you, then
the only way you could satisfy both it and this License would be to
refrain entirely from distribution of the Library.
If any portion of this section is held invalid or unenforceable under any
particular circumstance, the balance of the section is intended to apply,
and the section as a whole is intended to apply in other circumstances.
It is not the purpose of this section to induce you to infringe any
patents or other property right claims or to contest validity of any
such claims; this section has the sole purpose of protecting the
integrity of the free software distribution system which is
implemented by public license practices. Many people have made
generous contributions to the wide range of software distributed
through that system in reliance on consistent application of that
system; it is up to the author/donor to decide if he or she is willing
to distribute software through any other system and a licensee cannot
impose that choice.
This section is intended to make thoroughly clear what is believed to
be a consequence of the rest of this License.
12. If the distribution and/or use of the Library is restricted in
certain countries either by patents or by copyrighted interfaces, the
original copyright holder who places the Library under this License may add
an explicit geographical distribution limitation excluding those countries,
so that distribution is permitted only in or among countries not thus
excluded. In such case, this License incorporates the limitation as if
written in the body of this License.
13. The Free Software Foundation may publish revised and/or new
versions of the Lesser General Public License from time to time.
Such new versions will be similar in spirit to the present version,
but may differ in detail to address new problems or concerns.
Each version is given a distinguishing version number. If the Library
specifies a version number of this License which applies to it and
"any later version", you have the option of following the terms and
conditions either of that version or of any later version published by
the Free Software Foundation. If the Library does not specify a
license version number, you may choose any version ever published by
the Free Software Foundation.
14. If you wish to incorporate parts of the Library into other free
programs whose distribution conditions are incompatible with these,
write to the author to ask for permission. For software which is
copyrighted by the Free Software Foundation, write to the Free
Software Foundation; we sometimes make exceptions for this. Our
decision will be guided by the two goals of preserving the free status
of all derivatives of our free software and of promoting the sharing
and reuse of software generally.
NO WARRANTY
15. BECAUSE THE LIBRARY IS LICENSED FREE OF CHARGE, THERE IS NO
WARRANTY FOR THE LIBRARY, TO THE EXTENT PERMITTED BY APPLICABLE LAW.
EXCEPT WHEN OTHERWISE STATED IN WRITING THE COPYRIGHT HOLDERS AND/OR
OTHER PARTIES PROVIDE THE LIBRARY "AS IS" WITHOUT WARRANTY OF ANY
KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING, BUT NOT LIMITED TO, THE
IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
PURPOSE. THE ENTIRE RISK AS TO THE QUALITY AND PERFORMANCE OF THE
LIBRARY IS WITH YOU. SHOULD THE LIBRARY PROVE DEFECTIVE, YOU ASSUME
THE COST OF ALL NECESSARY SERVICING, REPAIR OR CORRECTION.
16. IN NO EVENT UNLESS REQUIRED BY APPLICABLE LAW OR AGREED TO IN
WRITING WILL ANY COPYRIGHT HOLDER, OR ANY OTHER PARTY WHO MAY MODIFY
AND/OR REDISTRIBUTE THE LIBRARY AS PERMITTED ABOVE, BE LIABLE TO YOU
FOR DAMAGES, INCLUDING ANY GENERAL, SPECIAL, INCIDENTAL OR
CONSEQUENTIAL DAMAGES ARISING OUT OF THE USE OR INABILITY TO USE THE
LIBRARY (INCLUDING BUT NOT LIMITED TO LOSS OF DATA OR DATA BEING
RENDERED INACCURATE OR LOSSES SUSTAINED BY YOU OR THIRD PARTIES OR A
FAILURE OF THE LIBRARY TO OPERATE WITH ANY OTHER SOFTWARE), EVEN IF
SUCH HOLDER OR OTHER PARTY HAS BEEN ADVISED OF THE POSSIBILITY OF SUCH
DAMAGES.
END OF TERMS AND CONDITIONS
How to Apply These Terms to Your New Libraries
If you develop a new library, and you want it to be of the greatest
possible use to the public, we recommend making it free software that
everyone can redistribute and change. You can do so by permitting
redistribution under these terms (or, alternatively, under the terms of the
ordinary General Public License).
To apply these terms, attach the following notices to the library. It is
safest to attach them to the start of each source file to most effectively
convey the exclusion of warranty; and each file should have at least the
"copyright" line and a pointer to where the full notice is found.
<one line to give the library's name and a brief idea of what it does.>
Copyright (C) <year> <name of author>
This library is free software; you can redistribute it and/or
modify it under the terms of the GNU Lesser General Public
License as published by the Free Software Foundation; either
version 2.1 of the License, or (at your option) any later version.
This library is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
Lesser General Public License for more details.
You should have received a copy of the GNU Lesser General Public
License along with this library; if not, write to the Free Software
Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
Also add information on how to contact you by electronic and paper mail.
You should also get your employer (if you work as a programmer) or your
school, if any, to sign a "copyright disclaimer" for the library, if
necessary. Here is a sample; alter the names:
Yoyodyne, Inc., hereby disclaims all copyright interest in the
library `Frob' (a library for tweaking knobs) written by James Random Hacker.
<signature of Ty Coon>, 1 April 1990
Ty Coon, President of Vice
That's all there is to it!
================================================
FILE: COPYING.generator
================================================
GNU GENERAL PUBLIC LICENSE
Version 2, June 1991
Copyright (C) 1989, 1991 Free Software Foundation, Inc.,
51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
Everyone is permitted to copy and distribute verbatim copies
of this license document, but changing it is not allowed.
Preamble
The licenses for most software are designed to take away your
freedom to share and change it. By contrast, the GNU General Public
License is intended to guarantee your freedom to share and change free
software--to make sure the software is free for all its users. This
General Public License applies to most of the Free Software
Foundation's software and to any other program whose authors commit to
using it. (Some other Free Software Foundation software is covered by
the GNU Lesser General Public License instead.) You can apply it to
your programs, too.
When we speak of free software, we are referring to freedom, not
price. Our General Public Licenses are designed to make sure that you
have the freedom to distribute copies of free software (and charge for
this service if you wish), that you receive source code or can get it
if you want it, that you can change the software or use pieces of it
in new free programs; and that you know you can do these things.
To protect your rights, we need to make restrictions that forbid
anyone to deny you these rights or to ask you to surrender the rights.
These restrictions translate to certain responsibilities for you if you
distribute copies of the software, or if you modify it.
For example, if you distribute copies of such a program, whether
gratis or for a fee, you must give the recipients all the rights that
you have. You must make sure that they, too, receive or can get the
source code. And you must show them these terms so they know their
rights.
We protect your rights with two steps: (1) copyright the software, and
(2) offer you this license which gives you legal permission to copy,
distribute and/or modify the software.
Also, for each author's protection and ours, we want to make certain
that everyone understands that there is no warranty for this free
software. If the software is modified by someone else and passed on, we
want its recipients to know that what they have is not the original, so
that any problems introduced by others will not reflect on the original
authors' reputations.
Finally, any free program is threatened constantly by software
patents. We wish to avoid the danger that redistributors of a free
program will individually obtain patent licenses, in effect making the
program proprietary. To prevent this, we have made it clear that any
patent must be licensed for everyone's free use or not licensed at all.
The precise terms and conditions for copying, distribution and
modification follow.
GNU GENERAL PUBLIC LICENSE
TERMS AND CONDITIONS FOR COPYING, DISTRIBUTION AND MODIFICATION
0. This License applies to any program or other work which contains
a notice placed by the copyright holder saying it may be distributed
under the terms of this General Public License. The "Program", below,
refers to any such program or work, and a "work based on the Program"
means either the Program or any derivative work under copyright law:
that is to say, a work containing the Program or a portion of it,
either verbatim or with modifications and/or translated into another
language. (Hereinafter, translation is included without limitation in
the term "modification".) Each licensee is addressed as "you".
Activities other than copying, distribution and modification are not
covered by this License; they are outside its scope. The act of
running the Program is not restricted, and the output from the Program
is covered only if its contents constitute a work based on the
Program (independent of having been made by running the Program).
Whether that is true depends on what the Program does.
1. You may copy and distribute verbatim copies of the Program's
source code as you receive it, in any medium, provided that you
conspicuously and appropriately publish on each copy an appropriate
copyright notice and disclaimer of warranty; keep intact all the
notices that refer to this License and to the absence of any warranty;
and give any other recipients of the Program a copy of this License
along with the Program.
You may charge a fee for the physical act of transferring a copy, and
you may at your option offer warranty protection in exchange for a fee.
2. You may modify your copy or copies of the Program or any portion
of it, thus forming a work based on the Program, and copy and
distribute such modifications or work under the terms of Section 1
above, provided that you also meet all of these conditions:
a) You must cause the modified files to carry prominent notices
stating that you changed the files and the date of any change.
b) You must cause any work that you distribute or publish, that in
whole or in part contains or is derived from the Program or any
part thereof, to be licensed as a whole at no charge to all third
parties under the terms of this License.
c) If the modified program normally reads commands interactively
when run, you must cause it, when started running for such
interactive use in the most ordinary way, to print or display an
announcement including an appropriate copyright notice and a
notice that there is no warranty (or else, saying that you provide
a warranty) and that users may redistribute the program under
these conditions, and telling the user how to view a copy of this
License. (Exception: if the Program itself is interactive but
does not normally print such an announcement, your work based on
the Program is not required to print an announcement.)
These requirements apply to the modified work as a whole. If
identifiable sections of that work are not derived from the Program,
and can be reasonably considered independent and separate works in
themselves, then this License, and its terms, do not apply to those
sections when you distribute them as separate works. But when you
distribute the same sections as part of a whole which is a work based
on the Program, the distribution of the whole must be on the terms of
this License, whose permissions for other licensees extend to the
entire whole, and thus to each and every part regardless of who wrote it.
Thus, it is not the intent of this section to claim rights or contest
your rights to work written entirely by you; rather, the intent is to
exercise the right to control the distribution of derivative or
collective works based on the Program.
In addition, mere aggregation of another work not based on the Program
with the Program (or with a work based on the Program) on a volume of
a storage or distribution medium does not bring the other work under
the scope of this License.
3. You may copy and distribute the Program (or a work based on it,
under Section 2) in object code or executable form under the terms of
Sections 1 and 2 above provided that you also do one of the following:
a) Accompany it with the complete corresponding machine-readable
source code, which must be distributed under the terms of Sections
1 and 2 above on a medium customarily used for software interchange; or,
b) Accompany it with a written offer, valid for at least three
years, to give any third party, for a charge no more than your
cost of physically performing source distribution, a complete
machine-readable copy of the corresponding source code, to be
distributed under the terms of Sections 1 and 2 above on a medium
customarily used for software interchange; or,
c) Accompany it with the information you received as to the offer
to distribute corresponding source code. (This alternative is
allowed only for noncommercial distribution and only if you
received the program in object code or executable form with such
an offer, in accord with Subsection b above.)
The source code for a work means the preferred form of the work for
making modifications to it. For an executable work, complete source
code means all the source code for all modules it contains, plus any
associated interface definition files, plus the scripts used to
control compilation and installation of the executable. However, as a
special exception, the source code distributed need not include
anything that is normally distributed (in either source or binary
form) with the major components (compiler, kernel, and so on) of the
operating system on which the executable runs, unless that component
itself accompanies the executable.
If distribution of executable or object code is made by offering
access to copy from a designated place, then offering equivalent
access to copy the source code from the same place counts as
distribution of the source code, even though third parties are not
compelled to copy the source along with the object code.
4. You may not copy, modify, sublicense, or distribute the Program
except as expressly provided under this License. Any attempt
otherwise to copy, modify, sublicense or distribute the Program is
void, and will automatically terminate your rights under this License.
However, parties who have received copies, or rights, from you under
this License will not have their licenses terminated so long as such
parties remain in full compliance.
5. You are not required to accept this License, since you have not
signed it. However, nothing else grants you permission to modify or
distribute the Program or its derivative works. These actions are
prohibited by law if you do not accept this License. Therefore, by
modifying or distributing the Program (or any work based on the
Program), you indicate your acceptance of this License to do so, and
all its terms and conditions for copying, distributing or modifying
the Program or works based on it.
6. Each time you redistribute the Program (or any work based on the
Program), the recipient automatically receives a license from the
original licensor to copy, distribute or modify the Program subject to
these terms and conditions. You may not impose any further
restrictions on the recipients' exercise of the rights granted herein.
You are not responsible for enforcing compliance by third parties to
this License.
7. If, as a consequence of a court judgment or allegation of patent
infringement or for any other reason (not limited to patent issues),
conditions are imposed on you (whether by court order, agreement or
otherwise) that contradict the conditions of this License, they do not
excuse you from the conditions of this License. If you cannot
distribute so as to satisfy simultaneously your obligations under this
License and any other pertinent obligations, then as a consequence you
may not distribute the Program at all. For example, if a patent
license would not permit royalty-free redistribution of the Program by
all those who receive copies directly or indirectly through you, then
the only way you could satisfy both it and this License would be to
refrain entirely from distribution of the Program.
If any portion of this section is held invalid or unenforceable under
any particular circumstance, the balance of the section is intended to
apply and the section as a whole is intended to apply in other
circumstances.
It is not the purpose of this section to induce you to infringe any
patents or other property right claims or to contest validity of any
such claims; this section has the sole purpose of protecting the
integrity of the free software distribution system, which is
implemented by public license practices. Many people have made
generous contributions to the wide range of software distributed
through that system in reliance on consistent application of that
system; it is up to the author/donor to decide if he or she is willing
to distribute software through any other system and a licensee cannot
impose that choice.
This section is intended to make thoroughly clear what is believed to
be a consequence of the rest of this License.
8. If the distribution and/or use of the Program is restricted in
certain countries either by patents or by copyrighted interfaces, the
original copyright holder who places the Program under this License
may add an explicit geographical distribution limitation excluding
those countries, so that distribution is permitted only in or among
countries not thus excluded. In such case, this License incorporates
the limitation as if written in the body of this License.
9. The Free Software Foundation may publish revised and/or new versions
of the General Public License from time to time. Such new versions will
be similar in spirit to the present version, but may differ in detail to
address new problems or concerns.
Each version is given a distinguishing version number. If the Program
specifies a version number of this License which applies to it and "any
later version", you have the option of following the terms and conditions
either of that version or of any later version published by the Free
Software Foundation. If the Program does not specify a version number of
this License, you may choose any version ever published by the Free Software
Foundation.
10. If you wish to incorporate parts of the Program into other free
programs whose distribution conditions are different, write to the author
to ask for permission. For software which is copyrighted by the Free
Software Foundation, write to the Free Software Foundation; we sometimes
make exceptions for this. Our decision will be guided by the two goals
of preserving the free status of all derivatives of our free software and
of promoting the sharing and reuse of software generally.
NO WARRANTY
11. BECAUSE THE PROGRAM IS LICENSED FREE OF CHARGE, THERE IS NO WARRANTY
FOR THE PROGRAM, TO THE EXTENT PERMITTED BY APPLICABLE LAW. EXCEPT WHEN
OTHERWISE STATED IN WRITING THE COPYRIGHT HOLDERS AND/OR OTHER PARTIES
PROVIDE THE PROGRAM "AS IS" WITHOUT WARRANTY OF ANY KIND, EITHER EXPRESSED
OR IMPLIED, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. THE ENTIRE RISK AS
TO THE QUALITY AND PERFORMANCE OF THE PROGRAM IS WITH YOU. SHOULD THE
PROGRAM PROVE DEFECTIVE, YOU ASSUME THE COST OF ALL NECESSARY SERVICING,
REPAIR OR CORRECTION.
12. IN NO EVENT UNLESS REQUIRED BY APPLICABLE LAW OR AGREED TO IN WRITING
WILL ANY COPYRIGHT HOLDER, OR ANY OTHER PARTY WHO MAY MODIFY AND/OR
REDISTRIBUTE THE PROGRAM AS PERMITTED ABOVE, BE LIABLE TO YOU FOR DAMAGES,
INCLUDING ANY GENERAL, SPECIAL, INCIDENTAL OR CONSEQUENTIAL DAMAGES ARISING
OUT OF THE USE OR INABILITY TO USE THE PROGRAM (INCLUDING BUT NOT LIMITED
TO LOSS OF DATA OR DATA BEING RENDERED INACCURATE OR LOSSES SUSTAINED BY
YOU OR THIRD PARTIES OR A FAILURE OF THE PROGRAM TO OPERATE WITH ANY OTHER
PROGRAMS), EVEN IF SUCH HOLDER OR OTHER PARTY HAS BEEN ADVISED OF THE
POSSIBILITY OF SUCH DAMAGES.
END OF TERMS AND CONDITIONS
How to Apply These Terms to Your New Programs
If you develop a new program, and you want it to be of the greatest
possible use to the public, the best way to achieve this is to make it
free software which everyone can redistribute and change under these terms.
To do so, attach the following notices to the program. It is safest
to attach them to the start of each source file to most effectively
convey the exclusion of warranty; and each file should have at least
the "copyright" line and a pointer to where the full notice is found.
<one line to give the program's name and a brief idea of what it does.>
Copyright (C) <year> <name of author>
This program is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
the Free Software Foundation; either version 2 of the License, or
(at your option) any later version.
This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
GNU General Public License for more details.
You should have received a copy of the GNU General Public License along
with this program; if not, write to the Free Software Foundation, Inc.,
51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
Also add information on how to contact you by electronic and paper mail.
If the program is interactive, make it output a short notice like this
when it starts in an interactive mode:
Gnomovision version 69, Copyright (C) year name of author
Gnomovision comes with ABSOLUTELY NO WARRANTY; for details type `show w'.
This is free software, and you are welcome to redistribute it
under certain conditions; type `show c' for details.
The hypothetical commands `show w' and `show c' should show the appropriate
parts of the General Public License. Of course, the commands you use may
be called something other than `show w' and `show c'; they could even be
mouse-clicks or menu items--whatever suits your program.
You should also get your employer (if you work as a programmer) or your
school, if any, to sign a "copyright disclaimer" for the program, if
necessary. Here is a sample; alter the names:
Yoyodyne, Inc., hereby disclaims all copyright interest in the program
`Gnomovision' (which makes passes at compilers) written by James Hacker.
<signature of Ty Coon>, 1 April 1989
Ty Coon, President of Vice
This General Public License does not permit incorporating your program into
proprietary programs. If your program is a subroutine library, you may
consider it more useful to permit linking proprietary applications with the
library. If this is what you want to do, use the GNU Lesser General
Public License instead of this License.
================================================
FILE: MANIFEST.in
================================================
include setup.py
include COPYING COPYING.generator MANIFEST.in README.rst TODO
include distribute_setup.py Makefile
recursive-include tests *
recursive-include examples *
================================================
FILE: Makefile
================================================
GENERATE:=python3 generator/generate.py
DEV_INCLUDE_DIR=../../include/vlc
UNAME_S := $(shell uname -s)
ifeq ($(UNAME_S),FreeBSD)
INSTALLED_INCLUDE_DIR=/usr/local/include/vlc
else
INSTALLED_INCLUDE_DIR=/usr/include/vlc
endif
PROJECT_ROOT=$(shell pwd)
DEV_PATH=generated/dev
VERSIONED_PATH=generated/3.0
MODULE_NAME=$(DEV_PATH)/vlc.py
VERSIONED_NAME=$(VERSIONED_PATH)/vlc.py
DEV_INCLUDES=$(wildcard $(DEV_INCLUDE_DIR)/*.h)
INSTALLED_INCLUDES=$(wildcard $(INSTALLED_INCLUDE_DIR)/*.h)
ifneq ($(DEV_INCLUDES),)
TARGETS+=dev
endif
ifneq ($(INSTALLED_INCLUDES),)
TARGETS+=installed dist
endif
ifeq ($(TARGETS),)
TARGETS=missing
endif
.PHONY: missing dev installed dist deb doc test_bindings2 test_bindings test_generator test2 test tests sdist publish format rcheck check clean
all: $(TARGETS)
missing:
@echo "Cannot find include files either from a source tree in $(DEV_INCLUDE_DIR) or from installed includes in $(INSTALLED_INCLUDE_DIR)."
exit 0
.ONESHELL:
dev: $(MODULE_NAME)
@if [ ! -d $(DEV_INCLUDE_DIR) ]; then echo "The bindings directory must be placed in a VLC source tree as vlc/bindings/python to generate the dev version of the bindings. If you want to generate against installed include files, use the 'installed' target." ; exit 1 ; fi
installed: $(VERSIONED_NAME)
@if [ ! -d $(INSTALLED_INCLUDE_DIR) ]; then echo "Cannot find the necessary VLC include files in $(INSTALLED_INCLUDE_DIR). Make sure a full VLC install is present on the system." ; exit 1 ; fi
dist: $(VERSIONED_NAME)
$(GENERATE) -p $<
$(MODULE_NAME): generator/generate.py generator/templates/header.py generator/templates/footer.py generator/templates/override.py $(DEV_INCLUDES)
mkdir -p $(DEV_PATH)
$(GENERATE) $(DEV_INCLUDES) -o $@
$(VERSIONED_NAME): generator/generate.py generator/templates/header.py generator/templates/footer.py generator/templates/override.py generator/templates/pyproject.toml $(INSTALLED_INCLUDES)
mkdir -p $(VERSIONED_PATH)
$(GENERATE) $(INSTALLED_INCLUDES) -o $@
doc: $(VERSIONED_NAME)
sphinx-build docs doc
test_bindings: installed
PYTHONPATH=$(VERSIONED_PATH):$(PROJECT_ROOT) python3 tests/test_bindings.py
PYTHONPATH=$(DEV_PATH):$(PROJECT_ROOT) python3 tests/test_bindings.py
test_generator: installed
PYTHONPATH=$(VERSIONED_PATH):$(PROJECT_ROOT) python3 tests/test_generator.py
PYTHONPATH=$(DEV_PATH):$(PROJECT_ROOT) python3 tests/test_generator.py
test: test_bindings test_generator
sdist: $(VERSIONED_NAME)
cd $(VERSIONED_PATH); python3 -m build
publish: $(VERSIONED_NAME)
cd $(VERSIONED_PATH); python3 -m build && twine upload dist/*
format:
ruff format ./generator/generate.py ./tests dev_setup.py ./generator/templates/
ruff check --fix --fix-only --exit-zero ./generator/generate.py ./tests dev_setup.py ./generator/templates
check:
ruff check ./generator/generate.py ./tests dev_setup.py
clean:
-$(RM) -r $(DEV_PATH)
-$(RM) -r $(VERSIONED_PATH)
================================================
FILE: README.md
================================================
# Python ctypes-based bindings generator for libvlc

[](https://python-vlc.readthedocs.org/)
[](https://discord.gg/3h3K3JF)
This file documents the bindings generator, not the bindings
themselves. For the bindings documentation, see the
[README.module](README.module) file.
The bindings generator generates ctypes-bindings from the include
files defining the public API. The same generated module should be
compatible with various versions of libvlc 2.\* and 3.\*. However, there
may be incompatible changes between major versions. Versioned bindings
for 2.2 and 3.0 are provided in the repository.
## License
The module generator is licensed under the GNU General Public License
version 2 or later. The generated module is licensed, like libvlc,
under the GNU Lesser General Public License 2.1 or later.
## Development
You can get the latest version of the code generator from
<https://github.com/oaubert/python-vlc/> or
<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,
or to find the installed include files in /usr/include (on Debian,
install libvlc-dev).
Once you have cloned the project, you can run
```
python3 dev_setup.sh
```
from the root directory (or the python version if on a platform without shell)
This script will install everything that is needed (submodules,
virtual environment, treesitter, packages, etc.) for you to generate
the bindings. Then, activate the virtual environment:
- On Linux with Bash:
```
. .venv/bin/activate
```
- On Windows with Powershell:
```
.\.venv\Scripts\Activate.ps1
```
See https://docs.python.org/3/library/venv.html#how-venvs-work for other os-shell combinations.
To generate the vlc.py module and its documentation, for both the
development version and the installed VLC version, use `make`.
The Makefile tries to convert files from either `../../include/vlc`
(i.e. if the code is placed as a `bindings/pyton` in the VLC source
tree) or `/usr/include/vlc`.
For running tests, use `make test`.
Note that you need vlc installed because some tests require the
libvlc's dynamic library to be present on the system.
If you want to generate the bindings from an installed version of the
VLC includes (which are expected to be in /usr/include/vlc), use the
'installed' target: `make installed`.
See more recipes in the Makefile.
To install python-vlc for development purposes (add a symlink to your Python
library) simply do
```
python setup.py develop
```
preferably inside a virtualenv. You can uninstall it later with
```
python setup.py develop --uninstall
```
Documentation building needs sphinx. An online build is available at
<https://python-vlc.readthedocs.io/en/latest/>
## Packaging
The generated module version number is built from the VLC version
number and the generator version number:
vlc_major.vlc_minor.(1000 * vlc_micro + 100 * generator_major + generator_minor)
so that it shared it major.minor with the corresponding VLC.
To generate the reference PyPI module (including setup.py, examples
and metadata files), use
```
make dist
```
## Architecture
First of all, the bindings generator is in generator/generate.py.
It really is the conjunction of two things:
1. A **parser** of C header files (those of libvlc): that is the class `Parser`.
1. A **generator** of Python bindings: that is the class `PythonGenerator`.
`Parser` parses libvlc's headers and produces a kind of AST where nodes are
instances of either `Struct`, `Union`, `Func`, `Par`, `Enum` or `Val`.
The information kept is what is necessary for `PythonGenerator` to then produce
the bindings.
Until version 2 of the bindings generator, parsing was regex-based.
It worked pretty well thanks to the consistent coding style of libvlc.
However, it remained rather fragile.
Since version 2, parsing is done using [Tree-sitter](https://tree-sitter.github.io/tree-sitter/).
More specifically, we use the [C Tree-sitter grammar](https://github.com/tree-sitter/tree-sitter-c)
and [Tree-sitter's Python bindings](https://github.com/tree-sitter/py-tree-sitter).
It offers a more complete and robust parsing of C code.
The job of `Parser` is thus to transform the AST[^1] produced by Tree-sitter into an "AST"
understandable by the generator.
## LibVLC Discord
[](https://discord.gg/3h3K3JF)
python-vlc is part of the LibVLC Discord Community server. Feel free to come say hi!
## How to contribute
Contributions such as:
- reporting and fixing bugs,
- contributing unit tests
- contributing examples
are welcome!
[^1]: To be exact, it produces a CST: Concrete Syntax Tree.
================================================
FILE: README.module
================================================
Python ctypes-based bindings for libvlc
=======================================
The bindings use ctypes to directly call the libvlc dynamic lib, and
the code is generated from the include files defining the public
API. The same module should be compatible with various versions of
libvlc 3.*. However, there may be incompatible changes between major
versions.
Installing the module
---------------------
You can install the module through PyPI:
pip install python-vlc
Using the module
----------------
The module offers two ways of accessing the API - a raw access to all
exported methods, and more convenient wrapper classes. The [API
documentation](https://python-vlc.readthedocs.io/en/latest/) is
on Readthedocs.
Using wrapper classes
+++++++++++++++++++++
Most major structures of the libvlc API (Instance, Media, MediaPlayer,
etc) are wrapped as classes, with shorter method names and some
adaptations to provide a more pythonic API:
>>> import vlc
>>> player = vlc.MediaPlayer('file:///tmp/foo.avi')
>>> player.play()
>>> player.get_instance() # returns the corresponding instance
In this case, a default ``vlc.Instance`` will be instanciated and
stored in ``vlc._default_instance``. It will be used to instanciate
the various classes (``Media``, ``MediaList``, ``MediaPlayer``, etc).
You also can use wrapper methods closer to the original libvlc API:
>>> import vlc
>>> instance = vlc.Instance('--no-audio', '--fullscreen')
>>> player = instance.media_player_new()
>>> player.audio_get_volume()
50
>>> media = instance.media_new('file:///tmp/foo.avi')
>>> media.get_mrl()
'file:///tmp/foo.avi'
>>> player.set_media(m)
>>> player.play()
Using raw access
++++++++++++++++
Libvlc methods are available as attributes of the vlc module (as
vlc.libvlc_*). Use their docstring (any introspective shell like
ipython is your friend) to explore them, or refer to the online
documentation at https://olivieraubert.net/vlc/python-ctypes/
>>> import vlc
>>> vlc.libvlc_get_version()
'3.0.0-rc2 Vetinari'
>>> exc = vlc.VLCException()
>>> instance = vlc.libvlc_new(0, [], exc)
>>> instance
<vlc.Instance object at 0x8384a4c>
>>> vlc.libvlc_audio_get_volume(instance, exc)
50
Example code
++++++++++++
You can find [example
files](https://github.com/oaubert/python-vlc/tree/master/examples) in
the repository.
Note that the ``vlc.py`` module can itself be invoked as an
application using its own features, which also serves as a API usage
example. See the [end of the
module](https://github.com/oaubert/python-vlc/blob/master/generated/3.0/vlc.py#L12525)
after the line ``if __name__ == "__main__":``
License
-------
The generated module is licensed, like libvlc, under the GNU Lesser
General Public License 2.1 or later.
================================================
FILE: TODO
================================================
* Add more test coverage
* Provide more examples
================================================
FILE: dev_setup.py
================================================
#!/usr/bin/env python3
"""Script to get going after having cloned the repository."""
import os
import sys
from pathlib import Path
from subprocess import PIPE, STDOUT, CalledProcessError, run
PROJECT_ROOT = Path(__file__).parent
cwd = Path.cwd()
assert (
cwd.resolve() == PROJECT_ROOT.resolve()
), f"You should run that script from {PROJECT_ROOT}, but current working directory is {cwd}."
# See https://stackoverflow.com/questions/1854/how-to-identify-which-os-python-is-running-on
on_windows = os.name == "nt"
def run_cmd(mess, cmd):
print(f"{mess}...", end=" ", flush=True)
try:
_proc = run(cmd, stdout=PIPE, stderr=STDOUT, check=True)
except CalledProcessError as e:
print()
cmd = " ".join(e.cmd)
print(f"Oops! Command '{cmd}' failed.")
print(f"Got return code {e.returncode}.")
print("Here is the command output:")
print(e.output.decode(), end="", flush=True)
sys.exit(e.returncode)
print("Done.", flush=True)
python = "python3"
venv_bin = ".venv/Scripts" if on_windows else ".venv/bin"
venv_python = f"{venv_bin}/python3"
pre_commit = f"{venv_bin}/pre-commit"
# Clone Tree-sitter grammar which is a Git submodule of the project
# See https://git-scm.com/book/en/v2/Git-Tools-Submodules
run_cmd(
"Clone vendored C Tree-sitter grammar",
["git", "submodule", "update", "--init", "--recursive"],
)
# Create a virtual environment if it doesn't exist
if not (PROJECT_ROOT / ".venv").is_dir():
run_cmd("Create a virtual environment in .venv", [python, "-m", "venv", ".venv"])
# Upgrade venv's pip
run_cmd("Upgrade pip", [venv_python, "-m", "pip", "install", "--upgrade", "pip"])
# Install dev dependencies
run_cmd(
"Install dependencies",
[venv_python, "-m", "pip", "install", "-r", "requirements.txt"],
)
# Propose to install pre-commit hooks
print("If you want to enable pre-commit hooks (ruff checks), run the command\npre-commit install")
print("Setup successfull!")
================================================
FILE: dev_setup.sh
================================================
#!/bin/bash
# Setup development environment
PROJECT_ROOT=$(dirname "$(readlink -f $0)")
cd "${PROJECT_ROOT}" || exit
VENV_DIR="${PROJECT_ROOT}/.venv"
# Clone Tree-sitter grammar which is a Git submodule of the project
# See https://git-scm.com/book/en/v2/Git-Tools-Submodules
echo "Updating C Tree-sitter grammar"
git submodule update --init --recursive
if [ ! -d "${PROJECT_ROOT}/.venv" ]
then
# Create a virtual environment if it doesn't exist
echo "Creating a virtual environment in .venv"
python3 -m venv "${VENV_DIR}"
fi
echo "Activating .venv"
# shellcheck source=/dev/null
. "${VENV_DIR}/bin/activate"
echo "Upgrading .venv's pip"
python3 -m pip install --upgrade pip
echo "Installing dependencies"
python3 -m pip install -r requirements.txt
echo "If you want to enable pre-commit hooks (ruff checks), run the command pre-commit install"
echo "Setup done"
================================================
FILE: distribute_setup.py
================================================
#!python
"""Bootstrap distribute installation
If you want to use setuptools in your package's setup.py, just include this
file in the same directory with it, and add this to the top of your setup.py::
from distribute_setup import use_setuptools
use_setuptools()
If you want to require a specific version of setuptools, set a download
mirror, or use an alternate download directory, you can do so by supplying
the appropriate options to ``use_setuptools()``.
This file can also be run as a script to install or upgrade setuptools.
"""
import os
import shutil
import sys
import time
import fnmatch
import tempfile
import tarfile
import optparse
from distutils import log
try:
from site import USER_SITE
except ImportError:
USER_SITE = None
try:
import subprocess
def _python_cmd(*args):
args = (sys.executable,) + args
return subprocess.call(args) == 0
except ImportError:
# will be used for python 2.3
def _python_cmd(*args):
args = (sys.executable,) + args
# quoting arguments if windows
if sys.platform == 'win32':
def quote(arg):
if ' ' in arg:
return '"%s"' % arg
return arg
args = [quote(arg) for arg in args]
return os.spawnl(os.P_WAIT, sys.executable, *args) == 0
DEFAULT_VERSION = "0.6.49"
DEFAULT_URL = "http://pypi.python.org/packages/source/d/distribute/"
SETUPTOOLS_FAKED_VERSION = "0.6c11"
SETUPTOOLS_PKG_INFO = """\
Metadata-Version: 1.0
Name: setuptools
Version: %s
Summary: xxxx
Home-page: xxx
Author: xxx
Author-email: xxx
License: xxx
Description: xxx
""" % SETUPTOOLS_FAKED_VERSION
def _install(tarball, install_args=()):
# extracting the tarball
tmpdir = tempfile.mkdtemp()
log.warn('Extracting in %s', tmpdir)
old_wd = os.getcwd()
try:
os.chdir(tmpdir)
tar = tarfile.open(tarball)
_extractall(tar)
tar.close()
# going in the directory
subdir = os.path.join(tmpdir, os.listdir(tmpdir)[0])
os.chdir(subdir)
log.warn('Now working in %s', subdir)
# installing
log.warn('Installing Distribute')
if not _python_cmd('setup.py', 'install', *install_args):
log.warn('Something went wrong during the installation.')
log.warn('See the error message above.')
# exitcode will be 2
return 2
finally:
os.chdir(old_wd)
shutil.rmtree(tmpdir)
def _build_egg(egg, tarball, to_dir):
# extracting the tarball
tmpdir = tempfile.mkdtemp()
log.warn('Extracting in %s', tmpdir)
old_wd = os.getcwd()
try:
os.chdir(tmpdir)
tar = tarfile.open(tarball)
_extractall(tar)
tar.close()
# going in the directory
subdir = os.path.join(tmpdir, os.listdir(tmpdir)[0])
os.chdir(subdir)
log.warn('Now working in %s', subdir)
# building an egg
log.warn('Building a Distribute egg in %s', to_dir)
_python_cmd('setup.py', '-q', 'bdist_egg', '--dist-dir', to_dir)
finally:
os.chdir(old_wd)
shutil.rmtree(tmpdir)
# returning the result
log.warn(egg)
if not os.path.exists(egg):
raise IOError('Could not build the egg.')
def _do_download(version, download_base, to_dir, download_delay):
egg = os.path.join(to_dir, 'distribute-%s-py%d.%d.egg'
% (version, sys.version_info[0], sys.version_info[1]))
if not os.path.exists(egg):
tarball = download_setuptools(version, download_base,
to_dir, download_delay)
_build_egg(egg, tarball, to_dir)
sys.path.insert(0, egg)
import setuptools
setuptools.bootstrap_install_from = egg
def use_setuptools(version=DEFAULT_VERSION, download_base=DEFAULT_URL,
to_dir=os.curdir, download_delay=15, no_fake=True):
# making sure we use the absolute path
to_dir = os.path.abspath(to_dir)
was_imported = 'pkg_resources' in sys.modules or \
'setuptools' in sys.modules
try:
try:
import pkg_resources
# Setuptools 0.7b and later is a suitable (and preferable)
# substitute for any Distribute version.
try:
pkg_resources.require("setuptools>=0.7b")
return
except (pkg_resources.DistributionNotFound,
pkg_resources.VersionConflict):
pass
if not hasattr(pkg_resources, '_distribute'):
if not no_fake:
_fake_setuptools()
raise ImportError
except ImportError:
return _do_download(version, download_base, to_dir, download_delay)
try:
pkg_resources.require("distribute>=" + version)
return
except pkg_resources.VersionConflict:
e = sys.exc_info()[1]
if was_imported:
sys.stderr.write(
"The required version of distribute (>=%s) is not available,\n"
"and can't be installed while this script is running. Please\n"
"install a more recent version first, using\n"
"'easy_install -U distribute'."
"\n\n(Currently using %r)\n" % (version, e.args[0]))
sys.exit(2)
else:
del pkg_resources, sys.modules['pkg_resources'] # reload ok
return _do_download(version, download_base, to_dir,
download_delay)
except pkg_resources.DistributionNotFound:
return _do_download(version, download_base, to_dir,
download_delay)
finally:
if not no_fake:
_create_fake_setuptools_pkg_info(to_dir)
def download_setuptools(version=DEFAULT_VERSION, download_base=DEFAULT_URL,
to_dir=os.curdir, delay=15):
"""Download distribute from a specified location and return its filename
`version` should be a valid distribute version number that is available
as an egg for download under the `download_base` URL (which should end
with a '/'). `to_dir` is the directory where the egg will be downloaded.
`delay` is the number of seconds to pause before an actual download
attempt.
"""
# making sure we use the absolute path
to_dir = os.path.abspath(to_dir)
try:
from urllib.request import urlopen
except ImportError:
from urllib2 import urlopen
tgz_name = "distribute-%s.tar.gz" % version
url = download_base + tgz_name
saveto = os.path.join(to_dir, tgz_name)
src = dst = None
if not os.path.exists(saveto): # Avoid repeated downloads
try:
log.warn("Downloading %s", url)
src = urlopen(url)
# Read/write all in one block, so we don't create a corrupt file
# if the download is interrupted.
data = src.read()
dst = open(saveto, "wb")
dst.write(data)
finally:
if src:
src.close()
if dst:
dst.close()
return os.path.realpath(saveto)
def _no_sandbox(function):
def __no_sandbox(*args, **kw):
try:
from setuptools.sandbox import DirectorySandbox
if not hasattr(DirectorySandbox, '_old'):
def violation(*args):
pass
DirectorySandbox._old = DirectorySandbox._violation
DirectorySandbox._violation = violation
patched = True
else:
patched = False
except ImportError:
patched = False
try:
return function(*args, **kw)
finally:
if patched:
DirectorySandbox._violation = DirectorySandbox._old
del DirectorySandbox._old
return __no_sandbox
def _patch_file(path, content):
"""Will backup the file then patch it"""
f = open(path)
existing_content = f.read()
f.close()
if existing_content == content:
# already patched
log.warn('Already patched.')
return False
log.warn('Patching...')
_rename_path(path)
f = open(path, 'w')
try:
f.write(content)
finally:
f.close()
return True
_patch_file = _no_sandbox(_patch_file)
def _same_content(path, content):
f = open(path)
existing_content = f.read()
f.close()
return existing_content == content
def _rename_path(path):
new_name = path + '.OLD.%s' % time.time()
log.warn('Renaming %s to %s', path, new_name)
os.rename(path, new_name)
return new_name
def _remove_flat_installation(placeholder):
if not os.path.isdir(placeholder):
log.warn('Unkown installation at %s', placeholder)
return False
found = False
for file in os.listdir(placeholder):
if fnmatch.fnmatch(file, 'setuptools*.egg-info'):
found = True
break
if not found:
log.warn('Could not locate setuptools*.egg-info')
return
log.warn('Moving elements out of the way...')
pkg_info = os.path.join(placeholder, file)
if os.path.isdir(pkg_info):
patched = _patch_egg_dir(pkg_info)
else:
patched = _patch_file(pkg_info, SETUPTOOLS_PKG_INFO)
if not patched:
log.warn('%s already patched.', pkg_info)
return False
# now let's move the files out of the way
for element in ('setuptools', 'pkg_resources.py', 'site.py'):
element = os.path.join(placeholder, element)
if os.path.exists(element):
_rename_path(element)
else:
log.warn('Could not find the %s element of the '
'Setuptools distribution', element)
return True
_remove_flat_installation = _no_sandbox(_remove_flat_installation)
def _after_install(dist):
log.warn('After install bootstrap.')
placeholder = dist.get_command_obj('install').install_purelib
_create_fake_setuptools_pkg_info(placeholder)
def _create_fake_setuptools_pkg_info(placeholder):
if not placeholder or not os.path.exists(placeholder):
log.warn('Could not find the install location')
return
pyver = '%s.%s' % (sys.version_info[0], sys.version_info[1])
setuptools_file = 'setuptools-%s-py%s.egg-info' % \
(SETUPTOOLS_FAKED_VERSION, pyver)
pkg_info = os.path.join(placeholder, setuptools_file)
if os.path.exists(pkg_info):
log.warn('%s already exists', pkg_info)
return
log.warn('Creating %s', pkg_info)
try:
f = open(pkg_info, 'w')
except EnvironmentError:
log.warn("Don't have permissions to write %s, skipping", pkg_info)
return
try:
f.write(SETUPTOOLS_PKG_INFO)
finally:
f.close()
pth_file = os.path.join(placeholder, 'setuptools.pth')
log.warn('Creating %s', pth_file)
f = open(pth_file, 'w')
try:
f.write(os.path.join(os.curdir, setuptools_file))
finally:
f.close()
_create_fake_setuptools_pkg_info = _no_sandbox(
_create_fake_setuptools_pkg_info
)
def _patch_egg_dir(path):
# let's check if it's already patched
pkg_info = os.path.join(path, 'EGG-INFO', 'PKG-INFO')
if os.path.exists(pkg_info):
if _same_content(pkg_info, SETUPTOOLS_PKG_INFO):
log.warn('%s already patched.', pkg_info)
return False
_rename_path(path)
os.mkdir(path)
os.mkdir(os.path.join(path, 'EGG-INFO'))
pkg_info = os.path.join(path, 'EGG-INFO', 'PKG-INFO')
f = open(pkg_info, 'w')
try:
f.write(SETUPTOOLS_PKG_INFO)
finally:
f.close()
return True
_patch_egg_dir = _no_sandbox(_patch_egg_dir)
def _before_install():
log.warn('Before install bootstrap.')
_fake_setuptools()
def _under_prefix(location):
if 'install' not in sys.argv:
return True
args = sys.argv[sys.argv.index('install') + 1:]
for index, arg in enumerate(args):
for option in ('--root', '--prefix'):
if arg.startswith('%s=' % option):
top_dir = arg.split('root=')[-1]
return location.startswith(top_dir)
elif arg == option:
if len(args) > index:
top_dir = args[index + 1]
return location.startswith(top_dir)
if arg == '--user' and USER_SITE is not None:
return location.startswith(USER_SITE)
return True
def _fake_setuptools():
log.warn('Scanning installed packages')
try:
import pkg_resources
except ImportError:
# we're cool
log.warn('Setuptools or Distribute does not seem to be installed.')
return
ws = pkg_resources.working_set
try:
setuptools_dist = ws.find(
pkg_resources.Requirement.parse('setuptools', replacement=False)
)
except TypeError:
# old distribute API
setuptools_dist = ws.find(
pkg_resources.Requirement.parse('setuptools')
)
if setuptools_dist is None:
log.warn('No setuptools distribution found')
return
# detecting if it was already faked
setuptools_location = setuptools_dist.location
log.warn('Setuptools installation detected at %s', setuptools_location)
# if --root or --preix was provided, and if
# setuptools is not located in them, we don't patch it
if not _under_prefix(setuptools_location):
log.warn('Not patching, --root or --prefix is installing Distribute'
' in another location')
return
# let's see if its an egg
if not setuptools_location.endswith('.egg'):
log.warn('Non-egg installation')
res = _remove_flat_installation(setuptools_location)
if not res:
return
else:
log.warn('Egg installation')
pkg_info = os.path.join(setuptools_location, 'EGG-INFO', 'PKG-INFO')
if (os.path.exists(pkg_info) and
_same_content(pkg_info, SETUPTOOLS_PKG_INFO)):
log.warn('Already patched.')
return
log.warn('Patching...')
# let's create a fake egg replacing setuptools one
res = _patch_egg_dir(setuptools_location)
if not res:
return
log.warn('Patching complete.')
_relaunch()
def _relaunch():
log.warn('Relaunching...')
# we have to relaunch the process
# pip marker to avoid a relaunch bug
_cmd1 = ['-c', 'install', '--single-version-externally-managed']
_cmd2 = ['-c', 'install', '--record']
if sys.argv[:3] == _cmd1 or sys.argv[:3] == _cmd2:
sys.argv[0] = 'setup.py'
args = [sys.executable] + sys.argv
sys.exit(subprocess.call(args))
def _extractall(self, path=".", members=None):
"""Extract all members from the archive to the current working
directory and set owner, modification time and permissions on
directories afterwards. `path' specifies a different directory
to extract to. `members' is optional and must be a subset of the
list returned by getmembers().
"""
import copy
import operator
from tarfile import ExtractError
directories = []
if members is None:
members = self
for tarinfo in members:
if tarinfo.isdir():
# Extract directories with a safe mode.
directories.append(tarinfo)
tarinfo = copy.copy(tarinfo)
tarinfo.mode = 448 # decimal for oct 0700
self.extract(tarinfo, path)
# Reverse sort directories.
directories.sort(key=operator.attrgetter('name'), reverse=True)
# Set correct owner, mtime and filemode on directories.
for tarinfo in directories:
dirpath = os.path.join(path, tarinfo.name)
try:
self.chown(tarinfo, dirpath)
self.utime(tarinfo, dirpath)
self.chmod(tarinfo, dirpath)
except ExtractError:
e = sys.exc_info()[1]
if self.errorlevel > 1:
raise
else:
self._dbg(1, "tarfile: %s" % e)
def _build_install_args(options):
"""
Build the arguments to 'python setup.py install' on the distribute package
"""
install_args = []
if options.user_install:
if sys.version_info < (2, 6):
log.warn("--user requires Python 2.6 or later")
raise SystemExit(1)
install_args.append('--user')
return install_args
def _parse_args():
"""
Parse the command line for options
"""
parser = optparse.OptionParser()
parser.add_option(
'--user', dest='user_install', action='store_true', default=False,
help='install in user site package (requires Python 2.6 or later)')
parser.add_option(
'--download-base', dest='download_base', metavar="URL",
default=DEFAULT_URL,
help='alternative URL from where to download the distribute package')
options, args = parser.parse_args()
# positional arguments are ignored
return options
def main(version=DEFAULT_VERSION):
"""Install or upgrade setuptools and EasyInstall"""
options = _parse_args()
tarball = download_setuptools(download_base=options.download_base)
return _install(tarball, _build_install_args(options))
if __name__ == '__main__':
sys.exit(main())
================================================
FILE: docs/Makefile
================================================
# Minimal makefile for Sphinx documentation
#
# You can set these variables from the command line, and also
# from the environment for the first two.
SPHINXOPTS ?=
SPHINXBUILD ?= sphinx-build
SOURCEDIR = .
BUILDDIR = _build
# Put it first so that "make" without argument is like "make help".
help:
@$(SPHINXBUILD) -M help "$(SOURCEDIR)" "$(BUILDDIR)" $(SPHINXOPTS) $(O)
.PHONY: help Makefile
# Catch-all target: route all unknown targets to Sphinx using the new
# "make mode" option. $(O) is meant as a shortcut for $(SPHINXOPTS).
%: Makefile
@$(SPHINXBUILD) -M $@ "$(SOURCEDIR)" "$(BUILDDIR)" $(SPHINXOPTS) $(O)
================================================
FILE: docs/api.rst
================================================
API documentation
=================
Essential API classes
---------------------
The main starting point for the python API of python-vlc are the
:doc:`api/vlc/MediaPlayer` class and the :doc:`api/vlc/Instance` class.
Full API
--------
Consult :doc:`fullapi` for the full API documentation.
.. toctree::
:caption: API Documentation
:titlesonly:
api/vlc/Instance
api/vlc/MediaPlayer
fullapi
================================================
FILE: docs/conf.py
================================================
# Configuration file for the Sphinx documentation builder.
#
# For the full list of built-in configuration values, see the documentation:
# https://www.sphinx-doc.org/en/master/usage/configuration.html
import os
import sys
# Relative to conf.py location
MODULE_DIR = '../generated/3.0/'
# -- Project information -----------------------------------------------------
# https://www.sphinx-doc.org/en/master/usage/configuration.html#project-information
project = "python-vlc"
copyright = "2024, Olivier Aubert"
author = "Olivier Aubert"
version = "Unknown"
with open(f"{MODULE_DIR}/vlc.py", "r") as f:
for l in f.readlines():
if l.startswith('__version__'):
items = l.split('"')
if len(items) == 3:
version = items[1]
break
release = version
# -- General configuration ---------------------------------------------------
# https://www.sphinx-doc.org/en/master/usage/configuration.html#general-configuration
sys.path.insert(0, os.path.abspath(MODULE_DIR))
extensions = [
'sphinx_rtd_theme',
'autoapi.extension',
'sphinx_mdinclude',
]
exclude_patterns = ["_build", "Thumbs.db", ".DS_Store"]
autoapi_dirs = [ MODULE_DIR ]
# We only want to include vlc.py, not example files
autoapi_file_patterns = [ 'vlc.py' ]
autoapi_root = 'api'
autoapi_member_order = 'alphabetical'
autoapi_own_page_level = 'class'
autoapi_python_class_content = 'both'
autoapi_options = [ 'members', 'undoc-members', 'private-members', 'show-inheritance', 'show-module-summary' ]
# -- Options for HTML output -------------------------------------------------
# https://www.sphinx-doc.org/en/master/usage/configuration.html#options-for-html-output
html_theme = "sphinx_rtd_theme"
================================================
FILE: docs/fullapi.rst
================================================
Full API documentation
======================
.. toctree::
:glob:
api/vlc/*
================================================
FILE: docs/index.rst
================================================
Welcome to python-vlc's documentation!
======================================
You are looking at the new python-vlc API documentation. Note that
there are still some shortcomings (for instance, Enum values are not
provided). If you feel like contributions sphinx/sphinx-autoapi
changes to improve this documentation, please do, and submit a pull
request!
.. mdinclude:: ../README.module
.. toctree::
:maxdepth: 3
:caption: Documentation
Home <self>
api
================================================
FILE: docs/make.bat
================================================
@ECHO OFF
pushd %~dp0
REM Command file for Sphinx documentation
if "%SPHINXBUILD%" == "" (
set SPHINXBUILD=sphinx-build
)
set SOURCEDIR=.
set BUILDDIR=_build
%SPHINXBUILD% >NUL 2>NUL
if errorlevel 9009 (
echo.
echo.The 'sphinx-build' command was not found. Make sure you have Sphinx
echo.installed, then set the SPHINXBUILD environment variable to point
echo.to the full path of the 'sphinx-build' executable. Alternatively you
echo.may add the Sphinx directory to PATH.
echo.
echo.If you don't have Sphinx installed, grab it from
echo.https://www.sphinx-doc.org/
exit /b 1
)
if "%1" == "" goto help
%SPHINXBUILD% -M %1 %SOURCEDIR% %BUILDDIR% %SPHINXOPTS% %O%
goto end
:help
%SPHINXBUILD% -M help %SOURCEDIR% %BUILDDIR% %SPHINXOPTS% %O%
:end
popd
================================================
FILE: docs/requirements.txt
================================================
Sphinx==7.3.7
sphinx-autoapi
sphinx_mdinclude
sphinx_rtd_theme
================================================
FILE: examples/cocoavlc.py
================================================
#!/usr/bin/env python
# -*- coding: utf-8 -*-
# Example of using PyCocoa <https://PyPI.org/project/PyCocoa> to create a
# window, table and an application menu to run a video using VLC on macOS.
# The Python-VLC binding <https://PyPI.Python.org/pypi/python-vlc> and the
# corresponding VLC App, see <https://www.VideoLan.org/index.html>.
# PyCocoa version 21.11.02 or later must be installed (on macOS Monterey)
# This VLC player has been tested with VLC 3.0.10-16, 3.0.6-8, 3.0.4,
# 3.0.1-2, 2.2.8 and 2.2.6 and the compatible vlc.py Python-VLC binding
# using 64-bit Python 3.10.0, 3.9.6, 3.9.0-1, 3.8.10, 3.8.6, 3.7.0-4,
# 3.6.4-5 and 2.7.14-18 on macOS 12.0.1 Monterey, 11.5.2-6.1 Big Sur
# (aka 10.16), 10.15.6 Catalina, 10.14.6 Mojave and 10.13.4-6 High Sierra.
# This player does not work with PyPy <https://PyPy.org> nor with Intel(R)
# Python <https://Software.Intel.com/en-us/distribution-for-python>.
# Python 3.10.0, 3.9.6 and macOS' Python 2.7.16 run on Apple Silicon
# (C{arm64} I{natively}), all other Python versions run on Intel (C{x86_64})
# or I{emulated} Intel (C{"arm64_x86_64"}, see function C{pycocoa.machine}).
# MIT License <https://OpenSource.org/licenses/MIT>
#
# Copyright (C) 2017-2021 -- mrJean1 at Gmail -- All Rights Reserved.
#
# Permission is hereby granted, free of charge, to any person obtaining a
# copy of this software and associated documentation files (the "Software"),
# to deal in the Software without restriction, including without limitation
# the rights to use, copy, modify, merge, publish, distribute, sublicense,
# and/or sell copies of the Software, and to permit persons to whom the
# Software is furnished to do so, subject to the following conditions:
#
# The above copyright notice and this permission notice shall be included
# in all copies or substantial portions of the Software.
#
# THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS
# OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
# FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL
# THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR
# OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE,
# ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR
# OTHER DEALINGS IN THE SOFTWARE.
def _PyPI(package):
return 'see <https://PyPI.org/project/%s>' % (package,)
__all__ = ('AppVLC',) # PYCHOK expected
__version__ = '22.12.14'
try:
import vlc
except ImportError:
raise ImportError('no %s, %s' % ('vlc.py', _PyPI('Python-VLC')))
try:
from pycocoa import __name__ as _pycocoa_, \
__version__ as _pycocoa_version
except ImportError:
raise ImportError('no %s, %s' % (_pycocoa_, _PyPI('PyCocoa')))
if _pycocoa_version < '21.11.04': # __version__
raise ImportError('%s %s or later required, %s' % (
_pycocoa_, '21.11.04', _PyPI('PyCocoa')))
del _PyPI
# all imports listed explicitly to help PyChecker
from pycocoa import App, app_title, aspect_ratio, bytes2str, closeTables, \
get_printer, Item, ItemSeparator, machine, MediaWindow, Menu, \
OpenPanel, printf, str2bytes, Table, z1000str, zSIstr
from os.path import basename, getsize, isfile, splitext
from platform import architecture, mac_ver
import sys
from threading import Thread
from time import sleep, strftime, strptime
try:
from urllib import unquote as mrl_unquote # Python 2
except ImportError:
from urllib.parse import unquote as mrl_unquote # Python 3+
_Adjust = vlc.VideoAdjustOption # Enum
# <https://Wiki.VideoLan.org/Documentation:Modules/adjust>
_Adjust3 = {_Adjust.Brightness: (0, 1, 2),
_Adjust.Contrast: (0, 1, 2),
_Adjust.Gamma: (0.01, 1, 10),
_Adjust.Hue: (-180, 0, 180),
_Adjust.Saturation: (0, 1, 3)}
_AppleSi = machine().startswith('arm64')
_Argv0 = splitext(basename(__file__))[0]
_Movies = '.m4v', '.mov', '.mp4' # lower-case file types for movies, videos
_PNG = '.png' # snapshot always .png, even if .jpg or .tiff specified
_Python = sys.version.split()[0], architecture()[0] # PYCHOK false
_Select = 'Select a video file from the panel'
_VLC_3_ = vlc.__version__.split('.')[0] > '2' and \
bytes2str(vlc.libvlc_get_version().split(b'.')[0]) > '2'
# <https://Wiki.Videolan.org/Documentation:Modules/marq/#appendix_marq-color>
class _Color(object): # PYCHOK expected
Aqua = 0x00FFFF
Black = 0x000000
Blue = 0x0000FF
Fuchsia = 0xFF00FF
Gray = 0x808080
Green = 0x008000
Lime = 0x00FF00
Maroon = 0x800000
Navy = 0x000080
Olive = 0x808000
Purple = 0x800080
Red = 0xFF0000
Silver = 0xC0C0C0
Teal = 0x008080
White = 0xFFFFFF
Yellow = 0xFFFF00
_Color = _Color() # PYCHOK enum-like
def _fstrz(f, n=1, x=''):
# format float, strip trailing decimal zeros and point
return _fstrz0(f, n).rstrip('.') + x
def _fstrz0(f, n=1, x=''):
# format float, strip trailing decimal zeros
t = '%.*f' % (n, f)
return t.rstrip('0') + x
def _fstrz1(f, n=1, x=''):
# format float, strip trailing decimal zeros, except one
t = _fstrz0(f, n)
if t.endswith('.'):
t += '0'
return t + x
def _macOS(sep=None):
# get macOS version and extended platform.machine
t = 'macOS', mac_ver()[0], machine()
return sep.join(t) if sep else t
def _mspf(fps):
# convert frames per second to frame length in millisecs per frame
return 1000.0 / (fps or 25)
def _ms2str(ms):
# convert milliseconds to seconds string
return _fstrz1(max(ms, 0) * 0.001, 3, ' s')
def _ratio2str(by, *w_h):
# aspect ratio as string
return by.join(map(str, (w_h + ('-', '-'))[:2]))
class AppVLC(App):
'''The application with callback methods for C{app..._},
C{menu..._} and C{window..._} events.
Set things up inside the C{.__init__} and C{.appLauched_}
methods, start by calling the C{.run} method.
'''
adjustr = ''
marquee = None
media = None
logostr = ''
player = None
raiser = False
rate = 0.0 # rate vs normal
scale = 0.0 # video size / window size
sized = None # video (width, height)
Snapshot = Item('Snapshot', key='s', alt=True)
snapshot = _PNG # default: .png, .jpg or .tiff
snapshots = 0
Toggle = None
video = None
window = None
zoomX = 1.0 # zoom factor, >= 1.0
def __init__(self, video=None, # video file name
adjustr='', # vlc.VideoAdjustOption
logostr='', # vlc.VideoLogoOption
marquee=False, # vlc.VideoMarqueeOption
raiser=False, # re-raise errors
snapshot=_PNG, # png, other formats
title='AppVLC'): # window title
super(AppVLC, self).__init__(raiser=raiser, title=title)
self.adjustr = adjustr
self.logostr = logostr
self.marquee = marquee
# self.media = None
self.raiser = raiser
self.Toggle = Item('Play', self.menuToggle_, key='p', ctrl=True)
self.video = video
if snapshot != AppVLC.snapshot:
self.snapshot = '.' + snapshot.lstrip('.').lower()
if self.snapshot in (_PNG,): # only .PNG works, using .JPG ...
# ... or .TIFF is OK, but the snapshot image is always .PNG
self.player = vlc.MediaPlayer()
# elif self.snapshot in (_JPG, _PNG, _TIFF): # XXX doesn't work
# i = vlc.Instance('--snapshot-format', self.snapshot[1:]) # --verbose 2
# self.player = i.media_player_new()
else:
raise ValueError('invalid %s format: %r' % ('snapshot', snapshot))
def appLaunched_(self, app):
super(AppVLC, self).appLaunched_(app)
self.window = MediaWindow(title=self.video or self.title)
if self.player and self.video and isfile(self.video):
# the VLC player on macOS needs an ObjC NSView
self.media = self.player.set_mrl(self.video)
self.player.set_nsobject(self.window.NSview)
# if this window is on an external screen,
# move it to the built-in screen, aka 0
# if not self.window.screen.isBuiltIn:
# self.window.screen = 0 # == BuiltIn
if self.adjustr: # preset video options
for o in self.adjustr.lower().split(','):
o, v = o.strip().split('=')
o = getattr(_Adjust, o.capitalize(), None)
if o is not None:
self._VLCadjust(o, value=v)
if self.marquee: # set up marquee
self._VLCmarquee()
if self.logostr: # show logo
self._VLClogo(self.logostr)
menu = Menu('VLC')
menu.append(
# the action/method name for each item
# is string 'menu' + item.title + '_',
# without any spaces and trailing dots,
# see function pycocoa.title2action.
Item('Open...', key='o'),
ItemSeparator(),
self.Toggle, # Play >< Pause
Item('Rewind', key='r', ctrl=True),
ItemSeparator(),
Item('Info', key='i'),
Item('Close', key='w'),
ItemSeparator(),
Item('Zoom In', key='+', shift=True),
Item('Zoom Out', key='-'),
ItemSeparator(),
Item('Faster', key='>', shift=True),
Item('Slower', key='<', shift=True))
if _VLC_3_:
menu.append(
ItemSeparator(),
Item('Brighter', key='b', shift=True),
Item('Darker', key='d', shift=True))
menu.append(
ItemSeparator(),
Item('Normal 1X', key='='),
ItemSeparator(),
Item('Audio Filters', self.menuFilters_, key='a', shift=True),
Item('Video Filters', self.menuFilters_, key='v', shift=True),
ItemSeparator(),
self.Snapshot)
self.append(menu)
self.menuPlay_(None)
self.window.front()
def menuBrighter_(self, item):
self._brightness(item, +0.1)
def menuClose_(self, item): # PYCHOK expected
# close window(s) from menu Cmd+W
# printf('%s %r', 'close_', item)
if not closeTables():
self.terminate()
def menuDarker_(self, item):
self._brightness(item, -0.1)
def menuFaster_(self, item):
self._rate(item, 1.25)
def menuFilters_(self, item):
try:
self.menuPause_(item)
# display a table of audio/video filters
t = Table(' Name:150:bold', ' Short:150:Center:center', ' Long:300', 'Help')
i = self.player.get_instance()
b = item.title.split()[0]
for f in sorted(i.audio_filter_list_get() if b == 'Audio'
else i.video_filter_list_get()):
while f and not f[-1]: # "rstrip" None
f = f[:-1]
t.append(*map(bytes2str, f))
t.display('VLC %s Filters' % (b,), width=800)
except Exception as x:
if self.raiser:
raise
printf('%s', x, nl=1, nt=1)
def menuInfo_(self, item):
try:
self.menuPause_(item)
# display Python, vlc, libVLC, media info table
p = self.player
m = p.get_media()
t = Table(' Name:bold', ' Value:200:Center:center', ' Alt:100')
t.append(_Argv0, __version__, '20' + __version__)
t.append('PyCocoa', _pycocoa_version, '20' + _pycocoa_version)
t.append('Python', *_Python)
t.append(*_macOS())
x = 'built-in' if self.window.screen.isBuiltIn else 'external'
t.append('screen', x, str(self.window.screen.displayID))
t.separator()
t.append('vlc.py', vlc.__version__, hex(vlc.hex_version()))
b = ' '.join(vlc.build_date.split()[:5])
t.append('built', strftime('%x', strptime(b, '%c')), vlc.build_date)
t.separator()
t.append('libVLC', bytes2str(vlc.libvlc_get_version()), hex(vlc.libvlc_hex_version()))
t.append('libVLC', *bytes2str(vlc.libvlc_get_compiler()).split(None, 1))
t.separator()
f = mrl_unquote(bytes2str(m.get_mrl()))
t.append('media', basename(f), f)
if f.lower().startswith('file://'):
z = getsize(f[7:])
t.append('size', z1000str(z), zSIstr(z))
t.append('state', str(p.get_state()))
f = max(p.get_position(), 0)
t.append('position/length', _fstrz(f * 100, 2), _ms2str(p.get_length()))
f = map(_ms2str, (p.get_time(), m.get_duration()))
t.append('time/duration', *f)
t.append('track/count', z1000str(p.video_get_track()), z1000str(p.video_get_track_count()))
t.separator()
f = p.get_fps()
t.append('fps/mspf', _fstrz(f, 5), _fstrz(_mspf(f), 3, ' ms'))
r = p.get_rate()
t.append('rate', r, '%s%%' % (int(r * 100),))
a, b = p.video_get_size(0) # num=0
w, h = map(int, self.window.frame.size.size)
t.append('video size', _ratio2str('x', a, b), _ratio2str('x', w, h))
r = _ratio2str(':', *aspect_ratio(a, b)) # p.video_get_aspect_ratio()
t.append('aspect ratio', r, _ratio2str(':', *self.window.ratio))
t.append('scale', _fstrz1(p.video_get_scale(), 3), _fstrz(self.zoomX, 2, 'X'))
t.separator()
def VLCadjustr3(f, option): # get option value
lo, _, hi = _Adjust3[option]
v = f(option)
p = max(0, (v - lo)) * 100.0 / (hi - lo)
n = str(option).split('.')[-1] # 'VideoAdjustOption.Xyz'
return n.lower(), _fstrz1(v, 2), _fstrz(p, 1, '%')
f = self.player.video_get_adjust_float
t.append(*VLCadjustr3(f, _Adjust.Brightness))
t.append(*VLCadjustr3(f, _Adjust.Contrast))
t.append(*VLCadjustr3(f, _Adjust.Gamma))
t.append(*VLCadjustr3(f, _Adjust.Hue))
t.append(*VLCadjustr3(f, _Adjust.Saturation))
t.separator()
s = vlc.MediaStats() # re-use single MediaStats instance?
if m.get_stats(s):
def Kops2bpstr2(bitrate): # convert Ko/s to bits/sec
# bitrates are conventionally in kilo-octets-per-sec
return zSIstr(bitrate * 8000, B='bps', K=1000).split()
t.append('media read', *zSIstr(s.read_bytes).split())
t.append('input bitrate', *Kops2bpstr2(s.input_bitrate))
if s.input_bitrate > 0: # XXX approximate caching, based
# on <https://GitHub.com/oaubert/python-vlc/issues/61>
b = s.read_bytes - s.demux_read_bytes
t.append('input caching', _ms2str(b / s.input_bitrate), zSIstr(b))
t.append('demux read', *zSIstr(s.demux_read_bytes).split())
t.append('stream bitrate', *Kops2bpstr2(s.demux_bitrate))
t.append('video decoded', z1000str(s.decoded_video), 'blocks')
t.append('video played', z1000str(s.displayed_pictures), 'frames')
t.append('video lost', z1000str(s.lost_pictures), 'frames')
t.append('audio decoded', z1000str(s.decoded_audio), 'blocks')
t.append('audio played', z1000str(s.played_abuffers), 'buffers')
t.append('audio lost', z1000str(s.lost_abuffers), 'buffers')
t.display('Python, VLC & Media Information', width=500)
except Exception as x:
if self.raiser:
raise
printf('%s', x, nl=1, nt=1)
def menuNormal1X_(self, item):
# set rate and zoom to 1X
self._brightness(item)
# self._contrast(item)
# self._gamma(item)
# self._hue(item)
self._rate(item)
# self._saturation(item)
self._zoom(item)
def menuOpen_(self, item):
# stop the current video and show
# the panel to select another video
self.menuPause_(item)
self.badge.label = 'O'
v = OpenPanel(_Select).pick(_Movies)
if v:
self.window.title = self.video = v
self.player.set_mrl(v)
self._reset()
def menuPause_(self, item, pause=False): # PYCHOK expected
# note, .player.pause() pauses and un-pauses the video,
# .player.stop() stops the video and blanks the window
if pause or self.player.is_playing():
self.player.pause()
self.badge.label = 'S' # stopped
self.Toggle.title = 'Play' # item.title = 'Play'
def menuPlay_(self, item_or_None): # PYCHOK expected
self.player.play()
self._resizer()
self.badge.label = 'P' # Playing
self.Toggle.title = 'Pause' # item.title = 'Pause'
def menuRewind_(self, item): # PYCHOK expected
self.player.set_position(0.0)
self.player.set_time(0.0)
# note, can't re-play once at the end
# self.menuPlay_()
self.badge.label = 'R'
self._reset()
def menuSlower_(self, item):
self._rate(item, 0.80)
def menuSnapshot_(self, item): # PYCHOK expected
w = self.lastWindow
if w:
self.snapshots += 1
s = '-'.join((_Argv0,
'snapshot%d' % (self.snapshots,),
w.__class__.__name__))
if isinstance(w, MediaWindow):
self.player.video_take_snapshot(0, s + self.snapshot, 0, 0)
elif get_printer: # in PyCocoa 18.08.04+
get_printer().printView(w.PMview, toPDF=s + '.pdf')
def menuToggle_(self, item):
# toggle between Pause and Play
if self.player.is_playing():
self.menuPause_(item, pause=True)
else:
self.menuPlay_(item)
def menuZoomIn_(self, item):
self._zoom(item, 1.25)
def menuZoomOut_(self, item):
self._zoom(item, 0.80)
def windowClose_(self, window):
# quit or click of window close button
if window is self.window:
self.terminate()
self.Snapshot.isEnabled = False
super(AppVLC, self).windowClose_(window)
def windowLast_(self, window):
self.Snapshot.isEnabled = window.isPrintable or isinstance(window, MediaWindow)
super(AppVLC, self).windowLast_(window)
def windowResize_(self, window):
if window is self.window:
self._reset(True)
super(AppVLC, self).windowResize_(window)
def windowScreen_(self, window, change):
if window is self.window:
self._reset(True)
super(AppVLC, self).windowScreen_(window, change)
def _brightness(self, unused, fraction=0): # change brightness
self._VLCadjust(_Adjust.Brightness, fraction)
def _contrast(self, unused, fraction=0): # change contrast
self._VLCadjust(_Adjust.Contrast, fraction)
def _gamma(self, unused, fraction=0): # change gamma
self._VLCadjust(_Adjust.Gamma, fraction)
def _hue(self, unused, fraction=0): # change hue
self._VLCadjust(_Adjust.Hue, fraction)
def _rate(self, unused, factor=0): # change the video rate
p = self.player
r = p.get_rate() * factor
r = max(0.2, min(10.0, r)) if r > 0 else 1.0
p.set_rate(r)
self.rate = r
def _reset(self, resize=False):
self.zoomX = 1
self.sized = None
if resize:
Thread(target=self._sizer).start()
def _resizer(self): # adjust aspect ratio and marquee height
if self.sized:
# window's contents' aspect ratio
self.window.ratio = self.sized
else:
Thread(target=self._sizer).start()
def _saturation(self, unused, fraction=0): # change saturation
self._VLCadjust(_Adjust.Saturation, fraction)
def _sizer(self, secs=0.25): # asynchronously
while True:
# the first call(s) returns (0, 0),
# subsequent calls return (w, h)
a, b = self.player.video_get_size(0)
if b > 0 and a > 0:
w = self.window
# set window's contents' aspect ratio
w.ratio = self.sized = a, b
# get video scale factor
self.scale = float(w.frame.width) / a
self._wiggle()
break
elif secs > 0.001:
sleep(secs)
else: # one-shot
break
def _VLCadjust(self, option, fraction=0, value=None):
# adjust a video option like brightness, contrast, etc.
p = self.player
# <https://Wiki.VideoLan.org/Documentation:Modules/adjust>
# note, .Enable must be set to 1, but once is sufficient
p.video_set_adjust_int(_Adjust.Enable, 1)
try:
lo, v, hi = _Adjust3[option]
if fraction:
if value is None:
v = p.video_get_adjust_float(option)
else:
v = float(value)
v += fraction * (hi - lo)
v = float(max(lo, min(hi, v)))
p.video_set_adjust_float(option, v)
except (KeyError, ValueError):
pass
def _VLClogo(self, logostr):
# add a video logo, example "python cocoavlc.py -logo
# cone-altglass2.png\;cone-icon-small.png ..."
p = self.player
g = vlc.VideoLogoOption # Enum
# <https://Wiki.VideoLan.org/Documentation:Modules/logo>
p.video_set_logo_int(g.enable, 1)
p.video_set_logo_int(g.position, vlc.Position.Center)
p.video_set_logo_int(g.opacity, 128) # 0-255
# p.video_set_logo_int(g.delay, 1000) # millisec
# p.video_set_logo_int(g.repeat, -1) # forever
p.video_set_logo_string(g.file, logostr)
def _VLCmarquee(self, size=36):
# put video marquee at the bottom-center
p = self.player
m = vlc.VideoMarqueeOption # Enum
# <https://Wiki.VideoLan.org/Documentation:Modules/marq>
p.video_set_marquee_int(m.Enable, 1)
p.video_set_marquee_int(m.Size, int(size)) # pixels
p.video_set_marquee_int(m.Position, vlc.Position.Bottom)
p.video_set_marquee_int(m.Opacity, 255) # 0-255
p.video_set_marquee_int(m.Color, _Color.Yellow)
p.video_set_marquee_int(m.Timeout, 0) # millisec, 0==forever
p.video_set_marquee_int(m.Refresh, 1000) # millisec (or sec?)
p.video_set_marquee_string(m.Text, str2bytes('%Y-%m-%d %T %z'))
def _wiggle(self):
# wiggle the video to fill the window
p = self.player
s = p.video_get_scale()
p.video_set_scale(0.0 if s else self.scale)
p.video_set_scale(s)
def _zoom(self, unused, factor=0):
# zoom the video in/out, see tkvlc.py
p = self.player
x = self.zoomX * factor
if x > 1:
s = x
else: # not below 1X
s, x = 0.0, 1.0
p.video_set_scale(s)
self.scale = s
self.zoomX = x
if __name__ == '__main__': # MCCABE 24
def _Adjustr():
a = [] # get adjust default values
for n in _Adjust._enum_names_.values():
try:
_, d, _ = _Adjust3[getattr(_Adjust, n)]
a.append('%s=%s' % (n, d))
except KeyError: # ignore .Enable
pass
return ','.join(sorted(a))
_adjustr = ''
_argv0 = basename(sys.argv[0]) # _Title
_Argv0 = splitext(_argv0)[0]
_logostr = ''
_marquee = False
_raiser = False
_snapshot = AppVLC.snapshot # default
_timeout = None
_title = splitext(_argv0)[0]
_video = None
args = sys.argv[1:]
while args and args[0].startswith('-'):
o = args.pop(0)
t = o.lower()
if t in ('-h', '--help'):
u = ('-h|--help',
'-adjust %s' % (_Adjustr(),))
if _VLC_3_: # requires VLC 3+ and libvlc 3+
u += ('-logo <image_file_name>[\\;<image_file_name>...]',
'-marquee')
u += ('-raiser',
'-snapshot-format jpg|png|tiff',
'-timeout <secs>',
'-title <string>',
'-v|--version',
'<video_file_name>')
printf('usage: [%s]', '] ['.join(u), argv0=_argv0)
sys.exit(0)
elif '-adjust'.startswith(t) and len(t) > 1 and args:
_adjustr = args.pop(0)
elif '-logo'.startswith(t) and len(t) > 1 and args and _VLC_3_:
_logostr = args.pop(0)
elif '-marquee'.startswith(t) and len(t) > 1 and _VLC_3_:
_marquee = True
elif '-raiser'.startswith(t) and len(t) > 1:
_raiser = True
elif '-snapshot-format'.startswith(t) and len(t) > 1 and args:
_snapshot = args.pop(0)
elif '-timeout'.startswith(t) and len(t) > 3 and args:
_timeout = args.pop(0)
elif '-title'.startswith(t) and len(t) > 3 and args:
_title = args.pop(0).strip()
elif t in ('-v', '--version'):
# Print version of this cocoavlc.py, PyCocoa, etc.
print('%s: %s (%s %s %s)' % (basename(__file__), __version__,
_pycocoa_, _pycocoa_version,
_macOS(sep=' ')))
try:
vlc.print_version() # PYCHOK expected
vlc.print_python() # PYCHOK expected
except AttributeError:
pass
sys.exit(0)
else:
printf('invalid option: %s', o, argv0=_argv0)
sys.exit(1)
if _raiser: # get traceback at SIG- faults or ...
try: # ... use: python3 -X faulthandler ...
import faulthandler
faulthandler.enable()
except ImportError: # not in Python 3.3-
pass
if args:
_video = args.pop(0)
else:
printf('- %s', _Select.lower(), argv0=_argv0, nl=1, nt=1)
app_title(_title) # App.title when there's no App yet
_video = OpenPanel('Select a video file').pick(_Movies)
if _video:
app = AppVLC(video=_video, adjustr=_adjustr,
logostr=_logostr,
marquee=_marquee,
raiser=_raiser,
snapshot=_snapshot,
title=_title)
app.run(timeout=_timeout) # never returns
================================================
FILE: examples/gtk2vlc.py
================================================
#! /usr/bin/env python3
#
# gtk example/widget for VLC Python bindings
# Copyright (C) 2009-2010 the VideoLAN team
#
# This program is free software; you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
# the Free Software Foundation; either version 2 of the License, or
# (at your option) any later version.
#
# This program is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
# GNU General Public License for more details.
#
# You should have received a copy of the GNU General Public License
# along with this program; if not, write to the Free Software
# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston MA 02110-1301, USA.
#
"""VLC Gtk Widget classes + example application.
This module provides two helper classes, to ease the embedding of a
VLC component inside a pygtk application.
VLCWidget is a simple VLC widget.
DecoratedVLCWidget provides simple player controls.
When called as an application, it behaves as a video player.
$Id$
"""
import gtk
gtk.gdk.threads_init()
import sys
import vlc
from gettext import gettext as _
# Create a single vlc.Instance() to be shared by (possible) multiple players.
instance = vlc.Instance()
class VLCWidget(gtk.DrawingArea):
"""Simple VLC widget.
Its player can be controlled through the 'player' attribute, which
is a vlc.MediaPlayer() instance.
"""
def __init__(self, *p):
gtk.DrawingArea.__init__(self)
self.player = instance.media_player_new()
def handle_embed(*args):
if sys.platform == 'win32':
self.player.set_hwnd(self.window.handle)
else:
self.player.set_xwindow(self.window.xid)
return True
self.connect("map", handle_embed)
self.set_size_request(320, 200)
class DecoratedVLCWidget(gtk.VBox):
"""Decorated VLC widget.
VLC widget decorated with a player control toolbar.
Its player can be controlled through the 'player' attribute, which
is a Player instance.
"""
def __init__(self, *p):
gtk.VBox.__init__(self)
self._vlc_widget = VLCWidget(*p)
self.player = self._vlc_widget.player
self.pack_start(self._vlc_widget, expand=True)
self._toolbar = self.get_player_control_toolbar()
self.pack_start(self._toolbar, expand=False)
def get_player_control_toolbar(self):
"""Return a player control toolbar
"""
tb = gtk.Toolbar()
tb.set_style(gtk.TOOLBAR_ICONS)
for text, tooltip, stock, callback in (
(_("Play"), _("Play"), gtk.STOCK_MEDIA_PLAY, lambda b: self.player.play()),
(_("Pause"), _("Pause"), gtk.STOCK_MEDIA_PAUSE, lambda b: self.player.pause()),
(_("Stop"), _("Stop"), gtk.STOCK_MEDIA_STOP, lambda b: self.player.stop()),
):
b=gtk.ToolButton(stock)
b.set_tooltip_text(tooltip)
b.connect("clicked", callback)
tb.insert(b, -1)
tb.show_all()
return tb
class VideoPlayer:
"""Example simple video player.
"""
def __init__(self):
self.vlc = DecoratedVLCWidget()
def main(self, fname):
self.vlc.player.set_media(instance.media_new(fname))
w = gtk.Window()
w.add(self.vlc)
w.show_all()
w.connect("destroy", gtk.main_quit)
gtk.main()
class MultiVideoPlayer:
"""Example multi-video player.
It plays multiple files side-by-side, with per-view and global controls.
"""
def main(self, filenames):
# Build main window
window=gtk.Window()
mainbox=gtk.VBox()
videos=gtk.HBox()
window.add(mainbox)
mainbox.add(videos)
# Create VLC widgets
for fname in filenames:
v = DecoratedVLCWidget()
v.player.set_media(instance.media_new(fname))
videos.add(v)
# Create global toolbar
tb = gtk.Toolbar()
tb.set_style(gtk.TOOLBAR_ICONS)
def execute(b, methodname):
"""Execute the given method on all VLC widgets.
"""
for v in videos.get_children():
getattr(v.player, methodname)()
return True
for text, tooltip, stock, callback, arg in (
(_("Play"), _("Global play"), gtk.STOCK_MEDIA_PLAY, execute, "play"),
(_("Pause"), _("Global pause"), gtk.STOCK_MEDIA_PAUSE, execute, "pause"),
(_("Stop"), _("Global stop"), gtk.STOCK_MEDIA_STOP, execute, "stop"),
):
b = gtk.ToolButton(stock)
b.set_tooltip_text(tooltip)
b.connect("clicked", callback, arg)
tb.insert(b, -1)
mainbox.pack_start(tb, expand=False)
window.show_all()
window.connect("destroy", gtk.main_quit)
gtk.main()
if __name__ == '__main__':
if not sys.argv[1:]:
print('You must provide at least 1 movie filename')
sys.exit(1)
if len(sys.argv[1:]) == 1:
# Only 1 file. Simple interface
p=VideoPlayer()
p.main(sys.argv[1])
else:
# Multiple files.
p=MultiVideoPlayer()
p.main(sys.argv[1:])
================================================
FILE: examples/gtkvlc.py
================================================
#! /usr/bin/env python3
#
# gtk3 example/widget for VLC Python bindings
# Copyright (C) 2017 Olivier Aubert <contact@olivieraubert.net>
#
# This program is free software; you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
# the Free Software Foundation; either version 2 of the License, or
# (at your option) any later version.
#
# This program is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
# GNU General Public License for more details.
#
# You should have received a copy of the GNU General Public License
# along with this program; if not, write to the Free Software
# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston MA 02110-1301, USA.
#
"""VLC Gtk3 Widget classes + example application.
This module provides two helper classes, to ease the embedding of a
VLC component inside a pygtk application.
VLCWidget is a simple VLC widget.
DecoratedVLCWidget provides simple player controls.
When called as an application, it behaves as a video player.
"""
import gi
gi.require_version('Gdk', '3.0')
gi.require_version('Gtk', '3.0')
from gi.repository import Gdk
from gi.repository import Gtk
Gdk.threads_init ()
import sys
import ctypes
import vlc
from gettext import gettext as _
# Create a single vlc.Instance() to be shared by (possible) multiple players.
if 'linux' in sys.platform:
# Inform libvlc that Xlib is not initialized for threads
instance = vlc.Instance("--no-xlib")
else:
instance = vlc.Instance()
def get_window_pointer(window):
""" Use the window.__gpointer__ PyCapsule to get the C void* pointer to the window
"""
# get the c gpointer of the gdk window
ctypes.pythonapi.PyCapsule_GetPointer.restype = ctypes.c_void_p
ctypes.pythonapi.PyCapsule_GetPointer.argtypes = [ctypes.py_object]
return ctypes.pythonapi.PyCapsule_GetPointer(window.__gpointer__, None)
class VLCWidget(Gtk.DrawingArea):
"""Simple VLC widget.
Its player can be controlled through the 'player' attribute, which
is a vlc.MediaPlayer() instance.
"""
__gtype_name__ = 'VLCWidget'
def __init__(self, *p):
Gtk.DrawingArea.__init__(self)
self.player = instance.media_player_new()
def handle_embed(*args):
if sys.platform == 'win32':
# get the win32 handle
gdkdll = ctypes.CDLL('libgdk-3-0.dll')
handle = gdkdll.gdk_win32_window_get_handle(get_window_pointer(self.get_window()))
self.player.set_hwnd(handle)
elif sys.platform == 'darwin':
# get the nsview pointer. NB need to manually specify function signature
gdkdll = ctypes.CDLL('libgdk-3.0.dll')
get_nsview = gdkdll.gdk_quaerz_window_get_nsview
get_nsview.restype, get_nsview.argtypes = [ctypes.c_void_p], ctypes.c_void_p
self.player.set_nsobject(get_nsview(get_window_pointer(self.get_window())))
else:
self.player.set_xwindow(self.get_window().get_xid())
return True
self.connect("realize", handle_embed)
self.set_size_request(320, 200)
class DecoratedVLCWidget(Gtk.VBox):
"""Decorated VLC widget.
VLC widget decorated with a player control toolbar.
Its player can be controlled through the 'player' attribute, which
is a Player instance.
"""
__gtype_name__ = 'DecoratedVLCWidget'
def __init__(self, *p):
super(DecoratedVLCWidget, self).__init__()
self._vlc_widget = VLCWidget(*p)
self.player = self._vlc_widget.player
self.add(self._vlc_widget)
self._toolbar = self.get_player_control_toolbar()
self.pack_start(self._toolbar, False, False, 0)
self.show_all()
def get_player_control_toolbar(self):
"""Return a player control toolbar
"""
tb = Gtk.Toolbar.new()
for text, tooltip, iconname, callback in (
(_("Play"), _("Play"), 'gtk-media-play', lambda b: self.player.play()),
(_("Pause"), _("Pause"), 'gtk-media-pause', lambda b: self.player.pause()),
(_("Stop"), _("Stop"), 'gtk-media-stop', lambda b: self.player.stop()),
(_("Quit"), _("Quit"), 'gtk-quit', Gtk.main_quit),
):
i = Gtk.Image.new_from_icon_name(iconname, Gtk.IconSize.MENU)
b = Gtk.ToolButton.new(i, text)
b.set_tooltip_text(tooltip)
b.connect("clicked", callback)
tb.insert(b, -1)
return tb
class VideoPlayer:
"""Example simple video player.
"""
def __init__(self):
self.vlc = DecoratedVLCWidget()
def main(self, fname):
self.vlc.player.set_media(instance.media_new(fname))
w = Gtk.Window()
w.add(self.vlc)
w.show_all()
w.connect("destroy", Gtk.main_quit)
Gtk.main()
class MultiVideoPlayer:
"""Example multi-video player.
It plays multiple files side-by-side, with per-view and global controls.
"""
def main(self, filenames):
# Build main window
window=Gtk.Window()
mainbox=Gtk.VBox()
videos=Gtk.HBox()
window.add(mainbox)
mainbox.add(videos)
# Create VLC widgets
for fname in filenames:
v = DecoratedVLCWidget()
v.player.set_media(instance.media_new(fname))
videos.add(v)
# Create global toolbar
tb = Gtk.Toolbar.new()
def execute(b, methodname):
"""Execute the given method on all VLC widgets.
"""
for v in videos.get_children():
getattr(v.player, methodname)()
return True
for text, tooltip, iconname, callback, arg in (
(_("Play"), _("Global play"), 'gtk-media-play', execute, "play"),
(_("Pause"), _("Global pause"), 'gtk-media-pause', execute, "pause"),
(_("Stop"), _("Global stop"), 'gtk-media-stop', execute, "stop"),
(_("Quit"), _("Quit"), 'gtk-quit', Gtk.main_quit, None),
):
i = Gtk.Image.new_from_icon_name(iconname, Gtk.IconSize.MENU)
b = Gtk.ToolButton.new(i, text)
b.set_tooltip_text(tooltip)
b.connect("clicked", callback, arg)
tb.insert(b, -1)
mainbox.pack_start(tb, False, False, 0)
window.show_all()
window.connect("destroy", Gtk.main_quit)
Gtk.main()
if __name__ == '__main__':
if not sys.argv[1:]:
print('You must provide at least 1 movie filename')
sys.exit(1)
if len(sys.argv[1:]) == 1:
# Only 1 file. Simple interface
p=VideoPlayer()
from evaluator import Evaluator
e = Evaluator(globals(), locals())
e.popup()
p.main(sys.argv[1])
else:
# Multiple files.
p=MultiVideoPlayer()
p.main(sys.argv[1:])
instance.release()
================================================
FILE: examples/play_buffer.py
================================================
#!/usr/bin/env python3
# Author: A.Invernizzi (@albestro on GitHub)
# Date: Jun 03, 2020
# MIT License <http://OpenSource.org/licenses/MIT>
#
# Copyright (C) 2020 -- A. Invernizzi, @albestro on github
#
# Permission is hereby granted, free of charge, to any person obtaining a
# copy of this software and associated documentation files (the "Software"),
# to deal in the Software without restriction, including without limitation
# the rights to use, copy, modify, merge, publish, distribute, sublicense,
# and/or sell copies of the Software, and to permit persons to whom the
# Software is furnished to do so, subject to the following conditions:
#
# The above copyright notice and this permission notice shall be included
# in all copies or substantial portions of the Software.
#
# THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS
# OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
# FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL
# THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR
# OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE,
# ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR
# OTHER DEALINGS IN THE SOFTWARE.
"""
Example usage of VLC API function `libvlc_media_new_callbacks`
This function allows to create a VLC media `libvlc_media_t` specifying custom
callbacks where the user can define how to manage and read the stream of data.
The general use case for this is when you have data in memory and you want to
play it (e.g. audio stream from a web radio).
In this example, we are going to read playable data from files in a specified
folder. In case you would want to read from a file, it is not the best way to do it,
but for the sake of this example we are going to read data into memory from files.
The example tries to highlight the separation of concerns between the callbacks and
the application logic, so it would hopefully make clear how to integrate the VLC API
with existing libraries.
In particular, we have two main parts:
- StreamProvider: which is a class that implements the logic; "scrape" a folder
for files with a specific extensions, and provide methods that retrieves data.
- VLC callabacks that uses a StreamProvider object
"""
import argparse
import ctypes
import os
import vlc
class StreamProviderDir(object):
def __init__(self, rootpath, file_ext):
self._media_files = []
self._rootpath = rootpath
self._file_ext = file_ext
self._index = 0
def open(self):
"""
this function is responsible of opening the media.
it could have been done in the __init__, but it is just an example
in this case it scan the specified folder, but it could also scan a
remote url or whatever you prefer.
"""
print("read file list")
for entry in os.listdir(self._rootpath):
if os.path.splitext(entry)[1] == f".{self._file_ext}":
self._media_files.append(os.path.join(self._rootpath, entry))
self._media_files.sort()
print("playlist:")
for index, media_file in enumerate(self._media_files):
print(f"[{index}] {media_file}")
def release_resources(self):
"""
In this example this function is just a placeholder,
in a more complex example this may release resources after the usage,
e.g. closing the socket from where we retrieved media data
"""
print("releasing stream provider")
def seek(self, offset):
"""
Again, a placeholder, not useful for the example
"""
print(f"requested seek with offset={offset}")
def get_data(self):
"""
It reads the current file in the list and returns the binary data
In this example it reads from file, but it could have downloaded data from an url
"""
print(f"reading file [{self._index}] ", end='')
if self._index == len(self._media_files):
print("file list is over")
return b''
print(f"{self._media_files[self._index]}")
with open(self._media_files[self._index], 'rb') as stream:
data = stream.read()
self._index = self._index + 1
return data
# HERE THERE ARE THE CALLBACKS USED BY THE MEDIA CREATED IN THE "MAIN"
# a callback in its simplest form is a python function decorated with the specific @vlc.CallbackDecorators.*
@vlc.CallbackDecorators.MediaOpenCb
def media_open_cb(opaque, data_pointer, size_pointer):
print("OPEN", opaque, data_pointer, size_pointer)
stream_provider = ctypes.cast(opaque, ctypes.POINTER(ctypes.py_object)).contents.value
stream_provider.open()
data_pointer.contents.value = opaque
size_pointer.value = 1 ** 64 - 1
return 0
@vlc.CallbackDecorators.MediaReadCb
def media_read_cb(opaque, buffer, length):
print("READ", opaque, buffer, length)
stream_provider = ctypes.cast(opaque, ctypes.POINTER(ctypes.py_object)).contents.value
new_data = stream_provider.get_data()
bytes_read = len(new_data)
if bytes_read > 0:
buffer_array = ctypes.cast(buffer, ctypes.POINTER(ctypes.c_char * bytes_read))
for index, b in enumerate(new_data):
buffer_array.contents[index] = ctypes.c_char(b)
print(f"just read f{bytes_read}B")
return bytes_read
@vlc.CallbackDecorators.MediaSeekCb
def media_seek_cb(opaque, offset):
print("SEEK", opaque, offset)
stream_provider = ctypes.cast(opaque, ctypes.POINTER(ctypes.py_object)).contents.value
stream_provider.seek(offset)
return 0
@vlc.CallbackDecorators.MediaCloseCb
def media_close_cb(opaque):
print("CLOSE", opaque)
stream_provider = ctypes.cast(opaque, ctypes.POINTER(ctypes.py_object)).contents.value
stream_provider.release_resources()
# MAIN
if __name__ == '__main__':
parser = argparse.ArgumentParser(
description='play files found in specified media folder (in alphabetic order)',
formatter_class=argparse.ArgumentDefaultsHelpFormatter)
parser.add_argument(
'media_folder',
help='where to find files to play')
parser.add_argument(
'--extension',
default='ts',
help='file extension of the files to play')
args = parser.parse_args()
# helper object acting as media data provider
# it is just to highlight how the opaque pointer in the callback can be used
# and that the logic can be isolated from the callbacks
stream_provider = StreamProviderDir(args.media_folder, args.extension)
# these two lines to highlight how to pass a python object using ctypes
# it is verbose, but you can see the steps required
stream_provider_obj = ctypes.py_object(stream_provider)
stream_provider_ptr = ctypes.byref(stream_provider_obj)
# create an instance of vlc
instance = vlc.Instance()
# setup the callbacks for the media
media = instance.media_new_callbacks(
media_open_cb,
media_read_cb,
media_seek_cb,
media_close_cb,
stream_provider_ptr)
player = media.player_new_from_media()
# play/stop
player.play()
input("press enter to quit")
player.stop()
================================================
FILE: examples/psgvlc.py
================================================
#! /usr/bin/env python3
# -*- coding: utf-8 -*-
u'''Bare Bones VLC Media Player Demo with Playlist.
1 - Originally the Demo_Media_Player_VLC_Based.py duplicated from
<https://GitHub.com/PySimpleGUI/PySimpleGUI/blob/master/DemoPrograms>
and modified to work and showing videos on recent macOS versions.
2 - This script uses PySimpleGUI under its LGPL3+ stipulations.
3 - You will need to install the Python bindings for VLC, for example
using pip: python3 -m pip install python-vlc
4 - You need the VLC player itself from <https://www.VideoLan.org>.
5 - On macOS, you also need to get tkvlc.py from this location
<https://GitHub.com/oaubert/python-vlc/tree/master/examples>
to get video and audio.
6 - On macOS, the video plays full-frame, overwriting the buttons.
7 - Original <https://GitHub.com/israel-dryer/Media-Player> by Israel
Dryer, modified to be a PySimpleGUI Demo Program and a python-vlc
example for you to customize. Uses the VLC player to playback
local media files (and YouTube streams).
'''
import sys
if sys.version_info[0] < 3: # Python 3.4+ only
sys.exit('%s requires Python 3.4 or later' % (sys.argv[0],))
# import Tkinter as tk
import PySimpleGUI as sg
import vlc
__all__ = ('libtk',)
__version__ = '22.11.07' # mrJean1 at Gmail
_Load_ = 'Load'
_Next_ = 'Next'
_Path_ = 'Media URL or local path:'
_Pause_ = 'Pause'
_Play_ = 'Play'
_Prev_ = 'Previous'
_Stop_ = 'Stop'
# GUI definition & setup
sg.theme('DarkBlue')
def Bn(name): # a PySimpleGUI "User Defined Element" (see docs)
return sg.Button(name, size=(8, 1), pad=(1, 1))
layout = [[sg.Input(default_text=_Path_, size=(40, 1), key='-VIDEO_PATH-'), sg.Button(_Load_)],
[sg.Frame('', [], size=(300, 170), key='-VID_OUT-')], # was [sg.Image('', ...)],
[Bn(_Prev_), Bn(_Play_), Bn(_Next_), Bn(_Pause_), Bn(_Stop_)],
[sg.Text('Load media to start', key='-MESSAGE_AREA-')]]
window = sg.Window('PySimpleGUI VLC Player', layout, element_justification='center', finalize=True, resizable=True)
window['-VID_OUT-'].expand(True, True) # type: sg.Element
# Media Player Setup
inst = vlc.Instance()
list_player = inst.media_list_player_new()
media_list = inst.media_list_new([])
list_player.set_media_list(media_list)
player = list_player.get_media_player()
# tell VLC where to render the video(s)
tk_id = window['-VID_OUT-'].Widget.winfo_id()
libtk = ''
if sg.running_linux():
player.set_xwindow(tk_id)
elif sg.running_windows():
player.set_hwnd(tk_id)
elif sg.running_mac():
try:
from tkvlc import _GetNSView, libtk
ns = _GetNSView(tk_id)
except ImportError:
ns = None
libtk = 'none, install tkvlc.py from <https://GitHub.com/oaubert/python-vlc> examples'
if ns: # drawable NSview
player.set_nsobject(ns)
else: # no video, only audio
player.set_xwindow(tk_id)
else: # running trinket, etc.
player.set_hwnd(tk_id) # TBD
if __name__ == '__main__': # MCCABE 20
if len(sys.argv) > 1:
if sys.argv[1].lower() in ('-v', '--version'):
# show all versions, this vlc.py, libvlc, etc. (sample output on macOS):
# ...
# % python3 ./psgvlc.py -v
# psgvlc.py: 22.11.06
# tkinter: 8.6
# libTk: /Library/Frameworks/Python.framework/Versions/3.11/lib/libtk8.6.dylib
# vlc.py: 3.0.12119 (Mon May 31 18:25:17 2021 3.0.12)
# libVLC: 3.0.16 Vetinari (0x3001000)
# plugins: /Applications/VLC.app/Contents/MacOS/plugins
# Python: 3.11.0 (64bit) macOS 13.0 arm64
for t in ((sys.argv[0], __version__), (sg.tk.__name__, sg.tk.TkVersion), ('libTk', libtk)):
print('{}: {}'.format(*t))
try:
vlc.print_version()
vlc.print_python()
except AttributeError:
pass
sys.exit(0)
if sys.argv[1]:
media_list.add_media(sys.argv[1])
list_player.set_media_list(media_list)
# The Event Loop
while True:
# run with a timeout so that current location can be updated
event, values = window.read(timeout=1000)
if event == sg.WIN_CLOSED:
break
if event == _Pause_:
list_player.pause()
elif event == _Stop_:
list_player.stop()
elif event == _Next_:
list_player.next()
list_player.play()
elif event == _Prev_:
list_player.previous() # first call causes current video to start over
list_player.previous() # second call moves back 1 video from current
list_player.play()
elif event == _Play_:
list_player.play()
elif event == _Load_:
path = values['-VIDEO_PATH-']
if path and _Path_ not in path:
media_list.add_media(path)
list_player.set_media_list(media_list)
window['-VIDEO_PATH-'].update(_Path_) # only add a legit submit
# update elapsed time if a video loaded and playing
if player.is_playing():
text = '{:02d}:{:02d}'.format(*divmod(player.get_time() // 1000, 60)) + ' / ' + \
'{:02d}:{:02d}'.format(*divmod(player.get_length() // 1000, 60))
if sg.running_mac():
print('{}: {}'.format(sys.argv[0], text))
elif not media_list.count():
text = 'Load media to start'
else:
text = 'Ready to play media'
window['-MESSAGE_AREA-'].update(text)
window.close()
================================================
FILE: examples/pyobjcvlc.py
================================================
#! /usr/bin/env python3
# -*- coding: utf-8 -*-
# License at the end of this file. This module is equivalent to
# PyCocoa/test/simple_VLCplayer.py but based on PyObjC instead
# of PyCocoa <https://PyPI.org/project/PyCocoa>. Until macOS
# release Catalina, macOS' Python includes PyObjC.
# See also a more comprehensive VLC player example cocoavlc.py
# <https://GitHub.com/oaubert/python-vlc/tree/master/examples>
# This VLC player has only been tested with VLC 2.2.8 and 3.0.8,
# and a compatible vlc.py <https://PyPI.org/project/Python-VLC>
# binding using Python 2.7.10 with macOS' PyObjC 2.5.1 and Python
# 3.7.4 with PyObjC 5.2b1 on macOS 10.13.6 High Sierra or 10.14.6
# Mojave, all in 64-bit only. This player has not been tested
# on iOS, nor with PyPy and Intel(R) Python.
from os.path import basename # PYCHOK expected
from platform import architecture, mac_ver # PYCHOK false
import sys
_argv0 = basename(__file__)
if not sys.platform.startswith('darwin'):
raise ImportError('%s only supported on %s' % (_argv0, 'macOS'))
class _ImportError(ImportError): # PYCHOK expected
def __init__(self, package, PyPI):
PyPI = '<https://PyPI.org/project/%s>' % (PyPI,)
t = 'no module %s, see %s' % (package, PyPI)
ImportError.__init__(self, t)
try: # PYCHOK expected
from objc import __version__ as __PyObjC__
except ImportError:
raise _ImportError('objc', 'PyObjC')
# the imports listed explicitly to help PyChecker
from Cocoa import NSAlternateKeyMask, NSApplication, \
NSBackingStoreBuffered, NSBundle, \
NSCommandKeyMask, NSControlKeyMask, \
NSMakeRect, NSMenu, NSMenuItem, \
NSObject, \
NSScreen, NSShiftKeyMask, NSSize, \
NSView, NSWindow
try:
from Cocoa import NSWindowStyleMaskClosable, NSWindowStyleMaskMiniaturizable, \
NSWindowStyleMaskResizable, NSWindowStyleMaskTitled
except ImportError: # previously, NSWindowStyleMaskXxx was named NSXxxWindowMask
from Cocoa import NSClosableWindowMask as NSWindowStyleMaskClosable, \
NSMiniaturizableWindowMask as NSWindowStyleMaskMiniaturizable, \
NSResizableWindowMask as NSWindowStyleMaskResizable, \
NSTitledWindowMask as NSWindowStyleMaskTitled
NSStr = bytes if sys.version_info.major < 3 else str
NSWindowStyleMaskUsual = NSWindowStyleMaskClosable | NSWindowStyleMaskMiniaturizable \
| NSWindowStyleMaskResizable | NSWindowStyleMaskTitled
__all__ = ('simpleVLCplay',)
__version__ = '19.09.27'
try: # all imports listed explicitly to help PyChecker
from math import gcd # Python 3+
except ImportError:
try:
from fractions import gcd # Python 2-
except ImportError:
def gcd(a, b):
a, b = abs(a), abs(b)
if a < b:
a, b = b, a
while b:
a, b = b, (a % b)
return a
def mspf(fps):
'''Convert frames per second to frame length in millisecs.
'''
return 1000.0 / (fps or 25)
def nsBundleRename(title, match='Python'):
'''Change the bundle title if the current title matches.
@param title: New bundle title (C{str}).
@keyword match: Optional, previous title to match (C{str}).
@return: The previous bundle title (C{str}) or None.
@note: Used to mimick C{NSApplication.setTitle_(ns_title)},
the application name shown in the menu bar.
'''
# <https://Developer.Apple.com/documentation/
# foundation/nsbundle/1495012-bundlewithpath>
# ns = NSBundle.bundleWithPath_(os.path.abspath(match))
p, ns = None, NSBundle.mainBundle()
if ns:
ns = ns.localizedInfoDictionary() or ns.infoDictionary()
if ns:
k = NSStr('CFBundleName')
p = ns.objectForKey_(k) or None
if title and match in (p, '', None): # can't be empty
ns.setObject_forKey_(NSStr(title), k)
return p
def printf(fmt, *args, **kwds): # argv0='', nl=0, nt=0
'''Formatted print I{fmt % args} with optional keywords.
@param fmt: Print-like format (C{str}).
@param args: Optional arguments to include (I{all positional}).
@keyword argv0: Optional prefix (C{str}).
@keyword nl: Number of leading blank lines (C{int}).
@keyword nt: Number of trailing blank lines (C{int}).
'''
a = kwds.get('argv0', _argv0)
t = (fmt % args) if args else fmt
nl = '\n' * kwds.get('nl', 0)
nt = '\n' * kwds.get('nt', 0)
print(''.join((nl, a, ' ', t, nt)))
def terminating(app, timeout):
'''Terminate C{app} after C{timeout} seconds.
@param app: The application (C{NSApplication} instance).
@patam timeout: Time in seconds (C{float}).
'''
try:
secs = float(timeout)
except (TypeError, ValueError):
secs = 0
if secs > 0:
from threading import Thread
def _t():
from time import sleep
sleep(secs + 0.5)
app.terminate_()
Thread(target=_t).start()
class _NSDelegate(NSObject):
'''(INTERNAL) Delegate for NSApplication and NSWindow,
handling PyObjC events, notifications and callbacks.
'''
app = None # NSApplication
NSItem = None # NSMenuItem
player = None # vlc.MediaPlayer
ratio = 2 # aspect_ratio calls
title = '' # top-level menu title
video = None # video file name
window = None # main NSWindow
def applicationDidFinishLaunching_(self, notification):
# the VLC player needs an NSView object
self.window, view = _Window2(title=self.video or self.title)
# set the window's delegate to the app's to
# make method .windowWillClose_ work, see
# <https://Gist.GitHub.com/kaloprominat/6105220>
self.window.setDelegate_(self)
# pass viewable to VLC player, see PyObjC Generated types ...
# <https://PyObjC.ReadTheDocs.io/en/latest/core/type-wrapper.html>
self.player.set_nsobject(view.__c_void_p__())
menu = NSMenu.alloc().init() # create main menu
menu.addItem_(_MenuItem('Full ' + 'Screen', 'enterFullScreenMode:', 'f', ctrl=True)) # Ctrl-Cmd-F, Esc to exit
menu.addItem_(_MenuItem('Info', 'info:', 'i'))
menu.addItem_(_MenuItemSeparator())
self.NSitem = _MenuItem('Pause', 'toggle:', 'p', ctrl=True) # Ctrl-Cmd-P
menu.addItem_(self.NSitem)
menu.addItem_(_MenuItem('Rewind', 'rewind:', 'r', ctrl=True)) # Ctrl-Cmd-R
menu.addItem_(_MenuItemSeparator())
menu.addItem_(_MenuItem('Hide ' + self.title, 'hide:', 'h')) # Cmd-H, implied
menu.addItem_(_MenuItem('Hide Others', 'hideOtherApplications:', 'h', alt=True)) # Alt-Cmd-H
menu.addItem_(_MenuItem('Show All', 'unhideAllApplications:')) # no key
menu.addItem_(_MenuItemSeparator())
menu.addItem_(_MenuItem('Quit ' + self.title, 'terminate:', 'q')) # Cmd-Q
subMenu = NSMenuItem.alloc().init()
subMenu.setSubmenu_(menu)
menuBar = NSMenu.alloc().init()
menuBar.addItem_(subMenu)
self.app.setMainMenu_(menuBar)
self.player.play()
# adjust the contents' aspect ratio
self.windowDidResize_(None)
def info_(self, notification):
try:
p = self.player
if p.is_playing():
p.pause()
m = p.get_media()
v = sys.modules[p.__class__.__module__] # import vlc
b = v.bytes_to_str
printf(__version__, nl=1)
# print Python, vlc, libVLC, media info
printf('PyObjC %s', __PyObjC__, nl=1)
printf('Python %s %s', sys.version.split()[0], architecture()[0])
printf('macOS %s', ' '.join(mac_ver()[0:3:2]), nt=1)
printf('vlc.py %s (%#x)', v.__version__, v.hex_version())
printf('built: %s', v.build_date)
printf('libVLC %s (%#x)', b(v.libvlc_get_version()), v.libvlc_hex_version())
printf('libVLC %s', b(v.libvlc_get_compiler()), nt=1)
printf('media: %s', b(m.get_mrl()))
printf('state: %s', p.get_state())
printf('track/count: %s/%s', p.video_get_track(), p.video_get_track_count())
printf('time/duration: %s/%s ms', p.get_time(), m.get_duration())
printf('position/length: %.2f%%/%s ms', p.get_position() * 100.0, p.get_length())
f = p.get_fps()
printf('fps: %.3f (%.3f ms)', f, mspf(f))
printf('rate: %s', p.get_rate())
w, h = p.video_get_size(0)
printf('video size: %sx%s', w, h)
r = gcd(w, h) or ''
if r and w and h:
r = ' (%s:%s)' % (w // r, h // r)
printf('aspect ratio: %s%s', p.video_get_aspect_ratio(), r)
printf('scale: %.3f', p.video_get_scale())
o = p.get_nsobject() # for macOS only
printf('nsobject: %r (%#x)', o, o, nt=1)
except Exception as x:
printf('%r', x, nl=1, nt=1)
def rewind_(self, notification):
self.player.set_position(0.0)
# can't re-play once at the end
# self.player.play()
def toggle_(self, notification):
# toggle between Pause and Play
if self.player.is_playing():
# note, .pause() pauses and un-pauses the video,
# .stop() stops the video and blanks the window
self.player.pause()
t = 'Play'
else:
self.player.play()
t = 'Pause'
self.NSitem.setTitle_(NSStr(t))
def windowDidResize_(self, notification):
if self.window and self.ratio:
# get and maintain the aspect ratio
# (the first player.video_get_size()
# call returns (0, 0), subsequent
# calls return (w, h) correctly)
w, h = self.player.video_get_size(0)
r = gcd(w, h)
if r and w and h:
r = NSSize(w // r , h // r)
self.window.setContentAspectRatio_(r)
self.ratio -= 1
def windowWillClose_(self, notification):
self.app.terminate_(self)
def _MenuItem(label, action=None, key='', alt=False, cmd=True, ctrl=False, shift=False):
'''New NS menu item with action and optional shortcut key.
'''
# <http://Developer.Apple.com/documentation/appkit/nsmenuitem/1514858-initwithtitle>
ns = NSMenuItem.alloc().initWithTitle_action_keyEquivalent_(
NSStr(label), NSStr(action), NSStr(key))
if key:
mask = 0
if alt:
mask |= NSAlternateKeyMask
if cmd:
mask |= NSCommandKeyMask
if ctrl:
mask |= NSControlKeyMask
if shift:
mask |= NSShiftKeyMask # NSAlphaShiftKeyMask
if mask:
ns.setKeyEquivalentModifierMask_(mask)
return ns
def _MenuItemSeparator():
'''A menu separator item.
'''
return NSMenuItem.separatorItem()
def _Window2(title=_argv0, fraction=0.5):
'''Create the main NS window and the drawable NS view.
'''
frame = NSScreen.mainScreen().frame()
if 0.1 < fraction < 1.0:
# use the lower left quarter of the screen size as frame
w = int(frame.size.width * fraction + 0.5)
h = int(frame.size.height * w / frame.size.width)
frame = NSMakeRect(frame.origin.x + 10, frame.origin.y + 10, w, h)
window = NSWindow.alloc().initWithContentRect_styleMask_backing_defer_(
frame,
NSWindowStyleMaskUsual,
NSBackingStoreBuffered,
False) # or 0
window.setTitle_(NSStr(title))
# create the drawable_nsobject NSView for vlc.py, see vlc.MediaPlayer.set_nsobject()
# for an alternate NSView object with protocol VLCOpenGLVideoViewEmbedding
# <http://StackOverflow.com/questions/11562587/create-nsview-directly-from-code>
# <http://GitHub.com/ariabuckles/pyobjc-framework-Cocoa/blob/master/Examples/AppKit/DotView/DotView.py>
view = NSView.alloc().initWithFrame_(frame)
window.setContentView_(view)
# force the video/window aspect ratio, adjusted
# above when the window is/has been resized
window.setContentAspectRatio_(frame.size)
window.makeKeyAndOrderFront_(None)
return window, view
def simpleVLCplay(player, title=_argv0, video='', timeout=None):
'''Create a minimal NS application, drawable window and basic menu
for the given VLC player (with media) and start the player.
@note: This function never returns, but the VLC player and
other Python thread(s) do run.
'''
if not player:
raise ValueError('%s invalid: %r' % ('player', player))
app = NSApplication.sharedApplication()
nsBundleRename(NSStr(title)) # top-level menu title
dlg = _NSDelegate.alloc().init()
dlg.app = app
dlg.player = player
dlg.title = title or _argv0
dlg.video = video or basename(player.get_media().get_mrl())
app.setDelegate_(dlg)
terminating(app, timeout)
app.run() # never returns
if __name__ == '__main__':
try:
import vlc
except ImportError:
raise _ImportError('vlc', 'Python-VLC')
_argv0 = _name = basename(sys.argv[0])
_timeout = None
args = sys.argv[1:]
while args and args[0].startswith('-'):
o = args.pop(0)
t = o.lower()
if t in ('-h', '--help'):
printf('usage: [-h|--help] [-name "%s"] [-timeout <secs>] %s',
_name, '<video_file_name>')
sys.exit(0)
elif args and len(t) > 1 and '-name'.startswith(t):
_name = args.pop(0)
elif args and len(t) > 1 and '-timeout'.startswith(t):
_timeout = args.pop(0)
elif t in ('-v', '--version'):
print('%s: %s (%s %s)' % (basename(__file__), __version__,
'PyObjC', __PyObjC__))
try:
vlc.print_version()
vlc.print_python()
except AttributeError:
pass
sys.exit(0)
else:
printf('invalid option: %s', o)
sys.exit(1)
if not args:
printf('missing %s', '<video_file_name>')
sys.exit(1)
# create a VLC player and play the video
p = vlc.MediaPlayer(args.pop(0))
simpleVLCplay(p, title=_name, timeout=_timeout) # never returns
# MIT License <http://OpenSource.org/licenses/MIT>
#
# Copyright (C) 2017-2020 -- mrJean1 at Gmail -- All Rights Reserved.
#
# Permission is hereby granted, free of charge, to any person obtaining a
# copy of this software and associated documentation files (the "Software"),
# to deal in the Software without restriction, including without limitation
# the rights to use, copy, modify, merge, publish, distribute, sublicense,
# and/or sell copies of the Software, and to permit persons to whom the
# Software is furnished to do so, subject to the following conditions:
#
# The above copyright notice and this permission notice shall be included
# in all copies or substantial portions of the Software.
#
# THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS
# OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
# FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL
# THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR
# OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE,
# ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR
# OTHER DEALINGS IN THE SOFTWARE.
================================================
FILE: examples/pyqt5vlc.py
================================================
#! /usr/bin/env python3
#
# PyQt5 example for VLC Python bindings
# Copyright (C) 2009-2010 the VideoLAN team
#
# This program is free software; you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
# the Free Software Foundation; either version 2 of the License, or
# (at your option) any later version.
#
# This program is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
# GNU General Public License for more details.
#
# You should have received a copy of the GNU General Public License
# along with this program; if not, write to the Free Software
# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston MA 02110-1301, USA.
#
"""
A simple example for VLC python bindings using PyQt5.
Author: Saveliy Yusufov, Columbia University, sy2685@columbia.edu
Date: 25 December 2018
"""
import platform
import os
import sys
from PyQt5 import QtWidgets, QtGui, QtCore
import vlc
class Player(QtWidgets.QMainWindow):
"""A simple Media Player using VLC and Qt
"""
def __init__(self, master=None):
QtWidgets.QMainWindow.__init__(self, master)
self.setWindowTitle("Media Player")
# Create a basic vlc instance
self.instance = vlc.Instance()
self.media = None
# Create an empty vlc media player
self.mediaplayer = self.instance.media_player_new()
self.mediaplayer.audio_set_volume(50)
self.create_ui()
self.is_paused = False
def create_ui(self):
"""Set up the user interface, signals & slots
"""
self.widget = QtWidgets.QWidget(self)
self.setCentralWidget(self.widget)
# In this widget, the video will be drawn
if platform.system() == "Darwin": # for MacOS
self.videoframe = QtWidgets.QMacCocoaViewContainer(0)
else:
self.videoframe = QtWidgets.QFrame()
self.palette = self.videoframe.palette()
self.palette.setColor(QtGui.QPalette.Window, QtGui.QColor(0, 0, 0))
self.videoframe.setPalette(self.palette)
self.videoframe.setAutoFillBackground(True)
self.positionslider = QtWidgets.QSlider(QtCore.Qt.Horizontal, self)
self.positionslider.setToolTip("Position")
self.positionslider.setMaximum(1000)
self.positionslider.sliderMoved.connect(self.set_position)
self.positionslider.sliderPressed.connect(self.set_position)
self.hbuttonbox = QtWidgets.QHBoxLayout()
self.playbutton = QtWidgets.QPushButton("Play")
self.hbuttonbox.addWidget(self.playbutton)
self.playbutton.clicked.connect(self.play_pause)
self.stopbutton = QtWidgets.QPushButton("Stop")
self.hbuttonbox.addWidget(self.stopbutton)
self.stopbutton.clicked.connect(self.stop)
self.hbuttonbox.addStretch(1)
self.volumeslider = QtWidgets.QSlider(QtCore.Qt.Horizontal, self)
self.volumeslider.setMaximum(100)
self.volumeslider.setValue(self.mediaplayer.audio_get_volume())
self.volumeslider.setToolTip("Volume")
self.hbuttonbox.addWidget(self.volumeslider)
self.volumeslider.valueChanged.connect(self.set_volume)
self.vboxlayout = QtWidgets.QVBoxLayout()
self.vboxlayout.addWidget(self.videoframe)
self.vboxlayout.addWidget(self.positionslider)
self.vboxlayout.addLayout(self.hbuttonbox)
self.widget.setLayout(self.vboxlayout)
menu_bar = self.menuBar()
# File menu
file_menu = menu_bar.addMenu("File")
# Add actions to file menu
open_action = QtWidgets.QAction("Load Video", self)
open_shortcut = QtGui.QKeySequence(QtGui.QKeySequence.StandardKey.Open)
open_action.setShortcut(open_shortcut)
file_menu.addAction(open_action)
close_action = QtWidgets.QAction("Close App", self)
close_shortcut = QtGui.QKeySequence(QtGui.QKeySequence.StandardKey.Close)
close_action.setShortcut(close_shortcut)
file_menu.addAction(close_action)
open_action.triggered.connect(self.open_file)
close_action.triggered.connect(sys.exit)
self.timer = QtCore.QTimer(self)
self.timer.setInterval(100)
self.timer.timeout.connect(self.update_ui)
def play_pause(self):
"""Toggle play/pause status
"""
if self.mediaplayer.is_playing():
self.mediaplayer.pause()
self.playbutton.setText("Play")
self.is_paused = True
self.timer.stop()
else:
if self.mediaplayer.play() == -1:
self.open_file()
return
self.mediaplayer.play()
self.playbutton.setText("Pause")
self.timer.start()
self.is_paused = False
def stop(self):
"""Stop player
"""
self.mediaplayer.stop()
self.playbutton.setText("Play")
def open_file(self):
"""Open a media file in a MediaPlayer
"""
dialog_txt = "Choose Media File"
filename = QtWidgets.QFileDialog.getOpenFileName(self, dialog_txt, os.path.expanduser('~'))
if not filename:
return
# getOpenFileName returns a tuple, so use only the actual file name
self.media = self.instance.media_new(filename[0])
# Put the media in the media player
self.mediaplayer.set_media(self.media)
# Parse the metadata of the file
self.media.parse()
# Set the title of the track as window title
self.setWindowTitle(self.media.get_meta(0))
# The media player has to be 'connected' to the QFrame (otherwise the
# video would be displayed in it's own window). This is platform
# specific, so we must give the ID of the QFrame (or similar object) to
# vlc. Different platforms have different functions for this
if platform.system() == "Linux": # for Linux using the X Server
self.mediaplayer.set_xwindow(int(self.videoframe.winId()))
elif platform.system() == "Windows": # for Windows
self.mediaplayer.set_hwnd(int(self.videoframe.winId()))
elif platform.system() == "Darwin": # for MacOS
self.mediaplayer.set_nsobject(int(self.videoframe.winId()))
self.play_pause()
def set_volume(self, volume):
"""Set the volume
"""
self.mediaplayer.audio_set_volume(volume)
def set_position(self):
"""Set the movie position according to the position slider.
"""
# The vlc MediaPlayer needs a float value between 0 and 1, Qt uses
# integer variables, so you need a factor; the higher the factor, the
# more precise are the results (1000 should suffice).
# Set the media position to where the slider was dragged
self.timer.stop()
pos = self.positionslider.value()
self.mediaplayer.set_position(pos / 1000.0)
self.timer.start()
def update_ui(self):
"""Updates the user interface"""
# Set the slider's position to its corresponding media position
# Note that the setValue function only takes values of type int,
# so we must first convert the corresponding media position.
media_pos = int(self.mediaplayer.get_position() * 1000)
self.positionslider.setValue(media_pos)
# No need to call this function if nothing is played
if not self.mediaplayer.is_playing():
self.timer.stop()
# After the video finished, the play button stills shows "Pause",
# which is not the desired behavior of a media player.
# This fixes that "bug".
if not self.is_paused:
self.stop()
def main():
"""Entry point for our simple vlc player
"""
app = QtWidgets.QApplication(sys.argv)
player = Player()
player.show()
player.resize(640, 480)
sys.exit(app.exec_())
if __name__ == "__main__":
main()
================================================
FILE: examples/qtvlc.py
================================================
#! /usr/bin/env python3
#
# Qt example for VLC Python bindings
# Copyright (C) 2009-2010 the VideoLAN team
#
# This program is free software; you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
# the Free Software Foundation; either version 2 of the License, or
# (at your option) any later version.
#
# This program is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
# GNU General Public License for more details.
#
# You should have received a copy of the GNU General Public License
# along with this program; if not, write to the Free Software
# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston MA 02110-1301, USA.
#
import sys
import os.path
import vlc
from PyQt4 import QtGui, QtCore
try:
unicode # Python 2
except NameError:
unicode = str # Python 3
class Player(QtGui.QMainWindow):
"""A simple Media Player using VLC and Qt
"""
def __init__(self, master=None):
QtGui.QMainWindow.__init__(self, master)
self.setWindowTitle("Media Player")
# creating a basic vlc instance
self.instance = vlc.Instance()
# creating an empty vlc media player
self.mediaplayer = self.instance.media_player_new()
self.createUI()
self.isPaused = False
def createUI(self):
"""Set up the user interface, signals & slots
"""
self.widget = QtGui.QWidget(self)
self.setCentralWidget(self.widget)
# In this widget, the video will be drawn
if sys.platform == "darwin": # for MacOS
self.videoframe = QtGui.QMacCocoaViewContainer(0)
else:
self.videoframe = QtGui.QFrame()
self.palette = self.videoframe.palette()
self.palette.setColor (QtGui.QPalette.Window,
QtGui.QColor(0,0,0))
self.videoframe.setPalette(self.palette)
self.videoframe.setAutoFillBackground(True)
self.positionslider = QtGui.QSlider(QtCore.Qt.Horizontal, self)
self.positionslider.setToolTip("Position")
self.positionslider.setMaximum(1000)
self.connect(self.positionslider,
QtCore.SIGNAL("sliderMoved(int)"), self.setPosition)
self.hbuttonbox = QtGui.QHBoxLayout()
self.playbutton = QtGui.QPushButton("Play")
self.hbuttonbox.addWidget(self.playbutton)
self.connect(self.playbutton, QtCore.SIGNAL("clicked()"),
self.PlayPause)
self.stopbutton = QtGui.QPushButton("Stop")
self.hbuttonbox.addWidget(self.stopbutton)
self.connect(self.stopbutton, QtCore.SIGNAL("clicked()"),
self.Stop)
self.hbuttonbox.addStretch(1)
self.volumeslider = QtGui.QSlider(QtCore.Qt.Horizontal, self)
self.volumeslider.setMaximum(100)
self.volumeslider.setValue(self.mediaplayer.audio_get_volume())
self.volumeslider.setToolTip("Volume")
self.hbuttonbox.addWidget(self.volumeslider)
self.connect(self.volumeslider,
QtCore.SIGNAL("valueChanged(int)"),
self.setVolume)
self.vboxlayout = QtGui.QVBoxLayout()
self.vboxlayout.addWidget(self.videoframe)
self.vboxlayout.addWidget(self.positionslider)
self.vboxlayout.addLayout(self.hbuttonbox)
self.widget.setLayout(self.vboxlayout)
open = QtGui.QAction("&Open", self)
self.connect(open, QtCore.SIGNAL("triggered()"), self.OpenFile)
exit = QtGui.QAction("&Exit", self)
self.connect(exit, QtCore.SIGNAL("triggered()"), sys.exit)
menubar = self.menuBar()
filemenu = menubar.addMenu("&File")
filemenu.addAction(open)
filemenu.addSeparator()
filemenu.addAction(exit)
self.timer = QtCore.QTimer(self)
self.timer.setInterval(200)
self.connect(self.timer, QtCore.SIGNAL("timeout()"),
self.updateUI)
def PlayPause(self):
"""Toggle play/pause status
"""
if self.mediaplayer.is_playing():
self.mediaplayer.pause()
self.playbutton.setText("Play")
self.isPaused = True
else:
if self.mediaplayer.play() == -1:
self.OpenFile()
return
self.mediaplayer.play()
self.playbutton.setText("Pause")
self.timer.start()
self.isPaused = False
def Stop(self):
"""Stop player
"""
self.mediaplayer.stop()
self.playbutton.setText("Play")
def OpenFile(self, filename=None):
"""Open a media file in a MediaPlayer
"""
if filename is None:
filename = QtGui.QFileDialog.getOpenFileName(self, "Open File", os.path.expanduser('~'))
if not filename:
return
# create the media
if sys.version < '3':
filename = unicode(filename)
self.media = self.instance.media_new(filename)
# put the media in the media player
self.mediaplayer.set_media(self.media)
# parse the metadata of the file
self.media.parse()
# set the title of the track as window title
self.setWindowTitle(self.media.get_meta(0))
# the media player has to be 'connected' to the QFrame
# (otherwise a video would be displayed in it's own window)
# this is platform specific!
# you have to give the id of the QFrame (or similar object) to
# vlc, different platforms have different functions for this
if sys.platform.startswith('linux'): # for Linux using the X Server
self.mediaplayer.set_xwindow(self.videoframe.winId())
elif sys.platform == "win32": # for Windows
self.mediaplayer.set_hwnd(self.videoframe.winId())
elif sys.platform == "darwin": # for MacOS
self.mediaplayer.set_nsobject(self.videoframe.winId())
self.PlayPause()
def setVolume(self, Volume):
"""Set the volume
"""
self.mediaplayer.audio_set_volume(Volume)
def setPosition(self, position):
"""Set the position
"""
# setting the position to where the slider was dragged
self.mediaplayer.set_position(position / 1000.0)
# the vlc MediaPlayer needs a float value between 0 and 1, Qt
# uses integer variables, so you need a factor; the higher the
# factor, the more precise are the results
# (1000 should be enough)
def updateUI(self):
"""updates the user interface"""
# setting the slider to the desired position
self.positionslider.setValue(self.mediaplayer.get_position() * 1000)
if not self.mediaplayer.is_playing():
# no need to call this function if nothing is played
self.timer.stop()
if not self.isPaused:
# after the video finished, the play button stills shows
# "Pause", not the desired behavior of a media player
# this will fix it
self.Stop()
if __name__ == "__main__":
app = QtGui.QApplication(sys.argv)
player = Player()
player.show()
player.resize(640, 480)
if sys.argv[1:]:
player.OpenFile(sys.argv[1])
sys.exit(app.exec_())
================================================
FILE: examples/tkvlc.py
================================================
#! /usr/bin/env python3
# -*- coding: utf-8 -*-
# tkinter example for VLC Python bindings
# Copyright (C) 2015 the VideoLAN team
#
# This program is free software; you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
# the Free Software Foundation; either version 2 of the License, or
# (at your option) any later version.
#
# This program is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
# GNU General Public License for more details.
#
# You should have received a copy of the GNU General Public License
# along with this program; if not, write to the Free Software
# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston MA 02110-1301, USA.
#
'''A simple example for VLC python bindings using tkinter.
Author: Patrick Fay
Date: 23-09-2015
'''
# Tested with VLC 3.0.16, 3.0.12, 3.0.11, 3.0.10, 3.0.8 and 3.0.6 with
# the compatible vlc.py Python-VLC binding, Python 3.11.0, 3.10.0, 3.9.0
# and 3.7.4 and with tkinter/Tk 8.6.9 on macOS 13.0.1 (amd64 M1), 11.6.1
# (10.16 amd64 M1), 11.0.1 (10.16 x86-64) and 10.13.6 and with VLC 3.0.18,
# Python 3.11.0 and tkinter/Tk 8.6.9 on Windows 10, all in 64-bit only.
__version__ = '22.12.28' # mrJean1 at Gmail
import sys
try: # Python 3.4+ only
import tkinter as Tk
from tkinter import TclError, ttk # PYCHOK ttk = Tk.ttk
from tkinter.filedialog import askopenfilename
from tkinter.messagebox import showerror
except ImportError:
sys.exit('%s requires Python 3.4 or later' % (sys.argv[0],))
# import Tkinter as Tk; ttk = Tk
import os
import time
import vlc
_isMacOS = sys.platform.startswith('darwin')
_isLinux = sys.platform.startswith('linux')
_isWindows = sys.platform.startswith('win')
_ANCHORED = 'Anchored'
_BANNER_H = 32 if _isMacOS else 64
_BUTTONS = 'Buttons'
_DISABLED = ( Tk.DISABLED,)
_ENABLED = ('!' + Tk.DISABLED,)
_FULL_OFF = 'Full Off'
_FULL_SCREEN = 'Full Screen'
# see _Tk_Menu.add_item and .bind_shortcut below
# <https://www.Tcl.Tk/man/tcl8.6/TkCmd/keysyms.html>
_KEY_SYMBOL = {'~': 'asciitilde', '`': 'grave',
'!': 'exclam', '@': 'at',
'#': 'numbersign', '$': 'dollar',
'%': 'percent', '^': 'asciicirum',
'&': 'ampersand', '*': 'asterisk',
'(': 'parenleft', ')': 'parenright',
'_': 'underscore', '-': 'minus',
'+': 'plus', '=': 'equal',
'{': 'braceleft', '}': 'braceright',
'[': 'bracketleft', ']': 'bracketright',
'|': 'bar', '\\': 'backslash',
':': 'colon', ';': 'semicolon',
'"': 'quotedbl', "'": 'apostrophe',
'<': 'less', '>': 'greater',
',': 'comma', '.': 'period',
'?': 'question', '/': 'slash',
' ': 'space', '\b': 'BackSpace', # S!
'\n': 'KP_Enter', '\r': 'Return',
'\f': 'Next', '\v': 'Prior',
'\t': 'Tab'} # '\a': 'space'?
# see definition of specialAccelerators in <https://
# GitHub.com/tcltk/tk/blob/main/macosx/tkMacOSXMenu.c>
_MAC_ACCEL = {' ': 'Space', '\b': 'Backspace', # s!
'\n': 'Enter', '\r': 'Return',
'\f': 'PageDown', '\v': 'PageUp',
'\t': 'Tab', # 'BackTab', 'Eject'?
'Prior': 'PageUp', 'Next': 'PageDown'}
_MIN_W = 420
_MOD_ALT = 1 << 17 # alt key down?
_MOD_CMD = 1 << 3 # command key down
_MOD_CTRL = 1 << 2 # ctrl key down
_MOD_LOCK = 1 << 1 # caps lock down
_MOD_SHIFT = 1 << 0 # shift key down
_OPACITY = 'Opacity %s%%'
_TAB_X = 32
_T_CONFIGURE = Tk.EventType.Configure
_T_KEY = Tk.EventType.Key # KeyPress
_TICK_MS = 100 # millisecs per time tick
_Tk_Canvas = Tk.Canvas
_Tk_Frame = ttk.Frame
_Tk_Toplevel = Tk.Toplevel
_Tk_Version = Tk.TkVersion
_UN_ANCHORED = 'Un-' + _ANCHORED
_VOLUME = 'Volume'
_TKVLC_LIBTK_PATH = 'TKVLC_LIBTK_PATH'
if _isMacOS: # MCCABE 14
from ctypes import cdll, c_void_p
from ctypes.util import find_library as _find
# libtk = cdll.LoadLibrary(ctypes.util.find_library('tk'))
# returns (None or) the tk library /usr/lib/libtk.dylib
# from macOS, but we need the tkX.Y library bundled with
# Python 3+ or one matching the version of tkinter
# Homebrew-built Python, Tcl/Tk, etc. are installed in
# different places, usually something like (/usr/- or)
# /opt/local/Cellar/tcl-tk/8.6.11_1/lib/libtk8.6.dylib,
# found by command line `find /opt -name libtk8.6.dylib`
def _find_lib(name, *paths):
assert os.path.sep == '/'
# 1. built into Python
for p in (getattr(sys, 'base_prefix', ''), sys.prefix):
if p:
yield p + '/lib/' + name
# 2. from ctypes.find_library, env variable
for p in paths:
if p: # is not None
p = os.path.expanduser(p)
yield p
if not p.endswith(name):
yield p + '/' + name
# 3. the Homebrew basement
from glob import iglob
for t in ('/opt', '/usr'):
t += '/local/Cellar/tcl-tk/*/lib/' + name
for p in iglob(t):
yield p
try:
env = os.environ.get(_TKVLC_LIBTK_PATH, '')
lib = 'libtk%s.dylib' % (_Tk_Version,)
for libtk in _find_lib(lib, _find(lib), *env.split(os.pathsep)):
if libtk and lib in libtk and os.access(libtk, os.F_OK):
break
else: # not found anywhere
if env: # bad env?
t = 'no %s in %%s=%r' % (lib, env)
else: # env not set, suggest
t = 'no %s found, use %%s to set a path' % (lib,)
raise NameError(t % (_TKVLC_LIBTK_PATH,))
lib = cdll.LoadLibrary(libtk)
# _GetNSView = lib.TkMacOSXDrawableView is the
# proper function to call, but that is non-public
# (in Tk source file macosx/TkMacOSXSubwindows.c)
# Fortunately, lib.TkMacOSXGetRootControl calls
# lib.TkMacOSXDrawableView and returns the NSView
_GetNSView = lib.TkMacOSXGetRootControl
# C signature: void *_GetNSView(void *drawable) to get
# the Cocoa/Obj-C NSWindow.contentView attribute, the
# drawable NSView object of the (drawable) NSWindow
_GetNSView.restype = c_void_p
_GetNSView.argtypes = (c_void_p,)
except (NameError, OSError) as x: # lib, image or symbol not found
libtk = str(x) # imported by examples/psgvlc.py
def _GetNSView(unused): # imported by examples/psgvlc.py
return None
del cdll, c_void_p, env, _find, lib
Cmd_ = 'Command+' # bind key modifier, aka Meta_L
# With Python 3.9+ on macOS (only!), accelerator keys specified
# with the Shift modifier invoke the callback (command) twice,
# once without and once with a Key (or KeyPress) event: hold the
# former as a pseudo Key event possibly absorbed by the actual
# Key event about 1 millisec later. With Python 3.8- on macOS,
# Shift accelerator keys do not work at all: do not define any
# Shift accelerator keys in that case
_3_9 = sys.version_info[:2] >= (3, 9)
else: # Windows OK, untested on *nix, Xwindows
libtk = 'N/A'
Cmd_ = 'Ctrl+' # bind key modifier: Control!
_3_9 = True
def _fullscreen(panel, *full):
# get/set a panel full-screen or -off
f = panel.attributes('-fullscreen') # or .wm_attributes
if full:
panel.attributes('-fullscreen', bool(full[0]))
panel.update_idletasks()
return f
def _geometry(panel, g_w, *h_x_y):
# set a panel geometry to C{g} or C{w, h, x, y}.
if h_x_y:
t = '+'.join(map(str, h_x_y))
g = 'x'.join((str(g_w), t))
else:
g = g_w
panel.geometry(g) # update geometry, then ...
g, *t = _geometry5(panel) # ... get actual ...
panel._g = g # ... as a C{str} and 4 C{int}s
# == panel.winfo_width(), _height(), _x(), _y()
panel._whxy = tuple(map(int, t))
return g
def _geometry1(panel):
# get a panel geometry as C{str}
panel.update_idletasks()
return panel.geometry()
def _geometry5(panel):
# get a panel geometry as 5-tuple of C{str}s
g = _geometry1(panel) # '+-x' means absolute -x
z, x, y = g.split('+')
w, h = z.split('x')
return g, w, h, x, y
def _hms(tensecs, secs=''):
# format a time (in 1/10-secs) as h:mm:ss.s
s = tensecs * 0.1
if s < 60:
t = '%3.1f%s' % (s, secs)
else:
m, s = divmod(s, 60)
if m < 60:
t = '%d:%04.1f' % (int(m), s)
else:
h, m = divmod(m, 60)
t = '%d:%02d:%04.1f' % (int(h), int(m), s)
return t
def _underline2(c, label='', underline=-1, **cfg):
# update cfg with C{underline=index} or remove C{underline=.}
u = label.find(c) if c and label else underline
if u >= 0:
cfg.update(underline=u)
else: # no underlining
c = ''
cfg.update(label=label)
return c, cfg
class _Tk_Button(ttk.Button):
'''A C{_Tk_Button} with a label, inlieu of text.
'''
def __init__(self, frame, **kwds):
cfg = self._cfg(**kwds)
ttk.Button.__init__(self, frame, **cfg)
def _cfg(self, label=None, **kwds):
if label is None:
cfg = kwds
else:
cfg = dict(text=label)
cfg.update(kwds)
return cfg
def config(self, **kwds):
cfg = self._cfg(**kwds)
ttk.Button.config(self, **cfg)
def disabled(self, *disable):
'''Dis-/enable this button.
'''
# <https://TkDocs.com/tutorial/widgets.html>
p = self.instate(_DISABLED)
if disable:
self.state(_DISABLED if disable[0] else _ENABLED)
return bool(p)
class _Tk_Item(object):
'''A re-configurable C{_Tk_Menu} item.
'''
def __init__(self, menu, label='', key='', under='', **kwds):
'''New menu item.
'''
self.menu = menu
self.idx = menu.index(label)
self.key = key # <...>
self._cfg_d = dict(label=label, **kwds)
self._dis_d = False
self._under = under # lower case
def config(self, **kwds):
'''Reconfigure this menu item.
'''
cfg = self._cfg_d.copy()
cfg.update(kwds)
if self._under: # update underlining
_, cfg = _underline2(self._under, **cfg)
self.menu.entryconfig(self.idx, **cfg)
def disabled(self, *disable):
'''Dis-/enable this menu item.
'''
# <https://TkDocs.com/tutorial/menus.html>
p = self._dis_d
if disable:
self._dis_d = d = bool(disable[0])
self.config(state=Tk.DISABLED if d else Tk.NORMAL)
return p
class _Tk_Menu(Tk.Menu):
'''C{Tk.Menu} extended with an C{.add_shortcut} method.
Note, make C{Command-key} shortcuts on macOS work like
C{Control-key} shotcuts on X-/Windows using a *single*
character shortcut.
Other modifiers like Shift- and Option- passed thru,
unmodified.
'''
_shortcuts_entries = None # {}, see .bind_shortcuts_to
_shortcuts_widgets = ()
def __init__(self, master=None, **kwds):
# remove dashed line from X-/Windows tearoff menus
# like idlelib.editor.EditorWindow.createmenubar
# or use root.option_add('*tearOff', False) Off?
# as per <https://TkDocs.com/tutorial/menus.html>
Tk.Menu.__init__(self, master, tearoff=False, **kwds)
def add_item(self, label='', command=None, key='', **kwds):
'''C{Tk.menu.add_command} extended with shortcut key
accelerator, underline and binding and returning
a C{_Tk_Item} instance instead of an C{item} index.
If needed use modifiers like Shift- and Alt_ or Option-
before the *single* shortcut key character. Do NOT
include the Command- or Control- modifier, instead use
the platform-specific Cmd_, like Cmd_ + key. Also,
do NOT enclose the key in <...> brackets since those
are handled here as needed for the shortcut binding.
'''
assert callable(command), 'command=%r' % (command,)
return self._Item(Tk.Menu.add_command, key, label,
command=command, **kwds)
def add_menu(self, label='', menu=None, key='', **kwds): # untested
'''C{Tk.menu.add_cascade} extended with shortcut key
accelerator, underline and binding and returning
a C{_Tk_Item} instance instead of an C{item} index.
'''
assert isinstance(menu, _Tk_Menu), 'menu=%r' % (menu,)
return self._Item(Tk.Menu.add_cascade, key, label,
menu=menu, **kwds)
def bind_shortcut(self, key='', command=None, label='', **unused):
'''Bind shortcut key "<modifier-...-name>".
'''
# C{Accelerator} modifiers on macOS are Command-,
# Ctrl-, Option- and Shift-, but for .bind[_all] use
# <Command-..>, <Ctrl-..>, <Option_..> and <Shift-..>
# with a shortcut key name or character (replaced
# with its _KEY_SYMBOL if non-alphanumeric)
# <https://www.Tcl.Tk/man/tcl8.6/TkCmd/bind.htm#M6>
# <https://www.Tcl.Tk/man/tcl8.6/TkCmd/keysyms.html>
if key and callable(command) and self._shortcuts_widgets:
for w in self._shortcuts_widgets:
w.bind(key, command)
if label: # remember the key in this menu
idx = self.index(label)
self._shortcuts_entries[idx] = key
# The Tk modifier for macOS' Command key is called Meta
# with Meta_L and Meta_R for the left and right keyboard
# keys. Similarly for macOS' Option key, the modifier
# name Alt with Alt_L and Alt_R. Previously, there were
# only the Meta_L and Alt_L keys/modifiers. See also
# <https://StackOverflow.com/questions/6378556/multiple-
# key-event-bindings-in-tkinter-control-e-command-apple-e-etc>
def bind_shortcuts_to(self, *widgets):
'''Set widget(s) to bind shortcut keys to, usually the
root and/or Toplevel widgets.
'''
self._shortcuts_entries = {}
self._shortcuts_widgets = widgets
def entryconfig(self, idx, command=None, **kwds): # PYCHOK signature
'''Update a menu item and the shortcut key binding
if the menu item command is being changed.
Note, C{idx} is the item's index in the menu,
see C{_Tk_Item} above.
'''
if command is None: # XXX postcommand for sub-menu
Tk.Menu.entryconfig(self, idx, **kwds)
elif callable(command): # adjust the shortcut key binding
Tk.Menu.entryconfig(self, idx, command=command, **kwds)
key = self._shortcuts_entries.get(idx, None)
if key is not None:
for w in self._shortcuts_widgets:
w.bind(key, command)
def _Item(self, add_, key, label, **kwds):
# Add and bind a menu item or sub~menu with an
# optional accelerator key (not <..> enclosed)
# or underline letter (preceded by underscore),
# see <https://TkDocs.com/tutorial/menus.html>.
cfg = dict(label=label)
if key: # Use '+' sign, like key = "Ctrl+Shift+X"
if key.startswith('<') and key.endswith('>'):
c = '' # pass as-is, e.g. <<virtual event>>
else:
c = '+' # split into modifiers and char
if key.endswith(c):
m = key.rstrip(c).split(c)
else:
m = key.split(c)
c = m.pop()
for k in ('Key', 'KeyPress', 'KeyRelease'):
while k in m:
m.remove(k)
# adjust accelerator key for specials like KP_1,
# PageDown and PageUp (on macOS, see function
# ParseAccelerator in <https://GitHub.com/tcltk/tk/
# blob/main/macosx/tkMacOSXMenu.c> and definition
# of specialAccelerators in <https://GitHub.com/
# tcltk/tk/blob/main/macosx/tkMacOSXMenu.c>)
a = _MAC_ACCEL.get(c, c) if _isMacOS else c
if a.upper().startswith('KP_'):
a = a[3:]
# accelerator strings are only used for display
# ('+' or '-' OK, ' ' space isn't for macOS)
cfg.update(accelerator='+'.join(m + [a]))
# replace key with Tk keysymb, allow F1 thru F35
# (F19 on macOS) and because shortcut keys are
# case-sensitive, use lower-case unless specified
# as an upper-case letter with Shift+ modifier
s = _KEY_SYMBOL.get(c, c)
if len(s) == 1 and s.isupper() \
and 'Shift' not in m:
s = s.lower()
# default to single key down case
if len(c) == 1:
m.append('Key') # == KeyPress
# replace Ctrl modifier with Tk Control
while 'Ctrl' in m:
m[m.index('Ctrl')] = 'Control'
# <enclosed> for .bind_shortcut/.bind
key = '<' + '-'.join(m + [s]) + '>'
if _isMacOS or len(c) != 1 or not c.isalnum():
c = '' # no underlining
else: # only Windows?
c, cfg = _underline2(c, **cfg)
else: # like idlelib, underline char after ...
c, u = '', label.find('_') # ... underscore
if u >= 0: # ... and remove underscore
label = label[:u] + label[u+1:]
cfg.update(label=label)
if u < len(label) and not _isMacOS:
# c = label[u]
cfg.update(underline=u)
if kwds: # may still override accelerator ...
cfg.update(kwds) # ... and underline
add_(self, **cfg) # first _add then ...
self.bind_shortcut(key, **cfg) # ... bind
return _Tk_Item(self, key=key, under=c, **cfg)
class _Tk_Slider(Tk.Scale):
'''Scale with some add'l attributres
'''
_var = None
def __init__(self, frame, to=1, **kwds):
if isinstance(to, int):
f, v = 0, Tk.IntVar()
else:
f, v = 0.0, Tk.DoubleVar()
cfg = dict(from_=f, to=to,
orient=Tk.HORIZONTAL,
showvalue=0,
variable=v)
cfg.update(kwds)
Tk.Scale.__init__(self, frame, **cfg)
self._var = v
def set(self, value):
# doesn't move the slider
self._var.set(value)
Tk.Scale.set(self, value)
class Player(_Tk_Frame):
'''The main window handling with events, etc.
'''
_anchored = True # under the video panel
_BUTTON_H = _BANNER_H
_debugs = 0
_isFull = '' # or geometry
_length = 0 # length time ticks
_lengthstr = '' # length h:m:s
_muted = False
_opacity = 90 if _isMacOS else 100 # percent
_opaque = False
_rate = 0.0
_ratestr = ''
_scaleX = 1
_scaleXstr = ''
_sliding = False
_snapshots = 0
_stopped = None
_title = 'tkVLCplayer'
_volume = 50 # percent
def __init__(self, parent, title='', video='', debug=False): # PYCHOK called!
_Tk_Frame.__init__(self, parent)
self.debug = bool(debug)
self.parent = parent # == root
self.video = os.path.expanduser(video)
if title:
self._title = str(title)
parent.title(self._title)
# parent.iconname(self._title)
# set up tickers to avoid None error
def _pass():
pass
self._tick_a = self.after(1, _pass)
self._tick_c = self.after(2, _pass)
self._tick_r = self.after(3, _pass)
self._tick_s = self.after(4, _pass) # .after_idle
self._tick_t = self.after(5, _pass)
self._tick_z = self.after(6, _pass)
# panels to play videos and hold buttons, sliders,
# created *before* the File menu to be able to bind
# the shortcuts keys to both windows/panels.
self.videoPanel = v = self._VideoPanel()
self._bind_events(v) # or parent
self.buttonsPanel = b = self._ButtonsPanel()
self._bind_events(b)
mb = _Tk_Menu(self.parent) # menu bar
parent.config(menu=mb)
# self.menuBar = mb
# macOS shortcuts <https://Support.Apple.com/en-us/HT201236>
m = _Tk_Menu(mb) # Video menu, shortcuts to both panels
m.bind_shortcuts_to(v, b)
m.add_item('Open...', self.OnOpen, key=Cmd_ + 'O')
m.add_separator()
self.playItem = m.add_item('Play', self.OnPlay, key=Cmd_ + 'P') # Play/Pause
m.add_item('Stop', self.OnStop, key=Cmd_ + '\b') # BackSpace
m.add_separator()
m.add_item('Zoom In', self.OnZoomIn, key=(Cmd_ + 'Shift++') if _3_9 else '')
m.add_item('Zoom Out', self.OnZoomOut, key=(Cmd_ + '-') if _3_9 else '')
m.add_separator()
m.add_item('Faster', self.OnFaster, key=(Cmd_ + 'Shift+>') if _3_9 else '')
m.add_item('Slower', self.OnSlower, key=(Cmd_ + 'Shift+<') if _3_9 else '')
m.add_separator()
m.add_item('Normal 1X', self.OnNormal, key=Cmd_ + '=')
m.add_separator()
self.muteItem = m.add_item('Mute', self.OnMute, key=Cmd_ + 'M')
m.add_separator()
m.add_item('Snapshot', self.OnSnapshot, key=Cmd_ + 'T')
m.add_separator()
self.fullItem = m.add_item(_FULL_SCREEN, self.OnFull, key=Cmd_ + 'F')
m.add_separator()
m.add_item('Close', self.OnClose, key=Cmd_ + 'W')
mb.add_cascade(menu=m, label='Video')
# self.videoMenu = m
m = _Tk_Menu(mb) # Video menu, shortcuts to both panels
m.bind_shortcuts_to(v, b)
self.anchorItem = m.add_item(_UN_ANCHORED, self.OnAnchor, key=Cmd_ + 'A')
m.add_separator()
self.opaqueItem = m.add_item(_OPACITY % (self._opacity,), self.OnOpacity, key=Cmd_ + 'Y')
m.add_item('Normal 100%', self.OnOpacity100)
mb.add_cascade(menu=m, label=_BUTTONS)
# self.buttonsMenu = m
if _isMacOS and self.debug: # Special macOS "windows" menu
# <https://TkDocs.com/tutorial/menus.html> "Providing a Window Menu"
# XXX Which (virtual) events are generated other than Configure?
m = _Tk_Menu(mb, name='window') # must be name='window'
mb.add_cascade(menu=m, label='Windows')
# VLC player
args = ['--no-xlib'] if _isLinux else []
self.Instance = vlc.Instance(args)
self.player = self.Instance.media_player_new()
b.update_idletasks()
v.update_idletasks()
if self.video: # play video for a second, adjusting the panel
self._play(self.video)
self.after(1000, self.OnPause)
# elif _isMacOS: # <https://StackOverflow.com/questions/18394597/
# # is-there-a-way-to-create-transparent-windows-with-tkinter>
# self._stopped = True
# self._set_opacity()
self.OnTick() # set up the timer
# Keep the video panel at least as wide as the buttons panel
# and move it down enough to put the buttons panel above it.
self._BUTTON_H = d = b.winfo_height()
b.minsize(width=_MIN_W, height=d)
v.minsize(width=_MIN_W, height=0)
_, w, h, _, y = _geometry5(v)
y = int(y) + d + _BANNER_H
_geometry(v, w, h, _TAB_X, y)
self._anchorPanels()
self._set_volume()
def _anchorPanels(self, video=False):
# Put the buttons panel under the video
# or the video panel above the buttons
if self._anchored and not self._isFull:
self._debug(self._anchorPanels)
v = self.videoPanel
if _isMacOS and _fullscreen(v):
# macOS green button full-screen?
_fullscreen(v, False)
self.OnFull()
else:
b = self.buttonsPanel
v.update_idletasks()
b.update_idletasks()
h = v.winfo_height()
d = h + _BANNER_H # vertical delta
if video: # move/adjust video panel
w = b.winfo_width() # same as ...
x = b.winfo_x() # ... buttons
y = b.winfo_y() - d # ... and above
g = v
else: # move/adjust buttons panel
h = b.winfo_height() # unchanged
if h > self._BUTTON_H and _fullscreen(b):
# macOS green button full-screen?
_fullscreen(b, False)
h = self._BUTTON_H
w = v.winfo_width() # unchanged
x = v.winfo_x() # same as the video
y = v.winfo_y() + d # below the video
g = b
# _g = g._g
_geometry(g, max(w, _MIN_W), h, x, y)
if video: # and g._g != _g:
self._set_aspect_ratio(True)
def _bind_events(self, panel):
# set up handlers for several events
try:
p = panel
p_ = p.protocol
except AttributeError:
p = p.master # == p.parent
p_ = p.protocol
if _isWindows: # OK for macOS
p_('WM_DELETE_WINDOW', self.OnClose)
# Event Types <https://www.Tcl.Tk/man/tcl8.6/TkCmd/bind.html#M7>
p.bind('<Configure>', self.OnConfigure) # window resize, position, etc.
# needed on macOS to catch window close events
p.bind('<Destroy>', self.OnClose) # window half-dead
# p.bind('<Activate>', self.OnActive) # window activated
# p.bind('<Deactivate>', self.OffActive) # window deactivated
p.bind('<FocusIn>', self.OnFocus) # getting keyboard focus
# p.bind('<FocusOut>', self.OffFocus) # losing keyboard focus
# p.bind('<Return>', self.OnReturn) # highlighted button
if _isMacOS:
p.bind('<Command-.>', self.OnClose)
# p.bind('<Command-,.'. self.OnPreferences)
# p.bind('<KP_Enter>', self.OnReturn) # highlighted button
# attrs holding the most recently set _geometry ...
assert not hasattr(panel, '_g')
panel._g = '' # ... as a sC{str} and ...
assert not hasattr(panel, '_whxy')
panel._whxy = () # ... 4-tuple of C{ints}s
def _ButtonsPanel(self):
# create panel with buttons and sliders
b = _Tk_Toplevel(self.pa
gitextract_1eilci4j/
├── .github/
│ └── workflows/
│ ├── ruff.yml
│ └── tests.yml
├── .gitignore
├── .gitmodules
├── .pre-commit-config.yaml
├── .readthedocs.yaml
├── .travis.yml
├── AUTHORS
├── COPYING
├── COPYING.generator
├── MANIFEST.in
├── Makefile
├── README.md
├── README.module
├── TODO
├── dev_setup.py
├── dev_setup.sh
├── distribute_setup.py
├── docs/
│ ├── Makefile
│ ├── api.rst
│ ├── conf.py
│ ├── fullapi.rst
│ ├── index.rst
│ ├── make.bat
│ └── requirements.txt
├── examples/
│ ├── cocoavlc.py
│ ├── gtk2vlc.py
│ ├── gtkvlc.py
│ ├── play_buffer.py
│ ├── psgvlc.py
│ ├── pyobjcvlc.py
│ ├── pyqt5vlc.py
│ ├── qtvlc.py
│ ├── tkvlc.py
│ ├── video_sync/
│ │ ├── README.md
│ │ ├── main.py
│ │ ├── mini_player.py
│ │ └── network.py
│ └── wxvlc.py
├── generated/
│ ├── 2.2/
│ │ ├── COPYING
│ │ ├── MANIFEST.in
│ │ ├── README.module
│ │ ├── distribute_setup.py
│ │ ├── examples/
│ │ │ ├── gtk2vlc.py
│ │ │ ├── gtkvlc.py
│ │ │ ├── qtvlc.py
│ │ │ ├── tkvlc.py
│ │ │ └── wxvlc.py
│ │ ├── setup.py
│ │ └── vlc.py
│ ├── 3.0/
│ │ ├── COPYING
│ │ ├── MANIFEST.in
│ │ ├── README.module
│ │ ├── examples/
│ │ │ ├── cocoavlc.py
│ │ │ ├── glsurface.py
│ │ │ ├── gtk2vlc.py
│ │ │ ├── gtkvlc.py
│ │ │ ├── play_buffer.py
│ │ │ ├── psgvlc.py
│ │ │ ├── pyobjcvlc.py
│ │ │ ├── pyqt5vlc.py
│ │ │ ├── qtvlc.py
│ │ │ ├── tkvlc.py
│ │ │ ├── video_sync/
│ │ │ │ ├── README.md
│ │ │ │ ├── main.py
│ │ │ │ ├── mini_player.py
│ │ │ │ └── network.py
│ │ │ └── wxvlc.py
│ │ ├── pyproject.toml
│ │ └── vlc.py
│ ├── __init__.py
│ └── dev/
│ └── vlc.py
├── generator/
│ ├── __init__.py
│ ├── generate.py
│ └── templates/
│ ├── LibVlc-footer.java
│ ├── LibVlc-header.java
│ ├── MANIFEST.in
│ ├── boilerplate.java
│ ├── footer.py
│ ├── header.py
│ ├── override.py
│ └── pyproject.toml
├── pyproject.toml
├── requirements.txt
├── ruff.toml
└── tests/
├── gctest.py
├── samples/
│ └── README
├── test_bindings.py
├── test_generator.py
└── test_parser_inputs/
├── callbacks.h
├── enums.h
├── funcs.h
├── libvlc_version_with_extra.h
├── libvlc_version_without_extra.h
└── structs.h
Showing preview only (249K chars total). Download the full file or copy to clipboard to get everything.
SYMBOL INDEX (3142 symbols across 48 files)
FILE: dev_setup.py
function run_cmd (line 20) | def run_cmd(mess, cmd):
FILE: distribute_setup.py
function _python_cmd (line 35) | def _python_cmd(*args):
function _python_cmd (line 41) | def _python_cmd(*args):
function _install (line 69) | def _install(tarball, install_args=()):
function _build_egg (line 97) | def _build_egg(egg, tarball, to_dir):
function _do_download (line 126) | def _do_download(version, download_base, to_dir, download_delay):
function use_setuptools (line 138) | def use_setuptools(version=DEFAULT_VERSION, download_base=DEFAULT_URL,
function download_setuptools (line 188) | def download_setuptools(version=DEFAULT_VERSION, download_base=DEFAULT_URL,
function _no_sandbox (line 225) | def _no_sandbox(function):
function _patch_file (line 250) | def _patch_file(path, content):
function _same_content (line 271) | def _same_content(path, content):
function _rename_path (line 278) | def _rename_path(path):
function _remove_flat_installation (line 285) | def _remove_flat_installation(placeholder):
function _after_install (line 321) | def _after_install(dist):
function _create_fake_setuptools_pkg_info (line 327) | def _create_fake_setuptools_pkg_info(placeholder):
function _patch_egg_dir (line 363) | def _patch_egg_dir(path):
function _before_install (line 384) | def _before_install():
function _under_prefix (line 389) | def _under_prefix(location):
function _fake_setuptools (line 407) | def _fake_setuptools():
function _relaunch (line 462) | def _relaunch():
function _extractall (line 474) | def _extractall(self, path=".", members=None):
function _build_install_args (line 515) | def _build_install_args(options):
function _parse_args (line 527) | def _parse_args():
function main (line 543) | def main(version=DEFAULT_VERSION):
FILE: examples/cocoavlc.py
function _PyPI (line 45) | def _PyPI(package):
class _Color (line 98) | class _Color(object): # PYCHOK expected
function _fstrz (line 119) | def _fstrz(f, n=1, x=''):
function _fstrz0 (line 124) | def _fstrz0(f, n=1, x=''):
function _fstrz1 (line 130) | def _fstrz1(f, n=1, x=''):
function _macOS (line 138) | def _macOS(sep=None):
function _mspf (line 144) | def _mspf(fps):
function _ms2str (line 149) | def _ms2str(ms):
function _ratio2str (line 154) | def _ratio2str(by, *w_h):
class AppVLC (line 159) | class AppVLC(App):
method __init__ (line 183) | def __init__(self, video=None, # video file name
method appLaunched_ (line 210) | def appLaunched_(self, app):
method menuBrighter_ (line 274) | def menuBrighter_(self, item):
method menuClose_ (line 277) | def menuClose_(self, item): # PYCHOK expected
method menuDarker_ (line 283) | def menuDarker_(self, item):
method menuFaster_ (line 286) | def menuFaster_(self, item):
method menuFilters_ (line 289) | def menuFilters_(self, item):
method menuInfo_ (line 309) | def menuInfo_(self, item):
method menuNormal1X_ (line 404) | def menuNormal1X_(self, item):
method menuOpen_ (line 414) | def menuOpen_(self, item):
method menuPause_ (line 425) | def menuPause_(self, item, pause=False): # PYCHOK expected
method menuPlay_ (line 433) | def menuPlay_(self, item_or_None): # PYCHOK expected
method menuRewind_ (line 439) | def menuRewind_(self, item): # PYCHOK expected
method menuSlower_ (line 447) | def menuSlower_(self, item):
method menuSnapshot_ (line 450) | def menuSnapshot_(self, item): # PYCHOK expected
method menuToggle_ (line 462) | def menuToggle_(self, item):
method menuZoomIn_ (line 469) | def menuZoomIn_(self, item):
method menuZoomOut_ (line 472) | def menuZoomOut_(self, item):
method windowClose_ (line 475) | def windowClose_(self, window):
method windowLast_ (line 482) | def windowLast_(self, window):
method windowResize_ (line 486) | def windowResize_(self, window):
method windowScreen_ (line 491) | def windowScreen_(self, window, change):
method _brightness (line 496) | def _brightness(self, unused, fraction=0): # change brightness
method _contrast (line 499) | def _contrast(self, unused, fraction=0): # change contrast
method _gamma (line 502) | def _gamma(self, unused, fraction=0): # change gamma
method _hue (line 505) | def _hue(self, unused, fraction=0): # change hue
method _rate (line 508) | def _rate(self, unused, factor=0): # change the video rate
method _reset (line 515) | def _reset(self, resize=False):
method _resizer (line 521) | def _resizer(self): # adjust aspect ratio and marquee height
method _saturation (line 528) | def _saturation(self, unused, fraction=0): # change saturation
method _sizer (line 531) | def _sizer(self, secs=0.25): # asynchronously
method _VLCadjust (line 549) | def _VLCadjust(self, option, fraction=0, value=None):
method _VLClogo (line 568) | def _VLClogo(self, logostr):
method _VLCmarquee (line 581) | def _VLCmarquee(self, size=36):
method _wiggle (line 595) | def _wiggle(self):
method _zoom (line 602) | def _zoom(self, unused, factor=0):
function _Adjustr (line 617) | def _Adjustr():
FILE: examples/gtk2vlc.py
class VLCWidget (line 47) | class VLCWidget(gtk.DrawingArea):
method __init__ (line 53) | def __init__(self, *p):
class DecoratedVLCWidget (line 65) | class DecoratedVLCWidget(gtk.VBox):
method __init__ (line 73) | def __init__(self, *p):
method get_player_control_toolbar (line 81) | def get_player_control_toolbar(self):
class VideoPlayer (line 98) | class VideoPlayer:
method __init__ (line 101) | def __init__(self):
method main (line 104) | def main(self, fname):
class MultiVideoPlayer (line 112) | class MultiVideoPlayer:
method main (line 117) | def main(self, filenames):
FILE: examples/gtkvlc.py
function get_window_pointer (line 56) | def get_window_pointer(window):
class VLCWidget (line 65) | class VLCWidget(Gtk.DrawingArea):
method __init__ (line 73) | def __init__(self, *p):
class DecoratedVLCWidget (line 94) | class DecoratedVLCWidget(Gtk.VBox):
method __init__ (line 104) | def __init__(self, *p):
method get_player_control_toolbar (line 113) | def get_player_control_toolbar(self):
class VideoPlayer (line 130) | class VideoPlayer:
method __init__ (line 133) | def __init__(self):
method main (line 136) | def main(self, fname):
class MultiVideoPlayer (line 144) | class MultiVideoPlayer:
method main (line 149) | def main(self, filenames):
FILE: examples/play_buffer.py
class StreamProviderDir (line 57) | class StreamProviderDir(object):
method __init__ (line 58) | def __init__(self, rootpath, file_ext):
method open (line 64) | def open(self):
method release_resources (line 83) | def release_resources(self):
method seek (line 91) | def seek(self, offset):
method get_data (line 97) | def get_data(self):
function media_open_cb (line 121) | def media_open_cb(opaque, data_pointer, size_pointer):
function media_read_cb (line 135) | def media_read_cb(opaque, buffer, length):
function media_seek_cb (line 153) | def media_seek_cb(opaque, offset):
function media_close_cb (line 164) | def media_close_cb(opaque):
FILE: examples/psgvlc.py
function Bn (line 49) | def Bn(name): # a PySimpleGUI "User Defined Element" (see docs)
FILE: examples/pyobjcvlc.py
class _ImportError (line 28) | class _ImportError(ImportError): # PYCHOK expected
method __init__ (line 29) | def __init__(self, package, PyPI):
function gcd (line 71) | def gcd(a, b):
function mspf (line 80) | def mspf(fps):
function nsBundleRename (line 86) | def nsBundleRename(title, match='Python'):
function printf (line 111) | def printf(fmt, *args, **kwds): # argv0='', nl=0, nt=0
function terminating (line 127) | def terminating(app, timeout):
class _NSDelegate (line 150) | class _NSDelegate(NSObject):
method applicationDidFinishLaunching_ (line 162) | def applicationDidFinishLaunching_(self, notification):
method info_ (line 202) | def info_(self, notification):
method rewind_ (line 246) | def rewind_(self, notification):
method toggle_ (line 251) | def toggle_(self, notification):
method windowDidResize_ (line 263) | def windowDidResize_(self, notification):
method windowWillClose_ (line 276) | def windowWillClose_(self, notification):
function _MenuItem (line 280) | def _MenuItem(label, action=None, key='', alt=False, cmd=True, ctrl=Fals...
function _MenuItemSeparator (line 301) | def _MenuItemSeparator():
function _Window2 (line 307) | def _Window2(title=_argv0, fraction=0.5):
function simpleVLCplay (line 338) | def simpleVLCplay(player, title=_argv0, video='', timeout=None):
FILE: examples/pyqt5vlc.py
class Player (line 34) | class Player(QtWidgets.QMainWindow):
method __init__ (line 38) | def __init__(self, master=None):
method create_ui (line 54) | def create_ui(self):
method play_pause (line 124) | def play_pause(self):
method stop (line 142) | def stop(self):
method open_file (line 148) | def open_file(self):
method set_volume (line 182) | def set_volume(self, volume):
method set_position (line 187) | def set_position(self):
method update_ui (line 201) | def update_ui(self):
function main (line 220) | def main():
FILE: examples/qtvlc.py
class Player (line 33) | class Player(QtGui.QMainWindow):
method __init__ (line 36) | def __init__(self, master=None):
method createUI (line 48) | def createUI(self):
method PlayPause (line 114) | def PlayPause(self):
method Stop (line 130) | def Stop(self):
method OpenFile (line 136) | def OpenFile(self, filename=None):
method setVolume (line 169) | def setVolume(self, Volume):
method setPosition (line 174) | def setPosition(self, position):
method updateUI (line 184) | def updateUI(self):
FILE: examples/tkvlc.py
function _find_lib (line 122) | def _find_lib(name, *paths):
function _GetNSView (line 171) | def _GetNSView(unused): # imported by examples/psgvlc.py
function _fullscreen (line 191) | def _fullscreen(panel, *full):
function _geometry (line 200) | def _geometry(panel, g_w, *h_x_y):
function _geometry1 (line 215) | def _geometry1(panel):
function _geometry5 (line 221) | def _geometry5(panel):
function _hms (line 229) | def _hms(tensecs, secs=''):
function _underline2 (line 244) | def _underline2(c, label='', underline=-1, **cfg):
class _Tk_Button (line 255) | class _Tk_Button(ttk.Button):
method __init__ (line 258) | def __init__(self, frame, **kwds):
method _cfg (line 262) | def _cfg(self, label=None, **kwds):
method config (line 270) | def config(self, **kwds):
method disabled (line 274) | def disabled(self, *disable):
class _Tk_Item (line 284) | class _Tk_Item(object):
method __init__ (line 287) | def __init__(self, menu, label='', key='', under='', **kwds):
method config (line 298) | def config(self, **kwds):
method disabled (line 307) | def disabled(self, *disable):
class _Tk_Menu (line 318) | class _Tk_Menu(Tk.Menu):
method __init__ (line 331) | def __init__(self, master=None, **kwds):
method add_item (line 338) | def add_item(self, label='', command=None, key='', **kwds):
method add_menu (line 354) | def add_menu(self, label='', menu=None, key='', **kwds): # untested
method bind_shortcut (line 363) | def bind_shortcut(self, key='', command=None, label='', **unused):
method bind_shortcuts_to (line 387) | def bind_shortcuts_to(self, *widgets):
method entryconfig (line 394) | def entryconfig(self, idx, command=None, **kwds): # PYCHOK signature
method _Item (line 410) | def _Item(self, add_, key, label, **kwds):
class _Tk_Slider (line 478) | class _Tk_Slider(Tk.Scale):
method __init__ (line 483) | def __init__(self, frame, to=1, **kwds):
method set (line 496) | def set(self, value):
class Player (line 502) | class Player(_Tk_Frame):
method __init__ (line 524) | def __init__(self, parent, title='', video='', debug=False): # PYCHOK...
method _anchorPanels (line 626) | def _anchorPanels(self, video=False):
method _bind_events (line 662) | def _bind_events(self, panel):
method _ButtonsPanel (line 691) | def _ButtonsPanel(self):
method _debug (line 733) | def _debug(self, where, *event, **kwds):
method _frontmost (line 765) | def _frontmost(self):
method OnAnchor (line 776) | def OnAnchor(self, *unused):
method OnClose (line 791) | def OnClose(self, *event):
method OnConfigure (line 806) | def OnConfigure(self, event):
method OnFaster (line 825) | def OnFaster(self, *event):
method OnFocus (line 831) | def OnFocus(self, *unused):
method OnFull (line 839) | def OnFull(self, *unused):
method OnMute (line 860) | def OnMute(self, *unused):
method OnNormal (line 875) | def OnNormal(self, *unused):
method OnOpacity (line 885) | def OnOpacity(self, *unused):
method OnOpacity100 (line 894) | def OnOpacity100(self, *unused):
method OnOpen (line 901) | def OnOpen(self, *unused):
method OnPause (line 915) | def OnPause(self, *unused):
method OnPercent (line 925) | def OnPercent(self, *unused):
method OnPlay (line 935) | def OnPlay(self, *unused):
method OnSlower (line 955) | def OnSlower(self, *event):
method OnSnapshot (line 961) | def OnSnapshot(self, *unused):
method OnStop (line 972) | def OnStop(self, *unused):
method OnTick (line 978) | def OnTick(self):
method OnTime (line 999) | def OnTime(self, *unused):
method OnZoomIn (line 1010) | def OnZoomIn(self, *event):
method OnZoomOut (line 1016) | def OnZoomOut(self, *event):
method _pause_play (line 1022) | def _pause_play(self, playing):
method _play (line 1036) | def _play(self, video):
method _reset (line 1063) | def _reset(self):
method _set_aspect_ratio (line 1074) | def _set_aspect_ratio(self, force=False):
method _set_buttons_title (line 1099) | def _set_buttons_title(self, *tensecs):
method _set_opacity (line 1112) | def _set_opacity(self, *percent): # 100% fully opaque
method _set_percent (line 1128) | def _set_percent(self, percent, **cfg):
method _set_rate (line 1133) | def _set_rate(self, factor, *event):
method _set_time (line 1152) | def _set_time(self, millisecs):
method _set_volume (line 1159) | def _set_volume(self, *volume):
method _set_zoom (line 1175) | def _set_zoom(self, factor, *event):
method _showError (line 1195) | def _showError(self, verb):
method _VideoPanel (line 1202) | def _VideoPanel(self):
method _wiggle (line 1215) | def _wiggle(self, d=4):
function print_version (line 1229) | def print_version(name=''): # imported by psgvlc.py
FILE: examples/video_sync/main.py
class Player (line 39) | class Player(QtWidgets.QMainWindow):
method __init__ (line 43) | def __init__(self, master=None):
method create_ui (line 64) | def create_ui(self):
method play_pause (line 176) | def play_pause(self):
method stop (line 201) | def stop(self):
method on_next_frame (line 221) | def on_next_frame(self):
method on_previous_frame (line 241) | def on_previous_frame(self):
method mspf (line 252) | def mspf(self):
method incr_mov_play_rate (line 256) | def incr_mov_play_rate(self):
method decr_mov_play_rate (line 269) | def decr_mov_play_rate(self):
method open_file (line 282) | def open_file(self):
method set_position (line 315) | def set_position(self):
method update_ui (line 340) | def update_ui(self):
method update_time_label (line 365) | def update_time_label(self):
method update_pb_rate_label (line 370) | def update_pb_rate_label(self):
function on_new_video (line 374) | def on_new_video():
function main (line 383) | def main():
FILE: examples/video_sync/mini_player.py
class MiniPlayer (line 37) | class MiniPlayer(QtWidgets.QMainWindow):
method __init__ (line 41) | def __init__(self, data_queue, master=None):
method init_ui (line 65) | def init_ui(self):
method open_file (line 86) | def open_file(self):
method update_ui (line 120) | def update_ui(self):
method update_statusbar (line 148) | def update_statusbar(self):
function main (line 154) | def main():
FILE: examples/video_sync/network.py
class Server (line 55) | class Server:
method __init__ (line 58) | def __init__(self, host, port, data_queue):
method listen_for_clients (line 95) | def listen_for_clients(self):
method data_sender (line 106) | def data_sender(self):
method sendall (line 116) | def sendall(self, client, data):
class Client (line 126) | class Client:
method __init__ (line 129) | def __init__(self, address, port, data_queue):
method recv_all (line 159) | def recv_all(self, size):
method recv_msg (line 172) | def recv_msg(self):
method data_receiver (line 181) | def data_receiver(self):
FILE: examples/wxvlc.py
class Player (line 47) | class Player(wx.Frame):
method __init__ (line 50) | def __init__(self, title='', video=''):
method OnExit (line 124) | def OnExit(self, evt):
method OnOpen (line 129) | def OnOpen(self, evt):
method OnPlay (line 169) | def OnPlay(self, evt):
method OnPause (line 191) | def OnPause(self, evt):
method OnStop (line 202) | def OnStop(self, evt):
method OnTimer (line 213) | def OnTimer(self, evt):
method OnMute (line 225) | def OnMute(self, evt):
method OnVolume (line 236) | def OnVolume(self, evt):
method errorDialog (line 244) | def errorDialog(self, errormessage):
FILE: generated/2.2/distribute_setup.py
function _python_cmd (line 35) | def _python_cmd(*args):
function _python_cmd (line 41) | def _python_cmd(*args):
function _install (line 69) | def _install(tarball, install_args=()):
function _build_egg (line 97) | def _build_egg(egg, tarball, to_dir):
function _do_download (line 126) | def _do_download(version, download_base, to_dir, download_delay):
function use_setuptools (line 138) | def use_setuptools(version=DEFAULT_VERSION, download_base=DEFAULT_URL,
function download_setuptools (line 188) | def download_setuptools(version=DEFAULT_VERSION, download_base=DEFAULT_URL,
function _no_sandbox (line 225) | def _no_sandbox(function):
function _patch_file (line 250) | def _patch_file(path, content):
function _same_content (line 271) | def _same_content(path, content):
function _rename_path (line 278) | def _rename_path(path):
function _remove_flat_installation (line 285) | def _remove_flat_installation(placeholder):
function _after_install (line 321) | def _after_install(dist):
function _create_fake_setuptools_pkg_info (line 327) | def _create_fake_setuptools_pkg_info(placeholder):
function _patch_egg_dir (line 363) | def _patch_egg_dir(path):
function _before_install (line 384) | def _before_install():
function _under_prefix (line 389) | def _under_prefix(location):
function _fake_setuptools (line 407) | def _fake_setuptools():
function _relaunch (line 462) | def _relaunch():
function _extractall (line 474) | def _extractall(self, path=".", members=None):
function _build_install_args (line 521) | def _build_install_args(options):
function _parse_args (line 533) | def _parse_args():
function main (line 549) | def main(version=DEFAULT_VERSION):
FILE: generated/2.2/examples/gtk2vlc.py
class VLCWidget (line 47) | class VLCWidget(gtk.DrawingArea):
method __init__ (line 53) | def __init__(self, *p):
class DecoratedVLCWidget (line 65) | class DecoratedVLCWidget(gtk.VBox):
method __init__ (line 73) | def __init__(self, *p):
method get_player_control_toolbar (line 81) | def get_player_control_toolbar(self):
class VideoPlayer (line 98) | class VideoPlayer:
method __init__ (line 101) | def __init__(self):
method main (line 104) | def main(self, fname):
class MultiVideoPlayer (line 112) | class MultiVideoPlayer:
method main (line 117) | def main(self, filenames):
FILE: generated/2.2/examples/gtkvlc.py
class VLCWidget (line 54) | class VLCWidget(Gtk.DrawingArea):
method __init__ (line 62) | def __init__(self, *p):
class DecoratedVLCWidget (line 74) | class DecoratedVLCWidget(Gtk.VBox):
method __init__ (line 84) | def __init__(self, *p):
method get_player_control_toolbar (line 93) | def get_player_control_toolbar(self):
class VideoPlayer (line 110) | class VideoPlayer:
method __init__ (line 113) | def __init__(self):
method main (line 116) | def main(self, fname):
class MultiVideoPlayer (line 124) | class MultiVideoPlayer:
method main (line 129) | def main(self, filenames):
FILE: generated/2.2/examples/qtvlc.py
class Player (line 27) | class Player(QtGui.QMainWindow):
method __init__ (line 30) | def __init__(self, master=None):
method createUI (line 42) | def createUI(self):
method PlayPause (line 108) | def PlayPause(self):
method Stop (line 124) | def Stop(self):
method OpenFile (line 130) | def OpenFile(self, filename=None):
method setVolume (line 163) | def setVolume(self, Volume):
method setPosition (line 168) | def setPosition(self, position):
method updateUI (line 178) | def updateUI(self):
FILE: generated/2.2/examples/tkvlc.py
class ttkTimer (line 48) | class ttkTimer(Thread):
method __init__ (line 51) | def __init__(self, callback, tick):
method run (line 58) | def run(self):
method stop (line 63) | def stop(self):
method get (line 66) | def get(self):
class Player (line 69) | class Player(Tk.Frame):
method __init__ (line 72) | def __init__(self, parent, title=None):
method OnExit (line 139) | def OnExit(self, evt):
method OnOpen (line 144) | def OnOpen(self):
method OnPlay (line 180) | def OnPlay(self):
method GetHandle (line 193) | def GetHandle(self):
method OnPause (line 197) | def OnPause(self):
method OnStop (line 202) | def OnStop(self):
method OnTimer (line 209) | def OnTimer(self):
method scale_sel (line 231) | def scale_sel(self, evt):
method volume_sel (line 255) | def volume_sel(self, evt):
method OnToggleVolume (line 266) | def OnToggleVolume(self, evt):
method OnSetVolume (line 277) | def OnSetVolume(self):
method errorDialog (line 287) | def errorDialog(self, errormessage):
function Tk_get_root (line 292) | def Tk_get_root():
function _quit (line 297) | def _quit():
FILE: generated/2.2/examples/wxvlc.py
class Player (line 37) | class Player(wx.Frame):
method __init__ (line 40) | def __init__(self, title):
method OnExit (line 110) | def OnExit(self, evt):
method OnOpen (line 115) | def OnOpen(self, evt):
method OnPlay (line 155) | def OnPlay(self, evt):
method OnPause (line 171) | def OnPause(self, evt):
method OnStop (line 176) | def OnStop(self, evt):
method OnTimer (line 184) | def OnTimer(self, evt):
method OnToggleVolume (line 196) | def OnToggleVolume(self, evt):
method OnSetVolume (line 207) | def OnSetVolume(self, evt):
method errorDialog (line 215) | def errorDialog(self, errormessage):
FILE: generated/2.2/vlc.py
function str_to_bytes (line 71) | def str_to_bytes(s):
function bytes_to_str (line 79) | def bytes_to_str(b):
function str_to_bytes (line 92) | def str_to_bytes(s):
function bytes_to_str (line 100) | def bytes_to_str(b):
function find_lib (line 112) | def find_lib():
class VLCException (line 200) | class VLCException(Exception):
class memoize_parameterless (line 212) | class memoize_parameterless(object):
method __init__ (line 219) | def __init__(self, func):
method __call__ (line 223) | def __call__(self, obj):
method __repr__ (line 230) | def __repr__(self):
method __get__ (line 235) | def __get__(self, obj, objtype):
function get_default_instance (line 244) | def get_default_instance():
function _Cfunction (line 255) | def _Cfunction(name, flags, errcheck, *types):
function _Cobject (line 273) | def _Cobject(cls, ctype):
function _Constructor (line 280) | def _Constructor(cls, ptr=_internal_guard):
class _Cstruct (line 289) | class _Cstruct(ctypes.Structure):
method __str__ (line 294) | def __str__(self):
method __repr__ (line 298) | def __repr__(self):
class _Ctype (line 301) | class _Ctype(object):
method from_param (line 305) | def from_param(this): # not self
class ListPOINTER (line 312) | class ListPOINTER(object):
method __init__ (line 315) | def __init__(self, etype):
method from_param (line 318) | def from_param(self, param):
function string_result (line 325) | def string_result(result, func, arguments):
function class_result (line 338) | def class_result(classname):
class Log (line 348) | class Log(ctypes.Structure):
class FILE (line 354) | class FILE(ctypes.Structure):
class _Enum (line 387) | class _Enum(ctypes.c_uint):
method __str__ (line 392) | def __str__(self):
method __hash__ (line 396) | def __hash__(self):
method __repr__ (line 399) | def __repr__(self):
method __eq__ (line 402) | def __eq__(self, other):
method __ne__ (line 406) | def __ne__(self, other):
class LogLevel (line 409) | class LogLevel(_Enum):
class EventType (line 424) | class EventType(_Enum):
class Meta (line 542) | class Meta(_Enum):
class State (line 594) | class State(_Enum):
class TrackType (line 621) | class TrackType(_Enum):
class VideoMarqueeOption (line 635) | class VideoMarqueeOption(_Enum):
class NavigateMode (line 661) | class NavigateMode(_Enum):
class Position (line 677) | class Position(_Enum):
method __init__ (line 1167) | def __init__(self, *unused):
method __setattr__ (line 1169) | def __setattr__(self, *unused): #PYCHOK expected
class VideoLogoOption (line 703) | class VideoLogoOption(_Enum):
class VideoAdjustOption (line 725) | class VideoAdjustOption(_Enum):
class AudioOutputDeviceTypes (line 743) | class AudioOutputDeviceTypes(_Enum):
class AudioOutputChannel (line 767) | class AudioOutputChannel(_Enum):
class PlaybackMode (line 785) | class PlaybackMode(_Enum):
class Callback (line 797) | class Callback(ctypes.c_void_p):
class LogCb (line 802) | class LogCb(ctypes.c_void_p):
class VideoLockCb (line 811) | class VideoLockCb(ctypes.c_void_p):
class VideoUnlockCb (line 822) | class VideoUnlockCb(ctypes.c_void_p):
class VideoDisplayCb (line 834) | class VideoDisplayCb(ctypes.c_void_p):
class VideoFormatCb (line 842) | class VideoFormatCb(ctypes.c_void_p):
class VideoCleanupCb (line 856) | class VideoCleanupCb(ctypes.c_void_p):
class AudioPlayCb (line 861) | class AudioPlayCb(ctypes.c_void_p):
class AudioPauseCb (line 869) | class AudioPauseCb(ctypes.c_void_p):
class AudioResumeCb (line 876) | class AudioResumeCb(ctypes.c_void_p):
class AudioFlushCb (line 883) | class AudioFlushCb(ctypes.c_void_p):
class AudioDrainCb (line 889) | class AudioDrainCb(ctypes.c_void_p):
class AudioSetVolumeCb (line 895) | class AudioSetVolumeCb(ctypes.c_void_p):
class AudioSetupCb (line 902) | class AudioSetupCb(ctypes.c_void_p):
class AudioCleanupCb (line 912) | class AudioCleanupCb(ctypes.c_void_p):
class CallbackDecorators (line 918) | class CallbackDecorators(object):
class AudioOutput (line 1031) | class AudioOutput(_Cstruct):
method __str__ (line 1033) | def __str__(self):
class LogMessage (line 1042) | class LogMessage(_Cstruct):
method __init__ (line 1052) | def __init__(self):
method __str__ (line 1056) | def __str__(self):
class MediaEvent (line 1059) | class MediaEvent(_Cstruct):
class MediaStats (line 1065) | class MediaStats(_Cstruct):
class MediaTrackInfo (line 1084) | class MediaTrackInfo(_Cstruct):
class AudioTrack (line 1095) | class AudioTrack(_Cstruct):
class VideoTrack (line 1101) | class VideoTrack(_Cstruct):
class SubtitleTrack (line 1111) | class SubtitleTrack(_Cstruct):
class MediaTrackTracks (line 1116) | class MediaTrackTracks(ctypes.Union):
class MediaTrack (line 1123) | class MediaTrack(_Cstruct):
class PlaylistItem (line 1139) | class PlaylistItem(_Cstruct):
method __str__ (line 1146) | def __str__(self):
class Position (line 1149) | class Position(object):
method __init__ (line 1167) | def __init__(self, *unused):
method __setattr__ (line 1169) | def __setattr__(self, *unused): #PYCHOK expected
class Rectangle (line 1172) | class Rectangle(_Cstruct):
class TrackDescription (line 1180) | class TrackDescription(_Cstruct):
method __str__ (line 1182) | def __str__(self):
function track_description_list (line 1191) | def track_description_list(head):
class EventUnion (line 1208) | class EventUnion(ctypes.Union):
class Event (line 1231) | class Event(_Cstruct):
class ModuleDescription (line 1238) | class ModuleDescription(_Cstruct):
method __str__ (line 1240) | def __str__(self):
function module_description_list (line 1251) | def module_description_list(head):
class AudioOutputDevice (line 1264) | class AudioOutputDevice(_Cstruct):
method __str__ (line 1266) | def __str__(self):
class TitleDescription (line 1275) | class TitleDescription(_Cstruct):
class ChapterDescription (line 1282) | class ChapterDescription(_Cstruct):
class VideoViewpoint (line 1289) | class VideoViewpoint(_Cstruct):
class MediaSlave (line 1300) | class MediaSlave(_Cstruct):
class RDDescription (line 1307) | class RDDescription(_Cstruct):
class EventManager (line 1314) | class EventManager(_Ctype):
method __new__ (line 1335) | def __new__(cls, ptr=_internal_guard):
method event_attach (line 1340) | def event_attach(self, eventtype, callback, *args, **kwds):
method event_detach (line 1386) | def event_detach(self, eventtype):
class Instance (line 1399) | class Instance(_Ctype):
method __new__ (line 1409) | def __new__(cls, *args):
method media_player_new (line 1439) | def media_player_new(self, uri=None):
method media_list_player_new (line 1450) | def media_list_player_new(self):
method media_new (line 1457) | def media_new(self, mrl, *options):
method media_list_new (line 1487) | def media_list_new(self, mrls=None):
method audio_output_enumerate_devices (line 1500) | def audio_output_enumerate_devices(self):
method audio_filter_list_get (line 1519) | def audio_filter_list_get(self):
method video_filter_list_get (line 1525) | def video_filter_list_get(self):
method release (line 1533) | def release(self):
method retain (line 1540) | def retain(self):
method add_intf (line 1547) | def add_intf(self, name):
method wait (line 1555) | def wait(self):
method set_user_agent (line 1562) | def set_user_agent(self, name, http):
method set_app_id (line 1572) | def set_app_id(self, id, version, icon):
method log_unset (line 1583) | def log_unset(self):
method log_set (line 1593) | def log_set(self, data, p_instance):
method log_set_file (line 1604) | def log_set_file(self, stream):
method get_log_verbosity (line 1612) | def get_log_verbosity(self):
method set_log_verbosity (line 1620) | def set_log_verbosity(self, level):
method log_open (line 1628) | def log_open(self):
method media_discoverer_new_from_name (line 1636) | def media_discoverer_new_from_name(self, psz_name):
method media_library_new (line 1644) | def media_library_new(self):
method vlm_release (line 1651) | def vlm_release(self):
method vlm_add_broadcast (line 1657) | def vlm_add_broadcast(self, psz_name, psz_input, psz_output, i_options...
method vlm_add_vod (line 1671) | def vlm_add_vod(self, psz_name, psz_input, i_options, ppsz_options, b_...
method vlm_del_media (line 1684) | def vlm_del_media(self, psz_name):
method vlm_set_enabled (line 1692) | def vlm_set_enabled(self, psz_name, b_enabled):
method vlm_set_output (line 1701) | def vlm_set_output(self, psz_name, psz_output):
method vlm_set_input (line 1710) | def vlm_set_input(self, psz_name, psz_input):
method vlm_add_input (line 1720) | def vlm_add_input(self, psz_name, psz_input):
method vlm_set_loop (line 1729) | def vlm_set_loop(self, psz_name, b_loop):
method vlm_set_mux (line 1738) | def vlm_set_mux(self, psz_name, psz_mux):
method vlm_change_media (line 1747) | def vlm_change_media(self, psz_name, psz_input, psz_output, i_options,...
method vlm_play_media (line 1762) | def vlm_play_media(self, psz_name):
method vlm_stop_media (line 1770) | def vlm_stop_media(self, psz_name):
method vlm_pause_media (line 1778) | def vlm_pause_media(self, psz_name):
method vlm_seek_media (line 1786) | def vlm_seek_media(self, psz_name, f_percentage):
method vlm_show_media (line 1795) | def vlm_show_media(self, psz_name):
method vlm_get_media_instance_position (line 1810) | def vlm_get_media_instance_position(self, psz_name, i_instance):
method vlm_get_media_instance_time (line 1819) | def vlm_get_media_instance_time(self, psz_name, i_instance):
method vlm_get_media_instance_length (line 1828) | def vlm_get_media_instance_length(self, psz_name, i_instance):
method vlm_get_media_instance_rate (line 1837) | def vlm_get_media_instance_rate(self, psz_name, i_instance):
method vlm_get_media_instance_title (line 1846) | def vlm_get_media_instance_title(self, psz_name, i_instance):
method vlm_get_media_instance_chapter (line 1856) | def vlm_get_media_instance_chapter(self, psz_name, i_instance):
method vlm_get_media_instance_seekable (line 1866) | def vlm_get_media_instance_seekable(self, psz_name, i_instance):
method vlm_get_event_manager (line 1876) | def vlm_get_event_manager(self):
method media_new_location (line 1884) | def media_new_location(self, psz_mrl):
method media_new_path (line 1898) | def media_new_path(self, path):
method media_new_fd (line 1907) | def media_new_fd(self, fd):
method media_new_as_node (line 1928) | def media_new_as_node(self, psz_name):
method playlist_play (line 1937) | def playlist_play(self, i_id, i_options, ppsz_options):
method audio_output_list_get (line 1948) | def audio_output_list_get(self):
method audio_output_device_count (line 1955) | def audio_output_device_count(self, psz_name):
method audio_output_device_longname (line 1964) | def audio_output_device_longname(self, psz_name, int):
method audio_output_device_id (line 1974) | def audio_output_device_id(self, psz_name, int):
method audio_output_device_list_get (line 1984) | def audio_output_device_list_get(self, aout):
class LogIterator (line 2000) | class LogIterator(_Ctype):
method __new__ (line 2005) | def __new__(cls, ptr=_internal_guard):
method __iter__ (line 2010) | def __iter__(self):
method next (line 2013) | def next(self):
method __next__ (line 2020) | def __next__(self):
method free (line 2025) | def free(self):
method has_next (line 2031) | def has_next(self):
class Media (line 2038) | class Media(_Ctype):
method __new__ (line 2047) | def __new__(cls, *args):
method get_instance (line 2058) | def get_instance(self):
method add_options (line 2061) | def add_options(self, *options):
method tracks_get (line 2074) | def tracks_get(self):
method add_option (line 2096) | def add_option(self, psz_options):
method add_option_flag (line 2113) | def add_option_flag(self, psz_options, i_flags):
method retain (line 2129) | def retain(self):
method release (line 2137) | def release(self):
method get_mrl (line 2147) | def get_mrl(self):
method duplicate (line 2154) | def duplicate(self):
method get_meta (line 2160) | def get_meta(self, e_meta):
method set_meta (line 2175) | def set_meta(self, e_meta, psz_value):
method save_meta (line 2184) | def save_meta(self):
method get_state (line 2191) | def get_state(self):
method get_stats (line 2203) | def get_stats(self, p_stats):
method subitems (line 2211) | def subitems(self):
method event_manager (line 2220) | def event_manager(self):
method get_duration (line 2228) | def get_duration(self):
method parse (line 2235) | def parse(self):
method parse_async (line 2246) | def parse_async(self):
method is_parsed (line 2261) | def is_parsed(self):
method set_user_data (line 2269) | def set_user_data(self, p_new_user_data):
method get_user_data (line 2278) | def get_user_data(self):
method get_tracks_info (line 2286) | def get_tracks_info(self):
method player_new_from_media (line 2298) | def player_new_from_media(self):
class MediaDiscoverer (line 2304) | class MediaDiscoverer(_Ctype):
method __new__ (line 2308) | def __new__(cls, ptr=_internal_guard):
method release (line 2313) | def release(self):
method localized_name (line 2320) | def localized_name(self):
method media_list (line 2327) | def media_list(self):
method event_manager (line 2334) | def event_manager(self):
method is_running (line 2341) | def is_running(self):
class MediaLibrary (line 2347) | class MediaLibrary(_Ctype):
method __new__ (line 2351) | def __new__(cls, ptr=_internal_guard):
method release (line 2356) | def release(self):
method retain (line 2364) | def retain(self):
method load (line 2372) | def load(self):
method media_list (line 2379) | def media_list(self):
class MediaList (line 2385) | class MediaList(_Ctype):
method __new__ (line 2394) | def __new__(cls, *args):
method get_instance (line 2405) | def get_instance(self):
method add_media (line 2408) | def add_media(self, mrl):
method release (line 2421) | def release(self):
method retain (line 2427) | def retain(self):
method set_media (line 2433) | def set_media(self, p_md):
method media (line 2442) | def media(self):
method insert_media (line 2451) | def insert_media(self, p_md, i_pos):
method remove_index (line 2461) | def remove_index(self, i_pos):
method count (line 2470) | def count(self):
method __len__ (line 2477) | def __len__(self):
method item_at_index (line 2481) | def item_at_index(self, i_pos):
method __getitem__ (line 2489) | def __getitem__(self, i):
method __iter__ (line 2492) | def __iter__(self):
method index_of_item (line 2497) | def index_of_item(self, p_md):
method is_readonly (line 2507) | def is_readonly(self):
method lock (line 2514) | def lock(self):
method unlock (line 2520) | def unlock(self):
method event_manager (line 2527) | def event_manager(self):
class MediaListPlayer (line 2534) | class MediaListPlayer(_Ctype):
method __new__ (line 2543) | def __new__(cls, arg=None):
method get_instance (line 2555) | def get_instance(self):
method release (line 2562) | def release(self):
method retain (line 2572) | def retain(self):
method event_manager (line 2579) | def event_manager(self):
method set_media_player (line 2586) | def set_media_player(self, p_mi):
method set_media_list (line 2593) | def set_media_list(self, p_mlist):
method play (line 2600) | def play(self):
method pause (line 2606) | def pause(self):
method is_playing (line 2612) | def is_playing(self):
method get_state (line 2619) | def get_state(self):
method play_item_at_index (line 2626) | def play_item_at_index(self, i_index):
method __getitem__ (line 2633) | def __getitem__(self, i):
method __iter__ (line 2636) | def __iter__(self):
method play_item (line 2641) | def play_item(self, p_md):
method stop (line 2649) | def stop(self):
method next (line 2655) | def next(self):
method previous (line 2662) | def previous(self):
method set_playback_mode (line 2669) | def set_playback_mode(self, e_mode):
class MediaPlayer (line 2675) | class MediaPlayer(_Ctype):
method __new__ (line 2684) | def __new__(cls, *args):
method get_instance (line 2699) | def get_instance(self):
method set_mrl (line 2704) | def set_mrl(self, mrl, *options):
method video_get_spu_description (line 2719) | def video_get_spu_description(self):
method video_get_title_description (line 2724) | def video_get_title_description(self):
method video_get_chapter_description (line 2729) | def video_get_chapter_description(self, title):
method video_get_track_description (line 2736) | def video_get_track_description(self):
method audio_get_track_description (line 2741) | def audio_get_track_description(self):
method get_full_title_descriptions (line 2746) | def get_full_title_descriptions(self):
method get_full_chapter_descriptions (line 2756) | def get_full_chapter_descriptions(self, i_chapters_of_title):
method video_get_size (line 2767) | def video_get_size(self, num=0):
method set_hwnd (line 2778) | def set_hwnd(self, drawable):
method video_get_width (line 2791) | def video_get_width(self, num=0):
method video_get_height (line 2798) | def video_get_height(self, num=0):
method video_get_cursor (line 2805) | def video_get_cursor(self, num=0):
method release (line 2831) | def release(self):
method retain (line 2841) | def retain(self):
method set_media (line 2848) | def set_media(self, p_md):
method get_media (line 2856) | def get_media(self):
method event_manager (line 2863) | def event_manager(self):
method is_playing (line 2870) | def is_playing(self):
method play (line 2877) | def play(self):
method set_pause (line 2884) | def set_pause(self, do_pause):
method pause (line 2892) | def pause(self):
method stop (line 2898) | def stop(self):
method video_set_callbacks (line 2904) | def video_set_callbacks(self, lock, unlock, display, opaque):
method video_set_format (line 2918) | def video_set_format(self, chroma, width, height, pitch):
method video_set_format_callbacks (line 2932) | def video_set_format_callbacks(self, setup, cleanup):
method set_nsobject (line 2942) | def set_nsobject(self, drawable):
method get_nsobject (line 2970) | def get_nsobject(self):
method set_agl (line 2977) | def set_agl(self, drawable):
method get_agl (line 2984) | def get_agl(self):
method set_xwindow (line 2991) | def set_xwindow(self, drawable):
method get_xwindow (line 3005) | def get_xwindow(self):
method get_hwnd (line 3015) | def get_hwnd(self):
method audio_set_callbacks (line 3024) | def audio_set_callbacks(self, play, pause, resume, flush, drain, opaque):
method audio_set_volume_callback (line 3039) | def audio_set_volume_callback(self, set_volume):
method audio_set_format_callbacks (line 3050) | def audio_set_format_callbacks(self, setup, cleanup):
method audio_set_format (line 3060) | def audio_set_format(self, format, rate, channels):
method get_length (line 3072) | def get_length(self):
method get_time (line 3079) | def get_time(self):
method set_time (line 3086) | def set_time(self, i_time):
method get_position (line 3094) | def get_position(self):
method set_position (line 3101) | def set_position(self, f_pos):
method set_chapter (line 3110) | def set_chapter(self, i_chapter):
method get_chapter (line 3117) | def get_chapter(self):
method get_chapter_count (line 3124) | def get_chapter_count(self):
method will_play (line 3131) | def will_play(self):
method get_chapter_count_for_title (line 3138) | def get_chapter_count_for_title(self, i_title):
method set_title (line 3146) | def set_title(self, i_title):
method get_title (line 3153) | def get_title(self):
method get_title_count (line 3160) | def get_title_count(self):
method previous_chapter (line 3167) | def previous_chapter(self):
method next_chapter (line 3173) | def next_chapter(self):
method get_rate (line 3179) | def get_rate(self):
method set_rate (line 3188) | def set_rate(self, rate):
method get_state (line 3196) | def get_state(self):
method get_fps (line 3203) | def get_fps(self):
method has_vout (line 3210) | def has_vout(self):
method is_seekable (line 3217) | def is_seekable(self):
method can_pause (line 3224) | def can_pause(self):
method program_scrambled (line 3231) | def program_scrambled(self):
method next_frame (line 3239) | def next_frame(self):
method navigate (line 3245) | def navigate(self, navigate):
method set_video_title_display (line 3253) | def set_video_title_display(self, position, timeout):
method toggle_fullscreen (line 3262) | def toggle_fullscreen(self):
method set_fullscreen (line 3270) | def set_fullscreen(self, b_fullscreen):
method get_fullscreen (line 3283) | def get_fullscreen(self):
method video_set_key_input (line 3290) | def video_set_key_input(self, on):
method video_set_mouse_input (line 3304) | def video_set_mouse_input(self, on):
method video_get_scale (line 3315) | def video_get_scale(self):
method video_set_scale (line 3323) | def video_set_scale(self, f_factor):
method video_get_aspect_ratio (line 3334) | def video_get_aspect_ratio(self):
method video_set_aspect_ratio (line 3341) | def video_set_aspect_ratio(self, psz_aspect):
method video_get_spu (line 3348) | def video_get_spu(self):
method video_get_spu_count (line 3355) | def video_get_spu_count(self):
method video_set_spu (line 3362) | def video_set_spu(self, i_spu):
method video_set_subtitle_file (line 3370) | def video_set_subtitle_file(self, psz_subtitle):
method video_get_spu_delay (line 3378) | def video_get_spu_delay(self):
method video_set_spu_delay (line 3387) | def video_set_spu_delay(self, i_delay):
method video_get_crop_geometry (line 3399) | def video_get_crop_geometry(self):
method video_set_crop_geometry (line 3406) | def video_set_crop_geometry(self, psz_geometry):
method video_get_teletext (line 3413) | def video_get_teletext(self):
method video_set_teletext (line 3420) | def video_set_teletext(self, i_page):
method toggle_teletext (line 3427) | def toggle_teletext(self):
method video_get_track_count (line 3433) | def video_get_track_count(self):
method video_get_track (line 3440) | def video_get_track(self):
method video_set_track (line 3447) | def video_set_track(self, i_track):
method video_take_snapshot (line 3455) | def video_take_snapshot(self, num, psz_filepath, i_width, i_height):
method video_set_deinterlace (line 3468) | def video_set_deinterlace(self, psz_mode):
method video_get_marquee_int (line 3475) | def video_get_marquee_int(self, option):
method video_get_marquee_string (line 3482) | def video_get_marquee_string(self, option):
method video_set_marquee_int (line 3489) | def video_set_marquee_int(self, option, i_val):
method video_set_marquee_string (line 3499) | def video_set_marquee_string(self, option, psz_text):
method video_get_logo_int (line 3507) | def video_get_logo_int(self, option):
method video_set_logo_int (line 3514) | def video_set_logo_int(self, option, value):
method video_set_logo_string (line 3525) | def video_set_logo_string(self, option, psz_value):
method video_get_adjust_int (line 3534) | def video_get_adjust_int(self, option):
method video_set_adjust_int (line 3542) | def video_set_adjust_int(self, option, value):
method video_get_adjust_float (line 3554) | def video_get_adjust_float(self, option):
method video_set_adjust_float (line 3562) | def video_set_adjust_float(self, option, value):
method audio_output_set (line 3572) | def audio_output_set(self, psz_name):
method audio_output_device_enum (line 3582) | def audio_output_device_enum(self):
method audio_output_device_set (line 3597) | def audio_output_device_set(self, module, device_id):
method audio_toggle_mute (line 3625) | def audio_toggle_mute(self):
method audio_get_mute (line 3631) | def audio_get_mute(self):
method audio_set_mute (line 3638) | def audio_set_mute(self, status):
method audio_get_volume (line 3645) | def audio_get_volume(self):
method audio_set_volume (line 3652) | def audio_set_volume(self, i_volume):
method audio_get_track_count (line 3660) | def audio_get_track_count(self):
method audio_get_track (line 3667) | def audio_get_track(self):
method audio_set_track (line 3674) | def audio_set_track(self, i_track):
method audio_get_channel (line 3682) | def audio_get_channel(self):
method audio_set_channel (line 3689) | def audio_set_channel(self, channel):
method audio_get_delay (line 3697) | def audio_get_delay(self):
method audio_set_delay (line 3705) | def audio_set_delay(self, i_delay):
method set_equalizer (line 3714) | def set_equalizer(self, p_equalizer):
function libvlc_clearerr (line 3739) | def libvlc_clearerr():
function libvlc_vprinterr (line 3749) | def libvlc_vprinterr(fmt, ap):
function libvlc_new (line 3761) | def libvlc_new(argc, argv):
function libvlc_release (line 3775) | def libvlc_release(p_instance):
function libvlc_retain (line 3785) | def libvlc_retain(p_instance):
function libvlc_add_intf (line 3795) | def libvlc_add_intf(p_instance, name):
function libvlc_wait (line 3806) | def libvlc_wait(p_instance):
function libvlc_set_user_agent (line 3816) | def libvlc_set_user_agent(p_instance, name, http):
function libvlc_set_app_id (line 3829) | def libvlc_set_app_id(p_instance, id, version, icon):
function libvlc_get_version (line 3843) | def libvlc_get_version():
function libvlc_get_compiler (line 3853) | def libvlc_get_compiler():
function libvlc_get_changeset (line 3863) | def libvlc_get_changeset():
function libvlc_free (line 3873) | def libvlc_free(ptr):
function libvlc_event_attach (line 3884) | def libvlc_event_attach(p_event_manager, i_event_type, f_callback, user_...
function libvlc_event_detach (line 3897) | def libvlc_event_detach(p_event_manager, i_event_type, f_callback, p_use...
function libvlc_event_type_name (line 3909) | def libvlc_event_type_name(event_type):
function libvlc_log_get_context (line 3918) | def libvlc_log_get_context(ctx):
function libvlc_log_get_object (line 3932) | def libvlc_log_get_object(ctx, id):
function libvlc_log_unset (line 3951) | def libvlc_log_unset(p_instance):
function libvlc_log_set (line 3964) | def libvlc_log_set(cb, data, p_instance):
function libvlc_log_set_file (line 3978) | def libvlc_log_set_file(p_instance, stream):
function libvlc_get_log_verbosity (line 3989) | def libvlc_get_log_verbosity(p_instance):
function libvlc_set_log_verbosity (line 4000) | def libvlc_set_log_verbosity(p_instance, level):
function libvlc_log_open (line 4011) | def libvlc_log_open(p_instance):
function libvlc_log_close (line 4022) | def libvlc_log_close(p_log):
function libvlc_log_count (line 4031) | def libvlc_log_count(p_log):
function libvlc_log_clear (line 4042) | def libvlc_log_clear(p_log):
function libvlc_log_get_iterator (line 4052) | def libvlc_log_get_iterator(p_log):
function libvlc_log_iterator_free (line 4063) | def libvlc_log_iterator_free(p_iter):
function libvlc_log_iterator_has_next (line 4072) | def libvlc_log_iterator_has_next(p_iter):
function libvlc_log_iterator_next (line 4083) | def libvlc_log_iterator_next(p_iter, p_buf):
function libvlc_module_description_list_release (line 4095) | def libvlc_module_description_list_release(p_list):
function libvlc_audio_filter_list_get (line 4104) | def libvlc_audio_filter_list_get(p_instance):
function libvlc_video_filter_list_get (line 4114) | def libvlc_video_filter_list_get(p_instance):
function libvlc_clock (line 4124) | def libvlc_clock():
function libvlc_media_discoverer_new_from_name (line 4137) | def libvlc_media_discoverer_new_from_name(p_inst, psz_name):
function libvlc_media_discoverer_release (line 4148) | def libvlc_media_discoverer_release(p_mdis):
function libvlc_media_discoverer_localized_name (line 4158) | def libvlc_media_discoverer_localized_name(p_mdis):
function libvlc_media_discoverer_media_list (line 4168) | def libvlc_media_discoverer_media_list(p_mdis):
function libvlc_media_discoverer_event_manager (line 4178) | def libvlc_media_discoverer_event_manager(p_mdis):
function libvlc_media_discoverer_is_running (line 4188) | def libvlc_media_discoverer_is_running(p_mdis):
function libvlc_media_library_new (line 4198) | def libvlc_media_library_new(p_instance):
function libvlc_media_library_release (line 4208) | def libvlc_media_library_release(p_mlib):
function libvlc_media_library_retain (line 4219) | def libvlc_media_library_retain(p_mlib):
function libvlc_media_library_load (line 4230) | def libvlc_media_library_load(p_mlib):
function libvlc_media_library_media_list (line 4240) | def libvlc_media_library_media_list(p_mlib):
function libvlc_vlm_release (line 4250) | def libvlc_vlm_release(p_instance):
function libvlc_vlm_add_broadcast (line 4259) | def libvlc_vlm_add_broadcast(p_instance, psz_name, psz_input, psz_output...
function libvlc_vlm_add_vod (line 4276) | def libvlc_vlm_add_vod(p_instance, psz_name, psz_input, i_options, ppsz_...
function libvlc_vlm_del_media (line 4292) | def libvlc_vlm_del_media(p_instance, psz_name):
function libvlc_vlm_set_enabled (line 4303) | def libvlc_vlm_set_enabled(p_instance, psz_name, b_enabled):
function libvlc_vlm_set_output (line 4315) | def libvlc_vlm_set_output(p_instance, psz_name, psz_output):
function libvlc_vlm_set_input (line 4327) | def libvlc_vlm_set_input(p_instance, psz_name, psz_input):
function libvlc_vlm_add_input (line 4340) | def libvlc_vlm_add_input(p_instance, psz_name, psz_input):
function libvlc_vlm_set_loop (line 4352) | def libvlc_vlm_set_loop(p_instance, psz_name, b_loop):
function libvlc_vlm_set_mux (line 4364) | def libvlc_vlm_set_mux(p_instance, psz_name, psz_mux):
function libvlc_vlm_change_media (line 4376) | def libvlc_vlm_change_media(p_instance, psz_name, psz_input, psz_output,...
function libvlc_vlm_play_media (line 4394) | def libvlc_vlm_play_media(p_instance, psz_name):
function libvlc_vlm_stop_media (line 4405) | def libvlc_vlm_stop_media(p_instance, psz_name):
function libvlc_vlm_pause_media (line 4416) | def libvlc_vlm_pause_media(p_instance, psz_name):
function libvlc_vlm_seek_media (line 4427) | def libvlc_vlm_seek_media(p_instance, psz_name, f_percentage):
function libvlc_vlm_show_media (line 4439) | def libvlc_vlm_show_media(p_instance, psz_name):
function libvlc_vlm_get_media_instance_position (line 4457) | def libvlc_vlm_get_media_instance_position(p_instance, psz_name, i_insta...
function libvlc_vlm_get_media_instance_time (line 4469) | def libvlc_vlm_get_media_instance_time(p_instance, psz_name, i_instance):
function libvlc_vlm_get_media_instance_length (line 4481) | def libvlc_vlm_get_media_instance_length(p_instance, psz_name, i_instance):
function libvlc_vlm_get_media_instance_rate (line 4493) | def libvlc_vlm_get_media_instance_rate(p_instance, psz_name, i_instance):
function libvlc_vlm_get_media_instance_title (line 4505) | def libvlc_vlm_get_media_instance_title(p_instance, psz_name, i_instance):
function libvlc_vlm_get_media_instance_chapter (line 4518) | def libvlc_vlm_get_media_instance_chapter(p_instance, psz_name, i_instan...
function libvlc_vlm_get_media_instance_seekable (line 4531) | def libvlc_vlm_get_media_instance_seekable(p_instance, psz_name, i_insta...
function libvlc_vlm_get_event_manager (line 4544) | def libvlc_vlm_get_event_manager(p_instance):
function libvlc_media_new_location (line 4555) | def libvlc_media_new_location(p_instance, psz_mrl):
function libvlc_media_new_path (line 4572) | def libvlc_media_new_path(p_instance, path):
function libvlc_media_new_fd (line 4584) | def libvlc_media_new_fd(p_instance, fd):
function libvlc_media_new_as_node (line 4608) | def libvlc_media_new_as_node(p_instance, psz_name):
function libvlc_media_add_option (line 4620) | def libvlc_media_add_option(p_md, psz_options):
function libvlc_media_add_option_flag (line 4640) | def libvlc_media_add_option_flag(p_md, psz_options, i_flags):
function libvlc_media_retain (line 4659) | def libvlc_media_retain(p_md):
function libvlc_media_release (line 4670) | def libvlc_media_release(p_md):
function libvlc_media_get_mrl (line 4683) | def libvlc_media_get_mrl(p_md):
function libvlc_media_duplicate (line 4693) | def libvlc_media_duplicate(p_md):
function libvlc_media_get_meta (line 4702) | def libvlc_media_get_meta(p_md, e_meta):
function libvlc_media_set_meta (line 4720) | def libvlc_media_set_meta(p_md, e_meta, psz_value):
function libvlc_media_save_meta (line 4732) | def libvlc_media_save_meta(p_md):
function libvlc_media_get_state (line 4742) | def libvlc_media_get_state(p_md):
function libvlc_media_get_stats (line 4757) | def libvlc_media_get_stats(p_md, p_stats):
function libvlc_media_subitems (line 4768) | def libvlc_media_subitems(p_md):
function libvlc_media_event_manager (line 4780) | def libvlc_media_event_manager(p_md):
function libvlc_media_get_duration (line 4791) | def libvlc_media_get_duration(p_md):
function libvlc_media_parse (line 4801) | def libvlc_media_parse(p_md):
function libvlc_media_parse_async (line 4815) | def libvlc_media_parse_async(p_md):
function libvlc_media_is_parsed (line 4833) | def libvlc_media_is_parsed(p_md):
function libvlc_media_set_user_data (line 4844) | def libvlc_media_set_user_data(p_md, p_new_user_data):
function libvlc_media_get_user_data (line 4856) | def libvlc_media_get_user_data(p_md):
function libvlc_media_get_tracks_info (line 4867) | def libvlc_media_get_tracks_info(p_md):
function libvlc_media_tracks_get (line 4882) | def libvlc_media_tracks_get(p_md, tracks):
function libvlc_media_tracks_release (line 4897) | def libvlc_media_tracks_release(p_tracks, i_count):
function libvlc_media_list_new (line 4908) | def libvlc_media_list_new(p_instance):
function libvlc_media_list_release (line 4918) | def libvlc_media_list_release(p_ml):
function libvlc_media_list_retain (line 4927) | def libvlc_media_list_retain(p_ml):
function libvlc_media_list_set_media (line 4936) | def libvlc_media_list_set_media(p_ml, p_md):
function libvlc_media_list_media (line 4948) | def libvlc_media_list_media(p_ml):
function libvlc_media_list_add_media (line 4960) | def libvlc_media_list_add_media(p_ml, p_md):
function libvlc_media_list_insert_media (line 4972) | def libvlc_media_list_insert_media(p_ml, p_md, i_pos):
function libvlc_media_list_remove_index (line 4985) | def libvlc_media_list_remove_index(p_ml, i_pos):
function libvlc_media_list_count (line 4997) | def libvlc_media_list_count(p_ml):
function libvlc_media_list_item_at_index (line 5008) | def libvlc_media_list_item_at_index(p_ml, i_pos):
function libvlc_media_list_index_of_item (line 5020) | def libvlc_media_list_index_of_item(p_ml, p_md):
function libvlc_media_list_is_readonly (line 5033) | def libvlc_media_list_is_readonly(p_ml):
function libvlc_media_list_lock (line 5043) | def libvlc_media_list_lock(p_ml):
function libvlc_media_list_unlock (line 5052) | def libvlc_media_list_unlock(p_ml):
function libvlc_media_list_event_manager (line 5062) | def libvlc_media_list_event_manager(p_ml):
function libvlc_playlist_play (line 5073) | def libvlc_playlist_play(p_instance, i_id, i_options, ppsz_options):
function libvlc_media_player_new (line 5087) | def libvlc_media_player_new(p_libvlc_instance):
function libvlc_media_player_new_from_media (line 5097) | def libvlc_media_player_new_from_media(p_md):
function libvlc_media_player_release (line 5107) | def libvlc_media_player_release(p_mi):
function libvlc_media_player_retain (line 5120) | def libvlc_media_player_retain(p_mi):
function libvlc_media_player_set_media (line 5130) | def libvlc_media_player_set_media(p_mi, p_md):
function libvlc_media_player_get_media (line 5141) | def libvlc_media_player_get_media(p_mi):
function libvlc_media_player_event_manager (line 5151) | def libvlc_media_player_event_manager(p_mi):
function libvlc_media_player_is_playing (line 5161) | def libvlc_media_player_is_playing(p_mi):
function libvlc_media_player_play (line 5171) | def libvlc_media_player_play(p_mi):
function libvlc_media_player_set_pause (line 5181) | def libvlc_media_player_set_pause(mp, do_pause):
function libvlc_media_player_pause (line 5192) | def libvlc_media_player_pause(p_mi):
function libvlc_media_player_stop (line 5201) | def libvlc_media_player_stop(p_mi):
function libvlc_video_set_callbacks (line 5210) | def libvlc_video_set_callbacks(mp, lock, unlock, display, opaque):
function libvlc_video_set_format (line 5227) | def libvlc_video_set_format(mp, chroma, width, height, pitch):
function libvlc_video_set_format_callbacks (line 5244) | def libvlc_video_set_format_callbacks(mp, setup, cleanup):
function libvlc_media_player_set_nsobject (line 5257) | def libvlc_media_player_set_nsobject(p_mi, drawable):
function libvlc_media_player_get_nsobject (line 5288) | def libvlc_media_player_get_nsobject(p_mi):
function libvlc_media_player_set_agl (line 5298) | def libvlc_media_player_set_agl(p_mi, drawable):
function libvlc_media_player_get_agl (line 5308) | def libvlc_media_player_get_agl(p_mi):
function libvlc_media_player_set_xwindow (line 5318) | def libvlc_media_player_set_xwindow(p_mi, drawable):
function libvlc_media_player_get_xwindow (line 5335) | def libvlc_media_player_get_xwindow(p_mi):
function libvlc_media_player_set_hwnd (line 5348) | def libvlc_media_player_set_hwnd(p_mi, drawable):
function libvlc_media_player_get_hwnd (line 5360) | def libvlc_media_player_get_hwnd(p_mi):
function libvlc_audio_set_callbacks (line 5372) | def libvlc_audio_set_callbacks(mp, play, pause, resume, flush, drain, op...
function libvlc_audio_set_volume_callback (line 5390) | def libvlc_audio_set_volume_callback(mp, set_volume):
function libvlc_audio_set_format_callbacks (line 5404) | def libvlc_audio_set_format_callbacks(mp, setup, cleanup):
function libvlc_audio_set_format (line 5417) | def libvlc_audio_set_format(mp, format, rate, channels):
function libvlc_media_player_get_length (line 5432) | def libvlc_media_player_get_length(p_mi):
function libvlc_media_player_get_time (line 5442) | def libvlc_media_player_get_time(p_mi):
function libvlc_media_player_set_time (line 5452) | def libvlc_media_player_set_time(p_mi, i_time):
function libvlc_media_player_get_position (line 5463) | def libvlc_media_player_get_position(p_mi):
function libvlc_media_player_set_position (line 5473) | def libvlc_media_player_set_position(p_mi, f_pos):
function libvlc_media_player_set_chapter (line 5485) | def libvlc_media_player_set_chapter(p_mi, i_chapter):
function libvlc_media_player_get_chapter (line 5495) | def libvlc_media_player_get_chapter(p_mi):
function libvlc_media_player_get_chapter_count (line 5505) | def libvlc_media_player_get_chapter_count(p_mi):
function libvlc_media_player_will_play (line 5515) | def libvlc_media_player_will_play(p_mi):
function libvlc_media_player_get_chapter_count_for_title (line 5525) | def libvlc_media_player_get_chapter_count_for_title(p_mi, i_title):
function libvlc_media_player_set_title (line 5536) | def libvlc_media_player_set_title(p_mi, i_title):
function libvlc_media_player_get_title (line 5546) | def libvlc_media_player_get_title(p_mi):
function libvlc_media_player_get_title_count (line 5556) | def libvlc_media_player_get_title_count(p_mi):
function libvlc_media_player_previous_chapter (line 5566) | def libvlc_media_player_previous_chapter(p_mi):
function libvlc_media_player_next_chapter (line 5575) | def libvlc_media_player_next_chapter(p_mi):
function libvlc_media_player_get_rate (line 5584) | def libvlc_media_player_get_rate(p_mi):
function libvlc_media_player_set_rate (line 5596) | def libvlc_media_player_set_rate(p_mi, rate):
function libvlc_media_player_get_state (line 5607) | def libvlc_media_player_get_state(p_mi):
function libvlc_media_player_get_fps (line 5617) | def libvlc_media_player_get_fps(p_mi):
function libvlc_media_player_has_vout (line 5627) | def libvlc_media_player_has_vout(p_mi):
function libvlc_media_player_is_seekable (line 5637) | def libvlc_media_player_is_seekable(p_mi):
function libvlc_media_player_can_pause (line 5647) | def libvlc_media_player_can_pause(p_mi):
function libvlc_media_player_program_scrambled (line 5657) | def libvlc_media_player_program_scrambled(p_mi):
function libvlc_media_player_next_frame (line 5668) | def libvlc_media_player_next_frame(p_mi):
function libvlc_media_player_navigate (line 5677) | def libvlc_media_player_navigate(p_mi, navigate):
function libvlc_media_player_set_video_title_display (line 5688) | def libvlc_media_player_set_video_title_display(p_mi, position, timeout):
function libvlc_track_description_list_release (line 5700) | def libvlc_track_description_list_release(p_track_description):
function libvlc_track_description_release (line 5709) | def libvlc_track_description_release(p_track_description):
function libvlc_toggle_fullscreen (line 5717) | def libvlc_toggle_fullscreen(p_mi):
function libvlc_set_fullscreen (line 5728) | def libvlc_set_fullscreen(p_mi, b_fullscreen):
function libvlc_get_fullscreen (line 5744) | def libvlc_get_fullscreen(p_mi):
function libvlc_video_set_key_input (line 5754) | def libvlc_video_set_key_input(p_mi, on):
function libvlc_video_set_mouse_input (line 5771) | def libvlc_video_set_mouse_input(p_mi, on):
function libvlc_video_get_size (line 5785) | def libvlc_video_get_size(p_mi, num):
function libvlc_video_get_height (line 5796) | def libvlc_video_get_height(p_mi):
function libvlc_video_get_width (line 5807) | def libvlc_video_get_width(p_mi):
function libvlc_video_get_cursor (line 5818) | def libvlc_video_get_cursor(p_mi, num):
function libvlc_video_get_scale (line 5839) | def libvlc_video_get_scale(p_mi):
function libvlc_video_set_scale (line 5850) | def libvlc_video_set_scale(p_mi, f_factor):
function libvlc_video_get_aspect_ratio (line 5864) | def libvlc_video_get_aspect_ratio(p_mi):
function libvlc_video_set_aspect_ratio (line 5874) | def libvlc_video_set_aspect_ratio(p_mi, psz_aspect):
function libvlc_video_get_spu (line 5884) | def libvlc_video_get_spu(p_mi):
function libvlc_video_get_spu_count (line 5894) | def libvlc_video_get_spu_count(p_mi):
function libvlc_video_get_spu_description (line 5904) | def libvlc_video_get_spu_description(p_mi):
function libvlc_video_set_spu (line 5914) | def libvlc_video_set_spu(p_mi, i_spu):
function libvlc_video_set_subtitle_file (line 5925) | def libvlc_video_set_subtitle_file(p_mi, psz_subtitle):
function libvlc_video_get_spu_delay (line 5936) | def libvlc_video_get_spu_delay(p_mi):
function libvlc_video_set_spu_delay (line 5948) | def libvlc_video_set_spu_delay(p_mi, i_delay):
function libvlc_video_get_title_description (line 5963) | def libvlc_video_get_title_description(p_mi):
function libvlc_video_get_chapter_description (line 5973) | def libvlc_video_get_chapter_description(p_mi, i_title):
function libvlc_video_get_crop_geometry (line 5984) | def libvlc_video_get_crop_geometry(p_mi):
function libvlc_video_set_crop_geometry (line 5994) | def libvlc_video_set_crop_geometry(p_mi, psz_geometry):
function libvlc_video_get_teletext (line 6004) | def libvlc_video_get_teletext(p_mi):
function libvlc_video_set_teletext (line 6014) | def libvlc_video_set_teletext(p_mi, i_page):
function libvlc_toggle_teletext (line 6024) | def libvlc_toggle_teletext(p_mi):
function libvlc_video_get_track_count (line 6033) | def libvlc_video_get_track_count(p_mi):
function libvlc_video_get_track_description (line 6043) | def libvlc_video_get_track_description(p_mi):
function libvlc_video_get_track (line 6053) | def libvlc_video_get_track(p_mi):
function libvlc_video_set_track (line 6063) | def libvlc_video_set_track(p_mi, i_track):
function libvlc_video_take_snapshot (line 6074) | def libvlc_video_take_snapshot(p_mi, num, psz_filepath, i_width, i_height):
function libvlc_video_set_deinterlace (line 6090) | def libvlc_video_set_deinterlace(p_mi, psz_mode):
function libvlc_video_get_marquee_int (line 6100) | def libvlc_video_get_marquee_int(p_mi, option):
function libvlc_video_get_marquee_string (line 6110) | def libvlc_video_get_marquee_string(p_mi, option):
function libvlc_video_set_marquee_int (line 6120) | def libvlc_video_set_marquee_int(p_mi, option, i_val):
function libvlc_video_set_marquee_string (line 6133) | def libvlc_video_set_marquee_string(p_mi, option, psz_text):
function libvlc_video_get_logo_int (line 6144) | def libvlc_video_get_logo_int(p_mi, option):
function libvlc_video_set_logo_int (line 6154) | def libvlc_video_set_logo_int(p_mi, option, value):
function libvlc_video_set_logo_string (line 6168) | def libvlc_video_set_logo_string(p_mi, option, psz_value):
function libvlc_video_get_adjust_int (line 6180) | def libvlc_video_get_adjust_int(p_mi, option):
function libvlc_video_set_adjust_int (line 6191) | def libvlc_video_set_adjust_int(p_mi, option, value):
function libvlc_video_get_adjust_float (line 6206) | def libvlc_video_get_adjust_float(p_mi, option):
function libvlc_video_set_adjust_float (line 6217) | def libvlc_video_set_adjust_float(p_mi, option, value):
function libvlc_audio_output_list_get (line 6230) | def libvlc_audio_output_list_get(p_instance):
function libvlc_audio_output_list_release (line 6240) | def libvlc_audio_output_list_release(p_list):
function libvlc_audio_output_set (line 6249) | def libvlc_audio_output_set(p_mi, psz_name):
function libvlc_audio_output_device_count (line 6262) | def libvlc_audio_output_device_count(p_instance, psz_name):
function libvlc_audio_output_device_longname (line 6274) | def libvlc_audio_output_device_longname(p_instance, psz_name, int):
function libvlc_audio_output_device_id (line 6287) | def libvlc_audio_output_device_id(p_instance, psz_name, int):
function libvlc_audio_output_device_enum (line 6300) | def libvlc_audio_output_device_enum(mp):
function libvlc_audio_output_device_list_get (line 6318) | def libvlc_audio_output_device_list_get(p_instance, aout):
function libvlc_audio_output_device_list_release (line 6338) | def libvlc_audio_output_device_list_release(p_list):
function libvlc_audio_output_device_set (line 6348) | def libvlc_audio_output_device_set(mp, module, device_id):
function libvlc_audio_toggle_mute (line 6379) | def libvlc_audio_toggle_mute(p_mi):
function libvlc_audio_get_mute (line 6388) | def libvlc_audio_get_mute(p_mi):
function libvlc_audio_set_mute (line 6398) | def libvlc_audio_set_mute(p_mi, status):
function libvlc_audio_get_volume (line 6408) | def libvlc_audio_get_volume(p_mi):
function libvlc_audio_set_volume (line 6418) | def libvlc_audio_set_volume(p_mi, i_volume):
function libvlc_audio_get_track_count (line 6429) | def libvlc_audio_get_track_count(p_mi):
function libvlc_audio_get_track_description (line 6439) | def libvlc_audio_get_track_description(p_mi):
function libvlc_audio_get_track (line 6449) | def libvlc_audio_get_track(p_mi):
function libvlc_audio_set_track (line 6459) | def libvlc_audio_set_track(p_mi, i_track):
function libvlc_audio_get_channel (line 6470) | def libvlc_audio_get_channel(p_mi):
function libvlc_audio_set_channel (line 6480) | def libvlc_audio_set_channel(p_mi, channel):
function libvlc_audio_get_delay (line 6491) | def libvlc_audio_get_delay(p_mi):
function libvlc_audio_set_delay (line 6502) | def libvlc_audio_set_delay(p_mi, i_delay):
function libvlc_audio_equalizer_get_preset_count (line 6514) | def libvlc_audio_equalizer_get_preset_count():
function libvlc_audio_equalizer_get_preset_name (line 6524) | def libvlc_audio_equalizer_get_preset_name(u_index):
function libvlc_audio_equalizer_get_band_count (line 6537) | def libvlc_audio_equalizer_get_band_count():
function libvlc_audio_equalizer_get_band_frequency (line 6547) | def libvlc_audio_equalizer_get_band_frequency(u_index):
function libvlc_audio_equalizer_new (line 6560) | def libvlc_audio_equalizer_new():
function libvlc_audio_equalizer_new_from_preset (line 6574) | def libvlc_audio_equalizer_new_from_preset(u_index):
function libvlc_audio_equalizer_release (line 6590) | def libvlc_audio_equalizer_release(p_equalizer):
function libvlc_audio_equalizer_set_preamp (line 6603) | def libvlc_audio_equalizer_set_preamp(p_equalizer, f_preamp):
function libvlc_audio_equalizer_get_preamp (line 6618) | def libvlc_audio_equalizer_get_preamp(p_equalizer):
function libvlc_audio_equalizer_set_amp_at_index (line 6629) | def libvlc_audio_equalizer_set_amp_at_index(p_equalizer, f_amp, u_band):
function libvlc_audio_equalizer_get_amp_at_index (line 6645) | def libvlc_audio_equalizer_get_amp_at_index(p_equalizer, u_band):
function libvlc_media_player_set_equalizer (line 6657) | def libvlc_media_player_set_equalizer(p_mi, p_equalizer):
function libvlc_media_list_player_new (line 6683) | def libvlc_media_list_player_new(p_instance):
function libvlc_media_list_player_release (line 6693) | def libvlc_media_list_player_release(p_mlp):
function libvlc_media_list_player_retain (line 6706) | def libvlc_media_list_player_retain(p_mlp):
function libvlc_media_list_player_event_manager (line 6716) | def libvlc_media_list_player_event_manager(p_mlp):
function libvlc_media_list_player_set_media_player (line 6726) | def libvlc_media_list_player_set_media_player(p_mlp, p_mi):
function libvlc_media_list_player_set_media_list (line 6736) | def libvlc_media_list_player_set_media_list(p_mlp, p_mlist):
function libvlc_media_list_player_play (line 6746) | def libvlc_media_list_player_play(p_mlp):
function libvlc_media_list_player_pause (line 6755) | def libvlc_media_list_player_pause(p_mlp):
function libvlc_media_list_player_is_playing (line 6764) | def libvlc_media_list_player_is_playing(p_mlp):
function libvlc_media_list_player_get_state (line 6774) | def libvlc_media_list_player_get_state(p_mlp):
function libvlc_media_list_player_play_item_at_index (line 6784) | def libvlc_media_list_player_play_item_at_index(p_mlp, i_index):
function libvlc_media_list_player_play_item (line 6795) | def libvlc_media_list_player_play_item(p_mlp, p_md):
function libvlc_media_list_player_stop (line 6806) | def libvlc_media_list_player_stop(p_mlp):
function libvlc_media_list_player_next (line 6815) | def libvlc_media_list_player_next(p_mlp):
function libvlc_media_list_player_previous (line 6825) | def libvlc_media_list_player_previous(p_mlp):
function libvlc_media_list_player_set_playback_mode (line 6835) | def libvlc_media_list_player_set_playback_mode(p_mlp, e_mode):
function callbackmethod (line 6889) | def callbackmethod(callback):
function libvlc_free (line 6907) | def libvlc_free(p):
function _dot2int (line 6915) | def _dot2int(v):
function hex_version (line 6930) | def hex_version():
function libvlc_hex_version (line 6938) | def libvlc_hex_version():
function debug_callback (line 6946) | def debug_callback(event, *args, **kwds):
function getch (line 6965) | def getch(): # getchar(), getc(stdin) #PYCHOK flake
function end_callback (line 6975) | def end_callback(event):
function pos_callback (line 6980) | def pos_callback(event, player):
function print_version (line 6987) | def print_version():
function mspf (line 7041) | def mspf():
function print_info (line 7045) | def print_info():
function sec_forward (line 7064) | def sec_forward():
function sec_backward (line 7068) | def sec_backward():
function frame_forward (line 7072) | def frame_forward():
function frame_backward (line 7076) | def frame_backward():
function print_help (line 7080) | def print_help():
function quit_app (line 7088) | def quit_app():
function toggle_echo_position (line 7092) | def toggle_echo_position():
FILE: generated/3.0/examples/cocoavlc.py
function _PyPI (line 45) | def _PyPI(package):
class _Color (line 98) | class _Color(object): # PYCHOK expected
function _fstrz (line 119) | def _fstrz(f, n=1, x=''):
function _fstrz0 (line 124) | def _fstrz0(f, n=1, x=''):
function _fstrz1 (line 130) | def _fstrz1(f, n=1, x=''):
function _macOS (line 138) | def _macOS(sep=None):
function _mspf (line 144) | def _mspf(fps):
function _ms2str (line 149) | def _ms2str(ms):
function _ratio2str (line 154) | def _ratio2str(by, *w_h):
class AppVLC (line 159) | class AppVLC(App):
method __init__ (line 183) | def __init__(self, video=None, # video file name
method appLaunched_ (line 210) | def appLaunched_(self, app):
method menuBrighter_ (line 274) | def menuBrighter_(self, item):
method menuClose_ (line 277) | def menuClose_(self, item): # PYCHOK expected
method menuDarker_ (line 283) | def menuDarker_(self, item):
method menuFaster_ (line 286) | def menuFaster_(self, item):
method menuFilters_ (line 289) | def menuFilters_(self, item):
method menuInfo_ (line 309) | def menuInfo_(self, item):
method menuNormal1X_ (line 404) | def menuNormal1X_(self, item):
method menuOpen_ (line 414) | def menuOpen_(self, item):
method menuPause_ (line 425) | def menuPause_(self, item, pause=False): # PYCHOK expected
method menuPlay_ (line 433) | def menuPlay_(self, item_or_None): # PYCHOK expected
method menuRewind_ (line 439) | def menuRewind_(self, item): # PYCHOK expected
method menuSlower_ (line 447) | def menuSlower_(self, item):
method menuSnapshot_ (line 450) | def menuSnapshot_(self, item): # PYCHOK expected
method menuToggle_ (line 462) | def menuToggle_(self, item):
method menuZoomIn_ (line 469) | def menuZoomIn_(self, item):
method menuZoomOut_ (line 472) | def menuZoomOut_(self, item):
method windowClose_ (line 475) | def windowClose_(self, window):
method windowLast_ (line 482) | def windowLast_(self, window):
method windowResize_ (line 486) | def windowResize_(self, window):
method windowScreen_ (line 491) | def windowScreen_(self, window, change):
method _brightness (line 496) | def _brightness(self, unused, fraction=0): # change brightness
method _contrast (line 499) | def _contrast(self, unused, fraction=0): # change contrast
method _gamma (line 502) | def _gamma(self, unused, fraction=0): # change gamma
method _hue (line 505) | def _hue(self, unused, fraction=0): # change hue
method _rate (line 508) | def _rate(self, unused, factor=0): # change the video rate
method _reset (line 515) | def _reset(self, resize=False):
method _resizer (line 521) | def _resizer(self): # adjust aspect ratio and marquee height
method _saturation (line 528) | def _saturation(self, unused, fraction=0): # change saturation
method _sizer (line 531) | def _sizer(self, secs=0.25): # asynchronously
method _VLCadjust (line 549) | def _VLCadjust(self, option, fraction=0, value=None):
method _VLClogo (line 568) | def _VLClogo(self, logostr):
method _VLCmarquee (line 581) | def _VLCmarquee(self, size=36):
method _wiggle (line 595) | def _wiggle(self):
method _zoom (line 602) | def _zoom(self, unused, factor=0):
function _Adjustr (line 617) | def _Adjustr():
FILE: generated/3.0/examples/glsurface.py
class Surface (line 36) | class Surface(object):
method __init__ (line 39) | def __init__(self, w, h):
method update_gl (line 52) | def update_gl(self):
method create_texture_gl (line 62) | def create_texture_gl(self):
method width (line 74) | def width(self):
method height (line 78) | def height(self):
method row_size (line 82) | def row_size(self):
method buf (line 86) | def buf(self):
method buf_pointer (line 90) | def buf_pointer(self):
method lock (line 93) | def lock(self):
method unlock (line 96) | def unlock(self):
method __enter__ (line 99) | def __enter__(self, *args):
method __exit__ (line 102) | def __exit__(self, *args):
method get_libvlc_lock_callback (line 105) | def get_libvlc_lock_callback(self):
method get_libvlc_unlock_callback (line 113) | def get_libvlc_unlock_callback(self):
FILE: generated/3.0/examples/gtk2vlc.py
class VLCWidget (line 47) | class VLCWidget(gtk.DrawingArea):
method __init__ (line 53) | def __init__(self, *p):
class DecoratedVLCWidget (line 65) | class DecoratedVLCWidget(gtk.VBox):
method __init__ (line 73) | def __init__(self, *p):
method get_player_control_toolbar (line 81) | def get_player_control_toolbar(self):
class VideoPlayer (line 98) | class VideoPlayer:
method __init__ (line 101) | def __init__(self):
method main (line 104) | def main(self, fname):
class MultiVideoPlayer (line 112) | class MultiVideoPlayer:
method main (line 117) | def main(self, filenames):
FILE: generated/3.0/examples/gtkvlc.py
function get_window_pointer (line 56) | def get_window_pointer(window):
class VLCWidget (line 65) | class VLCWidget(Gtk.DrawingArea):
method __init__ (line 73) | def __init__(self, *p):
class DecoratedVLCWidget (line 94) | class DecoratedVLCWidget(Gtk.VBox):
method __init__ (line 104) | def __init__(self, *p):
method get_player_control_toolbar (line 113) | def get_player_control_toolbar(self):
class VideoPlayer (line 130) | class VideoPlayer:
method __init__ (line 133) | def __init__(self):
method main (line 136) | def main(self, fname):
class MultiVideoPlayer (line 144) | class MultiVideoPlayer:
method main (line 149) | def main(self, filenames):
FILE: generated/3.0/examples/play_buffer.py
class StreamProviderDir (line 57) | class StreamProviderDir(object):
method __init__ (line 58) | def __init__(self, rootpath, file_ext):
method open (line 64) | def open(self):
method release_resources (line 83) | def release_resources(self):
method seek (line 91) | def seek(self, offset):
method get_data (line 97) | def get_data(self):
function media_open_cb (line 121) | def media_open_cb(opaque, data_pointer, size_pointer):
function media_read_cb (line 135) | def media_read_cb(opaque, buffer, length):
function media_seek_cb (line 153) | def media_seek_cb(opaque, offset):
function media_close_cb (line 164) | def media_close_cb(opaque):
FILE: generated/3.0/examples/psgvlc.py
function Bn (line 49) | def Bn(name): # a PySimpleGUI "User Defined Element" (see docs)
FILE: generated/3.0/examples/pyobjcvlc.py
class _ImportError (line 28) | class _ImportError(ImportError): # PYCHOK expected
method __init__ (line 29) | def __init__(self, package, PyPI):
function gcd (line 71) | def gcd(a, b):
function mspf (line 80) | def mspf(fps):
function nsBundleRename (line 86) | def nsBundleRename(title, match='Python'):
function printf (line 111) | def printf(fmt, *args, **kwds): # argv0='', nl=0, nt=0
function terminating (line 127) | def terminating(app, timeout):
class _NSDelegate (line 150) | class _NSDelegate(NSObject):
method applicationDidFinishLaunching_ (line 162) | def applicationDidFinishLaunching_(self, notification):
method info_ (line 202) | def info_(self, notification):
method rewind_ (line 246) | def rewind_(self, notification):
method toggle_ (line 251) | def toggle_(self, notification):
method windowDidResize_ (line 263) | def windowDidResize_(self, notification):
method windowWillClose_ (line 276) | def windowWillClose_(self, notification):
function _MenuItem (line 280) | def _MenuItem(label, action=None, key='', alt=False, cmd=True, ctrl=Fals...
function _MenuItemSeparator (line 301) | def _MenuItemSeparator():
function _Window2 (line 307) | def _Window2(title=_argv0, fraction=0.5):
function simpleVLCplay (line 338) | def simpleVLCplay(player, title=_argv0, video='', timeout=None):
FILE: generated/3.0/examples/pyqt5vlc.py
class Player (line 34) | class Player(QtWidgets.QMainWindow):
method __init__ (line 38) | def __init__(self, master=None):
method create_ui (line 53) | def create_ui(self):
method play_pause (line 118) | def play_pause(self):
method stop (line 136) | def stop(self):
method open_file (line 142) | def open_file(self):
method set_volume (line 176) | def set_volume(self, volume):
method set_position (line 181) | def set_position(self):
method update_ui (line 195) | def update_ui(self):
function main (line 214) | def main():
FILE: generated/3.0/examples/qtvlc.py
class Player (line 33) | class Player(QtGui.QMainWindow):
method __init__ (line 36) | def __init__(self, master=None):
method createUI (line 48) | def createUI(self):
method PlayPause (line 114) | def PlayPause(self):
method Stop (line 130) | def Stop(self):
method OpenFile (line 136) | def OpenFile(self, filename=None):
method setVolume (line 169) | def setVolume(self, Volume):
method setPosition (line 174) | def setPosition(self, position):
method updateUI (line 184) | def updateUI(self):
FILE: generated/3.0/examples/tkvlc.py
function _find_lib (line 122) | def _find_lib(name, *paths):
function _GetNSView (line 171) | def _GetNSView(unused): # imported by examples/psgvlc.py
function _fullscreen (line 191) | def _fullscreen(panel, *full):
function _geometry (line 200) | def _geometry(panel, g_w, *h_x_y):
function _geometry1 (line 215) | def _geometry1(panel):
function _geometry5 (line 221) | def _geometry5(panel):
function _hms (line 229) | def _hms(tensecs, secs=''):
function _underline2 (line 244) | def _underline2(c, label='', underline=-1, **cfg):
class _Tk_Button (line 255) | class _Tk_Button(ttk.Button):
method __init__ (line 258) | def __init__(self, frame, **kwds):
method _cfg (line 262) | def _cfg(self, label=None, **kwds):
method config (line 270) | def config(self, **kwds):
method disabled (line 274) | def disabled(self, *disable):
class _Tk_Item (line 284) | class _Tk_Item(object):
method __init__ (line 287) | def __init__(self, menu, label='', key='', under='', **kwds):
method config (line 298) | def config(self, **kwds):
method disabled (line 307) | def disabled(self, *disable):
class _Tk_Menu (line 318) | class _Tk_Menu(Tk.Menu):
method __init__ (line 331) | def __init__(self, master=None, **kwds):
method add_item (line 338) | def add_item(self, label='', command=None, key='', **kwds):
method add_menu (line 354) | def add_menu(self, label='', menu=None, key='', **kwds): # untested
method bind_shortcut (line 363) | def bind_shortcut(self, key='', command=None, label='', **unused):
method bind_shortcuts_to (line 387) | def bind_shortcuts_to(self, *widgets):
method entryconfig (line 394) | def entryconfig(self, idx, command=None, **kwds): # PYCHOK signature
method _Item (line 410) | def _Item(self, add_, key, label, **kwds):
class _Tk_Slider (line 478) | class _Tk_Slider(Tk.Scale):
method __init__ (line 483) | def __init__(self, frame, to=1, **kwds):
method set (line 496) | def set(self, value):
class Player (line 502) | class Player(_Tk_Frame):
method __init__ (line 524) | def __init__(self, parent, title='', video='', debug=False): # PYCHOK...
method _anchorPanels (line 626) | def _anchorPanels(self, video=False):
method _bind_events (line 662) | def _bind_events(self, panel):
method _ButtonsPanel (line 691) | def _ButtonsPanel(self):
method _debug (line 733) | def _debug(self, where, *event, **kwds):
method _frontmost (line 765) | def _frontmost(self):
method OnAnchor (line 776) | def OnAnchor(self, *unused):
method OnClose (line 791) | def OnClose(self, *event):
method OnConfigure (line 806) | def OnConfigure(self, event):
method OnFaster (line 825) | def OnFaster(self, *event):
method OnFocus (line 831) | def OnFocus(self, *unused):
method OnFull (line 839) | def OnFull(self, *unused):
method OnMute (line 860) | def OnMute(self, *unused):
method OnNormal (line 875) | def OnNormal(self, *unused):
method OnOpacity (line 885) | def OnOpacity(self, *unused):
method OnOpacity100 (line 894) | def OnOpacity100(self, *unused):
method OnOpen (line 901) | def OnOpen(self, *unused):
method OnPause (line 915) | def OnPause(self, *unused):
method OnPercent (line 925) | def OnPercent(self, *unused):
method OnPlay (line 935) | def OnPlay(self, *unused):
method OnSlower (line 955) | def OnSlower(self, *event):
method OnSnapshot (line 961) | def OnSnapshot(self, *unused):
method OnStop (line 972) | def OnStop(self, *unused):
method OnTick (line 978) | def OnTick(self):
method OnTime (line 999) | def OnTime(self, *unused):
method OnZoomIn (line 1010) | def OnZoomIn(self, *event):
method OnZoomOut (line 1016) | def OnZoomOut(self, *event):
method _pause_play (line 1022) | def _pause_play(self, playing):
method _play (line 1036) | def _play(self, video):
method _reset (line 1063) | def _reset(self):
method _set_aspect_ratio (line 1074) | def _set_aspect_ratio(self, force=False):
method _set_buttons_title (line 1099) | def _set_buttons_title(self, *tensecs):
method _set_opacity (line 1112) | def _set_opacity(self, *percent): # 100% fully opaque
method _set_percent (line 1128) | def _set_percent(self, percent, **cfg):
method _set_rate (line 1133) | def _set_rate(self, factor, *event):
method _set_time (line 1152) | def _set_time(self, millisecs):
method _set_volume (line 1159) | def _set_volume(self, *volume):
method _set_zoom (line 1175) | def _set_zoom(self, factor, *event):
method _showError (line 1195) | def _showError(self, verb):
method _VideoPanel (line 1202) | def _VideoPanel(self):
method _wiggle (line 1215) | def _wiggle(self, d=4):
function print_version (line 1229) | def print_version(name=''): # imported by psgvlc.py
FILE: generated/3.0/examples/video_sync/main.py
class Player (line 39) | class Player(QtWidgets.QMainWindow):
method __init__ (line 43) | def __init__(self, master=None):
method create_ui (line 64) | def create_ui(self):
method play_pause (line 176) | def play_pause(self):
method stop (line 201) | def stop(self):
method on_next_frame (line 221) | def on_next_frame(self):
method on_previous_frame (line 241) | def on_previous_frame(self):
method mspf (line 252) | def mspf(self):
method incr_mov_play_rate (line 256) | def incr_mov_play_rate(self):
method decr_mov_play_rate (line 269) | def decr_mov_play_rate(self):
method open_file (line 282) | def open_file(self):
method set_position (line 315) | def set_position(self):
method update_ui (line 340) | def update_ui(self):
method update_time_label (line 365) | def update_time_label(self):
method update_pb_rate_label (line 370) | def update_pb_rate_label(self):
function on_new_video (line 374) | def on_new_video():
function main (line 383) | def main():
FILE: generated/3.0/examples/video_sync/mini_player.py
class MiniPlayer (line 37) | class MiniPlayer(QtWidgets.QMainWindow):
method __init__ (line 41) | def __init__(self, data_queue, master=None):
method init_ui (line 65) | def init_ui(self):
method open_file (line 86) | def open_file(self):
method update_ui (line 120) | def update_ui(self):
method update_statusbar (line 148) | def update_statusbar(self):
function main (line 154) | def main():
FILE: generated/3.0/examples/video_sync/network.py
class Server (line 55) | class Server:
method __init__ (line 58) | def __init__(self, host, port, data_queue):
method listen_for_clients (line 95) | def listen_for_clients(self):
method data_sender (line 106) | def data_sender(self):
method sendall (line 116) | def sendall(self, client, data):
class Client (line 126) | class Client:
method __init__ (line 129) | def __init__(self, address, port, data_queue):
method recv_all (line 159) | def recv_all(self, size):
method recv_msg (line 172) | def recv_msg(self):
method data_receiver (line 181) | def data_receiver(self):
FILE: generated/3.0/examples/wxvlc.py
class Player (line 47) | class Player(wx.Frame):
method __init__ (line 50) | def __init__(self, title='', video=''):
method OnExit (line 124) | def OnExit(self, evt):
method OnOpen (line 129) | def OnOpen(self, evt):
method OnPlay (line 169) | def OnPlay(self, evt):
method OnPause (line 191) | def OnPause(self, evt):
method OnStop (line 202) | def OnStop(self, evt):
method OnTimer (line 213) | def OnTimer(self, evt):
method OnMute (line 225) | def OnMute(self, evt):
method OnVolume (line 236) | def OnVolume(self, evt):
method errorDialog (line 244) | def errorDialog(self, errormessage):
FILE: generated/3.0/vlc.py
function str_to_bytes (line 66) | def str_to_bytes(s):
function bytes_to_str (line 74) | def bytes_to_str(b):
function len_args (line 82) | def len_args(func):
function find_lib (line 92) | def find_lib():
class VLCException (line 200) | class VLCException(Exception):
class memoize_parameterless (line 214) | class memoize_parameterless(object):
method __init__ (line 222) | def __init__(self, func):
method __call__ (line 226) | def __call__(self, obj):
method __repr__ (line 233) | def __repr__(self):
method __get__ (line 237) | def __get__(self, obj, objtype):
function get_default_instance (line 247) | def get_default_instance():
function try_fspath (line 255) | def try_fspath(path):
function _Cfunction (line 270) | def _Cfunction(name, flags, errcheck, *types):
function _Cobject (line 288) | def _Cobject(cls, ctype):
function _Constructor (line 295) | def _Constructor(cls, ptr=_internal_guard):
class _Cstruct (line 306) | class _Cstruct(ctypes.Structure):
method __str__ (line 311) | def __str__(self):
method __repr__ (line 315) | def __repr__(self):
class _Ctype (line 319) | class _Ctype(object):
method from_param (line 323) | def from_param(this): # not self
class ListPOINTER (line 330) | class ListPOINTER(object):
method __init__ (line 333) | def __init__(self, etype):
method from_param (line 336) | def from_param(self, param):
function string_result (line 344) | def string_result(result, func, arguments):
function class_result (line 358) | def class_result(classname):
class Log (line 370) | class Log(ctypes.Structure):
class MediaThumbnailRequest (line 378) | class MediaThumbnailRequest:
method __new__ (line 379) | def __new__(cls, *args):
class FILE (line 386) | class FILE(ctypes.Structure):
function module_description_list (line 410) | def module_description_list(head):
function track_description_list (line 423) | def track_description_list(head):
class _Enum (line 440) | class _Enum(ctypes.c_uint):
method __str__ (line 445) | def __str__(self):
method __hash__ (line 449) | def __hash__(self):
method __repr__ (line 452) | def __repr__(self):
method __eq__ (line 455) | def __eq__(self, other):
method __ne__ (line 460) | def __ne__(self, other):
class AudioEqualizer (line 465) | class AudioEqualizer(_Ctype):
method __new__ (line 476) | def __new__(cls, *args):
method get_amp_at_index (line 481) | def get_amp_at_index(self, u_band):
method get_preamp (line 491) | def get_preamp(self):
method release (line 499) | def release(self):
method set_amp_at_index (line 511) | def set_amp_at_index(self, f_amp, u_band):
method set_preamp (line 527) | def set_preamp(self, f_preamp):
class EventManager (line 543) | class EventManager(_Ctype):
method __new__ (line 565) | def __new__(cls, ptr=_internal_guard):
method event_attach (line 572) | def event_attach(self, eventtype, callback, *args, **kwds):
method event_detach (line 630) | def event_detach(self, eventtype):
class Instance (line 644) | class Instance(_Ctype):
method __new__ (line 653) | def __new__(cls, *args):
method media_player_new (line 682) | def media_player_new(self, uri=None):
method media_list_player_new (line 693) | def media_list_player_new(self):
method media_new (line 699) | def media_new(self, mrl, *options):
method media_new_path (line 734) | def media_new_path(self, path):
method media_list_new (line 747) | def media_list_new(self, mrls=None):
method audio_output_enumerate_devices (line 766) | def audio_output_enumerate_devices(self):
method audio_filter_list_get (line 782) | def audio_filter_list_get(self):
method video_filter_list_get (line 786) | def video_filter_list_get(self):
method add_intf (line 790) | def add_intf(self, name):
method audio_output_device_count (line 799) | def audio_output_device_count(self, psz_audio_output):
method audio_output_device_id (line 808) | def audio_output_device_id(self, psz_audio_output, i_device):
method audio_output_device_list_get (line 819) | def audio_output_device_list_get(self, aout):
method audio_output_device_longname (line 842) | def audio_output_device_longname(self, psz_output, i_device):
method audio_output_list_get (line 853) | def audio_output_list_get(self):
method dialog_set_callbacks (line 862) | def dialog_set_callbacks(self, p_cbs, p_data):
method get_log_verbosity (line 871) | def get_log_verbosity(self):
method log_open (line 879) | def log_open(self):
method log_set (line 887) | def log_set(self, cb, data):
method log_set_file (line 906) | def log_set_file(self, stream):
method log_unset (line 916) | def log_unset(self):
method media_discoverer_list_get (line 930) | def media_discoverer_list_get(self, i_cat, ppp_services):
method media_discoverer_new (line 943) | def media_discoverer_new(self, psz_name):
method media_discoverer_new_from_name (line 964) | def media_discoverer_new_from_name(self, psz_name):
method media_library_new (line 968) | def media_library_new(self):
method media_new_as_node (line 975) | def media_new_as_node(self, psz_name):
method media_new_callbacks (line 986) | def media_new_callbacks(self, open_cb, read_cb, seek_cb, close_cb, opa...
method media_new_fd (line 1015) | def media_new_fd(self, fd):
method media_new_location (line 1040) | def media_new_location(self, psz_mrl):
method playlist_play (line 1057) | def playlist_play(self, i_id, i_options, ppsz_options):
method release (line 1071) | def release(self):
method renderer_discoverer_list_get (line 1077) | def renderer_discoverer_list_get(self, ppp_services):
method renderer_discoverer_new (line 1091) | def renderer_discoverer_new(self, psz_name):
method retain (line 1111) | def retain(self):
method set_app_id (line 1117) | def set_app_id(self, id, version, icon):
method set_exit_handler (line 1131) | def set_exit_handler(self, cb, opaque):
method set_log_verbosity (line 1150) | def set_log_verbosity(self, level):
method set_user_agent (line 1158) | def set_user_agent(self, name, http):
method vlm_add_broadcast (line 1169) | def vlm_add_broadcast(
method vlm_add_input (line 1202) | def vlm_add_input(self, psz_name, psz_input):
method vlm_add_vod (line 1214) | def vlm_add_vod(
method vlm_change_media (line 1238) | def vlm_change_media(
method vlm_del_media (line 1272) | def vlm_del_media(self, psz_name):
method vlm_get_event_manager (line 1282) | def vlm_get_event_manager(self):
method vlm_get_media_instance_length (line 1290) | def vlm_get_media_instance_length(self, psz_name, i_instance):
method vlm_get_media_instance_position (line 1302) | def vlm_get_media_instance_position(self, psz_name, i_instance):
method vlm_get_media_instance_rate (line 1314) | def vlm_get_media_instance_rate(self, psz_name, i_instance):
method vlm_get_media_instance_time (line 1326) | def vlm_get_media_instance_time(self, psz_name, i_instance):
method vlm_pause_media (line 1338) | def vlm_pause_media(self, psz_name):
method vlm_play_media (line 1347) | def vlm_play_media(self, psz_name):
method vlm_release (line 1356) | def vlm_release(self):
method vlm_seek_media (line 1360) | def vlm_seek_media(self, psz_name, f_percentage):
method vlm_set_enabled (line 1370) | def vlm_set_enabled(self, psz_name, b_enabled):
method vlm_set_input (line 1380) | def vlm_set_input(self, psz_name, psz_input):
method vlm_set_loop (line 1393) | def vlm_set_loop(self, psz_name, b_loop):
method vlm_set_mux (line 1403) | def vlm_set_mux(self, psz_name, psz_mux):
method vlm_set_output (line 1413) | def vlm_set_output(self, psz_name, psz_output):
method vlm_show_media (line 1425) | def vlm_show_media(self, psz_name):
method vlm_stop_media (line 1443) | def vlm_stop_media(self, psz_name):
method wait (line 1452) | def wait(self):
class LogIterator (line 1462) | class LogIterator(_Ctype):
method __new__ (line 1465) | def __new__(cls, ptr=_internal_guard):
method __iter__ (line 1469) | def __iter__(self):
method next (line 1472) | def next(self):
method __next__ (line 1479) | def __next__(self):
method free (line 1482) | def free(self):
method has_next (line 1486) | def has_next(self):
class Media (line 1495) | class Media(_Ctype):
method __new__ (line 1506) | def __new__(cls, *args):
method get_instance (line 1517) | def get_instance(self):
method add_options (line 1520) | def add_options(self, *options):
method tracks_get (line 1536) | def tracks_get(self):
method add_option (line 1563) | def add_option(self, psz_options):
method add_option_flag (line 1582) | def add_option_flag(self, psz_options, i_flags):
method duplicate (line 1600) | def duplicate(self):
method event_manager (line 1605) | def event_manager(self):
method get_duration (line 1613) | def get_duration(self):
method get_meta (line 1620) | def get_meta(self, e_meta):
method get_mrl (line 1635) | def get_mrl(self):
method get_parsed_status (line 1642) | def get_parsed_status(self):
method get_state (line 1653) | def get_state(self):
method get_stats (line 1664) | def get_stats(self, p_stats):
method get_tracks_info (line 1674) | def get_tracks_info(self):
method get_type (line 1691) | def get_type(self):
method get_user_data (line 1701) | def get_user_data(self):
method is_parsed (line 1708) | def is_parsed(self):
method parse (line 1721) | def parse(self):
method parse_async (line 1737) | def parse_async(self):
method parse_stop (line 1759) | def parse_stop(self):
method parse_with_options (line 1771) | def parse_with_options(self, parse_flag, timeout):
method player_new_from_media (line 1803) | def player_new_from_media(self):
method release (line 1812) | def release(self):
method retain (line 1821) | def retain(self):
method save_meta (line 1828) | def save_meta(self):
method set_meta (line 1835) | def set_meta(self, e_meta, psz_value):
method set_user_data (line 1844) | def set_user_data(self, p_new_user_data):
method slaves_add (line 1853) | def slaves_add(self, i_type, i_priority, psz_uri):
method slaves_clear (line 1872) | def slaves_clear(self):
method slaves_get (line 1880) | def slaves_get(self, ppp_slaves):
method subitems (line 1897) | def subitems(self):
class MediaDiscoverer (line 1907) | class MediaDiscoverer(_Ctype):
method __new__ (line 1908) | def __new__(cls, ptr=_internal_guard):
method event_manager (line 1913) | def event_manager(self):
method is_running (line 1924) | def is_running(self):
method localized_name (line 1931) | def localized_name(self):
method media_list (line 1942) | def media_list(self):
method release (line 1949) | def release(self):
method start (line 1955) | def start(self):
method stop (line 1968) | def stop(self):
class MediaLibrary (line 1978) | class MediaLibrary(_Ctype):
method __new__ (line 1979) | def __new__(cls, ptr=_internal_guard):
method load (line 1983) | def load(self):
method media_list (line 1990) | def media_list(self):
method release (line 1997) | def release(self):
method retain (line 2004) | def retain(self):
class MediaList (line 2012) | class MediaList(_Ctype):
method __new__ (line 2023) | def __new__(cls, *args):
method get_instance (line 2034) | def get_instance(self):
method add_media (line 2037) | def add_media(self, mrl):
method count (line 2052) | def count(self):
method __len__ (line 2060) | def __len__(self):
method event_manager (line 2064) | def event_manager(self):
method index_of_item (line 2072) | def index_of_item(self, p_md):
method insert_media (line 2083) | def insert_media(self, p_md, i_pos):
method is_readonly (line 2094) | def is_readonly(self):
method item_at_index (line 2101) | def item_at_index(self, i_pos):
method __getitem__ (line 2113) | def __getitem__(self, i):
method __iter__ (line 2116) | def __iter__(self):
method lock (line 2120) | def lock(self):
method media (line 2124) | def media(self):
method release (line 2133) | def release(self):
method remove_index (line 2137) | def remove_index(self, i_pos):
method retain (line 2147) | def retain(self):
method set_media (line 2151) | def set_media(self, p_md):
method unlock (line 2160) | def unlock(self):
class MediaListPlayer (line 2167) | class MediaListPlayer(_Ctype):
method __new__ (line 2175) | def __new__(cls, arg=None):
method get_instance (line 2187) | def get_instance(self):
method event_manager (line 2192) | def event_manager(self):
method get_media_player (line 2199) | def get_media_player(self):
method get_state (line 2209) | def get_state(self):
method is_playing (line 2216) | def is_playing(self):
method next (line 2223) | def next(self):
method pause (line 2230) | def pause(self):
method play (line 2234) | def play(self):
method play_item (line 2238) | def play_item(self, p_md):
method play_item_at_index (line 2247) | def play_item_at_index(self, i_index):
method __getitem__ (line 2256) | def __getitem__(self, i):
method __iter__ (line 2259) | def __iter__(self):
method previous (line 2263) | def previous(self):
method release (line 2270) | def release(self):
method retain (line 2279) | def retain(self):
method set_media_list (line 2285) | def set_media_list(self, p_mlist):
method set_media_player (line 2292) | def set_media_player(self, p_mi):
method set_pause (line 2299) | def set_pause(self, do_pause):
method set_playback_mode (line 2308) | def set_playback_mode(self, e_mode):
method stop (line 2315) | def stop(self):
class MediaPlayer (line 2320) | class MediaPlayer(_Ctype):
method __new__ (line 2328) | def __new__(cls, *args):
method get_instance (line 2343) | def get_instance(self):
method set_mrl (line 2347) | def set_mrl(self, mrl, *options):
method video_get_spu_description (line 2364) | def video_get_spu_description(self):
method video_get_track_description (line 2368) | def video_get_track_description(self):
method audio_get_track_description (line 2372) | def audio_get_track_description(self):
method get_full_title_descriptions (line 2376) | def get_full_title_descriptions(self):
method get_full_chapter_descriptions (line 2398) | def get_full_chapter_descriptions(self, i_chapters_of_title):
method video_get_size (line 2422) | def video_get_size(self, num=0):
method set_hwnd (line 2433) | def set_hwnd(self, drawable):
method video_get_width (line 2446) | def video_get_width(self, num=0):
method video_get_height (line 2453) | def video_get_height(self, num=0):
method video_get_cursor (line 2460) | def video_get_cursor(self, num=0):
method audio_get_channel (line 2486) | def audio_get_channel(self):
method audio_get_delay (line 2493) | def audio_get_delay(self):
method audio_get_mute (line 2501) | def audio_get_mute(self):
method audio_get_track (line 2508) | def audio_get_track(self):
method audio_get_track_count (line 2515) | def audio_get_track_count(self):
method audio_get_volume (line 2522) | def audio_get_volume(self):
method audio_output_device_enum (line 2530) | def audio_output_device_enum(self):
method audio_output_device_get (line 2549) | def audio_output_device_get(self):
method audio_output_device_set (line 2572) | def audio_output_device_set(self, module, device_id):
method audio_output_get_device_type (line 2613) | def audio_output_get_device_type(self):
method audio_output_set (line 2620) | def audio_output_set(self, psz_name):
method audio_output_set_device_type (line 2633) | def audio_output_set_device_type(self, device_type):
method audio_set_callbacks (line 2637) | def audio_set_callbacks(self, play, pause, resume, flush, drain, opaque):
method audio_set_channel (line 2659) | def audio_set_channel(self, channel):
method audio_set_delay (line 2668) | def audio_set_delay(self, i_delay):
method audio_set_format (line 2678) | def audio_set_format(self, format, rate, channels):
method audio_set_format_callbacks (line 2693) | def audio_set_format_callbacks(self, setup, cleanup):
method audio_set_mute (line 2705) | def audio_set_mute(self, status):
method audio_set_track (line 2720) | def audio_set_track(self, i_track):
method audio_set_volume (line 2729) | def audio_set_volume(self, i_volume):
method audio_set_volume_callback (line 2738) | def audio_set_volume_callback(self, set_volume):
method audio_toggle_mute (line 2751) | def audio_toggle_mute(self):
method get_fullscreen (line 2761) | def get_fullscreen(self):
method add_slave (line 2768) | def add_slave(self, i_type, psz_uri, b_select):
method can_pause (line 2787) | def can_pause(self):
method event_manager (line 2795) | def event_manager(self):
method get_agl (line 2802) | def get_agl(self):
method get_chapter (line 2806) | def get_chapter(self):
method get_chapter_count (line 2813) | def get_chapter_count(self):
method get_chapter_count_for_title (line 2820) | def get_chapter_count_for_title(self, i_title):
method get_fps (line 2829) | def get_fps(self):
method get_hwnd (line 2843) | def get_hwnd(self):
method get_length (line 2852) | def get_length(self):
method get_media (line 2859) | def get_media(self):
method get_nsobject (line 2867) | def get_nsobject(self):
method get_position (line 2874) | def get_position(self):
method get_rate (line 2881) | def get_rate(self):
method get_role (line 2890) | def get_role(self):
method get_state (line 2898) | def get_state(self):
method get_time (line 2905) | def get_time(self):
method get_title (line 2912) | def get_title(self):
method get_title_count (line 2919) | def get_title_count(self):
method get_xwindow (line 2926) | def get_xwindow(self):
method has_vout (line 2936) | def has_vout(self):
method is_playing (line 2943) | def is_playing(self):
method is_seekable (line 2950) | def is_seekable(self):
method navigate (line 2957) | def navigate(self, navigate):
method next_chapter (line 2966) | def next_chapter(self):
method next_frame (line 2970) | def next_frame(self):
method pause (line 2974) | def pause(self):
method play (line 2978) | def play(self):
method previous_chapter (line 2985) | def previous_chapter(self):
method program_scrambled (line 2989) | def program_scrambled(self):
method release (line 2998) | def release(self):
method retain (line 3007) | def retain(self):
method set_agl (line 3013) | def set_agl(self, drawable):
method set_android_context (line 3017) | def set_android_context(self, p_awindow_handler):
method set_chapter (line 3027) | def set_chapter(self, i_chapter):
method set_equalizer (line 3034) | def set_equalizer(self, p_equalizer):
method set_evas_object (line 3065) | def set_evas_object(self, p_evas_object):
method set_media (line 3075) | def set_media(self, p_md):
method set_nsobject (line 3084) | def set_nsobject(self, drawable):
method set_pause (line 3119) | def set_pause(self, do_pause):
method set_position (line 3128) | def set_position(self, f_pos):
method set_rate (line 3137) | def set_rate(self, rate):
method set_renderer (line 3147) | def set_renderer(self, p_item):
method set_role (line 3162) | def set_role(self, role):
method set_time (line 3171) | def set_time(self, i_time):
method set_title (line 3179) | def set_title(self, i_title):
method set_video_title_display (line 3186) | def set_video_title_display(self, position, timeout):
method set_xwindow (line 3196) | def set_xwindow(self, drawable):
method stop (line 3237) | def stop(self):
method will_play (line 3241) | def will_play(self):
method set_fullscreen (line 3248) | def set_fullscreen(self, b_fullscreen):
method toggle_fullscreen (line 3262) | def toggle_fullscreen(self):
method toggle_teletext (line 3270) | def toggle_teletext(self):
method video_get_adjust_float (line 3277) | def video_get_adjust_float(self, option):
method video_get_adjust_int (line 3286) | def video_get_adjust_int(self, option):
method video_get_aspect_ratio (line 3295) | def video_get_aspect_ratio(self):
method video_get_chapter_description (line 3303) | def video_get_chapter_description(self, i_title):
method video_get_crop_geometry (line 3313) | def video_get_crop_geometry(self):
method video_get_logo_int (line 3320) | def video_get_logo_int(self, option):
method video_get_marquee_int (line 3327) | def video_get_marquee_int(self, option):
method video_get_marquee_string (line 3334) | def video_get_marquee_string(self, option):
method video_get_scale (line 3341) | def video_get_scale(self):
method video_get_spu (line 3350) | def video_get_spu(self):
method video_get_spu_count (line 3357) | def video_get_spu_count(self):
method video_get_spu_delay (line 3364) | def video_get_spu_delay(self):
method video_get_teletext (line 3373) | def video_get_teletext(self):
method video_get_title_description (line 3383) | def video_get_title_description(self):
method video_get_track (line 3391) | def video_get_track(self):
method video_get_track_count (line 3398) | def video_get_track_count(self):
method video_set_adjust_float (line 3405) | def video_set_adjust_float(self, option, value):
method video_set_adjust_int (line 3416) | def video_set_adjust_int(self, option, value):
method video_set_aspect_ratio (line 3429) | def video_set_aspect_ratio(self, psz_aspect):
method video_set_callbacks (line 3439) | def video_set_callbacks(self, lock, unlock, display, opaque):
method video_set_crop_geometry (line 3479) | def video_set_crop_geometry(self, psz_geometry):
method video_set_deinterlace (line 3486) | def video_set_deinterlace(self, psz_mode):
method video_set_format (line 3493) | def video_set_format(self, chroma, width, height, pitch):
method video_set_format_callbacks (line 3511) | def video_set_format_callbacks(self, setup, cleanup):
method video_set_key_input (line 3522) | def video_set_key_input(self, on):
method video_set_logo_int (line 3538) | def video_set_logo_int(self, option, value):
method video_set_logo_string (line 3549) | def video_set_logo_string(self, option, psz_value):
method video_set_marquee_int (line 3558) | def video_set_marquee_int(self, option, i_val):
method video_set_marquee_string (line 3569) | def video_set_marquee_string(self, option, psz_text):
method video_set_mouse_input (line 3577) | def video_set_mouse_input(self, on):
method video_set_scale (line 3590) | def video_set_scale(self, f_factor):
method video_set_spu (line 3602) | def video_set_spu(self, i_spu):
method video_set_spu_delay (line 3611) | def video_set_spu_delay(self, i_delay):
method video_set_subtitle_file (line 3625) | def video_set_subtitle_file(self, psz_subtitle):
method video_set_teletext (line 3636) | def video_set_teletext(self, i_page):
method video_set_track (line 3647) | def video_set_track(self, i_track):
method video_take_snapshot (line 3656) | def video_take_snapshot(self, num, psz_filepath, i_width, i_height):
method video_update_viewpoint (line 3673) | def video_update_viewpoint(self, p_viewpoint, b_absolute):
class Renderer (line 3691) | class Renderer(_Ctype):
method __new__ (line 3692) | def __new__(cls, ptr=_internal_guard):
method flags (line 3696) | def flags(self):
method hold (line 3707) | def hold(self):
method icon_uri (line 3719) | def icon_uri(self):
method name (line 3727) | def name(self):
method release (line 3735) | def release(self):
method type (line 3742) | def type(self):
class RendererDiscoverer (line 3752) | class RendererDiscoverer(_Ctype):
method __new__ (line 3753) | def __new__(cls, ptr=_internal_guard):
method event_manager (line 3758) | def event_manager(self):
method release (line 3776) | def release(self):
method start (line 3783) | def start(self):
method stop (line 3796) | def stop(self):
class AudioOutputChannel (line 3810) | class AudioOutputChannel(_Enum):
class AudioOutputDeviceTypes (line 3840) | class AudioOutputDeviceTypes(_Enum):
class DialogQuestionType (line 3879) | class DialogQuestionType(_Enum):
class EventType (line 3900) | class EventType(_Enum):
class LogLevel (line 4108) | class LogLevel(_Enum):
class MediaDiscovererCategory (line 4134) | class MediaDiscovererCategory(_Enum):
class MediaParseFlag (line 4159) | class MediaParseFlag(_Enum):
class MediaParsedStatus (line 4190) | class MediaParsedStatus(_Enum):
class MediaPlayerRole (line 4218) | class MediaPlayerRole(_Enum):
class MediaSlaveType (line 4264) | class MediaSlaveType(_Enum):
class MediaType (line 4282) | class MediaType(_Enum):
class Meta (line 4314) | class Meta(_Enum):
class NavigateMode (line 4404) | class NavigateMode(_Enum):
class PlaybackMode (line 4434) | class PlaybackMode(_Enum):
class Position (line 4455) | class Position(_Enum):
class State (line 4497) | class State(_Enum):
class TeletextKey (line 4539) | class TeletextKey(_Enum):
class TrackType (line 4567) | class TrackType(_Enum):
class VideoAdjustOption (line 4591) | class VideoAdjustOption(_Enum):
class VideoLogoOption (line 4621) | class VideoLogoOption(_Enum):
class VideoMarqueeOption (line 4657) | class VideoMarqueeOption(_Enum):
class VideoOrient (line 4699) | class VideoOrient(_Enum):
class VideoProjection (line 4735) | class VideoProjection(_Enum):
class ModuleDescription (line 4759) | class ModuleDescription(_Cstruct):
class RdDescription (line 4774) | class RdDescription(_Cstruct):
class MediaStats (line 4789) | class MediaStats(_Cstruct):
class MediaTrackInfo (line 4812) | class MediaTrackInfo(_Cstruct):
class U (line 4813) | class U(ctypes.Union):
class Audio (line 4814) | class Audio(_Cstruct):
class Video (line 4822) | class Video(_Cstruct):
class AudioTrack (line 4850) | class AudioTrack(_Cstruct):
class VideoViewpoint (line 4860) | class VideoViewpoint(_Cstruct):
class VideoTrack (line 4877) | class VideoTrack(_Cstruct):
class SubtitleTrack (line 4894) | class SubtitleTrack(_Cstruct):
class MediaTrack (line 4901) | class MediaTrack(_Cstruct):
class MediaSlave (line 4921) | class MediaSlave(_Cstruct):
class TrackDescription (line 4936) | class TrackDescription(_Cstruct):
class TitleDescription (line 4951) | class TitleDescription(_Cstruct):
class ChapterDescription (line 4962) | class ChapterDescription(_Cstruct):
class AudioOutput (line 4975) | class AudioOutput(_Cstruct):
class AudioOutputDevice (line 4990) | class AudioOutputDevice(_Cstruct):
class MediaDiscovererDescription (line 5003) | class MediaDiscovererDescription(_Cstruct):
class Event (line 5018) | class Event(_Cstruct):
class U (line 5021) | class U(ctypes.Union):
class MediaMetaChanged (line 5024) | class MediaMetaChanged(_Cstruct):
class MediaSubitemAdded (line 5029) | class MediaSubitemAdded(_Cstruct):
class MediaDurationChanged (line 5034) | class MediaDurationChanged(_Cstruct):
class MediaParsedChanged (line 5039) | class MediaParsedChanged(_Cstruct):
class MediaFreed (line 5044) | class MediaFreed(_Cstruct):
class MediaStateChanged (line 5049) | class MediaStateChanged(_Cstruct):
class MediaSubitemtreeAdded (line 5054) | class MediaSubitemtreeAdded(_Cstruct):
class MediaPlayerBuffering (line 5059) | class MediaPlayerBuffering(_Cstruct):
class MediaPlayerChapterChanged (line 5064) | class MediaPlayerChapterChanged(_Cstruct):
class MediaPlayerPositionChanged (line 5069) | class MediaPlayerPositionChanged(_Cstruct):
class MediaPlayerTimeChanged (line 5074) | class MediaPlayerTimeChanged(_Cstruct):
class MediaPlayerTitleChanged (line 5079) | class MediaPlayerTitleChanged(_Cstruct):
class MediaPlayerSeekableChanged (line 5084) | class MediaPlayerSeekableChanged(_Cstruct):
class MediaPlayerPausableChanged (line 5089) | class MediaPlayerPausableChanged(_Cstruct):
class MediaPlayerScrambledChanged (line 5094) | class MediaPlayerScrambledChanged(_Cstruct):
class MediaPlayerVout (line 5099) | class MediaPlayerVout(_Cstruct):
class MediaListItemAdded (line 5104) | class MediaListItemAdded(_Cstruct):
class MediaListWillAddItem (line 5109) | class MediaListWillAddItem(_Cstruct):
class MediaListItemDeleted (line 5114) | class MediaListItemDeleted(_Cstruct):
class MediaListWillDeleteItem (line 5119) | class MediaListWillDeleteItem(_Cstruct):
class MediaListPlayerNextItemSet (line 5124) | class MediaListPlayerNextItemSet(_Cstruct):
class MediaPlayerSnapshotTaken (line 5129) | class MediaPlayerSnapshotTaken(_Cstruct):
class MediaPlayerLengthChanged (line 5134) | class MediaPlayerLengthChanged(_Cstruct):
class VlmMediaEvent (line 5139) | class VlmMediaEvent(_Cstruct):
class MediaPlayerMediaChanged (line 5147) | class MediaPlayerMediaChanged(_Cstruct):
class MediaPlayerEsChanged (line 5152) | class MediaPlayerEsChanged(_Cstruct):
class MediaPlayerAudioVolume (line 5160) | class MediaPlayerAudioVolume(_Cstruct):
class MediaPlayerAudioDevice (line 5165) | class MediaPlayerAudioDevice(_Cstruct):
class RendererDiscovererItemAdded (line 5170) | class RendererDiscovererItemAdded(_Cstruct):
class RendererDiscovererItemDeleted (line 5175) | class RendererDiscovererItemDeleted(_Cstruct):
class EventUnion (line 5218) | class EventUnion(ctypes.Union):
class DialogCbs (line 5250) | class DialogCbs(_Cstruct):
class LogMessage (line 5377) | class LogMessage(_Cstruct):
class AudioCleanupCb (line 5393) | class AudioCleanupCb(ctypes.c_void_p):
class AudioDrainCb (line 5404) | class AudioDrainCb(ctypes.c_void_p):
class AudioFlushCb (line 5417) | class AudioFlushCb(ctypes.c_void_p):
class AudioPauseCb (line 5430) | class AudioPauseCb(ctypes.c_void_p):
class AudioPlayCb (line 5444) | class AudioPlayCb(ctypes.c_void_p):
class AudioResumeCb (line 5471) | class AudioResumeCb(ctypes.c_void_p):
class AudioSetVolumeCb (line 5486) | class AudioSetVolumeCb(ctypes.c_void_p):
class AudioSetupCb (line 5497) | class AudioSetupCb(ctypes.c_void_p):
class Callback (line 5514) | class Callback(ctypes.c_void_p):
class LogCb (line 5523) | class LogCb(ctypes.c_void_p):
class MediaCloseCb (line 5541) | class MediaCloseCb(ctypes.c_void_p):
class MediaOpenCb (line 5551) | class MediaOpenCb(ctypes.c_void_p):
class MediaReadCb (line 5573) | class MediaReadCb(ctypes.c_void_p):
class MediaSeekCb (line 5593) | class MediaSeekCb(ctypes.c_void_p):
class VideoCleanupCb (line 5606) | class VideoCleanupCb(ctypes.c_void_p):
class VideoDisplayCb (line 5616) | class VideoDisplayCb(ctypes.c_void_p):
class VideoFormatCb (line 5630) | class VideoFormatCb(ctypes.c_void_p):
class VideoLockCb (line 5661) | class VideoLockCb(ctypes.c_void_p):
class VideoUnlockCb (line 5680) | class VideoUnlockCb(ctypes.c_void_p):
class CallbackDecorators (line 5700) | class CallbackDecorators(object):
function libvlc_add_intf (line 5974) | def libvlc_add_intf(p_instance, name):
function libvlc_audio_equalizer_get_amp_at_index (line 5996) | def libvlc_audio_equalizer_get_amp_at_index(p_equalizer, u_band):
function libvlc_audio_equalizer_get_band_count (line 6019) | def libvlc_audio_equalizer_get_band_count():
function libvlc_audio_equalizer_get_band_frequency (line 6031) | def libvlc_audio_equalizer_get_band_frequency(u_index):
function libvlc_audio_equalizer_get_preamp (line 6054) | def libvlc_audio_equalizer_get_preamp(p_equalizer):
function libvlc_audio_equalizer_get_preset_count (line 6072) | def libvlc_audio_equalizer_get_preset_count():
function libvlc_audio_equalizer_get_preset_name (line 6084) | def libvlc_audio_equalizer_get_preset_name(u_index):
function libvlc_audio_equalizer_new (line 6105) | def libvlc_audio_equalizer_new():
function libvlc_audio_equalizer_new_from_preset (line 6123) | def libvlc_audio_equalizer_new_from_preset(u_index):
function libvlc_audio_equalizer_release (line 6148) | def libvlc_audio_equalizer_release(p_equalizer):
function libvlc_audio_equalizer_set_amp_at_index (line 6166) | def libvlc_audio_equalizer_set_amp_at_index(p_equalizer, f_amp, u_band):
function libvlc_audio_equalizer_set_preamp (line 6197) | def libvlc_audio_equalizer_set_preamp(p_equalizer, f_preamp):
function libvlc_audio_filter_list_get (line 6225) | def libvlc_audio_filter_list_get(p_instance):
function libvlc_audio_get_channel (line 6246) | def libvlc_audio_get_channel(p_mi):
function libvlc_audio_get_delay (line 6259) | def libvlc_audio_get_delay(p_mi):
function libvlc_audio_get_mute (line 6273) | def libvlc_audio_get_mute(p_mi):
function libvlc_audio_get_track (line 6286) | def libvlc_audio_get_track(p_mi):
function libvlc_audio_get_track_count (line 6299) | def libvlc_audio_get_track_count(p_mi):
function libvlc_audio_get_track_description (line 6312) | def libvlc_audio_get_track_description(p_mi):
function libvlc_audio_get_volume (line 6330) | def libvlc_audio_get_volume(p_mi):
function libvlc_audio_output_device_count (line 6344) | def libvlc_audio_output_device_count(p_instance, psz_audio_output):
function libvlc_audio_output_device_enum (line 6365) | def libvlc_audio_output_device_enum(mp):
function libvlc_audio_output_device_get (line 6394) | def libvlc_audio_output_device_get(mp):
function libvlc_audio_output_device_id (line 6427) | def libvlc_audio_output_device_id(p_instance, psz_audio_output, i_device):
function libvlc_audio_output_device_list_get (line 6450) | def libvlc_audio_output_device_list_get(p_instance, aout):
function libvlc_audio_output_device_list_release (line 6486) | def libvlc_audio_output_device_list_release(p_list):
function libvlc_audio_output_device_longname (line 6503) | def libvlc_audio_output_device_longname(p_instance, psz_output, i_device):
function libvlc_audio_output_device_set (line 6526) | def libvlc_audio_output_device_set(mp, module, device_id):
function libvlc_audio_output_get_device_type (line 6580) | def libvlc_audio_output_get_device_type(p_mi):
function libvlc_audio_output_list_get (line 6591) | def libvlc_audio_output_list_get(p_instance):
function libvlc_audio_output_list_release (line 6610) | def libvlc_audio_output_list_release(p_list):
function libvlc_audio_output_set (line 6625) | def libvlc_audio_output_set(p_mi, psz_name):
function libvlc_audio_output_set_device_type (line 6651) | def libvlc_audio_output_set_device_type(p_mp, device_type):
function libvlc_audio_set_callbacks (line 6667) | def libvlc_audio_set_callbacks(mp, play, pause, resume, flush, drain, op...
function libvlc_audio_set_channel (line 6710) | def libvlc_audio_set_channel(p_mi, channel):
function libvlc_audio_set_delay (line 6732) | def libvlc_audio_set_delay(p_mi, i_delay):
function libvlc_audio_set_format (line 6755) | def libvlc_audio_set_format(mp, format, rate, channels):
function libvlc_audio_set_format_callbacks (line 6787) | def libvlc_audio_set_format_callbacks(mp, setup, cleanup):
function libvlc_audio_set_mute (line 6814) | def libvlc_audio_set_mute(p_mi, status):
function libvlc_audio_set_track (line 6842) | def libvlc_audio_set_track(p_mi, i_track):
function libvlc_audio_set_volume (line 6864) | def libvlc_audio_set_volume(p_mi, i_volume):
function libvlc_audio_set_volume_callback (line 6886) | def libvlc_audio_set_volume_callback(mp, set_volume):
function libvlc_audio_toggle_mute (line 6912) | def libvlc_audio_toggle_mute(p_mi):
function libvlc_chapter_descriptions_release (line 6928) | def libvlc_chapter_descriptions_release(p_chapters, i_count):
function libvlc_clearerr (line 6950) | def libvlc_clearerr():
function libvlc_clock (line 6961) | def libvlc_clock():
function libvlc_dialog_dismiss (line 6976) | def libvlc_dialog_dismiss(p_id):
function libvlc_dialog_get_context (line 6994) | def libvlc_dialog_get_context(p_id):
function libvlc_dialog_post_action (line 7005) | def libvlc_dialog_post_action(p_id, i_action):
function libvlc_dialog_post_login (line 7032) | def libvlc_dialog_post_login(p_id, psz_username, psz_password, b_store):
function libvlc_dialog_set_callbacks (line 7065) | def libvlc_dialog_set_callbacks(p_instance, p_cbs, p_data):
function libvlc_dialog_set_context (line 7089) | def libvlc_dialog_set_context(p_id, p_context):
function libvlc_errmsg (line 7108) | def libvlc_errmsg():
function libvlc_event_attach (line 7122) | def libvlc_event_attach(p_event_manager, i_event_type, f_callback, user_...
function libvlc_event_detach (line 7152) | def libvlc_event_detach(p_event_manager, i_event_type, f_callback, p_use...
function libvlc_event_type_name (line 7178) | def libvlc_event_type_name(event_type):
function libvlc_free (line 7189) | def libvlc_free(ptr):
function libvlc_get_changeset (line 7202) | def libvlc_get_changeset():
function libvlc_get_compiler (line 7215) | def libvlc_get_compiler():
function libvlc_get_fullscreen (line 7228) | def libvlc_get_fullscreen(p_mi):
function libvlc_get_log_verbosity (line 7241) | def libvlc_get_log_verbosity(p_instance):
function libvlc_get_version (line 7255) | def libvlc_get_version():
function libvlc_log_clear (line 7268) | def libvlc_log_clear(p_log):
function libvlc_log_close (line 7280) | def libvlc_log_close(p_log):
function libvlc_log_count (line 7291) | def libvlc_log_count(p_log):
function libvlc_log_get_context (line 7305) | def libvlc_log_get_context(ctx, module, file):
function libvlc_log_get_iterator (line 7345) | def libvlc_log_get_iterator(p_log):
function libvlc_log_get_object (line 7363) | def libvlc_log_get_object(ctx, name, header, id):
function libvlc_log_iterator_free (line 7408) | def libvlc_log_iterator_free(p_iter):
function libvlc_log_iterator_has_next (line 7419) | def libvlc_log_iterator_has_next(p_iter):
function libvlc_log_iterator_next (line 7433) | def libvlc_log_iterator_next(p_iter, p_buf):
function libvlc_log_open (line 7456) | def libvlc_log_open(p_instance):
function libvlc_log_set (line 7470) | def libvlc_log_set(p_instance, cb, data):
function libvlc_log_set_file (line 7504) | def libvlc_log_set_file(p_instance, stream):
function libvlc_log_unset (line 7527) | def libvlc_log_unset(p_instance):
function libvlc_media_add_option (line 7547) | def libvlc_media_add_option(p_md, psz_options):
function libvlc_media_add_option_flag (line 7579) | def libvlc_media_add_option_flag(p_md, psz_options, i_flags):
function libvlc_media_discoverer_event_manager (line 7612) | def libvlc_media_discoverer_event_manager(p_mdis):
function libvlc_media_discoverer_is_running (line 7633) | def libvlc_media_discoverer_is_running(p_mdis):
function libvlc_media_discoverer_list_get (line 7650) | def libvlc_media_discoverer_list_get(p_inst, i_cat, ppp_services):
function libvlc_media_discoverer_list_release (line 7678) | def libvlc_media_discoverer_list_release(pp_services, i_count):
function libvlc_media_discoverer_localized_name (line 7702) | def libvlc_media_discoverer_localized_name(p_mdis):
function libvlc_media_discoverer_media_list (line 7723) | def libvlc_media_discoverer_media_list(p_mdis):
function libvlc_media_discoverer_new (line 7740) | def libvlc_media_discoverer_new(p_inst, psz_name):
function libvlc_media_discoverer_new_from_name (line 7774) | def libvlc_media_discoverer_new_from_name(p_inst, psz_name):
function libvlc_media_discoverer_release (line 7790) | def libvlc_media_discoverer_release(p_mdis):
function libvlc_media_discoverer_start (line 7802) | def libvlc_media_discoverer_start(p_mdis):
function libvlc_media_discoverer_stop (line 7821) | def libvlc_media_discoverer_stop(p_mdis):
function libvlc_media_duplicate (line 7836) | def libvlc_media_duplicate(p_md):
function libvlc_media_event_manager (line 7847) | def libvlc_media_event_manager(p_md):
function libvlc_media_get_codec_description (line 7865) | def libvlc_media_get_codec_description(i_type, i_codec):
function libvlc_media_get_duration (line 7890) | def libvlc_media_get_duration(p_md):
function libvlc_media_get_meta (line 7903) | def libvlc_media_get_meta(p_md, e_meta):
function libvlc_media_get_mrl (line 7931) | def libvlc_media_get_mrl(p_md):
function libvlc_media_get_parsed_status (line 7944) | def libvlc_media_get_parsed_status(p_md):
function libvlc_media_get_state (line 7961) | def libvlc_media_get_state(p_md):
function libvlc_media_get_stats (line 7978) | def libvlc_media_get_stats(p_md, p_stats):
function libvlc_media_get_tracks_info (line 8001) | def libvlc_media_get_tracks_info(p_md):
function libvlc_media_get_type (line 8031) | def libvlc_media_get_type(p_md):
function libvlc_media_get_user_data (line 8047) | def libvlc_media_get_user_data(p_md):
function libvlc_media_is_parsed (line 8060) | def libvlc_media_is_parsed(p_md):
function libvlc_media_library_load (line 8079) | def libvlc_media_library_load(p_mlib):
function libvlc_media_library_media_list (line 8092) | def libvlc_media_library_media_list(p_mlib):
function libvlc_media_library_new (line 8109) | def libvlc_media_library_new(p_instance):
function libvlc_media_library_release (line 8126) | def libvlc_media_library_release(p_mlib):
function libvlc_media_library_retain (line 8139) | def libvlc_media_library_retain(p_mlib):
function libvlc_media_list_add_media (line 8152) | def libvlc_media_list_add_media(p_ml, p_md):
function libvlc_media_list_count (line 8175) | def libvlc_media_list_count(p_ml):
function libvlc_media_list_event_manager (line 8189) | def libvlc_media_list_event_manager(p_ml):
function libvlc_media_list_index_of_item (line 8207) | def libvlc_media_list_index_of_item(p_ml, p_md):
function libvlc_media_list_insert_media (line 8231) | def libvlc_media_list_insert_media(p_ml, p_md, i_pos):
function libvlc_media_list_is_readonly (line 8257) | def libvlc_media_list_is_readonly(p_ml):
function libvlc_media_list_item_at_index (line 8270) | def libvlc_media_list_item_at_index(p_ml, i_pos):
function libvlc_media_list_lock (line 8295) | def libvlc_media_list_lock(p_ml):
function libvlc_media_list_media (line 8306) | def libvlc_media_list_media(p_ml):
function libvlc_media_list_new (line 8325) | def libvlc_media_list_new(p_instance):
function libvlc_media_list_player_event_manager (line 8342) | def libvlc_media_list_player_event_manager(p_mlp):
function libvlc_media_list_player_get_media_player (line 8359) | def libvlc_media_list_player_get_media_player(p_mlp):
function libvlc_media_list_player_get_state (line 8381) | def libvlc_media_list_player_get_state(p_mlp):
function libvlc_media_list_player_is_playing (line 8394) | def libvlc_media_list_player_is_playing(p_mlp):
function libvlc_media_list_player_new (line 8411) | def libvlc_media_list_player_new(p_instance):
function libvlc_media_list_player_next (line 8428) | def libvlc_media_list_player_next(p_mlp):
function libvlc_media_list_player_pause (line 8441) | def libvlc_media_list_player_pause(p_mlp):
function libvlc_media_list_player_play (line 8452) | def libvlc_media_list_player_play(p_mlp):
function libvlc_media_list_player_play_item (line 8463) | def libvlc_media_list_player_play_item(p_mlp, p_md):
function libvlc_media_list_player_play_item_at_index (line 8485) | def libvlc_media_list_player_play_item_at_index(p_mlp, i_index):
function libvlc_media_list_player_previous (line 8509) | def libvlc_media_list_player_previous(p_mlp):
function libvlc_media_list_player_release (line 8526) | def libvlc_media_list_player_release(p_mlp):
function libvlc_media_list_player_retain (line 8541) | def libvlc_media_list_player_retain(p_mlp):
function libvlc_media_list_player_set_media_list (line 8553) | def libvlc_media_list_player_set_media_list(p_mlp, p_mlist):
function libvlc_media_list_player_set_media_player (line 8573) | def libvlc_media_list_player_set_media_player(p_mlp, p_mi):
function libvlc_media_list_player_set_pause (line 8595) | def libvlc_media_list_player_set_pause(p_mlp, do_pause):
function libvlc_media_list_player_set_playback_mode (line 8617) | def libvlc_media_list_player_set_playback_mode(p_mlp, e_mode):
function libvlc_media_list_player_stop (line 8639) | def libvlc_media_list_player_stop(p_mlp):
function libvlc_media_list_release (line 8650) | def libvlc_media_list_release(p_ml):
function libvlc_media_list_remove_index (line 8661) | def libvlc_media_list_remove_index(p_ml, i_pos):
function libvlc_media_list_retain (line 8684) | def libvlc_media_list_retain(p_ml):
function libvlc_media_list_set_media (line 8695) | def libvlc_media_list_set_media(p_ml, p_md):
function libvlc_media_list_unlock (line 8717) | def libvlc_media_list_unlock(p_ml):
function libvlc_media_new_as_node (line 8729) | def libvlc_media_new_as_node(p_instance, psz_name):
function libvlc_media_new_callbacks (line 8753) | def libvlc_media_new_callbacks(instance, open_cb, read_cb, seek_cb, clos...
function libvlc_media_new_fd (line 8801) | def libvlc_media_new_fd(p_instance, fd):
function libvlc_media_new_location (line 8839) | def libvlc_media_new_location(p_instance, psz_mrl):
function libvlc_media_new_path (line 8869) | def libvlc_media_new_path(p_instance, path):
function libvlc_media_parse (line 8893) | def libvlc_media_parse(p_md):
function libvlc_media_parse_async (line 8915) | def libvlc_media_parse_async(p_md):
function libvlc_media_parse_stop (line 8943) | def libvlc_media_parse_stop(p_md):
function libvlc_media_parse_with_options (line 8961) | def libvlc_media_parse_with_options(p_md, parse_flag, timeout):
function libvlc_media_player_add_slave (line 9008) | def libvlc_media_player_add_slave(p_mi, i_type, psz_uri, b_select):
function libvlc_media_player_can_pause (line 9042) | def libvlc_media_player_can_pause(p_mi):
function libvlc_media_player_event_manager (line 9055) | def libvlc_media_player_event_manager(p_mi):
function libvlc_media_player_get_agl (line 9072) | def libvlc_media_player_get_agl(p_mi):
function libvlc_media_player_get_chapter (line 9080) | def libvlc_media_player_get_chapter(p_mi):
function libvlc_media_player_get_chapter_count (line 9093) | def libvlc_media_player_get_chapter_count(p_mi):
function libvlc_media_player_get_chapter_count_for_title (line 9110) | def libvlc_media_player_get_chapter_count_for_title(p_mi, i_title):
function libvlc_media_player_get_fps (line 9134) | def libvlc_media_player_get_fps(p_mi):
function libvlc_media_player_get_full_chapter_descriptions (line 9154) | def libvlc_media_player_get_full_chapter_descriptions(
function libvlc_media_player_get_full_title_descriptions (line 9186) | def libvlc_media_player_get_full_title_descriptions(p_mi, titles):
function libvlc_media_player_get_hwnd (line 9213) | def libvlc_media_player_get_hwnd(p_mi):
function libvlc_media_player_get_length (line 9228) | def libvlc_media_player_get_length(p_mi):
function libvlc_media_player_get_media (line 9241) | def libvlc_media_player_get_media(p_mi):
function libvlc_media_player_get_nsobject (line 9259) | def libvlc_media_player_get_nsobject(p_mi):
function libvlc_media_player_get_position (line 9272) | def libvlc_media_player_get_position(p_mi):
function libvlc_media_player_get_rate (line 9285) | def libvlc_media_player_get_rate(p_mi):
function libvlc_media_player_get_role (line 9300) | def libvlc_media_player_get_role(p_mi):
function libvlc_media_player_get_state (line 9314) | def libvlc_media_player_get_state(p_mi):
function libvlc_media_player_get_time (line 9327) | def libvlc_media_player_get_time(p_mi):
function libvlc_media_player_get_title (line 9340) | def libvlc_media_player_get_title(p_mi):
function libvlc_media_player_get_title_count (line 9353) | def libvlc_media_player_get_title_count(p_mi):
function libvlc_media_player_get_xwindow (line 9366) | def libvlc_media_player_get_xwindow(p_mi):
function libvlc_media_player_has_vout (line 9382) | def libvlc_media_player_has_vout(p_mi):
function libvlc_media_player_is_playing (line 9395) | def libvlc_media_player_is_playing(p_mi):
function libvlc_media_player_is_seekable (line 9408) | def libvlc_media_player_is_seekable(p_mi):
function libvlc_media_player_navigate (line 9421) | def libvlc_media_player_navigate(p_mi, navigate):
function libvlc_media_player_new (line 9443) | def libvlc_media_player_new(p_libvlc_instance):
function libvlc_media_player_new_from_media (line 9461) | def libvlc_media_player_new_from_media(p_md):
function libvlc_media_player_next_chapter (line 9479) | def libvlc_media_player_next_chapter(p_mi):
function libvlc_media_player_next_frame (line 9490) | def libvlc_media_player_next_frame(p_mi):
function libvlc_media_player_pause (line 9501) | def libvlc_media_player_pause(p_mi):
function libvlc_media_player_play (line 9512) | def libvlc_media_player_play(p_mi):
function libvlc_media_player_previous_chapter (line 9525) | def libvlc_media_player_previous_chapter(p_mi):
function libvlc_media_player_program_scrambled (line 9536) | def libvlc_media_player_program_scrambled(p_mi):
function libvlc_media_player_release (line 9555) | def libvlc_media_player_release(p_mi):
function libvlc_media_player_retain (line 9570) | def libvlc_media_player_retain(p_mi):
function libvlc_media_player_set_agl (line 9582) | def libvlc_media_player_set_agl(p_mi, drawable):
function libvlc_media_player_set_android_context (line 9598) | def libvlc_media_player_set_android_context(p_mi, p_awindow_handler):
function libvlc_media_player_set_chapter (line 9621) | def libvlc_media_player_set_chapter(p_mi, i_chapter):
function libvlc_media_player_set_equalizer (line 9641) | def libvlc_media_player_set_equalizer(p_mi, p_equalizer):
function libvlc_media_player_set_evas_object (line 9685) | def libvlc_media_player_set_evas_object(p_mi, p_evas_object):
function libvlc_media_player_set_hwnd (line 9708) | def libvlc_media_player_set_hwnd(p_mi, drawable):
function libvlc_media_player_set_media (line 9732) | def libvlc_media_player_set_media(p_mi, p_md):
function libvlc_media_player_set_nsobject (line 9754) | def libvlc_media_player_set_nsobject(p_mi, drawable):
function libvlc_media_player_set_pause (line 9802) | def libvlc_media_player_set_pause(mp, do_pause):
function libvlc_media_player_set_position (line 9824) | def libvlc_media_player_set_position(p_mi, f_pos):
function libvlc_media_player_set_rate (line 9846) | def libvlc_media_player_set_rate(p_mi, rate):
function libvlc_media_player_set_renderer (line 9869) | def libvlc_media_player_set_renderer(p_mi, p_item):
function libvlc_media_player_set_role (line 9897) | def libvlc_media_player_set_role(p_mi, role):
function libvlc_media_player_set_time (line 9919) | def libvlc_media_player_set_time(p_mi, i_time):
function libvlc_media_player_set_title (line 9940) | def libvlc_media_player_set_title(p_mi, i_title):
function libvlc_media_player_set_video_title_display (line 9960) | def libvlc_media_player_set_video_title_display(p_mi, position, timeout):
function libvlc_media_player_set_xwindow (line 9987) | def libvlc_media_player_set_xwindow(p_mi, drawable):
function libvlc_media_player_stop (line 10041) | def libvlc_media_player_stop(p_mi):
function libvlc_media_player_will_play (line 10052) | def libvlc_media_player_will_play(p_mi):
function libvlc_media_release (line 10065) | def libvlc_media_release(p_md):
function libvlc_media_retain (line 10080) | def libvlc_media_retain(p_md):
function libvlc_media_save_meta (line 10093) | def libvlc_media_save_meta(p_md):
function libvlc_media_set_meta (line 10106) | def libvlc_media_set_meta(p_md, e_meta, psz_value):
function libvlc_media_set_user_data (line 10130) | def libvlc_media_set_user_data(p_md, p_new_user_data):
function libvlc_media_slaves_add (line 10152) | def libvlc_media_slaves_add(p_md, i_type, i_priority, psz_uri):
function libvlc_media_slaves_clear (line 10188) | def libvlc_media_slaves_clear(p_md):
function libvlc_media_slaves_get (line 10202) | def libvlc_media_slaves_get(p_md, ppp_slaves):
function libvlc_media_slaves_release (line 10232) | def libvlc_media_slaves_release(pp_slaves, i_count):
function libvlc_media_subitems (line 10254) | def libvlc_media_subitems(p_md):
function libvlc_media_tracks_get (line 10273) | def libvlc_media_tracks_get(p_md, tracks):
function libvlc_media_tracks_release (line 10302) | def libvlc_media_tracks_release(p_tracks, i_count):
function libvlc_module_description_list_release (line 10324) | def libvlc_module_description_list_release(p_list):
function libvlc_new (line 10339) | def libvlc_new(argc, argv):
function libvlc_playlist_play (line 10417) | def libvlc_playlist_play(p_instance, i_id, i_options, ppsz_options):
function libvlc_printerr (line 10448) | def libvlc_printerr(fmt):
function libvlc_release (line 10463) | def libvlc_release(p_instance):
function libvlc_renderer_discoverer_event_manager (line 10475) | def libvlc_renderer_discoverer_event_manager(p_rd):
function libvlc_renderer_discoverer_list_get (line 10501) | def libvlc_renderer_discoverer_list_get(p_inst, ppp_services):
function libvlc_renderer_discoverer_list_release (line 10528) | def libvlc_renderer_discoverer_list_release(pp_services, i_count):
function libvlc_renderer_discoverer_new (line 10552) | def libvlc_renderer_discoverer_new(p_inst, psz_name):
function libvlc_renderer_discoverer_release (line 10585) | def libvlc_renderer_discoverer_release(p_rd):
function libvlc_renderer_discoverer_start (line 10598) | def libvlc_renderer_discoverer_start(p_rd):
function libvlc_renderer_discoverer_stop (line 10621) | def libvlc_renderer_discoverer_stop(p_rd):
function libvlc_renderer_item_flags (line 10636) | def libvlc_renderer_item_flags(p_item):
function libvlc_renderer_item_hold (line 10651) | def libvlc_renderer_item_hold(p_item):
function libvlc_renderer_item_icon_uri (line 10671) | def libvlc_renderer_item_icon_uri(p_item):
function libvlc_renderer_item_name (line 10683) | def libvlc_renderer_item_name(p_item):
function libvlc_renderer_item_release (line 10695) | def libvlc_renderer_item_release(p_item):
function libvlc_renderer_item_type (line 10706) | def libvlc_renderer_item_type(p_item):
function libvlc_retain (line 10719) | def libvlc_retain(p_instance):
function libvlc_set_app_id (line 10731) | def libvlc_set_app_id(p_instance, id, version, icon):
function libvlc_set_exit_handler (line 10763) | def libvlc_set_exit_handler(p_instance, cb, opaque):
function libvlc_set_fullscreen (line 10797) | def libvlc_set_fullscreen(p_mi, b_fullscreen):
function libvlc_set_log_verbosity (line 10824) | def libvlc_set_log_verbosity(p_instance, level):
function libvlc_set_user_agent (line 10845) | def libvlc_set_user_agent(p_instance, name, http):
function libvlc_title_descriptions_release (line 10871) | def libvlc_title_descriptions_release(p_titles, i_count):
function libvlc_toggle_fullscreen (line 10893) | def libvlc_toggle_fullscreen(p_mi):
function libvlc_toggle_teletext (line 10907) | def libvlc_toggle_teletext(p_mi):
function libvlc_track_description_list_release (line 10920) | def libvlc_track_description_list_release(p_track_description):
function libvlc_track_description_release (line 10935) | def libvlc_track_description_release(p_track_description):
function libvlc_video_filter_list_get (line 10947) | def libvlc_video_filter_list_get(p_instance):
function libvlc_video_get_adjust_float (line 10968) | def libvlc_video_get_adjust_float(p_mi, option):
function libvlc_video_get_adjust_int (line 10990) | def libvlc_video_get_adjust_int(p_mi, option):
function libvlc_video_get_aspect_ratio (line 11012) | def libvlc_video_get_aspect_ratio(p_mi):
function libvlc_video_get_chapter_description (line 11030) | def libvlc_video_get_chapter_description(p_mi, i_title):
function libvlc_video_get_crop_geometry (line 11053) | def libvlc_video_get_crop_geometry(p_mi):
function libvlc_video_get_cursor (line 11070) | def libvlc_video_get_cursor(p_mi, num):
function libvlc_video_get_height (line 11111) | def libvlc_video_get_height(p_mi):
function libvlc_video_get_logo_int (line 11126) | def libvlc_video_get_logo_int(p_mi, option):
function libvlc_video_get_marquee_int (line 11146) | def libvlc_video_get_marquee_int(p_mi, option):
function libvlc_video_get_marquee_string (line 11166) | def libvlc_video_get_marquee_string(p_mi, option):
function libvlc_video_get_scale (line 11186) | def libvlc_video_get_scale(p_mi):
function libvlc_video_get_size (line 11201) | def libvlc_video_get_size(p_mi, num):
function libvlc_video_get_spu (line 11229) | def libvlc_video_get_spu(p_mi):
function libvlc_video_get_spu_count (line 11242) | def libvlc_video_get_spu_count(p_mi):
function libvlc_video_get_spu_delay (line 11255) | def libvlc_video_get_spu_delay(p_mi):
function libvlc_video_get_spu_description (line 11270) | def libvlc_video_get_spu_description(p_mi):
function libvlc_video_get_teletext (line 11288) | def libvlc_video_get_teletext(p_mi):
function libvlc_video_get_title_description (line 11304) | def libvlc_video_get_title_description(p_mi):
function libvlc_video_get_track (line 11322) | def libvlc_video_get_track(p_mi):
function libvlc_video_get_track_count (line 11335) | def libvlc_video_get_track_count(p_mi):
function libvlc_video_get_track_description (line 11348) | def libvlc_video_get_track_description(p_mi):
function libvlc_video_get_width (line 11366) | def libvlc_video_get_width(p_mi):
function libvlc_video_new_viewpoint (line 11381) | def libvlc_video_new_viewpoint():
function libvlc_video_set_adjust_float (line 11394) | def libvlc_video_set_adjust_float(p_mi, option, value):
function libvlc_video_set_adjust_int (line 11420) | def libvlc_video_set_adjust_int(p_mi, option, value):
function libvlc_video_set_aspect_ratio (line 11448) | def libvlc_video_set_aspect_ratio(p_mi, psz_aspect):
function libvlc_video_set_callbacks (line 11471) | def libvlc_video_set_callbacks(mp, lock, unlock, display, opaque):
function libvlc_video_set_crop_geometry (line 11530) | def libvlc_video_set_crop_geometry(p_mi, psz_geometry):
function libvlc_video_set_deinterlace (line 11550) | def libvlc_video_set_deinterlace(p_mi, psz_mode):
function libvlc_video_set_format (line 11570) | def libvlc_video_set_format(mp, chroma, width, height, pitch):
function libvlc_video_set_format_callbacks (line 11607) | def libvlc_video_set_format_callbacks(mp, setup, cleanup):
function libvlc_video_set_key_input (line 11633) | def libvlc_video_set_key_input(p_mi, on):
function libvlc_video_set_logo_int (line 11662) | def libvlc_video_set_logo_int(p_mi, option, value):
function libvlc_video_set_logo_string (line 11688) | def libvlc_video_set_logo_string(p_mi, option, psz_value):
function libvlc_video_set_marquee_int (line 11712) | def libvlc_video_set_marquee_int(p_mi, option, i_val):
function libvlc_video_set_marquee_string (line 11738) | def libvlc_video_set_marquee_string(p_mi, option, psz_text):
function libvlc_video_set_mouse_input (line 11761) | def libvlc_video_set_mouse_input(p_mi, on):
function libvlc_video_set_scale (line 11787) | def libvlc_video_set_scale(p_mi, f_factor):
function libvlc_video_set_spu (line 11812) | def libvlc_video_set_spu(p_mi, i_spu):
function libvlc_video_set_spu_delay (line 11834) | def libvlc_video_set_spu_delay(p_mi, i_delay):
function libvlc_video_set_subtitle_file (line 11861) | def libvlc_video_set_subtitle_file(p_mi, psz_subtitle):
function libvlc_video_set_teletext (line 11885) | def libvlc_video_set_teletext(p_mi, i_page):
function libvlc_video_set_track (line 11909) | def libvlc_video_set_track(p_mi, i_track):
function libvlc_video_take_snapshot (line 11931) | def libvlc_video_take_snapshot(p_mi, num, psz_filepath, i_width, i_height):
function libvlc_video_update_viewpoint (line 11965) | def libvlc_video_update_viewpoint(p_mi, p_viewpoint, b_absolute):
function libvlc_vlm_add_broadcast (line 11997) | def libvlc_vlm_add_broadcast(
function libvlc_vlm_add_input (line 12055) | def libvlc_vlm_add_input(p_instance, psz_name, psz_input):
function libvlc_vlm_add_vod (line 12080) | def libvlc_vlm_add_vod(
function libvlc_vlm_change_media (line 12121) | def libvlc_vlm_change_media(
function libvlc_vlm_del_media (line 12180) | def libvlc_vlm_del_media(p_instance, psz_name):
function libvlc_vlm_get_event_manager (line 12202) | def libvlc_vlm_get_event_manager(p_instance):
function libvlc_vlm_get_media_instance_length (line 12220) | def libvlc_vlm_get_media_instance_length(p_instance, psz_name, i_instance):
function libvlc_vlm_get_media_instance_position (line 12245) | def libvlc_vlm_get_media_instance_position(p_instance, psz_name, i_insta...
function libvlc_vlm_get_media_instance_rate (line 12270) | def libvlc_vlm_get_media_instance_rate(p_instance, psz_name, i_instance):
function libvlc_vlm_get_media_instance_time (line 12295) | def libvlc_vlm_get_media_instance_time(p_instance, psz_name, i_instance):
function libvlc_vlm_pause_media (line 12320) | def libvlc_vlm_pause_media(p_instance, psz_name):
function libvlc_vlm_play_media (line 12342) | def libvlc_vlm_play_media(p_instance, psz_name):
function libvlc_vlm_release (line 12364) | def libvlc_vlm_release(p_instance):
function libvlc_vlm_seek_media (line 12375) | def libvlc_vlm_seek_media(p_instance, psz_name, f_percentage):
function libvlc_vlm_set_enabled (line 12400) | def libvlc_vlm_set_enabled(p_instance, psz_name, b_enabled):
function libvlc_vlm_set_input (line 12425) | def libvlc_vlm_set_input(p_instance, psz_name, psz_input):
function libvlc_vlm_set_loop (line 12451) | def libvlc_vlm_set_loop(p_instance, psz_name, b_loop):
function libvlc_vlm_set_mux (line 12476) | def libvlc_vlm_set_mux(p_instance, psz_name, psz_mux):
function libvlc_vlm_set_output (line 12501) | def libvlc_vlm_set_output(p_instance, psz_name, psz_output):
function libvlc_vlm_show_media (line 12526) | def libvlc_vlm_show_media(p_instance, psz_name):
function libvlc_vlm_stop_media (line 12557) | def libvlc_vlm_stop_media(p_instance, psz_name):
function libvlc_vprinterr (line 12579) | def libvlc_vprinterr(fmt, ap):
function libvlc_wait (line 12602) | def libvlc_wait(p_instance):
function callbackmethod (line 12703) | def callbackmethod(callback):
function libvlc_free (line 12722) | def libvlc_free(p):
function _dot2int (line 12731) | def _dot2int(v):
function hex_version (line 12749) | def hex_version():
function libvlc_hex_version (line 12757) | def libvlc_hex_version():
function debug_callback (line 12765) | def debug_callback(event, *args, **kwds):
function print_python (line 12775) | def print_python():
function print_version (line 12799) | def print_version():
function getch (line 12822) | def getch(): # getchar(), getc(stdin) #PYCHOK flake
function end_callback (line 12832) | def end_callback(event):
function pos_callback (line 12838) | def pos_callback(event, player):
function mspf (line 12914) | def mspf():
function print_info (line 12918) | def print_info():
function sec_forward (line 12940) | def sec_forward():
function sec_backward (line 12944) | def sec_backward():
function frame_forward (line 12948) | def frame_forward():
function frame_backward (line 12952) | def frame_backward():
function print_help (line 12956) | def print_help():
function quit_app (line 12964) | def quit_app():
function toggle_echo_position (line 12968) | def toggle_echo_position():
FILE: generated/dev/vlc.py
function str_to_bytes (line 72) | def str_to_bytes(s):
function bytes_to_str (line 79) | def bytes_to_str(b):
function len_args (line 86) | def len_args(func):
function str_to_bytes (line 97) | def str_to_bytes(s):
function bytes_to_str (line 104) | def bytes_to_str(b):
function len_args (line 111) | def len_args(func):
function find_lib (line 121) | def find_lib():
class VLCException (line 231) | class VLCException(Exception):
class memoize_parameterless (line 245) | class memoize_parameterless(object):
method __init__ (line 253) | def __init__(self, func):
method __call__ (line 257) | def __call__(self, obj):
method __repr__ (line 264) | def __repr__(self):
method __get__ (line 268) | def __get__(self, obj, objtype):
function get_default_instance (line 278) | def get_default_instance():
function try_fspath (line 286) | def try_fspath(path):
function _Cfunction (line 301) | def _Cfunction(name, flags, errcheck, *types):
function _Cobject (line 319) | def _Cobject(cls, ctype):
function _Constructor (line 326) | def _Constructor(cls, ptr=_internal_guard):
class _Cstruct (line 337) | class _Cstruct(ctypes.Structure):
method __str__ (line 342) | def __str__(self):
method __repr__ (line 346) | def __repr__(self):
class _Ctype (line 350) | class _Ctype(object):
method from_param (line 354) | def from_param(this): # not self
class ListPOINTER (line 361) | class ListPOINTER(object):
method __init__ (line 364) | def __init__(self, etype):
method from_param (line 367) | def from_param(self, param):
function string_result (line 375) | def string_result(result, func, arguments):
function class_result (line 389) | def class_result(classname):
class Log (line 401) | class Log(ctypes.Structure):
class MediaThumbnailRequest (line 409) | class MediaThumbnailRequest:
method __new__ (line 410) | def __new__(cls, *args):
class FILE (line 417) | class FILE(ctypes.Structure):
function module_description_list (line 455) | def module_description_list(head):
function track_description_list (line 468) | def track_description_list(head):
class _Enum (line 485) | class _Enum(ctypes.c_uint):
method __str__ (line 490) | def __str__(self):
method __hash__ (line 494) | def __hash__(self):
method __repr__ (line 497) | def __repr__(self):
method __eq__ (line 500) | def __eq__(self, other):
method __ne__ (line 505) | def __ne__(self, other):
class AudioEqualizer (line 510) | class AudioEqualizer(_Ctype):
method __new__ (line 521) | def __new__(cls, *args):
method get_amp_at_index (line 526) | def get_amp_at_index(self, u_band):
method get_preamp (line 536) | def get_preamp(self):
method release (line 544) | def release(self):
method set_amp_at_index (line 556) | def set_amp_at_index(self, f_amp, u_band):
method set_preamp (line 572) | def set_preamp(self, f_preamp):
class EventManager (line 588) | class EventManager(_Ctype):
method __new__ (line 610) | def __new__(cls, ptr=_internal_guard):
method event_attach (line 617) | def event_attach(self, eventtype, callback, *args, **kwds):
method event_detach (line 675) | def event_detach(self, eventtype):
class Instance (line 689) | class Instance(_Ctype):
method __new__ (line 698) | def __new__(cls, *args):
method media_player_new (line 728) | def media_player_new(self, uri=None):
method media_list_player_new (line 739) | def media_list_player_new(self):
method media_new (line 745) | def media_new(self, mrl, *options):
method media_new_path (line 777) | def media_new_path(self, path):
method media_list_new (line 787) | def media_list_new(self, mrls=None):
method audio_output_enumerate_devices (line 806) | def audio_output_enumerate_devices(self):
method audio_filter_list_get (line 822) | def audio_filter_list_get(self):
method video_filter_list_get (line 826) | def video_filter_list_get(self):
method add_intf (line 830) | def add_intf(self, name):
method audio_output_device_count (line 839) | def audio_output_device_count(self, psz_audio_output):
method audio_output_device_id (line 848) | def audio_output_device_id(self, psz_audio_output, i_device):
method audio_output_device_list_get (line 859) | def audio_output_device_list_get(self, aout):
method audio_output_device_longname (line 882) | def audio_output_device_longname(self, psz_output, i_device):
method audio_output_list_get (line 893) | def audio_output_list_get(self):
method dialog_set_callbacks (line 902) | def dialog_set_callbacks(self, p_cbs, p_data):
method get_log_verbosity (line 911) | def get_log_verbosity(self):
method log_open (line 919) | def log_open(self):
method log_set (line 927) | def log_set(self, cb, data):
method log_set_file (line 946) | def log_set_file(self, stream):
method log_unset (line 956) | def log_unset(self):
method media_discoverer_list_get (line 970) | def media_discoverer_list_get(self, i_cat, ppp_services):
method media_discoverer_new (line 983) | def media_discoverer_new(self, psz_name):
method media_discoverer_new_from_name (line 1004) | def media_discoverer_new_from_name(self, psz_name):
method media_library_new (line 1008) | def media_library_new(self):
method media_new_as_node (line 1015) | def media_new_as_node(self, psz_name):
method media_new_callbacks (line 1026) | def media_new_callbacks(self, open_cb, read_cb, seek_cb, close_cb, opa...
method media_new_fd (line 1055) | def media_new_fd(self, fd):
method media_new_location (line 1080) | def media_new_location(self, psz_mrl):
method playlist_play (line 1097) | def playlist_play(self, i_id, i_options, ppsz_options):
method release (line 1111) | def release(self):
method renderer_discoverer_list_get (line 1117) | def renderer_discoverer_list_get(self, ppp_services):
method renderer_discoverer_new (line 1131) | def renderer_discoverer_new(self, psz_name):
method retain (line 1151) | def retain(self):
method set_app_id (line 1157) | def set_app_id(self, id, version, icon):
method set_exit_handler (line 1171) | def set_exit_handler(self, cb, opaque):
method set_log_verbosity (line 1190) | def set_log_verbosity(self, level):
method set_user_agent (line 1198) | def set_user_agent(self, name, http):
method vlm_add_broadcast (line 1209) | def vlm_add_broadcast(
method vlm_add_input (line 1242) | def vlm_add_input(self, psz_name, psz_input):
method vlm_add_vod (line 1254) | def vlm_add_vod(
method vlm_change_media (line 1278) | def vlm_change_media(
method vlm_del_media (line 1312) | def vlm_del_media(self, psz_name):
method vlm_get_event_manager (line 1322) | def vlm_get_event_manager(self):
method vlm_get_media_instance_length (line 1330) | def vlm_get_media_instance_length(self, psz_name, i_instance):
method vlm_get_media_instance_position (line 1342) | def vlm_get_media_instance_position(self, psz_name, i_instance):
method vlm_get_media_instance_rate (line 1354) | def vlm_get_media_instance_rate(self, psz_name, i_instance):
method vlm_get_media_instance_time (line 1366) | def vlm_get_media_instance_time(self, psz_name, i_instance):
method vlm_pause_media (line 1378) | def vlm_pause_media(self, psz_name):
method vlm_play_media (line 1387) | def vlm_play_media(self, psz_name):
method vlm_release (line 1396) | def vlm_release(self):
method vlm_seek_media (line 1400) | def vlm_seek_media(self, psz_name, f_percentage):
method vlm_set_enabled (line 1410) | def vlm_set_enabled(self, psz_name, b_enabled):
method vlm_set_input (line 1420) | def vlm_set_input(self, psz_name, psz_input):
method vlm_set_loop (line 1433) | def vlm_set_loop(self, psz_name, b_loop):
method vlm_set_mux (line 1443) | def vlm_set_mux(self, psz_name, psz_mux):
method vlm_set_output (line 1453) | def vlm_set_output(self, psz_name, psz_output):
method vlm_show_media (line 1465) | def vlm_show_media(self, psz_name):
method vlm_stop_media (line 1483) | def vlm_stop_media(self, psz_name):
method wait (line 1492) | def wait(self):
class LogIterator (line 1502) | class LogIterator(_Ctype):
method __new__ (line 1505) | def __new__(cls, ptr=_internal_guard):
method __iter__ (line 1509) | def __iter__(self):
method next (line 1512) | def next(self):
method __next__ (line 1519) | def __next__(self):
method free (line 1522) | def free(self):
method has_next (line 1526) | def has_next(self):
class Media (line 1535) | class Media(_Ctype):
method __new__ (line 1546) | def __new__(cls, *args):
method get_instance (line 1557) | def get_instance(self):
method add_options (line 1560) | def add_options(self, *options):
method tracks_get (line 1576) | def tracks_get(self):
method add_option (line 1603) | def add_option(self, psz_options):
method add_option_flag (line 1622) | def add_option_flag(self, psz_options, i_flags):
method duplicate (line 1640) | def duplicate(self):
method event_manager (line 1645) | def event_manager(self):
method get_duration (line 1653) | def get_duration(self):
method get_meta (line 1660) | def get_meta(self, e_meta):
method get_mrl (line 1675) | def get_mrl(self):
method get_parsed_status (line 1682) | def get_parsed_status(self):
method get_state (line 1693) | def get_state(self):
method get_stats (line 1704) | def get_stats(self, p_stats):
method get_tracks_info (line 1714) | def get_tracks_info(self):
method get_type (line 1731) | def get_type(self):
method get_user_data (line 1741) | def get_user_data(self):
method is_parsed (line 1748) | def is_parsed(self):
method parse (line 1761) | def parse(self):
method parse_async (line 1777) | def parse_async(self):
method parse_stop (line 1799) | def parse_stop(self):
method parse_with_options (line 1811) | def parse_with_options(self, parse_flag, timeout):
method player_new_from_media (line 1843) | def player_new_from_media(self):
method release (line 1852) | def release(self):
method retain (line 1861) | def retain(self):
method save_meta (line 1868) | def save_meta(self):
method set_meta (line 1875) | def set_meta(self, e_meta, psz_value):
method set_user_data (line 1884) | def set_user_data(self, p_new_user_data):
method slaves_add (line 1893) | def slaves_add(self, i_type, i_priority, psz_uri):
method slaves_clear (line 1912) | def slaves_clear(self):
method slaves_get (line 1920) | def slaves_get(self, ppp_slaves):
method subitems (line 1937) | def subitems(self):
class MediaDiscoverer (line 1947) | class MediaDiscoverer(_Ctype):
method __new__ (line 1948) | def __new__(cls, ptr=_internal_guard):
method event_manager (line 1953) | def event_manager(self):
method is_running (line 1964) | def is_running(self):
method localized_name (line 1971) | def localized_name(self):
method media_list (line 1982) | def media_list(self):
method release (line 1989) | def release(self):
method start (line 1995) | def start(self):
method stop (line 2008) | def stop(self):
class MediaLibrary (line 2018) | class MediaLibrary(_Ctype):
method __new__ (line 2019) | def __new__(cls, ptr=_internal_guard):
method load (line 2023) | def load(self):
method media_list (line 2030) | def media_list(self):
method release (line 2037) | def release(self):
method retain (line 2044) | def retain(self):
class MediaList (line 2052) | class MediaList(_Ctype):
method __new__ (line 2063) | def __new__(cls, *args):
method get_instance (line 2074) | def get_instance(self):
method add_media (line 2077) | def add_media(self, mrl):
method count (line 2092) | def count(self):
method __len__ (line 2100) | def __len__(self):
method event_manager (line 2104) | def event_manager(self):
method index_of_item (line 2112) | def index_of_item(self, p_md):
method insert_media (line 2123) | def insert_media(self, p_md, i_pos):
method is_readonly (line 2134) | def is_readonly(self):
method item_at_index (line 2141) | def item_at_index(self, i_pos):
method __getitem__ (line 2153) | def __getitem__(self, i):
method __iter__ (line 2156) | def __iter__(self):
method lock (line 2160) | def lock(self):
method media (line 2164) | def media(self):
method release (line 2173) | def release(self):
method remove_index (line 2177) | def remove_index(self, i_pos):
method retain (line 2187) | def retain(self):
method set_media (line 2191) | def set_media(self, p_md):
method unlock (line 2200) | def unlock(self):
class MediaListPlayer (line 2207) | class MediaListPlayer(_Ctype):
method __new__ (line 2215) | def __new__(cls, arg=None):
method get_instance (line 2227) | def get_instance(self):
method event_manager (line 2232) | def event_manager(self):
method get_media_player (line 2239) | def get_media_player(self):
method get_state (line 2249) | def get_state(self):
method is_playing (line 2256) | def is_playing(self):
method next (line 2263) | def next(self):
method pause (line 2270) | def pause(self):
method play (line 2274) | def play(self):
method play_item (line 2278) | def play_item(self, p_md):
method play_item_at_index (line 2287) | def play_item_at_index(self, i_index):
method __getitem__ (line 2296) | def __getitem__(self, i):
method __iter__ (line 2299) | def __iter__(self):
method previous (line 2303) | def previous(self):
method release (line 2310) | def release(self):
method retain (line 2319) | def retain(self):
method set_media_list (line 2325) | def set_media_list(self, p_mlist):
method set_media_player (line 2332) | def set_media_player(self, p_mi):
method set_pause (line 2339) | def set_pause(self, do_pause):
method set_playback_mode (line 2348) | def set_playback_mode(self, e_mode):
method stop (line 2355) | def stop(self):
class MediaPlayer (line 2360) | class MediaPlayer(_Ctype):
method __new__ (line 2368) | def __new__(cls, *args):
method get_instance (line 2383) | def get_instance(self):
method set_mrl (line 2387) | def set_mrl(self, mrl, *options):
method video_get_spu_description (line 2404) | def video_get_spu_description(self):
method video_get_track_description (line 2408) | def video_get_track_description(self):
method audio_get_track_description (line 2412) | def audio_get_track_description(self):
method get_full_title_descriptions (line 2416) | def get_full_title_descriptions(self):
method get_full_chapter_descriptions (line 2438) | def get_full_chapter_descriptions(self, i_chapters_of_title):
method video_get_size (line 2462) | def video_get_size(self, num=0):
method set_hwnd (line 2473) | def set_hwnd(self, drawable):
method video_get_width (line 2486) | def video_get_width(self, num=0):
method video_get_height (line 2493) | def video_get_height(self, num=0):
method video_get_cursor (line 2500) | def video_get_cursor(self, num=0):
method audio_get_channel (line 2526) | def audio_get_channel(self):
method audio_get_delay (line 2533) | def audio_get_delay(self):
method audio_get_mute (line 2541) | def audio_get_mute(self):
method audio_get_track (line 2548) | def audio_get_track(self):
method audio_get_track_count (line 2555) | def audio_get_track_count(self):
method audio_get_volume (line 2562) | def audio_get_volume(self):
method audio_output_device_enum (line 2570) | def audio_output_device_enum(self):
method audio_output_device_get (line 2589) | def audio_output_device_get(self):
method audio_output_device_set (line 2612) | def audio_output_device_set(self, module, device_id):
method audio_output_get_device_type (line 2653) | def audio_output_get_device_type(self):
method audio_output_set (line 2660) | def audio_output_set(self, psz_name):
method audio_output_set_device_type (line 2673) | def audio_output_set_device_type(self, device_type):
method audio_set_callbacks (line 2677) | def audio_set_callbacks(self, play, pause, resume, flush, drain, opaque):
method audio_set_channel (line 2699) | def audio_set_channel(self, channel):
method audio_set_delay (line 2708) | def audio_set_delay(self, i_delay):
method audio_set_format (line 2718) | def audio_set_format(self, format, rate, channels):
method audio_set_format_callbacks (line 2733) | def audio_set_format_callbacks(self, setup, cleanup):
method audio_set_mute (line 2745) | def audio_set_mute(self, status):
method audio_set_track (line 2760) | def audio_set_track(self, i_track):
method audio_set_volume (line 2769) | def audio_set_volume(self, i_volume):
method audio_set_volume_callback (line 2778) | def audio_set_volume_callback(self, set_volume):
method audio_toggle_mute (line 2791) | def audio_toggle_mute(self):
method get_fullscreen (line 2801) | def get_fullscreen(self):
method add_slave (line 2808) | def add_slave(self, i_type, psz_uri, b_select):
method can_pause (line 2827) | def can_pause(self):
method event_manager (line 2835) | def event_manager(self):
method get_agl (line 2842) | def get_agl(self):
method get_chapter (line 2846) | def get_chapter(self):
method get_chapter_count (line 2853) | def get_chapter_count(self):
method get_chapter_count_for_title (line 2860) | def get_chapter_count_for_title(self, i_title):
method get_fps (line 2869) | def get_fps(self):
method get_hwnd (line 2883) | def get_hwnd(self):
method get_length (line 2892) | def get_length(self):
method get_media (line 2899) | def get_media(self):
method get_nsobject (line 2907) | def get_nsobject(self):
method get_position (line 2914) | def get_position(self):
method get_rate (line 2921) | def get_rate(self):
method get_role (line 2930) | def get_role(self):
method get_state (line 2938) | def get_state(self):
method get_time (line 2945) | def get_time(self):
method get_title (line 2952) | def get_title(self):
method get_title_count (line 2959) | def get_title_count(self):
method get_xwindow (line 2966) | def get_xwindow(self):
method has_vout (line 2976) | def has_vout(self):
method is_playing (line 2983) | def is_playing(self):
method is_seekable (line 2990) | def is_seekable(self):
method navigate (line 2997) | def navigate(self, navigate):
method next_chapter (line 3006) | def next_chapter(self):
method next_frame (line 3010) | def next_frame(self):
method pause (line 3014) | def pause(self):
method play (line 3018) | def play(self):
method previous_chapter (line 3025) | def previous_chapter(self):
method program_scrambled (line 3029) | def program_scrambled(self):
method release (line 3038) | def release(self):
method retain (line 3047) | def retain(self):
method set_agl (line 3053) | def set_agl(self, drawable):
method set_android_context (line 3057) | def set_android_context(self, p_awindow_handler):
method set_chapter (line 3067) | def set_chapter(self, i_chapter):
method set_equalizer (line 3074) | def set_equalizer(self, p_equalizer):
method set_evas_object (line 3105) | def set_evas_object(self, p_evas_object):
method set_media (line 3115) | def set_media(self, p_md):
method set_nsobject (line 3124) | def set_nsobject(self, drawable):
method set_pause (line 3159) | def set_pause(self, do_pause):
method set_position (line 3168) | def set_position(self, f_pos):
method set_rate (line 3177) | def set_rate(self, rate):
method set_renderer (line 3187) | def set_renderer(self, p_item):
method set_role (line 3202) | def set_role(self, role):
method set_time (line 3211) | def set_time(self, i_time):
method set_title (line 3219) | def set_title(self, i_title):
method set_video_title_display (line 3226) | def set_video_title_display(self, position, timeout):
method set_xwindow (line 3236) | def set_xwindow(self, drawable):
method stop (line 3277) | def stop(self):
method will_play (line 3281) | def will_play(self):
method set_fullscreen (line 3288) | def set_fullscreen(self, b_fullscreen):
method toggle_fullscreen (line 3302) | def toggle_fullscreen(self):
method toggle_teletext (line 3310) | def toggle_teletext(self):
method video_get_adjust_float (line 3317) | def video_get_adjust_float(self, option):
method video_get_adjust_int (line 3326) | def video_get_adjust_int(self, option):
method video_get_aspect_ratio (line 3335) | def video_get_aspect_ratio(self):
method video_get_chapter_description (line 3343) | def video_get_chapter_description(self, i_title):
method video_get_crop_geometry (line 3353) | def video_get_crop_geometry(self):
method video_get_logo_int (line 3360) | def video_get_logo_int(self, option):
method video_get_marquee_int (line 3367) | def video_get_marquee_int(self, option):
method video_get_marquee_string (line 3374) | def video_get_marquee_string(self, option):
method video_get_scale (line 3381) | def video_get_scale(self):
method video_get_spu (line 3390) | def video_get_spu(self):
method video_get_spu_count (line 3397) | def video_get_spu_count(self):
method video_get_spu_delay (line 3404) | def video_get_spu_delay(self):
method video_get_teletext (line 3413) | def video_get_teletext(self):
method video_get_title_description (line 3423) | def video_get_title_description(self):
method video_get_track (line 3431) | def video_get_track(self):
method video_get_track_count (line 3438) | def video_get_track_count(self):
method video_set_adjust_float (line 3445) | def video_set_adjust_float(self, option, value):
method video_set_adjust_int (line 3456) | def video_set_adjust_int(self, option, value):
method video_set_aspect_ratio (line 3469) | def video_set_aspect_ratio(self, psz_aspect):
method video_set_callbacks (line 3479) | def video_set_callbacks(self, lock, unlock, display, opaque):
method video_set_crop_geometry (line 3519) | def video_set_crop_geometry(self, psz_geometry):
method video_set_deinterlace (line 3526) | def video_set_deinterlace(self, psz_mode):
method video_set_format (line 3533) | def video_set_format(self, chroma, width, height, pitch):
method video_set_format_callbacks (line 3551) | def video_set_format_callbacks(self, setup, cleanup):
method video_set_key_input (line 3562) | def video_set_key_input(self, on):
method video_set_logo_int (line 3578) | def video_set_logo_int(self, option, value):
method video_set_logo_string (line 3589) | def video_set_logo_string(self, option, psz_value):
method video_set_marquee_int (line 3598) | def video_set_marquee_int(self, option, i_val):
method video_set_marquee_string (line 3609) | def video_set_marquee_string(self, option, psz_text):
method video_set_mouse_input (line 3617) | def video_set_mouse_input(self, on):
method video_set_scale (line 3630) | def video_set_scale(self, f_factor):
method video_set_spu (line 3642) | def video_set_spu(self, i_spu):
method video_set_spu_delay (line 3651) | def video_set_spu_delay(self, i_delay):
method video_set_subtitle_file (line 3665) | def video_set_subtitle_file(self, psz_subtitle):
method video_set_teletext (line 3676) | def video_set_teletext(self, i_page):
method video_set_track (line 3687) | def video_set_track(self, i_track):
method video_take_snapshot (line 3696) | def video_take_snapshot(self, num, psz_filepath, i_width, i_height):
method video_update_viewpoint (line 3713) | def video_update_viewpoint(self, p_viewpoint, b_absolute):
class Renderer (line 3731) | class Renderer(_Ctype):
method __new__ (line 3732) | def __new__(cls, ptr=_internal_guard):
method flags (line 3736) | def flags(self):
method hold (line 3747) | def hold(self):
method icon_uri (line 3759) | def icon_uri(self):
method name (line 3767) | def name(self):
method release (line 3775) | def release(self):
method type (line 3782) | def type(self):
class RendererDiscoverer (line 3792) | class RendererDiscoverer(_Ctype):
method __new__ (line 3793) | def __new__(cls, ptr=_internal_guard):
method event_manager (line 3798) | def event_manager(self):
method release (line 3816) | def release(self):
method start (line 3823) | def start(self):
method stop (line 3836) | def stop(self):
class AudioOutputChannel (line 3850) | class AudioOutputChannel(_Enum):
class AudioOutputDeviceTypes (line 3871) | class AudioOutputDeviceTypes(_Enum):
class DialogQuestionType (line 3898) | class DialogQuestionType(_Enum):
class EventType (line 3911) | class EventType(_Enum):
class LogLevel (line 4048) | class LogLevel(_Enum):
class MediaDiscovererCategory (line 4068) | class MediaDiscovererCategory(_Enum):
class MediaParseFlag (line 4087) | class MediaParseFlag(_Enum):
class MediaParsedStatus (line 4109) | class MediaParsedStatus(_Enum):
class MediaPlayerRole (line 4131) | class MediaPlayerRole(_Enum):
class MediaSlaveType (line 4165) | class MediaSlaveType(_Enum):
class MediaType (line 4178) | class MediaType(_Enum):
class Meta (line 4202) | class Meta(_Enum):
class NavigateMode (line 4263) | class NavigateMode(_Enum):
class PlaybackMode (line 4284) | class PlaybackMode(_Enum):
class Position (line 4299) | class Position(_Enum):
class State (line 4328) | class State(_Enum):
class TeletextKey (line 4360) | class TeletextKey(_Enum):
class TrackType (line 4381) | class TrackType(_Enum):
class VideoAdjustOption (line 4396) | class VideoAdjustOption(_Enum):
class VideoLogoOption (line 4417) | class VideoLogoOption(_Enum):
class VideoMarqueeOption (line 4442) | class VideoMarqueeOption(_Enum):
class VideoOrient (line 4471) | class VideoOrient(_Enum):
class VideoProjection (line 4494) | class VideoProjection(_Enum):
class ModuleDescription (line 4510) | class ModuleDescription(_Cstruct):
class RdDescription (line 4525) | class RdDescription(_Cstruct):
class MediaStats (line 4540) | class MediaStats(_Cstruct):
class MediaTrackInfo (line 4563) | class MediaTrackInfo(_Cstruct):
class U (line 4564) | class U(ctypes.Union):
class Audio (line 4565) | class Audio(_Cstruct):
class Video (line 4573) | class Video(_Cstruct):
class AudioTrack (line 4601) | class AudioTrack(_Cstruct):
class VideoViewpoint (line 4611) | class VideoViewpoint(_Cstruct):
class VideoTrack (line 4628) | class VideoTrack(_Cstruct):
class SubtitleTrack (line 4645) | class SubtitleTrack(_Cstruct):
class MediaTrack (line 4652) | class MediaTrack(_Cstruct):
class MediaSlave (line 4672) | class MediaSlave(_Cstruct):
class TrackDescription (line 4687) | class TrackDescription(_Cstruct):
class TitleDescription (line 4702) | class TitleDescription(_Cstruct):
class ChapterDescription (line 4713) | class ChapterDescription(_Cstruct):
class AudioOutput (line 4726) | class AudioOutput(_Cstruct):
class AudioOutputDevice (line 4741) | class AudioOutputDevice(_Cstruct):
class MediaDiscovererDescription (line 4754) | class MediaDiscovererDescription(_Cstruct):
class Event (line 4769) | class Event(_Cstruct):
class U (line 4772) | class U(ctypes.Union):
class MediaMetaChanged (line 4775) | class MediaMetaChanged(_Cstruct):
class MediaSubitemAdded (line 4780) | class MediaSubitemAdded(_Cstruct):
class MediaDurationChanged (line 4785) | class MediaDurationChanged(_Cstruct):
class MediaParsedChanged (line 4790) | class MediaParsedChanged(_Cstruct):
class MediaFreed (line 4795) | class MediaFreed(_Cstruct):
class MediaStateChanged (line 4800) | class MediaStateChanged(_Cstruct):
class MediaSubitemtreeAdded (line 4805) | class MediaSubitemtreeAdded(_Cstruct):
class MediaPlayerBuffering (line 4810) | class MediaPlayerBuffering(_Cstruct):
class MediaPlayerChapterChanged (line 4815) | class MediaPlayerChapterChanged(_Cstruct):
class MediaPlayerPositionChanged (line 4820) | class MediaPlayerPositionChanged(_Cstruct):
class MediaPlayerTimeChanged (line 4825) | class MediaPlayerTimeChanged(_Cstruct):
class MediaPlayerTitleChanged (line 4830) | class MediaPlayerTitleChanged(_Cstruct):
class MediaPlayerSeekableChanged (line 4835) | class MediaPlayerSeekableChanged(_Cstruct):
class MediaPlayerPausableChanged (line 4840) | class MediaPlayerPausableChanged(_Cstruct):
class MediaPlayerScrambledChanged (line 4845) | class MediaPlayerScrambledChanged(_Cstruct):
class MediaPlayerVout (line 4850) | class MediaPlayerVout(_Cstruct):
class MediaListItemAdded (line 4855) | class MediaListItemAdded(_Cstruct):
class MediaListWillAddItem (line 4860) | class MediaListWillAddItem(_Cstruct):
class MediaListItemDeleted (line 4865) | class MediaListItemDeleted(_Cstruct):
class MediaListWillDeleteItem (line 4870) | class MediaListWillDeleteItem(_Cstruct):
class MediaListPlayerNextItemSet (line 4875) | class MediaListPlayerNextItemSet(_Cstruct):
class MediaPlayerSnapshotTaken (line 4880) | class MediaPlayerSnapshotTaken(_Cstruct):
class MediaPlayerLengthChanged (line 4885) | class MediaPlayerLengthChanged(_Cstruct):
class VlmMediaEvent (line 4890) | class VlmMediaEvent(_Cstruct):
class MediaPlayerMediaChanged (line 4898) | class MediaPlayerMediaChanged(_Cstruct):
class MediaPlayerEsChanged (line 4903) | class MediaPlayerEsChanged(_Cstruct):
class MediaPlayerAudioVolume (line 4911) | class MediaPlayerAudioVolume(_Cstruct):
class MediaPlayerAudioDevice (line 4916) | class MediaPlayerAudioDevice(_Cstruct):
class RendererDiscovererItemAdded (line 4921) | class RendererDiscovererItemAdded(_Cstruct):
class RendererDiscovererItemDeleted (line 4926) | class RendererDiscovererItemDeleted(_Cstruct):
class EventUnion (line 4969) | class EventUnion(ctypes.Union):
class DialogCbs (line 5001) | class DialogCbs(_Cstruct):
class LogMessage (line 5128) | class LogMessage(_Cstruct):
class AudioCleanupCb (line 5144) | class AudioCleanupCb(ctypes.c_void_p):
class AudioDrainCb (line 5155) | class AudioDrainCb(ctypes.c_void_p):
class AudioFlushCb (line 5168) | class AudioFlushCb(ctypes.c_void_p):
class AudioPauseCb (line 5181) | class AudioPauseCb(ctypes.c_void_p):
class AudioPlayCb (line 5195) | class AudioPlayCb(ctypes.c_void_p):
class AudioResumeCb (line 5222) | class AudioResumeCb(ctypes.c_void_p):
class AudioSetVolumeCb (line 5237) | class AudioSetVolumeCb(ctypes.c_void_p):
class AudioSetupCb (line 5248) | class AudioSetupCb(ctypes.c_void_p):
class Callback (line 5265) | class Callback(ctypes.c_void_p):
class LogCb (line 5274) | class LogCb(ctypes.c_void_p):
class MediaCloseCb (line 5292) | class MediaCloseCb(ctypes.c_void_p):
class MediaOpenCb (line 5302) | class MediaOpenCb(ctypes.c_void_p):
class MediaReadCb (line 5324) | class MediaReadCb(ctypes.c_void_p):
class MediaSeekCb (line 5344) | class MediaSeekCb(ctypes.c_void_p):
class VideoCleanupCb (line 5357) | class VideoCleanupCb(ctypes.c_void_p):
class VideoDisplayCb (line 5367) | class VideoDisplayCb(ctypes.c_void_p):
class VideoFormatCb (line 5381) | class VideoFormatCb(ctypes.c_void_p):
class VideoLockCb (line 5412) | class VideoLockCb(ctypes.c_void_p):
class VideoUnlockCb (line 5431) | class VideoUnlockCb(ctypes.c_void_p):
class CallbackDecorators (line 5451) | class CallbackDecorators(object):
function libvlc_add_intf (line 5725) | def libvlc_add_intf(p_instance, name):
function libvlc_audio_equalizer_get_amp_at_index (line 5747) | def libvlc_audio_equalizer_get_amp_at_index(p_equalizer, u_band):
function libvlc_audio_equalizer_get_band_count (line 5770) | def libvlc_audio_equalizer_get_band_count():
function libvlc_audio_equalizer_get_band_frequency (line 5782) | def libvlc_audio_equalizer_get_band_frequency(u_index):
function libvlc_audio_equalizer_get_preamp (line 5805) | def libvlc_audio_equalizer_get_preamp(p_equalizer):
function libvlc_audio_equalizer_get_preset_count (line 5823) | def libvlc_audio_equalizer_get_preset_count():
function libvlc_audio_equalizer_get_preset_name (line 5835) | def libvlc_audio_equalizer_get_preset_name(u_index):
function libvlc_audio_equalizer_new (line 5856) | def libvlc_audio_equalizer_new():
function libvlc_audio_equalizer_new_from_preset (line 5874) | def libvlc_audio_equalizer_new_from_preset(u_index):
function libvlc_audio_equalizer_release (line 5899) | def libvlc_audio_equalizer_release(p_equalizer):
function libvlc_audio_equalizer_set_amp_at_index (line 5917) | def libvlc_audio_equalizer_set_amp_at_index(p_equalizer, f_amp, u_band):
function libvlc_audio_equalizer_set_preamp (line 5948) | def libvlc_audio_equalizer_set_preamp(p_equalizer, f_preamp):
function libvlc_audio_filter_list_get (line 5976) | def libvlc_audio_filter_list_get(p_instance):
function libvlc_audio_get_channel (line 5997) | def libvlc_audio_get_channel(p_mi):
function libvlc_audio_get_delay (line 6010) | def libvlc_audio_get_delay(p_mi):
function libvlc_audio_get_mute (line 6024) | def libvlc_audio_get_mute(p_mi):
function libvlc_audio_get_track (line 6037) | def libvlc_audio_get_track(p_mi):
function libvlc_audio_get_track_count (line 6050) | def libvlc_audio_get_track_count(p_mi):
function libvlc_audio_get_track_description (line 6063) | def libvlc_audio_get_track_description(p_mi):
function libvlc_audio_get_volume (line 6081) | def libvlc_audio_get_volume(p_mi):
function libvlc_audio_output_device_count (line 6095) | def libvlc_audio_output_device_count(p_instance, psz_audio_output):
function libvlc_audio_output_device_enum (line 6116) | def libvlc_audio_output_device_enum(mp):
function libvlc_audio_output_device_get (line 6145) | def libvlc_audio_output_device_get(mp):
function libvlc_audio_output_device_id (line 6178) | def libvlc_audio_output_device_id(p_instance, psz_audio_output, i_device):
function libvlc_audio_output_device_list_get (line 6201) | def libvlc_audio_output_device_list_get(p_instance, aout):
function libvlc_audio_output_device_list_release (line 6237) | def libvlc_audio_output_device_list_release(p_list):
function libvlc_audio_output_device_longname (line 6254) | def libvlc_audio_output_device_longname(p_instance, psz_output, i_device):
function libvlc_audio_output_device_set (line 6277) | def libvlc_audio_output_device_set(mp, module, device_id):
function libvlc_audio_output_get_device_type (line 6331) | def libvlc_audio_output_get_device_type(p_mi):
function libvlc_audio_output_list_get (line 6342) | def libvlc_audio_output_list_get(p_instance):
function libvlc_audio_output_list_release (line 6361) | def libvlc_audio_output_list_release(p_list):
function libvlc_audio_output_set (line 6376) | def libvlc_audio_output_set(p_mi, psz_name):
function libvlc_audio_output_set_device_type (line 6402) | def libvlc_audio_output_set_device_type(p_mp, device_type):
function libvlc_audio_set_callbacks (line 6418) | def libvlc_audio_set_callbacks(mp, play, pause, resume, flush, drain, op...
function libvlc_audio_set_channel (line 6461) | def libvlc_audio_set_channel(p_mi, channel):
function libvlc_audio_set_delay (line 6483) | def libvlc_audio_set_delay(p_mi, i_delay):
function libvlc_audio_set_format (line 6506) | def libvlc_audio_set_format(mp, format, rate, channels):
function libvlc_audio_set_format_callbacks (line 6538) | def libvlc_audio_set_format_callbacks(mp, setup, cleanup):
function libvlc_audio_set_mute (line 6565) | def libvlc_audio_set_mute(p_mi, status):
function libvlc_audio_set_track (line 6593) | def libvlc_audio_set_track(p_mi, i_track):
function libvlc_audio_set_volume (line 6615) | def libvlc_audio_set_volume(p_mi, i_volume):
function libvlc_audio_set_volume_callback (line 6637) | def libvlc_audio_set_volume_callback(mp, set_volume):
function libvlc_audio_toggle_mute (line 6663) | def libvlc_audio_toggle_mute(p_mi):
function libvlc_chapter_descriptions_release (line 6679) | def libvlc_chapter_descriptions_release(p_chapters, i_count):
function libvlc_clearerr (line 6701) | def libvlc_clearerr():
function libvlc_clock (line 6712) | def libvlc_clock():
function libvlc_dialog_dismiss (line 6727) | def libvlc_dialog_dismiss(p_id):
function libvlc_dialog_get_context (line 6745) | def libvlc_dialog_get_context(p_id):
function libvlc_dialog_post_action (line 6756) | def libvlc_dialog_post_action(p_id, i_action):
function libvlc_dialog_post_login (line 6783) | def libvlc_dialog_post_login(p_id, psz_username, psz_password, b_store):
function libvlc_dialog_set_callbacks (line 6816) | def libvlc_dialog_set_callbacks(p_instance, p_cbs, p_data):
function libvlc_dialog_set_context (line 6840) | def libvlc_dialog_set_context(p_id, p_context):
function libvlc_errmsg (line 6859) | def libvlc_errmsg():
function libvlc_event_attach (line 6873) | def libvlc_event_attach(p_event_manager, i_event_type, f_callback, user_...
function libvlc_event_detach (line 6903) | def libvlc_event_detach(p_event_manager, i_event_type, f_callback, p_use...
function libvlc_event_type_name (line 6929) | def libvlc_event_type_name(event_type):
function libvlc_free (line 6940) | def libvlc_free(ptr):
function libvlc_get_changeset (line 6953) | def libvlc_get_changeset():
function libvlc_get_compiler (line 6966) | def libvlc_get_compiler():
function libvlc_get_fullscreen (line 6979) | def libvlc_get_fullscreen(p_mi):
function libvlc_get_log_verbosity (line 6992) | def libvlc_get_log_verbosity(p_instance):
function libvlc_get_version (line 7006) | def libvlc_get_version():
function libvlc_log_clear (line 7019) | def libvlc_log_clear(p_log):
function libvlc_log_close (line 7031) | def libvlc_log_close(p_log):
function libvlc_log_count (line 7042) | def libvlc_log_count(p_log):
function libvlc_log_get_context (line 7056) | def libvlc_log_get_context(ctx, module, file):
function libvlc_log_get_iterator (line 7096) | def libvlc_log_get_iterator(p_log):
function libvlc_log_get_object (line 7114) | def libvlc_log_get_object(ctx, name, header, id):
function libvlc_log_iterator_free (line 7159) | def libvlc_log_iterator_free(p_iter):
function libvlc_log_iterator_has_next (line 7170) | def libvlc_log_iterator_has_next(p_iter):
function libvlc_log_iterator_next (line 7184) | def libvlc_log_iterator_next(p_iter, p_buf):
function libvlc_log_open (line 7207) | def libvlc_log_open(p_instance):
function libvlc_log_set (line 7221) | def libvlc_log_set(p_instance, cb, data):
function libvlc_log_set_file (line 7255) | def libvlc_log_set_file(p_instance, stream):
function libvlc_log_unset (line 7278) | def libvlc_log_unset(p_instance):
function libvlc_media_add_option (line 7298) | def libvlc_media_add_option(p_md, psz_options):
function libvlc_media_add_option_flag (line 7330) | def libvlc_media_add_option_flag(p_md, psz_options, i_flags):
function libvlc_media_discoverer_event_manager (line 7363) | def libvlc_media_discoverer_event_manager(p_mdis):
function libvlc_media_discoverer_is_running (line 7384) | def libvlc_media_discoverer_is_running(p_mdis):
function libvlc_media_discoverer_list_get (line 7401) | def libvlc_media_discoverer_list_get(p_inst, i_cat, ppp_services):
function libvlc_media_discoverer_list_release (line 7429) | def libvlc_media_discoverer_list_release(pp_services, i_count):
function libvlc_media_discoverer_localized_name (line 7453) | def libvlc_media_discoverer_localized_name(p_mdis):
function libvlc_media_discoverer_media_list (line 7474) | def libvlc_media_discoverer_media_list(p_mdis):
function libvlc_media_discoverer_new (line 7491) | def libvlc_media_discoverer_new(p_inst, psz_name):
function libvlc_media_discoverer_new_from_name (line 7525) | def libvlc_media_discoverer_new_from_name(p_inst, psz_name):
function libvlc_media_discoverer_release (line 7541) | def libvlc_media_discoverer_release(p_mdis):
function libvlc_media_discoverer_start (line 7553) | def libvlc_media_discoverer_start(p_mdis):
function libvlc_media_discoverer_stop (line 7572) | def libvlc_media_discoverer_stop(p_mdis):
function libvlc_media_duplicate (line 7587) | def libvlc_media_duplicate(p_md):
function libvlc_media_event_manager (line 7598) | def libvlc_media_event_manager(p_md):
function libvlc_media_get_codec_description (line 7616) | def libvlc_media_get_codec_description(i_type, i_codec):
function libvlc_media_get_duration (line 7641) | def libvlc_media_get_duration(p_md):
function libvlc_media_get_meta (line 7654) | def libvlc_media_get_meta(p_md, e_meta):
function libvlc_media_get_mrl (line 7682) | def libvlc_media_get_mrl(p_md):
function libvlc_media_get_parsed_status (line 7695) | def libvlc_media_get_parsed_status(p_md):
function libvlc_media_get_state (line 7712) | def libvlc_media_get_state(p_md):
function libvlc_media_get_stats (line 7729) | def libvlc_media_get_stats(p_md, p_stats):
function libvlc_media_get_tracks_info (line 7752) | def libvlc_media_get_tracks_info(p_md):
function libvlc_media_get_type (line 7782) | def libvlc_media_get_type(p_md):
function libvlc_media_get_user_data (line 7798) | def libvlc_media_get_user_data(p_md):
function libvlc_media_is_parsed (line 7811) | def libvlc_media_is_parsed(p_md):
function libvlc_media_library_load (line 7830) | def libvlc_media_library_load(p_mlib):
function libvlc_media_library_media_list (line 7843) | def libvlc_media_library_media_list(p_mlib):
function libvlc_media_library_new (line 7860) | def libvlc_media_library_new(p_instance):
function libvlc_media_library_release (line 7877) | def libvlc_media_library_release(p_mlib):
function libvlc_media_library_retain (line 7890) | def libvlc_media_library_retain(p_mlib):
function libvlc_media_list_add_media (line 7903) | def libvlc_media_list_add_media(p_ml, p_md):
function libvlc_media_list_count (line 7926) | def libvlc_media_list_count(p_ml):
function libvlc_media_list_event_manager (line 7940) | def libvlc_media_list_event_manager(p_ml):
function libvlc_media_list_index_of_item (line 7958) | def libvlc_media_list_index_of_item(p_ml, p_md):
function libvlc_media_list_insert_media (line 7982) | def libvlc_media_list_insert_media(p_ml, p_md, i_pos):
function libvlc_media_list_is_readonly (line 8008) | def libvlc_media_list_is_readonly(p_ml):
function libvlc_media_list_item_at_index (line 8021) | def libvlc_media_list_item_at_index(p_ml, i_pos):
function libvlc_media_list_lock (line 8046) | def libvlc_media_list_lock(p_ml):
function libvlc_media_list_
Condensed preview — 95 files, each showing path, character count, and a content snippet. Download the .json file or copy for the full structured content (1,967K chars).
[
{
"path": ".github/workflows/ruff.yml",
"chars": 288,
"preview": "name: Ruff\n\non: [push, pull_request]\n\njobs:\n linting:\n runs-on: ubuntu-latest\n steps:\n - uses: actions/check"
},
{
"path": ".github/workflows/tests.yml",
"chars": 350,
"preview": "name: Tests\n\non: [push, pull_request]\n\njobs:\n tests:\n runs-on: ubuntu-latest\n steps:\n - uses: actions/checko"
},
{
"path": ".gitignore",
"chars": 492,
"preview": "# Hidden files\n*~\n\n*.py[cod]\n\n# C extensions\n*.so\n\n# Packages\n*.egg\n*.egg-info\ndist\nbuild\neggs\nparts\nbin\nvar\nsdist\ndevel"
},
{
"path": ".gitmodules",
"chars": 141,
"preview": "[submodule \"vendor/tree-sitter-c\"]\n path = vendor/tree-sitter-c\n url = https://github.com/tree-sitter/tree-sitter-"
},
{
"path": ".pre-commit-config.yaml",
"chars": 933,
"preview": "# See https://pre-commit.com for more information\n# See https://pre-commit.com/hooks.html for more hooks\nrepos:\n- repo: "
},
{
"path": ".readthedocs.yaml",
"chars": 226,
"preview": "version: 2\n\nbuild:\n os: ubuntu-22.04\n tools:\n python: \"3.12\"\n\n# Build documentation in the \"docs/\" directory with S"
},
{
"path": ".travis.yml",
"chars": 815,
"preview": "group: travis_latest\nlanguage: python\ncache: pip\npython:\n - 3.8\ninstall:\n #- pip install -r requirements.txt\n -"
},
{
"path": "AUTHORS",
"chars": 895,
"preview": "These bindings and example code have been implemented and improved by\nthe following contributors:\n\nOlivier Aubert <conta"
},
{
"path": "COPYING",
"chars": 26530,
"preview": " GNU LESSER GENERAL PUBLIC LICENSE\n Version 2.1, February 1999\n\n Copyright (C) 19"
},
{
"path": "COPYING.generator",
"chars": 18092,
"preview": " GNU GENERAL PUBLIC LICENSE\n Version 2, June 1991\n\n Copyright (C) 1989, 1991 Fr"
},
{
"path": "MANIFEST.in",
"chars": 172,
"preview": "include setup.py\ninclude COPYING COPYING.generator MANIFEST.in README.rst TODO\ninclude distribute_setup.py Makefile \nrec"
},
{
"path": "Makefile",
"chars": 2910,
"preview": "GENERATE:=python3 generator/generate.py\nDEV_INCLUDE_DIR=../../include/vlc\n\nUNAME_S := $(shell uname -s)\nifeq ($(UNAME_S)"
},
{
"path": "README.md",
"chars": 5069,
"preview": "# Python ctypes-based bindings generator for libvlc\n\n\")\ncd \"${PROJECT_ROOT}\" || exit\n\nV"
},
{
"path": "distribute_setup.py",
"chars": 17484,
"preview": "#!python\n\"\"\"Bootstrap distribute installation\n\nIf you want to use setuptools in your package's setup.py, just include th"
},
{
"path": "docs/Makefile",
"chars": 634,
"preview": "# Minimal makefile for Sphinx documentation\n#\n\n# You can set these variables from the command line, and also\n# from the "
},
{
"path": "docs/api.rst",
"chars": 410,
"preview": "API documentation\n=================\n\nEssential API classes\n---------------------\n\nThe main starting point for the python"
},
{
"path": "docs/conf.py",
"chars": 1734,
"preview": "# Configuration file for the Sphinx documentation builder.\n#\n# For the full list of built-in configuration values, see t"
},
{
"path": "docs/fullapi.rst",
"chars": 84,
"preview": "Full API documentation\n======================\n\n.. toctree::\n :glob:\n\n api/vlc/*\n"
},
{
"path": "docs/index.rst",
"chars": 470,
"preview": "Welcome to python-vlc's documentation!\n======================================\n\nYou are looking at the new python-vlc API"
},
{
"path": "docs/make.bat",
"chars": 765,
"preview": "@ECHO OFF\n\npushd %~dp0\n\nREM Command file for Sphinx documentation\n\nif \"%SPHINXBUILD%\" == \"\" (\n\tset SPHINXBUILD=sphinx-bu"
},
{
"path": "docs/requirements.txt",
"chars": 63,
"preview": "Sphinx==7.3.7\nsphinx-autoapi\nsphinx_mdinclude\nsphinx_rtd_theme\n"
},
{
"path": "examples/cocoavlc.py",
"chars": 27338,
"preview": "#!/usr/bin/env python\n# -*- coding: utf-8 -*-\n\n# Example of using PyCocoa <https://PyPI.org/project/PyCocoa> to create a"
},
{
"path": "examples/gtk2vlc.py",
"chars": 5342,
"preview": "#! /usr/bin/env python3\n\n#\n# gtk example/widget for VLC Python bindings\n# Copyright (C) 2009-2010 the VideoLAN team\n#\n# "
},
{
"path": "examples/gtkvlc.py",
"chars": 7071,
"preview": "#! /usr/bin/env python3\n\n#\n# gtk3 example/widget for VLC Python bindings\n# Copyright (C) 2017 Olivier Aubert <contact@ol"
},
{
"path": "examples/play_buffer.py",
"chars": 7359,
"preview": "#!/usr/bin/env python3\n\n# Author: A.Invernizzi (@albestro on GitHub)\n# Date: Jun 03, 2020\n\n# MIT License <http://O"
},
{
"path": "examples/psgvlc.py",
"chars": 5631,
"preview": "#! /usr/bin/env python3\n# -*- coding: utf-8 -*-\n\nu'''Bare Bones VLC Media Player Demo with Playlist.\n\n1 - Originally the"
},
{
"path": "examples/pyobjcvlc.py",
"chars": 15845,
"preview": "#! /usr/bin/env python3\n\n# -*- coding: utf-8 -*-\n\n# License at the end of this file. This module is equivalent to\n# PyC"
},
{
"path": "examples/pyqt5vlc.py",
"chars": 8139,
"preview": "#! /usr/bin/env python3\n#\n# PyQt5 example for VLC Python bindings\n# Copyright (C) 2009-2010 the VideoLAN team\n#\n# This p"
},
{
"path": "examples/qtvlc.py",
"chars": 7471,
"preview": "#! /usr/bin/env python3\n\n#\n# Qt example for VLC Python bindings\n# Copyright (C) 2009-2010 the VideoLAN team\n#\n# This pro"
},
{
"path": "examples/tkvlc.py",
"chars": 49969,
"preview": "#! /usr/bin/env python3\n# -*- coding: utf-8 -*-\n\n# tkinter example for VLC Python bindings\n# Copyright (C) 2015 the Vide"
},
{
"path": "examples/video_sync/README.md",
"chars": 1353,
"preview": "## Video Synchronization with python-vlc\n\n<img src=\"figure.png\" width=\"600\" align=\"center\">\n\nEach video player is launch"
},
{
"path": "examples/video_sync/main.py",
"chars": 14728,
"preview": "#! /usr/bin/env python3\n#\n# PyQt5-based video-sync example for VLC Python bindings\n# Copyright (C) 2009-2010 the VideoLA"
},
{
"path": "examples/video_sync/mini_player.py",
"chars": 5472,
"preview": "#! /usr/bin/env python3\n#\n# PyQt5-based video-sync example for VLC Python bindings\n# Copyright (C) 2009-2010 the VideoLA"
},
{
"path": "examples/video_sync/network.py",
"chars": 6128,
"preview": "#\n# PyQt5-based video-sync example for VLC Python bindings\n# Copyright (C) 2009-2010 the VideoLAN team\n#\n# This program "
},
{
"path": "examples/wxvlc.py",
"chars": 11191,
"preview": "#! /usr/bin/env python3\n# -*- coding: utf-8 -*-\n\n# <https://github.com/oaubert/python-vlc/blob/master/examples/wxvlc.py>"
},
{
"path": "generated/2.2/COPYING",
"chars": 26530,
"preview": " GNU LESSER GENERAL PUBLIC LICENSE\n Version 2.1, February 1999\n\n Copyright (C) 19"
},
{
"path": "generated/2.2/MANIFEST.in",
"chars": 131,
"preview": "include setup.py\ninclude vlc.py\ninclude COPYING MANIFEST.in README.module\ninclude distribute_setup.py\nrecursive-include "
},
{
"path": "generated/2.2/README.module",
"chars": 2104,
"preview": "Python ctypes-based bindings libvlc\n===================================\n\nThe bindings use ctypes to directly call the li"
},
{
"path": "generated/2.2/distribute_setup.py",
"chars": 17672,
"preview": "#!python\n\"\"\"Bootstrap distribute installation\n\nIf you want to use setuptools in your package's setup.py, just include th"
},
{
"path": "generated/2.2/examples/gtk2vlc.py",
"chars": 5337,
"preview": "#! /usr/bin/python\n\n#\n# gtk example/widget for VLC Python bindings\n# Copyright (C) 2009-2010 the VideoLAN team\n#\n# This "
},
{
"path": "generated/2.2/examples/gtkvlc.py",
"chars": 6052,
"preview": "#! /usr/bin/python\n\n#\n# gtk3 example/widget for VLC Python bindings\n# Copyright (C) 2017 Olivier Aubert <contact@olivier"
},
{
"path": "generated/2.2/examples/qtvlc.py",
"chars": 7381,
"preview": "#! /usr/bin/python\n\n#\n# Qt example for VLC Python bindings\n# Copyright (C) 2009-2010 the VideoLAN team\n#\n# This program "
},
{
"path": "generated/2.2/examples/tkvlc.py",
"chars": 11482,
"preview": "#! /usr/bin/python\n# -*- coding: utf-8 -*-\n\n#\n# tkinter example for VLC Python bindings\n# Copyright (C) 2015 the VideoLA"
},
{
"path": "generated/2.2/examples/wxvlc.py",
"chars": 8485,
"preview": "#! /usr/bin/python\n# -*- coding: utf-8 -*-\n\n#\n# WX example for VLC Python bindings\n# Copyright (C) 2009-2010 the VideoLA"
},
{
"path": "generated/2.2/setup.py",
"chars": 1532,
"preview": "from distribute_setup import use_setuptools\nuse_setuptools()\n\nfrom setuptools import setup\n\nsetup(name='python-vlc',\n "
},
{
"path": "generated/2.2/vlc.py",
"chars": 293088,
"preview": "#! /usr/bin/python\n# -*- coding: utf-8 -*-\n\n# Python ctypes bindings for VLC\n#\n# Copyright (C) 2009-2017 the VideoLAN te"
},
{
"path": "generated/3.0/COPYING",
"chars": 26530,
"preview": " GNU LESSER GENERAL PUBLIC LICENSE\n Version 2.1, February 1999\n\n Copyright (C) 19"
},
{
"path": "generated/3.0/MANIFEST.in",
"chars": 131,
"preview": "include setup.py\ninclude vlc.py\ninclude COPYING MANIFEST.in README.module\ninclude distribute_setup.py\nrecursive-include "
},
{
"path": "generated/3.0/README.module",
"chars": 2747,
"preview": "Python ctypes-based bindings for libvlc\n=======================================\n\nThe bindings use ctypes to directly cal"
},
{
"path": "generated/3.0/examples/cocoavlc.py",
"chars": 27338,
"preview": "#!/usr/bin/env python\n# -*- coding: utf-8 -*-\n\n# Example of using PyCocoa <https://PyPI.org/project/PyCocoa> to create a"
},
{
"path": "generated/3.0/examples/glsurface.py",
"chars": 4231,
"preview": "#! /usr/bin/env python3\n\n#\n# GlSurface example code for VLC Python bindings\n# Copyright (C) 2020 Daniël van Adrichem <da"
},
{
"path": "generated/3.0/examples/gtk2vlc.py",
"chars": 5342,
"preview": "#! /usr/bin/env python3\n\n#\n# gtk example/widget for VLC Python bindings\n# Copyright (C) 2009-2010 the VideoLAN team\n#\n# "
},
{
"path": "generated/3.0/examples/gtkvlc.py",
"chars": 7071,
"preview": "#! /usr/bin/env python3\n\n#\n# gtk3 example/widget for VLC Python bindings\n# Copyright (C) 2017 Olivier Aubert <contact@ol"
},
{
"path": "generated/3.0/examples/play_buffer.py",
"chars": 7359,
"preview": "#!/usr/bin/env python3\n\n# Author: A.Invernizzi (@albestro on GitHub)\n# Date: Jun 03, 2020\n\n# MIT License <http://O"
},
{
"path": "generated/3.0/examples/psgvlc.py",
"chars": 5631,
"preview": "#! /usr/bin/env python3\n# -*- coding: utf-8 -*-\n\nu'''Bare Bones VLC Media Player Demo with Playlist.\n\n1 - Originally the"
},
{
"path": "generated/3.0/examples/pyobjcvlc.py",
"chars": 15845,
"preview": "#! /usr/bin/env python3\n\n# -*- coding: utf-8 -*-\n\n# License at the end of this file. This module is equivalent to\n# PyC"
},
{
"path": "generated/3.0/examples/pyqt5vlc.py",
"chars": 7834,
"preview": "#! /usr/bin/env python3\n#\n# PyQt5 example for VLC Python bindings\n# Copyright (C) 2009-2010 the VideoLAN team\n#\n# This p"
},
{
"path": "generated/3.0/examples/qtvlc.py",
"chars": 7471,
"preview": "#! /usr/bin/env python3\n\n#\n# Qt example for VLC Python bindings\n# Copyright (C) 2009-2010 the VideoLAN team\n#\n# This pro"
},
{
"path": "generated/3.0/examples/tkvlc.py",
"chars": 49969,
"preview": "#! /usr/bin/env python3\n# -*- coding: utf-8 -*-\n\n# tkinter example for VLC Python bindings\n# Copyright (C) 2015 the Vide"
},
{
"path": "generated/3.0/examples/video_sync/README.md",
"chars": 1353,
"preview": "## Video Synchronization with python-vlc\n\n<img src=\"figure.png\" width=\"600\" align=\"center\">\n\nEach video player is launch"
},
{
"path": "generated/3.0/examples/video_sync/main.py",
"chars": 14728,
"preview": "#! /usr/bin/env python3\n#\n# PyQt5-based video-sync example for VLC Python bindings\n# Copyright (C) 2009-2010 the VideoLA"
},
{
"path": "generated/3.0/examples/video_sync/mini_player.py",
"chars": 5472,
"preview": "#! /usr/bin/env python3\n#\n# PyQt5-based video-sync example for VLC Python bindings\n# Copyright (C) 2009-2010 the VideoLA"
},
{
"path": "generated/3.0/examples/video_sync/network.py",
"chars": 6128,
"preview": "#\n# PyQt5-based video-sync example for VLC Python bindings\n# Copyright (C) 2009-2010 the VideoLAN team\n#\n# This program "
},
{
"path": "generated/3.0/examples/wxvlc.py",
"chars": 11191,
"preview": "#! /usr/bin/env python3\n# -*- coding: utf-8 -*-\n\n# <https://github.com/oaubert/python-vlc/blob/master/examples/wxvlc.py>"
},
{
"path": "generated/3.0/pyproject.toml",
"chars": 1480,
"preview": "[build-system]\nrequires = [\"setuptools\"]\nbuild-backend = \"setuptools.build_meta\"\n\n[project]\nname = \"python-vlc\"\ndynamic "
},
{
"path": "generated/3.0/vlc.py",
"chars": 408022,
"preview": "#! /usr/bin/python\n# -*- coding: utf-8 -*-\n\n# Python ctypes bindings for VLC\n#\n# Copyright (C) 2009-2017 the VideoLAN te"
},
{
"path": "generated/__init__.py",
"chars": 0,
"preview": ""
},
{
"path": "generated/dev/vlc.py",
"chars": 397795,
"preview": "#! /usr/bin/python\n# -*- coding: utf-8 -*-\n\n# Python ctypes bindings for VLC\n#\n# Copyright (C) 2009-2017 the VideoLAN te"
},
{
"path": "generator/__init__.py",
"chars": 20,
"preview": "# Generator package\n"
},
{
"path": "generator/generate.py",
"chars": 109942,
"preview": "#! /usr/bin/env python3\n\n# Code generator for python ctypes bindings for VLC\n#\n# Copyright (C) 2009-2023 the VideoLAN te"
},
{
"path": "generator/templates/LibVlc-footer.java",
"chars": 2,
"preview": "}\n"
},
{
"path": "generator/templates/LibVlc-header.java",
"chars": 5808,
"preview": "package org.videolan.jvlc.internal;\n\nimport com.sun.jna.Callback;\nimport com.sun.jna.Library;\nimport com.sun.jna.Native;"
},
{
"path": "generator/templates/MANIFEST.in",
"chars": 131,
"preview": "include setup.py\ninclude vlc.py\ninclude COPYING MANIFEST.in README.module\ninclude distribute_setup.py\nrecursive-include "
},
{
"path": "generator/templates/boilerplate.java",
"chars": 1128,
"preview": "/*****************************************************************************\n * VLC Java Bindings JNA Glue\n **********"
},
{
"path": "generator/templates/footer.py",
"chars": 10149,
"preview": "# Start of footer.py #\n\n# Backward compatibility\ndef callbackmethod(callback):\n \"\"\"Now obsolete ``@callbackmethod`` d"
},
{
"path": "generator/templates/header.py",
"chars": 14105,
"preview": "#! /usr/bin/python\n# -*- coding: utf-8 -*-\n\n# Python ctypes bindings for VLC\n#\n# Copyright (C) 2009-2017 the VideoLAN te"
},
{
"path": "generator/templates/override.py",
"chars": 19849,
"preview": "class Instance:\n \"\"\"It may take as parameter either:\n\n * a string\n * a list of strings as first parameters\n "
},
{
"path": "generator/templates/pyproject.toml",
"chars": 1480,
"preview": "[build-system]\nrequires = [\"setuptools\"]\nbuild-backend = \"setuptools.build_meta\"\n\n[project]\nname = \"python-vlc\"\ndynamic "
},
{
"path": "pyproject.toml",
"chars": 1269,
"preview": "[build-system]\nrequires = [\"setuptools\"]\nbuild-backend = \"setuptools.build_meta\"\n\n[project]\nname = \"python-vlc-generator"
},
{
"path": "requirements.txt",
"chars": 112,
"preview": "ruff==0.4.2\nSphinx==7.3.7\ntree-sitter==0.20.4\nbuild\npre-commit\nsphinx-autoapi\nsphinx_mdinclude\nsphinx_rtd_theme\n"
},
{
"path": "ruff.toml",
"chars": 1952,
"preview": "# Exclude a variety of commonly ignored directories.\nexclude = [\n \".bzr\",\n \".direnv\",\n \".eggs\",\n \".git\",\n "
},
{
"path": "tests/gctest.py",
"chars": 608,
"preview": "#! /usr/bin/python\n\n\"\"\"Script checking for garbage collection issues with event handlers.\n\nSee https://github.com/oauber"
},
{
"path": "tests/samples/README",
"chars": 116,
"preview": "These sample files are used in tests.\n\nThey were downloaded from http://techslides.com/sample-files-for-development\n"
},
{
"path": "tests/test_bindings.py",
"chars": 16440,
"preview": "#! /usr/bin/env python\n# This Python file uses the following encoding: utf-8\n\n#\n# Code generator for python ctypes bindi"
},
{
"path": "tests/test_generator.py",
"chars": 35482,
"preview": "#! /usr/bin/env python\n# This Python file uses the following encoding: utf-8\n\n#\n# Code generator for python ctypes bindi"
},
{
"path": "tests/test_parser_inputs/callbacks.h",
"chars": 1059,
"preview": "typedef void (*not_in_libvlc_cb)();\n\ntypedef void (*libvlc_simple_cb)();\n\ntypedef void (*libvlc_simple_with_void_cb)(voi"
},
{
"path": "tests/test_parser_inputs/enums.h",
"chars": 2592,
"preview": "// ============================================================================\n// Regular enums\n// ===================="
},
{
"path": "tests/test_parser_inputs/funcs.h",
"chars": 1587,
"preview": "void libvlc_not_in_public_api();\n\n__attribute__((visibility(\"default\"))) void not_a_libvlc_function();\n\n__attribute__((v"
},
{
"path": "tests/test_parser_inputs/libvlc_version_with_extra.h",
"chars": 2217,
"preview": "/*****************************************************************************\n * libvlc_version.h\n ********************"
},
{
"path": "tests/test_parser_inputs/libvlc_version_without_extra.h",
"chars": 2217,
"preview": "/*****************************************************************************\n * libvlc_version.h\n ********************"
},
{
"path": "tests/test_parser_inputs/structs.h",
"chars": 5781,
"preview": "// ============================================================================\n// Regular structs\n// =================="
}
]
About this extraction
This page contains the full source code of the oaubert/python-vlc GitHub repository, extracted and formatted as plain text for AI agents and large language models (LLMs). The extraction includes 95 files (1.8 MB), approximately 460.2k tokens, and a symbol index with 3142 extracted functions, classes, methods, constants, and types. Use this with OpenClaw, Claude, ChatGPT, Cursor, Windsurf, or any other AI tool that accepts text input. You can copy the full output to your clipboard or download it as a .txt file.
Extracted by GitExtract — free GitHub repo to text converter for AI. Built by Nikandr Surkov.