libvlc-android-sample | This is a sample application demonstrating the use
kandi X-RAY | libvlc-android-sample Summary
kandi X-RAY | libvlc-android-sample Summary
This is a sample application demonstrating the use of libVLC on Android. This repository contains only sample code, and the libVLC on Android sdk (the LibVLC AAR) must be built and placed into the root project folder.
Support
Quality
Security
License
Reuse
Top functions reviewed by kandi - BETA
- Called when the controller is destroyed
- Releases the media player
- Create the player
- Creates the player
- Override to refresh the selected item
- Refresh the adapter
- Called when the layout has changed
- Set the size of this window
- Register a DataSetObserver
- Returns true if this directory is empty
- Gets the item at a given position
- Gets the count of all files
- Initializes the video activity
- Releases the playback player
- Initializes the activity
- Set configuration changed
- Handle hardware acceleration error
- Get a TextView for the specified position
- Play a specific media at a given path
- Unregisters the data set observer
libvlc-android-sample Key Features
libvlc-android-sample Examples and Code Snippets
Community Discussions
Trending Discussions on libvlc-android-sample
QUESTION
Consider using libVLC for Android, based on the official recommended way.
I went through the compilation process without problems (but took some time).
I'd like to have the snapshot functionality, but I've found some very old (2-3 years old) threads around which states that this feature is still not available (2016) at least "not out of the box' by this thread (2014).
Snapshot functionality is available on other platforms.
Also there are some solutions where they switch from SurfaceView to TextureView.
However I prefer sticking to SurfaceView as TextureView brings some performance drawbacks (according to this topic).
Also on an official android page it's stated:
In API 24 and higher, it's recommended to implement SurfaceView instead of TextureView.
In 2014 there were only 2 dependecies of the snapshot function based on the thread I've mentioned earlier:
- enabling sout module
- enabling png as encoder
When looking the "VLC-Android" repository of VideoLAN, there is a file responsible for building libVLC.
In line 396, sout module seems to be enabled by default.
Before compilation I've enabled png as encoder in vlc/contrib/src/ffmpeg/rules.mak as pointed out in the forum.
However there is still no function related to snapshot in either org.videolan.libvlc.MediaPlayer or in org.videolan.libvlc.VLCVideoLayout.
The question is how can I create a snapshot (either into file, or into buffer) on Android with libVLC, without using TextureView? Update1:Fact1: Found the reason on why it's unavailable on Android. In VLC's core source tree, in file lib/video.c on line 145 there is the snapshot function with a massive FIXME warning:
...ANSWER
Answered 2020-Jan-06 at 03:01A few ways to go about this...
Here's a crossplatform thumbnailer example using libvlc https://code.videolan.org/mfkl/libvlcsharp-samples/blob/master/PreviewThumbnailExtractor.Skia/Program.cs It should work on Android without much editing since it doesn't use any OS specific feature in the script. Should be able to translate it to Java/Kotlin as well I guess.
There is a libvlc function that allows to take snapshot. Just go the time you want and call it. https://www.videolan.org/developers/vlc/doc/doxygen/html/group__libvlc__video.html#ga9b0a3870ce962aa0358050b2d5a59143
In VLC Android, the medialibrary now manages thumbnails.
LibVLC 4 now bundles a thumbnailer https://github.com/videolan/vlc/blob/d40eb012b10cc355ea9ad7a13eaf494b8e826d78/include/vlc/libvlc_media.h#L845
Good luck.
Community Discussions, Code Snippets contain sources that include Stack Exchange Network
Vulnerabilities
No vulnerabilities reported
Install libvlc-android-sample
An up-to-date Linux distribution.
This is because VLC (and VLC for Android) uses autotools and make in order to be portable on so many diverse platforms.
[VirtualBox](http://www.virtualbox.org/) is always an option if Linux is not available natively on the computer.
Android NDK r10e
Android SDK
Android Studio
[Other software](https://wiki.videolan.org/AndroidCompile#Requirements) listed in the compile guide. First build VLC for Android, by following [AndroidCompile](https://wiki.videolan.org/AndroidCompile). Copy ```libvlc/build/outputs/aar/libvlc-3.0.0.aar``` to the same directory as this README and rename it to ```libvlc.aar```. Either build in Android Studio, or from the command line with Gradle: ```./gradlew assembleDebug```
Support
Reuse Trending Solutions
Find, review, and download reusable Libraries, Code Snippets, Cloud APIs from over 650 million Knowledge Items
Find more librariesStay Updated
Subscribe to our newsletter for trending solutions and developer bootcamps
Share this Page