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:
File diff suppressed because it is too large
Load Diff
@@ -0,0 +1,115 @@
|
||||
// ---------------------------------------------------------------------------
|
||||
// File: CDVGraph.h
|
||||
//
|
||||
// Desc: CDVGraph Class declaration, it supports DV Graph Building
|
||||
// This is the base class to build all AVC graphs using
|
||||
// MSTape.sys
|
||||
//
|
||||
// Copyright (c) 2000-2001, Microsoft Corporation. All rights reserved.
|
||||
//----------------------------------------------------------------------------
|
||||
|
||||
#pragma once
|
||||
|
||||
#define SAFE_RELEASE(pObject) if(pObject){ pObject->Release(); pObject = NULL;}
|
||||
|
||||
#define DVENCODER_WIDTH 720
|
||||
#define PAL_DVENCODER_HEIGHT 576
|
||||
#define NTSC_DVENCODER_HEIGHT 480
|
||||
|
||||
|
||||
//track device mode or active
|
||||
enum DV_MODE
|
||||
{
|
||||
CameraMode = 0L,
|
||||
VcrMode = 1L,
|
||||
UnknownMode = 2L
|
||||
};
|
||||
|
||||
enum GRAPH_TYPE
|
||||
{
|
||||
GRAPH_PREVIEW,
|
||||
GRAPH_DV_TO_FILE,
|
||||
GRAPH_DV_TO_FILE_NOPRE,
|
||||
GRAPH_FILE_TO_DV,
|
||||
GRAPH_FILE_TO_DV_NOPRE,
|
||||
GRAPH_DV_TO_FILE_TYPE2,
|
||||
GRAPH_DV_TO_FILE_NOPRE_TYPE2,
|
||||
GRAPH_FILE_TO_DV_TYPE2,
|
||||
GRAPH_FILE_TO_DV_NOPRE_TYPE2
|
||||
};
|
||||
|
||||
class CDVGraph
|
||||
{
|
||||
public:
|
||||
|
||||
// variables
|
||||
// Basic DirectShow Interfaces needed for Graph Building
|
||||
IGraphBuilder *m_pGraph;
|
||||
ICaptureGraphBuilder2 *m_pCaptureGraphBuilder;
|
||||
|
||||
IMediaControl *m_pMediaControl;
|
||||
IMediaEventEx *m_pMediaEvent;
|
||||
IBaseFilter *m_pDeviceFilter;
|
||||
IBaseFilter *m_pInputFileFilter;
|
||||
|
||||
IVideoWindow *m_pVideoWindow;
|
||||
IAMDroppedFrames *m_pDroppedFrames;
|
||||
|
||||
IAMExtDevice *m_pIAMExtDevice;
|
||||
IAMExtTransport *m_pIAMExtTransport;
|
||||
IAMTimecodeReader *m_pIAMTCReader;
|
||||
|
||||
TCHAR m_DeviceName[_MAX_PATH];
|
||||
// State maintaining member variables
|
||||
DV_MODE m_SubunitMode; // vcr or camera
|
||||
_DVENCODERVIDEOFORMAT m_VideoFormat; //pal or ntsc
|
||||
LONG m_AvgTimePerFrame;
|
||||
_DVRESOLUTION m_DVResolution; // resolution of DV decoder
|
||||
GRAPH_TYPE m_iGraphType;
|
||||
|
||||
// member functions
|
||||
//constructor & destructor
|
||||
CDVGraph(void);
|
||||
~CDVGraph(void);
|
||||
|
||||
// Graph Building Helper Methods
|
||||
HRESULT BuildBasicGraph(void);
|
||||
HRESULT GetTapeInfo(void);
|
||||
HRESULT StopGraph(void);
|
||||
HRESULT PauseGraph(void);
|
||||
HRESULT StartGraph(void);
|
||||
|
||||
HRESULT MakePreviewGraph(void);
|
||||
|
||||
// Type 1 File (capture\playback\transmit)
|
||||
HRESULT MakeDvToFileGraph_Type1(TCHAR* OutputFileName);
|
||||
HRESULT MakeDvToFileGraph_NoPre_Type1(TCHAR* OutputFileName);
|
||||
HRESULT MakeFileToDvGraph_Type1(TCHAR* InputFileName);
|
||||
HRESULT MakeFileToDvGraph_NoPre_Type1(TCHAR* InputFileName);
|
||||
|
||||
// Type 2 File (capture\playback\transmit)
|
||||
HRESULT MakeDvToFileGraph_Type2(TCHAR* OutputFileName);
|
||||
HRESULT MakeDvToFileGraph_NoPre_Type2(TCHAR* OutputFileName);
|
||||
HRESULT MakeFileToDvGraph_Type2(TCHAR* InputFileName);
|
||||
HRESULT MakeFileToDvGraph_NoPre_Type2(TCHAR* InputFileName);
|
||||
|
||||
HRESULT getDroppedFrameNum(BOOL *bIsModeTransmit, long* pDropped, long* pNotdropped);
|
||||
HRESULT ChangeFrameRate( BOOL bHalfFrameRate );
|
||||
HRESULT GetVideoWindowDimensions(int *pWidth, int *pHeight, BOOL bChangeResolution,HWND hwndApp);
|
||||
HRESULT SeekATN(int iHr, int iMn, int iSc, int iFr);
|
||||
HRESULT GetDVMode(DV_MODE *pSubunitMode );
|
||||
HRESULT SaveGraphToFile(TCHAR* pFileName);
|
||||
HRESULT NukeFilters(IBaseFilter *pFilter, BOOL bNukeDownStream);
|
||||
|
||||
private:
|
||||
// variables
|
||||
|
||||
// member functions
|
||||
void FreeFilters();
|
||||
HRESULT InitializeGraph(void);
|
||||
HRESULT AddDeviceFilter(void);
|
||||
HRESULT GetResolutionFromDVDecoderPropertyPage(HWND hwndApp, BOOL bChangeResolution);
|
||||
HRESULT SetAviOptions(IBaseFilter *ppf, InterleavingMode INTERLEAVE_MODE);
|
||||
|
||||
};
|
||||
|
||||
Binary file not shown.
|
After Width: | Height: | Size: 2.2 KiB |
Binary file not shown.
|
After Width: | Height: | Size: 1.5 KiB |
@@ -0,0 +1,61 @@
|
||||
//------------------------------------------------------------------------------
|
||||
// File: DbgSup.h
|
||||
//
|
||||
// Desc: DirectShow sample code - DV control/capture example
|
||||
// Debug macros and supporting functions for Windows programs
|
||||
//
|
||||
// Copyright (c) 2000-2001 Microsoft Corporation. All rights reserved.
|
||||
//------------------------------------------------------------------------------
|
||||
|
||||
#ifdef _DEBUG
|
||||
|
||||
// dump a string to debug output
|
||||
#define Dump(tsz) \
|
||||
OutputDebugString(tsz)
|
||||
|
||||
// dump a string with a parameter value to debug output
|
||||
TCHAR dbgsup_tszDump[256];
|
||||
#define Dump1(tsz, arg) \
|
||||
{ wsprintf(dbgsup_tszDump, (tsz), (arg)); \
|
||||
OutputDebugString(dbgsup_tszDump); }
|
||||
|
||||
|
||||
#define CHECK_ERROR(tsz,hr) \
|
||||
{ if( S_OK != hr) \
|
||||
{ \
|
||||
wsprintf(dbgsup_tszDump, (tsz), (hr)); \
|
||||
OutputDebugString(dbgsup_tszDump); \
|
||||
return hr; \
|
||||
} \
|
||||
}
|
||||
|
||||
#ifndef DBGSUPAPI
|
||||
#define DBGSUPAPI __declspec(dllimport)
|
||||
#endif
|
||||
|
||||
// dump a Windows message to debug output
|
||||
DBGSUPAPI void DumpMsg(
|
||||
UINT msg,
|
||||
WPARAM wparam,
|
||||
LPARAM lparam);
|
||||
|
||||
|
||||
#include <assert.h>
|
||||
|
||||
// assert an expression
|
||||
#define Assert(exp) assert(exp)
|
||||
|
||||
#else
|
||||
|
||||
// do nothing in retail version
|
||||
#define Dump(sz)
|
||||
#define Dump1(sz, arg)
|
||||
#define DumpMsg(msg, wp, lp)
|
||||
#define Assert(exp)
|
||||
|
||||
#define CHECK_ERROR(tsz,hr) \
|
||||
{ if( S_OK != hr) \
|
||||
return hr; \
|
||||
}
|
||||
|
||||
#endif // _DEBUG
|
||||
1616
Library/dxx8/samples/Multimedia/DirectShow/Capture/DVApp/dvapp.cpp
Normal file
1616
Library/dxx8/samples/Multimedia/DirectShow/Capture/DVApp/dvapp.cpp
Normal file
File diff suppressed because it is too large
Load Diff
@@ -0,0 +1,136 @@
|
||||
# Microsoft Developer Studio Project File - Name="dvapp" - Package Owner=<4>
|
||||
# Microsoft Developer Studio Generated Build File, Format Version 6.00
|
||||
# ** DO NOT EDIT **
|
||||
|
||||
# TARGTYPE "Win32 (x86) Application" 0x0101
|
||||
|
||||
CFG=dvapp - 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 "dvapp.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 "dvapp.mak" CFG="dvapp - Win32 Debug"
|
||||
!MESSAGE
|
||||
!MESSAGE Possible choices for configuration are:
|
||||
!MESSAGE
|
||||
!MESSAGE "dvapp - Win32 Release" (based on "Win32 (x86) Application")
|
||||
!MESSAGE "dvapp - 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)" == "dvapp - 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 /Gi /GX /I "..\..\baseclasses" /I "..\..\..\..\..\include" /D "NDEBUG" /D "WIN32" /D "_WINDOWS" /D "_MBCS" /D WINVER=0x500 /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" /I "..\..\baseclasses"
|
||||
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 ..\..\baseclasses\release\strmbase.lib kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib comctl32.lib strmiids.lib quartz.lib winmm.lib msacm32.lib /nologo /subsystem:windows /machine:I386 /nodefaultlib:"libcmt"
|
||||
|
||||
!ELSEIF "$(CFG)" == "dvapp - 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 /Gi /GX /ZI /Od /I "..\..\baseclasses" /I "..\..\..\..\..\include" /D "_DEBUG" /D "DEBUG" /D "WIN32" /D "_WINDOWS" /D "_MBCS" /D WINVER=0x500 /YX /FD /GZ /c
|
||||
# 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" /I "..\..\baseclasses"
|
||||
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 ..\..\baseclasses\debug\strmbasd.lib msacm32.lib kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib comctl32.lib strmiids.lib quartz.lib winmm.lib /nologo /subsystem:windows /debug /machine:I386 /nodefaultlib:"libcmtd" /pdbtype:sept
|
||||
# SUBTRACT LINK32 /pdb:none
|
||||
|
||||
!ENDIF
|
||||
|
||||
# Begin Target
|
||||
|
||||
# Name "dvapp - Win32 Release"
|
||||
# Name "dvapp - Win32 Debug"
|
||||
# Begin Group "Source Files"
|
||||
|
||||
# PROP Default_Filter "cpp;c;cxx;rc;def;r;odl;idl;hpj;bat"
|
||||
# Begin Source File
|
||||
|
||||
SOURCE=.\CDVGraph.cpp
|
||||
# End Source File
|
||||
# Begin Source File
|
||||
|
||||
SOURCE=.\dvapp.cpp
|
||||
# End Source File
|
||||
# Begin Source File
|
||||
|
||||
SOURCE=.\dvapp.rc
|
||||
# End Source File
|
||||
# End Group
|
||||
# Begin Group "Header Files"
|
||||
|
||||
# PROP Default_Filter "h;hpp;hxx;hm;inl"
|
||||
# Begin Source File
|
||||
|
||||
SOURCE=.\CDVGraph.h
|
||||
# End Source File
|
||||
# Begin Source File
|
||||
|
||||
SOURCE=.\dbgsup.h
|
||||
# End Source File
|
||||
# Begin Source File
|
||||
|
||||
SOURCE=.\dvapp.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=.\DvApp.ico
|
||||
# End Source File
|
||||
# End Group
|
||||
# End Target
|
||||
# End Project
|
||||
@@ -0,0 +1,29 @@
|
||||
Microsoft Developer Studio Workspace File, Format Version 6.00
|
||||
# WARNING: DO NOT EDIT OR DELETE THIS WORKSPACE FILE!
|
||||
|
||||
###############################################################################
|
||||
|
||||
Project: "DVApp"=.\dvapp.dsp - Package Owner=<4>
|
||||
|
||||
Package=<5>
|
||||
{{{
|
||||
}}}
|
||||
|
||||
Package=<4>
|
||||
{{{
|
||||
}}}
|
||||
|
||||
###############################################################################
|
||||
|
||||
Global:
|
||||
|
||||
Package=<5>
|
||||
{{{
|
||||
}}}
|
||||
|
||||
Package=<3>
|
||||
{{{
|
||||
}}}
|
||||
|
||||
###############################################################################
|
||||
|
||||
@@ -0,0 +1,180 @@
|
||||
//------------------------------------------------------------------------------
|
||||
// File: DVApp.rc
|
||||
//
|
||||
// Desc: DirectShow sample code - DV control/capture example.
|
||||
//
|
||||
// Copyright (c) 1999-2001 Microsoft Corporation. All rights reserved.
|
||||
//------------------------------------------------------------------------------
|
||||
|
||||
#include <windows.h>
|
||||
#include <activex.ver>
|
||||
#include "resource.h"
|
||||
|
||||
|
||||
/////////////////////////////////////////////////////////////////////////////
|
||||
//
|
||||
// Icon
|
||||
//
|
||||
|
||||
// Icon with lowest ID value placed first to ensure application icon
|
||||
// remains consistent on all systems.
|
||||
DVICON ICON DISCARDABLE "DVApp.ico"
|
||||
|
||||
/////////////////////////////////////////////////////////////////////////////
|
||||
//
|
||||
// Menu
|
||||
//
|
||||
|
||||
IDR_MENU MENU DISCARDABLE
|
||||
BEGIN
|
||||
POPUP "&File"
|
||||
BEGIN
|
||||
MENUITEM "Set &Output File...", IDM_SETOUTPUT
|
||||
MENUITEM "Set &Input File...", IDM_SETINPUT
|
||||
MENUITEM "&Save Graph to File...", IDM_OPTIONS_SAVEGRAPH
|
||||
MENUITEM "&Capture Size...", IDM_CAPSIZE
|
||||
MENUITEM "E&xit", IDM_EXIT
|
||||
END
|
||||
|
||||
POPUP "Graph &Mode"
|
||||
BEGIN
|
||||
MENUITEM "&Preview", IDM_PREVIEW, CHECKED
|
||||
MENUITEM SEPARATOR
|
||||
MENUITEM "&DV To File (Type1)", IDM_DVTOFILE
|
||||
MENUITEM "DV To File (Type1) (&no preview)", IDM_DVTOFILE_NOPRE
|
||||
MENUITEM "&File (Type1) To DV", IDM_FILETODV
|
||||
MENUITEM "File (Type1) To DV (no &preview)", IDM_FILETODV_NOPRE
|
||||
MENUITEM SEPARATOR
|
||||
MENUITEM "D&V To File (Type2)", IDM_DVTOFILE_TYPE2
|
||||
MENUITEM "DV To File (Type2) (n&o preview)",
|
||||
IDM_DVTOFILE_NOPRE_TYPE2
|
||||
MENUITEM "File (&Type2) To DV", IDM_FILETODV_TYPE2
|
||||
MENUITEM "File (Type&2) To DV (no preview)",
|
||||
IDM_FILETODV_NOPRE_TYPE2
|
||||
END
|
||||
POPUP "&Options"
|
||||
BEGIN
|
||||
MENUITEM "&Refresh Mode", IDM_REFRESHMODE
|
||||
MENUITEM "&Check Tape", IDM_CHECKTAPE
|
||||
MENUITEM "Change &Decode Size...", IDM_DECODESIZE
|
||||
MENUITEM "&Half FrameRate", IDM_FRAMERATE
|
||||
END
|
||||
|
||||
POPUP "&Help"
|
||||
BEGIN
|
||||
MENUITEM "&About...", IDM_ABOUT
|
||||
END
|
||||
END
|
||||
|
||||
|
||||
/////////////////////////////////////////////////////////////////////////////
|
||||
//
|
||||
// Bitmap
|
||||
//
|
||||
|
||||
IDB_TOOLBAR BITMAP DISCARDABLE "TOOLBAR.BMP"
|
||||
|
||||
/////////////////////////////////////////////////////////////////////////////
|
||||
/////////////////////////////////////////////////////////////////////////////
|
||||
//
|
||||
// Dialog
|
||||
//
|
||||
|
||||
IDD_ABOUT DIALOG DISCARDABLE 10, 20, 167, 107
|
||||
STYLE DS_MODALFRAME | WS_POPUP | WS_VISIBLE | WS_CAPTION | WS_SYSMENU
|
||||
CAPTION "About DVApp..."
|
||||
FONT 8, "MS Shell Dlg"
|
||||
BEGIN
|
||||
CTEXT "Sample Digital Video Application",IDC_STATIC,10,29,146,
|
||||
8,NOT WS_GROUP
|
||||
LTEXT "Version",IDC_STATIC,66,53,26,8,NOT WS_GROUP
|
||||
LTEXT "8.1",IDC_STATIC,96,53,20,8,NOT WS_GROUP
|
||||
CTEXT "Free (retail) build",IDC_STATIC,10,65,146,8,NOT
|
||||
WS_GROUP
|
||||
CTEXT "Copyright <20> 2000-2001 Microsoft Corporation",IDC_STATIC,
|
||||
10,41,146,8,NOT WS_GROUP
|
||||
DEFPUSHBUTTON "OK",IDOK,70,84,32,14,WS_GROUP
|
||||
ICON "DVICON",IDC_STATIC,9,5,21,20
|
||||
CTEXT "DVApp",IDC_STATIC,43,11,79,8,NOT WS_GROUP
|
||||
END
|
||||
|
||||
IDD_DIALOG_CAPSIZE DIALOG DISCARDABLE 0, 0, 185, 105
|
||||
STYLE DS_MODALFRAME | WS_POPUP | WS_CAPTION | WS_SYSMENU
|
||||
CAPTION "Choose capture size"
|
||||
FONT 8, "MS Shell Dlg"
|
||||
BEGIN
|
||||
DEFPUSHBUTTON "OK",IDOK,124,10,50,14
|
||||
PUSHBUTTON "Cancel",IDCANCEL,124,27,50,14
|
||||
GROUPBOX "Size &options",IDC_STATIC,12,6,107,52
|
||||
CONTROL "Capture based on &time",IDC_RADIO_TIME,"Button",
|
||||
BS_AUTORADIOBUTTON,20,19,87,10
|
||||
CONTROL "Capture based on &size",IDC_RADIO_SIZE,"Button",
|
||||
BS_AUTORADIOBUTTON,20,31,86,10
|
||||
CONTROL "&No Limit",IDC_RADIO_NOLIMIT,"Button",
|
||||
BS_AUTORADIOBUTTON,20,43,79,10
|
||||
EDITTEXT IDC_EDIT_TIME,15,85,31,14,ES_NUMBER
|
||||
CONTROL "Spin2",IDC_SPIN_TIME,"msctls_updown32",UDS_SETBUDDYINT |
|
||||
UDS_ALIGNRIGHT | UDS_AUTOBUDDY | UDS_ARROWKEYS,47,85,10,
|
||||
14
|
||||
EDITTEXT IDC_EDIT_SIZE,67,85,40,14,ES_NUMBER
|
||||
CONTROL "Spin1",IDC_SPIN_SIZE,"msctls_updown32",UDS_SETBUDDYINT |
|
||||
UDS_ALIGNRIGHT | UDS_AUTOBUDDY | UDS_ARROWKEYS,108,85,10,
|
||||
14
|
||||
LTEXT "Capture time\n(seconds)",IDC_STATIC,14,66,49,17
|
||||
LTEXT "Capture size\n(MB)",IDC_STATIC,67,66,40,16
|
||||
END
|
||||
|
||||
IDD_DIALOG_CHOOSEMODE DIALOG DISCARDABLE 0, 0, 186, 74
|
||||
STYLE DS_MODALFRAME | WS_POPUP | WS_CAPTION | WS_SYSMENU
|
||||
CAPTION "Choose Camera Mode"
|
||||
FONT 8, "MS Shell Dlg"
|
||||
BEGIN
|
||||
LTEXT "The application cannot determine the playback mode of the DV camera. Please choose the correct mode below.",
|
||||
IDC_STATIC,7,10,172,30
|
||||
PUSHBUTTON "&Camera",IDC_BUTTON_CAMERA,30,46,50,14
|
||||
PUSHBUTTON "&VCR",IDC_BUTTON_VCR,104,46,50,14
|
||||
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", "DVApp Sample\0"
|
||||
VALUE "FileVersion", "8.10\0"
|
||||
VALUE "InternalName", "DVApp\0"
|
||||
VALUE "LegalCopyright", "Copyright (c) 2000-2001 Microsoft Corporation\0"
|
||||
VALUE "LegalTrademarks", "\0"
|
||||
VALUE "OriginalFilename", "DVApp.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
|
||||
@@ -0,0 +1,65 @@
|
||||
DirectShow Sample -- DVApp
|
||||
--------------------------
|
||||
|
||||
Digital Video (DV) capture application.
|
||||
|
||||
This sample demonstrates how to build various types of filter graphs for
|
||||
controlling DV camcorders. It also shows how to perform capture, preview,
|
||||
transmit, and device control with a DV camcorder.
|
||||
|
||||
User's Guide
|
||||
|
||||
The DVApp application supports the following modes:
|
||||
|
||||
- Preview: Renders DV from the camcorder to a video window.
|
||||
- DV to type-1 file: Captures DV data from the camcorder to a type-1 DV file.
|
||||
- Type-1 file to DV: Transmits data from a type-1 DV file to the camcorder.
|
||||
- DV to type-2 file: Captures DV data from the camcorder to a type-2 DV file.
|
||||
- Type-2 file to DV: Transmits data from a type-2 DV file to the camcorder.
|
||||
|
||||
The capture and transmit modes also perform preview. Each of those modes
|
||||
has a No Preview option as well, which disables preview. Capturing
|
||||
without preview is more efficient and can reduce the number of dropped frames.
|
||||
For information about type-1 files versus type-2 files, see
|
||||
"Digital Video in DirectShow".
|
||||
|
||||
The application starts in preview mode. To select another mode, choose a mode
|
||||
from the Graph Mode menu. For each mode, DVApp builds a filter graph that
|
||||
supports the functionality of that mode. To save the graph as a GraphEdit (.grf)
|
||||
file, select Save Graph to File from the File menu. Quit DVApp before opening
|
||||
the file in GraphEdit.
|
||||
|
||||
To capture to a file:
|
||||
|
||||
- From the Graph Mode menu, select a DV to File mode (type 1 or type 2,
|
||||
with or without preview).
|
||||
- From the File menu, choose Set Output File and enter a file name.
|
||||
- Click Record.
|
||||
- If the camcorder is in VTR mode, click Play.
|
||||
- To stop capturing, click Stop.
|
||||
|
||||
To transmit from a file to the camcorder:
|
||||
|
||||
- From the Graph Mode menu, select a File to DV mode (type 1 or type 2,
|
||||
with or without preview).
|
||||
- From the File menu, click Set Input File and select a DV file. The file
|
||||
must match the selected mode (type 1 or type 2).
|
||||
- Click Play.
|
||||
- To record the data to tape, click Record.
|
||||
- To stop transmitting, click Stop.
|
||||
|
||||
If the camcorder is in VTR mode, the user can control the transport mechanism
|
||||
through the application's VCR-style buttons. To seek the tape, enter the target
|
||||
timecode and click the seek button.
|
||||
|
||||
To limit how much data the application captures, choose Capture Size from the
|
||||
File menu.
|
||||
|
||||
To check the tape format (NTSC or PAL), choose Check Tape from the Options menu.
|
||||
|
||||
To change the size of the preview window, choose Change Decode Size from the
|
||||
Options menu.
|
||||
|
||||
|
||||
For more information about this sample, see the "Sample Capture Applications"
|
||||
section in the DirectShow section of the DirectX SDK documentation.
|
||||
@@ -0,0 +1,135 @@
|
||||
//------------------------------------------------------------------------------
|
||||
// File: Resource.h
|
||||
//
|
||||
// Desc: DirectShow sample code - DV control/capture example.
|
||||
//
|
||||
// Copyright (c) 1999-2001 Microsoft Corporation. All rights reserved.
|
||||
//------------------------------------------------------------------------------
|
||||
|
||||
#include <commctrl.h>
|
||||
|
||||
// resource.h
|
||||
|
||||
#define IDR_MENU 100
|
||||
|
||||
#define IDC_STATIC -1
|
||||
|
||||
|
||||
#define IDB_TOOLBAR 102
|
||||
#define IDB_STATUS 103
|
||||
#define ID_TOOLBAR 1
|
||||
|
||||
// menu
|
||||
|
||||
#define IDM_SEEKTIMECODE 1012
|
||||
#define IDM_SETOUTPUT 1020
|
||||
#define IDM_SETINPUT 1021
|
||||
#define IDM_CAPSIZE 1022
|
||||
#define IDM_EXIT 1023
|
||||
|
||||
#define IDM_PREVIEW 1030
|
||||
#define IDM_FILETODV 1031
|
||||
#define IDM_FILETODV_NOPRE 1032
|
||||
#define IDM_DVTOFILE 1033
|
||||
#define IDM_DVTOFILE_NOPRE 1034
|
||||
#define IDM_FILETODV_TYPE2 1035
|
||||
#define IDM_FILETODV_NOPRE_TYPE2 1036
|
||||
#define IDM_DVTOFILE_TYPE2 1037
|
||||
#define IDM_DVTOFILE_NOPRE_TYPE2 1038
|
||||
#define IDM_ABOUT 1039
|
||||
#define IDM_OPTIONS_SAVEGRAPH 1043
|
||||
|
||||
#define IDC_EDIT_HOUR 2000
|
||||
#define IDC_EDIT_MINUTE 2001
|
||||
#define IDC_EDIT_SECOND 2002
|
||||
#define IDC_EDIT_FRAME 2003
|
||||
#define IDC_TCCHECKBOX 2004
|
||||
|
||||
|
||||
#define IDC_RADIO_TIME 2010
|
||||
#define IDC_RADIO_SIZE 2011
|
||||
#define IDC_RADIO_NOLIMIT 2012
|
||||
#define IDC_EDIT_TIME 2013
|
||||
#define IDC_EDIT_SIZE 2014
|
||||
#define IDC_SPIN_SIZE 2015
|
||||
#define IDC_SPIN_TIME 2016
|
||||
#define IDC_BUTTON_CAMERA 2017
|
||||
#define IDC_BUTTON_VCR 2018
|
||||
|
||||
#define IDC_RADIO_88x60 3000
|
||||
#define IDC_RADIO_180x120 3001
|
||||
#define IDC_RADIO_360x240 3002
|
||||
#define IDC_RADIO_720x480 3003
|
||||
|
||||
|
||||
// toolbar
|
||||
#define IDM_STOP 1000
|
||||
#define IDM_PLAY 1001
|
||||
#define IDM_PAUSE 1002
|
||||
#define IDM_RECORD 1003
|
||||
#define IDM_FF 1004
|
||||
#define IDM_REW 1005
|
||||
#define IDM_PLAY_FAST_FF 1006
|
||||
#define IDM_PLAY_FAST_REV 1007
|
||||
|
||||
#define IDM_STEP_FWD 1010
|
||||
#define IDM_STEP_REV 1011
|
||||
|
||||
#define IDD_ABOUT 101
|
||||
#define IDD_DIALOG_CAPSIZE 104
|
||||
#define IDD_DIALOG_CHOOSEMODE 105
|
||||
#define IDD_DIALOG_DECODESIZE 106
|
||||
|
||||
#define IDM_CAPSIZE 1022
|
||||
#define IDM_REFRESHMODE 1042
|
||||
#define IDM_DECODESIZE 1040
|
||||
#define IDM_CHECKTAPE 1041
|
||||
#define IDM_FRAMERATE 1044
|
||||
|
||||
|
||||
#define DV_APPTITLE TEXT("Digital Video Sample Application")
|
||||
#define APPNAME TEXT("DV App")
|
||||
#define DEFAULT_CAP_FILE_NAME TEXT("c:\\DVApp.avi")
|
||||
#define DEFAULT_FG_FILE_NAME TEXT("c:\\DVApp.grf")
|
||||
#define _MAX_SLEEP 500
|
||||
|
||||
#define WM_FGNOTIFY WM_USER+1
|
||||
|
||||
|
||||
|
||||
// toolbar buttons
|
||||
|
||||
TBBUTTON g_rgTbButtons[] =
|
||||
{
|
||||
{0, 0, TBSTATE_ENABLED, TBSTYLE_SEP, 0,0},
|
||||
{8, IDM_STEP_REV, TBSTATE_ENABLED, TBSTYLE_BUTTON, 0,0},
|
||||
{5, IDM_REW, TBSTATE_ENABLED, TBSTYLE_BUTTON, 0,0},
|
||||
{9, IDM_PLAY_FAST_REV, TBSTATE_ENABLED, TBSTYLE_BUTTON, 0,0},
|
||||
{0, IDM_PLAY, TBSTATE_ENABLED, TBSTYLE_BUTTON, 0,0},
|
||||
{6, IDM_PLAY_FAST_FF, TBSTATE_ENABLED, TBSTYLE_BUTTON, 0,0},
|
||||
{4, IDM_FF, TBSTATE_ENABLED, TBSTYLE_BUTTON, 0,0},
|
||||
{7, IDM_STEP_FWD, TBSTATE_ENABLED, TBSTYLE_BUTTON, 0,0},
|
||||
{0, 0, TBSTATE_ENABLED, TBSTYLE_SEP, 0,0},
|
||||
{1, IDM_PAUSE, TBSTATE_ENABLED, TBSTYLE_BUTTON, 0,0},
|
||||
{2, IDM_STOP, TBSTATE_ENABLED, TBSTYLE_BUTTON, 0,0},
|
||||
{0, 0, TBSTATE_ENABLED, TBSTYLE_SEP, 0,0},
|
||||
{3, IDM_RECORD, TBSTATE_INDETERMINATE, TBSTYLE_BUTTON, 0,0},
|
||||
{0, 0, TBSTATE_ENABLED, TBSTYLE_SEP, 0,0},
|
||||
{0, 0, TBSTATE_ENABLED, TBSTYLE_SEP, 0,0},
|
||||
{0, 0, TBSTATE_ENABLED, TBSTYLE_SEP, 0,0},
|
||||
{0, 0, TBSTATE_ENABLED, TBSTYLE_SEP, 0,0},
|
||||
{10, IDM_SEEKTIMECODE, TBSTATE_ENABLED, TBSTYLE_BUTTON, 0,0}
|
||||
};
|
||||
|
||||
|
||||
// Timer IDs
|
||||
#define DV_TIMER_ATN 1L
|
||||
#define DV_TIMER_CAPLIMIT 2L
|
||||
#define DV_TIMER_FRAMES 3L
|
||||
|
||||
#define DV_TIMERFREQ 55 //milliseconds between timer ticks
|
||||
|
||||
#define DEFAULT_VIDEO_WIDTH 360
|
||||
#define DEFAULT_VIDEO_HEIGHT 240
|
||||
#define WIDTH_EDGE 5
|
||||
#define HEIGHT_EDGE 95
|
||||
Reference in New Issue
Block a user