Skip to content

refactor: devicekit h264 goes to another repo#46

Merged
gmegidish merged 6 commits into
mainfrom
refactor-devicekit-h264-goes-to-another-repo
May 24, 2026
Merged

refactor: devicekit h264 goes to another repo#46
gmegidish merged 6 commits into
mainfrom
refactor-devicekit-h264-goes-to-another-repo

Conversation

@gmegidish
Copy link
Copy Markdown
Member

No description provided.

@coderabbitai
Copy link
Copy Markdown

coderabbitai Bot commented May 24, 2026

No actionable comments were generated in the recent review. 🎉

ℹ️ Recent review info
⚙️ Run configuration

Configuration used: Organization UI

Review profile: CHILL

Plan: Pro

Run ID: ed7507d2-0828-41b3-ae08-342289e88e27

📥 Commits

Reviewing files that changed from the base of the PR and between 8711ff3 and 912a6db.

📒 Files selected for processing (1)
  • DeviceKitTests/XCTestServer.swift

Walkthrough

This PR removes the ReplayKit broadcast extension target and all associated build wiring and Swift package dependencies for H264/Opus, deletes H264 streaming test utilities, replaces the LICENSE with Functional Source License v1.1 (with a future Apache‑2.0 grant), and updates SwiftLint and README license text.

🚥 Pre-merge checks | ✅ 4 | ❌ 1

❌ Failed checks (1 inconclusive)

Check name Status Explanation Resolution
Description check ❓ Inconclusive No description was provided; however, the title alone is sufficiently clear about the refactoring intent and relates to the changeset. Consider adding a description explaining the rationale, what was moved, and any migration notes for developers.
✅ Passed checks (4 passed)
Check name Status Explanation
Title check ✅ Passed The title accurately describes the primary change: removing H.264 codec implementation and related functionality that is being relocated to a separate repository.
Docstring Coverage ✅ Passed Docstring coverage is 100.00% which is sufficient. The required threshold is 80.00%.
Linked Issues check ✅ Passed Check skipped because no linked issues were found for this pull request.
Out of Scope Changes check ✅ Passed Check skipped because no linked issues were found for this pull request.

✏️ Tip: You can configure your own custom pre-merge checks in the settings.

✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Commit unit tests in branch refactor-devicekit-h264-goes-to-another-repo

Comment @coderabbitai help to get the list of available commands and usage tips.

Copy link
Copy Markdown

@coderabbitai coderabbitai Bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Caution

Some comments are outside the diff and can’t be posted inline due to platform limitations.

⚠️ Outside diff range comments (1)
LICENSE (1)

1-46: ⚠️ Potential issue | 🟠 Major | 🏗️ Heavy lift

Major license change needs immediate alignment + user notification.

This PR replaces the Apache License 2.0 with Functional Source License v1.1, which adds significant commercial restrictions via the “Competing Use” prohibition, with Apache 2.0 only becoming effective on the 2nd anniversary (“Grant of Future License”).

The repo documentation is currently inconsistent: README.md states “DeviceKit iOS is released under the Apache 2.0 License” while the top-level LICENSE reflects the temporary FSL restrictions first.

Key implications:

  1. Existing users updating now may face new restrictions during the FSL period.
  2. “Competing Use” (Permitted Purpose) is broad and could affect legitimate commercial deployments.
  3. Even if Apache becomes available later, the interim terms are materially different.

Please ensure:

  • README.md and any other distribution/license statements are updated to reflect the actual FSL terms + delayed Apache 2.0 availability.
  • The copyright holder (“Mobile Next HQ, Inc.”) is correct and the relevant stakeholders agreed to the license change.
  • Existing users/dependents were notified about the Apache → FSL transition and the interim restrictive period.
🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

In `@LICENSE` around lines 1 - 46, Update repository docs and communications to
reflect the license change from Apache 2.0 to Functional Source License v1.1:
revise README.md and any top-level or package-level license headers to state
that the project is currently licensed under the Functional Source License v1.1
with Apache 2.0 becoming available after the two‑year “Grant of Future License”;
explicitly call out the “Competing Use” restrictions and interim limitations;
confirm and document that the copyright holder "Mobile Next HQ, Inc." is correct
and that authorized stakeholders have approved the change; and prepare a
user-facing notification (release note/email) informing existing users and
downstream consumers about the interim FSL terms and the delayed Apache 2.0
availability.
🧹 Nitpick comments (1)
LICENSE (1)

44-45: ⚡ Quick win

Document the Software's "initial availability" date for clarity.

The Grant of Future License references "the second anniversary of the Software's initial availability" but doesn't specify that date. For legal clarity and to help users understand when Apache 2.0 becomes available, consider documenting this date explicitly, either in the license file or in a prominent location like the README.

