diff options
author | scop <scop> | 2005-03-14 18:48:33 +0000 |
---|---|---|
committer | scop <scop> | 2005-03-14 18:48:33 +0000 |
commit | 4c76e2049bfad88b39baecd31c4d7cb68c214994 (patch) | |
tree | 7fb564b00f15cb6d6313a744957c25b0354d46e7 | |
parent | 63d7af332f1394b8db53bdd9ddf09fc7cc9c59cb (diff) | |
download | vdr-plugin-dxr3-4c76e2049bfad88b39baecd31c4d7cb68c214994.tar.gz vdr-plugin-dxr3-4c76e2049bfad88b39baecd31c4d7cb68c214994.tar.bz2 |
Sync configurable log dir from HEAD.
-rw-r--r-- | HISTORY | 3 | ||||
-rw-r--r-- | INSTALL | 25 | ||||
-rw-r--r-- | Makefile | 5 | ||||
-rw-r--r-- | dxr3log.c | 6 | ||||
-rw-r--r-- | dxr3log.h | 16 |
5 files changed, 27 insertions, 28 deletions
@@ -244,6 +244,9 @@ NOTE: I havent found time to include all of the languages, will be done in pre2 - added many comments into source (Christian Gmeiner) - using doxygen for docs (Christian Gmeiner) - made path to microcode configurable in Makefile (Sascha Volkenandt) +- made log dir configurable in Makefile (Christian Gmeiner, Martin Dauskardt) + You may also want to search and remove files called "dxr3plugin.log" as the + old plugin wrote them into the current working directory. - extended cDxr3MemcpyBench::Rdtsc(uint32_t config_flags): support for non-x86 archs, support for cpu's, which dont support rdtsc timing (Christian Gmeiner) @@ -1,19 +1,22 @@ Prerequisites: -- Get the current CVS of the dxr3 drivers from dxr3.sf.net -- Make sure your DXR3 card is running under linux. -- Install the (latest) VDR developer version -- The plugin needs the libavcodec library from "http://ffmpeg.sourceforge.net" +- Get the current CVS of the dxr3 drivers from http://dxr3.sourceforge.net/ +- Make sure your DXR3 card is running under Linux. +- Install the (latest) VDR developer version. +- The plugin needs the libavcodec library from http://ffmpeg.sourceforge.net/ Installation: -- Get the latest dxr3-plugin version from "http://sourceforge.net/projects/dxr3plugin/" -- Unpack the package into "PLUGINS/SRC" directory -- Make a symbolic link to this dxr3-plugin (ln -s vdr_dxr3_x.x.x dxr3) -- Check FFMDIR and EM8300 in Makefile +- Get the latest dxr3-plugin version from + http://sourceforge.net/projects/dxr3plugin/ +- Unpack the package into "PLUGINS/SRC" directory. +- Make a symbolic link to this dxr3-plugin (ln -s vdr_dxr3_x.x.x dxr3). +- Check FFMDIR and EM8300 in Makefile. - Check extra settings in Makefile: # where is the microcode for the dxr3 located? DEFINES += -DMICROCODE=\"/usr/share/misc/em8300.uc\" -- Call "make plugins" in the VDR root directory -- Make sure your DXR3 driver modules are loaded and ready to run -- Start VDR with "vdr -Pdxr3" + # where should we write our log? + DEFINES += -DLOGPATH=\"/video/\" # note: path must end with / +- Call "make plugins" in the VDR root directory. +- Make sure your DXR3 driver modules are loaded and ready to run. +- Start VDR with "vdr -Pdxr3". @@ -1,7 +1,7 @@ # # Makefile for a Video Disk Recorder plugin # -# $Id: Makefile,v 1.1.2.4 2005/03/14 18:22:26 scop Exp $ +# $Id: Makefile,v 1.1.2.5 2005/03/14 18:48:34 scop Exp $ # The official name of this plugin. # This name will be used in the '-P...' option of VDR to load the plugin. @@ -58,6 +58,9 @@ DEFINES += -D_GNU_SOURCE # where is the microcode for the dxr3 located? DEFINES += -DMICROCODE=\"/usr/share/misc/em8300.uc\" +# where should we write our log? +DEFINES += -DLOGPATH=\"/video/\" # note: path must end with / + ### The object files (add further files here): OBJS = $(PLUGIN).o dxr3multichannelaudio.o dxr3sysclock.o dxr3colormanager.o dxr3syncbuffer.o dxr3audiodecoder.o \ @@ -28,7 +28,11 @@ cLog::cLog() m_LogOpen = false; m_ForeFlush = true; - Open("dxr3plugin.log"); + std::string Filename; + Filename = LOGPATH; + Filename += "dxr3plugin.log"; + + Open(Filename); } // ================================== @@ -25,7 +25,6 @@ #include <fstream> #include <string> #include "dxr3singleton.h" -#include "dxr3vdrincludes.h" // ================================== //! A log class. @@ -33,7 +32,6 @@ With this nice util dxr3plugin generates and mange a log file. In this file the developer/enduser can find informations and can find errors, problems and ohter stuff. - The logging class is now thread-safe! */ class cLog : public Singleton<cLog> { @@ -43,36 +41,31 @@ public: ~cLog() { Close(); } - void SetForceFlush(const bool v) { Lock(); m_ForeFlush = v; Unlock(); } + void SetForceFlush(const bool v) { m_ForeFlush = v; } bool GetForceFlush() const { return m_ForeFlush; } // write type data to log file. template <class Type> inline cLog& operator << ( Type item ) { - Lock(); if (m_LogOpen) { m_LogStream << item; if (m_ForeFlush) m_LogStream.flush(); } - Unlock(); return *this; } inline cLog& operator << ( size_t item ) { - Lock(); if (m_LogOpen) { m_LogStream << (unsigned int)item; if (m_ForeFlush) m_LogStream.flush(); } - Unlock(); return *this; } inline cLog& operator << ( bool item ) { - Lock(); if (m_LogOpen) { if (item == true) @@ -85,7 +78,6 @@ public: } if (m_ForeFlush) m_LogStream.flush(); } - Unlock(); return *this; } @@ -96,12 +88,6 @@ private: void Open(std::string Filename); // with this function we open our logfile void Close(); // with this function we close our logfile - -protected: - static cMutex* m_pMutex; ///< mutex - - static void Lock() { cLog::m_pMutex->Lock(); } - static void Unlock() { cLog::m_pMutex->Unlock(); } }; |