[Live-devel] liveMedia on WINCE

pierre.lhussiez pierre.lhussiez at laposte.net
Mon Jun 27 11:57:05 PDT 2005


> It's good to hear that you have it working.  One question I have, though: 
> Are you using "embedded VC++ 4.0"?  We've had people asking how to use 
> this, because it (apparently) doesn't handle Makefiles.  If you're using 
> this, then how were you able to build the "LIVE.COM Streaming Media" code?
 
I have the liveMedia lib (2005.05.26a) compiling and linking on embedded VC++ 4.00.1505.0 without using makefiles.
and runs under WCE4.2, help following:
 
 
-I have created a ‘live media library’ ( I’m not using precompiled header and nto using MFC).
 
-Project directorie tree:
  C:\DOCUMENTS AND SETTINGS\EX-PLH\MES DOCUMENTS\EMB VISUAL C++ PROJECTS\LIVEMEDIA LIBRARY
+---BasicUsageEnvironment
|   +---X86Dbg
|   \---X86Rel
+---groupsock
|   +---X86Dbg
|   \---X86Rel
+---UsageEnvironment
|   +---X86Dbg
|   \---X86Rel
+---WindowsAudioInputDevice_mixer
|   +---X86Dbg
|   \---X86Rel
+---WindowsAudioInputDevice_noMixer
|   +---X86Dbg
|   \---X86Rel
+---X86Dbg
\---X86Rel
 
 
-ByteStreamFileSource.cpp: code added line 69 :
/* defines for compatibility */
#if defined(_WIN32_WCE)
       #define int64_t __int64
       #define off_t long
       #define fseeko fseek
#endif

 
 
-Code modification of the livemida/RTSServer.cpp line 393 because gmtime() and strftime() was not exist
last code :
static char const* dateHeader() {
  static char buf[200];
  time_t tt = time(NULL);
  strftime(buf, sizeof buf, "Date: %a, %b %d %Y %H:%M:%S GMT\r\n", gmtime(&tt));
  return buf;
}

New code :
#define PLH_DISPLAY_ERROR \
       {fwprintf(stderr, L"Error:\n"); \
       unsigned long errCode = GetLastError(); \
       if (errCode == ERROR_INSUFFICIENT_BUFFER || \
             errCode == ERROR_INVALID_FLAGS || \
             errCode == ERROR_INVALID_PARAMETER) \
fwprintf(stderr, L"\tError while using GetDateFormat/GetTimeFormat in %s at line %s\n", __FILE__, __LINE__);}
 
static char const* dateHeader() {
       int ret;
       SYSTEMTIME SystemTime;
       GetSystemTime(&SystemTime);
       WCHAR dateFormat[] = L"ddd, MMM dd yyyy";
       WCHAR timeFormat[] = L"HH:mm:ss GMT\r\n";
       WCHAR buf[200];
       DWORD locale = LOCALE_NEUTRAL;
       //DWORD locale = MAKELCID( 
       //     MAKELANGID(LANG_ENGLISH, SUBLANG_DEFAULT), 
       //     SORT_DEFAULT);
 
       if(!(ret = GetDateFormat(locale, 0, &SystemTime,
             (LPTSTR)dateFormat, (LPTSTR)buf, sizeof buf))) 
             PLH_DISPLAY_ERROR;
       buf[ret - 1] = ' ';
       if(!(ret = GetTimeFormat(locale, 0, &SystemTime,
             (LPTSTR)timeFormat, (LPTSTR)buf + ret, (sizeof buf) - ret)))
             PLH_DISPLAY_ERROR;
       char *retBuf = new char[wcslen(buf)];
       wcstombs(retBuf, buf, wcslen(buf));
       return (retBuf);
}

 
      
-When using the live media lib, uafxwced.lib have to be linked before other lib to avoid the following linking error:
uafxwced.lib(afxmem.obj) : error LNK2005: "void * __cdecl operator new(unsigned int)" (??2 at YAPAXI@Z) already defined in coredll.lib(COREDLL.dll)
 
 
-Maybe there is some little other extra things to do but its must be easy to do.
 
Best regards

Accédez au courrier électronique de La Poste : www.laposte.net ; 
3615 LAPOSTENET (0,34€/mn) ; tél : 08 92 68 13 50 (0,34€/mn)


-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.live.com/pipermail/live-devel/attachments/20050627/e07c90b0/attachment-0001.html


More information about the live-devel mailing list