[vlc-devel] commit: python-ctypes: define additional docstrings (Olivier Aubert )
git version control
git at videolan.org
Tue Sep 1 19:09:26 CEST 2009
vlc | branch: master | Olivier Aubert <olivier.aubert at liris.cnrs.fr> | Fri Aug 28 17:01:58 2009 +0200| [56637aa9db7243a300becf514ca5ea1d7f966917] | committer: Olivier Aubert
python-ctypes: define additional docstrings
> http://git.videolan.org/gitweb.cgi/vlc.git/?a=commit;h=56637aa9db7243a300becf514ca5ea1d7f966917
---
bindings/python-ctypes/override.py | 24 ++++++++++++++++++++++++
1 files changed, 24 insertions(+), 0 deletions(-)
diff --git a/bindings/python-ctypes/override.py b/bindings/python-ctypes/override.py
index 1cea940..0888ae9 100644
--- a/bindings/python-ctypes/override.py
+++ b/bindings/python-ctypes/override.py
@@ -86,18 +86,34 @@ class MediaControl:
return None
def set_media_position(self, pos):
+ """Set the media position.
+
+ @param pos: a MediaControlPosition or an integer (in ms)
+ """
if not isinstance(pos, MediaControlPosition):
pos=MediaControlPosition(origin=PositionOrigin.AbsolutePosition, key=PositionKey.MediaTime, value=long(pos))
e=MediaControlException()
mediacontrol_set_media_position(self, pos, e)
def start(self, pos=0):
+ """Start the player at the given position.
+
+ @param pos: a MediaControlPosition or an integer (in ms)
+ """
if not isinstance(pos, MediaControlPosition):
pos=MediaControlPosition(origin=PositionOrigin.AbsolutePosition, key=PositionKey.MediaTime, value=long(pos))
e=MediaControlException()
mediacontrol_start(self, pos, e)
def snapshot(self, pos=0):
+ """Take a snapshot.
+
+ Note: the position parameter is not properly implemented. For
+ the moment, the only valid position is the 0-relative position
+ (i.e. the current position).
+
+ @param pos: a MediaControlPosition or an integer (in ms)
+ """
if not isinstance(pos, MediaControlPosition):
pos=MediaControlPosition(origin=PositionOrigin.AbsolutePosition, key=PositionKey.MediaTime, value=long(pos))
e=MediaControlException()
@@ -108,6 +124,12 @@ class MediaControl:
return None
def display_text(self, message='', begin=0, end=1000):
+ """Display a caption between begin and end positions.
+
+ @param message: the caption to display
+ @param begin: the begin position
+ @param end: the end position
+ """
if not isinstance(begin, MediaControlPosition):
begin=MediaControlPosition(origin=PositionOrigin.AbsolutePosition, key=PositionKey.MediaTime, value=long(begin))
if not isinstance(end, MediaControlPosition):
@@ -116,6 +138,8 @@ class MediaControl:
mediacontrol_display_text(self, message, begin, end, e)
def get_stream_information(self, key=PositionKey.MediaTime):
+ """Return information about the stream.
+ """
e=MediaControlException()
return mediacontrol_get_stream_information(self, key, e).contents
More information about the vlc-devel
mailing list