焦点HOOK思绪源码开源了,仅供学习,用的一个java类实现的,但是成品我不提供奥,就提供下实现虚拟视频hook类的java代码【我已经把dex文件里面实现hook的字节码代码转换成java代码了】,仅供各人研究,用工具是Smali将字节码代码转换为Java代码,工具下面地址可以自己网上搜。
下面是我测试一个结果视频【仅供学习】:
虚拟摄像头插件,玩玩,支持微信QQ,更换摄像头,照旧开源的!!!
下面是实现HOOk的java代码,我已经用Smali导出来了:
===================================================================
//
// Decompiled by Jadx - 791ms
//
package com.exampsle.vcam;
import android.graphics.ImageFormat;
import android.graphics.Rect;
import android.media.Image;
import android.media.MediaCodec;
import android.media.MediaCodecInfo;
import android.media.MediaCrypto;
import android.media.MediaExtractor;
import android.media.MediaFormat;
import android.util.Log;
import android.view.Surface;
import de.robv.android.xposed.XposedBridge;
import java.io.File;
import java.io.IOException;
import java.io.PrintStream;
import java.nio.ByteBuffer;
import java.util.concurrent.LinkedBlockingQueue;
public class VideoToFrames implements Runnable {
private static final int COLOR_FormatI420 = 1;
private static final int COLOR_FormatNV21 = 2;
private static final long DEFAULT_TIMEOUT_US = 10000;
private static final String TAG = "VideoToFrames";
private static final boolean VERBOSE = false;
private Callback callback;
private Thread childThread;
private LinkedBlockingQueue<byte[]> mQueue;
private OutputImageFormat outputImageFormat;
private Surface play_surf;
private Throwable throwable;
private String videoFilePath;
private final int decodeColorFormat = 0x7f420888;
private boolean stopDecode = false;
public void setCallback(Callback callback) {
this.callback = callback;
}
public void setEnqueue(LinkedBlockingQueue<byte[]> linkedBlockingQueue) {
this.mQueue = linkedBlockingQueue;
}
public void setSaveFrames(String str, OutputImageFormat outputImageFormat) throws IOException {
this.outputImageFormat = outputImageFormat;
}
public void set_surfcae(Surface surface) {
if (surface != null) {
this.play_surf = surface;
}
}
public void stopDecode() {
this.stopDecode = true;
}
public void decode(String str) throws Throwable {
this.videoFilePath = str;
if (this.childThread == null) {
Thread thread = new Thread(this, "decode");
this.childThread = thread;
thread.start();
Throwable th = this.throwable;
if (th != null) {
throw th;
}
}
}
@Override
public void run() {
try {
videoDecode(this.videoFilePath);
} catch (Throwable th) {
this.throwable = th;
}
}
/* JADX WARN: Multi-variable type inference failed */
/* JADX WARN: Removed duplicated region for block: B:32:0x00c1 */
/* JADX WARN: Removed duplicated region for block: B:34:0x00c9 */
/* JADX WARN: Type inference failed for: r0v1, types: [androi
免责声明:如果侵犯了您的权益,请联系站长,我们会及时删除侵权内容,谢谢合作!更多信息从访问主页:qidao123.com:ToB企服之家,中国第一个企服评测及商务社交产业平台。 |