OSDN Git Service

made compilable with Froyo
authorOwen Kwon <pinebud77@hotmail.com>
Tue, 27 Jul 2010 04:42:01 +0000 (13:42 +0900)
committerOwen Kwon <pinebud77@hotmail.com>
Tue, 27 Jul 2010 04:42:01 +0000 (13:42 +0900)
Android.mk
MPlayer.cpp
MPlayer.h
MPlayerRenderer.cpp

index 01d8dfe..1128135 100644 (file)
@@ -726,7 +726,7 @@ LOCAL_MODULE = libandroidmplayer
 LOCAL_CFLAGS = 
 LOCAL_SRC_FILES = MPlayer.cpp MPlayerRenderer.cpp
 LOCAL_SHARED_LIBRARIES := libz libasound libc libdl libutils libcutils \
-       libbinder libmedia libui libandroid_runtime liblog
+       libbinder libmedia libui libandroid_runtime liblog libsurfaceflinger_client
 LOCAL_STATIC_LIBRARIES := libmplayer $(FFMPEGPARTS) libft2
 include $(BUILD_SHARED_LIBRARY)
 
index 35bfe53..2c0b0af 100644 (file)
@@ -79,9 +79,10 @@ namespace android {
                release();
        }
 
-       status_t MPlayer::setDataSource(const char* path)
+       status_t MPlayer::setDataSource(
+                       const char *uri, const KeyedVector<String8, String8> * headers)
        {
-               return setdatasource(path, -1, 0, 0x78ffffLL);
+               return setdatasource(uri, -1, 0, 0x78ffffLL);
        }
 
        status_t MPlayer::setDataSource(int fd, int64_t offset, int64_t length)
@@ -230,7 +231,6 @@ namespace android {
                        return NO_ERROR;
                }
 
-
                sendEvent (MEDIA_PREPARED);     /* todo : should be moved to main loop */
                return NO_ERROR;
        }
index 60b02e0..03ae098 100644 (file)
--- a/MPlayer.h
+++ b/MPlayer.h
@@ -12,6 +12,7 @@
 
 #include <media/MediaPlayerInterface.h>
 #include <media/AudioTrack.h>
+#include <surfaceflinger/ISurface.h>
 
 #include "mplayer_lib.h"
 
@@ -28,7 +29,8 @@ namespace android {
 
                        virtual void        onFirstRef();
                        virtual status_t    initCheck();
-                       virtual status_t    setDataSource(const char* path);
+                       virtual status_t    setDataSource(
+                                       const char *uri, const KeyedVector<String8, String8>*headers);
                        virtual status_t    setDataSource(int fd, int64_t offset, int64_t length);
                        virtual status_t    setVideoSurface(const sp<ISurface>& surface);
                        virtual status_t    prepare();
index 35e3a64..1d61695 100644 (file)
@@ -9,7 +9,7 @@
 #include <utils/Log.h>
 
 #include <binder/MemoryHeapBase.h>
-#include <ui/ISurface.h>
+#include <surfaceflinger/ISurface.h>
 #include "MPDebug.h"
 #include "MPlayerRenderer.h"