GithubHelp home page GithubHelp logo

Comments (17)

GoogleCodeExporter avatar GoogleCodeExporter commented on September 9, 2024
I have the similar issue, i confirm this bug on Android 4.4 (kitkat). It's 
there any solution on this issue?

Original comment by [email protected] on 1 Dec 2013 at 11:45

from aacdecoder-android.

GoogleCodeExporter avatar GoogleCodeExporter commented on September 9, 2024
Same here 4.4.+

Original comment by [email protected] on 11 Dec 2013 at 10:59

from aacdecoder-android.

GoogleCodeExporter avatar GoogleCodeExporter commented on September 9, 2024
Could you please retry using standalone emulator / device ?
I am trying standalone emulator, running 4.4.2 (ARM) and playing this stream 
without errors:
http://http.yourmuze.com:8000/play/paradise/l.aac


Original comment by [email protected] on 29 Dec 2013 at 9:47

from aacdecoder-android.

GoogleCodeExporter avatar GoogleCodeExporter commented on September 9, 2024
Issue 46 has been merged into this issue.

Original comment by [email protected] on 29 Dec 2013 at 9:48

from aacdecoder-android.

GoogleCodeExporter avatar GoogleCodeExporter commented on September 9, 2024

Original comment by [email protected] on 29 Dec 2013 at 9:48

from aacdecoder-android.

GoogleCodeExporter avatar GoogleCodeExporter commented on September 9, 2024
vbarta,

The issue it's also on normal device, tested on Nexus 7 (2013), Android 4.4.2, 
here you have a stream demo: http://159.253.145.178:8100

Thanks

Original comment by [email protected] on 30 Dec 2013 at 11:51

from aacdecoder-android.

GoogleCodeExporter avatar GoogleCodeExporter commented on September 9, 2024
with the update of kitkat, android removed something, i modified the lib with 
httpclientandroidlib and works but have glitchs streams cuts sometimes

Original comment by [email protected] on 30 Dec 2013 at 2:31

from aacdecoder-android.

GoogleCodeExporter avatar GoogleCodeExporter commented on September 9, 2024
i modified the file aacplayer.java

import ch.boye.httpclientandroidlib.Header;
import ch.boye.httpclientandroidlib.HttpEntity;
import ch.boye.httpclientandroidlib.HttpResponse;
import ch.boye.httpclientandroidlib.client.methods.HttpGet;
import ch.boye.httpclientandroidlib.impl.client.DefaultHttpClient;

added this lib and changed:

    public void play( String url, int expectedKBitSecRate ) throws Exception {

this method to:

    public void play( String url, int expectedKBitSecRate ) throws Exception {
        if (url.indexOf( ':' ) > 0) {
            /*   
            URLConnection cn = new URL( url ).openConnection();

            prepareConnection( cn );
            cn.connect();

            processHeaders( cn );

            // TODO: try to get the expectedKBitSecRate from headers
            play( getInputStream( cn ), expectedKBitSecRate);
             */
            DefaultHttpClient httpClient = new DefaultHttpClient();
            HttpGet request = new HttpGet(url);
            request.setHeader("Icy-MetaData", "1");
            HttpResponse response = httpClient.execute(request);

            Header[] headers = response.getAllHeaders();
            for (Header header : headers) {
                Log.d(LOG, header.getName());
                playerCallback.playerMetadata(header.getName(), header.getValue());
            }
            HttpEntity entity = response.getEntity();
            InputStream inputStream = entity.getContent();
            play( inputStream, expectedKBitSecRate);
        }
        else play( new FileInputStream( url ), expectedKBitSecRate );
    }

stream will work then but have some cuts, dont know why if someone can help 
with this will be awesome.

Original comment by [email protected] on 30 Dec 2013 at 2:36

from aacdecoder-android.

GoogleCodeExporter avatar GoogleCodeExporter commented on September 9, 2024
i attached the modified aacplayer and httpclientandroidlib

Original comment by [email protected] on 30 Dec 2013 at 2:38

Attachments:

from aacdecoder-android.

GoogleCodeExporter avatar GoogleCodeExporter commented on September 9, 2024
Alexis can you attach the compiled lib????

Original comment by [email protected] on 7 Jan 2014 at 11:11

from aacdecoder-android.

GoogleCodeExporter avatar GoogleCodeExporter commented on September 9, 2024
[deleted comment]

from aacdecoder-android.

GoogleCodeExporter avatar GoogleCodeExporter commented on September 9, 2024
I have problem with android 4.4.+ (as I said before) nexus 4
If it helps my rom is: cyanogenmod 11-201407-NIGHTLY-mako

Original comment by [email protected] on 8 Jan 2014 at 11:44

from aacdecoder-android.

GoogleCodeExporter avatar GoogleCodeExporter commented on September 9, 2024
It is related to this:
http://stackoverflow.com/questions/19738798/android-4-4-http-api-bugs

Original comment by [email protected] on 8 Jan 2014 at 1:25

from aacdecoder-android.

GoogleCodeExporter avatar GoogleCodeExporter commented on September 9, 2024
I've created own solution for this issue:
$ svn ci
Sending        decoder/src/com/spoledge/aacdecoder/AACPlayer.java
Adding         decoder/src/com/spoledge/aacdecoder/IcyURLConnection.java
Adding         decoder/src/com/spoledge/aacdecoder/IcyURLStreamHandler.java
Sending        player/src/com/spoledge/aacplay/AACPlayerActivity.java
Transmitting file data ....
Committed revision 37.

I've added a simple implementation of the HTTP/SHOUTCAST URLConnection called 
IcyURLConnection and IcyURLStreamHandler which is a java.net.URLStreamHandler. 
The library then detects whether the response is the standard HTTP or SHOUTCAST 
(or better "non-HTTP" - because the class is working for all responses like 
"xxx 200 OK"). If the response is standard, then continuing without any change. 
For non-HTTP responses, the old connection is closed and new one created - but 
for a differrent URL - starting with "icy" protocol.

To allow this solution working you need to register the IcyURLStreamHandler 
once in the JVM (I am doing this in the demo player - AACPlayerActiviy:)
----
        try {
            java.net.URL.setURLStreamHandlerFactory( new java.net.URLStreamHandlerFactory(){
                public java.net.URLStreamHandler createURLStreamHandler( String protocol ) {
                    Log.d( LOG, "Asking for stream handler for protocol: '" + protocol + "'" );
                    if ("icy".equals( protocol )) return new com.spoledge.aacdecoder.IcyURLStreamHandler();
                    return null;
                }
            });
        }
        catch (Throwable t) {
            Log.w( LOG, "Cannot set the ICY URLStreamHandler - maybe already set ? - " + t );
        }
----

For pre-Kitkat version this works like before - the old  HttpURLConnection is 
used, because it is able to parse the response. 
For Kitkat version you can speedup the process by supplying the "icy" protocol 
directly in the URL like: icy://159.253.145.178:8100

Attaching the library Jar file (the native *.so libraries are not affected).

Original comment by [email protected] on 8 Jan 2014 at 11:26

  • Changed state: Started
  • Added labels: Component-Java

Attachments:

from aacdecoder-android.

GoogleCodeExporter avatar GoogleCodeExporter commented on September 9, 2024
Tnk you , is working well

Original comment by [email protected] on 10 Jan 2014 at 2:51

from aacdecoder-android.

GoogleCodeExporter avatar GoogleCodeExporter commented on September 9, 2024
revision 38 and revision 39

- IcyURLConnection can be used in plain Java (removed Android logging)

- unified the way how shoutcast connections are handled on pre-Kitkat and Kitkat
     --> since now always reconnecting shoutcast streams using IcyURLConnection (due to the check of the response code - without reconnection the check is not possible) 
     --> for backward compatibility use AACPlayer.setResponseCodeCheckEnabled( false )

Original comment by [email protected] on 10 Jan 2014 at 7:35

from aacdecoder-android.

GoogleCodeExporter avatar GoogleCodeExporter commented on September 9, 2024
included in version 0.8

Original comment by [email protected] on 12 Jan 2014 at 8:16

  • Changed state: Fixed

from aacdecoder-android.

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.