getSafParameterForRead static method

Future<String?> getSafParameterForRead(
  1. String uriString
)

Converts the given Structured Access Framework Uri ("content:…") into an input url that can be used in FFmpeg and FFprobe commands.

Note that this method is Android only. It will fail if called on other platforms. It also requires API Level ≥ 19. On older API levels it returns an empty url.

Implementation

static Future<String?> getSafParameterForRead(String uriString) async {
  try {
    await init();
    return _platform.ffmpegKitConfigGetSafParameter(uriString, "r");
  } on PlatformException catch (e, stack) {
    print("Plugin getSafParameterForRead error: ${e.message}");
    return Future.error("getSafParameterForRead failed.", stack);
  }
}