-
-
Notifications
You must be signed in to change notification settings - Fork 4
libvlc.Medium.Constructor
Protected Sub Constructor(FileDescriptor As Integer)
Sub Constructor(AddRef As libvlc.Medium)
Protected Sub Constructor(FromPtr As Ptr, AddRef As Boolean)
Sub Constructor(FromStream As Readable) ' unsafe; see below
Name | Type | Comment |
---|---|---|
FileDescriptor | Integer | A file descriptor from which to construct the medium. |
Name | Type | Comment |
---|---|---|
AddRef | Medium |
An instance of Medium to duplicate. |
Name | Type | Comment |
---|---|---|
FromPtr | Ptr | A pointer to a libvlc_media_t structure. |
AddRef | Boolean | If True , the structure's reference count is incremented. |
Name | Type | Comment |
---|---|---|
FromStream | Readable |
A Readable object from which media data will be read. (Unsafe; see below.) |
Creates a new Medium
object from something other than a FolderItem or URL (use Operator_Convert for those.)
libvlc 3.0 added the ability for applications to load media directly from memory. The Readable
parameter should refer to the object from which the raw media data will be read. Unfortunately, this feature cannot be used safely in a Xojo application because playback occurs on a separate preemptive thread. caveat implementor.
This allows Medium
instances to be created from anything that is (or can be turned into) a Readable
object:
Dim data As MemoryBlock = GetTheDataSomeHow()
Dim bs As New BinaryStream(mb)
Dim m As New libvlc.Medium(bs)
Dim bs As BinaryStream = BinaryStream.Open(GetOpenFolderItem(""))
Dim m As New libvlc.Medium(bs)
Dim m As New libvlc.Medium(StdIn)
Note: Seeking within the media is only available when you pass a BinaryStream; other implementors of Readable
will not be seekable.
Wiki home | Project page | Bugs | Become a sponsor
Text and code examples are Copyright ©2016-24 Andrew Lambert, offered under the CC BY-SA 3.0 License.
Entry-level points of interest denoted by "☜"