Coder Social home page Coder Social logo

open-webrtc-toolkit / owt-client-native Goto Github PK

View Code? Open in Web Editor NEW
379.0 37.0 180.0 3.81 MB

Open WebRTC Toolkit client SDK for native Windows/Linux/iOS applications.

Home Page: https://01.org/open-webrtc-toolkit

License: Apache License 2.0

Python 7.12% Shell 0.03% CSS 1.40% TeX 0.77% HTML 0.16% C++ 71.01% C 9.90% Objective-C 4.30% Java 0.07% Objective-C++ 5.09% Dockerfile 0.15%
webrtc mcu

owt-client-native's People

Contributors

brgavino avatar bshapero89 avatar chuigda avatar dvrogozh avatar gaomingkai avatar grgustaf avatar huachunbo avatar ihorbenko avatar jianjunz avatar jinchengshi avatar labwebrtctest avatar lzhai avatar owt-bot avatar qwu16 avatar ssmao avatar suncf2 avatar taste1981 avatar xueshiqiao avatar yanbin7 avatar yflisa avatar yxian avatar zhangyihui1 avatar zhouhuirun2015 avatar zhy1030 avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

owt-client-native's Issues

Build iOS framework failed, the build.py script doesn't work

Hey guys,

I wanna compile my iOS SDK, so I followed the steps described in ReadME.md:

  1. git clone the code
  2. gclient sync, the progress is successful, after sync finished, the folder is about 10G.
  3. exec scripts/build.py, errors comes out:
bash-3.2$ ./build.py
./build.py: line 12: Script to build WebRTC libs.

It builds Woogeen framework which includes WebRTC lib, WooGeen base, p2p and conference
lib. By default, it builds libs for all iOS on all architecturs. You can specify
a target architectur by --arch argument.

Output framework is located in out/Woogeen.framework.
: File name too long
./build.py: line 14: import: command not found
./build.py: line 15: import: command not found
./build.py: line 16: import: command not found
./build.py: line 17: import: command not found
./build.py: line 18: import: command not found
./build.py: line 19: import: command not found
./build.py: line 20: import: command not found
./build.py: line 21: import: command not found
./build.py: line 23: syntax error near unexpected token `os.path.join'
./build.py: line 23: `sys.path.append(os.path.join(os.path.dirname(os.path.dirname(__file__)),'build','config','mac'))'

someone told me I should exec python build.py instead, when I enter this command, some other errors comes here:

bash-3.2$ pwd
/Users/joey/Code/RTC/src/scripts
bash-3.2$ python build.py
Traceback (most recent call last):
  File "build.py", line 24, in <module>
    import sdk_info
ImportError: No module named sdk_info

I searched the file in src folder and found sdk_info stays in thirdparty directory, so I copied it to scripts folder, after executing python build.py again. I got anothor error:

