Den 24.09.2019 04:07, skrev cifang_bifang:
>
> I compiled the WebRTC native code (C++) and I'm playing with
> peerconnection server and client examples (under
> `src\talk\examples\peerconnection`).
>
> Everything went well until I set up the second client and try to
> connection them. They will crush.
> I tried to catch the breakpoint and found it exited
> because *(&capture_checker_)->IsCurrent()* check failed.
> Error Message:
> |
> #
> # Fatal error in: ../../modules/video_capture/windows/sink_filter_ds.cc,
> line 723
> # last system error: 0
> # Check failed: (&capture_checker_)->IsCurrent()
> #
What this means is that the function you are calling is being called
from a different thread than the one that the code expects.
WebRTC code is heavily dependent on functions being called from the
right thread (to avoid use of locks), so there's a lot of DCHECKs that
say "are we on the right thread?"
Sometimes this gets mighty confusing because callbacks are frequently
called on different threads than the one considered "main", so you need
to jump threads before you can call more functions - a few words about
this are written in api/DESIGN.md
I'd recommend checking what thread you're executing on, and trying to
avoid this error rather than disabling the DCHECK.
> |
> Call Stack:
> |
> KernelBase.dll!00007ffec7f90192()
> peerconnection_client.exe!rtc::webrtc_checks_impl::FatalLog(const char *
> file, int line, const char * message, const
> rtc::webrtc_checks_impl::CheckArgType * fmt, ...) Line 163
> at C:\Project\webrtc\src\rtc_base\checks.cc(163)
> [Inline Frame]
> peerconnection_client.exe!rtc::webrtc_checks_impl::LogStreamer<>::Call(const
> char * file, const int line, const char * message) Line 222
> at C:\Project\webrtc\src\rtc_base\checks.h(222)
> [Inline Frame]
> peerconnection_client.exe!rtc::webrtc_checks_impl::FatalLogCall<0>::operator&(const
> rtc::webrtc_checks_impl::LogStreamer<> & streamer) Line 294
> at C:\Project\webrtc\src\rtc_base\checks.h(294)
> peerconnection_client.exe!webrtc::videocapturemodule::CaptureInputPin::Receive(IMediaSample
> * media_sample) Line 723
> at
> C:\Project\webrtc\src\modules\video_capture\windows\sink_filter_ds.cc(723)
> [External Code]
>
> |
>
>
>
> I don't know what's wrong with it. So I decide to run other example
> fisrt. But the video_caputre_tests / video_engine_test / video_loopback
> crushed too.
> *PS: for video_loopback example I can see the camera screen appear for a
> moment.*
>
> I also tried to catch the breakpoint and found It exted because same
> check failed: *(&capture_checker_)->IsCurrent()*
>
> Error Message:
> |
> #
> # Fatal error in: ../../modules/video_capture/windows/sink_filter_ds.cc,
> line 723
> # last system error: 0
> # Check failed: (&capture_checker_)->IsCurrent()
> #
> |
>
> Call Stack:
> |
> KernelBase.dll!00007ffec7f90192()
> video_loopback.exe!rtc::webrtc_checks_impl::FatalLog(constchar*file,intline,constchar*message,constrtc::webrtc_checks_impl::CheckArgType*fmt,...)Line163
> at C:\Project\webrtc\src\rtc_base\checks.cc(163)
> [InlineFrame]video_loopback.exe!rtc::webrtc_checks_impl::LogStreamer<>::Call(constchar*file,constintline,constchar*message)Line222
> at C:\Project\webrtc\src\rtc_base\checks.h(222)
> [InlineFrame]video_loopback.exe!rtc::webrtc_checks_impl::FatalLogCall<0>::operator&(constrtc::webrtc_checks_impl::LogStreamer<>&streamer)Line294
> at C:\Project\webrtc\src\rtc_base\checks.h(294)
> video_loopback.exe!webrtc::videocapturemodule::CaptureInputPin::Receive(IMediaSample*media_sample)Line723
> at
> C:\Project\webrtc\src\modules\video_capture\windows\sink_filter_ds.cc(723)
> [ExternalCode]
> |
>
> I tried these examples on two computers(both windows 10 system) and get
> same results. And I didn't found same issues on Google or Google Groups.
>
> Any idea how to properly fix this?
>
> Thank you.
>
> --
>
> ---
> You received this message because you are subscribed to the Google
> Groups "discuss-webrtc" group.
> To unsubscribe from this group and stop receiving emails from it, send
> an email to
discuss-webrt...@googlegroups.com
> <mailto:
discuss-webrt...@googlegroups.com>.
> To view this discussion on the web visit
>
https://groups.google.com/d/msgid/discuss-webrtc/1fd3bd5a-3379-4727-9c12-b88ef445149e%40googlegroups.com
> <
https://groups.google.com/d/msgid/discuss-webrtc/1fd3bd5a-3379-4727-9c12-b88ef445149e%40googlegroups.com?utm_medium=email&utm_source=footer>.