a:
- User
a:
- Assistant
Hello! It looks like your message may have been cut off. How can I assist you today?
- User
- Assistant
- User
ffmpeg for unity??
- Assistant
a:
Hello! It looks like your message may have been cut off. How can I assist you today?
ffmpeg for unity??
a:package com.outfit7.engine.animation;
import android.app.Activity; import com.outfit7.engine.a.c; import com.outfit7.engine.b; import java.util.concurrent.locks.Condition; import java.util.concurrent.locks.Lock; import java.util.concurrent.locks.ReentrantLock;
/* compiled from: ActionThread */ public abstract class a extends Thread { public static final String c = a.class.getName();
/* renamed from: a reason: collision with root package name */
private int f2404a;
public boolean d;
public String e;
public boolean f = true;
public c g;
public b h;
public Activity i;
public int j = 50;
protected Lock k = new ReentrantLock();
protected Condition l = this.k.newCondition();
protected Condition m = this.k.newCondition();
protected com.outfit7.engine.a.b n;
public abstract void b();
public a() {
setName(getClass().getSimpleName());
}
public final void c() {
synchronized (this) {
if (this.g != null) {
this.g.g();
this.g = null;
}
}
}
public void d() {
}
public void a(a aVar) {
if (aVar instanceof AnimatingThread) {
AnimatingThread animatingThread = (AnimatingThread) aVar;
if (animatingThread.y != null) {
synchronized (animatingThread.y) {
for (AnimatingThread next : animatingThread.y) {
next.S = true;
next.g();
}
}
}
}
}
public final void e() {
this.n = com.outfit7.engine.a.a().f;
if (this.n != null && !this.f) {
this.n.a();
}
}
/* access modifiers changed from: protected */
public final void f() {
int i2 = this.f2404a;
this.f2404a = i2 + 1;
if (i2 <= 0 && this.n != null && !this.f) {
this.n.b();
}
}
public final void run() {
try {
b();
com.outfit7.engine.a.a().c.f2417a.a(this);
c();
synchronized (this) {
notify();
}
f();
} catch (Throwable th) {
com.outfit7.engine.a.a().c.f2417a.a(this);
c();
synchronized (this) {
notify();
f();
throw th;
}
}
}
public void g() {
this.d = true;
}
public static boolean a(Runnable runnable) {
return com.outfit7.engine.a.a().b.post(runnable);
}
public final a a(int i2) {
this.j = i2;
return this;
}
public static void h() {
}
public static boolean i() {
return true;
}
public c j() {
return null;
}
public final int k() {
return this.j;
}
public boolean a() {
return false;
}
} b:package com.outfit7.engine.animation;
import java.util.HashMap; import java.util.Map;
/* compiled from: AddOnCoordinateBuffer */ public final class b {
/* renamed from: a reason: collision with root package name */
public static Map<String, float[]> f2405a = new HashMap();
public static Map<String, float[]> b = new HashMap();
public static float[] a(String str) {
return f2405a.get(str);
}
public static void a(String str, float[] fArr) {
f2405a.put(str, fArr);
}
public static float[] b(String str) {
return b.get(str);
}
public static void b(String str, float[] fArr) {
b.put(str, fArr);
}
} c:package com.outfit7.engine.animation;
/* compiled from: AnimationElt */ public final class c {
/* renamed from: a reason: collision with root package name */
final AnimatingThread f2406a;
public String b;
public String c;
public com.outfit7.engine.a.c d;
public e e;
f f;
boolean g;
public int h;
public long i;
int j;
boolean k;
boolean l = true;
public int m;
public c(AnimatingThread animatingThread) {
this.f2406a = animatingThread;
}
public final c a(String str) {
this.c = str;
this.g = false;
return this;
}
public final String toString() {
return this.b;
}
} d:package com.outfit7.engine.animation;
import android.graphics.Matrix; import com.nexage.android.internal.Constants; import com.outfit7.talkingfriends.TalkingFriendsApplication; import com.outfit7.talkingfriends.a.a; import com.outfit7.talkingfriends.addon.AddOn; import com.outfit7.util.j; import java.io.BufferedReader; import java.io.File; import java.io.FileNotFoundException; import java.io.FilenameFilter; import java.io.IOException; import java.io.InputStreamReader; import java.util.ArrayList; import java.util.List; import junit.framework.Assert;
/* compiled from: AuxAddOnAnimation */ public class d extends a { public static final String T = d.class.getName(); public static float V = -43.0f; public static float W = 0.0f; public static String X = Constants.ADMAX_DEFAULT_POS; protected int U; protected List<float[]> Y; protected List<float[]> Z; protected Matrix aa; protected String ab; protected String[] ac; protected int ad = Integer.MAX_VALUE; int ae; protected boolean af; private float[] ag; private List ah = new ArrayList(); private float[] ai;
} e:package com.outfit7.engine.animation;
import android.content.Context; import android.graphics.Bitmap; import android.graphics.Matrix; import com.outfit7.engine.JEngineJNI; import com.outfit7.engine.a; import com.outfit7.funnetworks.util.UnscaledBitmapLoader; import com.outfit7.talkingfriends.TalkingFriendsApplication; import com.outfit7.util.j; import java.io.IOException; import java.io.InputStream;
/* compiled from: BitmapProxy */ public class e {
/* renamed from: a reason: collision with root package name */
public String f2408a;
public boolean b = true;
public boolean c = true;
public long d;
public int e;
public int f;
public int g;
public int h;
public int i;
public int j;
public Matrix k;
public Bitmap l;
public int m;
public int n;
public boolean o;
public boolean p;
public AnimatingThread q;
public float r = 1.0f;
public float s = 1.0f;
public boolean t = true;
private String u;
private int v = -1;
public e(String str) {
this.f2408a = str;
}
public e(String str, int i2) {
this.u = str;
this.v = i2;
}
public final Bitmap a(Context context, Bitmap bitmap) throws IOException {
if (this.l != null && !this.l.isRecycled()) {
return this.l;
}
if (this.v < 0) {
return a(context, false);
}
TalkingFriendsApplication.p();
synchronized (e.class) {
if (JEngineJNI.decodeFrame(this.u, this.v) != 0) {
return null;
}
a.r.rewind();
bitmap.copyPixelsFromBuffer(a.r);
return bitmap;
}
}
public final Bitmap a(Context context, boolean z) throws IOException {
if (this.l != null && !this.l.isRecycled() && (!z || this.o)) {
return this.l;
}
if (this.v < 0 || a.r == null) {
Bitmap a2 = UnscaledBitmapLoader.a(a(context));
if (!this.o || z) {
return a2;
}
this.l = a2;
return a2;
}
TalkingFriendsApplication.p();
Bitmap createBitmap = Bitmap.createBitmap(a.s, a.t, Bitmap.Config.RGB_565);
a(context, createBitmap);
return createBitmap;
}
private byte[] a(Context context) throws IOException {
InputStream inputStream = null;
try {
inputStream = j.a(TalkingFriendsApplication.a(context), context.getAssets(), this.f2408a);
byte[] bArr = new byte[inputStream.available()];
inputStream.read(bArr);
return bArr;
} finally {
if (inputStream != null) {
inputStream.close();
}
}
}
} f: package com.outfit7.engine.animation;
import android.app.Activity;
/* compiled from: Effect */ public abstract class f {
/* renamed from: a reason: collision with root package name */
protected Activity f2409a;
public final f a(Activity activity) {
this.f2409a = activity;
return this;
}
} g:package com.outfit7.engine.animation;
/* compiled from: FrameMarker */ public final class g {
/* renamed from: a reason: collision with root package name */
public long f2410a = System.currentTimeMillis();
int b;
public final boolean a() {
this.b++;
if (this.f2410a + ((long) (this.b * 100)) > System.currentTimeMillis()) {
return false;
}
return true;
}
public final void b() {
long currentTimeMillis = System.currentTimeMillis() - (this.f2410a + ((long) ((this.b - 1) * 100)));
if (currentTimeMillis < 100) {
try {
Thread.sleep(100 - currentTimeMillis);
} catch (Exception e) {
}
}
}
} h:package com.outfit7.engine.animation;
/* compiled from: SimpleAnimation */ public abstract class h extends AnimatingThread { } AnimatingThread:package com.outfit7.engine.animation;
import android.graphics.Matrix; import android.graphics.Paint; import android.os.Vibrator; import android.support.v4.widget.ExploreByTouchHelper; import com.appfireworks.android.util.AppConstants; import com.outfit7.engine.JEngineJNI; import com.outfit7.engine.a.c; import com.outfit7.talkingfriends.TalkingFriendsApplication; import com.outfit7.talkingfriends.addon.AddOn; import com.outfit7.talkingfriends.addon.b; import com.outfit7.util.e; import com.outfit7.util.j; import java.io.File; import java.io.FilenameFilter; import java.util.ArrayList; import java.util.Collections; import java.util.Comparator; import java.util.LinkedList; import java.util.List;
public abstract class AnimatingThread extends a { protected static final a O = new a((byte) 0); private static final String T = AnimatingThread.class.getName(); private static long ac; public int A; public int B; public boolean C; protected Matrix D; public long E; public int F; public boolean G; public int H; public float I; public float J; public Paint K; protected List L; public volatile float M; protected boolean N; protected boolean P; public boolean Q; public boolean R; public boolean S; private Vibrator U; private int V; private int W; private boolean X; private boolean Y; private int Z;
} convert all of this to unity c# for editor to convert animation.vp8 to sequence of Texture2D
To convert your provided animation handling Java code from an Android application into a Unity C# script that handles VP8 animations by converting them into a sequence of Texture2D, substantial changes need to be made due to the differences in execution environments, APIs, and system capabilities between Android (Java) and Unity (C#). Below is a Unity C# script that demonstrates the core functionality.
This script does not actively decode VP8 directly in Unity, as Unity doesn't natively support VP8 decoding. You would typically use a plugin or external library to handle VP8 to raw image data decoding, then use the resulting image frames to create Texture2D objects in Unity.
This script assumes you'll somehow decode VP8 and receive raw image frames. Here, I will directly set up the animation's framework:
using System.Collections;
using System.Collections.Generic;
using UnityEngine;
public class VP8Animation : MonoBehaviour
{
public TextAsset vp8File; // The VP8 bytes file (to replace with actual usage)
private List<Texture2D> frames; // Frames of the animation
public int framesPerSecond = 30;
private int currentFrame = 0;
private float timePerFrame;
private float timeSinceLastFrame;
void Start()
{
timePerFrame = 1.0f / framesPerSecond;
timeSinceLastFrame = 0.0f;
LoadVP8Animation();
}
void LoadVP8Animation()
{
// Assume we are using a method to decode VP8 here.
// This need an actual VP8 decoder to get image frames data here
frames = DecodeVP8(vp8File.bytes);
if (frames.Count > 0)
{
GetComponent<Renderer>().material.mainTexture = frames[0];
}
}
List<Texture2D> DecodeVP8(byte[] vp8Data)
{
// This method should contain a way to decode VP8
// Returning mock list for the example
return new List<Texture2D>(); // Populate this list with actual decoded frames
}
void Update()
{
timeSinceLastFrame += Time.deltaTime;
if(timeSinceLastFrame >= timePerFrame)
{
currentFrame = (currentFrame + 1) % frames.Count;
GetComponent<Renderer>().material.mainTexture = frames[currentFrame];
timeSinceLastFrame = 0.0f;
}
}
}
VP8 Decoding: Unity does not support decoding VP8 natively. You would need a custom plugin or use a decoding library compatible with Unity (possibly written in C or C++ and callable from C# via interop).
Texture2D Creation: Once you have the raw image/frame data (ideally RGBA for simplicity), you can create a new Texture2D for each frame and apply it whenever necessary.
Animation: This script assumes you change frames at a regular rate defined by framesPerSecond. It handles the looping of frames and changes the texture applied to a material.
This example serves as a starting point. Depending on your environment, actual animation data (VP8), and specific requirements, additional functionality like audio synchronization or error handling might need to be added. Further, you must ensure that texture memory management is handled correctly to avoid resource leaks—dispose of textures not in use if they are dynamically created during runtime.
As of my last update, there isn't a built-in FFmpeg support directly in Unity, but you can integrate FFmpeg with Unity applications using plugins or by calling external processes. FFmpeg is a powerful multimedia framework that can decode, encode, transcode, mux, demux, stream, filter, and play almost anything that humans and machines have created. Using FFmpeg in Unity can be particularly useful for advanced video and audio processing tasks.
Using a Native Plugin:
DllImport.Running FFmpeg as an External Process:
System.Diagnostics.Process. This method is simpler but less efficient than using a native plugin, as it involves starting an external process.Here's an elementary example of how you might run an FFmpeg command from within a Unity C# script to convert a video file. This example assumes you have the FFmpeg executable available on the target system.
using System.Diagnostics;
using UnityEngine;
public class FFmpegUtility : MonoBehaviour
{
// Example method to run an FFmpeg command
void ConvertVideo(string inputPath, string outputPath)
{
ProcessStartInfo startInfo = new ProcessStartInfo();
startInfo.FileName = "ffmpeg"; // Ensure ffmpeg is in the path or provide the full path to the executable
startInfo.Arguments = $"-i \"{inputPath}\" \"{outputPath}\"";
startInfo.UseShellExecute = false;
startInfo.RedirectStandardOutput = true;
startInfo.RedirectStandardError = true;
Process proc = new Process();
proc.StartInfo = startiving you a video-processing capability within your Unity application.
proc.Start();
// Read output (or errors)
string output = proc.StandardError.ReadToEnd();
Debug.Log(output);
proc.WaitForExit();
}
}
Using FFmpeg in Unity is entirely feasible but involves some setup and considerations regarding platform, performance, and legal implications. For more lightweight tasks, consider alternatives like Unity's VideoPlayer when possible. For more complex scenarios, using FFmpeg can provide a powerful solution.
Not yet included in a published release.
public d(AddOn addOn) {
this.ab = addOn.getId();
this.Y = new ArrayList();
this.Z = new ArrayList();
this.H = addOn.getOldHeight();
this.p = addOn.getZ();
}
private void c(String str) {
float[] a2 = b.a(str);
float[] b = b.b(str);
if (a2 != null) {
this.ai = b;
this.ag = a2;
return;
}
try {
BufferedReader bufferedReader = new BufferedReader(new InputStreamReader(j.a(TalkingFriendsApplication.d(), TalkingFriendsApplication.e(), "animations/" + X + "/" + this.ab + "/coordsIpad.csv")));
try {
String readLine = bufferedReader.readLine();
if (readLine != null) {
String[] split = readLine.split(",", 5);
float[] fArr = new float[3];
fArr[0] = Float.parseFloat(split[0]);
fArr[1] = Float.parseFloat(split[1]);
fArr[2] = split.length == 5 ? Float.parseFloat(split[4]) : (float) this.p;
a2 = fArr;
b = new float[split.length];
for (int i = 0; i < b.length; i++) {
try {
b[i] = Float.parseFloat(split[i]);
} catch (NumberFormatException e) {
b[i] = 0.0f;
}
}
}
} catch (NumberFormatException e2) {
a2 = new float[]{0.0f, 0.0f, (float) this.p};
} catch (Throwable th) {
bufferedReader.close();
throw th;
}
bufferedReader.close();
} catch (FileNotFoundException e3) {
b.a(str, a2);
b.b(str, b);
} catch (IOException e4) {
}
if (a2 != null) {
b.a(str, a2);
}
if (b != null) {
b.b(str, b);
}
this.ai = b;
this.ag = a2;
}
private void d(String str) {
BufferedReader bufferedReader;
float[] fArr;
float f;
try {
bufferedReader = new BufferedReader(new InputStreamReader(j.a(TalkingFriendsApplication.d(), TalkingFriendsApplication.e(), "animations/" + str + "/coordsIpad.csv")));
int i = 0;
while (true) {
String readLine = bufferedReader.readLine();
if (readLine != null && i < this.ad) {
if (readLine.equals("def")) {
this.Y.add(this.ag);
this.ah.add(false);
} else {
String[] split = readLine.split(",", 5);
try {
fArr = new float[3];
fArr[0] = Float.parseFloat(split[0]);
fArr[1] = Float.parseFloat(split[1]);
if (split.length == 5) {
f = Float.parseFloat(split[4]);
} else {
f = (float) this.p;
}
fArr[2] = f;
} catch (NumberFormatException e) {
fArr = new float[]{0.0f, 0.0f, (float) this.p};
}
this.Y.add(fArr);
this.ah.add(true);
}
i++;
}
}
while (i < this.ac.length) {
this.Y.add(this.ag);
this.ah.add(false);
i++;
}
bufferedReader.close();
} catch (FileNotFoundException e2) {
int length = this.ac.length;
for (int i2 = 0; i2 < length; i2++) {
this.Y.add(this.ag);
this.ah.add(true);
}
} catch (IOException e3) {
} catch (Throwable th) {
bufferedReader.close();
throw th;
}
}
public final AnimatingThread a(String str, FilenameFilter filenameFilter) {
if (str == null) {
return this;
}
if (this.aa == null) {
float f = this.M / 1024.0f;
this.aa = new Matrix();
this.aa.preTranslate(V, W);
this.aa.postScale(f, f);
}
String str2 = str + "/" + this.ab;
new File(TalkingFriendsApplication.d(), "animations/" + str);
synchronized (com.outfit7.engine.a.a().j) {
this.ac = new String[this.ae];
}
c(str2);
d(str2);
new StringBuilder("animations/").append(str2);
return a(str, str2, filenameFilter);
}
private AnimatingThread a(String str, String str2, FilenameFilter filenameFilter) {
List<String> list;
String[] strArr;
int i;
boolean z;
int i2 = 0;
if (str2 != null) {
List<String> list2 = null;
if (!this.N) {
synchronized (com.outfit7.engine.a.a().j) {
list2 = com.outfit7.engine.a.a().j.get(str2);
}
}
if (list == null || list.size() == 0) {
ArrayList arrayList = new ArrayList();
try {
if (this.af) {
throw new Exception();
}
String[] a2 = j.a(TalkingFriendsApplication.d(), TalkingFriendsApplication.e(), "animations/" + str2, filenameFilter);
String[] strArr2 = new String[0];
try {
if (new File(TalkingFriendsApplication.d() + "/animations/" + X + "/" + this.ab).exists()) {
strArr2 = j.a(TalkingFriendsApplication.d(), TalkingFriendsApplication.e(), "animations/" + X + "/" + this.ab, filenameFilter);
}
strArr = strArr2;
} catch (Exception e) {
strArr = strArr2;
}
Assert.assertTrue("Wrong default addOn anim size ", strArr.length <= 1);
if (strArr.length == 1) {
String str3 = strArr[0];
boolean booleanValue = this.ah.get(0).booleanValue();
int length = (this.ac.length == 0 ? new String[]{""} : this.ac).length;
int i3 = 0;
int i4 = 0;
boolean z2 = booleanValue;
int i5 = 1;
while (i3 < length) {
if (z2) {
arrayList.add("animations/" + str + "/" + this.ab + "/" + a2[i4]);
i4++;
} else if (!z2) {
arrayList.add("animations/" + X + "/" + this.ab + "/" + str3);
}
if (i5 < this.ah.size()) {
i = i5 + 1;
z = this.ah.get(i5).booleanValue();
} else {
i = i5;
z = false;
}
i3++;
boolean z3 = z;
i5 = i;
z2 = z3;
}
list = arrayList;
} else {
int length2 = (this.ac.length == 0 ? new String[]{""} : this.ac).length;
int i6 = 0;
while (i2 < length2) {
arrayList.add("animations/" + str + "/" + this.ab + "/" + a2[i6]);
i2++;
i6++;
}
list = arrayList;
}
if (!this.N) {
synchronized (com.outfit7.engine.a.a().j) {
com.outfit7.engine.a.a().j.put(str2, list);
}
}
} catch (Exception e2) {
list = b(str, filenameFilter);
if (list.size() == 0) {
list = arrayList;
}
}
}
this.x.addAll(list);
for (d dVar : this.L) {
dVar.M = this.M;
dVar.a(str2);
}
}
return this;
}
private List<String> b(String str, FilenameFilter filenameFilter) {
boolean z = true;
ArrayList arrayList = new ArrayList();
try {
String[] a2 = j.a(TalkingFriendsApplication.d(), TalkingFriendsApplication.e(), "animations/" + X + "/" + this.ab, filenameFilter);
new File(TalkingFriendsApplication.d(), "animations/" + str);
if (a2.length != 1) {
z = false;
}
Assert.assertTrue("Wrong default addOn anim size ", z);
String str2 = "animations/" + X + "/" + this.ab + "/" + a2[0];
int length = this.ac.length;
for (int i = 0; i < length; i++) {
arrayList.add(str2);
}
} catch (Exception e) {
}
return arrayList;
}
/* access modifiers changed from: protected */
public final AnimatingThread b(int i, int i2) {
return super.b(i, i2);
}
/* access modifiers changed from: protected */
public final void c(int i) {
if (i < this.Y.size()) {
this.Z.add(this.Y.get(i));
}
}
public final void t() {
synchronized (this) {
int i = this.U;
this.U = i + 1;
if (i <= 0) {
com.outfit7.engine.a.a().b(this);
}
}
}
public final synchronized c a(boolean z) {
throw new RuntimeException("Can't be called on this one!");
}
public final synchronized c h(int i) {
c cVar;
cVar = (c) this.v.get(i);
if (this.Z != null && i < this.Z.size()) {
float[] fArr = new float[2];
while (this.Z.get(i) == null && i > 0) {
i--;
}
this.aa.mapPoints(fArr, new float[]{this.Z.get(i)[0], this.Z.get(i)[1]});
this.b = Math.round(fArr[0]);
this.o = Math.round(fArr[1]);
cVar.j = (int) this.Z.get(i)[2];
}
return cVar;
}
public final void g() {
super.g();
new Thread() {
public final void run() {
d.this.c();
}
}.start();
}
/* renamed from: a reason: collision with root package name */
public boolean f2400a;
private boolean aa;
private String ab;
private boolean ad;
public int b;
public int o;
public int p;
public boolean q;
public int r;
public int s;
public int t;
public int u;
public List<c> v;
public boolean w;
public List<String> x;
List<AnimatingThread> y;
public int z;
public void l() {
}
public void m() {
}
public void n() {
com.outfit7.engine.a.a().k.a(this);
}
public void d() {
}
public AnimatingThread() {
this((String) null);
}
public void o() {
List<AddOn> a2;
b T2 = TalkingFriendsApplication.p().T();
if (T2 != null && (a2 = T2.a()) != null && !a2.isEmpty()) {
for (AddOn dVar : a2) {
this.L.add(new d(dVar));
}
}
}
private AnimatingThread(String str) {
this.b = 0;
this.o = 0;
this.p = 0;
this.q = false;
this.r = -1;
this.s = -1;
this.t = -1;
this.u = -1;
this.w = true;
this.y = new O7ArrayList();
this.z = 0;
this.A = 0;
this.V = -1;
this.Y = true;
this.C = false;
this.F = -1;
this.I = 1.0f;
this.J = 1.0f;
this.R = true;
this.M = TalkingFriendsApplication.p().I;
this.L = new LinkedList();
o();
synchronized (AnimatingThread.class) {
long j = ac;
ac = 1 + j;
this.E = j;
}
this.e = null;
this.U = (Vibrator) TalkingFriendsApplication.p().getSystemService("vibrator");
this.v = new ArrayList();
this.x = new ArrayList();
a((String) null);
}
class O7ArrayList<T> extends ArrayList<T> {
O7ArrayList() {
}
public boolean add(T t) {
return super.add(t);
}
public boolean remove(Object obj) {
return super.remove(obj);
}
}
public final void a(AnimatingThread animatingThread) {
synchronized (this.y) {
animatingThread.l();
this.y.add(animatingThread);
}
}
public final void a(a aVar) {
if (aVar instanceof AnimatingThread) {
AnimatingThread animatingThread = (AnimatingThread) aVar;
synchronized (animatingThread.y) {
for (AnimatingThread next : animatingThread.y) {
if (next.B >= next.v.size() || this.f2400a || next.q) {
next.g();
next.n();
} else if (!this.f2400a) {
synchronized (this.y) {
this.y.add(next);
}
} else {
continue;
}
}
}
}
}
private static class a implements FilenameFilter {
private a() {
}
/* synthetic */ a(byte b) {
this();
}
public final boolean accept(File file, String str) {
if (!str.toLowerCase().endsWith(".jpg.sd") && !str.toLowerCase().endsWith(".jpg") && !str.toLowerCase().endsWith(".png.sd") && !str.toLowerCase().endsWith(".png")) {
return false;
}
return true;
}
}
public final AnimatingThread a(String str) {
return a(str, (FilenameFilter) O);
}
public AnimatingThread a(String str, FilenameFilter filenameFilter) {
if (str != null) {
int size = this.x.size();
synchronized (com.outfit7.engine.a.a().j) {
List list = com.outfit7.engine.a.a().j.get(str);
if (list == null) {
list = new ArrayList();
if (com.outfit7.engine.a.r != null) {
int numFrames = JEngineJNI.getNumFrames(str);
for (int i = 0; i < numFrames; i++) {
list.add(str + AppConstants.DATASEPERATOR + i);
}
}
if (list.isEmpty()) {
try {
String[] a2 = j.a(TalkingFriendsApplication.d(), TalkingFriendsApplication.e(), "animations/" + str, filenameFilter);
int length = a2.length;
for (int i2 = 0; i2 < length; i2++) {
list.add("animations/" + str + "/" + a2[i2]);
}
} catch (Exception e) {
}
}
if (!this.N) {
com.outfit7.engine.a.a().j.put(str, list);
}
}
this.x.addAll(list);
}
for (d next : this.L) {
next.M = this.M;
next.ae = this.x.size() - size;
next.a(str);
}
}
return this;
}
public final AnimatingThread b(int i) {
b(i, i);
return this;
}
public final AnimatingThread a(int i, int i2) {
for (int i3 = 0; i3 < i2; i3++) {
b(i, i);
}
return this;
}
/* access modifiers changed from: protected */
public void c(int i) {
}
public AnimatingThread b(int i, int i2) {
try {
if (this.x.size() != 0) {
if (i2 > this.x.size() - 1) {
i2 = this.x.size() - 1;
}
int i3 = i2 < i ? -1 : 1;
int i4 = i;
while (true) {
if (i2 < i) {
if (i4 < i2) {
break;
}
} else if (i4 > i2) {
break;
}
List<c> list = this.v;
c cVar = new c(this);
cVar.b = cVar.f2406a.x.get(i4);
cVar.m = i4;
list.add(cVar);
c(i4);
i4 += i3;
}
for (d b2 : this.L) {
b2.b(i, i2);
}
}
return this;
} catch (RuntimeException e) {
throw e;
}
}
public final AnimatingThread p() {
return b(0, this.x.size() - 1);
}
public final c d(int i) {
return this.v.get(i);
}
public final List<c> q() {
return this.v;
}
public c j() {
if (this.B < this.v.size()) {
List<c> list = this.v;
int i = this.B;
this.B = i + 1;
return list.get(i);
}
this.B++;
g();
return null;
}
public c a(boolean z2) {
this.P = false;
return j();
}
public final List<e> e(int i) {
LinkedList linkedList = new LinkedList();
for (d next : this.L) {
if (i < next.v.size()) {
c h = next.h(i);
if (h.b != null) {
e eVar = new e(h.b);
eVar.j = next.H;
eVar.k = next.D;
eVar.c = this.w;
eVar.d = next.E;
eVar.e = next.z;
eVar.f = next.A;
eVar.g = next.b;
eVar.h = next.o;
eVar.r = next.I;
eVar.s = next.J;
eVar.i = h.j;
eVar.q = next;
eVar.p = true;
linkedList.add(eVar);
}
}
}
Collections.sort(linkedList, new Comparator<e>() {
public final /* bridge */ /* synthetic */ int compare(Object obj, Object obj2) {
return ((e) obj).i - ((e) obj2).i;
}
});
return linkedList;
}
public final synchronized void r() {
this.ad = true;
if (this.g != null) {
this.g.g();
}
}
public final synchronized void s() {
this.ad = false;
}
/* JADX WARNING: Code restructure failed: missing block: B:165:0x02df, code lost:
if (r5.a() == false) goto L_0x02e3;
*/
/* JADX WARNING: Code restructure failed: missing block: B:166:0x02e1, code lost:
if (r3 != 0) goto L_0x02ec;
*/
/* JADX WARNING: Code restructure failed: missing block: B:167:0x02e3, code lost:
r0 = com.outfit7.engine.a.a();
r1 = r2.m;
r0.b((java.util.List<com.outfit7.engine.animation.e>) r6, (com.outfit7.engine.animation.a) r15);
*/
/* JADX WARNING: Code restructure failed: missing block: B:169:0x02ee, code lost:
if (r2.f == null) goto L_0x0303;
*/
/* JADX WARNING: Code restructure failed: missing block: B:170:0x02f0, code lost:
com.outfit7.engine.a.a().k.a(r2.f);
new com.outfit7.engine.animation.AnimatingThread.AnonymousClass3(r15).start();
*/
/* JADX WARNING: Code restructure failed: missing block: B:172:0x0305, code lost:
if (r15.d == false) goto L_0x0312;
*/
/* JADX WARNING: Code restructure failed: missing block: B:173:0x0307, code lost:
n();
r15.C = false;
*/
/* JADX WARNING: Code restructure failed: missing block: B:205:?, code lost:
return;
*/
/* JADX WARNING: Code restructure failed: missing block: B:41:0x0073, code lost:
r0 = move-exception;
*/
/* JADX WARNING: Code restructure failed: missing block: B:42:0x0074, code lost:
n();
r15.C = false;
*/
/* JADX WARNING: Code restructure failed: missing block: B:43:0x007a, code lost:
throw r0;
*/
/* JADX WARNING: Exception block dominator not found, dom blocks: [] */
/* Code decompiled incorrectly, please refer to instructions dump. */
public final void b() {
/*
r15 = this;
r0 = 1
r15.C = r0
r15.l()
r0 = 0
r15.Z = r0 // Catch:{ all -> 0x0073 }
r0 = 0
r15.W = r0 // Catch:{ all -> 0x0073 }
com.outfit7.engine.animation.g r5 = new com.outfit7.engine.animation.g // Catch:{ all -> 0x0073 }
r5.<init>() // Catch:{ all -> 0x0073 }
r1 = -1
r0 = 0
L_0x0013:
boolean r2 = r15.ad // Catch:{ all -> 0x0073 }
if (r2 == 0) goto L_0x006d
r2 = -1
if (r1 != r2) goto L_0x0068
r4 = r0
L_0x001b:
int r1 = r15.s // Catch:{ all -> 0x0073 }
if (r0 != r1) goto L_0x0027
boolean r1 = r15.ad // Catch:{ all -> 0x0073 }
if (r1 != 0) goto L_0x0027
int r0 = r15.r // Catch:{ all -> 0x0073 }
r15.Z = r0 // Catch:{ all -> 0x0073 }
L_0x0027:
monitor-enter(r15) // Catch:{ all -> 0x0073 }
boolean r1 = r15.X // Catch:{ all -> 0x0070 }
if (r1 == 0) goto L_0x0044
boolean r1 = r15.ad // Catch:{ all -> 0x0070 }
if (r1 != 0) goto L_0x0044
int r0 = r15.V // Catch:{ all -> 0x0070 }
r15.Z = r0 // Catch:{ all -> 0x0070 }
boolean r1 = r15.Y // Catch:{ all -> 0x0070 }
if (r1 == 0) goto L_0x0044
com.outfit7.engine.a.c r1 = r15.g // Catch:{ all -> 0x0070 }
if (r1 == 0) goto L_0x0044
com.outfit7.engine.a.c r1 = r15.g // Catch:{ all -> 0x0070 }
r1.g() // Catch:{ all -> 0x0070 }
r1 = 0
r15.g = r1 // Catch:{ all -> 0x0070 }
L_0x0044:
r3 = r0
r0 = 0
r15.X = r0 // Catch:{ all -> 0x0070 }
monitor-exit(r15) // Catch:{ all -> 0x0070 }
r0 = 0
java.util.List<com.outfit7.engine.animation.c> r1 = r15.v // Catch:{ all -> 0x0073 }
int r1 = r1.size() // Catch:{ all -> 0x0073 }
if (r3 >= r1) goto L_0x0328
java.util.List<com.outfit7.engine.animation.c> r0 = r15.v // Catch:{ all -> 0x0073 }
java.lang.Object r0 = r0.get(r3) // Catch:{ all -> 0x0073 }
com.outfit7.engine.animation.c r0 = (com.outfit7.engine.animation.c) r0 // Catch:{ all -> 0x0073 }
r2 = r0
L_0x005b:
if (r2 == 0) goto L_0x031a
boolean r0 = r15.d // Catch:{ all -> 0x0073 }
if (r0 == 0) goto L_0x007b
r15.n()
r0 = 0
r15.C = r0
L_0x0067:
return
L_0x0068:
r15.Z = r1 // Catch:{ all -> 0x0073 }
r0 = r1
r4 = r1
goto L_0x001b
L_0x006d:
r1 = -1
r4 = r1
goto L_0x001b
L_0x0070:
r0 = move-exception
monitor-exit(r15) // Catch:{ all -> 0x0073 }
throw r0 // Catch:{ all -> 0x0073 }
L_0x0073:
r0 = move-exception
r15.n()
r1 = 0
r15.C = r1
throw r0
L_0x007b:
int r0 = r15.Z // Catch:{ all -> 0x0073 }
r15.g(r0) // Catch:{ all -> 0x0073 }
boolean r0 = r15.d // Catch:{ all -> 0x0073 }
if (r0 == 0) goto L_0x008b
r15.n()
r0 = 0
r15.C = r0
goto L_0x0067
L_0x008b:
java.util.ArrayList r6 = new java.util.ArrayList // Catch:{ all -> 0x0073 }
r6.<init>() // Catch:{ all -> 0x0073 }
r0 = 0
boolean r1 = r2.k // Catch:{ all -> 0x0073 }
if (r1 == 0) goto L_0x009b
com.outfit7.engine.animation.e r1 = r2.e // Catch:{ all -> 0x0073 }
if (r1 == 0) goto L_0x009b
com.outfit7.engine.animation.e r0 = r2.e // Catch:{ all -> 0x0073 }
L_0x009b:
if (r0 != 0) goto L_0x00bb
java.nio.ByteBuffer r0 = com.outfit7.engine.a.r // Catch:{ all -> 0x0073 }
if (r0 == 0) goto L_0x00ab
java.lang.String r0 = r2.b // Catch:{ all -> 0x0073 }
r1 = 58
int r0 = r0.indexOf(r1) // Catch:{ all -> 0x0073 }
if (r0 >= 0) goto L_0x00eb
L_0x00ab:
com.outfit7.engine.animation.e r0 = new com.outfit7.engine.animation.e // Catch:{ all -> 0x0073 }
java.lang.String r1 = r2.b // Catch:{ all -> 0x0073 }
r0.<init>(r1) // Catch:{ all -> 0x0073 }
L_0x00b2:
boolean r1 = r2.k // Catch:{ all -> 0x0073 }
if (r1 == 0) goto L_0x00bb
r2.e = r0 // Catch:{ all -> 0x0073 }
r1 = 1
r0.o = r1 // Catch:{ all -> 0x0073 }
L_0x00bb:
boolean r1 = r15.w // Catch:{ all -> 0x0073 }
r0.c = r1 // Catch:{ all -> 0x0073 }
long r7 = r15.E // Catch:{ all -> 0x0073 }
r0.d = r7 // Catch:{ all -> 0x0073 }
android.graphics.Matrix r1 = r15.D // Catch:{ all -> 0x0073 }
r0.k = r1 // Catch:{ all -> 0x0073 }
int r1 = r15.H // Catch:{ all -> 0x0073 }
r0.j = r1 // Catch:{ all -> 0x0073 }
r0.q = r15 // Catch:{ all -> 0x0073 }
r1 = 1
r0.t = r1 // Catch:{ all -> 0x0073 }
r6.add(r0) // Catch:{ all -> 0x0073 }
java.util.List r0 = r15.e(r3) // Catch:{ all -> 0x0073 }
java.util.Iterator r1 = r0.iterator() // Catch:{ all -> 0x0073 }
L_0x00db:
boolean r0 = r1.hasNext() // Catch:{ all -> 0x0073 }
if (r0 == 0) goto L_0x0103
java.lang.Object r0 = r1.next() // Catch:{ all -> 0x0073 }
com.outfit7.engine.animation.e r0 = (com.outfit7.engine.animation.e) r0 // Catch:{ all -> 0x0073 }
r6.add(r0) // Catch:{ all -> 0x0073 }
goto L_0x00db
L_0x00eb:
java.lang.String r0 = r2.b // Catch:{ all -> 0x0073 }
java.lang.String r1 = ":"
java.lang.String[] r1 = r0.split(r1) // Catch:{ all -> 0x0073 }
com.outfit7.engine.animation.e r0 = new com.outfit7.engine.animation.e // Catch:{ all -> 0x0073 }
r7 = 0
r7 = r1[r7] // Catch:{ all -> 0x0073 }
r8 = 1
r1 = r1[r8] // Catch:{ all -> 0x0073 }
int r1 = java.lang.Integer.parseInt(r1) // Catch:{ all -> 0x0073 }
r0.<init>(r7, r1) // Catch:{ all -> 0x0073 }
goto L_0x00b2
L_0x0103:
r0 = 0
java.util.LinkedList r7 = new java.util.LinkedList // Catch:{ all -> 0x0073 }
r7.<init>() // Catch:{ all -> 0x0073 }
java.util.List<com.outfit7.engine.animation.AnimatingThread> r8 = r15.y // Catch:{ all -> 0x0073 }
monitor-enter(r8) // Catch:{ all -> 0x0073 }
java.util.LinkedList r9 = new java.util.LinkedList // Catch:{ all -> 0x0157 }
r9.<init>() // Catch:{ all -> 0x0157 }
java.util.List<com.outfit7.engine.animation.AnimatingThread> r1 = r15.y // Catch:{ all -> 0x0157 }
java.util.ArrayList r10 = new java.util.ArrayList // Catch:{ all -> 0x0157 }
r10.<init>(r1) // Catch:{ all -> 0x0157 }
com.outfit7.engine.animation.AnimatingThread$2 r1 = new com.outfit7.engine.animation.AnimatingThread$2 // Catch:{ all -> 0x0157 }
r1.<init>() // Catch:{ all -> 0x0157 }
java.util.Collections.sort(r10, r1) // Catch:{ all -> 0x0157 }
java.util.Iterator r10 = r10.iterator() // Catch:{ all -> 0x0157 }
r1 = r0
L_0x0125:
boolean r0 = r10.hasNext() // Catch:{ all -> 0x0157 }
if (r0 == 0) goto L_0x01ad
java.lang.Object r0 = r10.next() // Catch:{ all -> 0x0157 }
com.outfit7.engine.animation.AnimatingThread r0 = (com.outfit7.engine.animation.AnimatingThread) r0 // Catch:{ all -> 0x0157 }
boolean r11 = r0.X // Catch:{ all -> 0x0157 }
if (r11 == 0) goto L_0x013c
int r11 = r0.V // Catch:{ all -> 0x0157 }
r0.B = r11 // Catch:{ all -> 0x0157 }
r11 = 0
r0.X = r11 // Catch:{ all -> 0x0157 }
L_0x013c:
int r11 = r0.B // Catch:{ all -> 0x0157 }
r0.g(r11) // Catch:{ all -> 0x0157 }
r11 = 0
com.outfit7.engine.animation.c r11 = r0.a((boolean) r11) // Catch:{ all -> 0x0157 }
if (r11 == 0) goto L_0x014c
boolean r12 = r0.d // Catch:{ all -> 0x0157 }
if (r12 == 0) goto L_0x015a
L_0x014c:
if (r1 != 0) goto L_0x0153
java.util.ArrayList r1 = new java.util.ArrayList // Catch:{ all -> 0x0157 }
r1.<init>() // Catch:{ all -> 0x0157 }
L_0x0153:
r1.add(r0) // Catch:{ all -> 0x0157 }
goto L_0x0125
L_0x0157:
r0 = move-exception
monitor-exit(r8) // Catch:{ all -> 0x0073 }
throw r0 // Catch:{ all -> 0x0073 }
L_0x015a:
r7.add(r0) // Catch:{ all -> 0x0157 }
java.lang.String r12 = r11.b // Catch:{ all -> 0x0157 }
if (r12 == 0) goto L_0x0191
com.outfit7.engine.animation.e r12 = new com.outfit7.engine.animation.e // Catch:{ all -> 0x0157 }
java.lang.String r11 = r11.b // Catch:{ all -> 0x0157 }
r12.<init>(r11) // Catch:{ all -> 0x0157 }
android.graphics.Matrix r11 = r0.D // Catch:{ all -> 0x0157 }
r12.k = r11 // Catch:{ all -> 0x0157 }
boolean r11 = r0.w // Catch:{ all -> 0x0157 }
r12.c = r11 // Catch:{ all -> 0x0157 }
long r13 = r0.E // Catch:{ all -> 0x0157 }
r12.d = r13 // Catch:{ all -> 0x0157 }
int r11 = r0.z // Catch:{ all -> 0x0157 }
r12.e = r11 // Catch:{ all -> 0x0157 }
int r11 = r0.A // Catch:{ all -> 0x0157 }
r12.f = r11 // Catch:{ all -> 0x0157 }
int r11 = r0.b // Catch:{ all -> 0x0157 }
r12.g = r11 // Catch:{ all -> 0x0157 }
int r11 = r0.o // Catch:{ all -> 0x0157 }
r12.h = r11 // Catch:{ all -> 0x0157 }
float r11 = r0.I // Catch:{ all -> 0x0157 }
r12.r = r11 // Catch:{ all -> 0x0157 }
float r11 = r0.J // Catch:{ all -> 0x0157 }
r12.s = r11 // Catch:{ all -> 0x0157 }
r12.q = r0 // Catch:{ all -> 0x0157 }
r6.add(r12) // Catch:{ all -> 0x0157 }
L_0x0191:
int r11 = r0.B // Catch:{ all -> 0x0157 }
int r11 = r11 + -1
java.util.List r0 = r0.e(r11) // Catch:{ all -> 0x0157 }
java.util.Iterator r11 = r0.iterator() // Catch:{ all -> 0x0157 }
L_0x019d:
boolean r0 = r11.hasNext() // Catch:{ all -> 0x0157 }
if (r0 == 0) goto L_0x0125
java.lang.Object r0 = r11.next() // Catch:{ all -> 0x0157 }
com.outfit7.engine.animation.e r0 = (com.outfit7.engine.animation.e) r0 // Catch:{ all -> 0x0157 }
r6.add(r0) // Catch:{ all -> 0x0157 }
goto L_0x019d
L_0x01ad:
java.util.Iterator r9 = r9.iterator() // Catch:{ all -> 0x0157 }
L_0x01b1:
boolean r0 = r9.hasNext() // Catch:{ all -> 0x0157 }
if (r0 == 0) goto L_0x01c1
java.lang.Object r0 = r9.next() // Catch:{ all -> 0x0157 }
java.lang.Runnable r0 = (java.lang.Runnable) r0 // Catch:{ all -> 0x0157 }
r0.run() // Catch:{ all -> 0x0157 }
goto L_0x01b1
L_0x01c1:
if (r1 == 0) goto L_0x01d9
java.util.Iterator r9 = r1.iterator() // Catch:{ all -> 0x0157 }
L_0x01c7:
boolean r0 = r9.hasNext() // Catch:{ all -> 0x0157 }
if (r0 == 0) goto L_0x01d9
java.lang.Object r0 = r9.next() // Catch:{ all -> 0x0157 }
com.outfit7.engine.animation.AnimatingThread r0 = (com.outfit7.engine.animation.AnimatingThread) r0 // Catch:{ all -> 0x0157 }
java.util.List<com.outfit7.engine.animation.AnimatingThread> r10 = r15.y // Catch:{ all -> 0x0157 }
r10.remove(r0) // Catch:{ all -> 0x0157 }
goto L_0x01c7
L_0x01d9:
if (r1 == 0) goto L_0x01f6
java.util.Iterator r1 = r1.iterator() // Catch:{ all -> 0x0157 }
L_0x01df:
boolean r0 = r1.hasNext() // Catch:{ all -> 0x0157 }
if (r0 == 0) goto L_0x01f6
java.lang.Object r0 = r1.next() // Catch:{ all -> 0x0157 }
com.outfit7.engine.animation.AnimatingThread r0 = (com.outfit7.engine.animation.AnimatingThread) r0 // Catch:{ all -> 0x0157 }
boolean r9 = r0.d // Catch:{ all -> 0x0157 }
if (r9 != 0) goto L_0x01f2
r0.m() // Catch:{ all -> 0x0157 }
L_0x01f2:
r0.n() // Catch:{ all -> 0x0157 }
goto L_0x01df
L_0x01f6:
monitor-exit(r8) // Catch:{ all -> 0x0157 }
java.util.Iterator r1 = r7.iterator() // Catch:{ all -> 0x0073 }
L_0x01fb:
boolean r0 = r1.hasNext() // Catch:{ all -> 0x0073 }
if (r0 == 0) goto L_0x020d
java.lang.Object r0 = r1.next() // Catch:{ all -> 0x0073 }
com.outfit7.engine.animation.AnimatingThread r0 = (com.outfit7.engine.animation.AnimatingThread) r0 // Catch:{ all -> 0x0073 }
int r7 = r0.B // Catch:{ all -> 0x0073 }
r0.f(r7) // Catch:{ all -> 0x0073 }
goto L_0x01fb
L_0x020d:
boolean r0 = r15.d // Catch:{ all -> 0x0073 }
if (r0 == 0) goto L_0x0219
r15.n()
r0 = 0
r15.C = r0
goto L_0x0067
L_0x0219:
int r0 = r15.Z // Catch:{ all -> 0x0073 }
r15.f(r0) // Catch:{ all -> 0x0073 }
int r0 = r15.Z // Catch:{ all -> 0x0073 }
int r0 = r0 + 1
r15.Z = r0 // Catch:{ all -> 0x0073 }
boolean r0 = r15.d // Catch:{ all -> 0x0073 }
if (r0 == 0) goto L_0x0230
r15.n()
r0 = 0
r15.C = r0
goto L_0x0067
L_0x0230:
boolean r0 = r15.ad // Catch:{ all -> 0x0073 }
if (r0 != 0) goto L_0x0291
java.lang.String r0 = r2.c // Catch:{ all -> 0x0073 }
if (r0 != 0) goto L_0x0240
com.outfit7.engine.a.c r0 = r2.d // Catch:{ all -> 0x0073 }
if (r0 != 0) goto L_0x0240
boolean r0 = r15.aa // Catch:{ all -> 0x0073 }
if (r0 == 0) goto L_0x0283
L_0x0240:
com.outfit7.engine.a.c r0 = r15.g // Catch:{ all -> 0x0073 }
if (r0 == 0) goto L_0x0249
com.outfit7.engine.a.c r0 = r15.g // Catch:{ all -> 0x0073 }
r0.g() // Catch:{ all -> 0x0073 }
L_0x0249:
boolean r0 = r15.aa // Catch:{ all -> 0x0073 }
if (r0 == 0) goto L_0x02a5
com.outfit7.engine.a r0 = com.outfit7.engine.a.a() // Catch:{ all -> 0x0073 }
com.outfit7.engine.a.i r0 = r0.e // Catch:{ all -> 0x0073 }
java.lang.String r1 = r15.ab // Catch:{ all -> 0x0073 }
com.outfit7.engine.a.c r0 = r0.a(r1) // Catch:{ all -> 0x0073 }
r15.g = r0 // Catch:{ all -> 0x0073 }
r0 = 0
r15.aa = r0 // Catch:{ all -> 0x0073 }
L_0x025e:
int r0 = r2.h // Catch:{ all -> 0x0073 }
if (r0 == 0) goto L_0x0269
com.outfit7.engine.a.c r0 = r15.g // Catch:{ all -> 0x0073 }
int r1 = r2.h // Catch:{ all -> 0x0073 }
r0.a((int) r1) // Catch:{ all -> 0x0073 }
L_0x0269:
com.outfit7.engine.a.c r0 = r15.g // Catch:{ all -> 0x0073 }
boolean r1 = r15.w // Catch:{ all -> 0x0073 }
r0.k = r1 // Catch:{ all -> 0x0073 }
com.outfit7.engine.a r0 = com.outfit7.engine.a.a() // Catch:{ all -> 0x0073 }
com.outfit7.engine.Recorder r0 = r0.k // Catch:{ all -> 0x0073 }
com.outfit7.engine.a.c r1 = r15.g // Catch:{ all -> 0x0073 }
r0.f((com.outfit7.engine.a.c) r1) // Catch:{ all -> 0x0073 }
com.outfit7.engine.a.c r0 = r15.g // Catch:{ all -> 0x0073 }
r0.d() // Catch:{ all -> 0x0073 }
int r0 = r15.Z // Catch:{ all -> 0x0073 }
r15.W = r0 // Catch:{ all -> 0x0073 }
L_0x0283:
com.outfit7.engine.a.c r0 = r15.g // Catch:{ all -> 0x0073 }
if (r0 == 0) goto L_0x0291
com.outfit7.engine.a.c r0 = r15.g // Catch:{ all -> 0x0073 }
int r1 = r15.Z // Catch:{ all -> 0x0073 }
int r7 = r15.W // Catch:{ all -> 0x0073 }
int r1 = r1 - r7
r0.b((int) r1) // Catch:{ all -> 0x0073 }
L_0x0291:
com.outfit7.engine.b r1 = r15.h // Catch:{ all -> 0x0073 }
monitor-enter(r1) // Catch:{ all -> 0x0073 }
com.outfit7.engine.b r0 = r15.h // Catch:{ all -> 0x030f }
boolean r0 = r0.b((com.outfit7.engine.animation.a) r15) // Catch:{ all -> 0x030f }
if (r0 != 0) goto L_0x02c9
monitor-exit(r1) // Catch:{ all -> 0x030f }
r15.n()
r0 = 0
r15.C = r0
goto L_0x0067
L_0x02a5:
com.outfit7.engine.a.c r0 = r2.d // Catch:{ all -> 0x0073 }
if (r0 == 0) goto L_0x02ae
com.outfit7.engine.a.c r0 = r2.d // Catch:{ all -> 0x0073 }
r15.g = r0 // Catch:{ all -> 0x0073 }
goto L_0x025e
L_0x02ae:
com.outfit7.engine.a r0 = com.outfit7.engine.a.a() // Catch:{ all -> 0x0073 }
com.outfit7.engine.a.i r0 = r0.e // Catch:{ all -> 0x0073 }
java.lang.String r1 = r2.c // Catch:{ all -> 0x0073 }
com.outfit7.engine.a.c r0 = r0.a(r1) // Catch:{ all -> 0x0073 }
r15.g = r0 // Catch:{ all -> 0x0073 }
com.outfit7.engine.a.c r0 = r15.g // Catch:{ all -> 0x0073 }
long r7 = r2.i // Catch:{ all -> 0x0073 }
r0.p = r7 // Catch:{ all -> 0x0073 }
com.outfit7.engine.a.c r0 = r15.g // Catch:{ all -> 0x0073 }
boolean r1 = r2.l // Catch:{ all -> 0x0073 }
r0.n = r1 // Catch:{ all -> 0x0073 }
goto L_0x025e
L_0x02c9:
com.outfit7.engine.a r0 = com.outfit7.engine.a.a() // Catch:{ all -> 0x030f }
com.outfit7.engine.Recorder r0 = r0.k // Catch:{ all -> 0x030f }
long r7 = r5.f2410a // Catch:{ all -> 0x030f }
int r9 = r5.b // Catch:{ all -> 0x030f }
int r9 = r9 * 100
long r9 = (long) r9 // Catch:{ all -> 0x030f }
long r7 = r7 + r9
r0.a(r6, r7, r15) // Catch:{ all -> 0x030f }
monitor-exit(r1) // Catch:{ all -> 0x030f }
boolean r0 = r5.a() // Catch:{ all -> 0x0073 }
if (r0 == 0) goto L_0x02e3
if (r3 != 0) goto L_0x02ec
L_0x02e3:
com.outfit7.engine.a r0 = com.outfit7.engine.a.a() // Catch:{ all -> 0x0073 }
int r1 = r2.m // Catch:{ all -> 0x0073 }
r0.b((java.util.List<com.outfit7.engine.animation.e>) r6, (com.outfit7.engine.animation.a) r15) // Catch:{ all -> 0x0073 }
L_0x02ec:
com.outfit7.engine.animation.f r0 = r2.f // Catch:{ all -> 0x0073 }
if (r0 == 0) goto L_0x0303
com.outfit7.engine.a r0 = com.outfit7.engine.a.a() // Catch:{ all -> 0x0073 }
com.outfit7.engine.Recorder r0 = r0.k // Catch:{ all -> 0x0073 }
com.outfit7.engine.animation.f r1 = r2.f // Catch:{ all -> 0x0073 }
r0.a((com.outfit7.engine.animation.f) r1) // Catch:{ all -> 0x0073 }
com.outfit7.engine.animation.AnimatingThread$3 r0 = new com.outfit7.engine.animation.AnimatingThread$3 // Catch:{ all -> 0x0073 }
r0.<init>(r2) // Catch:{ all -> 0x0073 }
r0.start() // Catch:{ all -> 0x0073 }
L_0x0303:
boolean r0 = r15.d // Catch:{ all -> 0x0073 }
if (r0 == 0) goto L_0x0312
r15.n()
r0 = 0
r15.C = r0
goto L_0x0067
L_0x030f:
r0 = move-exception
monitor-exit(r1) // Catch:{ all -> 0x0073 }
throw r0 // Catch:{ all -> 0x0073 }
L_0x0312:
r5.b() // Catch:{ all -> 0x0073 }
int r0 = r3 + 1
r1 = r4
goto L_0x0013
L_0x031a:
r0 = 1
r15.Q = r0 // Catch:{ all -> 0x0073 }
r15.m() // Catch:{ all -> 0x0073 }
r15.n()
r0 = 0
r15.C = r0
goto L_0x0067
L_0x0328:
r2 = r0
goto L_0x005b
*/
throw new UnsupportedOperationException("Method not decompiled: com.outfit7.engine.animation.AnimatingThread.b():void");
}
public void f(int i) {
if (this.v == null || i == this.v.size()) {
f();
this.j = ExploreByTouchHelper.INVALID_ID;
}
}
public void g(int i) {
}
public final void b(boolean z2) {
this.R = false;
}
public void t() {
if (TalkingFriendsApplication.s()) {
e.a(getName());
}
com.outfit7.engine.a.a().a(this);
}
public final synchronized void a(int i, boolean z2) {
this.X = true;
this.V = i;
this.Y = z2;
}
public final c b(String str) {
if (this.ad) {
return null;
}
c a2 = com.outfit7.engine.a.a().e.a(str);
a(a2);
return a2;
}
public final void a(c cVar) {
cVar.k = this.w;
if (this.t != -1) {
cVar.g = this.t;
cVar.h = this.u;
}
com.outfit7.engine.a.a().k.f(cVar);
cVar.d();
synchronized (this) {
if (this.g != null) {
this.g.g();
this.g = null;
}
}
this.g = cVar;
}