This is especially important for:

  • Users evaluating whether to wait for Apache 2.0
  • Compliance teams tracking license transitions
  • Future maintainers managing the license conversion
🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

In `@LICENSE` around lines 44 - 45, Update the "Grant of Future License" language
to specify the Software's "initial availability" date explicitly: replace or
annotate the phrase "the Software's initial availability" in the LICENSE's
"Grant of Future License" section with the concrete calendar date (e.g.,
"initial availability: YYYY-MM-DD") or add a clear footnote linking to a README
entry; ensure the LICENSE's "Grant of Future License" header and text are
updated accordingly and mirror the same explicit date in the README or another
prominent project document so users and compliance teams can determine when the
Apache License, Version 2.0 becomes available.
🤖 Prompt for all review comments with AI agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

Outside diff comments:
In `@LICENSE`:
- Around line 1-46: Update repository docs and communications to reflect the
license change from Apache 2.0 to Functional Source License v1.1: revise
README.md and any top-level or package-level license headers to state that the
project is currently licensed under the Functional Source License v1.1 with
Apache 2.0 becoming available after the two‑year “Grant of Future License”;
explicitly call out the “Competing Use” restrictions and interim limitations;
confirm and document that the copyright holder "Mobile Next HQ, Inc." is correct
and that authorized stakeholders have approved the change; and prepare a
user-facing notification (release note/email) informing existing users and
downstream consumers about the interim FSL terms and the delayed Apache 2.0
availability.

---

Nitpick comments:
In `@LICENSE`:
- Around line 44-45: Update the "Grant of Future License" language to specify
the Software's "initial availability" date explicitly: replace or annotate the
phrase "the Software's initial availability" in the LICENSE's "Grant of Future
License" section with the concrete calendar date (e.g., "initial availability:
YYYY-MM-DD") or add a clear footnote linking to a README entry; ensure the
LICENSE's "Grant of Future License" header and text are updated accordingly and
mirror the same explicit date in the README or another prominent project
document so users and compliance teams can determine when the Apache License,
Version 2.0 becomes available.

ℹ️ Review info
⚙️ Run configuration

Configuration used: Organization UI

Review profile: CHILL

Plan: Pro

Run ID: a26f48e5-adcf-4672-9307-c2f01f977743

📥 Commits

Reviewing files that changed from the base of the PR and between 9562f3a and 91e1ad9.

📒 Files selected for processing (29)
  • .gitmodules
  • BroadcastUploadExtension/CGRect+Extension.swift
  • BroadcastUploadExtension/CMSampleBuffer+Extension.swift
  • BroadcastUploadExtension/Info.plist
  • BroadcastUploadExtension/SampleHandler.swift
  • BroadcastUploadExtension/ScreenStreamer.swift
  • BroadcastUploadExtension/TCPServer.swift
  • DeviceKitTests/H264Stream/ScreenshotH264Stream.swift
  • DeviceKitTests/H264Stream/UIImageScaler.swift
  • DeviceKitTests/Streamer/H264/H264.swift
  • DeviceKitTests/Streamer/H264/H264FrameProducer.swift
  • LICENSE
  • devicekit-ios.xcodeproj/project.pbxproj
  • h264-codec/.gitignore
  • h264-codec/Package.swift
  • h264-codec/Sources/h264-codec/CGImage+Extension.swift
  • h264-codec/Sources/h264-codec/CIImage+Extension.swift
  • h264-codec/Sources/h264-codec/CMSampleBuffer+Extension.swift
  • h264-codec/Sources/h264-codec/CVImageBuffer+Extension.swift
  • h264-codec/Sources/h264-codec/H264Encoder.swift
  • h264-codec/Tests/h264-codecTests/h264_codecTests.swift
  • opus-codec/.gitignore
  • opus-codec/Package.swift
  • opus-codec/Sources/Copus
  • opus-codec/Sources/OpusCodec/AudioFormatConverter.swift
  • opus-codec/Sources/OpusCodec/OpusAudioEncoder.swift
  • opus-codec/Sources/OpusEncoder/OpusEncoder.c
  • opus-codec/Sources/OpusEncoder/include/OpusEncoder.h
  • opus-codec/Tests/opus-codecTests/opus_codecTests.swift
