Skip to content

Instantly share code, notes, and snippets.

View alexivaner's full-sized avatar
🍊

Ivan Surya Hutomo alexivaner

🍊
View GitHub Profile
@alexivaner
alexivaner / change_webrtc_name.py
Last active March 29, 2023 09:07
This code is for default package name of webrtc to custom package name
import os
import re
import argparse
import multiprocessing
def process_files(folder_path, old_str, new_str):
for root, dirs, files in os.walk(folder_path):
for file in files:
#include "api/frame_transformer_interface.h"
#include "call/ExampleTransformer.h"
namespace webrtc {
// WebRTC 只会在 webrtc::RTPSenderVideo 的构造方法中注册一个 callback,
// 具体可以参见 rtp_sender_video.cc frame_transformer_delegate_->Init()
void ExampleTransformer::RegisterTransformedFrameSinkCallback(
rtc::scoped_refptr<webrtc::TransformedFrameCallback> callback,
uint32_t ssrc) {
#include "api/frame_transformer_interface.h"
namespace webrtc {
class ExampleTransformer : public webrtc::FrameTransformerInterface {
public:
virtual void RegisterTransformedFrameSinkCallback(
rtc::scoped_refptr<webrtc::TransformedFrameCallback>,
uint32_t ssrc) override;
virtual void UnregisterTransformedFrameSinkCallback(uint32_t ssrc) override;