点击或拖拽改变大小

MediaPlayer 方法

MediaPlayer 类型公开以下成员。

方法
  名称说明
公共方法AddSlave
Add a slave to the current media player. note If the player is playing, the slave will be added directly. This call will also update the slave list of the attached VLC::Media.
公共方法AdjustFloat
Get adjust option float value
公共方法AdjustInt
Get integer adjust option.
公共方法ChapterCountForTitle
Get the number of chapters in title, or -1
公共方法ChapterDescription
Get the description of available chapters for specific title.
公共方法Cursor
Get the mouse pointer coordinates over a video. Coordinates are expressed in terms of the decoded video resolution, not in terms of pixels on the screen/viewport (to get the latter, you can query your windowing system directly). Either of the coordinates may be negative or larger than the corresponding dimension of the video, if the cursor is outside the rendering area. Warning The coordinates may be out-of-date if the pointer is not located on the video rendering area. LibVLC does not track the pointer if it is outside of the video widget. Note LibVLC does not support multiple pointers(it does of course support multiple input devices sharing the same pointer) at the moment.
公共方法Dispose
Dispose of this instance
(继承自 Internal。)
受保护的方法Dispose(Boolean)
Dispose override Effectively stops playback and disposes a media if any
(重写 InternalDispose(Boolean).)
公共方法Equals
Equals override based on the native instance reference
(重写 ObjectEquals(Object).)
受保护的方法Finalize (继承自 Object。)
公共方法FullChapterDescriptions
Get the full description of available chapters.
公共方法GetHashCode
Custom hascode implemenation for this MediaPlayer instance
(重写 ObjectGetHashCode.)
公共方法GetType (继承自 Object。)
公共方法LogoInt
Get integer logo option.
公共方法MarqueeInt
Get an integer marquee option value
公共方法MarqueeString
Get a string marquee option value
受保护的方法MemberwiseClone (继承自 Object。)
公共方法Navigate
Navigate through DVD Menu
公共方法NextChapter
Set next chapter (if applicable)
公共方法NextFrame
Display the next frame (if supported)
公共方法Pause
Toggle pause (no effect if there is no media)
公共方法Play
Start playback with Media that is set If playback was already started, this method has no effect
公共方法Play(Media)
Set media and start playback
公共方法PreviousChapter
Set previous chapter (if applicable)
公共方法SetAdjustFloat
Set adjust option as float. Options that take a different type value are ignored.
公共方法SetAdjustInt
Set adjust option as integer. Options that take a different type value are ignored. Passing libvlc_adjust_enable as option value has the side effect of starting (arg !0) or stopping (arg 0) the adjust filter.
公共方法SetAudioCallbacks
Sets callbacks and private data for decoded audio. Use libvlc_audio_set_format() or libvlc_audio_set_format_callbacks() to configure the decoded audio format. Note: The audio callbacks override any other audio output mechanism. If the callbacks are set, LibVLC will not output audio in any way.
公共方法SetAudioDelay
Set current audio delay. The audio delay will be reset to zero each time the media changes.
公共方法SetAudioFormat
Sets a fixed decoded audio format. This only works in combination with libvlc_audio_set_callbacks(), and is mutually exclusive with libvlc_audio_set_format_callbacks().
公共方法SetAudioFormatCallback
Sets decoded audio format via callbacks. This only works in combination with libvlc_audio_set_callbacks().
公共方法SetAudioOutput
Selects an audio output module. Note: Any change will take effect only after playback is stopped and restarted. Audio output cannot be changed while playing.
公共方法SetAudioTrack
Set current audio track.
公共方法SetChannel
Set current audio channel.
公共方法SetDeinterlace
Enable or disable deinterlace filter
公共方法SetEqualizer
Apply new equalizer settings to a media player. The equalizer is first created by invoking libvlc_audio_equalizer_new() or libvlc_audio_equalizer_new_from_preset(). It is possible to apply new equalizer settings to a media player whether the media player is currently playing media or not. Invoking this method will immediately apply the new equalizer settings to the audio output of the currently playing media if there is any. If there is no currently playing media, the new equalizer settings will be applied later if and when new media is played. Equalizer settings will automatically be applied to subsequently played media. To disable the equalizer for a media player invoke this method passing NULL for the p_equalizer parameter. The media player does not keep a reference to the supplied equalizer so it is safe for an application to release the equalizer reference any time after this method returns.
公共方法SetLogoInt
Set logo option as integer. Options that take a different type value are ignored. Passing libvlc_logo_enable as option value has the side effect of starting (arg !0) or stopping (arg 0) the logo filter.
公共方法SetLogoString
Set logo option as string. Options that take a different type value are ignored.
公共方法SetMarqueeInt
Enable, disable or set an integer marquee option Setting libvlc_marquee_Enable has the side effect of enabling (arg !0) or disabling (arg 0) the marq filter.
公共方法SetMarqueeString
Enable, disable or set an string marquee option
公共方法SetOutputDevice
Configures an explicit audio output device. If the module paramater is NULL, audio output will be moved to the device specified by the device identifier string immediately.This is the recommended usage. A list of adequate potential device strings can be obtained with AudioOutputDeviceEnum However passing NULL is supported in LibVLC version 2.2.0 and later only; in earlier versions, this function would have no effects when the module parameter was NULL. If the module parameter is not NULL, the device parameter of the corresponding audio output, if it exists, will be set to the specified string. A list of adequate potential device strings can be obtained with AudioOutputDevices(String)
公共方法SetPause
Pause or resume (no effect if there is no media). version LibVLC 1.1.1 or later
公共方法SetRate
Set movie play rate
公共方法SetRenderer
Set a renderer to the media player.
公共方法SetRole
Sets the media role.

