Initial commit: ROW Client source code
Game client codebase including: - CharacterActionControl: Character and creature management - GlobalScript: Network, items, skills, quests, utilities - RYLClient: Main client application with GUI and event handlers - Engine: 3D rendering engine (RYLGL) - MemoryManager: Custom memory allocation - Library: Third-party dependencies (DirectX, boost, etc.) - Tools: Development utilities 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude <noreply@anthropic.com>
This commit is contained in:
@@ -0,0 +1,137 @@
|
||||
# Microsoft Developer Studio Project File - Name="PlayWndASF" - Package Owner=<4>
|
||||
# Microsoft Developer Studio Generated Build File, Format Version 6.00
|
||||
# ** DO NOT EDIT **
|
||||
|
||||
# TARGTYPE "Win32 (x86) Application" 0x0101
|
||||
|
||||
CFG=PlayWndASF - Win32 Debug
|
||||
!MESSAGE This is not a valid makefile. To build this project using NMAKE,
|
||||
!MESSAGE use the Export Makefile command and run
|
||||
!MESSAGE
|
||||
!MESSAGE NMAKE /f "PlayWndASF.mak".
|
||||
!MESSAGE
|
||||
!MESSAGE You can specify a configuration when running NMAKE
|
||||
!MESSAGE by defining the macro CFG on the command line. For example:
|
||||
!MESSAGE
|
||||
!MESSAGE NMAKE /f "PlayWndASF.mak" CFG="PlayWndASF - Win32 Debug"
|
||||
!MESSAGE
|
||||
!MESSAGE Possible choices for configuration are:
|
||||
!MESSAGE
|
||||
!MESSAGE "PlayWndASF - Win32 Release" (based on "Win32 (x86) Application")
|
||||
!MESSAGE "PlayWndASF - Win32 Debug" (based on "Win32 (x86) Application")
|
||||
!MESSAGE
|
||||
|
||||
# Begin Project
|
||||
# PROP AllowPerConfigDependencies 0
|
||||
# PROP Scc_ProjName ""
|
||||
# PROP Scc_LocalPath ""
|
||||
CPP=cl.exe
|
||||
MTL=midl.exe
|
||||
RSC=rc.exe
|
||||
|
||||
!IF "$(CFG)" == "PlayWndASF - Win32 Release"
|
||||
|
||||
# PROP BASE Use_MFC 0
|
||||
# PROP BASE Use_Debug_Libraries 0
|
||||
# PROP BASE Output_Dir "Release"
|
||||
# PROP BASE Intermediate_Dir "Release"
|
||||
# PROP BASE Target_Dir ""
|
||||
# PROP Use_MFC 0
|
||||
# PROP Use_Debug_Libraries 0
|
||||
# PROP Output_Dir "Release"
|
||||
# PROP Intermediate_Dir "Release"
|
||||
# PROP Ignore_Export_Lib 0
|
||||
# PROP Target_Dir ""
|
||||
# ADD BASE CPP /nologo /W3 /GX /O2 /D "WIN32" /D "NDEBUG" /D "_WINDOWS" /D "_MBCS" /YX /FD /c
|
||||
# ADD CPP /nologo /W3 /GX /O2 /I "..\..\..\..\..\include" /I "..\..\BaseClasses" /I "..\..\common" /D "WIN32" /D "NDEBUG" /D "_WINDOWS" /D "_MBCS" /YX /FD /c
|
||||
# ADD BASE MTL /nologo /D "NDEBUG" /mktyplib203 /win32
|
||||
# ADD MTL /nologo /D "NDEBUG" /mktyplib203 /win32
|
||||
# ADD BASE RSC /l 0x409 /d "NDEBUG"
|
||||
# ADD RSC /l 0x409 /d "NDEBUG" /d "WIN32"
|
||||
BSC32=bscmake.exe
|
||||
# ADD BASE BSC32 /nologo
|
||||
# ADD BSC32 /nologo
|
||||
LINK32=link.exe
|
||||
# ADD BASE LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /subsystem:windows /machine:I386
|
||||
# ADD LINK32 winspool.lib shell32.lib odbc32.lib odbccp32.lib ..\..\common\wmstub.lib ..\..\common\wmvcore.lib quartz.lib msvcrt.lib winmm.lib msacm32.lib olepro32.lib strmiids.lib kernel32.lib user32.lib gdi32.lib comdlg32.lib ole32.lib oleaut32.lib advapi32.lib uuid.lib /nologo /subsystem:windows /machine:I386 /nodefaultlib /stack:0x200000,0x200000
|
||||
|
||||
!ELSEIF "$(CFG)" == "PlayWndASF - Win32 Debug"
|
||||
|
||||
# PROP BASE Use_MFC 0
|
||||
# PROP BASE Use_Debug_Libraries 1
|
||||
# PROP BASE Output_Dir "Debug"
|
||||
# PROP BASE Intermediate_Dir "Debug"
|
||||
# PROP BASE Target_Dir ""
|
||||
# PROP Use_MFC 0
|
||||
# PROP Use_Debug_Libraries 1
|
||||
# PROP Output_Dir "Debug"
|
||||
# PROP Intermediate_Dir "Debug"
|
||||
# PROP Ignore_Export_Lib 0
|
||||
# PROP Target_Dir ""
|
||||
# ADD BASE CPP /nologo /W3 /Gm /GX /Zi /Od /D "WIN32" /D "_DEBUG" /D "_WINDOWS" /D "_MBCS" /YX /FD /GZ /c
|
||||
# ADD CPP /nologo /W3 /Gm /GX /Zi /Od /I "..\..\..\..\..\include" /I "..\..\BaseClasses" /I "..\..\common" /D "WIN32" /D "_DEBUG" /D "_WINDOWS" /D "_MBCS" /YX /FD /GZ /c
|
||||
# SUBTRACT CPP /Fr
|
||||
# ADD BASE MTL /nologo /D "_DEBUG" /mktyplib203 /win32
|
||||
# ADD MTL /nologo /D "_DEBUG" /mktyplib203 /win32
|
||||
# ADD BASE RSC /l 0x409 /d "_DEBUG"
|
||||
# ADD RSC /l 0x409 /d "_DEBUG" /d "WIN32"
|
||||
BSC32=bscmake.exe
|
||||
# ADD BASE BSC32 /nologo
|
||||
# ADD BSC32 /nologo
|
||||
LINK32=link.exe
|
||||
# ADD BASE LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /subsystem:windows /debug /machine:I386 /pdbtype:sept
|
||||
# ADD LINK32 ..\..\common\wmstub.lib ..\..\common\wmvcore.lib quartz.lib msvcrtd.lib winmm.lib msacm32.lib olepro32.lib strmiids.lib kernel32.lib user32.lib gdi32.lib comdlg32.lib ole32.lib oleaut32.lib advapi32.lib uuid.lib /nologo /subsystem:windows /debug /machine:I386 /nodefaultlib /pdbtype:sept /stack:0x200000,0x200000
|
||||
# SUBTRACT LINK32 /incremental:no
|
||||
|
||||
!ENDIF
|
||||
|
||||
# Begin Target
|
||||
|
||||
# Name "PlayWndASF - Win32 Release"
|
||||
# Name "PlayWndASF - Win32 Debug"
|
||||
# Begin Group "Source Files"
|
||||
|
||||
# PROP Default_Filter "cpp;c;cxx;rc;def;r;odl;idl;hpj;bat"
|
||||
# Begin Source File
|
||||
|
||||
SOURCE=.\keyprovider.cpp
|
||||
# End Source File
|
||||
# Begin Source File
|
||||
|
||||
SOURCE=.\PlayWndASF.cpp
|
||||
# End Source File
|
||||
# Begin Source File
|
||||
|
||||
SOURCE=.\PlayWndASF.rc
|
||||
# End Source File
|
||||
# End Group
|
||||
# Begin Group "Header Files"
|
||||
|
||||
# PROP Default_Filter "h;hpp;hxx;hm;inl"
|
||||
# Begin Source File
|
||||
|
||||
SOURCE=.\keyprovider.h
|
||||
# End Source File
|
||||
# Begin Source File
|
||||
|
||||
SOURCE=.\PlayWndASF.h
|
||||
# End Source File
|
||||
# Begin Source File
|
||||
|
||||
SOURCE=.\resource.h
|
||||
# End Source File
|
||||
# End Group
|
||||
# Begin Group "Resource Files"
|
||||
|
||||
# PROP Default_Filter "ico;cur;bmp;dlg;rc2;rct;bin;rgs;gif;jpg;jpeg;jpe"
|
||||
# Begin Source File
|
||||
|
||||
SOURCE=.\playwnd.ico
|
||||
# End Source File
|
||||
# Begin Source File
|
||||
|
||||
SOURCE=.\PlayWndASF.ico
|
||||
# End Source File
|
||||
# End Group
|
||||
# End Target
|
||||
# End Project
|
||||
@@ -0,0 +1,185 @@
|
||||
//Microsoft Developer Studio generated resource script.
|
||||
//
|
||||
#include "resource.h"
|
||||
|
||||
#define APSTUDIO_READONLY_SYMBOLS
|
||||
/////////////////////////////////////////////////////////////////////////////
|
||||
//
|
||||
// Generated from the TEXTINCLUDE 2 resource.
|
||||
//
|
||||
#define APSTUDIO_HIDDEN_SYMBOLS
|
||||
#include "windows.h"
|
||||
#undef APSTUDIO_HIDDEN_SYMBOLS
|
||||
#include "playwndasf.h"
|
||||
|
||||
/////////////////////////////////////////////////////////////////////////////
|
||||
#undef APSTUDIO_READONLY_SYMBOLS
|
||||
|
||||
/////////////////////////////////////////////////////////////////////////////
|
||||
// English (U.S.) resources
|
||||
|
||||
#if !defined(AFX_RESOURCE_DLL) || defined(AFX_TARG_ENU)
|
||||
#ifdef _WIN32
|
||||
LANGUAGE LANG_ENGLISH, SUBLANG_ENGLISH_US
|
||||
#pragma code_page(1252)
|
||||
#endif //_WIN32
|
||||
|
||||
/////////////////////////////////////////////////////////////////////////////
|
||||
//
|
||||
// Menu
|
||||
//
|
||||
|
||||
IDR_MENU MENU DISCARDABLE
|
||||
BEGIN
|
||||
POPUP "&File"
|
||||
BEGIN
|
||||
MENUITEM "&Open clip...", ID_FILE_OPENCLIP
|
||||
MENUITEM "&Close clip", ID_FILE_CLOSE
|
||||
MENUITEM SEPARATOR
|
||||
MENUITEM "E&xit", ID_FILE_EXIT
|
||||
END
|
||||
POPUP "&Control"
|
||||
BEGIN
|
||||
MENUITEM "&Pause/Play\tP", ID_FILE_PAUSE
|
||||
MENUITEM "&Stop\tS", ID_FILE_STOP
|
||||
MENUITEM "&Mute/Unmute\tM", ID_FILE_MUTE
|
||||
MENUITEM SEPARATOR
|
||||
MENUITEM "Single F&rame Step\t<Space>", ID_SINGLE_STEP
|
||||
MENUITEM SEPARATOR
|
||||
MENUITEM "&Half size (50%)\tH", ID_FILE_SIZE_HALF
|
||||
MENUITEM "&Three-quarter size (75%)\tT",ID_FILE_SIZE_THREEQUARTER
|
||||
MENUITEM "&Normal size (100%)\tN", ID_FILE_SIZE_NORMAL, CHECKED
|
||||
MENUITEM "&Double size (200%)\tD", ID_FILE_SIZE_DOUBLE
|
||||
MENUITEM SEPARATOR
|
||||
MENUITEM "&Full Screen\t<Enter> or F", ID_FILE_FULLSCREEN
|
||||
END
|
||||
POPUP "Rendering"
|
||||
BEGIN
|
||||
MENUITEM "Use new ASF Reader filter (recommended)",
|
||||
ID_RENDERING_USENEWASFREADER, CHECKED
|
||||
MENUITEM "Use legacy ASF Reader filter",
|
||||
ID_RENDERING_USELEGACYASFREADER
|
||||
|
||||
END
|
||||
POPUP "Help"
|
||||
BEGIN
|
||||
MENUITEM "About...", ID_HELP_ABOUT
|
||||
END
|
||||
END
|
||||
|
||||
|
||||
/////////////////////////////////////////////////////////////////////////////
|
||||
//
|
||||
// Icon
|
||||
//
|
||||
|
||||
// Icon with lowest ID value placed first to ensure application icon
|
||||
// remains consistent on all systems.
|
||||
IDI_PLAYWND ICON DISCARDABLE "playwnd.ico"
|
||||
|
||||
/////////////////////////////////////////////////////////////////////////////
|
||||
//
|
||||
// Dialog
|
||||
//
|
||||
|
||||
IDD_ABOUTBOX DIALOG DISCARDABLE 0, 0, 235, 55
|
||||
STYLE DS_MODALFRAME | WS_POPUP | WS_CAPTION | WS_SYSMENU
|
||||
CAPTION "About PlayWnd ASF"
|
||||
FONT 8, "MS Shell Dlg"
|
||||
BEGIN
|
||||
ICON IDI_PLAYWND,-1,11,17,20,20
|
||||
LTEXT "DirectShow PlayWindow ASF Sample",-1,40,10,131,8,
|
||||
SS_NOPREFIX
|
||||
LTEXT "Copyright (C) 1999-2001 Microsoft Corporation",-1,40,34,
|
||||
188,8
|
||||
DEFPUSHBUTTON "OK",IDOK,178,7,50,14,WS_GROUP
|
||||
LTEXT "Version 8.1",-1,40,22,119,8,SS_NOPREFIX
|
||||
END
|
||||
|
||||
|
||||
/////////////////////////////////////////////////////////////////////////////
|
||||
//
|
||||
// Version
|
||||
//
|
||||
|
||||
VS_VERSION_INFO VERSIONINFO
|
||||
FILEVERSION 8,1,0,0
|
||||
PRODUCTVERSION 8,1,0,0
|
||||
FILEFLAGSMASK 0x3fL
|
||||
#ifdef _DEBUG
|
||||
FILEFLAGS 0x1L
|
||||
#else
|
||||
FILEFLAGS 0x0L
|
||||
#endif
|
||||
FILEOS 0x4L
|
||||
FILETYPE 0x1L
|
||||
FILESUBTYPE 0x0L
|
||||
BEGIN
|
||||
BLOCK "StringFileInfo"
|
||||
BEGIN
|
||||
BLOCK "040904b0"
|
||||
BEGIN
|
||||
VALUE "Comments", "DirectShow Sample\0"
|
||||
VALUE "CompanyName", "Microsoft\0"
|
||||
VALUE "FileDescription", "PlayWndASF Application\0"
|
||||
VALUE "FileVersion", "8.10\0"
|
||||
VALUE "InternalName", "PlayWndASF\0"
|
||||
VALUE "LegalCopyright", "Copyright (c) 2000-2001 Microsoft Corporation\0"
|
||||
VALUE "LegalTrademarks", "\0"
|
||||
VALUE "OriginalFilename", "PlayWndASF.EXE\0"
|
||||
VALUE "PrivateBuild", "\0"
|
||||
VALUE "ProductName", "DirectX 8 SDK\0"
|
||||
VALUE "ProductVersion", "8.1\0"
|
||||
VALUE "SpecialBuild", "\0"
|
||||
END
|
||||
END
|
||||
BLOCK "VarFileInfo"
|
||||
BEGIN
|
||||
VALUE "Translation", 0x409, 1200
|
||||
END
|
||||
END
|
||||
|
||||
|
||||
#ifdef APSTUDIO_INVOKED
|
||||
/////////////////////////////////////////////////////////////////////////////
|
||||
//
|
||||
// TEXTINCLUDE
|
||||
//
|
||||
|
||||
1 TEXTINCLUDE DISCARDABLE
|
||||
BEGIN
|
||||
"resource.h\0"
|
||||
END
|
||||
|
||||
2 TEXTINCLUDE DISCARDABLE
|
||||
BEGIN
|
||||
"#define APSTUDIO_HIDDEN_SYMBOLS\r\n"
|
||||
"#include ""windows.h""\r\n"
|
||||
"#undef APSTUDIO_HIDDEN_SYMBOLS\r\n"
|
||||
"#include ""playwndasf.h""\r\n"
|
||||
"\0"
|
||||
END
|
||||
|
||||
3 TEXTINCLUDE DISCARDABLE
|
||||
BEGIN
|
||||
"\r\n"
|
||||
"\0"
|
||||
END
|
||||
|
||||
#endif // APSTUDIO_INVOKED
|
||||
|
||||
#endif // English (U.S.) resources
|
||||
/////////////////////////////////////////////////////////////////////////////
|
||||
|
||||
|
||||
|
||||
#ifndef APSTUDIO_INVOKED
|
||||
/////////////////////////////////////////////////////////////////////////////
|
||||
//
|
||||
// Generated from the TEXTINCLUDE 3 resource.
|
||||
//
|
||||
|
||||
|
||||
/////////////////////////////////////////////////////////////////////////////
|
||||
#endif // not APSTUDIO_INVOKED
|
||||
|
||||
@@ -0,0 +1,101 @@
|
||||
//------------------------------------------------------------------------------
|
||||
// File: KeyProvider.cpp
|
||||
//
|
||||
// Desc: DirectShow sample code - provides a class to unkey Windows Media
|
||||
// for use with ASF, WMA, WMV media files.
|
||||
//
|
||||
// Copyright (c) 1999-2001 Microsoft Corporation. All rights reserved.
|
||||
//------------------------------------------------------------------------------
|
||||
|
||||
|
||||
#include <streams.h>
|
||||
#include <atlbase.h>
|
||||
#include <atlimpl.cpp>
|
||||
#include <stdio.h>
|
||||
|
||||
#include <dshowasf.h>
|
||||
#include "keyprovider.h"
|
||||
|
||||
|
||||
//
|
||||
// Build warning to remind developers of the dependency on the
|
||||
// Windows Media Format SDK libraries, which do not ship with
|
||||
// the DirectX SDK.
|
||||
//
|
||||
#pragma message("NOTE: To link and run this sample, you must install the Windows Media Format SDK.")
|
||||
#pragma message("After signing a license agreement with Microsoft, you will receive a")
|
||||
#pragma message("unique version of WMStub.LIB, which should be added to this VC++ project.")
|
||||
#pragma message("Without this library, you will receive linker errors for the following:")
|
||||
#pragma message(" WMCreateCertificate")
|
||||
#pragma message("You must also add WMVCore.LIB to the linker settings to resolve the following:")
|
||||
#pragma message(" WMCreateProfileManager")
|
||||
|
||||
|
||||
CKeyProvider::CKeyProvider() : m_cRef(0)
|
||||
{
|
||||
}
|
||||
|
||||
//////////////////////////////////////////////////////////////////////////
|
||||
//
|
||||
// IUnknown methods
|
||||
//
|
||||
//////////////////////////////////////////////////////////////////////////
|
||||
|
||||
ULONG CKeyProvider::AddRef()
|
||||
{
|
||||
return ++m_cRef;
|
||||
}
|
||||
|
||||
ULONG CKeyProvider::Release()
|
||||
{
|
||||
ASSERT(m_cRef > 0);
|
||||
|
||||
m_cRef--;
|
||||
|
||||
if(m_cRef == 0)
|
||||
{
|
||||
delete this;
|
||||
|
||||
// don't return m_cRef, because the object doesn't exist anymore
|
||||
return((ULONG) 0);
|
||||
}
|
||||
|
||||
return(m_cRef);
|
||||
}
|
||||
|
||||
//
|
||||
// QueryInterface
|
||||
//
|
||||
// We only support IUnknown and IServiceProvider
|
||||
//
|
||||
HRESULT CKeyProvider::QueryInterface(REFIID riid, void ** ppv)
|
||||
{
|
||||
if(riid == IID_IServiceProvider || riid == IID_IUnknown)
|
||||
{
|
||||
*ppv = (void *) static_cast<IServiceProvider *>(this);
|
||||
AddRef();
|
||||
return NOERROR;
|
||||
}
|
||||
|
||||
return E_NOINTERFACE;
|
||||
}
|
||||
|
||||
STDMETHODIMP CKeyProvider::QueryService(REFIID siid, REFIID riid, void **ppv)
|
||||
{
|
||||
if(siid == __uuidof(IWMReader) && riid == IID_IUnknown)
|
||||
{
|
||||
IUnknown *punkCert;
|
||||
|
||||
HRESULT hr = WMCreateCertificate(&punkCert);
|
||||
|
||||
if(SUCCEEDED(hr))
|
||||
*ppv = (void *) punkCert;
|
||||
else
|
||||
printf("CKeyProvider::QueryService failed to create certificate! hr=0x%x\n", hr);
|
||||
|
||||
return hr;
|
||||
}
|
||||
|
||||
return E_NOINTERFACE;
|
||||
}
|
||||
|
||||
@@ -0,0 +1,27 @@
|
||||
//------------------------------------------------------------------------------
|
||||
// File: keyprovider.h
|
||||
//
|
||||
// Desc: DirectShow sample code - describes CKeyProvider helper class
|
||||
//
|
||||
// Copyright (c) 1999-2001, Microsoft Corporation. All rights reserved.
|
||||
//------------------------------------------------------------------------------
|
||||
|
||||
|
||||
class CKeyProvider : public IServiceProvider
|
||||
{
|
||||
public:
|
||||
//
|
||||
// IUnknown interface
|
||||
//
|
||||
STDMETHODIMP QueryInterface(REFIID riid, void ** ppv);
|
||||
STDMETHODIMP_(ULONG) AddRef();
|
||||
STDMETHODIMP_(ULONG) Release();
|
||||
|
||||
CKeyProvider();
|
||||
|
||||
// IServiceProvider
|
||||
STDMETHODIMP QueryService(REFIID siid, REFIID riid, void **ppv);
|
||||
|
||||
private:
|
||||
ULONG m_cRef;
|
||||
};
|
||||
Binary file not shown.
|
After Width: | Height: | Size: 1.1 KiB |
@@ -0,0 +1,29 @@
|
||||
Microsoft Developer Studio Workspace File, Format Version 6.00
|
||||
# WARNING: DO NOT EDIT OR DELETE THIS WORKSPACE FILE!
|
||||
|
||||
###############################################################################
|
||||
|
||||
Project: "PlayWndASF"=.\PlayWndASF.dsp - Package Owner=<4>
|
||||
|
||||
Package=<5>
|
||||
{{{
|
||||
}}}
|
||||
|
||||
Package=<4>
|
||||
{{{
|
||||
}}}
|
||||
|
||||
###############################################################################
|
||||
|
||||
Global:
|
||||
|
||||
Package=<5>
|
||||
{{{
|
||||
}}}
|
||||
|
||||
Package=<3>
|
||||
{{{
|
||||
}}}
|
||||
|
||||
###############################################################################
|
||||
|
||||
@@ -0,0 +1,210 @@
|
||||
# Microsoft Developer Studio Generated NMAKE File, Based on PlayWndASF.dsp
|
||||
!IF "$(CFG)" == ""
|
||||
CFG=PlayWndASF - Win32 Debug
|
||||
!MESSAGE No configuration specified. Defaulting to PlayWndASF - Win32 Debug.
|
||||
!ENDIF
|
||||
|
||||
!IF "$(CFG)" != "PlayWndASF - Win32 Release" && "$(CFG)" != "PlayWndASF - Win32 Debug"
|
||||
!MESSAGE Invalid configuration "$(CFG)" specified.
|
||||
!MESSAGE You can specify a configuration when running NMAKE
|
||||
!MESSAGE by defining the macro CFG on the command line. For example:
|
||||
!MESSAGE
|
||||
!MESSAGE NMAKE /f "PlayWndASF.mak" CFG="PlayWndASF - Win32 Debug"
|
||||
!MESSAGE
|
||||
!MESSAGE Possible choices for configuration are:
|
||||
!MESSAGE
|
||||
!MESSAGE "PlayWndASF - Win32 Release" (based on "Win32 (x86) Application")
|
||||
!MESSAGE "PlayWndASF - Win32 Debug" (based on "Win32 (x86) Application")
|
||||
!MESSAGE
|
||||
!ERROR An invalid configuration is specified.
|
||||
!ENDIF
|
||||
|
||||
!IF "$(OS)" == "Windows_NT"
|
||||
NULL=
|
||||
!ELSE
|
||||
NULL=nul
|
||||
!ENDIF
|
||||
|
||||
!IF "$(CFG)" == "PlayWndASF - Win32 Release"
|
||||
|
||||
OUTDIR=.\Release
|
||||
INTDIR=.\Release
|
||||
# Begin Custom Macros
|
||||
OutDir=.\Release
|
||||
# End Custom Macros
|
||||
|
||||
ALL : "$(OUTDIR)\PlayWndASF.exe"
|
||||
|
||||
|
||||
CLEAN :
|
||||
-@erase "$(INTDIR)\keyprovider.obj"
|
||||
-@erase "$(INTDIR)\PlayWndASF.obj"
|
||||
-@erase "$(INTDIR)\PlayWndASF.res"
|
||||
-@erase "$(INTDIR)\vc60.idb"
|
||||
-@erase "$(OUTDIR)\PlayWndASF.exe"
|
||||
|
||||
"$(OUTDIR)" :
|
||||
if not exist "$(OUTDIR)/$(NULL)" mkdir "$(OUTDIR)"
|
||||
|
||||
CPP=cl.exe
|
||||
CPP_PROJ=/nologo /ML /W3 /GX /O2 /I "..\..\..\..\..\include" /I "..\..\BaseClasses" /I "..\..\common" /D "WIN32" /D "NDEBUG" /D "_WINDOWS" /D "_MBCS" /Fp"$(INTDIR)\PlayWndASF.pch" /YX /Fo"$(INTDIR)\\" /Fd"$(INTDIR)\\" /FD /c
|
||||
|
||||
.c{$(INTDIR)}.obj::
|
||||
$(CPP) @<<
|
||||
$(CPP_PROJ) $<
|
||||
<<
|
||||
|
||||
.cpp{$(INTDIR)}.obj::
|
||||
$(CPP) @<<
|
||||
$(CPP_PROJ) $<
|
||||
<<
|
||||
|
||||
.cxx{$(INTDIR)}.obj::
|
||||
$(CPP) @<<
|
||||
$(CPP_PROJ) $<
|
||||
<<
|
||||
|
||||
.c{$(INTDIR)}.sbr::
|
||||
$(CPP) @<<
|
||||
$(CPP_PROJ) $<
|
||||
<<
|
||||
|
||||
.cpp{$(INTDIR)}.sbr::
|
||||
$(CPP) @<<
|
||||
$(CPP_PROJ) $<
|
||||
<<
|
||||
|
||||
.cxx{$(INTDIR)}.sbr::
|
||||
$(CPP) @<<
|
||||
$(CPP_PROJ) $<
|
||||
<<
|
||||
|
||||
MTL=midl.exe
|
||||
MTL_PROJ=/nologo /D "NDEBUG" /mktyplib203 /win32
|
||||
RSC=rc.exe
|
||||
RSC_PROJ=/l 0x409 /fo"$(INTDIR)\PlayWndASF.res" /d "NDEBUG"
|
||||
BSC32=bscmake.exe
|
||||
BSC32_FLAGS=/nologo /o"$(OUTDIR)\PlayWndASF.bsc"
|
||||
BSC32_SBRS= \
|
||||
|
||||
LINK32=link.exe
|
||||
LINK32_FLAGS=winspool.lib shell32.lib odbc32.lib odbccp32.lib ..\..\common\wmstub.lib ..\..\common\wmvcore.lib quartz.lib msvcrt.lib winmm.lib msacm32.lib olepro32.lib strmiids.lib kernel32.lib user32.lib gdi32.lib comdlg32.lib ole32.lib oleaut32.lib advapi32.lib uuid.lib /nologo /subsystem:windows /incremental:no /pdb:"$(OUTDIR)\PlayWndASF.pdb" /machine:I386 /nodefaultlib /out:"$(OUTDIR)\PlayWndASF.exe" /stack:0x200000,0x200000
|
||||
LINK32_OBJS= \
|
||||
"$(INTDIR)\keyprovider.obj" \
|
||||
"$(INTDIR)\PlayWndASF.obj" \
|
||||
"$(INTDIR)\PlayWndASF.res"
|
||||
|
||||
"$(OUTDIR)\PlayWndASF.exe" : "$(OUTDIR)" $(DEF_FILE) $(LINK32_OBJS)
|
||||
$(LINK32) @<<
|
||||
$(LINK32_FLAGS) $(LINK32_OBJS)
|
||||
<<
|
||||
|
||||
!ELSEIF "$(CFG)" == "PlayWndASF - Win32 Debug"
|
||||
|
||||
OUTDIR=.\Debug
|
||||
INTDIR=.\Debug
|
||||
# Begin Custom Macros
|
||||
OutDir=.\Debug
|
||||
# End Custom Macros
|
||||
|
||||
ALL : "$(OUTDIR)\PlayWndASF.exe"
|
||||
|
||||
|
||||
CLEAN :
|
||||
-@erase "$(INTDIR)\keyprovider.obj"
|
||||
-@erase "$(INTDIR)\PlayWndASF.obj"
|
||||
-@erase "$(INTDIR)\PlayWndASF.res"
|
||||
-@erase "$(INTDIR)\vc60.idb"
|
||||
-@erase "$(INTDIR)\vc60.pdb"
|
||||
-@erase "$(OUTDIR)\PlayWndASF.exe"
|
||||
-@erase "$(OUTDIR)\PlayWndASF.ilk"
|
||||
-@erase "$(OUTDIR)\PlayWndASF.pdb"
|
||||
|
||||
"$(OUTDIR)" :
|
||||
if not exist "$(OUTDIR)/$(NULL)" mkdir "$(OUTDIR)"
|
||||
|
||||
CPP=cl.exe
|
||||
CPP_PROJ=/nologo /MLd /W3 /Gm /GX /Zi /Od /I "..\..\..\..\..\include" /I "..\..\BaseClasses" /I "..\..\common" /D "WIN32" /D "_DEBUG" /D "_WINDOWS" /D "_MBCS" /Fp"$(INTDIR)\PlayWndASF.pch" /YX /Fo"$(INTDIR)\\" /Fd"$(INTDIR)\\" /FD /GZ /c
|
||||
|
||||
.c{$(INTDIR)}.obj::
|
||||
$(CPP) @<<
|
||||
$(CPP_PROJ) $<
|
||||
<<
|
||||
|
||||
.cpp{$(INTDIR)}.obj::
|
||||
$(CPP) @<<
|
||||
$(CPP_PROJ) $<
|
||||
<<
|
||||
|
||||
.cxx{$(INTDIR)}.obj::
|
||||
$(CPP) @<<
|
||||
$(CPP_PROJ) $<
|
||||
<<
|
||||
|
||||
.c{$(INTDIR)}.sbr::
|
||||
$(CPP) @<<
|
||||
$(CPP_PROJ) $<
|
||||
<<
|
||||
|
||||
.cpp{$(INTDIR)}.sbr::
|
||||
$(CPP) @<<
|
||||
$(CPP_PROJ) $<
|
||||
<<
|
||||
|
||||
.cxx{$(INTDIR)}.sbr::
|
||||
$(CPP) @<<
|
||||
$(CPP_PROJ) $<
|
||||
<<
|
||||
|
||||
MTL=midl.exe
|
||||
MTL_PROJ=/nologo /D "_DEBUG" /mktyplib203 /win32
|
||||
RSC=rc.exe
|
||||
RSC_PROJ=/l 0x409 /fo"$(INTDIR)\PlayWndASF.res" /d "_DEBUG"
|
||||
BSC32=bscmake.exe
|
||||
BSC32_FLAGS=/nologo /o"$(OUTDIR)\PlayWndASF.bsc"
|
||||
BSC32_SBRS= \
|
||||
|
||||
LINK32=link.exe
|
||||
LINK32_FLAGS=..\..\common\wmstub.lib ..\..\common\wmvcore.lib quartz.lib msvcrtd.lib winmm.lib msacm32.lib olepro32.lib strmiids.lib kernel32.lib user32.lib gdi32.lib comdlg32.lib ole32.lib oleaut32.lib advapi32.lib uuid.lib /nologo /subsystem:windows /incremental:yes /pdb:"$(OUTDIR)\PlayWndASF.pdb" /debug /machine:I386 /nodefaultlib /out:"$(OUTDIR)\PlayWndASF.exe" /pdbtype:sept /stack:0x200000,0x200000
|
||||
LINK32_OBJS= \
|
||||
"$(INTDIR)\keyprovider.obj" \
|
||||
"$(INTDIR)\PlayWndASF.obj" \
|
||||
"$(INTDIR)\PlayWndASF.res"
|
||||
|
||||
"$(OUTDIR)\PlayWndASF.exe" : "$(OUTDIR)" $(DEF_FILE) $(LINK32_OBJS)
|
||||
$(LINK32) @<<
|
||||
$(LINK32_FLAGS) $(LINK32_OBJS)
|
||||
<<
|
||||
|
||||
!ENDIF
|
||||
|
||||
|
||||
!IF "$(NO_EXTERNAL_DEPS)" != "1"
|
||||
!IF EXISTS("PlayWndASF.dep")
|
||||
!INCLUDE "PlayWndASF.dep"
|
||||
!ELSE
|
||||
!MESSAGE Warning: cannot find "PlayWndASF.dep"
|
||||
!ENDIF
|
||||
!ENDIF
|
||||
|
||||
|
||||
!IF "$(CFG)" == "PlayWndASF - Win32 Release" || "$(CFG)" == "PlayWndASF - Win32 Debug"
|
||||
SOURCE=.\keyprovider.cpp
|
||||
|
||||
"$(INTDIR)\keyprovider.obj" : $(SOURCE) "$(INTDIR)"
|
||||
|
||||
|
||||
SOURCE=.\PlayWndASF.cpp
|
||||
|
||||
"$(INTDIR)\PlayWndASF.obj" : $(SOURCE) "$(INTDIR)"
|
||||
|
||||
|
||||
SOURCE=.\PlayWndASF.rc
|
||||
|
||||
"$(INTDIR)\PlayWndASF.res" : $(SOURCE) "$(INTDIR)"
|
||||
$(RSC) $(RSC_PROJ) $(SOURCE)
|
||||
|
||||
|
||||
|
||||
!ENDIF
|
||||
|
||||
File diff suppressed because it is too large
Load Diff
@@ -0,0 +1,91 @@
|
||||
//------------------------------------------------------------------------------
|
||||
// File: PlayWndASF.h
|
||||
//
|
||||
// Desc: DirectShow sample code - header file for video in window movie
|
||||
// player application.
|
||||
//
|
||||
// Copyright (c) 1998-2001 Microsoft Corporation. All rights reserved.
|
||||
//------------------------------------------------------------------------------
|
||||
|
||||
|
||||
//
|
||||
// Function prototypes
|
||||
//
|
||||
HRESULT InitPlayerWindow(void);
|
||||
HRESULT InitVideoWindow(int nMultiplier, int nDivider);
|
||||
HRESULT HandleGraphEvent(void);
|
||||
HRESULT StepOneFrame(void);
|
||||
HRESULT StepFrames(int nFramesToStep);
|
||||
|
||||
BOOL GetFrameStepInterface(void);
|
||||
BOOL GetClipFileName(LPTSTR szName);
|
||||
BOOL IsWindowsMediaFile(LPTSTR lpszFile);
|
||||
|
||||
void PaintAudioWindow(void);
|
||||
void MoveVideoWindow(void);
|
||||
void CheckVisibility(void);
|
||||
void CloseInterfaces(void);
|
||||
void CheckSizeMenu(WPARAM wParam);
|
||||
void EnablePlaybackMenu(BOOL bEnable);
|
||||
|
||||
void OpenClip(void);
|
||||
void PauseClip(void);
|
||||
void StopClip(void);
|
||||
void CloseClip(void);
|
||||
|
||||
void UpdateMainTitle(void);
|
||||
void GetFilename(TCHAR *pszFull, TCHAR *pszFile);
|
||||
void Msg(TCHAR *szFormat, ...);
|
||||
|
||||
HRESULT AddGraphToRot(IUnknown *pUnkGraph, DWORD *pdwRegister);
|
||||
void RemoveGraphFromRot(DWORD pdwRegister);
|
||||
|
||||
HRESULT CreateFilter(REFCLSID clsid, IBaseFilter **ppFilter);
|
||||
HRESULT AddKeyProvider(IGraphBuilder *pGraph);
|
||||
HRESULT RenderOutputPins(IGraphBuilder *pGB, IBaseFilter *pReader);
|
||||
|
||||
|
||||
//
|
||||
// Constants
|
||||
//
|
||||
#define VOLUME_FULL 0L
|
||||
#define VOLUME_SILENCE -10000L
|
||||
|
||||
// File filter for OpenFile dialog
|
||||
#define FILE_FILTER_TEXT \
|
||||
TEXT("Windows Media Files (*.asf; *.wma; *.wmv)\0*.asf; *.wma; *.wmv\0") \
|
||||
TEXT("Video Files (*.avi; *.qt; *.mov; *.mpg; *.mpeg; *.m1v)\0*.avi; *.qt; *.mov; *.mpg; *.mpeg; *.m1v\0")\
|
||||
TEXT("Audio files (*.wav; *.mpa; *.mp2; *.mp3; *.au; *.aif; *.aiff; *.snd)\0*.wav; *.mpa; *.mp2; *.mp3; *.au; *.aif; *.aiff; *.snd\0")\
|
||||
TEXT("MIDI Files (*.mid, *.midi, *.rmi)\0*.mid; *.midi; *.rmi\0") \
|
||||
TEXT("Image Files (*.jpg, *.bmp, *.gif, *.tga)\0*.jpg; *.bmp; *.gif; *.tga\0") \
|
||||
TEXT("All Files (*.*)\0*.*;\0\0")
|
||||
|
||||
// Begin default media search at root directory
|
||||
#define DEFAULT_MEDIA_PATH TEXT("\\\0")
|
||||
|
||||
// Defaults used with audio-only files
|
||||
#define DEFAULT_AUDIO_WIDTH 240
|
||||
#define DEFAULT_AUDIO_HEIGHT 120
|
||||
#define DEFAULT_VIDEO_WIDTH 320
|
||||
#define DEFAULT_VIDEO_HEIGHT 240
|
||||
#define MINIMUM_VIDEO_WIDTH 200
|
||||
#define MINIMUM_VIDEO_HEIGHT 120
|
||||
|
||||
#define APPLICATIONNAME TEXT("PlayWndASF Media Player")
|
||||
#define CLASSNAME TEXT("PlayWndASFMediaPlayer")
|
||||
|
||||
#define WM_GRAPHNOTIFY WM_USER+13
|
||||
|
||||
enum PLAYSTATE {Stopped, Paused, Running, Init};
|
||||
|
||||
//
|
||||
// Macros
|
||||
//
|
||||
#define SAFE_RELEASE(x) { if (x) x->Release(); x = NULL; }
|
||||
|
||||
#define JIF(x) if (FAILED(hr=(x))) \
|
||||
{Msg(TEXT("FAILED(hr=0x%x) in ") TEXT(#x) TEXT("\n"), hr); return hr;}
|
||||
|
||||
#define LIF(x) if (FAILED(hr=(x))) \
|
||||
{Msg(TEXT("FAILED(hr=0x%x) in ") TEXT(#x) TEXT("\n"), hr);}
|
||||
|
||||
@@ -0,0 +1,83 @@
|
||||
DirectShow Sample -- PlayWndASF
|
||||
-------------------------------
|
||||
|
||||
Usage:
|
||||
|
||||
playwndasf <media filename>
|
||||
|
||||
Description:
|
||||
|
||||
This sample is an interactive audio/video media file player.
|
||||
It uses DirectShow to play any Windows Media audio or video media files
|
||||
(ASF, WMA, WMV) that are not protected by Digital Rights Management (DRM).
|
||||
The video will appear in a window on the screen, and you can use a mouse
|
||||
to move the window.
|
||||
|
||||
----------------------------------------------------------------------------
|
||||
NOTE: To build this sample, you must install the Microsoft Windows Media
|
||||
Format SDK and obtain a software certificate. After you obtain the software
|
||||
certificate, build the sample by linking two additional libraries:
|
||||
WMStub.lib and WMVCore.lib.
|
||||
----------------------------------------------------------------------------
|
||||
|
||||
If the media has a video component, PlayWndASF will read the video's
|
||||
default size and adjust the player's client area to allow the video
|
||||
to play at its preferred default size (taking into account the size of
|
||||
caption bar & borders).
|
||||
|
||||
You may mute the audio by pressing 'M'. You may toggle full-screen mode
|
||||
by pressing 'F'. You can pause/resume playback with 'P' and stop/rewind
|
||||
with 'S'. To close the media clip, hit ESC, F12, X, or Q.
|
||||
|
||||
If the media is audio-only, the player will display a small default window.
|
||||
|
||||
You can specify a media file as the only command line argument:
|
||||
Ex: PlayWndASF \\myserver\mediafiles\video\sample.asf
|
||||
|
||||
If no file is specified, the application will automatically display the
|
||||
Windows OpenFile dialog so that you can choose a file.
|
||||
|
||||
Use the menu bar or the close button to exit the application.
|
||||
|
||||
|
||||
Accessing media files
|
||||
|
||||
The media file may exist in your hard disk, CD-ROM, or on a network server.
|
||||
|
||||
If the file is on a network server:
|
||||
You may read a media file from a network server if you provide the full URL.
|
||||
For example, "PlayWndASF http://myserver/mediafiles/video/myvideo.asf" will
|
||||
read the file from the server into system memory. This approach will fail
|
||||
if the media file is too large to fit in memory.
|
||||
|
||||
|
||||
Limitations:
|
||||
|
||||
This sample will only render media files that are supported by the
|
||||
DirectShow subsystem. If you attempt to play a video (AVI, QuickTime, MPEG)
|
||||
that is encoded with an unsupported Codec, you will only see a black
|
||||
screen or no visible change to the display, although you should hear the
|
||||
associated audio component if it uses a supported format.
|
||||
|
||||
This sample will not play .ASX files.
|
||||
|
||||
|
||||
User Input:
|
||||
|
||||
Simple user input is supported through the keyboard or through the
|
||||
application's main menu bar.
|
||||
|
||||
Keyboard Action
|
||||
-------- ------
|
||||
P Play/Pause toggle
|
||||
S Stop and Rewind to beginning
|
||||
M Audio mute toggle
|
||||
F Full-screen mode toggle
|
||||
Spacebar Step one frame
|
||||
Quit to menu (closes file) ESC or Q or X or F12
|
||||
|
||||
|
||||
NOTE: This sample enforces a minimum window size (currently 200x120) to prevent
|
||||
window problems when small videos are resized. You may not resize a video to play
|
||||
in a window smaller than the defined minimum size.
|
||||
|
||||
@@ -0,0 +1,35 @@
|
||||
//{{NO_DEPENDENCIES}}
|
||||
// Microsoft Developer Studio generated include file.
|
||||
// Used by PlayWndASF.rc
|
||||
//
|
||||
#define IDI_PLAYWND 100
|
||||
#define IDR_MENU 101
|
||||
#define IDD_ABOUTBOX 200
|
||||
#define ID_FILE_OPENCLIP 40001
|
||||
#define ID_FILE_EXIT 40002
|
||||
#define ID_FILE_PAUSE 40003
|
||||
#define ID_FILE_STOP 40004
|
||||
#define ID_FILE_CLOSE 40005
|
||||
#define ID_FILE_MUTE 40006
|
||||
#define ID_FILE_FULLSCREEN 40007
|
||||
#define ID_FILE_SIZE_NORMAL 40008
|
||||
#define ID_FILE_SIZE_HALF 40009
|
||||
#define ID_FILE_SIZE_DOUBLE 40010
|
||||
#define ID_FILE_SIZE_QUARTER 40011
|
||||
#define ID_RENDERING_USENEWASFREADER 40011
|
||||
#define ID_FILE_SIZE_THREEQUARTER 40012
|
||||
#define ID_RENDERING_USELEGACYASFREADER 40013
|
||||
#define ID_HELP_ABOUT 40014
|
||||
#define ID_SINGLE_STEP 40015
|
||||
|
||||
// Next default values for new objects
|
||||
//
|
||||
#ifdef APSTUDIO_INVOKED
|
||||
#ifndef APSTUDIO_READONLY_SYMBOLS
|
||||
#define _APS_NO_MFC 1
|
||||
#define _APS_NEXT_RESOURCE_VALUE 101
|
||||
#define _APS_NEXT_COMMAND_VALUE 40015
|
||||
#define _APS_NEXT_CONTROL_VALUE 1000
|
||||
#define _APS_NEXT_SYMED_VALUE 101
|
||||
#endif
|
||||
#endif
|
||||
Reference in New Issue
Block a user