Project

General

Profile

Development » History » Revision 2

Revision 1 (Adam Sutton, 2013-04-04 17:06) → Revision 2/5 (Adam Sutton, 2013-06-05 22:16)

h1. Development

If you are intending to do Tvheadend development or simply self-building / testing then this page gives a few useful hints and tips.



h2. Environment

If you intend to build and test tvheadend its recommended that you do this as your own user, it'll make things a lot easier and can help isolate a test build from your main live build.

You will need to give your user account the necessary permissions to access the DVB hardware:

<pre>
sudo usermod -a -G video $(id -nu)
</pre>

If you already have an existing configuration you might consider taking a copy of this to give you a realistic data set without tainting your main config:

<pre>
sudo cp -a ~hts/.hts/tvheadend/ ./test-conf
sudo chown -R $(id -nu):$(id -ng) ./test-conf
</pre>

You should now be able to run tvheadend as yourself (remember to turn off the main tvheadend service):

<pre>
mkdir -p test-conf
./build.linux/tvheadend -c ./test-conf
</pre>



h2. Debugging

If you are investigating problems within Tvheadend then its worth being familiar with tools such as gdb and valgrind, although these are not covered here.

However one thing that can be useful in investigating crashes within Tvheadend is to ensure that coredumps are generated, this will allow post analysis in gdb without having to actual run Tvheadend within gdb.

You can enable temporarily by running:

<pre>
ulimit -c unlimited
</pre>

To make this permanent put this somewhere in your shell environment setup (.bashrc, .profile, etc...)