TSDuck Version 3.16-1037 (TSDuck - The MPEG Transport Stream Toolkit)
Contributing to TSDuck development

TSDuck development is managed using Git. The reference repository is on GitHub.

Code contributions from external developers are welcome and will be reviewed (without guaranteed response time however). Contributions shall be submitted using pull requests on GitHub exclusively.

This documentation page summarizes the main actions to help developers and integrators to work with pull requests. This is the minimal set of actions. More details can be found on GitHub documentation. Several articles also describe the GitHub standard fork & pull request workflow. We specifically recommend this one.

Contributor workflow

The first requirement is to create a GitHub account, if you do not already have one.

Initially, create your own fork of the TSDuck repository. Go to the TSDuck reference repository and click on the "Fork" button.

Clone your GitHub forked repository on your development system. Use one of the two following commands.

git clone https://github.com/USERNAME/tsduck.git
git clone ssh://git@github.com/USERNAME/tsduck.git

In the first case, you will need to provide your password each time you push to GitHub. In the second case, you need to first upload your SSH public key to GitHub and then simply push without password.

You may want to track more precisely the master branch of the reference repository. See more details in the above mentioned article.

To facilitate merging, each contribution should be provided in a specific branch. Let's call it newfeature here:

git branch newfeature
git checkout newfeature

Then, do your coding work, commit modifications and push the work to GitHub:

git push origin newfeature

Finally, create the pull request. Go to your forked repository on GitHub, something like https://github.com/USERNAME/tsduck, and select the branch newfeature. Select the "Pull requests" tab and click on the green button "New pull request". Select the branch for the pull request and click on "Create pull request".

Integrator workflow

On your local development system, configure your TSDuck development git repository to track all pull requests. In the file .git/config, add the following line in section [remote "origin"]:

fetch = +refs/pull/*/head:refs/pull/origin/*

To integrate a pull request number NNN, fetch it in a local branch named NNN:

git fetch origin
git checkout -b NNN pull/origin/NNN

To merge the pull request into the master branch:

git checkout master
git merge NNN

Additional review and fix may be necessary before pushing the contribution.

Specifically, if the contribution brings new features, be sure to document them in the TSDuck user's guide. New features and bug fixes should also be documented in CHANGELOG.txt.