Examples of usage AVLib sdk
Clone or download
rz
Latest commit 40e612e Nov 8, 2018
Permalink
Type Name Latest commit message Commit time
Failed to load latest commit information.
app - Screen broadcasting feature Nov 8, 2018
AVLib-sdk developer's guide.pdf - Screen broadcasting feature Nov 8, 2018
AVLib-sdk-licence.pdf v1.0.0 Apr 6, 2018
README.md - Screen broadcasting feature Nov 8, 2018
build.gradle - Screen broadcasting feature Nov 8, 2018
logo.png - logo Apr 6, 2018
settings.gradle v1.0.0 Apr 6, 2018

README.md

AVLib sdk demo

Examples for AVLib sdk usage.

AVLib library is powerful RTMP-streaming solution that provides following features:

  • Ability to use with outdated and low-performance devices with Android 4.1+
  • Auto-detection device performance and setting an optimal stream configuration
  • Handling rotation and size changes with no stream re-initiation
  • Ability to customize frame size, video codec quality, video and audio bitrate, and disable audio
  • Activity and Fragment support
  • Decreasing bitrate when connection is slow
  • Switching the main/front cameras
  • Scaling types, aspect ratio correction, and full handling lifecycle
  • Handling errors
  • Simple interface
  • Fast performance
  • No dependencies
  • Armv7a and armv8-64 support
  • Action cameras support
  • “Tap to focus” feature
  • “Record stream” feature
  • Device screen broadcasting

How to use:

  • Contact with us for AVLib sdk

  • Add AVLib sdk into your project (It's one aar file without any dependencies)

dependencies {
	implementation(name: 'AVlib1.0.2', ext: 'aar')
}
  • For broadcasting from android cam use CameraStreamer class. Create instance and attach 'broadcast view'.

Camera view from layout

<com.onix.avlib.view.CameraStreamView
    android:id="@+id/camera_view"
    android:layout_width="match_parent"
    android:layout_height="match_parent" />
@Override
public void onCreate(@Nullable Bundle savedInstanceState) {
    super.onCreate(savedInstanceState);
    mStreamer = new CameraStreamer();
    mStreamer.onCreate(getActivity(), savedInstanceState);
}
@Override
public View onCreateView(LayoutInflater inflater, @Nullable ViewGroup container, @Nullable Bundle savedInstanceState) {
    View view = inflater.inflate(R.layout.fragment_camera_streaming, container, false);
    mStreamer.onCreateView(mBinding.cameraView, PreviewScaleType.CENTER_CROP);
    return view;
}
  • add some required lifecycle method calls. onPause, onResume, onDestroy, onConfigurationChanged, onSaveInstanceState. For example:
@Override
public void onPause() {
    super.onPause();
    mStreamer.onPause();
}

...
  • Add some customization if need: setVideoBitrate(VideoBitrate bitrate), setAudioBitrate(AudioBitrate bitrate), setPreviewSize(PreviewSize size)
@Override
public void onInitCompleted() {
    mStreamer.setServerUrl(mServerUrl);
}
  • Start/Stop broadcasting:
mStreamer.startStreaming();
mStreamer.stopStreaming();

Learn More

AVLib sdk developer's guide

Privacy Policy

Official website

Copyright © 2018 Onix-Systems, LLC, All Rights Reserved.