Skip to content

vakrolme/flutter_agora_rtc_rawdata

 
 

Repository files navigation

agora_rtc_rawdata

The rawdata plugin for agora_rtc_engine.

Important

The plugin only exports four methods to the dart layer that can register or unregister the observer.

class AgoraRtcRawdata {
  static const MethodChannel _channel =
      const MethodChannel('agora_rtc_rawdata');

  static Future<void> registerAudioFrameObserver(int engineHandle) {
    return _channel.invokeMethod('registerAudioFrameObserver', engineHandle);
  }

  static Future<void> unregisterAudioFrameObserver() {
    return _channel.invokeMethod('unregisterAudioFrameObserver');
  }

  static Future<void> registerVideoFrameObserver(int engineHandle) {
    return _channel.invokeMethod('registerVideoFrameObserver', engineHandle);
  }

  static Future<void> unregisterVideoFrameObserver() {
    return _channel.invokeMethod('unregisterVideoFrameObserver');
  }
}

The plugin changes the color of the video stream by the default:

  • Change local video to green
  • Change remote video to pink

You can find the code at:

If you can program with C++, you should process raw data on the C++ layer to improve performance and remove code about calling Android and iOS.

You can find the code at:

Installation

You should fork this repository, and modify the code to implement your requirement, such as use third-party beauty SDK.

Usage

import 'package:agora_rtc_engine/rtc_engine.dart';
import 'package:agora_rtc_rawdata/agora_rtc_rawdata.dart';

_initEngine() async {
    var engine = await RtcEngine.create(config.appId);
    await AgoraRtcRawdata.registerAudioFrameObserver(
        await engine.getNativeHandle());
    await AgoraRtcRawdata.registerVideoFrameObserver(
        await engine.getNativeHandle());
}

Resources

  • Doc for agora_rtc_engine
  • Doc for Android raw video data
  • Doc for iOS raw video data

License

MIT

About

The rawdata plugin for agora_rtc_engine

Resources

License

Stars

Watchers

Forks

Packages

No packages published

Languages

  • C++ 50.2%
  • Objective-C 45.5%
  • CMake 1.1%
  • Objective-C++ 0.9%
  • Java 0.5%
  • Dart 0.5%
  • Other 1.3%