Skip to content

Docs/Migration: 1.x → 2.x breaking API changes are not documented (package rename, ConnectChecker rename) #2118

Description

@MikalaiKryvusha

Summary

RootEncoder 2.x introduced significant breaking changes to the public API compared to 1.x. These changes are not reflected in the README or a migration guide, which makes upgrading unnecessarily painful. This issue documents what changed and requests a migration guide.

Affected versions

Migrating from library:1.xlibrary:2.4.7

Breaking changes discovered

1. Package rename for streaming classes

1.x 2.x
com.pedro.rtplibrary.rtmp.RtmpCamera1 com.pedro.library.rtmp.RtmpCamera1
com.pedro.rtplibrary.rtsp.RtspCamera1 com.pedro.library.rtsp.RtspCamera1

2. ConnectCheckerRtmp replaced by ConnectChecker

1.x 2.x
com.pedro.rtmp.utils.ConnectCheckerRtmp com.pedro.common.ConnectChecker

3. Callback method renames (removed protocol-specific suffixes)

1.x callback 2.x callback
onConnectionSuccessRtmp() onConnectionSuccess()
onConnectionFailedRtmp(reason) onConnectionFailed(reason)
onNewBitrateRtmp(bitrate) onNewBitrate(bitrate) (from BitrateChecker)
onDisconnectRtmp() onDisconnect()
onAuthErrorRtmp() onAuthError()
onAuthSuccessRtmp() onAuthSuccess()
(not present) onConnectionStarted(url)

4. prepareVideo signature change

// 1.x
boolean prepareVideo(int width, int height, int fps, int bitrate, CameraHelper.Facing facing)

// 2.x
boolean prepareVideo(int width, int height, int fps, int bitrate, int rotation)

5. GlInterface.setCustomImageToStream() / clearCustomImageToStream() removed

In 2.x the static-image injection API was removed. The replacement is to use BaseFilterRender via glInterface.setFilter(...), but there is no documented equivalent for injecting a static bitmap frame.

Request

Please add a MIGRATION.md or a "Migrating from 1.x to 2.x" section in the README. Even a brief table of renames would save users hours of debugging.

Thank you for the great library!

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions