Skip to content

Commit a2a5f79

Browse files
committed
Initial OpenMOQ publisher scaffold
0 parents  commit a2a5f79

25 files changed

Lines changed: 1257 additions & 0 deletions

.editorconfig

Lines changed: 20 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,20 @@
1+
root = true
2+
3+
[*]
4+
charset = utf-8
5+
end_of_line = lf
6+
insert_final_newline = true
7+
indent_style = space
8+
indent_size = 4
9+
trim_trailing_whitespace = true
10+
11+
[*.md]
12+
indent_size = 2
13+
trim_trailing_whitespace = false
14+
15+
[CMakeLists.txt]
16+
indent_size = 4
17+
18+
[*.{yml,yaml}]
19+
indent_size = 2
20+

.gitattributes

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
* text=auto eol=lf
2+
3+
*.sh text eol=lf
4+
*.cmake text eol=lf
5+
*.yml text eol=lf
6+
*.yaml text eol=lf
7+
Lines changed: 29 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,29 @@
1+
---
2+
name: Bug report
3+
about: Report a defect in MP4 parsing, CMSF packaging, or draft mapping behavior
4+
title: "[bug] "
5+
labels: bug
6+
assignees: ""
7+
---
8+
9+
## Summary
10+
11+
Describe the problem.
12+
13+
## Reproduction
14+
15+
1. Input asset details:
16+
2. Command used:
17+
3. Observed result:
18+
4. Expected result:
19+
20+
## Environment
21+
22+
- OS:
23+
- Compiler:
24+
- Draft mode: `14` or `16`
25+
26+
## Notes
27+
28+
Attach logs, object-plan output, or relevant sample details.
29+
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: Propose a new publisher, packaging, or transport capability
4+
title: "[feature] "
5+
labels: enhancement
6+
assignees: ""
7+
---
8+
9+
## Problem
10+
11+
What limitation are you trying to solve?
12+
13+
## Proposed Change
14+
15+
Describe the expected behavior and where it fits:
16+
17+
- MP4 parsing
18+
- CMAF or CMSF packaging
19+
- MOQT transport integration
20+
- Tooling or CI
21+
22+
## Draft Impact
23+
24+
Explain whether this affects draft-14, draft-16, or both.
25+

.github/pull_request_template.md

Lines changed: 19 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,19 @@
1+
## Summary
2+
3+
Describe the change.
4+
5+
## Validation
6+
7+
- [ ] `cmake -S . -B build`
8+
- [ ] `cmake --build build`
9+
- [ ] `ctest --test-dir build --output-on-failure`
10+
11+
## Protocol Impact
12+
13+
- [ ] draft-14
14+
- [ ] draft-16
15+
- [ ] packaging only
16+
17+
## Notes
18+
19+
Anything reviewers should pay special attention to.

.github/workflows/ci.yml

Lines changed: 26 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,26 @@
1+
name: CI
2+
3+
on:
4+
push:
5+
branches:
6+
- main
7+
- master
8+
pull_request:
9+
10+
jobs:
11+
build-and-test:
12+
runs-on: ubuntu-latest
13+
14+
steps:
15+
- name: Checkout
16+
uses: actions/checkout@v4
17+
18+
- name: Configure
19+
run: cmake -S . -B build
20+
21+
- name: Build
22+
run: cmake --build build --parallel
23+
24+
- name: Test
25+
run: ctest --test-dir build --output-on-failure
26+

.gitignore

Lines changed: 19 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,19 @@
1+
# Build output
2+
/build/
3+
/out/
4+
/cmake-build-*/
5+
6+
# CMake
7+
CMakeUserPresets.json
8+
Testing/
9+
10+
# Editors
11+
.DS_Store
12+
.idea/
13+
.vscode/
14+
*.swp
15+
*.swo
16+
17+
# Tooling
18+
compile_commands.json
19+

CMakeLists.txt

