C++ MythTV client library

Build Status Coverity Scan Build Status

View the documentation doxygen-dev-docs

Welcome to CPPMyth Pages.

You can check out the project and build it

$ git clone https://github.com/janbar/cppmyth.git cppmyth
$ mkdir build
$ cd build
$ cmake ../cppmyth
$ make

Finally trying the "livetvdemo" on your MythTV backend host

$ ./demo/livetvdemo <backendip> <channum> | mplayer -

Making your demo ...

You can easily edit the source file demo.cpp . After writing your demo, rebuild the project typing again command 'make'.

$ nano ../cppmyth/demo/src/demo.cpp

Writing your MythTV client ...

You can easily write your MythTV client. All structures provided by the library are wrapped within shared or smart pointer. Just use them ...

Myth::Control clientMonitor(server, 6543, 6544, "0000");
if (!clientMonitor.IsOpen())
//Types ...Ptr are shared pointer.
//You can copy or forget without care.
Myth::ProgramListPtr progs = clientMonitor.GetRecordedList();
m_recordings = progs;
//Container pointer and its element pointers are always allocated.
//Only checking its size.
for (size_t i = 0; i < progs->size(); ++i) {
  Myth::ProgramPtr prog = (*progs)[i];
  if (prog->recording.recGroup == "LiveTV") {
Myth::ProgramPtr prog = clientMonitor.GetRecorded(chanid, startts);
//Standalone element pointer could be null_ptr.
//You have to check before deref.
if (prog) {
  m_title = prog->title;