Commit 5a28d999 authored by Klaus Schmidinger's avatar Klaus Schmidinger Committed by Dieter Hametner

Version 1.7.22

Original announce message:
VDR developer version 1.7.22 is now available at

       ftp://ftp.tvdr.de/vdr/Developer/vdr-1.7.22.tar.bz2

A 'diff' against the previous version is available at

       ftp://ftp.tvdr.de/vdr/Developer/vdr-1.7.21-1.7.22.diff

MD5 checksums:

b9c0fe1aac8e653c0d0234bc72c2bb2c  vdr-1.7.22.tar.bz2
868bb332342c9a78beda17cc85e0bb93  vdr-1.7.21-1.7.22.diff

WARNING:
========

This is a developer version. Even though I use it in my productive
environment. I strongly recommend that you only use it under controlled
conditions and for testing and debugging.

From the HISTORY file:
- Fixed scaling subtitles in case the primary device's GetVideoSize() function doesn't
  return actual values (thanks to Luca Olivetti).
- The DiSEqC codes are now copied in the call to cDiseqc::Execute().
- VDR now supports "Satellite Channel Routing" (SCR) according to EN50494 (based on
  the "unicable" patch from Lars Hanisch).
  Since "Unicable" is a registered trademark and stands for only one of many
  implementations of SCR, the following changes have been made compared to the patch,
  which need to be taken into account by people who have set up their system using
  the patch:
  - The 'U' parameter in the diseqc.conf file has been changed to 'S' ("Scr").
  - The configuration file name has been changed from "unicable.conf" to "scr.conf".
- Updated sources.conf (thanks to Arthur Konovalov).
- The SVDRP command LSTC now also accepts channel IDs (thanks to Dominic Evans).
- Fixed handling DVB subtitles and implemented decoding textual DVB subtitles (thanks
  to Rolf Ahrenberg).
- Added cap_net_raw to the capabilities that are not dropped (thanks to Dominic Evans).
- Fixed setting the start time of an edited recording (thanks to Christoph Haubrich).
- Temporarily switching free devices to transponders in order to have their running
  status updated is now done by marking the devices as "occupied" for a certain
  amount of time.
- The new setup options "LNB/Device n connected to sat cable" can be used to define
  which DVB-S devices are connected to the same sat cable and are therefore "bonded".
  This obsoletes the LNBSHARE patch. Users of the LNBSHARE patch will need to newly
  set up their sat devices with the above options.
- Fixed a crash when deleting a recording while cutting it (thanks to Ville Skyttä).
- Fixed several spelling errors (thanks to Ville Skyttä).
- The new SVDRP command UPDR can be used to trigger an update of the list of
  recordings (thanks to Lars Hanisch).
- Added generating a pkg-config file to the Makefile (thanks to Ville Skyttä).
- Removed the '.pl' suffix from all scripts (thanks to Ville Skyttä).
- Changed the default location for the LIRC socket to /var/run/lirc/lircd (thanks
  to Ville Skyttä).
