[Mono-bugs] [Bug 644356] New: Cannot play a music file from a server

bugzilla_noreply at novell.com bugzilla_noreply at novell.com
Wed Oct 6 16:38:36 EDT 2010


https://bugzilla.novell.com/show_bug.cgi?id=644356

https://bugzilla.novell.com/show_bug.cgi?id=644356#c0


           Summary: Cannot play a music file from a server
    Classification: Mono
           Product: MonoDroid
           Version: unspecified
          Platform: 64bit
        OS/Version: Windows 7
            Status: NEW
          Severity: Major
          Priority: P5 - None
         Component: Runtime
        AssignedTo: mono-bugs at lists.ximian.com
        ReportedBy: bryancostanich at hotmail.com
         QAContact: mono-bugs at lists.ximian.com
          Found By: Customer
           Blocker: Yes


Created an attachment (id=393414)
 --> (http://bugzilla.novell.com/attachment.cgi?id=393414)
repro project

Description of Problem:
if you try this:
    Android.Net.Uri uri =
Android.Net.Uri.Parse("http://localhost:3500/Music/pink_floyd.m4a");
    this._mediaPlayer = MediaPlayer.Create(this, uri);
    this._mediaPlayer.Prepare();
    this._mediaPlayer.Start();
and the file is valid, you'll get a big fat error:

D/MediaPlayer( 1801): Couldn't open file on client side, trying server side
I/StagefrightPlayer(   33):
setDataSource('http://localhost:3500/Music/pink_floyd.m4a')
I/AwesomePlayer(   33): mConnectingDataSource->connect() returned -2147483648
E/MediaPlayer( 1801): error (1, -2147483648)
D/MediaPlayer( 1801): create failed:
D/MediaPlayer( 1801): java.io.IOException: Prepare failed.: status=0x1
D/MediaPlayer( 1801):   at android.media.MediaPlayer.prepare(Native Method)
D/MediaPlayer( 1801):   at
android.media.MediaPlayer.create(MediaPlayer.java:611)
D/MediaPlayer( 1801):   at
android.media.MediaPlayer.create(MediaPlayer.java:588)
D/MediaPlayer( 1801):   at
mono.android.view.view.OnClickListenerAdapter.n_onClick(Native Method)
D/MediaPlayer( 1801):   at
mono.android.view.view.OnClickListenerAdapter.onClick(OnClickListenerAdapter.java:9)
D/MediaPlayer( 1801):   at android.view.View.performClick(View.java:2408)
D/MediaPlayer( 1801):   at android.view.View$PerformClick.run(View.java:8816)
D/MediaPlayer( 1801):   at android.os.Handler.handleCallback(Handler.java:587)
D/MediaPlayer( 1801):   at android.os.Handler.dispatchMessage(Handler.java:92)
D/MediaPlayer( 1801):   at android.os.Looper.loop(Looper.java:123)
D/MediaPlayer( 1801):   at
android.app.ActivityThread.main(ActivityThread.java:4627)
D/MediaPlayer( 1801):   at java.lang.reflect.Method.invokeNative(Native Method)
D/MediaPlayer( 1801):   at java.lang.reflect.Method.invoke(Method.java:521)
D/MediaPlayer( 1801):   at
com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:868)
D/MediaPlayer( 1801):   at
com.android.internal.os.ZygoteInit.main(ZygoteInit.java:626)
D/MediaPlayer( 1801):   at dalvik.system.NativeStart.main(Native Method)
E/Mono.Android( 1801): System.NullReferenceException: Object reference not set
to an instance of an object
E/Mono.Android( 1801):   at Test_PlayMusicFile.Activity1.<OnCreate>b__0
(System.Object , System.EventArgs ) [0x00000] in <filename unknown>:0
E/Mono.Android( 1801):   at
Android.Views.View+OnClickListenerAdapter.n_OnClick_Landroid_view_View_ (IntPtr
jnienv, IntPtr native__this, IntPtr native
_v) [0x00023] in
/home/jpobst/Desktop/mondroid/Mono.Android/src/Android.Views/View.cs:39
D/AndroidRuntime( 1801): Shutting down VM

also, if you try it this way:

this._mediaPlayer = new MediaPlayer();
this._mediaPlayer.SetDataSource("http://localhost:3500/Music/pink_floyd.m4a");
this._mediaPlayer.Prepare();
this._mediaPlayer.Start();

it also errors, but with a different err. :|

i've uploaded a repro, but please note, you'll need to put a file up on a web
server to repro. i've included a file in the /resource/raw directory. put it up
and rename it.

-- 
Configure bugmail: https://bugzilla.novell.com/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the QA contact for the bug.
You are the assignee for the bug.


More information about the mono-bugs mailing list