➜  scripts git:(b74ee9b) ✗ python build.py                                                                       git:(b74ee9b|✚8…
Done. Made 1117 targets from 176 files in 5804ms
ninja: Entering directory `out/Debug-device-arm64'
[2573/2604] SOLINK obj/third_party/webrtc/sdk/arm64/WebRTC obj/third_party/webrtc/sdk/arm64/WebRTC.TOC
ld: warning: direct access in function 'google::protobuf::internal::ExtensionSet::MutableString(int, unsigned char, google::protobuf::FieldDescriptor const*)' from file 'obj/third_party/protobuf/libprotobuf_lite.a(extension_set.o)' to global weak symbol 'void google::protobuf::internal::arena_destruct_object<std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> > >(void*)' from file 'obj/third_party/webrtc/modules/audio_processing/aec_dump/aec_dump_impl/aec_dump_impl.o' means the weak symbol cannot be overridden at runtime. This was likely caused by different translation units being compiled with different visibility settings.
ld: warning: direct access in function 'google::protobuf::internal::ExtensionSet::MutableString(int, unsigned char, google::protobuf::FieldDescriptor const*)' from file 'obj/third_party/protobuf/libprotobuf_lite.a(extension_set.o)' to global weak symbol 'void google::protobuf::internal::arena_destruct_object<std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> > >(void*)' from file 'obj/third_party/webrtc/modules/audio_processing/aec_dump/aec_dump_impl/aec_dump_impl.o' means the weak symbol cannot be overridden at runtime. This was likely caused by different translation units being compiled with different visibility settings.
[2604/2604] LIBTOOL-STATIC obj/talk/oms/liboms_sdk_base.a
ninja: Entering directory `out/Debug-device-arm64'
[7/7] LIBTOOL-STATIC obj/talk/oms/liboms_sdk_p2p.a
ninja: Entering directory `out/Debug-device-arm64'
[8/8] LIBTOOL-STATIC obj/talk/oms/liboms_sdk_conf.a
ninja: Entering directory `out/Debug-device-arm64'
[36/36] LIBTOOL-STATIC obj/talk/oms/liboms_sdk_objc.a
ninja: Entering directory `out/Debug-device-arm64'
[1/1] LIBTOOL-STATIC obj/talk/oms/liboms_deps.a
Traceback (most recent call last):
  File "build.py", line 202, in <module>
    sys.exit(main())
  File "build.py", line 191, in main
    dist(opts.arch, opts.scheme, opts.ssl_root)
  File "build.py", line 121, in dist
    buildwebrtcframework(arch_list, scheme)
  File "build.py", line 107, in buildwebrtcframework
    os.path.join(OUT_PATH, WEBRTC_FRAMEWORK_NAME))
  File "/System/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/distutils/dir_util.py", line 128, in copy_tree
    "cannot copy tree '%s': not a directory" % src
distutils.errors.DistutilsFileError: cannot copy tree 'out/Debug-device-arm64/WebRTC.framework': not a directory

I'm not familiar with Python, I do not know how to reslove this, would you please have a look at my question, and maybe modify the scripts, and make them work perfectly? Thanks.

PS: environment:

➜  scripts git:(b74ee9b) ✗ python --version                                                                      git:
Python 2.7.10
➜  scripts git:(b74ee9b) ✗ uname -a                                                                              git:
Darwin xxx-MacBook-Pro.local 18.2.0 Darwin Kernel Version 18.2.0: Mon Nov 12 20:24:46 PST 2018; root:xnu-4903.231.4~2/RELEASE_X86_64 x86_64

windows conference cannot publish H265 codec stream

  1. windows conference client login
  2. windows conference client publish camera stream with H265 codec
  3. windows conference client subscribe mix stream

expected: the stream publish by windows client should be will in mix stream
actually: the stream publish by windows client cannot display in mix stream

windows p2p client will be crashed when publish to js client in debug mode

OWTChat.exe!issue_debug_notification(const wchar_t * const message) Line 28	C++
OWTChat.exe!__acrt_report_runtime_error(const wchar_t * message) Line 154	C++
OWTChat.exe!abort() Line 51	C++
[External Code]	
[Inline Frame] OWTChat.exe!rtc::webrtc_checks_impl::LogStreamer<>::Call(const char * file, const int line, const char * message) Line 198	C++
[Inline Frame] OWTChat.exe!rtc::webrtc_checks_impl::FatalLogCall<0>::operator&(const rtc::webrtc_checks_impl::LogStreamer<> & streamer) Line 272	C++
OWTChat.exe!cricket::UsedIds<cricket::Codec>::FindUnusedId() Line 372	C++

OWTChat.exe!cricket::UsedIdscricket::Codec::FindAndSetIdUsed(cricket::Codec * idstruct) Line 355 C++
OWTChat.exe!cricket::MergeCodecscricket::DataCodec(const std::vector<cricket::DataCodec,std::allocatorcricket::DataCodec > & reference_codecs, std::vector<cricket::DataCodec,std::allocatorcricket::DataCodec > * offered_codecs, cricket::UsedPayloadTypes * used_pltypes) Line 858 C++
OWTChat.exe!cricket::MediaSessionDescriptionFactory::GetCodecsForOffer(const cricket::SessionDescription * current_description, std::vector<cricket::AudioCodec,std::allocatorcricket::AudioCodec > * audio_codecs, std::vector<cricket::VideoCodec,std::allocatorcricket::VideoCodec > * video_codecs, std::vector<cricket::DataCodec,std::allocatorcricket::DataCodec > * data_codecs) Line 1632 C++
OWTChat.exe!cricket::MediaSessionDescriptionFactory::CreateOffer(const cricket::MediaSessionOptions & session_options, const cricket::SessionDescription * current_description) Line 1275 C++
OWTChat.exe!webrtc::WebRtcSessionDescriptionFactory::InternalCreateOffer(webrtc::CreateSessionDescriptionRequest request) Line 332 C++
OWTChat.exe!webrtc::WebRtcSessionDescriptionFactory::CreateOffer(webrtc::CreateSessionDescriptionObserver * observer, const webrtc::PeerConnectionInterface::RTCOfferAnswerOptions & options, const cricket::MediaSessionOptions & session_options) Line 234 C++
OWTChat.exe!webrtc::PeerConnection::CreateOffer(webrtc::CreateSessionDescriptionObserver * observer, const webrtc::PeerConnectionInterface::RTCOfferAnswerOptions & options) Line 1731 C++
OWTChat.exe!webrtc::ReturnType::Invoke<webrtc::PeerConnectionInterface,void (webrtc::PeerConnectionInterface::*)(webrtc::CreateSessionDescriptionObserver *, const webrtc::PeerConnectionInterface::RTCOfferAnswerOptions &) attribute((thiscall)),webrtc::CreateSessionDescriptionObserver ,webrtc::PeerConnectionInterface::RTCOfferAnswerOptions>(webrtc::PeerConnectionInterface * c, void(webrtc::PeerConnectionInterface::)(webrtc::CreateSessionDescriptionObserver *, const webrtc::PeerConnectionInterface::RTCOfferAnswerOptions &) m, webrtc::CreateSessionDescriptionObserver * a1, webrtc::PeerConnectionInterface::RTCOfferAnswerOptions a2) Line 123 C++
OWTChat.exe!webrtc::MethodCall2<webrtc::PeerConnectionInterface,void,webrtc::CreateSessionDescriptionObserver *,const webrtc::PeerConnectionInterface::RTCOfferAnswerOptions &>::OnMessage(rtc::Message *) Line 244 C++
OWTChat.exe!webrtc::internal::SynchronousMethodCall::OnMessage(rtc::Message *) Line 33 C++
OWTChat.exe!rtc::MessageQueue::Dispatch(rtc::Message * pmsg) Line 530 C++
OWTChat.exe!rtc::Thread::ProcessMessages(int cmsLoop) Line 499 C++
OWTChat.exe!rtc::Thread::Run() Line 328 C++
OWTChat.exe!rtc::Thread::PreRun(void * pv) Line 317 C++
[External Code]
[Frames below may be incorrect and/or missing, no symbols loaded for kernel32.dll]

Attempt to perform PeerConnection operation when it is closed.

This issue is very similar and created from issue #121

Ideally, we want to leave the desktop application (Callee / client native) acting as a server for callers, and to keep it logged in to signaling server, which callers are able to come and go as needed.

In our testing environment to reproduce issue, we use the sample application, and the sample web page (as the caller). Then do the following steps:

  1. Setup a p2p session stream video (everything successful)
  2. Click 'Stop Camera Sharing' from calling browser
    (Note: I can share camera again... in this state)
  3. Click "Logoff" button
  4. Click "Logon" button
  5. Click "Share Camera" button

This time I get the following:
(peerconnectionchannel.cc:106): Attempt to perform PeerConnection operation when it is closed.

I would hope this can work, Chunbo has said the following about this:
For the use scenario you mentioned, you want functionality like stop-share/share-again is about reconnection or new connection, which takes times for SDK to run detection in order to decide the next step. Similar things to the case like logging off/back on if you're talking about the signaling connection to signaling server, the streaming peer connection is different from signaling connections:
The logging off of signaling will not affect the ongoing streaming.

Ok... so one other step that makes this more interesting:

  1. Click the disconnect button from the application
  2. Click the connect button from the application

This has no effect... when sharing the camera it will yield the same result.

What does work, is if I disconnect, and alter the code to reset signaling_channel_ where io_ (sio::client) is reset. When this happens if will successfully stream again, so I am not sure if this is the fix or if this is a work-around. As a starting point it would be nice to know if the owt-client_native should be able to handle stresses like this.

windows conference client hardware mode will crash in msdk

OMSConference.exe!memmove(unsigned char * dst, unsigned char * src, unsigned long count) Line 194	Unknown

OMSConference.exe!oms::base::MSDKVideoDecoder::ReadFromInputStream(mfxBitstream * pBitstream, unsigned char * data, unsigned int len) Line 396 C++
OMSConference.exe!oms::base::MSDKVideoDecoder::Decode(const webrtc::EncodedImage & inputImage, bool missingFrames, const webrtc::CodecSpecificInfo * codecSpecificInfo, __int64 renderTimeMs) Line 247 C++
OMSConference.exe!webrtc::VCMGenericDecoder::Decode(const webrtc::VCMEncodedFrame & frame, __int64 nowMs) Line 234 C++
OMSConference.exe!webrtc::vcm::VideoReceiver::Decode(const webrtc::VCMEncodedFrame & frame) Line 373 C++
OMSConference.exe!webrtc::vcm::VideoReceiver::Decode(const webrtc::VCMEncodedFrame * frame) Line 339 C++
OMSConference.exe!webrtc::internal::VideoReceiveStream::Decode() Line 420 C++
OMSConference.exe!webrtc::internal::VideoReceiveStream::DecodeThreadFunction(void * ptr) Line 397 C++
OMSConference.exe!rtc::PlatformThread::Run() Line 163 C++
OMSConference.exe!rtc::PlatformThread::StartThread(void * param) Line 77 C++
[External Code]
[Frames below may be incorrect and/or missing, no symbols loaded for kernel32.dll]

Participant Left

Hello,

How we can know if any participant is left from conference. As we check with Android Framework for every participant, have observer to check the state when left the room.

For iOS framework ICSConferenceParticipant Class doesn't contains any Delegate to know.

We check ICSRemoteStreamDelegate method streamDidEnd but its not accurate, sometimes getting 2 participant records even though only one participant in conference.

How we can achieve "If any participant left the room".

Thanks

Krishna

Retain-cycle between OWTConferenceClient and its delegate

Say I have an iOS ViewController which retain a OWTConferenceClient instance, and set this view controller as its delegate (this delegate-pattern is very common in iOS development), although OWTConferenceClient's delegate is weak, but it strong reference an observer_ property which will strong reference to the delegate, so the retain-cycle happened:

"->" means strong reference
My ViewController -> OWTConferenceClient -> observer_ -> delegate( My ViewController).

OWTConferenceClient* client_;
id<OWTConferenceClientDelegate> delegate_;

- (void)setDelegate:(id<OWTConferenceClientDelegate>)delegate {
_observer = std::unique_ptr<
owt::conference::ConferenceClientObserverObjcImpl,
std::function<void(owt::conference::ConferenceClientObserverObjcImpl*)>>(
new owt::conference::ConferenceClientObserverObjcImpl(self, delegate),
[&self](owt::conference::ConferenceClientObserverObjcImpl* observer) {
self->_nativeConferenceClient->RemoveObserver(*observer);
});
_nativeConferenceClient->AddObserver(*_observer.get());
_delegate = delegate;

I have tried some ways to break the retain-cycle, such as add "__weak" before the property.

__weak id<OWTConferenceClientDelegate> delegate_; 

I simulated a similar problem situation in my Xcode Test project, adding "__weak" works, but it doesn't work in the OWT project, may be I missed some complier flags.. I don't have much experience on C++ nor Objective-C++, so maybe anyone else know how to fix this?

Bad file names in PR #11

Please fix bad names in #11.

Jenkins is the only directory name starts with a upper case letter. Could you please rename it and JenkinsfileForWindows to follow existing naming convention? QA infra may need some minor modifications because of the name change of Jenkins file.

iOS - Subcribe after it is unsubscribed

Hello Team,

We subscribed one OWTRemoteStream with particular OWTConferenceSubscribeOptions. After sometime, we need to change subscription,so we stop the current subscriptions and resubscribe for the same OWTRemoteStream we got the issue as The same remote stream has already been subscribed. Subcribe after it is unsubscribed. But subscriptionDidEnd delegate is called with same subscription id. Please help us to resolve this issue.

iOS conference resubscribe stream after stopped subscription will be crash

  1. ios client login and publish a stream
  2. ios client subscribe the forward stream
  3. ios client stopped the subscription
  4. ios client resubscribe the forward stream

In step 4, sdk will crash as follow:

(channel.cc:908): Changing video state, send=0
(paced_sender.cc:119): PacedSender resumed.
2019-03-25 17:52:54.014712+0800 OWTConference[39234:6093681] Subscribe stream success.
2019-03-25 17:52:54.014798+0800 OWTConference[39234:6093681] *** Assertion failure in -[RTCVideoTrack addRenderer:], ../../third_party/webrtc/sdk/objc/Framework/Classes/PeerConnection/RTCVideoTrack.mm:76
2019-03-25 17:52:54.017063+0800 OWTConference[39234:6093681] *** Terminating app due to uncaught exception 'NSInternalInconsistencyException', reason: '|renderer| is already attached to this track'
*** First throw call stack:
(0x1b5c3cec4 0x1b4e0da40 0x1b5b52b3c 0x1b66411d0 0x10560b5e0 0x104aa0a24 0x10487c4d8 0x105133824 0x105134dc8 0x105142a78 0x1b5bccdf4 0x1b5bc7cbc 0x1b5bc71f0 0x1b7e40584 0x1e2e0ad40 0x1048578f0 0x1b5686bb4)
libc++abi.dylib: terminating with uncaught exception of type NSException

windows cannot subscribe the forward or stream with other codec after subscribe it with h265 codec failed

windows hardware is closed:

  1. windows client login and publish a stream to mcu
  2. windows client subscribe mix or forward with h265 codec
  3. windows client subscribe mix or forward with other codec

in step 2, it will return "subscribe failed:Fail to set local description.!" msg from callback
in step 3, it will return "stream has already been subscribed. Subcribe after it is unsubscribed!" msg from callback

ios conference client do subscribe and unsubscribe continuity sometimes failed

Step:

  1. ios conference client login
  2. ios publish a stream
  3. ios client subscribe a stream and unsubscribe the stream continuity

In step3, will be failed in subscribe and log as follow:
failed - subscribe failed! Error Domain=com.intel.webrtc Code=3000 "The same remote stream has already been subscribed. Subcribe after it is unsubscribed" UserInfo={NSLocalizedDescription=The same remote stream has already been subscribed. Subcribe after it is unsubscribed}

ios conference published stream video will frozen when locked screen

  1. ios client login and publish a stream to mcu
  2. other client subscribe the forward stream published by ios client
  3. ios locked the screen
  4. ios unlocked the screen

expected: after step 3, the video should display normally in other client
actually: after step 3, the video will be frozen

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.