JVLC status

This forum is about all development around libVLC.
sherington
Cone that earned his stripes
Cone that earned his stripes
Posts: 491
Joined: 10 Sep 2008 11:57
VLC version: master
Operating System: Linux

Re: JVLC status

Postby sherington » 23 Jul 2010 18:08

Hello vlcj users,

I made release 1.1.1 of vlcj to go with the newly released vlc. Main changes are to support the new video adjustment methods and the new direct video memory access.

http://code.google.com/p/vlcj

All feedback appreciated.

adanecito
Cone that earned his stripes
Cone that earned his stripes
Posts: 151
Joined: 06 Mar 2007 17:59

Re: JVLC status

Postby adanecito » 25 Jul 2010 20:00

Hi Sherington,

I tried also sending an email directly to you via hotmail but no reply yet so leaving message here.

I downloaded your 1.1.1 version released 7/23 since I was upgrading to the latest vlc nightly builds.
I get an exception about mediaPlayer.setVideoSurface() not existing. It used to work a couple of months ago.

Seems like you implemented (sort of because you leave nativeSetVideoSurface() to us to implement) EmbeddedMediaPlayer which is returned from the MediaPlayerFactory but your Test examples use MediaPlayer so the setVideoSurface() fails.

If I use EmbeddedMediaPlayer instead of MediaPlayer your adaptor code fails
because it expects MediaPlayer.

Are you still in the middle of changes for 1.1.1 you released 7/23?

How do I work around this situation?

Thanks,
-Tony

adanecito
Cone that earned his stripes
Cone that earned his stripes
Posts: 151
Joined: 06 Mar 2007 17:59

Re: JVLC status

Postby adanecito » 25 Jul 2010 20:26

Ok I recasted the mediaPlayer object to WindowsEmbeddedMediaPlayer for the setVideoSurface() and can compile. Bad news is when creating the instance of vlc the code now hangs as if the creation is taking forever. This is new since I upgraded to vlcj 1.1.1. I will let you know what I find. Please update your test code because you might run into the same issues I am.

Thanks,
-Tony

sherington
Cone that earned his stripes
Cone that earned his stripes
Posts: 491
Joined: 10 Sep 2008 11:57
VLC version: master
Operating System: Linux

Re: JVLC status

Postby sherington » 25 Jul 2010 21:12

Ok I recasted the mediaPlayer object to WindowsEmbeddedMediaPlayer for the setVideoSurface() and can compile. Bad news is when creating the instance of vlc the code now hangs as if the creation is taking forever. This is new since I upgraded to vlcj 1.1.1. I will let you know what I find. Please update your test code because you might run into the same issues I am.

Thanks,
-Tony
I always reply to my email, so I must not have received anything from you.

I did reluctantly decide to break the API for 1.1.1 to more easily accommodate the different types of media player, that's why you had to change your client code. This is mentioned on the web-site.

D'oh. I just spotted what's wrong. For the release 1.1.1 test jar I hard-coded a plugin path to load libvlc (I swap between the official release and my own build regularly!) that will only work on my machine. I'll withdraw that jar and post a one that works.

Sorry about that and thanks for reporting it.

adanecito
Cone that earned his stripes
Cone that earned his stripes
Posts: 151
Joined: 06 Mar 2007 17:59

Re: JVLC status

Postby adanecito » 25 Jul 2010 21:25

Hi Sherington,

It was only one issue so far with a small change it's I am just not sure you intended that to happen with the setVideoSurface since that means the users of the vlcj api now have to add a reference to a particular OS which I think you were trying to avoid? I will add code changes to accomidate different OS's now for just that one method. I will check the web site for anything else I might have missed.

What is the purpose of using a LOG instance of libvlc? Is that the default now for the instance? I have not included log4j with my deployment so commented out all the log statements and used the old non-logging instance of libvlc. Will that be an issue with 1.1.1 vlcj? I will look into adding log4j any vendor and specific version I need to deploy? There seem to be multiple sources for log4j.

Thanks,
-Tony

adanecito
Cone that earned his stripes
Cone that earned his stripes
Posts: 151
Joined: 06 Mar 2007 17:59

Re: JVLC status

Postby adanecito » 25 Jul 2010 21:37

Okay I read your comments about 1.1.0 to 1.1.1 but no mention of the issue regarding setVideoSurface() and recasting to use it. Not that I expected details but that is why I looked at the test case examples and frowned and left this message.

I did the link to the log4j but haveing the users download around 500KB for logging seems excessive not your fault just the cost of that logging package.

I need to focus back on the issue of creating a vlc instance taking forever next.

Thanks,
-Tony

sherington
Cone that earned his stripes
Cone that earned his stripes
Posts: 491
Joined: 10 Sep 2008 11:57
VLC version: master
Operating System: Linux

Re: JVLC status

Postby sherington » 25 Jul 2010 21:44

