summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--HISTORY2
-rw-r--r--INSTALL4
-rw-r--r--Makefile22
-rw-r--r--dxr3ffmpeg.h2
4 files changed, 21 insertions, 9 deletions
diff --git a/HISTORY b/HISTORY
index 408fdb9..fa4622a 100644
--- a/HISTORY
+++ b/HISTORY
@@ -356,3 +356,5 @@ NOTE: I havent found time to include all of the languages, will be done in pre2
the device, e.g. on VDR startup (Ville Skyttä)
- Error handling improvements (Ville Skyttä)
- Add French translation (#55, Michaël Nival)
+- Better defaults for FFmpeg and EM8300 in Makefile (#53, Ville Skyttä,
+ Michaël Nival).
diff --git a/INSTALL b/INSTALL
index bf3846f..3a8ccdd 100644
--- a/INSTALL
+++ b/INSTALL
@@ -5,7 +5,7 @@ Prerequisites:
version 0.16.0 or later of the driver, be sure to load it in OSS
audio mode (audio_driver=oss parameter to the em8300 module).
- Install VDR 1.6.x
-- Install the libavcodec library from http://ffmpeg.sourceforge.net/
+- Install FFmpeg from http://ffmpeg.mplayerhq.hu/
Installation:
@@ -13,7 +13,7 @@ Installation:
http://projects.vdr-developer.org/projects/show/plg-dxr3
- Unpack the package into "PLUGINS/SRC" directory.
- Make a symbolic link to this dxr3-plugin (ln -s dxr3-x.x.x dxr3).
-- Check FFMDIR and EM8300 in Makefile.
+- Check FFMPEG_INC, FFMPEG_LIBS and EM8300_INC in Makefile.
- Check extra settings in Makefile: -DMICROCODE, -DUSE_XINE_SCALER
- Call "make plugins" in the VDR root directory.
- Make sure your DXR3 driver modules are loaded and ready to run.
diff --git a/Makefile b/Makefile
index 08dd57f..72f6505 100644
--- a/Makefile
+++ b/Makefile
@@ -23,8 +23,18 @@ CXXFLAGS = -O2 -Wall -Woverloaded-virtual
VDRDIR = ../../..
LIBDIR = ../../lib
TMPDIR = /tmp
-FFMDIR = /usr/local/include/ffmpeg
-EM8300 = /usr/include
+
+# Usually something like -I/path/to/ffmpeg, should work as is if FFmpeg was
+# installed properly and pkg-config is available.
+FFMPEG_INC = $(shell pkg-config --cflags-only-I libavcodec)
+
+# Usually something like -L/path/to/ffmpeg/libavcodec -lavcodec, should work
+# as is if FFmpeg was installed properly and pkg-config is available.
+FFMPEG_LIBS = $(shell pkg-config --libs libavcodec)
+
+# Usually something like -I/path/to/em8300/include,should work as is (empty)
+# if em8300 headers were installed properly.
+EM8300_INC =
### Allow user defined options to overwrite defaults:
@@ -41,10 +51,10 @@ PACKAGE = $(shell echo vdr-$(ARCHIVE) | sed -e 's/git$$/git'`date +%Y%m%d`/)
### Includes and Defines (add further entries here):
-INCLUDES += -I$(VDRDIR)/include -I$(FFMDIR) -I$(FFMDIR)/libavcodec -I$(EM8300)
-LIBS = -L$(FFMDIR)/libavcodec -lavcodec
-DEFINES += -DPLUGIN_NAME_I18N='"$(PLUGIN)"'
-DEFINES += -D_GNU_SOURCE
+INCLUDES += -I$(VDRDIR)/include $(FFMPEG_INC) $(EM8300_INC)
+LIBS = $(FFMPEG_LIBS)
+DEFINES += -DPLUGIN_NAME_I18N='"$(PLUGIN)"'
+DEFINES += -D_GNU_SOURCE
# where is the microcode for the dxr3 located? em8300 driver version 0.15.2
# and later installs it by default to /lib/firmware/em8300.bin, and earlier
diff --git a/dxr3ffmpeg.h b/dxr3ffmpeg.h
index 5b1824b..c094b55 100644
--- a/dxr3ffmpeg.h
+++ b/dxr3ffmpeg.h
@@ -24,7 +24,7 @@
extern "C"
{
-#include <avcodec.h>
+#include <libavcodec/avcodec.h>
}
#include <string.h>