Giter Site home page Giter Site logo

charonn0 / rb-libvlc Goto Github PK

View Code? Open in Web Editor NEW
11.0 5.0 3.0 1.08 MB

A Realbasic and Xojo binding to libvlc

Home Page: http://www.boredomsoft.org/rb-libvlc.bs

License: BSD 3-Clause "New" or "Revised" License

REALbasic 100.00%
realbasic xojo media-player libvlc

rb-libvlc's Introduction

RB-libvlc

libvlc is the open-source multimedia library that powers VLC Media Player. RB-libvlc is libvlc binding for Realbasic and Xojo ("classic" framework) projects.

RB-libvlc under Windows 10

This screen shot depicts the RB-libvlc demo running on Windows 10

Highlights

Synopsis

There are two main modes of operation: using the VLCPlayer class to play media without a GUI and the VLCMediaPlayer which provides a GUI. libvlc also supports playlists through a separate PlayList interface.

Object Class Comment
VLCPlayer A media player session.
VLCMediaPlayer A media player session embedded in a Canvas control.
Medium A media resource such as a file or internet stream.
Equalizer An audio equalizer.
PlayList A list of Medium objects.
ListPlayer A specialized player for playing PlayLists.

To play a media file or stream, create an instance of the Medium class by converting from a URL(as string) or a FolderItem.

Example

 Dim vlc As New VLCPlayer
 vlc.Media = GetFolderItem("C:\example\music.mp3")
 vlc.Play()

Playback occurs asynchronously on a separate preemptive thread. You can determine the player state by querying the CurrentState property and/or by handling the ChangedState event.

How to incorporate libvlc into your Realbasic/Xojo project

Import the libvlc module

  1. Download the RB-libvlc project either in ZIP archive format or by cloning the repository with your Git client.
  2. Open the RB-libvlc project in REALstudio or Xojo. Open your project in a separate window.
  3. Copy the libvlc module into your project and save.

Ensure the VLC shared libraries are installed

Most systems do not have VLC (or libvlc) installed by default. You will need to ship the all the necessary files with your application. On Windows, these are libvlc.dll, libvlccore.dll, and the desired plugins in the plugins directory. For macOS refer to this forum thread for how to properly bundle the dylibs with your app.

RB-libvlc will raise a PlatformNotSupportedException when used if all required DLLs/SOs/DyLibs are not available at runtime.

rb-libvlc's People

Contributors

charonn0 avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar

rb-libvlc's Issues

VLCInstance.Constructor(Integer,String) can't actually use its parameters

The argv As String parameter is an array of command line arguments, but since arrays can't be passed to declares only using zero parameters is currently possible. Given that many libvlc features may require passing command line arguments to a new instance, this limitation is quite... limiting.

Cannot get to run under Windows. Have not tested other OS.

Tried as 32bit and 64bit with respective dlls. Built the example and copied libvlc.dll and libvlccore.dll to the Libs folder. Gets the error "Unable to construct a VLC instance". Have monitored the system and it is opening the .dll files.

Have you tested on windows? If so x86 or x64 and what version of the .dll did you use?

VLCLog event is fubar and incorrect

The VLCLog event is currently raised only on the original VLCInstance instance, and never on other instances. This is wrong; VLCLog events should be raised on the appropriate instance of VLCInstance according to the Context parameter of the callback.

VLCLog parameters are not interpreted correctly

The VLCInstance.VLCLog event is defined as follows:

Event Sub VLCLog(Level As Integer, Context As Ptr, Format As String, Args As String)

Format and Args are supposed to be passed to a printf-like function, but printf is variadic and Args is a var_args structure of variable composition. The practical upshot is that Args is not properly processed, and the replacement tokens in Format are untouched.

Media Plays in Aeperate Window Instead of Within Application

System: Debian 11 KDE 64-bit (X Display)
VLC: 3.0.18
When playing a video using the example app the video plays in a new window. The new window is sized to the media and has the VLC logo in the header and launcher.

Setting the EmbedWithin to Window instead of RectControl made no change.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.