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
1012 B
48 lines
1012 B
2 years ago
|
using UnityEngine;
|
||
|
|
||
|
namespace FFmpeg.Demo
|
||
|
{
|
||
|
public class EncodeView : MonoBehaviour
|
||
|
{
|
||
|
DecodeEncodeData config = new DecodeEncodeData();
|
||
|
|
||
|
//------------------------------
|
||
|
|
||
|
public void Open()
|
||
|
{
|
||
|
gameObject.SetActive(true);
|
||
|
}
|
||
|
|
||
|
//------------------------------
|
||
|
|
||
|
public void OnImagesPathInput(string fullPath)
|
||
|
{
|
||
|
config.inputPath = fullPath;
|
||
|
}
|
||
|
|
||
|
public void OnSoundPathInput(string fullPath)
|
||
|
{
|
||
|
config.soundPath = fullPath;
|
||
|
}
|
||
|
|
||
|
public void OnOutputPathInput(string fullPath)
|
||
|
{
|
||
|
config.outputPath = fullPath;
|
||
|
}
|
||
|
|
||
|
public void OnFPSInput(string fps)
|
||
|
{
|
||
|
config.fps = float.Parse(fps);
|
||
|
}
|
||
|
|
||
|
//------------------------------
|
||
|
|
||
|
public void OnEncode()
|
||
|
{
|
||
|
FFmpegCommands.Encode(config);
|
||
|
gameObject.SetActive(false);
|
||
|
}
|
||
|
|
||
|
//------------------------------
|
||
|
}
|
||
|
}
|