💤 Files with no reviewable changes (28)
  • opus-codec/.gitignore
  • BroadcastUploadExtension/Info.plist
  • h264-codec/Tests/h264-codecTests/h264_codecTests.swift
  • h264-codec/Sources/h264-codec/CGImage+Extension.swift
  • DeviceKitTests/H264Stream/UIImageScaler.swift
  • h264-codec/Sources/h264-codec/CVImageBuffer+Extension.swift
  • opus-codec/Sources/OpusEncoder/OpusEncoder.c
  • DeviceKitTests/Streamer/H264/H264FrameProducer.swift
  • BroadcastUploadExtension/SampleHandler.swift
  • BroadcastUploadExtension/ScreenStreamer.swift
  • .gitmodules
  • opus-codec/Sources/OpusCodec/OpusAudioEncoder.swift
  • h264-codec/Sources/h264-codec/H264Encoder.swift
  • opus-codec/Tests/opus-codecTests/opus_codecTests.swift
  • opus-codec/Sources/OpusEncoder/include/OpusEncoder.h
  • opus-codec/Package.swift
  • h264-codec/Sources/h264-codec/CIImage+Extension.swift
  • opus-codec/Sources/OpusCodec/AudioFormatConverter.swift
  • BroadcastUploadExtension/CMSampleBuffer+Extension.swift
  • opus-codec/Sources/Copus
  • DeviceKitTests/Streamer/H264/H264.swift
  • BroadcastUploadExtension/TCPServer.swift
  • h264-codec/.gitignore
  • h264-codec/Sources/h264-codec/CMSampleBuffer+Extension.swift
  • DeviceKitTests/H264Stream/ScreenshotH264Stream.swift
  • BroadcastUploadExtension/CGRect+Extension.swift
  • devicekit-ios.xcodeproj/project.pbxproj
  • h264-codec/Package.swift

Copy link
Copy Markdown

@coderabbitai coderabbitai Bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Caution

Some comments are outside the diff and can’t be posted inline due to platform limitations.

⚠️ Outside diff range comments (3)
README.md (3)

214-216: ⚠️ Potential issue | 🔴 Critical | ⚡ Quick win

Update architecture diagram to reflect removed components.

The architecture section lists BroadcastUploadExtension/, h264-codec/, and opus-codec/ directories, but these are being removed in this PR. The diagram should reflect the updated repository structure.

📝 Proposed fix
   DeviceKitTests/               # XCUITest runner (automation server)
     JSONRPC/                    #   JSON-RPC protocol + 15 method handlers
     Streamer/                   #   MJPEG and H264 HTTP streaming
     XCTest/                     #   Private API wrappers (touch synthesis, accessibility)
-    H264Stream/                 #   Screenshot-based H264 streaming
-  BroadcastUploadExtension/     # ReplayKit extension (H264 + Opus over TCP)
-  h264-codec/                   # Swift package: H264 encoder (VideoToolbox)
-  opus-codec/                   # Swift package: Opus encoder (wraps libopus)
🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

In `@README.md` around lines 214 - 216, The architecture diagram and surrounding
text still list removed components (BroadcastUploadExtension, h264-codec,
opus-codec); update the README.md architecture section and the diagram to remove
those three entries and adjust any arrows/labels and explanatory text to reflect
the new repository structure and remaining components (e.g., update the diagram
asset and the paragraph that enumerates top-level directories so references to
BroadcastUploadExtension, h264-codec, and opus-codec are deleted or replaced
with current modules).

180-187: ⚠️ Potential issue | 🔴 Critical | ⚡ Quick win

Remove the entire Broadcast Extension section.

This section documents the ReplayKit broadcast extension feature including TCP ports for H264/Opus streams. Since the PR removes the BroadcastUploadExtension target and all codec dependencies, this entire section should be deleted.

📝 Proposed fix
-### Broadcast Extension
-
-The ReplayKit broadcast extension provides system-level screen and audio capture over TCP, independent of the JSON-RPC server.
-
-| Port | Stream |
-|------|--------|
-| 12005 | H264 video |
-| 12006 | Opus audio |
-
🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

In `@README.md` around lines 180 - 187, Delete the entire "Broadcast Extension"
section from the README (the "### Broadcast Extension" header and the following
table describing ports 12005/12006 and H264/Opus streams) because the PR removes
the BroadcastUploadExtension target and related codec dependencies; remove any
references to the broadcast extension elsewhere in README.md to keep docs
consistent with the codebase.

32-32: ⚠️ Potential issue | 🔴 Critical | ⚡ Quick win

Remove broadcast extension feature from documentation.

This line documents the broadcast audio/video feature, but the PR removes the BroadcastUploadExtension target and all related code. This feature is no longer available and should be removed from the feature list.

📝 Proposed fix
-- **Broadcast audio/video** — ReplayKit extension with H264 video and Opus audio over TCP
🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

In `@README.md` at line 32, Remove the obsolete "Broadcast audio/video — ReplayKit
extension with H264 video and Opus audio over TCP" feature line from the README
and any references to the BroadcastUploadExtension; update the feature list to
exclude broadcast extension mentions so documentation matches the code removal
of the BroadcastUploadExtension target.
🤖 Prompt for all review comments with AI agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

