MediaPlayer 属性 |
MediaPlayer 类型公开以下成员。
名称 | 说明 | |
---|---|---|
AspectRatio |
Get/set current video aspect ratio.
Set to null to reset to default
Invalid aspect ratios are ignored.
| |
AudioDelay |
Get current audio delay (microseconds).
| |
AudioOutputDeviceEnum |
Gets a list of potential audio output devices
Not all audio outputs support enumerating devices. The audio output may be functional even if the list is empty (NULL).
The list may not be exhaustive. Some audio output devices in the list might not actually work in some circumstances.
By default, it is recommended to not specify any explicit audio device.
| |
AudioTrack |
Get current audio track ID or -1 if no active input.
| |
AudioTrackCount |
Get the number of available audio tracks (int), or -1 if unavailable
| |
AudioTrackDescription |
Retrive the audio track description
| |
CanPause |
True if the media player can pause
| |
Channel |
Get current audio channel.
| |
Chapter |
Set movie chapter (if applicable).
Get the movie chapter number currently playing, or -1 if there is no media.
| |
ChapterCount |
Get the number of chapters in movie, or -1.
| |
CropGeometry |
Get/Set current crop filter geometry.
Empty string to unset
| |
EnableHardwareDecoding |
Enable/disable hardware decoding in a crossplatform way.
| |
EnableKeyInput |
Enable or disable key press events handling, according to the LibVLC hotkeys configuration.
By default and for historical reasons, keyboard events are handled by the LibVLC video widget.
Note
On X11, there can be only one subscriber for key press and mouse click events per window.
If your application has subscribed to those events for the X window ID of the video widget,
then LibVLC will not be able to handle key presses and mouse clicks in any case.
Warning
This function is only implemented for X11 and Win32 at the moment.
true to handle key press events, false to ignore them.
| |
EnableMouseInput |
Enable or disable mouse click events handling.
By default, those events are handled. This is needed for DVD menus to work, as well as a few video filters such as "puzzle".
Warning
This function is only implemented for X11 and Win32 at the moment.
true to handle mouse click events, false to ignore them.
| |
FileCaching |
Caching value for local files, in milliseconds [0 .. 60000ms]
| |
Fps |
Get the frames per second (fps) for this playing movie, or 0 if unspecified
| |
Fullscreen |
Enable or disable fullscreen.
Warning, TL;DR version : Unless you know what you're doing, don't use this.
Put your VideoView inside a fullscreen control instead, refer to your platform documentation.
Warning, long version :
With most window managers, only a top-level windows can be in full-screen mode.
Hence, this function will not operate properly if libvlc_media_player_set_xwindow() was used to embed the video in a non-top-level window.
In that case, the embedding window must be reparented to the root window before fullscreen mode is enabled.
You will want to reparent it back to its normal parent when disabling fullscreen.
return the fullscreen status (boolean)
| |
Hwnd |
Set a Win32/Win64 API window handle (HWND) where the media player
should render its video output. If LibVLC was built without
Win32/Win64 API output support, then this has no effects.
Get the Windows API window handle (HWND) previously set
| |
IsPlaying |
return true if the media player is playing, false otherwise
| |
IsSeekable |
True if the media player can seek
| |
Length |
The movie length (in ms), or -1 if there is no media.
| |
Media |
Get the media used by the media_player.
Set the media that will be used by the media_player.
If any, previous md will be released.
Note: It is safe to release the Media on the C# side after it's been set on the MediaPlayer successfully
| |
Mute |
Get current mute status.
Set mute status.
Warning
This function does not always work.
If there are no active audio playback stream, the mute status might not be available.
If digital pass-through (S/PDIF, HDMI...) is in use, muting may be unapplicable.
Also some audio output plugins do not support muting at all.
Note
To force silent playback, disable all audio tracks. This is more efficient and reliable than mute.
| |
NativeReference |
The pointer to the native code representation of this object
(继承自 Internal。) | |
NetworkCaching |
Caching value for network resources, in milliseconds [0 .. 60000ms]
| |
NsObject |
Get the NSView handler previously set
return the NSView handler or 0 if none where set
Set the NSView handler where the media player should render its video output.
Use the vout called "macosx".
The drawable is an NSObject that follow the
VLCOpenGLVideoViewEmbedding protocol: VLCOpenGLVideoViewEmbedding NSObject
Or it can be an NSView object.
If you want to use it along with Qt4 see the QMacCocoaViewContainer.
Then the following code should work: { NSView *video = [[NSView
alloc] init]; QMacCocoaViewContainer *container = new
QMacCocoaViewContainer(video, parent);
libvlc_media_player_set_nsobject(mp, video); [video release]; }
You can find a live example in VLCVideoView in VLCKit.framework.
| |
OutputDevice |
Get the current audio output device identifier.
This complements SetOutputDevice(String, String)
warning The initial value for the current audio output device identifier
may not be set or may be some unknown value.A LibVLC application should
compare this value against the known device identifiers (e.g.those that
were previously retrieved by a call to AudioOutputDeviceEnum or
AudioOutputDevices(String)) to find the current audio output device.
It is possible that the selected audio output device changes(an external
change) without a call to SetOutputDevice(String, String).That may make this
method unsuitable to use if a LibVLC application is attempting to track
dynamic audio device changes as they happen.
| |
Position |
Set movie position as percentage between 0.0 and 1.0. This has no
effect if playback is not enabled. This might not work depending on
the underlying input format and protocol.
Get movie position as percentage between 0.0 and 1.0.
| |
ProgramScambled |
True if the current program is scrambled
LibVLC 2.2.0 or later
| |
Rate |
Get the requested movie play rate.
warning
Depending on the underlying media, the requested rate may be
different from the real playback rate.
| |
Role | Gets the media role.
version LibVLC 3.0.0 and later.
| |
Scale |
Get/Set the current video scaling factor. See also MediaPlayer::setScale() .
That is the ratio of the number of
pixels on screen to the number of pixels in the original decoded video
in each dimension.Zero is a special value; it will adjust the video
to the output window/drawable(in windowed mode) or the entire screen.
Note that not all video outputs support scaling.
| |
Spu |
The current video subtitle track
| |
SpuCount |
Get the number of available video subtitles.
| |
SpuDelay |
Get the current subtitle delay.
| |
SpuDescription |
Retrieve SpuDescription in a TrackDescription struct
| |
State |
Get the current state of the media player (playing, paused, ...)
| |
Teletext |
Get current teletext page requested.
Set new teletext page to retrieve.
| |
Time |
Set the movie time (in ms). This has no effect if no media is being
played. Not all formats and protocols support this.
Get the movie time (in ms), or -1 if there is no media.
| |
Title |
Set movie title number to play
Get movie title number currently playing, or -1
| |
TitleCount |
The title number count, or -1
| |
TitleDescription |
Get the description of available titles.
| |
VideoTrack |
Get current video track ID (int) or -1 if no active input.
| |
VideoTrackCount |
Get number of available video tracks.
| |
VideoTrackDescription |
Get the description of available video tracks.
| |
Viewpoint |
Current 360 viewpoint of this mediaplayer.
Update with UpdateViewpoint(Single, Single, Single, Single, Boolean) | |
Volume |
Get/Set the volume in percents (0 = mute, 100 = 0dB)
| |
VoutCount |
Get the number of video outputs
| |
WillPlay |
True if the player is able to play
| |
XWindow |
Set an X Window System drawable where the media player should render its video output.
The call takes effect when the playback starts. If it is already started, it might need to be stopped before changes apply.
If LibVLC was built without X11 output support, then this function has no effects.
By default, LibVLC will capture input events on the video rendering area.
Use libvlc_video_set_mouse_input() and libvlc_video_set_key_input() to disable that and deliver events to the parent window / to the application instead.
By design, the X11 protocol delivers input events to only one recipient.
Warning:
The application must call the XInitThreads() function from Xlib before libvlc_new(), and before any call to XOpenDisplay() directly
or via any other library.Failure to call XInitThreads() will seriously impede LibVLC performance.
Calling XOpenDisplay() before XInitThreads() will eventually crash the process. That is a limitation of Xlib.
uint: X11 window ID
|