package com.bottle.hp.album.capture; import android.os.Environment; import java.io.File; import java.text.SimpleDateFormat; import java.util.Date; import java.util.Locale; /* loaded from: classes.dex */ public class VideoFile { private final String a; private Date b; public VideoFile(String str) { this.a = str; } private String c() { if (e()) { return this.a; } return "video_" + new SimpleDateFormat("yyyyMMdd_HHmmss", Locale.getDefault()).format(d()) + ".mp4"; } private Date d() { if (this.b == null) { this.b = new Date(); } return this.b; } private boolean e() { if (this.a == null) { return false; } return !r0.isEmpty(); } public File a() { String c = c(); if (c.contains("/")) { return new File(c); } File externalStoragePublicDirectory = Environment.getExternalStoragePublicDirectory(Environment.DIRECTORY_MOVIES); externalStoragePublicDirectory.mkdirs(); return new File(externalStoragePublicDirectory, c()); } public String b() { return a().getAbsolutePath(); } public static String a(String str) { return str + File.separator + "video_" + new SimpleDateFormat("yyyyMMdd_HHmmss", Locale.getDefault()).format(new Date()) + ".mp4"; } }