Skip to content
Open
4 changes: 0 additions & 4 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -53,7 +53,6 @@ SRCS = \
vo_pi.c

BIN = $(ROOTDIR)/pidvbip
FLVTOH264 = $(ROOTDIR)/flvtoh264
LIBVGFONT = $(ROOTDIR)/libs/vgfont/libvgfont.a

#
Expand Down Expand Up @@ -103,9 +102,6 @@ reconfigure:
$(BIN): check_config $(LIBVGFONT) $(OBJS)
$(CC) -o $@ $(OBJS) $(LIBVGFONT) $(LDFLAGS)

$(FLVTOH264): check_config flvtoh264.o
$(CC) -o $@ flvtoh264.o $(LDFLAGS)

#
# Build Intermediates
#
Expand Down
75 changes: 14 additions & 61 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -3,30 +3,27 @@ pidvbip

DVB-over-IP set-top box software for the Raspberry Pi.

It requires Tvheadend running on a server:
It requires Tvheadend running on a server (or on same pi)

https://www.lonelycoder.com/tvheadend/
https://github.com/tvheadend/

pidvbip requires a development version of tvheadend from later than
the 24th August 2012. It will not work with the 3.0 release or
earlier. This can be cloned as follows:
GPU memory should be a minimum of 128MB in config.txt

git clone https://githib.com/tvheadend/tvheadend.git
gpu_mem=128

In addition to pidvbip itself, this repository contains some
experimental software:
Screenshots
-----------

* flvtoh264 - Simple parser to extract an h264 video stream from an FLV file
![](http://i.imgur.com/REHGLaBm.jpg "Info display")

![](http://i.imgur.com/Upa7Jahm.jpg "Channel Display")

Building
--------

The platform being used to develop pidvbip is Raspbian (2012-08-16 image).

pidvbip requires the following dependencies:

libmpg123-dev libfaad-dev liba52-dev libavahi-client-dev libfreetype6-dev
libmpg123-dev libfaad-dev liba52-dev libavahi-client-dev libfreetype6-dev libavformat-dev

After installing the above libraries, you can build pidvbip by typing
"./configure && make" in the source code directory.
Expand All @@ -36,10 +33,14 @@ MPEG-2 decoding
---------------

pidvbip requires that the MPEG-2 hardware codec is enabled (by
purchase of the license). Early versions of pidvbip has a software
purchase of the license). Early versions of pidvbip have a software
MPEG-2 decoder but this was removed in February 2013 to simplify
maintenance and development of the main hardware playback code.

The CPU-decoding version is still available at https://github.com/mikerr/pidvbip-cpu
which doesn't require the hardware codec, but does need a faster
pi model ( pi 2 or 3)

Usage
-----

Expand Down Expand Up @@ -89,54 +90,6 @@ streams, and software decoding of MPEG, AAC and A/52 (AC-3) audio
streams. Multi-channel audio streams are downmixed to Stereo.


OpenELEC build
--------------

NOTE: As of January 2013 the OE build is not functioning. I hope to
fix this soon.

A modified version of OpenELEC using pidvbip instead of xbmc as the
mediacenter package can be built from the fork of OpenELEC at:

https://github.com/linuxstb/OpenELEC.tv

This is configured to take the latest "git master" version of pidvbip
directly from github. To build, do the following

git clone https://github.com/linuxstb/OpenELEC.tv
cd OpenELEC.tv
PROJECT=pidvbip ARCH=arm make release

This will generate (after many hours, and using about 6GB of disk
space) a .bz2 file within the "target" subdirectory.

To create a bootable SD card, format a SD card as FAT32 (no Linux
format partitions are needed) and copy the following files:

3rdparty/bootloader/bootcode.bin
3rdparty/bootloader/start.elf
target/KERNEL (rename to kernel.img)
target/SYSTEM


In addition, you should add a config.txt file including your MPEG-2
license key (if required) and any other settings, plus a cmdline.txt
file containing the following line:

boot=/dev/mmcblk0p1 ssh quiet

(if you don't want to enable the ssh server, remove "ssh" from the
above line)



Bugs
----

pidvbip is still very early software and many things don't work or are
not implemented yet. See the file BUGS for more information.


Copyright
---------

Expand Down
20 changes: 10 additions & 10 deletions avplay.c
Original file line number Diff line number Diff line change
Expand Up @@ -57,15 +57,15 @@ static void convert4(unsigned char* dest, unsigned char* src, int size)
}
}

static int map_vcodec(enum CodecID id)
static int map_vcodec(enum AVCodecID id)
{
printf("Mapping video codec ID %d (%x)\n", id, id);
switch (id) {
case CODEC_ID_MPEG2VIDEO:
case CODEC_ID_MPEG2VIDEO_XVMC:
case AV_CODEC_ID_MPEG2VIDEO:
case AV_CODEC_ID_MPEG2VIDEO_XVMC:
fprintf(stderr,"vcodec=MPEG2\n");
return OMX_VIDEO_CodingMPEG2;
case CODEC_ID_H264:
case AV_CODEC_ID_H264:
fprintf(stderr,"vcodec=AVC\n");
return OMX_VIDEO_CodingAVC;
case 13:
Expand All @@ -78,18 +78,18 @@ static int map_vcodec(enum CodecID id)
return -1;
}

static int map_acodec(enum CodecID id)
static int map_acodec(enum AVCodecID id)
{
printf("Mapping audio codec ID %d (%x)\n", id, id);
switch (id) {
case CODEC_ID_MP2:
case CODEC_ID_MP3:
case AV_CODEC_ID_MP2:
case AV_CODEC_ID_MP3:
fprintf(stderr,"acodec=MPEG\n");
return HMF_AUDIO_CODEC_MPEG;
case CODEC_ID_AC3:
case AV_CODEC_ID_AC3:
fprintf(stderr,"acodec=AC3\n");
return HMF_AUDIO_CODEC_AC3;
case CODEC_ID_AAC:
case AV_CODEC_ID_AAC:
fprintf(stderr,"acodec=AAC\n");
return HMF_AUDIO_CODEC_AAC;
default:
Expand Down Expand Up @@ -173,7 +173,7 @@ static void* avplay_thread(struct avplay_t* avplay)
exit(1);
}

if (fmt_ctx->streams[audio_stream_idx]->codec->codec_id == CODEC_ID_AAC) {
if (fmt_ctx->streams[audio_stream_idx]->codec->codec_id == AV_CODEC_ID_AAC) {
AVCodecContext* c = fmt_ctx->streams[audio_stream_idx]->codec;
if (c->extradata_size != 2) {
fprintf(stderr,"Unexpected AAC extradata size %d, aborting\n",c->extradata_size);
Expand Down
2 changes: 1 addition & 1 deletion configure
Original file line number Diff line number Diff line change
Expand Up @@ -73,7 +73,7 @@ check_cc_snippet "vcos" '#include <interface/vcos/vcos.h>;
void t(){vcos_malloc_aligned(0,0,0);}' ||\
die "Failed to locate vcos"

LDFLAGS="$LDFLAGS -lEGL -lGLESv2"
LDFLAGS="$LDFLAGS -lbrcmEGL -lbrcmGLESv2"
check_cc_snippet "gles" '#include <EGL/egl.h>;
void t(){eglCreateContext(0,0,0,0);}' ||\
die "Failed to locate GLES"
Expand Down
160 changes: 0 additions & 160 deletions flvtoh264.c

This file was deleted.

Loading