- Added file name and line number to LOG_ERROR_STR() (thanks to Rolf Ahrenberg).
- Replaced all calls to sleep() with cCondWait::SleepMs() (thanks to Rolf Ahrenberg).
- Fixed a crash with malformed SI data (patch from vdr-portal).
parent 0c96d6b6
......@@ -1117,6 +1117,9 @@ Rolf Ahrenberg <rahrenbe@cc.hut.fi>
for making the Audio and Subtitles options available through the Green and Yellow
keys in the Setup/DVB menu
for making the Recordings menu display the length (in hours:minutes) of each recording
for fixing handling DVB subtitles and implementing decoding textual DVB subtitles
for adding file name and line number to LOG_ERROR_STR()
for replacing all calls to sleep() with cCondWait::SleepMs()
Ralf Klueber <ralf.klueber@vodafone.com>
for reporting a bug in cutting a recording if there is only a single editing mark
......@@ -1632,6 +1635,7 @@ Arthur Konovalov <artlov@gmail.com>
for reporting problems with CAMs when checking the CAM status too frequently
for reporting references to old *.vdr file names in MANUAL
for reporting that the video stream type was set to 2 even if the vpid was 0
for updates to 'sources.conf'
Milos Kapoun <m.kapoun@cra.cz>
for suggesting to skip code table info in SI data
......@@ -1868,6 +1872,8 @@ Luca Olivetti <luca@ventoso.org>
"repeat" keypresses very fast
for reporting a broken entry 'A111.1W' in sources.conf
for translating OSD texts to the Spanish and Catalan language
for fixing scaling subtitles in case the primary device's GetVideoSize() function
doesn't return actual values
Mikko Salo <mikko.salo@ppe.inet.fi>
for suggesting to make the setup option "DVB/Video display format" available only
......@@ -1918,6 +1924,11 @@ Ville Skytt
for fixing the Language header of the Serbian translation file
for using pkg-config to get fribidi, freetype and fontconfig cflags and libs
for making the Makefile also install the include files
for fixing a crash when deleting a recording while cutting it
for fixing several spelling errors
for adding generating a pkg-config file to the Makefile
for removing the '.pl' suffix from all scripts (thanks to Ville Skyttä).
for changing the default location for the LIRC socket to /var/run/lirc/lircd
Steffen Beyer <cpunk@reactor.de>
for fixing setting the colored button help after deleting a recording in case the next
......@@ -2244,6 +2255,7 @@ Christoph Haubrich <christoph1.haubrich@arcor.de>
for reporting that Setup.InitialChannel was dereferenced without checking for NULL
for suggesting to implement a function to determine the length of a recording's
index file
for fixing setting the start time of an edited recording
Pekka Mauno <pekka.mauno@iki.fi>
for fixing cSchedule::GetFollowingEvent() in case there is currently no present
......@@ -2659,6 +2671,8 @@ Stephan Austerm
Lars Hanisch <dvb@flensrocker.de>
for suggesting to assign the source character 'V' to "Analog Video"
for a patch that was used to implement SCR (Satellite Channel Routing)
for implementing the SVDRP command 'UPDR'
Alex Lasnier <alex@fepg.org>
for adding tuning support for ATSC devices
......@@ -2774,3 +2788,7 @@ Frank Niederwipper <f.niederwipper@gmail.com>
Chris Mayo <aklhfex@gmail.com>
for reporting a problem with detecting frames on radio channels
Dominic Evans <oldmanuk@gmail.com>
for making the SVDRP command LSTC accepts channel IDs
for adding cap_net_raw to the capabilities that are not dropped
......@@ -6742,3 +6742,41 @@ Video Disk Recorder Revision History
Detecting frames in case the Picture Start Code or Access Unit Delimiter
extends over TS packet boundaries is now done by locally skipping TS packets
in cFrameDetector.
2011-12-04: Version 1.7.22
- Fixed scaling subtitles in case the primary device's GetVideoSize() function doesn't
return actual values (thanks to Luca Olivetti).
- The DiSEqC codes are now copied in the call to cDiseqc::Execute().
- VDR now supports "Satellite Channel Routing" (SCR) according to EN50494 (based on
the "unicable" patch from Lars Hanisch).
Since "Unicable" is a registered trademark and stands for only one of many
implementations of SCR, the following changes have been made compared to the patch,
which need to be taken into account by people who have set up their system using
the patch:
- The 'U' parameter in the diseqc.conf file has been changed to 'S' ("Scr").
- The configuration file name has been changed from "unicable.conf" to "scr.conf".
- Updated sources.conf (thanks to Arthur Konovalov).
- The SVDRP command LSTC now also accepts channel IDs (thanks to Dominic Evans).
- Fixed handling DVB subtitles and implemented decoding textual DVB subtitles (thanks
to Rolf Ahrenberg).
- Added cap_net_raw to the capabilities that are not dropped (thanks to Dominic Evans).
- Fixed setting the start time of an edited recording (thanks to Christoph Haubrich).
- Temporarily switching free devices to transponders in order to have their running
status updated is now done by marking the devices as "occupied" for a certain
amount of time.
- The new setup options "LNB/Device n connected to sat cable" can be used to define
which DVB-S devices are connected to the same sat cable and are therefore "bonded".
This obsoletes the LNBSHARE patch. Users of the LNBSHARE patch will need to newly
set up their sat devices with the above options.
- Fixed a crash when deleting a recording while cutting it (thanks to Ville Skyttä).
- Fixed several spelling errors (thanks to Ville Skyttä).
- The new SVDRP command UPDR can be used to trigger an update of the list of
recordings (thanks to Lars Hanisch).
- Added generating a pkg-config file to the Makefile (thanks to Ville Skyttä).
- Removed the '.pl' suffix from all scripts (thanks to Ville Skyttä).
- Changed the default location for the LIRC socket to /var/run/lirc/lircd (thanks
to Ville Skyttä).
- Added file name and line number to LOG_ERROR_STR() (thanks to Rolf Ahrenberg).
- Replaced all calls to sleep() with cCondWait::SleepMs() (thanks to Rolf Ahrenberg).
- Fixed a crash with malformed SI data (patch from vdr-portal).
......@@ -386,6 +386,23 @@ accessed using DiSEqC, you have to go to the "Setup" menu and set the "DiSEqC"
parameter to "on". You also need to set up the file 'diseqc.conf' to properly
access your DiSEqC equipment (see man vdr(5) for details).
A special form of DiSEqC is used to connect several receivers to one signal
source using only a single cable. This method, known as "Satellite Channel Routing"
according to EN50494 (aka "Unicable(TM)", "OLT(TM)", "SatCR", "Single Cable
Distribution", "Channel Stacking System" or "Single Cable Interface") uses
the file "scr.conf" to specify which SCR channels use which user band frequency.
If DVB-S devices need to be connected to the same satellite cable, but no
"Satellite Channel Routing" is available, they can be set to be "bonded" in
the Setup/LNB menu. Bonded devices can only be tuned to the same polarization
and frequency band, which reduces the number of potentially receivable channels.
Note that it doesn't make sense to use "Satellite Channel Routing" and
"Device Bonding" at the same time with the same devices. If you use either
of these methods, it is necessary that your devices are always created in the
same sequence when the drivers are loaded. You may need to configure some
proper "udev" rules to make sure this happens.
Running VDR with DVB-C (cable) or DVB-T (terrestrial):
------------------------------------------------------
......
......@@ -732,12 +732,18 @@ Version 1.6
LNB:
Use DiSEqC = no Generally turns DiSEqC support on or off.
SLOF = 11700 The switching frequency (in MHz) between low and
high LOF
Low LNB frequency = 9750 The LNB's low and high local oscillator frequencies
High LNB frequency = 10600 (in MHz, these have no meaning for DVB-C receivers)
Use DiSEqC = no Generally turns DiSEqC support on or off.
Device n connected to sat cable = own
Defines whether DVB-S device n has its own satellite cable,
or is "bonded" with another device. All DVB-S devices that
are connected to the same sat cable must be set to the same
number here.
CAM:
......
......@@ -6,7 +6,7 @@
# See the main source file 'vdr.c' for copyright information and
# how to reach the author.
#
# $Id: Make.config.template 2.3 2011/03/13 13:41:12 kls Exp $
# $Id: Make.config.template 2.4 2011/12/04 14:41:00 kls Exp $
### The C compiler and options:
......@@ -35,7 +35,7 @@ CONFDIR = $(VIDEODIR)
### The remote control:
LIRC_DEVICE = /dev/lircd
LIRC_DEVICE = /var/run/lirc/lircd
RCU_DEVICE = /dev/ttyS1
## Define if you want vdr to not run as root
......
......@@ -4,7 +4,7 @@
# See the main source file 'vdr.c' for copyright information and
# how to reach the author.
#
# $Id: Makefile 2.18 2011/05/21 12:21:40 kls Exp $
# $Id: Makefile 2.22 2011/12/04 14:41:00 kls Exp $
.DELETE_ON_ERROR:
......@@ -33,6 +33,8 @@ CONFDIR = $(VIDEODIR)
DOXYGEN = /usr/bin/doxygen
DOXYFILE = Doxyfile
PCDIR ?= $(firstword $(subst :, , ${PKG_CONFIG_PATH}:$(shell pkg-config --variable=pc_path pkg-config):$(PREFIX)/lib/pkgconfig))
include Make.global
-include Make.config
......@@ -60,7 +62,7 @@ DEFINES += -DBIDI
LIBS += $(shell pkg-config --libs fribidi)
endif
LIRC_DEVICE ?= /dev/lircd
LIRC_DEVICE ?= /var/run/lirc/lircd
RCU_DEVICE ?= /dev/ttyS1
DEFINES += -DLIRC_DEVICE=\"$(LIRC_DEVICE)\" -DRCU_DEVICE=\"$(RCU_DEVICE)\"
......@@ -77,7 +79,7 @@ DEFINES += -DLOCDIR=\"$(LOCDIR)\"
VDRVERSION = $(shell sed -ne '/define VDRVERSION/s/^.*"\(.*\)".*$$/\1/p' config.h)
APIVERSION = $(shell sed -ne '/define APIVERSION/s/^.*"\(.*\)".*$$/\1/p' config.h)
all: vdr i18n
all: vdr i18n vdr.pc
# Implicit rules:
......@@ -103,6 +105,25 @@ vdr: $(OBJS) $(SILIB)
$(SILIB):
$(MAKE) -C $(LSIDIR) all
# pkg-config file:
vdr.pc: Makefile Make.global
@echo "bindir=$(BINDIR)" > $@
@echo "includedir=$(INCDIR)" >> $@
@echo "configdir=$(CONFDIR)" >> $@
@echo "videodir=$(VIDEODIR)" >> $@
@echo "plugindir=$(PLUGINLIBDIR)" >> $@
@echo "localedir=$(LOCDIR)" >> $@
@echo "apiversion=$(APIVERSION)" >> $@
@echo "cflags=$(CXXFLAGS) $(DEFINES) -I\$${includedir}" >> $@
@echo "plugincflags=\$${cflags} -fPIC" >> $@
@echo "" >> $@
@echo "Name: VDR" >> $@
@echo "Description: Video Disk Recorder" >> $@
@echo "URL: http://www.tvdr.de/" >> $@
@echo "Version: $(VDRVERSION)" >> $@
@echo "Cflags: \$${cflags}" >> $@
# Internationalization (I18N):
PODIR = po
......@@ -163,13 +184,13 @@ clean-plugins:
# Install the files:
install: install-bin install-conf install-doc install-plugins install-i18n install-includes
install: install-bin install-conf install-doc install-plugins install-i18n install-includes install-pc
# VDR binary:
install-bin: vdr
@mkdir -p $(DESTDIR)$(BINDIR)
@cp --remove-destination vdr svdrpsend.pl $(DESTDIR)$(BINDIR)
@cp --remove-destination vdr svdrpsend $(DESTDIR)$(BINDIR)
# Configuration files:
......@@ -200,6 +221,14 @@ install-includes: include-dir
@mkdir -p $(DESTDIR)$(INCDIR)
@cp -pLR include/vdr include/libsi $(DESTDIR)$(INCDIR)
# pkg-config file:
install-pc: vdr.pc
if [ -n "$(PCDIR)" ] ; then \
mkdir -p $(DESTDIR)$(PCDIR) ; \
cp vdr.pc $(DESTDIR)$(PCDIR) ; \
fi
# Source documentation:
srcdoc:
......@@ -212,7 +241,7 @@ srcdoc:
clean:
$(MAKE) -C $(LSIDIR) clean
-rm -f $(OBJS) $(DEPFILE) vdr core* *~
-rm -f $(OBJS) $(DEPFILE) vdr vdr.pc core* *~
-rm -rf $(LOCALEDIR) $(PODIR)/*.mo $(PODIR)/*.pot
-rm -rf include
-rm -rf srcdoc
......
#
# Makefile for a Video Disk Recorder plugin
#
# $Id: Makefile 1.8 2011/05/21 12:25:33 kls Exp $
# $Id: Makefile 1.9 2011/12/04 15:30:21 kls Exp $
# The official name of this plugin.
# This name will be used in the '-P...' option of VDR to load the plugin.
......@@ -98,8 +98,9 @@ i18n: $(I18Nmsgs) $(I18Npot)
### Targets:
libvdr-$(PLUGIN).so: $(OBJS)
$(CXX) $(CXXFLAGS) -shared $(OBJS) -o $@
libvdr-$(PLUGIN).so: $(OBJS) libhdffcmd
$(MAKE) -C libhdffcmd all
$(CXX) $(CXXFLAGS) -shared $(OBJS) libhdffcmd/libhdffcmd.a -o $@
@cp --remove-destination $@ $(LIBDIR)/$@.$(APIVERSION)
dist: $(I18Npo) clean
......@@ -112,3 +113,4 @@ dist: $(I18Npo) clean
clean:
@-rm -f $(OBJS) $(DEPFILE) *.so *.tgz core* *~ $(PODIR)/*.mo $(PODIR)/*.pot
$(MAKE) -C libhdffcmd clean
This diff is collapsed.
......@@ -3,7 +3,7 @@
*
* See the README file for copyright information and how to reach the author.
*
* $Id: dvbhdffdevice.h 1.6 2010/03/13 11:18:13 kls Exp $
* $Id: dvbhdffdevice.h 1.7 2011/09/10 10:17:32 kls Exp $
*/
#ifndef __DVBHDFFDEVICE_H
......@@ -79,6 +79,8 @@ protected:
private:
int playVideoPid;
int playAudioPid;
bool freezed;
bool trickMode;
// Pes2Ts conversion stuff
uint8_t videoCounter;
......
This diff is collapsed.
......@@ -3,14 +3,14 @@
*
* See the README file for copyright information and how to reach the author.
*
* $Id: hdffcmd.h 1.17 2011/04/17 11:20:22 kls Exp $
* $Id: hdffcmd.h 1.18 2011/12/04 15:31:23 kls Exp $
*/
#ifndef _HDFF_CMD_H_
#define _HDFF_CMD_H_
#include "bitbuffer.h"
#include "hdffmsgdef.h"
#include "libhdffcmd/hdffcmd.h"
namespace HDFF
{
......@@ -20,9 +20,6 @@ class cHdffCmdIf
private:
int mOsdDev;
void CmdBuildHeader(cBitBuffer & MsgBuf, eMessageType MsgType, eMessageGroup MsgGroup, eMessageId MsgId);
uint32_t CmdSetLength(cBitBuffer & MsgBuf);
public:
cHdffCmdIf(int OsdDev);
~cHdffCmdIf(void);
......@@ -32,16 +29,16 @@ public:
uint32_t CmdGetCopyrights(uint8_t Index, char * pString, uint32_t MaxLength);
void CmdAvSetPlayMode(uint8_t PlayMode, bool Realtime);
void CmdAvSetVideoPid(uint8_t DecoderIndex, uint16_t VideoPid, eVideoStreamType StreamType, bool PlaybackMode = false);
void CmdAvSetAudioPid(uint8_t DecoderIndex, uint16_t AudioPid, eAudioStreamType StreamType, eAVContainerType ContainerType = avContainerPes);
void CmdAvSetVideoPid(uint8_t DecoderIndex, uint16_t VideoPid, HdffVideoStreamType_t StreamType, bool PlaybackMode = false);
void CmdAvSetAudioPid(uint8_t DecoderIndex, uint16_t AudioPid, HdffAudioStreamType_t StreamType, HdffAvContainerType_t ContainerType = HDFF_AV_CONTAINER_PES);
void CmdAvSetPcrPid(uint8_t DecoderIndex, uint16_t PcrPid);
void CmdAvSetTeletextPid(uint8_t DecoderIndex, uint16_t TeletextPid);
void CmdAvSetVideoWindow(uint8_t DecoderIndex, bool Enable, uint16_t X, uint16_t Y, uint16_t Width, uint16_t Height);
void CmdAvShowStillImage(uint8_t DecoderIndex, const uint8_t * pStillImage, int Size, eVideoStreamType StreamType);
void CmdAvShowStillImage(uint8_t DecoderIndex, const uint8_t * pStillImage, int Size, HdffVideoStreamType_t StreamType);
void CmdAvSetDecoderInput(uint8_t DecoderIndex, uint8_t DemultiplexerIndex);
void CmdAvSetDemultiplexerInput(uint8_t DemultiplexerIndex, uint8_t TsInputIndex);
void CmdAvSetVideoFormat(uint8_t DecoderIndex, const tVideoFormat * pVideoFormat);
void CmdAvSetVideoOutputMode(uint8_t DecoderIndex, eVideoOutputMode OutputMode);
void CmdAvSetVideoFormat(uint8_t DecoderIndex, const HdffVideoFormat_t * pVideoFormat);
void CmdAvSetVideoOutputMode(uint8_t DecoderIndex, HdffVideoOutputMode_t OutputMode);
void CmdAvSetStc(uint8_t DecoderIndex, uint64_t Stc);
void CmdAvFlushBuffer(uint8_t DecoderIndex, bool FlushAudio, bool FlushVideo);
void CmdAvEnableSync(uint8_t DecoderIndex, bool EnableSync);
......@@ -49,24 +46,24 @@ public:
void CmdAvSetAudioSpeed(uint8_t DecoderIndex, int32_t Speed);
void CmdAvEnableVideoAfterStop(uint8_t DecoderIndex, bool EnableVideoAfterStop);
void CmdAvSetAudioDelay(int16_t Delay);
void CmdAvSetAudioDownmix(eDownmixMode DownmixMode);
void CmdAvSetAudioDownmix(HdffAudioDownmixMode_t DownmixMode);
void CmdAvSetAudioChannel(uint8_t AudioChannel);
void CmdOsdConfigure(const tOsdConfig * pConfig);
void CmdOsdConfigure(const HdffOsdConfig_t * pConfig);
void CmdOsdReset(void);
uint32_t CmdOsdCreateDisplay(uint32_t Width, uint32_t Height, eColorType ColorType);
uint32_t CmdOsdCreateDisplay(uint32_t Width, uint32_t Height, HdffColorType_t ColorType);
void CmdOsdDeleteDisplay(uint32_t hDisplay);
void CmdOsdEnableDisplay(uint32_t hDisplay, bool Enable);
void CmdOsdSetDisplayOutputRectangle(uint32_t hDisplay, uint32_t X, uint32_t Y, uint32_t Width, uint32_t Height);
void CmdOsdSetDisplayClippingArea(uint32_t hDisplay, bool Enable, uint32_t X, uint32_t Y, uint32_t Width, uint32_t Height);
void CmdOsdRenderDisplay(uint32_t hDisplay);
uint32_t CmdOsdCreatePalette(eColorType ColorType, eColorFormat ColorFormat,
uint32_t CmdOsdCreatePalette(HdffColorType_t ColorType, HdffColorFormat_t ColorFormat,
uint32_t NumColors, const uint32_t * pColors);
void CmdOsdDeletePalette(uint32_t hPalette);
void CmdOsdSetDisplayPalette(uint32_t hDisplay, uint32_t hPalette);
void CmdOsdSetPaletteColors(uint32_t hPalette, eColorFormat ColorFormat,
void CmdOsdSetPaletteColors(uint32_t hPalette, HdffColorFormat_t ColorFormat,
uint8_t StartColor, uint32_t NumColors, const uint32_t * pColors);
uint32_t CmdOsdCreateFontFace(const uint8_t * pFontData, uint32_t DataSize);
......@@ -81,19 +78,19 @@ public:
void CmdOsdDrawTextW(uint32_t hDisplay, uint32_t hFont, int X, int Y, const uint16_t * pText, uint32_t Color);
void CmdOsdDrawBitmap(uint32_t hDisplay, int X, int Y, const uint8_t * pBitmap,
int BmpWidth, int BmpHeight, int BmpSize,
eColorType ColorType, uint32_t hPalette);
HdffColorType_t ColorType, uint32_t hPalette);
void CmdOsdSaveRegion(uint32_t hDisplay, int X, int Y, int Width, int Height);
void CmdOsdRestoreRegion(uint32_t hDisplay);
void CmdMuxSetVideoOut(eVideoOut VideoOut);
void CmdMuxSetVideoOut(HdffVideoOut_t VideoOut);
void CmdMuxSetVolume(uint8_t Volume);
void CmdMuxMuteAudio(bool Mute);
void CmdHdmiSetVideoMode(eHdmiVideoMode VideoMode);
void CmdHdmiConfigure(const tHdmiConfig * pConfig);
void CmdHdmiSendCecCommand(eCecCommand Command);
void CmdHdmiSetVideoMode(HdffVideoMode_t VideoMode);
void CmdHdmiConfigure(const HdffHdmiConfig_t * pConfig);
void CmdHdmiSendCecCommand(HdffCecCommand_t Command);
void CmdRemoteSetProtocol(eRemoteProtocol Protocol);
void CmdRemoteSetProtocol(HdffRemoteProtocol_t Protocol);
void CmdRemoteSetAddressFilter(bool Enable, uint32_t Address);
};
......
This diff is collapsed.
#
# Makefile for the HDFF firmware command interface library
#
VERSION = 0.1.0
ifndef $(INSTALL_PATH)
INSTALL_PATH=/usr/local
endif
ifndef $(INSTALL_LIB_PATH)
INSTALL_LIB_PATH=$(INSTALL_PATH)/lib
endif
ifndef $(INSTALL_INCLUDE_PATH)
INSTALL_INCLUDE_PATH=$(INSTALL_PATH)/include
endif
LIB_NAME = libhdffcmd
LIB_OBJS = bitbuffer.o hdffcmd_av.o hdffcmd_base.o hdffcmd_generic.o \
hdffcmd_hdmi.o hdffcmd_mux.o hdffcmd_osd.o hdffcmd_remote.o
LIB_HEADERS = hdffcmd.h hdffcmd_av.h hdffcmd_generic.h hdffcmd_hdmi.h \
hdffcmd_mux.h hdffcmd_osd.h hdffcmd_remote.h
LIB_STATIC = $(LIB_NAME).a
LIB_SHARED = $(LIB_NAME)-$(VERSION).so
CC = gcc
CFLAGS = -g -O2 -fPIC -Wall
AR = ar -r
### Implicit rules:
%.o: %.c
$(CC) $(CFLAGS) -c $(DEFINES) $(INCLUDES) $<
# Dependencies:
MAKEDEP = $(CC) -MM -MG
DEPFILE = .dependencies
$(DEPFILE): Makefile
@$(MAKEDEP) $(DEFINES) $(INCLUDES) $(OBJS:%.o=%.c) > $@
-include $(DEPFILE)
### Targets:
all: $(LIB_STATIC) $(LIB_SHARED)
$(LIB_STATIC): $(LIB_OBJS)
$(AR) $(LIB_STATIC) $(LIB_OBJS)
$(LIB_SHARED): $(LIB_OBJS)
$(CC) -fPIC -shared -o $(LIB_SHARED) $(LIB_OBJS)
ln -sf $(LIB_SHARED) $(LIB_NAME).so
clean:
rm -f $(LIB_OBJS) $(DEPFILE) $(LIB_STATIC) $(LIB_NAME)*.so
install: $(LIB_SHARED)
chown root $(LIB_SHARED)
chgrp root $(LIB_SHARED)
chmod 0755 $(LIB_SHARED)
cp -f $(LIB_SHARED) $(INSTALL_LIB_PATH)/
ln -sf $(LIB_SHARED) $(INSTALL_LIB_PATH)/$(LIB_NAME).so
mkdir -p $(INSTALL_INCLUDE_PATH)/libhdffcmd
list='$(LIB_HEADERS)'; \
for headerfile in $$list; do \
cp -f $$headerfile $(INSTALL_INCLUDE_PATH)/libhdffcmd/ ; \
chown root $(INSTALL_INCLUDE_PATH)/libhdffcmd/$$headerfile ; \
chgrp root $(INSTALL_INCLUDE_PATH)/libhdffcmd/$$headerfile ; \
chmod 0644 $(INSTALL_INCLUDE_PATH)/libhdffcmd/$$headerfile ; \
done
/**********************************************************************
*
* HDFF firmware command interface library
*
* Copyright (C) 2011 Andreas Regel
*
* This program is free software; you can redistribute it and/or
* modify it under the terms of the GNU General Public License
* as published by the Free Software Foundation; either version 2
* of the License, or (at your option) any later version.
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
* You should have received a copy of the GNU General Public License
* along with this program; if not, write to the
* Free Software Foundation, Inc.,
* 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
*
*********************************************************************/
#include <string.h>
#include "bitbuffer.h"
void BitBuffer_Init(BitBuffer_t * BitBuffer,
uint8_t * Data, uint32_t MaxLength)
{
memset(Data, 0, MaxLength);
BitBuffer->Data = Data;
BitBuffer->MaxLength = MaxLength * 8;
BitBuffer->BitPos = 0;
}
void BitBuffer_SetBits(BitBuffer_t * BitBuffer, int NumBits, uint32_t Data)
{
uint32_t nextBitPos;
uint32_t bytePos;
uint32_t bitsInByte;
int shift;
if (NumBits <= 0 || NumBits > 32)
return;
nextBitPos = BitBuffer->BitPos + NumBits;
if (nextBitPos > BitBuffer->MaxLength)
return;
bytePos = BitBuffer->BitPos / 8;
bitsInByte = BitBuffer->BitPos % 8;
BitBuffer->Data[bytePos] &= (uint8_t) (0xFF << (8 - bitsInByte));
shift = NumBits - (8 - bitsInByte);
if (shift > 0)
BitBuffer->Data[bytePos] |= (uint8_t) (Data >> shift);
else
BitBuffer->Data[bytePos] |= (uint8_t) (Data << (-shift));
NumBits -= 8 - bitsInByte;
bytePos++;
while (NumBits > 0)
{
shift = NumBits - 8;
if (shift > 0)
BitBuffer->Data[bytePos] = (uint8_t) (Data >> shift);
else
BitBuffer->Data[bytePos] = (uint8_t) (Data << (-shift));
NumBits -= 8;
bytePos++;
}
BitBuffer->BitPos = nextBitPos;
}
uint32_t BitBuffer_GetByteLength(BitBuffer_t * BitBuffer)
{
return (BitBuffer->BitPos + 7) / 8;
}
/**********************************************************************
*
* HDFF firmware command interface library
*
* Copyright (C) 2011 Andreas Regel
*
* This program is free software; you can redistribute it and/or
* modify it under the terms of the GNU General Public License
* as published by the Free Software Foundation; either version 2
* of the License, or (at your option) any later version.
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
* You should have received a copy of the GNU General Public License
* along with this program; if not, write to the
* Free Software Foundation, Inc.,
* 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
*
*********************************************************************/
#ifndef BITBUFFER_H
#define BITBUFFER_H
#include <stdint.h>
typedef struct BitBuffer_t
{
uint8_t * Data;
uint32_t MaxLength;
uint32_t BitPos;
} BitBuffer_t;
void BitBuffer_Init(BitBuffer_t * BitBuffer,
uint8_t * Data, uint32_t MaxLength);
void BitBuffer_SetBits(BitBuffer_t * BitBuffer, int NumBits, uint32_t Data);
uint32_t BitBuffer_GetByteLength(BitBuffer_t * BitBuffer);
#endif /* BITBUFFER_H */
/**********************************************************************
*
* HDFF firmware command interface library
*
* Copyright (C) 2011 Andreas Regel
*
* This program is free software; you can redistribute it and/or
* modify it under the terms of the GNU General Public License
* as published by the Free Software Foundation; either version 2
* of the License, or (at your option) any later version.
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
* You should have received a copy of the GNU General Public License
* along with this program; if not, write to the
* Free Software Foundation, Inc.,
* 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
*
*********************************************************************/
#ifndef HDFFCMD_H
#define HDFFCMD_H
#ifdef __cplusplus
extern "C" {
#endif
#include "hdffcmd_av.h"
#include "hdffcmd_generic.h"
#include "hdffcmd_hdmi.h"
#include "hdffcmd_mux.h"
#include "hdffcmd_osd.h"
#include "hdffcmd_remote.h"
#ifdef __cplusplus
}
#endif
#endif /* HDFFCMD_H */
This diff is collapsed.
/**********************************************************************
*
* HDFF firmware command interface library
*
* Copyright (C) 2011 Andreas Regel
*
* This program is free software; you can redistribute it and/or
* modify it under the terms of the GNU General Public License
* as published by the Free Software Foundation; either version 2
* of the License, or (at your option) any later version.
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
* You should have received a copy of the GNU General Public License
* along with this program; if not, write to the
* Free Software Foundation, Inc.,
* 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
*
*********************************************************************/
#ifndef HDFFCMD_AV_H
#define HDFFCMD_AV_H
typedef enum HdffAvContainerType_t
{
HDFF_AV_CONTAINER_PES,
HDFF_AV_CONTAINER_PES_DVD
} HdffAvContainerType_t;
typedef enum HdffAudioStreamType_t
{
HDFF_AUDIO_STREAM_INVALID = -1,
HDFF_AUDIO_STREAM_MPEG1 = 0,
HDFF_AUDIO_STREAM_MPEG2,
HDFF_AUDIO_STREAM_AC3,
HDFF_AUDIO_STREAM_AAC,
HDFF_AUDIO_STREAM_HE_AAC,
HDFF_AUDIO_STREAM_PCM,
HDFF_AUDIO_STREAM_EAC3,