Okay I read your comments about 1.1.0 to 1.1.1 but no mention of the issue regarding setVideoSurface() and recasting to use it. Not that I expected details but that is why I looked at the test case examples and frowned and left this message.
Well, I do say to use the specific type of media player the factory returns rather than the base-class. I accept I could have been clearer though.
I need to focus back on the issue of creating a vlc instance taking forever next.
Is this in your own application or with my test player? Because my test player was definitely broken in that release (hard-coded plugin path), but I've fixed it now.

If it's your own application I'm puzzled.

I'm happy to help you directly if you email me.

sherington
Cone that earned his stripes
Cone that earned his stripes
Posts: 491
Joined: 10 Sep 2008 11:57
VLC version: master
Operating System: Linux

Re: JVLC status

Postby sherington » 25 Jul 2010 21:50

Hi Sherington,

It was only one issue so far with a small change it's I am just not sure you intended that to happen with the setVideoSurface since that means the users of the vlcj api now have to add a reference to a particular OS which I think you were trying to avoid? I will add code changes to accomidate different OS's now for just that one method. I will check the web site for anything else I might have missed.

What is the purpose of using a LOG instance of libvlc? Is that the default now for the instance? I have not included log4j with my deployment so commented out all the log statements and used the old non-logging instance of libvlc. Will that be an issue with 1.1.1 vlcj? I will look into adding log4j any vendor and specific version I need to deploy? There seem to be multiple sources for log4j.

Thanks,
-Tony
Sorry I missed this message the first time.

For log4j, go to logging.apache.org. I needed to add some logging while developing the bindings because it helps pinpoint crashes. Once the bindings have stabilised for some time I will remove log4j completely and maybe put my own lightweight logging in there. If you choose to remove the log4j stuff yourself, that's absolutely fine.

Regarding setVideoSurface - you do not have to do anything for a particular OS since EmbeddedMediaPlayer has the method you're looking for - that's the type the factory returns and is not OS-specific.

adanecito
Cone that earned his stripes
Cone that earned his stripes
Posts: 151
Joined: 06 Mar 2007 17:59

Re: JVLC status

Postby adanecito » 25 Jul 2010 23:49

Hi Sherington,

Thanks I looked to deep into the setVideoSurface and saw the class for windows instead of looking at what was returned.

I did change my app code to use the latest vlcj and log4j so now I am in sync. At least now I am back to the mediaPlayer instance being created but the video not running since I am not getting any events generated from the adaptor.

I have updated my simple example in eclipse and it runs and I pointed the plugins dir to where it was installed by the app and the same options as what the app uses.
I will see how to setup debug mode since I think you set it up to return all messages that are sent to the message window in vlc? That would be usefull if I can get those messages.

Thanks,
-Tony

sherington
Cone that earned his stripes
Cone that earned his stripes
Posts: 491
Joined: 10 Sep 2008 11:57
VLC version: master
Operating System: Linux

Re: JVLC status

Postby sherington » 26 Jul 2010 16:59

I will see how to setup debug mode since I think you set it up to return all messages that are sent to the message window in vlc? That would be usefull if I can get those messages.
For the log output did you try the usual "-vvv" libvlc args?

Or, the new vlcj exposes the native log if you want to use that, look at MediaPlayerFactory.newLog(), Log, and LogHandler.

adanecito
Cone that earned his stripes
Cone that earned his stripes
Posts: 151
Joined: 06 Mar 2007 17:59

Re: JVLC status

Postby adanecito » 26 Jul 2010 17:35

Hi Sherington,

I have tried -vvv in the past and it never worked for me and the same issue with native log. I seem to remember the vlc team saying logging was broken.

I will look at MediaPlayerFactory.newLog().

I did fix the remaining issue (around 5:00AM my time) where I was playing youtube videos with my app. So now I can play them again using 1.1.2 nightly.

Regards,
-Tony

sherington
Cone that earned his stripes
Cone that earned his stripes
Posts: 491
Joined: 10 Sep 2008 11:57
VLC version: master
Operating System: Linux

Re: JVLC status

Postby sherington » 26 Jul 2010 18:05

I did fix the remaining issue (around 5:00AM my time) where I was playing youtube videos with my app. So now I can play them again using 1.1.2 nightly.
Do you have any remaining issues with the latest vlcj?

adanecito
Cone that earned his stripes
Cone that earned his stripes
Posts: 151
Joined: 06 Mar 2007 17:59

Re: JVLC status

Postby adanecito » 26 Jul 2010 22:39

Hi Sherington,

None that I know of unless you can get the fullscreen to work like it used to in 1.0.6 :-(

Otherwise everything is fine. I might start a different thread regarding video stalling where the same video but in a smaller window is slower than one in a large window. I do not see CPU issues but that is my next area to verify and try to isolate fro the VLC team unless they have observed that behavior. I was too busy with cookies and web start last night to worry about some oddity that may not exist.

Thanks so much for the support!
Tony Anecito
Founder,
MyUniPortal
http://www.myuniportal.com

Maco_
New Cone
New Cone
Posts: 2
Joined: 16 Sep 2010 12:01

Re: JVLC status

Postby Maco_ » 09 Dec 2010 17:02

I have a problem with the videoSurface and JSplitPane in my program. I can enlarge the videoSurface but can't shirk it.

To reproduce this problem you can replace the line 219 in TestPlayer.java to this:

Code: Select all

JSplitPane splitPane = new JSplitPane(); splitPane.setLeftComponent(videoSurface); splitPane.setRightComponent(new JButton("Other thing")); mainFrame.add(splitPane, BorderLayout.CENTER);
The result is:

Code: Select all

mainFrame.setLayout(new BorderLayout()); mainFrame.setBackground(Color.black); JSplitPane splitPane = new JSplitPane(); splitPane.setLeftComponent(videoSurface); splitPane.setRightComponent(new JButton("Other thing")); mainFrame.add(splitPane, BorderLayout.CENTER); mainFrame.add(controlsPanel, BorderLayout.SOUTH); mainFrame.add(videoAdjustPanel, BorderLayout.EAST);
This happens in vlcj 1.1.4. In the 1.1.3 happens the same.

Someone know why this happend?

Thanks.

sherington
Cone that earned his stripes
Cone that earned his stripes
Posts: 491
Joined: 10 Sep 2008 11:57
VLC version: master
Operating System: Linux

Re: JVLC status

Postby sherington » 09 Dec 2010 20:50

I have a problem with the videoSurface and JSplitPane in my program. I can enlarge the videoSurface but can't shirk it.
A couple of things working in isolation or together may be causing this...

1. The test player you're referring to sets an explicit size on the video surface component (videoSurface.setSize(w,h))
2. The canvas component has a 'natural' minimum size that you are hitting

The JSplitPane won't shrink a component smaller than it's minimum size.

So what to do about it, try one or more of...

a) Explicitly set a minimum size on the canvas to something smaller
b) Don't set an explicit size on the video surface component (the test player does this just because, well, it's only a test player - there's no reason your own app has to do it).

You can also try one or more of setSize, setMinimumSize, setMaximumSize, setPreferredSize!

I just verified this in the test player and the video does indeed grow/shrink as you drag the split pane (at least until the canvas gets to it's minimum width/height.

In short, it looks like if you do canvas.setSize(w,h) the split pane will not shrink the canvas below w,h.

Maco_
New Cone
New Cone
Posts: 2
Joined: 16 Sep 2010 12:01

Re: JVLC status

Postby Maco_ » 10 Dec 2010 18:31

Ok, I'm only using TestPlayer for the examples I'm posting. I found where the problem was. It's necessary to put the MinimumSize to solve it. It isn't a matter of setSize. Thanks for your answer and help.

irene
New Cone
New Cone
Posts: 1
Joined: 11 May 2011 17:00

Re: JVLC status

Postby irene » 11 May 2011 17:23

Hello,

I've tested the StreamRtsp example in the vlcj test package, everything works well, I managed to create a rtsp streaming server with a webcam as input.

Would anybody know how I could be informed when a new stream is requested?

I have seen a topic on the subject to do it with libvlc vlm: viewtopic.php?f=32&t=90224#p297975 but I don't see how to do it with vlcj, any idea?

Thanks,

Irene

sebi
New Cone
New Cone
Posts: 1
Joined: 17 Jul 2011 13:25

Re: JVLC status

Postby sebi » 17 Jul 2011 13:44

Hello everyone!

We are developing a NetBeans RCP application using vlcj for video playback. The implementation of vlcj is based on the "basic" example/test code provided by vlcj:

Code: Select all

mediaPlayerFactory = new MediaPlayerFactory(VLC_ARGS); mediaPlayer = mediaPlayerFactory.newEmbeddedMediaPlayer(); mediaPlayer.addMediaPlayerEventListener(new PlayerListener()); videoCanvas = new uk.co.caprica.vlcj.runtime.windows.WindowsCanvas(); videoCanvas.setBackground(Color.black); playerPanel.add(videoCanvas, BorderLayout.CENTER); mediaPlayer.setVideoSurface(mediaPlayerFactory.newVideoSurface(videoCanvas));
We now have a few window resizing issues when the player is integrated into a NetBeans TopComponent. One of these issues was, that the window containing the player could only be scaled up, not down. We solved this by adding a ComponentListener to the surrounding panel:

Code: Select all

playerPanel.addComponentListener(new ComponentAdapter() { @Override public void componentResized(final ComponentEvent componentEvent) { if (componentEvent != null) { Component component = componentEvent.getComponent(); if (component != null) { Dimension size = component.getSize(); if (size != null) { videoCanvas.setSize(size.width, size.height); } } } } });
However there is still one issue left. When the player window gets maximized or another window in the NetBeans application is closed triggering a resize of the player window, the player canvas stops showing the video and only shows a black surface while the video continues playing in the background.

Has anyone ever experienced similar problems, not necessarily related to the NetBeans RCP platform? Thanks in advance!

Sebastian


Return to “Development around libVLC”

Who is online

Users browsing this forum: Bing [Bot] and 27 guests