awslabs / amazon-kinesis-video-streams-webrtc-sdk-c

Amazon Kinesis Video Streams Webrtc SDK is for developers to install and customize realtime communication between devices and enable secure streaming of video, audio to Kinesis Video Streams.
https://awslabs.github.io/amazon-kinesis-video-streams-webrtc-sdk-c/group__PublicMemberFunctions.html
Apache License 2.0
1.01k stars 304 forks source link

Add custom log registration logic code to replace the default log,hopes to help some people in need #325

Closed LiuAriel closed 3 years ago

LiuAriel commented 4 years ago
  1. At present, an additional interface log registration interface has been added to the webrtc project. Considering that kvscloud with amazon-kinesis-video-streams-producer-c is a public module, there is no additional extension in the structure. It does not call the PClientCallbacks structure, so it does not have the Kvscloud demo to directly call PClientCallbacks to register custom logs. The above implementation hopes to help some people in need;
  2. Modify files: sample / Common.c, Sample.h, kvsWebRTCClientMaster.c, source code is less than 10 lines;
  3. Source code project: webrtc_modify_2020.4.2.zip
disa6302 commented 4 years ago

Hello @juno52wendy ,

Thank you for your active contributions. On extracting the zip file, the folder is empty. Can you open a PR with your changes instead? It would be easier to review by the team. Thanks!

LiuAriel commented 4 years ago

Hello @juno52wendy ,

Thank you for your active contributions. On extracting the zip file, the folder is empty. Can you open a PR with your changes instead? It would be easier to review by the team. Thanks!

1.I'm really sorry, I didn't put the modified files yesterday because of negligence. I uploaded a new zip file because the company's regulations do not allow private PR to GitHub and other related warehouses. Please understand. 2.The selectedcandidatepairchange callback and getSelectedCandidatePair api were also implemented before, https://github.com/awslabs/amazon-kinesis-video-streams-webrtc-sdk-c/issues/302 but the feedback needs to be in accordance with the 3C standard. If possible, tell the detailed 3C implementation address, which can be modified as described above. 3.Source code project:webrtc_modify_2020.4.3.zip

LiuAriel commented 4 years ago

@disa6302 Use tools to find keywords: modify by juno 2020.4.2, that is, modify the log part

disa6302 commented 4 years ago

Thanks @juno52wendy ,

Will review it and get back to you. Again, thanks for your contributions!

disa6302 commented 4 years ago

@juno52wendy , I went through the file you sent and have a couple of questions:

LiuAriel commented 4 years ago

@juno52wendy , I went through the file you sent and have a couple of questions:

  • I am still unclear on what the change is trying to achieve. Can you detail more?
  • I am unable to find the definition of LogPrintFunc in the file you sent. Can you point me to this definition.
  • Where is globalCustomLogPrintFn defined?
  1. Because we need to output logs in our actual project, but the default log output cannot meet our needs, we need to additionally connect our own set of log systems;
  2. As I said before, we implement a set of kvscloud, cloud storage solution based on amazon-kinesis-video-streams-producer-c, in which there is a PClientCallbacks registration log directly, also access our log system, we also Have always communicated with your local technical support here, and let them feedback our needs to you;
  3. You can enter commands in the public module cd ../open-source/amazon-kinesis-video-streams-pic/src/utils/src/, edit vim Logger.c, which has the definition of globalCustomLogPrintFn; ../open- source / amazon-kinesis-video-streams-pic / src / common / include / com / amazonaws / kinesis / video / common / PlatformUtils.h, which has the definition of LogPrintFn;
  4. I have completed the function docking of kvscloud and modified the source code for the business needs in it, so I am familiar with the amazon-kinesis-video-streams-pic and amazon-kinesis-video-streams-producer-c public modules;
  5. To add an additional point, I have also implemented p2p based on the rfc standard literature, and I am very familiar with libnice, so I am familiar with the source code of kvswebrtc.
  6. At present, the webrtc also modifies the memory, returns the data, punches some logic optimizations, and optimizes for the specific business;
  7. Before I submitted The selectedcandidatepairchange callback and getSelectedCandidatePair api implementation, but told that it does not comply with the 3C standard, I have always asked for the implementation of the reference standard, and I have not told the reasons for the specific 3C standard. I have mentioned it in that issue and here, no longer here To elaborate, this is the last time .
MushMal commented 4 years ago

@juno52wendy Thanks for the codebase. Some of the changes are generic indeed to be added into the master branch. I think we would benefit from being able to overwrite some of the platform level callbacks including logging.

I think we should separately track the platform level callbacks from the WebRTC specific feature work.

Will update as soon as possible

disa6302 commented 3 years ago

Closing this since it has gone stale. Custom log functions can be passed as part of createFileLogger() invocation.