You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
48 lines
822 B
48 lines
822 B
using UnityEngine; |
|
|
|
namespace FFmpeg.Demo |
|
{ |
|
public class TrimView : MonoBehaviour |
|
{ |
|
TrimData config = new TrimData(); |
|
|
|
//------------------------------ |
|
|
|
public void Open() |
|
{ |
|
gameObject.SetActive(true); |
|
} |
|
|
|
//------------------------------ |
|
|
|
public void OnInputPath(string fullPath) |
|
{ |
|
config.inputPath = fullPath; |
|
} |
|
|
|
public void OnStartTime(string time) |
|
{ |
|
config.fromTime = time; |
|
} |
|
|
|
public void OnOutputPath(string fullPath) |
|
{ |
|
config.outputPath = fullPath; |
|
} |
|
|
|
public void OnDuration(string duration) |
|
{ |
|
config.durationSec = int.Parse(duration); |
|
} |
|
|
|
//------------------------------ |
|
|
|
public void OnTrim() |
|
{ |
|
FFmpegCommands.Trim(config); |
|
gameObject.SetActive(false); |
|
} |
|
|
|
//------------------------------ |
|
} |
|
} |