Skip to content

Commit f6e89b9

Browse files
author
Amin
committed
Initial commit
0 parents  commit f6e89b9

File tree

78 files changed

+9759
-0
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

78 files changed

+9759
-0
lines changed

.github/FUNDING.yml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
github: [php-webrtc]

.github/ISSUE_TEMPLATE/bug_report.md

Lines changed: 42 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,42 @@
1+
---
2+
name: "🐛 Bug Report"
3+
about: Report a reproducible bug in the PHP library
4+
title: "[Bug] "
5+
labels: bug
6+
---
7+
8+
## Description
9+
10+
A clear and concise description of the problem.
11+
12+
## Steps to Reproduce
13+
14+
List the steps to reproduce the behavior:
15+
16+
1. ...
17+
2. ...
18+
3. ...
19+
20+
## Expected Behavior
21+
22+
Describe what you expected to happen.
23+
24+
## Actual Behavior
25+
26+
Describe what actually happened.
27+
28+
## Environment
29+
30+
- PHP version: (e.g., 8.2.5)
31+
- Operating System: (e.g., Ubuntu 22.04, macOS 13)
32+
- Framework (if any): (e.g., Laravel 10, Symfony 6)
33+
- Composer version: (e.g., 2.7.0)
34+
- Additional packages used: (e.g., psr/log, monolog/monolog)
35+
36+
## Additional Context
37+
38+
Add any other context about the problem here, including screenshots, error logs, or related issues if applicable.
39+
40+
## Possible Fix (optional)
41+
42+
Suggest a fix or point to the code that might be related to the issue.
Lines changed: 25 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,25 @@
1+
---
2+
name: "🚀 Feature Request"
3+
about: Suggest an enhancement for the PHP library
4+
title: "[Feature] "
5+
labels: enhancement
6+
---
7+
8+
## Feature Description
9+
10+
Clearly and concisely describe the feature you would like to see implemented.
11+
12+
## Use Case / Motivation
13+
14+
What problem does this feature solve or what benefit does it bring to users of the PHP library?
15+
16+
## Related Context
17+
18+
- PHP version(s): (e.g., PHP 8.1, 8.2)
19+
- Frameworks: (e.g., Laravel, Symfony)
20+
- Related packages: (e.g., `psr/log`, `guzzlehttp/guzzle`)
21+
- Environment: (e.g., CLI, web, Swoole, ReactPHP)
22+
23+
## Suggested Implementation (optional)
24+
25+
If you have an idea of how this feature could be implemented, feel free to share it here.

.github/workflows/tests.yml

Lines changed: 79 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,79 @@
1+
name: RTP TESTS
2+
3+
on:
4+
push:
5+
branches: [ "master" ]
6+
pull_request:
7+
branches: [ "master" ]
8+
9+
permissions:
10+
contents: read
11+
12+
jobs:
13+
test:
14+
runs-on: ubuntu-latest
15+
16+
steps:
17+
- uses: actions/checkout@v4
18+
19+
- name: Set up PHP 8.4 with FFI and GMP
20+
uses: shivammathur/setup-php@v2
21+
with:
22+
php-version: 8.4
23+
tools: composer:v2
24+
extensions: ffi, gmp
25+
26+
- name: Validate composer.json and composer.lock
27+
run: composer validate --strict
28+
29+
- name: Cache Composer packages
30+
id: composer-cache
31+
uses: actions/cache@v3
32+
with:
33+
path: vendor
34+
key: ${{ runner.os }}-php-${{ hashFiles('**/composer.lock') }}
35+
restore-keys: |
36+
${{ runner.os }}-php-
37+
38+
- name: Install dependencies
39+
run: composer install --prefer-dist --no-progress
40+
41+
- name: Install FFmpeg 7.1.1 with libx264, libopus, libvpx 1.15.0
42+
run: |
43+
sudo apt-get update
44+
sudo apt-get install -y \
45+
autoconf automake build-essential cmake git libtool pkg-config \
46+
yasm nasm wget unzip libssl-dev \
47+
libx264-dev libopus-dev
48+
49+
# Install FFmpeg 7.1.1
50+
wget https://ffmpeg.org/releases/ffmpeg-7.1.1.tar.bz2
51+
tar xjf ffmpeg-7.1.1.tar.bz2
52+
cd ffmpeg-7.1.1
53+
./configure --enable-shared --enable-gpl --enable-libx264 --enable-libopus
54+
make -j$(nproc)
55+
sudo make install
56+
sudo ldconfig
57+
cd ..
58+
59+
# Build and install libvpx
60+
mkdir -p ~/vpx_sources
61+
cd ~/vpx_sources
62+
curl -LO https://github.com/webmproject/libvpx/archive/refs/tags/v1.15.0.tar.gz
63+
tar xzvf v1.15.0.tar.gz
64+
cd libvpx-1.15.0
65+
66+
./configure --prefix=/usr/local --enable-shared --disable-examples
67+
make -j$(nproc)
68+
sudo make install
69+
sudo ldconfig
70+
71+
pkg-config --modversion vpx || echo "libvpx not found"
72+
73+
- name: Check PHP version and extensions
74+
run: |
75+
php -v
76+
php -m | grep -i gmp
77+
78+
- name: Run PHPUnit tests
79+
run: vendor/bin/phpunit

