Coder Social home page Coder Social logo

OutOfProcess for vlcj > 1.1.5 about vlcj HOT 14 CLOSED

caprica avatar caprica commented on September 26, 2024
OutOfProcess for vlcj > 1.1.5

from vlcj.

Comments (14)

caprica avatar caprica commented on September 26, 2024

I need a lot of things too.

http://berry120.blogspot.com/2011/07/using-vlcj-for-video-reliably-with-out.html

from vlcj.

dyorgio avatar dyorgio commented on September 26, 2024

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.

caprica avatar caprica commented on September 26, 2024

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.

dyorgio avatar dyorgio commented on September 26, 2024

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.

caprica avatar caprica commented on September 26, 2024

OK, this might be an API problem. I will re-open this.

from vlcj.

dyorgio avatar dyorgio commented on September 26, 2024

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.

caprica avatar caprica commented on September 26, 2024

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.

dyorgio avatar dyorgio commented on September 26, 2024

Give me! :D,
Is it only for commercial clients? :(

from vlcj.

caprica avatar caprica commented on September 26, 2024

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.

caprica avatar caprica commented on September 26, 2024

OK, after investigation... this is not a vlcj API issue.

I will tell you the basics...

  1. You need to pass a ComponentidVideoSurface to your out of process media player, constructor, setter, whatever.
  2. You need to override the onBeforePlay() template method in your out of process media player.
  3. In onBeforePlay() you call componentIdVideoSurface.attach(libvlc, this);

That's all you get. vlcj does not provide this for you.

from vlcj.

caprica avatar caprica commented on September 26, 2024

Some high-level guidance is provided here: http://www.capricasoftware.co.uk/wiki/index.php?title=Vlcj_Out_Of_Process_Media_Players

from vlcj.

jkschoen avatar jkschoen commented on September 26, 2024

@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.

caprica avatar caprica commented on September 26, 2024

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.

jkschoen avatar jkschoen commented on September 26, 2024

Thanks for taking the time to respond. That cleared things up for me.

from vlcj.

Related Issues (20)

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.