Skip to content

Commit

Permalink
ios
Browse files Browse the repository at this point in the history
  • Loading branch information
alexlapa committed Oct 3, 2023
1 parent 0c9ec61 commit ba5bea3
Show file tree
Hide file tree
Showing 3 changed files with 49 additions and 11 deletions.
34 changes: 34 additions & 0 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,7 @@ jobs:
needs:
- build
- build-linux
- clippy
- dartanalyze
- dartfmt
- ktfmt
Expand All @@ -43,6 +44,35 @@ jobs:
# Linting and formatting #
##########################

clippy:
strategy:
fail-fast: false
matrix:
platform:
- linux
- macos
- windows
runs-on: ${{ (matrix.platform == 'linux' && 'ubuntu-latest')
|| (matrix.platform == 'windows' && 'windows-latest')
|| 'macos-latest' }}
steps:
- uses: actions/checkout@v4
- uses: dtolnay/rust-toolchain@v1
with:
toolchain: stable
components: clippy

- name: Install `${{ matrix.platform }}` platform dependencies
run: |
sudo apt-get update
sudo apt-get install -y \
libgtk-3-dev libpulse-dev libudev-dev libxcomposite-dev \
libxdamage-dev libxfixes-dev libxrandr-dev libxtst-dev \
ninja-build
if: ${{ matrix.platform == 'linux' }}

- run: make cargo.lint

dartanalyze:
runs-on: ubuntu-latest
steps:
Expand Down Expand Up @@ -181,6 +211,9 @@ jobs:
platform:
- android
- ios
- linux
- macos
- windows
runs-on: ${{ (matrix.platform == 'linux' && 'ubuntu-latest')
|| (matrix.platform == 'windows' && 'windows-latest')
|| 'macos-13' }}
Expand Down Expand Up @@ -303,6 +336,7 @@ jobs:
needs:
- build
- build-linux
- clippy
- dartanalyze
- dartfmt
- ktfmt
Expand Down
5 changes: 2 additions & 3 deletions ios/Classes/model/Encoding.swift
Original file line number Diff line number Diff line change
Expand Up @@ -3,8 +3,7 @@ import WebRTC
/// Encoding describes a single configuration of a codec for an RTCRtpSender.
class Encoding {
/// A string which, if set, specifies an RTP stream ID (RID) to be sent using
/// the RID header
/// extension.
/// the RID header extension.
var rid: String

/// If true, the described encoding is currently actively being used.
Expand Down Expand Up @@ -34,7 +33,7 @@ class Encoding {
self.scaleResolutionDownBy = scaleResolutionDownBy
}

/// Converts this `RtpTransceiverInit` into an `RTCRtpTransceiverInit`.
/// Converts this `Encoding` into an `RTCRtpEncodingParameters`.
func intoWebRtc() -> RTCRtpEncodingParameters {
let params = RTCRtpEncodingParameters()
params.rid = self.rid
Expand Down
21 changes: 13 additions & 8 deletions lib/src/model/transceiver.dart
Original file line number Diff line number Diff line change
Expand Up @@ -43,27 +43,32 @@ class RtpTransceiverInit {
}
}

/// Config for an `RtpTransceiver` encoder.
/// Encoding describes a single configuration of a codec for an RTCRtpSender.
class SendEncodingParameters {
/// Creates a new [SendEncodingParameters] with the provided `rid` and `active`.
/// A string which, if set, specifies an RTP stream ID (RID) to be sent using
/// the RID header extension.
SendEncodingParameters(this.rid, this.active);

/// `rid` of this [SendEncodingParameters].
/// A string which, if set, specifies an RTP stream ID (RID) to be sent using
/// the RID header extension.
late String rid;

/// `active` of this [SendEncodingParameters].
/// If true, the described encoding is currently actively being used.
late bool active;

/// `maxBitrate` of this [SendEncodingParameters].
/// Indicates the maximum number of bits per second to allow for this
/// encoding.
int? maxBitrate;

/// `maxFramerate` of this [SendEncodingParameters].
/// A value specifying the maximum number of frames per second to allow for
/// this encoding.
double? maxFramerate;

/// `scaleResolutionDownBy` of this [SendEncodingParameters].
/// This is a double-precision floating-point value specifying a factor by
/// which to scale down the video during encoding.
double? scaleResolutionDownBy;

/// `scalability` of this [SendEncodingParameters].
/// Scalability mode describes layers within the media stream.
String? scalabilityMode;

/// Converts this model to the [Map] expected by Flutter.
Expand Down

0 comments on commit ba5bea3

Please sign in to comment.