CHANGELOG.md

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,11 @@
1+
# Changelog
2+
3+
All notable changes to this project will be documented in this file.
4+
5+
The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/)
6+
and this project adheres to [Semantic Versioning](https://semver.org/).
7+
8+
## [1.0.0] - 2025-05-13
9+
10+
### Added
11+
- First release

CODE_OF_CONDUCT.md

Lines changed: 115 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,115 @@
1+
# Code of Conduct - RTP
2+
3+
## Our Pledge
4+
5+
In the interest of fostering an open and welcoming environment, we as
6+
contributors and maintainers pledge to make participation in our project and
7+
our community a harassment-free experience for everyone, regardless of age, body
8+
size, disability, ethnicity, sex characteristics, gender identity and expression,
9+
level of experience, education, socio-economic status, nationality, personal
10+
appearance, race, religion, or sexual identity and orientation.
11+
12+
## Our Standards
13+
14+
Examples of behaviour that contributes to a positive environment for our
15+
community include:
16+
17+
* Demonstrating empathy and kindness toward other people
18+
* Being respectful of differing opinions, viewpoints, and experiences
19+
* Giving and gracefully accepting constructive feedback
20+
* Accepting responsibility and apologising to those affected by our mistakes,
21+
and learning from the experience
22+
* Focusing on what is best not just for us as individuals, but for the
23+
overall community
24+
25+
Examples of unacceptable behaviour include:
26+
27+
* The use of sexualised language or imagery, and sexual attention or advances
28+
* Trolling, insulting or derogatory comments, and personal or political attacks
29+
* Public or private harassment
30+
* Publishing others' private information, such as a physical or email
31+
address, without their explicit permission
32+
* Other conduct which could reasonably be considered inappropriate in a
33+
professional setting
34+
35+
## Our Responsibilities
36+
37+
Project maintainers are responsible for clarifying and enforcing our standards of
38+
acceptable behaviour and will take appropriate and fair corrective action in
39+
response to any behaviour that they deem inappropriate,
40+
threatening, offensive, or harmful.
41+
42+
Project maintainers have the right and responsibility to remove, edit, or reject
43+
comments, commits, code, wiki edits, issues, and other contributions that are
44+
not aligned to this Code of Conduct, and will
45+
communicate reasons for moderation decisions when appropriate.
46+
47+
## Scope
48+
49+
This Code of Conduct applies within all community spaces, and also applies when
50+
an individual is officially representing the community in public spaces.
51+
Examples of representing our community include using an official e-mail address,
52+
posting via an official social media account, or acting as an appointed
53+
representative at an online or offline event.
54+
55+
## Enforcement
56+
57+
Instances of abusive, harassing, or otherwise unacceptable behaviour may be
58+
reported to the community leaders responsible for enforcement at <github@aminyazdanpanah.com>.
59+
All complaints will be reviewed and investigated promptly and fairly.
60+
61+
All community leaders are obligated to respect the privacy and security of the
62+
reporter of any incident.
63+
64+
## Enforcement Guidelines
65+
66+
Community leaders will follow these Community Impact Guidelines in determining
67+
the consequences for any action they deem in violation of this Code of Conduct:
68+
69+
### 1. Correction
70+
71+
**Community Impact**: Use of inappropriate language or other behaviour deemed
72+
unprofessional or unwelcome in the community.
73+
74+
**Consequence**: A private, written warning from community leaders, providing
75+
clarity around the nature of the violation and an explanation of why the
76+
behaviour was inappropriate. A public apology may be requested.
77+
78+
### 2. Warning
79+
80+
**Community Impact**: A violation through a single incident or series
81+
of actions.
82+
83+
**Consequence**: A warning with consequences for continued behaviour. No
84+
interaction with the people involved, including unsolicited interaction with
85+
those enforcing the Code of Conduct, for a specified period of time. This
86+
includes avoiding interactions in community spaces as well as external channels
87+
like social media. Violating these terms may lead to a temporary or
88+
permanent ban.
89+
90+
### 3. Temporary Ban
91+
92+
**Community Impact**: A serious violation of community standards, including
93+
sustained inappropriate behaviour.
94+
95+
**Consequence**: A temporary ban from any sort of interaction or public
96+
communication with the community for a specified period of time. No public or
97+
private interaction with the people involved, including unsolicited interaction
98+
with those enforcing the Code of Conduct, is allowed during this period.
99+
Violating these terms may lead to a permanent ban.
100+
101+
### 4. Permanent Ban
102+
103+
**Community Impact**: Demonstrating a pattern of violation of community
104+
standards, including sustained inappropriate behaviour, harassment of an
105+
individual, or aggression toward or disparagement of classes of individuals.
106+
107+
**Consequence**: A permanent ban from any sort of public interaction within
108+
the community.
109+
110+
## Attribution
111+
112+
This Code of Conduct is adapted from the [Contributor Covenant](https://contributor-covenant.org/), version
113+
[1.4](https://www.contributor-covenant.org/version/1/4/code-of-conduct/code_of_conduct.md) and
114+
[2.0](https://www.contributor-covenant.org/version/2/0/code_of_conduct/code_of_conduct.md),
115+
and was generated by [contributing.md](https://contributing.md/generator).

0 commit comments

Comments
 (0)