其實這些檔就是 DLL,但是為了防止load 到騎他program 的 DLL,所以rename 成 plg。
tcpmp 的 VS2005 project 是一個基本的 project,只包涵 network, mpeg1.. etc 等少數的 codec 在裡面,這些 codec project 會 build 成 *.plg 檔,放在 release/output folder 中。
其他 project (ffmpeg, aac, ac3..) 要 build 的話,可以直接開啟該 codec project 的 vcp (for eVC 得的那個,不是VC6的),然後修改一下:
- 要 把 common.lib 加入 -- 要把 common.lib 所在path 加到 linker 的 Additional Library Direction 中。把 common.lib 加到 Linker - Input - Additional Dependency 中
- 修改 Linker - Output File : $(OutDir)\$(ProjectName).plg
- 修改 Linker - Debugging - Generate Program Database : $(OutDir)/ffmpeg.pdb
也可以直接把project 加到 tcpmp 中。
tcpmp 有使用 類似 llvm 的技巧,在 port.h 中定義 CONFIG_DYNCODE。
undefine 的話就可以不用 (但是code 沒有很完全)。
tcpmp 啟動會 load *.txt ,這是原來在 language folder 下的 界面字串定義檔,所以也要 copy 到 執行目錄下。
diff --git a/common/blit/blit_arm_fix.c b/common/blit/blit_arm_fix.c
index 7af2299..6131e95 100644
--- a/common/blit/blit_arm_fix.c
+++ b/common/blit/blit_arm_fix.c
@@ -25,7 +25,7 @@
#include "../dyncode/dyncode.h"
#include "blit_soft.h"
-#if defined(ARM)
+#if defined(ARM) && defined(CONFIG_DYNCODE)
typedef struct stack
{
diff --git a/common/blit/blit_arm_gray.c b/common/blit/blit_arm_gray.c
index 9b7797b..8d8b636 100644
--- a/common/blit/blit_arm_gray.c
+++ b/common/blit/blit_arm_gray.c
@@ -25,7 +25,7 @@
#include "../dyncode/dyncode.h"
#include "blit_soft.h"
-#if defined(ARM)
+#if defined(ARM) && defined(CONFIG_DYNCODE)
typedef struct stack
{
diff --git a/common/blit/blit_arm_half.c b/common/blit/blit_arm_half.c
index a59d66c..089109d 100644
--- a/common/blit/blit_arm_half.c
+++ b/common/blit/blit_arm_half.c
@@ -29,7 +29,7 @@
// DstAlignPos 4
// SrcAlignPos 2
-#if defined(ARM)
+#if defined(ARM) && defined(CONFIG_DYNCODE)
typedef struct stack
{
diff --git a/common/blit/blit_arm_packed_yuv.c b/common/blit/blit_arm_packed_yuv.c
index 494721b..871bd36 100644
--- a/common/blit/blit_arm_packed_yuv.c
+++ b/common/blit/blit_arm_packed_yuv.c
@@ -25,7 +25,7 @@
#include "../dyncode/dyncode.h"
#include "blit_soft.h"
-#if defined(ARM)
+#if defined(ARM) && defined(CONFIG_DYNCODE)
typedef struct stack
{
diff --git a/common/blit/blit_arm_rgb16.c b/common/blit/blit_arm_rgb16.c
index 3c153f1..6de28fb 100644
--- a/common/blit/blit_arm_rgb16.c
+++ b/common/blit/blit_arm_rgb16.c
@@ -25,7 +25,7 @@
#include "../dyncode/dyncode.h"
#include "blit_soft.h"
-#if defined(ARM)
+#if defined(ARM) && defined(CONFIG_DYNCODE)
// R0..R6 temporary
// R7 Pos(when Stretch)
diff --git a/common/blit/blit_arm_stretch.c b/common/blit/blit_arm_stretch.c
index 5855d9c..be36ed8 100644
--- a/common/blit/blit_arm_stretch.c
+++ b/common/blit/blit_arm_stretch.c
@@ -27,7 +27,7 @@
#include "../dyncode/dyncode.h"
#include "blit_soft.h"
-#if defined(ARM)
+#if defined(ARM) && defined(CONFIG_DYNCODE)
typedef struct stack
{
diff --git a/common/blit/blit_arm_yuv.c b/common/blit/blit_arm_yuv.c
index 3e4d612..38ae8cd 100644
--- a/common/blit/blit_arm_yuv.c
+++ b/common/blit/blit_arm_yuv.c
@@ -29,7 +29,7 @@
// DstAlignPos 8
// SrcAlignPos 8
-#if defined(ARM)
+#if defined(ARM) && defined(CONFIG_DYNCODE)
// R0..R4 temporary
// R5 DiffMask (when Diff)
diff --git a/common/blit/blit_soft.c b/common/blit/blit_soft.c
index 3b8770c..f4cb08f 100644
--- a/common/blit/blit_soft.c
+++ b/common/blit/blit_soft.c
@@ -1795,7 +1795,7 @@ static bool_t BlitCompile(blit_soft* p,
p->SrcPos[i] = BitMaskPos(p->Src.BitMask[i]);
}
-#if defined(ARM)
+#if defined(ARM) && defined(CONFIG_DYNCODE)
if ((p->Dst.Flags & PF_RGB) && p->Dst.BitCount==16 && !p->SrcYUV)
Any_RGB_RGB(p);
if (!p->SrcYUV && DstPlanarYUV && p->RScaleX==16 && p->RScaleY==16)
@@ -1848,11 +1848,14 @@ static bool_t BlitCompile(blit_soft* p,
}
#endif
+#if defined(ARM) && defined(CONFIG_DYNCODE)
+
CodeBuild(&p->Code);
if (p->Code.Size)
p->Entry = (blitsoftentry)p->Code.Code;
else
p->Entry = NULL;
+#endif
#if defined(_M_IX86) && !defined(TARGET_SYMBIAN)
diff --git a/common/blit/blit_wmmx_fix.c b/common/blit/blit_wmmx_fix.c
index 6ffb3bb..1b3ec38 100644
--- a/common/blit/blit_wmmx_fix.c
+++ b/common/blit/blit_wmmx_fix.c
@@ -32,7 +32,7 @@
// RScale==32 && !SwapXY 16x4 -> 8x2
// RScale==32 && SwapXY 4x16 -> 8x2
-#if defined(ARM)
+#if defined(ARM) && defined(CONFIG_DYNCODE)
typedef struct stack
{
diff --git a/common/cpu/cpu.c b/common/cpu/cpu.c
index a68bad6..6e410d1 100644
--- a/common/cpu/cpu.c
+++ b/common/cpu/cpu.c
@@ -64,8 +64,14 @@ void CPUDetect(cpudetect* p)
#ifdef ARM
p->Arch = T("ARM");
- SafeGetCpuId(0,CpuId);
+ //SafeGetCpuId(0,CpuId);
+ p->ICache = 16*1024;
+ p->DCache = 16*1024;
+ Caps |= CAPS_ARM_GENERAL;
+ p->Model = T("1020E");
+ Caps |= CAPS_ARM_5E;
+/*
if (CpuId[0])
{
p->ICache = 512 << ((CpuId[1] >> 6) & 7);
@@ -156,7 +162,7 @@ void CPUDetect(cpudetect* p)
}
}
}
-
+*/
#elif defined(MIPS)
SafeGetCpuId(0,CpuId);
p->Arch = T("MIPS");
diff --git a/common/pcm/pcm_arm.c b/common/pcm/pcm_arm.c
index 8ebe96e..269fdc1 100644
--- a/common/pcm/pcm_arm.c
+++ b/common/pcm/pcm_arm.c
@@ -25,7 +25,7 @@
#include "../dyncode/dyncode.h"
#include "pcm_soft.h"
-#if defined(ARM)
+#if defined(ARM) && defined(CONFIG_DYNCODE)
typedef struct stack
{
diff --git a/common/portab.h b/common/portab.h
index 3b47674..bce4701 100644
--- a/common/portab.h
+++ b/common/portab.h
@@ -71,7 +71,7 @@
#endif
#if defined(ARM) || defined(MIPS) || defined(SH3)
-#define CONFIG_DYNCODE
+#undef CONFIG_DYNCODE
#endif
#if defined(_M_IX86)
diff --git a/common/win32/platform_win32.c b/common/win32/platform_win32.c
index 0df8c42..78ae591 100644
--- a/common/win32/platform_win32.c
+++ b/common/win32/platform_win32.c
@@ -670,7 +670,7 @@ void Platform_Init()
BacklightEvent = CreateEvent(NULL, FALSE, FALSE, T("TIMEOUTDISPLAYOFF"));
- Power_Init();
+ //Power_Init();
#endif
if (!Context()->CodePage)
@@ -976,6 +976,7 @@ bool_t GetDisplayPower()
int SetDisplayPower(bool_t State,bool_t Force)
{
+/*
VIDEO_POWER_MANAGEMENT VPM;
HDC DC;
@@ -991,6 +992,7 @@ int SetDisplayPower(bool_t State,bool_t Force)
ExtEscape(DC, SETPOWERMANAGEMENT, sizeof(VPM), (LPCSTR) &VPM, 0, NULL);
ReleaseDC(NULL, DC);
}
+*/
return ERR_NONE;
}
diff --git a/common/win32/str_win32.c b/common/win32/str_win32.c
index 77bc3bf..04f8a34 100644
--- a/common/win32/str_win32.c
+++ b/common/win32/str_win32.c
@@ -24,6 +24,7 @@
#include "../common.h"
#include "../gzip.h"
+
#define MAXTEXT 20000
#if defined(TARGET_WIN32) || defined(TARGET_WINCE)
diff --git a/interface/win32/interface.c b/interface/win32/interface.c
index ac68894..375060f 100644
--- a/interface/win32/interface.c
+++ b/interface/win32/interface.c
@@ -2765,10 +2765,12 @@ static bool_t Proc(intface* p, int Msg, uint32_t wParam, uint32_t lParam, int* R
break;
case WM_KEYUP:
+/*
#if defined(TARGET_WINCE)
if (!GetDisplayPower())
SetDisplayPower(0,1);
#endif
+*/
Key = WinKeyState(KeyRotate(p,wParam));
for (i=0;i<HOTKEYCOUNT;++i)
if (p->HotKey[i] && (p->HotKey[i] & ~HOTKEY_KEEP) == Key)
@@ -2792,6 +2794,7 @@ static bool_t Proc(intface* p, int Msg, uint32_t wParam, uint32_t lParam, int* R
break;
case WM_HOTKEY:
+/*
#if defined(TARGET_WINCE)
if ((LOWORD(lParam) & MOD_KEYUP))
{
@@ -2800,7 +2803,8 @@ static bool_t Proc(intface* p, int Msg, uint32_t wParam, uint32_t lParam, int* R
}
else
#endif
- PostMessage(p->Win.Wnd,WM_COMMAND,wParam,0);
+*/
+ PostMessage(p->Win.Wnd,WM_COMMAND,wParam,0);
*Result = 0;
return 1;
diff --git a/interface/win32/win_win32.c b/interface/win32/win_win32.c
index 7c92a1f..821cbe4 100644
--- a/interface/win32/win_win32.c
+++ b/interface/win32/win_win32.c
@@ -2592,6 +2592,7 @@ static void HandleMessage(win* p,MSG* Msg)
{
int Result;
+/*
#if defined(TARGET_WINCE)
if (Msg->message == WM_HIBERNATE)
{
@@ -2599,7 +2600,7 @@ static void HandleMessage(win* p,MSG* Msg)
NodeHibernate();
}
#endif
-
+*/
if (Msg->message >= WM_APP + 0x200 &&
Msg->message <= WM_APP + 0x220)
{
2 則留言:
hi there. I have problems running tcpmp under wince 6 ( nowada board, embedded ce6 ) , always crashes when streaming or playing video.
Any working version for wince 6 ?
Many thanks
My email is petrutms@gmail.com
Pity, No solution so far.
Because TCPMP uses dynamic code-gen, needs to call a kernel mode instruction "sync d-i cache", that seems not allowed in CE 6.0.
If turn off the dynamic code-gen, tcpm can run without fault, but the permance is not acceptable.
張貼留言