use of com.amazonaws.services.kinesisvideo.model.GetDataEndpointRequest in project aws-sdk-android by aws-amplify.
the class KinesisVideoAndroidServiceClient method getDataEndpoint.
@Override
public String getDataEndpoint(@NonNull final String streamName, @NonNull final String apiName, long timeoutInMillis, @Nullable final KinesisVideoCredentialsProvider credentialsProvider) throws KinesisVideoException {
final AWSKinesisVideoClient serviceClient = createAwsKinesisVideoClient(credentialsProvider, Region.getRegion(Regions.fromName(configuration.getRegion())), configuration.getEndpoint(), (int) timeoutInMillis);
final GetDataEndpointRequest getDataEndpointRequest = new GetDataEndpointRequest().withStreamName(streamName).withAPIName(apiName);
log.debug("calling get data endpoint: " + getDataEndpointRequest.toString());
final GetDataEndpointResult getDataEndpointResult;
try {
getDataEndpointResult = serviceClient.getDataEndpoint(getDataEndpointRequest);
} catch (final AmazonClientException e) {
log.exception(e, "Service call failed.");
throw new KinesisVideoException(e);
}
log.debug("get data endpoint result: " + getDataEndpointResult.toString());
return getDataEndpointResult.getDataEndpoint();
}
use of com.amazonaws.services.kinesisvideo.model.GetDataEndpointRequest in project amazon-kinesis-video-streams-parser-library by aws.
the class GetMediaForFragmentListWorker method create.
public static GetMediaForFragmentListWorker create(final String streamName, final List<String> fragmentNumbers, final AWSCredentialsProvider awsCredentialsProvider, final Regions region, final AmazonKinesisVideo amazonKinesisVideo, final MkvElementVisitor elementVisitor) {
final GetDataEndpointRequest request = new GetDataEndpointRequest().withAPIName(APIName.GET_MEDIA_FOR_FRAGMENT_LIST).withStreamName(streamName);
final String endpoint = amazonKinesisVideo.getDataEndpoint(request).getDataEndpoint();
return new GetMediaForFragmentListWorker(streamName, fragmentNumbers, awsCredentialsProvider, endpoint, region, elementVisitor);
}
Aggregations