点击或拖拽改变大小

Media 类

Media is an abstract representation of a playable media. It can be a network stream or a local video/audio file.
继承层次

命名空间:  LibVLCSharp.Shared
程序集:  CPF.Vlc (在 CPF.Vlc.dll 中) 版本:0.8.8.5
语法
C#
public class Media : Internal

Media 类型公开以下成员。

构造函数
  名称说明
公共方法Media(MediaList)
Create a media from a media list
公共方法Media(LibVLC, MediaInput, String)
Create a media from a MediaInput requires libvlc 3.0 or higher
公共方法Media(LibVLC, Int32, String)
Create a media for an already open file descriptor. The file descriptor shall be open for reading(or reading and writing). Regular file descriptors, pipe read descriptors and character device descriptors(including TTYs) are supported on all platforms. Block device descriptors are supported where available. Directory descriptors are supported on systems that provide fdopendir(). Sockets are supported on all platforms where they are file descriptors, i.e.all except Windows. \note This library will not automatically close the file descriptor under any circumstance.Nevertheless, a file descriptor can usually only be rendered once in a media player.To render it a second time, the file descriptor should probably be rewound to the beginning with lseek().
公共方法Media(LibVLC, Uri, String)
Media Constructs a libvlc Media instance
公共方法Media(LibVLC, String, FromType, String)
Media Constructs a libvlc Media instance
Top
属性
  名称说明
公共属性Duration
Get duration (in ms) of media descriptor object item.
公共属性IsParsed
Return true is the media descriptor object is parsed
公共属性Mrl
Get the media resource locator (mrl) from a media descriptor object
公共属性NativeReference
The pointer to the native code representation of this object
(继承自 Internal。)
公共属性ParsedStatus
Get Parsed status for media descriptor object.
公共属性Slaves
Get a media descriptor's slave list
公共属性State
Get current VLCState of media descriptor object.
公共属性Statistics
Get the current statistics about the media structure that contain the statistics about the media
公共属性SubItems

Get subitems of media descriptor object. This will increment

the reference count of supplied media descriptor object. Use

libvlc_media_list_release() to decrement the reference counting.

公共属性Tracks
Get media descriptor's elementary streams description

address to store an allocated array of Elementary Streams

descriptions (must be freed with libvlc_media_tracks_release

by the caller) [OUT]

返回值

类型:
the number of Elementary Streams (zero on error)
备注

Note, you need to call libvlc_media_parse() or play the media at least once

before calling this function.

Not doing this will result in an empty array.

LibVLC 2.1.0 and later.

公共属性Type
The type of the media
Top
方法
  名称说明
公共方法AddOption(String)
Add an option to the media.
公共方法AddOption(MediaConfiguration)
Convenience method for crossplatform media configuration
公共方法AddOptionFlag
Add an option to the media with configurable flags.
公共方法AddSlave
Add a slave to the current media.
公共方法ClearSlaves

Clear all slaves previously added by libvlc_media_slaves_add() or

internally.

公共方法CodecDescription
Get a media's codec description
公共方法Dispose
Dispose of this instance
(继承自 Internal。)
受保护的方法Dispose(Boolean)
Dispose of this media
(重写 InternalDispose(Boolean).)
公共方法Duplicate
Duplicate a media descriptor object.
公共方法Equals
Equality override for this media instance
(重写 ObjectEquals(Object).)
受保护的方法Finalize (继承自 Object。)
公共方法GetHashCode
Custom hascode implemenation for this Media instance
(重写 ObjectGetHashCode.)
公共方法GetType (继承自 Object。)
受保护的方法MemberwiseClone (继承自 Object。)
公共方法Meta
Read the meta of the media.
公共方法Parse
Parse the media asynchronously with options. It uses a flag to specify parse options (see MediaParseOptions). All these flags can be combined. By default, the media is parsed only if it's a local file.

Note: Parsing can be aborted with ParseStop().

公共方法ParseStop
Stop the parsing of the media
公共方法SaveMeta
Save the meta previously set
公共方法SetMeta

Set the meta of the media (this function will not save the meta, call

libvlc_media_save_meta in order to save the meta)

公共方法ToString (继承自 Object。)
Top
事件
  名称说明
公共事件DurationChanged
The duration of the media changed
公共事件MediaFreed
The media was freed on the native side
公共事件MetaChanged
The meta information changed
公共事件ParsedChanged
The parsing status changed
公共事件StateChanged
The media state changed
公共事件SubItemAdded
A sub item was added to this media's MediaList
公共事件SubItemTreeAdded
A sub item tree was added to this media
Top
字段
  名称说明
受保护的字段IsDisposed
Indicates whether this object has already been disposed
(继承自 Internal。)
受保护的字段Release
Release native resources by calling this C function
(继承自 Internal。)
Top
扩展方法
  名称说明
公共扩展器方法ConvertTo
类型转换
(由 ObjectExtenstions 定义。)
公共扩展器方法Delay
延迟操作
(由 ObjectExtenstions 定义。)
公共扩展器方法Equal
对象是否相等
(由 ObjectExtenstions 定义。)
公共扩展器方法GetCreationCode (由 ObjectExtenstions 定义。)
公共扩展器方法GetPropretyValue
获取对象属性值
(由 ObjectExtenstions 定义。)
公共扩展器方法GetValue
快速动态获取对象的属性值
(由 FastReflectionExtensions 定义。)
公共扩展器方法Invoke
快速动态调用对象的方法
(由 FastReflectionExtensions 定义。)
公共扩展器方法SetPropretyValue
设置属性值
(由 ObjectExtenstions 定义。)
公共扩展器方法SetValue
快速动态设置对象的属性值
(由 FastReflectionExtensions 定义。)
Top
参见