首页
学习
活动
专区
圈层
工具
发布
社区首页 >问答首页 >使用Gstreamer时,Android出现“TLS cerificate不可接受”错误

使用Gstreamer时,Android出现“TLS cerificate不可接受”错误
EN

Stack Overflow用户
提问于 2020-11-12 05:20:50
回答 1查看 231关注 0票数 0

我目前已经与GStreamer设置了我的项目,我想流式传输一个RTSP链接。在我将GStreamer与我的项目集成之前,我复习了这里提到的教程,并使用我自己的rtsp链接测试了媒体uri。啊,真灵!但它在我的项目中不起作用。有什么我应该找的东西吗?

-Project指向最新的gstreamer库

-Project还指向了最有针对性的ndk构建。

-C代码运行得很好,因为我能够看到提供的日志。

下面提供了完整的日志和错误:

代码语言:javascript
复制
2020-11-11 15:54:25.186 4248-4248/com.name.app.debug D/GStreamer+tutorial-5: 0:06:35.785514844 0x789bdded60 C:/Users/path/project-name/app/src/main/jni/tutorial-5.c:369:check_initialization_complete Initialization complete, notifying application. native_window:0x791bd7b4a0 main_loop:0x77abda46f0
2020-11-11 15:54:25.187 4248-4248/com.name.app.debug E/GStreamer: GStreamer initialized:
2020-11-11 15:54:25.187 4248-4248/com.name.app.debug D/GStreamer+tutorial-5: 0:06:35.785556094 0x789bdded60 C:/Users/path/project-name/app/src/main/jni/tutorial-5.c:515:gst_native_set_uri Setting URI to rtsp://censored
2020-11-11 15:54:25.187 4248-4248/com.name.app.debug D/GStreamer+tutorial-5: 0:06:35.785683907 0x789bdded60 C:/Users/path/project-name/app/src/main/jni/tutorial-5.c:566:gst_native_set_position Scheduling seek to 0:00:00.000000000 for later
2020-11-11 15:54:25.187 4248-4248/com.name.app.debug D/GStreamer+tutorial-5: 0:06:35.785701719 0x789bdded60 C:/Users/path/project-name/app/src/main/jni/tutorial-5.c:533:gst_native_play Setting state to PLAYING
2020-11-11 15:54:25.188 4248-4248/com.name.app.debug I/GStreamer:   playing:
2020-11-11 15:54:25.188 4248-4726/com.name.app.debug D/GStreamer+tutorial-5: 0:06:35.786643073 0x789be89f60 C:/Users/path/project-name/app/src/main/jni/tutorial-5.c:115:set_ui_message Setting message to: State changed to PAUSED
2020-11-11 15:54:25.188 4248-4726/com.name.app.debug E/gStreamer: Setting up message...State changed to PAUSED
2020-11-11 15:54:25.188 4248-4726/com.name.app.debug D/GStreamer+tutorial-5: 0:06:35.786874219 0x789be89f60 C:/Users/path/project-name/app/src/main/jni/tutorial-5.c:209:execute_seek Seeking to 0:00:00.000000000
2020-11-11 15:54:25.197 4248-4726/com.name.app.debug W/GStreamer+tutorial-5: 0:06:35.795876512 0x789be89f60 C:/Users/path/project-name/app/src/main/jni/tutorial-5.c:155:refresh_ui Could not query current duration (normal for still pictures)
2020-11-11 15:54:25.197 4248-4726/com.name.app.debug W/GStreamer+tutorial-5: 0:06:35.795964585 0x789be89f60 C:/Users/path/project-name/app/src/main/jni/tutorial-5.c:162:refresh_ui Could not query current position (normal for still pictures)
2020-11-11 15:54:25.227 4248-4747/com.name.app.debug E/GStreamer+default: 0:06:35.826470421 0x78bbdb14a0 ../gst-libs/gst/rtsp/gstrtspconnection.c:1052:gst_rtsp_connection_connect_with_response_usec failed to connect: Unacceptable TLS certificate
2020-11-11 15:54:25.227 4248-4747/com.name.app.debug E/GStreamer+rtspsrc: 0:06:35.826515473 0x78bbdb14a0 ../gst/rtsp/gstrtspsrc.c:5137:gst_rtsp_conninfo_connect:<source> Could not connect to server. (Generic error)
2020-11-11 15:54:25.228 4248-4747/com.name.app.debug W/GStreamer+rtspsrc: 0:06:35.826535682 0x78bbdb14a0 ../gst/rtsp/gstrtspsrc.c:7999:gst_rtspsrc_retrieve_sdp:<source> error: Failed to connect. (Generic error)
2020-11-11 15:54:25.228 4248-4747/com.name.app.debug W/GStreamer+rtspsrc: 0:06:35.826635786 0x78bbdb14a0 ../gst/rtsp/gstrtspsrc.c:8084:gst_rtspsrc_open:<source> can't get sdp
2020-11-11 15:54:25.228 4248-4747/com.name.app.debug W/GStreamer+rtspsrc: 0:06:35.826670109 0x78bbdb14a0 ../gst/rtsp/gstrtspsrc.c:8745:gst_rtspsrc_play:<source> failed to open stream
2020-11-11 15:54:25.228 4248-4747/com.name.app.debug W/GStreamer+rtspsrc: 0:06:35.826690317 0x78bbdb14a0 ../gst/rtsp/gstrtspsrc.c:6116:gst_rtspsrc_loop:<source> we are not connected
2020-11-11 15:54:25.228 4248-4726/com.name.app.debug D/GStreamer+tutorial-5: 0:06:35.826741932 0x789be89f60 C:/Users/path/project-name/app/src/main/jni/tutorial-5.c:115:set_ui_message Setting message to: Error received from element source: Could not open resource for reading and writing.


  [1]: https://gstreamer.freedesktop.org/documentation/tutorials/android/index.html?gi-language=c
EN

回答 1

Stack Overflow用户

回答已采纳

发布于 2020-11-16 23:13:41

找到答案了!显然,我的ssl certs文件夹放在错误的资产目录src/ assets /ssl/certs/ca-certificates.crt中,而它应该放在src/main/assets文件夹中。愚蠢的错误,但我希望这能帮助其他人!

票数 0
EN
页面原文内容由Stack Overflow提供。腾讯云小微IT领域专用引擎提供翻译支持
原文链接:

https://stackoverflow.com/questions/64794292

复制
相关文章

相似问题

领券
问题归档专栏文章快讯文章归档关键词归档开发者手册归档开发者手册 Section 归档