Lines changed: 44 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,44 @@
1+
cmake_minimum_required(VERSION 3.20)
2+
3+
project(openmoq_publisher
4+
VERSION 0.1.0
5+
DESCRIPTION "OpenMOQ contribution project: C++20 publisher for fragmented MP4 to CMSF/MOQT"
6+
LANGUAGES CXX)
7+
8+
set(CMAKE_CXX_STANDARD 20)
9+
set(CMAKE_CXX_STANDARD_REQUIRED ON)
10+
set(CMAKE_CXX_EXTENSIONS OFF)
11+
12+
option(OPENMOQ_BUILD_TESTS "Build OpenMOQ publisher tests" ON)
13+
14+
add_library(openmoq_publisher_lib
15+
src/cli_options.cpp
16+
src/cmaf_segmenter.cpp
17+
src/cmsf_packager.cpp
18+
src/moq_draft.cpp
19+
src/mp4_box.cpp
20+
)
21+
22+
target_include_directories(openmoq_publisher_lib
23+
PUBLIC
24+
${CMAKE_CURRENT_SOURCE_DIR}/include
25+
)
26+
27+
target_compile_features(openmoq_publisher_lib PUBLIC cxx_std_20)
28+
29+
if(CMAKE_CXX_COMPILER_ID MATCHES "Clang|GNU")
30+
target_compile_options(openmoq_publisher_lib PRIVATE -Wall -Wextra -Wpedantic)
31+
endif()
32+
33+
add_executable(openmoq-publisher src/main.cpp)
34+
target_link_libraries(openmoq-publisher PRIVATE openmoq_publisher_lib)
35+
36+
include(CTest)
37+
38+
if(OPENMOQ_BUILD_TESTS)
39+
add_executable(openmoq-publisher-tests
40+
tests/cmaf_segmenter_test.cpp
41+
)
42+
target_link_libraries(openmoq-publisher-tests PRIVATE openmoq_publisher_lib)
43+
add_test(NAME openmoq-publisher-tests COMMAND openmoq-publisher-tests)
44+
endif()

CODE_OF_CONDUCT.md

Lines changed: 22 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,22 @@
1+
# Code of Conduct
2+
3+
## Our Standard
4+
5+
Participation in this repository should stay respectful, technical, and focused on solving the problem at hand.
6+
7+
Examples of expected behavior:
8+
9+
- Provide clear, constructive technical feedback.
10+
- Assume good intent and ask for clarification before escalating disagreement.
11+
- Keep discussion tied to code, interoperability, specifications, and tests.
12+
13+
Examples of unacceptable behavior:
14+
15+
- Personal attacks, harassment, or discriminatory language.
16+
- Deliberate disruption of discussions or reviews.
17+
- Sharing private information without permission.
18+
19+
## Enforcement
20+
21+
Repository maintainers are responsible for clarifying and enforcing these standards and may remove comments, issues, pull requests, or commits that violate them.
22+

CONTRIBUTING.md

Lines changed: 35 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,35 @@
1+
# Contributing
2+
3+
## Scope
4+
5+
This repository currently focuses on a C++20 publisher pipeline for OpenMOQ:
6+
7+
- fragmented MP4 ingest
8+
- CMSF-oriented object planning
9+
- draft-14 primary MOQT behavior
10+
- draft-16 secondary compatibility mapping
11+
12+
Transport integration is intentionally separated from packaging. Contributions should preserve that boundary unless the change explicitly introduces a transport layer.
13+
14+
## Development
15+
16+
```bash
17+
cmake -S . -B build
18+
cmake --build build
19+
ctest --test-dir build --output-on-failure
20+
```
21+
22+
## Contribution Guidelines
23+
24+
- Keep changes C++20-compatible on Linux and macOS.
25+
- Prefer incremental changes with tests for parser, segmenter, or packaging behavior.
26+
- Avoid unnecessary media copies in the MP4 to CMSF path.
27+
- Document draft-specific MOQT behavior in [`docs/protocol-mapping.md`](/media/mondain/terrorbyte/workspace/github/moqxr/docs/protocol-mapping.md) when protocol assumptions change.
28+
- If a feature depends on unstable draft behavior, isolate it behind a clearly named abstraction.
29+
30+
## Pull Requests
31+
32+
- Explain the user-visible or interoperability impact.
33+
- Note whether the change affects draft-14, draft-16, or both.
34+
- Include a minimal reproduction or test case when fixing parser or packaging bugs.
35+

0 commit comments

Comments
 (0)