# Summary of S4-260194: Recommendations for TR 26.858 (FS_ACAPI)

## Overview

This pCR proposes recommendations for TR 26.858 v0.8.0, adding new clause 7.2 and clause 8 to provide guidance on enabling 3GPP speech and audio codecs (AMR, AMR-WB, EVS, IVAS) in WebRTC-based applications and services. The recommendations build upon the injectable codec mechanism described in the study.

## Clause 7.2: Injectable Codec Interfaces and Adapters for 3GPP Codecs in WebRTC

### General Approach

The document recommends implementing support for 3GPP codecs (AMR, AMR-WB, EVS, IVAS) in WebRTC through injectable encoder and decoder factories, utilizing established libwebrtc extension points. This approach ensures:
- Modularity and maintainability
- Alignment with WebRTC architecture
- Dynamic or static codec inclusion based on deployment needs

### Interface Recommendations

The pCR proposes four key interface elements:

1. **Codec Factory Interfaces**: Implement `AudioEncoderFactory` and `AudioDecoderFactory` classes for each 3GPP codec, exposing all configuration options (mode, bandwidth, channel count, codec-specific parameters) and supporting SDP mapping functions

2. **Adapter Layer**: Provide translation between 3GPP codec APIs (reference implementations from clause 4 and Annex A) and libwebrtc factory interfaces, encapsulating codec-specific initialization, configuration, and error handling

3. **Dynamic and Static Integration**: Support both static linking (build-time inclusion) and dynamic loading (shared library via dlopen/dlsym) for flexible deployment

4. **SDP and RTP Handling**: Ensure correct codec capability advertisement in SDP, handling of codec-specific SDP attributes (EVS, IVAS), and RTP payload formatting per 3GPP and IETF specifications

### Integration Steps

The document outlines a four-step integration process:
1. Implement/adapt encoder/decoder wrappers conforming to libwebrtc `AudioEncoder` and `AudioDecoder` interfaces
2. Register factories with `PeerConnectionFactory` at application startup
3. Update SDP negotiation logic to recognize and negotiate new codecs with required fmtp parameters
4. Validate with loopback and interoperability tests, ensuring conformance to 3GPP specifications and RTP payload formats

### Complementarity with WebCodecs

The injectable codec mechanism is positioned as complementary to WebCodecs:
- Injectable codecs target native and cross-platform WebRTC applications (including browser implementations based on libwebrtc)
- WebCodecs supports browser-based deployments
- Both approaches can operate in parallel for different use cases

## Clause 8: Recommendations for Potential Normative Work

### 3GPP Responsibilities

The document recommends 3GPP should:
- Continue maintaining specifications for 3GPP speech and audio codecs (AMR, AMR-WB, EVS, IVAS), including reference software and conformance test suites
- Maintain codec-specific SDP and RTP payload handling in alignment with IETF payload format specifications
- Specify codec interface requirements and recommended adapter patterns for real-time communication frameworks
- Define APIs for the codecs
- Identify and document use cases and requirements for 3GPP codec integration in WebRTC and browser environments

### Collaboration with Other Bodies

The pCR identifies three key collaboration areas:

1. **IETF**: Responsible for RTP protocols, SDP negotiation, and signaling protocols. 3GPP should collaborate to ensure alignment and address gaps in payload/signaling support for new codecs

2. **W3C**: Responsible for WebRTC and WebCodecs APIs. 3GPP should provide requirements and technical input for 3GPP codec support in browser APIs and collaborate on codec-specific API extensions

3. **Enabler Fora and Open-Source Communities**: 3GPP should encourage publication of adapters, wrappers, and test assets through platforms like 5G-MAG or GitHub to facilitate adoption and interoperability in open-source projects (libwebrtc, browser engines)

### Open Issues and Future Work

Three open issues are identified:
- Definition and implementation of custom RTCPeerConnection objects based on RTPTransport for advanced media transport scenarios
- Comprehensive browser-based WebRTC support for all 3GPP codecs requiring ongoing coordination
- Evolution of WebCodecs and related APIs to support advanced 3GPP codec features (metadata, multi-stream, dynamic reconfiguration)

### Summary of Normative Work Recommendations

- 3GPP should focus on codec technology, interface requirements, and reference assets while collaborating with IETF, W3C, and relevant fora (5G-MAG) or public projects
- Prioritize normative work where 3GPP has unique expertise or requirements
- Coordinate with other bodies to avoid duplication and maximize impact
- Track and address open issues through liaisons, joint work items, and public implementation efforts