Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

not working example AVTransmit2 in mac os x #218

Open
trankimcanh opened this issue Dec 19, 2016 · 4 comments
Open

not working example AVTransmit2 in mac os x #218

trankimcanh opened this issue Dec 19, 2016 · 4 comments

Comments

@trankimcanh
Copy link

I run example:

ant -lib ~/.m2/repository/org/apache/maven/maven-ant-tasks/2.1.3 run-example -Drun.example.name=AVTransmit2 -Drun.example.arg.line="--local-port-base=5000 --remote-host=127.0.0.1 --remote-port-base=10000"

error:

  [java] INFO: Warming up SecureRandom...
 [java] Dec 19, 2016 2:23:32 PM org.jitsi.util.LoggerImpl log
 [java] INFO: Warming up SecureRandom finished.
 [java] Exception in thread "main" java.lang.NullPointerException: device
 [java] 	at org.jitsi.impl.neomedia.MediaServiceImpl.createMediaStream(MediaServiceImpl.java:410)
 [java] 	at org.jitsi.impl.neomedia.MediaServiceImpl.createMediaStream(MediaServiceImpl.java:365)
 [java] 	at org.jitsi.impl.neomedia.MediaServiceImpl.createMediaStream(MediaServiceImpl.java:331)
 [java] 	at org.jitsi.impl.neomedia.MediaServiceImpl.createMediaStream(MediaServiceImpl.java:299)
 [java] 	at org.jitsi.examples.AVTransmit2.start(AVTransmit2.java:120)
 [java] 	at org.jitsi.examples.AVTransmit2.main(AVTransmit2.java:351)

Can you help me fix this error, thanks !

@dylankolson
Copy link

Similar Error:

Exception in thread "main" java.lang.NullPointerException
at org.jitsi.impl.neomedia.MediaStreamImpl.setFormat(MediaStreamImpl.java:2898)
at org.jitsi.examples.AVTransmit2.start(AVTransmit2.java:182)
at org.jitsi.examples.AVTransmit2.main(AVTransmit2.java:351)

@v5anyexiuluo
Copy link

Similar Error:

Exception in thread "main" java.lang.NullPointerException
at org.jitsi.impl.neomedia.MediaStreamImpl.setFormat(MediaStreamImpl.java:2898)
at org.jitsi.examples.AVTransmit2.start(AVTransmit2.java:182)
at org.jitsi.examples.AVTransmit2.main(AVTransmit2.java:351)

Have you solved this error?

@swpalmer
Copy link

swpalmer commented May 18, 2020

It seems to die when getting a device for MediaType.TEXT.
I worked around that error by adding this to the loop in initialize:

			if (mediaType != MediaType.AUDIO && mediaType != MediaType.VIDEO)
				continue;

But it still doesn't work. The VIDEO device I get is recvonly.
Not only that, but H264 doesn't seem to be supported. It isn't returned in the array given by:

NeomediaServiceUtils.getMediaServiceImpl().getCurrentEncodingConfiguration().getAllEncodings(MediaType.VIDEO))

This library is very poorly documented and supported. As you can see by the fact that this was asked 4 years ago with no reasonable response.

@gmreddy30
Copy link

gmreddy30 commented May 27, 2020

I faced the following exception. And I tried with different options for mediaStream like mediaStream.setDirection(MediaDirection.SENDRECV);
mediaStream.setDirection(MediaDirection.SENDONLY);
but I still see the exception.

Exception in thread "main" java.lang.IllegalArgumentException: direction
at org.jitsi.service.neomedia.AbstractMediaStream.assertDirection(AbstractMediaStream.java:106)
at org.jitsi.impl.neomedia.MediaStreamImpl.setDirection(MediaStreamImpl.java:2834)
at org.jitsi.examples.AVTransmit2.start(AVTransmit2.java:129)
at org.jitsi.examples.AVTransmit2.main(AVTransmit2.java:352)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

5 participants