use of com.amazonaws.kinesisvideo.common.logging.Log in project aws-sdk-android by aws-amplify.
the class KinesisVideoAndroidClientFactory method createKinesisVideoClient.
/**
* Create KinesisVideo client.
*
* @param context Android context to use
* @param regions Regions object
* @param awsCredentialsProvider Credentials provider
* @return
* @throws KinesisVideoException
*/
public static KinesisVideoClient createKinesisVideoClient(@NonNull final Context context, @NonNull final Regions regions, @NonNull final AWSCredentialsProvider awsCredentialsProvider) throws KinesisVideoException {
final OutputChannel outputChannel = new AndroidLogOutputChannel();
final Log log = new Log(outputChannel, LogLevel.VERBOSE, LOG_TAG);
final KinesisVideoCredentialsProvider kinesisVideoCredentialsProvider = new KinesisVideoCredentialsProviderImpl(awsCredentialsProvider, log);
final KinesisVideoClientConfiguration configuration = KinesisVideoClientConfiguration.builder().withRegion(regions.getName()).withCredentialsProvider(kinesisVideoCredentialsProvider).withLogChannel(outputChannel).withStorageCallbacks(new DefaultStorageCallbacks()).build();
final ScheduledExecutorService executor = Executors.newScheduledThreadPool(NUMBER_OF_THREADS_IN_POOL);
return createKinesisVideoClient(context, configuration, defaultDeviceInfo(context), log, executor);
}
Aggregations