[mythtv-users] Please recommend hardware for caller id via MythTV

Michael Rice mikerice1969 at gmail.com
Tue May 15 04:24:46 UTC 2007


On 5/14/07, Jim Shank <jim.shank at gmail.com> wrote:
> This is great stuff. Thanks. I setup MythNotify but I spend quite a bit of
> time in xine and in the menu's. I was looking for an unconditional caller-id
> program like this. Only one thing, how can you run it all on your mythtv box
> instead of involving your Windows Box in the mess?

If you have the MythNotify stuff working you are lucky enough to have
a working modem in Linux it should be possible to modify it to use
XOSD to do the display.  If you only have a single system you can
probably just replace the stuff that sends the UDP packet with
something like the code below.  If you have multiple frontends you
probably want to add the xosd display code wherever the UDP packet is
received.  Anyway it would require you to add C code like I've
attached below somewhere.

A better idea would probably be dropping MythNotify altogether and
using a YAC server (elseed) on the machine with the modem and xyac on
each of your frontends.  If you can get it to work that is... as I
mentioned I was only able to get xyac working on one of my frontends.

Here is a simple xosd example for those interested.  You can basically
put up anything on your screen with a program like this.  In addition
to caller id info I use a similar program to display what is currently
recording.

/*
  This simple example displays the first two arguments on the screen.

  For example:
    ccid_xosd "Caller Name" "Phone Number"

  Compile with: gcc `xosd-config --cflags --libs` ccid_xosd.c -o ccid_xosd
*/

#include <stdio.h>
#include <string.h>
#include <stdlib.h>
#include <unistd.h>
#include <locale.h>
#include <xosd.h>

int main (int argc, char **argv)
{
  xosd *osd;
  int i;

  setlocale(LC_ALL, "");
  osd = xosd_create(3);
  if (osd == NULL) {
    perror("Could not open osd\n");
    exit (1);
  }
  {
    /* Use xfontsel to find a font you like. */
    int err = xosd_set_font(
                    osd,
                    "-adobe-helvetica-bold-*-*-*-*-240-100-*-p-*-iso8859-1");
    if (err == -1) {
      fprintf(stderr, "Could not set font: %s\n", xosd_error);
    }
  }
  xosd_set_pos(osd, XOSD_bottom);
  xosd_set_horizontal_offset (osd, 15);
  xosd_set_colour (osd, "white");
  xosd_display (osd, 0, XOSD_string, argv[1]);
  xosd_display (osd, 1, XOSD_string, argv[2]);
  xosd_display (osd, 2, XOSD_string, " ");
  sleep(20);
  xosd_destroy(osd);
  return 0;
}


More information about the mythtv-users mailing list