Coder Social home page Coder Social logo

vlcxamarin's Introduction

VlcXamarin

Xamarin bindings library for VLC player library for Android

For more information on VLC see the Developer documentation

Find latest Java lib

Plugin is available on Nuget

Support

  • Feel free to open an issue. Make sure to use one of the templates!
  • Commercial support is available. Integration with your app or services, samples, feature request, etc. Email: [email protected]
  • Powered by: baseflow.com

Documentation

LibVLCLibVLC mLibVLC = null;
MediaPlayer mMediaPlayer = null;

if(mLibVLC == null)
{
    //Initialize VLC libs
    mLibVLC = new LibVLCLibVLC(this);
    mMediaPlayer = new MediaPlayer(mLibVLC);
}
//Create new media object
var m = new MediaLibVLC(mLibVLC, Android.Net.Uri.Parse("http://www.montemagno.com/sample.mp3"));

// Tell the media player to play the new Media.
mMediaPlayer.Media = m;

// Finally, play it!
mMediaPlayer.Play();

See the VlcXamarin.Sample sample app for more details.

Acknowledgements

  • thefex for helping with several issue's

License

  • VlcXamarin plugin is licensed under MIT

vlcxamarin's People

Contributors

beta-tank avatar martijn00 avatar thefex avatar tombby11 avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

vlcxamarin's Issues

[linker] libvlcjni.so has text relocations - app crashes

Hello there
First, thanks for putting together this great wrapper for vlc. I am trying to write an xamarin forms app for playing videos. I tried to use your library on the android part but got following error:

"[linker] libvlcjni.so has text relocations. This is wasting memory and prevents security hardening. Please fix."

It seems to work ok, if I only create a xamarin android solution.
Thanks for your help,
Roger

Video audio only, how to add view?

Hi,
im able to get the sound of movies. Since i did not added an view yet, theres no video displayed.
Did someone may got a video view working?
Videooutput should be something within:

mMediaPlayer.VLCVout.xxx

SIGSEGV Error When Initialising LibVLCLibVLC Object

Hi,

Great job of having the Xamarin bindings for libvlc.

While I managed to get this to successfully run the sample project which plays the MP3 file, I am getting a SIGSEGV crash when I implemented it for video playing using TextureView which I have enabled hardware acceleration. Strangely enough, the crash occurs when the LibVLCLibVLC object is initialised.

/************** The Code **************/

_libVLC = new Org.Videolan.Libvlc.LibVLCLibVLC(); // error occurs here

_libVLC.SetOnHardwareAccelerationError(this);
_vv.KeepScreenOn = true;

// Create Media Player
_mediaPlayer = new Org.Videolan.Libvlc.MediaPlayer(_libVLC);

// Set up video output
Org.Videolan.Libvlc.IVLCVout vout = _mediaPlayer.VLCVout;
vout.SetVideoView(_vv);
vout.AttachViews();

Org.Videolan.Libvlc.MediaLibVLC m = new Org.Videolan.Libvlc.MediaLibVLC(_libVLC, this.selectedCamera.RemoteURLMobile);
_mediaPlayer.Media = m;
_mediaPlayer.Play();

/************** The Error **************/

The following is the error I am getting:

[mono-rt] Stacktrace:
[mono-rt]
[mono-rt]
[mono-rt] Attempting native Android stacktrace:
[mono-rt]
[mono-rt] at ???+0 [0x0]
[mono-rt]
[mono-rt] =================================================================
[mono-rt] Got a SIGSEGV while executing native code. This usually indicates
[mono-rt] a fatal error in the mono runtime or one of the native libraries
[mono-rt] used by your application.
[mono-rt] =================================================================
[mono-rt]
[libc] Fatal signal 11 (SIGSEGV) at 0xe8e8ffe8 (code=-387383320), thread 1480 (wer_for_Android)

Any idea what's causing this? My emulator is using armbi-v7a. Target framework is JellyBean 4.1.

I have been pulling my hair for the past 2 days trying to fix this.

Regards,
Cris

How to play a video

Hello Martijn. I am a bit stuck with your plugin. I can't play any video with it. Could you give me an example on how to do this?
Thanks for your help, Roger

Error in sample

Error message:

VlcXamarin\VlcXamarin.Sample\obj\Debug\android\src\mono\org\videolan\libvlc\VLCEvent_ListenerImplementor.java(31,31): 
Error:  error: package org.videolan.libvlc.VLCEvent does not exist
    org.videolan.libvlc.VLCEvent.Listener

Error appears in:

public class VLCEvent_ListenerImplementor
extends java.lang.Object
implements
    mono.android.IGCUserPeer,
    org.videolan.libvlc.VLCEvent.Listener

can this record phone camera?

Great thanks. It works very well in my Xamarin project playing rtsp links of cameras.

I wonder whether it can access and record the phone camera itself. I'm doing a project which needs to record phone camera and generate HLS segments for live streaming. MediaRecorder cannot do that. So I turn to vlc. Any suggestions are welcome, thanks.

Crash when debugging

When add a breakpoint after the Initialize VLC libs crash the app, it is impossible to debug

VLC Events in VlcXamarin

Hi there,

Is there a way assign custom event handlers during the different parts the lifecycle in playing the video? i.e. buffering, opening etc.

I think the C++ libvlc allows u to do so and nVLC for .net lets you set the event handle although limited types of events.

Many thanks.

Cannot find libvlcjni.so

Hello,

First of all, thank you for the project. I'm having an issue when running an app that I'm testing where it says that cannot find some libraries:

08-08 04:06:18.552 W/VLC/LibVLC(10611): Unable to load the anw library: java.lang.UnsatisfiedLinkError: dalvik.system.PathClassLoader[DexPathList[[zip file "/data/app/MyApp.MyApp-1/base.apk"],nativeLibraryDirectories=[/data/app/MyApp.MyApp-1/lib/x86, /vendor/lib, /system/lib]]] couldn't find "libanw.21.so"

08-08 04:06:18.552 E/VLC/LibVLC(10611): Can't load vlcjni library: java.lang.UnsatisfiedLinkError: dalvik.system.PathClassLoader[DexPathList[[zip file "/data/app/MyApp.MyApp-1/base.apk"],nativeLibraryDirectories=[/data/app/MyApp.MyApp-1/lib/x86, /vendor/lib, /system/lib]]] couldn't find "libvlcjni.so"

What do you think that can be happening? Any suggestions?

Thank you again.

Crash when starting a streaming video

Hello,

thanks for this interesting sample! It could be extremly useful for me if I could get it working...

On my android 4.4 attached via USB each time I start a Streaming Video (that is working in Chrome)
the sample app crashes. I am using the sample app just changed the link to an exisiting MJPEG stream.

From the Visual Studio 2015 Output I guess this could cause the Problem:

class OutputMix interface 0 requested but unavailable MPH=43

Can you please help? Thanks :-)

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.