如何在Amazon中更改视频源kinesis_video_gstreamer_sample_app.cpp?

时间:2018-05-15 14:26:45

标签: c++ macos gstreamer amazon-kinesis

我在MacOS上运行kinesis_video_gstreamer_sample_app.cpp,它从FaceTime(iSight)摄像头流向AWS Kinesis。如何将视频源切换到USB网络摄像头?谢谢:))

1 个答案:

答案 0 :(得分:1)

好的,我最终弄明白了,修改文件kinesis_video_gstreamer_sample_app.cpp,如下所示。

更改:

if (data.encoder) {
    data.source = gst_element_factory_make("autovideosrc", "source");

要:

if (data.encoder) {
    data.source = gst_element_factory_make("avfvideosrc", "source");
    g_object_set(G_OBJECT(data.source), "do-timestamp", TRUE, "device-index", 1, NULL);