Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
V
vlc
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Redmine
Redmine
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Operations
Operations
Metrics
Environments
Analytics
Analytics
CI / CD
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
videolan
vlc
Commits
bcdc891a
Commit
bcdc891a
authored
Nov 23, 2009
by
Olivier Aubert
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
python-ctypes: add support for media stats
parent
3e0d64a2
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
23 additions
and
0 deletions
+23
-0
bindings/python-ctypes/generate.py
bindings/python-ctypes/generate.py
+1
-0
bindings/python-ctypes/header.py
bindings/python-ctypes/header.py
+22
-0
No files found.
bindings/python-ctypes/generate.py
View file @
bcdc891a
...
...
@@ -340,6 +340,7 @@ class PythonGenerator(object):
'libvlc_media_list_view_t*'
:
'MediaListView'
,
'libvlc_track_description_t*'
:
'TrackDescription'
,
'libvlc_audio_output_t*'
:
'AudioOutput'
,
'libvlc_media_stats_t*'
:
'ctypes.POINTER(MediaStats)'
,
'mediacontrol_Instance*'
:
'MediaControl'
,
'mediacontrol_Exception*'
:
'MediaControlException'
,
...
...
bindings/python-ctypes/header.py
View file @
bcdc891a
...
...
@@ -149,6 +149,28 @@ else:
def
clear
(
self
):
libvlc_exception_clear
(
self
)
class
MediaStats
(
ctypes
.
Structure
):
_fields_
=
[
(
'read_bytes'
,
ctypes
.
c_int
),
(
'input_bitrate'
,
ctypes
.
c_float
),
(
'demux_read_bytes'
,
ctypes
.
c_int
),
(
'demux_bitrate'
,
ctypes
.
c_float
),
(
'demux_corrupted'
,
ctypes
.
c_int
),
(
'demux_discontinuity'
,
ctypes
.
c_int
),
(
'decoded_video'
,
ctypes
.
c_int
),
(
'decoded_audio'
,
ctypes
.
c_int
),
(
'displayed_pictures'
,
ctypes
.
c_int
),
(
'lost_pictures'
,
ctypes
.
c_int
),
(
'played_abuffers'
,
ctypes
.
c_int
),
(
'lost_abuffers'
,
ctypes
.
c_int
),
(
'sent_packets'
,
ctypes
.
c_int
),
(
'sent_bytes'
,
ctypes
.
c_int
),
(
'send_bitrate'
,
ctypes
.
c_float
),
]
def
__str__
(
self
):
return
"MediaStats
\
n
%s"
%
"
\
n
"
.
join
(
"%s:
\
t
%s"
%
(
n
,
getattr
(
self
,
n
))
for
n
in
self
.
_fields_
)
class
PlaylistItem
(
ctypes
.
Structure
):
_fields_
=
[
(
'id'
,
ctypes
.
c_int
),
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment