Comments (14)
I need a lot of things too.
http://berry120.blogspot.com/2011/07/using-vlcj-for-video-reliably-with-out.html
from vlcj.
Thank you, I used this to base my class.
But the problem is: The vlcj Api changed.
Sorry for "I need", my English is not so good. :(.
Can I send to you my implementation?
This use sockets, vlcj 2.0, and works in Mac, maybe you can use it.
from vlcj.
Ah, I forgot that the linked article was for an earlier version, sorry about that. The same principles apply though, you pass your native component id to your remote process and your remote process creates a media player with that id in a ComponentIdVideoSurface, instead of a CanvasVideoSurface.
Out of process players is an advanced concept, it can be difficult to do it properly, and unfortunately I do not offer any open source solution for it.
from vlcj.
I know :(.
so... to use ComponentIdVideoSurface I did it:
factory.newVideoSurface(canvasId).attach(LibVlc.INSTANCE, player);
But it didn't works.
EmbeddedPlayer don't have any method to works with ComponentIdVideoSurface.
Any class use it really...
from vlcj.
OK, this might be an API problem. I will re-open this.
from vlcj.
Thank you again! :)
I will watch the project, if you change your mind I give to you my OutOfProcess code :),
it´s so Beautiful :D.
from vlcj.
Thank you, but I have my own solution for out-of-process.
However, you are free to fork the vlcj github repository and include your beautiful code if you so wish.
from vlcj.
Give me! :D,
Is it only for commercial clients? :(
from vlcj.
Out of process is provided under commercial terms only via a consultancy arrangement.
It's just too dependant on particular client requirements, understanding the required error handling (like automatically restarting crashed processes) and so on.
In short, it's a very tough problem and very hard to do it properly, it's a lot of work - and I have no need or incentive to give that away. I already gave you vlcj without any consideration.
from vlcj.
OK, after investigation... this is not a vlcj API issue.
I will tell you the basics...
- You need to pass a ComponentidVideoSurface to your out of process media player, constructor, setter, whatever.
- You need to override the onBeforePlay() template method in your out of process media player.
- In onBeforePlay() you call componentIdVideoSurface.attach(libvlc, this);
That's all you get. vlcj does not provide this for you.
from vlcj.
Some high-level guidance is provided here: http://www.capricasoftware.co.uk/wiki/index.php?title=Vlcj_Out_Of_Process_Media_Players
from vlcj.
@caprica I don't mean to beat a dead horse here, and I apologize if it seems that way, just trying to clarify. Are you saying to accomplish the Out of Process setup we should extend DefaultMediaPlayer or implement the EmbeddedMediaPlayer interface. Or am I missing something.
I understand that you do this as consulting work also, so I obviously understand if you decline to answer. I am sure I will figure it out eventually. This is just for a open source pet project of mine anyways, so it is not like I have a deadline. And thanks for the great library, it is pretty impressive.
Edit: Could by chance do you mean to override the method "attachVideoSurface" in DefaultEmbeddedMediaPlayer as the onBeforePlay method is final and cannot be overriden. But all it does is call attachVideoSurface.
from vlcj.
What you ultimately need to do is get the native component id for your video surface - and send that somehow to your "remote" out of process player. You can do that all sorts of ways but you need some sort of interprocess communication, you can use sockets, process streams, REST, whatever you want.
Once your out of process wrapper has the native component id, it needs to set it on the media player it contains. How you do that is up to you.
I mention overriding onBeforePlay in the DefaultMediaPlayer as that is the correct place to set the video surface. The actual HOW of it is up to you, but as long as you have the native component for your video surface you can do it.
from vlcj.
Thanks for taking the time to respond. That cleared things up for me.
from vlcj.
Related Issues (20)
- New native audio output mode HOT 1
- Add new native parse flag "no skip" with value 0x10 HOT 1
- macos: Native Discovery fails vlcj 5.0.0 and VLC 4 HOT 5
- VLC 4.0 internal api changes HOT 3
- Getting Null exception in overlayApi class, sometime when panel resize, or video finish HOT 3
- Remove native method libvlc_media_thumbnail_request_cancel HOT 1
- Can not show Embedded subtitle? HOT 1
- What causes main libvlc error: stale plugins cache: modified HOT 6
- Seeing a hard-crash when running under JDK-20 HOT 1
- Various native _retain() methods now return the retained instance HOT 3
- Issue: VlcJ 4 - EmbeddedMediaPlayerComponent black when moving between components HOT 4
- Native parsed flag changes HOT 1
- Native library changes
- what is a media-player-events thread?? HOT 8
- Is it possible to use vlcj in a sandboxed macOS app? HOT 4
- Pom is missing from 5.0.0-SNAPSHOT HOT 5
- When libvlc.so is a link to a shared library, file.exists() returns false and crashes the program HOT 1
- Apple M1 (darwin-aarch64/libvlc.dylib) not found HOT 9
- SeekableCallbackMedia stops reading buffer HOT 14
- How to release a list player instance. HOT 8
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
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.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from vlcj.