[mythtv] DVB integration - first attempt!

Edward Wildgoose Edward.Wildgoose at FRMHedge.com
Wed Apr 23 12:34:23 EDT 2003


I'm thinking that a small perl script wrapped around dvbstream would take care of creating a suitable device for myth to access.  We can then start working on the myth side and I am happy to knock you up an mpeg stream which just plays in a loop and gets stuffed down the socket in order to simulate the effect of having a card.

>>>>>>>>

No error handling and written completely off the cuff (I'll fix it tonight).  But I'm thinking that something as simple as this could grab the output of dvbstream and stuff it into a named pipe.  From here on we can just worry about mythtv reading from /dev/video

You will need to mknod the /dev/video device, etc.  Also, I have no idea how this works with devfs, etc...

I can alter this to play a test file in a loop and then you can simulate things on a machine with no DVB card.

#!/usr/bin/perl -w
# Write output of dvbstream to /dev/video named pipe
while (1) {
    open(FIFO, "> /dev/video")
        or die "Couldn't open /dev/video for writing: $!\n";
    open(INPUT, "< dvbstream -whatever")         or die $!;

    while (<FIFO>) {
        print FIFO $_;
    }

    close FIFO;
    close INPUT;
    sleep 1;
}



More information about the mythtv-dev mailing list