AWS -- Kinesis Video Streams -- 流视频旋转错误

时间:2021-05-11 15:50:00

标签: android amazon-web-services amazon-kinesis-video-streams

在 KinesisVideoClient 中使用 AndroidCameraMediaSourceConfiguration 创建媒体源。它有相机方向选项,但它不起作用 - 流媒体视频正在旋转

withCameraOrientation(-90) -- 它有默认值 -- 我试图改变角度变化但总是旋转错误

配置代码:

public class MyClass {

    public static ArrayList<Integer> numbers = new ArrayList<Integer>();

    public static void main(String[] args) {
        // Generate 50 different prices
        for (int i = 0; i < 50; i++) {
            int num = (int) (Math.random() * 100 + 1); // Add casting
            numbers.add(num);
        }

        System.out.println(calculateTotal());
        System.out.println(calculateTotalJava8());
    }

    public static int calculateTotal() {
        int total = 0; // Initialize to 0
        for (Integer price : numbers) {
            total += price; // Add the price to the total
        }
        return total;
    }
    
    public static int calculateTotalJava8() {
        int total = numbers.stream().mapToInt(Integer::intValue).sum();
        return total;
    }
}

0 个答案:

没有答案