Outside diff comments:
In `@README.md`:
- Around line 214-216: The architecture diagram and surrounding text still list
removed components (BroadcastUploadExtension, h264-codec, opus-codec); update
the README.md architecture section and the diagram to remove those three entries
and adjust any arrows/labels and explanatory text to reflect the new repository
structure and remaining components (e.g., update the diagram asset and the
paragraph that enumerates top-level directories so references to
BroadcastUploadExtension, h264-codec, and opus-codec are deleted or replaced
with current modules).
- Around line 180-187: Delete the entire "Broadcast Extension" section from the
README (the "### Broadcast Extension" header and the following table describing
ports 12005/12006 and H264/Opus streams) because the PR removes the
BroadcastUploadExtension target and related codec dependencies; remove any
references to the broadcast extension elsewhere in README.md to keep docs
consistent with the codebase.
- Line 32: Remove the obsolete "Broadcast audio/video — ReplayKit extension with
H264 video and Opus audio over TCP" feature line from the README and any
references to the BroadcastUploadExtension; update the feature list to exclude
broadcast extension mentions so documentation matches the code removal of the
BroadcastUploadExtension target.

ℹ️ Review info
⚙️ Run configuration

Configuration used: Organization UI

Review profile: CHILL

Plan: Pro

Run ID: d39b92f7-0ec2-40d2-a960-bd9bcb2a4600

📥 Commits

Reviewing files that changed from the base of the PR and between 91e1ad9 and e9ae0ee.

📒 Files selected for processing (2)
  • .swiftlint.yml
  • README.md

Copy link
Copy Markdown

@coderabbitai coderabbitai Bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Actionable comments posted: 1

🤖 Prompt for all review comments with AI agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

Inline comments:
In @.github/workflows/build.yml:
- Line 32: The CI change removed the lint gate: reintroduce a lint job in
.github/workflows/build.yml (name it lint) that runs SwiftLint (or run `make
lint`) and make build-ipa and build-sim need: [trivy, lint] so lint must pass
before builds, or alternatively update README.md and the workflow to document
the intentional removal of CI linting (remove references to `make lint` and
.swiftlint.yml or add an explicit rationale comment) — modify the workflow jobs
`lint`, `build-ipa`, and `build-sim` accordingly.
🪄 Autofix (Beta)

Fix all unresolved CodeRabbit comments on this PR:

  • Push a commit to this branch (recommended)
  • Create a new PR with the fixes

ℹ️ Review info
⚙️ Run configuration

Configuration used: Organization UI

Review profile: CHILL

Plan: Pro

Run ID: b5672246-8fba-4345-9ff7-13669fbc40c6

📥 Commits

Reviewing files that changed from the base of the PR and between e9ae0ee and 8711ff3.

📒 Files selected for processing (1)
  • .github/workflows/build.yml


build-ipa:
needs: [lint, trivy]
needs: [trivy]
Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

⚠️ Potential issue | 🟠 Major | ⚡ Quick win

🧩 Analysis chain

🏁 Script executed:

#!/bin/bash
# Check if lint job still exists in the workflow
echo "Checking for lint job in workflow:"
if grep -q "^  lint:" .github/workflows/build.yml; then
  echo "✓ Lint job still exists"
  grep -A 10 "^  lint:" .github/workflows/build.yml
else
  echo "✗ Lint job was removed from workflow"
fi

# Show that linting is still configured
echo ""
echo "SwiftLint configuration still exists:"
fd -t f "\.swiftlint\.yml$" --exec head -15

echo ""
echo "Lint target still documented:"
rg -n "make lint" README.md Makefile

Repository: mobile-next/devicekit-ios

Length of output: 260


Restore or explicitly justify SwiftLint CI enforcement

  • In .github/workflows/build.yml, build-ipa/build-sim now only need trivy, and there is no lint job in this workflow—so SwiftLint won’t fail CI.
  • .swiftlint.yml still exists and README.md still documents make lint.

Reintroduce a lint job (and gate build-ipa/build-sim on it) or update docs/workflow with a clear rationale for intentionally removing the CI lint gate.

🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

In @.github/workflows/build.yml at line 32, The CI change removed the lint gate:
reintroduce a lint job in .github/workflows/build.yml (name it lint) that runs
SwiftLint (or run `make lint`) and make build-ipa and build-sim need: [trivy,
lint] so lint must pass before builds, or alternatively update README.md and the
workflow to document the intentional removal of CI linting (remove references to
`make lint` and .swiftlint.yml or add an explicit rationale comment) — modify
the workflow jobs `lint`, `build-ipa`, and `build-sim` accordingly.

@gmegidish gmegidish merged commit 0bd68f8 into main May 24, 2026
5 checks passed
@gmegidish gmegidish deleted the refactor-devicekit-h264-goes-to-another-repo branch May 24, 2026 14:10
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant