Comments (17)
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.
Same here 4.4.+
Original comment by [email protected]
on 11 Dec 2013 at 10:59
from aacdecoder-android.
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.
Issue 46 has been merged into this issue.
Original comment by [email protected]
on 29 Dec 2013 at 9:48
from aacdecoder-android.
Original comment by [email protected]
on 29 Dec 2013 at 9:48
from aacdecoder-android.
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.
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.
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.
i attached the modified aacplayer and httpclientandroidlib
Original comment by [email protected]
on 30 Dec 2013 at 2:38
Attachments:
from aacdecoder-android.
Alexis can you attach the compiled lib????
Original comment by [email protected]
on 7 Jan 2014 at 11:11
from aacdecoder-android.
[deleted comment]
from aacdecoder-android.
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.
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.
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.
Tnk you , is working well
Original comment by [email protected]
on 10 Jan 2014 at 2:51
from aacdecoder-android.
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.
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)
- Extraneous BufferReader capacity on some streams HOT 1
- SHOUTCAST AAC+ PLAYS OK BUT SHOUTCAST AAC NOT
- playerMetadata encoding UTF-8 HOT 2
- Samsung Galaxy S4 issue HOT 2
- start() frame decode error=2 and error=12
- Crashing in the Samsung devices HOT 1
- playerMetadata() not working on ShoutcastV2
- Http Redirect 301 & 302 - Fixed
- com.spoledge.aacdecoder.PCMFeed.run(PCMFeed.java:420) HOT 2
- Unable to stop the multiplayer while loading -Very critical issue HOT 5
- Native failure baacdecoder.so
- Cannot start native decoder
- Stop playing stream when bluetooth device connect
- How to know that the player is buffering ,playing or stopped ?
- Is there a way to get the byte read by AACDecoder ? HOT 2
- Need help to compile the decoder library
- [deleted issue]
- [deleted issue]
- [deleted issue]
- Library doesnt work with android 5.0.2
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
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.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from aacdecoder-android.