Giter Club home page Giter Club logo

airreceiver's People

Contributors

fgp avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

airreceiver's Issues

a=min-latency:<int> triggers a ProtocolException

My iPad sends an SDP with an attribute 'min-latency', and RaopAudioHandler thinks it's not a valid attribute name due to the following regular expression, which does not accept hyphens:

    private static Pattern s_pattern_sdp_a = Pattern.compile("^([a-z]+):(.*)$");

Updating the regex fixes the problem:

    private static Pattern s_pattern_sdp_a = Pattern.compile("^([-_a-z]+):(.*)$");

Crash on win7 x64 from iOS5 devices

Can't seem to get this up and running when try to connect from an iOS5 device.
The server crashes with the following stack trace:

java -jar AirReceiver-1.2.one-jar.jar
Nov 13, 2011 12:20:52 AM org.phlo.AirReceiver.AirReceiver main
INFO: Launched RTSP service on port 5000
Nov 13, 2011 12:21:03 AM org.phlo.AirReceiver.AirReceiver main
Nov 13, 2011 12:21:08 AM org.phlo.AirReceiver.AirTunesCrytography getCipher
INFO: Using SPI class org.bouncycastle.jce.provider.JCERSACipher$PKCS1v1_5Padding for RSA/None/PKCS1Padding
Nov 13, 2011 12:21:08 AM org.phlo.AirReceiver.AirTunesCrytography getCipher
INFO: Using SPI class org.bouncycastle.jce.provider.JCERSACipher$NoPadding for RSA/None/OAEPWithSHA1AndMGF1Padding
Nov 13, 2011 12:21:08 AM org.phlo.AirReceiver.RtspLoggingHandler channelConnected
INFO: Client /192.168.1.241:50591 connected on /192.168.1.243:5000
Nov 13, 2011 12:21:08 AM org.phlo.AirReceiver.ExceptionLoggingHandler exceptionCaught
WARNING: Handler raised exception
org.phlo.AirReceiver.ProtocolException: Cannot parse SDP a's setting min-latency:11025
        at org.phlo.AirReceiver.RaopAudioHandler.announceReceived(RaopAudioHandler.java:366)
        at org.phlo.AirReceiver.RaopAudioHandler.messageReceived(RaopAudioHandler.java:232)
        at org.phlo.AirReceiver.RaopRtspOptionsHandler.messageReceived(RaopRtspOptionsHandler.java:53)
        at org.phlo.AirReceiver.RaopRtspHeaderHandler.messageReceived(RaopRtspHeaderHandler.java:55)
        at org.phlo.AirReceiver.RaopRtspChallengeResponseHandler.messageReceived(RaopRtspChallengeResponseHandler.java:77)
        at org.phlo.AirReceiver.RtspErrorResponseHandler.messageReceived(RtspErrorResponseHandler.java:45)
        at org.phlo.AirReceiver.RtspLoggingHandler.messageReceived(RtspLoggingHandler.java:69)
        at org.jboss.netty.channel.Channels.fireMessageReceived(Channels.java:302)
        at org.jboss.netty.handler.codec.replay.ReplayingDecoder.unfoldAndfireMessageReceived(ReplayingDecoder.java:522)
        at org.jboss.netty.handler.codec.replay.ReplayingDecoder.callDecode(ReplayingDecoder.java:506)
        at org.jboss.netty.handler.codec.replay.ReplayingDecoder.messageReceived(ReplayingDecoder.java:443)
        at org.jboss.netty.handler.execution.ChannelEventRunnable.run(ChannelEventRunnable.java:69)
        at org.jboss.netty.handler.execution.OrderedMemoryAwareThreadPoolExecutor$ChildExecutor.run(OrderedMemoryAwareThreadPoolExecutor.java:316)
        at java.util.concurrent.ThreadPoolExecutor$Worker.runTask(ThreadPoolExecutor.java:886)
        at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:908)
        at java.lang.Thread.run(Thread.java:619)
Nov 13, 2011 12:21:08 AM org.phlo.AirReceiver.RaopAudioHandler channelClosed
INFO: RTSP connection was shut down, closing RTP channels and audio output queue

Check for headless environment

In AirReciever.java, just add this:

    if (!GraphicsEnvironment.isHeadless()) {
        /* Create about dialog */
        final Dialog aboutDialog = new Dialog((Dialog) null);
        final GridBagLayout aboutLayout = new GridBagLayout();
        aboutDialog.setLayout(aboutLayout);

Update RaopAudioHandler to support the min-latency SDP attribute in iOS 5.1.1

Hi,

First let me say thank you for the great work. I'm building a Android in-car system and I'll use AirPlay to support streaming of iOS audio, photos and video and your project gives me a huge head start.

Now to the issue. When I tested with iOS 5.1.1 the RaopAudioHandler was throwing an exception because one of the SDP attributes have a dash '-' and the regular expression does not support it.

The attribute is: 'min-latency'

I have changed the regular expression to be:

protected static Pattern s_pattern_sdp_a = Pattern.compile("^(\w+):?(.*)$");

That can be improved to be more restrictive, but that is working fine at the moment.

I have also changed it to protected to allow for the JUnit to have access to the field and run the unit tests.

Cheers,
Rafael

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.