mirror of
https://github.com/zoriya/Kyoo.git
synced 2026-05-27 09:32:35 -04:00
Making dash files appear in the good folder and understanding dashenc of ffmpeg.
This commit is contained in:
@@ -33,12 +33,15 @@ namespace Kyoo.InternalAPI
|
||||
|
||||
public string Transmux(WatchItem episode)
|
||||
{
|
||||
string temp = Path.Combine(tempPath, episode.Link);
|
||||
Directory.CreateDirectory(temp);
|
||||
temp = Path.Combine(temp, episode.Link + ".mpd");
|
||||
Debug.WriteLine("&Transmuxing " + episode.Link + " at " + episode.Path + ", outputPath: " + temp);
|
||||
if (File.Exists(temp) || TranscoderAPI.transmux(episode.Path, temp) == 0)
|
||||
return temp;
|
||||
string folder = Path.Combine(tempPath, episode.Link);
|
||||
string manifest = Path.Combine(folder, episode.Link + ".mpd");
|
||||
|
||||
Directory.CreateDirectory(folder);
|
||||
Debug.WriteLine("&Transmuxing " + episode.Link + " at " + episode.Path + ", outputPath: " + folder);
|
||||
|
||||
//FFMPEG require us to put DirectorySeparaorChar as '/' for his internal regex.
|
||||
if (File.Exists(manifest) || TranscoderAPI.transmux(episode.Path, manifest.Replace('\\', '/'), (folder + Path.DirectorySeparatorChar).Replace('\\', '/')) == 0)
|
||||
return manifest;
|
||||
else
|
||||
return null;
|
||||
}
|
||||
|
||||
@@ -14,7 +14,7 @@ namespace Kyoo.InternalAPI.TranscoderLink
|
||||
public extern static int Init();
|
||||
|
||||
[DllImport(TranscoderPath, CallingConvention = CallingConvention.Cdecl)]
|
||||
public extern static int transmux(string path, string out_path);
|
||||
public extern static int transmux(string path, string out_path, string stream_uri);
|
||||
|
||||
[DllImport(TranscoderPath, CallingConvention = CallingConvention.Cdecl)]
|
||||
private extern static IntPtr extract_subtitles(string path, string out_path, out int array_length, out int track_count);
|
||||
|
||||
Reference in New Issue
Block a user