├── .gitignore ├── README ├── app ├── AndroidManifest.xml ├── ic_launcher-web.png ├── proguard-project.txt ├── project.properties ├── res │ ├── drawable-hdpi │ │ └── ic_launcher.png │ ├── drawable-mdpi │ │ └── ic_launcher.png │ ├── drawable-xhdpi │ │ └── ic_launcher.png │ ├── drawable-xxhdpi │ │ └── ic_launcher.png │ ├── layout │ │ └── activity_main.xml │ ├── menu │ │ └── main.xml │ ├── values-sw600dp │ │ └── dimens.xml │ ├── values-sw720dp-land │ │ └── dimens.xml │ ├── values-v11 │ │ └── styles.xml │ ├── values-v14 │ │ └── styles.xml │ └── values │ │ ├── dimens.xml │ │ ├── strings.xml │ │ └── styles.xml └── src │ └── com │ └── ivygroup │ └── wfdplayer │ ├── MainActivity.java │ ├── MyBroadcastReceiver.java │ ├── SinkPlayer.java │ └── WfdSinkController.java ├── cplib.sh ├── framework-modify ├── WifiDisplayController.diff └── WifiDisplayController.java └── native ├── Android.mk ├── jni ├── Android.mk ├── SinkPlayer.cpp ├── SinkPlayer.h └── ivygroup_wfdplayer_sinkplayer.cpp └── wifi-display ├── ANetworkSession.cpp ├── ANetworkSession.h ├── Android.mk ├── Parameters.cpp ├── Parameters.h ├── ParsedMessage.cpp ├── ParsedMessage.h ├── TimeSeries.cpp ├── TimeSeries.h ├── sink ├── LinearRegression.cpp ├── LinearRegression.h ├── RTPSink.cpp ├── RTPSink.h ├── TunnelRenderer.cpp ├── TunnelRenderer.h ├── WifiDisplaySink.cpp └── WifiDisplaySink.h ├── source ├── Converter.cpp ├── Converter.h ├── MediaPuller.cpp ├── MediaPuller.h ├── PlaybackSession.cpp ├── PlaybackSession.h ├── RepeaterSource.cpp ├── RepeaterSource.h ├── Sender.cpp ├── Sender.h ├── TSPacketizer.cpp ├── TSPacketizer.h ├── WifiDisplaySource.cpp └── WifiDisplaySource.h ├── udptest.cpp └── wfd.cpp /.gitignore: -------------------------------------------------------------------------------- 1 | # built application files 2 | *.apk 3 | *.ap_ 4 | 5 | # files for the dex VM 6 | *.dex 7 | 8 | # Java class files 9 | *.class 10 | 11 | # generated files 12 | bin/ 13 | gen/ 14 | obj/ 15 | libs/ 16 | proguard/ 17 | 18 | # Local configuration file (sdk path, etc) 19 | local.properties 20 | 21 | # Eclipse project files 22 | .classpath 23 | .project 24 | 25 | .svn 26 | .settings 27 | .externalToolBuilders/ 28 | -------------------------------------------------------------------------------- /README: -------------------------------------------------------------------------------- 1 | 编译说明: 2 | 1. 编译APK 3 |   需要在源码下边编译,可以用以下命令进行编译: 4 | make libwfd 5 | make libwfd_jni 6 | 把编译好的两个lib库放到APP的相关路径下, 可以执行脚本(cplib.sh)进行快速copy 7 | 然后在Eclipse下编译APK 8 | 把此APK安装进手机. 手机必须支持Miracast. 9 | 2. 修改framework. 10 | 把 framework-modify/路径下的patch, 打到framework中 11 | 编译services.jar, 用如下命令: 12 | make services 13 | 把编译好的 services.jar, 替换手机中的 system/framework/services.jar 文件. 14 | 15 | 使用说明: 16 | 1. 重启手机使services.jar起做用. 17 | 2. 打开setting->display->wifidisplay: 点一下搜索显示设备, 则在其它的Source端可以看到本Sink. 18 | 3. 用其它手机连接, 然后快速切换到上一步编译好的APK中. 19 | 20 | 21 | 注意: 此程序并不是一个完美的完成品, 未完成部分如下: 22 | 1. 不用修改Framework, 而直接在程序中管理Wifi direct的连接及发现部分. 23 | 2. 目前的连接好的IP不是计算得来的, 需要计算找到对方的IP. 24 | 3. 播放的一些控制及释放等. 25 | 26 | 此程序的大部分移植自 Android4.2.2的源码, 但是在4.3中此块源码竟然被删掉了, 真是猜不透Google怎么想的. 27 | 28 | 29 | -------------------------------------------------------------------------------- /app/AndroidManifest.xml: -------------------------------------------------------------------------------- 1 | 2 | 6 | 7 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | 22 | 25 | 26 | 27 | 28 | 29 | 30 | 31 | 32 | 33 | 34 | 35 | 36 | 37 | 38 | 39 | -------------------------------------------------------------------------------- /app/ic_launcher-web.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ivygroup/miracast-sink/214d77aec1d14d3deb7841cbd073c0ab6872d87d/app/ic_launcher-web.png -------------------------------------------------------------------------------- /app/proguard-project.txt: -------------------------------------------------------------------------------- 1 | # To enable ProGuard in your project, edit project.properties 2 | # to define the proguard.config property as described in that file. 3 | # 4 | # Add project specific ProGuard rules here. 5 | # By default, the flags in this file are appended to flags specified 6 | # in ${sdk.dir}/tools/proguard/proguard-android.txt 7 | # You can edit the include path and order by changing the ProGuard 8 | # include property in project.properties. 9 | # 10 | # For more details, see 11 | # http://developer.android.com/guide/developing/tools/proguard.html 12 | 13 | # Add any project specific keep options here: 14 | 15 | # If your project uses WebView with JS, uncomment the following 16 | # and specify the fully qualified class name to the JavaScript interface 17 | # class: 18 | #-keepclassmembers class fqcn.of.javascript.interface.for.webview { 19 | # public *; 20 | #} 21 | -------------------------------------------------------------------------------- /app/project.properties: -------------------------------------------------------------------------------- 1 | # This file is automatically generated by Android Tools. 2 | # Do not modify this file -- YOUR CHANGES WILL BE ERASED! 3 | # 4 | # This file must be checked in Version Control Systems. 5 | # 6 | # To customize properties used by the Ant build system edit 7 | # "ant.properties", and override values to adapt the script to your 8 | # project structure. 9 | # 10 | # To enable ProGuard to shrink and obfuscate your code, uncomment this (available properties: sdk.dir, user.home): 11 | #proguard.config=${sdk.dir}/tools/proguard/proguard-android.txt:proguard-project.txt 12 | 13 | # Project target. 14 | target=android-17 15 | -------------------------------------------------------------------------------- /app/res/drawable-hdpi/ic_launcher.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ivygroup/miracast-sink/214d77aec1d14d3deb7841cbd073c0ab6872d87d/app/res/drawable-hdpi/ic_launcher.png -------------------------------------------------------------------------------- /app/res/drawable-mdpi/ic_launcher.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ivygroup/miracast-sink/214d77aec1d14d3deb7841cbd073c0ab6872d87d/app/res/drawable-mdpi/ic_launcher.png -------------------------------------------------------------------------------- /app/res/drawable-xhdpi/ic_launcher.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ivygroup/miracast-sink/214d77aec1d14d3deb7841cbd073c0ab6872d87d/app/res/drawable-xhdpi/ic_launcher.png -------------------------------------------------------------------------------- /app/res/drawable-xxhdpi/ic_launcher.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ivygroup/miracast-sink/214d77aec1d14d3deb7841cbd073c0ab6872d87d/app/res/drawable-xxhdpi/ic_launcher.png -------------------------------------------------------------------------------- /app/res/layout/activity_main.xml: -------------------------------------------------------------------------------- 1 | 5 | 6 |