version LibVLC 3.0.0 and later.

公共方法SetSpu
Set Spu (subtitle)
公共方法SetSpuDelay
Set the subtitle delay. This affects the timing of when the subtitle will be displayed. Positive values result in subtitles being displayed later, while negative values will result in subtitles being displayed earlier. The subtitle delay will be reset to zero each time the media changes.
公共方法SetVideoCallbacks
Set callbacks and private data to render decoded video to a custom area in memory. Use libvlc_video_set_format() or libvlc_video_set_format_callbacks() to configure the decoded format. Warning Rendering video into custom memory buffers is considerably less efficient than rendering in a custom window as normal. For optimal perfomances, VLC media player renders into a custom window, and does not use this function and associated callbacks. It is highly recommended that other LibVLC-based application do likewise. To embed video in a window, use libvlc_media_player_set_xid() or equivalent depending on the operating system. If window embedding does not fit the application use case, then a custom LibVLC video output display plugin is required to maintain optimal video rendering performances. The following limitations affect performance: Hardware video decoding acceleration will either be disabled completely, or require(relatively slow) copy from video/DSP memory to main memory. Sub-pictures(subtitles, on-screen display, etc.) must be blent into the main picture by the CPU instead of the GPU. Depending on the video format, pixel format conversion, picture scaling, cropping and/or picture re-orientation, must be performed by the CPU instead of the GPU. Memory copying is required between LibVLC reference picture buffers and application buffers (between lock and unlock callbacks).
公共方法SetVideoFormat
Set decoded video chroma and dimensions. This only works in combination with MediaPlayer::setCallbacks() , and is mutually exclusive with MediaPlayer::setFormatCallbacks()
公共方法SetVideoFormatCallbacks
Set decoded video chroma and dimensions. This only works in combination with libvlc_video_set_callbacks().
公共方法SetVideoTitleDisplay
Set if, and how, the video title will be shown when media is played.
公共方法SetVideoTrack
Set video track.
公共方法SetVolumeCallback
Set callbacks and private data for decoded audio. This only works in combination with libvlc_audio_set_callbacks(). Use libvlc_audio_set_format() or libvlc_audio_set_format_callbacks() to configure the decoded audio format.
公共方法Size
Get the pixel dimensions of a video.
公共方法Stop
Stop the playback (no effect if there is no media) 必须在线程里调用,否则容易死锁 warning: This is synchronous, and will block until all VLC threads have been joined. Calling this from a VLC callback is a bound to cause a deadlock.
公共方法TakeSnapshot
Take a snapshot of the current video window. If i_width AND i_height is 0, original size is used. If i_width XOR i_height is 0, original aspect-ratio is preserved.
公共方法ToggleFullscreen
Toggle fullscreen status on non-embedded video outputs.

warning: The same limitations applies to this function as to MediaPlayer::setFullscreen()

公共方法ToggleMute
Toggle mute status. Warning Toggling mute atomically is not always possible: On some platforms, other processes can mute the VLC audio playback stream asynchronously. Thus, there is a small race condition where toggling will not work. See also the limitations of libvlc_audio_set_mute().
公共方法ToggleTeletext
Toggle teletext transparent status on video output.
公共方法ToString (继承自 Object。)
公共方法UnsetEqualizer
unsetEqualizer disable equalizer for this media player
公共方法UpdateViewpoint
Update the video viewpoint information. The values are set asynchronously, it will be used by the next frame displayed. It is safe to call this function before the media player is started. LibVLC 3.0.0 and later
Top
扩展方法
  名称说明
公共扩展器方法ConvertTo
类型转换
(由 ObjectExtenstions 定义。)
公共扩展器方法Delay
延迟操作
(由 ObjectExtenstions 定义。)
公共扩展器方法Equal
对象是否相等
(由 ObjectExtenstions 定义。)
公共扩展器方法GetCreationCode (由 ObjectExtenstions 定义。)
公共扩展器方法GetPropretyValue
获取对象属性值
(由 ObjectExtenstions 定义。)
公共扩展器方法GetValue
快速动态获取对象的属性值
(由 FastReflectionExtensions 定义。)
公共扩展器方法Invoke
快速动态调用对象的方法
(由 FastReflectionExtensions 定义。)
公共扩展器方法SetPropretyValue
设置属性值
(由 ObjectExtenstions 定义。)
公共扩展器方法SetValue
快速动态设置对象的属性值
(由 FastReflectionExtensions 定义。)
Top
参见