use of com.amazonaws.kinesisvideo.internal.client.mediasource.MediaSourceSink in project aws-sdk-android by aws-amplify.
the class AndroidCameraMediaSourceTest method testInitializedState.
@Test
public void testInitializedState() throws KinesisVideoException {
cameraMediaSource = new AndroidCameraMediaSource(STREAM_NAME, context);
cameraMediaSource.configure(configuration);
MediaSourceSink sink = new MediaSourceSink() {
@Override
public void onFrame(@NonNull KinesisVideoFrame kinesisVideoFrame) throws KinesisVideoException {
}
@Override
public void onCodecPrivateData(@Nullable byte[] codecPrivateData) throws KinesisVideoException {
}
@Override
public void onCodecPrivateData(@Nullable byte[] codecPrivateData, int trackId) throws KinesisVideoException {
}
@Override
public void onFragmentMetadata(@NonNull String metadataName, @NonNull String metadataValue, boolean persistent) throws KinesisVideoException {
}
@Override
public KinesisVideoProducerStream getProducerStream() {
return null;
}
};
cameraMediaSource.initialize(sink);
assertThat(cameraMediaSource.getMediaSourceState()).isEqualTo(MediaSourceState.INITIALIZED);
assertThat(cameraMediaSource.getMediaSourceSink()).isEqualTo(sink);
cameraMediaSource.free();
}
Aggregations