Update recompile code base
This commit is contained in:
parent
d367252091
commit
bd69031a3d
|
@ -0,0 +1 @@
|
|||
SortIncludes: false
|
2
.clangd
2
.clangd
|
@ -1,3 +1,5 @@
|
|||
Diagnostics:
|
||||
UnusedIncludes: None
|
||||
CompileFlags:
|
||||
# CompilationDatabase: build\emscripten-mt\debug
|
||||
CompilationDatabase: build\clang-x86_64-pc-windows-msvc\debug
|
||||
|
|
|
@ -1,4 +1,11 @@
|
|||
{
|
||||
"search.exclude": {
|
||||
"**/node_modules": true,
|
||||
"**/bower_components": true,
|
||||
"**/*.code-search": true,
|
||||
"Rayman4Dev": true,
|
||||
"vbox": true,
|
||||
},
|
||||
// "java.jdt.ls.vmargs": "-XX:+UseParallelGC -XX:GCTimeRatio=4 -XX:AdaptiveSizePolicyWeight=90 -Dsun.zip.disableMemoryMapping=true -Xmx1G -Xms100m -Xlog:disable -jar C:\\Projects\\ghidra_11.1.2_PUBLIC\\Ghidra\\Features\\Base\\lib\\Base.jar"
|
||||
// "java.configuration.runtimes": [
|
||||
// {
|
||||
|
|
|
@ -0,0 +1,19 @@
|
|||
{
|
||||
"version": "2.0.0",
|
||||
"tasks": [
|
||||
{
|
||||
"type": "cmake",
|
||||
"label": "CMake: build",
|
||||
"command": "build",
|
||||
"targets": [
|
||||
"game_re"
|
||||
],
|
||||
"group": {
|
||||
"kind": "build",
|
||||
"isDefault": true
|
||||
},
|
||||
"problemMatcher": [],
|
||||
"detail": "CMake template build task"
|
||||
}
|
||||
]
|
||||
}
|
|
@ -2,7 +2,6 @@ cmake_minimum_required(VERSION 3.27.0)
|
|||
project(reman3)
|
||||
|
||||
add_subdirectory(game_re)
|
||||
add_subdirectory(reference_bin)
|
||||
|
||||
# Use highest possible C standard
|
||||
set_target_properties(game_re PROPERTIES C_STANDARD 23)
|
||||
|
|
|
@ -1,16 +1,29 @@
|
|||
add_subdirectory(third_party/spdlog)
|
||||
|
||||
add_executable(game_re
|
||||
main.cpp
|
||||
gh_global.cxx
|
||||
binders/gh_static_mem.cxx)
|
||||
|
||||
target_include_directories(game_re PRIVATE ${CMAKE_CURRENT_SOURCE_DIR}/binders)
|
||||
target_include_directories(game_re PRIVATE
|
||||
${CMAKE_CURRENT_SOURCE_DIR}
|
||||
${CMAKE_CURRENT_SOURCE_DIR}/binders)
|
||||
|
||||
if(WIN32)
|
||||
target_link_directories(game_re PRIVATE ${CMAKE_CURRENT_SOURCE_DIR}/third_party/mssdk/lib)
|
||||
target_include_directories(game_re SYSTEM AFTER PRIVATE ${CMAKE_CURRENT_SOURCE_DIR}/third_party/mssdk/include)
|
||||
target_link_libraries(game_re PRIVATE
|
||||
d3d8
|
||||
dinput8
|
||||
)
|
||||
endif()
|
||||
|
||||
# target_compile_options(game_re PRIVATE "-H")
|
||||
target_link_libraries(game_re PRIVATE spdlog)
|
||||
|
||||
file(GLOB GH_AUTO_SOURCES ${CMAKE_CURRENT_SOURCE_DIR}/gh_auto/*.cxx)
|
||||
file(GLOB GH_FIX_SOURCES ${CMAKE_CURRENT_SOURCE_DIR}/gh_fix/*.cxx)
|
||||
|
||||
target_sources(game_re PRIVATE
|
||||
)
|
||||
|
||||
target_sources(game_re PRIVATE
|
||||
${GH_AUTO_SOURCES}
|
||||
${GH_FIX_SOURCES}
|
||||
|
|
|
@ -0,0 +1,9 @@
|
|||
#ifndef B8D59B54_1674_4C0F_AA2C_611385FF5D03
|
||||
#define B8D59B54_1674_4C0F_AA2C_611385FF5D03
|
||||
|
||||
#include "gh_base.h"
|
||||
#include "gh_static_mem.h"
|
||||
#include "gh_structs.h"
|
||||
#include "gh_global.h"
|
||||
|
||||
#endif /* B8D59B54_1674_4C0F_AA2C_611385FF5D03 */
|
|
@ -1,8 +1,11 @@
|
|||
#ifndef DF40ED2B_5659_43AA_8A22_499A89C4BD62
|
||||
#define DF40ED2B_5659_43AA_8A22_499A89C4BD62
|
||||
|
||||
// Header file that is automatically included in all generated code
|
||||
|
||||
#include "gh_types.h"
|
||||
#include "gh_static_mem.h"
|
||||
#include "../gh_global.h"
|
||||
|
||||
|
||||
#endif /* DF40ED2B_5659_43AA_8A22_499A89C4BD62 */
|
||||
|
|
|
@ -1,19 +1,18 @@
|
|||
#ifndef A523F6DB_0645_4DEB_8AEB_3792CB732B49
|
||||
#define A523F6DB_0645_4DEB_8AEB_3792CB732B49
|
||||
|
||||
// Header included in all decompiled files to fix some common recompilation issues
|
||||
#include <stdint.h>
|
||||
#include <Windows.h>
|
||||
#include <stdint.h>
|
||||
#include <stdio.h>
|
||||
|
||||
// Fallback to int if type is not annotated
|
||||
typedef int64_t undefined;
|
||||
// typedef int64_t undefined;
|
||||
typedef uint32_t undefined4;
|
||||
typedef uint16_t undefined2;
|
||||
typedef unsigned char byte;
|
||||
typedef byte undefined1;
|
||||
typedef uint64_t uint;
|
||||
typedef void* pointer;
|
||||
// typedef uint64_t uint;
|
||||
typedef void *pointer;
|
||||
typedef char *TerminatedCString;
|
||||
typedef char *string;
|
||||
|
|
@ -0,0 +1,8 @@
|
|||
#ifndef EDBE48FC_B879_4985_9274_B7ACF24AD024
|
||||
#define EDBE48FC_B879_4985_9274_B7ACF24AD024
|
||||
|
||||
#include "gh_base.h"
|
||||
#include "gh_structs.h"
|
||||
#include "gh_static_mem.h"
|
||||
|
||||
#endif /* EDBE48FC_B879_4985_9274_B7ACF24AD024 */
|
|
@ -1,3 +1,13 @@
|
|||
#include "gh_static_mem.h"
|
||||
#include <spdlog/spdlog.h>
|
||||
|
||||
unsigned char gh_static_mem[GH_STATIC_MEM_SIZE];
|
||||
unsigned char gh_static_mem[GH_DATA_SIZE];
|
||||
void gh_init_data_segment() {
|
||||
SPDLOG_INFO("Initializing data segment");
|
||||
FILE *f = fopen("gh_datasegment.bin", "r");
|
||||
if (!f) {
|
||||
throw std::runtime_error("Failed to open gh_datasegment.bin");
|
||||
}
|
||||
fread(gh_static_mem, 1, gh_data_size, f);
|
||||
fclose(f);
|
||||
}
|
|
@ -1,12 +1,22 @@
|
|||
#ifndef A18E3E17_2A80_4DBD_96CD_1CE0120A164E
|
||||
#define A18E3E17_2A80_4DBD_96CD_1CE0120A164E
|
||||
|
||||
#define GH_STATIC_MEM_START 0x005b6400
|
||||
#define GH_STATIC_MEM_END 0x00843fff
|
||||
#define GH_STATIC_MEM_SIZE (GH_STATIC_MEM_END - GH_STATIC_MEM_START)
|
||||
#include "../gh_datasegment.h"
|
||||
#include <stdexcept>
|
||||
|
||||
extern unsigned char gh_static_mem[GH_STATIC_MEM_SIZE];
|
||||
extern unsigned char gh_static_mem[GH_DATA_SIZE];
|
||||
|
||||
#define GH_STATIC(addr) (*(unsigned char *)(gh_static_mem + (addr - GH_STATIC_MEM_START)))
|
||||
template <size_t addr> inline constexpr void checkMappedMemory() {
|
||||
static_assert(addr >= GH_DATA_START, "Address outside lower bound");
|
||||
static_assert(addr < GH_DATA_END, "Address outside upper bound");
|
||||
}
|
||||
inline uint8_t *memoryMapSafe(size_t addr) {
|
||||
if (addr < GH_DATA_START || addr > GH_DATA_END) {
|
||||
throw std::runtime_error("Address out of bounds");
|
||||
}
|
||||
return (uint8_t *)(gh_static_mem + (addr - GH_DATA_START));
|
||||
}
|
||||
|
||||
#define GH_MEM(addr) (checkMappedMemory<addr>(), *memoryMapSafe(addr))
|
||||
|
||||
#endif /* A18E3E17_2A80_4DBD_96CD_1CE0120A164E */
|
||||
|
|
|
@ -0,0 +1,6 @@
|
|||
#ifndef F3E71404_380C_4417_8642_0AA89E12BE28
|
||||
#define F3E71404_380C_4417_8642_0AA89E12BE28
|
||||
|
||||
#include "gh_base.h"
|
||||
|
||||
#endif /* F3E71404_380C_4417_8642_0AA89E12BE28 */
|
|
@ -1,5 +1,5 @@
|
|||
0055164b // FUN_0055164b
|
||||
00404e5b // FUN_00404e5b
|
||||
00404e5b // _lseek
|
||||
00403a5a // FUN_00403a5a
|
||||
00550643 // __frnd
|
||||
00407853 // FUN_00407853
|
||||
|
@ -14,7 +14,7 @@
|
|||
0054d26e // __fassign
|
||||
00404073 // crt_0
|
||||
00407672 // FUN_00407672
|
||||
00407870 // FUN_00407870
|
||||
00407870 // memcpy
|
||||
00405270 // __aulldiv
|
||||
0040926d // FUN_0040926d
|
||||
00409e6d // FUN_00409e6d
|
||||
|
@ -27,10 +27,9 @@
|
|||
0040a011 // FUN_0040a011
|
||||
00552c04 // FUN_00552c04
|
||||
00407e10 // FUN_00407e10
|
||||
0040280d // FUN_0040280d
|
||||
0040280d // doexit
|
||||
0040880c // FUN_0040880c
|
||||
00404a0a // __abnormal_termination
|
||||
00402c08 // FUN_00402c08
|
||||
00551e13 // FUN_00551e13
|
||||
00551810 // FUN_00551810
|
||||
00551e16 // FUN_00551e16
|
||||
|
@ -54,9 +53,9 @@
|
|||
00409c23 // FUN_00409c23
|
||||
00405a21 // leaveAllocCriticalSection
|
||||
0054d4cb // FUN_0054d4cb
|
||||
00403ade // FUN_00403ade
|
||||
00403ade // _close
|
||||
00404cce // __nh_malloc
|
||||
00404ece // FUN_00404ece
|
||||
00404ece // _write
|
||||
004076ce // FUN_004076ce
|
||||
005506d8 // FUN_005506d8
|
||||
004040cb // crt_main1?
|
||||
|
@ -83,14 +82,13 @@
|
|||
0054ee83 // FUN_0054ee83
|
||||
00551286 // FUN_00551286
|
||||
00402c92 // FUN_00402c92
|
||||
00402a90 // _strrchr
|
||||
00402a90 // strrchr
|
||||
00405490 // FUN_00405490
|
||||
0055149a // FUN_0055149a
|
||||
0040668d // FUN_0040668d
|
||||
0054f097 // __trandisp2
|
||||
00403a81 // FUN_00403a81
|
||||
0051e090 // RtlUnwind
|
||||
004046bf // crt_mainTls?
|
||||
00404cbc // _malloc
|
||||
004028bb // FUN_004028bb
|
||||
00408abb // FUN_00408abb
|
||||
|
@ -103,7 +101,7 @@
|
|||
004096a0 // __allmul
|
||||
00550b4b // __math_exit
|
||||
00551149 // FUN_00551149
|
||||
00406d5a // FUN_00406d5a
|
||||
00406d5a // _dosmaperr
|
||||
00409559 // FUN_00409559
|
||||
00551d43 // FUN_00551d43
|
||||
0054af41 // crt_set_cfltcvt_etc
|
||||
|
@ -130,15 +128,15 @@
|
|||
00408f01 // FUN_00408f01
|
||||
0055032a // FUN_0055032a
|
||||
0054cf20 // _longjmp
|
||||
00404f33 // FUN_00404f33
|
||||
00404f33 // _write
|
||||
00404b30 // FUN_00404b30
|
||||
00405130 // _strlen
|
||||
00408b30 // _strcmp
|
||||
00404726 // initStaticUnk0
|
||||
00404726 // crt_init_errno
|
||||
005505c9 // FUN_005505c9
|
||||
0054d3cf // FUN_0054d3cf
|
||||
005517cd // FUN_005517cd
|
||||
00406dd6 // getFileTruncateStaticUnk1
|
||||
00406dd6 // crt_get_doserrno
|
||||
0051e7c7 // `vector_constructor_iterator'
|
||||
00551bc0 // __allshl
|
||||
0054b3c0 // __alldiv
|
||||
|
@ -146,13 +144,13 @@
|
|||
004067d1 // FUN_004067d1
|
||||
004043d1 // crt_setupEnv
|
||||
00407dd0 // _strncmp
|
||||
00406dcd // getFileTruncateStaticUnk0
|
||||
00406dcd // crt_get_errno
|
||||
005507d9 // FUN_005507d9
|
||||
004095c8 // FUN_004095c8
|
||||
00408fc5 // FUN_00408fc5
|
||||
005525d1 // ___add_12
|
||||
00404dc0 // FUN_00404dc0
|
||||
00406ffd // FUN_00406ffd
|
||||
00406ffd // _get_osfhandle
|
||||
004027fc // __exit
|
||||
004029fb // __fclose_lk
|
||||
0054efee // __fload
|
||||
|
@ -162,7 +160,7 @@
|
|||
004027eb // crt_postMain0
|
||||
004061eb // FUN_004061eb
|
||||
0054edfe // __cintrindisp1
|
||||
004085e8 // FUN_004085e8
|
||||
004085e8 // __crtLCMapStringA
|
||||
00402be4 // crt_exitWithFailure
|
||||
0054ddf0 // __CallSettingFrame@12
|
||||
0054b388 // _rand
|
||||
|
@ -180,11 +178,10 @@
|
|||
00551597 // FUN_00551597
|
||||
00408980 // FUN_00408980
|
||||
00402bbf // __amsg_exit
|
||||
004027be // c_static_init
|
||||
00407bbc // FUN_00407bbc
|
||||
00409fbb // FUN_00409fbb
|
||||
0054d5af // FUN_0054d5af
|
||||
00403bba // FUN_00403bba
|
||||
00403bba // _flush
|
||||
004047ba // FUN_004047ba
|
||||
0054d1ae // crt_unk?
|
||||
00405bb9 // FUN_00405bb9
|
||||
|
@ -200,3 +197,8 @@
|
|||
004049a2 // __local_unwind2
|
||||
005517b7 // FUN_005517b7
|
||||
004053a0 // FUN_004053a0
|
||||
004029ca // fclose
|
||||
004029b2 // _execv
|
||||
00402a78 // fopen
|
||||
00408d30 // strcmp
|
||||
0054c925 // _chdir
|
Binary file not shown.
|
@ -0,0 +1,11 @@
|
|||
// AUTO-GENERATED FILE, DO NOT MODIFY!!!!!
|
||||
// Use 'Export Data' script to export the data segment
|
||||
#pragma once
|
||||
#include <cstddef>
|
||||
|
||||
#define GH_DATA_START 0x00597000
|
||||
#define GH_DATA_END 0x00843fff
|
||||
#define GH_DATA_SIZE (GH_DATA_END - GH_DATA_START)
|
||||
constexpr size_t gh_data_start = 0x00597000;
|
||||
constexpr size_t gh_data_end = 0x00843fff;
|
||||
constexpr size_t gh_data_size = gh_data_end - gh_data_start;
|
|
@ -1,62 +1,93 @@
|
|||
// AUTO-GENERATED FILE
|
||||
#include <gh_auto_shared.h>
|
||||
#include "gh_structs.h"
|
||||
undefined UNK_0077d5ed {}; // 0077d5ed
|
||||
undefined DAT_0077d5ec {}; // 0077d5ec
|
||||
undefined lpString_0077d3c0 {}; // 0077d3c0
|
||||
const char* s_CompleteInstall_005b6854 = "CompleteInstall"; // 005b6854
|
||||
undefined lpchText_0077d5e0 {}; // 0077d5e0
|
||||
undefined4 DAT_0077d0b4 {}; // 0077d0b4
|
||||
const char* s_Italian_005b6730 = "Italian"; // 005b6730
|
||||
#include <gh_global_binder.h>
|
||||
undefined s_QUITTER_005b67fc= (undefined&) GH_MEM(0x005b67fc);
|
||||
undefined DAT_0077d5ec= (undefined&) GH_MEM(0x0077d5ec);
|
||||
undefined s_USCIRE_005b66ec= (undefined&) GH_MEM(0x005b66ec);
|
||||
const char* g_windowTitle = "Rayman III"; // 005b6830
|
||||
uint DAT_0077d0a8= (uint&) GH_MEM(0x0077d0a8);
|
||||
const char* s_ou_appuyez_sur_Echap_pour_quitte_005b67d0 = "ou appuyez sur Echap pour quitter Rayman 3."; // 005b67d0
|
||||
const char* s_Gli_Mode_005b6414 = "Gli_Mode"; // 005b6414
|
||||
undefined lpString_0077d2c0 {}; // 0077d2c0
|
||||
char UNK_0077d5f1 {}; // 0077d5f1
|
||||
char DAT_0077d5f2 {}; // 0077d5f2
|
||||
undefined DAT_0077d5f0 {}; // 0077d5f0
|
||||
HANDLE DAT_0077d4c8 {}; // 0077d4c8
|
||||
const char* s_Spanish_005b67a0 = "Spanish"; // 005b67a0
|
||||
undefined lpString_0077d1c0 {}; // 0077d1c0
|
||||
HWND DAT_0077d4c4 {}; // 0077d4c4
|
||||
undefined DAT_005b683c {}; // 005b683c
|
||||
char DAT_005b6628 {}; // 005b6628
|
||||
HINSTANCE DAT_0077d4c0 {}; // 0077d4c0
|
||||
const char* s_SOFTWARE_UBI_SOFT_RAYMAN_3_005b6864 = "SOFTWARE\\UBI SOFT\\RAYMAN 3"; // 005b6864
|
||||
undefined2 DAT_007825c0= (undefined2&) GH_MEM(0x007825c0);
|
||||
char DAT_0077d5f2= (char&) GH_MEM(0x0077d5f2);
|
||||
undefined DAT_0077d5f0= (undefined&) GH_MEM(0x0077d5f0);
|
||||
const char* lpText_005b64f0 = "Controlla la tua versione di DirectX. necessaria la versione 8.1 o superiore."; // 005b64f0
|
||||
const char* s_Ripristino_dati____005b66cc = "Ripristino dati..."; // 005b66cc
|
||||
const char* s__s___Pausa_005b66e0 = "%s - Pausa"; // 005b66e0
|
||||
const char* s_CompleteInstall_005b6854 = "CompleteInstall"; // 005b6854
|
||||
const char* s_Unable_to_find_R3_Setup_DX8_exe__005b6880 = "Unable to find R3_Setup_DX8.exe. Please reinstall the game."; // 005b6880
|
||||
const char* s_or_press_ESC_to_quit_Rayman_3__005b662c = "or press ESC to quit Rayman 3."; // 005b662c
|
||||
undefined1 lpchText_0077d5e0= (undefined1&) GH_MEM(0x0077d5e0);
|
||||
const char* s_UbiSoft_Ubi_ini = "/UbiSoft/Ubi.ini"; // 005b690c
|
||||
const char* lpText_005b6540 = "Comprueba tu versin de DirectX. Se necesita la versin 8.1 o superior."; // 005b6540
|
||||
const char* s_None = "None"; // 005b6904
|
||||
const char* s_Rayman_3_Error_005b68bc = "Rayman 3 Error"; // 005b68bc
|
||||
uint DAT_0077d0a8 {}; // 0077d0a8
|
||||
undefined4 DAT_005b6624 {}; // 005b6624
|
||||
const char* s_Erreur_Rayman_3_005b65e4 = "Erreur Rayman 3 "; // 005b65e4
|
||||
undefined2 DAT_005b6684 {}; // 005b6684
|
||||
undefined2 DAT_007825c0 {}; // 007825c0
|
||||
undefined UNK_0077d5e9 {}; // 0077d5e9
|
||||
const char* fopen_mode_r_binary = "rb"; // 005b68cc
|
||||
undefined DAT_0077d5e8= (undefined&) GH_MEM(0x0077d5e8);
|
||||
undefined DAT_0077d5e4= (undefined&) GH_MEM(0x0077d5e4);
|
||||
const char* s_Adapter_005b68e4 = "Adapter"; // 005b68e4
|
||||
const char* s_French_005b6828 = "French"; // 005b6828
|
||||
undefined UNK_0077d5e5 {}; // 0077d5e5
|
||||
undefined DAT_0077d5e8 {}; // 0077d5e8
|
||||
const char* s_DRAWSEM_005b6608 = "DRAWSEM"; // 005b6608
|
||||
undefined UNK_0077d5e1 {}; // 0077d5e1
|
||||
undefined DAT_0077d5e4 {}; // 0077d5e4
|
||||
r3_main_data r3_main_data_005d28b6 {}; // 005d28b6
|
||||
const char* s_Identifier_005b6420 = "Identifier"; // 005b6420
|
||||
long lpDefault_005cf96c {}; // 005cf96c
|
||||
HANDLE DAT_0077d0bc {}; // 0077d0bc
|
||||
undefined lpName_0077d0c0 {}; // 0077d0c0
|
||||
const char* s_English_005b684c = "English"; // 005b684c
|
||||
pointer PTR_DAT_005b6410 {}; // 005b6410
|
||||
undefined s_USCIRE_005b66ec {}; // 005b66ec
|
||||
undefined DAT_0077d4e0 {}; // 0077d4e0
|
||||
const char* s_Rayman_3_005b6588 = "Rayman 3"; // 005b6588
|
||||
const char* s_Directory_005b68f8 = "Directory"; // 005b68f8
|
||||
const char* s_Italian_005b6730 = "Italian"; // 005b6730
|
||||
undefined DAT_0077d4e0= (undefined&) GH_MEM(0x0077d4e0);
|
||||
undefined DAT_00782608= (undefined&) GH_MEM(0x00782608);
|
||||
char DAT_00782606= (char&) GH_MEM(0x00782606);
|
||||
const char* s__s___Restablecer_datos____005b6784 = "%s - Restablecer datos..."; // 005b6784
|
||||
const char* s_Restoring_data_____005b6610 = "Restoring data ..."; // 005b6610
|
||||
undefined DAT_00782604= (undefined&) GH_MEM(0x00782604);
|
||||
const char* s_Identifier_005b6420 = "Identifier"; // 005b6420
|
||||
undefined DAT_00782600= (undefined&) GH_MEM(0x00782600);
|
||||
const char* lpText_005b6598 = "V←rifiez votre version de DirectX. La version 8.1 minimum est n←cessaire."; // 005b6598
|
||||
const char* s_French_005b6828 = "French"; // 005b6828
|
||||
undefined s_BEENDIGEN_005b6678= (undefined&) GH_MEM(0x005b6678);
|
||||
undefined DAT_005b683c= (undefined&) GH_MEM(0x005b683c);
|
||||
const char* s_DRAWSEM_005b6608 = "DRAWSEM"; // 005b6608
|
||||
undefined UNK_0077d5ed= (undefined&) GH_MEM(0x0077d5ed);
|
||||
const char* s__s_not_initialized__005b63e0 = "%s not initialized."; // 005b63e0
|
||||
pointer PTR_DAT_005b6410= (pointer&) GH_MEM(0x005b6410);
|
||||
const char* s_Restauration_fmt = "%s - Restauration des donn←es..."; // 005b6804
|
||||
const char* s__s___Rotura_005b6750 = "%s - Rotura"; // 005b6750
|
||||
const char* s_Please_run_the__s_setup__005b63f4 = "Please run the %s setup."; // 005b63f4
|
||||
const char* s__s___Pause_005b67c4 = "%s - Pause"; // 005b67c4
|
||||
const char* lpAppName_005b68f0 = "Rayman3"; // 005b68f0
|
||||
uint DAT_007d9cc4= (uint&) GH_MEM(0x007d9cc4);
|
||||
char UNK_0077d5f1= (char&) GH_MEM(0x0077d5f1);
|
||||
const char* s_Language_005b6840 = "Language"; // 005b6840
|
||||
HANDLE DAT_0077d4c8= (HANDLE&) GH_MEM(0x0077d4c8);
|
||||
const char* fopen_mode_r_text = "rt"; // 005b68ec
|
||||
HWND DAT_0077d4c4= (HWND&) GH_MEM(0x0077d4c4);
|
||||
HINSTANCE DAT_0077d4c0= (HINSTANCE&) GH_MEM(0x0077d4c0);
|
||||
const char* s_Gli_Mode_005b6414 = "Gli_Mode"; // 005b6414
|
||||
HANDLE DAT_0077d0bc= (HANDLE&) GH_MEM(0x0077d0bc);
|
||||
undefined UNK_0077d5e9= (undefined&) GH_MEM(0x0077d5e9);
|
||||
undefined lpName_0077d0c0= (undefined&) GH_MEM(0x0077d0c0);
|
||||
r3_main_data r3_main_data_005d28b6= (r3_main_data&) GH_MEM(0x005d28b6);
|
||||
undefined UNK_0077d5e5= (undefined&) GH_MEM(0x0077d5e5);
|
||||
const char* s_Restauration = "Restauration des donn←es..."; // 005b67a8
|
||||
const char* s__s___Daten_Reparatur____005b66ac = "%s - Daten-Reparatur..."; // 005b66ac
|
||||
undefined s_SALIR_005b675c= (undefined&) GH_MEM(0x005b675c);
|
||||
undefined UNK_0077d5e1= (undefined&) GH_MEM(0x0077d5e1);
|
||||
const char* s_Daten_Reparatur____005b6664 = "Daten-Reparatur..."; // 005b6664
|
||||
const char* lpText_005b6478 = "ᅵberprfen Sie, welche DirectX-Version auf Ihrem PC derzeit installiert ist. Sie bentigen DirectX 8.1 oder hher."; // 005b6478
|
||||
const char* s__s___Restoring_data____005b664c = "%s - Restoring data..."; // 005b664c
|
||||
const char* s_Pulsa_ESC_para_salir_Rayman_3__005b6764 = "Pulsa ESC para salir Rayman 3."; // 005b6764
|
||||
char UNK_00782609= (char&) GH_MEM(0x00782609);
|
||||
undefined UNK_00782605= (undefined&) GH_MEM(0x00782605);
|
||||
const char* s_dpnhpast_dll_005b65f8 = "dpnhpast.dll"; // 005b65f8
|
||||
const char* s__s___Ripristino_dati____005b6718 = "%s - Ripristino dati..."; // 005b6718
|
||||
undefined UNK_00782601= (undefined&) GH_MEM(0x00782601);
|
||||
undefined lpString_0077d3c0= (undefined&) GH_MEM(0x0077d3c0);
|
||||
const char* s_Erreur_Rayman_3_005b65e4 = "Erreur Rayman 3 "; // 005b65e4
|
||||
const char* s_Rayman_3_005b6588 = "Rayman 3"; // 005b6588
|
||||
undefined lpString_0077d2c0= (undefined&) GH_MEM(0x0077d2c0);
|
||||
const char* s_German_005b66c4 = "German"; // 005b66c4
|
||||
char UNK_00782609 {}; // 00782609
|
||||
undefined DAT_00782608 {}; // 00782608
|
||||
undefined UNK_00782605 {}; // 00782605
|
||||
char DAT_00782606 {}; // 00782606
|
||||
undefined s_SALIR_005b675c {}; // 005b675c
|
||||
uint DAT_007d9cc4 {}; // 007d9cc4
|
||||
undefined s_BEENDIGEN_005b6678 {}; // 005b6678
|
||||
undefined DAT_00782604 {}; // 00782604
|
||||
undefined lpString_0077d1c0= (undefined&) GH_MEM(0x0077d1c0);
|
||||
char DAT_005b6628= (char&) GH_MEM(0x005b6628);
|
||||
const char* s_Spanish_005b67a0 = "Spanish"; // 005b67a0
|
||||
undefined4 DAT_005b6624= (undefined4&) GH_MEM(0x005b6624);
|
||||
const char* s__R3_Setup_DX8_exe_005b68d0 = "\\R3_Setup_DX8.exe"; // 005b68d0
|
||||
undefined4 DAT_0077d0b4= (undefined4&) GH_MEM(0x0077d0b4);
|
||||
undefined2 DAT_005b6684= (undefined2&) GH_MEM(0x005b6684);
|
||||
const char* s_Premi_ESC_per_uscire_da_Rayman_3_005b66f4 = "Premi ESC per uscire da Rayman 3."; // 005b66f4
|
||||
undefined UNK_00782601 {}; // 00782601
|
||||
undefined DAT_00782600 {}; // 00782600
|
||||
undefined s_QUITTER_005b67fc {}; // 005b67fc
|
||||
long lpDefault_005cf96c= (long&) GH_MEM(0x005cf96c);
|
||||
const char* s_Restablecer_datos____005b6738 = "Restablecer datos..."; // 005b6738
|
||||
const char* s_Check_your_version_of_DirectX__V_005b6430 = "Check your version of DirectX. Version 8.1 or higher is required."; // 005b6430
|
||||
const char* s_Directory_005b68f8 = "Directory"; // 005b68f8
|
||||
|
|
|
@ -2,67 +2,98 @@
|
|||
#ifndef GH_GENERATED_GLOBALS_H
|
||||
#define GH_GENERATED_GLOBALS_H
|
||||
|
||||
#include <gh_auto_shared.h>
|
||||
#include "gh_structs.h"
|
||||
#include <gh_global_binder.h>
|
||||
|
||||
|
||||
extern undefined UNK_0077d5ed; // 0077d5ed
|
||||
extern undefined DAT_0077d5ec; // 0077d5ec
|
||||
extern undefined lpString_0077d3c0; // 0077d3c0
|
||||
extern const char* s_CompleteInstall_005b6854; // 005b6854
|
||||
extern undefined lpchText_0077d5e0; // 0077d5e0
|
||||
extern undefined4 DAT_0077d0b4; // 0077d0b4
|
||||
extern const char* s_Italian_005b6730; // 005b6730
|
||||
extern undefined& s_QUITTER_005b67fc; // 005b67fc
|
||||
extern undefined& DAT_0077d5ec; // 0077d5ec
|
||||
extern undefined& s_USCIRE_005b66ec; // 005b66ec
|
||||
extern const char* g_windowTitle; // 005b6830
|
||||
extern uint& DAT_0077d0a8; // 0077d0a8
|
||||
extern const char* s_ou_appuyez_sur_Echap_pour_quitte_005b67d0; // 005b67d0
|
||||
extern const char* s_Gli_Mode_005b6414; // 005b6414
|
||||
extern undefined lpString_0077d2c0; // 0077d2c0
|
||||
extern char UNK_0077d5f1; // 0077d5f1
|
||||
extern char DAT_0077d5f2; // 0077d5f2
|
||||
extern undefined DAT_0077d5f0; // 0077d5f0
|
||||
extern HANDLE DAT_0077d4c8; // 0077d4c8
|
||||
extern const char* s_Spanish_005b67a0; // 005b67a0
|
||||
extern undefined lpString_0077d1c0; // 0077d1c0
|
||||
extern HWND DAT_0077d4c4; // 0077d4c4
|
||||
extern undefined DAT_005b683c; // 005b683c
|
||||
extern char DAT_005b6628; // 005b6628
|
||||
extern HINSTANCE DAT_0077d4c0; // 0077d4c0
|
||||
extern const char* s_SOFTWARE_UBI_SOFT_RAYMAN_3_005b6864; // 005b6864
|
||||
extern undefined2& DAT_007825c0; // 007825c0
|
||||
extern char& DAT_0077d5f2; // 0077d5f2
|
||||
extern undefined& DAT_0077d5f0; // 0077d5f0
|
||||
extern const char* lpText_005b64f0; // 005b64f0
|
||||
extern const char* s_Ripristino_dati____005b66cc; // 005b66cc
|
||||
extern const char* s__s___Pausa_005b66e0; // 005b66e0
|
||||
extern const char* s_CompleteInstall_005b6854; // 005b6854
|
||||
extern const char* s_Unable_to_find_R3_Setup_DX8_exe__005b6880; // 005b6880
|
||||
extern const char* s_or_press_ESC_to_quit_Rayman_3__005b662c; // 005b662c
|
||||
extern undefined1& lpchText_0077d5e0; // 0077d5e0
|
||||
extern const char* s_UbiSoft_Ubi_ini; // 005b690c
|
||||
extern const char* lpText_005b6540; // 005b6540
|
||||
extern const char* s_None; // 005b6904
|
||||
extern const char* s_Rayman_3_Error_005b68bc; // 005b68bc
|
||||
extern uint DAT_0077d0a8; // 0077d0a8
|
||||
extern undefined4 DAT_005b6624; // 005b6624
|
||||
extern const char* s_Erreur_Rayman_3_005b65e4; // 005b65e4
|
||||
extern undefined2 DAT_005b6684; // 005b6684
|
||||
extern undefined2 DAT_007825c0; // 007825c0
|
||||
extern undefined UNK_0077d5e9; // 0077d5e9
|
||||
extern const char* fopen_mode_r_binary; // 005b68cc
|
||||
extern undefined& DAT_0077d5e8; // 0077d5e8
|
||||
extern undefined& DAT_0077d5e4; // 0077d5e4
|
||||
extern const char* s_Adapter_005b68e4; // 005b68e4
|
||||
extern const char* s_French_005b6828; // 005b6828
|
||||
extern undefined UNK_0077d5e5; // 0077d5e5
|
||||
extern undefined DAT_0077d5e8; // 0077d5e8
|
||||
extern const char* s_DRAWSEM_005b6608; // 005b6608
|
||||
extern undefined UNK_0077d5e1; // 0077d5e1
|
||||
extern undefined DAT_0077d5e4; // 0077d5e4
|
||||
extern r3_main_data r3_main_data_005d28b6; // 005d28b6
|
||||
extern const char* s_Identifier_005b6420; // 005b6420
|
||||
extern long lpDefault_005cf96c; // 005cf96c
|
||||
extern HANDLE DAT_0077d0bc; // 0077d0bc
|
||||
extern undefined lpName_0077d0c0; // 0077d0c0
|
||||
extern const char* s_English_005b684c; // 005b684c
|
||||
extern pointer PTR_DAT_005b6410; // 005b6410
|
||||
extern undefined s_USCIRE_005b66ec; // 005b66ec
|
||||
extern undefined DAT_0077d4e0; // 0077d4e0
|
||||
extern const char* s_Rayman_3_005b6588; // 005b6588
|
||||
extern const char* s_Directory_005b68f8; // 005b68f8
|
||||
extern const char* s_Italian_005b6730; // 005b6730
|
||||
extern undefined& DAT_0077d4e0; // 0077d4e0
|
||||
extern undefined& DAT_00782608; // 00782608
|
||||
extern char& DAT_00782606; // 00782606
|
||||
extern const char* s__s___Restablecer_datos____005b6784; // 005b6784
|
||||
extern const char* s_Restoring_data_____005b6610; // 005b6610
|
||||
extern undefined& DAT_00782604; // 00782604
|
||||
extern const char* s_Identifier_005b6420; // 005b6420
|
||||
extern undefined& DAT_00782600; // 00782600
|
||||
extern const char* lpText_005b6598; // 005b6598
|
||||
extern const char* s_French_005b6828; // 005b6828
|
||||
extern undefined& s_BEENDIGEN_005b6678; // 005b6678
|
||||
extern undefined& DAT_005b683c; // 005b683c
|
||||
extern const char* s_DRAWSEM_005b6608; // 005b6608
|
||||
extern undefined& UNK_0077d5ed; // 0077d5ed
|
||||
extern const char* s__s_not_initialized__005b63e0; // 005b63e0
|
||||
extern pointer& PTR_DAT_005b6410; // 005b6410
|
||||
extern const char* s_Restauration_fmt; // 005b6804
|
||||
extern const char* s__s___Rotura_005b6750; // 005b6750
|
||||
extern const char* s_Please_run_the__s_setup__005b63f4; // 005b63f4
|
||||
extern const char* s__s___Pause_005b67c4; // 005b67c4
|
||||
extern const char* lpAppName_005b68f0; // 005b68f0
|
||||
extern uint& DAT_007d9cc4; // 007d9cc4
|
||||
extern char& UNK_0077d5f1; // 0077d5f1
|
||||
extern const char* s_Language_005b6840; // 005b6840
|
||||
extern HANDLE& DAT_0077d4c8; // 0077d4c8
|
||||
extern const char* fopen_mode_r_text; // 005b68ec
|
||||
extern HWND& DAT_0077d4c4; // 0077d4c4
|
||||
extern HINSTANCE& DAT_0077d4c0; // 0077d4c0
|
||||
extern const char* s_Gli_Mode_005b6414; // 005b6414
|
||||
extern HANDLE& DAT_0077d0bc; // 0077d0bc
|
||||
extern undefined& UNK_0077d5e9; // 0077d5e9
|
||||
extern undefined& lpName_0077d0c0; // 0077d0c0
|
||||
extern r3_main_data& r3_main_data_005d28b6; // 005d28b6
|
||||
extern undefined& UNK_0077d5e5; // 0077d5e5
|
||||
extern const char* s_Restauration; // 005b67a8
|
||||
extern const char* s__s___Daten_Reparatur____005b66ac; // 005b66ac
|
||||
extern undefined& s_SALIR_005b675c; // 005b675c
|
||||
extern undefined& UNK_0077d5e1; // 0077d5e1
|
||||
extern const char* s_Daten_Reparatur____005b6664; // 005b6664
|
||||
extern const char* lpText_005b6478; // 005b6478
|
||||
extern const char* s__s___Restoring_data____005b664c; // 005b664c
|
||||
extern const char* s_Pulsa_ESC_para_salir_Rayman_3__005b6764; // 005b6764
|
||||
extern char& UNK_00782609; // 00782609
|
||||
extern undefined& UNK_00782605; // 00782605
|
||||
extern const char* s_dpnhpast_dll_005b65f8; // 005b65f8
|
||||
extern const char* s__s___Ripristino_dati____005b6718; // 005b6718
|
||||
extern undefined& UNK_00782601; // 00782601
|
||||
extern undefined& lpString_0077d3c0; // 0077d3c0
|
||||
extern const char* s_Erreur_Rayman_3_005b65e4; // 005b65e4
|
||||
extern const char* s_Rayman_3_005b6588; // 005b6588
|
||||
extern undefined& lpString_0077d2c0; // 0077d2c0
|
||||
extern const char* s_German_005b66c4; // 005b66c4
|
||||
extern char UNK_00782609; // 00782609
|
||||
extern undefined DAT_00782608; // 00782608
|
||||
extern undefined UNK_00782605; // 00782605
|
||||
extern char DAT_00782606; // 00782606
|
||||
extern undefined s_SALIR_005b675c; // 005b675c
|
||||
extern uint DAT_007d9cc4; // 007d9cc4
|
||||
extern undefined s_BEENDIGEN_005b6678; // 005b6678
|
||||
extern undefined DAT_00782604; // 00782604
|
||||
extern undefined& lpString_0077d1c0; // 0077d1c0
|
||||
extern char& DAT_005b6628; // 005b6628
|
||||
extern const char* s_Spanish_005b67a0; // 005b67a0
|
||||
extern undefined4& DAT_005b6624; // 005b6624
|
||||
extern const char* s__R3_Setup_DX8_exe_005b68d0; // 005b68d0
|
||||
extern undefined4& DAT_0077d0b4; // 0077d0b4
|
||||
extern undefined2& DAT_005b6684; // 005b6684
|
||||
extern const char* s_Premi_ESC_per_uscire_da_Rayman_3_005b66f4; // 005b66f4
|
||||
extern undefined UNK_00782601; // 00782601
|
||||
extern undefined DAT_00782600; // 00782600
|
||||
extern undefined s_QUITTER_005b67fc; // 005b67fc
|
||||
extern long& lpDefault_005cf96c; // 005cf96c
|
||||
extern const char* s_Restablecer_datos____005b6738; // 005b6738
|
||||
extern const char* s_Check_your_version_of_DirectX__V_005b6430; // 005b6430
|
||||
extern const char* s_Directory_005b68f8; // 005b68f8
|
||||
#endif // GH_GENERATED_GLOBALS_H
|
||||
|
|
1024
game_re/gh_structs.h
1024
game_re/gh_structs.h
File diff suppressed because it is too large
Load Diff
|
@ -1,8 +1,18 @@
|
|||
#include <windows.h>
|
||||
#include <spdlog/spdlog.h>
|
||||
#include <stdexcept>
|
||||
#include <stdio.h>
|
||||
|
||||
int r3_main(HINSTANCE hInstance, HINSTANCE hPrevInstance, LPSTR *cmdline,
|
||||
int showCmd);
|
||||
|
||||
extern void gh_init_data_segment();
|
||||
int main() {
|
||||
r3_main(GetModuleHandle(NULL), NULL, NULL, SW_SHOW);
|
||||
try {
|
||||
gh_init_data_segment();
|
||||
r3_main(GetModuleHandle(NULL), NULL, NULL, SW_SHOW);
|
||||
} catch (const std::exception &e) {
|
||||
SPDLOG_ERROR("Unhandled exception: {}", e.what());
|
||||
}
|
||||
return 0;
|
||||
}
|
|
@ -0,0 +1,979 @@
|
|||
|
||||
Microsoft® DirectX® 8.0 SDK
|
||||
|
||||
This CD is the Microsoft DirectX 8.0 Software Development Kit (SDK).
|
||||
It contains all DirectX software required to create DirectX 8.0
|
||||
compliant applications. Parts of this SDK will also be made
|
||||
available for download at the Microsoft DirectX developer web page
|
||||
(http://msdn.microsoft.com/directx).
|
||||
|
||||
Major components include: DirectX 8.0 system components (runtimes);
|
||||
DirectX 8.0 Application Programing Interface (API) Documentation for
|
||||
each of the DirectX core areas (written for C++ or Visual Basic
|
||||
developers); DirectX 8.0 headers & libraries; Sample applications
|
||||
and source code; miscellaneous tools and utilities.
|
||||
|
||||
After installing, those new to DirectX should start with the
|
||||
DirectX 8.0 documentation. More seasoned developers may also want
|
||||
to view the "WHAT'S NEW" section. Professional DirectX developers
|
||||
should refer to the "KNOWN ISSUES" section prior to raising concerns.
|
||||
|
||||
__________________________________________________________________
|
||||
|
||||
|
||||
Contents:
|
||||
|
||||
- INSTALLATION
|
||||
- WHAT'S NEW
|
||||
- CD LAYOUT
|
||||
- DIRECTX 8.0 SDK RELEASE NOTES AND KNOWN ISSUES
|
||||
- COMPILER SUPPORT
|
||||
|
||||
__________________________________________________________________
|
||||
|
||||
|
||||
INSTALLATION:
|
||||
|
||||
|
||||
ALWAYS UNINSTALL PREVIOUS RELEASES of the DirectX SDK prior to
|
||||
installing DirectX 8.0 SDK Release (see UnInstall). The directory
|
||||
structure and file names have changed significantly. Installing on
|
||||
top of a previous installation will cause you problems.
|
||||
|
||||
On Windows 2000 systems, you must be logged in as administrator to
|
||||
install the DirectX 8.0 runtimes.
|
||||
|
||||
If you install the BDA cab, the DirectX 8.0 setup program requires
|
||||
that you restart your system.
|
||||
|
||||
UnInstall:
|
||||
|
||||
To uninstall, use "Add/Remove Programs" from the Control Panel to
|
||||
uninstall the InstallShield installations.
|
||||
|
||||
__________________________________________________________________
|
||||
|
||||
|
||||
WHAT'S NEW:
|
||||
|
||||
|
||||
DirectX Audio (DirectSound & DirectMusic)
|
||||
=========================================
|
||||
|
||||
DirectX 8.0 audio covers both DirectSound and DirectMusic API's. In
|
||||
DirectX 8.0, these API's are more closely aligned and tied together.
|
||||
|
||||
There are many new features. They include:
|
||||
|
||||
Effects processing on DirectSound Buffers
|
||||
DLS2 synthesis
|
||||
Arbitrary loop points
|
||||
Release waveforms
|
||||
Optional Filter per voice
|
||||
6-stage envelope
|
||||
Ramped volume scaling
|
||||
Time-stamped playback
|
||||
"Audiopaths": a powerful and easy way to use the DirectMusic DLS2 synthesizer
|
||||
for sound effects programming.
|
||||
Submixing of audio prior to 3D processing (by DLS2 synthesizer)
|
||||
Automatic streaming and ACM compression (ADPCM, etc.)
|
||||
Composition enhancements
|
||||
Audio Scripting
|
||||
|
||||
We also think you will want to look at using the DLS2 synthesizer as your
|
||||
main sound effects engine. The DLS2 synthesizer is accessed primarily through
|
||||
the DirectMusic API's. Please do not let the word, "Music" mislead you; the
|
||||
DirectX 8.0 DirectMusic API's have been enhanced *specifically* for sound effects
|
||||
playback. The new DirectMusic API's that are designed to support sound effects
|
||||
refer to audiopaths. Please investigate audiopaths; they provide a lot of
|
||||
cool features for sound effects. For example, if you have multiple sounds
|
||||
that need to come from the same 3d location, you can pre-mix them (using Audiopaths)
|
||||
and use only one 3d hardware buffer to play them.
|
||||
|
||||
Parameter Validation:
|
||||
DirectSound in particular has some greater parameter validation in place
|
||||
when the DirectSound8 interfaces are used.
|
||||
|
||||
-Waveformats are more tightly parsed
|
||||
-You can no longer create a DirectSoundBuffer with both CTRL_3D and CTRL_PAN set
|
||||
-You can no longer create a DirectSoundBuffer with CTRL_3D set and a wave format
|
||||
with more than 1 channel. I.e. Only mono buffers may be created with CTRL_3D.
|
||||
|
||||
Scripting is very exciting. It puts much of the control over the audio
|
||||
implementation of the game into the hands of the sound designer. Using
|
||||
scripts, audio designers can change implementations, make the music 'magically'
|
||||
interactive, and play different sound effects based on in-game variables.
|
||||
It also drastically shortens the edit-integrate-listen cycle. This should
|
||||
result in improved sound effects and music, with much less game-programmer
|
||||
time required.
|
||||
|
||||
There are sections in the documentation on a new FullDuplex interface and
|
||||
"Capture effects." These interfaces are not currently supported.
|
||||
|
||||
If you are using DirectPlayVoice, you should use those interfaces. If your
|
||||
application requires audio capture outside of DirectPlayVoice,
|
||||
you should use the existing DirectSoundCapture interfaces.
|
||||
|
||||
|
||||
Direct3D
|
||||
========
|
||||
|
||||
Migration of DirectDraw into Direct3D:
|
||||
|
||||
In DirectX 8.0, DirectDraw® is fully integrated into Microsoft Direct3D
|
||||
to enable drastically simplified application initialization, improved data
|
||||
allocation and management performance, and reduced memory footprint.
|
||||
The new Direct3D infrastructure provides the services that are called
|
||||
at relatively low frequency. These services comprise:
|
||||
|
||||
- Creation of Direct3D
|
||||
- Creation of resources (textures, vertex buffers etc)
|
||||
- Display mode selection
|
||||
- Presentation of rendered images to the display
|
||||
|
||||
New Graphics Features for DirectX 8.0 are:
|
||||
|
||||
Parallel vertex input streams for more flexible mapping to dynamic
|
||||
application data structures. Programmable vertex processing language
|
||||
enables programmers to write hardware shaders for:
|
||||
|
||||
- Morphing/tweening animation
|
||||
- Matrix palette skinning
|
||||
- User-defined lighting models
|
||||
- General environment mapping
|
||||
- Procedural geometry
|
||||
- Any other developer-defined algorithm
|
||||
|
||||
Programmable Pixel processing language enables programmers to write
|
||||
hardware shaders for:
|
||||
|
||||
- Per-pixel lighting/bump mapping
|
||||
- Per-pixel environment mapping
|
||||
- Any other developer-defined algorithm
|
||||
|
||||
MultiSample Rendering support enables:
|
||||
|
||||
- Full-scene antialiasing
|
||||
- Multisample effects such as motion blur, depth-of-field, etc.
|
||||
|
||||
Point Sprites enable:
|
||||
|
||||
- High-performance rendering of particle systems
|
||||
|
||||
3-D Volume textures enable:
|
||||
|
||||
- Range-attenuation in per-pixel lighting
|
||||
- Volume atmospheric effects
|
||||
- Easy texturing of very complex geometry
|
||||
|
||||
Higher-Order Primitive Support:
|
||||
|
||||
- For enhancing the appearance of 3-D content
|
||||
- Facilitating mapping of content from major 3-D authoring tools
|
||||
|
||||
Higher-Level Technologies:
|
||||
|
||||
- 3-D content creation tool plugins for export into Direct3D of skinned
|
||||
meshes using a variety of Direct3D techniques such as, multi-resolution
|
||||
LOD geometry, and higher order surface data.
|
||||
|
||||
Direct3D Feature Notes:
|
||||
|
||||
No significant API changes are contemplated beyond this point.
|
||||
All implemented features have been tested individually
|
||||
to some extent, but they have not been tested in exhaustive combinations
|
||||
yet. Many features in DirectX 8.0 are awaiting new hardware, however
|
||||
there is at least one implementation available for each of the features
|
||||
shipped:
|
||||
|
||||
- Programmable vertex shaders are supported on the host CPU. On CPUs they
|
||||
will operate with performance comparable to HW implementations and can be
|
||||
used immediately for DirectX 8.0 prototyping and development.
|
||||
- Programmable pixel shaders are supported on the host CPU using refrast
|
||||
only. These can be used for prototyping DirectX 8.0 shaders for use when
|
||||
hardware ships.
|
||||
- Parallel DMA data input is supported on refrast and the SW geometry pipeline.
|
||||
- Point Sprites are supported in refrast, software T&L pipeline, and should
|
||||
be supported in a prototype DirectX 8.0 driver from at least one hardware
|
||||
manufacturer.
|
||||
- Volume Textures are supported in refrast.
|
||||
- Multisample rendering is supported in refrast and future hardware.
|
||||
- Higher-Order Primitives are supported in refrast and via D3DX utilities.
|
||||
|
||||
D3DX
|
||||
====
|
||||
|
||||
Debug Binaries for D3DX:
|
||||
|
||||
The D3DX library is a static library. However, to help debugging, we also
|
||||
have a debug only dynamic library of D3DX in DirectX 8.0. To use this, link
|
||||
with the d3dx8d.lib which is an import lib corresponding to the D3DX8D.DLL.
|
||||
If you are reporting a bug and sending Microsoft an example that reproduces
|
||||
that behavior, please make sure the executable is linked to the dynamic debug
|
||||
library.
|
||||
|
||||
The dynamic debug d3dx8 library is for debugging only and is not intended
|
||||
for use of shipping applications. D3DX8D.DLL is installed as part of the
|
||||
DirectX 8.0 SDK setup, not as part of the redistributable runtime setup.
|
||||
This will not be available as part of future operating systems.
|
||||
|
||||
If apps want to statically link to the debug d3dx8 library they need to
|
||||
link to d3dx8dt.lib. To statically link to a retail d3dx8 library please
|
||||
link to d3dx8.lib.
|
||||
|
||||
The D3DX Effect Framework
|
||||
|
||||
The D3DX effect framework allows you to define shading effects using a text
|
||||
file that describes the various techniques of implementing an effect. For
|
||||
an example of an effect file see water.sha in the C samples media directory.
|
||||
|
||||
|
||||
DirectInput
|
||||
===========
|
||||
|
||||
DirectInput for DirectX 8.0 features a major addition, the DirectInput
|
||||
Mapper. The Mapper makes it possible for applications to code to their
|
||||
in-game actions, without the effort of figuring out the actions represented
|
||||
on the device itself. Additionally, the Mapper makes user configuration
|
||||
of devices much simpler by offering a default configuration UI.
|
||||
|
||||
DIPROP_KEYNAME is supported by the IDirectInputDevice8::GetProperty
|
||||
method. DIPROP_KEYNAME retrieves the localized key name, in the form
|
||||
of a DIPROPSTRING, from a DirectInput DIK_* value.
|
||||
|
||||
DIPROP_SCANCODE is supported by the IDirectInputDevice8::GetProperty
|
||||
method. DIPROP_KEYNAME retrieves the device scancode, in the form of a
|
||||
DIPROPDWORD, from a DirectInput DIK_* value.
|
||||
|
||||
|
||||
DirectPlay
|
||||
==========
|
||||
|
||||
DirectPlay has been completely rewritten in DirectX 8.0 to provide the
|
||||
robust scalability required to build high performance, massively
|
||||
scaleable network games. With version 8.0, DirectPlay also provides
|
||||
voice communication via the DirectPlay Voice API.
|
||||
|
||||
Note: In these release notes the phrases "DirectPlay4", "DirectPlay4
|
||||
interface" or "DirectPlay4 session" are used to mean the IDirectPlay4
|
||||
interface or a session hosted using the IDirectPlay4 interface, even
|
||||
if that interface or session is implemented using the dlls that are
|
||||
part of DirectX 8.0. "DirectPlay8", "DirectPlay8 interface", and
|
||||
"DirectPlay8 session" mean the IDirectPlay8... family of interfaces,
|
||||
or a session hosted using the IDirectPlay8... family of interfaces.
|
||||
|
||||
Since DirectPlay8 has been completely re-written from the ground up,
|
||||
the DirectPlay8 interfaces are not extensions of the existing
|
||||
DirectPlay4 interfaces. i.e. the DirectPlay8 interfaces do not
|
||||
inherit from the DirectPlay4 interfaces in the object oriented sense.
|
||||
|
||||
Also, DirectPlay8 sessions are not network compatible with DirectPlay4
|
||||
sessions.
|
||||
|
||||
Note that the DirectPlay4 interfaces are still present in DirectPlay8
|
||||
and are still compatible with previous versions of DirectPlay. So games
|
||||
written for DirectPlay4 will still run on systems with DirectX 8.0
|
||||
installed.
|
||||
|
||||
To enable maximum scalability, DirectPlay8 uses a callback model. All
|
||||
indications from DirectPlay8 are delivered to the application via an
|
||||
application supplied callback function. Therefore DirectPlay can indicate
|
||||
multiple events to the application in parallel on different threads.
|
||||
|
||||
Additionally, performance critical operations such as Send and Receive
|
||||
can be performed without copying data, and without thread switching.
|
||||
|
||||
This programming model allows DirectPlay applications to achieve maximum
|
||||
possible performance and scalability on both single-processor and
|
||||
multi-processor hardware.
|
||||
|
||||
DirectPlay8 also adds:
|
||||
- Better support for NATs, Firewalls, and Proxy Servers
|
||||
- Application defined payloads on session enumerations and replies
|
||||
- Revised addressing scheme that is URL ruled based designed to be human
|
||||
readable and portable
|
||||
- The use of I/O completion ports in Windows 2000
|
||||
- Improved ease of use through the removal of obtuse services, for example
|
||||
groups within groups
|
||||
|
||||
The DirectPlay Voice interfaces allow you to quickly and easily establish
|
||||
voice communications over an existing DirectPlay8 or DirectPlay4 session.
|
||||
|
||||
DirectPlay Voice provides the following features:
|
||||
- Peer to peer, forwarding server, and mixing server voice topologies
|
||||
- A variety of codecs from 1.2kbit/sec to 64kbit/sec, that can be used
|
||||
royalty free in DirectPlay Voice.
|
||||
- Voice detection to automatically trigger voice transmission
|
||||
- Automatic gain control to automatically adjust the recording volume level
|
||||
- Adaptive queuing that provides a smooth speech stream with minimum latency
|
||||
over different and changing network conditions
|
||||
- Integration with DirectSound & DirectSoundCapture
|
||||
- Sound Hardware Test wizard
|
||||
- Support for IDirectPlay8 and IDirectPlay4 transport sessions
|
||||
|
||||
DirectPlay8 still has all the benefits of previous versions of DirectPlay,
|
||||
including:
|
||||
- session setup and teardown
|
||||
- session discovery
|
||||
- application launching
|
||||
- player management
|
||||
- group management
|
||||
- client/server and peer to peer operation
|
||||
- peer to peer host migration
|
||||
- bandwidth throttling protocol
|
||||
|
||||
|
||||
DirectShow
|
||||
==========
|
||||
|
||||
DirectX 8.0 marks the first release that DirectShow has been part of the
|
||||
core DirectX redistribution. This means that for the first time,
|
||||
applications using DirectShow need not install a separate redist, and
|
||||
current DirectX users can now take advantage of DirectShow in their
|
||||
applications. Adding to the existing capabilities for audio and video
|
||||
playback and capture that DirectShow provided, this new release also
|
||||
provides the following new features:
|
||||
|
||||
Windows Media Format Support: Two new filters enable DirectShow applications
|
||||
to read and write files in Windows Media Format. The ASF Reader filter
|
||||
reads and parses Windows Media Format files. The ASF File Writer filter
|
||||
writes Windows Media Format files; it also does the necessary multiplexing
|
||||
and compressing.
|
||||
|
||||
DirectShow Editing Services (DES): This is a complete API for timeline and
|
||||
switching services built on top of DirectShow. This API implements the
|
||||
core of non-linear editing services, and allows for the creation of
|
||||
composite media from a variable number of source audio and video streams.
|
||||
By allowing real-time effects and transitions, true "on-the-fly" source
|
||||
switching, run-time compositing, run-time seeking, and graph management,
|
||||
DES provides a powerful high-level way to use DirectShow, while
|
||||
still allowing applications to access lower-level DirectShow functions.
|
||||
DES replaces cutlists, which are no longer supported.
|
||||
|
||||
New DVD Support: Two new interfaces, IDVDControl2 and IDVDInfo2, greatly expand
|
||||
the functionality of the DVD Navigator. The new MSWebDVD ActiveX® control
|
||||
makes this functionality available to script-based applications.
|
||||
New DVD features include: Karaoke multichannel audio support, audio volume
|
||||
control through IBasicAudio, support for frame stepping and frame-accurate
|
||||
seeking, simplified access to DVD text information strings, and improved support
|
||||
for parental management controls.
|
||||
|
||||
DirectX Media Objects: DirectX Media Objects (DMOs) are a new way to write
|
||||
data-streaming components. Like DirectShow filters, DMOs take input data and use
|
||||
it to produce output data. However, the application programming interfaces
|
||||
(APIs) for DMOs are much simpler than the corresponding APIs for DirectShow. As
|
||||
a result, DMOs are easier to create, test, and use than DirectShow filters.
|
||||
A wrapper filter is provided to allow DMOs to be used within DirectShow.
|
||||
|
||||
Media Parameters: Media parameters are a new set of APIs that support run-time
|
||||
changes to an object's properties. They offer precise control over properties
|
||||
that change rapidly and require both high performance and repeatability. They
|
||||
enable a property to follow an exact curve, such as a sine wave or
|
||||
inverse-square curve, in real time.
|
||||
|
||||
New Filters:
|
||||
- MJPEG Decompressor: Decodes a video stream from motion JPEG to uncompressed video
|
||||
- MJPEG Compressor: Compresses an uncompressed video stream using
|
||||
motion JPEG compression.
|
||||
- Null Renderer: Discards samples without displaying or rendering the sample data.
|
||||
Applications can use this filter to discard data from a stream.
|
||||
- Sample Grabber: Retrieves media samples as they move through the filter graph.
|
||||
Applications can use this filter to obtain poster frames or other media data.
|
||||
|
||||
Dynamic Graph Building: DirectShow applications can now change the graph
|
||||
while it is still playing. This allows new audio or video streams to be added
|
||||
to a graph, effects to be inserted in the graph without any visible gap in the
|
||||
playback, and chains of filters to be paused and run independent of the main graph.
|
||||
|
||||
Push Model Clock Support: This allows for improved synchronization between
|
||||
audio and video streams. The default audio renderer can now be slaved to
|
||||
another clock, allowing for applications to deal with timing differences
|
||||
between clocks on sound cards and capture devices, among other scenarios.
|
||||
|
||||
Graph Edit enhancements: GraphEdit now displays filter registration information
|
||||
in the Insert Filters dialog and allows you to spy on existing graphs in
|
||||
external processes (if those processes register their graphs).
|
||||
|
||||
|
||||
DirectMusic Producer
|
||||
====================
|
||||
|
||||
This version of Producer features many new features to aid in both
|
||||
authoring and auditioning of DirectMusic content. These features include
|
||||
authoring support for audio path configurations, which manages pchannel
|
||||
and synth assignments as well as effects routing, the new DLS level 2
|
||||
format (which includes stereo waves, layering of regions, and filtering)
|
||||
and a new API for scripting, which allows composers and sound designers
|
||||
to integrate audio content directly into an application. Other major
|
||||
features include new track types, including a wave track, a script
|
||||
track, a secondary segment trigger track and a melody track, which
|
||||
integrates a variable approach with greater control of form.
|
||||
|
||||
|
||||
DirectX Control Panel
|
||||
=====================
|
||||
Developers can now toggle between DirectX retail and debug system components
|
||||
through the DirectX Control Panel.
|
||||
|
||||
|
||||
Broadcast Driver Architecture
|
||||
======================
|
||||
|
||||
Broadcast Driver Architecture (BDA) is a set of Ring 0 and Ring 3 software
|
||||
components based on the DirectShow® architecture for streaming multimedia
|
||||
broadcast content. BDA is also a specification that defines how custom
|
||||
components, such as filters for parsing private data, interface with the
|
||||
rest of the system. Digital-TV applications can use the Ring 3 components
|
||||
to build filter graphs, implement a single model for tuning across all
|
||||
network types, automate the storage and retrieval of electronic program
|
||||
guide information, and capture IP data including ATVEF announcements,
|
||||
triggers, and packages.
|
||||
|
||||
__________________________________________________________________
|
||||
|
||||
|
||||
CD LAYOUT:
|
||||
|
||||
|
||||
The following is a brief description of the directories found with a complete
|
||||
DirectX 8.0 SDK download. Depending on options specified during
|
||||
installation, some of these directories can be installed on your hard drive.
|
||||
|
||||
\Bin
|
||||
High level DirectX applications & tools.
|
||||
All can be accessed from the Start menu if "Utilities" are installed.
|
||||
|
||||
Note: Japanese systems will require Internet Explorer 5.0 (IE5) for
|
||||
the DirectX Control Panel to display properly. IE5 can be found at
|
||||
http://www.microsoft.com/windows/ie/default.htm.
|
||||
|
||||
|
||||
\Doc
|
||||
Contains reference documentation for the DirectX 8.0 APIs.
|
||||
This Documentation must be viewed with Windows HTMLHelp.
|
||||
|
||||
Note: The HTMLHelp viewer requires a minimum installation of
|
||||
Internet Explorer 5.0 (IE5). IE5 can be found at
|
||||
http://www.microsoft.com/windows/ie/default.htm.
|
||||
|
||||
\Essentls
|
||||
\DMusProd (Direct Music Producer)
|
||||
- DirectMusic Producer is the authoring tool for Direct Music. It
|
||||
allows composers and sound designers to use the interactive and
|
||||
variable resources of DirectMusic along with the consistent sound
|
||||
performance of DLS. DirectX Audio Scripting can also be authored
|
||||
and tested within Producer. The DirectMusic Producer setup program
|
||||
and all files are located here.
|
||||
|
||||
\Extras
|
||||
\Direct3D
|
||||
- Skinning exporter tools
|
||||
\DirectShow
|
||||
- Contains the DVDBoilerplate. See readme.txt within the directory
|
||||
for more information.
|
||||
- Contains additional media that can be used with DirectShow and the
|
||||
DirectShow Editing Services (DES) interfaces.
|
||||
\Documentation
|
||||
- Contains DirectX 7 HTMLHelp Documentation for English and Japanese.
|
||||
- Also contains DirectX 7 Documentation in Microsoft Word format
|
||||
(English only).
|
||||
\GameVoice
|
||||
- Contains the installer for the English Version of Game Voice Share,
|
||||
which includes voice communication and game launching functionality.
|
||||
For more information on Game Voice, visit http://www.gamevoice.com.
|
||||
\Symbols
|
||||
- Contains directories of DirectX 8.0 symbol files for
|
||||
Win2000 and Win9x (retail and debug for each).
|
||||
|
||||
\Include
|
||||
contains DirectX 8.0 include files for DirectX core components.
|
||||
|
||||
\Lib
|
||||
contains DirectX 8.0 library files for DirectX core components.
|
||||
|
||||
\License
|
||||
Text versions of the DirectX SDK and End User License Agreements and
|
||||
the Redistributable License Agreement.
|
||||
|
||||
\Redist
|
||||
Redistributable versions of the DirectX 8.0 Runtime.
|
||||
|
||||
\Samples
|
||||
Contains all sample code and sample binaries. Most samples can be
|
||||
accessed from the Start menu when installed via the downloaded
|
||||
InstallShield setup.
|
||||
|
||||
\SDKDev
|
||||
This directory contains the runtime installs that are installed with
|
||||
the SDK. They are English only and contain both debug and retail
|
||||
DirectX 8.0 system components that can be "switched" between retail
|
||||
and debug without re-installing. For the DirectX 8.0 components,
|
||||
retail or debug can be switched via the DirectX Control Panel.
|
||||
|
||||
The \retail folder contains the setup that will install non-DirectX 8.0
|
||||
retail components while the \debug folder will install all debug
|
||||
components. Both install DX8 retail and debug components. These are
|
||||
the only components that can be "switched".
|
||||
|
||||
__________________________________________________________________
|
||||
|
||||
|
||||
DIRECTX 8.0 SDK NOTES AND KNOWN ISSUES
|
||||
|
||||
|
||||
DirectX Audio (DirectSound & DirectMusic)
|
||||
=========================================
|
||||
|
||||
Below are some known issues with DirectMusic and DirectSound in
|
||||
DirectX 8.0 that you may encounter.
|
||||
|
||||
- ParamEQ and Distortion effects have parameters that are sampling rate
|
||||
dependent.
|
||||
Setting these params to a value that is out of range for that sampling
|
||||
rate will result in:
|
||||
Distortion: Parameters are 'clipped' at the valid range for the
|
||||
sampling rate
|
||||
ParamEQ: If the frequency is greater than can be supported by the
|
||||
sampling rate, the effect is disabled- In the DirectMusic
|
||||
3DAudio sample, there may be some breakup if Doppler is set > 4
|
||||
- DirectSound buffers that are created with DSBCAPS_CTRLFX must be at
|
||||
least 100ms in length.
|
||||
|
||||
|
||||
Direct3D
|
||||
========
|
||||
|
||||
- All executables compiled against earlier DirectX 8.0 betas must be
|
||||
recompiled with this version to run.
|
||||
- Alt-enter in the samples results in texture corruption for some drivers.
|
||||
Workaround: Get newer drivers.
|
||||
- The value for MaxPrimitiveCount defines the max number of vertices
|
||||
as well as the max number of primitives that can be sent to a
|
||||
DrawIndexedPrimitive or DrawPrimitive call.
|
||||
- A bug in the Windows2000 kernel causes an issue upon mode-switches for
|
||||
AGP surfaces locked with the NOSYSLOCK flag. The contents of any such
|
||||
surface may become inaccessible for the duration of the NOSYSLOCK lock
|
||||
if a mode-switch happens after the Lock and before the Unlock. This happens
|
||||
for both DX7 and DX8 applications. The most likely scenario is a DX8
|
||||
application running on a driver that supports hardware vertex buffers,
|
||||
but using software vertex processing (fixed or shader). Under these
|
||||
scenarios, Direct3D might keep a NOSYSLOCK lock on an AGP vertex buffer.
|
||||
If the user alt-tabs out of the application or does anything else to cause
|
||||
a mode-change, the thread writing into the vertex buffer may fault. There
|
||||
is no known workaround. Microsoft will fix this issue in the next version
|
||||
of Windows and will attempt to ship a fix in a future Windows2000
|
||||
Service Pack.
|
||||
- A bug in the DX6 and DX7 implementation of
|
||||
IDirectDraw*::GetDeviceIdentifier causes the DirectDraw runtime to write
|
||||
four extra bytes past the end of the structure. To work around this issue,
|
||||
allocate an extra four bytes at the end of your DDDEVICEIDENTIFIER*
|
||||
structure. This bug does not exist in the IDirect3D8::GetAdapterIdentifier
|
||||
version.
|
||||
- The Direct3D8 run-time exhibits the following behvior on all Windows NT
|
||||
platforms. Run a full-screen Direct3D8 application, press Ctrl-Alt-Del,
|
||||
press ESC. The desktop will appear, but the display card will still be in
|
||||
the application's resolution, not the proper desktop resolution. (The user
|
||||
may alt-tab back to the application at this time.) A fix for this will be
|
||||
in the next release of DirectX, and the problem will be fixed in the next
|
||||
version of Windows NT. Developers are urged NOT to try to work-around this
|
||||
problem nor code their own solutions, since such solutions are very likely
|
||||
to interact poorly with our own fix.
|
||||
- Terminating a process with un-released vertex buffers on Win9x DX7 APIs
|
||||
can cause instability. This is caused by a bug in the automatic per-process
|
||||
cleanup code in DirectDraw which causes VBs to be leaked permanently (until
|
||||
reboot) on all Win9x platforms: Windows 95, 98, Millenirum. Applications
|
||||
should be carefully coded to ensure all Vertex Buffers are correctly released
|
||||
before exiting the process.
|
||||
- Applications should be careful when responding to the WM_MOUSEMOVE message.
|
||||
If the application calls IDirect3DDevice8::SetCursorPosition with a coordinate
|
||||
that is outside the current display mode size, then the Direct3D run-time may
|
||||
cause another WM_MOUSEMOVE, which may cause the application to call
|
||||
IDirect3DDevice8::SetCursorPosition again, resulting in an infinite loop.
|
||||
The application should either be careful not to call
|
||||
IDirect3DDevice8::SetCursorPosition with invalid positions, or should never
|
||||
call IDirect3DDevice8::SetCursorPosition with repeated positions.
|
||||
One common scenario for generating invalid mouse cursors is to remove the
|
||||
menu style from a window incorrectly when going full-screen. The SDK sample
|
||||
applications incorrectly use SetWindowLong to remove the menu bar from the
|
||||
window before going fullscreen. The correct technique is to call
|
||||
"hOldMenu = SetMenu(hWnd, NULL)'" before going fullscreen, and then
|
||||
"SetMenu(hWnd, hOldMenu);" before returning to windowed mode.
|
||||
- When using the function ValidateDevice on Win9x the return value will be
|
||||
DD_OK if it is successful.
|
||||
|
||||
Point Sprites:
|
||||
|
||||
- When using the Direct3D software T&L pipeline (device created with
|
||||
D3DCREATE_SOFTWARE_VERTEXPROCESSING flag set or with
|
||||
D3DCREATE_MIXED_VERTEXPROCESSING flag and software vertex processing
|
||||
toggled on), then point sprite support is guaranteed. When using
|
||||
hardware vertex processing, some older drivers may not support point
|
||||
sprites, indicated by d3dcaps->MaxPointSize = 0. Upgrading to a DX8
|
||||
driver for these parts will enable them.
|
||||
|
||||
To ensure consistent behavior for point sprite support, set
|
||||
D3DRS_CULLMODE = D3DCULL_NONE
|
||||
D3DRS_FILLMODE = D3DFILL_SOLID
|
||||
when rendering point sprites.
|
||||
|
||||
Vertex Shaders:
|
||||
|
||||
- Two vertex shader instructions may produce implementation-specific
|
||||
results for out-of-range inputs, such as the log of a negative number.
|
||||
The log, logp and y- component of the lit instruction macro should not
|
||||
be passed negative values for this reason.
|
||||
|
||||
Driver/Device Specific Issues:
|
||||
|
||||
- The Windows Millennium driver for the ATI Rage 128 fails (draws nothing)
|
||||
when using vertex shaders which output more than two texture coordinates
|
||||
per texture coordinate set when the D3DTTFF_PROJECTED bit is not set.
|
||||
|
||||
D3DX
|
||||
====
|
||||
|
||||
- This product includes software developed by the University of California,
|
||||
Berkeley and its contributors D3DX Mesh APIs.
|
||||
- The ID3DXSkinMesh interfaces currently only support 16-bit mesh. 32-bit
|
||||
mesh support is not yet implemented.
|
||||
- All other D3DX Mesh interfaces do support 32-bit meshes even though the
|
||||
docs say they do not.
|
||||
- D3XGenerateAdjacency currently ignored the epsilon value and uses 0.0f
|
||||
as the epsilon.
|
||||
- In D3DXMatrixPerspectiveFOV, the aspect ratio is x/y instead of y/x.
|
||||
|
||||
|
||||
DirectInput
|
||||
===========
|
||||
|
||||
- There is a bug in DirectInput which causes the Logitech Wingman Formula wheel to
|
||||
report pedal data on the wrong axes.
|
||||
- There are some know issues that can cause mouse behavior to be very sluggish
|
||||
when debugging using DirectInput. There are two reg files that will
|
||||
assist with this issue. They are:
|
||||
Mouse and Keyboard Emulation On.reg
|
||||
Mouse and Keyboard Emulation Off.reg
|
||||
"Mouse and Keyboard Emulation On.reg" will force all mouse calls through
|
||||
dinput emulation, thus making the mouse perform properly inside the debugger.
|
||||
"Mouse and Keyboard Emulation Off.reg" will turn off force emulation.
|
||||
Only use these keys on development machines, they are not intended to be
|
||||
redisted as they are a global setting that effects all Direct Input clients.
|
||||
- The following devices are supported with device images in this release.
|
||||
+ ACT LABS RS
|
||||
+ ACT LABS Force RS
|
||||
+ Gravis Xterminator Dual Control
|
||||
+ Gravis Blackhawk Digital
|
||||
+ Gravis Gamepad Pro USB
|
||||
+ Gravis Gamepad Pro
|
||||
+ Gravis Eliminator Gamepad Pro
|
||||
+ Gravis Xterminator Digital GamePad
|
||||
+ InterAct/3dfx SV-262A HammerHead Fx
|
||||
+ InterAct Axispad
|
||||
+ InterAct SV-251 Raider Digital
|
||||
+ Logitech WingMan Formula (Yellow)
|
||||
+ Logitech WingMan Extreme Digital 3D
|
||||
+ Logitech WingMan Gamepad Black (USB)
|
||||
+ Logitech Wingman Rally Force USB
|
||||
+ Logitech Wingman Rumblepad
|
||||
+ Microsoft Sidewinder Gamepad Pro
|
||||
+ Microsoft SideWinder Force Feedback Wheel
|
||||
+ Microsoft SideWinder Force Feedback Pro
|
||||
+ Microsoft Sidewinder FF 2
|
||||
+ Microsoft Sidewinder Dual Strike
|
||||
+ Microsoft Sidewinder Precision 2
|
||||
+ Microsoft Sidewinder Plug and Play
|
||||
+ Microsoft SideWinder Game Pad
|
||||
+ Microsoft SideWinder Precision Racing Wheel
|
||||
+ Microsoft SideWinder Precision Pro
|
||||
+ Microsoft SideWinder Freestyle Pro
|
||||
+ Microsoft SideWinder 3D Pro
|
||||
|
||||
|
||||
DirectPlay
|
||||
==========
|
||||
|
||||
The following are known issues with DirectPlay in this release that
|
||||
you may need to work around.
|
||||
|
||||
- Note that the dwTimeoutUntilKeepAlive member of the DPN_CAPS structure
|
||||
specifies a minimum value. The first keepalive packet may be sent as
|
||||
much as 30 seconds later than the minimum value specified in this
|
||||
member. For example, if you set dwTimeoutUntilKeepAlive to 60000
|
||||
(60 seconds) the first keepalive packet may be sent anywhere from
|
||||
60 to 90 seconds after the last normal packet was sent.
|
||||
- The "debug output level" slider on the DirectPlay tab of the DirectX
|
||||
control panel is not functional. For instructions on how to change the
|
||||
debug output level, see the "dp8log.txt" file in the
|
||||
[sdkroot]\bin\DXUtils directory.
|
||||
- To use DirectPlay Voice in full duplex mode, we recommend that you update
|
||||
to the latest drivers for your audio device. Some older drivers do not
|
||||
provide reliable full duplex performance.
|
||||
- If you connect to a location that you have enumerated, the enumeration
|
||||
will be canceled automatically for you. If you attempt to do a cancel
|
||||
asynchronous operation on this enum after the connect is completed you
|
||||
will get back DPNERR_USERCANCEL error code. Be aware that this is the
|
||||
expected behavior and that you should not exit with an error condition.
|
||||
- The modem service provider implementation for DirectPlay8 requires
|
||||
TAPI 2.0 functionality. TAPI 2.0 is available as an installed component
|
||||
on Windows 98 and later, but not on Windows 95. If your application
|
||||
requires modem functionality on the Windows 95 platform, the TAPI 2.0
|
||||
patch for Windows 95 can be obtained on the Microsoft FTP site
|
||||
(ftp://ftp.microsoft.com/developr/TAPI/tapi2195.zip) and distributed
|
||||
with you application.
|
||||
|
||||
Notes on NATs (Network Address Translators):
|
||||
|
||||
- There are many different NAT solutions available, some of which are
|
||||
different from others. We have attempted to document some of the issues
|
||||
with various NAT solutions, but is not comprehensive. Please refer to
|
||||
the DirectX Developer Page at http://msdn.microsoft.com/directx for
|
||||
further information on these issues.
|
||||
|
||||
DirectPlay Voice codecs via Windows ACM (Audio Compression Manager):
|
||||
|
||||
- DirectPlay Voice uses the following codecs via the Windows ACM:
|
||||
- Microsoft ADPCM
|
||||
- Microsoft GSM
|
||||
- DSP Group Truespeech
|
||||
- Installation of these codecs with Windows is optional. If they
|
||||
are not installed, then one or more of the compression types in
|
||||
DirectPlay Voice will not function. If the application attempts
|
||||
to use a compression type that is not functional due to a missing
|
||||
ACM codec, it will receive the DVERR_COMPRESSIONNOTSUPPORTED
|
||||
return code.
|
||||
- On Windows 2000, the user can install these codecs through the
|
||||
Add/Remove Hardware wizard. The user should select
|
||||
"Add/Troubleshoot a device". When a list of hardware is presented,
|
||||
the user should select "Add a new device", then on the next
|
||||
page select "No, I want to select the hardware from a list".
|
||||
This will bring up a list of hardware. Select "Sound, video, and
|
||||
game controllers". The "Audio Codecs" item is listed under
|
||||
"(Standard system devices)".
|
||||
- On Windows 9x, the user can install these codecs through the
|
||||
Add New Hardware wizard. When prompted, the user should select
|
||||
"No, I want to select the hardware from a list". In the list of
|
||||
device types, codecs are listed under "Sound video and game
|
||||
controllers". The codecs are listed under two manufacturers.
|
||||
The ADPCM and GSM codecs are listed under "Microsoft Audio
|
||||
Codecs" and the Truespeech codec is listed under "DSP Group".
|
||||
|
||||
|
||||
DirectShow
|
||||
==========
|
||||
|
||||
- The GraphEdit Tool (and some of the DirectShow samples) requires MFC42.DLL
|
||||
to be present on the system. The DirectX SDK Setup does not install this
|
||||
DLL. This will only be an issue on Windows 95 systems and will require you
|
||||
to install Microsoft Visual C++ to acquire the DLL.
|
||||
- Application development using the DirectShow base classes libraries requires
|
||||
installation of the DirectShow samples. The source code for the base classes
|
||||
is now included as a sample project, rather than as a separate Classes\Base
|
||||
directory. You must compile these base classes to generate strmbase.lib and
|
||||
strmbasd.lib, which are no longer installed as binary files. If you are
|
||||
linking with strmbase.lib or strmbasd.lib with your own application, be sure
|
||||
to build and link with the updated DirectX 8 libraries (instead of the older
|
||||
libraries that are installed with Visual C++ or the Microsoft Platform SDK).
|
||||
- The samples included with the SDK are configured to compile and link with
|
||||
the updated libraries, which are generated by building the BaseClasses project.
|
||||
Further build instructions are provided in:
|
||||
<DXSDKInstallFolder>\samples\Multimedia\DirectShow\readme.txt.
|
||||
- The <streams.h> header file, along with many other DirectShow-specific header
|
||||
files, is now located in the DirectShow samples BaseClasses directory,
|
||||
which includes the BaseClasses source code and header files. You must add
|
||||
the BaseClasses directory to the beginning of your project's include path
|
||||
settings in order for Visual C++ to find all of the updated header files.
|
||||
- To use the Teletext Decoder Fonts that are shipped with DX8, make sure that
|
||||
the WST_* fonts are installed by examining the \windows\fonts directory.
|
||||
- There is a known problem with the MP3 decoder filter when used with
|
||||
Audio Effects DMOs. If you add an audio effect DMO (like WavesReverb, Echo,
|
||||
or Flange) to an existing MP3 filter graph, the audio could be played back
|
||||
at double speed. The problem would occur whenever the MP3 decoder is connected
|
||||
to a downstream audio effect dmo (via the dmo filter wrapper) that offers a
|
||||
default audio input type which doesn't match the native format of the
|
||||
uncompressed MP3 stream. For example, if you render a 22kHz MP3 file and
|
||||
add a DMO Audio effect, the MP3 filter could misinterpret the input type as
|
||||
being 44kHz when it is actually 22kHz. This would not be a problem for 44kHz
|
||||
MP3 files. This issue will be fixed in a future release.
|
||||
- If you have the SDK on CD-ROM, the Extras\DirectShow\Media directory
|
||||
contains additional media that can be used with DirectShow and the DirectShow
|
||||
Editing Services (DES) interfaces. We have included DV-encoded AVI videos,
|
||||
larger MPEG videos, and higher-quality JPEG images. Since the DV files are
|
||||
very large, you should copy them to your hard disk before playing them to
|
||||
ensure the best performance.
|
||||
- Remote graph spying with GraphEdit works only on Windows 2000.
|
||||
- The DirectShow Editing Services (DES) Color Generator source filter may
|
||||
generate blue or green components incorrectly if they have small values.
|
||||
For best results, use solid primary colors or set Blue and Green
|
||||
components to values of either 0xFF or 0x00.
|
||||
|
||||
|
||||
Broadcast Driver Architecture
|
||||
======================
|
||||
|
||||
Known issues with Broadcast IP Data Reception under Windows 2000:
|
||||
|
||||
- After rebooting a Windows 2000 system with a BDA receiver card installed,
|
||||
the BDA NDIS IP NIC is not immediately active. It becomes active only
|
||||
when an application inserts the BDA IPSink filter into a graph and connects
|
||||
its input pin. Once activated by connecting the IPSink filter's input pin,
|
||||
it takes 20 to 30 seconds for the BDA NDIS IP NIC to be assigned an IP
|
||||
address. The address assigned will be a Net 10 address. Once activated,
|
||||
the BDA NDIS IP NIC will remain active until the system is rebooted.
|
||||
- There may be some applications that use the BDA NDIS IP NIC as the default
|
||||
LAN adapter. These apps will fail if the BDA NDIS IP NIC is active. To
|
||||
de-activate the BDA NDIS IP NIC, reboot the system and do not run a TV graph
|
||||
or application.
|
||||
|
||||
|
||||
Documentation
|
||||
=============
|
||||
|
||||
- For proper viewing of the DirectX Documentation, install the docs from
|
||||
the DirectX 8.0 SDK CD. Specify a full installation, or if you chose a
|
||||
Custom install, ensure that you've selected Documentation.
|
||||
- The known issues with the DirectX 8.0 Documentation are written up in a
|
||||
separate file. You will find these issues listed in the
|
||||
DirectX8_Doc_Readme.txt file found in the <DXSDKCDRoot>\dxf\doc\DirectX8
|
||||
folder. This file is also installed into the <DXSDKInstallFolder>\doc\DirectX8
|
||||
when DirectX8 Documentation is installed.
|
||||
|
||||
|
||||
Samples
|
||||
=======
|
||||
|
||||
Miscellaneous Issues:
|
||||
|
||||
- Some samples will compile with errors with the UNICODE flag defined.
|
||||
- Visual C/C++ 5 compatibility in DirectX 8.0 depends on Service Pack 3
|
||||
for Visual Studio 97. If you see the following errors:
|
||||
"fatal error LNK1106: invalid file or disk full: cannot seek to 0x389bc8bf"
|
||||
"Internal error during Pass1"
|
||||
then you need to upgrade your Visual C/C++ 5 installation. Service packs
|
||||
for Visual Studio can be found at http://msdn.microsoft.com/vstudio/sp/vs97.
|
||||
|
||||
Direct3D Samples:
|
||||
|
||||
- There are miscellaneous issues with some display hardware & drivers.
|
||||
Please let us know of any problems you encounter and specify whether you
|
||||
believe it is sample or driver related.
|
||||
|
||||
DirectShow Samples:
|
||||
|
||||
- There are several .XTL sample files in the \media folder. These files
|
||||
demonstrate some of the functionality available in the DirectShow Editing
|
||||
Services. You can render these files using the XTLTest C++ sample and
|
||||
the XTLTestVB and DexterVB VisualBasic samples. All provided XTL files
|
||||
refer to media that ships in the SDK's media directory. Rendering XTL
|
||||
files is a great way to get an idea of what the new DirectShow Editing
|
||||
Services APIs make possible. For a simple demo, drag a few of the SDK
|
||||
media directory's sample .XTL files onto the XTLTestVB sample's client area.
|
||||
- The DirectShow Visual Basic samples demonstrate more of the DES functionality
|
||||
than the C++ samples. Be sure to run SlideShowVB and TrimmerVB if you are
|
||||
interested in DES. You can also use the DexterVB ("Dexter Explorer")
|
||||
application as an XTL development/test tool.
|
||||
- The Texture3D sample is known to fail on some systems (referencing
|
||||
invalid memory), for which you may see an error message. This failure is
|
||||
in initialization of D3D. We recommend updating your video card drivers
|
||||
to the most current revision, as that usually resolves the problem.
|
||||
- The DirectShow IDL files are currently located in the
|
||||
\include\DShowIDL directory of the SDK for your convenience.
|
||||
- You will be required to build the \BaseClasses libraries before any sample
|
||||
that depends on them can be built or executed. Please review the Readme.Txt
|
||||
file in the DirectShow samples root directory for more information on
|
||||
building the samples.
|
||||
|
||||
|
||||
DirectX for Visual Basic Samples:
|
||||
|
||||
- DBMON.exe is a console application which allows the Visual Basic DirectX
|
||||
developer to take advantage of extended output that debug installs of
|
||||
DirectX provide. This application works only under Windows 2000.
|
||||
To use, execute the application. All debug output will be captured and sent
|
||||
to the console window. If you are not seeing debug output, ensure that
|
||||
you have installed the debug version of DirectX, and that you are running
|
||||
Windows 2000.
|
||||
- DXVB Messenger Server is the server portion of a client/server instant
|
||||
messaging application. This sample requires the use of ActiveX Data Object
|
||||
(ADO) to maintain the data needed. If you are running Windows 9x, you must
|
||||
have the latest version of ADO installed on your machine to compile or run
|
||||
this sample. You can install the latest ADO while Visual Basic Professional
|
||||
is being installed or you can download the latest ADO from the web at:
|
||||
http://www.microsoft.com/data/ado/. ADO is installed by default with
|
||||
Visual Basic 6 Enterprise.
|
||||
- If you are experiencing problems searching for and connecting to sessions
|
||||
using DirectPlay for VisualBasic, you may need to update your system.
|
||||
To update, install DCOM98 from:
|
||||
http://download.microsoft.com/msdownload/dcom/98/x86/en/dcom98.exe
|
||||
|
||||
|
||||
Other
|
||||
=====
|
||||
|
||||
- The DirectDraw "Debug Level" slider in DirectX Control Panel Applet does
|
||||
not function. Instead use the "Debug Output Level" slider on the Direct3D
|
||||
tab, this will effect both DDraw and D3D8. Also note that DirectDraw labels
|
||||
it's debug spew as coming from "Direct3D8".
|
||||
- The DirectX runtime will not operate on NEC PC98 systems. SDK and Runtime
|
||||
installations have been intentionally blocked on this system.
|
||||
- The DirectX 8.0 runtime requires a Pentium compatible CPU for operation.
|
||||
The DirectX runtime setup will not install on processors that do not report
|
||||
Pentium compatibility. Some older Cyrix processors, while compatible with
|
||||
the Pentium instruction set, report as x486 processors, and thus do not
|
||||
support installation of the DirectX 8.0 run time.
|
||||
- When installing the DirectX 8.0 runtime from the DirectX SDK you will
|
||||
notice that the size requirements are inflated from previous DirectX versions.
|
||||
For example, if you were only to install a DirectX 8.0 runtime from the
|
||||
DirectX SDK onto a system with low disk space, you would see that at least
|
||||
120 MB is required. This is because both the retail and debug runtimes are
|
||||
included in each of the DirectX SDK runtime installs (this allows developers
|
||||
to switch between retail and debug without having to re-install). However,
|
||||
this inflated size is not true of the redistributable runtimes shipped with
|
||||
the SDK. Redistributable installs will require significantly less disk space.
|
||||
While this number is dependent on the disk format (Fat16/32 vs. NTFS) we
|
||||
expect approximately 40 MB of free space is required for uncompression and
|
||||
installation and approximately 15 MB once installed (and this is only true for
|
||||
systems with no previous DirectX version installed). The DirectX Setup API
|
||||
will check for and display error messages when these requirements are not met.
|
||||
- Windows 95 Japanese Systems will require MS UI Gothic patch for Windows 95
|
||||
or Internet Explorer 5.0 (or after) for the DirectX Control Panel to display
|
||||
properly. MS UI Gothic Patch can be found at
|
||||
http://www.microsoft.com/JAPAN/win95/msgotupd/default.htm and IE5 (or after)
|
||||
can be found at http://www.microsoft.com/windows/ie/default.htm.
|
||||
|
||||
__________________________________________________________________
|
||||
|
||||
|
||||
COMPILER SUPPORT
|
||||
|
||||
All DirectX 8.0 SDK samples are developed and compiled with Visual Studio 6.0.
|
||||
We have provided Visual Studio 6.0 DSP files for your convenience.
|
||||
|
||||
All DirectX 8.0 libraries, with the exception of the DirectShow libraries, should
|
||||
be compatible with Visual Studio 5.0 SP3 or higher.
|
||||
|
||||
__________________________________________________________________
|
||||
|
||||
|
||||
SPECIAL THANKS
|
||||
|
||||
Marlin Studios
|
||||
|
||||
Textures used in the Billboard sample, tree02S.tga, tree01S.tga & tree35S.tga,
|
||||
are provided courtesy of Marlin Studios (http://www.marlinstudios.com).
|
||||
They are provided for use with this sample only and cannot be distributed
|
||||
with any application without prior written consent.
|
||||
|
||||
Viewpoint Digital, Inc.
|
||||
|
||||
The model used by the Visual Basic AutoParts sample, engine1.x, is provided
|
||||
courtesy of Viewpoint Digital, Inc. (http://www.viewpoint.com). It is provided
|
||||
for use with this sample only and cannot be distributed with any application
|
||||
without prior written consent. V6 Engine Model copyright 1999 Viewpoint
|
||||
Digital, Inc..
|
||||
|
||||
3DCAFE and Platinum Pictures
|
||||
|
||||
The model in the Dolphin samples, Dolphin.x, is derived from the model files
|
||||
(dolphins.zip) provided courtesy of 3DCAFE and Platinum Pictures
|
||||
(http://www.3dcafe.com/). It is provided for use with this sample only.
|
||||
For further terms of use please visit the 3DCAFE site or contact 3DCAFE.
|
Binary file not shown.
|
@ -0,0 +1,24 @@
|
|||
SUPPLEMENTAL END USER LICENSE AGREEMENT FOR MICROSOFT SOFTWARE
|
||||
|
||||
IMPORTANT: READ CAREFULLY - The Microsoft Corporation ("Microsoft") operating system components which you are about to install, including any "online" or electronic documentation ("OS COMPONENTS"), are subject to the terms and conditions of the agreement under which you have validly licensed the applicable Microsoft operating system product identified below (each an "End User License Agreement" or "EULA") and the terms and conditions of this Supplemental EULA. BY INSTALLING, COPYING OR OTHERWISE USING THE OS COMPONENTS, YOU AGREE TO BE BOUND BY THE TERMS AND CONDITIONS OF THE EULA FOR THE APPLICABLE OPERATING SYSTEM PRODUCT IDENTIFIED BELOW AND THIS SUPPLEMENTAL EULA. IF YOU DO NOT AGREE TO THESE TERMS AND CONDITIONS, DO NOT INSTALL, COPY OR USE THE OS COMPONENTS.
|
||||
|
||||
NOTE: IF YOU DO NOT HAVE A VALID EULA FOR EITHER MICROSOFT WINDOWS 95, WINDOWS 98, WINDOWS ME, OR WINDOWS 2000, (each an "OS Product"), YOU ARE NOT AUTHORIZED TO INSTALL, COPY OR OTHERWISE USE THE OS COMPONENTS AND YOU HAVE NO RIGHTS UNDER THIS SUPPLEMENTAL EULA.
|
||||
|
||||
Capitalized terms used in this Supplemental EULA and not otherwise defined herein shall have the meanings assigned to them in the applicable OS Product EULA.
|
||||
|
||||
General. The OS COMPONENTS are provided to you by Microsoft to update, supplement, or replace existing functionality of the applicable OS Product. Microsoft grants you a license to use the OS COMPONENTS under the terms and conditions of the EULA for the applicable OS Product (which is hereby incorporated by reference) and the terms and conditions set forth in this Supplemental EULA, provided that you comply with all such terms and conditions. To the extent that any terms in this Supplemental EULA conflict with terms in the applicable OS Product EULA, the terms of this Supplemental EULA control solely with respect to the OS COMPONENTS.
|
||||
|
||||
Additional Rights and Limitations.
|
||||
|
||||
* If you have multiple validly licensed copies of the applicable OS Product(s), you may reproduce, install and use one copy of the OS COMPONENTS as part of such OS Product on each of your computers running validly licensed copies of such OS Product(s) provided that you use such additional copies of the OS COMPONENTS in accordance with the terms and conditions above. For each validly licensed copy of an applicable OS Product, you also may reproduce one additional copy of the OS COMPONENTS solely for archival purposes or reinstallation of the OS COMPONENTS on the same computer as the OS COMPONENTS were previously installed. Microsoft retains all right, title and interest in and to the OS COMPONENTS. All rights not expressly granted are reserved by Microsoft.
|
||||
|
||||
IF THE OS PRODUCT WAS LICENSED TO YOU BY MICROSOFT OR ANY OF ITS WHOLLY OWNED SUBSIDIARIES, THE LIMITED WARRANTY (IF ANY) INCLUDED IN THE OS PRODUCT EULA APPLIES TO THE OS COMPONENTS PROVIDED THE OS COMPONENTS HAVE BEEN LICENSED BY YOU WITHIN THE TERM OF THE LIMITED WARRANTY IN THE OS PRODUCT EULA. HOWEVER, THIS SUPPLEMENTAL EULA DOES NOT EXTEND THE TIME PERIOD FOR WHICH THE LIMITED WARRANTY IS PROVIDED.
|
||||
|
||||
IF THE OS PRODUCT WAS LICENSED TO YOU BY AN ENTITY OTHER THAN MICROSOFT OR ANY OF ITS WHOLLY OWNED SUBSIDIARIES, MICROSOFT DISCLAIMS ALL WARRANTIES WITH RESPECT TO THE OS COMPONENTS AS FOLLOWS:
|
||||
|
||||
DISCLAIMER OF WARRANTIES. TO THE MAXIMUM EXTENT PERMITTED BY APPLICABLE LAW, MICROSOFT AND ITS SUPPLIERS PROVIDE TO YOU THE OS COMPONENTS, AND ANY (IF ANY) SUPPORT SERVICES RELATED TO THE OS COMPONENTS ("SUPPORT SERVICES") AS IS AND WITH ALL FAULTS; AND MICROSOFT AND ITS SUPPLIERS HEREBY DISCLAIM WITH RESPECT TO THE OS COMPONENTS AND SUPPORT SERVICES ALL WARRANTIES AND CONDITIONS, WHETHER EXPRESS, IMPLIED OR STATUTORY, INCLUDING, BUT NOT LIMITED TO, ANY (IF ANY) WARRANTIES OR CONDITIONS OF OR RELATED TO: TITLE, NON-INFRINGEMENT, MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE, LACK OF VIRUSES, ACCURACY OR COMPLETENESS OF RESPONSES, RESULTS, LACK OF NEGLIGENCE OR LACK OF WORKMANLIKE EFFORT, QUIET ENJOYMENT, QUIET POSSESSION, AND CORRESPONDENCE TO DESCRIPTION. THE ENTIRE RISK ARISING OUT OF USE OR PERFORMANCE OF THE OS COMPONENTS AND ANY SUPPORT SERVICES REMAINS WITH YOU.
|
||||
|
||||
EXCLUSION OF INCIDENTAL, CONSEQUENTIAL AND CERTAIN OTHER DAMAGES. TO THE MAXIMUM EXTENT PERMITTED BY APPLICABLE LAW, IN NO EVENT SHALL MICROSOFT OR ITS SUPPLIERS BE LIABLE FOR ANY SPECIAL, INCIDENTAL, INDIRECT, OR CONSEQUENTIAL DAMAGES WHATSOEVER (INCLUDING, BUT NOT LIMITED TO, DAMAGES FOR: LOSS OF PROFITS, LOSS OF CONFIDENTIAL OR OTHER INFORMATION, BUSINESS INTERRUPTION, PERSONAL INJURY, LOSS OF PRIVACY, FAILURE TO MEET ANY DUTY (INCLUDING OF GOOD FAITH OR OF REASONABLE CARE), NEGLIGENCE, AND ANY OTHER PECUNIARY OR OTHER LOSS WHATSOEVER) ARISING OUT OF OR IN ANY WAY RELATED TO THE USE OF OR INABILITY TO USE THE OS COMPONENTS OR THE SUPPORT SERVICES, OR THE PROVISION OF OR FAILURE TO PROVIDE SUPPORT SERVICES, OR OTHERWISE UNDER OR IN CONNECTION WITH ANY PROVISION OF THIS SUPPLEMENTAL EULA, EVEN IN THE EVENT OF THE FAULT, TORT (INCLUDING NEGLIGENCE), STRICT LIABILITY, BREACH OF CONTRACT OR BREACH OF WARRANTY OF MICROSOFT OR ANY SUPPLIER, AND EVEN IF MICROSOFT OR ANY SUPPLIER HAS BEEN ADVISED OF THE POSSIBILITY OF SUCH DAMAGES.
|
||||
|
||||
LIMITATION OF LIABILITY AND REMEDIES. NOTWITHSTANDING ANY DAMAGES THAT YOU MIGHT INCUR FOR ANY REASON WHATSOEVER (INCLUDING, WITHOUT LIMITATION, ALL DAMAGES REFERENCED ABOVE AND ALL DIRECT OR GENERAL DAMAGES), THE ENTIRE LIABILITY OF MICROSOFT AND ANY OF ITS SUPPLIERS UNDER ANY PROVISION OF THIS SUPPLEMENTAL EULA AND YOUR EXCLUSIVE REMEDY FOR ALL OF THE FOREGOING SHALL BE LIMITED TO THE GREATER OF THE AMOUNT ACTUALLY PAID BY YOU FOR THE OS COMPONENTS OR U.S.$5.00. THE FOREGOING LIMITATIONS, EXCLUSIONS AND DISCLAIMERS SHALL APPLY TO THE MAXIMUM EXTENT PERMITTED BY APPLICABLE LAW, EVEN IF ANY REMEDY FAILS ITS ESSENTIAL PURPOSE.
|
||||
|
|
@ -0,0 +1,59 @@
|
|||
|
||||
Microsoft DirectX 8.0 Software Development Kit
|
||||
END-USER LICENSE AGREEMENT FOR MICROSOFT SOFTWARE
|
||||
|
||||
IMPORTANT-READ CAREFULLY: This End-User License Agreement ("EULA") is a legal agreement between you (either an individual or a single entity) and Microsoft Corporation ("Microsoft") for the Microsoft software product identified above, which includes computer software and may include associated media and printed materials, and "online" or electronic documentation ("SOFTWARE PRODUCT). The SOFTWARE PRODUCT provided to you by Microsoft. Any software provided along with the SOFTWARE PRODUCT that is associated with a separate end-user license agreement is licensed to you under the terms of that license agreement. You agree to be bound by the terms of this EULA by installing, copying, downloading, accessing or otherwise using the SOFTWARE PRODUCT. If you do not agree to the terms of this EULA, do not install or use the SOFTWARE PRODUCT.
|
||||
|
||||
SOFTWARE PRODUCT LICENSE
|
||||
|
||||
The SOFTWARE PRODUCT is protected by copyright laws and international copyright treaties, as well as other intellectual property laws and treaties. The SOFTWARE PRODUCT is licensed, not sold.
|
||||
|
||||
1.GRANT OF LICENSE.
|
||||
|
||||
Microsoft grants you the following rights provided that you comply with all the terms and conditions of this EULA:
|
||||
|
||||
SOFTWARE PRODUCT. You may install and use the SOFTWARE PRODUCT on up to ten (10) computers, including workstations, terminals or other digital electronic devices ("COMPUTERS"), provided that you are the only individual using the SOFTWARE PRODUCT on each COMPUTER, to design, develop, and test software application products for use with Microsoft operating system products including Windows 2000, Windows 95, Windows 98 and Windows Me and subsequent releases thereto ("Application"). If you are an entity, Microsoft grants you the right to designate one individual within your organization to have the right to use the SOFTWARE PRODUCT in the manner provided above.
|
||||
|
||||
SAMPLE CODE. You may modify the sample source code located in the SOFTWARE PRODUCT's <Release Image> root directory "<Release Image>\DXF\Samples\Multimedia"("Sample Code") to design, develop and test your Application. You may also reproduce and distribute the Sample Code in object code form along with any modifications you make to the Sample Code, provided that you comply with the Distribution Requirements described below. For purposes of this Section, "modifications" shall mean enhancements to the functionality of the Sample Code.
|
||||
|
||||
REDISTRIBUTABLE CODE. Portions of the SOFTWARE PRODUCT are designated as "Redistributable Code". If you choose to distribute the Redistributable Code, you must include the files as specified listed in the SOFTWARE PRODUCTS <Release Image> root directory "<Release Image>\DXF\doc\directxeulas\directx redist.txt". No other modifications, additions, or deletions to the Redistributable Code are permitted without written permission from Microsoft Corporation. Your rights to distribute the Redistributable Code are subject to the Distribution Requirements described below.
|
||||
|
||||
DISTRIBUTION REQUIREMENTS. You may reproduce and distribute an unlimited number of copies of the Sample Code and/or Redistributable Code, (collectively "REDISTRIBUTABLE COMPONENTS")as described above, provided that (a) you distribute the REDISTRIBUTABLE COMPONENTS only as part of, or for use in conjunction with your Application; (b) your Application adds significant and primary functionality to the REDISTRIBUTABLE COMPONENTS; (c) the REDISTRIBUTABLE COMPONENTS only operate in conjunction with Microsoft Windows operating system products including Windows 2000, Windows 95, Windows 98, Windows Me, and subsequent versions thereof, (d) you distribute your Application containing the REDISTRIBUTABLE COMPONENTS pursuant to an End-User License Agreement (which may be "break-the-seal", "click-wrap", or signed), with terms no less protective than those contained herein; (e) you do not permit further redistribution of the REDISTRIBUTABLE COMPONENTS by your end-user customers; (f) you must use the setup utility included with the REDISTRIBUTABLE COMPONENTS to install the Redistributable Code; (g) you do not use Microsoft's name, logo, or trademarks to market your Application; (h) you include all copyright and trademark notices contained in the REDISTRIBUTABLE COMPONENTS; (i) you include a valid copyright notice on your Application; and (j) you agree to indemnify, hold harmless, and defend Microsoft from any against any claims or lawsuits, including attorneys' feeds, that arise or result from the use or distribution of your Application.
|
||||
|
||||
If you distribute the Redistributable Code separately for use with your Application (such as on your web site or as part of an update to your Application), you must include an end user license agreement in the install program for the Redistributable Code in the form of <Release Image>\license\directx end user eula.txt. Contact Microsoft for the applicable royalties due and other licensing terms for all other uses and/or distribution of the REDISTRIBUTABLE COMPONENTS.
|
||||
|
||||
2. COPYRIGHT.
|
||||
|
||||
All title and intellectual property rights in and to the SOFTWARE PRODUCT (including but not limited to any images, photographs, animations, video, audio, music, text and "applets," incorporated into the SOFTWARE PRODUCT), any accompanying printed materials, and any copies of the SOFTWARE PRODUCT, are owned by Microsoft or its suppliers. All title and intellectual property rights in and to the content which may by accessed through use of the SOFTWARE PRODUCT is the property of the respective content owner and may be protected by applicable copyright or other intellectual property laws and treaties . This EULA grants you no rights to use such content. If this SOFTWARE PRODUCT contains documentation which is provided only in electronic form, you may print one copy of such electronic documentation. You may not copy the printed materials accompanying the SOFTWARE PRODUCT. All rights not expressly granted are reserved by Microsoft.
|
||||
|
||||
3. DESCRIPTION OF OTHER RIGHTS AND LIMITATIONS.
|
||||
|
||||
a. Limitations on Reverse Engineering, Decompilation and Disassembly. You may not reverse engineer, decompile, or disassemble the SOFTWARE PRODUCT, except and only to the extent that such activity is expressly permitted by applicable law notwithstanding this limitation.
|
||||
|
||||
b. Rental. You may not rent, lease or lend the SOFTWARE PRODUCT.
|
||||
|
||||
c. Support Services. Microsoft may provide you with support services related to the SOFTWARE PRODUCT ("Support Services"). Use of the Support Services is governed by the Microsoft policies and programs described in the user manual, in "on line" documentation and/or other Microsoft-provided materials. Any supplemental software code provided to you as part of the Support Services shall be considered part of the SOFTWARE PRODUCT and subject to the terms and conditions of this EULA. With respect to technical information you provide to Microsoft as part of the Support Services, Microsoft may use such information for its business purposes, including for product support and development. Microsoft will not utilize such technical information in a form that personally identifies you.
|
||||
|
||||
d. Software Transfer. The initial user of the SOFTWARE PRODUCT may make a one-time permanent transfer of this EULA and SOFTWARE PRODUCT only directly to an end-user. This transfer must include all of the SOFTWARE PRODUCT (including all component parts, the media and printed materials, any upgrades, this EULA, and, if applicable, the Certificate of Authenticity). Such transfer may not be by way of consignment or any other indirect transfer. The transferee of such one-time transfer must agree to comply with the terms of this EULA, including the obligation not to further transfer this EULA and SOFTWARE PRODUCT.
|
||||
|
||||
e. Termination. Without prejudice to any other rights, Microsoft may cancel this EULA if you do not abide with the terms and conditions of this EULA, in which case, you must cease all use or distribution and destroy all copies of the SOFTWARE PRODUCT and all of its component parts.
|
||||
|
||||
4. U.S. GOVERNMENT RESTRICTED RIGHTS.
|
||||
All SOFTWARE PRODUCT provided to the U.S. Government pursuant to solicitations issued on or after December 1, 1995 is provided with the commercial license rights and restrictions described elsewhere herein. All SOFTWARE PRODUCT provided to the U.S. Government pursuant to solicitations issued prior to December 1, 1995 is provided with "Restricted Rights" as provided for in FAR, 48 CFR 52.227-14 (JUNE 1987) or DFAR, 48 CFR 252.227-7013 (OCT 1988), as applicable. The reseller is responsible for ensuring SOFTWARE PRODUCT is marked with the "Restricted Rights Notice" or "Restricted Rights Legend", as required. All rights not expressly granted are reserved.
|
||||
|
||||
5. EXPORT RESTRICTIONS.
|
||||
You acknowledge that the SOFTWARE PRODUCT is of U.S.-origin. You agree to comply with all applicable international and national laws that apply to these products, including the U.S. Export Administration Regulations, as well as end-user, end-use and country destination restrictions issued by U.S. and other governments. For additional information see http://www.microsoft.com/exporting/.
|
||||
6. DISCLAIMER OF WARRANTIES. TO THE MAXIMUM EXTENT PERMITTED BY APPLICABLE LAW, MICROSOFT AND ITS SUPPLIERS PROVIDE TO YOU THE SOFTWARE PRODUCT AND SUPPORT SERVICES (IF ANY) AS IS AND WITH ALL FAULTS; AND HEREBY DISCLAIM ALL OTHER WARRANTIES AND CONDITIONS, EITHER EXPRESS, IMPLIED OR STATUTORY, INCLUDING, BUT NOT LIMITED TO, ANY (IF ANY) WARRANTIES OR CONDITIONS OF MERCHANTABILITY, OF FITNESS FOR A PARTICULAR PURPOSE, OF LACK OF VIRUSES, OF ACCURACY OR COMPLETENESS OF RESPONSES, OF RESULTS, AND OF LACK OF NEGLIGENCE OR LACK OF WORKMANLIKE EFFORT, ALL WITH REGARD TO THE SOFTWARE PRODUCT, AND THE PROVISION OF OR FAILURE TO PROVIDE SUPPORT SERVICES. ALSO, THERE IS NO WARRANTY OR CONDITION OF TITLE, QUIET ENJOYMENT, QUIET POSSESSION, AND CORRESPONDENCE TO DESCRIPTION OR NON-INFRINGEMENT WITH REGARD TO THE SOFTWARE PRODUCT.
|
||||
|
||||
7. EXCULSION OF INCIDENTAL, CONSEQUENTIAL AND CERTAIN OTHER DAMAGES. TO THE MAXIMUM EXTENT PERMITTED BY APPLICABLE LAW, IN NO EVENT SHALL MICROSOFT OR ITS SUPPLIERS BE LIABLE FOR ANY SPECIAL, INCIDENTAL, INDIRECT, OR CONSEQUENTIAL DAMAGES WHATSOEVER (INCLUDING, BUT NOT LIMITED TO, DAMAGES FOR LOSS OF BUSINESS PROFITS OR CONFIDENTIAL OR OTHER INFORMATION, FOR BUSINESS INTERRUPTION, FOR PERSONAL INJURY, FOR LOSS OF PRIVACY, FOR FAILURE TO MEET ANY DUTY (INCLUDING OF GOOD FAITH OR OF REASONABLE CARE), FOR NEGLIGENCE, AND FOR ANY OTHER PECUNIARY OR OTHER LOSS WHATSOEVER) ARISING OUT OF OR IN ANY WAY RELATED TO THE USE OF OR INABILITY TO USE THE SOFTWARE PRODUCT, THE PROVISION OF OR FAILURE TO PROVIDE SUPPORT SERVICES, OR OTHERWISE UNDER OR IN CONNECTION WITH ANY PROVISION OF THIS EULA, EVEN IN THE EVENT OF THE FAULT, TORT (INCLUDING NEGLIGENCE), STRICT LIABILITY, BREACH OF CONTRACT OR BREACH OF WARRANTY OF MICROSOFT OR ANY SUPPLIER, AND EVEN IF MICROSOFT OR ANY SUPPLIER HAS BEEN ADVISED OF THE POSSIBILITY OF SUCH DAMAGES.
|
||||
|
||||
8. LIMITATION OF LIABILITY AND REMEDIES. NOTWITHSTANDING ANY DAMAGES THAT YOU MIGHT INCUR FOR ANY REASON WHATSOEVER (INCLUDING, WITHOUT LIMITATION, ALL DAMAGES REFERENCED ABOVE AND ALL DIRECT OR GENERAL DAMAGES), THE ENTIRE LIABILITY OF MICROSOFT AND ANY OF ITS SUPPLIERS UNDER ANY PROVISION OF THIS EULA AND YOUR EXCLUSIVE REMEDY FOR ALL OF THE FOREGOING SHALL BE LIMITED TO THE GREATER OF THE AMOUNT ACTUALLY PAID BY YOU FOR THE SOFTWARE PRODUCT OR U.S.$5.00. THE FOREGOING LIMITATIONS, EXCLUSIONS AND DISCLAIMERS DESCRIBED ABOVE SHALL APPLY TO THE MAXIMUM EXTENT PERMITTED BY APPLICABLE LAW, EVEN IF ANY REMEDY FAILS ITS ESSENTIAL PURPOSE.
|
||||
|
||||
9. APPLICABLE LAW. If you acquired this SOFTWARE PRODCUT in the United States, this EULA is governed by the laws of the State of Washington.
|
||||
|
||||
If you acquired this SOFTWARE PRODUCT in Canada, this EULA is governed by the laws of the Province of Ontario, Canada. Each of the parties hereto irrevocably attorns to the jurisdiction of the courts of the Province of Ontario and further agrees to commence any litigation which may arise hereunder in the courts located in the Judicial District of York, Province of Ontario.
|
||||
|
||||
If this product was acquired outside the United States, then local law may apply.
|
||||
10. QUESTIONS? Should you have any questions concerning this Agreement, or if you desire to contact Microsoft for any reason, please contact the Microsoft subsidiary serving your country, or write: Microsoft Sales Information Center/One Microsoft Way/Redmond, WA 98052-6399.
|
||||
|
||||
|
|
@ -0,0 +1,19 @@
|
|||
DirectX Software Development Kit Redistributable Code
|
||||
-------------------------------------------------------------
|
||||
Redistributable Code is identified as all of the files in the following
|
||||
directory on the DirectX 8.0 SDK CD:
|
||||
|
||||
redist/directx8/
|
||||
|
||||
All files in the above directory must be included in any distribution of
|
||||
the DirectX 8.0 Redistributable Code with the exception of the Broadcast
|
||||
Driver Architecture cab files:
|
||||
|
||||
bda.cab
|
||||
bdant.cab
|
||||
|
||||
Both of which are considered optional DirectX 8.0 redistributable
|
||||
components and can be removed from your distribution of the DirectX
|
||||
8.0 redistributable components.
|
||||
|
||||
|
|
@ -0,0 +1,77 @@
|
|||
///////////////////////////////////////////////////////////////////////////
|
||||
// Copyright (C) 2000 Microsoft Corporation. All Right Reserved.
|
||||
//
|
||||
// File: dshow.h
|
||||
// Content: DirectShow top-level include file
|
||||
///////////////////////////////////////////////////////////////////////////
|
||||
|
||||
#ifndef __DSHOW_INCLUDED__
|
||||
#define __DSHOW_INCLUDED__
|
||||
|
||||
///////////////////////////////////////////////////////////////////////////
|
||||
// Set up constants & pragmas for the compiler
|
||||
///////////////////////////////////////////////////////////////////////////
|
||||
#ifdef _MSC_VER
|
||||
// disable some level-4 warnings, use #pragma warning(enable:###) to re-enable
|
||||
#pragma warning(disable:4100) // warning C4100: unreferenced formal parameter
|
||||
#pragma warning(disable:4201) // warning C4201: nonstandard extension used : nameless struct/union
|
||||
#pragma warning(disable:4511) // warning C4511: copy constructor could not be generated
|
||||
#pragma warning(disable:4512) // warning C4512: assignment operator could not be generated
|
||||
#pragma warning(disable:4514) // warning C4514: "unreferenced inline function has been removed"
|
||||
|
||||
#if _MSC_VER>=1100
|
||||
#define AM_NOVTABLE __declspec(novtable)
|
||||
#else
|
||||
#define AM_NOVTABLE
|
||||
#endif
|
||||
#endif // MSC_VER
|
||||
|
||||
///////////////////////////////////////////////////////////////////////////
|
||||
// Include standard Windows files
|
||||
///////////////////////////////////////////////////////////////////////////
|
||||
#include <windows.h>
|
||||
#include <windowsx.h>
|
||||
#include <olectl.h>
|
||||
#include <ddraw.h>
|
||||
#include <mmsystem.h>
|
||||
|
||||
#ifndef NUMELMS
|
||||
#define NUMELMS(aa) (sizeof(aa)/sizeof((aa)[0]))
|
||||
#endif
|
||||
|
||||
///////////////////////////////////////////////////////////////////////////
|
||||
// Include DirectShow include files
|
||||
///////////////////////////////////////////////////////////////////////////
|
||||
#include <strmif.h> // Generated IDL header file for streams interfaces
|
||||
#include <amvideo.h> // ActiveMovie video interfaces and definitions
|
||||
#include <amaudio.h> // ActiveMovie audio interfaces and definitions
|
||||
#include <control.h> // generated from control.odl
|
||||
#include <evcode.h> // event code definitions
|
||||
#include <uuids.h> // declaration of type GUIDs and well-known clsids
|
||||
#include <errors.h> // HRESULT status and error definitions
|
||||
#include <edevdefs.h> // External device control interface defines
|
||||
#include <audevcod.h> // audio filter device error event codes
|
||||
#include <dvdevcod.h> // DVD error event codes
|
||||
|
||||
///////////////////////////////////////////////////////////////////////////
|
||||
// Define OLE Automation constants
|
||||
///////////////////////////////////////////////////////////////////////////
|
||||
#ifndef OATRUE
|
||||
#define OATRUE (-1)
|
||||
#endif // OATRUE
|
||||
#ifndef OAFALSE
|
||||
#define OAFALSE (0)
|
||||
#endif // OAFALSE
|
||||
|
||||
///////////////////////////////////////////////////////////////////////////
|
||||
// Define Win64 interfaces if not already defined
|
||||
///////////////////////////////////////////////////////////////////////////
|
||||
|
||||
// InterlockedExchangePointer
|
||||
#ifndef InterlockedExchangePointer
|
||||
#define InterlockedExchangePointer(Target, Value) \
|
||||
(PVOID)InterlockedExchange((PLONG)(Target), (LONG)(Value))
|
||||
#endif
|
||||
|
||||
|
||||
#endif // __DSHOW_INCLUDED__
|
|
@ -0,0 +1,338 @@
|
|||
//------------------------------------------------------------------------------
|
||||
// File: AMStream.idl
|
||||
//
|
||||
// Desc:
|
||||
//
|
||||
// Copyright (c) 1998 - 2000, Microsoft Corporation. All rights reserved.
|
||||
//------------------------------------------------------------------------------
|
||||
|
||||
|
||||
import "unknwn.idl";
|
||||
import "mmstream.idl";
|
||||
import "strmif.idl";
|
||||
|
||||
cpp_quote("#include <ddraw.h>")
|
||||
cpp_quote("#include <mmsystem.h>")
|
||||
cpp_quote("#include <mmstream.h>")
|
||||
cpp_quote("#include <ddstream.h>")
|
||||
cpp_quote("#include <austream.h>")
|
||||
|
||||
|
||||
|
||||
interface IAMMultiMediaStream;
|
||||
interface IAMMediaStream;
|
||||
interface IMediaStreamFilter;
|
||||
interface IDirectDraw;
|
||||
interface IDirectDrawSurface;
|
||||
interface IAMMediaTypeStream;
|
||||
interface IAMMediaTypeSample;
|
||||
|
||||
// Flags definitions for IAMMultiMediaStream::Initialize
|
||||
enum {
|
||||
AMMSF_NOGRAPHTHREAD = 0x00000001
|
||||
};
|
||||
|
||||
// Flags definitions for AddMediaStream and IAMMediaStream::Initialize
|
||||
enum {
|
||||
// Don't add a stream - create a default renderer instead
|
||||
// for the supplied purpose id
|
||||
AMMSF_ADDDEFAULTRENDERER = 0x00000001,
|
||||
AMMSF_CREATEPEER = 0x00000002,
|
||||
|
||||
// If no samples are created when we run or the last sample
|
||||
// is deleted then terminate this stream
|
||||
AMMSF_STOPIFNOSAMPLES = 0x00000004,
|
||||
|
||||
// If Update is not called keep going
|
||||
AMMSF_NOSTALL = 0x00000008
|
||||
};
|
||||
|
||||
|
||||
// Flag definitions for OpenFile and OpenMoniker
|
||||
enum {
|
||||
AMMSF_RENDERTYPEMASK = 0x00000003,
|
||||
AMMSF_RENDERTOEXISTING = 0x00000000,
|
||||
AMMSF_RENDERALLSTREAMS = 0x00000001,
|
||||
AMMSF_NORENDER = 0x00000002,
|
||||
|
||||
AMMSF_NOCLOCK = 0x00000004,
|
||||
AMMSF_RUN = 0x00000008
|
||||
};
|
||||
|
||||
|
||||
typedef [v1_enum] enum {
|
||||
Disabled = 0,
|
||||
ReadData = 1,
|
||||
RenderData = 2
|
||||
} OUTPUT_STATE;
|
||||
|
||||
|
||||
[
|
||||
object,
|
||||
uuid(7DB01C96-C0C3-11d0-8FF1-00C04FD9189D),
|
||||
dual,
|
||||
helpstring("IDirectShowStream Interface"),
|
||||
pointer_default(unique)
|
||||
]
|
||||
interface IDirectShowStream : IDispatch
|
||||
{
|
||||
[propget, id(1), helpstring("property FileName")] HRESULT FileName([out, retval] BSTR *pVal);
|
||||
[propput, id(1), helpstring("property FileName")] HRESULT FileName([in] BSTR newVal);
|
||||
[propget, id(2), helpstring("property Video")] HRESULT Video([out, retval] OUTPUT_STATE *pVal);
|
||||
[propput, id(2), helpstring("propetry Video")] HRESULT Video([in] OUTPUT_STATE newVal);
|
||||
[propget, id(3), helpstring("property Audio")] HRESULT Audio([out, retval] OUTPUT_STATE *pVal);
|
||||
[propput, id(3), helpstring("propetry Audio")] HRESULT Audio([in] OUTPUT_STATE newVal);
|
||||
};
|
||||
|
||||
|
||||
// IAMMultiMediaStream interface
|
||||
[
|
||||
object,
|
||||
uuid(BEBE595C-9A6F-11d0-8FDE-00C04FD9189D),
|
||||
pointer_default(unique)
|
||||
]
|
||||
interface IAMMultiMediaStream : IMultiMediaStream
|
||||
{
|
||||
HRESULT Initialize(
|
||||
[in] STREAM_TYPE StreamType,
|
||||
[in] DWORD dwFlags,
|
||||
[in] IGraphBuilder *pFilterGraph);
|
||||
|
||||
HRESULT GetFilterGraph(
|
||||
[out] IGraphBuilder **ppGraphBuilder);
|
||||
|
||||
HRESULT GetFilter(
|
||||
[out] IMediaStreamFilter **ppFilter);
|
||||
|
||||
HRESULT AddMediaStream(
|
||||
[in] IUnknown *pStreamObject,
|
||||
[in] const MSPID *PurposeId,
|
||||
[in] DWORD dwFlags,
|
||||
[out] IMediaStream **ppNewStream);
|
||||
|
||||
HRESULT OpenFile(
|
||||
[in] LPCWSTR pszFileName,
|
||||
[in] DWORD dwFlags);
|
||||
|
||||
HRESULT OpenMoniker(
|
||||
[in] IBindCtx *pCtx,
|
||||
[in] IMoniker *pMoniker,
|
||||
[in] DWORD dwFlags);
|
||||
|
||||
HRESULT Render(
|
||||
[in] DWORD dwFlags);
|
||||
}
|
||||
|
||||
|
||||
// IAMMediaStream interface
|
||||
[
|
||||
object,
|
||||
uuid(BEBE595D-9A6F-11d0-8FDE-00C04FD9189D),
|
||||
pointer_default(unique)
|
||||
]
|
||||
interface IAMMediaStream : IMediaStream
|
||||
{
|
||||
HRESULT Initialize(
|
||||
[in] IUnknown *pSourceObject,
|
||||
[in] DWORD dwFlags,
|
||||
[in] REFMSPID PurposeId,
|
||||
[in] const STREAM_TYPE StreamType);
|
||||
|
||||
HRESULT SetState(
|
||||
[in] FILTER_STATE State);
|
||||
|
||||
HRESULT JoinAMMultiMediaStream(
|
||||
[in] IAMMultiMediaStream *pAMMultiMediaStream);
|
||||
|
||||
HRESULT JoinFilter(
|
||||
[in] IMediaStreamFilter *pMediaStreamFilter);
|
||||
|
||||
HRESULT JoinFilterGraph(
|
||||
[in] IFilterGraph *pFilterGraph);
|
||||
};
|
||||
|
||||
|
||||
|
||||
|
||||
// IMediaStreamFilter interface
|
||||
[
|
||||
object,
|
||||
local,
|
||||
uuid(BEBE595E-9A6F-11d0-8FDE-00C04FD9189D),
|
||||
pointer_default(unique)
|
||||
]
|
||||
interface IMediaStreamFilter : IBaseFilter
|
||||
{
|
||||
HRESULT AddMediaStream(
|
||||
[in] IAMMediaStream *pAMMediaStream);
|
||||
|
||||
HRESULT GetMediaStream(
|
||||
[in] REFMSPID idPurpose,
|
||||
[out] IMediaStream **ppMediaStream);
|
||||
|
||||
HRESULT EnumMediaStreams(
|
||||
[in] long Index,
|
||||
[out] IMediaStream **ppMediaStream);
|
||||
|
||||
HRESULT SupportSeeking(
|
||||
[in] BOOL bRenderer);
|
||||
|
||||
HRESULT ReferenceTimeToStreamTime(
|
||||
[in] [out] REFERENCE_TIME *pTime);
|
||||
|
||||
HRESULT GetCurrentStreamTime(
|
||||
[out] REFERENCE_TIME *pCurrentStreamTime);
|
||||
|
||||
HRESULT WaitUntil(
|
||||
[in] REFERENCE_TIME WaitStreamTime);
|
||||
|
||||
HRESULT Flush(
|
||||
[in] BOOL bCancelEOS);
|
||||
|
||||
HRESULT EndOfStream();
|
||||
};
|
||||
|
||||
|
||||
|
||||
[
|
||||
object,
|
||||
local,
|
||||
uuid(AB6B4AFC-F6E4-11d0-900D-00C04FD9189D),
|
||||
pointer_default(unique)
|
||||
]
|
||||
interface IDirectDrawMediaSampleAllocator : IUnknown
|
||||
{
|
||||
HRESULT GetDirectDraw(IDirectDraw **ppDirectDraw);
|
||||
};
|
||||
|
||||
|
||||
[
|
||||
object,
|
||||
local,
|
||||
uuid(AB6B4AFE-F6E4-11d0-900D-00C04FD9189D),
|
||||
pointer_default(unique)
|
||||
]
|
||||
interface IDirectDrawMediaSample : IUnknown
|
||||
{
|
||||
HRESULT GetSurfaceAndReleaseLock(
|
||||
[out] IDirectDrawSurface **ppDirectDrawSurface,
|
||||
[out] RECT * pRect);
|
||||
HRESULT LockMediaSamplePointer(void);
|
||||
};
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
[
|
||||
object,
|
||||
local,
|
||||
uuid(AB6B4AFA-F6E4-11d0-900D-00C04FD9189D),
|
||||
pointer_default(unique)
|
||||
]
|
||||
|
||||
interface IAMMediaTypeStream : IMediaStream
|
||||
{
|
||||
HRESULT GetFormat(
|
||||
[out] AM_MEDIA_TYPE * pMediaType,
|
||||
[in] DWORD dwFlags);
|
||||
|
||||
HRESULT SetFormat(
|
||||
[in] AM_MEDIA_TYPE * pMediaType,
|
||||
[in] DWORD dwFlags);
|
||||
|
||||
HRESULT CreateSample(
|
||||
[in] long lSampleSize,
|
||||
[in] BYTE * pbBuffer,
|
||||
[in] DWORD dwFlags,
|
||||
[in] IUnknown *pUnkOuter,
|
||||
[out] IAMMediaTypeSample ** ppAMMediaTypeSample);
|
||||
|
||||
HRESULT GetStreamAllocatorRequirements(
|
||||
[out] ALLOCATOR_PROPERTIES *pProps);
|
||||
|
||||
HRESULT SetStreamAllocatorRequirements(
|
||||
[in] ALLOCATOR_PROPERTIES *pProps);
|
||||
};
|
||||
|
||||
|
||||
[
|
||||
object,
|
||||
local,
|
||||
uuid(AB6B4AFB-F6E4-11d0-900D-00C04FD9189D),
|
||||
pointer_default(unique)
|
||||
]
|
||||
interface IAMMediaTypeSample : IStreamSample
|
||||
{
|
||||
//
|
||||
// Unique methods for IAMMediaTypeSample
|
||||
//
|
||||
HRESULT SetPointer([in] BYTE *pBuffer, [in] long lSize);
|
||||
|
||||
//
|
||||
// Mirror of IMediaSample
|
||||
//
|
||||
HRESULT GetPointer([out] BYTE ** ppBuffer);
|
||||
long GetSize(void);
|
||||
HRESULT GetTime([out] REFERENCE_TIME * pTimeStart, [out] REFERENCE_TIME * pTimeEnd);
|
||||
HRESULT SetTime([in] REFERENCE_TIME * pTimeStart, [in] REFERENCE_TIME * pTimeEnd);
|
||||
HRESULT IsSyncPoint(void);
|
||||
HRESULT SetSyncPoint(BOOL bIsSyncPoint);
|
||||
HRESULT IsPreroll(void);
|
||||
HRESULT SetPreroll(BOOL bIsPreroll);
|
||||
long GetActualDataLength(void);
|
||||
HRESULT SetActualDataLength(long);
|
||||
HRESULT GetMediaType(AM_MEDIA_TYPE **ppMediaType);
|
||||
HRESULT SetMediaType(AM_MEDIA_TYPE *pMediaType);
|
||||
HRESULT IsDiscontinuity(void);
|
||||
HRESULT SetDiscontinuity(BOOL bDiscontinuity);
|
||||
HRESULT GetMediaTime([out] LONGLONG * pTimeStart, [out] LONGLONG * pTimeEnd);
|
||||
HRESULT SetMediaTime([in] LONGLONG * pTimeStart, [in] LONGLONG * pTimeEnd);
|
||||
};
|
||||
|
||||
|
||||
[
|
||||
uuid(4E6CDE29-C0C4-11d0-8FF1-00C04FD9189D),
|
||||
version(1.0),
|
||||
helpstring("DirectShowStream 1.0 Type Library")
|
||||
]
|
||||
|
||||
library DirectShowStreamLib
|
||||
{
|
||||
importlib("stdole32.tlb");
|
||||
importlib("stdole2.tlb");
|
||||
|
||||
[
|
||||
uuid(49c47ce5-9ba4-11d0-8212-00c04fc32c45),
|
||||
helpstring("DirectShow Multi Media Stream")
|
||||
]
|
||||
coclass AMMultiMediaStream
|
||||
{
|
||||
[default] dispinterface IDirectShowStream;
|
||||
};
|
||||
};
|
||||
|
||||
|
||||
|
||||
//
|
||||
// The MIDL compiler wants to produce a CLSID for everything defined in
|
||||
// our type library, but it also wants to generate huge, fat proxy code
|
||||
// so we use DEFINE_GUID for all other classes. It has another interesting
|
||||
// bug in that it defines CLSID_AMMultiMediaStream within a #ifdef __cplusplus
|
||||
// block, so we need to define it outside of that scope.
|
||||
//
|
||||
|
||||
cpp_quote("#ifndef __cplusplus")
|
||||
cpp_quote("EXTERN_C const CLSID CLSID_AMMultiMediaStream;")
|
||||
cpp_quote("#endif")
|
||||
|
||||
cpp_quote("DEFINE_GUID(CLSID_AMDirectDrawStream, /* 49c47ce4-9ba4-11d0-8212-00c04fc32c45 */")
|
||||
cpp_quote("0x49c47ce4, 0x9ba4, 0x11d0, 0x82, 0x12, 0x00, 0xc0, 0x4f, 0xc3, 0x2c, 0x45);")
|
||||
cpp_quote("DEFINE_GUID(CLSID_AMAudioStream, /* 8496e040-af4c-11d0-8212-00c04fc32c45 */")
|
||||
cpp_quote("0x8496e040, 0xaf4c, 0x11d0, 0x82, 0x12, 0x00, 0xc0, 0x4f, 0xc3, 0x2c, 0x45);")
|
||||
cpp_quote("DEFINE_GUID(CLSID_AMAudioData, /* f2468580-af8a-11d0-8212-00c04fc32c45 */")
|
||||
cpp_quote("0xf2468580, 0xaf8a, 0x11d0, 0x82, 0x12, 0x00, 0xc0, 0x4f, 0xc3, 0x2c, 0x45);")
|
||||
cpp_quote("DEFINE_GUID(CLSID_AMMediaTypeStream, /* CF0F2F7C-F7BF-11d0-900D-00C04FD9189D */")
|
||||
cpp_quote("0xcf0f2f7c, 0xf7bf, 0x11d0, 0x90, 0xd, 0x0, 0xc0, 0x4f, 0xd9, 0x18, 0x9d);")
|
|
@ -0,0 +1,171 @@
|
|||
//------------------------------------------------------------------------------
|
||||
// File: AMVPE.idl
|
||||
//
|
||||
// Desc:
|
||||
//
|
||||
// Copyright (c) 1992 - 2000, Microsoft Corporation. All rights reserved.
|
||||
//------------------------------------------------------------------------------
|
||||
|
||||
|
||||
import "unknwn.idl";
|
||||
import "objidl.idl"; // for IPersist (IFilter's root)
|
||||
|
||||
|
||||
/*
|
||||
* VIDOESIGNALINFO
|
||||
*/
|
||||
typedef struct _VIDEOSIGNALINFO
|
||||
{
|
||||
DWORD dwSize; // Size of the structure
|
||||
DWORD dwVREFHeight; // Specifies the number of lines of data in the vref
|
||||
BOOL bDoubleClock; // videoport should enable double clocking
|
||||
BOOL bVACT; // videoport should use an external VACT signal
|
||||
BOOL bInterlaced; // Indicates that the signal is interlaced
|
||||
BOOL bHalfline; // Device will write half lines into the frame buffer
|
||||
BOOL bInvertedPolarity; // Devoce inverts the polarity by default
|
||||
} AMVIDEOSIGNALINFO;
|
||||
|
||||
typedef struct AMVIDEOSIGNALINFO *LPAMVIDEOSIGNALINFO;
|
||||
|
||||
|
||||
interface IVPEConfig;
|
||||
interface IVPE;
|
||||
|
||||
|
||||
/*
|
||||
* DDVIDEOPORTCONNECT
|
||||
*/
|
||||
typedef struct _DDVIDEOPORTCONNECT
|
||||
{
|
||||
DWORD dwSize; // size of the DDVIDEOPORTCONNECT structure
|
||||
GUID guidTypeID; // Description of video port connection
|
||||
DWORD dwPortWidth; // Width of the video port
|
||||
DWORD dwFlags; // Connection flags
|
||||
} DDVIDEOPORTCONNECT;
|
||||
|
||||
typedef DDVIDEOPORTCONNECT *LPDDVIDEOPORTCONNECT;
|
||||
|
||||
|
||||
|
||||
/*
|
||||
* DDPIXELFORMAT
|
||||
*/
|
||||
typedef struct _DDPIXELFORMAT
|
||||
{
|
||||
DWORD dwSize; // size of structure
|
||||
DWORD dwFlags; // pixel format flags
|
||||
DWORD dwFourCC; // (FOURCC code)
|
||||
union
|
||||
{
|
||||
DWORD dwRGBBitCount; // how many bits per pixel (BD_1,2,4,8,16,24,32)
|
||||
DWORD dwYUVBitCount; // how many bits per pixel (BD_4,8,16,24,32)
|
||||
DWORD dwZBufferBitDepth; // how many bits for z buffers (BD_8,16,24,32)
|
||||
DWORD dwAlphaBitDepth; // how many bits for alpha channels (BD_1,2,4,8)
|
||||
};
|
||||
union
|
||||
{
|
||||
DWORD dwRBitMask; // mask for red bit
|
||||
DWORD dwYBitMask; // mask for Y bits
|
||||
};
|
||||
union
|
||||
{
|
||||
DWORD dwGBitMask; // mask for green bits
|
||||
DWORD dwUBitMask; // mask for U bits
|
||||
};
|
||||
union
|
||||
{
|
||||
DWORD dwBBitMask; // mask for blue bits
|
||||
DWORD dwVBitMask; // mask for V bits
|
||||
};
|
||||
union
|
||||
{
|
||||
DWORD dwRGBAlphaBitMask; // mask for alpha channel
|
||||
DWORD dwYUVAlphaBitMask; // mask for alpha channel
|
||||
DWORD dwRGBZBitMask; // mask for Z channel
|
||||
DWORD dwYUVZBitMask; // mask for Z channel
|
||||
};
|
||||
} DDPIXELFORMAT;
|
||||
|
||||
typedef DDPIXELFORMAT * LPDDPIXELFORMAT;
|
||||
|
||||
|
||||
[
|
||||
object,
|
||||
uuid(BC29A660-30E3-11d0-9E69-00C04FD7C15B),
|
||||
pointer_default(unique)
|
||||
]
|
||||
|
||||
interface IVPEConfig : IUnknown {
|
||||
|
||||
// gets the various connection information structures (guid, portwidth)
|
||||
// in an array of structures. If the pointer to the array is NULL, first
|
||||
// parameter returns the total number of formats supported.
|
||||
HRESULT GetConnectInfo(
|
||||
[in,out] LPDWORD lpNumConnectInfo,
|
||||
[out] LPDDVIDEOPORTCONNECT lpddvpConnectInfo
|
||||
);
|
||||
|
||||
HRESULT SetConnectInfo(
|
||||
[in] DDVIDEOPORTCONNECT ddvpConnectInfo
|
||||
);
|
||||
|
||||
// gets the various formats supported by the decoder in an array
|
||||
// of structures. If the pointer to the array is NULL, first parameter
|
||||
// returns the total number of formats supported.
|
||||
HRESULT GetVideoFormats(
|
||||
[in,out] LPDWORD lpNumFormats,
|
||||
[out] LPDDPIXELFORMAT lpddpfFormats
|
||||
);
|
||||
|
||||
// retrives maximum pixels per second rate expected for a given
|
||||
// format and a given scaling factor. If decoder does not support
|
||||
// those scaling factors, then it gives the rate and the nearest
|
||||
// scaling factors.
|
||||
HRESULT GetMaxPixelRate(
|
||||
[in] DDPIXELFORMAT ddpfFormat,
|
||||
[in,out] LPDWORD lpdwZoomHeight,
|
||||
[in,out] LPDWORD lpdwZoomWidth,
|
||||
[out] LPDWORD lpdwMaxPixelsPerSecond
|
||||
);
|
||||
|
||||
// retrives various properties of the decoder for a given format
|
||||
HRESULT GetVideoSignalInfo(
|
||||
[in] DDPIXELFORMAT ddpfFormat,
|
||||
[out] LPAMVIDEOSIGNALINFO lpAMVideoSignalInfo
|
||||
);
|
||||
|
||||
// asks the decoder to ouput in this format. Return value should give
|
||||
// appropriate error code
|
||||
HRESULT SetVideoFormat(
|
||||
[in] DDPIXELFORMAT ddpfFormat
|
||||
);
|
||||
|
||||
// asks the decoder to treat even fields like odd fields and visa versa
|
||||
HRESULT SetInvertPolarity(
|
||||
);
|
||||
|
||||
// sets the scaling factors. If decoder does not support these,
|
||||
// then it sets the values to the nearest factors it can support
|
||||
HRESULT SetScalingFactors(
|
||||
[in,out] LPDWORD lpdwZoomHeight,
|
||||
[in,out] LPDWORD lpdwZoomWidth
|
||||
);
|
||||
|
||||
}
|
||||
|
||||
|
||||
|
||||
[
|
||||
object,
|
||||
uuid(BC29A661-30E3-11d0-9E69-00C04FD7C15B),
|
||||
pointer_default(unique)
|
||||
]
|
||||
|
||||
interface IVPE : IUnknown {
|
||||
HRESULT SetOverlaySurface(
|
||||
// [in] LPDIRECTDRAWSURFACE lpOverlaySurface,
|
||||
[in] LPUNKNOWN lpOverlaySurface,
|
||||
[in] INT iNumBackBuffers
|
||||
);
|
||||
|
||||
}
|
|
@ -0,0 +1,106 @@
|
|||
//------------------------------------------------------------------------------
|
||||
// File: AuStream.idl
|
||||
//
|
||||
// Desc:
|
||||
//
|
||||
// Copyright (c) 1998 - 2000, Microsoft Corporation. All rights reserved.
|
||||
//------------------------------------------------------------------------------
|
||||
|
||||
|
||||
import "unknwn.idl";
|
||||
import "mmstream.idl";
|
||||
|
||||
cpp_quote("//")
|
||||
cpp_quote("// The following declarations within the 'if 0' block are dummy typedefs used to make")
|
||||
cpp_quote("// the ddstream.idl file build. The actual definitions are contained in DDRAW.H")
|
||||
cpp_quote("//")
|
||||
cpp_quote("#if 0")
|
||||
typedef struct tWAVEFORMATEX WAVEFORMATEX;
|
||||
cpp_quote ("#endif")
|
||||
|
||||
interface IAudioMediaStream;
|
||||
interface IAudioStreamSample;
|
||||
interface IMemoryData;
|
||||
interface IAudioData;
|
||||
|
||||
// IAudioMediaStream
|
||||
|
||||
|
||||
[
|
||||
object,
|
||||
local,
|
||||
uuid(f7537560-a3be-11d0-8212-00c04fc32c45),
|
||||
pointer_default(unique)
|
||||
]
|
||||
interface IAudioMediaStream : IMediaStream
|
||||
{
|
||||
|
||||
HRESULT GetFormat(
|
||||
[out] WAVEFORMATEX *pWaveFormatCurrent
|
||||
);
|
||||
|
||||
HRESULT SetFormat(
|
||||
[in] const WAVEFORMATEX *lpWaveFormat);
|
||||
|
||||
HRESULT CreateSample(
|
||||
[in] IAudioData *pAudioData,
|
||||
[in] DWORD dwFlags,
|
||||
[out] IAudioStreamSample **ppSample
|
||||
);
|
||||
}
|
||||
|
||||
[
|
||||
object,
|
||||
local,
|
||||
uuid(345fee00-aba5-11d0-8212-00c04fc32c45),
|
||||
pointer_default(unique)
|
||||
]
|
||||
interface IAudioStreamSample : IStreamSample
|
||||
{
|
||||
HRESULT GetAudioData(
|
||||
[out] IAudioData **ppAudio
|
||||
);
|
||||
}
|
||||
|
||||
|
||||
[
|
||||
object,
|
||||
local,
|
||||
uuid(327fc560-af60-11d0-8212-00c04fc32c45),
|
||||
pointer_default(unique)
|
||||
]
|
||||
interface IMemoryData : IUnknown
|
||||
{
|
||||
HRESULT SetBuffer(
|
||||
[in] DWORD cbSize,
|
||||
[in] BYTE *pbData,
|
||||
[in] DWORD dwFlags
|
||||
);
|
||||
|
||||
HRESULT GetInfo(
|
||||
[out] DWORD *pdwLength,
|
||||
[out] BYTE **ppbData,
|
||||
[out] DWORD *pcbActualData
|
||||
);
|
||||
HRESULT SetActual(
|
||||
[in] DWORD cbDataValid
|
||||
);
|
||||
}
|
||||
|
||||
[
|
||||
object,
|
||||
local,
|
||||
uuid(54c719c0-af60-11d0-8212-00c04fc32c45),
|
||||
pointer_default(unique)
|
||||
]
|
||||
interface IAudioData : IMemoryData
|
||||
{
|
||||
HRESULT GetFormat(
|
||||
[out] WAVEFORMATEX *pWaveFormatCurrent
|
||||
);
|
||||
|
||||
HRESULT SetFormat(
|
||||
[in] const WAVEFORMATEX *lpWaveFormat
|
||||
);
|
||||
}
|
||||
|
File diff suppressed because it is too large
Load Diff
File diff suppressed because it is too large
Load Diff
|
@ -0,0 +1,772 @@
|
|||
//------------------------------------------------------------------------------
|
||||
// File: BDAIface.idl
|
||||
//
|
||||
// Desc: This file defines the Ring 3 BDA interfaces that are common to
|
||||
// all BDA network and device types.
|
||||
//
|
||||
// The interfaces specific to a particular Network Type or filter
|
||||
// implementation are defined in a separate include file for that
|
||||
// Network Type or filter implementation.
|
||||
//
|
||||
// Copyright (c) 1999 - 2000, Microsoft Corporation. All rights reserved.
|
||||
//------------------------------------------------------------------------------
|
||||
|
||||
|
||||
//---------------------------------------------------------------------
|
||||
// IUnknown import idl
|
||||
//---------------------------------------------------------------------
|
||||
#ifndef DO_NO_IMPORTS
|
||||
import "unknwn.idl";
|
||||
import "strmif.idl";
|
||||
import "BdaTypes.h";
|
||||
#endif
|
||||
|
||||
//---------------------------------------------------------------------
|
||||
//
|
||||
// IBDA_NetworkProvider interface
|
||||
//
|
||||
// Implemented by a BDA Network Provider
|
||||
//
|
||||
// Used by a BDA device filter to register itself with
|
||||
// a Network Provider and query information about the
|
||||
// the current tuning request.
|
||||
//
|
||||
//---------------------------------------------------------------------
|
||||
[
|
||||
object,
|
||||
uuid(fd501041-8ebe-11ce-8183-00aa00577da2),
|
||||
pointer_default(unique)
|
||||
]
|
||||
|
||||
interface IBDA_NetworkProvider : IUnknown
|
||||
{
|
||||
|
||||
HRESULT
|
||||
PutSignalSource (
|
||||
[in] ULONG ulSignalSource
|
||||
);
|
||||
|
||||
|
||||
HRESULT
|
||||
GetSignalSource (
|
||||
[in, out] ULONG * pulSignalSource
|
||||
);
|
||||
|
||||
HRESULT
|
||||
GetNetworkType (
|
||||
[in, out] GUID * pguidNetworkType
|
||||
);
|
||||
|
||||
HRESULT
|
||||
PutTuningSpace (
|
||||
[in] REFGUID guidTuningSpace
|
||||
);
|
||||
|
||||
HRESULT
|
||||
GetTuningSpace (
|
||||
[in, out] GUID * pguidTuingSpace
|
||||
);
|
||||
|
||||
HRESULT
|
||||
RegisterDeviceFilter (
|
||||
[in] IUnknown * pUnkFilterControl,
|
||||
[in, out] ULONG * ppvRegisitrationContext
|
||||
);
|
||||
|
||||
HRESULT
|
||||
UnRegisterDeviceFilter (
|
||||
[in] ULONG pvRegistrationContext
|
||||
);
|
||||
|
||||
}
|
||||
|
||||
|
||||
//---------------------------------------------------------------------
|
||||
//
|
||||
// IBDA_EthernetFilter interface
|
||||
//
|
||||
// Implemented by a BDA Network Provider
|
||||
//
|
||||
// Used by an Ethernet Network Data Sink filter (eg. IPSink) to
|
||||
// request that the Network Provider make its best effort to tune
|
||||
// to the stream(s) on which a list of Ethernet multicast addresses
|
||||
// may be transmitted.
|
||||
//
|
||||
// Addresses in the address list are byte aligned in Network order.
|
||||
// UlcbAddresses will always be an integer multiple of the
|
||||
// size of an ethernet address.
|
||||
//
|
||||
//---------------------------------------------------------------------
|
||||
[
|
||||
object,
|
||||
uuid(71985F43-1CA1-11d3-9CC8-00C04F7971E0),
|
||||
pointer_default(unique)
|
||||
]
|
||||
|
||||
interface IBDA_EthernetFilter : IUnknown
|
||||
{
|
||||
HRESULT
|
||||
GetMulticastListSize (
|
||||
[in, out] ULONG * pulcbAddresses
|
||||
);
|
||||
|
||||
HRESULT
|
||||
PutMulticastList (
|
||||
[in] ULONG ulcbAddresses,
|
||||
[in, size_is(ulcbAddresses)] BYTE pAddressList []
|
||||
);
|
||||
|
||||
HRESULT
|
||||
GetMulticastList (
|
||||
[in, out] ULONG * pulcbAddresses,
|
||||
[out, size_is(*pulcbAddresses)] BYTE pAddressList []
|
||||
);
|
||||
|
||||
HRESULT
|
||||
PutMulticastMode (
|
||||
[in] ULONG ulModeMask
|
||||
);
|
||||
|
||||
HRESULT
|
||||
GetMulticastMode (
|
||||
[out] ULONG * pulModeMask
|
||||
);
|
||||
|
||||
}
|
||||
|
||||
|
||||
|
||||
//---------------------------------------------------------------------
|
||||
//
|
||||
// IBDA_IPV4Filter interface
|
||||
//
|
||||
// Implemented by a BDA Network Provider
|
||||
//
|
||||
// Used by an IPv4 Network Data Sink filter to request
|
||||
// that the Network Provider make its best effort to tune
|
||||
// to the stream(s) on which a list of IPv4 multicast addresses
|
||||
// may be transmitted.
|
||||
//
|
||||
// Addresses in the address list are byte aligned in Network order.
|
||||
// UlcbAddresses will always be an integer multiple of the
|
||||
// size of an IPv4 address.
|
||||
//
|
||||
//---------------------------------------------------------------------
|
||||
[
|
||||
object,
|
||||
uuid(71985F44-1CA1-11d3-9CC8-00C04F7971E0),
|
||||
pointer_default(unique)
|
||||
]
|
||||
|
||||
interface IBDA_IPV4Filter : IUnknown
|
||||
{
|
||||
|
||||
HRESULT
|
||||
GetMulticastListSize (
|
||||
[in, out] ULONG * pulcbAddresses
|
||||
);
|
||||
|
||||
HRESULT
|
||||
PutMulticastList (
|
||||
[in] ULONG ulcbAddresses,
|
||||
[in, size_is(ulcbAddresses)] BYTE pAddressList []
|
||||
);
|
||||
|
||||
HRESULT
|
||||
GetMulticastList (
|
||||
[in, out] ULONG * pulcbAddresses,
|
||||
[out, size_is(*pulcbAddresses)] BYTE pAddressList []
|
||||
);
|
||||
|
||||
HRESULT
|
||||
PutMulticastMode (
|
||||
[in] ULONG ulModeMask
|
||||
);
|
||||
|
||||
HRESULT
|
||||
GetMulticastMode (
|
||||
[out] ULONG* pulModeMask
|
||||
);
|
||||
}
|
||||
|
||||
|
||||
|
||||
//---------------------------------------------------------------------
|
||||
//
|
||||
// IBDA_IPV6Filter interface
|
||||
//
|
||||
// Implemented by a BDA Network Provider
|
||||
//
|
||||
// Used by an IPv6 Network Data Sink filter to request
|
||||
// that the Network Provider make its best effort to tune
|
||||
// to the stream(s) on which a list of IPv6 multicast addresses
|
||||
// may be transmitted.
|
||||
//
|
||||
// Addresses in the address list are byte aligned in Network order.
|
||||
// UlcbAddresses will always be an integer multiple of the
|
||||
// size of an IPv6 address.
|
||||
//
|
||||
//---------------------------------------------------------------------
|
||||
[
|
||||
object,
|
||||
uuid(E1785A74-2A23-4fb3-9245-A8F88017EF33),
|
||||
pointer_default(unique)
|
||||
]
|
||||
|
||||
interface IBDA_IPV6Filter : IUnknown
|
||||
{
|
||||
|
||||
HRESULT
|
||||
GetMulticastListSize (
|
||||
[in, out] ULONG * pulcbAddresses
|
||||
);
|
||||
|
||||
HRESULT
|
||||
PutMulticastList (
|
||||
[in] ULONG ulcbAddresses,
|
||||
[in, size_is(ulcbAddresses)] BYTE pAddressList []
|
||||
);
|
||||
|
||||
HRESULT
|
||||
GetMulticastList (
|
||||
[in, out] ULONG * pulcbAddresses,
|
||||
[out, size_is(*pulcbAddresses)] BYTE pAddressList []
|
||||
);
|
||||
|
||||
HRESULT
|
||||
PutMulticastMode (
|
||||
[in] ULONG ulModeMask
|
||||
);
|
||||
|
||||
HRESULT
|
||||
GetMulticastMode (
|
||||
[out] ULONG* pulModeMask
|
||||
);
|
||||
}
|
||||
|
||||
|
||||
|
||||
//---------------------------------------------------------------------
|
||||
//
|
||||
// IBDA_DeviceControl interface
|
||||
//
|
||||
// Implemented by a BDA Device Filter
|
||||
//
|
||||
// Used by the Network Provider to commit a series of changes
|
||||
// on a BDA device filter. The device filter validates and
|
||||
// accumulates all changes requested after StartChanges(). It
|
||||
// effects the accumulated list of changes when CommitChanges() is
|
||||
// called.
|
||||
//
|
||||
//---------------------------------------------------------------------
|
||||
[
|
||||
object,
|
||||
uuid(FD0A5AF3-B41D-11d2-9C95-00C04F7971E0),
|
||||
pointer_default(unique)
|
||||
]
|
||||
|
||||
interface IBDA_DeviceControl : IUnknown
|
||||
{
|
||||
HRESULT
|
||||
StartChanges (
|
||||
void
|
||||
);
|
||||
|
||||
HRESULT
|
||||
CheckChanges (
|
||||
void
|
||||
);
|
||||
|
||||
HRESULT
|
||||
CommitChanges (
|
||||
void
|
||||
);
|
||||
|
||||
HRESULT
|
||||
GetChangeState (
|
||||
[in, out] ULONG * pState
|
||||
);
|
||||
|
||||
}
|
||||
|
||||
|
||||
|
||||
//---------------------------------------------------------------------
|
||||
//
|
||||
// IBDA_PinControl interface
|
||||
//
|
||||
// Implemented by a BDA Device Filter's Pin
|
||||
//
|
||||
// Used by the Network Provider to determine the BDA PinID and
|
||||
// PinType on a BDA Filter's Pin
|
||||
//
|
||||
//---------------------------------------------------------------------
|
||||
[
|
||||
object,
|
||||
uuid(0DED49D5-A8B7-4d5d-97A1-12B0C195874D),
|
||||
pointer_default(unique)
|
||||
]
|
||||
|
||||
interface IBDA_PinControl : IUnknown
|
||||
{
|
||||
HRESULT
|
||||
GetPinID (
|
||||
[in, out] ULONG * pulPinID
|
||||
);
|
||||
|
||||
HRESULT
|
||||
GetPinType (
|
||||
[in, out] ULONG * pulPinType
|
||||
);
|
||||
}
|
||||
|
||||
//---------------------------------------------------------------------
|
||||
//
|
||||
// IBDA_SignalProperties interface
|
||||
//
|
||||
// Implemented by a BDA Device Filter
|
||||
//
|
||||
// BDA Signal Properties is used by a Network Provider to inform
|
||||
// a BDA Device Filter about the current tuning request. The
|
||||
// Network Provider will call the Put functions when the BDA
|
||||
// device is first registered with the Network Provider and whenever
|
||||
// the current tuning request is modified.
|
||||
//
|
||||
//---------------------------------------------------------------------
|
||||
[
|
||||
object,
|
||||
uuid(D2F1644B-B409-11d2-BC69-00A0C9EE9E16),
|
||||
pointer_default(unique)
|
||||
]
|
||||
|
||||
interface IBDA_SignalProperties : IUnknown
|
||||
{
|
||||
HRESULT
|
||||
PutNetworkType (
|
||||
[in] REFGUID guidNetworkType
|
||||
);
|
||||
|
||||
HRESULT
|
||||
GetNetworkType (
|
||||
[in, out] GUID * pguidNetworkType
|
||||
);
|
||||
|
||||
HRESULT
|
||||
PutSignalSource (
|
||||
[in] ULONG ulSignalSource
|
||||
);
|
||||
|
||||
HRESULT
|
||||
GetSignalSource (
|
||||
[in, out] ULONG * pulSignalSource
|
||||
);
|
||||
|
||||
HRESULT
|
||||
PutTuningSpace (
|
||||
[in] REFGUID guidTuningSpace
|
||||
);
|
||||
|
||||
HRESULT
|
||||
GetTuningSpace (
|
||||
[in, out] GUID * pguidTuingSpace
|
||||
);
|
||||
}
|
||||
|
||||
|
||||
//---------------------------------------------------------------------
|
||||
//
|
||||
// IBDA_Topology interface
|
||||
//
|
||||
// Implemented by a BDA Device Filter
|
||||
//
|
||||
// Used by the Network Provider to query a BDA Device Filter's
|
||||
// possible topologies (template topology) and to configure
|
||||
// the device with an appropriate topology for the current
|
||||
// tuning request. It is also used to get an IUnknown to
|
||||
// a control node which may be used to set specific tuning
|
||||
// information.
|
||||
//
|
||||
//---------------------------------------------------------------------
|
||||
[
|
||||
object,
|
||||
uuid(A14EE835-0A23-11d3-9CC7-00C04F7971E0),
|
||||
pointer_default(unique)
|
||||
]
|
||||
|
||||
interface IBDA_Topology : IUnknown
|
||||
{
|
||||
HRESULT
|
||||
GetNodeTypes (
|
||||
[in, out] ULONG * pulcNodeTypes,
|
||||
[in] ULONG ulcNodeTypesMax,
|
||||
[in, out, size_is (ulcNodeTypesMax)] ULONG rgulNodeTypes[]
|
||||
);
|
||||
|
||||
|
||||
HRESULT
|
||||
GetNodeInterfaces (
|
||||
[in] ULONG ulNodeType,
|
||||
[in, out] ULONG * pulcInterfaces,
|
||||
[in] ULONG ulcInterfacesMax,
|
||||
[in, out, size_is (ulcInterfacesMax)] GUID * rgguidInterfaces[]
|
||||
);
|
||||
|
||||
HRESULT
|
||||
GetPinTypes (
|
||||
[in, out] ULONG * pulcPinTypes,
|
||||
[in] ULONG ulcPinTypesMax,
|
||||
[in, out, size_is (ulcPinTypesMax)] ULONG rgulPinTypes[]
|
||||
);
|
||||
|
||||
HRESULT
|
||||
GetTemplateConnections (
|
||||
[in, out] ULONG * pulcConnections,
|
||||
[in] ULONG ulcConnectionsMax,
|
||||
[in, out, size_is (ulcConnectionsMax)] BDA_TEMPLATE_CONNECTION rgConnections[]
|
||||
);
|
||||
|
||||
HRESULT
|
||||
CreatePin (
|
||||
[in] ULONG ulPinType,
|
||||
[in, out] ULONG * pulPinId
|
||||
);
|
||||
|
||||
HRESULT
|
||||
DeletePin (
|
||||
[in] ULONG ulPinId
|
||||
);
|
||||
|
||||
HRESULT
|
||||
SetMediaType (
|
||||
[in] ULONG ulPinId,
|
||||
[in] AM_MEDIA_TYPE * pMediaType
|
||||
);
|
||||
|
||||
HRESULT
|
||||
SetMedium (
|
||||
[in] ULONG ulPinId,
|
||||
[in] REGPINMEDIUM * pMedium
|
||||
);
|
||||
|
||||
HRESULT
|
||||
CreateTopology (
|
||||
[in] ULONG ulInputPinId,
|
||||
[in] ULONG ulOutputPinId
|
||||
);
|
||||
|
||||
HRESULT
|
||||
GetControlNode (
|
||||
[in] ULONG ulInputPinId,
|
||||
[in] ULONG ulOutputPinId,
|
||||
[in] ULONG ulNodeType,
|
||||
[in, out] IUnknown ** ppControlNode
|
||||
);
|
||||
}
|
||||
|
||||
//---------------------------------------------------------------------
|
||||
// IBDA_VoidTransform interface
|
||||
//---------------------------------------------------------------------
|
||||
[
|
||||
object,
|
||||
uuid(71985F46-1CA1-11d3-9CC8-00C04F7971E0),
|
||||
pointer_default(unique)
|
||||
]
|
||||
|
||||
interface IBDA_VoidTransform : IUnknown
|
||||
{
|
||||
HRESULT
|
||||
Start (
|
||||
void
|
||||
);
|
||||
|
||||
HRESULT
|
||||
Stop (
|
||||
void
|
||||
);
|
||||
|
||||
}
|
||||
|
||||
//---------------------------------------------------------------------
|
||||
// IBDA_NullTransform interface
|
||||
//---------------------------------------------------------------------
|
||||
[
|
||||
object,
|
||||
uuid(DDF15B0D-BD25-11d2-9CA0-00C04F7971E0),
|
||||
pointer_default(unique)
|
||||
]
|
||||
|
||||
interface IBDA_NullTransform : IUnknown
|
||||
{
|
||||
HRESULT
|
||||
Start (
|
||||
void
|
||||
);
|
||||
|
||||
HRESULT
|
||||
Stop (
|
||||
void
|
||||
);
|
||||
|
||||
}
|
||||
|
||||
//---------------------------------------------------------------------
|
||||
// IBDA_FrequencyFilter interface
|
||||
//---------------------------------------------------------------------
|
||||
[
|
||||
object,
|
||||
uuid(71985F47-1CA1-11d3-9CC8-00C04F7971E0),
|
||||
pointer_default(unique)
|
||||
]
|
||||
|
||||
interface IBDA_FrequencyFilter : IUnknown
|
||||
{
|
||||
HRESULT
|
||||
put_Autotune (
|
||||
[in] ULONG * pulTransponder
|
||||
);
|
||||
|
||||
HRESULT
|
||||
put_Frequency (
|
||||
[in] ULONG * pulFrequency
|
||||
);
|
||||
|
||||
HRESULT
|
||||
get_Frequency (
|
||||
[in, out] ULONG * pulFrequency
|
||||
);
|
||||
|
||||
HRESULT
|
||||
put_Polarity (
|
||||
[in] ULONG * pulPolarity
|
||||
);
|
||||
|
||||
HRESULT
|
||||
get_Polarity (
|
||||
[in, out] ULONG * pulPolarity
|
||||
);
|
||||
|
||||
HRESULT
|
||||
put_Range (
|
||||
[in] ULONG * pulRange
|
||||
);
|
||||
|
||||
HRESULT
|
||||
get_Range (
|
||||
[in, out] ULONG * pulRange
|
||||
);
|
||||
}
|
||||
|
||||
//---------------------------------------------------------------------
|
||||
// IBDA_AutoDemodulate interface
|
||||
//---------------------------------------------------------------------
|
||||
[
|
||||
object,
|
||||
uuid(DDF15B12-BD25-11d2-9CA0-00C04F7971E0),
|
||||
pointer_default(unique)
|
||||
]
|
||||
|
||||
interface IBDA_AutoDemodulate : IUnknown
|
||||
{
|
||||
HRESULT
|
||||
put_AutoDemodulate (
|
||||
void
|
||||
);
|
||||
}
|
||||
|
||||
//---------------------------------------------------------------------
|
||||
// IBDA_DigitalDemodulator interface
|
||||
//---------------------------------------------------------------------
|
||||
[
|
||||
object,
|
||||
uuid(EF30F379-985B-4d10-B640-A79D5E04E1E0),
|
||||
pointer_default(unique)
|
||||
]
|
||||
|
||||
interface IBDA_DigitalDemodulator : IUnknown
|
||||
{
|
||||
HRESULT
|
||||
put_ModulationType (
|
||||
[in] ModulationType * pModulationType
|
||||
);
|
||||
|
||||
HRESULT
|
||||
get_ModulationType (
|
||||
[in, out] ModulationType * pModulationType
|
||||
);
|
||||
|
||||
HRESULT
|
||||
put_InnerFECMethod (
|
||||
[in] FECMethod * pFECMethod
|
||||
);
|
||||
|
||||
HRESULT
|
||||
get_InnerFECMethod (
|
||||
[in, out] FECMethod * pFECMethod
|
||||
);
|
||||
|
||||
HRESULT
|
||||
put_InnerFECRate (
|
||||
[in] BinaryConvolutionCodeRate * pFECRate
|
||||
);
|
||||
|
||||
HRESULT
|
||||
get_InnerFECRate (
|
||||
[in, out] BinaryConvolutionCodeRate * pFECRate
|
||||
);
|
||||
|
||||
HRESULT
|
||||
put_OuterFECMethod (
|
||||
[in] FECMethod * pFECMethod
|
||||
);
|
||||
|
||||
HRESULT
|
||||
get_OuterFECMethod (
|
||||
[in, out] FECMethod * pFECMethod
|
||||
);
|
||||
|
||||
HRESULT
|
||||
put_OuterFECRate (
|
||||
[in] BinaryConvolutionCodeRate * pFECRate
|
||||
);
|
||||
|
||||
HRESULT
|
||||
get_OuterFECRate (
|
||||
[in, out] BinaryConvolutionCodeRate * pFECRate
|
||||
);
|
||||
|
||||
HRESULT
|
||||
put_SymbolRate (
|
||||
[in] ULONG * pSymbolRate
|
||||
);
|
||||
|
||||
HRESULT
|
||||
get_SymbolRate (
|
||||
[in, out] ULONG * pSymbolRate
|
||||
);
|
||||
|
||||
HRESULT
|
||||
put_SpectralInversion (
|
||||
[in] SpectralInversion * pSpectralInversion
|
||||
);
|
||||
|
||||
HRESULT
|
||||
get_SpectralInversion (
|
||||
[in, out] SpectralInversion * pSpectralInversion
|
||||
);
|
||||
}
|
||||
|
||||
typedef enum
|
||||
{
|
||||
KSPROPERTY_IPSINK_MULTICASTLIST,
|
||||
KSPROPERTY_IPSINK_ADAPTER_DESCRIPTION,
|
||||
KSPROPERTY_IPSINK_ADAPTER_ADDRESS
|
||||
|
||||
} KSPROPERTY_IPSINK;
|
||||
|
||||
|
||||
|
||||
//---------------------------------------------------------------------
|
||||
// IBDA_IPSinkControl interface
|
||||
//---------------------------------------------------------------------
|
||||
|
||||
[
|
||||
object,
|
||||
uuid(3F4DC8E2-4050-11d3-8F4B-00C04F7971E2),
|
||||
pointer_default(unique)
|
||||
]
|
||||
|
||||
interface IBDA_IPSinkControl : IUnknown
|
||||
{
|
||||
HRESULT GetMulticastList (
|
||||
[in, out] unsigned long *pulcbSize,
|
||||
[in, out] BYTE **pbBuffer
|
||||
);
|
||||
|
||||
|
||||
HRESULT GetAdapterIPAddress (
|
||||
[in,out] unsigned long *pulcbSize,
|
||||
[in,out] BYTE **pbBuffer
|
||||
);
|
||||
|
||||
}
|
||||
|
||||
//
|
||||
// mpeg-2 demultiplexer-specific interfaces follow
|
||||
//
|
||||
|
||||
//---------------------------------------------------------------------
|
||||
// IEnumPIDMap interface
|
||||
//---------------------------------------------------------------------
|
||||
|
||||
#ifdef REMOVE_THESE
|
||||
typedef enum {
|
||||
MEDIA_TRANSPORT_PACKET, // complete TS packet e.g. pass-through mode
|
||||
MEDIA_ELEMENTARY_STREAM, // PES payloads; audio/video only
|
||||
MEDIA_MPEG2_PSI, // PAT, PMT, CAT, Private
|
||||
MEDIA_TRANSPORT_PAYLOAD // gathered TS packet payloads (PES packets, etc...)
|
||||
} MEDIA_SAMPLE_CONTENT ;
|
||||
|
||||
typedef struct {
|
||||
ULONG ulPID ;
|
||||
MEDIA_SAMPLE_CONTENT MediaSampleContent ;
|
||||
} PID_MAP ;
|
||||
#endif // REMOVE_THESE
|
||||
|
||||
[
|
||||
object,
|
||||
uuid (afb6c2a2-2c41-11d3-8a60-0000f81e0e4a),
|
||||
pointer_default(unique)
|
||||
]
|
||||
interface IEnumPIDMap : IUnknown
|
||||
{
|
||||
HRESULT
|
||||
Next (
|
||||
[in] ULONG cRequest,
|
||||
[in, out, size_is (cRequest)] PID_MAP * pPIDMap,
|
||||
[out] ULONG * pcReceived
|
||||
) ;
|
||||
|
||||
HRESULT
|
||||
Skip (
|
||||
[in] ULONG cRecords
|
||||
) ;
|
||||
|
||||
HRESULT
|
||||
Reset (
|
||||
) ;
|
||||
|
||||
HRESULT
|
||||
Clone (
|
||||
[out] IEnumPIDMap ** ppIEnumPIDMap
|
||||
) ;
|
||||
} ;
|
||||
|
||||
//---------------------------------------------------------------------
|
||||
// IMPEG2PIDMap interface
|
||||
//---------------------------------------------------------------------
|
||||
|
||||
[
|
||||
object,
|
||||
uuid (afb6c2a1-2c41-11d3-8a60-0000f81e0e4a),
|
||||
pointer_default(unique)
|
||||
]
|
||||
interface IMPEG2PIDMap : IUnknown
|
||||
{
|
||||
HRESULT
|
||||
MapPID (
|
||||
[in] ULONG culPID,
|
||||
[in] ULONG * pulPID,
|
||||
[in] MEDIA_SAMPLE_CONTENT MediaSampleContent
|
||||
) ;
|
||||
|
||||
HRESULT
|
||||
UnmapPID (
|
||||
[in] ULONG culPID,
|
||||
[in] ULONG * pulPID
|
||||
) ;
|
||||
|
||||
HRESULT
|
||||
EnumPIDMap (
|
||||
[out] IEnumPIDMap ** pIEnumPIDMap
|
||||
) ;
|
||||
} ;
|
|
@ -0,0 +1,912 @@
|
|||
//==========================================================================;
|
||||
//
|
||||
// THIS CODE AND INFORMATION IS PROVIDED "AS IS" WITHOUT WARRANTY OF ANY
|
||||
// KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE
|
||||
// IMPLIED WARRANTIES OF MERCHANTABILITY AND/OR FITNESS FOR A PARTICULAR
|
||||
// PURPOSE.
|
||||
//
|
||||
// Copyright (c) 1992 - 1999 Microsoft Corporation. All Rights Reserved.
|
||||
//
|
||||
//--------------------------------------------------------------------------;
|
||||
|
||||
// Neutral/English language type library for basic Quartz control interfaces
|
||||
|
||||
// the quartz type library defines the basic control interfaces
|
||||
[
|
||||
uuid(56a868b0-0ad4-11ce-b03a-0020af0ba770),
|
||||
helpstring("ActiveMovie control type library"),
|
||||
lcid(0x0000),
|
||||
version(1.0)
|
||||
]
|
||||
library QuartzTypeLib
|
||||
{
|
||||
importlib("STDOLE32.TLB");
|
||||
|
||||
// types are restricted to be automation-compatible
|
||||
typedef double REFTIME; // ReferenceTime
|
||||
typedef LONG_PTR OAEVENT; // should be a HANDLE
|
||||
typedef LONG_PTR OAHWND; // should be an hwnd
|
||||
|
||||
// from strmif.idl
|
||||
typedef long OAFilterState;
|
||||
|
||||
// collection interface - represents a collection of IUnknowns
|
||||
// this is used below to collect filter-info objects, registry-filters
|
||||
// pin-info objects and wrapped media type objects
|
||||
[
|
||||
uuid(56a868b9-0ad4-11ce-b03a-0020af0ba770),
|
||||
helpstring("Collection"),
|
||||
odl,
|
||||
oleautomation,
|
||||
dual
|
||||
]
|
||||
interface IAMCollection : IDispatch
|
||||
{
|
||||
// number of items in collection
|
||||
[propget]
|
||||
HRESULT Count(
|
||||
[out, retval] LONG* plCount);
|
||||
|
||||
// return IUnknown for contained item by index
|
||||
HRESULT Item(
|
||||
[in] long lItem,
|
||||
[out] IUnknown** ppUnk);
|
||||
|
||||
// return IUnknown for an object that implements IEnumVARIANT on
|
||||
// this collection
|
||||
[propget]
|
||||
HRESULT _NewEnum(
|
||||
[out, retval] IUnknown** ppUnk);
|
||||
}
|
||||
|
||||
|
||||
// core control providing state control
|
||||
[
|
||||
uuid(56a868b1-0ad4-11ce-b03a-0020af0ba770),
|
||||
helpstring("IMediaControl interface"),
|
||||
odl,
|
||||
oleautomation,
|
||||
dual
|
||||
]
|
||||
interface IMediaControl : IDispatch
|
||||
{
|
||||
// methods
|
||||
HRESULT Run();
|
||||
HRESULT Pause();
|
||||
HRESULT Stop();
|
||||
|
||||
//returns the state. same semantics as IMediaFilter::GetState
|
||||
|
||||
HRESULT GetState(
|
||||
[in] LONG msTimeout,
|
||||
[out] OAFilterState* pfs);
|
||||
|
||||
// adds and connects filters needed to play the specified file
|
||||
// (same as IFilterGraph::RenderFile)
|
||||
HRESULT RenderFile(
|
||||
[in] BSTR strFilename);
|
||||
|
||||
// adds to the graph the source filter that can read this file,
|
||||
// and returns an IFilterInfo object for it (actually returns
|
||||
// an IDispatch for the IFilterInfo object).
|
||||
HRESULT AddSourceFilter(
|
||||
[in] BSTR strFilename,
|
||||
[out] IDispatch**ppUnk);
|
||||
|
||||
// get a collection of IFilterInfo objects representing the
|
||||
// filters in the graph (returns IDispatch for an object
|
||||
// that supports IAMCollection
|
||||
[propget]
|
||||
HRESULT FilterCollection(
|
||||
[out, retval] IDispatch** ppUnk);
|
||||
|
||||
// get a collection of IRegFilter objects representing the
|
||||
// filters available in the registry
|
||||
[propget]
|
||||
HRESULT RegFilterCollection(
|
||||
[out, retval] IDispatch** ppUnk);
|
||||
|
||||
HRESULT StopWhenReady();
|
||||
}
|
||||
|
||||
|
||||
// provides an event notification scheme passing events
|
||||
// asynchronously to applications. See also IMediaEventSink in
|
||||
// strmif.idl and sdk\h\evcodes.h.
|
||||
//
|
||||
// this interface behaves as if events are held on a queue. A call to
|
||||
// IMediaEventSink::Notify will place an event on this queue. Calling
|
||||
// GetEvent removes the first item off the queue and returns it. Items are
|
||||
// returned in the order they were queued (there is no priority scheme).
|
||||
// The event handle is in a signalled state iff the queue is non-empty.
|
||||
//
|
||||
// Apps that issue multiple Run calls without always picking up the
|
||||
// completion events are advised to call GetEvent or WaitForCompletion
|
||||
// (with a 0 timeout) repeatedly to remove all events from the queue
|
||||
// when in stopped or paused state before each Run method.
|
||||
//
|
||||
// Parameters to events are actually LONG, IUnknown* or BSTR. You need to
|
||||
// look at evcode.h for details of parameters to a specific event code.
|
||||
// In order to correctly free resources, always call FreeEventParams
|
||||
// after receiving an event.
|
||||
//
|
||||
|
||||
[
|
||||
uuid(56a868b6-0ad4-11ce-b03a-0020af0ba770),
|
||||
helpstring("IMediaEvent interface"),
|
||||
odl,
|
||||
oleautomation,
|
||||
dual
|
||||
]
|
||||
interface IMediaEvent : IDispatch
|
||||
{
|
||||
// get back the event handle. This is manual-reset
|
||||
// (don't - it's reset by the event mechanism) and remains set
|
||||
// when events are queued, and reset when the queue is empty.
|
||||
HRESULT GetEventHandle(
|
||||
[out] OAEVENT * hEvent);
|
||||
|
||||
// remove the next event notification from the head of the queue and
|
||||
// return it. Waits up to msTimeout millisecs if there are no events.
|
||||
// if a timeout occurs without any events, this method will return
|
||||
// E_ABORT, and the value of the event code and other parameters
|
||||
// is undefined.
|
||||
//
|
||||
// If this call returns successfully the caller MUST call
|
||||
// FreeEventParams(lEventCode, lParam1, lParam2) to release
|
||||
// resources held inside the event arguments
|
||||
//
|
||||
HRESULT GetEvent(
|
||||
[out] long * lEventCode,
|
||||
[out] LONG_PTR * lParam1,
|
||||
[out] LONG_PTR * lParam2,
|
||||
[in] long msTimeout
|
||||
);
|
||||
|
||||
// Calls GetEvent repeatedly discarding events until it finds a
|
||||
// completion event (EC_COMPLETE, EC_ERRORABORT, or EC_USERABORT).
|
||||
// The completion event is removed from the queue and returned
|
||||
// in pEvCode. Note that the object is still in running mode until
|
||||
// a Pause or Stop call is made.
|
||||
// If the timeout occurs, *pEvCode will be 0 and E_ABORT will be
|
||||
// returned.
|
||||
HRESULT WaitForCompletion(
|
||||
[in] long msTimeout,
|
||||
[out] long * pEvCode);
|
||||
|
||||
// cancels any system handling of the specified event code
|
||||
// and ensures that the events are passed straight to the application
|
||||
// (via GetEvent) and not handled. A good example of this is
|
||||
// EC_REPAINT: default handling for this ensures the painting of the
|
||||
// window and does not get posted to the app.
|
||||
HRESULT CancelDefaultHandling(
|
||||
[in] long lEvCode);
|
||||
|
||||
// restore the normal system default handling that may have been
|
||||
// cancelled by CancelDefaultHandling().
|
||||
HRESULT RestoreDefaultHandling( [in] long lEvCode);
|
||||
|
||||
// Free any resources associated with the parameters to an event.
|
||||
// Event parameters may be LONGs, IUnknown* or BSTR. No action
|
||||
// is taken with LONGs. IUnknown are passed addrefed and need a
|
||||
// Release call. BSTR are allocated by the task allocator and will be
|
||||
// freed by calling the task allocator.
|
||||
HRESULT FreeEventParams(
|
||||
[in] long lEvCode,
|
||||
[in] LONG_PTR lParam1,
|
||||
[in] LONG_PTR lParam2
|
||||
);
|
||||
}
|
||||
|
||||
[
|
||||
uuid(56a868c0-0ad4-11ce-b03a-0020af0ba770),
|
||||
helpstring("IMediaEventEx interface"),
|
||||
odl
|
||||
]
|
||||
interface IMediaEventEx : IMediaEvent
|
||||
{
|
||||
|
||||
// Register a window to send messages to when events occur
|
||||
// Parameters:
|
||||
//
|
||||
// hwnd - handle of window to notify -
|
||||
// pass NULL to stop notification
|
||||
// lMsg - Message id to pass messages with
|
||||
// lInstanceData - will come back in lParam
|
||||
//
|
||||
// The event information must still be retrived by a call
|
||||
// to GetEvent when the window message is received.
|
||||
//
|
||||
// Multiple events may be notified with one window message.
|
||||
//
|
||||
HRESULT SetNotifyWindow(
|
||||
[in] OAHWND hwnd,
|
||||
[in] long lMsg,
|
||||
[in] LONG_PTR lInstanceData
|
||||
);
|
||||
|
||||
// Turn events notification on or off
|
||||
// lNoNotify = 0x00 event notification is ON
|
||||
// lNoNotify = 0x01 event notification is OFF. The
|
||||
// handle returned by GetEventHandle will be signalled at
|
||||
// end of stream
|
||||
HRESULT SetNotifyFlags(
|
||||
[in] long lNoNotifyFlags
|
||||
);
|
||||
HRESULT GetNotifyFlags(
|
||||
[out] long *lplNoNotifyFlags
|
||||
);
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
// seek/cueing for positional media
|
||||
[
|
||||
uuid(56a868b2-0ad4-11ce-b03a-0020af0ba770),
|
||||
helpstring("IMediaPosition interface"),
|
||||
odl,
|
||||
oleautomation,
|
||||
dual
|
||||
]
|
||||
interface IMediaPosition : IDispatch
|
||||
{
|
||||
// properties
|
||||
|
||||
[propget]
|
||||
HRESULT Duration(
|
||||
[out, retval] REFTIME* plength);
|
||||
|
||||
[propput]
|
||||
HRESULT CurrentPosition(
|
||||
[in] REFTIME llTime);
|
||||
|
||||
[propget]
|
||||
HRESULT CurrentPosition(
|
||||
[out, retval] REFTIME* pllTime);
|
||||
|
||||
[propget]
|
||||
HRESULT StopTime(
|
||||
[out, retval] REFTIME* pllTime);
|
||||
[propput]
|
||||
HRESULT StopTime(
|
||||
[in] REFTIME llTime);
|
||||
|
||||
[propget]
|
||||
HRESULT PrerollTime(
|
||||
[out, retval] REFTIME* pllTime);
|
||||
[propput]
|
||||
HRESULT PrerollTime(
|
||||
[in] REFTIME llTime);
|
||||
|
||||
[propput]
|
||||
HRESULT Rate(
|
||||
[in] double dRate);
|
||||
[propget]
|
||||
HRESULT Rate(
|
||||
[out, retval] double * pdRate);
|
||||
|
||||
HRESULT CanSeekForward([out, retval] LONG *pCanSeekForward);
|
||||
HRESULT CanSeekBackward([out, retval] LONG *pCanSeekBackward);
|
||||
}
|
||||
|
||||
// basic audio-related functionality
|
||||
[
|
||||
uuid(56a868b3-0ad4-11ce-b03a-0020af0ba770),
|
||||
helpstring("IBasicAudio interface"),
|
||||
odl,
|
||||
oleautomation,
|
||||
dual
|
||||
]
|
||||
interface IBasicAudio : IDispatch
|
||||
{
|
||||
// properties
|
||||
|
||||
[propput]
|
||||
HRESULT Volume(
|
||||
[in] long lVolume);
|
||||
[propget]
|
||||
HRESULT Volume(
|
||||
[out, retval] long * plVolume);
|
||||
|
||||
[propput]
|
||||
HRESULT Balance(
|
||||
[in] long lBalance);
|
||||
[propget]
|
||||
HRESULT Balance(
|
||||
[out, retval] long * plBalance);
|
||||
}
|
||||
|
||||
// basic window-related functionality
|
||||
[
|
||||
uuid(56a868b4-0ad4-11ce-b03a-0020af0ba770),
|
||||
helpstring("IVideoWindow interface"),
|
||||
odl,
|
||||
oleautomation,
|
||||
dual
|
||||
]
|
||||
interface IVideoWindow : IDispatch
|
||||
{
|
||||
// properties
|
||||
|
||||
// set and get the window title caption
|
||||
|
||||
[propput]
|
||||
HRESULT Caption([in] BSTR strCaption);
|
||||
[propget]
|
||||
HRESULT Caption([out, retval] BSTR *strCaption);
|
||||
|
||||
// change the window styles (as per Win32)
|
||||
|
||||
[propput]
|
||||
HRESULT WindowStyle([in] long WindowStyle);
|
||||
[propget]
|
||||
HRESULT WindowStyle([out, retval] long *WindowStyle);
|
||||
|
||||
// change the extended window styles (as per Win32)
|
||||
|
||||
[propput]
|
||||
HRESULT WindowStyleEx([in] long WindowStyleEx);
|
||||
[propget]
|
||||
HRESULT WindowStyleEx([out, retval] long *WindowStyleEx);
|
||||
|
||||
[propput]
|
||||
HRESULT AutoShow([in] long AutoShow);
|
||||
[propget]
|
||||
HRESULT AutoShow([out, retval] long *AutoShow);
|
||||
|
||||
// change the window state (as per Win32)
|
||||
|
||||
[propput]
|
||||
HRESULT WindowState([in] long WindowState);
|
||||
[propget]
|
||||
HRESULT WindowState([out, retval] long *WindowState);
|
||||
|
||||
// realise the palette in the background
|
||||
|
||||
[propput]
|
||||
HRESULT BackgroundPalette([in] long BackgroundPalette);
|
||||
[propget]
|
||||
HRESULT BackgroundPalette([out, retval] long *pBackgroundPalette);
|
||||
|
||||
// affect the visibility of the window
|
||||
|
||||
[propput]
|
||||
HRESULT Visible([in] long Visible);
|
||||
[propget]
|
||||
HRESULT Visible([out, retval] long *pVisible);
|
||||
|
||||
// change the desktop position of the video window
|
||||
|
||||
[propput]
|
||||
HRESULT Left([in] long Left);
|
||||
[propget]
|
||||
HRESULT Left([out, retval] long *pLeft);
|
||||
|
||||
[propput]
|
||||
HRESULT Width([in] long Width);
|
||||
[propget]
|
||||
HRESULT Width([out, retval] long *pWidth);
|
||||
|
||||
[propput]
|
||||
HRESULT Top([in] long Top);
|
||||
[propget]
|
||||
HRESULT Top([out, retval] long *pTop);
|
||||
|
||||
[propput]
|
||||
HRESULT Height([in] long Height);
|
||||
[propget]
|
||||
HRESULT Height([out, retval] long *pHeight);
|
||||
|
||||
// change the owning window of the video
|
||||
|
||||
[propput]
|
||||
HRESULT Owner([in] OAHWND Owner);
|
||||
[propget]
|
||||
HRESULT Owner([out, retval] OAHWND *Owner);
|
||||
|
||||
// change the window to receive posted messages
|
||||
|
||||
[propput]
|
||||
HRESULT MessageDrain([in] OAHWND Drain);
|
||||
[propget]
|
||||
HRESULT MessageDrain([out, retval] OAHWND *Drain);
|
||||
|
||||
[propget]
|
||||
HRESULT BorderColor([out, retval] long *Color);
|
||||
|
||||
[propput]
|
||||
HRESULT BorderColor([in] long Color);
|
||||
|
||||
[propget]
|
||||
HRESULT FullScreenMode([out, retval] long *FullScreenMode);
|
||||
|
||||
[propput]
|
||||
HRESULT FullScreenMode([in] long FullScreenMode);
|
||||
|
||||
// methods
|
||||
|
||||
// ask the renderer to grab it's window the foreground
|
||||
// and optionally also give the window the input focus
|
||||
HRESULT SetWindowForeground([in] long Focus);
|
||||
|
||||
// owners should pass WM_PALETTECHANGED and WM_SYSCOLORCHANGE
|
||||
// messages on the filter graph so they can be distributed
|
||||
// otherwise child renderers never see these messages go by
|
||||
|
||||
HRESULT NotifyOwnerMessage([in] OAHWND hwnd,
|
||||
[in] long uMsg,
|
||||
[in] LONG_PTR wParam,
|
||||
[in] LONG_PTR lParam
|
||||
);
|
||||
|
||||
// get and set the window position on the desktop
|
||||
|
||||
HRESULT SetWindowPosition([in] long Left,
|
||||
[in] long Top,
|
||||
[in] long Width,
|
||||
[in] long Height);
|
||||
|
||||
HRESULT GetWindowPosition([out] long *pLeft,
|
||||
[out] long *pTop,
|
||||
[out] long *pWidth,
|
||||
[out] long *pHeight);
|
||||
|
||||
// get the ideal sizes for the video image playback (client) area
|
||||
|
||||
HRESULT GetMinIdealImageSize([out] long *pWidth,[out] long *pHeight);
|
||||
HRESULT GetMaxIdealImageSize([out] long *pWidth,[out] long *pHeight);
|
||||
|
||||
// get the restored window size when we're maximised or iconic
|
||||
|
||||
HRESULT GetRestorePosition([out] long *pLeft,
|
||||
[out] long *pTop,
|
||||
[out] long *pWidth,
|
||||
[out] long *pHeight);
|
||||
|
||||
// show and hide cursors useful when fullscreen
|
||||
HRESULT HideCursor([in] long HideCursor);
|
||||
HRESULT IsCursorHidden([out] long *CursorHidden);
|
||||
}
|
||||
|
||||
// basic video-related functionality
|
||||
[
|
||||
uuid(56a868b5-0ad4-11ce-b03a-0020af0ba770),
|
||||
helpstring("IBasicVideo interface"),
|
||||
odl,
|
||||
oleautomation,
|
||||
dual
|
||||
]
|
||||
interface IBasicVideo : IDispatch
|
||||
{
|
||||
// properties
|
||||
|
||||
// Video specific (approximate) bit and frame rates
|
||||
|
||||
[propget]
|
||||
HRESULT AvgTimePerFrame([out, retval] REFTIME *pAvgTimePerFrame);
|
||||
|
||||
[propget]
|
||||
HRESULT BitRate([out, retval] long *pBitRate);
|
||||
|
||||
[propget]
|
||||
HRESULT BitErrorRate([out, retval] long *pBitErrorRate);
|
||||
|
||||
// read the native video size
|
||||
|
||||
[propget]
|
||||
HRESULT VideoWidth([out, retval] long *pVideoWidth);
|
||||
|
||||
[propget]
|
||||
HRESULT VideoHeight([out, retval] long *pVideoHeight);
|
||||
|
||||
// change the source rectangle for the video
|
||||
|
||||
[propput]
|
||||
HRESULT SourceLeft([in] long SourceLeft);
|
||||
[propget]
|
||||
HRESULT SourceLeft([out, retval] long *pSourceLeft);
|
||||
|
||||
[propput]
|
||||
HRESULT SourceWidth([in] long SourceWidth);
|
||||
[propget]
|
||||
HRESULT SourceWidth([out, retval] long *pSourceWidth);
|
||||
|
||||
[propput]
|
||||
HRESULT SourceTop([in] long SourceTop);
|
||||
[propget]
|
||||
HRESULT SourceTop([out, retval] long *pSourceTop);
|
||||
|
||||
[propput]
|
||||
HRESULT SourceHeight([in] long SourceHeight);
|
||||
[propget]
|
||||
HRESULT SourceHeight([out, retval] long *pSourceHeight);
|
||||
|
||||
// change the destination rectangle for the video
|
||||
|
||||
[propput]
|
||||
HRESULT DestinationLeft([in] long DestinationLeft);
|
||||
[propget]
|
||||
HRESULT DestinationLeft([out, retval] long *pDestinationLeft);
|
||||
|
||||
[propput]
|
||||
HRESULT DestinationWidth([in] long DestinationWidth);
|
||||
[propget]
|
||||
HRESULT DestinationWidth([out, retval] long *pDestinationWidth);
|
||||
|
||||
[propput]
|
||||
HRESULT DestinationTop([in] long DestinationTop);
|
||||
[propget]
|
||||
HRESULT DestinationTop([out, retval] long *pDestinationTop);
|
||||
|
||||
[propput]
|
||||
HRESULT DestinationHeight([in] long DestinationHeight);
|
||||
[propget]
|
||||
HRESULT DestinationHeight([out, retval] long *pDestinationHeight);
|
||||
|
||||
// methods
|
||||
|
||||
// get and set the source rectangle position
|
||||
|
||||
HRESULT SetSourcePosition([in] long Left,
|
||||
[in] long Top,
|
||||
[in] long Width,
|
||||
[in] long Height);
|
||||
|
||||
HRESULT GetSourcePosition([out] long *pLeft,
|
||||
[out] long *pTop,
|
||||
[out] long *pWidth,
|
||||
[out] long *pHeight);
|
||||
|
||||
HRESULT SetDefaultSourcePosition();
|
||||
|
||||
// get and set the destination rectangle position
|
||||
|
||||
HRESULT SetDestinationPosition([in] long Left,
|
||||
[in] long Top,
|
||||
[in] long Width,
|
||||
[in] long Height);
|
||||
|
||||
HRESULT GetDestinationPosition([out] long *pLeft,
|
||||
[out] long *pTop,
|
||||
[out] long *pWidth,
|
||||
[out] long *pHeight);
|
||||
|
||||
HRESULT SetDefaultDestinationPosition();
|
||||
|
||||
// get the native video dimensions
|
||||
|
||||
HRESULT GetVideoSize([out] long *pWidth,[out] long *pHeight);
|
||||
|
||||
// get all or some of the current video palette
|
||||
|
||||
HRESULT GetVideoPaletteEntries([in] long StartIndex,
|
||||
[in] long Entries,
|
||||
[out] long *pRetrieved,
|
||||
[out] long *pPalette);
|
||||
|
||||
HRESULT GetCurrentImage([in,out] long *pBufferSize,
|
||||
[out] long *pDIBImage);
|
||||
|
||||
// are we using a default source or destination
|
||||
|
||||
HRESULT IsUsingDefaultSource();
|
||||
HRESULT IsUsingDefaultDestination();
|
||||
}
|
||||
|
||||
// interface extension to IBasicVideo to return preferred aspect ratio
|
||||
[
|
||||
uuid(329bb360-f6ea-11d1-9038-00a0c9697298),
|
||||
helpstring("IBasicVideo2"),
|
||||
odl
|
||||
]
|
||||
interface IBasicVideo2 : IBasicVideo
|
||||
{
|
||||
// This may not match the native video dimensions because of
|
||||
// non-square pixels or whatever.
|
||||
// The video may not always be displayed in the preferred
|
||||
// aspect ratio for performance reasons
|
||||
|
||||
HRESULT GetPreferredAspectRatio([out] long *plAspectX,
|
||||
[out] long *plAspectY);
|
||||
}
|
||||
|
||||
// interface returned to a command that has been queued via IQueueCommand
|
||||
[
|
||||
uuid(56a868b8-0ad4-11ce-b03a-0020af0ba770),
|
||||
helpstring("IDeferredCommand"),
|
||||
odl
|
||||
]
|
||||
interface IDeferredCommand : IUnknown
|
||||
{
|
||||
HRESULT Cancel();
|
||||
HRESULT Confidence(
|
||||
[out] LONG* pConfidence);
|
||||
HRESULT Postpone(
|
||||
[in] REFTIME newtime);
|
||||
// return value is S_OK if completed. phrResult is set to the
|
||||
// result of the deferred command.
|
||||
HRESULT GetHResult(
|
||||
[out] HRESULT* phrResult);
|
||||
};
|
||||
|
||||
// queue an IDispatch-based command for execution at a specified time
|
||||
[
|
||||
uuid(56a868b7-0ad4-11ce-b03a-0020af0ba770),
|
||||
helpstring("IQueueCommand"),
|
||||
odl
|
||||
]
|
||||
interface IQueueCommand : IUnknown
|
||||
{
|
||||
HRESULT InvokeAtStreamTime(
|
||||
[out] IDeferredCommand** pCmd,
|
||||
[in] REFTIME time, // at this streamtime
|
||||
[in] GUID* iid, // call this interface
|
||||
[in] long dispidMethod, // ..and this method
|
||||
[in] short wFlags, // method/property
|
||||
[in] long cArgs, // count of args
|
||||
[in] VARIANT* pDispParams, // actual args
|
||||
[in, out] VARIANT* pvarResult, // return value
|
||||
[out] short* puArgErr // which arg in error
|
||||
);
|
||||
|
||||
HRESULT InvokeAtPresentationTime(
|
||||
[out] IDeferredCommand** pCmd,
|
||||
[in] REFTIME time, // at this presentation time
|
||||
[in] GUID* iid, // call this interface
|
||||
[in] long dispidMethod, // ..and this method
|
||||
[in] short wFlags, // method/property
|
||||
[in] long cArgs, // count of args
|
||||
[in] VARIANT* pDispParams, // actual args
|
||||
[in, out] VARIANT* pvarResult, // return value
|
||||
[out] short* puArgErr // which arg in error
|
||||
);
|
||||
|
||||
};
|
||||
|
||||
|
||||
|
||||
// the filgraph object (CLSID_Filgraph)
|
||||
[
|
||||
uuid(e436ebb3-524f-11ce-9f53-0020af0ba770),
|
||||
helpstring("Filtergraph type info")
|
||||
]
|
||||
coclass FilgraphManager
|
||||
{
|
||||
[default] interface IMediaControl;
|
||||
interface IMediaEvent;
|
||||
interface IMediaPosition;
|
||||
interface IBasicAudio;
|
||||
interface IBasicVideo;
|
||||
interface IVideoWindow;
|
||||
|
||||
};
|
||||
|
||||
|
||||
// represents a filter (you can't QI for IBaseFilter from this object)
|
||||
[
|
||||
uuid(56a868ba-0ad4-11ce-b03a-0020af0ba770),
|
||||
helpstring("FilterInfo"),
|
||||
odl,
|
||||
oleautomation,
|
||||
dual
|
||||
]
|
||||
interface IFilterInfo : IDispatch
|
||||
{
|
||||
// find a pin given an id - returns an object supporting
|
||||
// IPinInfo
|
||||
HRESULT FindPin(
|
||||
[in] BSTR strPinID,
|
||||
[out] IDispatch** ppUnk);
|
||||
|
||||
// filter name
|
||||
[propget]
|
||||
HRESULT Name(
|
||||
[out, retval] BSTR* strName);
|
||||
|
||||
// Vendor info string
|
||||
[propget]
|
||||
HRESULT VendorInfo(
|
||||
[out, retval] BSTR* strVendorInfo);
|
||||
|
||||
// returns the actual filter object (supports IBaseFilter)
|
||||
[propget]
|
||||
HRESULT Filter(
|
||||
[out, retval] IUnknown **ppUnk);
|
||||
|
||||
// returns an IAMCollection object containing the PinInfo objects
|
||||
// for this filter
|
||||
[propget]
|
||||
HRESULT Pins(
|
||||
[out, retval] IDispatch ** ppUnk);
|
||||
|
||||
// returns -1 if true or 0 if false (OATRUE/FALSE)
|
||||
[propget]
|
||||
HRESULT IsFileSource(
|
||||
[out, retval] LONG * pbIsSource);
|
||||
|
||||
[propget]
|
||||
HRESULT Filename(
|
||||
[out, retval] BSTR* pstrFilename);
|
||||
|
||||
[propput]
|
||||
HRESULT Filename(
|
||||
[in] BSTR strFilename);
|
||||
}
|
||||
|
||||
[
|
||||
uuid(56a868bb-0ad4-11ce-b03a-0020af0ba770),
|
||||
helpstring("Registry Filter Info"),
|
||||
odl,
|
||||
oleautomation,
|
||||
dual
|
||||
]
|
||||
interface IRegFilterInfo : IDispatch
|
||||
{
|
||||
// get the name of this filter
|
||||
[propget]
|
||||
HRESULT Name(
|
||||
[out, retval] BSTR* strName);
|
||||
|
||||
|
||||
// make an instance of this filter, add it to the graph and
|
||||
// return an IFilterInfo for it.
|
||||
HRESULT Filter(
|
||||
[out] IDispatch** ppUnk);
|
||||
}
|
||||
|
||||
// wrapper for a media type
|
||||
[
|
||||
uuid(56a868bc-0ad4-11ce-b03a-0020af0ba770),
|
||||
helpstring("Media Type"),
|
||||
odl,
|
||||
oleautomation,
|
||||
dual
|
||||
]
|
||||
interface IMediaTypeInfo : IDispatch
|
||||
{
|
||||
// get the major type GUID as a string
|
||||
[propget]
|
||||
HRESULT Type(
|
||||
[out, retval] BSTR* strType);
|
||||
|
||||
// get the subtype GUID as a string
|
||||
[propget]
|
||||
HRESULT Subtype(
|
||||
[out, retval] BSTR* strType);
|
||||
}
|
||||
|
||||
[
|
||||
uuid(56a868bd-0ad4-11ce-b03a-0020af0ba770),
|
||||
helpstring("Pin Info"),
|
||||
odl,
|
||||
oleautomation,
|
||||
dual
|
||||
]
|
||||
interface IPinInfo : IDispatch
|
||||
{
|
||||
// get the pin object (IUnknown for an object that
|
||||
// supports IPin
|
||||
[propget]
|
||||
HRESULT Pin(
|
||||
[out, retval] IUnknown** ppUnk);
|
||||
|
||||
// get the PinInfo object for the pin we are connected to
|
||||
[propget]
|
||||
HRESULT ConnectedTo(
|
||||
[out, retval] IDispatch** ppUnk);
|
||||
|
||||
// get the media type on this connection - returns an
|
||||
// object supporting IMediaTypeInfo
|
||||
[propget]
|
||||
HRESULT ConnectionMediaType(
|
||||
[out, retval] IDispatch** ppUnk);
|
||||
|
||||
|
||||
// return the FilterInfo object for the filter this pin
|
||||
// is part of
|
||||
[propget]
|
||||
HRESULT FilterInfo(
|
||||
[out, retval] IDispatch** ppUnk);
|
||||
|
||||
// get the name of this pin
|
||||
[propget]
|
||||
HRESULT Name(
|
||||
[out, retval] BSTR* ppUnk);
|
||||
|
||||
// pin direction
|
||||
[propget]
|
||||
HRESULT Direction(
|
||||
[out, retval] LONG *ppDirection);
|
||||
|
||||
// PinID - can pass to IFilterInfo::FindPin
|
||||
[propget]
|
||||
HRESULT PinID(
|
||||
[out, retval] BSTR* strPinID);
|
||||
|
||||
// collection of preferred media types (IAMCollection)
|
||||
[propget]
|
||||
HRESULT MediaTypes(
|
||||
[out, retval] IDispatch** ppUnk);
|
||||
|
||||
// Connect to the following pin, using other transform
|
||||
// filters as necessary. pPin can support either IPin or IPinInfo
|
||||
HRESULT Connect(
|
||||
[in] IUnknown* pPin);
|
||||
|
||||
// Connect directly to the following pin, not using any intermediate
|
||||
// filters
|
||||
HRESULT ConnectDirect(
|
||||
[in] IUnknown* pPin);
|
||||
|
||||
// Connect directly to the following pin, using the specified
|
||||
// media type only. pPin is an object that must support either
|
||||
// IPin or IPinInfo, and pMediaType must support IMediaTypeInfo.
|
||||
HRESULT ConnectWithType(
|
||||
[in] IUnknown * pPin,
|
||||
[in] IDispatch * pMediaType);
|
||||
|
||||
// disconnect this pin and the corresponding connected pin from
|
||||
// each other. (Calls IPin::Disconnect on both pins).
|
||||
HRESULT Disconnect(void);
|
||||
|
||||
// render this pin using any necessary transform and rendering filters
|
||||
HRESULT Render(void);
|
||||
}
|
||||
|
||||
//--------------------------------------------------------------------
|
||||
//
|
||||
// IAMStats - statistics
|
||||
//
|
||||
// Note that the calls using an index are likely to be much faster
|
||||
//--------------------------------------------------------------------
|
||||
|
||||
[
|
||||
uuid(bc9bcf80-dcd2-11d2-abf6-00a0c905f375),
|
||||
helpstring("Statistics"),
|
||||
odl,
|
||||
oleautomation,
|
||||
dual
|
||||
]
|
||||
interface IAMStats : IDispatch {
|
||||
// Reset all stats
|
||||
HRESULT Reset();
|
||||
|
||||
// Get number of stats collected
|
||||
[propget]
|
||||
HRESULT Count(
|
||||
[out, retval] LONG* plCount);
|
||||
|
||||
// Pull out a specific value by position
|
||||
HRESULT GetValueByIndex([in] long lIndex,
|
||||
[out] BSTR *szName,
|
||||
[out] long *lCount,
|
||||
[out] double *dLast,
|
||||
[out] double *dAverage,
|
||||
[out] double *dStdDev,
|
||||
[out] double *dMin,
|
||||
[out] double *dMax);
|
||||
|
||||
// Pull out a specific value by name
|
||||
HRESULT GetValueByName([in] BSTR szName,
|
||||
[out] long *lIndex,
|
||||
[out] long *lCount,
|
||||
[out] double *dLast,
|
||||
[out] double *dAverage,
|
||||
[out] double *dStdDev,
|
||||
[out] double *dMin,
|
||||
[out] double *dMax);
|
||||
|
||||
|
||||
// The calls below are for generators of statistics
|
||||
|
||||
// Return the index for a string - optinally create
|
||||
HRESULT GetIndex([in] BSTR szName,
|
||||
[in] long lCreate,
|
||||
[out] long *plIndex);
|
||||
|
||||
// Add a new value
|
||||
HRESULT AddValue([in] long lIndex,
|
||||
[in] double dValue);
|
||||
}
|
||||
};
|
|
@ -0,0 +1,86 @@
|
|||
//------------------------------------------------------------------------------
|
||||
// File: DDStream.idl
|
||||
//
|
||||
// Desc:
|
||||
//
|
||||
// Copyright (c) 1998 - 2000, Microsoft Corporation. All rights reserved.
|
||||
//------------------------------------------------------------------------------
|
||||
|
||||
|
||||
import "unknwn.idl";
|
||||
import "mmstream.idl";
|
||||
|
||||
cpp_quote("//")
|
||||
cpp_quote("// The following declarations within the 'if 0' block are dummy typedefs used to make")
|
||||
cpp_quote("// the ddstream.idl file build. The actual definitions are contained in DDRAW.H")
|
||||
cpp_quote("//")
|
||||
cpp_quote("#if 0")
|
||||
typedef void * LPDDSURFACEDESC;
|
||||
typedef struct tDDSURFACEDESC DDSURFACEDESC;
|
||||
cpp_quote("#endif")
|
||||
cpp_quote("#include <ddraw.h>")
|
||||
|
||||
enum {
|
||||
DDSFF_PROGRESSIVERENDER = 0x00000001
|
||||
};
|
||||
|
||||
interface IDirectDraw;
|
||||
interface IDirectDrawSurface;
|
||||
interface IDirectDrawPalette;
|
||||
|
||||
interface IDirectDrawMediaStream;
|
||||
interface IDirectDrawStreamSample;
|
||||
|
||||
// IDirectDrawMediaStream
|
||||
[
|
||||
object,
|
||||
local,
|
||||
uuid(F4104FCE-9A70-11d0-8FDE-00C04FD9189D),
|
||||
pointer_default(unique)
|
||||
]
|
||||
interface IDirectDrawMediaStream : IMediaStream
|
||||
{
|
||||
HRESULT GetFormat(
|
||||
[out] DDSURFACEDESC *pDDSDCurrent,
|
||||
[out] IDirectDrawPalette **ppDirectDrawPalette,
|
||||
[out] DDSURFACEDESC *pDDSDDesired,
|
||||
[out] DWORD *pdwFlags);
|
||||
|
||||
HRESULT SetFormat(
|
||||
[in] const DDSURFACEDESC *pDDSurfaceDesc,
|
||||
[in] IDirectDrawPalette *pDirectDrawPalette);
|
||||
|
||||
HRESULT GetDirectDraw(
|
||||
[out] IDirectDraw **ppDirectDraw);
|
||||
|
||||
HRESULT SetDirectDraw(
|
||||
[in] IDirectDraw *pDirectDraw);
|
||||
|
||||
HRESULT CreateSample(
|
||||
[in] IDirectDrawSurface *pSurface,
|
||||
[in] const RECT *pRect,
|
||||
[in] DWORD dwFlags,
|
||||
[out]IDirectDrawStreamSample **ppSample);
|
||||
|
||||
HRESULT GetTimePerFrame(
|
||||
[out] STREAM_TIME *pFrameTime);
|
||||
};
|
||||
|
||||
|
||||
// IDirectDrawStreamSample
|
||||
[
|
||||
object,
|
||||
local,
|
||||
uuid(F4104FCF-9A70-11d0-8FDE-00C04FD9189D),
|
||||
pointer_default(unique)
|
||||
]
|
||||
interface IDirectDrawStreamSample : IStreamSample
|
||||
{
|
||||
HRESULT GetSurface(
|
||||
[out] IDirectDrawSurface ** ppDirectDrawSurface,
|
||||
[out] RECT * pRect);
|
||||
|
||||
HRESULT SetRect(
|
||||
[in] const RECT * pRect);
|
||||
|
||||
};
|
|
@ -0,0 +1,30 @@
|
|||
//------------------------------------------------------------------------------
|
||||
// File: DevEnum.idl
|
||||
//
|
||||
// Desc: IDL source for devenum.dll. This file will be processed by the
|
||||
// MIDL tool to produce the type library (devenum.tlb) and marshalling
|
||||
// code.
|
||||
//
|
||||
// Copyright (c) 1998 - 2000, Microsoft Corporation. All rights reserved.
|
||||
//------------------------------------------------------------------------------
|
||||
|
||||
|
||||
cpp_quote("#define CDEF_CLASS_DEFAULT 0x0001")
|
||||
cpp_quote("#define CDEF_BYPASS_CLASS_MANAGER 0x0002")
|
||||
//cpp_quote("#define CDEF_CLASS_LEGACY 0x0004")
|
||||
cpp_quote("#define CDEF_MERIT_ABOVE_DO_NOT_USE 0x0008")
|
||||
|
||||
[
|
||||
object,
|
||||
uuid(29840822-5B84-11D0-BD3B-00A0C911CE86),
|
||||
pointer_default(unique)
|
||||
]
|
||||
interface ICreateDevEnum : IUnknown
|
||||
{
|
||||
import "oaidl.idl";
|
||||
|
||||
HRESULT CreateClassEnumerator(
|
||||
[in] REFCLSID clsidDeviceClass,
|
||||
[out] IEnumMoniker ** ppEnumMoniker,
|
||||
[in] DWORD dwFlags);
|
||||
}
|
|
@ -0,0 +1,32 @@
|
|||
//------------------------------------------------------------------------------
|
||||
// File: DMODShow.idl
|
||||
//
|
||||
// Desc:
|
||||
//
|
||||
// Copyright (c) 1999 - 2000, Microsoft Corporation. All rights reserved.
|
||||
//------------------------------------------------------------------------------
|
||||
|
||||
|
||||
import "unknwn.idl";
|
||||
import "objidl.idl";
|
||||
import "mediaobj.idl";
|
||||
|
||||
// 94297043-bd82-4dfd-b0de-8177739c6d20
|
||||
cpp_quote("DEFINE_GUID(CLSID_DMOWrapperFilter, 0x94297043,0xbd82,0x4dfd,0xb0,0xde,0x81,0x77,0x73,0x9c,0x6d,0x20);")
|
||||
// bcd5796c-bd52-4d30-ab76-70f975b89199
|
||||
cpp_quote("DEFINE_GUID(CLSID_DMOFilterCategory,0xbcd5796c,0xbd52,0x4d30,0xab,0x76,0x70,0xf9,0x75,0xb8,0x91,0x99);")
|
||||
|
||||
|
||||
[
|
||||
object,
|
||||
uuid(52d6f586-9f0f-4824-8fc8-e32ca04930c2),
|
||||
]
|
||||
interface IDMOWrapperFilter : IUnknown
|
||||
{
|
||||
// Init is passed in the clsid (so it can call CoCreateInstance)
|
||||
// and the catgory under which the DMO lives
|
||||
// Note that catDMO can be CLSID_NULL in which case no special
|
||||
// category-specific processing will be invoked in the wrapper filter
|
||||
HRESULT Init(REFCLSID clsidDMO, REFCLSID catDMO);
|
||||
}
|
||||
|
|
@ -0,0 +1,59 @@
|
|||
//------------------------------------------------------------------------------
|
||||
// File: DShowASF.idl
|
||||
//
|
||||
// Desc:
|
||||
//
|
||||
// Copyright (c) 1992-2000, Microsoft Corporation. All rights reserved.
|
||||
//------------------------------------------------------------------------------
|
||||
|
||||
|
||||
import "unknwn.idl";
|
||||
import "objidl.idl";
|
||||
import "strmif.idl"; // for media type and time definitions
|
||||
import "wmsdkidl.idl";
|
||||
|
||||
cpp_quote( "EXTERN_GUID( IID_IConfigAsfWriter,0x45086030,0xF7E4,0x486a,0xB5,0x04,0x82,0x6B,0xB5,0x79,0x2A,0x3B );" )
|
||||
|
||||
interface IConfigAsfWriter;
|
||||
interface IWMProfile;
|
||||
|
||||
// Interface to control the ASF writer
|
||||
[
|
||||
object,
|
||||
uuid(45086030-F7E4-486a-B504-826BB5792A3B),
|
||||
pointer_default(unique)
|
||||
]
|
||||
interface IConfigAsfWriter : IUnknown
|
||||
{
|
||||
//
|
||||
// The user is expected to enumerate profiles using the wmsdk IWMProfileManager
|
||||
// method and then pass the desired profile index to the ASF Writer filter via this
|
||||
// method. The filter will then try to configure itself for the selected profile.
|
||||
//
|
||||
// NOTE: These 2 XXXProfileId methods are now obsolete because they assume
|
||||
// version 4.0 WMSDK profiles. To configure the filter for later profile
|
||||
// versions using a profile index, use the XXXProfile methods which take
|
||||
// the IWMProfile* directly.
|
||||
//
|
||||
HRESULT ConfigureFilterUsingProfileId([in] DWORD dwProfileId);
|
||||
HRESULT GetCurrentProfileId([out] DWORD *pdwProfileId);
|
||||
|
||||
//
|
||||
// configure using a pre-defined wmsdk profile guid
|
||||
//
|
||||
HRESULT ConfigureFilterUsingProfileGuid([in] REFGUID guidProfile);
|
||||
HRESULT GetCurrentProfileGuid([out] GUID *pProfileGuid);
|
||||
|
||||
//
|
||||
// Use these methods when a custom profile setup is preferred
|
||||
//
|
||||
HRESULT ConfigureFilterUsingProfile([in] IWMProfile * pProfile);
|
||||
HRESULT GetCurrentProfile([out] IWMProfile **ppProfile);
|
||||
|
||||
//
|
||||
// allow app to control whether or not to index file
|
||||
//
|
||||
HRESULT SetIndexMode( [in] BOOL bIndexFile );
|
||||
HRESULT GetIndexMode( [out] BOOL *pbIndexFile );
|
||||
}
|
||||
|
File diff suppressed because it is too large
Load Diff
File diff suppressed because it is too large
Load Diff
|
@ -0,0 +1,318 @@
|
|||
//------------------------------------------------------------------------------
|
||||
// File: DynGraph.idl
|
||||
//
|
||||
// Desc: Dynamic graph interfaces.
|
||||
//
|
||||
// Copyright (c) 1999 - 2000, Microsoft Corporation. All rights reserved.
|
||||
//------------------------------------------------------------------------------
|
||||
|
||||
|
||||
interface IPinConnection;
|
||||
interface IPinFlowControl;
|
||||
interface IGraphConfig;
|
||||
interface IGraphConfigCallback;
|
||||
|
||||
//--------------------------------------------------------------------
|
||||
//
|
||||
// IPinConnection - supported by input pins
|
||||
//
|
||||
//--------------------------------------------------------------------
|
||||
[
|
||||
local,
|
||||
object,
|
||||
uuid(4a9a62d3-27d4-403d-91e9-89f540e55534),
|
||||
pointer_default(unique)
|
||||
]
|
||||
interface IPinConnection : IUnknown {
|
||||
|
||||
// Do you accept this type chane in your current state?
|
||||
HRESULT DynamicQueryAccept([in] const AM_MEDIA_TYPE *pmt);
|
||||
|
||||
// Set event when EndOfStream receive - do NOT pass it on
|
||||
// This condition is cancelled by a flush or Stop
|
||||
HRESULT NotifyEndOfStream([in] HANDLE hNotifyEvent);
|
||||
|
||||
// Are you an 'end pin'
|
||||
HRESULT IsEndPin();
|
||||
|
||||
HRESULT DynamicDisconnect();
|
||||
};
|
||||
|
||||
//--------------------------------------------------------------------
|
||||
//
|
||||
// IPinFlowControl - supported by output pins
|
||||
//
|
||||
//--------------------------------------------------------------------
|
||||
[
|
||||
local,
|
||||
object,
|
||||
uuid(c56e9858-dbf3-4f6b-8119-384af2060deb),
|
||||
pointer_default(unique)
|
||||
]
|
||||
interface IPinFlowControl : IUnknown {
|
||||
// Block processing on this pin
|
||||
HRESULT Block([in] DWORD dwBlockFlags, [in] HANDLE hEvent);
|
||||
}
|
||||
|
||||
// block flags
|
||||
enum _AM_PIN_FLOW_CONTROL_BLOCK_FLAGS {
|
||||
AM_PIN_FLOW_CONTROL_BLOCK = 0x00000001, // 0 means unblock
|
||||
};
|
||||
|
||||
|
||||
// Reconnect flags
|
||||
typedef enum _AM_GRAPH_CONFIG_RECONNECT_FLAGS {
|
||||
AM_GRAPH_CONFIG_RECONNECT_DIRECTCONNECT = 0x00000001,
|
||||
AM_GRAPH_CONFIG_RECONNECT_CACHE_REMOVED_FILTERS = 0x00000002,
|
||||
AM_GRAPH_CONFIG_RECONNECT_USE_ONLY_CACHED_FILTERS = 0x00000004
|
||||
} AM_GRAPH_CONFIG_RECONNECT_FLAGS;
|
||||
|
||||
// RemoveFilterEx flags
|
||||
enum _REM_FILTER_FLAGS {
|
||||
REMFILTERF_LEAVECONNECTED = 0x00000001
|
||||
};
|
||||
|
||||
typedef enum _AM_FILTER_FLAGS {
|
||||
AM_FILTER_FLAGS_REMOVABLE = 0x00000001
|
||||
} AM_FILTER_FLAGS;
|
||||
|
||||
|
||||
//--------------------------------------------------------------------
|
||||
//
|
||||
// IGraphConfig
|
||||
//
|
||||
//--------------------------------------------------------------------
|
||||
|
||||
[
|
||||
local,
|
||||
object,
|
||||
uuid(03A1EB8E-32BF-4245-8502-114D08A9CB88),
|
||||
pointer_default(unique)
|
||||
]
|
||||
interface IGraphConfig : IUnknown {
|
||||
HRESULT Reconnect([in] IPin *pOutputPin,
|
||||
[in] IPin *pInputPin,
|
||||
[in] const AM_MEDIA_TYPE *pmtFirstConnection,
|
||||
[in] IBaseFilter *pUsingFilter, // can be NULL
|
||||
[in] HANDLE hAbortEvent,
|
||||
[in] DWORD dwFlags);
|
||||
|
||||
HRESULT Reconfigure([in] IGraphConfigCallback *pCallback,
|
||||
[in] PVOID pvContext,
|
||||
[in] DWORD dwFlags,
|
||||
[in] HANDLE hAbortEvent);
|
||||
|
||||
|
||||
HRESULT AddFilterToCache([in] IBaseFilter *pFilter);
|
||||
HRESULT EnumCacheFilter([out] IEnumFilters **pEnum);
|
||||
HRESULT RemoveFilterFromCache([in]IBaseFilter *pFilter);
|
||||
|
||||
// Get the start time associated with the last Run() call
|
||||
// If the graph is not running returns VFW_E_WRONG_STATE
|
||||
HRESULT GetStartTime([out] REFERENCE_TIME *prtStart);
|
||||
|
||||
HRESULT PushThroughData(
|
||||
[in] IPin *pOutputPin,
|
||||
[in] IPinConnection *pConnection,
|
||||
[in] HANDLE hEventAbort);
|
||||
|
||||
HRESULT SetFilterFlags([in] IBaseFilter *pFilter, [in] DWORD dwFlags);
|
||||
HRESULT GetFilterFlags([in] IBaseFilter *pFilter, [out] DWORD *pdwFlags);
|
||||
|
||||
HRESULT RemoveFilterEx( [in] IBaseFilter *pFilter, DWORD Flags );
|
||||
}
|
||||
|
||||
//--------------------------------------------------------------------
|
||||
//
|
||||
// IGraphConfigCallback
|
||||
//
|
||||
//--------------------------------------------------------------------
|
||||
|
||||
[
|
||||
local,
|
||||
object,
|
||||
uuid(ade0fd60-d19d-11d2-abf6-00a0c905f375),
|
||||
pointer_default(unique)
|
||||
]
|
||||
interface IGraphConfigCallback : IUnknown
|
||||
{
|
||||
HRESULT Reconfigure(PVOID pvContext, DWORD dwFlags);
|
||||
}
|
||||
|
||||
// Filter Chain Definition
|
||||
//
|
||||
// Filter chains have the following properties:
|
||||
//
|
||||
// - Each filter chain has one or more filters.
|
||||
//
|
||||
// - Each filter in a filter chain has at most one connected input pin and one
|
||||
// connected output pin. For example, filters A, C, D, F, G, H, I, J and K
|
||||
// (see the diagram below) can be in a filter chain because each one has at
|
||||
// most one connected input pin and one connected output pin.
|
||||
//
|
||||
// - Any filter in a chain is reachable by any other filter in the chain.
|
||||
// For example, in the filter chain F-G-H, F can reach H by following the F-
|
||||
// G connection to G and then following the G-H connection to H. Filters F
|
||||
// and J cannot be in the same filter chain because J is not reachable from
|
||||
// F. Anotherwords, there no sequence of connected filters between F and J.
|
||||
//
|
||||
// - The start filter is the only filter in the filter chain who's input
|
||||
// pin is not connected to another filter in the chain. For instance, F is
|
||||
// the start filter in F-G-H because F's input pin is connected to E and E
|
||||
// is not in the filter chain. G's input pin is connected to F and H's is
|
||||
// connected to G. Both F and G are in the filter chain.
|
||||
//
|
||||
// - The end filter is the only filter in the filter chain who's output pin
|
||||
// is not connected to another filter in the chain. For example, in the
|
||||
// filter chain J-K, K is the end filter because K's output pin is
|
||||
// connected to L. J's output pin is connected to K and K is in the J-K
|
||||
// filter chain.
|
||||
//
|
||||
//
|
||||
// --->|---| |---|--->
|
||||
// | C |--->| D |
|
||||
// |---| |---|--->|---| |---|--->|---| |---| |---| |---|
|
||||
// | A |--->| B | | E |--->| F |--->| G |--->| H |
|
||||
// |---| |---|--->|---|------------>|---| |---| |---| |---|
|
||||
// | I |--->
|
||||
// --->|---|--->
|
||||
//
|
||||
// |---| |---| |---|
|
||||
// | J |--->| K |--->| L |
|
||||
// |---| |---| |---|
|
||||
//
|
||||
// Example Filter Graph
|
||||
//
|
||||
//
|
||||
//
|
||||
// IFilterChain Methods Documentation
|
||||
//
|
||||
// HRESULT StartChain( [in] IBaseFilter *pStartFilter, [in] IBaseFilter *pEndFilter );
|
||||
//
|
||||
// StartChain() switches all the filters in the chain into the running state
|
||||
// If one of the filters will not switch to the running state, then all the filters
|
||||
// in the chain are stopped. This method can only be called if the filter graph is
|
||||
// running.
|
||||
//
|
||||
// Parameters:
|
||||
// - pStartFilter [in]
|
||||
// The first filter in the filter chain. Note that this can be the same
|
||||
// filter as pEndFilter .
|
||||
//
|
||||
// - pEndFilter [in]
|
||||
// The last filter in the filter chain. Note that this can be the same
|
||||
// filter as pStartFilter. If pEndFilter is NULL then the filter chain extends
|
||||
// from pStartFilter to the last downstream filter which can be in a filter chain.
|
||||
// For example, IFilterChain::StartChain( A, NULL ) would start filter A.
|
||||
// IFilterChain::StartChain( G, NULL ) would start filters G and H.
|
||||
// IFilterChain::StartChain( C, NULL ) would start filters C and D. Finally,
|
||||
// IFilterChain::StartChain( E, NULL ) would fail because E cannot be in a
|
||||
// filter chain (see the Filter Chain Definition section for more information).
|
||||
//
|
||||
// Return Value:
|
||||
// An HRESULT. See the Direct Show SDK and COM SDK documentation for more
|
||||
// information on interpreting HRESULTs.
|
||||
//
|
||||
//
|
||||
//
|
||||
//
|
||||
// HRESULT PauseChain( [in] IBaseFilter *pStartFilter, [in] IBaseFilter *pEndFilter );
|
||||
//
|
||||
// PauseChain() switches all the filters in a chain to the paused state. If it cannot
|
||||
// switch one of the filtres into the paused state, all the filters in the chain are
|
||||
// stopped. This method can only be called if the filter graph is paused.
|
||||
//
|
||||
// Parameters:
|
||||
// - pStartFilter [in]
|
||||
// The first filter in the filter chain. Note that this can be the same
|
||||
// filter as pEndFilter .
|
||||
//
|
||||
// - pEndFilter [in]
|
||||
// The last filter in the filter chain. Note that this can be the same
|
||||
// filter as pStartFilter. If pEndFilter is NULL then the filter chain extends
|
||||
// from pStartFilter to the last downstream filter which can be in a filter chain.
|
||||
// For example, IFilterChain::StopChain( A, NULL ) would stop filter A.
|
||||
// IFilterChain::StopChain( G, NULL ) would stop filters G and H.
|
||||
// IFilterChain::StopChain( C, NULL ) would stop filters C and D. Finally,
|
||||
// IFilterChain::StopChain( E, NULL ) would fail because E cannot be in a filter
|
||||
// chain (see the Filter Chain Definition section for more information).
|
||||
//
|
||||
//
|
||||
// Return Value:
|
||||
// An HRESULT. See the Direct Show SDK and COM SDK documentation for more
|
||||
// information on interpreting HRESULTs.
|
||||
//
|
||||
//
|
||||
//
|
||||
// HRESULT StopChain( [in] IBaseFilter *pStartFilter, [in] IBaseFilter *pEndFilter );
|
||||
//
|
||||
// StopChain() switches all the filters in chain to the stopped state.
|
||||
//
|
||||
// Parameters:
|
||||
// - pStartFilter [in]
|
||||
// The first filter in the filter chain. Note that this can be the same
|
||||
// filter as pEndFilter .
|
||||
//
|
||||
// - pEndFilter [in]
|
||||
// The last filter in the filter chain. Note that this can be the same
|
||||
// filter as pStartFilter. If pEndFilter is NULL then the filter chain extends
|
||||
// from pStartFilter to the last downstream filter which can be in a filter chain.
|
||||
// For example, IFilterChain::StopChain( A, NULL ) would stop filter A.
|
||||
// IFilterChain::StopChain( G, NULL ) would stop filters G and H.
|
||||
// IFilterChain::StopChain( C, NULL ) would stop filters C and D. Finally,
|
||||
// IFilterChain::StopChain( E, NULL ) would fail because E cannot be in a filter
|
||||
// chain (see the Filter Chain Definition section for more information).
|
||||
//
|
||||
//
|
||||
// Return Value:
|
||||
// An HRESULT. See the Direct Show SDK and COM SDK documentation for more
|
||||
// information on interpreting HRESULTs.
|
||||
//
|
||||
//
|
||||
//
|
||||
//
|
||||
//
|
||||
// HRESULT RemoveChain( [in] IBaseFilter *pStartFilter, [in] IBaseFilter *pEndFilter );
|
||||
//
|
||||
// RemoveChain() removes every filter in a chain from the filter graph.
|
||||
// The filters can be removed while the graph is running.
|
||||
//
|
||||
// Parameters:
|
||||
// - pStartFilter [in]
|
||||
// The first filter in the filter chain. Note that this can be the same
|
||||
// filter as pEndFilter .
|
||||
//
|
||||
// - pEndFilter [in]
|
||||
// The last filter in the filter chain. Note that this can be the same
|
||||
// filter as pStartFilter. If pEndFilter is NULL then the filter chain
|
||||
// extends from pStartFilter to the last downstream filter which can be in a
|
||||
// filter chain. For example, IFilterChain::RemoveChain( A, NULL ) would remove
|
||||
// filter A from the filter graph. IFilterChain::RemoveChain( G, NULL ) would
|
||||
// remove filters G and H. IFilterChain::RemoveChain( C, NULL ) would remove
|
||||
// filters C and D. Finally, IFilterChain::RemoveChain( E, NULL ) would fail
|
||||
// because E cannot be in a filter chain (see the Filter Chain Definition
|
||||
// section for more information).
|
||||
//
|
||||
//
|
||||
// Return Value:
|
||||
// An HRESULT. See the Direct Show SDK and COM SDK documentation for more
|
||||
// information on interpreting HRESULTs.
|
||||
//
|
||||
//
|
||||
[
|
||||
local,
|
||||
object,
|
||||
uuid(DCFBDCF6-0DC2-45f5-9AB2-7C330EA09C29),
|
||||
pointer_default(unique)
|
||||
]
|
||||
interface IFilterChain : IUnknown
|
||||
{
|
||||
HRESULT StartChain( [in] IBaseFilter *pStartFilter, [in] IBaseFilter *pEndFilter );
|
||||
HRESULT PauseChain( [in] IBaseFilter *pStartFilter, [in] IBaseFilter *pEndFilter );
|
||||
HRESULT StopChain( [in] IBaseFilter *pStartFilter, [in] IBaseFilter *pEndFilter );
|
||||
HRESULT RemoveChain( [in] IBaseFilter *pStartFilter, [in] IBaseFilter *pEndFilter );
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
|
@ -0,0 +1,144 @@
|
|||
//------------------------------------------------------------------------------
|
||||
// File: IAMovie.idl
|
||||
//
|
||||
// Desc:
|
||||
//
|
||||
// Copyright (c) 1992 - 2000, Microsoft Corporation. All rights reserved.
|
||||
//------------------------------------------------------------------------------
|
||||
|
||||
|
||||
[
|
||||
object,
|
||||
uuid(359ace10-7688-11cf-8b23-00805f6cef60),
|
||||
pointer_default(unique)
|
||||
]
|
||||
interface IAMovie : IFilterGraph
|
||||
{
|
||||
// IGraphBuilder
|
||||
// Connect these two pins directly or indirectly, using transform filters
|
||||
// if necessary.
|
||||
|
||||
HRESULT Connect
|
||||
( [in] IPin * ppinOut, // the output pin
|
||||
[in] IPin * ppinIn // the input pin
|
||||
);
|
||||
|
||||
|
||||
// Connect this output pin directly or indirectly, using transform filters
|
||||
// if necessary to something that will render it.
|
||||
|
||||
HRESULT Render
|
||||
( [in] IPin * ppinOut // the output pin
|
||||
);
|
||||
|
||||
|
||||
// IMediaControl methods
|
||||
HRESULT Run();
|
||||
HRESULT Pause();
|
||||
HRESULT Stop();
|
||||
|
||||
//returns the state. same semantics as IMediaFilter::GetState
|
||||
|
||||
HRESULT GetState(
|
||||
[in] LONG msTimeout,
|
||||
[out] FILTER_STATE* pfs);
|
||||
|
||||
// adds and connects filters needed to play the specified file
|
||||
HRESULT RenderFile(
|
||||
[in] LPCWSTR strFilename);
|
||||
|
||||
// adds to the graph the source filter that can read this file,
|
||||
// and returns an IFilterInfo object for it
|
||||
HRESULT AddSourceFilter(
|
||||
[in] LPCWSTR strFilename,
|
||||
[out] IBaseFilter ** ppUnk);
|
||||
|
||||
// get back the event handle. This is manual-reset
|
||||
// (don't - it's reset by the event mechanism) and remains set
|
||||
// when events are queued, and reset when the queue is empty.
|
||||
HRESULT GetEventHandle(
|
||||
[out] HEVENT * hEvent);
|
||||
|
||||
// remove the next event notification from the head of the queue and
|
||||
// return it. Waits up to msTimeout millisecs if there are no events.
|
||||
// if a timeout occurs without any events, this method will return
|
||||
// E_ABORT, and the value of the event code and other parameters
|
||||
// is undefined.
|
||||
HRESULT GetEvent(
|
||||
[out] long * lEventCode,
|
||||
[out] long * lParam1,
|
||||
[out] long * lParam2,
|
||||
[in] long msTimeout
|
||||
);
|
||||
|
||||
// Calls GetEvent repeatedly discarding events until it finds a
|
||||
// completion event (EC_COMPLETE, EC_ERRORABORT, or EC_USERABORT).
|
||||
// The completion event is removed from the queue and returned
|
||||
// in pEvCode. Note that the object is still in running mode until
|
||||
// a Pause or Stop call is made.
|
||||
// If the timeout occurs, *pEvCode will be 0 and E_ABORT will be
|
||||
// returned.
|
||||
HRESULT WaitForCompletion(
|
||||
[in] long msTimeout,
|
||||
[out] long * pEvCode);
|
||||
|
||||
// cancels any system handling of the specified event code
|
||||
// and ensures that the events are passed straight to the application
|
||||
// (via GetEvent) and not handled. A good example of this is
|
||||
// EC_REPAINT: default handling for this ensures the painting of the
|
||||
// window and does not get posted to the app.
|
||||
HRESULT CancelDefaultHandling(
|
||||
[in] long lEvCode);
|
||||
|
||||
// restore the normal system default handling that may have been
|
||||
// cancelled by CancelDefaultHandling().
|
||||
HRESULT RestoreDefaultHandling( [in] long lEvCode);
|
||||
|
||||
// properties
|
||||
HRESULT get_Duration(
|
||||
[out] REFTIME* plength);
|
||||
|
||||
HRESULT put_CurrentPosition(
|
||||
[in] REFTIME llTime);
|
||||
|
||||
HRESULT get_CurrentPosition(
|
||||
[out] REFTIME* pllTime);
|
||||
|
||||
HRESULT get_StopTime(
|
||||
[out] REFTIME* pllTime);
|
||||
|
||||
HRESULT put_StopTime(
|
||||
[in] REFTIME llTime);
|
||||
|
||||
HRESULT get_PrerollTime(
|
||||
[out] REFTIME* pllTime);
|
||||
HRESULT put_PrerollTime(
|
||||
[in] REFTIME llTime);
|
||||
|
||||
HRESULT put_Rate(
|
||||
[in] double dRate);
|
||||
HRESULT get_Rate(
|
||||
[out] double * pdRate);
|
||||
|
||||
/* New methods */
|
||||
HRESULT RemoveAllFilters();
|
||||
HRESULT Play();
|
||||
HRESULT PlayFile([in] LPCWSTR strFilename);
|
||||
HRESULT EnumFiltersByInterface( [in] REFIID riid, [out] IEnumFilters ** ppEnum );
|
||||
HRESULT EnumPins( [out] IEnumPins ** ppEnum );
|
||||
HRESULT EnumPinsIn( [out] IEnumPins ** ppEnum );
|
||||
HRESULT EnumPinsOut( [out] IEnumPins ** ppEnum );
|
||||
HRESULT RenderAll();
|
||||
HRESULT RenderNewFile( [in] LPCWSTR strFilename);
|
||||
|
||||
// Free any resources associated with the parameters to an event.
|
||||
// Event parameters may be LONGs, IUnknown* or BSTR. No action
|
||||
// is taken with LONGs. IUnknown are passed addrefed and need a
|
||||
// Release call. BSTR are allocated by the task allocator and will be
|
||||
// freed by calling the task allocator.
|
||||
HRESULT FreeEventParams(
|
||||
[in] long lEvCode,
|
||||
[in] long lParam1,
|
||||
[in] long lParam2);
|
||||
}
|
||||
|
|
@ -0,0 +1,412 @@
|
|||
//------------------------------------------------------------------------------
|
||||
// File: MediaObj.idl
|
||||
//
|
||||
// Desc: Define the interfaces for DirectX Media Objects. This file will
|
||||
// be processed by the MIDL tool to produce mediaobj.h and proxy-stub
|
||||
// code.
|
||||
//
|
||||
// Copyright (c) 1999 - 2000, Microsoft Corporation. All rights reserved.
|
||||
//------------------------------------------------------------------------------
|
||||
|
||||
|
||||
import "unknwn.idl";
|
||||
import "objidl.idl";
|
||||
|
||||
// DMO_MEDIA_TYPE structure
|
||||
|
||||
cpp_quote("#ifdef __strmif_h__")
|
||||
cpp_quote("typedef AM_MEDIA_TYPE DMO_MEDIA_TYPE;")
|
||||
cpp_quote("#else")
|
||||
typedef struct _DMOMediaType {
|
||||
GUID majortype;
|
||||
GUID subtype;
|
||||
BOOL bFixedSizeSamples;
|
||||
BOOL bTemporalCompression;
|
||||
ULONG lSampleSize;
|
||||
GUID formattype;
|
||||
IUnknown *pUnk;
|
||||
ULONG cbFormat;
|
||||
[size_is(cbFormat)] BYTE * pbFormat;
|
||||
} DMO_MEDIA_TYPE;
|
||||
typedef LONGLONG REFERENCE_TIME;
|
||||
cpp_quote("#endif")
|
||||
|
||||
|
||||
// Per-buffer flags that apply to input buffers
|
||||
enum _DMO_INPUT_DATA_BUFFER_FLAGS {
|
||||
DMO_INPUT_DATA_BUFFERF_SYNCPOINT = 0x00000001,
|
||||
DMO_INPUT_DATA_BUFFERF_TIME = 0x00000002,
|
||||
DMO_INPUT_DATA_BUFFERF_TIMELENGTH = 0x00000004
|
||||
};
|
||||
|
||||
// Per-buffer flags that apply to output buffers.
|
||||
enum _DMO_OUTPUT_DATA_BUFFER_FLAGS {
|
||||
DMO_OUTPUT_DATA_BUFFERF_SYNCPOINT = 0x00000001,
|
||||
DMO_OUTPUT_DATA_BUFFERF_TIME = 0x00000002,
|
||||
DMO_OUTPUT_DATA_BUFFERF_TIMELENGTH = 0x00000004,
|
||||
|
||||
//
|
||||
// This flag means the object could have generated more data for this
|
||||
// output stream, even with no additional input from any input stream,
|
||||
// but the output buffer did not have sufficient room.
|
||||
//
|
||||
DMO_OUTPUT_DATA_BUFFERF_INCOMPLETE = 0x01000000
|
||||
};
|
||||
|
||||
// Flags returned by GetInputStatus()
|
||||
enum _DMO_INPUT_STATUS_FLAGS {
|
||||
//
|
||||
// ACCEPT_DATA indicates that the input stream is ready to accept
|
||||
// new data via ProcessInput().
|
||||
//
|
||||
DMO_INPUT_STATUSF_ACCEPT_DATA = 0x00000001
|
||||
};
|
||||
|
||||
// Flags returned by GetInputStreamInfo()
|
||||
enum _DMO_INPUT_STREAM_INFO_FLAGS {
|
||||
DMO_INPUT_STREAMF_WHOLE_SAMPLES = 0x00000001,
|
||||
DMO_INPUT_STREAMF_SINGLE_SAMPLE_PER_BUFFER = 0x00000002,
|
||||
DMO_INPUT_STREAMF_FIXED_SAMPLE_SIZE = 0x00000004,
|
||||
DMO_INPUT_STREAMF_HOLDS_BUFFERS = 0x00000008
|
||||
};
|
||||
|
||||
// Flags returned by GetOutputStreamInfo()
|
||||
enum _DMO_OUTPUT_STREAM_INFO_FLAGS {
|
||||
DMO_OUTPUT_STREAMF_WHOLE_SAMPLES = 0x00000001,
|
||||
DMO_OUTPUT_STREAMF_SINGLE_SAMPLE_PER_BUFFER = 0x00000002,
|
||||
DMO_OUTPUT_STREAMF_FIXED_SAMPLE_SIZE = 0x00000004,
|
||||
DMO_OUTPUT_STREAMF_DISCARDABLE = 0x00000008,
|
||||
DMO_OUTPUT_STREAMF_OPTIONAL = 0x00000010
|
||||
};
|
||||
|
||||
// SetType flags
|
||||
enum _DMO_SET_TYPE_FLAGS {
|
||||
DMO_SET_TYPEF_TEST_ONLY = 0x00000001,// check but don't set
|
||||
DMO_SET_TYPEF_CLEAR = 0x00000002 // unset
|
||||
};
|
||||
|
||||
// Process Output Flags
|
||||
enum _DMO_PROCESS_OUTPUT_FLAGS {
|
||||
DMO_PROCESS_OUTPUT_DISCARD_WHEN_NO_BUFFER = 0x00000001 // Discard
|
||||
};
|
||||
|
||||
// Buffer wrapper interface
|
||||
[
|
||||
object,
|
||||
uuid(59eff8b9-938c-4a26-82f2-95cb84cdc837)
|
||||
]
|
||||
interface IMediaBuffer : IUnknown
|
||||
{
|
||||
HRESULT SetLength(
|
||||
DWORD cbLength
|
||||
);
|
||||
HRESULT GetMaxLength(
|
||||
[out] DWORD *pcbMaxLength
|
||||
);
|
||||
HRESULT GetBufferAndLength(
|
||||
[out] BYTE **ppBuffer, // not filled if NULL
|
||||
[out] DWORD *pcbLength // not filled if NULL
|
||||
);
|
||||
}
|
||||
|
||||
//
|
||||
// Output buffer info structure: one of these must be passed in for each
|
||||
// output stream with every ProcessOutput() call
|
||||
// All [out] fields should be
|
||||
// assumed undefined if ProcessOutput() failed
|
||||
//
|
||||
typedef struct _DMO_OUTPUT_DATA_BUFFER {
|
||||
|
||||
IMediaBuffer *pBuffer; // [in] can be NULL
|
||||
|
||||
// ProcessOutput() must set any appropriate flags and zero out the rest.
|
||||
DWORD dwStatus; // [out] DMO_OUTPUT_DATA_BUFFERF_XXX (INCOMPLETE, etc.)
|
||||
|
||||
//
|
||||
// Each of these is valid if the corresponding flag is set in dwStatus
|
||||
//
|
||||
REFERENCE_TIME rtTimestamp; // [out]
|
||||
REFERENCE_TIME rtTimelength; // [out]
|
||||
} DMO_OUTPUT_DATA_BUFFER, *PDMO_OUTPUT_DATA_BUFFER;
|
||||
|
||||
|
||||
// Interface supported by media objects
|
||||
[
|
||||
object,
|
||||
uuid(d8ad0f58-5494-4102-97c5-ec798e59bcf4)
|
||||
]
|
||||
interface IMediaObject : IUnknown
|
||||
{
|
||||
|
||||
//
|
||||
// Stream enumeration
|
||||
//
|
||||
HRESULT GetStreamCount(
|
||||
[out] DWORD *pcInputStreams,
|
||||
[out] DWORD *pcOutputStreams
|
||||
);
|
||||
HRESULT GetInputStreamInfo(
|
||||
DWORD dwInputStreamIndex, // 0-based
|
||||
[out] DWORD *pdwFlags // HOLDS_BUFFERS
|
||||
);
|
||||
HRESULT GetOutputStreamInfo(
|
||||
DWORD dwOutputStreamIndex, // 0-based
|
||||
[out] DWORD *pdwFlags // Media object sets to 0
|
||||
);
|
||||
|
||||
//
|
||||
// Mediatypes
|
||||
//
|
||||
//
|
||||
// GetType - iterate through media types supported by a stream.
|
||||
// Returns S_FALSE if the type index is out of range ("no more types").
|
||||
//
|
||||
HRESULT GetInputType(
|
||||
DWORD dwInputStreamIndex,
|
||||
DWORD dwTypeIndex, // 0-based
|
||||
[out] DMO_MEDIA_TYPE *pmt
|
||||
);
|
||||
HRESULT GetOutputType(
|
||||
DWORD dwOutputStreamIndex,
|
||||
DWORD dwTypeIndex, // 0-based
|
||||
[out] DMO_MEDIA_TYPE *pmt
|
||||
);
|
||||
|
||||
//
|
||||
// SetType - tell the object the type of data it will work with.
|
||||
//
|
||||
HRESULT SetInputType(
|
||||
DWORD dwInputStreamIndex,
|
||||
[in] const DMO_MEDIA_TYPE *pmt,
|
||||
DWORD dwFlags // test only
|
||||
);
|
||||
HRESULT SetOutputType(
|
||||
DWORD dwOutputStreamIndex,
|
||||
[in] const DMO_MEDIA_TYPE *pmt,
|
||||
DWORD dwFlags // test only
|
||||
);
|
||||
|
||||
//
|
||||
// GetCurrentType - get the last mediatype supplied via SetType.
|
||||
// Returns S_FALSE if SetType has not been called.
|
||||
//
|
||||
HRESULT GetInputCurrentType(
|
||||
DWORD dwInputStreamIndex,
|
||||
[out] DMO_MEDIA_TYPE *pmt
|
||||
);
|
||||
HRESULT GetOutputCurrentType(
|
||||
DWORD dwOutputStreamIndex,
|
||||
[out] DMO_MEDIA_TYPE *pmt
|
||||
);
|
||||
|
||||
//
|
||||
// SizeInfo
|
||||
//
|
||||
//
|
||||
// GetSizeInfo - Get buffer size requirementes of a stream.
|
||||
//
|
||||
// If buffer size depends on the media type used, the object should
|
||||
// base its response on the most recent media type set for this stream.
|
||||
// If no mediatype has been set, the object may return an error.
|
||||
//
|
||||
HRESULT GetInputSizeInfo(
|
||||
DWORD dwInputStreamIndex,
|
||||
[out] DWORD *pcbSize, // size of input 'quantum'
|
||||
[out] DWORD *pcbMaxLookahead, // max total bytes held
|
||||
[out] DWORD *pcbAlignment // buffer alignment requirement
|
||||
);
|
||||
HRESULT GetOutputSizeInfo(
|
||||
DWORD dwOutputStreamIndex,
|
||||
[out] DWORD *pcbSize, // size of output 'quantum'
|
||||
[out] DWORD *pcbAlignment // buffer alignment requirement
|
||||
);
|
||||
|
||||
//
|
||||
// Latency methods
|
||||
//
|
||||
HRESULT GetInputMaxLatency(
|
||||
DWORD dwInputStreamIndex,
|
||||
[out] REFERENCE_TIME *prtMaxLatency
|
||||
);
|
||||
HRESULT SetInputMaxLatency(
|
||||
DWORD dwInputStreamIndex,
|
||||
REFERENCE_TIME rtMaxLatency
|
||||
);
|
||||
|
||||
//
|
||||
// Streaming / state methods
|
||||
//
|
||||
//
|
||||
// Flush() - discard any buffered data.
|
||||
//
|
||||
HRESULT Flush();
|
||||
|
||||
//
|
||||
// Send a discontinuity to an input stream. The object will not
|
||||
// accept any more data on this input stream until the discontinuity
|
||||
// has been completely processed, which may involve multiple
|
||||
// ProcessOutput() calls.
|
||||
//
|
||||
HRESULT Discontinuity(DWORD dwInputStreamIndex);
|
||||
|
||||
//
|
||||
// If a streaming object needs to perform any time consuming
|
||||
// initialization before it can stream data, it should do it inside
|
||||
// AllocateStreamingResources() rather than during the first process
|
||||
// call.
|
||||
//
|
||||
// This method is NOT guaranteed to be called before streaming
|
||||
// starts. If it is not called, the object should perform any
|
||||
// required initialization during a process call.
|
||||
//
|
||||
HRESULT AllocateStreamingResources();
|
||||
|
||||
// Free anything allocated in AllocateStreamingResources().
|
||||
HRESULT FreeStreamingResources();
|
||||
|
||||
// GetInputStatus - the only flag defined right now is ACCEPT_DATA.
|
||||
HRESULT GetInputStatus(
|
||||
DWORD dwInputStreamIndex,
|
||||
[out] DWORD *dwFlags // ACCEPT_DATA
|
||||
);
|
||||
|
||||
//
|
||||
// Pass one new buffer to an input stream
|
||||
//
|
||||
HRESULT ProcessInput(
|
||||
DWORD dwInputStreamIndex,
|
||||
IMediaBuffer *pBuffer, // must not be NULL
|
||||
DWORD dwFlags, // DMO_INPUT_DATA_BUFFERF_XXX (syncpoint, etc.)
|
||||
REFERENCE_TIME rtTimestamp, // valid if flag set
|
||||
REFERENCE_TIME rtTimelength // valid if flag set
|
||||
);
|
||||
|
||||
//
|
||||
// ProcessOutput() - generate output for current input buffers
|
||||
//
|
||||
// Output stream specific status information is returned in the
|
||||
// dwStatus member of each buffer wrapper structure.
|
||||
//
|
||||
HRESULT ProcessOutput(
|
||||
DWORD dwFlags, // DMO_PROCESS_OUTPUT_FLAGS
|
||||
DWORD cOutputBufferCount, // # returned by GetStreamCount()
|
||||
[in,out,size_is(cOutputBufferCount)]
|
||||
DMO_OUTPUT_DATA_BUFFER *pOutputBuffers, // one per stream
|
||||
[out] DWORD *pdwStatus // TBD, must be set to 0
|
||||
);
|
||||
|
||||
// Locking - lock if bLock is TRUE, otherwise unlock
|
||||
HRESULT Lock(LONG bLock);
|
||||
};
|
||||
|
||||
|
||||
//
|
||||
// Interface returned by the DMO enumeration API
|
||||
//
|
||||
[
|
||||
object,
|
||||
uuid(2c3cd98a-2bfa-4a53-9c27-5249ba64ba0f)
|
||||
]
|
||||
interface IEnumDMO : IUnknown {
|
||||
HRESULT Next(
|
||||
DWORD cItemsToFetch,
|
||||
[out, size_is(cItemsToFetch), length_is(*pcItemsFetched)] CLSID *pCLSID,
|
||||
[out, size_is(cItemsToFetch), length_is(*pcItemsFetched), string] WCHAR **Names,
|
||||
[out] DWORD *pcItemsFetched
|
||||
);
|
||||
HRESULT Skip(
|
||||
DWORD cItemsToSkip
|
||||
);
|
||||
HRESULT Reset(void);
|
||||
HRESULT Clone(
|
||||
[out] IEnumDMO **ppEnum
|
||||
);
|
||||
}
|
||||
|
||||
|
||||
// Flags for IMediaObjectInPlace::Process
|
||||
enum _DMO_INPLACE_PROCESS_FLAGS {
|
||||
DMO_INPLACE_NORMAL = 0x00000000,
|
||||
DMO_INPLACE_ZERO = 0x00000001
|
||||
};
|
||||
|
||||
[
|
||||
object,
|
||||
uuid(651b9ad0-0fc7-4aa9-9538-d89931010741)
|
||||
]
|
||||
interface IMediaObjectInPlace : IUnknown {
|
||||
|
||||
// Proces - Given a buffer of size ulSize, put the output
|
||||
// of the DMO into the same buffer.
|
||||
HRESULT Process(
|
||||
[in] ULONG ulSize,
|
||||
[in,out,size_is(ulSize)] BYTE* pData,
|
||||
[in] REFERENCE_TIME refTimeStart,
|
||||
[in] DWORD dwFlags
|
||||
);
|
||||
|
||||
// Create a copy of the In-Place Media Object. This allows
|
||||
// for very fast initialization of a number of In-Place objects
|
||||
// in a known state.
|
||||
HRESULT Clone(
|
||||
[out] IMediaObjectInPlace **ppMediaObject
|
||||
);
|
||||
|
||||
// GetLatency - Returns a REFERENCE_TIME value
|
||||
// (1 tick = 100ns) which corresponds to the latency time
|
||||
// processing this effect will add to the graph. This assumes
|
||||
// the effect cost per buffer is a constant.
|
||||
HRESULT GetLatency(
|
||||
[out] REFERENCE_TIME *pLatencyTime
|
||||
);
|
||||
}
|
||||
|
||||
// Quality control status flags
|
||||
enum _DMO_QUALITY_STATUS_FLAGS {
|
||||
DMO_QUALITY_STATUS_ENABLED = 0x00000001
|
||||
};
|
||||
|
||||
[
|
||||
object,
|
||||
uuid(65abea96-cf36-453f-af8a-705e98f16260)
|
||||
]
|
||||
interface IDMOQualityControl : IUnknown {
|
||||
HRESULT SetNow(
|
||||
[in] REFERENCE_TIME rtNow
|
||||
);
|
||||
HRESULT SetStatus(
|
||||
[in] DWORD dwFlags
|
||||
);
|
||||
HRESULT GetStatus(
|
||||
[out] DWORD *pdwFlags
|
||||
);
|
||||
}
|
||||
|
||||
// Flags for IVideoOutputOptimizations
|
||||
enum _DMO_VIDEO_OUTPUT_STREAM_FLAGS {
|
||||
DMO_VOSF_NEEDS_PREVIOUS_SAMPLE = 0x00000001
|
||||
};
|
||||
|
||||
[
|
||||
object,
|
||||
uuid(be8f4f4e-5b16-4d29-b350-7f6b5d9298ac)
|
||||
]
|
||||
interface IDMOVideoOutputOptimizations : IUnknown {
|
||||
HRESULT QueryOperationModePreferences (
|
||||
ULONG ulOutputStreamIndex,
|
||||
DWORD *pdwRequestedCapabilities
|
||||
);
|
||||
HRESULT SetOperationMode (
|
||||
ULONG ulOutputStreamIndex,
|
||||
DWORD dwEnabledFeatures
|
||||
);
|
||||
HRESULT GetCurrentOperationMode (
|
||||
ULONG ulOutputStreamIndex,
|
||||
DWORD *pdwEnabledFeatures
|
||||
);
|
||||
HRESULT GetCurrentSampleRequirements (
|
||||
ULONG ulOutputStreamIndex,
|
||||
DWORD *pdwRequestedFeatures
|
||||
);
|
||||
}
|
||||
|
|
@ -0,0 +1,228 @@
|
|||
//------------------------------------------------------------------------------
|
||||
// File: MedParam.idl
|
||||
//
|
||||
// Desc: Definition of the IMediaParams and associated interfaces. These
|
||||
// interfaces are designed to allow communication of curve-following
|
||||
// behaviors for parameters of objects which require dynamic changes
|
||||
// to their parameters at run time. All changes are specified by
|
||||
// timestamp and curve type to ensure the parameters can be set
|
||||
// at sufficient accuracy with predictable behavior on subsequent
|
||||
// playback of the same curves.
|
||||
//
|
||||
// Copyright (c) 1999 - 2000, Microsoft Corporation. All rights reserved.
|
||||
//------------------------------------------------------------------------------
|
||||
|
||||
|
||||
import "oaidl.idl";
|
||||
import "ocidl.idl";
|
||||
import "strmif.idl";
|
||||
|
||||
|
||||
//------------------------------------------------------------------------------
|
||||
// Define the semantic type to be used for each parameter. All values passed
|
||||
// into this interface are 32-bit floats, but the interface can specify that
|
||||
// the values must be integer, or booleans or enumerated types
|
||||
//------------------------------------------------------------------------------
|
||||
typedef float MP_DATA; // All data is 32-bit floats
|
||||
|
||||
typedef enum _MP_Type {
|
||||
MPT_INT, // data is signed 23 bit integer (mantissa)
|
||||
MPT_FLOAT, // data is 32bit IEEE float
|
||||
MPT_BOOL, // data is true or false (using ANSI C++ definition)
|
||||
MPT_ENUM, // data is a set (represented by consecutive integers)
|
||||
MPT_MAX,
|
||||
} MP_TYPE;
|
||||
|
||||
const MP_DATA MPBOOL_TRUE = 1.0; // Value of true
|
||||
const MP_DATA MPBOOL_FALSE = 0.0; // Value of false
|
||||
|
||||
|
||||
//------------------------------------------------------------------------------
|
||||
// Define the types of curves which are supported
|
||||
//------------------------------------------------------------------------------
|
||||
typedef enum _MP_CURVE_TYPE {
|
||||
MP_CURVE_JUMP = 0x0001, // No interpolation, just jump to next point
|
||||
MP_CURVE_LINEAR = 0x0002, // Linear interpolation (y follows x from 0.0 to 1.0)
|
||||
MP_CURVE_SQUARE = 0x0004, // y follow x^2 from 0.0 to 1.0
|
||||
MP_CURVE_INVSQUARE = 0x0008, // y follows 1-(x^2) from 0.0 to 1.0
|
||||
MP_CURVE_SINE = 0x0010, // y follows sin(x) from -pi/2 to pi/2
|
||||
} MP_CURVE_TYPE;
|
||||
|
||||
|
||||
//------------------------------------------------------------------------------
|
||||
// Capability bits. Used by the object to specify what capabilities it has.
|
||||
//------------------------------------------------------------------------------
|
||||
typedef DWORD MP_CAPS;
|
||||
// Curve capabilities - If the cap bit is set, that type of curve is supported
|
||||
const MP_CAPS MP_CAPS_CURVE_JUMP = MP_CURVE_JUMP;
|
||||
const MP_CAPS MP_CAPS_CURVE_LINEAR = MP_CURVE_LINEAR;
|
||||
const MP_CAPS MP_CAPS_CURVE_SQUARE = MP_CURVE_SQUARE;
|
||||
const MP_CAPS MP_CAPS_CURVE_INVSQUARE = MP_CURVE_INVSQUARE;
|
||||
const MP_CAPS MP_CAPS_CURVE_SINE = MP_CURVE_SINE;
|
||||
|
||||
|
||||
//------------------------------------------------------------------------------
|
||||
// Structure used to return information about the type and limits of a parameter
|
||||
//------------------------------------------------------------------------------
|
||||
typedef struct _MP_PARAMINFO {
|
||||
MP_TYPE mpType; // One of MP_TYPE_xxx codes
|
||||
MP_CAPS mopCaps; // A collection of MP_CAPS flags
|
||||
|
||||
// Minimum and maximum values
|
||||
MP_DATA mpdMinValue; // minimum legal value
|
||||
MP_DATA mpdMaxValue; // maximum legal value
|
||||
MP_DATA mpdNeutralValue; // default or 'center' value
|
||||
|
||||
// Defualt Unit and Label text. These strings will ALWAYS be English
|
||||
// strings in the UNICODE character set. For international text
|
||||
// use the GetParamText member function
|
||||
WCHAR szUnitText[32]; // units of the parameter
|
||||
WCHAR szLabel[32]; // name of the parameter
|
||||
|
||||
} MP_PARAMINFO;
|
||||
|
||||
|
||||
//------------------------------------------------------------------------------
|
||||
// Parameter Index types
|
||||
//------------------------------------------------------------------------------
|
||||
typedef DWORD DWORD;
|
||||
const DWORD DWORD_ALLPARAMS = -1; // Apply this operation to all params
|
||||
|
||||
|
||||
//------------------------------------------------------------------------------
|
||||
// Defined list of timestamp types
|
||||
//------------------------------------------------------------------------------
|
||||
typedef DWORD MP_TIMEDATA; // Extra data to further define type
|
||||
|
||||
// REFERENCE_TIME (1 tick = 100 nanoseconds, MP_TIMEDATA ignored)
|
||||
cpp_quote("DEFINE_GUID(GUID_TIME_REFERENCE,")
|
||||
cpp_quote("0x93ad712b, 0xdaa0, 0x4ffe, 0xbc, 0x81, 0xb0, 0xce, 0x50, 0xf, 0xcd, 0xd9);")
|
||||
|
||||
// Music Time (MP_TIMEDATA = parts/quarter note)
|
||||
cpp_quote("DEFINE_GUID(GUID_TIME_MUSIC,")
|
||||
cpp_quote("0x574c49d, 0x5b04, 0x4b15, 0xa5, 0x42, 0xae, 0x28, 0x20, 0x30, 0x11, 0x7b);")
|
||||
|
||||
// Time is measures in samples. MP_TIMEDATA = Samples/sec)
|
||||
cpp_quote("DEFINE_GUID(GUID_TIME_SAMPLES,")
|
||||
cpp_quote("0xa8593d05, 0xc43, 0x4984, 0x9a, 0x63, 0x97, 0xaf, 0x9e, 0x2, 0xc4, 0xc0);")
|
||||
|
||||
|
||||
//------------------------------------------------------------------------------
|
||||
// The value of a given parameter at a specific point in time
|
||||
//------------------------------------------------------------------------------
|
||||
typedef DWORD MP_FLAGS;
|
||||
const MP_FLAGS MPF_ENVLP_STANDARD = 0x0000; // Use all data provided
|
||||
const MP_FLAGS MPF_ENVLP_BEGIN_CURRENTVAL = 0x0001;
|
||||
// Ignore valStart value, use current value as the staring point
|
||||
const MP_FLAGS MPF_ENVLP_BEGIN_NEUTRALVAL = 0x0002;
|
||||
// Ignore valStart value, use neutral value as the staring point
|
||||
|
||||
typedef struct _MP_ENVELOPE_SEGMENT {
|
||||
REFERENCE_TIME rtStart; // Start time in current time format
|
||||
REFERENCE_TIME rtEnd; // End time in current time format
|
||||
MP_DATA valStart; // Initial Value
|
||||
MP_DATA valEnd; // Final Value
|
||||
MP_CURVE_TYPE iCurve; // One of MP_CURVE_TYPE codes
|
||||
MP_FLAGS flags; // Special cases
|
||||
} MP_ENVELOPE_SEGMENT;
|
||||
|
||||
//------------------------------------------------------------------------------
|
||||
// Define flags for Punch-in timing
|
||||
//------------------------------------------------------------------------------
|
||||
const MP_FLAGS MPF_PUNCHIN_REFTIME = 0; // Use the reference time as the PI time
|
||||
const MP_FLAGS MPF_PUNCHIN_NOW = 0x0001; // Punch in at the current clock time
|
||||
const MP_FLAGS MPF_PUNCHIN_STOPPED = 0x0002; // Return change notifications during
|
||||
// author time
|
||||
|
||||
//------------------------------------------------------------------------------
|
||||
// IMediaParamInfo - Interface used to determine the names, data types and
|
||||
// units of the parameters which are exposed by the object. This interface
|
||||
// is used at discovery time, and is not required during run-time since the
|
||||
// objects parameters are a fixed set and this data can be cached by the
|
||||
// calling applicaiton
|
||||
//------------------------------------------------------------------------------
|
||||
[
|
||||
object,
|
||||
uuid(6d6cbb60-a223-44aa-842f-a2f06750be6d),
|
||||
version(1.0)
|
||||
]
|
||||
interface IMediaParamInfo : IUnknown
|
||||
{
|
||||
HRESULT GetParamCount (
|
||||
[out] DWORD * pdwParams
|
||||
);
|
||||
HRESULT GetParamInfo (
|
||||
[in] DWORD dwParamIndex,
|
||||
[out] MP_PARAMINFO * pInfo
|
||||
);
|
||||
// returns a series of null terminated strings. strings are in the
|
||||
// following order:
|
||||
// Param Label, Units Text, 1st Enum Text, 2nd Enum Text, etc...
|
||||
HRESULT GetParamText (
|
||||
[in] DWORD dwParamIndex, // which param to get text for
|
||||
[out] WCHAR **ppwchText // returns ptr to CoTaskMemAlloc'd string
|
||||
);
|
||||
|
||||
// Returns the number of diffrent time formats this object understands
|
||||
HRESULT GetNumTimeFormats (
|
||||
[out] DWORD * pdwNumTimeFormats
|
||||
);
|
||||
|
||||
// Returns the GUID for the ith supported time format
|
||||
HRESULT GetSupportedTimeFormat(
|
||||
[in] DWORD dwFormatIndex,
|
||||
[out] GUID *pguidTimeFormat
|
||||
);
|
||||
|
||||
// Returns the current time format
|
||||
HRESULT GetCurrentTimeFormat (
|
||||
[out] GUID *pguidTimeFormat,
|
||||
[out] MP_TIMEDATA *pTimeData
|
||||
);
|
||||
}
|
||||
|
||||
//------------------------------------------------------------------------------
|
||||
// IMediaParams - Interfaes used to actually set the media params and the
|
||||
// envelopes to follow
|
||||
//------------------------------------------------------------------------------
|
||||
[
|
||||
object,
|
||||
uuid(6d6cbb61-a223-44aa-842f-a2f06750be6e),
|
||||
version(1.0)
|
||||
]
|
||||
interface IMediaParams : IUnknown
|
||||
{
|
||||
// Single param Get/Set methods
|
||||
HRESULT GetParam (
|
||||
[in] DWORD dwParamIndex,
|
||||
[out] MP_DATA *pValue
|
||||
);
|
||||
HRESULT SetParam (
|
||||
[in] DWORD dwParamIndex,
|
||||
[in] MP_DATA value
|
||||
);
|
||||
|
||||
// Envelope methods (param change over time)
|
||||
HRESULT AddEnvelope (
|
||||
[in] DWORD dwParamIndex,
|
||||
[in] DWORD cSegments,
|
||||
[in] MP_ENVELOPE_SEGMENT * pEnvelopeSegments
|
||||
);
|
||||
|
||||
// Flush all of the envelope information for the given paramter between
|
||||
// the timestamps specified
|
||||
HRESULT FlushEnvelope (
|
||||
[in] DWORD dwParamIndex,
|
||||
[in] REFERENCE_TIME refTimeStart,
|
||||
[in] REFERENCE_TIME refTimeEnd
|
||||
);
|
||||
|
||||
// Change the time format being used by the object
|
||||
HRESULT SetTimeFormat (
|
||||
[in] GUID guidTimeFormat,
|
||||
[in] MP_TIMEDATA mpTimeData
|
||||
);
|
||||
}
|
||||
|
||||
|
||||
|
|
@ -0,0 +1,189 @@
|
|||
//------------------------------------------------------------------------------
|
||||
// File: MMStream.idl
|
||||
//
|
||||
// Desc: MultiMedia streaming interface IDL file.
|
||||
//
|
||||
// Copyright (c) 1998 - 2000, Microsoft Corporation. All rights reserved.
|
||||
//------------------------------------------------------------------------------
|
||||
|
||||
|
||||
import "unknwn.idl";
|
||||
|
||||
cpp_quote("#define MS_ERROR_CODE(x) MAKE_HRESULT(1, FACILITY_ITF, (x) + 0x400)")
|
||||
cpp_quote("#define MS_SUCCESS_CODE(x) MAKE_HRESULT(0, FACILITY_ITF, x)")
|
||||
cpp_quote("#define MS_S_PENDING MS_SUCCESS_CODE(1)")
|
||||
cpp_quote("#define MS_S_NOUPDATE MS_SUCCESS_CODE(2)")
|
||||
cpp_quote("#define MS_S_ENDOFSTREAM MS_SUCCESS_CODE(3)")
|
||||
|
||||
cpp_quote("#define MS_E_SAMPLEALLOC MS_ERROR_CODE(1)")
|
||||
cpp_quote("#define MS_E_PURPOSEID MS_ERROR_CODE(2)")
|
||||
cpp_quote("#define MS_E_NOSTREAM MS_ERROR_CODE(3)")
|
||||
cpp_quote("#define MS_E_NOSEEKING MS_ERROR_CODE(4)")
|
||||
cpp_quote("#define MS_E_INCOMPATIBLE MS_ERROR_CODE(5)")
|
||||
cpp_quote("#define MS_E_BUSY MS_ERROR_CODE(6)")
|
||||
cpp_quote("#define MS_E_NOTINIT MS_ERROR_CODE(7)")
|
||||
cpp_quote("#define MS_E_SOURCEALREADYDEFINED MS_ERROR_CODE(8)")
|
||||
cpp_quote("#define MS_E_INVALIDSTREAMTYPE MS_ERROR_CODE(9)")
|
||||
cpp_quote("#define MS_E_NOTRUNNING MS_ERROR_CODE(10)")
|
||||
|
||||
cpp_quote("// {A35FF56A-9FDA-11d0-8FDF-00C04FD9189D}")
|
||||
cpp_quote("DEFINE_GUID(MSPID_PrimaryVideo, ")
|
||||
cpp_quote("0xa35ff56a, 0x9fda, 0x11d0, 0x8f, 0xdf, 0x0, 0xc0, 0x4f, 0xd9, 0x18, 0x9d);")
|
||||
|
||||
cpp_quote("// {A35FF56B-9FDA-11d0-8FDF-00C04FD9189D}")
|
||||
cpp_quote("DEFINE_GUID(MSPID_PrimaryAudio,")
|
||||
cpp_quote("0xa35ff56b, 0x9fda, 0x11d0, 0x8f, 0xdf, 0x0, 0xc0, 0x4f, 0xd9, 0x18, 0x9d);")
|
||||
|
||||
cpp_quote("#if(_WIN32_WINNT < 0x0400)")
|
||||
typedef void (__stdcall * PAPCFUNC)(DWORD_PTR dwParam);
|
||||
cpp_quote("#endif")
|
||||
|
||||
typedef LONGLONG STREAM_TIME;
|
||||
|
||||
typedef GUID MSPID;
|
||||
typedef REFGUID REFMSPID;
|
||||
|
||||
typedef enum {
|
||||
STREAMTYPE_READ = 0,
|
||||
STREAMTYPE_WRITE = 1,
|
||||
STREAMTYPE_TRANSFORM= 2
|
||||
} STREAM_TYPE;
|
||||
|
||||
typedef enum {
|
||||
STREAMSTATE_STOP = 0,
|
||||
STREAMSTATE_RUN = 1
|
||||
} STREAM_STATE;
|
||||
|
||||
|
||||
typedef enum {
|
||||
COMPSTAT_NOUPDATEOK = 0x00000001,
|
||||
COMPSTAT_WAIT = 0x00000002,
|
||||
COMPSTAT_ABORT = 0x00000004
|
||||
} COMPLETION_STATUS_FLAGS;
|
||||
|
||||
// Flags for GetInformation
|
||||
enum {
|
||||
MMSSF_HASCLOCK = 0x00000001,
|
||||
MMSSF_SUPPORTSEEK = 0x00000002,
|
||||
MMSSF_ASYNCHRONOUS = 0x00000004
|
||||
};
|
||||
|
||||
// Flags for StreamSample::Update
|
||||
enum {
|
||||
SSUPDATE_ASYNC = 0x00000001,
|
||||
SSUPDATE_CONTINUOUS = 0x00000002
|
||||
};
|
||||
|
||||
interface IMultiMediaStream;
|
||||
interface IMediaStream;
|
||||
interface IStreamSample;
|
||||
|
||||
// IMultiMediaStream interface
|
||||
[
|
||||
object,
|
||||
local,
|
||||
uuid(B502D1BC-9A57-11d0-8FDE-00C04FD9189D),
|
||||
pointer_default(unique)
|
||||
]
|
||||
interface IMultiMediaStream : IUnknown {
|
||||
|
||||
HRESULT GetInformation(
|
||||
[out] DWORD *pdwFlags,
|
||||
[out] STREAM_TYPE *pStreamType);
|
||||
|
||||
HRESULT GetMediaStream(
|
||||
[in] REFMSPID idPurpose,
|
||||
[out] IMediaStream **ppMediaStream);
|
||||
|
||||
HRESULT EnumMediaStreams(
|
||||
[in] long Index,
|
||||
[out] IMediaStream **ppMediaStream);
|
||||
|
||||
HRESULT GetState(
|
||||
[out] STREAM_STATE *pCurrentState);
|
||||
|
||||
HRESULT SetState(
|
||||
[in] STREAM_STATE NewState);
|
||||
|
||||
HRESULT GetTime(
|
||||
[out] STREAM_TIME *pCurrentTime);
|
||||
|
||||
HRESULT GetDuration(
|
||||
[out] STREAM_TIME *pDuration);
|
||||
|
||||
HRESULT Seek(
|
||||
[in] STREAM_TIME SeekTime);
|
||||
|
||||
HRESULT GetEndOfStreamEventHandle(
|
||||
[out] HANDLE *phEOS);
|
||||
};
|
||||
|
||||
|
||||
// IMediaStream interface
|
||||
[
|
||||
object,
|
||||
uuid(B502D1BD-9A57-11d0-8FDE-00C04FD9189D),
|
||||
pointer_default(unique)
|
||||
]
|
||||
interface IMediaStream : IUnknown {
|
||||
|
||||
HRESULT GetMultiMediaStream(
|
||||
[out] IMultiMediaStream **ppMultiMediaStream);
|
||||
|
||||
HRESULT GetInformation(
|
||||
[out] MSPID *pPurposeId,
|
||||
[out] STREAM_TYPE *pType);
|
||||
|
||||
HRESULT SetSameFormat(
|
||||
[in] IMediaStream *pStreamThatHasDesiredFormat,
|
||||
[in] DWORD dwFlags);
|
||||
|
||||
HRESULT AllocateSample(
|
||||
[in] DWORD dwFlags,
|
||||
[out] IStreamSample **ppSample);
|
||||
|
||||
|
||||
HRESULT CreateSharedSample(
|
||||
[in] IStreamSample *pExistingSample,
|
||||
[in] DWORD dwFlags,
|
||||
[out] IStreamSample **ppNewSample);
|
||||
|
||||
HRESULT SendEndOfStream(DWORD dwFlags);
|
||||
};
|
||||
|
||||
|
||||
// IStreamSample interface
|
||||
[
|
||||
object,
|
||||
local,
|
||||
uuid(B502D1BE-9A57-11d0-8FDE-00C04FD9189D),
|
||||
pointer_default(unique)
|
||||
]
|
||||
interface IStreamSample : IUnknown {
|
||||
|
||||
HRESULT GetMediaStream(
|
||||
[in] IMediaStream **ppMediaStream);
|
||||
|
||||
HRESULT GetSampleTimes(
|
||||
[out] STREAM_TIME * pStartTime,
|
||||
[out] STREAM_TIME * pEndTime,
|
||||
[out] STREAM_TIME * pCurrentTime);
|
||||
|
||||
HRESULT SetSampleTimes(
|
||||
[in] const STREAM_TIME *pStartTime,
|
||||
[in] const STREAM_TIME *pEndTime);
|
||||
|
||||
HRESULT Update(
|
||||
[in] DWORD dwFlags,
|
||||
[in] HANDLE hEvent,
|
||||
[in] PAPCFUNC pfnAPC,
|
||||
[in] DWORD_PTR dwAPCData);
|
||||
|
||||
HRESULT CompletionStatus(
|
||||
[in] DWORD dwFlags,
|
||||
[in] DWORD dwMilliseconds);
|
||||
};
|
||||
|
||||
|
||||
|
||||
|
File diff suppressed because it is too large
Load Diff
|
@ -0,0 +1,43 @@
|
|||
//------------------------------------------------------------------------------
|
||||
// File: RegBag.idl
|
||||
//
|
||||
// Desc: IDL source for RegBag.dll.
|
||||
//
|
||||
// Copyright (c) 1999 - 2000, Microsoft Corporation. All rights reserved.
|
||||
//------------------------------------------------------------------------------
|
||||
|
||||
|
||||
import "objidl.idl";
|
||||
import "oaidl.idl";
|
||||
import "ocidl.idl";
|
||||
|
||||
|
||||
//*****************************************************************************
|
||||
///////////////////////////////////////////////////////////////////////////////
|
||||
//
|
||||
// Custom Factory interface
|
||||
// since com doesn't support ctors or initialization parameters on std factory interface
|
||||
// we have a custom creation interface
|
||||
//
|
||||
///////////////////////////////////////////////////////////////////////////////
|
||||
//*****************************************************************************
|
||||
///////////////////////////////////////////////////////////////////////////////////////
|
||||
[object,
|
||||
hidden, restricted,
|
||||
uuid(8A674B48-1F63-11d3-B64C-00C04F79498E),
|
||||
helpstring("Create property bag backed by registry"),
|
||||
pointer_default(unique),
|
||||
local
|
||||
]
|
||||
interface ICreatePropBagOnRegKey : IUnknown {
|
||||
// NOTE: it is up to the caller to set the correct registry access based on the interface
|
||||
// and methods the caller intends to use
|
||||
// IPropertyBag2::GetPropertyInfo and CountProperties require both KEY_QUERY_VALUE and KEY_ENUMERATE_SUBKEYS
|
||||
// IPropertyBagXXX::Read requires KEY_READ
|
||||
// IPropertyBagXXX::Write requires KEY_WRITE
|
||||
// also, you must CoTaskMemFree the name string from GetPropertyInfo
|
||||
// if you write a value of VT_EMPTY or VT_NULL the property will be removed from the bag and the corresponding
|
||||
// registry info will be deleted.
|
||||
HRESULT Create([in] HKEY hkey, [in] LPCOLESTR subkey, [in] DWORD ulOptions, [in] DWORD samDesired, REFIID iid, [out] LPVOID *ppBag);
|
||||
};
|
||||
|
|
@ -0,0 +1,28 @@
|
|||
//------------------------------------------------------------------------------
|
||||
// File: StrmIf.idl
|
||||
//
|
||||
// Desc: ActiveMovie interface definitions.
|
||||
//
|
||||
// Copyright (c) 1992 - 2000, Microsoft Corporation. All rights reserved.
|
||||
//------------------------------------------------------------------------------
|
||||
|
||||
|
||||
import "unknwn.idl";
|
||||
import "objidl.idl"; // for IPersist (IFilter's root)
|
||||
|
||||
#include "devenum.idl"
|
||||
|
||||
// core interfaces
|
||||
#include "axcore.idl"
|
||||
|
||||
// extended, ActiveMovie-only interfaces
|
||||
#include "axextend.idl"
|
||||
|
||||
// ActiveMovie-only sample plug-in distributor interface
|
||||
#include "IAMovie.idl"
|
||||
|
||||
// application interfaces for DVD
|
||||
#include "dvdif.idl"
|
||||
|
||||
// Dynamic graph stuff
|
||||
#include "dyngraph.idl"
|
File diff suppressed because it is too large
Load Diff
|
@ -0,0 +1,172 @@
|
|||
//------------------------------------------------------------------------------
|
||||
// File: VideoAcc.idl
|
||||
//
|
||||
// Desc: An interface exposed by the overlay mixer to help decode samples
|
||||
// using hardware video acceleration.
|
||||
//
|
||||
// Copyright (c) 1992 - 2000, Microsoft Corporation. All rights reserved.
|
||||
//------------------------------------------------------------------------------
|
||||
|
||||
|
||||
import "unknwn.idl";
|
||||
|
||||
cpp_quote("//")
|
||||
cpp_quote("// The following declarations within the 'if 0' block are dummy typedefs used to make")
|
||||
cpp_quote("// the motncomp.idl file build. The actual definitions are contained in ddraw.h and amva.h")
|
||||
cpp_quote("//")
|
||||
cpp_quote("#if 0")
|
||||
|
||||
typedef void* LPVOID;
|
||||
typedef void* LPGUID;
|
||||
typedef void* LPDIRECTDRAWSURFACE;
|
||||
typedef void* LPDDPIXELFORMAT;
|
||||
typedef void* LPAMVAInternalMemInfo;
|
||||
typedef void AMVAUncompDataInfo;
|
||||
typedef void* LPAMVACompBufferInfo;
|
||||
typedef void AMVABUFFERINFO;
|
||||
typedef void AMVAEndFrameInfo;
|
||||
typedef void* LPAMVAUncompBufferInfo;
|
||||
typedef void AMVABeginFrameInfo;
|
||||
typedef IUnknown* IMediaSample;
|
||||
|
||||
cpp_quote("#endif")
|
||||
cpp_quote("#include <ddraw.h>")
|
||||
cpp_quote("#include <amva.h>")
|
||||
|
||||
|
||||
[
|
||||
local,
|
||||
object,
|
||||
uuid(256A6A21-FBAD-11d1-82BF-00A0C9696C8F),
|
||||
helpstring("IAMVideoAcceleratorNotify Interface"),
|
||||
pointer_default(unique)
|
||||
]
|
||||
|
||||
// IAMVideoAcceleratorNotify
|
||||
interface IAMVideoAcceleratorNotify : IUnknown
|
||||
{
|
||||
// get information necessary to allocate uncompressed data buffers
|
||||
// which is not part of the mediatype format (like how many buffers to allocate etc)
|
||||
HRESULT GetUncompSurfacesInfo([in] const GUID *pGuid, [in] [out] LPAMVAUncompBufferInfo pUncompBufferInfo);
|
||||
|
||||
// set information regarding allocated uncompressed data buffers
|
||||
HRESULT SetUncompSurfacesInfo([in] DWORD dwActualUncompSurfacesAllocated);
|
||||
|
||||
// get information necessary to create video accelerator object. It is the caller's responsibility
|
||||
// to call CoTaskMemFree() on *ppMiscData
|
||||
HRESULT GetCreateVideoAcceleratorData([in] const GUID *pGuid, [out] LPDWORD pdwSizeMiscData, [out] LPVOID *ppMiscData);
|
||||
};
|
||||
|
||||
[
|
||||
local,
|
||||
object,
|
||||
uuid(256A6A22-FBAD-11d1-82BF-00A0C9696C8F),
|
||||
helpstring("IAMVideoAccelerator Interface"),
|
||||
pointer_default(unique)
|
||||
]
|
||||
|
||||
// IAMVideoAccelerator
|
||||
interface IAMVideoAccelerator : IUnknown
|
||||
{
|
||||
// pdwNumGuidsSupported is an IN OUT paramter
|
||||
// pGuidsSupported is an IN OUT paramter
|
||||
// if pGuidsSupported is NULL, pdwNumGuidsSupported should return back with the
|
||||
// number of uncompressed pixel formats supported
|
||||
// Otherwise pGuidsSupported is an array of *pdwNumGuidsSupported structures
|
||||
HRESULT GetVideoAcceleratorGUIDs([in] [out] LPDWORD pdwNumGuidsSupported, [in] [out] LPGUID pGuidsSupported);
|
||||
|
||||
// pGuid is an IN parameter
|
||||
// pdwNumFormatsSupported is an IN OUT paramter
|
||||
// pFormatsSupported is an IN OUT paramter (caller should make sure to set the size of EACH struct)
|
||||
// if pFormatsSupported is NULL, pdwNumFormatsSupported should return back with
|
||||
// the number of uncompressed pixel formats supported
|
||||
// Otherwise pFormatsSupported is an array of *pdwNumFormatsSupported structures
|
||||
HRESULT GetUncompFormatsSupported( [in] const GUID *pGuid, [in] [out] LPDWORD pdwNumFormatsSupported,
|
||||
[in] [out] LPDDPIXELFORMAT pFormatsSupported);
|
||||
|
||||
// pGuid is an IN parameter
|
||||
// pamvaUncompDataInfo is an IN parameter
|
||||
// pamvaInternalMemInfo is an IN OUT parameter (caller should make sure to set the size of struct)
|
||||
// currently only gets info about how much scratch memory will the hal allocate for its private use
|
||||
HRESULT GetInternalMemInfo([in] const GUID *pGuid, [in] const AMVAUncompDataInfo *pamvaUncompDataInfo,
|
||||
[in] [out] LPAMVAInternalMemInfo pamvaInternalMemInfo);
|
||||
|
||||
// pGuid is an IN parameter
|
||||
// pamvaUncompDataInfo is an IN parameter
|
||||
// pdwNumTypesCompBuffers is an IN OUT paramter
|
||||
// pamvaCompBufferInfo is an IN OUT paramter (caller should make sure to set the size of EACH struct)
|
||||
// if pamvaCompBufferInfo is NULL, pdwNumTypesCompBuffers should return back with the number of types of
|
||||
// compressed buffers
|
||||
// Otherwise pamvaCompBufferInfo is an array of *pdwNumTypesCompBuffers structures
|
||||
HRESULT GetCompBufferInfo([in] const GUID *pGuid, [in] const AMVAUncompDataInfo *pamvaUncompDataInfo,
|
||||
[in] [out] LPDWORD pdwNumTypesCompBuffers, [out] LPAMVACompBufferInfo pamvaCompBufferInfo);
|
||||
|
||||
|
||||
// pdwNumTypesCompBuffers is an IN OUT paramter
|
||||
// pamvaCompBufferInfo is an IN OUT paramter (caller should make sure to set the size of EACH struct)
|
||||
// if pamvaCompBufferInfo is NULL, pdwNumTypesCompBuffers should return back with the number of types of
|
||||
// compressed buffers
|
||||
// Otherwise pamvaCompBufferInfo is an array of *pdwNumTypesCompBuffers structures
|
||||
// only valid to call this after the pins are connected
|
||||
HRESULT GetInternalCompBufferInfo([in] [out] LPDWORD pdwNumTypesCompBuffers, [out] LPAMVACompBufferInfo pamvaCompBufferInfo);
|
||||
|
||||
// begin a frame, the pMiscData is passed directly to the hal
|
||||
// only valid to call this after the pins are connected
|
||||
// Tells the ovmixer which frame is the destination
|
||||
// frame. Use indices (valid vales are [0 .. pdwNumSurfacesAllocated-1]) to specify frames
|
||||
HRESULT BeginFrame([in] const AMVABeginFrameInfo *amvaBeginFrameInfo);
|
||||
|
||||
// end a frame, the pMiscData is passed directly to the hal
|
||||
// only valid to call this after the pins are connected
|
||||
HRESULT EndFrame([in] const AMVAEndFrameInfo *pEndFrameInfo);
|
||||
|
||||
// lock and obtain access to a single buffer
|
||||
// only valid to call this after the pins are connected
|
||||
// Buffers are identified by type and index within that type
|
||||
// Specifiying read-only will allow access to busy reference
|
||||
// frames
|
||||
// Output (uncompressed) frames use a type index of 0xFFFFFFFF
|
||||
HRESULT GetBuffer(
|
||||
[in] DWORD dwTypeIndex,
|
||||
[in] DWORD dwBufferIndex,
|
||||
[in] BOOL bReadOnly,
|
||||
[out] LPVOID *ppBuffer,
|
||||
[out] LONG *lpStride);
|
||||
|
||||
// unlock a single buffer
|
||||
// Buffers are identified by type and index within that type
|
||||
// only valid to call this after the pins are connected
|
||||
HRESULT ReleaseBuffer([in] DWORD dwTypeIndex, [in] DWORD dwBufferIndex);
|
||||
|
||||
// Perform a decompression operation
|
||||
// Private data can be passed to and from a driver
|
||||
// identifiers for the corresponding members of pamvaMacroBlockInfo
|
||||
// pamvaMacroBlockInfo is an IN parameter which is array (of length dwNumBlocks) of structures
|
||||
// only valid to call this after the pins are connected
|
||||
HRESULT Execute(
|
||||
[in] DWORD dwFunction,
|
||||
[in] LPVOID lpPrivateInputData,
|
||||
[in] DWORD cbPrivateInputData,
|
||||
[in] LPVOID lpPrivateOutputDat,
|
||||
[in] DWORD cbPrivateOutputData,
|
||||
[in] DWORD dwNumBuffers,
|
||||
[in] const AMVABUFFERINFO *pamvaBufferInfo);
|
||||
|
||||
// query the decode status of a particular decompression operation
|
||||
// dwTypeIndex and dwBufferIndex define the buffer whose status is
|
||||
// being queried
|
||||
HRESULT QueryRenderStatus([in] DWORD dwTypeIndex,
|
||||
[in] DWORD dwBufferIndex,
|
||||
[in] DWORD dwFlags);
|
||||
|
||||
// display a frame. The mediasample contains the timestamps etc for the frame to be displayed
|
||||
// this call is a non-blocking call
|
||||
// only valid to call this after the pins are connected
|
||||
HRESULT DisplayFrame([in] DWORD dwFlipToIndex, [in] IMediaSample *pMediaSample);
|
||||
};
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
|
@ -0,0 +1,18 @@
|
|||
//------------------------------------------------------------------------------
|
||||
// File: ActiveCf.h
|
||||
//
|
||||
// Desc: Contains the data formats for the transfer of VfW4 filters via the
|
||||
// clipboard.
|
||||
//
|
||||
// Copyright (c) 1992 - 2000, Microsoft Corporation. All rights reserved.
|
||||
//------------------------------------------------------------------------------
|
||||
|
||||
|
||||
#define CFSTR_VFW_FILTERLIST "Video for Windows 4 Filters"
|
||||
|
||||
typedef struct tagVFW_FILTERLIST{
|
||||
UINT cFilters; // number of CLSIDs in aClsId
|
||||
CLSID aClsId[1]; // ClsId of each filter
|
||||
} VFW_FILTERLIST;
|
||||
|
||||
|
|
@ -0,0 +1,54 @@
|
|||
//------------------------------------------------------------------------------
|
||||
// File: AMAudio.h
|
||||
//
|
||||
// Desc: Audio related definitions and interfaces for ActiveMovie.
|
||||
//
|
||||
// Copyright (c) 1992 - 2000, Microsoft Corporation. All rights reserved.
|
||||
//------------------------------------------------------------------------------
|
||||
|
||||
|
||||
#ifndef __AMAUDIO__
|
||||
#define __AMAUDIO__
|
||||
|
||||
#ifdef __cplusplus
|
||||
extern "C" {
|
||||
#endif // __cplusplus
|
||||
|
||||
#include <mmsystem.h>
|
||||
#include <dsound.h>
|
||||
|
||||
// This is the interface the audio renderer supports to give the application
|
||||
// access to the direct sound object and buffers it is using, to allow the
|
||||
// application to use things like the 3D features of Direct Sound for the
|
||||
// soundtrack of a movie being played with Active Movie
|
||||
|
||||
// be nice to our friends in C
|
||||
#undef INTERFACE
|
||||
#define INTERFACE IAMDirectSound
|
||||
|
||||
DECLARE_INTERFACE_(IAMDirectSound,IUnknown)
|
||||
{
|
||||
/* IUnknown methods */
|
||||
|
||||
STDMETHOD(QueryInterface)(THIS_ REFIID riid, LPVOID *ppvObj) PURE;
|
||||
STDMETHOD_(ULONG,AddRef)(THIS) PURE;
|
||||
STDMETHOD_(ULONG,Release)(THIS) PURE;
|
||||
|
||||
/* IAMDirectSound methods */
|
||||
|
||||
STDMETHOD(GetDirectSoundInterface)(THIS_ LPDIRECTSOUND *lplpds) PURE;
|
||||
STDMETHOD(GetPrimaryBufferInterface)(THIS_ LPDIRECTSOUNDBUFFER *lplpdsb) PURE;
|
||||
STDMETHOD(GetSecondaryBufferInterface)(THIS_ LPDIRECTSOUNDBUFFER *lplpdsb) PURE;
|
||||
STDMETHOD(ReleaseDirectSoundInterface)(THIS_ LPDIRECTSOUND lpds) PURE;
|
||||
STDMETHOD(ReleasePrimaryBufferInterface)(THIS_ LPDIRECTSOUNDBUFFER lpdsb) PURE;
|
||||
STDMETHOD(ReleaseSecondaryBufferInterface)(THIS_ LPDIRECTSOUNDBUFFER lpdsb) PURE;
|
||||
STDMETHOD(SetFocusWindow)(THIS_ HWND, BOOL) PURE ;
|
||||
STDMETHOD(GetFocusWindow)(THIS_ HWND *, BOOL*) PURE ;
|
||||
};
|
||||
|
||||
|
||||
#ifdef __cplusplus
|
||||
}
|
||||
#endif // __cplusplus
|
||||
#endif // __AMAUDIO__
|
||||
|
|
@ -0,0 +1,38 @@
|
|||
//------------------------------------------------------------------------------
|
||||
// File: AMParse.h
|
||||
//
|
||||
// Desc: Interface to the parser to get current time. This is useful for
|
||||
// multifile playback.
|
||||
//
|
||||
// Copyright (c) 1996 - 2000, Microsoft Corporation. All rights reserved.
|
||||
//------------------------------------------------------------------------------
|
||||
|
||||
|
||||
#ifndef __AMPARSE__
|
||||
#define __AMPARSE__
|
||||
|
||||
#ifdef __cplusplus
|
||||
extern "C" {
|
||||
#endif // __cplusplus
|
||||
|
||||
|
||||
DEFINE_GUID(IID_IAMParse,
|
||||
0xc47a3420, 0x005c, 0x11d2, 0x90, 0x38, 0x00, 0xa0, 0xc9, 0x69, 0x72, 0x98);
|
||||
|
||||
//
|
||||
// Parser interface - supported by MPEG-2 splitter filter
|
||||
//
|
||||
DECLARE_INTERFACE_(IAMParse, IUnknown) {
|
||||
STDMETHOD(GetParseTime) (THIS_
|
||||
REFERENCE_TIME *prtCurrent
|
||||
) PURE;
|
||||
STDMETHOD(SetParseTime) (THIS_
|
||||
REFERENCE_TIME rtCurrent
|
||||
) PURE;
|
||||
STDMETHOD(Flush) (THIS) PURE;
|
||||
};
|
||||
|
||||
#ifdef __cplusplus
|
||||
}
|
||||
#endif // __cplusplus
|
||||
#endif // __AMPARSE__
|
File diff suppressed because it is too large
Load Diff
|
@ -0,0 +1,85 @@
|
|||
//------------------------------------------------------------------------------
|
||||
// File: AMVA.h
|
||||
//
|
||||
// Desc: DirectShowMotionComp include file.
|
||||
//
|
||||
// Copyright (c) 1997 - 2000, Microsoft Corporation. All rights reserved.
|
||||
//------------------------------------------------------------------------------
|
||||
|
||||
|
||||
#ifndef __AMVA_INCLUDED__
|
||||
#define __AMVA_INCLUDED__
|
||||
|
||||
#ifdef __cplusplus
|
||||
extern "C" {
|
||||
#endif
|
||||
|
||||
|
||||
#define AMVA_TYPEINDEX_OUTPUTFRAME 0xFFFFFFFF
|
||||
|
||||
// Flags for QueryRenderStatus
|
||||
#define AMVA_QUERYRENDERSTATUSF_READ 0x00000001 // Query for read
|
||||
// set this bit to 0
|
||||
// if query for update
|
||||
|
||||
typedef struct _tag_AMVAUncompBufferInfo
|
||||
{
|
||||
DWORD dwMinNumSurfaces; // IN min number of surfaces to be allocated
|
||||
DWORD dwMaxNumSurfaces; // IN max number of surfaces to be allocated
|
||||
DDPIXELFORMAT ddUncompPixelFormat; // IN pixel format of surfaces to be allocated
|
||||
} AMVAUncompBufferInfo, *LPAMVAUncompBufferInfo;
|
||||
|
||||
typedef struct _tag_AMVAUncompDataInfo
|
||||
{
|
||||
DWORD dwUncompWidth; // [in] width of uncompressed data
|
||||
DWORD dwUncompHeight; // [in] height of uncompressed data
|
||||
DDPIXELFORMAT ddUncompPixelFormat; // [in] pixel-format of uncompressed data
|
||||
} AMVAUncompDataInfo, *LPAMVAUncompDataInfo;
|
||||
|
||||
typedef struct _tag_AMVAInternalMemInfo
|
||||
{
|
||||
DWORD dwScratchMemAlloc; // [out] amount of scratch memory will the hal allocate for its private use
|
||||
} AMVAInternalMemInfo, *LPAMVAInternalMemInfo;
|
||||
|
||||
|
||||
typedef struct _tag_AMVACompBufferInfo
|
||||
{
|
||||
DWORD dwNumCompBuffers; // [out] number of buffers reqd for compressed data
|
||||
DWORD dwWidthToCreate; // [out] Width of surface to create
|
||||
DWORD dwHeightToCreate; // [out] Height of surface to create
|
||||
DWORD dwBytesToAllocate; // [out] Total number of bytes used by each surface
|
||||
DDSCAPS2 ddCompCaps; // [out] caps to create surfaces to store compressed data
|
||||
DDPIXELFORMAT ddPixelFormat; // [out] fourcc to create surfaces to store compressed data
|
||||
} AMVACompBufferInfo, *LPAMVACompBufferInfo;
|
||||
|
||||
|
||||
// Note that you are NOT allowed to store any pointer in pMiscData
|
||||
typedef struct _tag_AMVABeginFrameInfo
|
||||
{
|
||||
DWORD dwDestSurfaceIndex; // IN destination buffer in which to decoding this frame
|
||||
LPVOID pInputData; // IN pointer to misc data
|
||||
DWORD dwSizeInputData; // IN size of other misc data to begin frame
|
||||
LPVOID pOutputData; // OUT pointer to data which the VGA is going to fill
|
||||
DWORD dwSizeOutputData; // IN size of data which the VGA is going to fill
|
||||
} AMVABeginFrameInfo, *LPAMVABeginFrameInfo;
|
||||
|
||||
// Note that you are NOT allowed to store any pointer in pMiscData
|
||||
typedef struct _tag_AMVAEndFrameInfo
|
||||
{
|
||||
DWORD dwSizeMiscData; // [in] size of other misc data to begin frame
|
||||
LPVOID pMiscData; // [in] pointer to misc data
|
||||
} AMVAEndFrameInfo, *LPAMVAEndFrameInfo;
|
||||
|
||||
typedef struct _tag_AMVABUFFERINFO
|
||||
{
|
||||
DWORD dwTypeIndex; // [in] Type of buffer
|
||||
DWORD dwBufferIndex; // [in] Buffer index
|
||||
DWORD dwDataOffset; // [in] offset of relevant data from the beginning of buffer
|
||||
DWORD dwDataSize; // [in] size of relevant data
|
||||
} AMVABUFFERINFO, *LPAMVABUFFERINFO;
|
||||
|
||||
#ifdef __cplusplus
|
||||
};
|
||||
#endif
|
||||
|
||||
#endif // _AMVA_INCLUDED
|
|
@ -0,0 +1,433 @@
|
|||
//------------------------------------------------------------------------------
|
||||
// File: AMVideo.h
|
||||
//
|
||||
// Desc: Video related definitions and interfaces for ActiveMovie.
|
||||
//
|
||||
// Copyright (c) 1992 - 2000, Microsoft Corporation. All rights reserved.
|
||||
//------------------------------------------------------------------------------
|
||||
|
||||
|
||||
#ifndef __AMVIDEO__
|
||||
#define __AMVIDEO__
|
||||
|
||||
#ifdef __cplusplus
|
||||
extern "C" {
|
||||
#endif // __cplusplus
|
||||
|
||||
#include <ddraw.h>
|
||||
|
||||
|
||||
// This is an interface on the video renderer that provides information about
|
||||
// DirectDraw with respect to its use by the renderer. For example it allows
|
||||
// an application to get details of the surface and any hardware capabilities
|
||||
// that are available. It also allows someone to adjust the surfaces that the
|
||||
// renderer should use and furthermore even set the DirectDraw instance. We
|
||||
// allow someone to set the DirectDraw instance because DirectDraw can only
|
||||
// be opened once per process so it helps resolve conflicts. There is some
|
||||
// duplication in this interface as the hardware/emulated/FOURCCs available
|
||||
// can all be found through the IDirectDraw interface, this interface allows
|
||||
// simple access to that information without calling the DirectDraw provider
|
||||
// itself. The AMDDS prefix is ActiveMovie DirectDraw Switches abbreviated.
|
||||
|
||||
#define AMDDS_NONE 0x00 // No use for DCI/DirectDraw
|
||||
#define AMDDS_DCIPS 0x01 // Use DCI primary surface
|
||||
#define AMDDS_PS 0x02 // Use DirectDraw primary
|
||||
#define AMDDS_RGBOVR 0x04 // RGB overlay surfaces
|
||||
#define AMDDS_YUVOVR 0x08 // YUV overlay surfaces
|
||||
#define AMDDS_RGBOFF 0x10 // RGB offscreen surfaces
|
||||
#define AMDDS_YUVOFF 0x20 // YUV offscreen surfaces
|
||||
#define AMDDS_RGBFLP 0x40 // RGB flipping surfaces
|
||||
#define AMDDS_YUVFLP 0x80 // YUV flipping surfaces
|
||||
#define AMDDS_ALL 0xFF // ALL the previous flags
|
||||
#define AMDDS_DEFAULT AMDDS_ALL // Use all available surfaces
|
||||
|
||||
#define AMDDS_YUV (AMDDS_YUVOFF | AMDDS_YUVOVR | AMDDS_YUVFLP)
|
||||
#define AMDDS_RGB (AMDDS_RGBOFF | AMDDS_RGBOVR | AMDDS_RGBFLP)
|
||||
#define AMDDS_PRIMARY (AMDDS_DCIPS | AMDDS_PS)
|
||||
|
||||
// be nice to our friends in C
|
||||
#undef INTERFACE
|
||||
#define INTERFACE IDirectDrawVideo
|
||||
|
||||
DECLARE_INTERFACE_(IDirectDrawVideo, IUnknown)
|
||||
{
|
||||
// IUnknown methods
|
||||
|
||||
STDMETHOD(QueryInterface)(THIS_ REFIID riid, LPVOID *ppvObj) PURE;
|
||||
STDMETHOD_(ULONG,AddRef)(THIS) PURE;
|
||||
STDMETHOD_(ULONG,Release)(THIS) PURE;
|
||||
|
||||
// IDirectDrawVideo methods
|
||||
|
||||
STDMETHOD(GetSwitches)(THIS_ DWORD *pSwitches) PURE;
|
||||
STDMETHOD(SetSwitches)(THIS_ DWORD Switches) PURE;
|
||||
STDMETHOD(GetCaps)(THIS_ DDCAPS *pCaps) PURE;
|
||||
STDMETHOD(GetEmulatedCaps)(THIS_ DDCAPS *pCaps) PURE;
|
||||
STDMETHOD(GetSurfaceDesc)(THIS_ DDSURFACEDESC *pSurfaceDesc) PURE;
|
||||
STDMETHOD(GetFourCCCodes)(THIS_ DWORD *pCount,DWORD *pCodes) PURE;
|
||||
STDMETHOD(SetDirectDraw)(THIS_ LPDIRECTDRAW pDirectDraw) PURE;
|
||||
STDMETHOD(GetDirectDraw)(THIS_ LPDIRECTDRAW *ppDirectDraw) PURE;
|
||||
STDMETHOD(GetSurfaceType)(THIS_ DWORD *pSurfaceType) PURE;
|
||||
STDMETHOD(SetDefault)(THIS) PURE;
|
||||
STDMETHOD(UseScanLine)(THIS_ long UseScanLine) PURE;
|
||||
STDMETHOD(CanUseScanLine)(THIS_ long *UseScanLine) PURE;
|
||||
STDMETHOD(UseOverlayStretch)(THIS_ long UseOverlayStretch) PURE;
|
||||
STDMETHOD(CanUseOverlayStretch)(THIS_ long *UseOverlayStretch) PURE;
|
||||
STDMETHOD(UseWhenFullScreen)(THIS_ long UseWhenFullScreen) PURE;
|
||||
STDMETHOD(WillUseFullScreen)(THIS_ long *UseWhenFullScreen) PURE;
|
||||
};
|
||||
|
||||
|
||||
// be nice to our friends in C
|
||||
#undef INTERFACE
|
||||
#define INTERFACE IQualProp
|
||||
|
||||
DECLARE_INTERFACE_(IQualProp, IUnknown)
|
||||
{
|
||||
// IUnknown methods
|
||||
|
||||
STDMETHOD(QueryInterface)(THIS_ REFIID riid, LPVOID *ppvObj) PURE;
|
||||
STDMETHOD_(ULONG,AddRef)(THIS) PURE;
|
||||
STDMETHOD_(ULONG,Release)(THIS) PURE;
|
||||
|
||||
// Compare these with the functions in class CGargle in gargle.h
|
||||
|
||||
STDMETHOD(get_FramesDroppedInRenderer)(THIS_ int *pcFrames) PURE; // Out
|
||||
STDMETHOD(get_FramesDrawn)(THIS_ int *pcFramesDrawn) PURE; // Out
|
||||
STDMETHOD(get_AvgFrameRate)(THIS_ int *piAvgFrameRate) PURE; // Out
|
||||
STDMETHOD(get_Jitter)(THIS_ int *iJitter) PURE; // Out
|
||||
STDMETHOD(get_AvgSyncOffset)(THIS_ int *piAvg) PURE; // Out
|
||||
STDMETHOD(get_DevSyncOffset)(THIS_ int *piDev) PURE; // Out
|
||||
};
|
||||
|
||||
|
||||
// This interface allows an application or plug in distributor to control a
|
||||
// full screen renderer. The Modex renderer supports this interface. When
|
||||
// connected a renderer should load the display modes it has available
|
||||
// The number of modes available can be obtained through CountModes. Then
|
||||
// information on each individual mode is available by calling GetModeInfo
|
||||
// and IsModeAvailable. An application may enable and disable any modes
|
||||
// by calling the SetEnabled flag with OATRUE or OAFALSE (not C/C++ TRUE
|
||||
// and FALSE values) - the current value may be queried by IsModeEnabled
|
||||
|
||||
// A more generic way of setting the modes enabled that is easier to use
|
||||
// when writing applications is the clip loss factor. This defines the
|
||||
// amount of video that can be lost when deciding which display mode to
|
||||
// use. Assuming the decoder cannot compress the video then playing an
|
||||
// MPEG file (say 352x288) into a 320x200 display will lose about 25% of
|
||||
// the image. The clip loss factor specifies the upper range permissible.
|
||||
// To allow typical MPEG video to be played in 320x200 it defaults to 25%
|
||||
|
||||
// be nice to our friends in C
|
||||
#undef INTERFACE
|
||||
#define INTERFACE IFullScreenVideo
|
||||
|
||||
DECLARE_INTERFACE_(IFullScreenVideo, IUnknown)
|
||||
{
|
||||
// IUnknown methods
|
||||
|
||||
STDMETHOD(QueryInterface)(THIS_ REFIID riid, LPVOID *ppvObj) PURE;
|
||||
STDMETHOD_(ULONG,AddRef)(THIS) PURE;
|
||||
STDMETHOD_(ULONG,Release)(THIS) PURE;
|
||||
|
||||
// IFullScreenVideo methods
|
||||
|
||||
STDMETHOD(CountModes)(THIS_ long *pModes) PURE;
|
||||
STDMETHOD(GetModeInfo)(THIS_ long Mode,long *pWidth,long *pHeight,long *pDepth) PURE;
|
||||
STDMETHOD(GetCurrentMode)(THIS_ long *pMode) PURE;
|
||||
STDMETHOD(IsModeAvailable)(THIS_ long Mode) PURE;
|
||||
STDMETHOD(IsModeEnabled)(THIS_ long Mode) PURE;
|
||||
STDMETHOD(SetEnabled)(THIS_ long Mode,long bEnabled) PURE;
|
||||
STDMETHOD(GetClipFactor)(THIS_ long *pClipFactor) PURE;
|
||||
STDMETHOD(SetClipFactor)(THIS_ long ClipFactor) PURE;
|
||||
STDMETHOD(SetMessageDrain)(THIS_ HWND hwnd) PURE;
|
||||
STDMETHOD(GetMessageDrain)(THIS_ HWND *hwnd) PURE;
|
||||
STDMETHOD(SetMonitor)(THIS_ long Monitor) PURE;
|
||||
STDMETHOD(GetMonitor)(THIS_ long *Monitor) PURE;
|
||||
STDMETHOD(HideOnDeactivate)(THIS_ long Hide) PURE;
|
||||
STDMETHOD(IsHideOnDeactivate)(THIS) PURE;
|
||||
STDMETHOD(SetCaption)(THIS_ BSTR strCaption) PURE;
|
||||
STDMETHOD(GetCaption)(THIS_ BSTR *pstrCaption) PURE;
|
||||
STDMETHOD(SetDefault)(THIS) PURE;
|
||||
};
|
||||
|
||||
|
||||
// This adds the accelerator table capabilities in fullscreen. This is being
|
||||
// added between the original runtime release and the full SDK release. We
|
||||
// cannot just add the method to IFullScreenVideo as we don't want to force
|
||||
// applications to have to ship the ActiveMovie support DLLs - this is very
|
||||
// important to applications that plan on being downloaded over the Internet
|
||||
|
||||
// be nice to our friends in C
|
||||
#undef INTERFACE
|
||||
#define INTERFACE IFullScreenVideoEx
|
||||
|
||||
DECLARE_INTERFACE_(IFullScreenVideoEx, IFullScreenVideo)
|
||||
{
|
||||
// IUnknown methods
|
||||
|
||||
STDMETHOD(QueryInterface)(THIS_ REFIID riid, LPVOID *ppvObj) PURE;
|
||||
STDMETHOD_(ULONG,AddRef)(THIS) PURE;
|
||||
STDMETHOD_(ULONG,Release)(THIS) PURE;
|
||||
|
||||
// IFullScreenVideo methods
|
||||
|
||||
STDMETHOD(CountModes)(THIS_ long *pModes) PURE;
|
||||
STDMETHOD(GetModeInfo)(THIS_ long Mode,long *pWidth,long *pHeight,long *pDepth) PURE;
|
||||
STDMETHOD(GetCurrentMode)(THIS_ long *pMode) PURE;
|
||||
STDMETHOD(IsModeAvailable)(THIS_ long Mode) PURE;
|
||||
STDMETHOD(IsModeEnabled)(THIS_ long Mode) PURE;
|
||||
STDMETHOD(SetEnabled)(THIS_ long Mode,long bEnabled) PURE;
|
||||
STDMETHOD(GetClipFactor)(THIS_ long *pClipFactor) PURE;
|
||||
STDMETHOD(SetClipFactor)(THIS_ long ClipFactor) PURE;
|
||||
STDMETHOD(SetMessageDrain)(THIS_ HWND hwnd) PURE;
|
||||
STDMETHOD(GetMessageDrain)(THIS_ HWND *hwnd) PURE;
|
||||
STDMETHOD(SetMonitor)(THIS_ long Monitor) PURE;
|
||||
STDMETHOD(GetMonitor)(THIS_ long *Monitor) PURE;
|
||||
STDMETHOD(HideOnDeactivate)(THIS_ long Hide) PURE;
|
||||
STDMETHOD(IsHideOnDeactivate)(THIS) PURE;
|
||||
STDMETHOD(SetCaption)(THIS_ BSTR strCaption) PURE;
|
||||
STDMETHOD(GetCaption)(THIS_ BSTR *pstrCaption) PURE;
|
||||
STDMETHOD(SetDefault)(THIS) PURE;
|
||||
|
||||
// IFullScreenVideoEx
|
||||
|
||||
STDMETHOD(SetAcceleratorTable)(THIS_ HWND hwnd,HACCEL hAccel) PURE;
|
||||
STDMETHOD(GetAcceleratorTable)(THIS_ HWND *phwnd,HACCEL *phAccel) PURE;
|
||||
STDMETHOD(KeepPixelAspectRatio)(THIS_ long KeepAspect) PURE;
|
||||
STDMETHOD(IsKeepPixelAspectRatio)(THIS_ long *pKeepAspect) PURE;
|
||||
};
|
||||
|
||||
|
||||
// The SDK base classes contain a base video mixer class. Video mixing in a
|
||||
// software environment is tricky because we typically have multiple streams
|
||||
// each sending data at unpredictable times. To work with this we defined a
|
||||
// pin that is the lead pin, when data arrives on this pin we do a mix. As
|
||||
// an alternative we may not want to have a lead pin but output samples at
|
||||
// predefined spaces, like one every 1/15 of a second, this interfaces also
|
||||
// supports that mode of operations (there is a working video mixer sample)
|
||||
|
||||
// be nice to our friends in C
|
||||
#undef INTERFACE
|
||||
#define INTERFACE IBaseVideoMixer
|
||||
|
||||
DECLARE_INTERFACE_(IBaseVideoMixer, IUnknown)
|
||||
{
|
||||
STDMETHOD(SetLeadPin)(THIS_ int iPin) PURE;
|
||||
STDMETHOD(GetLeadPin)(THIS_ int *piPin) PURE;
|
||||
STDMETHOD(GetInputPinCount)(THIS_ int *piPinCount) PURE;
|
||||
STDMETHOD(IsUsingClock)(THIS_ int *pbValue) PURE;
|
||||
STDMETHOD(SetUsingClock)(THIS_ int bValue) PURE;
|
||||
STDMETHOD(GetClockPeriod)(THIS_ int *pbValue) PURE;
|
||||
STDMETHOD(SetClockPeriod)(THIS_ int bValue) PURE;
|
||||
};
|
||||
|
||||
#define iPALETTE_COLORS 256 // Maximum colours in palette
|
||||
#define iEGA_COLORS 16 // Number colours in EGA palette
|
||||
#define iMASK_COLORS 3 // Maximum three components
|
||||
#define iTRUECOLOR 16 // Minimum true colour device
|
||||
#define iRED 0 // Index position for RED mask
|
||||
#define iGREEN 1 // Index position for GREEN mask
|
||||
#define iBLUE 2 // Index position for BLUE mask
|
||||
#define iPALETTE 8 // Maximum colour depth using a palette
|
||||
#define iMAXBITS 8 // Maximum bits per colour component
|
||||
|
||||
|
||||
// Used for true colour images that also have a palette
|
||||
|
||||
typedef struct tag_TRUECOLORINFO {
|
||||
DWORD dwBitMasks[iMASK_COLORS];
|
||||
RGBQUAD bmiColors[iPALETTE_COLORS];
|
||||
} TRUECOLORINFO;
|
||||
|
||||
|
||||
// The BITMAPINFOHEADER contains all the details about the video stream such
|
||||
// as the actual image dimensions and their pixel depth. A source filter may
|
||||
// also request that the sink take only a section of the video by providing a
|
||||
// clipping rectangle in rcSource. In the worst case where the sink filter
|
||||
// forgets to check this on connection it will simply render the whole thing
|
||||
// which isn't a disaster. Ideally a sink filter will check the rcSource and
|
||||
// if it doesn't support image extraction and the rectangle is not empty then
|
||||
// it will reject the connection. A filter should use SetRectEmpty to reset a
|
||||
// rectangle to all zeroes (and IsRectEmpty to later check the rectangle).
|
||||
// The rcTarget specifies the destination rectangle for the video, for most
|
||||
// source filters they will set this to all zeroes, a downstream filter may
|
||||
// request that the video be placed in a particular area of the buffers it
|
||||
// supplies in which case it will call QueryAccept with a non empty target
|
||||
|
||||
typedef struct tagVIDEOINFOHEADER {
|
||||
|
||||
RECT rcSource; // The bit we really want to use
|
||||
RECT rcTarget; // Where the video should go
|
||||
DWORD dwBitRate; // Approximate bit data rate
|
||||
DWORD dwBitErrorRate; // Bit error rate for this stream
|
||||
REFERENCE_TIME AvgTimePerFrame; // Average time per frame (100ns units)
|
||||
|
||||
BITMAPINFOHEADER bmiHeader;
|
||||
|
||||
} VIDEOINFOHEADER;
|
||||
|
||||
// make sure the pbmi is initialized before using these macros
|
||||
#define TRUECOLOR(pbmi) ((TRUECOLORINFO *)(((LPBYTE)&((pbmi)->bmiHeader)) \
|
||||
+ (pbmi)->bmiHeader.biSize))
|
||||
#define COLORS(pbmi) ((RGBQUAD *)(((LPBYTE)&((pbmi)->bmiHeader)) \
|
||||
+ (pbmi)->bmiHeader.biSize))
|
||||
#define BITMASKS(pbmi) ((DWORD *)(((LPBYTE)&((pbmi)->bmiHeader)) \
|
||||
+ (pbmi)->bmiHeader.biSize))
|
||||
|
||||
// All the image based filters use this to communicate their media types. It's
|
||||
// centred principally around the BITMAPINFO. This structure always contains a
|
||||
// BITMAPINFOHEADER followed by a number of other fields depending on what the
|
||||
// BITMAPINFOHEADER contains. If it contains details of a palettised format it
|
||||
// will be followed by one or more RGBQUADs defining the palette. If it holds
|
||||
// details of a true colour format then it may be followed by a set of three
|
||||
// DWORD bit masks that specify where the RGB data can be found in the image
|
||||
// (For more information regarding BITMAPINFOs see the Win32 documentation)
|
||||
|
||||
// The rcSource and rcTarget fields are not for use by filters supplying the
|
||||
// data. The destination (target) rectangle should be set to all zeroes. The
|
||||
// source may also be zero filled or set with the dimensions of the video. So
|
||||
// if the video is 352x288 pixels then set it to (0,0,352,288). These fields
|
||||
// are mainly used by downstream filters that want to ask the source filter
|
||||
// to place the image in a different position in an output buffer. So when
|
||||
// using for example the primary surface the video renderer may ask a filter
|
||||
// to place the video images in a destination position of (100,100,452,388)
|
||||
// on the display since that's where the window is positioned on the display
|
||||
|
||||
// !!! WARNING !!!
|
||||
// DO NOT use this structure unless you are sure that the BITMAPINFOHEADER
|
||||
// has a normal biSize == sizeof(BITMAPINFOHEADER) !
|
||||
// !!! WARNING !!!
|
||||
|
||||
typedef struct tagVIDEOINFO {
|
||||
|
||||
RECT rcSource; // The bit we really want to use
|
||||
RECT rcTarget; // Where the video should go
|
||||
DWORD dwBitRate; // Approximate bit data rate
|
||||
DWORD dwBitErrorRate; // Bit error rate for this stream
|
||||
REFERENCE_TIME AvgTimePerFrame; // Average time per frame (100ns units)
|
||||
|
||||
BITMAPINFOHEADER bmiHeader;
|
||||
|
||||
union {
|
||||
RGBQUAD bmiColors[iPALETTE_COLORS]; // Colour palette
|
||||
DWORD dwBitMasks[iMASK_COLORS]; // True colour masks
|
||||
TRUECOLORINFO TrueColorInfo; // Both of the above
|
||||
};
|
||||
|
||||
} VIDEOINFO;
|
||||
|
||||
// These macros define some standard bitmap format sizes
|
||||
|
||||
#define SIZE_EGA_PALETTE (iEGA_COLORS * sizeof(RGBQUAD))
|
||||
#define SIZE_PALETTE (iPALETTE_COLORS * sizeof(RGBQUAD))
|
||||
#define SIZE_MASKS (iMASK_COLORS * sizeof(DWORD))
|
||||
#define SIZE_PREHEADER (FIELD_OFFSET(VIDEOINFOHEADER,bmiHeader))
|
||||
#define SIZE_VIDEOHEADER (sizeof(BITMAPINFOHEADER) + SIZE_PREHEADER)
|
||||
// !!! for abnormal biSizes
|
||||
// #define SIZE_VIDEOHEADER(pbmi) ((pbmi)->bmiHeader.biSize + SIZE_PREHEADER)
|
||||
|
||||
// DIBSIZE calculates the number of bytes required by an image
|
||||
|
||||
#define WIDTHBYTES(bits) ((DWORD)(((bits)+31) & (~31)) / 8)
|
||||
#define DIBWIDTHBYTES(bi) (DWORD)WIDTHBYTES((DWORD)(bi).biWidth * (DWORD)(bi).biBitCount)
|
||||
#define _DIBSIZE(bi) (DIBWIDTHBYTES(bi) * (DWORD)(bi).biHeight)
|
||||
#define DIBSIZE(bi) ((bi).biHeight < 0 ? (-1)*(_DIBSIZE(bi)) : _DIBSIZE(bi))
|
||||
|
||||
// This compares the bit masks between two VIDEOINFOHEADERs
|
||||
|
||||
#define BIT_MASKS_MATCH(pbmi1,pbmi2) \
|
||||
(((pbmi1)->dwBitMasks[iRED] == (pbmi2)->dwBitMasks[iRED]) && \
|
||||
((pbmi1)->dwBitMasks[iGREEN] == (pbmi2)->dwBitMasks[iGREEN]) && \
|
||||
((pbmi1)->dwBitMasks[iBLUE] == (pbmi2)->dwBitMasks[iBLUE]))
|
||||
|
||||
// These zero fill different parts of the VIDEOINFOHEADER structure
|
||||
|
||||
// Only use these macros for pbmi's with a normal BITMAPINFOHEADER biSize
|
||||
#define RESET_MASKS(pbmi) (ZeroMemory((PVOID)(pbmi)->dwBitFields,SIZE_MASKS))
|
||||
#define RESET_HEADER(pbmi) (ZeroMemory((PVOID)(pbmi),SIZE_VIDEOHEADER))
|
||||
#define RESET_PALETTE(pbmi) (ZeroMemory((PVOID)(pbmi)->bmiColors,SIZE_PALETTE));
|
||||
|
||||
#if 0
|
||||
// !!! This is the right way to do it, but may break existing code
|
||||
#define RESET_MASKS(pbmi) (ZeroMemory((PVOID)(((LPBYTE)(pbmi)->bmiHeader) + \
|
||||
(pbmi)->bmiHeader.biSize,SIZE_MASKS)))
|
||||
#define RESET_HEADER(pbmi) (ZeroMemory((PVOID)(pbmi), SIZE_PREHEADER + \
|
||||
sizeof(BITMAPINFOHEADER)))
|
||||
#define RESET_PALETTE(pbmi) (ZeroMemory((PVOID)(((LPBYTE)(pbmi)->bmiHeader) + \
|
||||
(pbmi)->bmiHeader.biSize,SIZE_PALETTE))
|
||||
#endif
|
||||
|
||||
// Other (hopefully) useful bits and bobs
|
||||
|
||||
#define PALETTISED(pbmi) ((pbmi)->bmiHeader.biBitCount <= iPALETTE)
|
||||
#define PALETTE_ENTRIES(pbmi) ((DWORD) 1 << (pbmi)->bmiHeader.biBitCount)
|
||||
|
||||
// Returns the address of the BITMAPINFOHEADER from the VIDEOINFOHEADER
|
||||
#define HEADER(pVideoInfo) (&(((VIDEOINFOHEADER *) (pVideoInfo))->bmiHeader))
|
||||
|
||||
|
||||
// MPEG variant - includes a DWORD length followed by the
|
||||
// video sequence header after the video header.
|
||||
//
|
||||
// The sequence header includes the sequence header start code and the
|
||||
// quantization matrices associated with the first sequence header in the
|
||||
// stream so is a maximum of 140 bytes long.
|
||||
|
||||
typedef struct tagMPEG1VIDEOINFO {
|
||||
|
||||
VIDEOINFOHEADER hdr; // Compatible with VIDEOINFO
|
||||
DWORD dwStartTimeCode; // 25-bit Group of pictures time code
|
||||
// at start of data
|
||||
DWORD cbSequenceHeader; // Length in bytes of bSequenceHeader
|
||||
BYTE bSequenceHeader[1]; // Sequence header including
|
||||
// quantization matrices if any
|
||||
} MPEG1VIDEOINFO;
|
||||
|
||||
#define MAX_SIZE_MPEG1_SEQUENCE_INFO 140
|
||||
#define SIZE_MPEG1VIDEOINFO(pv) (FIELD_OFFSET(MPEG1VIDEOINFO, bSequenceHeader[0]) + (pv)->cbSequenceHeader)
|
||||
#define MPEG1_SEQUENCE_INFO(pv) ((const BYTE *)(pv)->bSequenceHeader)
|
||||
|
||||
|
||||
// Analog video variant - Use this when the format is FORMAT_AnalogVideo
|
||||
//
|
||||
// rcSource defines the portion of the active video signal to use
|
||||
// rcTarget defines the destination rectangle
|
||||
// both of the above are relative to the dwActiveWidth and dwActiveHeight fields
|
||||
// dwActiveWidth is currently set to 720 for all formats (but could change for HDTV)
|
||||
// dwActiveHeight is 483 for NTSC and 575 for PAL/SECAM (but could change for HDTV)
|
||||
|
||||
typedef struct tagAnalogVideoInfo {
|
||||
RECT rcSource; // Width max is 720, height varies w/ TransmissionStd
|
||||
RECT rcTarget; // Where the video should go
|
||||
DWORD dwActiveWidth; // Always 720 (CCIR-601 active samples per line)
|
||||
DWORD dwActiveHeight; // 483 for NTSC, 575 for PAL/SECAM
|
||||
REFERENCE_TIME AvgTimePerFrame; // Normal ActiveMovie units (100 nS)
|
||||
} ANALOGVIDEOINFO;
|
||||
|
||||
//
|
||||
// AM_KSPROPSETID_FrameStep property set definitions
|
||||
//
|
||||
typedef enum {
|
||||
// Step
|
||||
AM_PROPERTY_FRAMESTEP_STEP = 0x01,
|
||||
AM_PROPERTY_FRAMESTEP_CANCEL = 0x02,
|
||||
|
||||
// S_OK for these 2 means we can - S_FALSE if we can't
|
||||
AM_PROPERTY_FRAMESTEP_CANSTEP = 0x03,
|
||||
AM_PROPERTY_FRAMESTEP_CANSTEPMULTIPLE = 0x04
|
||||
} AM_PROPERTY_FRAMESTEP;
|
||||
|
||||
typedef struct _AM_FRAMESTEP_STEP
|
||||
{
|
||||
// 1 means step 1 frame forward
|
||||
// 0 is invalid
|
||||
// n (n > 1) means skip n - 1 frames and show the nth
|
||||
DWORD dwFramesToStep;
|
||||
} AM_FRAMESTEP_STEP;
|
||||
|
||||
#ifdef __cplusplus
|
||||
}
|
||||
#endif // __cplusplus
|
||||
#endif // __AMVIDEO__
|
||||
|
|
@ -0,0 +1,34 @@
|
|||
//------------------------------------------------------------------------------
|
||||
// File: ATSMedia.h
|
||||
//
|
||||
// Desc: Broadcast Driver Architecture Media Definitions for ATSC
|
||||
//
|
||||
// Copyright (c) 1996 - 2000, Microsoft Corporation. All rights reserved.
|
||||
//------------------------------------------------------------------------------
|
||||
|
||||
|
||||
#if !defined(_KSMEDIA_)
|
||||
#error KSMEDIA.H must be included before BDAMEDIA.H
|
||||
#endif // !defined(_KSMEDIA_)
|
||||
|
||||
#if !defined(_BDAMEDIA_)
|
||||
#error BDAMEDIA.H must be included before ATSCMEDIA.H
|
||||
#endif // !defined(_KSMEDIA_)
|
||||
|
||||
#if !defined(_ATSCMEDIA_)
|
||||
#define _ATSCMEDIA_
|
||||
|
||||
|
||||
//===========================================================================
|
||||
//
|
||||
// ATSC Network Type
|
||||
//
|
||||
//===========================================================================
|
||||
|
||||
#define STATIC_BDANETWORKTYPE_ATSC\
|
||||
0x71985f51, 0x1ca1, 0x11d3, 0x9c, 0xc8, 0x0, 0xc0, 0x4f, 0x79, 0x71, 0xe0
|
||||
DEFINE_GUIDSTRUCT("71985F51-1CA1-11d3-9CC8-00C04F7971E0", BDANETWORKTYPE_ATSC);
|
||||
#define BDANETWORKTYPE_ATSC DEFINE_GUIDNAMED(BDANETWORKTYPE_ATSC)
|
||||
|
||||
|
||||
#endif // _ATSCMEDIA_
|
|
@ -0,0 +1,53 @@
|
|||
//------------------------------------------------------------------------------
|
||||
// File: AudEvCod.h
|
||||
//
|
||||
// Desc: List of Audio device error event codes and the expected params.
|
||||
//
|
||||
// Copyright (c) 1999 - 2000, Microsoft Corporation. All rights reserved.
|
||||
//------------------------------------------------------------------------------
|
||||
|
||||
|
||||
|
||||
#ifndef __AUDEVCOD__
|
||||
#define __AUDEVCOD__
|
||||
|
||||
|
||||
#define EC_SND_DEVICE_ERROR_BASE 0x0200
|
||||
|
||||
typedef enum _tagSND_DEVICE_ERROR {
|
||||
|
||||
SNDDEV_ERROR_Open=1,
|
||||
SNDDEV_ERROR_Close=2,
|
||||
SNDDEV_ERROR_GetCaps=3,
|
||||
SNDDEV_ERROR_PrepareHeader=4,
|
||||
SNDDEV_ERROR_UnprepareHeader=5,
|
||||
SNDDEV_ERROR_Reset=6,
|
||||
SNDDEV_ERROR_Restart=7,
|
||||
SNDDEV_ERROR_GetPosition=8,
|
||||
SNDDEV_ERROR_Write=9,
|
||||
SNDDEV_ERROR_Pause=10,
|
||||
SNDDEV_ERROR_Stop=11,
|
||||
SNDDEV_ERROR_Start=12,
|
||||
SNDDEV_ERROR_AddBuffer=13,
|
||||
SNDDEV_ERROR_Query=14,
|
||||
|
||||
} SNDDEV_ERR;
|
||||
|
||||
|
||||
// Sound device error event codes
|
||||
// ==============================
|
||||
//
|
||||
// All audio device error events are always passed on to the application, and are
|
||||
// never processed by the filter graph
|
||||
|
||||
|
||||
#define EC_SNDDEV_IN_ERROR (EC_SND_DEVICE_ERROR_BASE + 0x00)
|
||||
#define EC_SNDDEV_OUT_ERROR (EC_SND_DEVICE_ERROR_BASE + 0x01)
|
||||
// Parameters: ( DWORD, DWORD)
|
||||
// lParam1 is an enum SND_DEVICE_ERROR which notifies the app how the device was
|
||||
// being accessed when the failure occurred.
|
||||
//
|
||||
// lParam2 is the error returned from the sound device call.
|
||||
//
|
||||
|
||||
#endif // __AUDEVCOD__
|
|
@ -0,0 +1,715 @@
|
|||
|
||||
#pragma warning( disable: 4049 ) /* more than 64k source lines */
|
||||
|
||||
/* this ALWAYS GENERATED file contains the definitions for the interfaces */
|
||||
|
||||
|
||||
/* File created by MIDL compiler version 6.00.0338 */
|
||||
/* Compiler settings for austream.idl:
|
||||
Oicf, W1, Zp8, env=Win32 (32b run)
|
||||
protocol : dce , ms_ext, c_ext
|
||||
error checks: allocation ref bounds_check enum stub_data
|
||||
VC __declspec() decoration level:
|
||||
__declspec(uuid()), __declspec(selectany), __declspec(novtable)
|
||||
DECLSPEC_UUID(), MIDL_INTERFACE()
|
||||
*/
|
||||
//@@MIDL_FILE_HEADING( )
|
||||
|
||||
|
||||
/* verify that the <rpcndr.h> version is high enough to compile this file*/
|
||||
#ifndef __REQUIRED_RPCNDR_H_VERSION__
|
||||
#define __REQUIRED_RPCNDR_H_VERSION__ 440
|
||||
#endif
|
||||
|
||||
#include "rpc.h"
|
||||
#include "rpcndr.h"
|
||||
|
||||
#ifndef __RPCNDR_H_VERSION__
|
||||
#error this stub requires an updated version of <rpcndr.h>
|
||||
#endif // __RPCNDR_H_VERSION__
|
||||
|
||||
#ifndef COM_NO_WINDOWS_H
|
||||
#include "windows.h"
|
||||
#include "ole2.h"
|
||||
#endif /*COM_NO_WINDOWS_H*/
|
||||
|
||||
#ifndef __austream_h__
|
||||
#define __austream_h__
|
||||
|
||||
#if defined(_MSC_VER) && (_MSC_VER >= 1020)
|
||||
#pragma once
|
||||
#endif
|
||||
|
||||
/* Forward Declarations */
|
||||
|
||||
#ifndef __IAudioMediaStream_FWD_DEFINED__
|
||||
#define __IAudioMediaStream_FWD_DEFINED__
|
||||
typedef interface IAudioMediaStream IAudioMediaStream;
|
||||
#endif /* __IAudioMediaStream_FWD_DEFINED__ */
|
||||
|
||||
|
||||
#ifndef __IAudioStreamSample_FWD_DEFINED__
|
||||
#define __IAudioStreamSample_FWD_DEFINED__
|
||||
typedef interface IAudioStreamSample IAudioStreamSample;
|
||||
#endif /* __IAudioStreamSample_FWD_DEFINED__ */
|
||||
|
||||
|
||||
#ifndef __IMemoryData_FWD_DEFINED__
|
||||
#define __IMemoryData_FWD_DEFINED__
|
||||
typedef interface IMemoryData IMemoryData;
|
||||
#endif /* __IMemoryData_FWD_DEFINED__ */
|
||||
|
||||
|
||||
#ifndef __IAudioData_FWD_DEFINED__
|
||||
#define __IAudioData_FWD_DEFINED__
|
||||
typedef interface IAudioData IAudioData;
|
||||
#endif /* __IAudioData_FWD_DEFINED__ */
|
||||
|
||||
|
||||
/* header files for imported files */
|
||||
#include "unknwn.h"
|
||||
#include "mmstream.h"
|
||||
|
||||
#ifdef __cplusplus
|
||||
extern "C"{
|
||||
#endif
|
||||
|
||||
void * __RPC_USER MIDL_user_allocate(size_t);
|
||||
void __RPC_USER MIDL_user_free( void * );
|
||||
|
||||
/* interface __MIDL_itf_austream_0000 */
|
||||
/* [local] */
|
||||
|
||||
//
|
||||
// The following declarations within the 'if 0' block are dummy typedefs used to make
|
||||
// the ddstream.idl file build. The actual definitions are contained in DDRAW.H
|
||||
//
|
||||
#if 0
|
||||
typedef struct tWAVEFORMATEX WAVEFORMATEX;
|
||||
|
||||
#endif
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
extern RPC_IF_HANDLE __MIDL_itf_austream_0000_v0_0_c_ifspec;
|
||||
extern RPC_IF_HANDLE __MIDL_itf_austream_0000_v0_0_s_ifspec;
|
||||
|
||||
#ifndef __IAudioMediaStream_INTERFACE_DEFINED__
|
||||
#define __IAudioMediaStream_INTERFACE_DEFINED__
|
||||
|
||||
/* interface IAudioMediaStream */
|
||||
/* [unique][uuid][local][object] */
|
||||
|
||||
|
||||
EXTERN_C const IID IID_IAudioMediaStream;
|
||||
|
||||
#if defined(__cplusplus) && !defined(CINTERFACE)
|
||||
|
||||
MIDL_INTERFACE("f7537560-a3be-11d0-8212-00c04fc32c45")
|
||||
IAudioMediaStream : public IMediaStream
|
||||
{
|
||||
public:
|
||||
virtual HRESULT STDMETHODCALLTYPE GetFormat(
|
||||
/* [out] */ WAVEFORMATEX *pWaveFormatCurrent) = 0;
|
||||
|
||||
virtual HRESULT STDMETHODCALLTYPE SetFormat(
|
||||
/* [in] */ const WAVEFORMATEX *lpWaveFormat) = 0;
|
||||
|
||||
virtual HRESULT STDMETHODCALLTYPE CreateSample(
|
||||
/* [in] */ IAudioData *pAudioData,
|
||||
/* [in] */ DWORD dwFlags,
|
||||
/* [out] */ IAudioStreamSample **ppSample) = 0;
|
||||
|
||||
};
|
||||
|
||||
#else /* C style interface */
|
||||
|
||||
typedef struct IAudioMediaStreamVtbl
|
||||
{
|
||||
BEGIN_INTERFACE
|
||||
|
||||
HRESULT ( STDMETHODCALLTYPE *QueryInterface )(
|
||||
IAudioMediaStream * This,
|
||||
/* [in] */ REFIID riid,
|
||||
/* [iid_is][out] */ void **ppvObject);
|
||||
|
||||
ULONG ( STDMETHODCALLTYPE *AddRef )(
|
||||
IAudioMediaStream * This);
|
||||
|
||||
ULONG ( STDMETHODCALLTYPE *Release )(
|
||||
IAudioMediaStream * This);
|
||||
|
||||
HRESULT ( STDMETHODCALLTYPE *GetMultiMediaStream )(
|
||||
IAudioMediaStream * This,
|
||||
/* [out] */ IMultiMediaStream **ppMultiMediaStream);
|
||||
|
||||
HRESULT ( STDMETHODCALLTYPE *GetInformation )(
|
||||
IAudioMediaStream * This,
|
||||
/* [out] */ MSPID *pPurposeId,
|
||||
/* [out] */ STREAM_TYPE *pType);
|
||||
|
||||
HRESULT ( STDMETHODCALLTYPE *SetSameFormat )(
|
||||
IAudioMediaStream * This,
|
||||
/* [in] */ IMediaStream *pStreamThatHasDesiredFormat,
|
||||
/* [in] */ DWORD dwFlags);
|
||||
|
||||
HRESULT ( STDMETHODCALLTYPE *AllocateSample )(
|
||||
IAudioMediaStream * This,
|
||||
/* [in] */ DWORD dwFlags,
|
||||
/* [out] */ IStreamSample **ppSample);
|
||||
|
||||
HRESULT ( STDMETHODCALLTYPE *CreateSharedSample )(
|
||||
IAudioMediaStream * This,
|
||||
/* [in] */ IStreamSample *pExistingSample,
|
||||
/* [in] */ DWORD dwFlags,
|
||||
/* [out] */ IStreamSample **ppNewSample);
|
||||
|
||||
HRESULT ( STDMETHODCALLTYPE *SendEndOfStream )(
|
||||
IAudioMediaStream * This,
|
||||
DWORD dwFlags);
|
||||
|
||||
HRESULT ( STDMETHODCALLTYPE *GetFormat )(
|
||||
IAudioMediaStream * This,
|
||||
/* [out] */ WAVEFORMATEX *pWaveFormatCurrent);
|
||||
|
||||
HRESULT ( STDMETHODCALLTYPE *SetFormat )(
|
||||
IAudioMediaStream * This,
|
||||
/* [in] */ const WAVEFORMATEX *lpWaveFormat);
|
||||
|
||||
HRESULT ( STDMETHODCALLTYPE *CreateSample )(
|
||||
IAudioMediaStream * This,
|
||||
/* [in] */ IAudioData *pAudioData,
|
||||
/* [in] */ DWORD dwFlags,
|
||||
/* [out] */ IAudioStreamSample **ppSample);
|
||||
|
||||
END_INTERFACE
|
||||
} IAudioMediaStreamVtbl;
|
||||
|
||||
interface IAudioMediaStream
|
||||
{
|
||||
CONST_VTBL struct IAudioMediaStreamVtbl *lpVtbl;
|
||||
};
|
||||
|
||||
|
||||
|
||||
#ifdef COBJMACROS
|
||||
|
||||
|
||||
#define IAudioMediaStream_QueryInterface(This,riid,ppvObject) \
|
||||
(This)->lpVtbl -> QueryInterface(This,riid,ppvObject)
|
||||
|
||||
#define IAudioMediaStream_AddRef(This) \
|
||||
(This)->lpVtbl -> AddRef(This)
|
||||
|
||||
#define IAudioMediaStream_Release(This) \
|
||||
(This)->lpVtbl -> Release(This)
|
||||
|
||||
|
||||
#define IAudioMediaStream_GetMultiMediaStream(This,ppMultiMediaStream) \
|
||||
(This)->lpVtbl -> GetMultiMediaStream(This,ppMultiMediaStream)
|
||||
|
||||
#define IAudioMediaStream_GetInformation(This,pPurposeId,pType) \
|
||||
(This)->lpVtbl -> GetInformation(This,pPurposeId,pType)
|
||||
|
||||
#define IAudioMediaStream_SetSameFormat(This,pStreamThatHasDesiredFormat,dwFlags) \
|
||||
(This)->lpVtbl -> SetSameFormat(This,pStreamThatHasDesiredFormat,dwFlags)
|
||||
|
||||
#define IAudioMediaStream_AllocateSample(This,dwFlags,ppSample) \
|
||||
(This)->lpVtbl -> AllocateSample(This,dwFlags,ppSample)
|
||||
|
||||
#define IAudioMediaStream_CreateSharedSample(This,pExistingSample,dwFlags,ppNewSample) \
|
||||
(This)->lpVtbl -> CreateSharedSample(This,pExistingSample,dwFlags,ppNewSample)
|
||||
|
||||
#define IAudioMediaStream_SendEndOfStream(This,dwFlags) \
|
||||
(This)->lpVtbl -> SendEndOfStream(This,dwFlags)
|
||||
|
||||
|
||||
#define IAudioMediaStream_GetFormat(This,pWaveFormatCurrent) \
|
||||
(This)->lpVtbl -> GetFormat(This,pWaveFormatCurrent)
|
||||
|
||||
#define IAudioMediaStream_SetFormat(This,lpWaveFormat) \
|
||||
(This)->lpVtbl -> SetFormat(This,lpWaveFormat)
|
||||
|
||||
#define IAudioMediaStream_CreateSample(This,pAudioData,dwFlags,ppSample) \
|
||||
(This)->lpVtbl -> CreateSample(This,pAudioData,dwFlags,ppSample)
|
||||
|
||||
#endif /* COBJMACROS */
|
||||
|
||||
|
||||
#endif /* C style interface */
|
||||
|
||||
|
||||
|
||||
HRESULT STDMETHODCALLTYPE IAudioMediaStream_GetFormat_Proxy(
|
||||
IAudioMediaStream * This,
|
||||
/* [out] */ WAVEFORMATEX *pWaveFormatCurrent);
|
||||
|
||||
|
||||
void __RPC_STUB IAudioMediaStream_GetFormat_Stub(
|
||||
IRpcStubBuffer *This,
|
||||
IRpcChannelBuffer *_pRpcChannelBuffer,
|
||||
PRPC_MESSAGE _pRpcMessage,
|
||||
DWORD *_pdwStubPhase);
|
||||
|
||||
|
||||
HRESULT STDMETHODCALLTYPE IAudioMediaStream_SetFormat_Proxy(
|
||||
IAudioMediaStream * This,
|
||||
/* [in] */ const WAVEFORMATEX *lpWaveFormat);
|
||||
|
||||
|
||||
void __RPC_STUB IAudioMediaStream_SetFormat_Stub(
|
||||
IRpcStubBuffer *This,
|
||||
IRpcChannelBuffer *_pRpcChannelBuffer,
|
||||
PRPC_MESSAGE _pRpcMessage,
|
||||
DWORD *_pdwStubPhase);
|
||||
|
||||
|
||||
HRESULT STDMETHODCALLTYPE IAudioMediaStream_CreateSample_Proxy(
|
||||
IAudioMediaStream * This,
|
||||
/* [in] */ IAudioData *pAudioData,
|
||||
/* [in] */ DWORD dwFlags,
|
||||
/* [out] */ IAudioStreamSample **ppSample);
|
||||
|
||||
|
||||
void __RPC_STUB IAudioMediaStream_CreateSample_Stub(
|
||||
IRpcStubBuffer *This,
|
||||
IRpcChannelBuffer *_pRpcChannelBuffer,
|
||||
PRPC_MESSAGE _pRpcMessage,
|
||||
DWORD *_pdwStubPhase);
|
||||
|
||||
|
||||
|
||||
#endif /* __IAudioMediaStream_INTERFACE_DEFINED__ */
|
||||
|
||||
|
||||
#ifndef __IAudioStreamSample_INTERFACE_DEFINED__
|
||||
#define __IAudioStreamSample_INTERFACE_DEFINED__
|
||||
|
||||
/* interface IAudioStreamSample */
|
||||
/* [unique][uuid][local][object] */
|
||||
|
||||
|
||||
EXTERN_C const IID IID_IAudioStreamSample;
|
||||
|
||||
#if defined(__cplusplus) && !defined(CINTERFACE)
|
||||
|
||||
MIDL_INTERFACE("345fee00-aba5-11d0-8212-00c04fc32c45")
|
||||
IAudioStreamSample : public IStreamSample
|
||||
{
|
||||
public:
|
||||
virtual HRESULT STDMETHODCALLTYPE GetAudioData(
|
||||
/* [out] */ IAudioData **ppAudio) = 0;
|
||||
|
||||
};
|
||||
|
||||
#else /* C style interface */
|
||||
|
||||
typedef struct IAudioStreamSampleVtbl
|
||||
{
|
||||
BEGIN_INTERFACE
|
||||
|
||||
HRESULT ( STDMETHODCALLTYPE *QueryInterface )(
|
||||
IAudioStreamSample * This,
|
||||
/* [in] */ REFIID riid,
|
||||
/* [iid_is][out] */ void **ppvObject);
|
||||
|
||||
ULONG ( STDMETHODCALLTYPE *AddRef )(
|
||||
IAudioStreamSample * This);
|
||||
|
||||
ULONG ( STDMETHODCALLTYPE *Release )(
|
||||
IAudioStreamSample * This);
|
||||
|
||||
HRESULT ( STDMETHODCALLTYPE *GetMediaStream )(
|
||||
IAudioStreamSample * This,
|
||||
/* [in] */ IMediaStream **ppMediaStream);
|
||||
|
||||
HRESULT ( STDMETHODCALLTYPE *GetSampleTimes )(
|
||||
IAudioStreamSample * This,
|
||||
/* [out] */ STREAM_TIME *pStartTime,
|
||||
/* [out] */ STREAM_TIME *pEndTime,
|
||||
/* [out] */ STREAM_TIME *pCurrentTime);
|
||||
|
||||
HRESULT ( STDMETHODCALLTYPE *SetSampleTimes )(
|
||||
IAudioStreamSample * This,
|
||||
/* [in] */ const STREAM_TIME *pStartTime,
|
||||
/* [in] */ const STREAM_TIME *pEndTime);
|
||||
|
||||
HRESULT ( STDMETHODCALLTYPE *Update )(
|
||||
IAudioStreamSample * This,
|
||||
/* [in] */ DWORD dwFlags,
|
||||
/* [in] */ HANDLE hEvent,
|
||||
/* [in] */ PAPCFUNC pfnAPC,
|
||||
/* [in] */ DWORD_PTR dwAPCData);
|
||||
|
||||
HRESULT ( STDMETHODCALLTYPE *CompletionStatus )(
|
||||
IAudioStreamSample * This,
|
||||
/* [in] */ DWORD dwFlags,
|
||||
/* [in] */ DWORD dwMilliseconds);
|
||||
|
||||
HRESULT ( STDMETHODCALLTYPE *GetAudioData )(
|
||||
IAudioStreamSample * This,
|
||||
/* [out] */ IAudioData **ppAudio);
|
||||
|
||||
END_INTERFACE
|
||||
} IAudioStreamSampleVtbl;
|
||||
|
||||
interface IAudioStreamSample
|
||||
{
|
||||
CONST_VTBL struct IAudioStreamSampleVtbl *lpVtbl;
|
||||
};
|
||||
|
||||
|
||||
|
||||
#ifdef COBJMACROS
|
||||
|
||||
|
||||
#define IAudioStreamSample_QueryInterface(This,riid,ppvObject) \
|
||||
(This)->lpVtbl -> QueryInterface(This,riid,ppvObject)
|
||||
|
||||
#define IAudioStreamSample_AddRef(This) \
|
||||
(This)->lpVtbl -> AddRef(This)
|
||||
|
||||
#define IAudioStreamSample_Release(This) \
|
||||
(This)->lpVtbl -> Release(This)
|
||||
|
||||
|
||||
#define IAudioStreamSample_GetMediaStream(This,ppMediaStream) \
|
||||
(This)->lpVtbl -> GetMediaStream(This,ppMediaStream)
|
||||
|
||||
#define IAudioStreamSample_GetSampleTimes(This,pStartTime,pEndTime,pCurrentTime) \
|
||||
(This)->lpVtbl -> GetSampleTimes(This,pStartTime,pEndTime,pCurrentTime)
|
||||
|
||||
#define IAudioStreamSample_SetSampleTimes(This,pStartTime,pEndTime) \
|
||||
(This)->lpVtbl -> SetSampleTimes(This,pStartTime,pEndTime)
|
||||
|
||||
#define IAudioStreamSample_Update(This,dwFlags,hEvent,pfnAPC,dwAPCData) \
|
||||
(This)->lpVtbl -> Update(This,dwFlags,hEvent,pfnAPC,dwAPCData)
|
||||
|
||||
#define IAudioStreamSample_CompletionStatus(This,dwFlags,dwMilliseconds) \
|
||||
(This)->lpVtbl -> CompletionStatus(This,dwFlags,dwMilliseconds)
|
||||
|
||||
|
||||
#define IAudioStreamSample_GetAudioData(This,ppAudio) \
|
||||
(This)->lpVtbl -> GetAudioData(This,ppAudio)
|
||||
|
||||
#endif /* COBJMACROS */
|
||||
|
||||
|
||||
#endif /* C style interface */
|
||||
|
||||
|
||||
|
||||
HRESULT STDMETHODCALLTYPE IAudioStreamSample_GetAudioData_Proxy(
|
||||
IAudioStreamSample * This,
|
||||
/* [out] */ IAudioData **ppAudio);
|
||||
|
||||
|
||||
void __RPC_STUB IAudioStreamSample_GetAudioData_Stub(
|
||||
IRpcStubBuffer *This,
|
||||
IRpcChannelBuffer *_pRpcChannelBuffer,
|
||||
PRPC_MESSAGE _pRpcMessage,
|
||||
DWORD *_pdwStubPhase);
|
||||
|
||||
|
||||
|
||||
#endif /* __IAudioStreamSample_INTERFACE_DEFINED__ */
|
||||
|
||||
|
||||
#ifndef __IMemoryData_INTERFACE_DEFINED__
|
||||
#define __IMemoryData_INTERFACE_DEFINED__
|
||||
|
||||
/* interface IMemoryData */
|
||||
/* [unique][uuid][local][object] */
|
||||
|
||||
|
||||
EXTERN_C const IID IID_IMemoryData;
|
||||
|
||||
#if defined(__cplusplus) && !defined(CINTERFACE)
|
||||
|
||||
MIDL_INTERFACE("327fc560-af60-11d0-8212-00c04fc32c45")
|
||||
IMemoryData : public IUnknown
|
||||
{
|
||||
public:
|
||||
virtual HRESULT STDMETHODCALLTYPE SetBuffer(
|
||||
/* [in] */ DWORD cbSize,
|
||||
/* [in] */ BYTE *pbData,
|
||||
/* [in] */ DWORD dwFlags) = 0;
|
||||
|
||||
virtual HRESULT STDMETHODCALLTYPE GetInfo(
|
||||
/* [out] */ DWORD *pdwLength,
|
||||
/* [out] */ BYTE **ppbData,
|
||||
/* [out] */ DWORD *pcbActualData) = 0;
|
||||
|
||||
virtual HRESULT STDMETHODCALLTYPE SetActual(
|
||||
/* [in] */ DWORD cbDataValid) = 0;
|
||||
|
||||
};
|
||||
|
||||
#else /* C style interface */
|
||||
|
||||
typedef struct IMemoryDataVtbl
|
||||
{
|
||||
BEGIN_INTERFACE
|
||||
|
||||
HRESULT ( STDMETHODCALLTYPE *QueryInterface )(
|
||||
IMemoryData * This,
|
||||
/* [in] */ REFIID riid,
|
||||
/* [iid_is][out] */ void **ppvObject);
|
||||
|
||||
ULONG ( STDMETHODCALLTYPE *AddRef )(
|
||||
IMemoryData * This);
|
||||
|
||||
ULONG ( STDMETHODCALLTYPE *Release )(
|
||||
IMemoryData * This);
|
||||
|
||||
HRESULT ( STDMETHODCALLTYPE *SetBuffer )(
|
||||
IMemoryData * This,
|
||||
/* [in] */ DWORD cbSize,
|
||||
/* [in] */ BYTE *pbData,
|
||||
/* [in] */ DWORD dwFlags);
|
||||
|
||||
HRESULT ( STDMETHODCALLTYPE *GetInfo )(
|
||||
IMemoryData * This,
|
||||
/* [out] */ DWORD *pdwLength,
|
||||
/* [out] */ BYTE **ppbData,
|
||||
/* [out] */ DWORD *pcbActualData);
|
||||
|
||||
HRESULT ( STDMETHODCALLTYPE *SetActual )(
|
||||
IMemoryData * This,
|
||||
/* [in] */ DWORD cbDataValid);
|
||||
|
||||
END_INTERFACE
|
||||
} IMemoryDataVtbl;
|
||||
|
||||
interface IMemoryData
|
||||
{
|
||||
CONST_VTBL struct IMemoryDataVtbl *lpVtbl;
|
||||
};
|
||||
|
||||
|
||||
|
||||
#ifdef COBJMACROS
|
||||
|
||||
|
||||
#define IMemoryData_QueryInterface(This,riid,ppvObject) \
|
||||
(This)->lpVtbl -> QueryInterface(This,riid,ppvObject)
|
||||
|
||||
#define IMemoryData_AddRef(This) \
|
||||
(This)->lpVtbl -> AddRef(This)
|
||||
|
||||
#define IMemoryData_Release(This) \
|
||||
(This)->lpVtbl -> Release(This)
|
||||
|
||||
|
||||
#define IMemoryData_SetBuffer(This,cbSize,pbData,dwFlags) \
|
||||
(This)->lpVtbl -> SetBuffer(This,cbSize,pbData,dwFlags)
|
||||
|
||||
#define IMemoryData_GetInfo(This,pdwLength,ppbData,pcbActualData) \
|
||||
(This)->lpVtbl -> GetInfo(This,pdwLength,ppbData,pcbActualData)
|
||||
|
||||
#define IMemoryData_SetActual(This,cbDataValid) \
|
||||
(This)->lpVtbl -> SetActual(This,cbDataValid)
|
||||
|
||||
#endif /* COBJMACROS */
|
||||
|
||||
|
||||
#endif /* C style interface */
|
||||
|
||||
|
||||
|
||||
HRESULT STDMETHODCALLTYPE IMemoryData_SetBuffer_Proxy(
|
||||
IMemoryData * This,
|
||||
/* [in] */ DWORD cbSize,
|
||||
/* [in] */ BYTE *pbData,
|
||||
/* [in] */ DWORD dwFlags);
|
||||
|
||||
|
||||
void __RPC_STUB IMemoryData_SetBuffer_Stub(
|
||||
IRpcStubBuffer *This,
|
||||
IRpcChannelBuffer *_pRpcChannelBuffer,
|
||||
PRPC_MESSAGE _pRpcMessage,
|
||||
DWORD *_pdwStubPhase);
|
||||
|
||||
|
||||
HRESULT STDMETHODCALLTYPE IMemoryData_GetInfo_Proxy(
|
||||
IMemoryData * This,
|
||||
/* [out] */ DWORD *pdwLength,
|
||||
/* [out] */ BYTE **ppbData,
|
||||
/* [out] */ DWORD *pcbActualData);
|
||||
|
||||
|
||||
void __RPC_STUB IMemoryData_GetInfo_Stub(
|
||||
IRpcStubBuffer *This,
|
||||
IRpcChannelBuffer *_pRpcChannelBuffer,
|
||||
PRPC_MESSAGE _pRpcMessage,
|
||||
DWORD *_pdwStubPhase);
|
||||
|
||||
|
||||
HRESULT STDMETHODCALLTYPE IMemoryData_SetActual_Proxy(
|
||||
IMemoryData * This,
|
||||
/* [in] */ DWORD cbDataValid);
|
||||
|
||||
|
||||
void __RPC_STUB IMemoryData_SetActual_Stub(
|
||||
IRpcStubBuffer *This,
|
||||
IRpcChannelBuffer *_pRpcChannelBuffer,
|
||||
PRPC_MESSAGE _pRpcMessage,
|
||||
DWORD *_pdwStubPhase);
|
||||
|
||||
|
||||
|
||||
#endif /* __IMemoryData_INTERFACE_DEFINED__ */
|
||||
|
||||
|
||||
#ifndef __IAudioData_INTERFACE_DEFINED__
|
||||
#define __IAudioData_INTERFACE_DEFINED__
|
||||
|
||||
/* interface IAudioData */
|
||||
/* [unique][uuid][local][object] */
|
||||
|
||||
|
||||
EXTERN_C const IID IID_IAudioData;
|
||||
|
||||
#if defined(__cplusplus) && !defined(CINTERFACE)
|
||||
|
||||
MIDL_INTERFACE("54c719c0-af60-11d0-8212-00c04fc32c45")
|
||||
IAudioData : public IMemoryData
|
||||
{
|
||||
public:
|
||||
virtual HRESULT STDMETHODCALLTYPE GetFormat(
|
||||
/* [out] */ WAVEFORMATEX *pWaveFormatCurrent) = 0;
|
||||
|
||||
virtual HRESULT STDMETHODCALLTYPE SetFormat(
|
||||
/* [in] */ const WAVEFORMATEX *lpWaveFormat) = 0;
|
||||
|
||||
};
|
||||
|
||||
#else /* C style interface */
|
||||
|
||||
typedef struct IAudioDataVtbl
|
||||
{
|
||||
BEGIN_INTERFACE
|
||||
|
||||
HRESULT ( STDMETHODCALLTYPE *QueryInterface )(
|
||||
IAudioData * This,
|
||||
/* [in] */ REFIID riid,
|
||||
/* [iid_is][out] */ void **ppvObject);
|
||||
|
||||
ULONG ( STDMETHODCALLTYPE *AddRef )(
|
||||
IAudioData * This);
|
||||
|
||||
ULONG ( STDMETHODCALLTYPE *Release )(
|
||||
IAudioData * This);
|
||||
|
||||
HRESULT ( STDMETHODCALLTYPE *SetBuffer )(
|
||||
IAudioData * This,
|
||||
/* [in] */ DWORD cbSize,
|
||||
/* [in] */ BYTE *pbData,
|
||||
/* [in] */ DWORD dwFlags);
|
||||
|
||||
HRESULT ( STDMETHODCALLTYPE *GetInfo )(
|
||||
IAudioData * This,
|
||||
/* [out] */ DWORD *pdwLength,
|
||||
/* [out] */ BYTE **ppbData,
|
||||
/* [out] */ DWORD *pcbActualData);
|
||||
|
||||
HRESULT ( STDMETHODCALLTYPE *SetActual )(
|
||||
IAudioData * This,
|
||||
/* [in] */ DWORD cbDataValid);
|
||||
|
||||
HRESULT ( STDMETHODCALLTYPE *GetFormat )(
|
||||
IAudioData * This,
|
||||
/* [out] */ WAVEFORMATEX *pWaveFormatCurrent);
|
||||
|
||||
HRESULT ( STDMETHODCALLTYPE *SetFormat )(
|
||||
IAudioData * This,
|
||||
/* [in] */ const WAVEFORMATEX *lpWaveFormat);
|
||||
|
||||
END_INTERFACE
|
||||
} IAudioDataVtbl;
|
||||
|
||||
interface IAudioData
|
||||
{
|
||||
CONST_VTBL struct IAudioDataVtbl *lpVtbl;
|
||||
};
|
||||
|
||||
|
||||
|
||||
#ifdef COBJMACROS
|
||||
|
||||
|
||||
#define IAudioData_QueryInterface(This,riid,ppvObject) \
|
||||
(This)->lpVtbl -> QueryInterface(This,riid,ppvObject)
|
||||
|
||||
#define IAudioData_AddRef(This) \
|
||||
(This)->lpVtbl -> AddRef(This)
|
||||
|
||||
#define IAudioData_Release(This) \
|
||||
(This)->lpVtbl -> Release(This)
|
||||
|
||||
|
||||
#define IAudioData_SetBuffer(This,cbSize,pbData,dwFlags) \
|
||||
(This)->lpVtbl -> SetBuffer(This,cbSize,pbData,dwFlags)
|
||||
|
||||
#define IAudioData_GetInfo(This,pdwLength,ppbData,pcbActualData) \
|
||||
(This)->lpVtbl -> GetInfo(This,pdwLength,ppbData,pcbActualData)
|
||||
|
||||
#define IAudioData_SetActual(This,cbDataValid) \
|
||||
(This)->lpVtbl -> SetActual(This,cbDataValid)
|
||||
|
||||
|
||||
#define IAudioData_GetFormat(This,pWaveFormatCurrent) \
|
||||
(This)->lpVtbl -> GetFormat(This,pWaveFormatCurrent)
|
||||
|
||||
#define IAudioData_SetFormat(This,lpWaveFormat) \
|
||||
(This)->lpVtbl -> SetFormat(This,lpWaveFormat)
|
||||
|
||||
#endif /* COBJMACROS */
|
||||
|
||||
|
||||
#endif /* C style interface */
|
||||
|
||||
|
||||
|
||||
HRESULT STDMETHODCALLTYPE IAudioData_GetFormat_Proxy(
|
||||
IAudioData * This,
|
||||
/* [out] */ WAVEFORMATEX *pWaveFormatCurrent);
|
||||
|
||||
|
||||
void __RPC_STUB IAudioData_GetFormat_Stub(
|
||||
IRpcStubBuffer *This,
|
||||
IRpcChannelBuffer *_pRpcChannelBuffer,
|
||||
PRPC_MESSAGE _pRpcMessage,
|
||||
DWORD *_pdwStubPhase);
|
||||
|
||||
|
||||
HRESULT STDMETHODCALLTYPE IAudioData_SetFormat_Proxy(
|
||||
IAudioData * This,
|
||||
/* [in] */ const WAVEFORMATEX *lpWaveFormat);
|
||||
|
||||
|
||||
void __RPC_STUB IAudioData_SetFormat_Stub(
|
||||
IRpcStubBuffer *This,
|
||||
IRpcChannelBuffer *_pRpcChannelBuffer,
|
||||
PRPC_MESSAGE _pRpcMessage,
|
||||
DWORD *_pdwStubPhase);
|
||||
|
||||
|
||||
|
||||
#endif /* __IAudioData_INTERFACE_DEFINED__ */
|
||||
|
||||
|
||||
/* Additional Prototypes for ALL interfaces */
|
||||
|
||||
/* end of Additional Prototypes */
|
||||
|
||||
#ifdef __cplusplus
|
||||
}
|
||||
#endif
|
||||
|
||||
#endif
|
||||
|
||||
|
|
@ -0,0 +1,402 @@
|
|||
//------------------------------------------------------------------------------
|
||||
// File: AVIRIFF.h
|
||||
//
|
||||
// Desc: Structures and defines for the RIFF AVI file format extended to
|
||||
// handle very large/long files.
|
||||
//
|
||||
// Copyright (c) 1996 - 2000, Microsoft Corporation. All rights reserved.
|
||||
//------------------------------------------------------------------------------
|
||||
|
||||
|
||||
#pragma warning(disable: 4097 4511 4512 4514 4705)
|
||||
|
||||
|
||||
#if !defined AVIRIFF_H
|
||||
#define AVIRIFF_H
|
||||
|
||||
#if !defined NUMELMS
|
||||
#define NUMELMS(aa) (sizeof(aa)/sizeof((aa)[0]))
|
||||
#endif
|
||||
|
||||
// all structures in this file are packed on word boundaries
|
||||
//
|
||||
#include <pshpack2.h>
|
||||
|
||||
/*
|
||||
* heres the general layout of an AVI riff file (new format)
|
||||
*
|
||||
* RIFF (3F??????) AVI <- not more than 1 GB in size
|
||||
* LIST (size) hdrl
|
||||
* avih (0038)
|
||||
* LIST (size) strl
|
||||
* strh (0038)
|
||||
* strf (????)
|
||||
* indx (3ff8) <- size may vary, should be sector sized
|
||||
* LIST (size) strl
|
||||
* strh (0038)
|
||||
* strf (????)
|
||||
* indx (3ff8) <- size may vary, should be sector sized
|
||||
* LIST (size) odml
|
||||
* dmlh (????)
|
||||
* JUNK (size) <- fill to align to sector - 12
|
||||
* LIST (7f??????) movi <- aligned on sector - 12
|
||||
* 00dc (size) <- sector aligned
|
||||
* 01wb (size) <- sector aligned
|
||||
* ix00 (size) <- sector aligned
|
||||
* idx1 (00??????) <- sector aligned
|
||||
* RIFF (7F??????) AVIX
|
||||
* JUNK (size) <- fill to align to sector -12
|
||||
* LIST (size) movi
|
||||
* 00dc (size) <- sector aligned
|
||||
* RIFF (7F??????) AVIX <- not more than 2GB in size
|
||||
* JUNK (size) <- fill to align to sector - 12
|
||||
* LIST (size) movi
|
||||
* 00dc (size) <- sector aligned
|
||||
*
|
||||
*-===================================================================*/
|
||||
|
||||
//
|
||||
// structures for manipulating RIFF headers
|
||||
//
|
||||
#define FCC(ch4) ((((DWORD)(ch4) & 0xFF) << 24) | \
|
||||
(((DWORD)(ch4) & 0xFF00) << 8) | \
|
||||
(((DWORD)(ch4) & 0xFF0000) >> 8) | \
|
||||
(((DWORD)(ch4) & 0xFF000000) >> 24))
|
||||
|
||||
typedef struct _riffchunk {
|
||||
FOURCC fcc;
|
||||
DWORD cb;
|
||||
} RIFFCHUNK, * LPRIFFCHUNK;
|
||||
typedef struct _rifflist {
|
||||
FOURCC fcc;
|
||||
DWORD cb;
|
||||
FOURCC fccListType;
|
||||
} RIFFLIST, * LPRIFFLIST;
|
||||
|
||||
#define RIFFROUND(cb) ((cb) + ((cb)&1))
|
||||
#define RIFFNEXT(pChunk) (LPRIFFCHUNK)((LPBYTE)(pChunk) \
|
||||
+ sizeof(RIFFCHUNK) \
|
||||
+ RIFFROUND(((LPRIFFCHUNK)pChunk)->cb))
|
||||
|
||||
|
||||
//
|
||||
// ==================== avi header structures ===========================
|
||||
//
|
||||
|
||||
// main header for the avi file (compatibility header)
|
||||
//
|
||||
#define ckidMAINAVIHEADER FCC('avih')
|
||||
typedef struct _avimainheader {
|
||||
FOURCC fcc; // 'avih'
|
||||
DWORD cb; // size of this structure -8
|
||||
DWORD dwMicroSecPerFrame; // frame display rate (or 0L)
|
||||
DWORD dwMaxBytesPerSec; // max. transfer rate
|
||||
DWORD dwPaddingGranularity; // pad to multiples of this size; normally 2K.
|
||||
DWORD dwFlags; // the ever-present flags
|
||||
#define AVIF_HASINDEX 0x00000010 // Index at end of file?
|
||||
#define AVIF_MUSTUSEINDEX 0x00000020
|
||||
#define AVIF_ISINTERLEAVED 0x00000100
|
||||
#define AVIF_TRUSTCKTYPE 0x00000800 // Use CKType to find key frames
|
||||
#define AVIF_WASCAPTUREFILE 0x00010000
|
||||
#define AVIF_COPYRIGHTED 0x00020000
|
||||
DWORD dwTotalFrames; // # frames in first movi list
|
||||
DWORD dwInitialFrames;
|
||||
DWORD dwStreams;
|
||||
DWORD dwSuggestedBufferSize;
|
||||
DWORD dwWidth;
|
||||
DWORD dwHeight;
|
||||
DWORD dwReserved[4];
|
||||
} AVIMAINHEADER;
|
||||
|
||||
#define ckidODML FCC('odml')
|
||||
#define ckidAVIEXTHEADER FCC('dmlh')
|
||||
typedef struct _aviextheader {
|
||||
FOURCC fcc; // 'dmlh'
|
||||
DWORD cb; // size of this structure -8
|
||||
DWORD dwGrandFrames; // total number of frames in the file
|
||||
DWORD dwFuture[61]; // to be defined later
|
||||
} AVIEXTHEADER;
|
||||
|
||||
//
|
||||
// structure of an AVI stream header riff chunk
|
||||
//
|
||||
#define ckidSTREAMLIST FCC('strl')
|
||||
|
||||
#ifndef ckidSTREAMHEADER
|
||||
#define ckidSTREAMHEADER FCC('strh')
|
||||
#endif
|
||||
typedef struct _avistreamheader {
|
||||
FOURCC fcc; // 'strh'
|
||||
DWORD cb; // size of this structure - 8
|
||||
|
||||
FOURCC fccType; // stream type codes
|
||||
|
||||
#ifndef streamtypeVIDEO
|
||||
#define streamtypeVIDEO FCC('vids')
|
||||
#define streamtypeAUDIO FCC('auds')
|
||||
#define streamtypeMIDI FCC('mids')
|
||||
#define streamtypeTEXT FCC('txts')
|
||||
#endif
|
||||
|
||||
FOURCC fccHandler;
|
||||
DWORD dwFlags;
|
||||
#define AVISF_DISABLED 0x00000001
|
||||
#define AVISF_VIDEO_PALCHANGES 0x00010000
|
||||
|
||||
WORD wPriority;
|
||||
WORD wLanguage;
|
||||
DWORD dwInitialFrames;
|
||||
DWORD dwScale;
|
||||
DWORD dwRate; // dwRate/dwScale is stream tick rate in ticks/sec
|
||||
DWORD dwStart;
|
||||
DWORD dwLength;
|
||||
DWORD dwSuggestedBufferSize;
|
||||
DWORD dwQuality;
|
||||
DWORD dwSampleSize;
|
||||
struct {
|
||||
short int left;
|
||||
short int top;
|
||||
short int right;
|
||||
short int bottom;
|
||||
} rcFrame;
|
||||
} AVISTREAMHEADER;
|
||||
|
||||
|
||||
//
|
||||
// structure of an AVI stream format chunk
|
||||
//
|
||||
#ifndef ckidSTREAMFORMAT
|
||||
#define ckidSTREAMFORMAT FCC('strf')
|
||||
#endif
|
||||
//
|
||||
// avi stream formats are different for each stream type
|
||||
//
|
||||
// BITMAPINFOHEADER for video streams
|
||||
// WAVEFORMATEX or PCMWAVEFORMAT for audio streams
|
||||
// nothing for text streams
|
||||
// nothing for midi streams
|
||||
|
||||
|
||||
#pragma warning(disable:4200)
|
||||
//
|
||||
// structure of old style AVI index
|
||||
//
|
||||
#define ckidAVIOLDINDEX FCC('idx1')
|
||||
typedef struct _avioldindex {
|
||||
FOURCC fcc; // 'idx1'
|
||||
DWORD cb; // size of this structure -8
|
||||
struct _avioldindex_entry {
|
||||
DWORD dwChunkId;
|
||||
DWORD dwFlags;
|
||||
|
||||
#ifndef AVIIF_LIST
|
||||
#define AVIIF_LIST 0x00000001
|
||||
#define AVIIF_KEYFRAME 0x00000010
|
||||
#endif
|
||||
|
||||
#define AVIIF_NO_TIME 0x00000100
|
||||
#define AVIIF_COMPRESSOR 0x0FFF0000 // unused?
|
||||
DWORD dwOffset; // offset of riff chunk header for the data
|
||||
DWORD dwSize; // size of the data (excluding riff header size)
|
||||
} aIndex[]; // size of this array
|
||||
} AVIOLDINDEX;
|
||||
|
||||
|
||||
//
|
||||
// ============ structures for timecode in an AVI file =================
|
||||
//
|
||||
|
||||
#ifndef TIMECODE_DEFINED
|
||||
#define TIMECODE_DEFINED
|
||||
|
||||
// defined
|
||||
// timecode time structure
|
||||
//
|
||||
typedef union _timecode {
|
||||
struct {
|
||||
WORD wFrameRate;
|
||||
WORD wFrameFract;
|
||||
LONG cFrames;
|
||||
};
|
||||
DWORDLONG qw;
|
||||
} TIMECODE;
|
||||
|
||||
#endif // TIMECODE_DEFINED
|
||||
|
||||
#define TIMECODE_RATE_30DROP 0 // this MUST be zero
|
||||
|
||||
// struct for all the SMPTE timecode info
|
||||
//
|
||||
typedef struct _timecodedata {
|
||||
TIMECODE time;
|
||||
DWORD dwSMPTEflags;
|
||||
DWORD dwUser;
|
||||
} TIMECODEDATA;
|
||||
|
||||
// dwSMPTEflags masks/values
|
||||
//
|
||||
#define TIMECODE_SMPTE_BINARY_GROUP 0x07
|
||||
#define TIMECODE_SMPTE_COLOR_FRAME 0x08
|
||||
|
||||
//
|
||||
// ============ structures for new style AVI indexes =================
|
||||
//
|
||||
|
||||
// index type codes
|
||||
//
|
||||
#define AVI_INDEX_OF_INDEXES 0x00
|
||||
#define AVI_INDEX_OF_CHUNKS 0x01
|
||||
#define AVI_INDEX_OF_TIMED_CHUNKS 0x02
|
||||
#define AVI_INDEX_OF_SUB_2FIELD 0x03
|
||||
#define AVI_INDEX_IS_DATA 0x80
|
||||
|
||||
// index subtype codes
|
||||
//
|
||||
#define AVI_INDEX_SUB_DEFAULT 0x00
|
||||
|
||||
// INDEX_OF_CHUNKS subtype codes
|
||||
//
|
||||
#define AVI_INDEX_SUB_2FIELD 0x01
|
||||
|
||||
// meta structure of all avi indexes
|
||||
//
|
||||
typedef struct _avimetaindex {
|
||||
FOURCC fcc;
|
||||
UINT cb;
|
||||
WORD wLongsPerEntry;
|
||||
BYTE bIndexSubType;
|
||||
BYTE bIndexType;
|
||||
DWORD nEntriesInUse;
|
||||
DWORD dwChunkId;
|
||||
DWORD dwReserved[3];
|
||||
DWORD adwIndex[];
|
||||
} AVIMETAINDEX;
|
||||
|
||||
#define STDINDEXSIZE 0x4000
|
||||
#define NUMINDEX(wLongsPerEntry) ((STDINDEXSIZE-32)/4/(wLongsPerEntry))
|
||||
#define NUMINDEXFILL(wLongsPerEntry) ((STDINDEXSIZE/4) - NUMINDEX(wLongsPerEntry))
|
||||
|
||||
// structure of a super index (INDEX_OF_INDEXES)
|
||||
//
|
||||
#define ckidAVISUPERINDEX FCC('indx')
|
||||
typedef struct _avisuperindex {
|
||||
FOURCC fcc; // 'indx'
|
||||
UINT cb; // size of this structure
|
||||
WORD wLongsPerEntry; // ==4
|
||||
BYTE bIndexSubType; // ==0 (frame index) or AVI_INDEX_SUB_2FIELD
|
||||
BYTE bIndexType; // ==AVI_INDEX_OF_INDEXES
|
||||
DWORD nEntriesInUse; // offset of next unused entry in aIndex
|
||||
DWORD dwChunkId; // chunk ID of chunks being indexed, (i.e. RGB8)
|
||||
DWORD dwReserved[3]; // must be 0
|
||||
struct _avisuperindex_entry {
|
||||
DWORDLONG qwOffset; // 64 bit offset to sub index chunk
|
||||
DWORD dwSize; // 32 bit size of sub index chunk
|
||||
DWORD dwDuration; // time span of subindex chunk (in stream ticks)
|
||||
} aIndex[NUMINDEX(4)];
|
||||
} AVISUPERINDEX;
|
||||
#define Valid_SUPERINDEX(pi) (*(DWORD *)(&((pi)->wLongsPerEntry)) == (4 | (AVI_INDEX_OF_INDEXES << 24)))
|
||||
|
||||
// struct of a standard index (AVI_INDEX_OF_CHUNKS)
|
||||
//
|
||||
typedef struct _avistdindex_entry {
|
||||
DWORD dwOffset; // 32 bit offset to data (points to data, not riff header)
|
||||
DWORD dwSize; // 31 bit size of data (does not include size of riff header), bit 31 is deltaframe bit
|
||||
} AVISTDINDEX_ENTRY;
|
||||
#define AVISTDINDEX_DELTAFRAME ( 0x80000000) // Delta frames have the high bit set
|
||||
#define AVISTDINDEX_SIZEMASK (~0x80000000)
|
||||
|
||||
typedef struct _avistdindex {
|
||||
FOURCC fcc; // 'indx' or '##ix'
|
||||
UINT cb; // size of this structure
|
||||
WORD wLongsPerEntry; // ==2
|
||||
BYTE bIndexSubType; // ==0
|
||||
BYTE bIndexType; // ==AVI_INDEX_OF_CHUNKS
|
||||
DWORD nEntriesInUse; // offset of next unused entry in aIndex
|
||||
DWORD dwChunkId; // chunk ID of chunks being indexed, (i.e. RGB8)
|
||||
DWORDLONG qwBaseOffset; // base offset that all index intries are relative to
|
||||
DWORD dwReserved_3; // must be 0
|
||||
AVISTDINDEX_ENTRY aIndex[NUMINDEX(2)];
|
||||
} AVISTDINDEX;
|
||||
|
||||
// struct of a time variant standard index (AVI_INDEX_OF_TIMED_CHUNKS)
|
||||
//
|
||||
typedef struct _avitimedindex_entry {
|
||||
DWORD dwOffset; // 32 bit offset to data (points to data, not riff header)
|
||||
DWORD dwSize; // 31 bit size of data (does not include size of riff header) (high bit is deltaframe bit)
|
||||
DWORD dwDuration; // how much time the chunk should be played (in stream ticks)
|
||||
} AVITIMEDINDEX_ENTRY;
|
||||
|
||||
typedef struct _avitimedindex {
|
||||
FOURCC fcc; // 'indx' or '##ix'
|
||||
UINT cb; // size of this structure
|
||||
WORD wLongsPerEntry; // ==3
|
||||
BYTE bIndexSubType; // ==0
|
||||
BYTE bIndexType; // ==AVI_INDEX_OF_TIMED_CHUNKS
|
||||
DWORD nEntriesInUse; // offset of next unused entry in aIndex
|
||||
DWORD dwChunkId; // chunk ID of chunks being indexed, (i.e. RGB8)
|
||||
DWORDLONG qwBaseOffset; // base offset that all index intries are relative to
|
||||
DWORD dwReserved_3; // must be 0
|
||||
AVITIMEDINDEX_ENTRY aIndex[NUMINDEX(3)];
|
||||
DWORD adwTrailingFill[NUMINDEXFILL(3)]; // to align struct to correct size
|
||||
} AVITIMEDINDEX;
|
||||
|
||||
// structure of a timecode stream
|
||||
//
|
||||
typedef struct _avitimecodeindex {
|
||||
FOURCC fcc; // 'indx' or '##ix'
|
||||
UINT cb; // size of this structure
|
||||
WORD wLongsPerEntry; // ==4
|
||||
BYTE bIndexSubType; // ==0
|
||||
BYTE bIndexType; // ==AVI_INDEX_IS_DATA
|
||||
DWORD nEntriesInUse; // offset of next unused entry in aIndex
|
||||
DWORD dwChunkId; // 'time'
|
||||
DWORD dwReserved[3]; // must be 0
|
||||
TIMECODEDATA aIndex[NUMINDEX(sizeof(TIMECODEDATA)/sizeof(LONG))];
|
||||
} AVITIMECODEINDEX;
|
||||
|
||||
// structure of a timecode discontinuity list (when wLongsPerEntry == 7)
|
||||
//
|
||||
typedef struct _avitcdlindex_entry {
|
||||
DWORD dwTick; // stream tick time that maps to this timecode value
|
||||
TIMECODE time;
|
||||
DWORD dwSMPTEflags;
|
||||
DWORD dwUser;
|
||||
TCHAR szReelId[12];
|
||||
} AVITCDLINDEX_ENTRY;
|
||||
|
||||
typedef struct _avitcdlindex {
|
||||
FOURCC fcc; // 'indx' or '##ix'
|
||||
UINT cb; // size of this structure
|
||||
WORD wLongsPerEntry; // ==7 (must be 4 or more all 'tcdl' indexes
|
||||
BYTE bIndexSubType; // ==0
|
||||
BYTE bIndexType; // ==AVI_INDEX_IS_DATA
|
||||
DWORD nEntriesInUse; // offset of next unused entry in aIndex
|
||||
DWORD dwChunkId; // 'tcdl'
|
||||
DWORD dwReserved[3]; // must be 0
|
||||
AVITCDLINDEX_ENTRY aIndex[NUMINDEX(7)];
|
||||
DWORD adwTrailingFill[NUMINDEXFILL(7)]; // to align struct to correct size
|
||||
} AVITCDLINDEX;
|
||||
|
||||
typedef struct _avifieldindex_chunk {
|
||||
FOURCC fcc; // 'ix##'
|
||||
DWORD cb; // size of this structure
|
||||
WORD wLongsPerEntry; // must be 3 (size of each entry in
|
||||
// aIndex array)
|
||||
BYTE bIndexSubType; // AVI_INDEX_2FIELD
|
||||
BYTE bIndexType; // AVI_INDEX_OF_CHUNKS
|
||||
DWORD nEntriesInUse; //
|
||||
DWORD dwChunkId; // '##dc' or '##db'
|
||||
DWORDLONG qwBaseOffset; // offsets in aIndex array are relative to this
|
||||
DWORD dwReserved3; // must be 0
|
||||
struct _avifieldindex_entry {
|
||||
DWORD dwOffset;
|
||||
DWORD dwSize; // size of all fields
|
||||
// (bit 31 set for NON-keyframes)
|
||||
DWORD dwOffsetField2; // offset to second field
|
||||
} aIndex[ ];
|
||||
} AVIFIELDINDEX, * PAVIFIELDINDEX;
|
||||
|
||||
|
||||
#include <poppack.h>
|
||||
|
||||
#endif
|
File diff suppressed because it is too large
Load Diff
File diff suppressed because it is too large
Load Diff
|
@ -0,0 +1,585 @@
|
|||
//------------------------------------------------------------------------------
|
||||
// File: BDATypes.h
|
||||
//
|
||||
// Desc: Typedefs and enums needed by both the WDM drivers and the user mode
|
||||
// COM interfaces.
|
||||
//
|
||||
// Copyright (c) 1999 - 2000, Microsoft Corporation. All rights reserved.
|
||||
//------------------------------------------------------------------------------
|
||||
|
||||
|
||||
#ifndef _BDATYPES_
|
||||
|
||||
#define _BDATYPES_ 1
|
||||
|
||||
/* Utility Macros */
|
||||
|
||||
#define MIN_DIMENSION 1
|
||||
#define NATURAL 4
|
||||
#define CACHE_LINE 128
|
||||
#define PAGE 4096
|
||||
#define ALIGN( pointer, size) (((ULONG)(pointer) + (ULONG)(size) - 1) & ~((ULONG)(size) - 1))
|
||||
#define BDA_STRING_CONST(x) {sizeof(L##x)-2, sizeof(L##x), L##x}
|
||||
|
||||
|
||||
#ifdef __midl
|
||||
#define V1_ENUM [v1_enum]
|
||||
#else
|
||||
#define V1_ENUM
|
||||
#endif
|
||||
|
||||
//===========================================================================
|
||||
//
|
||||
// BDA Topology Structures
|
||||
//
|
||||
//===========================================================================
|
||||
|
||||
typedef struct _BDA_TEMPLATE_CONNECTION
|
||||
{
|
||||
ULONG FromNodeType;
|
||||
ULONG FromNodePinType;
|
||||
ULONG ToNodeType;
|
||||
ULONG ToNodePinType;
|
||||
}BDA_TEMPLATE_CONNECTION, *PBDA_TEMPLATE_CONNECTION;
|
||||
|
||||
|
||||
typedef struct _BDA_TEMPLATE_PIN_JOINT
|
||||
{
|
||||
ULONG uliTemplateConnection;
|
||||
ULONG ulcInstancesMax;
|
||||
}BDA_TEMPLATE_PIN_JOINT, *PBDA_TEMPLATE_PIN_JOINT;
|
||||
|
||||
|
||||
|
||||
//===========================================================================
|
||||
//
|
||||
// BDA Events
|
||||
//
|
||||
//===========================================================================
|
||||
|
||||
// In-band Event IDs
|
||||
//
|
||||
typedef enum {
|
||||
BDA_EVENT_SIGNAL_LOSS = 0,
|
||||
BDA_EVENT_SIGNAL_LOCK,
|
||||
BDA_EVENT_DATA_START,
|
||||
BDA_EVENT_DATA_STOP,
|
||||
BDA_EVENT_CHANNEL_ACQUIRED,
|
||||
BDA_EVENT_CHANNEL_LOST,
|
||||
BDA_EVENT_CHANNEL_SOURCE_CHANGED,
|
||||
BDA_EVENT_CHANNEL_ACTIVATED,
|
||||
BDA_EVENT_CHANNEL_DEACTIVATED,
|
||||
BDA_EVENT_SUBCHANNEL_ACQUIRED,
|
||||
BDA_EVENT_SUBCHANNEL_LOST,
|
||||
BDA_EVENT_SUBCHANNEL_SOURCE_CHANGED,
|
||||
BDA_EVENT_SUBCHANNEL_ACTIVATED,
|
||||
BDA_EVENT_SUBCHANNEL_DEACTIVATED,
|
||||
BDA_EVENT_ACCESS_GRANTED,
|
||||
BDA_EVENT_ACCESS_DENIED,
|
||||
BDA_EVENT_OFFER_EXTENDED,
|
||||
BDA_EVENT_PURCHASE_COMPLETED,
|
||||
BDA_EVENT_SMART_CARD_INSERTED,
|
||||
BDA_EVENT_SMART_CARD_REMOVED
|
||||
} BDA_EVENT_ID, *PBDA_EVENT_ID;
|
||||
|
||||
|
||||
|
||||
//===========================================================================
|
||||
//
|
||||
// KSSTREAM_HEADER extensions for BDA
|
||||
//
|
||||
//===========================================================================
|
||||
|
||||
typedef struct tagKS_BDA_FRAME_INFO {
|
||||
ULONG ExtendedHeaderSize; // Size of this extended header
|
||||
DWORD dwFrameFlags; //
|
||||
ULONG ulEvent; //
|
||||
ULONG ulChannelNumber; //
|
||||
ULONG ulSubchannelNumber; //
|
||||
ULONG ulReason; //
|
||||
} KS_BDA_FRAME_INFO, *PKS_BDA_FRAME_INFO;
|
||||
|
||||
|
||||
//------------------------------------------------------------
|
||||
//
|
||||
// BDA Network Ethernet Filter Property Set
|
||||
//
|
||||
// {71985F43-1CA1-11d3-9CC8-00C04F7971E0}
|
||||
//
|
||||
typedef struct _BDA_ETHERNET_ADDRESS {
|
||||
BYTE rgbAddress[6];
|
||||
} BDA_ETHERNET_ADDRESS, *PBDA_ETHERNET_ADDRESS;
|
||||
|
||||
typedef struct _BDA_ETHERNET_ADDRESS_LIST {
|
||||
ULONG ulcAddresses;
|
||||
BDA_ETHERNET_ADDRESS rgAddressl[MIN_DIMENSION];
|
||||
} BDA_ETHERNET_ADDRESS_LIST, * PBDA_ETHERNET_ADDRESS_LIST;
|
||||
|
||||
typedef enum {
|
||||
BDA_PROMISCUOUS_MULTICAST = 0,
|
||||
BDA_FILTERED_MULTICAST,
|
||||
BDA_NO_MULTICAST
|
||||
} BDA_MULTICAST_MODE, *PBDA_MULTICAST_MODE;
|
||||
|
||||
|
||||
//------------------------------------------------------------
|
||||
//
|
||||
// BDA Network IPv4 Filter Property Set
|
||||
//
|
||||
// {71985F44-1CA1-11d3-9CC8-00C04F7971E0}
|
||||
//
|
||||
typedef struct _BDA_IPv4_ADDRESS {
|
||||
BYTE rgbAddress[4];
|
||||
} BDA_IPv4_ADDRESS, *PBDA_IPv4_ADDRESS;
|
||||
|
||||
typedef struct _BDA_IPv4_ADDRESS_LIST {
|
||||
ULONG ulcAddresses;
|
||||
BDA_IPv4_ADDRESS rgAddressl[MIN_DIMENSION];
|
||||
} BDA_IPv4_ADDRESS_LIST, * PBDA_IPv4_ADDRESS_LIST;
|
||||
|
||||
|
||||
//------------------------------------------------------------
|
||||
//
|
||||
// BDA Network IPv4 Filter Property Set
|
||||
//
|
||||
// {E1785A74-2A23-4fb3-9245-A8F88017EF33}
|
||||
//
|
||||
typedef struct _BDA_IPv6_ADDRESS {
|
||||
BYTE rgbAddress[6];
|
||||
} BDA_IPv6_ADDRESS, *PBDA_IPv6_ADDRESS;
|
||||
|
||||
typedef struct _BDA_IPv6_ADDRESS_LIST {
|
||||
ULONG ulcAddresses;
|
||||
BDA_IPv6_ADDRESS rgAddressl[MIN_DIMENSION];
|
||||
} BDA_IPv6_ADDRESS_LIST, * PBDA_IPv6_ADDRESS_LIST;
|
||||
|
||||
|
||||
//------------------------------------------------------------
|
||||
//
|
||||
//
|
||||
// BDA Signal Property Set
|
||||
//
|
||||
// {D2F1644B-B409-11d2-BC69-00A0C9EE9E16}
|
||||
//
|
||||
typedef enum {
|
||||
BDA_SIGNAL_UNAVAILABLE = 0,
|
||||
BDA_SIGNAL_INACTIVE,
|
||||
BDA_SIGNAL_ACTIVE
|
||||
} BDA_SIGNAL_STATE, * PBDA_SIGNAL_STATE;
|
||||
|
||||
|
||||
//------------------------------------------------------------
|
||||
//
|
||||
//
|
||||
// BDA Change Sync Method Set
|
||||
//
|
||||
// {FD0A5AF3-B41D-11d2-9C95-00C04F7971E0}
|
||||
//
|
||||
typedef enum
|
||||
{
|
||||
BDA_CHANGES_COMPLETE = 0,
|
||||
BDA_CHANGES_PENDING
|
||||
|
||||
} BDA_CHANGE_STATE, * PBDA_CHANGE_STATE;
|
||||
|
||||
|
||||
//------------------------------------------------------------
|
||||
//
|
||||
//
|
||||
// BDA Device Configuration Method Set
|
||||
//
|
||||
// {71985F45-1CA1-11d3-9CC8-00C04F7971E0}
|
||||
//
|
||||
|
||||
|
||||
//------------------------------------------------------------
|
||||
//
|
||||
//
|
||||
// BDA Topology Property Set
|
||||
//
|
||||
// {A14EE835-0A23-11d3-9CC7-00C04F7971E0}
|
||||
//
|
||||
|
||||
typedef struct _BDANODE_DESCRIPTOR
|
||||
{
|
||||
ULONG ulBdaNodeType; // The node type as it is used
|
||||
// in the BDA template topology
|
||||
|
||||
GUID guidFunction; // GUID from BdaMedia.h describing
|
||||
// the node's function (e.g.
|
||||
// KSNODE_BDA_RF_TUNER)
|
||||
|
||||
GUID guidName; // GUID that can be use to look up
|
||||
// a displayable name for the node.
|
||||
} BDANODE_DESCRIPTOR, *PBDANODE_DESCRIPTOR;
|
||||
|
||||
|
||||
//------------------------------------------------------------
|
||||
//
|
||||
//
|
||||
// BDA Void Transform Property Set
|
||||
//
|
||||
// {71985F46-1CA1-11d3-9CC8-00C04F7971E0}
|
||||
//
|
||||
|
||||
|
||||
//------------------------------------------------------------
|
||||
//
|
||||
//
|
||||
// BDA Null Transform Property Set
|
||||
//
|
||||
// {DDF15B0D-BD25-11d2-9CA0-00C04F7971E0}
|
||||
//
|
||||
|
||||
|
||||
//------------------------------------------------------------
|
||||
//
|
||||
//
|
||||
// BDA Frequency Filter Property Set
|
||||
//
|
||||
// {71985F47-1CA1-11d3-9CC8-00C04F7971E0}
|
||||
//
|
||||
|
||||
|
||||
//------------------------------------------------------------
|
||||
//
|
||||
//
|
||||
// BDA Autodemodulate Property Set
|
||||
//
|
||||
// {DDF15B12-BD25-11d2-9CA0-00C04F7971E0}
|
||||
//
|
||||
|
||||
|
||||
//------------------------------------------------------------
|
||||
//
|
||||
//
|
||||
// BDA PmtProcessor Property Set
|
||||
//
|
||||
// {516B99C5-971C-4aaf-B3F3-D9FDA8A15E16}
|
||||
//
|
||||
|
||||
typedef struct _BDA_PMT
|
||||
{
|
||||
ULONG ulTableID;
|
||||
ULONG ulcbSectionLength;
|
||||
ULONG argbSectionData[MIN_DIMENSION];
|
||||
} BDA_PMT, *PBDA_PMT;
|
||||
|
||||
//------------------------------------------------------------
|
||||
//
|
||||
//
|
||||
// BDA Descriptor Property Set
|
||||
//
|
||||
// {DE6A1C9E-87DF-48aa-95AA-289B7AA4F49F}
|
||||
//
|
||||
|
||||
typedef struct _BDA_CAT_DESCRIPTOR
|
||||
{
|
||||
ULONG ulTag;
|
||||
ULONG ulcbLength;
|
||||
ULONG argbData[MIN_DIMENSION];
|
||||
} BDA_CAT_DESCRIPTOR, *PBDA_CAT_DESCRIPTOR;
|
||||
|
||||
typedef struct _BDA_ES_DESCRIPTOR
|
||||
{
|
||||
ULONG ulProgramNum;
|
||||
ULONG ulContentPID;
|
||||
ULONG ulTag;
|
||||
ULONG ulcbLength;
|
||||
ULONG argbData[MIN_DIMENSION];
|
||||
} BDA_ES_DESCRIPTOR, *PBDA_ES_DESCRIPTOR;
|
||||
|
||||
typedef struct _BDA_PROGRAM_DESCRIPTOR
|
||||
{
|
||||
ULONG ulProgramNum;
|
||||
ULONG ulTag;
|
||||
ULONG ulcbLength;
|
||||
ULONG argbData[MIN_DIMENSION];
|
||||
} BDA_PROGRAM_DESCRIPTOR, *PBDA_PROGRAM_DESCRIPTOR;
|
||||
|
||||
|
||||
//------------------------------------------------------------
|
||||
//
|
||||
//
|
||||
// BDA EsMap Property Set
|
||||
//
|
||||
// {FA14A8B3-6068-48ef-96DD-53010B985A7D}
|
||||
//
|
||||
|
||||
typedef enum
|
||||
{
|
||||
ES_MAP_STATE_GOOD_FLOW = 0,
|
||||
ES_MAP_STATE_NO_CONTENT,
|
||||
ES_MAP_STATE_NO_ECM,
|
||||
ES_MAP_STATE_BAD_MAP
|
||||
} BDA_ES_MAP_STATE, *PBDA_ES_MAP_STATE;
|
||||
|
||||
typedef struct _BDA_ES_MAP
|
||||
{
|
||||
ULONG ulContentPID;
|
||||
ULONG ulProgramNum;
|
||||
ULONG ulStreamType;
|
||||
BDA_ES_MAP_STATE mapState;
|
||||
} BDA_ES_MAP, *PBDA_ES_MAP;
|
||||
|
||||
|
||||
//------------------------------------------------------------
|
||||
//
|
||||
//
|
||||
// BDA PID Filter Property Set
|
||||
//
|
||||
// {D0A67D65-08DF-4fec-8533-E5B550410B85}
|
||||
//
|
||||
|
||||
//---------------------------------------------------------------------
|
||||
// From IEnumPIDMap interface
|
||||
//---------------------------------------------------------------------
|
||||
|
||||
typedef enum {
|
||||
MEDIA_TRANSPORT_PACKET, // complete TS packet e.g. pass-through mode
|
||||
MEDIA_ELEMENTARY_STREAM, // PES payloads; audio/video only
|
||||
MEDIA_MPEG2_PSI, // PAT, PMT, CAT, Private
|
||||
MEDIA_TRANSPORT_PAYLOAD // gathered TS packet payloads (PES packets, etc...)
|
||||
} MEDIA_SAMPLE_CONTENT ;
|
||||
|
||||
typedef struct {
|
||||
ULONG ulPID ;
|
||||
MEDIA_SAMPLE_CONTENT MediaSampleContent ;
|
||||
} PID_MAP ;
|
||||
|
||||
typedef struct _BDA_PID_MAP
|
||||
{
|
||||
MEDIA_SAMPLE_CONTENT MediaSampleContent;
|
||||
ULONG ulcPIDs;
|
||||
ULONG aulPIDs[MIN_DIMENSION];
|
||||
} BDA_PID_MAP, *PBDA_PID_MAP;
|
||||
|
||||
typedef struct _BDA_PID_UNMAP
|
||||
{
|
||||
ULONG ulcPIDs;
|
||||
ULONG aulPIDs[MIN_DIMENSION];
|
||||
} BDA_PID_UNMAP, *PBDA_PID_UNMAP;
|
||||
|
||||
|
||||
//------------------------------------------------------------
|
||||
//
|
||||
//
|
||||
// BDA CA Property Set
|
||||
//
|
||||
// {B0693766-5278-4ec6-B9E1-3CE40560EF5A}
|
||||
//
|
||||
typedef struct _BDA_CA_MODULE_UI
|
||||
{
|
||||
ULONG ulFormat;
|
||||
ULONG ulbcDesc;
|
||||
ULONG ulDesc[MIN_DIMENSION];
|
||||
} BDA_CA_MODULE_UI, *PBDA_CA_MODULE_UI;
|
||||
|
||||
|
||||
//------------------------------------------------------------
|
||||
//
|
||||
//
|
||||
// BDA CA Event Set
|
||||
//
|
||||
// {488C4CCC-B768-4129-8EB1-B00A071F9068}
|
||||
//
|
||||
|
||||
|
||||
|
||||
//=============================================================
|
||||
//
|
||||
//
|
||||
// BDA Tuning Model enumerations
|
||||
//
|
||||
//
|
||||
//=============================================================
|
||||
|
||||
// system type for particular DVB Tuning Space instance
|
||||
typedef enum DVBSystemType {
|
||||
DVB_Cable,
|
||||
DVB_Terrestrial,
|
||||
DVB_Satellite,
|
||||
} DVBSystemType;
|
||||
|
||||
//------------------------------------------------------------
|
||||
//
|
||||
// BDA Channel Tune Request
|
||||
|
||||
V1_ENUM enum {
|
||||
BDA_UNDEFINED_CHANNEL = -1,
|
||||
};
|
||||
|
||||
|
||||
//------------------------------------------------------------
|
||||
//
|
||||
// BDA Component(substream)
|
||||
//
|
||||
|
||||
typedef V1_ENUM enum ComponentCategory
|
||||
{
|
||||
CategoryNotSet = -1,
|
||||
CategoryOther = 0,
|
||||
CategoryVideo,
|
||||
CategoryAudio,
|
||||
CategoryText,
|
||||
CategoryData,
|
||||
} ComponentCategory;
|
||||
|
||||
// Component Status
|
||||
typedef enum ComponentStatus
|
||||
{
|
||||
StatusActive,
|
||||
StatusInactive,
|
||||
StatusUnavailable,
|
||||
} ComponentStatus;
|
||||
|
||||
|
||||
//------------------------------------------------------------
|
||||
//
|
||||
// BDA MPEG2 Component Type
|
||||
//
|
||||
// from the MPEG2 specification
|
||||
typedef V1_ENUM enum MPEG2StreamType {
|
||||
BDA_UNITIALIZED_MPEG2STREAMTYPE = -1,
|
||||
Reserved1 = 0x0,
|
||||
ISO_IEC_11172_2_VIDEO = Reserved1 + 1,
|
||||
ISO_IEC_13818_2_VIDEO = ISO_IEC_11172_2_VIDEO + 1,
|
||||
ISO_IEC_11172_3_AUDIO = ISO_IEC_13818_2_VIDEO + 1,
|
||||
ISO_IEC_13818_3_AUDIO = ISO_IEC_11172_3_AUDIO + 1,
|
||||
ISO_IEC_13818_1_PRIVATE_SECTION = ISO_IEC_13818_3_AUDIO + 1,
|
||||
ISO_IEC_13818_1_PES = ISO_IEC_13818_1_PRIVATE_SECTION + 1,
|
||||
ISO_IEC_13522_MHEG = ISO_IEC_13818_1_PES + 1,
|
||||
ANNEX_A_DSM_CC = ISO_IEC_13522_MHEG + 1,
|
||||
ITU_T_REC_H_222_1 = ANNEX_A_DSM_CC + 1,
|
||||
ISO_IEC_13818_6_TYPE_A = ITU_T_REC_H_222_1 + 1,
|
||||
ISO_IEC_13818_6_TYPE_B = ISO_IEC_13818_6_TYPE_A + 1,
|
||||
ISO_IEC_13818_6_TYPE_C = ISO_IEC_13818_6_TYPE_B + 1,
|
||||
ISO_IEC_13818_6_TYPE_D = ISO_IEC_13818_6_TYPE_C + 1,
|
||||
ISO_IEC_13818_1_AUXILIARY = ISO_IEC_13818_6_TYPE_D + 1,
|
||||
ISO_IEC_13818_1_RESERVED = ISO_IEC_13818_1_AUXILIARY + 1,
|
||||
USER_PRIVATE = ISO_IEC_13818_1_RESERVED + 1
|
||||
} MPEG2StreamType;
|
||||
|
||||
|
||||
//------------------------------------------------------------
|
||||
//
|
||||
// BDA ATSC Component Type
|
||||
//
|
||||
//
|
||||
// ATSC made AC3 Audio a descriptor instead of
|
||||
// defining a user private stream type.
|
||||
typedef enum ATSCComponentTypeFlags {
|
||||
// bit flags for various component type properties
|
||||
ATSCCT_AC3 = 0x00000001,
|
||||
} ATSCComponentTypeFlags;
|
||||
|
||||
|
||||
//------------------------------------------------------------
|
||||
//
|
||||
// BDA Locators
|
||||
//
|
||||
|
||||
|
||||
typedef V1_ENUM enum BinaryConvolutionCodeRate {
|
||||
BDA_BCC_RATE_NOT_SET = -1,
|
||||
BDA_BCC_RATE_NOT_DEFINED = 0,
|
||||
BDA_BCC_RATE_1_2 = 1, // 1/2
|
||||
BDA_BCC_RATE_2_3, // 2/3
|
||||
BDA_BCC_RATE_3_4, // 3/4
|
||||
BDA_BCC_RATE_3_5,
|
||||
BDA_BCC_RATE_4_5,
|
||||
BDA_BCC_RATE_5_6, // 5/6
|
||||
BDA_BCC_RATE_5_11,
|
||||
BDA_BCC_RATE_7_8, // 7/8
|
||||
BDA_BCC_RATE_MAX,
|
||||
} BinaryConvolutionCodeRate;
|
||||
|
||||
typedef V1_ENUM enum FECMethod {
|
||||
BDA_FEC_METHOD_NOT_SET = -1,
|
||||
BDA_FEC_METHOD_NOT_DEFINED = 0,
|
||||
BDA_FEC_VITERBI = 1, // FEC is a Viterbi Binary Convolution.
|
||||
BDA_FEC_RS_204_188, // The FEC is Reed-Solomon 204/188 (outer FEC)
|
||||
BDA_FEC_MAX,
|
||||
} FECMethod;
|
||||
|
||||
typedef V1_ENUM enum ModulationType {
|
||||
BDA_MOD_NOT_SET = -1,
|
||||
BDA_MOD_NOT_DEFINED = 0,
|
||||
BDA_MOD_16QAM = 1,
|
||||
BDA_MOD_32QAM,
|
||||
BDA_MOD_64QAM,
|
||||
BDA_MOD_80QAM,
|
||||
BDA_MOD_96QAM,
|
||||
BDA_MOD_112QAM,
|
||||
BDA_MOD_128QAM,
|
||||
BDA_MOD_160QAM,
|
||||
BDA_MOD_192QAM,
|
||||
BDA_MOD_224QAM,
|
||||
BDA_MOD_256QAM,
|
||||
BDA_MOD_320QAM,
|
||||
BDA_MOD_384QAM,
|
||||
BDA_MOD_448QAM,
|
||||
BDA_MOD_512QAM,
|
||||
BDA_MOD_640QAM,
|
||||
BDA_MOD_768QAM,
|
||||
BDA_MOD_896QAM,
|
||||
BDA_MOD_1024QAM,
|
||||
BDA_MOD_QPSK,
|
||||
BDA_MOD_BPSK,
|
||||
BDA_MOD_OQPSK,
|
||||
BDA_MOD_8VSB,
|
||||
BDA_MOD_16VSB,
|
||||
BDA_MOD_ANALOG_AMPLITUDE, // std am
|
||||
BDA_MOD_ANALOG_FREQUENCY, // std fm
|
||||
BDA_MOD_MAX,
|
||||
} ModulationType;
|
||||
|
||||
typedef V1_ENUM enum SpectralInversion {
|
||||
BDA_SPECTRAL_INVERSION_NOT_SET = -1,
|
||||
BDA_SPECTRAL_INVERSION_NOT_DEFINED = 0,
|
||||
BDA_SPECTRAL_INVERSION_AUTOMATIC = 1,
|
||||
BDA_SPECTRAL_INVERSION_NORMAL,
|
||||
BDA_SPECTRAL_INVERSION_INVERTED,
|
||||
BDA_SPECTRAL_INVERSION_MAX
|
||||
} SpectralInversion;
|
||||
|
||||
typedef V1_ENUM enum Polarisation {
|
||||
BDA_POLARISATION_NOT_SET = -1,
|
||||
BDA_POLARISATION_NOT_DEFINED = 0,
|
||||
BDA_POLARISATION_LINEAR_H = 1, // Linear horizontal polarisation
|
||||
BDA_POLARISATION_LINEAR_V, // Linear vertical polarisation
|
||||
BDA_POLARISATION_CIRCULAR_L, // Circular left polarisation
|
||||
BDA_POLARISATION_CIRCULAR_R, // Circular right polarisation
|
||||
BDA_POLARISATION_MAX,
|
||||
} Polarisation;
|
||||
|
||||
typedef V1_ENUM enum GuardInterval {
|
||||
BDA_GUARD_NOT_SET = -1,
|
||||
BDA_GUARD_NOT_DEFINED = 0,
|
||||
BDA_GUARD_1_32 = 1, // Guard interval is 1/32
|
||||
BDA_GUARD_1_16, // Guard interval is 1/16
|
||||
BDA_GUARD_1_8, // Guard interval is 1/8
|
||||
BDA_GUARD_1_4, // Guard interval is 1/4
|
||||
BDA_GUARD_MAX,
|
||||
} GuardInterval;
|
||||
|
||||
typedef V1_ENUM enum HierarchyAlpha {
|
||||
BDA_HALPHA_NOT_SET = -1,
|
||||
BDA_HALPHA_NOT_DEFINED = 0,
|
||||
BDA_HALPHA_1 = 1, // Hierarchy alpha is 1.
|
||||
BDA_HALPHA_2, // Hierarchy alpha is 2.
|
||||
BDA_HALPHA_4, // Hierarchy alpha is 4.
|
||||
BDA_HALPHA_MAX,
|
||||
} HierarchyAlpha;
|
||||
|
||||
typedef V1_ENUM enum TransmissionMode {
|
||||
BDA_XMIT_MODE_NOT_SET = -1,
|
||||
BDA_XMIT_MODE_NOT_DEFINED = 0,
|
||||
BDA_XMIT_MODE_2K = 1, // Transmission uses 1705 carriers (use a 2K FFT)
|
||||
BDA_XMIT_MODE_8K, // Transmission uses 6817 carriers (use an 8K FFT)
|
||||
BDA_XMIT_MODE_MAX,
|
||||
} TransmissionMode;
|
||||
|
||||
#endif // not defined _BDATYPES_
|
||||
|
||||
// end of file -- bdatypes.h
|
|
@ -0,0 +1,26 @@
|
|||
//------------------------------------------------------------------------------
|
||||
// File: COMLite.h
|
||||
//
|
||||
// Desc: This header file is to provide a migration path for users of
|
||||
// ActiveMovie betas 1 and 2.
|
||||
//
|
||||
// Copyright (c) 1992 - 2000, Microsoft Corporation. All rights reserved.
|
||||
//------------------------------------------------------------------------------
|
||||
|
||||
|
||||
#ifndef _INC_COMLITE_
|
||||
#define _INC_COMLITE_
|
||||
|
||||
#define QzInitialize CoInitialize
|
||||
#define QzUninitialize CoUninitialize
|
||||
#define QzFreeUnusedLibraries CoFreeUnusedLibraries
|
||||
|
||||
#define QzGetMalloc CoGetMalloc
|
||||
#define QzTaskMemAlloc CoTaskMemAlloc
|
||||
#define QzTaskMemRealloc CoTaskMemRealloc
|
||||
#define QzTaskMemFree CoTaskMemFree
|
||||
#define QzCreateFilterObject CoCreateInstance
|
||||
#define QzCLSIDFromString CLSIDFromString
|
||||
#define QzStringFromGUID2 StringFromGUID2
|
||||
|
||||
#endif // _INC_COMLITE_
|
File diff suppressed because it is too large
Load Diff
File diff suppressed because it is too large
Load Diff
File diff suppressed because it is too large
Load Diff
|
@ -0,0 +1,354 @@
|
|||
/*==========================================================================;
|
||||
*
|
||||
* Copyright (C) 1995-2000 Microsoft Corporation. All Rights Reserved.
|
||||
*
|
||||
* File: d3d8caps.h
|
||||
* Content: Direct3D capabilities include file
|
||||
*
|
||||
***************************************************************************/
|
||||
|
||||
#ifndef _D3D8CAPS_H
|
||||
#define _D3D8CAPS_H
|
||||
|
||||
#ifndef DIRECT3D_VERSION
|
||||
#define DIRECT3D_VERSION 0x0800
|
||||
#endif //DIRECT3D_VERSION
|
||||
|
||||
// include this file content only if compiling for DX8 interfaces
|
||||
#if(DIRECT3D_VERSION >= 0x0800)
|
||||
|
||||
#pragma pack(4)
|
||||
|
||||
typedef struct _D3DCAPS8
|
||||
{
|
||||
/* Device Info */
|
||||
D3DDEVTYPE DeviceType;
|
||||
UINT AdapterOrdinal;
|
||||
|
||||
/* Caps from DX7 Draw */
|
||||
DWORD Caps;
|
||||
DWORD Caps2;
|
||||
DWORD Caps3;
|
||||
DWORD PresentationIntervals;
|
||||
|
||||
/* Cursor Caps */
|
||||
DWORD CursorCaps;
|
||||
|
||||
/* 3D Device Caps */
|
||||
DWORD DevCaps;
|
||||
|
||||
DWORD PrimitiveMiscCaps;
|
||||
DWORD RasterCaps;
|
||||
DWORD ZCmpCaps;
|
||||
DWORD SrcBlendCaps;
|
||||
DWORD DestBlendCaps;
|
||||
DWORD AlphaCmpCaps;
|
||||
DWORD ShadeCaps;
|
||||
DWORD TextureCaps;
|
||||
DWORD TextureFilterCaps; // D3DPTFILTERCAPS for IDirect3DTexture8's
|
||||
DWORD CubeTextureFilterCaps; // D3DPTFILTERCAPS for IDirect3DCubeTexture8's
|
||||
DWORD VolumeTextureFilterCaps; // D3DPTFILTERCAPS for IDirect3DVolumeTexture8's
|
||||
DWORD TextureAddressCaps; // D3DPTADDRESSCAPS for IDirect3DTexture8's
|
||||
DWORD VolumeTextureAddressCaps; // D3DPTADDRESSCAPS for IDirect3DVolumeTexture8's
|
||||
|
||||
DWORD LineCaps; // D3DLINECAPS
|
||||
|
||||
DWORD MaxTextureWidth, MaxTextureHeight;
|
||||
DWORD MaxVolumeExtent;
|
||||
|
||||
DWORD MaxTextureRepeat;
|
||||
DWORD MaxTextureAspectRatio;
|
||||
DWORD MaxAnisotropy;
|
||||
float MaxVertexW;
|
||||
|
||||
float GuardBandLeft;
|
||||
float GuardBandTop;
|
||||
float GuardBandRight;
|
||||
float GuardBandBottom;
|
||||
|
||||
float ExtentsAdjust;
|
||||
DWORD StencilCaps;
|
||||
|
||||
DWORD FVFCaps;
|
||||
DWORD TextureOpCaps;
|
||||
DWORD MaxTextureBlendStages;
|
||||
DWORD MaxSimultaneousTextures;
|
||||
|
||||
DWORD VertexProcessingCaps;
|
||||
DWORD MaxActiveLights;
|
||||
DWORD MaxUserClipPlanes;
|
||||
DWORD MaxVertexBlendMatrices;
|
||||
DWORD MaxVertexBlendMatrixIndex;
|
||||
|
||||
float MaxPointSize;
|
||||
|
||||
DWORD MaxPrimitiveCount; // max number of primitives per DrawPrimitive call
|
||||
DWORD MaxVertexIndex;
|
||||
DWORD MaxStreams;
|
||||
DWORD MaxStreamStride; // max stride for SetStreamSource
|
||||
|
||||
DWORD VertexShaderVersion;
|
||||
DWORD MaxVertexShaderConst; // number of vertex shader constant registers
|
||||
|
||||
DWORD PixelShaderVersion;
|
||||
float MaxPixelShaderValue; // max value of pixel shader arithmetic component
|
||||
|
||||
} D3DCAPS8;
|
||||
|
||||
//
|
||||
// BIT DEFINES FOR D3DCAPS8 DWORD MEMBERS
|
||||
//
|
||||
|
||||
//
|
||||
// Caps
|
||||
//
|
||||
#define D3DCAPS_READ_SCANLINE 0x00020000L
|
||||
|
||||
//
|
||||
// Caps2
|
||||
//
|
||||
#define D3DCAPS2_NO2DDURING3DSCENE 0x00000002L
|
||||
#define D3DCAPS2_FULLSCREENGAMMA 0x00020000L
|
||||
#define D3DCAPS2_CANRENDERWINDOWED 0x00080000L
|
||||
#define D3DCAPS2_CANCALIBRATEGAMMA 0x00100000L
|
||||
#define D3DCAPS2_RESERVED 0x02000000L
|
||||
|
||||
//
|
||||
// Caps3
|
||||
//
|
||||
#define D3DCAPS3_RESERVED 0x8000001fL
|
||||
|
||||
//
|
||||
// PresentationIntervals
|
||||
//
|
||||
#define D3DPRESENT_INTERVAL_DEFAULT 0x00000000L
|
||||
#define D3DPRESENT_INTERVAL_ONE 0x00000001L
|
||||
#define D3DPRESENT_INTERVAL_TWO 0x00000002L
|
||||
#define D3DPRESENT_INTERVAL_THREE 0x00000004L
|
||||
#define D3DPRESENT_INTERVAL_FOUR 0x00000008L
|
||||
#define D3DPRESENT_INTERVAL_IMMEDIATE 0x80000000L
|
||||
|
||||
//
|
||||
// CursorCaps
|
||||
//
|
||||
// Driver supports HW color cursor in at least hi-res modes(height >=400)
|
||||
#define D3DCURSORCAPS_COLOR 0x00000001L
|
||||
// Driver supports HW cursor also in low-res modes(height < 400)
|
||||
#define D3DCURSORCAPS_LOWRES 0x00000002L
|
||||
|
||||
//
|
||||
// DevCaps
|
||||
//
|
||||
#define D3DDEVCAPS_EXECUTESYSTEMMEMORY 0x00000010L /* Device can use execute buffers from system memory */
|
||||
#define D3DDEVCAPS_EXECUTEVIDEOMEMORY 0x00000020L /* Device can use execute buffers from video memory */
|
||||
#define D3DDEVCAPS_TLVERTEXSYSTEMMEMORY 0x00000040L /* Device can use TL buffers from system memory */
|
||||
#define D3DDEVCAPS_TLVERTEXVIDEOMEMORY 0x00000080L /* Device can use TL buffers from video memory */
|
||||
#define D3DDEVCAPS_TEXTURESYSTEMMEMORY 0x00000100L /* Device can texture from system memory */
|
||||
#define D3DDEVCAPS_TEXTUREVIDEOMEMORY 0x00000200L /* Device can texture from device memory */
|
||||
#define D3DDEVCAPS_DRAWPRIMTLVERTEX 0x00000400L /* Device can draw TLVERTEX primitives */
|
||||
#define D3DDEVCAPS_CANRENDERAFTERFLIP 0x00000800L /* Device can render without waiting for flip to complete */
|
||||
#define D3DDEVCAPS_TEXTURENONLOCALVIDMEM 0x00001000L /* Device can texture from nonlocal video memory */
|
||||
#define D3DDEVCAPS_DRAWPRIMITIVES2 0x00002000L /* Device can support DrawPrimitives2 */
|
||||
#define D3DDEVCAPS_SEPARATETEXTUREMEMORIES 0x00004000L /* Device is texturing from separate memory pools */
|
||||
#define D3DDEVCAPS_DRAWPRIMITIVES2EX 0x00008000L /* Device can support Extended DrawPrimitives2 i.e. DX7 compliant driver*/
|
||||
#define D3DDEVCAPS_HWTRANSFORMANDLIGHT 0x00010000L /* Device can support transformation and lighting in hardware and DRAWPRIMITIVES2EX must be also */
|
||||
#define D3DDEVCAPS_CANBLTSYSTONONLOCAL 0x00020000L /* Device supports a Tex Blt from system memory to non-local vidmem */
|
||||
#define D3DDEVCAPS_HWRASTERIZATION 0x00080000L /* Device has HW acceleration for rasterization */
|
||||
#define D3DDEVCAPS_PUREDEVICE 0x00100000L /* Device supports D3DCREATE_PUREDEVICE */
|
||||
#define D3DDEVCAPS_QUINTICRTPATCHES 0x00200000L /* Device supports quintic Beziers and BSplines */
|
||||
#define D3DDEVCAPS_RTPATCHES 0x00400000L /* Device supports Rect and Tri patches */
|
||||
#define D3DDEVCAPS_RTPATCHHANDLEZERO 0x00800000L /* Indicates that RT Patches may be drawn efficiently using handle 0 */
|
||||
#define D3DDEVCAPS_NPATCHES 0x01000000L /* Device supports N-Patches */
|
||||
|
||||
//
|
||||
// PrimitiveMiscCaps
|
||||
//
|
||||
#define D3DPMISCCAPS_MASKZ 0x00000002L
|
||||
#define D3DPMISCCAPS_LINEPATTERNREP 0x00000004L
|
||||
#define D3DPMISCCAPS_CULLNONE 0x00000010L
|
||||
#define D3DPMISCCAPS_CULLCW 0x00000020L
|
||||
#define D3DPMISCCAPS_CULLCCW 0x00000040L
|
||||
#define D3DPMISCCAPS_COLORWRITEENABLE 0x00000080L
|
||||
#define D3DPMISCCAPS_CLIPPLANESCALEDPOINTS 0x00000100L /* Device correctly clips scaled points to clip planes */
|
||||
#define D3DPMISCCAPS_CLIPTLVERTS 0x00000200L /* device will clip post-transformed vertex primitives */
|
||||
#define D3DPMISCCAPS_TSSARGTEMP 0x00000400L /* device supports D3DTA_TEMP for temporary register */
|
||||
#define D3DPMISCCAPS_BLENDOP 0x00000800L /* device supports D3DRS_BLENDOP */
|
||||
|
||||
//
|
||||
// LineCaps
|
||||
//
|
||||
#define D3DLINECAPS_TEXTURE 0x00000001L
|
||||
#define D3DLINECAPS_ZTEST 0x00000002L
|
||||
#define D3DLINECAPS_BLEND 0x00000004L
|
||||
#define D3DLINECAPS_ALPHACMP 0x00000008L
|
||||
#define D3DLINECAPS_FOG 0x00000010L
|
||||
|
||||
//
|
||||
// RasterCaps
|
||||
//
|
||||
#define D3DPRASTERCAPS_DITHER 0x00000001L
|
||||
#define D3DPRASTERCAPS_PAT 0x00000008L
|
||||
#define D3DPRASTERCAPS_ZTEST 0x00000010L
|
||||
#define D3DPRASTERCAPS_FOGVERTEX 0x00000080L
|
||||
#define D3DPRASTERCAPS_FOGTABLE 0x00000100L
|
||||
#define D3DPRASTERCAPS_ANTIALIASEDGES 0x00001000L
|
||||
#define D3DPRASTERCAPS_MIPMAPLODBIAS 0x00002000L
|
||||
#define D3DPRASTERCAPS_ZBIAS 0x00004000L
|
||||
#define D3DPRASTERCAPS_ZBUFFERLESSHSR 0x00008000L
|
||||
#define D3DPRASTERCAPS_FOGRANGE 0x00010000L
|
||||
#define D3DPRASTERCAPS_ANISOTROPY 0x00020000L
|
||||
#define D3DPRASTERCAPS_WBUFFER 0x00040000L
|
||||
#define D3DPRASTERCAPS_WFOG 0x00100000L
|
||||
#define D3DPRASTERCAPS_ZFOG 0x00200000L
|
||||
#define D3DPRASTERCAPS_COLORPERSPECTIVE 0x00400000L /* Device iterates colors perspective correct */
|
||||
#define D3DPRASTERCAPS_STRETCHBLTMULTISAMPLE 0x00800000L
|
||||
|
||||
//
|
||||
// ZCmpCaps, AlphaCmpCaps
|
||||
//
|
||||
#define D3DPCMPCAPS_NEVER 0x00000001L
|
||||
#define D3DPCMPCAPS_LESS 0x00000002L
|
||||
#define D3DPCMPCAPS_EQUAL 0x00000004L
|
||||
#define D3DPCMPCAPS_LESSEQUAL 0x00000008L
|
||||
#define D3DPCMPCAPS_GREATER 0x00000010L
|
||||
#define D3DPCMPCAPS_NOTEQUAL 0x00000020L
|
||||
#define D3DPCMPCAPS_GREATEREQUAL 0x00000040L
|
||||
#define D3DPCMPCAPS_ALWAYS 0x00000080L
|
||||
|
||||
//
|
||||
// SourceBlendCaps, DestBlendCaps
|
||||
//
|
||||
#define D3DPBLENDCAPS_ZERO 0x00000001L
|
||||
#define D3DPBLENDCAPS_ONE 0x00000002L
|
||||
#define D3DPBLENDCAPS_SRCCOLOR 0x00000004L
|
||||
#define D3DPBLENDCAPS_INVSRCCOLOR 0x00000008L
|
||||
#define D3DPBLENDCAPS_SRCALPHA 0x00000010L
|
||||
#define D3DPBLENDCAPS_INVSRCALPHA 0x00000020L
|
||||
#define D3DPBLENDCAPS_DESTALPHA 0x00000040L
|
||||
#define D3DPBLENDCAPS_INVDESTALPHA 0x00000080L
|
||||
#define D3DPBLENDCAPS_DESTCOLOR 0x00000100L
|
||||
#define D3DPBLENDCAPS_INVDESTCOLOR 0x00000200L
|
||||
#define D3DPBLENDCAPS_SRCALPHASAT 0x00000400L
|
||||
#define D3DPBLENDCAPS_BOTHSRCALPHA 0x00000800L
|
||||
#define D3DPBLENDCAPS_BOTHINVSRCALPHA 0x00001000L
|
||||
|
||||
//
|
||||
// ShadeCaps
|
||||
//
|
||||
#define D3DPSHADECAPS_COLORGOURAUDRGB 0x00000008L
|
||||
#define D3DPSHADECAPS_SPECULARGOURAUDRGB 0x00000200L
|
||||
#define D3DPSHADECAPS_ALPHAGOURAUDBLEND 0x00004000L
|
||||
#define D3DPSHADECAPS_FOGGOURAUD 0x00080000L
|
||||
|
||||
//
|
||||
// TextureCaps
|
||||
//
|
||||
#define D3DPTEXTURECAPS_PERSPECTIVE 0x00000001L /* Perspective-correct texturing is supported */
|
||||
#define D3DPTEXTURECAPS_POW2 0x00000002L /* Power-of-2 texture dimensions are required - applies to non-Cube/Volume textures only. */
|
||||
#define D3DPTEXTURECAPS_ALPHA 0x00000004L /* Alpha in texture pixels is supported */
|
||||
#define D3DPTEXTURECAPS_SQUAREONLY 0x00000020L /* Only square textures are supported */
|
||||
#define D3DPTEXTURECAPS_TEXREPEATNOTSCALEDBYSIZE 0x00000040L /* Texture indices are not scaled by the texture size prior to interpolation */
|
||||
#define D3DPTEXTURECAPS_ALPHAPALETTE 0x00000080L /* Device can draw alpha from texture palettes */
|
||||
// Device can use non-POW2 textures if:
|
||||
// 1) D3DTEXTURE_ADDRESS is set to CLAMP for this texture's stage
|
||||
// 2) D3DRS_WRAP(N) is zero for this texture's coordinates
|
||||
// 3) mip mapping is not enabled (use magnification filter only)
|
||||
#define D3DPTEXTURECAPS_NONPOW2CONDITIONAL 0x00000100L
|
||||
#define D3DPTEXTURECAPS_PROJECTED 0x00000400L /* Device can do D3DTTFF_PROJECTED */
|
||||
#define D3DPTEXTURECAPS_CUBEMAP 0x00000800L /* Device can do cubemap textures */
|
||||
#define D3DPTEXTURECAPS_VOLUMEMAP 0x00002000L /* Device can do volume textures */
|
||||
#define D3DPTEXTURECAPS_MIPMAP 0x00004000L /* Device can do mipmapped textures */
|
||||
#define D3DPTEXTURECAPS_MIPVOLUMEMAP 0x00008000L /* Device can do mipmapped volume textures */
|
||||
#define D3DPTEXTURECAPS_MIPCUBEMAP 0x00010000L /* Device can do mipmapped cube maps */
|
||||
#define D3DPTEXTURECAPS_CUBEMAP_POW2 0x00020000L /* Device requires that cubemaps be power-of-2 dimension */
|
||||
#define D3DPTEXTURECAPS_VOLUMEMAP_POW2 0x00040000L /* Device requires that volume maps be power-of-2 dimension */
|
||||
|
||||
//
|
||||
// TextureFilterCaps
|
||||
//
|
||||
#define D3DPTFILTERCAPS_MINFPOINT 0x00000100L /* Min Filter */
|
||||
#define D3DPTFILTERCAPS_MINFLINEAR 0x00000200L
|
||||
#define D3DPTFILTERCAPS_MINFANISOTROPIC 0x00000400L
|
||||
#define D3DPTFILTERCAPS_MIPFPOINT 0x00010000L /* Mip Filter */
|
||||
#define D3DPTFILTERCAPS_MIPFLINEAR 0x00020000L
|
||||
#define D3DPTFILTERCAPS_MAGFPOINT 0x01000000L /* Mag Filter */
|
||||
#define D3DPTFILTERCAPS_MAGFLINEAR 0x02000000L
|
||||
#define D3DPTFILTERCAPS_MAGFANISOTROPIC 0x04000000L
|
||||
#define D3DPTFILTERCAPS_MAGFAFLATCUBIC 0x08000000L
|
||||
#define D3DPTFILTERCAPS_MAGFGAUSSIANCUBIC 0x10000000L
|
||||
|
||||
//
|
||||
// TextureAddressCaps
|
||||
//
|
||||
#define D3DPTADDRESSCAPS_WRAP 0x00000001L
|
||||
#define D3DPTADDRESSCAPS_MIRROR 0x00000002L
|
||||
#define D3DPTADDRESSCAPS_CLAMP 0x00000004L
|
||||
#define D3DPTADDRESSCAPS_BORDER 0x00000008L
|
||||
#define D3DPTADDRESSCAPS_INDEPENDENTUV 0x00000010L
|
||||
#define D3DPTADDRESSCAPS_MIRRORONCE 0x00000020L
|
||||
|
||||
//
|
||||
// StencilCaps
|
||||
//
|
||||
#define D3DSTENCILCAPS_KEEP 0x00000001L
|
||||
#define D3DSTENCILCAPS_ZERO 0x00000002L
|
||||
#define D3DSTENCILCAPS_REPLACE 0x00000004L
|
||||
#define D3DSTENCILCAPS_INCRSAT 0x00000008L
|
||||
#define D3DSTENCILCAPS_DECRSAT 0x00000010L
|
||||
#define D3DSTENCILCAPS_INVERT 0x00000020L
|
||||
#define D3DSTENCILCAPS_INCR 0x00000040L
|
||||
#define D3DSTENCILCAPS_DECR 0x00000080L
|
||||
|
||||
//
|
||||
// TextureOpCaps
|
||||
//
|
||||
#define D3DTEXOPCAPS_DISABLE 0x00000001L
|
||||
#define D3DTEXOPCAPS_SELECTARG1 0x00000002L
|
||||
#define D3DTEXOPCAPS_SELECTARG2 0x00000004L
|
||||
#define D3DTEXOPCAPS_MODULATE 0x00000008L
|
||||
#define D3DTEXOPCAPS_MODULATE2X 0x00000010L
|
||||
#define D3DTEXOPCAPS_MODULATE4X 0x00000020L
|
||||
#define D3DTEXOPCAPS_ADD 0x00000040L
|
||||
#define D3DTEXOPCAPS_ADDSIGNED 0x00000080L
|
||||
#define D3DTEXOPCAPS_ADDSIGNED2X 0x00000100L
|
||||
#define D3DTEXOPCAPS_SUBTRACT 0x00000200L
|
||||
#define D3DTEXOPCAPS_ADDSMOOTH 0x00000400L
|
||||
#define D3DTEXOPCAPS_BLENDDIFFUSEALPHA 0x00000800L
|
||||
#define D3DTEXOPCAPS_BLENDTEXTUREALPHA 0x00001000L
|
||||
#define D3DTEXOPCAPS_BLENDFACTORALPHA 0x00002000L
|
||||
#define D3DTEXOPCAPS_BLENDTEXTUREALPHAPM 0x00004000L
|
||||
#define D3DTEXOPCAPS_BLENDCURRENTALPHA 0x00008000L
|
||||
#define D3DTEXOPCAPS_PREMODULATE 0x00010000L
|
||||
#define D3DTEXOPCAPS_MODULATEALPHA_ADDCOLOR 0x00020000L
|
||||
#define D3DTEXOPCAPS_MODULATECOLOR_ADDALPHA 0x00040000L
|
||||
#define D3DTEXOPCAPS_MODULATEINVALPHA_ADDCOLOR 0x00080000L
|
||||
#define D3DTEXOPCAPS_MODULATEINVCOLOR_ADDALPHA 0x00100000L
|
||||
#define D3DTEXOPCAPS_BUMPENVMAP 0x00200000L
|
||||
#define D3DTEXOPCAPS_BUMPENVMAPLUMINANCE 0x00400000L
|
||||
#define D3DTEXOPCAPS_DOTPRODUCT3 0x00800000L
|
||||
#define D3DTEXOPCAPS_MULTIPLYADD 0x01000000L
|
||||
#define D3DTEXOPCAPS_LERP 0x02000000L
|
||||
|
||||
//
|
||||
// FVFCaps
|
||||
//
|
||||
#define D3DFVFCAPS_TEXCOORDCOUNTMASK 0x0000ffffL /* mask for texture coordinate count field */
|
||||
#define D3DFVFCAPS_DONOTSTRIPELEMENTS 0x00080000L /* Device prefers that vertex elements not be stripped */
|
||||
#define D3DFVFCAPS_PSIZE 0x00100000L /* Device can receive point size */
|
||||
|
||||
//
|
||||
// VertexProcessingCaps
|
||||
//
|
||||
#define D3DVTXPCAPS_TEXGEN 0x00000001L /* device can do texgen */
|
||||
#define D3DVTXPCAPS_MATERIALSOURCE7 0x00000002L /* device can do DX7-level colormaterialsource ops */
|
||||
#define D3DVTXPCAPS_DIRECTIONALLIGHTS 0x00000008L /* device can do directional lights */
|
||||
#define D3DVTXPCAPS_POSITIONALLIGHTS 0x00000010L /* device can do positional lights (includes point and spot) */
|
||||
#define D3DVTXPCAPS_LOCALVIEWER 0x00000020L /* device can do local viewer */
|
||||
#define D3DVTXPCAPS_TWEENING 0x00000040L /* device can do vertex tweening */
|
||||
#define D3DVTXPCAPS_NO_VSDT_UBYTE4 0x00000080L /* device does not support D3DVSDT_UBYTE4 */
|
||||
|
||||
#pragma pack()
|
||||
|
||||
#endif /* (DIRECT3D_VERSION >= 0x0800) */
|
||||
#endif /* _D3D8CAPS_H_ */
|
||||
|
File diff suppressed because it is too large
Load Diff
|
@ -0,0 +1,598 @@
|
|||
/*==========================================================================;
|
||||
*
|
||||
*
|
||||
* File: d3dcaps.h
|
||||
* Content: Direct3D capabilities include file
|
||||
*
|
||||
***************************************************************************/
|
||||
|
||||
#ifndef _D3DCAPS_H
|
||||
#define _D3DCAPS_H
|
||||
|
||||
/*
|
||||
* Pull in DirectDraw include file automatically:
|
||||
*/
|
||||
#include "ddraw.h"
|
||||
|
||||
#ifndef DIRECT3D_VERSION
|
||||
#define DIRECT3D_VERSION 0x0700
|
||||
#endif
|
||||
|
||||
#pragma pack(4)
|
||||
|
||||
/* Description of capabilities of transform */
|
||||
|
||||
typedef struct _D3DTRANSFORMCAPS {
|
||||
DWORD dwSize;
|
||||
DWORD dwCaps;
|
||||
} D3DTRANSFORMCAPS, *LPD3DTRANSFORMCAPS;
|
||||
|
||||
#define D3DTRANSFORMCAPS_CLIP 0x00000001L /* Will clip whilst transforming */
|
||||
|
||||
/* Description of capabilities of lighting */
|
||||
|
||||
typedef struct _D3DLIGHTINGCAPS {
|
||||
DWORD dwSize;
|
||||
DWORD dwCaps; /* Lighting caps */
|
||||
DWORD dwLightingModel; /* Lighting model - RGB or mono */
|
||||
DWORD dwNumLights; /* Number of lights that can be handled */
|
||||
} D3DLIGHTINGCAPS, *LPD3DLIGHTINGCAPS;
|
||||
|
||||
#define D3DLIGHTINGMODEL_RGB 0x00000001L
|
||||
#define D3DLIGHTINGMODEL_MONO 0x00000002L
|
||||
|
||||
#define D3DLIGHTCAPS_POINT 0x00000001L /* Point lights supported */
|
||||
#define D3DLIGHTCAPS_SPOT 0x00000002L /* Spot lights supported */
|
||||
#define D3DLIGHTCAPS_DIRECTIONAL 0x00000004L /* Directional lights supported */
|
||||
#if(DIRECT3D_VERSION < 0x700)
|
||||
#define D3DLIGHTCAPS_PARALLELPOINT 0x00000008L /* Parallel point lights supported */
|
||||
#endif
|
||||
#if(DIRECT3D_VERSION < 0x500)
|
||||
#define D3DLIGHTCAPS_GLSPOT 0x00000010L /* GL syle spot lights supported */
|
||||
#endif
|
||||
|
||||
/* Description of capabilities for each primitive type */
|
||||
|
||||
typedef struct _D3DPrimCaps {
|
||||
DWORD dwSize;
|
||||
DWORD dwMiscCaps; /* Capability flags */
|
||||
DWORD dwRasterCaps;
|
||||
DWORD dwZCmpCaps;
|
||||
DWORD dwSrcBlendCaps;
|
||||
DWORD dwDestBlendCaps;
|
||||
DWORD dwAlphaCmpCaps;
|
||||
DWORD dwShadeCaps;
|
||||
DWORD dwTextureCaps;
|
||||
DWORD dwTextureFilterCaps;
|
||||
DWORD dwTextureBlendCaps;
|
||||
DWORD dwTextureAddressCaps;
|
||||
DWORD dwStippleWidth; /* maximum width and height of */
|
||||
DWORD dwStippleHeight; /* of supported stipple (up to 32x32) */
|
||||
} D3DPRIMCAPS, *LPD3DPRIMCAPS;
|
||||
|
||||
/* D3DPRIMCAPS dwMiscCaps */
|
||||
|
||||
#define D3DPMISCCAPS_MASKPLANES 0x00000001L
|
||||
#define D3DPMISCCAPS_MASKZ 0x00000002L
|
||||
#define D3DPMISCCAPS_LINEPATTERNREP 0x00000004L
|
||||
#define D3DPMISCCAPS_CONFORMANT 0x00000008L
|
||||
#define D3DPMISCCAPS_CULLNONE 0x00000010L
|
||||
#define D3DPMISCCAPS_CULLCW 0x00000020L
|
||||
#define D3DPMISCCAPS_CULLCCW 0x00000040L
|
||||
|
||||
/* D3DPRIMCAPS dwRasterCaps */
|
||||
|
||||
#define D3DPRASTERCAPS_DITHER 0x00000001L
|
||||
#define D3DPRASTERCAPS_ROP2 0x00000002L
|
||||
#define D3DPRASTERCAPS_XOR 0x00000004L
|
||||
#define D3DPRASTERCAPS_PAT 0x00000008L
|
||||
#define D3DPRASTERCAPS_ZTEST 0x00000010L
|
||||
#define D3DPRASTERCAPS_SUBPIXEL 0x00000020L
|
||||
#define D3DPRASTERCAPS_SUBPIXELX 0x00000040L
|
||||
#define D3DPRASTERCAPS_FOGVERTEX 0x00000080L
|
||||
#define D3DPRASTERCAPS_FOGTABLE 0x00000100L
|
||||
#define D3DPRASTERCAPS_STIPPLE 0x00000200L
|
||||
#if(DIRECT3D_VERSION >= 0x0500)
|
||||
#define D3DPRASTERCAPS_ANTIALIASSORTDEPENDENT 0x00000400L
|
||||
#define D3DPRASTERCAPS_ANTIALIASSORTINDEPENDENT 0x00000800L
|
||||
#define D3DPRASTERCAPS_ANTIALIASEDGES 0x00001000L
|
||||
#define D3DPRASTERCAPS_MIPMAPLODBIAS 0x00002000L
|
||||
#define D3DPRASTERCAPS_ZBIAS 0x00004000L
|
||||
#define D3DPRASTERCAPS_ZBUFFERLESSHSR 0x00008000L
|
||||
#define D3DPRASTERCAPS_FOGRANGE 0x00010000L
|
||||
#define D3DPRASTERCAPS_ANISOTROPY 0x00020000L
|
||||
#endif /* DIRECT3D_VERSION >= 0x0500 */
|
||||
#if(DIRECT3D_VERSION >= 0x0600)
|
||||
#define D3DPRASTERCAPS_WBUFFER 0x00040000L
|
||||
#define D3DPRASTERCAPS_TRANSLUCENTSORTINDEPENDENT 0x00080000L
|
||||
#define D3DPRASTERCAPS_WFOG 0x00100000L
|
||||
#define D3DPRASTERCAPS_ZFOG 0x00200000L
|
||||
#endif /* DIRECT3D_VERSION >= 0x0600 */
|
||||
|
||||
/* D3DPRIMCAPS dwZCmpCaps, dwAlphaCmpCaps */
|
||||
|
||||
#define D3DPCMPCAPS_NEVER 0x00000001L
|
||||
#define D3DPCMPCAPS_LESS 0x00000002L
|
||||
#define D3DPCMPCAPS_EQUAL 0x00000004L
|
||||
#define D3DPCMPCAPS_LESSEQUAL 0x00000008L
|
||||
#define D3DPCMPCAPS_GREATER 0x00000010L
|
||||
#define D3DPCMPCAPS_NOTEQUAL 0x00000020L
|
||||
#define D3DPCMPCAPS_GREATEREQUAL 0x00000040L
|
||||
#define D3DPCMPCAPS_ALWAYS 0x00000080L
|
||||
|
||||
/* D3DPRIMCAPS dwSourceBlendCaps, dwDestBlendCaps */
|
||||
|
||||
#define D3DPBLENDCAPS_ZERO 0x00000001L
|
||||
#define D3DPBLENDCAPS_ONE 0x00000002L
|
||||
#define D3DPBLENDCAPS_SRCCOLOR 0x00000004L
|
||||
#define D3DPBLENDCAPS_INVSRCCOLOR 0x00000008L
|
||||
#define D3DPBLENDCAPS_SRCALPHA 0x00000010L
|
||||
#define D3DPBLENDCAPS_INVSRCALPHA 0x00000020L
|
||||
#define D3DPBLENDCAPS_DESTALPHA 0x00000040L
|
||||
#define D3DPBLENDCAPS_INVDESTALPHA 0x00000080L
|
||||
#define D3DPBLENDCAPS_DESTCOLOR 0x00000100L
|
||||
#define D3DPBLENDCAPS_INVDESTCOLOR 0x00000200L
|
||||
#define D3DPBLENDCAPS_SRCALPHASAT 0x00000400L
|
||||
#define D3DPBLENDCAPS_BOTHSRCALPHA 0x00000800L
|
||||
#define D3DPBLENDCAPS_BOTHINVSRCALPHA 0x00001000L
|
||||
|
||||
/* D3DPRIMCAPS dwShadeCaps */
|
||||
|
||||
#define D3DPSHADECAPS_COLORFLATMONO 0x00000001L
|
||||
#define D3DPSHADECAPS_COLORFLATRGB 0x00000002L
|
||||
#define D3DPSHADECAPS_COLORGOURAUDMONO 0x00000004L
|
||||
#define D3DPSHADECAPS_COLORGOURAUDRGB 0x00000008L
|
||||
#define D3DPSHADECAPS_COLORPHONGMONO 0x00000010L
|
||||
#define D3DPSHADECAPS_COLORPHONGRGB 0x00000020L
|
||||
|
||||
#define D3DPSHADECAPS_SPECULARFLATMONO 0x00000040L
|
||||
#define D3DPSHADECAPS_SPECULARFLATRGB 0x00000080L
|
||||
#define D3DPSHADECAPS_SPECULARGOURAUDMONO 0x00000100L
|
||||
#define D3DPSHADECAPS_SPECULARGOURAUDRGB 0x00000200L
|
||||
#define D3DPSHADECAPS_SPECULARPHONGMONO 0x00000400L
|
||||
#define D3DPSHADECAPS_SPECULARPHONGRGB 0x00000800L
|
||||
|
||||
#define D3DPSHADECAPS_ALPHAFLATBLEND 0x00001000L
|
||||
#define D3DPSHADECAPS_ALPHAFLATSTIPPLED 0x00002000L
|
||||
#define D3DPSHADECAPS_ALPHAGOURAUDBLEND 0x00004000L
|
||||
#define D3DPSHADECAPS_ALPHAGOURAUDSTIPPLED 0x00008000L
|
||||
#define D3DPSHADECAPS_ALPHAPHONGBLEND 0x00010000L
|
||||
#define D3DPSHADECAPS_ALPHAPHONGSTIPPLED 0x00020000L
|
||||
|
||||
#define D3DPSHADECAPS_FOGFLAT 0x00040000L
|
||||
#define D3DPSHADECAPS_FOGGOURAUD 0x00080000L
|
||||
#define D3DPSHADECAPS_FOGPHONG 0x00100000L
|
||||
|
||||
/* D3DPRIMCAPS dwTextureCaps */
|
||||
|
||||
/*
|
||||
* Perspective-correct texturing is supported
|
||||
*/
|
||||
#define D3DPTEXTURECAPS_PERSPECTIVE 0x00000001L
|
||||
|
||||
/*
|
||||
* Power-of-2 texture dimensions are required
|
||||
*/
|
||||
#define D3DPTEXTURECAPS_POW2 0x00000002L
|
||||
|
||||
/*
|
||||
* Alpha in texture pixels is supported
|
||||
*/
|
||||
#define D3DPTEXTURECAPS_ALPHA 0x00000004L
|
||||
|
||||
/*
|
||||
* Color-keyed textures are supported
|
||||
*/
|
||||
#define D3DPTEXTURECAPS_TRANSPARENCY 0x00000008L
|
||||
|
||||
/*
|
||||
* obsolete, see D3DPTADDRESSCAPS_BORDER
|
||||
*/
|
||||
#define D3DPTEXTURECAPS_BORDER 0x00000010L
|
||||
|
||||
/*
|
||||
* Only square textures are supported
|
||||
*/
|
||||
#define D3DPTEXTURECAPS_SQUAREONLY 0x00000020L
|
||||
|
||||
#if(DIRECT3D_VERSION >= 0x0600)
|
||||
/*
|
||||
* Texture indices are not scaled by the texture size prior
|
||||
* to interpolation.
|
||||
*/
|
||||
#define D3DPTEXTURECAPS_TEXREPEATNOTSCALEDBYSIZE 0x00000040L
|
||||
|
||||
/*
|
||||
* Device can draw alpha from texture palettes
|
||||
*/
|
||||
#define D3DPTEXTURECAPS_ALPHAPALETTE 0x00000080L
|
||||
|
||||
/*
|
||||
* Device can use non-POW2 textures if:
|
||||
* 1) D3DTEXTURE_ADDRESS is set to CLAMP for this texture's stage
|
||||
* 2) D3DRS_WRAP(N) is zero for this texture's coordinates
|
||||
* 3) mip mapping is not enabled (use magnification filter only)
|
||||
*/
|
||||
#define D3DPTEXTURECAPS_NONPOW2CONDITIONAL 0x00000100L
|
||||
|
||||
#endif /* DIRECT3D_VERSION >= 0x0600 */
|
||||
#if(DIRECT3D_VERSION >= 0x0700)
|
||||
|
||||
// 0x00000200L unused
|
||||
|
||||
/*
|
||||
* Device can divide transformed texture coordinates by the
|
||||
* COUNTth texture coordinate (can do D3DTTFF_PROJECTED)
|
||||
*/
|
||||
#define D3DPTEXTURECAPS_PROJECTED 0x00000400L
|
||||
|
||||
/*
|
||||
* Device can do cubemap textures
|
||||
*/
|
||||
#define D3DPTEXTURECAPS_CUBEMAP 0x00000800L
|
||||
|
||||
#define D3DPTEXTURECAPS_COLORKEYBLEND 0x00001000L
|
||||
#endif /* DIRECT3D_VERSION >= 0x0700 */
|
||||
|
||||
/* D3DPRIMCAPS dwTextureFilterCaps */
|
||||
|
||||
#define D3DPTFILTERCAPS_NEAREST 0x00000001L
|
||||
#define D3DPTFILTERCAPS_LINEAR 0x00000002L
|
||||
#define D3DPTFILTERCAPS_MIPNEAREST 0x00000004L
|
||||
#define D3DPTFILTERCAPS_MIPLINEAR 0x00000008L
|
||||
#define D3DPTFILTERCAPS_LINEARMIPNEAREST 0x00000010L
|
||||
#define D3DPTFILTERCAPS_LINEARMIPLINEAR 0x00000020L
|
||||
|
||||
#if(DIRECT3D_VERSION >= 0x0600)
|
||||
/* Device3 Min Filter */
|
||||
#define D3DPTFILTERCAPS_MINFPOINT 0x00000100L
|
||||
#define D3DPTFILTERCAPS_MINFLINEAR 0x00000200L
|
||||
#define D3DPTFILTERCAPS_MINFANISOTROPIC 0x00000400L
|
||||
|
||||
/* Device3 Mip Filter */
|
||||
#define D3DPTFILTERCAPS_MIPFPOINT 0x00010000L
|
||||
#define D3DPTFILTERCAPS_MIPFLINEAR 0x00020000L
|
||||
|
||||
/* Device3 Mag Filter */
|
||||
#define D3DPTFILTERCAPS_MAGFPOINT 0x01000000L
|
||||
#define D3DPTFILTERCAPS_MAGFLINEAR 0x02000000L
|
||||
#define D3DPTFILTERCAPS_MAGFANISOTROPIC 0x04000000L
|
||||
#define D3DPTFILTERCAPS_MAGFAFLATCUBIC 0x08000000L
|
||||
#define D3DPTFILTERCAPS_MAGFGAUSSIANCUBIC 0x10000000L
|
||||
#endif /* DIRECT3D_VERSION >= 0x0600 */
|
||||
|
||||
/* D3DPRIMCAPS dwTextureBlendCaps */
|
||||
|
||||
#define D3DPTBLENDCAPS_DECAL 0x00000001L
|
||||
#define D3DPTBLENDCAPS_MODULATE 0x00000002L
|
||||
#define D3DPTBLENDCAPS_DECALALPHA 0x00000004L
|
||||
#define D3DPTBLENDCAPS_MODULATEALPHA 0x00000008L
|
||||
#define D3DPTBLENDCAPS_DECALMASK 0x00000010L
|
||||
#define D3DPTBLENDCAPS_MODULATEMASK 0x00000020L
|
||||
#define D3DPTBLENDCAPS_COPY 0x00000040L
|
||||
#if(DIRECT3D_VERSION >= 0x0500)
|
||||
#define D3DPTBLENDCAPS_ADD 0x00000080L
|
||||
#endif /* DIRECT3D_VERSION >= 0x0500 */
|
||||
|
||||
/* D3DPRIMCAPS dwTextureAddressCaps */
|
||||
#define D3DPTADDRESSCAPS_WRAP 0x00000001L
|
||||
#define D3DPTADDRESSCAPS_MIRROR 0x00000002L
|
||||
#define D3DPTADDRESSCAPS_CLAMP 0x00000004L
|
||||
#if(DIRECT3D_VERSION >= 0x0500)
|
||||
#define D3DPTADDRESSCAPS_BORDER 0x00000008L
|
||||
#define D3DPTADDRESSCAPS_INDEPENDENTUV 0x00000010L
|
||||
#endif /* DIRECT3D_VERSION >= 0x0500 */
|
||||
|
||||
#if(DIRECT3D_VERSION >= 0x0600)
|
||||
|
||||
/* D3DDEVICEDESC dwStencilCaps */
|
||||
|
||||
#define D3DSTENCILCAPS_KEEP 0x00000001L
|
||||
#define D3DSTENCILCAPS_ZERO 0x00000002L
|
||||
#define D3DSTENCILCAPS_REPLACE 0x00000004L
|
||||
#define D3DSTENCILCAPS_INCRSAT 0x00000008L
|
||||
#define D3DSTENCILCAPS_DECRSAT 0x00000010L
|
||||
#define D3DSTENCILCAPS_INVERT 0x00000020L
|
||||
#define D3DSTENCILCAPS_INCR 0x00000040L
|
||||
#define D3DSTENCILCAPS_DECR 0x00000080L
|
||||
|
||||
/* D3DDEVICEDESC dwTextureOpCaps */
|
||||
|
||||
#define D3DTEXOPCAPS_DISABLE 0x00000001L
|
||||
#define D3DTEXOPCAPS_SELECTARG1 0x00000002L
|
||||
#define D3DTEXOPCAPS_SELECTARG2 0x00000004L
|
||||
#define D3DTEXOPCAPS_MODULATE 0x00000008L
|
||||
#define D3DTEXOPCAPS_MODULATE2X 0x00000010L
|
||||
#define D3DTEXOPCAPS_MODULATE4X 0x00000020L
|
||||
#define D3DTEXOPCAPS_ADD 0x00000040L
|
||||
#define D3DTEXOPCAPS_ADDSIGNED 0x00000080L
|
||||
#define D3DTEXOPCAPS_ADDSIGNED2X 0x00000100L
|
||||
#define D3DTEXOPCAPS_SUBTRACT 0x00000200L
|
||||
#define D3DTEXOPCAPS_ADDSMOOTH 0x00000400L
|
||||
#define D3DTEXOPCAPS_BLENDDIFFUSEALPHA 0x00000800L
|
||||
#define D3DTEXOPCAPS_BLENDTEXTUREALPHA 0x00001000L
|
||||
#define D3DTEXOPCAPS_BLENDFACTORALPHA 0x00002000L
|
||||
#define D3DTEXOPCAPS_BLENDTEXTUREALPHAPM 0x00004000L
|
||||
#define D3DTEXOPCAPS_BLENDCURRENTALPHA 0x00008000L
|
||||
#define D3DTEXOPCAPS_PREMODULATE 0x00010000L
|
||||
#define D3DTEXOPCAPS_MODULATEALPHA_ADDCOLOR 0x00020000L
|
||||
#define D3DTEXOPCAPS_MODULATECOLOR_ADDALPHA 0x00040000L
|
||||
#define D3DTEXOPCAPS_MODULATEINVALPHA_ADDCOLOR 0x00080000L
|
||||
#define D3DTEXOPCAPS_MODULATEINVCOLOR_ADDALPHA 0x00100000L
|
||||
#define D3DTEXOPCAPS_BUMPENVMAP 0x00200000L
|
||||
#define D3DTEXOPCAPS_BUMPENVMAPLUMINANCE 0x00400000L
|
||||
#define D3DTEXOPCAPS_DOTPRODUCT3 0x00800000L
|
||||
|
||||
/* D3DDEVICEDESC dwFVFCaps flags */
|
||||
|
||||
#define D3DFVFCAPS_TEXCOORDCOUNTMASK 0x0000ffffL /* mask for texture coordinate count field */
|
||||
#define D3DFVFCAPS_DONOTSTRIPELEMENTS 0x00080000L /* Device prefers that vertex elements not be stripped */
|
||||
|
||||
#endif /* DIRECT3D_VERSION >= 0x0600 */
|
||||
|
||||
/*
|
||||
* Description for a device.
|
||||
* This is used to describe a device that is to be created or to query
|
||||
* the current device.
|
||||
*/
|
||||
typedef struct _D3DDeviceDesc {
|
||||
DWORD dwSize; /* Size of D3DDEVICEDESC structure */
|
||||
DWORD dwFlags; /* Indicates which fields have valid data */
|
||||
D3DCOLORMODEL dcmColorModel; /* Color model of device */
|
||||
DWORD dwDevCaps; /* Capabilities of device */
|
||||
D3DTRANSFORMCAPS dtcTransformCaps; /* Capabilities of transform */
|
||||
BOOL bClipping; /* Device can do 3D clipping */
|
||||
D3DLIGHTINGCAPS dlcLightingCaps; /* Capabilities of lighting */
|
||||
D3DPRIMCAPS dpcLineCaps;
|
||||
D3DPRIMCAPS dpcTriCaps;
|
||||
DWORD dwDeviceRenderBitDepth; /* One of DDBB_8, 16, etc.. */
|
||||
DWORD dwDeviceZBufferBitDepth;/* One of DDBD_16, 32, etc.. */
|
||||
DWORD dwMaxBufferSize; /* Maximum execute buffer size */
|
||||
DWORD dwMaxVertexCount; /* Maximum vertex count */
|
||||
#if(DIRECT3D_VERSION >= 0x0500)
|
||||
// *** New fields for DX5 *** //
|
||||
|
||||
// Width and height caps are 0 for legacy HALs.
|
||||
DWORD dwMinTextureWidth, dwMinTextureHeight;
|
||||
DWORD dwMaxTextureWidth, dwMaxTextureHeight;
|
||||
DWORD dwMinStippleWidth, dwMaxStippleWidth;
|
||||
DWORD dwMinStippleHeight, dwMaxStippleHeight;
|
||||
#endif /* DIRECT3D_VERSION >= 0x0500 */
|
||||
|
||||
#if(DIRECT3D_VERSION >= 0x0600)
|
||||
// New fields for DX6
|
||||
DWORD dwMaxTextureRepeat;
|
||||
DWORD dwMaxTextureAspectRatio;
|
||||
DWORD dwMaxAnisotropy;
|
||||
|
||||
// Guard band that the rasterizer can accommodate
|
||||
// Screen-space vertices inside this space but outside the viewport
|
||||
// will get clipped properly.
|
||||
D3DVALUE dvGuardBandLeft;
|
||||
D3DVALUE dvGuardBandTop;
|
||||
D3DVALUE dvGuardBandRight;
|
||||
D3DVALUE dvGuardBandBottom;
|
||||
|
||||
D3DVALUE dvExtentsAdjust;
|
||||
DWORD dwStencilCaps;
|
||||
|
||||
DWORD dwFVFCaps;
|
||||
DWORD dwTextureOpCaps;
|
||||
WORD wMaxTextureBlendStages;
|
||||
WORD wMaxSimultaneousTextures;
|
||||
#endif /* DIRECT3D_VERSION >= 0x0600 */
|
||||
} D3DDEVICEDESC, *LPD3DDEVICEDESC;
|
||||
|
||||
#if(DIRECT3D_VERSION >= 0x0700)
|
||||
typedef struct _D3DDeviceDesc7 {
|
||||
DWORD dwDevCaps; /* Capabilities of device */
|
||||
D3DPRIMCAPS dpcLineCaps;
|
||||
D3DPRIMCAPS dpcTriCaps;
|
||||
DWORD dwDeviceRenderBitDepth; /* One of DDBB_8, 16, etc.. */
|
||||
DWORD dwDeviceZBufferBitDepth;/* One of DDBD_16, 32, etc.. */
|
||||
|
||||
DWORD dwMinTextureWidth, dwMinTextureHeight;
|
||||
DWORD dwMaxTextureWidth, dwMaxTextureHeight;
|
||||
|
||||
DWORD dwMaxTextureRepeat;
|
||||
DWORD dwMaxTextureAspectRatio;
|
||||
DWORD dwMaxAnisotropy;
|
||||
|
||||
D3DVALUE dvGuardBandLeft;
|
||||
D3DVALUE dvGuardBandTop;
|
||||
D3DVALUE dvGuardBandRight;
|
||||
D3DVALUE dvGuardBandBottom;
|
||||
|
||||
D3DVALUE dvExtentsAdjust;
|
||||
DWORD dwStencilCaps;
|
||||
|
||||
DWORD dwFVFCaps;
|
||||
DWORD dwTextureOpCaps;
|
||||
WORD wMaxTextureBlendStages;
|
||||
WORD wMaxSimultaneousTextures;
|
||||
|
||||
DWORD dwMaxActiveLights;
|
||||
D3DVALUE dvMaxVertexW;
|
||||
GUID deviceGUID;
|
||||
|
||||
WORD wMaxUserClipPlanes;
|
||||
WORD wMaxVertexBlendMatrices;
|
||||
|
||||
DWORD dwVertexProcessingCaps;
|
||||
|
||||
DWORD dwReserved1;
|
||||
DWORD dwReserved2;
|
||||
DWORD dwReserved3;
|
||||
DWORD dwReserved4;
|
||||
} D3DDEVICEDESC7, *LPD3DDEVICEDESC7;
|
||||
#endif /* DIRECT3D_VERSION >= 0x0700 */
|
||||
|
||||
#define D3DDEVICEDESCSIZE (sizeof(D3DDEVICEDESC))
|
||||
#define D3DDEVICEDESC7SIZE (sizeof(D3DDEVICEDESC7))
|
||||
|
||||
typedef HRESULT (CALLBACK * LPD3DENUMDEVICESCALLBACK)(GUID FAR *lpGuid, LPSTR lpDeviceDescription, LPSTR lpDeviceName, LPD3DDEVICEDESC, LPD3DDEVICEDESC, LPVOID);
|
||||
|
||||
#if(DIRECT3D_VERSION >= 0x0700)
|
||||
typedef HRESULT (CALLBACK * LPD3DENUMDEVICESCALLBACK7)(LPSTR lpDeviceDescription, LPSTR lpDeviceName, LPD3DDEVICEDESC7, LPVOID);
|
||||
#endif /* DIRECT3D_VERSION >= 0x0700 */
|
||||
|
||||
/* D3DDEVICEDESC dwFlags indicating valid fields */
|
||||
|
||||
#define D3DDD_COLORMODEL 0x00000001L /* dcmColorModel is valid */
|
||||
#define D3DDD_DEVCAPS 0x00000002L /* dwDevCaps is valid */
|
||||
#define D3DDD_TRANSFORMCAPS 0x00000004L /* dtcTransformCaps is valid */
|
||||
#define D3DDD_LIGHTINGCAPS 0x00000008L /* dlcLightingCaps is valid */
|
||||
#define D3DDD_BCLIPPING 0x00000010L /* bClipping is valid */
|
||||
#define D3DDD_LINECAPS 0x00000020L /* dpcLineCaps is valid */
|
||||
#define D3DDD_TRICAPS 0x00000040L /* dpcTriCaps is valid */
|
||||
#define D3DDD_DEVICERENDERBITDEPTH 0x00000080L /* dwDeviceRenderBitDepth is valid */
|
||||
#define D3DDD_DEVICEZBUFFERBITDEPTH 0x00000100L /* dwDeviceZBufferBitDepth is valid */
|
||||
#define D3DDD_MAXBUFFERSIZE 0x00000200L /* dwMaxBufferSize is valid */
|
||||
#define D3DDD_MAXVERTEXCOUNT 0x00000400L /* dwMaxVertexCount is valid */
|
||||
|
||||
/* D3DDEVICEDESC dwDevCaps flags */
|
||||
|
||||
#define D3DDEVCAPS_FLOATTLVERTEX 0x00000001L /* Device accepts floating point */
|
||||
/* for post-transform vertex data */
|
||||
#define D3DDEVCAPS_SORTINCREASINGZ 0x00000002L /* Device needs data sorted for increasing Z */
|
||||
#define D3DDEVCAPS_SORTDECREASINGZ 0X00000004L /* Device needs data sorted for decreasing Z */
|
||||
#define D3DDEVCAPS_SORTEXACT 0x00000008L /* Device needs data sorted exactly */
|
||||
|
||||
#define D3DDEVCAPS_EXECUTESYSTEMMEMORY 0x00000010L /* Device can use execute buffers from system memory */
|
||||
#define D3DDEVCAPS_EXECUTEVIDEOMEMORY 0x00000020L /* Device can use execute buffers from video memory */
|
||||
#define D3DDEVCAPS_TLVERTEXSYSTEMMEMORY 0x00000040L /* Device can use TL buffers from system memory */
|
||||
#define D3DDEVCAPS_TLVERTEXVIDEOMEMORY 0x00000080L /* Device can use TL buffers from video memory */
|
||||
#define D3DDEVCAPS_TEXTURESYSTEMMEMORY 0x00000100L /* Device can texture from system memory */
|
||||
#define D3DDEVCAPS_TEXTUREVIDEOMEMORY 0x00000200L /* Device can texture from device memory */
|
||||
#if(DIRECT3D_VERSION >= 0x0500)
|
||||
#define D3DDEVCAPS_DRAWPRIMTLVERTEX 0x00000400L /* Device can draw TLVERTEX primitives */
|
||||
#define D3DDEVCAPS_CANRENDERAFTERFLIP 0x00000800L /* Device can render without waiting for flip to complete */
|
||||
#define D3DDEVCAPS_TEXTURENONLOCALVIDMEM 0x00001000L /* Device can texture from nonlocal video memory */
|
||||
#endif /* DIRECT3D_VERSION >= 0x0500 */
|
||||
#if(DIRECT3D_VERSION >= 0x0600)
|
||||
#define D3DDEVCAPS_DRAWPRIMITIVES2 0x00002000L /* Device can support DrawPrimitives2 */
|
||||
#define D3DDEVCAPS_SEPARATETEXTUREMEMORIES 0x00004000L /* Device is texturing from separate memory pools */
|
||||
#define D3DDEVCAPS_DRAWPRIMITIVES2EX 0x00008000L /* Device can support Extended DrawPrimitives2 i.e. DX7 compliant driver*/
|
||||
#endif /* DIRECT3D_VERSION >= 0x0600 */
|
||||
#if(DIRECT3D_VERSION >= 0x0700)
|
||||
#define D3DDEVCAPS_HWTRANSFORMANDLIGHT 0x00010000L /* Device can support transformation and lighting in hardware and DRAWPRIMITIVES2EX must be also */
|
||||
#define D3DDEVCAPS_CANBLTSYSTONONLOCAL 0x00020000L /* Device supports a Tex Blt from system memory to non-local vidmem */
|
||||
#define D3DDEVCAPS_HWRASTERIZATION 0x00080000L /* Device has HW acceleration for rasterization */
|
||||
|
||||
/*
|
||||
* These are the flags in the D3DDEVICEDESC7.dwVertexProcessingCaps field
|
||||
*/
|
||||
|
||||
/* device can do texgen */
|
||||
#define D3DVTXPCAPS_TEXGEN 0x00000001L
|
||||
/* device can do IDirect3DDevice7 colormaterialsource ops */
|
||||
#define D3DVTXPCAPS_MATERIALSOURCE7 0x00000002L
|
||||
/* device can do vertex fog */
|
||||
#define D3DVTXPCAPS_VERTEXFOG 0x00000004L
|
||||
/* device can do directional lights */
|
||||
#define D3DVTXPCAPS_DIRECTIONALLIGHTS 0x00000008L
|
||||
/* device can do positional lights (includes point and spot) */
|
||||
#define D3DVTXPCAPS_POSITIONALLIGHTS 0x00000010L
|
||||
/* device can do local viewer */
|
||||
#define D3DVTXPCAPS_LOCALVIEWER 0x00000020L
|
||||
|
||||
#endif /* DIRECT3D_VERSION >= 0x0700 */
|
||||
|
||||
#define D3DFDS_COLORMODEL 0x00000001L /* Match color model */
|
||||
#define D3DFDS_GUID 0x00000002L /* Match guid */
|
||||
#define D3DFDS_HARDWARE 0x00000004L /* Match hardware/software */
|
||||
#define D3DFDS_TRIANGLES 0x00000008L /* Match in triCaps */
|
||||
#define D3DFDS_LINES 0x00000010L /* Match in lineCaps */
|
||||
#define D3DFDS_MISCCAPS 0x00000020L /* Match primCaps.dwMiscCaps */
|
||||
#define D3DFDS_RASTERCAPS 0x00000040L /* Match primCaps.dwRasterCaps */
|
||||
#define D3DFDS_ZCMPCAPS 0x00000080L /* Match primCaps.dwZCmpCaps */
|
||||
#define D3DFDS_ALPHACMPCAPS 0x00000100L /* Match primCaps.dwAlphaCmpCaps */
|
||||
#define D3DFDS_SRCBLENDCAPS 0x00000200L /* Match primCaps.dwSourceBlendCaps */
|
||||
#define D3DFDS_DSTBLENDCAPS 0x00000400L /* Match primCaps.dwDestBlendCaps */
|
||||
#define D3DFDS_SHADECAPS 0x00000800L /* Match primCaps.dwShadeCaps */
|
||||
#define D3DFDS_TEXTURECAPS 0x00001000L /* Match primCaps.dwTextureCaps */
|
||||
#define D3DFDS_TEXTUREFILTERCAPS 0x00002000L /* Match primCaps.dwTextureFilterCaps */
|
||||
#define D3DFDS_TEXTUREBLENDCAPS 0x00004000L /* Match primCaps.dwTextureBlendCaps */
|
||||
#define D3DFDS_TEXTUREADDRESSCAPS 0x00008000L /* Match primCaps.dwTextureBlendCaps */
|
||||
|
||||
/*
|
||||
* FindDevice arguments
|
||||
*/
|
||||
typedef struct _D3DFINDDEVICESEARCH {
|
||||
DWORD dwSize;
|
||||
DWORD dwFlags;
|
||||
BOOL bHardware;
|
||||
D3DCOLORMODEL dcmColorModel;
|
||||
GUID guid;
|
||||
DWORD dwCaps;
|
||||
D3DPRIMCAPS dpcPrimCaps;
|
||||
} D3DFINDDEVICESEARCH, *LPD3DFINDDEVICESEARCH;
|
||||
|
||||
typedef struct _D3DFINDDEVICERESULT {
|
||||
DWORD dwSize;
|
||||
GUID guid; /* guid which matched */
|
||||
D3DDEVICEDESC ddHwDesc; /* hardware D3DDEVICEDESC */
|
||||
D3DDEVICEDESC ddSwDesc; /* software D3DDEVICEDESC */
|
||||
} D3DFINDDEVICERESULT, *LPD3DFINDDEVICERESULT;
|
||||
|
||||
/*
|
||||
* Description of execute buffer.
|
||||
*/
|
||||
typedef struct _D3DExecuteBufferDesc {
|
||||
DWORD dwSize; /* size of this structure */
|
||||
DWORD dwFlags; /* flags indicating which fields are valid */
|
||||
DWORD dwCaps; /* capabilities of execute buffer */
|
||||
DWORD dwBufferSize; /* size of execute buffer data */
|
||||
LPVOID lpData; /* pointer to actual data */
|
||||
} D3DEXECUTEBUFFERDESC, *LPD3DEXECUTEBUFFERDESC;
|
||||
|
||||
/* D3DEXECUTEBUFFER dwFlags indicating valid fields */
|
||||
|
||||
#define D3DDEB_BUFSIZE 0x00000001l /* buffer size valid */
|
||||
#define D3DDEB_CAPS 0x00000002l /* caps valid */
|
||||
#define D3DDEB_LPDATA 0x00000004l /* lpData valid */
|
||||
|
||||
/* D3DEXECUTEBUFFER dwCaps */
|
||||
|
||||
#define D3DDEBCAPS_SYSTEMMEMORY 0x00000001l /* buffer in system memory */
|
||||
#define D3DDEBCAPS_VIDEOMEMORY 0x00000002l /* buffer in device memory */
|
||||
#define D3DDEBCAPS_MEM (D3DDEBCAPS_SYSTEMMEMORY|D3DDEBCAPS_VIDEOMEMORY)
|
||||
|
||||
#if(DIRECT3D_VERSION < 0x0800)
|
||||
|
||||
#if(DIRECT3D_VERSION >= 0x0700)
|
||||
typedef struct _D3DDEVINFO_TEXTUREMANAGER {
|
||||
BOOL bThrashing; /* indicates if thrashing */
|
||||
DWORD dwApproxBytesDownloaded; /* Approximate number of bytes downloaded by texture manager */
|
||||
DWORD dwNumEvicts; /* number of textures evicted */
|
||||
DWORD dwNumVidCreates; /* number of textures created in video memory */
|
||||
DWORD dwNumTexturesUsed; /* number of textures used */
|
||||
DWORD dwNumUsedTexInVid; /* number of used textures present in video memory */
|
||||
DWORD dwWorkingSet; /* number of textures in video memory */
|
||||
DWORD dwWorkingSetBytes; /* number of bytes in video memory */
|
||||
DWORD dwTotalManaged; /* total number of managed textures */
|
||||
DWORD dwTotalBytes; /* total number of bytes of managed textures */
|
||||
DWORD dwLastPri; /* priority of last texture evicted */
|
||||
} D3DDEVINFO_TEXTUREMANAGER, *LPD3DDEVINFO_TEXTUREMANAGER;
|
||||
|
||||
typedef struct _D3DDEVINFO_TEXTURING {
|
||||
DWORD dwNumLoads; /* counts Load() API calls */
|
||||
DWORD dwApproxBytesLoaded; /* Approximate number bytes loaded via Load() */
|
||||
DWORD dwNumPreLoads; /* counts PreLoad() API calls */
|
||||
DWORD dwNumSet; /* counts SetTexture() API calls */
|
||||
DWORD dwNumCreates; /* counts texture creates */
|
||||
DWORD dwNumDestroys; /* counts texture destroys */
|
||||
DWORD dwNumSetPriorities; /* counts SetPriority() API calls */
|
||||
DWORD dwNumSetLODs; /* counts SetLOD() API calls */
|
||||
DWORD dwNumLocks; /* counts number of texture locks */
|
||||
DWORD dwNumGetDCs; /* counts number of GetDCs to textures */
|
||||
} D3DDEVINFO_TEXTURING, *LPD3DDEVINFO_TEXTURING;
|
||||
#endif /* DIRECT3D_VERSION >= 0x0700 */
|
||||
|
||||
#endif //(DIRECT3D_VERSION < 0x0800)
|
||||
|
||||
#pragma pack()
|
||||
|
||||
|
||||
#endif /* _D3DCAPS_H_ */
|
||||
|
|
@ -0,0 +1,342 @@
|
|||
/*==========================================================================;
|
||||
*
|
||||
* Copyright (C) 1995-1997 Microsoft Corporation. All Rights Reserved.
|
||||
*
|
||||
* File: d3drm.h
|
||||
* Content: Direct3DRM include file
|
||||
*
|
||||
***************************************************************************/
|
||||
|
||||
#ifndef __D3DRM_H__
|
||||
#define __D3DRM_H__
|
||||
|
||||
#include "ddraw.h"
|
||||
|
||||
#ifdef __cplusplus
|
||||
struct IDirect3DRM;
|
||||
#endif
|
||||
|
||||
typedef struct IDirect3DRM *LPDIRECT3DRM;
|
||||
|
||||
#include "d3drmobj.h"
|
||||
|
||||
#ifdef __cplusplus
|
||||
extern "C" {
|
||||
#endif
|
||||
|
||||
|
||||
DEFINE_GUID(IID_IDirect3DRM, 0x2bc49361, 0x8327, 0x11cf, 0xac, 0x4a, 0x0, 0x0, 0xc0, 0x38, 0x25, 0xa1);
|
||||
DEFINE_GUID(IID_IDirect3DRM2, 0x4516ecc8, 0x8f20, 0x11d0, 0x9b, 0x6d, 0x00, 0x00, 0xc0, 0x78, 0x1b, 0xc3);
|
||||
DEFINE_GUID(IID_IDirect3DRM3, 0x4516ec83, 0x8f20, 0x11d0, 0x9b, 0x6d, 0x00, 0x00, 0xc0, 0x78, 0x1b, 0xc3);
|
||||
WIN_TYPES(IDirect3DRM, DIRECT3DRM);
|
||||
WIN_TYPES(IDirect3DRM2, DIRECT3DRM2);
|
||||
WIN_TYPES(IDirect3DRM3, DIRECT3DRM3);
|
||||
|
||||
/*
|
||||
* Direct3DRM Object Class (for CoCreateInstance())
|
||||
*/
|
||||
DEFINE_GUID(CLSID_CDirect3DRM, 0x4516ec41, 0x8f20, 0x11d0, 0x9b, 0x6d, 0x00, 0x00, 0xc0, 0x78, 0x1b, 0xc3);
|
||||
|
||||
|
||||
/* Create a Direct3DRM API */
|
||||
STDAPI Direct3DRMCreate(LPDIRECT3DRM FAR *lplpDirect3DRM);
|
||||
|
||||
#undef INTERFACE
|
||||
#define INTERFACE IDirect3DRM
|
||||
|
||||
DECLARE_INTERFACE_(IDirect3DRM, IUnknown)
|
||||
{
|
||||
IUNKNOWN_METHODS(PURE);
|
||||
|
||||
STDMETHOD(CreateObject)
|
||||
(THIS_ REFCLSID rclsid, LPUNKNOWN pUnkOuter, REFIID riid, LPVOID FAR* ppv) PURE;
|
||||
STDMETHOD(CreateFrame) (THIS_ LPDIRECT3DRMFRAME, LPDIRECT3DRMFRAME *) PURE;
|
||||
STDMETHOD(CreateMesh) (THIS_ LPDIRECT3DRMMESH *) PURE;
|
||||
STDMETHOD(CreateMeshBuilder)(THIS_ LPDIRECT3DRMMESHBUILDER *) PURE;
|
||||
STDMETHOD(CreateFace) (THIS_ LPDIRECT3DRMFACE *) PURE;
|
||||
STDMETHOD(CreateAnimation) (THIS_ LPDIRECT3DRMANIMATION *) PURE;
|
||||
STDMETHOD(CreateAnimationSet)(THIS_ LPDIRECT3DRMANIMATIONSET *) PURE;
|
||||
STDMETHOD(CreateTexture) (THIS_ LPD3DRMIMAGE, LPDIRECT3DRMTEXTURE *) PURE;
|
||||
STDMETHOD(CreateLight) (THIS_ D3DRMLIGHTTYPE, D3DCOLOR, LPDIRECT3DRMLIGHT *) PURE;
|
||||
STDMETHOD(CreateLightRGB)
|
||||
(THIS_ D3DRMLIGHTTYPE, D3DVALUE, D3DVALUE, D3DVALUE, LPDIRECT3DRMLIGHT *) PURE;
|
||||
STDMETHOD(CreateMaterial) (THIS_ D3DVALUE, LPDIRECT3DRMMATERIAL *) PURE;
|
||||
STDMETHOD(CreateDevice) (THIS_ DWORD, DWORD, LPDIRECT3DRMDEVICE *) PURE;
|
||||
|
||||
/* Create a Windows Device using DirectDraw surfaces */
|
||||
STDMETHOD(CreateDeviceFromSurface)
|
||||
( THIS_ LPGUID lpGUID, LPDIRECTDRAW lpDD,
|
||||
LPDIRECTDRAWSURFACE lpDDSBack, LPDIRECT3DRMDEVICE *
|
||||
) PURE;
|
||||
|
||||
/* Create a Windows Device using D3D objects */
|
||||
STDMETHOD(CreateDeviceFromD3D)
|
||||
( THIS_ LPDIRECT3D lpD3D, LPDIRECT3DDEVICE lpD3DDev,
|
||||
LPDIRECT3DRMDEVICE *
|
||||
) PURE;
|
||||
|
||||
STDMETHOD(CreateDeviceFromClipper)
|
||||
( THIS_ LPDIRECTDRAWCLIPPER lpDDClipper, LPGUID lpGUID,
|
||||
int width, int height, LPDIRECT3DRMDEVICE *) PURE;
|
||||
|
||||
STDMETHOD(CreateTextureFromSurface)(THIS_ LPDIRECTDRAWSURFACE lpDDS, LPDIRECT3DRMTEXTURE *) PURE;
|
||||
|
||||
STDMETHOD(CreateShadow)
|
||||
( THIS_ LPDIRECT3DRMVISUAL, LPDIRECT3DRMLIGHT,
|
||||
D3DVALUE px, D3DVALUE py, D3DVALUE pz,
|
||||
D3DVALUE nx, D3DVALUE ny, D3DVALUE nz,
|
||||
LPDIRECT3DRMVISUAL *
|
||||
) PURE;
|
||||
STDMETHOD(CreateViewport)
|
||||
( THIS_ LPDIRECT3DRMDEVICE, LPDIRECT3DRMFRAME, DWORD, DWORD,
|
||||
DWORD, DWORD, LPDIRECT3DRMVIEWPORT *
|
||||
) PURE;
|
||||
STDMETHOD(CreateWrap)
|
||||
( THIS_ D3DRMWRAPTYPE, LPDIRECT3DRMFRAME,
|
||||
D3DVALUE ox, D3DVALUE oy, D3DVALUE oz,
|
||||
D3DVALUE dx, D3DVALUE dy, D3DVALUE dz,
|
||||
D3DVALUE ux, D3DVALUE uy, D3DVALUE uz,
|
||||
D3DVALUE ou, D3DVALUE ov,
|
||||
D3DVALUE su, D3DVALUE sv,
|
||||
LPDIRECT3DRMWRAP *
|
||||
) PURE;
|
||||
STDMETHOD(CreateUserVisual) (THIS_ D3DRMUSERVISUALCALLBACK, LPVOID lPArg, LPDIRECT3DRMUSERVISUAL *) PURE;
|
||||
STDMETHOD(LoadTexture) (THIS_ const char *, LPDIRECT3DRMTEXTURE *) PURE;
|
||||
STDMETHOD(LoadTextureFromResource) (THIS_ HRSRC rs, LPDIRECT3DRMTEXTURE *) PURE;
|
||||
|
||||
STDMETHOD(SetSearchPath) (THIS_ LPCSTR) PURE;
|
||||
STDMETHOD(AddSearchPath) (THIS_ LPCSTR) PURE;
|
||||
STDMETHOD(GetSearchPath) (THIS_ DWORD *size_return, LPSTR path_return) PURE;
|
||||
STDMETHOD(SetDefaultTextureColors)(THIS_ DWORD) PURE;
|
||||
STDMETHOD(SetDefaultTextureShades)(THIS_ DWORD) PURE;
|
||||
|
||||
STDMETHOD(GetDevices) (THIS_ LPDIRECT3DRMDEVICEARRAY *) PURE;
|
||||
STDMETHOD(GetNamedObject) (THIS_ const char *, LPDIRECT3DRMOBJECT *) PURE;
|
||||
|
||||
STDMETHOD(EnumerateObjects) (THIS_ D3DRMOBJECTCALLBACK, LPVOID) PURE;
|
||||
|
||||
STDMETHOD(Load)
|
||||
( THIS_ LPVOID, LPVOID, LPIID *, DWORD, D3DRMLOADOPTIONS,
|
||||
D3DRMLOADCALLBACK, LPVOID, D3DRMLOADTEXTURECALLBACK, LPVOID,
|
||||
LPDIRECT3DRMFRAME
|
||||
) PURE;
|
||||
STDMETHOD(Tick) (THIS_ D3DVALUE) PURE;
|
||||
};
|
||||
|
||||
#undef INTERFACE
|
||||
#define INTERFACE IDirect3DRM2
|
||||
|
||||
DECLARE_INTERFACE_(IDirect3DRM2, IUnknown)
|
||||
{
|
||||
IUNKNOWN_METHODS(PURE);
|
||||
|
||||
STDMETHOD(CreateObject)
|
||||
(THIS_ REFCLSID rclsid, LPUNKNOWN pUnkOuter, REFIID riid, LPVOID FAR* ppv) PURE;
|
||||
STDMETHOD(CreateFrame) (THIS_ LPDIRECT3DRMFRAME, LPDIRECT3DRMFRAME2 *) PURE;
|
||||
STDMETHOD(CreateMesh) (THIS_ LPDIRECT3DRMMESH *) PURE;
|
||||
STDMETHOD(CreateMeshBuilder)(THIS_ LPDIRECT3DRMMESHBUILDER2 *) PURE;
|
||||
STDMETHOD(CreateFace) (THIS_ LPDIRECT3DRMFACE *) PURE;
|
||||
STDMETHOD(CreateAnimation) (THIS_ LPDIRECT3DRMANIMATION *) PURE;
|
||||
STDMETHOD(CreateAnimationSet)(THIS_ LPDIRECT3DRMANIMATIONSET *) PURE;
|
||||
STDMETHOD(CreateTexture) (THIS_ LPD3DRMIMAGE, LPDIRECT3DRMTEXTURE2 *) PURE;
|
||||
STDMETHOD(CreateLight) (THIS_ D3DRMLIGHTTYPE, D3DCOLOR, LPDIRECT3DRMLIGHT *) PURE;
|
||||
STDMETHOD(CreateLightRGB)
|
||||
(THIS_ D3DRMLIGHTTYPE, D3DVALUE, D3DVALUE, D3DVALUE, LPDIRECT3DRMLIGHT *) PURE;
|
||||
STDMETHOD(CreateMaterial) (THIS_ D3DVALUE, LPDIRECT3DRMMATERIAL *) PURE;
|
||||
STDMETHOD(CreateDevice) (THIS_ DWORD, DWORD, LPDIRECT3DRMDEVICE2 *) PURE;
|
||||
|
||||
/* Create a Windows Device using DirectDraw surfaces */
|
||||
STDMETHOD(CreateDeviceFromSurface)
|
||||
( THIS_ LPGUID lpGUID, LPDIRECTDRAW lpDD,
|
||||
LPDIRECTDRAWSURFACE lpDDSBack, LPDIRECT3DRMDEVICE2 *
|
||||
) PURE;
|
||||
|
||||
/* Create a Windows Device using D3D objects */
|
||||
STDMETHOD(CreateDeviceFromD3D)
|
||||
( THIS_ LPDIRECT3D2 lpD3D, LPDIRECT3DDEVICE2 lpD3DDev,
|
||||
LPDIRECT3DRMDEVICE2 *
|
||||
) PURE;
|
||||
|
||||
STDMETHOD(CreateDeviceFromClipper)
|
||||
( THIS_ LPDIRECTDRAWCLIPPER lpDDClipper, LPGUID lpGUID,
|
||||
int width, int height, LPDIRECT3DRMDEVICE2 *) PURE;
|
||||
|
||||
STDMETHOD(CreateTextureFromSurface)(THIS_ LPDIRECTDRAWSURFACE lpDDS, LPDIRECT3DRMTEXTURE2 *) PURE;
|
||||
|
||||
STDMETHOD(CreateShadow)
|
||||
( THIS_ LPDIRECT3DRMVISUAL, LPDIRECT3DRMLIGHT,
|
||||
D3DVALUE px, D3DVALUE py, D3DVALUE pz,
|
||||
D3DVALUE nx, D3DVALUE ny, D3DVALUE nz,
|
||||
LPDIRECT3DRMVISUAL *
|
||||
) PURE;
|
||||
STDMETHOD(CreateViewport)
|
||||
( THIS_ LPDIRECT3DRMDEVICE, LPDIRECT3DRMFRAME, DWORD, DWORD,
|
||||
DWORD, DWORD, LPDIRECT3DRMVIEWPORT *
|
||||
) PURE;
|
||||
STDMETHOD(CreateWrap)
|
||||
( THIS_ D3DRMWRAPTYPE, LPDIRECT3DRMFRAME,
|
||||
D3DVALUE ox, D3DVALUE oy, D3DVALUE oz,
|
||||
D3DVALUE dx, D3DVALUE dy, D3DVALUE dz,
|
||||
D3DVALUE ux, D3DVALUE uy, D3DVALUE uz,
|
||||
D3DVALUE ou, D3DVALUE ov,
|
||||
D3DVALUE su, D3DVALUE sv,
|
||||
LPDIRECT3DRMWRAP *
|
||||
) PURE;
|
||||
STDMETHOD(CreateUserVisual) (THIS_ D3DRMUSERVISUALCALLBACK, LPVOID lPArg, LPDIRECT3DRMUSERVISUAL *) PURE;
|
||||
STDMETHOD(LoadTexture) (THIS_ const char *, LPDIRECT3DRMTEXTURE2 *) PURE;
|
||||
STDMETHOD(LoadTextureFromResource) (THIS_ HMODULE hModule, LPCTSTR strName, LPCTSTR strType, LPDIRECT3DRMTEXTURE2 *) PURE;
|
||||
|
||||
STDMETHOD(SetSearchPath) (THIS_ LPCSTR) PURE;
|
||||
STDMETHOD(AddSearchPath) (THIS_ LPCSTR) PURE;
|
||||
STDMETHOD(GetSearchPath) (THIS_ DWORD *size_return, LPSTR path_return) PURE;
|
||||
STDMETHOD(SetDefaultTextureColors)(THIS_ DWORD) PURE;
|
||||
STDMETHOD(SetDefaultTextureShades)(THIS_ DWORD) PURE;
|
||||
|
||||
STDMETHOD(GetDevices) (THIS_ LPDIRECT3DRMDEVICEARRAY *) PURE;
|
||||
STDMETHOD(GetNamedObject) (THIS_ const char *, LPDIRECT3DRMOBJECT *) PURE;
|
||||
|
||||
STDMETHOD(EnumerateObjects) (THIS_ D3DRMOBJECTCALLBACK, LPVOID) PURE;
|
||||
|
||||
STDMETHOD(Load)
|
||||
( THIS_ LPVOID, LPVOID, LPIID *, DWORD, D3DRMLOADOPTIONS,
|
||||
D3DRMLOADCALLBACK, LPVOID, D3DRMLOADTEXTURECALLBACK, LPVOID,
|
||||
LPDIRECT3DRMFRAME
|
||||
) PURE;
|
||||
STDMETHOD(Tick) (THIS_ D3DVALUE) PURE;
|
||||
|
||||
STDMETHOD(CreateProgressiveMesh)(THIS_ LPDIRECT3DRMPROGRESSIVEMESH *) PURE;
|
||||
};
|
||||
|
||||
#undef INTERFACE
|
||||
#define INTERFACE IDirect3DRM3
|
||||
|
||||
DECLARE_INTERFACE_(IDirect3DRM3, IUnknown)
|
||||
{
|
||||
IUNKNOWN_METHODS(PURE);
|
||||
|
||||
STDMETHOD(CreateObject)
|
||||
(THIS_ REFCLSID rclsid, LPUNKNOWN pUnkOuter, REFIID riid, LPVOID FAR* ppv) PURE;
|
||||
STDMETHOD(CreateFrame) (THIS_ LPDIRECT3DRMFRAME3, LPDIRECT3DRMFRAME3 *) PURE;
|
||||
STDMETHOD(CreateMesh) (THIS_ LPDIRECT3DRMMESH *) PURE;
|
||||
STDMETHOD(CreateMeshBuilder)(THIS_ LPDIRECT3DRMMESHBUILDER3 *) PURE;
|
||||
STDMETHOD(CreateFace) (THIS_ LPDIRECT3DRMFACE2 *) PURE;
|
||||
STDMETHOD(CreateAnimation) (THIS_ LPDIRECT3DRMANIMATION2 *) PURE;
|
||||
STDMETHOD(CreateAnimationSet)(THIS_ LPDIRECT3DRMANIMATIONSET2 *) PURE;
|
||||
STDMETHOD(CreateTexture) (THIS_ LPD3DRMIMAGE, LPDIRECT3DRMTEXTURE3 *) PURE;
|
||||
STDMETHOD(CreateLight) (THIS_ D3DRMLIGHTTYPE, D3DCOLOR, LPDIRECT3DRMLIGHT *) PURE;
|
||||
STDMETHOD(CreateLightRGB)
|
||||
(THIS_ D3DRMLIGHTTYPE, D3DVALUE, D3DVALUE, D3DVALUE, LPDIRECT3DRMLIGHT *) PURE;
|
||||
STDMETHOD(CreateMaterial) (THIS_ D3DVALUE, LPDIRECT3DRMMATERIAL2 *) PURE;
|
||||
STDMETHOD(CreateDevice) (THIS_ DWORD, DWORD, LPDIRECT3DRMDEVICE3 *) PURE;
|
||||
|
||||
/* Create a Windows Device using DirectDraw surfaces */
|
||||
STDMETHOD(CreateDeviceFromSurface)
|
||||
( THIS_ LPGUID lpGUID, LPDIRECTDRAW lpDD,
|
||||
LPDIRECTDRAWSURFACE lpDDSBack, DWORD dwFlags, LPDIRECT3DRMDEVICE3 *
|
||||
) PURE;
|
||||
|
||||
/* Create a Windows Device using D3D objects */
|
||||
STDMETHOD(CreateDeviceFromD3D)
|
||||
( THIS_ LPDIRECT3D2 lpD3D, LPDIRECT3DDEVICE2 lpD3DDev,
|
||||
LPDIRECT3DRMDEVICE3 *
|
||||
) PURE;
|
||||
|
||||
STDMETHOD(CreateDeviceFromClipper)
|
||||
( THIS_ LPDIRECTDRAWCLIPPER lpDDClipper, LPGUID lpGUID,
|
||||
int width, int height, LPDIRECT3DRMDEVICE3 *) PURE;
|
||||
|
||||
STDMETHOD(CreateTextureFromSurface)(THIS_ LPDIRECTDRAWSURFACE lpDDS, LPDIRECT3DRMTEXTURE3 *) PURE;
|
||||
|
||||
STDMETHOD(CreateShadow)
|
||||
( THIS_ LPUNKNOWN, LPDIRECT3DRMLIGHT,
|
||||
D3DVALUE px, D3DVALUE py, D3DVALUE pz,
|
||||
D3DVALUE nx, D3DVALUE ny, D3DVALUE nz,
|
||||
LPDIRECT3DRMSHADOW2 *
|
||||
) PURE;
|
||||
STDMETHOD(CreateViewport)
|
||||
( THIS_ LPDIRECT3DRMDEVICE3, LPDIRECT3DRMFRAME3, DWORD, DWORD,
|
||||
DWORD, DWORD, LPDIRECT3DRMVIEWPORT2 *
|
||||
) PURE;
|
||||
STDMETHOD(CreateWrap)
|
||||
( THIS_ D3DRMWRAPTYPE, LPDIRECT3DRMFRAME3,
|
||||
D3DVALUE ox, D3DVALUE oy, D3DVALUE oz,
|
||||
D3DVALUE dx, D3DVALUE dy, D3DVALUE dz,
|
||||
D3DVALUE ux, D3DVALUE uy, D3DVALUE uz,
|
||||
D3DVALUE ou, D3DVALUE ov,
|
||||
D3DVALUE su, D3DVALUE sv,
|
||||
LPDIRECT3DRMWRAP *
|
||||
) PURE;
|
||||
STDMETHOD(CreateUserVisual) (THIS_ D3DRMUSERVISUALCALLBACK, LPVOID lPArg, LPDIRECT3DRMUSERVISUAL *) PURE;
|
||||
STDMETHOD(LoadTexture) (THIS_ const char *, LPDIRECT3DRMTEXTURE3 *) PURE;
|
||||
STDMETHOD(LoadTextureFromResource) (THIS_ HMODULE hModule, LPCTSTR strName, LPCTSTR strType, LPDIRECT3DRMTEXTURE3 *) PURE;
|
||||
|
||||
STDMETHOD(SetSearchPath) (THIS_ LPCSTR) PURE;
|
||||
STDMETHOD(AddSearchPath) (THIS_ LPCSTR) PURE;
|
||||
STDMETHOD(GetSearchPath) (THIS_ DWORD *size_return, LPSTR path_return) PURE;
|
||||
STDMETHOD(SetDefaultTextureColors)(THIS_ DWORD) PURE;
|
||||
STDMETHOD(SetDefaultTextureShades)(THIS_ DWORD) PURE;
|
||||
|
||||
STDMETHOD(GetDevices) (THIS_ LPDIRECT3DRMDEVICEARRAY *) PURE;
|
||||
STDMETHOD(GetNamedObject) (THIS_ const char *, LPDIRECT3DRMOBJECT *) PURE;
|
||||
|
||||
STDMETHOD(EnumerateObjects) (THIS_ D3DRMOBJECTCALLBACK, LPVOID) PURE;
|
||||
|
||||
STDMETHOD(Load)
|
||||
( THIS_ LPVOID, LPVOID, LPIID *, DWORD, D3DRMLOADOPTIONS,
|
||||
D3DRMLOADCALLBACK, LPVOID, D3DRMLOADTEXTURE3CALLBACK, LPVOID,
|
||||
LPDIRECT3DRMFRAME3
|
||||
) PURE;
|
||||
STDMETHOD(Tick) (THIS_ D3DVALUE) PURE;
|
||||
|
||||
STDMETHOD(CreateProgressiveMesh)(THIS_ LPDIRECT3DRMPROGRESSIVEMESH *) PURE;
|
||||
|
||||
/* Used with IDirect3DRMObject2 */
|
||||
STDMETHOD(RegisterClient) (THIS_ REFGUID rguid, LPDWORD lpdwID) PURE;
|
||||
STDMETHOD(UnregisterClient) (THIS_ REFGUID rguid) PURE;
|
||||
|
||||
STDMETHOD(CreateClippedVisual) (THIS_ LPDIRECT3DRMVISUAL, LPDIRECT3DRMCLIPPEDVISUAL *) PURE;
|
||||
STDMETHOD(SetOptions) (THIS_ DWORD);
|
||||
STDMETHOD(GetOptions) (THIS_ LPDWORD);
|
||||
};
|
||||
|
||||
#define D3DRM_OK DD_OK
|
||||
#define D3DRMERR_BADOBJECT MAKE_DDHRESULT(781)
|
||||
#define D3DRMERR_BADTYPE MAKE_DDHRESULT(782)
|
||||
#define D3DRMERR_BADALLOC MAKE_DDHRESULT(783)
|
||||
#define D3DRMERR_FACEUSED MAKE_DDHRESULT(784)
|
||||
#define D3DRMERR_NOTFOUND MAKE_DDHRESULT(785)
|
||||
#define D3DRMERR_NOTDONEYET MAKE_DDHRESULT(786)
|
||||
#define D3DRMERR_FILENOTFOUND MAKE_DDHRESULT(787)
|
||||
#define D3DRMERR_BADFILE MAKE_DDHRESULT(788)
|
||||
#define D3DRMERR_BADDEVICE MAKE_DDHRESULT(789)
|
||||
#define D3DRMERR_BADVALUE MAKE_DDHRESULT(790)
|
||||
#define D3DRMERR_BADMAJORVERSION MAKE_DDHRESULT(791)
|
||||
#define D3DRMERR_BADMINORVERSION MAKE_DDHRESULT(792)
|
||||
#define D3DRMERR_UNABLETOEXECUTE MAKE_DDHRESULT(793)
|
||||
#define D3DRMERR_LIBRARYNOTFOUND MAKE_DDHRESULT(794)
|
||||
#define D3DRMERR_INVALIDLIBRARY MAKE_DDHRESULT(795)
|
||||
#define D3DRMERR_PENDING MAKE_DDHRESULT(796)
|
||||
#define D3DRMERR_NOTENOUGHDATA MAKE_DDHRESULT(797)
|
||||
#define D3DRMERR_REQUESTTOOLARGE MAKE_DDHRESULT(798)
|
||||
#define D3DRMERR_REQUESTTOOSMALL MAKE_DDHRESULT(799)
|
||||
#define D3DRMERR_CONNECTIONLOST MAKE_DDHRESULT(800)
|
||||
#define D3DRMERR_LOADABORTED MAKE_DDHRESULT(801)
|
||||
#define D3DRMERR_NOINTERNET MAKE_DDHRESULT(802)
|
||||
#define D3DRMERR_BADCACHEFILE MAKE_DDHRESULT(803)
|
||||
#define D3DRMERR_BOXNOTSET MAKE_DDHRESULT(804)
|
||||
#define D3DRMERR_BADPMDATA MAKE_DDHRESULT(805)
|
||||
#define D3DRMERR_CLIENTNOTREGISTERED MAKE_DDHRESULT(806)
|
||||
#define D3DRMERR_NOTCREATEDFROMDDS MAKE_DDHRESULT(807)
|
||||
#define D3DRMERR_NOSUCHKEY MAKE_DDHRESULT(808)
|
||||
#define D3DRMERR_INCOMPATABLEKEY MAKE_DDHRESULT(809)
|
||||
#define D3DRMERR_ELEMENTINUSE MAKE_DDHRESULT(810)
|
||||
#define D3DRMERR_TEXTUREFORMATNOTFOUND MAKE_DDHRESULT(811)
|
||||
#define D3DRMERR_NOTAGGREGATED MAKE_DDHRESULT(812)
|
||||
|
||||
#ifdef __cplusplus
|
||||
};
|
||||
#endif
|
||||
|
||||
#endif /* _D3DRMAPI_H_ */
|
||||
|
||||
|
|
@ -0,0 +1,695 @@
|
|||
/*==========================================================================;
|
||||
*
|
||||
* Copyright (C) 1995-1997 Microsoft Corporation. All Rights Reserved.
|
||||
*
|
||||
* File: d3drm.h
|
||||
* Content: Direct3DRM include file
|
||||
*
|
||||
***************************************************************************/
|
||||
|
||||
#ifndef __D3DRMDEFS_H__
|
||||
#define __D3DRMDEFS_H__
|
||||
|
||||
#include <stddef.h>
|
||||
#include "d3dtypes.h"
|
||||
|
||||
#ifdef WIN32
|
||||
#define D3DRMAPI __stdcall
|
||||
#else
|
||||
#define D3DRMAPI
|
||||
#endif
|
||||
|
||||
#if defined(__cplusplus)
|
||||
extern "C" {
|
||||
#endif
|
||||
|
||||
#ifndef TRUE
|
||||
#define FALSE 0
|
||||
#define TRUE 1
|
||||
#endif
|
||||
|
||||
typedef struct _D3DRMVECTOR4D
|
||||
{ D3DVALUE x, y, z, w;
|
||||
} D3DRMVECTOR4D, *LPD3DRMVECTOR4D;
|
||||
|
||||
typedef D3DVALUE D3DRMMATRIX4D[4][4];
|
||||
|
||||
typedef struct _D3DRMQUATERNION
|
||||
{ D3DVALUE s;
|
||||
D3DVECTOR v;
|
||||
} D3DRMQUATERNION, *LPD3DRMQUATERNION;
|
||||
|
||||
typedef struct _D3DRMRAY
|
||||
{ D3DVECTOR dvDir;
|
||||
D3DVECTOR dvPos;
|
||||
} D3DRMRAY, *LPD3DRMRAY;
|
||||
|
||||
typedef struct _D3DRMBOX
|
||||
{ D3DVECTOR min, max;
|
||||
} D3DRMBOX, *LPD3DRMBOX;
|
||||
|
||||
typedef void (*D3DRMWRAPCALLBACK)
|
||||
(LPD3DVECTOR, int* u, int* v, LPD3DVECTOR a, LPD3DVECTOR b, LPVOID);
|
||||
|
||||
typedef enum _D3DRMLIGHTTYPE
|
||||
{ D3DRMLIGHT_AMBIENT,
|
||||
D3DRMLIGHT_POINT,
|
||||
D3DRMLIGHT_SPOT,
|
||||
D3DRMLIGHT_DIRECTIONAL,
|
||||
D3DRMLIGHT_PARALLELPOINT
|
||||
} D3DRMLIGHTTYPE, *LPD3DRMLIGHTTYPE;
|
||||
|
||||
typedef enum _D3DRMSHADEMODE {
|
||||
D3DRMSHADE_FLAT = 0,
|
||||
D3DRMSHADE_GOURAUD = 1,
|
||||
D3DRMSHADE_PHONG = 2,
|
||||
|
||||
D3DRMSHADE_MASK = 7,
|
||||
D3DRMSHADE_MAX = 8
|
||||
} D3DRMSHADEMODE, *LPD3DRMSHADEMODE;
|
||||
|
||||
typedef enum _D3DRMLIGHTMODE {
|
||||
D3DRMLIGHT_OFF = 0 * D3DRMSHADE_MAX,
|
||||
D3DRMLIGHT_ON = 1 * D3DRMSHADE_MAX,
|
||||
|
||||
D3DRMLIGHT_MASK = 7 * D3DRMSHADE_MAX,
|
||||
D3DRMLIGHT_MAX = 8 * D3DRMSHADE_MAX
|
||||
} D3DRMLIGHTMODE, *LPD3DRMLIGHTMODE;
|
||||
|
||||
typedef enum _D3DRMFILLMODE {
|
||||
D3DRMFILL_POINTS = 0 * D3DRMLIGHT_MAX,
|
||||
D3DRMFILL_WIREFRAME = 1 * D3DRMLIGHT_MAX,
|
||||
D3DRMFILL_SOLID = 2 * D3DRMLIGHT_MAX,
|
||||
|
||||
D3DRMFILL_MASK = 7 * D3DRMLIGHT_MAX,
|
||||
D3DRMFILL_MAX = 8 * D3DRMLIGHT_MAX
|
||||
} D3DRMFILLMODE, *LPD3DRMFILLMODE;
|
||||
|
||||
typedef DWORD D3DRMRENDERQUALITY, *LPD3DRMRENDERQUALITY;
|
||||
|
||||
#define D3DRMRENDER_WIREFRAME (D3DRMSHADE_FLAT+D3DRMLIGHT_OFF+D3DRMFILL_WIREFRAME)
|
||||
#define D3DRMRENDER_UNLITFLAT (D3DRMSHADE_FLAT+D3DRMLIGHT_OFF+D3DRMFILL_SOLID)
|
||||
#define D3DRMRENDER_FLAT (D3DRMSHADE_FLAT+D3DRMLIGHT_ON+D3DRMFILL_SOLID)
|
||||
#define D3DRMRENDER_GOURAUD (D3DRMSHADE_GOURAUD+D3DRMLIGHT_ON+D3DRMFILL_SOLID)
|
||||
#define D3DRMRENDER_PHONG (D3DRMSHADE_PHONG+D3DRMLIGHT_ON+D3DRMFILL_SOLID)
|
||||
|
||||
#define D3DRMRENDERMODE_BLENDEDTRANSPARENCY 1
|
||||
#define D3DRMRENDERMODE_SORTEDTRANSPARENCY 2
|
||||
#define D3DRMRENDERMODE_LIGHTINMODELSPACE 8
|
||||
#define D3DRMRENDERMODE_VIEWDEPENDENTSPECULAR 16
|
||||
#define D3DRMRENDERMODE_DISABLESORTEDALPHAZWRITE 32
|
||||
|
||||
typedef enum _D3DRMTEXTUREQUALITY
|
||||
{ D3DRMTEXTURE_NEAREST, /* choose nearest texel */
|
||||
D3DRMTEXTURE_LINEAR, /* interpolate 4 texels */
|
||||
D3DRMTEXTURE_MIPNEAREST, /* nearest texel in nearest mipmap */
|
||||
D3DRMTEXTURE_MIPLINEAR, /* interpolate 2 texels from 2 mipmaps */
|
||||
D3DRMTEXTURE_LINEARMIPNEAREST, /* interpolate 4 texels in nearest mipmap */
|
||||
D3DRMTEXTURE_LINEARMIPLINEAR /* interpolate 8 texels from 2 mipmaps */
|
||||
} D3DRMTEXTUREQUALITY, *LPD3DRMTEXTUREQUALITY;
|
||||
|
||||
/*
|
||||
* Texture flags
|
||||
*/
|
||||
#define D3DRMTEXTURE_FORCERESIDENT 0x00000001 /* texture should be kept in video memory */
|
||||
#define D3DRMTEXTURE_STATIC 0x00000002 /* texture will not change */
|
||||
#define D3DRMTEXTURE_DOWNSAMPLEPOINT 0x00000004 /* point filtering should be used when downsampling */
|
||||
#define D3DRMTEXTURE_DOWNSAMPLEBILINEAR 0x00000008 /* bilinear filtering should be used when downsampling */
|
||||
#define D3DRMTEXTURE_DOWNSAMPLEREDUCEDEPTH 0x00000010 /* reduce bit depth when downsampling */
|
||||
#define D3DRMTEXTURE_DOWNSAMPLENONE 0x00000020 /* texture should never be downsampled */
|
||||
#define D3DRMTEXTURE_CHANGEDPIXELS 0x00000040 /* pixels have changed */
|
||||
#define D3DRMTEXTURE_CHANGEDPALETTE 0x00000080 /* palette has changed */
|
||||
#define D3DRMTEXTURE_INVALIDATEONLY 0x00000100 /* dirty regions are invalid */
|
||||
|
||||
/*
|
||||
* Shadow flags
|
||||
*/
|
||||
#define D3DRMSHADOW_TRUEALPHA 0x00000001 /* shadow should render without artifacts when true alpha is on */
|
||||
|
||||
typedef enum _D3DRMCOMBINETYPE
|
||||
{ D3DRMCOMBINE_REPLACE,
|
||||
D3DRMCOMBINE_BEFORE,
|
||||
D3DRMCOMBINE_AFTER
|
||||
} D3DRMCOMBINETYPE, *LPD3DRMCOMBINETYPE;
|
||||
|
||||
typedef D3DCOLORMODEL D3DRMCOLORMODEL, *LPD3DRMCOLORMODEL;
|
||||
|
||||
typedef enum _D3DRMPALETTEFLAGS
|
||||
{ D3DRMPALETTE_FREE, /* renderer may use this entry freely */
|
||||
D3DRMPALETTE_READONLY, /* fixed but may be used by renderer */
|
||||
D3DRMPALETTE_RESERVED /* may not be used by renderer */
|
||||
} D3DRMPALETTEFLAGS, *LPD3DRMPALETTEFLAGS;
|
||||
|
||||
typedef struct _D3DRMPALETTEENTRY
|
||||
{ unsigned char red; /* 0 .. 255 */
|
||||
unsigned char green; /* 0 .. 255 */
|
||||
unsigned char blue; /* 0 .. 255 */
|
||||
unsigned char flags; /* one of D3DRMPALETTEFLAGS */
|
||||
} D3DRMPALETTEENTRY, *LPD3DRMPALETTEENTRY;
|
||||
|
||||
typedef struct _D3DRMIMAGE
|
||||
{ int width, height; /* width and height in pixels */
|
||||
int aspectx, aspecty; /* aspect ratio for non-square pixels */
|
||||
int depth; /* bits per pixel */
|
||||
int rgb; /* if false, pixels are indices into a
|
||||
palette otherwise, pixels encode
|
||||
RGB values. */
|
||||
int bytes_per_line; /* number of bytes of memory for a
|
||||
scanline. This must be a multiple
|
||||
of 4. */
|
||||
void* buffer1; /* memory to render into (first buffer). */
|
||||
void* buffer2; /* second rendering buffer for double
|
||||
buffering, set to NULL for single
|
||||
buffering. */
|
||||
unsigned long red_mask;
|
||||
unsigned long green_mask;
|
||||
unsigned long blue_mask;
|
||||
unsigned long alpha_mask; /* if rgb is true, these are masks for
|
||||
the red, green and blue parts of a
|
||||
pixel. Otherwise, these are masks
|
||||
for the significant bits of the
|
||||
red, green and blue elements in the
|
||||
palette. For instance, most SVGA
|
||||
displays use 64 intensities of red,
|
||||
green and blue, so the masks should
|
||||
all be set to 0xfc. */
|
||||
int palette_size; /* number of entries in palette */
|
||||
D3DRMPALETTEENTRY* palette; /* description of the palette (only if
|
||||
rgb is false). Must be (1<<depth)
|
||||
elements. */
|
||||
} D3DRMIMAGE, *LPD3DRMIMAGE;
|
||||
|
||||
typedef enum _D3DRMWRAPTYPE
|
||||
{ D3DRMWRAP_FLAT,
|
||||
D3DRMWRAP_CYLINDER,
|
||||
D3DRMWRAP_SPHERE,
|
||||
D3DRMWRAP_CHROME,
|
||||
D3DRMWRAP_SHEET,
|
||||
D3DRMWRAP_BOX
|
||||
} D3DRMWRAPTYPE, *LPD3DRMWRAPTYPE;
|
||||
|
||||
#define D3DRMWIREFRAME_CULL 1 /* cull backfaces */
|
||||
#define D3DRMWIREFRAME_HIDDENLINE 2 /* lines are obscured by closer objects */
|
||||
|
||||
/*
|
||||
* Do not use righthanded perspective in Viewport2::SetProjection().
|
||||
* Set up righthanded mode by using IDirect3DRM3::SetOptions().
|
||||
*/
|
||||
typedef enum _D3DRMPROJECTIONTYPE
|
||||
{ D3DRMPROJECT_PERSPECTIVE,
|
||||
D3DRMPROJECT_ORTHOGRAPHIC,
|
||||
D3DRMPROJECT_RIGHTHANDPERSPECTIVE, /* Only valid pre-DX6 */
|
||||
D3DRMPROJECT_RIGHTHANDORTHOGRAPHIC /* Only valid pre-DX6 */
|
||||
} D3DRMPROJECTIONTYPE, *LPD3DRMPROJECTIONTYPE;
|
||||
|
||||
#define D3DRMOPTIONS_LEFTHANDED 0x00000001L /* Default */
|
||||
#define D3DRMOPTIONS_RIGHTHANDED 0x00000002L
|
||||
|
||||
typedef enum _D3DRMXOFFORMAT
|
||||
{ D3DRMXOF_BINARY,
|
||||
D3DRMXOF_COMPRESSED,
|
||||
D3DRMXOF_TEXT
|
||||
} D3DRMXOFFORMAT, *LPD3DRMXOFFORMAT;
|
||||
|
||||
typedef DWORD D3DRMSAVEOPTIONS;
|
||||
#define D3DRMXOFSAVE_NORMALS 1
|
||||
#define D3DRMXOFSAVE_TEXTURECOORDINATES 2
|
||||
#define D3DRMXOFSAVE_MATERIALS 4
|
||||
#define D3DRMXOFSAVE_TEXTURENAMES 8
|
||||
#define D3DRMXOFSAVE_ALL 15
|
||||
#define D3DRMXOFSAVE_TEMPLATES 16
|
||||
#define D3DRMXOFSAVE_TEXTURETOPOLOGY 32
|
||||
|
||||
typedef enum _D3DRMCOLORSOURCE
|
||||
{ D3DRMCOLOR_FROMFACE,
|
||||
D3DRMCOLOR_FROMVERTEX
|
||||
} D3DRMCOLORSOURCE, *LPD3DRMCOLORSOURCE;
|
||||
|
||||
typedef enum _D3DRMFRAMECONSTRAINT
|
||||
{ D3DRMCONSTRAIN_Z, /* use only X and Y rotations */
|
||||
D3DRMCONSTRAIN_Y, /* use only X and Z rotations */
|
||||
D3DRMCONSTRAIN_X /* use only Y and Z rotations */
|
||||
} D3DRMFRAMECONSTRAINT, *LPD3DRMFRAMECONSTRAINT;
|
||||
|
||||
typedef enum _D3DRMMATERIALMODE
|
||||
{ D3DRMMATERIAL_FROMMESH,
|
||||
D3DRMMATERIAL_FROMPARENT,
|
||||
D3DRMMATERIAL_FROMFRAME
|
||||
} D3DRMMATERIALMODE, *LPD3DRMMATERIALMODE;
|
||||
|
||||
typedef enum _D3DRMFOGMODE
|
||||
{ D3DRMFOG_LINEAR, /* linear between start and end */
|
||||
D3DRMFOG_EXPONENTIAL, /* density * exp(-distance) */
|
||||
D3DRMFOG_EXPONENTIALSQUARED /* density * exp(-distance*distance) */
|
||||
} D3DRMFOGMODE, *LPD3DRMFOGMODE;
|
||||
|
||||
typedef enum _D3DRMZBUFFERMODE {
|
||||
D3DRMZBUFFER_FROMPARENT, /* default */
|
||||
D3DRMZBUFFER_ENABLE, /* enable zbuffering */
|
||||
D3DRMZBUFFER_DISABLE /* disable zbuffering */
|
||||
} D3DRMZBUFFERMODE, *LPD3DRMZBUFFERMODE;
|
||||
|
||||
typedef enum _D3DRMSORTMODE {
|
||||
D3DRMSORT_FROMPARENT, /* default */
|
||||
D3DRMSORT_NONE, /* don't sort child frames */
|
||||
D3DRMSORT_FRONTTOBACK, /* sort child frames front-to-back */
|
||||
D3DRMSORT_BACKTOFRONT /* sort child frames back-to-front */
|
||||
} D3DRMSORTMODE, *LPD3DRMSORTMODE;
|
||||
|
||||
typedef struct _D3DRMMATERIALOVERRIDE
|
||||
{
|
||||
DWORD dwSize; /* Size of this structure */
|
||||
DWORD dwFlags; /* Indicate which fields are valid */
|
||||
D3DCOLORVALUE dcDiffuse; /* RGBA */
|
||||
D3DCOLORVALUE dcAmbient; /* RGB */
|
||||
D3DCOLORVALUE dcEmissive; /* RGB */
|
||||
D3DCOLORVALUE dcSpecular; /* RGB */
|
||||
D3DVALUE dvPower;
|
||||
LPUNKNOWN lpD3DRMTex;
|
||||
} D3DRMMATERIALOVERRIDE, *LPD3DRMMATERIALOVERRIDE;
|
||||
|
||||
#define D3DRMMATERIALOVERRIDE_DIFFUSE_ALPHAONLY 0x00000001L
|
||||
#define D3DRMMATERIALOVERRIDE_DIFFUSE_RGBONLY 0x00000002L
|
||||
#define D3DRMMATERIALOVERRIDE_DIFFUSE 0x00000003L
|
||||
#define D3DRMMATERIALOVERRIDE_AMBIENT 0x00000004L
|
||||
#define D3DRMMATERIALOVERRIDE_EMISSIVE 0x00000008L
|
||||
#define D3DRMMATERIALOVERRIDE_SPECULAR 0x00000010L
|
||||
#define D3DRMMATERIALOVERRIDE_POWER 0x00000020L
|
||||
#define D3DRMMATERIALOVERRIDE_TEXTURE 0x00000040L
|
||||
#define D3DRMMATERIALOVERRIDE_DIFFUSE_ALPHAMULTIPLY 0x00000080L
|
||||
#define D3DRMMATERIALOVERRIDE_ALL 0x000000FFL
|
||||
|
||||
#define D3DRMFPTF_ALPHA 0x00000001L
|
||||
#define D3DRMFPTF_NOALPHA 0x00000002L
|
||||
#define D3DRMFPTF_PALETTIZED 0x00000004L
|
||||
#define D3DRMFPTF_NOTPALETTIZED 0x00000008L
|
||||
|
||||
#define D3DRMSTATECHANGE_UPDATEONLY 0x000000001L
|
||||
#define D3DRMSTATECHANGE_VOLATILE 0x000000002L
|
||||
#define D3DRMSTATECHANGE_NONVOLATILE 0x000000004L
|
||||
#define D3DRMSTATECHANGE_RENDER 0x000000020L
|
||||
#define D3DRMSTATECHANGE_LIGHT 0x000000040L
|
||||
|
||||
/*
|
||||
* Values for flags in RM3::CreateDeviceFromSurface
|
||||
*/
|
||||
#define D3DRMDEVICE_NOZBUFFER 0x00000001L
|
||||
|
||||
/*
|
||||
* Values for flags in Object2::SetClientData
|
||||
*/
|
||||
#define D3DRMCLIENTDATA_NONE 0x00000001L
|
||||
#define D3DRMCLIENTDATA_LOCALFREE 0x00000002L
|
||||
#define D3DRMCLIENTDATA_IUNKNOWN 0x00000004L
|
||||
|
||||
/*
|
||||
* Values for flags in Frame2::AddMoveCallback.
|
||||
*/
|
||||
#define D3DRMCALLBACK_PREORDER 0
|
||||
#define D3DRMCALLBACK_POSTORDER 1
|
||||
|
||||
/*
|
||||
* Values for flags in MeshBuilder2::RayPick.
|
||||
*/
|
||||
#define D3DRMRAYPICK_ONLYBOUNDINGBOXES 1
|
||||
#define D3DRMRAYPICK_IGNOREFURTHERPRIMITIVES 2
|
||||
#define D3DRMRAYPICK_INTERPOLATEUV 4
|
||||
#define D3DRMRAYPICK_INTERPOLATECOLOR 8
|
||||
#define D3DRMRAYPICK_INTERPOLATENORMAL 0x10
|
||||
|
||||
/*
|
||||
* Values for flags in MeshBuilder3::AddFacesIndexed.
|
||||
*/
|
||||
#define D3DRMADDFACES_VERTICESONLY 1
|
||||
|
||||
/*
|
||||
* Values for flags in MeshBuilder2::GenerateNormals.
|
||||
*/
|
||||
#define D3DRMGENERATENORMALS_PRECOMPACT 1
|
||||
#define D3DRMGENERATENORMALS_USECREASEANGLE 2
|
||||
|
||||
/*
|
||||
* Values for MeshBuilder3::GetParentMesh
|
||||
*/
|
||||
#define D3DRMMESHBUILDER_DIRECTPARENT 1
|
||||
#define D3DRMMESHBUILDER_ROOTMESH 2
|
||||
|
||||
/*
|
||||
* Flags for MeshBuilder3::Enable
|
||||
*/
|
||||
#define D3DRMMESHBUILDER_RENDERENABLE 0x00000001L
|
||||
#define D3DRMMESHBUILDER_PICKENABLE 0x00000002L
|
||||
|
||||
/*
|
||||
* Flags for MeshBuilder3::AddMeshBuilder
|
||||
*/
|
||||
#define D3DRMADDMESHBUILDER_DONTCOPYAPPDATA 1
|
||||
#define D3DRMADDMESHBUILDER_FLATTENSUBMESHES 2
|
||||
#define D3DRMADDMESHBUILDER_NOSUBMESHES 4
|
||||
|
||||
/*
|
||||
* Flags for Object2::GetAge when used with MeshBuilders
|
||||
*/
|
||||
#define D3DRMMESHBUILDERAGE_GEOMETRY 0x00000001L
|
||||
#define D3DRMMESHBUILDERAGE_MATERIALS 0x00000002L
|
||||
#define D3DRMMESHBUILDERAGE_TEXTURES 0x00000004L
|
||||
|
||||
/*
|
||||
* Format flags for MeshBuilder3::AddTriangles.
|
||||
*/
|
||||
#define D3DRMFVF_TYPE 0x00000001L
|
||||
#define D3DRMFVF_NORMAL 0x00000002L
|
||||
#define D3DRMFVF_COLOR 0x00000004L
|
||||
#define D3DRMFVF_TEXTURECOORDS 0x00000008L
|
||||
|
||||
#define D3DRMVERTEX_STRIP 0x00000001L
|
||||
#define D3DRMVERTEX_FAN 0x00000002L
|
||||
#define D3DRMVERTEX_LIST 0x00000004L
|
||||
|
||||
/*
|
||||
* Values for flags in Viewport2::Clear2
|
||||
*/
|
||||
#define D3DRMCLEAR_TARGET 0x00000001L
|
||||
#define D3DRMCLEAR_ZBUFFER 0x00000002L
|
||||
#define D3DRMCLEAR_DIRTYRECTS 0x00000004L
|
||||
#define D3DRMCLEAR_ALL (D3DRMCLEAR_TARGET | \
|
||||
D3DRMCLEAR_ZBUFFER | \
|
||||
D3DRMCLEAR_DIRTYRECTS)
|
||||
|
||||
/*
|
||||
* Values for flags in Frame3::SetSceneFogMethod
|
||||
*/
|
||||
#define D3DRMFOGMETHOD_VERTEX 0x00000001L
|
||||
#define D3DRMFOGMETHOD_TABLE 0x00000002L
|
||||
#define D3DRMFOGMETHOD_ANY 0x00000004L
|
||||
|
||||
/*
|
||||
* Values for flags in Frame3::SetTraversalOptions
|
||||
*/
|
||||
#define D3DRMFRAME_RENDERENABLE 0x00000001L
|
||||
#define D3DRMFRAME_PICKENABLE 0x00000002L
|
||||
|
||||
typedef DWORD D3DRMANIMATIONOPTIONS;
|
||||
#define D3DRMANIMATION_OPEN 0x01L
|
||||
#define D3DRMANIMATION_CLOSED 0x02L
|
||||
#define D3DRMANIMATION_LINEARPOSITION 0x04L
|
||||
#define D3DRMANIMATION_SPLINEPOSITION 0x08L
|
||||
#define D3DRMANIMATION_SCALEANDROTATION 0x00000010L
|
||||
#define D3DRMANIMATION_POSITION 0x00000020L
|
||||
|
||||
typedef DWORD D3DRMINTERPOLATIONOPTIONS;
|
||||
#define D3DRMINTERPOLATION_OPEN 0x01L
|
||||
#define D3DRMINTERPOLATION_CLOSED 0x02L
|
||||
#define D3DRMINTERPOLATION_NEAREST 0x0100L
|
||||
#define D3DRMINTERPOLATION_LINEAR 0x04L
|
||||
#define D3DRMINTERPOLATION_SPLINE 0x08L
|
||||
#define D3DRMINTERPOLATION_VERTEXCOLOR 0x40L
|
||||
#define D3DRMINTERPOLATION_SLERPNORMALS 0x80L
|
||||
|
||||
typedef DWORD D3DRMLOADOPTIONS;
|
||||
|
||||
#define D3DRMLOAD_FROMFILE 0x00L
|
||||
#define D3DRMLOAD_FROMRESOURCE 0x01L
|
||||
#define D3DRMLOAD_FROMMEMORY 0x02L
|
||||
#define D3DRMLOAD_FROMSTREAM 0x04L
|
||||
#define D3DRMLOAD_FROMURL 0x08L
|
||||
|
||||
#define D3DRMLOAD_BYNAME 0x10L
|
||||
#define D3DRMLOAD_BYPOSITION 0x20L
|
||||
#define D3DRMLOAD_BYGUID 0x40L
|
||||
#define D3DRMLOAD_FIRST 0x80L
|
||||
|
||||
#define D3DRMLOAD_INSTANCEBYREFERENCE 0x100L
|
||||
#define D3DRMLOAD_INSTANCEBYCOPYING 0x200L
|
||||
|
||||
#define D3DRMLOAD_ASYNCHRONOUS 0x400L
|
||||
|
||||
typedef struct _D3DRMLOADRESOURCE {
|
||||
HMODULE hModule;
|
||||
LPCTSTR lpName;
|
||||
LPCTSTR lpType;
|
||||
} D3DRMLOADRESOURCE, *LPD3DRMLOADRESOURCE;
|
||||
|
||||
typedef struct _D3DRMLOADMEMORY {
|
||||
LPVOID lpMemory;
|
||||
DWORD dSize;
|
||||
} D3DRMLOADMEMORY, *LPD3DRMLOADMEMORY;
|
||||
|
||||
#define D3DRMPMESHSTATUS_VALID 0x01L
|
||||
#define D3DRMPMESHSTATUS_INTERRUPTED 0x02L
|
||||
#define D3DRMPMESHSTATUS_BASEMESHCOMPLETE 0x04L
|
||||
#define D3DRMPMESHSTATUS_COMPLETE 0x08L
|
||||
#define D3DRMPMESHSTATUS_RENDERABLE 0x10L
|
||||
|
||||
#define D3DRMPMESHEVENT_BASEMESH 0x01L
|
||||
#define D3DRMPMESHEVENT_COMPLETE 0x02L
|
||||
|
||||
typedef struct _D3DRMPMESHLOADSTATUS {
|
||||
DWORD dwSize; // Size of this structure
|
||||
DWORD dwPMeshSize; // Total Size (bytes)
|
||||
DWORD dwBaseMeshSize; // Total Size of the Base Mesh
|
||||
DWORD dwBytesLoaded; // Total bytes loaded
|
||||
DWORD dwVerticesLoaded; // Number of vertices loaded
|
||||
DWORD dwFacesLoaded; // Number of faces loaded
|
||||
HRESULT dwLoadResult; // Result of the load operation
|
||||
DWORD dwFlags;
|
||||
} D3DRMPMESHLOADSTATUS, *LPD3DRMPMESHLOADSTATUS;
|
||||
|
||||
typedef enum _D3DRMUSERVISUALREASON {
|
||||
D3DRMUSERVISUAL_CANSEE,
|
||||
D3DRMUSERVISUAL_RENDER
|
||||
} D3DRMUSERVISUALREASON, *LPD3DRMUSERVISUALREASON;
|
||||
|
||||
|
||||
typedef struct _D3DRMANIMATIONKEY
|
||||
{
|
||||
DWORD dwSize;
|
||||
DWORD dwKeyType;
|
||||
D3DVALUE dvTime;
|
||||
DWORD dwID;
|
||||
#if (!defined __cplusplus) || (!defined D3D_OVERLOADS)
|
||||
union
|
||||
{
|
||||
D3DRMQUATERNION dqRotateKey;
|
||||
D3DVECTOR dvScaleKey;
|
||||
D3DVECTOR dvPositionKey;
|
||||
};
|
||||
#else
|
||||
/*
|
||||
* We do this as D3D_OVERLOADS defines constructors for D3DVECTOR,
|
||||
* this can then not be used in a union. Use the inlines provided
|
||||
* to extract and set the required component.
|
||||
*/
|
||||
D3DVALUE dvK[4];
|
||||
#endif
|
||||
} D3DRMANIMATIONKEY;
|
||||
typedef D3DRMANIMATIONKEY *LPD3DRMANIMATIONKEY;
|
||||
|
||||
#if (defined __cplusplus) && (defined D3D_OVERLOADS)
|
||||
inline VOID
|
||||
D3DRMAnimationGetRotateKey(const D3DRMANIMATIONKEY& rmKey,
|
||||
D3DRMQUATERNION& rmQuat)
|
||||
{
|
||||
rmQuat.s = rmKey.dvK[0];
|
||||
rmQuat.v = D3DVECTOR(rmKey.dvK[1], rmKey.dvK[2], rmKey.dvK[3]);
|
||||
}
|
||||
|
||||
inline VOID
|
||||
D3DRMAnimationGetScaleKey(const D3DRMANIMATIONKEY& rmKey,
|
||||
D3DVECTOR& dvVec)
|
||||
{
|
||||
dvVec = D3DVECTOR(rmKey.dvK[0], rmKey.dvK[1], rmKey.dvK[2]);
|
||||
}
|
||||
|
||||
inline VOID
|
||||
D3DRMAnimationGetPositionKey(const D3DRMANIMATIONKEY& rmKey,
|
||||
D3DVECTOR& dvVec)
|
||||
{
|
||||
dvVec = D3DVECTOR(rmKey.dvK[0], rmKey.dvK[1], rmKey.dvK[2]);
|
||||
}
|
||||
inline VOID
|
||||
D3DRMAnimationSetRotateKey(D3DRMANIMATIONKEY& rmKey,
|
||||
const D3DRMQUATERNION& rmQuat)
|
||||
{
|
||||
rmKey.dvK[0] = rmQuat.s;
|
||||
rmKey.dvK[1] = rmQuat.v.x;
|
||||
rmKey.dvK[2] = rmQuat.v.y;
|
||||
rmKey.dvK[3] = rmQuat.v.z;
|
||||
}
|
||||
|
||||
inline VOID
|
||||
D3DRMAnimationSetScaleKey(D3DRMANIMATIONKEY& rmKey,
|
||||
const D3DVECTOR& dvVec)
|
||||
{
|
||||
rmKey.dvK[0] = dvVec.x;
|
||||
rmKey.dvK[1] = dvVec.y;
|
||||
rmKey.dvK[2] = dvVec.z;
|
||||
}
|
||||
|
||||
inline VOID
|
||||
D3DRMAnimationSetPositionKey(D3DRMANIMATIONKEY& rmKey,
|
||||
const D3DVECTOR& dvVec)
|
||||
{
|
||||
rmKey.dvK[0] = dvVec.x;
|
||||
rmKey.dvK[1] = dvVec.y;
|
||||
rmKey.dvK[2] = dvVec.z;
|
||||
}
|
||||
#endif
|
||||
|
||||
#define D3DRMANIMATION_ROTATEKEY 0x01
|
||||
#define D3DRMANIMATION_SCALEKEY 0x02
|
||||
#define D3DRMANIMATION_POSITIONKEY 0x03
|
||||
|
||||
|
||||
typedef DWORD D3DRMMAPPING, D3DRMMAPPINGFLAG, *LPD3DRMMAPPING;
|
||||
static const D3DRMMAPPINGFLAG D3DRMMAP_WRAPU = 1;
|
||||
static const D3DRMMAPPINGFLAG D3DRMMAP_WRAPV = 2;
|
||||
static const D3DRMMAPPINGFLAG D3DRMMAP_PERSPCORRECT = 4;
|
||||
|
||||
typedef struct _D3DRMVERTEX
|
||||
{ D3DVECTOR position;
|
||||
D3DVECTOR normal;
|
||||
D3DVALUE tu, tv;
|
||||
D3DCOLOR color;
|
||||
} D3DRMVERTEX, *LPD3DRMVERTEX;
|
||||
|
||||
typedef LONG D3DRMGROUPINDEX; /* group indexes begin a 0 */
|
||||
static const D3DRMGROUPINDEX D3DRMGROUP_ALLGROUPS = -1;
|
||||
|
||||
/*
|
||||
* Create a color from three components in the range 0-1 inclusive.
|
||||
*/
|
||||
extern D3DCOLOR D3DRMAPI D3DRMCreateColorRGB(D3DVALUE red,
|
||||
D3DVALUE green,
|
||||
D3DVALUE blue);
|
||||
|
||||
/*
|
||||
* Create a color from four components in the range 0-1 inclusive.
|
||||
*/
|
||||
extern D3DCOLOR D3DRMAPI D3DRMCreateColorRGBA(D3DVALUE red,
|
||||
D3DVALUE green,
|
||||
D3DVALUE blue,
|
||||
D3DVALUE alpha);
|
||||
|
||||
/*
|
||||
* Get the red component of a color.
|
||||
*/
|
||||
extern D3DVALUE D3DRMAPI D3DRMColorGetRed(D3DCOLOR);
|
||||
|
||||
/*
|
||||
* Get the green component of a color.
|
||||
*/
|
||||
extern D3DVALUE D3DRMAPI D3DRMColorGetGreen(D3DCOLOR);
|
||||
|
||||
/*
|
||||
* Get the blue component of a color.
|
||||
*/
|
||||
extern D3DVALUE D3DRMAPI D3DRMColorGetBlue(D3DCOLOR);
|
||||
|
||||
/*
|
||||
* Get the alpha component of a color.
|
||||
*/
|
||||
extern D3DVALUE D3DRMAPI D3DRMColorGetAlpha(D3DCOLOR);
|
||||
|
||||
/*
|
||||
* Add two vectors. Returns its first argument.
|
||||
*/
|
||||
extern LPD3DVECTOR D3DRMAPI D3DRMVectorAdd(LPD3DVECTOR d,
|
||||
LPD3DVECTOR s1,
|
||||
LPD3DVECTOR s2);
|
||||
|
||||
/*
|
||||
* Subtract two vectors. Returns its first argument.
|
||||
*/
|
||||
extern LPD3DVECTOR D3DRMAPI D3DRMVectorSubtract(LPD3DVECTOR d,
|
||||
LPD3DVECTOR s1,
|
||||
LPD3DVECTOR s2);
|
||||
/*
|
||||
* Reflect a ray about a given normal. Returns its first argument.
|
||||
*/
|
||||
extern LPD3DVECTOR D3DRMAPI D3DRMVectorReflect(LPD3DVECTOR d,
|
||||
LPD3DVECTOR ray,
|
||||
LPD3DVECTOR norm);
|
||||
|
||||
/*
|
||||
* Calculate the vector cross product. Returns its first argument.
|
||||
*/
|
||||
extern LPD3DVECTOR D3DRMAPI D3DRMVectorCrossProduct(LPD3DVECTOR d,
|
||||
LPD3DVECTOR s1,
|
||||
LPD3DVECTOR s2);
|
||||
/*
|
||||
* Return the vector dot product.
|
||||
*/
|
||||
extern D3DVALUE D3DRMAPI D3DRMVectorDotProduct(LPD3DVECTOR s1,
|
||||
LPD3DVECTOR s2);
|
||||
|
||||
/*
|
||||
* Scale a vector so that its modulus is 1. Returns its argument or
|
||||
* NULL if there was an error (e.g. a zero vector was passed).
|
||||
*/
|
||||
extern LPD3DVECTOR D3DRMAPI D3DRMVectorNormalize(LPD3DVECTOR);
|
||||
#define D3DRMVectorNormalise D3DRMVectorNormalize
|
||||
|
||||
/*
|
||||
* Return the length of a vector (e.g. sqrt(x*x + y*y + z*z)).
|
||||
*/
|
||||
extern D3DVALUE D3DRMAPI D3DRMVectorModulus(LPD3DVECTOR v);
|
||||
|
||||
/*
|
||||
* Set the rotation part of a matrix to be a rotation of theta radians
|
||||
* around the given axis.
|
||||
*/
|
||||
|
||||
extern LPD3DVECTOR D3DRMAPI D3DRMVectorRotate(LPD3DVECTOR r, LPD3DVECTOR v, LPD3DVECTOR axis, D3DVALUE theta);
|
||||
|
||||
/*
|
||||
* Scale a vector uniformly in all three axes
|
||||
*/
|
||||
extern LPD3DVECTOR D3DRMAPI D3DRMVectorScale(LPD3DVECTOR d, LPD3DVECTOR s, D3DVALUE factor);
|
||||
|
||||
/*
|
||||
* Return a random unit vector
|
||||
*/
|
||||
extern LPD3DVECTOR D3DRMAPI D3DRMVectorRandom(LPD3DVECTOR d);
|
||||
|
||||
/*
|
||||
* Returns a unit quaternion that represents a rotation of theta radians
|
||||
* around the given axis.
|
||||
*/
|
||||
|
||||
extern LPD3DRMQUATERNION D3DRMAPI D3DRMQuaternionFromRotation(LPD3DRMQUATERNION quat,
|
||||
LPD3DVECTOR v,
|
||||
D3DVALUE theta);
|
||||
|
||||
/*
|
||||
* Calculate the product of two quaternions
|
||||
*/
|
||||
extern LPD3DRMQUATERNION D3DRMAPI D3DRMQuaternionMultiply(LPD3DRMQUATERNION q,
|
||||
LPD3DRMQUATERNION a,
|
||||
LPD3DRMQUATERNION b);
|
||||
|
||||
/*
|
||||
* Interpolate between two quaternions
|
||||
*/
|
||||
extern LPD3DRMQUATERNION D3DRMAPI D3DRMQuaternionSlerp(LPD3DRMQUATERNION q,
|
||||
LPD3DRMQUATERNION a,
|
||||
LPD3DRMQUATERNION b,
|
||||
D3DVALUE alpha);
|
||||
|
||||
/*
|
||||
* Calculate the matrix for the rotation that a unit quaternion represents
|
||||
*/
|
||||
extern void D3DRMAPI D3DRMMatrixFromQuaternion(D3DRMMATRIX4D dmMat, LPD3DRMQUATERNION lpDqQuat);
|
||||
|
||||
/*
|
||||
* Calculate the quaternion that corresponds to a rotation matrix
|
||||
*/
|
||||
extern LPD3DRMQUATERNION D3DRMAPI D3DRMQuaternionFromMatrix(LPD3DRMQUATERNION, D3DRMMATRIX4D);
|
||||
|
||||
|
||||
#if defined(__cplusplus)
|
||||
};
|
||||
#endif
|
||||
|
||||
#endif
|
||||
|
File diff suppressed because it is too large
Load Diff
|
@ -0,0 +1,50 @@
|
|||
/*==========================================================================;
|
||||
*
|
||||
* Copyright (C) 1995-1997 Microsoft Corporation. All Rights Reserved.
|
||||
*
|
||||
* File: d3drm.h
|
||||
* Content: Direct3DRM include file
|
||||
*
|
||||
***************************************************************************/
|
||||
|
||||
#ifndef __D3DRMWIN_H__
|
||||
#define __D3DRMWIN_H__
|
||||
|
||||
#ifndef WIN32
|
||||
#define WIN32
|
||||
#endif
|
||||
|
||||
#include "d3drm.h"
|
||||
|
||||
#include "ddraw.h"
|
||||
#include "d3d.h"
|
||||
|
||||
/*
|
||||
* GUIDS used by Direct3DRM Windows interface
|
||||
*/
|
||||
DEFINE_GUID(IID_IDirect3DRMWinDevice, 0xc5016cc0, 0xd273, 0x11ce, 0xac, 0x48, 0x0, 0x0, 0xc0, 0x38, 0x25, 0xa1);
|
||||
|
||||
WIN_TYPES(IDirect3DRMWinDevice, DIRECT3DRMWINDEVICE);
|
||||
|
||||
#undef INTERFACE
|
||||
#define INTERFACE IDirect3DRMWinDevice
|
||||
|
||||
DECLARE_INTERFACE_(IDirect3DRMWinDevice, IDirect3DRMObject)
|
||||
{
|
||||
IUNKNOWN_METHODS(PURE);
|
||||
IDIRECT3DRMOBJECT_METHODS(PURE);
|
||||
|
||||
/*
|
||||
* IDirect3DRMWinDevice methods
|
||||
*/
|
||||
|
||||
/* Repaint the window with the last frame which was rendered. */
|
||||
STDMETHOD(HandlePaint)(THIS_ HDC hdc) PURE;
|
||||
|
||||
/* Respond to a WM_ACTIVATE message. */
|
||||
STDMETHOD(HandleActivate)(THIS_ WORD wparam) PURE;
|
||||
};
|
||||
|
||||
|
||||
#endif
|
||||
|
File diff suppressed because it is too large
Load Diff
|
@ -0,0 +1,255 @@
|
|||
|
||||
/******************************************************************
|
||||
* *
|
||||
* D3DVec.inl *
|
||||
* *
|
||||
* Float-valued 3D vector class for Direct3D. *
|
||||
* *
|
||||
* Copyright (c) 1996-1998 Microsoft Corp. All rights reserved. *
|
||||
* *
|
||||
******************************************************************/
|
||||
|
||||
#include <math.h>
|
||||
|
||||
// =====================================
|
||||
// Constructors
|
||||
// =====================================
|
||||
|
||||
inline
|
||||
_D3DVECTOR::_D3DVECTOR(D3DVALUE f)
|
||||
{
|
||||
x = y = z = f;
|
||||
}
|
||||
|
||||
inline
|
||||
_D3DVECTOR::_D3DVECTOR(D3DVALUE _x, D3DVALUE _y, D3DVALUE _z)
|
||||
{
|
||||
x = _x; y = _y; z = _z;
|
||||
}
|
||||
|
||||
inline
|
||||
_D3DVECTOR::_D3DVECTOR(const D3DVALUE f[3])
|
||||
{
|
||||
x = f[0]; y = f[1]; z = f[2];
|
||||
}
|
||||
|
||||
// =====================================
|
||||
// Access grants
|
||||
// =====================================
|
||||
|
||||
inline const D3DVALUE&
|
||||
_D3DVECTOR::operator[](int i) const
|
||||
{
|
||||
return (&x)[i];
|
||||
}
|
||||
|
||||
inline D3DVALUE&
|
||||
_D3DVECTOR::operator[](int i)
|
||||
{
|
||||
return (&x)[i];
|
||||
}
|
||||
|
||||
|
||||
// =====================================
|
||||
// Assignment operators
|
||||
// =====================================
|
||||
|
||||
inline _D3DVECTOR&
|
||||
_D3DVECTOR::operator += (const _D3DVECTOR& v)
|
||||
{
|
||||
x += v.x; y += v.y; z += v.z;
|
||||
return *this;
|
||||
}
|
||||
|
||||
inline _D3DVECTOR&
|
||||
_D3DVECTOR::operator -= (const _D3DVECTOR& v)
|
||||
{
|
||||
x -= v.x; y -= v.y; z -= v.z;
|
||||
return *this;
|
||||
}
|
||||
|
||||
inline _D3DVECTOR&
|
||||
_D3DVECTOR::operator *= (const _D3DVECTOR& v)
|
||||
{
|
||||
x *= v.x; y *= v.y; z *= v.z;
|
||||
return *this;
|
||||
}
|
||||
|
||||
inline _D3DVECTOR&
|
||||
_D3DVECTOR::operator /= (const _D3DVECTOR& v)
|
||||
{
|
||||
x /= v.x; y /= v.y; z /= v.z;
|
||||
return *this;
|
||||
}
|
||||
|
||||
inline _D3DVECTOR&
|
||||
_D3DVECTOR::operator *= (D3DVALUE s)
|
||||
{
|
||||
x *= s; y *= s; z *= s;
|
||||
return *this;
|
||||
}
|
||||
|
||||
inline _D3DVECTOR&
|
||||
_D3DVECTOR::operator /= (D3DVALUE s)
|
||||
{
|
||||
x /= s; y /= s; z /= s;
|
||||
return *this;
|
||||
}
|
||||
|
||||
inline _D3DVECTOR
|
||||
operator + (const _D3DVECTOR& v)
|
||||
{
|
||||
return v;
|
||||
}
|
||||
|
||||
inline _D3DVECTOR
|
||||
operator - (const _D3DVECTOR& v)
|
||||
{
|
||||
return _D3DVECTOR(-v.x, -v.y, -v.z);
|
||||
}
|
||||
|
||||
inline _D3DVECTOR
|
||||
operator + (const _D3DVECTOR& v1, const _D3DVECTOR& v2)
|
||||
{
|
||||
return _D3DVECTOR(v1.x+v2.x, v1.y+v2.y, v1.z+v2.z);
|
||||
}
|
||||
|
||||
inline _D3DVECTOR
|
||||
operator - (const _D3DVECTOR& v1, const _D3DVECTOR& v2)
|
||||
{
|
||||
return _D3DVECTOR(v1.x-v2.x, v1.y-v2.y, v1.z-v2.z);
|
||||
}
|
||||
|
||||
inline _D3DVECTOR
|
||||
operator * (const _D3DVECTOR& v1, const _D3DVECTOR& v2)
|
||||
{
|
||||
return _D3DVECTOR(v1.x*v2.x, v1.y*v2.y, v1.z*v2.z);
|
||||
}
|
||||
|
||||
inline _D3DVECTOR
|
||||
operator / (const _D3DVECTOR& v1, const _D3DVECTOR& v2)
|
||||
{
|
||||
return _D3DVECTOR(v1.x/v2.x, v1.y/v2.y, v1.z/v2.z);
|
||||
}
|
||||
|
||||
inline int
|
||||
operator < (const _D3DVECTOR& v1, const _D3DVECTOR& v2)
|
||||
{
|
||||
return v1[0] < v2[0] && v1[1] < v2[1] && v1[2] < v2[2];
|
||||
}
|
||||
|
||||
inline int
|
||||
operator <= (const _D3DVECTOR& v1, const _D3DVECTOR& v2)
|
||||
{
|
||||
return v1[0] <= v2[0] && v1[1] <= v2[1] && v1[2] <= v2[2];
|
||||
}
|
||||
|
||||
inline _D3DVECTOR
|
||||
operator * (const _D3DVECTOR& v, D3DVALUE s)
|
||||
{
|
||||
return _D3DVECTOR(s*v.x, s*v.y, s*v.z);
|
||||
}
|
||||
|
||||
inline _D3DVECTOR
|
||||
operator * (D3DVALUE s, const _D3DVECTOR& v)
|
||||
{
|
||||
return _D3DVECTOR(s*v.x, s*v.y, s*v.z);
|
||||
}
|
||||
|
||||
inline _D3DVECTOR
|
||||
operator / (const _D3DVECTOR& v, D3DVALUE s)
|
||||
{
|
||||
return _D3DVECTOR(v.x/s, v.y/s, v.z/s);
|
||||
}
|
||||
|
||||
inline int
|
||||
operator == (const _D3DVECTOR& v1, const _D3DVECTOR& v2)
|
||||
{
|
||||
return v1.x==v2.x && v1.y==v2.y && v1.z == v2.z;
|
||||
}
|
||||
|
||||
inline D3DVALUE
|
||||
Magnitude (const _D3DVECTOR& v)
|
||||
{
|
||||
return (D3DVALUE) sqrt(SquareMagnitude(v));
|
||||
}
|
||||
|
||||
inline D3DVALUE
|
||||
SquareMagnitude (const _D3DVECTOR& v)
|
||||
{
|
||||
return v.x*v.x + v.y*v.y + v.z*v.z;
|
||||
}
|
||||
|
||||
inline _D3DVECTOR
|
||||
Normalize (const _D3DVECTOR& v)
|
||||
{
|
||||
return v / Magnitude(v);
|
||||
}
|
||||
|
||||
inline D3DVALUE
|
||||
Min (const _D3DVECTOR& v)
|
||||
{
|
||||
D3DVALUE ret = v.x;
|
||||
if (v.y < ret) ret = v.y;
|
||||
if (v.z < ret) ret = v.z;
|
||||
return ret;
|
||||
}
|
||||
|
||||
inline D3DVALUE
|
||||
Max (const _D3DVECTOR& v)
|
||||
{
|
||||
D3DVALUE ret = v.x;
|
||||
if (ret < v.y) ret = v.y;
|
||||
if (ret < v.z) ret = v.z;
|
||||
return ret;
|
||||
}
|
||||
|
||||
inline _D3DVECTOR
|
||||
Minimize (const _D3DVECTOR& v1, const _D3DVECTOR& v2)
|
||||
{
|
||||
return _D3DVECTOR( v1[0] < v2[0] ? v1[0] : v2[0],
|
||||
v1[1] < v2[1] ? v1[1] : v2[1],
|
||||
v1[2] < v2[2] ? v1[2] : v2[2]);
|
||||
}
|
||||
|
||||
inline _D3DVECTOR
|
||||
Maximize (const _D3DVECTOR& v1, const _D3DVECTOR& v2)
|
||||
{
|
||||
return _D3DVECTOR( v1[0] > v2[0] ? v1[0] : v2[0],
|
||||
v1[1] > v2[1] ? v1[1] : v2[1],
|
||||
v1[2] > v2[2] ? v1[2] : v2[2]);
|
||||
}
|
||||
|
||||
inline D3DVALUE
|
||||
DotProduct (const _D3DVECTOR& v1, const _D3DVECTOR& v2)
|
||||
{
|
||||
return v1.x*v2.x + v1.y * v2.y + v1.z*v2.z;
|
||||
}
|
||||
|
||||
inline _D3DVECTOR
|
||||
CrossProduct (const _D3DVECTOR& v1, const _D3DVECTOR& v2)
|
||||
{
|
||||
_D3DVECTOR result;
|
||||
|
||||
result[0] = v1[1] * v2[2] - v1[2] * v2[1];
|
||||
result[1] = v1[2] * v2[0] - v1[0] * v2[2];
|
||||
result[2] = v1[0] * v2[1] - v1[1] * v2[0];
|
||||
|
||||
return result;
|
||||
}
|
||||
|
||||
inline _D3DMATRIX
|
||||
operator* (const _D3DMATRIX& a, const _D3DMATRIX& b)
|
||||
{
|
||||
_D3DMATRIX ret;
|
||||
for (int i=0; i<4; i++) {
|
||||
for (int j=0; j<4; j++) {
|
||||
ret(i, j) = 0.0f;
|
||||
for (int k=0; k<4; k++) {
|
||||
ret(i, j) += a(i, k) * b(k, j);
|
||||
}
|
||||
}
|
||||
}
|
||||
return ret;
|
||||
}
|
||||
|
|
@ -0,0 +1,26 @@
|
|||
///////////////////////////////////////////////////////////////////////////
|
||||
//
|
||||
// Copyright (C) 1999 Microsoft Corporation. All Rights Reserved.
|
||||
//
|
||||
// File: d3dx.h
|
||||
// Content: D3DX utility library
|
||||
//
|
||||
///////////////////////////////////////////////////////////////////////////
|
||||
|
||||
#ifndef __D3DX_H__
|
||||
#define __D3DX_H__
|
||||
|
||||
#ifndef D3DXINLINE
|
||||
#ifdef __cplusplus
|
||||
#define D3DXINLINE inline
|
||||
#else
|
||||
#define D3DXINLINE _inline
|
||||
#endif
|
||||
#endif
|
||||
|
||||
#include "d3dxcore.h"
|
||||
#include "d3dxmath.h"
|
||||
#include "d3dxshapes.h"
|
||||
#include "d3dxsprite.h"
|
||||
|
||||
#endif //__D3DX_H__
|
|
@ -0,0 +1,36 @@
|
|||
///////////////////////////////////////////////////////////////////////////
|
||||
//
|
||||
// Copyright (C) 1999 Microsoft Corporation. All Rights Reserved.
|
||||
//
|
||||
// File: d3dx8.h
|
||||
// Content: D3DX utility library
|
||||
//
|
||||
///////////////////////////////////////////////////////////////////////////
|
||||
|
||||
#ifndef __D3DX8_H__
|
||||
#define __D3DX8_H__
|
||||
|
||||
#include <d3d8.h>
|
||||
#include <limits.h>
|
||||
|
||||
#ifndef D3DXINLINE
|
||||
#ifdef __cplusplus
|
||||
#define D3DXINLINE inline
|
||||
#else
|
||||
#define D3DXINLINE _inline
|
||||
#endif
|
||||
#endif
|
||||
|
||||
#define D3DX_DEFAULT ULONG_MAX
|
||||
#define D3DX_DEFAULT_FLOAT FLT_MAX
|
||||
|
||||
#include "d3dx8math.h"
|
||||
#include "d3dx8core.h"
|
||||
#include "d3dx8tex.h"
|
||||
#include "d3dx8mesh.h"
|
||||
#include "d3dx8shape.h"
|
||||
#include "d3dx8effect.h"
|
||||
|
||||
|
||||
#endif //__D3DX8_H__
|
||||
|
|
@ -0,0 +1,476 @@
|
|||
///////////////////////////////////////////////////////////////////////////
|
||||
//
|
||||
// Copyright (C) 1999 Microsoft Corporation. All Rights Reserved.
|
||||
//
|
||||
// File: d3dx8core.h
|
||||
// Content: D3DX core types and functions
|
||||
//
|
||||
///////////////////////////////////////////////////////////////////////////
|
||||
|
||||
#include "d3dx8.h"
|
||||
|
||||
#ifndef __D3DX8CORE_H__
|
||||
#define __D3DX8CORE_H__
|
||||
|
||||
|
||||
///////////////////////////////////////////////////////////////////////////
|
||||
// ID3DXBuffer:
|
||||
// ------------
|
||||
// The buffer object is used to return arbitrary lenght data.
|
||||
///////////////////////////////////////////////////////////////////////////
|
||||
|
||||
typedef interface ID3DXBuffer ID3DXBuffer;
|
||||
typedef interface ID3DXBuffer *LPD3DXBUFFER;
|
||||
|
||||
// {932E6A7E-C68E-45dd-A7BF-53D19C86DB1F}
|
||||
DEFINE_GUID(IID_ID3DXBuffer,
|
||||
0x932e6a7e, 0xc68e, 0x45dd, 0xa7, 0xbf, 0x53, 0xd1, 0x9c, 0x86, 0xdb, 0x1f);
|
||||
|
||||
DECLARE_INTERFACE_(ID3DXBuffer, IUnknown)
|
||||
{
|
||||
// IUnknown
|
||||
STDMETHOD(QueryInterface)(THIS_ REFIID iid, LPVOID *ppv) PURE;
|
||||
STDMETHOD_(ULONG, AddRef)(THIS) PURE;
|
||||
STDMETHOD_(ULONG, Release)(THIS) PURE;
|
||||
|
||||
// ID3DXBuffer
|
||||
STDMETHOD_(LPVOID, GetBufferPointer)(THIS) PURE;
|
||||
STDMETHOD_(DWORD, GetBufferSize)(THIS) PURE;
|
||||
};
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
///////////////////////////////////////////////////////////////////////////
|
||||
// ID3DXFont:
|
||||
// ----------
|
||||
// Font objects contain the textures and resources needed to render
|
||||
// a specific font on a specific device.
|
||||
//
|
||||
// Begin -
|
||||
// Prepartes device for drawing text. This is optional.. if DrawText
|
||||
// is called outside of Begin/End, it will call Begin and End for you.
|
||||
//
|
||||
// DrawText -
|
||||
// Draws formatted text on a D3D device. Some parameters are
|
||||
// surprisingly similar to those of GDI's DrawText function. See GDI
|
||||
// documentation for a detailed description of these parameters.
|
||||
//
|
||||
// End -
|
||||
// Restores device state to how it was when Begin was called.
|
||||
///////////////////////////////////////////////////////////////////////////
|
||||
|
||||
typedef interface ID3DXFont ID3DXFont;
|
||||
typedef interface ID3DXFont *LPD3DXFONT;
|
||||
|
||||
|
||||
// {2D501DF7-D253-4414-865F-A6D54A753138}
|
||||
DEFINE_GUID( IID_ID3DXFont,
|
||||
0x2d501df7, 0xd253, 0x4414, 0x86, 0x5f, 0xa6, 0xd5, 0x4a, 0x75, 0x31, 0x38);
|
||||
|
||||
|
||||
DECLARE_INTERFACE_(ID3DXFont, IUnknown)
|
||||
{
|
||||
// IUnknown
|
||||
STDMETHOD(QueryInterface)(THIS_ REFIID iid, LPVOID *ppv) PURE;
|
||||
STDMETHOD_(ULONG, AddRef)(THIS) PURE;
|
||||
STDMETHOD_(ULONG, Release)(THIS) PURE;
|
||||
|
||||
// ID3DXFont
|
||||
STDMETHOD(GetDevice)(THIS_ LPDIRECT3DDEVICE8* ppDevice) PURE;
|
||||
STDMETHOD(GetLogFont)(THIS_ LOGFONT* pLogFont) PURE;
|
||||
|
||||
STDMETHOD(Begin)(THIS) PURE;
|
||||
|
||||
STDMETHOD_(INT, DrawTextA)(THIS_ LPCSTR pString, INT Count, LPRECT pRect, DWORD Format, D3DCOLOR Color) PURE;
|
||||
STDMETHOD_(INT, DrawTextW)(THIS_ LPCWSTR pString, INT Count, LPRECT pRect, DWORD Format, D3DCOLOR Color) PURE;
|
||||
|
||||
STDMETHOD(End)(THIS) PURE;
|
||||
};
|
||||
|
||||
#ifndef DrawText
|
||||
#ifdef UNICODE
|
||||
#define DrawText DrawTextW
|
||||
#else
|
||||
#define DrawText DrawTextA
|
||||
#endif
|
||||
#endif
|
||||
|
||||
|
||||
#ifdef __cplusplus
|
||||
extern "C" {
|
||||
#endif //__cplusplus
|
||||
|
||||
HRESULT WINAPI
|
||||
D3DXCreateFont(
|
||||
LPDIRECT3DDEVICE8 pDevice,
|
||||
HFONT hFont,
|
||||
LPD3DXFONT* ppFont);
|
||||
|
||||
|
||||
HRESULT WINAPI
|
||||
D3DXCreateFontIndirect(
|
||||
LPDIRECT3DDEVICE8 pDevice,
|
||||
CONST LOGFONT* pLogFont,
|
||||
LPD3DXFONT* ppFont);
|
||||
|
||||
#ifdef __cplusplus
|
||||
}
|
||||
#endif //__cplusplus
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
///////////////////////////////////////////////////////////////////////////
|
||||
// ID3DXSprite:
|
||||
// ------------
|
||||
// This object intends to provide an easy way to drawing sprites using D3D.
|
||||
//
|
||||
// Begin -
|
||||
// Prepares device for drawing sprites
|
||||
//
|
||||
// Draw, DrawAffine, DrawTransform
|
||||
// Draws a sprite in screen-space. Before transformation, the sprite is
|
||||
// the size of SrcRect, with its top-left corner at the origin (0,0).
|
||||
// The color and alpha channels are modulated by Color.
|
||||
//
|
||||
// End -
|
||||
// Restores device state to how it was when Begin was called.
|
||||
///////////////////////////////////////////////////////////////////////////
|
||||
|
||||
typedef interface ID3DXSprite ID3DXSprite;
|
||||
typedef interface ID3DXSprite *LPD3DXSPRITE;
|
||||
|
||||
|
||||
// {E8691849-87B8-4929-9050-1B0542D5538C}
|
||||
DEFINE_GUID( IID_ID3DXSprite,
|
||||
0xe8691849, 0x87b8, 0x4929, 0x90, 0x50, 0x1b, 0x5, 0x42, 0xd5, 0x53, 0x8c);
|
||||
|
||||
|
||||
DECLARE_INTERFACE_(ID3DXSprite, IUnknown)
|
||||
{
|
||||
// IUnknown
|
||||
STDMETHOD(QueryInterface)(THIS_ REFIID iid, LPVOID *ppv) PURE;
|
||||
STDMETHOD_(ULONG, AddRef)(THIS) PURE;
|
||||
STDMETHOD_(ULONG, Release)(THIS) PURE;
|
||||
|
||||
// ID3DXSprite
|
||||
STDMETHOD(GetDevice)(THIS_ LPDIRECT3DDEVICE8* ppDevice) PURE;
|
||||
|
||||
STDMETHOD(Begin)(THIS) PURE;
|
||||
|
||||
STDMETHOD(Draw)(THIS_ LPDIRECT3DTEXTURE8 pSrcTexture,
|
||||
CONST RECT* pSrcRect, CONST D3DXVECTOR2* pScaling,
|
||||
CONST D3DXVECTOR2* pRotationCenter, FLOAT Rotation,
|
||||
CONST D3DXVECTOR2* pTranslation, D3DCOLOR Color) PURE;
|
||||
|
||||
STDMETHOD(DrawTransform)(THIS_ LPDIRECT3DTEXTURE8 pSrcTexture,
|
||||
CONST RECT* pSrcRect, CONST D3DXMATRIX* pTransform,
|
||||
D3DCOLOR Color) PURE;
|
||||
|
||||
STDMETHOD(End)(THIS) PURE;
|
||||
};
|
||||
|
||||
|
||||
#ifdef __cplusplus
|
||||
extern "C" {
|
||||
#endif //__cplusplus
|
||||
|
||||
|
||||
HRESULT WINAPI
|
||||
D3DXCreateSprite(
|
||||
LPDIRECT3DDEVICE8 pDevice,
|
||||
LPD3DXSPRITE* ppSprite);
|
||||
|
||||
#ifdef __cplusplus
|
||||
}
|
||||
#endif //__cplusplus
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
///////////////////////////////////////////////////////////////////////////
|
||||
// ID3DXRenderToSurface:
|
||||
// ---------------------
|
||||
// This object abstracts rendering to surfaces. These surfaces do not
|
||||
// necessarily need to be render targets. If they are not, a compatible
|
||||
// render target is used, and the result copied into surface at end scene.
|
||||
///////////////////////////////////////////////////////////////////////////
|
||||
|
||||
typedef struct _D3DXRTS_DESC
|
||||
{
|
||||
UINT Width;
|
||||
UINT Height;
|
||||
D3DFORMAT Format;
|
||||
BOOL DepthStencil;
|
||||
D3DFORMAT DepthStencilFormat;
|
||||
|
||||
} D3DXRTS_DESC;
|
||||
|
||||
|
||||
typedef interface ID3DXRenderToSurface ID3DXRenderToSurface;
|
||||
typedef interface ID3DXRenderToSurface *LPD3DXRENDERTOSURFACE;
|
||||
|
||||
|
||||
// {69CC587C-E40C-458d-B5D3-B029E18EB60A}
|
||||
DEFINE_GUID( IID_ID3DXRenderToSurface,
|
||||
0x69cc587c, 0xe40c, 0x458d, 0xb5, 0xd3, 0xb0, 0x29, 0xe1, 0x8e, 0xb6, 0xa);
|
||||
|
||||
|
||||
DECLARE_INTERFACE_(ID3DXRenderToSurface, IUnknown)
|
||||
{
|
||||
// IUnknown
|
||||
STDMETHOD(QueryInterface)(THIS_ REFIID iid, LPVOID *ppv) PURE;
|
||||
STDMETHOD_(ULONG, AddRef)(THIS) PURE;
|
||||
STDMETHOD_(ULONG, Release)(THIS) PURE;
|
||||
|
||||
// ID3DXRenderToSurface
|
||||
STDMETHOD(GetDevice)(THIS_ LPDIRECT3DDEVICE8* ppDevice) PURE;
|
||||
STDMETHOD(GetDesc)(THIS_ D3DXRTS_DESC* pDesc) PURE;
|
||||
|
||||
STDMETHOD(BeginScene)(THIS_ LPDIRECT3DSURFACE8 pSurface, CONST D3DVIEWPORT8* pViewport) PURE;
|
||||
STDMETHOD(EndScene)(THIS) PURE;
|
||||
};
|
||||
|
||||
|
||||
#ifdef __cplusplus
|
||||
extern "C" {
|
||||
#endif //__cplusplus
|
||||
|
||||
HRESULT WINAPI
|
||||
D3DXCreateRenderToSurface(
|
||||
LPDIRECT3DDEVICE8 pDevice,
|
||||
UINT Width,
|
||||
UINT Height,
|
||||
D3DFORMAT Format,
|
||||
BOOL DepthStencil,
|
||||
D3DFORMAT DepthStencilFormat,
|
||||
LPD3DXRENDERTOSURFACE* ppRenderToSurface);
|
||||
|
||||
#ifdef __cplusplus
|
||||
}
|
||||
#endif //__cplusplus
|
||||
|
||||
|
||||
|
||||
///////////////////////////////////////////////////////////////////////////
|
||||
// ID3DXRenderToEnvMap:
|
||||
// --------------------
|
||||
///////////////////////////////////////////////////////////////////////////
|
||||
|
||||
typedef struct _D3DXRTE_DESC
|
||||
{
|
||||
UINT Size;
|
||||
D3DFORMAT Format;
|
||||
BOOL DepthStencil;
|
||||
D3DFORMAT DepthStencilFormat;
|
||||
} D3DXRTE_DESC;
|
||||
|
||||
|
||||
typedef interface ID3DXRenderToEnvMap ID3DXRenderToEnvMap;
|
||||
typedef interface ID3DXRenderToEnvMap *LPD3DXRenderToEnvMap;
|
||||
|
||||
// {9F6779E5-60A9-4d8b-AEE4-32770F405DBA}
|
||||
DEFINE_GUID( IID_ID3DXRenderToEnvMap,
|
||||
0x9f6779e5, 0x60a9, 0x4d8b, 0xae, 0xe4, 0x32, 0x77, 0xf, 0x40, 0x5d, 0xba);
|
||||
|
||||
|
||||
DECLARE_INTERFACE_(ID3DXRenderToEnvMap, IUnknown)
|
||||
{
|
||||
// IUnknown
|
||||
STDMETHOD(QueryInterface)(THIS_ REFIID iid, LPVOID *ppv) PURE;
|
||||
STDMETHOD_(ULONG, AddRef)(THIS) PURE;
|
||||
STDMETHOD_(ULONG, Release)(THIS) PURE;
|
||||
|
||||
// ID3DXRenderToEnvMap
|
||||
STDMETHOD(GetDevice)(THIS_ LPDIRECT3DDEVICE8* ppDevice) PURE;
|
||||
STDMETHOD(GetDesc)(THIS_ D3DXRTE_DESC* pDesc) PURE;
|
||||
|
||||
STDMETHOD(BeginCube)(THIS_
|
||||
LPDIRECT3DCUBETEXTURE8 pCubeTex) PURE;
|
||||
|
||||
STDMETHOD(BeginSphere)(THIS_
|
||||
LPDIRECT3DTEXTURE8 pTex) PURE;
|
||||
|
||||
STDMETHOD(BeginHemisphere)(THIS_
|
||||
LPDIRECT3DTEXTURE8 pTexZPos,
|
||||
LPDIRECT3DTEXTURE8 pTexZNeg) PURE;
|
||||
|
||||
STDMETHOD(BeginParabolic)(THIS_
|
||||
LPDIRECT3DTEXTURE8 pTexZPos,
|
||||
LPDIRECT3DTEXTURE8 pTexZNeg) PURE;
|
||||
|
||||
STDMETHOD(Face)(THIS_ D3DCUBEMAP_FACES Face) PURE;
|
||||
STDMETHOD(End)(THIS) PURE;
|
||||
};
|
||||
|
||||
|
||||
#ifdef __cplusplus
|
||||
extern "C" {
|
||||
#endif //__cplusplus
|
||||
|
||||
HRESULT WINAPI
|
||||
D3DXCreateRenderToEnvMap(
|
||||
LPDIRECT3DDEVICE8 pDevice,
|
||||
UINT Size,
|
||||
D3DFORMAT Format,
|
||||
BOOL DepthStencil,
|
||||
D3DFORMAT DepthStencilFormat,
|
||||
LPD3DXRenderToEnvMap* ppRenderToEnvMap);
|
||||
|
||||
#ifdef __cplusplus
|
||||
}
|
||||
#endif //__cplusplus
|
||||
|
||||
|
||||
|
||||
///////////////////////////////////////////////////////////////////////////
|
||||
// Shader assemblers:
|
||||
///////////////////////////////////////////////////////////////////////////
|
||||
|
||||
//-------------------------------------------------------------------------
|
||||
// D3DXASM flags:
|
||||
// --------------
|
||||
//
|
||||
// D3DXASM_DEBUG
|
||||
// Generate debug info.
|
||||
//
|
||||
// D3DXASM_SKIPVALIDATION
|
||||
// Do not validate the generated code against known capabilities and
|
||||
// constraints. This option is only recommended when assembling shaders
|
||||
// you KNOW will work. (ie. have assembled before without this option.)
|
||||
//-------------------------------------------------------------------------
|
||||
|
||||
#define D3DXASM_DEBUG (1 << 0)
|
||||
#define D3DXASM_SKIPVALIDATION (1 << 1)
|
||||
|
||||
|
||||
#ifdef __cplusplus
|
||||
extern "C" {
|
||||
#endif //__cplusplus
|
||||
|
||||
//-------------------------------------------------------------------------
|
||||
// D3DXAssembleShader:
|
||||
// ------------------------
|
||||
// Assembles an ascii description of a vertex or pixel shader into
|
||||
// binary form.
|
||||
//
|
||||
// Parameters:
|
||||
// pSrcFile
|
||||
// Source file name
|
||||
// pSrcData
|
||||
// Pointer to source code
|
||||
// SrcDataLen
|
||||
// Size of source code, in bytes
|
||||
// Flags
|
||||
// D3DXASM_xxx flags
|
||||
// ppConstants
|
||||
// Returns an ID3DXBuffer object containing constant declarations.
|
||||
// ppCompiledShader
|
||||
// Returns an ID3DXBuffer object containing the object code.
|
||||
// ppCompilationErrors
|
||||
// Returns an ID3DXBuffer object containing ascii error messages
|
||||
//-------------------------------------------------------------------------
|
||||
|
||||
HRESULT WINAPI
|
||||
D3DXAssembleShaderFromFileA(
|
||||
LPCSTR pSrcFile,
|
||||
DWORD Flags,
|
||||
LPD3DXBUFFER* ppConstants,
|
||||
LPD3DXBUFFER* ppCompiledShader,
|
||||
LPD3DXBUFFER* ppCompilationErrors);
|
||||
|
||||
HRESULT WINAPI
|
||||
D3DXAssembleShaderFromFileW(
|
||||
LPCWSTR pSrcFile,
|
||||
DWORD Flags,
|
||||
LPD3DXBUFFER* ppConstants,
|
||||
LPD3DXBUFFER* ppCompiledShader,
|
||||
LPD3DXBUFFER* ppCompilationErrors);
|
||||
|
||||
#ifdef UNICODE
|
||||
#define D3DXAssembleShaderFromFile D3DXAssembleShaderFromFileW
|
||||
#else
|
||||
#define D3DXAssembleShaderFromFile D3DXAssembleShaderFromFileA
|
||||
#endif
|
||||
|
||||
HRESULT WINAPI
|
||||
D3DXAssembleShader(
|
||||
LPCVOID pSrcData,
|
||||
UINT SrcDataLen,
|
||||
DWORD Flags,
|
||||
LPD3DXBUFFER* ppConstants,
|
||||
LPD3DXBUFFER* ppCompiledShader,
|
||||
LPD3DXBUFFER* ppCompilationErrors);
|
||||
|
||||
|
||||
#ifdef __cplusplus
|
||||
}
|
||||
#endif //__cplusplus
|
||||
|
||||
|
||||
///////////////////////////////////////////////////////////////////////////
|
||||
// Misc APIs:
|
||||
///////////////////////////////////////////////////////////////////////////
|
||||
|
||||
#ifdef __cplusplus
|
||||
extern "C" {
|
||||
#endif //__cplusplus
|
||||
|
||||
|
||||
//-------------------------------------------------------------------------
|
||||
// D3DXGetFVFVertexSize:
|
||||
// ---------------------
|
||||
// Returns the size (in bytes) of a vertex for a given FVF.
|
||||
//-------------------------------------------------------------------------
|
||||
|
||||
UINT WINAPI
|
||||
D3DXGetFVFVertexSize(DWORD FVF);
|
||||
|
||||
|
||||
//-------------------------------------------------------------------------
|
||||
// D3DXGetErrorString:
|
||||
// ------------------
|
||||
// Returns the error string for given an hresult. Interprets all D3DX and
|
||||
// D3D hresults.
|
||||
//
|
||||
// Parameters:
|
||||
// hr
|
||||
// The error code to be deciphered.
|
||||
// pBuffer
|
||||
// Pointer to the buffer to be filled in.
|
||||
// BufferLen
|
||||
// Count of characters in buffer. Any error message longer than this
|
||||
// length will be truncated to fit.
|
||||
//-------------------------------------------------------------------------
|
||||
HRESULT WINAPI
|
||||
D3DXGetErrorStringA(
|
||||
HRESULT hr,
|
||||
LPSTR pBuffer,
|
||||
UINT BufferLen);
|
||||
|
||||
HRESULT WINAPI
|
||||
D3DXGetErrorStringW(
|
||||
HRESULT hr,
|
||||
LPWSTR pBuffer,
|
||||
UINT BufferLen);
|
||||
|
||||
#ifdef UNICODE
|
||||
#define D3DXGetErrorString D3DXGetErrorStringW
|
||||
#else
|
||||
#define D3DXGetErrorString D3DXGetErrorStringA
|
||||
#endif
|
||||
|
||||
|
||||
|
||||
#ifdef __cplusplus
|
||||
}
|
||||
#endif //__cplusplus
|
||||
|
||||
|
||||
#endif //__D3DX8CORE_H__
|
|
@ -0,0 +1,236 @@
|
|||
///////////////////////////////////////////////////////////////////////////
|
||||
//
|
||||
// Copyright (C) 1999 Microsoft Corporation. All Rights Reserved.
|
||||
//
|
||||
// File: d3dx8effect.h
|
||||
// Content: D3DX effect types and functions
|
||||
//
|
||||
///////////////////////////////////////////////////////////////////////////
|
||||
|
||||
#include "d3dx8.h"
|
||||
|
||||
#ifndef __D3DX8EFFECT_H__
|
||||
#define __D3DX8EFFECT_H__
|
||||
|
||||
|
||||
typedef enum _D3DXPARAMETERTYPE
|
||||
{
|
||||
D3DXPT_DWORD = 0,
|
||||
D3DXPT_FLOAT = 1,
|
||||
D3DXPT_VECTOR = 2,
|
||||
D3DXPT_MATRIX = 3,
|
||||
D3DXPT_TEXTURE = 4,
|
||||
D3DXPT_VERTEXSHADER = 5,
|
||||
D3DXPT_PIXELSHADER = 6,
|
||||
D3DXPT_CONSTANT = 7,
|
||||
D3DXPT_FORCE_DWORD = 0x7fffffff /* force 32-bit size enum */
|
||||
|
||||
} D3DXPARAMETERTYPE;
|
||||
|
||||
|
||||
typedef struct _D3DXEFFECT_DESC
|
||||
{
|
||||
UINT Parameters;
|
||||
UINT Techniques;
|
||||
DWORD Usage;
|
||||
|
||||
} D3DXEFFECT_DESC;
|
||||
|
||||
|
||||
typedef struct _D3DXPARAMETER_DESC
|
||||
{
|
||||
DWORD Name;
|
||||
D3DXPARAMETERTYPE Type;
|
||||
|
||||
} D3DXPARAMETER_DESC;
|
||||
|
||||
|
||||
typedef struct _D3DXTECHNIQUE_DESC
|
||||
{
|
||||
DWORD Name;
|
||||
UINT Passes;
|
||||
|
||||
} D3DXTECHNIQUE_DESC;
|
||||
|
||||
|
||||
typedef struct _D3DXPASS_DESC
|
||||
{
|
||||
DWORD Name;
|
||||
|
||||
} D3DXPASS_DESC;
|
||||
|
||||
|
||||
typedef struct ID3DXEffect *LPD3DXEFFECT;
|
||||
typedef struct ID3DXTechnique *LPD3DXTECHNIQUE;
|
||||
|
||||
|
||||
|
||||
|
||||
//////////////////////////////////////////////////////////////////////////////
|
||||
// ID3DXTechnique ////////////////////////////////////////////////////////////
|
||||
//////////////////////////////////////////////////////////////////////////////
|
||||
|
||||
// {A00F378D-AF79-4917-907E-4D635EE63844}
|
||||
DEFINE_GUID( IID_ID3DXTechnique,
|
||||
0xa00f378d, 0xaf79, 0x4917, 0x90, 0x7e, 0x4d, 0x63, 0x5e, 0xe6, 0x38, 0x44);
|
||||
|
||||
|
||||
DECLARE_INTERFACE_(ID3DXTechnique, IUnknown)
|
||||
{
|
||||
// IUnknown
|
||||
STDMETHOD(QueryInterface)(THIS_ REFIID iid, LPVOID *ppv) PURE;
|
||||
STDMETHOD_(ULONG, AddRef)(THIS) PURE;
|
||||
STDMETHOD_(ULONG, Release)(THIS) PURE;
|
||||
|
||||
// ID3DXTechnique
|
||||
STDMETHOD(GetDevice)(THIS_ LPDIRECT3DDEVICE8* ppDevice) PURE;
|
||||
STDMETHOD(GetDesc)(THIS_ D3DXTECHNIQUE_DESC* pDesc) PURE;
|
||||
STDMETHOD(GetPassDesc)(THIS_ UINT Index, D3DXPASS_DESC* pDesc) PURE;
|
||||
|
||||
STDMETHOD_(BOOL, IsParameterUsed)(THIS_ DWORD dwName) PURE;
|
||||
|
||||
STDMETHOD(Validate)(THIS) PURE;
|
||||
STDMETHOD(Begin)(THIS_ UINT *pPasses) PURE;
|
||||
STDMETHOD(Pass)(THIS_ UINT Index) PURE;
|
||||
STDMETHOD(End)(THIS) PURE;
|
||||
};
|
||||
|
||||
|
||||
//////////////////////////////////////////////////////////////////////////////
|
||||
// ID3DXEffect ///////////////////////////////////////////////////////////////
|
||||
//////////////////////////////////////////////////////////////////////////////
|
||||
|
||||
|
||||
// {281BBDD4-AEDF-4907-8650-E79CDFD45165}
|
||||
DEFINE_GUID( IID_ID3DXEffect,
|
||||
0x281bbdd4, 0xaedf, 0x4907, 0x86, 0x50, 0xe7, 0x9c, 0xdf, 0xd4, 0x51, 0x65);
|
||||
|
||||
|
||||
DECLARE_INTERFACE_(ID3DXEffect, IUnknown)
|
||||
{
|
||||
// IUnknown
|
||||
STDMETHOD(QueryInterface)(THIS_ REFIID iid, LPVOID *ppv) PURE;
|
||||
STDMETHOD_(ULONG, AddRef)(THIS) PURE;
|
||||
STDMETHOD_(ULONG, Release)(THIS) PURE;
|
||||
|
||||
// ID3DXEffect
|
||||
STDMETHOD(GetDevice)(THIS_ LPDIRECT3DDEVICE8* ppDevice) PURE;
|
||||
STDMETHOD(GetDesc)(THIS_ D3DXEFFECT_DESC* pDesc) PURE;
|
||||
|
||||
STDMETHOD(GetParameterDesc)(THIS_ UINT Index, D3DXPARAMETER_DESC* pDesc) PURE;
|
||||
STDMETHOD(GetTechniqueDesc)(THIS_ UINT Index, D3DXTECHNIQUE_DESC* pDesc) PURE;
|
||||
|
||||
STDMETHOD(SetDword)(THIS_ DWORD Name, DWORD dw) PURE;
|
||||
STDMETHOD(GetDword)(THIS_ DWORD Name, DWORD* pdw) PURE;
|
||||
STDMETHOD(SetFloat)(THIS_ DWORD Name, FLOAT f) PURE;
|
||||
STDMETHOD(GetFloat)(THIS_ DWORD Name, FLOAT* pf) PURE;
|
||||
STDMETHOD(SetVector)(THIS_ DWORD Name, D3DXVECTOR4* pVector) PURE;
|
||||
STDMETHOD(GetVector)(THIS_ DWORD Name, D3DXVECTOR4* pVector) PURE;
|
||||
STDMETHOD(SetMatrix)(THIS_ DWORD Name, D3DXMATRIX* pMatrix) PURE;
|
||||
STDMETHOD(GetMatrix)(THIS_ DWORD Name, D3DXMATRIX* pMatrix) PURE;
|
||||
STDMETHOD(SetTexture)(THIS_ DWORD Name, LPDIRECT3DBASETEXTURE8 pTexture) PURE;
|
||||
STDMETHOD(GetTexture)(THIS_ DWORD Name, LPDIRECT3DBASETEXTURE8 *ppTexture) PURE;
|
||||
STDMETHOD(SetVertexShader)(THIS_ DWORD Name, DWORD Handle) PURE;
|
||||
STDMETHOD(GetVertexShader)(THIS_ DWORD Name, DWORD* pHandle) PURE;
|
||||
STDMETHOD(SetPixelShader)(THIS_ DWORD Name, DWORD Handle) PURE;
|
||||
STDMETHOD(GetPixelShader)(THIS_ DWORD Name, DWORD* pHandle) PURE;
|
||||
|
||||
STDMETHOD(GetTechnique)(THIS_ UINT Index, LPD3DXTECHNIQUE* ppTechnique) PURE;
|
||||
STDMETHOD(CloneEffect)(THIS_ LPDIRECT3DDEVICE8 pDevice, DWORD Usage, LPD3DXEFFECT* ppEffect) PURE;
|
||||
};
|
||||
|
||||
|
||||
|
||||
//////////////////////////////////////////////////////////////////////////////
|
||||
// APIs //////////////////////////////////////////////////////////////////////
|
||||
//////////////////////////////////////////////////////////////////////////////
|
||||
|
||||
|
||||
#ifdef __cplusplus
|
||||
extern "C" {
|
||||
#endif //__cplusplus
|
||||
|
||||
|
||||
//----------------------------------------------------------------------------
|
||||
// D3DXCompileEffect:
|
||||
// ------------------
|
||||
// Compiles an ascii effect description into a binary form usable by
|
||||
// D3DXCreateEffect.
|
||||
//
|
||||
// Parameters:
|
||||
// pSrcFile
|
||||
// Name of the file containing the ascii effect description
|
||||
// pSrcData
|
||||
// Pointer to ascii effect description
|
||||
// SrcDataSize
|
||||
// Size of the effect description in bytes
|
||||
// ppCompiledEffect
|
||||
// Returns a buffer containing compiled effect.
|
||||
// ppCompilationErrors
|
||||
// Returns a buffer containing any error messages which occurred during
|
||||
// compile. Or NULL if you do not care about the error messages.
|
||||
//
|
||||
//----------------------------------------------------------------------------
|
||||
|
||||
HRESULT WINAPI
|
||||
D3DXCompileEffectFromFileA(
|
||||
LPCSTR pSrcFile,
|
||||
LPD3DXBUFFER* ppCompiledEffect,
|
||||
LPD3DXBUFFER* ppCompilationErrors);
|
||||
|
||||
HRESULT WINAPI
|
||||
D3DXCompileEffectFromFileW(
|
||||
LPCWSTR pSrcFile,
|
||||
LPD3DXBUFFER* ppCompiledEffect,
|
||||
LPD3DXBUFFER* ppCompilationErrors);
|
||||
|
||||
#ifdef UNICODE
|
||||
#define D3DXCompileEffectFromFile D3DXCompileEffectFromFileW
|
||||
#else
|
||||
#define D3DXCompileEffectFromFile D3DXCompileEffectFromFileA
|
||||
#endif
|
||||
|
||||
|
||||
HRESULT WINAPI
|
||||
D3DXCompileEffect(
|
||||
LPCVOID pSrcData,
|
||||
UINT SrcDataSize,
|
||||
LPD3DXBUFFER* ppCompiledEffect,
|
||||
LPD3DXBUFFER* ppCompilationErrors);
|
||||
|
||||
|
||||
|
||||
//----------------------------------------------------------------------------
|
||||
// D3DXCreateEffect:
|
||||
// -----------------
|
||||
// Creates an effect object, given compiled binary effect data
|
||||
//
|
||||
// Parameters:
|
||||
// pDevice
|
||||
// Pointer to the device to be used.
|
||||
// pCompiledEffect
|
||||
// Pointer to compiled effect data
|
||||
// CompiledEffectSize
|
||||
// Size of compiled effect data in bytes
|
||||
// Usage
|
||||
// Allows the specification of D3DUSAGE_SOFTWAREPROCESSING
|
||||
// ppEffect
|
||||
// Returns the created effect object
|
||||
//----------------------------------------------------------------------------
|
||||
|
||||
|
||||
HRESULT WINAPI
|
||||
D3DXCreateEffect(
|
||||
LPDIRECT3DDEVICE8 pDevice,
|
||||
LPCVOID pCompiledEffect,
|
||||
UINT CompiledEffectSize,
|
||||
DWORD Usage,
|
||||
LPD3DXEFFECT* ppEffect);
|
||||
|
||||
|
||||
|
||||
#ifdef __cplusplus
|
||||
}
|
||||
#endif //__cplusplus
|
||||
|
||||
#endif //__D3DX8EFFECT_H__
|
File diff suppressed because it is too large
Load Diff
File diff suppressed because it is too large
Load Diff
|
@ -0,0 +1,565 @@
|
|||
//////////////////////////////////////////////////////////////////////////////
|
||||
//
|
||||
// Copyright (C) 1998 Microsoft Corporation. All Rights Reserved.
|
||||
//
|
||||
// File: d3dx8mesh.h
|
||||
// Content: D3DX mesh types and functions
|
||||
//
|
||||
//////////////////////////////////////////////////////////////////////////////
|
||||
|
||||
#include "d3dx8.h"
|
||||
|
||||
#ifndef __D3DX8MESH_H__
|
||||
#define __D3DX8MESH_H__
|
||||
|
||||
#include "dxfile.h" // defines LPDIRECTXFILEDATA
|
||||
|
||||
// {A69BA991-1F7D-11d3-B929-00C04F68DC23}
|
||||
DEFINE_GUID(IID_ID3DXBaseMesh,
|
||||
0xa69ba991, 0x1f7d, 0x11d3, 0xb9, 0x29, 0x0, 0xc0, 0x4f, 0x68, 0xdc, 0x23);
|
||||
|
||||
// {9D84AC46-6B90-49a9-A721-085C7A3E3DAE}
|
||||
DEFINE_GUID(IID_ID3DXMesh,
|
||||
0x9d84ac46, 0x6b90, 0x49a9, 0xa7, 0x21, 0x8, 0x5c, 0x7a, 0x3e, 0x3d, 0xae);
|
||||
|
||||
// {15981AA8-1A05-48e3-BBE7-FF5D49654E3F}
|
||||
DEFINE_GUID(IID_ID3DXPMesh,
|
||||
0x15981aa8, 0x1a05, 0x48e3, 0xbb, 0xe7, 0xff, 0x5d, 0x49, 0x65, 0x4e, 0x3f);
|
||||
|
||||
// {BC3BBDE2-1F7D-11d3-B929-00C04F68DC23}
|
||||
DEFINE_GUID(IID_ID3DXSPMesh,
|
||||
0xbc3bbde2, 0x1f7d, 0x11d3, 0xb9, 0x29, 0x0, 0xc0, 0x4f, 0x68, 0xdc, 0x23);
|
||||
|
||||
// {82A53844-F322-409e-A2E9-992E1104069D}
|
||||
DEFINE_GUID(IID_ID3DXSkinMesh,
|
||||
0x82a53844, 0xf322, 0x409e, 0xa2, 0xe9, 0x99, 0x2e, 0x11, 0x4, 0x6, 0x9d);
|
||||
|
||||
|
||||
enum _D3DXMESH {
|
||||
D3DXMESH_32BIT = 0x001, // If set, then use 32 bit indices, if not set use 16 bit indices. 32BIT meshes currently not supported on ID3DXSkinMesh object
|
||||
D3DXMESH_DONOTCLIP = 0x002, // Use D3DUSAGE_DONOTCLIP for VB & IB.
|
||||
D3DXMESH_POINTS = 0x004, // Use D3DUSAGE_POINTS for VB & IB.
|
||||
D3DXMESH_RTPATCHES = 0x008, // Use D3DUSAGE_RTPATCHES for VB & IB.
|
||||
D3DXMESH_NPATCHES = 0x4000,// Use D3DUSAGE_NPATCHES for VB & IB.
|
||||
D3DXMESH_VB_SYSTEMMEM = 0x010, // Use D3DPOOL_SYSTEMMEM for VB. Overrides D3DXMESH_MANAGEDVERTEXBUFFER
|
||||
D3DXMESH_VB_MANAGED = 0x020, // Use D3DPOOL_MANAGED for VB.
|
||||
D3DXMESH_VB_WRITEONLY = 0x040, // Use D3DUSAGE_WRITEONLY for VB.
|
||||
D3DXMESH_VB_DYNAMIC = 0x080, // Use D3DUSAGE_DYNAMIC for VB.
|
||||
D3DXMESH_IB_SYSTEMMEM = 0x100, // Use D3DPOOL_SYSTEMMEM for IB. Overrides D3DXMESH_MANAGEDINDEXBUFFER
|
||||
D3DXMESH_IB_MANAGED = 0x200, // Use D3DPOOL_MANAGED for IB.
|
||||
D3DXMESH_IB_WRITEONLY = 0x400, // Use D3DUSAGE_WRITEONLY for IB.
|
||||
D3DXMESH_IB_DYNAMIC = 0x800, // Use D3DUSAGE_DYNAMIC for IB.
|
||||
|
||||
D3DXMESH_VB_SHARE = 0x1000, // Valid for Clone* calls only, forces cloned mesh/pmesh to share vertex buffer
|
||||
|
||||
D3DXMESH_USEHWONLY = 0x2000, // Valid for ID3DXSkinMesh::ConvertToBlendedMesh
|
||||
|
||||
// Helper options
|
||||
D3DXMESH_SYSTEMMEM = 0x110, // D3DXMESH_VB_SYSTEMMEM | D3DXMESH_IB_SYSTEMMEM
|
||||
D3DXMESH_MANAGED = 0x220, // D3DXMESH_VB_MANAGED | D3DXMESH_IB_MANAGED
|
||||
D3DXMESH_WRITEONLY = 0x440, // D3DXMESH_VB_WRITEONLY | D3DXMESH_IB_WRITEONLY
|
||||
D3DXMESH_DYNAMIC = 0x880, // D3DXMESH_VB_DYNAMIC | D3DXMESH_IB_DYNAMIC
|
||||
|
||||
};
|
||||
|
||||
// option field values for specifying min value in D3DXGeneratePMesh and D3DXSimplifyMesh
|
||||
enum _D3DXMESHSIMP
|
||||
{
|
||||
D3DXMESHSIMP_VERTEX = 0x1,
|
||||
D3DXMESHSIMP_FACE = 0x2,
|
||||
|
||||
};
|
||||
|
||||
enum _MAX_FVF_DECL_SIZE
|
||||
{
|
||||
MAX_FVF_DECL_SIZE = 20
|
||||
};
|
||||
|
||||
typedef struct ID3DXBaseMesh *LPD3DXBASEMESH;
|
||||
typedef struct ID3DXMesh *LPD3DXMESH;
|
||||
typedef struct ID3DXPMesh *LPD3DXPMESH;
|
||||
typedef struct ID3DXSPMesh *LPD3DXSPMESH;
|
||||
typedef struct ID3DXSkinMesh *LPD3DXSKINMESH;
|
||||
|
||||
typedef struct _D3DXATTRIBUTERANGE
|
||||
{
|
||||
DWORD AttribId;
|
||||
DWORD FaceStart;
|
||||
DWORD FaceCount;
|
||||
DWORD VertexStart;
|
||||
DWORD VertexCount;
|
||||
} D3DXATTRIBUTERANGE;
|
||||
|
||||
typedef D3DXATTRIBUTERANGE* LPD3DXATTRIBUTERANGE;
|
||||
|
||||
#ifdef __cplusplus
|
||||
extern "C" {
|
||||
#endif //__cplusplus
|
||||
struct D3DXMATERIAL
|
||||
{
|
||||
D3DMATERIAL8 MatD3D;
|
||||
LPSTR pTextureFilename;
|
||||
};
|
||||
typedef struct D3DXMATERIAL *LPD3DXMATERIAL;
|
||||
#ifdef __cplusplus
|
||||
}
|
||||
#endif //__cplusplus
|
||||
|
||||
typedef struct _D3DXATTRIBUTEWEIGHTS
|
||||
{
|
||||
FLOAT Position;
|
||||
FLOAT Boundary;
|
||||
FLOAT Normal;
|
||||
FLOAT Diffuse;
|
||||
FLOAT Specular;
|
||||
FLOAT Tex[8];
|
||||
} D3DXATTRIBUTEWEIGHTS;
|
||||
|
||||
typedef D3DXATTRIBUTEWEIGHTS* LPD3DXATTRIBUTEWEIGHTS;
|
||||
|
||||
DECLARE_INTERFACE_(ID3DXBaseMesh, IUnknown)
|
||||
{
|
||||
// IUnknown
|
||||
STDMETHOD(QueryInterface)(THIS_ REFIID iid, LPVOID *ppv) PURE;
|
||||
STDMETHOD_(ULONG, AddRef)(THIS) PURE;
|
||||
STDMETHOD_(ULONG, Release)(THIS) PURE;
|
||||
|
||||
// ID3DXBaseMesh
|
||||
STDMETHOD(DrawSubset)(THIS_ DWORD AttribId) PURE;
|
||||
STDMETHOD_(DWORD, GetNumFaces)(THIS) PURE;
|
||||
STDMETHOD_(DWORD, GetNumVertices)(THIS) PURE;
|
||||
STDMETHOD_(DWORD, GetFVF)(THIS) PURE;
|
||||
STDMETHOD(GetDeclaration)(THIS_ DWORD Declaration[MAX_FVF_DECL_SIZE]) PURE;
|
||||
STDMETHOD_(DWORD, GetOptions)(THIS) PURE;
|
||||
STDMETHOD(GetDevice)(THIS_ LPDIRECT3DDEVICE8* ppDevice) PURE;
|
||||
STDMETHOD(CloneMeshFVF)(THIS_ DWORD Options,
|
||||
DWORD FVF, LPDIRECT3DDEVICE8 pD3DDevice, LPD3DXMESH* ppCloneMesh) PURE;
|
||||
STDMETHOD(CloneMesh)(THIS_ DWORD Options,
|
||||
CONST DWORD *pDeclaration, LPDIRECT3DDEVICE8 pD3DDevice, LPD3DXMESH* ppCloneMesh) PURE;
|
||||
STDMETHOD(GetVertexBuffer)(THIS_ LPDIRECT3DVERTEXBUFFER8* ppVB) PURE;
|
||||
STDMETHOD(GetIndexBuffer)(THIS_ LPDIRECT3DINDEXBUFFER8* ppIB) PURE;
|
||||
STDMETHOD(LockVertexBuffer)(THIS_ DWORD Flags, BYTE** ppData) PURE;
|
||||
STDMETHOD(UnlockVertexBuffer)(THIS) PURE;
|
||||
STDMETHOD(LockIndexBuffer)(THIS_ DWORD Flags, BYTE** ppData) PURE;
|
||||
STDMETHOD(UnlockIndexBuffer)(THIS) PURE;
|
||||
STDMETHOD(GetAttributeTable)(
|
||||
THIS_ D3DXATTRIBUTERANGE *pAttribTable, DWORD* pAttribTableSize) PURE;
|
||||
};
|
||||
|
||||
DECLARE_INTERFACE_(ID3DXMesh, ID3DXBaseMesh)
|
||||
{
|
||||
// IUnknown
|
||||
STDMETHOD(QueryInterface)(THIS_ REFIID iid, LPVOID *ppv) PURE;
|
||||
STDMETHOD_(ULONG, AddRef)(THIS) PURE;
|
||||
STDMETHOD_(ULONG, Release)(THIS) PURE;
|
||||
|
||||
// ID3DXBaseMesh
|
||||
STDMETHOD(DrawSubset)(THIS_ DWORD AttribId) PURE;
|
||||
STDMETHOD_(DWORD, GetNumFaces)(THIS) PURE;
|
||||
STDMETHOD_(DWORD, GetNumVertices)(THIS) PURE;
|
||||
STDMETHOD_(DWORD, GetFVF)(THIS) PURE;
|
||||
STDMETHOD(GetDeclaration)(THIS_ DWORD Declaration[MAX_FVF_DECL_SIZE]) PURE;
|
||||
STDMETHOD_(DWORD, GetOptions)(THIS) PURE;
|
||||
STDMETHOD(GetDevice)(THIS_ LPDIRECT3DDEVICE8* ppDevice) PURE;
|
||||
STDMETHOD(CloneMeshFVF)(THIS_ DWORD Options,
|
||||
DWORD FVF, LPDIRECT3DDEVICE8 pD3DDevice, LPD3DXMESH* ppCloneMesh) PURE;
|
||||
STDMETHOD(CloneMesh)(THIS_ DWORD Options,
|
||||
CONST DWORD *pDeclaration, LPDIRECT3DDEVICE8 pD3DDevice, LPD3DXMESH* ppCloneMesh) PURE;
|
||||
STDMETHOD(GetVertexBuffer)(THIS_ LPDIRECT3DVERTEXBUFFER8* ppVB) PURE;
|
||||
STDMETHOD(GetIndexBuffer)(THIS_ LPDIRECT3DINDEXBUFFER8* ppIB) PURE;
|
||||
STDMETHOD(LockVertexBuffer)(THIS_ DWORD Flags, BYTE** ppData) PURE;
|
||||
STDMETHOD(UnlockVertexBuffer)(THIS) PURE;
|
||||
STDMETHOD(LockIndexBuffer)(THIS_ DWORD Flags, BYTE** ppData) PURE;
|
||||
STDMETHOD(UnlockIndexBuffer)(THIS) PURE;
|
||||
STDMETHOD(GetAttributeTable)(
|
||||
THIS_ D3DXATTRIBUTERANGE *pAttribTable, DWORD* pAttribTableSize) PURE;
|
||||
|
||||
// ID3DXMesh
|
||||
STDMETHOD(LockAttributeBuffer)(THIS_ DWORD Flags, DWORD** ppData) PURE;
|
||||
STDMETHOD(UnlockAttributeBuffer)(THIS) PURE;
|
||||
STDMETHOD(ConvertPointRepsToAdjacency)(THIS_ CONST DWORD* pPRep, DWORD* pAdjacency) PURE;
|
||||
STDMETHOD(ConvertAdjacencyToPointReps)(THIS_ CONST DWORD* pAdjacency, DWORD* pPRep) PURE;
|
||||
STDMETHOD(GenerateAdjacency)(THIS_ FLOAT fEpsilon, DWORD* pAdjacency) PURE;
|
||||
STDMETHOD(Optimize)(THIS_ DWORD Flags, CONST DWORD* pAdjacencyIn, DWORD* pAdjacencyOut,
|
||||
DWORD* pFaceRemap, LPD3DXBUFFER *ppVertexRemap,
|
||||
LPD3DXMESH* ppOptMesh) PURE;
|
||||
STDMETHOD(OptimizeInplace)(THIS_ DWORD Flags, CONST DWORD* pAdjacencyIn, DWORD* pAdjacencyOut,
|
||||
DWORD* pFaceRemap, LPD3DXBUFFER *ppVertexRemap) PURE;
|
||||
};
|
||||
|
||||
DECLARE_INTERFACE_(ID3DXPMesh, ID3DXBaseMesh)
|
||||
{
|
||||
// IUnknown
|
||||
STDMETHOD(QueryInterface)(THIS_ REFIID iid, LPVOID *ppv) PURE;
|
||||
STDMETHOD_(ULONG, AddRef)(THIS) PURE;
|
||||
STDMETHOD_(ULONG, Release)(THIS) PURE;
|
||||
|
||||
// ID3DXBaseMesh
|
||||
STDMETHOD(DrawSubset)(THIS_ DWORD AttribId) PURE;
|
||||
STDMETHOD_(DWORD, GetNumFaces)(THIS) PURE;
|
||||
STDMETHOD_(DWORD, GetNumVertices)(THIS) PURE;
|
||||
STDMETHOD_(DWORD, GetFVF)(THIS) PURE;
|
||||
STDMETHOD(GetDeclaration)(THIS_ DWORD Declaration[MAX_FVF_DECL_SIZE]) PURE;
|
||||
STDMETHOD_(DWORD, GetOptions)(THIS) PURE;
|
||||
STDMETHOD(GetDevice)(THIS_ LPDIRECT3DDEVICE8* ppDevice) PURE;
|
||||
STDMETHOD(CloneMeshFVF)(THIS_ DWORD Options,
|
||||
DWORD FVF, LPDIRECT3DDEVICE8 pD3DDevice, LPD3DXMESH* ppCloneMesh) PURE;
|
||||
STDMETHOD(CloneMesh)(THIS_ DWORD Options,
|
||||
CONST DWORD *pDeclaration, LPDIRECT3DDEVICE8 pD3DDevice, LPD3DXMESH* ppCloneMesh) PURE;
|
||||
STDMETHOD(GetVertexBuffer)(THIS_ LPDIRECT3DVERTEXBUFFER8* ppVB) PURE;
|
||||
STDMETHOD(GetIndexBuffer)(THIS_ LPDIRECT3DINDEXBUFFER8* ppIB) PURE;
|
||||
STDMETHOD(LockVertexBuffer)(THIS_ DWORD Flags, BYTE** ppData) PURE;
|
||||
STDMETHOD(UnlockVertexBuffer)(THIS) PURE;
|
||||
STDMETHOD(LockIndexBuffer)(THIS_ DWORD Flags, BYTE** ppData) PURE;
|
||||
STDMETHOD(UnlockIndexBuffer)(THIS) PURE;
|
||||
STDMETHOD(GetAttributeTable)(
|
||||
THIS_ D3DXATTRIBUTERANGE *pAttribTable, DWORD* pAttribTableSize) PURE;
|
||||
|
||||
// ID3DXPMesh
|
||||
STDMETHOD(ClonePMeshFVF)(THIS_ DWORD Options,
|
||||
DWORD FVF, LPDIRECT3DDEVICE8 pD3D, LPD3DXPMESH* ppCloneMesh) PURE;
|
||||
STDMETHOD(ClonePMesh)(THIS_ DWORD Options,
|
||||
CONST DWORD *pDeclaration, LPDIRECT3DDEVICE8 pD3D, LPD3DXPMESH* ppCloneMesh) PURE;
|
||||
STDMETHOD(SetNumFaces)(THIS_ DWORD Faces) PURE;
|
||||
STDMETHOD(SetNumVertices)(THIS_ DWORD Vertices) PURE;
|
||||
STDMETHOD_(DWORD, GetMaxFaces)(THIS) PURE;
|
||||
STDMETHOD_(DWORD, GetMinFaces)(THIS) PURE;
|
||||
STDMETHOD_(DWORD, GetMaxVertices)(THIS) PURE;
|
||||
STDMETHOD_(DWORD, GetMinVertices)(THIS) PURE;
|
||||
STDMETHOD(Save)(THIS_ IStream *pStream, LPD3DXMATERIAL pMaterials, DWORD NumMaterials) PURE;
|
||||
|
||||
STDMETHOD(Optimize)(THIS_ DWORD Flags, DWORD* pAdjacencyOut,
|
||||
DWORD* pFaceRemap, LPD3DXBUFFER *ppVertexRemap,
|
||||
LPD3DXMESH* ppOptMesh) PURE;
|
||||
STDMETHOD(GetAdjacency)(THIS_ DWORD* pAdjacency) PURE;
|
||||
};
|
||||
|
||||
DECLARE_INTERFACE_(ID3DXSPMesh, IUnknown)
|
||||
{
|
||||
// IUnknown
|
||||
STDMETHOD(QueryInterface)(THIS_ REFIID iid, LPVOID *ppv) PURE;
|
||||
STDMETHOD_(ULONG, AddRef)(THIS) PURE;
|
||||
STDMETHOD_(ULONG, Release)(THIS) PURE;
|
||||
|
||||
// ID3DXSPMesh
|
||||
STDMETHOD_(DWORD, GetNumFaces)(THIS) PURE;
|
||||
STDMETHOD_(DWORD, GetNumVertices)(THIS) PURE;
|
||||
STDMETHOD_(DWORD, GetFVF)(THIS) PURE;
|
||||
STDMETHOD(GetDeclaration)(THIS_ DWORD Declaration[MAX_FVF_DECL_SIZE]) PURE;
|
||||
STDMETHOD_(DWORD, GetOptions)(THIS) PURE;
|
||||
STDMETHOD(GetDevice)(THIS_ LPDIRECT3DDEVICE8* ppDevice) PURE;
|
||||
STDMETHOD(CloneMeshFVF)(THIS_ DWORD Options,
|
||||
DWORD FVF, LPDIRECT3DDEVICE8 pD3D, DWORD *pAdjacencyOut, DWORD *pVertexRemapOut, LPD3DXMESH* ppCloneMesh) PURE;
|
||||
STDMETHOD(CloneMesh)(THIS_ DWORD Options,
|
||||
CONST DWORD *pDeclaration, LPDIRECT3DDEVICE8 pD3DDevice, DWORD *pAdjacencyOut, DWORD *pVertexRemapOut, LPD3DXMESH* ppCloneMesh) PURE;
|
||||
STDMETHOD(ClonePMeshFVF)(THIS_ DWORD Options,
|
||||
DWORD FVF, LPDIRECT3DDEVICE8 pD3D, DWORD *pVertexRemapOut, LPD3DXPMESH* ppCloneMesh) PURE;
|
||||
STDMETHOD(ClonePMesh)(THIS_ DWORD Options,
|
||||
CONST DWORD *pDeclaration, LPDIRECT3DDEVICE8 pD3D, DWORD *pVertexRemapOut, LPD3DXPMESH* ppCloneMesh) PURE;
|
||||
STDMETHOD(ReduceFaces)(THIS_ DWORD Faces) PURE;
|
||||
STDMETHOD(ReduceVertices)(THIS_ DWORD Vertices) PURE;
|
||||
STDMETHOD_(DWORD, GetMaxFaces)(THIS) PURE;
|
||||
STDMETHOD_(DWORD, GetMaxVertices)(THIS) PURE;
|
||||
};
|
||||
|
||||
#define UNUSED16 (0xffff)
|
||||
#define UNUSED32 (0xffffffff)
|
||||
|
||||
// ID3DXMesh::Optimize options
|
||||
enum _D3DXMESHOPT {
|
||||
D3DXMESHOPT_COMPACT = 0x001,
|
||||
D3DXMESHOPT_ATTRSORT = 0x002,
|
||||
D3DXMESHOPT_VERTEXCACHE = 0x004,
|
||||
D3DXMESHOPT_STRIPREORDER = 0x008,
|
||||
D3DXMESHOPT_IGNOREVERTS = 0x010, // optimize faces only, don't touch vertices
|
||||
D3DXMESHOPT_SHAREVB = 0x020,
|
||||
};
|
||||
|
||||
// Subset of the mesh that has the same attribute and bone combination.
|
||||
// This subset can be rendered in a single draw call
|
||||
typedef struct _D3DXBONECOMBINATION
|
||||
{
|
||||
DWORD AttribId;
|
||||
DWORD FaceStart;
|
||||
DWORD FaceCount;
|
||||
DWORD VertexStart;
|
||||
DWORD VertexCount;
|
||||
DWORD* BoneId;
|
||||
} D3DXBONECOMBINATION, *LPD3DXBONECOMBINATION;
|
||||
|
||||
DECLARE_INTERFACE_(ID3DXSkinMesh, IUnknown)
|
||||
{
|
||||
// IUnknown
|
||||
STDMETHOD(QueryInterface)(THIS_ REFIID iid, LPVOID *ppv) PURE;
|
||||
STDMETHOD_(ULONG, AddRef)(THIS) PURE;
|
||||
STDMETHOD_(ULONG, Release)(THIS) PURE;
|
||||
|
||||
// ID3DXMesh
|
||||
STDMETHOD_(DWORD, GetNumFaces)(THIS) PURE;
|
||||
STDMETHOD_(DWORD, GetNumVertices)(THIS) PURE;
|
||||
STDMETHOD_(DWORD, GetFVF)(THIS) PURE;
|
||||
STDMETHOD(GetDeclaration)(THIS_ DWORD Declaration[MAX_FVF_DECL_SIZE]) PURE;
|
||||
STDMETHOD_(DWORD, GetOptions)(THIS) PURE;
|
||||
STDMETHOD(GetDevice)(THIS_ LPDIRECT3DDEVICE8* ppDevice) PURE;
|
||||
STDMETHOD(GetVertexBuffer)(THIS_ LPDIRECT3DVERTEXBUFFER8* ppVB) PURE;
|
||||
STDMETHOD(GetIndexBuffer)(THIS_ LPDIRECT3DINDEXBUFFER8* ppIB) PURE;
|
||||
STDMETHOD(LockVertexBuffer)(THIS_ DWORD flags, BYTE** ppData) PURE;
|
||||
STDMETHOD(UnlockVertexBuffer)(THIS) PURE;
|
||||
STDMETHOD(LockIndexBuffer)(THIS_ DWORD flags, BYTE** ppData) PURE;
|
||||
STDMETHOD(UnlockIndexBuffer)(THIS) PURE;
|
||||
STDMETHOD(LockAttributeBuffer)(THIS_ DWORD flags, DWORD** ppData) PURE;
|
||||
STDMETHOD(UnlockAttributeBuffer)(THIS) PURE;
|
||||
// ID3DXSkinMesh
|
||||
STDMETHOD_(DWORD, GetNumBones)(THIS) PURE;
|
||||
STDMETHOD(GetOriginalMesh)(THIS_ LPD3DXMESH* ppMesh) PURE;
|
||||
STDMETHOD(SetBoneInfluence)(THIS_ DWORD bone, DWORD numInfluences, CONST DWORD* vertices, CONST FLOAT* weights) PURE;
|
||||
STDMETHOD_(DWORD, GetNumBoneInfluences)(THIS_ DWORD bone) PURE;
|
||||
STDMETHOD(GetBoneInfluence)(THIS_ DWORD bone, DWORD* vertices, FLOAT* weights) PURE;
|
||||
STDMETHOD(GetMaxVertexInfluences)(THIS_ DWORD* maxVertexInfluences) PURE;
|
||||
STDMETHOD(GetMaxFaceInfluences)(THIS_ DWORD* maxFaceInfluences) PURE;
|
||||
STDMETHOD(ConvertToBlendedMesh)(THIS_ DWORD options, CONST LPDWORD pAdjacencyIn, LPDWORD pAdjacencyOut,
|
||||
DWORD* pNumBoneCombinations, LPD3DXBUFFER* ppBoneCombinationTable, LPD3DXMESH* ppMesh) PURE;
|
||||
STDMETHOD(ConvertToIndexedBlendedMesh)(THIS_ DWORD options,
|
||||
CONST LPDWORD pAdjacencyIn,
|
||||
DWORD paletteSize,
|
||||
LPDWORD pAdjacencyOut,
|
||||
DWORD* pNumBoneCombinations,
|
||||
LPD3DXBUFFER* ppBoneCombinationTable,
|
||||
LPD3DXMESH* ppMesh) PURE;
|
||||
STDMETHOD(GenerateSkinnedMesh)(THIS_ DWORD options, FLOAT minWeight, CONST LPDWORD pAdjacencyIn, LPDWORD pAdjacencyOut, LPD3DXMESH* ppMesh) PURE;
|
||||
STDMETHOD(UpdateSkinnedMesh)(THIS_ CONST D3DXMATRIX* pBoneTransforms, LPD3DXMESH pMesh) PURE;
|
||||
};
|
||||
|
||||
#ifdef __cplusplus
|
||||
extern "C" {
|
||||
#endif //__cplusplus
|
||||
|
||||
HRESULT WINAPI
|
||||
D3DXCreateMesh(
|
||||
DWORD NumFaces,
|
||||
DWORD NumVertices,
|
||||
DWORD Options,
|
||||
CONST DWORD *pDeclaration,
|
||||
LPDIRECT3DDEVICE8 pD3D,
|
||||
LPD3DXMESH* ppMesh);
|
||||
|
||||
HRESULT WINAPI
|
||||
D3DXCreateMeshFVF(
|
||||
DWORD NumFaces,
|
||||
DWORD NumVertices,
|
||||
DWORD Options,
|
||||
DWORD FVF,
|
||||
LPDIRECT3DDEVICE8 pD3D,
|
||||
LPD3DXMESH* ppMesh);
|
||||
|
||||
HRESULT WINAPI
|
||||
D3DXCreateSPMesh(
|
||||
LPD3DXMESH pMesh,
|
||||
CONST DWORD* pAdjacency,
|
||||
CONST LPD3DXATTRIBUTEWEIGHTS pVertexAttributeWeights,
|
||||
CONST FLOAT *pVertexWeights,
|
||||
LPD3DXSPMESH* ppSMesh);
|
||||
|
||||
// clean a mesh up for simplification, try to make manifold
|
||||
HRESULT WINAPI
|
||||
D3DXCleanMesh(
|
||||
LPD3DXMESH pMeshIn,
|
||||
CONST DWORD* pAdjacency,
|
||||
LPD3DXMESH* ppMeshOut);
|
||||
|
||||
HRESULT WINAPI
|
||||
D3DXValidMesh(
|
||||
LPD3DXMESH pMeshIn,
|
||||
CONST DWORD* pAdjacency);
|
||||
|
||||
HRESULT WINAPI
|
||||
D3DXGeneratePMesh(
|
||||
LPD3DXMESH pMesh,
|
||||
CONST DWORD* pAdjacency,
|
||||
CONST LPD3DXATTRIBUTEWEIGHTS pVertexAttributeWeights,
|
||||
CONST FLOAT *pVertexWeights,
|
||||
DWORD MinValue,
|
||||
DWORD Options,
|
||||
LPD3DXPMESH* ppPMesh);
|
||||
|
||||
HRESULT WINAPI
|
||||
D3DXSimplifyMesh(
|
||||
LPD3DXMESH pMesh,
|
||||
CONST DWORD* pAdjacency,
|
||||
CONST LPD3DXATTRIBUTEWEIGHTS pVertexAttributeWeights,
|
||||
CONST FLOAT *pVertexWeights,
|
||||
DWORD MinValue,
|
||||
DWORD Options,
|
||||
LPD3DXMESH* ppMesh);
|
||||
|
||||
HRESULT WINAPI
|
||||
D3DXComputeBoundingSphere(
|
||||
PVOID pPointsFVF,
|
||||
DWORD NumVertices,
|
||||
DWORD FVF,
|
||||
D3DXVECTOR3 *pCenter,
|
||||
FLOAT *pRadius);
|
||||
|
||||
HRESULT WINAPI
|
||||
D3DXComputeBoundingBox(
|
||||
PVOID pPointsFVF,
|
||||
DWORD NumVertices,
|
||||
DWORD FVF,
|
||||
D3DXVECTOR3 *pMin,
|
||||
D3DXVECTOR3 *pMax);
|
||||
|
||||
HRESULT WINAPI
|
||||
D3DXComputeNormals(
|
||||
LPD3DXBASEMESH pMesh);
|
||||
|
||||
HRESULT WINAPI
|
||||
D3DXCreateBuffer(
|
||||
DWORD NumBytes,
|
||||
LPD3DXBUFFER *ppBuffer);
|
||||
|
||||
|
||||
HRESULT WINAPI
|
||||
D3DXLoadMeshFromX(
|
||||
LPSTR pFilename,
|
||||
DWORD Options,
|
||||
LPDIRECT3DDEVICE8 pD3D,
|
||||
LPD3DXBUFFER *ppAdjacency,
|
||||
LPD3DXBUFFER *ppMaterials,
|
||||
PDWORD pNumMaterials,
|
||||
LPD3DXMESH *ppMesh);
|
||||
|
||||
HRESULT WINAPI
|
||||
D3DXSaveMeshToX(
|
||||
LPSTR pFilename,
|
||||
LPD3DXMESH pMesh,
|
||||
CONST DWORD* pAdjacency,
|
||||
CONST LPD3DXMATERIAL pMaterials,
|
||||
DWORD NumMaterials,
|
||||
DWORD Format
|
||||
);
|
||||
|
||||
HRESULT WINAPI
|
||||
D3DXCreatePMeshFromStream(
|
||||
IStream *pStream,
|
||||
DWORD Options,
|
||||
LPDIRECT3DDEVICE8 pD3DDevice,
|
||||
LPD3DXBUFFER *ppMaterials,
|
||||
DWORD* pNumMaterials,
|
||||
LPD3DXPMESH *ppPMesh);
|
||||
|
||||
HRESULT WINAPI
|
||||
D3DXCreateSkinMesh(
|
||||
DWORD numFaces,
|
||||
DWORD numVertices,
|
||||
DWORD numBones,
|
||||
DWORD options,
|
||||
CONST DWORD *pDeclaration,
|
||||
LPDIRECT3DDEVICE8 pD3D,
|
||||
LPD3DXSKINMESH* ppSkinMesh);
|
||||
|
||||
HRESULT WINAPI
|
||||
D3DXCreateSkinMeshFVF(
|
||||
DWORD numFaces,
|
||||
DWORD numVertices,
|
||||
DWORD numBones,
|
||||
DWORD options,
|
||||
DWORD fvf,
|
||||
LPDIRECT3DDEVICE8 pD3D,
|
||||
LPD3DXSKINMESH* ppSkinMesh);
|
||||
|
||||
HRESULT WINAPI
|
||||
D3DXCreateSkinMeshFromMesh(
|
||||
LPD3DXMESH pMesh,
|
||||
DWORD numBones,
|
||||
LPD3DXSKINMESH* ppSkinMesh);
|
||||
|
||||
HRESULT WINAPI
|
||||
D3DXLoadMeshFromXof(
|
||||
LPDIRECTXFILEDATA pXofObjMesh,
|
||||
DWORD Options,
|
||||
LPDIRECT3DDEVICE8 pD3DDevice,
|
||||
LPD3DXBUFFER *ppAdjacency,
|
||||
LPD3DXBUFFER *ppMaterials,
|
||||
PDWORD pNumMaterials,
|
||||
LPD3DXMESH *ppMesh);
|
||||
|
||||
HRESULT WINAPI
|
||||
D3DXLoadSkinMeshFromXof(
|
||||
LPDIRECTXFILEDATA pxofobjMesh,
|
||||
DWORD options,
|
||||
LPDIRECT3DDEVICE8 pD3D,
|
||||
LPD3DXBUFFER* ppAdjacency,
|
||||
LPD3DXBUFFER* ppMaterials,
|
||||
PDWORD pMatOut,
|
||||
LPD3DXBUFFER* ppBoneNames,
|
||||
LPD3DXBUFFER* ppBoneTransforms,
|
||||
LPD3DXSKINMESH* ppMesh);
|
||||
|
||||
HRESULT WINAPI
|
||||
D3DXTesselateMesh(
|
||||
LPD3DXMESH pMeshIn,
|
||||
CONST DWORD* pAdjacency,
|
||||
FLOAT NumSegs,
|
||||
BOOL QuadraticInterpNormals, // if false use linear intrep for normals, if true use quadratic
|
||||
LPD3DXMESH *ppMeshOut);
|
||||
|
||||
HRESULT WINAPI
|
||||
D3DXDeclaratorFromFVF(
|
||||
DWORD FVF,
|
||||
DWORD Declaration[MAX_FVF_DECL_SIZE]);
|
||||
|
||||
HRESULT WINAPI
|
||||
D3DXFVFFromDeclarator(
|
||||
CONST DWORD *pDeclarator,
|
||||
DWORD *pFVF);
|
||||
|
||||
HRESULT WINAPI
|
||||
D3DXWeldVertices(
|
||||
CONST LPD3DXMESH pMesh,
|
||||
float fEpsilon,
|
||||
CONST DWORD *rgdwAdjacencyIn,
|
||||
DWORD *rgdwAdjacencyOut,
|
||||
DWORD* pFaceRemap,
|
||||
LPD3DXBUFFER *ppbufVertexRemap);
|
||||
|
||||
HRESULT WINAPI
|
||||
D3DXIntersect(
|
||||
LPD3DXBASEMESH pMesh,
|
||||
CONST D3DXVECTOR3 *pRayPos,
|
||||
CONST D3DXVECTOR3 *pRayDir,
|
||||
BOOL *pHit,
|
||||
DWORD *pFaceIndex,
|
||||
FLOAT *pU,
|
||||
FLOAT *pV,
|
||||
FLOAT *pDist);
|
||||
|
||||
BOOL WINAPI
|
||||
D3DXSphereBoundProbe(
|
||||
CONST D3DXVECTOR3 *pvCenter,
|
||||
FLOAT fRadius,
|
||||
D3DXVECTOR3 *pvRayPosition,
|
||||
D3DXVECTOR3 *pvRayDirection);
|
||||
|
||||
BOOL WINAPI
|
||||
D3DXBoxBoundProbe(
|
||||
CONST D3DXVECTOR3 *pvMin,
|
||||
CONST D3DXVECTOR3 *pvMax,
|
||||
D3DXVECTOR3 *pvRayPosition,
|
||||
D3DXVECTOR3 *pvRayDirection);
|
||||
|
||||
enum _D3DXERR {
|
||||
D3DXERR_CANNOTMODIFYINDEXBUFFER = MAKE_DDHRESULT(2900),
|
||||
D3DXERR_INVALIDMESH = MAKE_DDHRESULT(2901),
|
||||
D3DXERR_CANNOTATTRSORT = MAKE_DDHRESULT(2902),
|
||||
D3DXERR_SKINNINGNOTSUPPORTED = MAKE_DDHRESULT(2903),
|
||||
D3DXERR_TOOMANYINFLUENCES = MAKE_DDHRESULT(2904),
|
||||
D3DXERR_INVALIDDATA = MAKE_DDHRESULT(2905),
|
||||
};
|
||||
|
||||
#ifdef __cplusplus
|
||||
}
|
||||
#endif //__cplusplus
|
||||
|
||||
#endif //__D3DX8MESH_H__
|
||||
|
||||
|
|
@ -0,0 +1,218 @@
|
|||
///////////////////////////////////////////////////////////////////////////
|
||||
//
|
||||
// Copyright (C) 1999 Microsoft Corporation. All Rights Reserved.
|
||||
//
|
||||
// File: d3dx8shapes.h
|
||||
// Content: D3DX simple shapes
|
||||
//
|
||||
///////////////////////////////////////////////////////////////////////////
|
||||
|
||||
#include "d3dx8.h"
|
||||
|
||||
#ifndef __D3DX8SHAPES_H__
|
||||
#define __D3DX8SHAPES_H__
|
||||
|
||||
///////////////////////////////////////////////////////////////////////////
|
||||
// Functions:
|
||||
///////////////////////////////////////////////////////////////////////////
|
||||
|
||||
#ifdef __cplusplus
|
||||
extern "C" {
|
||||
#endif //__cplusplus
|
||||
|
||||
|
||||
//-------------------------------------------------------------------------
|
||||
// D3DXCreatePolygon:
|
||||
// ------------------
|
||||
// Creates a mesh containing an n-sided polygon. The polygon is centered
|
||||
// at the origin.
|
||||
//
|
||||
// Parameters:
|
||||
//
|
||||
// pDevice The D3D device with which the mesh is going to be used.
|
||||
// Length Length of each side.
|
||||
// Sides Number of sides the polygon has. (Must be >= 3)
|
||||
// ppMesh The mesh object which will be created
|
||||
// ppAdjacency Returns a buffer containing adjacency info. Can be NULL.
|
||||
//-------------------------------------------------------------------------
|
||||
HRESULT WINAPI
|
||||
D3DXCreatePolygon(
|
||||
LPDIRECT3DDEVICE8 pDevice,
|
||||
FLOAT Length,
|
||||
UINT Sides,
|
||||
LPD3DXMESH* ppMesh,
|
||||
LPD3DXBUFFER* ppAdjacency);
|
||||
|
||||
|
||||
//-------------------------------------------------------------------------
|
||||
// D3DXCreateBox:
|
||||
// --------------
|
||||
// Creates a mesh containing an axis-aligned box. The box is centered at
|
||||
// the origin.
|
||||
//
|
||||
// Parameters:
|
||||
//
|
||||
// pDevice The D3D device with which the mesh is going to be used.
|
||||
// Width Width of box (along X-axis)
|
||||
// Height Height of box (along Y-axis)
|
||||
// Depth Depth of box (along Z-axis)
|
||||
// ppMesh The mesh object which will be created
|
||||
// ppAdjacency Returns a buffer containing adjacency info. Can be NULL.
|
||||
//-------------------------------------------------------------------------
|
||||
HRESULT WINAPI
|
||||
D3DXCreateBox(
|
||||
LPDIRECT3DDEVICE8 pDevice,
|
||||
FLOAT Width,
|
||||
FLOAT Height,
|
||||
FLOAT Depth,
|
||||
LPD3DXMESH* ppMesh,
|
||||
LPD3DXBUFFER* ppAdjacency);
|
||||
|
||||
|
||||
//-------------------------------------------------------------------------
|
||||
// D3DXCreateCylinder:
|
||||
// -------------------
|
||||
// Creates a mesh containing a cylinder. The generated cylinder is
|
||||
// centered at the origin, and its axis is aligned with the Z-axis.
|
||||
//
|
||||
// Parameters:
|
||||
//
|
||||
// pDevice The D3D device with which the mesh is going to be used.
|
||||
// Radius1 Radius at -Z end (should be >= 0.0f)
|
||||
// Radius2 Radius at +Z end (should be >= 0.0f)
|
||||
// Length Length of cylinder (along Z-axis)
|
||||
// Slices Number of slices about the main axis
|
||||
// Stacks Number of stacks along the main axis
|
||||
// ppMesh The mesh object which will be created
|
||||
// ppAdjacency Returns a buffer containing adjacency info. Can be NULL.
|
||||
//-------------------------------------------------------------------------
|
||||
HRESULT WINAPI
|
||||
D3DXCreateCylinder(
|
||||
LPDIRECT3DDEVICE8 pDevice,
|
||||
FLOAT Radius1,
|
||||
FLOAT Radius2,
|
||||
FLOAT Length,
|
||||
UINT Slices,
|
||||
UINT Stacks,
|
||||
LPD3DXMESH* ppMesh,
|
||||
LPD3DXBUFFER* ppAdjacency);
|
||||
|
||||
|
||||
//-------------------------------------------------------------------------
|
||||
// D3DXCreateSphere:
|
||||
// -----------------
|
||||
// Creates a mesh containing a sphere. The sphere is centered at the
|
||||
// origin.
|
||||
//
|
||||
// Parameters:
|
||||
//
|
||||
// pDevice The D3D device with which the mesh is going to be used.
|
||||
// Radius Radius of the sphere (should be >= 0.0f)
|
||||
// Slices Number of slices about the main axis
|
||||
// Stacks Number of stacks along the main axis
|
||||
// ppMesh The mesh object which will be created
|
||||
// ppAdjacency Returns a buffer containing adjacency info. Can be NULL.
|
||||
//-------------------------------------------------------------------------
|
||||
HRESULT WINAPI
|
||||
D3DXCreateSphere(
|
||||
LPDIRECT3DDEVICE8 pDevice,
|
||||
FLOAT Radius,
|
||||
UINT Slices,
|
||||
UINT Stacks,
|
||||
LPD3DXMESH* ppMesh,
|
||||
LPD3DXBUFFER* ppAdjacency);
|
||||
|
||||
|
||||
//-------------------------------------------------------------------------
|
||||
// D3DXCreateTorus:
|
||||
// ----------------
|
||||
// Creates a mesh containing a torus. The generated torus is centered at
|
||||
// the origin, and its axis is aligned with the Z-axis.
|
||||
//
|
||||
// Parameters:
|
||||
//
|
||||
// pDevice The D3D device with which the mesh is going to be used.
|
||||
// InnerRadius Inner radius of the torus (should be >= 0.0f)
|
||||
// OuterRadius Outer radius of the torue (should be >= 0.0f)
|
||||
// Sides Number of sides in a cross-section (must be >= 3)
|
||||
// Rings Number of rings making up the torus (must be >= 3)
|
||||
// ppMesh The mesh object which will be created
|
||||
// ppAdjacency Returns a buffer containing adjacency info. Can be NULL.
|
||||
//-------------------------------------------------------------------------
|
||||
HRESULT WINAPI
|
||||
D3DXCreateTorus(
|
||||
LPDIRECT3DDEVICE8 pDevice,
|
||||
FLOAT InnerRadius,
|
||||
FLOAT OuterRadius,
|
||||
UINT Sides,
|
||||
UINT Rings,
|
||||
LPD3DXMESH* ppMesh,
|
||||
LPD3DXBUFFER* ppAdjacency);
|
||||
|
||||
|
||||
//-------------------------------------------------------------------------
|
||||
// D3DXCreateTeapot:
|
||||
// -----------------
|
||||
// Creates a mesh containing a teapot.
|
||||
//
|
||||
// Parameters:
|
||||
//
|
||||
// pDevice The D3D device with which the mesh is going to be used.
|
||||
// ppMesh The mesh object which will be created
|
||||
// ppAdjacency Returns a buffer containing adjacency info. Can be NULL.
|
||||
//-------------------------------------------------------------------------
|
||||
HRESULT WINAPI
|
||||
D3DXCreateTeapot(
|
||||
LPDIRECT3DDEVICE8 pDevice,
|
||||
LPD3DXMESH* ppMesh,
|
||||
LPD3DXBUFFER* ppAdjacency);
|
||||
|
||||
|
||||
//-------------------------------------------------------------------------
|
||||
// D3DXCreateText:
|
||||
// ---------------
|
||||
// Creates a mesh containing the specified text using the font associated
|
||||
// with the device context.
|
||||
//
|
||||
// Parameters:
|
||||
//
|
||||
// pDevice The D3D device with which the mesh is going to be used.
|
||||
// hDC Device context, with desired font selected
|
||||
// pText Text to generate
|
||||
// Deviation Maximum chordal deviation from true font outlines
|
||||
// Extrusion Amount to extrude text in -Z direction
|
||||
// ppMesh The mesh object which will be created
|
||||
// pGlyphMetrics Address of buffer to receive glyph metric data (or NULL)
|
||||
//-------------------------------------------------------------------------
|
||||
HRESULT WINAPI
|
||||
D3DXCreateTextA(
|
||||
LPDIRECT3DDEVICE8 pDevice,
|
||||
HDC hDC,
|
||||
LPCSTR pText,
|
||||
FLOAT Deviation,
|
||||
FLOAT Extrusion,
|
||||
LPD3DXMESH* ppMesh,
|
||||
LPGLYPHMETRICSFLOAT pGlyphMetrics);
|
||||
|
||||
HRESULT WINAPI
|
||||
D3DXCreateTextW(
|
||||
LPDIRECT3DDEVICE8 pDevice,
|
||||
HDC hDC,
|
||||
LPCWSTR pText,
|
||||
FLOAT Deviation,
|
||||
FLOAT Extrusion,
|
||||
LPD3DXMESH* ppMesh,
|
||||
LPGLYPHMETRICSFLOAT pGlyphMetrics);
|
||||
|
||||
#ifdef UNICODE
|
||||
#define D3DXCreateText D3DXCreateTextW
|
||||
#else
|
||||
#define D3DXCreateText D3DXCreateTextA
|
||||
#endif
|
||||
|
||||
|
||||
#ifdef __cplusplus
|
||||
}
|
||||
#endif //__cplusplus
|
||||
|
||||
#endif //__D3DX8SHAPES_H__
|
File diff suppressed because it is too large
Load Diff
File diff suppressed because it is too large
Load Diff
|
@ -0,0 +1,407 @@
|
|||
//----------------------------------------------------------------------
|
||||
//
|
||||
// d3dxerr.h -- 0xC code definitions for the D3DX API
|
||||
//
|
||||
// Copyright (c) 1991-1999, Microsoft Corp. All rights reserved.
|
||||
//
|
||||
//----------------------------------------------------------------------
|
||||
#ifndef __D3DXERR_H__
|
||||
#define __D3DXERR_H__
|
||||
|
||||
//
|
||||
//
|
||||
// Values are 32 bit values layed out as follows:
|
||||
//
|
||||
// 3 3 2 2 2 2 2 2 2 2 2 2 1 1 1 1 1 1 1 1 1 1
|
||||
// 1 0 9 8 7 6 5 4 3 2 1 0 9 8 7 6 5 4 3 2 1 0 9 8 7 6 5 4 3 2 1 0
|
||||
// +---+-+-+-----------------------+-------------------------------+
|
||||
// |Sev|C|R| Facility | Code |
|
||||
// +---+-+-+-----------------------+-------------------------------+
|
||||
//
|
||||
// where
|
||||
//
|
||||
// Sev - is the severity code
|
||||
//
|
||||
// 00 - Success
|
||||
// 01 - Informational
|
||||
// 10 - Warning
|
||||
// 11 - Error
|
||||
//
|
||||
// C - is the Customer code flag
|
||||
//
|
||||
// R - is a reserved bit
|
||||
//
|
||||
// Facility - is the facility code
|
||||
//
|
||||
// Code - is the facility's status code
|
||||
//
|
||||
//
|
||||
// Define the facility codes
|
||||
//
|
||||
#define FACILITY_D3DX 0x877
|
||||
|
||||
|
||||
|
||||
//
|
||||
// MessageId: D3DXERR_NOMEMORY
|
||||
//
|
||||
// MessageText:
|
||||
//
|
||||
// Out of memory.
|
||||
//
|
||||
#define D3DXERR_NOMEMORY ((HRESULT)0xC8770BB8L)
|
||||
|
||||
|
||||
//
|
||||
// MessageId: D3DXERR_NULLPOINTER
|
||||
//
|
||||
// MessageText:
|
||||
//
|
||||
// A NULL pointer was passed as a parameter.
|
||||
//
|
||||
#define D3DXERR_NULLPOINTER ((HRESULT)0xC8770BB9L)
|
||||
|
||||
|
||||
//
|
||||
// MessageId: D3DXERR_INVALIDD3DXDEVICEINDEX
|
||||
//
|
||||
// MessageText:
|
||||
//
|
||||
// The Device Index passed in is invalid.
|
||||
//
|
||||
#define D3DXERR_INVALIDD3DXDEVICEINDEX ((HRESULT)0xC8770BBAL)
|
||||
|
||||
|
||||
//
|
||||
// MessageId: D3DXERR_NODIRECTDRAWAVAILABLE
|
||||
//
|
||||
// MessageText:
|
||||
//
|
||||
// DirectDraw has not been created.
|
||||
//
|
||||
#define D3DXERR_NODIRECTDRAWAVAILABLE ((HRESULT)0xC8770BBBL)
|
||||
|
||||
|
||||
//
|
||||
// MessageId: D3DXERR_NODIRECT3DAVAILABLE
|
||||
//
|
||||
// MessageText:
|
||||
//
|
||||
// Direct3D has not been created.
|
||||
//
|
||||
#define D3DXERR_NODIRECT3DAVAILABLE ((HRESULT)0xC8770BBCL)
|
||||
|
||||
|
||||
//
|
||||
// MessageId: D3DXERR_NODIRECT3DDEVICEAVAILABLE
|
||||
//
|
||||
// MessageText:
|
||||
//
|
||||
// Direct3D device has not been created.
|
||||
//
|
||||
#define D3DXERR_NODIRECT3DDEVICEAVAILABLE ((HRESULT)0xC8770BBDL)
|
||||
|
||||
|
||||
//
|
||||
// MessageId: D3DXERR_NOPRIMARYAVAILABLE
|
||||
//
|
||||
// MessageText:
|
||||
//
|
||||
// Primary surface has not been created.
|
||||
//
|
||||
#define D3DXERR_NOPRIMARYAVAILABLE ((HRESULT)0xC8770BBEL)
|
||||
|
||||
|
||||
//
|
||||
// MessageId: D3DXERR_NOZBUFFERAVAILABLE
|
||||
//
|
||||
// MessageText:
|
||||
//
|
||||
// Z buffer has not been created.
|
||||
//
|
||||
#define D3DXERR_NOZBUFFERAVAILABLE ((HRESULT)0xC8770BBFL)
|
||||
|
||||
|
||||
//
|
||||
// MessageId: D3DXERR_NOBACKBUFFERAVAILABLE
|
||||
//
|
||||
// MessageText:
|
||||
//
|
||||
// Backbuffer has not been created.
|
||||
//
|
||||
#define D3DXERR_NOBACKBUFFERAVAILABLE ((HRESULT)0xC8770BC0L)
|
||||
|
||||
|
||||
//
|
||||
// MessageId: D3DXERR_COULDNTUPDATECAPS
|
||||
//
|
||||
// MessageText:
|
||||
//
|
||||
// Failed to update caps database after changing display mode.
|
||||
//
|
||||
#define D3DXERR_COULDNTUPDATECAPS ((HRESULT)0xC8770BC1L)
|
||||
|
||||
|
||||
//
|
||||
// MessageId: D3DXERR_NOZBUFFER
|
||||
//
|
||||
// MessageText:
|
||||
//
|
||||
// Could not create Z buffer.
|
||||
//
|
||||
#define D3DXERR_NOZBUFFER ((HRESULT)0xC8770BC2L)
|
||||
|
||||
|
||||
//
|
||||
// MessageId: D3DXERR_INVALIDMODE
|
||||
//
|
||||
// MessageText:
|
||||
//
|
||||
// Display mode is not valid.
|
||||
//
|
||||
#define D3DXERR_INVALIDMODE ((HRESULT)0xC8770BC3L)
|
||||
|
||||
|
||||
//
|
||||
// MessageId: D3DXERR_INVALIDPARAMETER
|
||||
//
|
||||
// MessageText:
|
||||
//
|
||||
// One or more of the parameters passed is invalid.
|
||||
//
|
||||
#define D3DXERR_INVALIDPARAMETER ((HRESULT)0xC8770BC4L)
|
||||
|
||||
|
||||
//
|
||||
// MessageId: D3DXERR_INITFAILED
|
||||
//
|
||||
// MessageText:
|
||||
//
|
||||
// D3DX failed to initialize itself.
|
||||
//
|
||||
#define D3DXERR_INITFAILED ((HRESULT)0xC8770BC5L)
|
||||
|
||||
|
||||
//
|
||||
// MessageId: D3DXERR_STARTUPFAILED
|
||||
//
|
||||
// MessageText:
|
||||
//
|
||||
// D3DX failed to start up.
|
||||
//
|
||||
#define D3DXERR_STARTUPFAILED ((HRESULT)0xC8770BC6L)
|
||||
|
||||
|
||||
//
|
||||
// MessageId: D3DXERR_D3DXNOTSTARTEDYET
|
||||
//
|
||||
// MessageText:
|
||||
//
|
||||
// D3DXInitialize() must be called first.
|
||||
//
|
||||
#define D3DXERR_D3DXNOTSTARTEDYET ((HRESULT)0xC8770BC7L)
|
||||
|
||||
|
||||
//
|
||||
// MessageId: D3DXERR_NOTINITIALIZED
|
||||
//
|
||||
// MessageText:
|
||||
//
|
||||
// D3DX is not initialized yet.
|
||||
//
|
||||
#define D3DXERR_NOTINITIALIZED ((HRESULT)0xC8770BC8L)
|
||||
|
||||
|
||||
//
|
||||
// MessageId: D3DXERR_FAILEDDRAWTEXT
|
||||
//
|
||||
// MessageText:
|
||||
//
|
||||
// Failed to render text to the surface.
|
||||
//
|
||||
#define D3DXERR_FAILEDDRAWTEXT ((HRESULT)0xC8770BC9L)
|
||||
|
||||
|
||||
//
|
||||
// MessageId: D3DXERR_BADD3DXCONTEXT
|
||||
//
|
||||
// MessageText:
|
||||
//
|
||||
// Bad D3DX context.
|
||||
//
|
||||
#define D3DXERR_BADD3DXCONTEXT ((HRESULT)0xC8770BCAL)
|
||||
|
||||
|
||||
//
|
||||
// MessageId: D3DXERR_CAPSNOTSUPPORTED
|
||||
//
|
||||
// MessageText:
|
||||
//
|
||||
// The requested device capabilities are not supported.
|
||||
//
|
||||
#define D3DXERR_CAPSNOTSUPPORTED ((HRESULT)0xC8770BCBL)
|
||||
|
||||
|
||||
//
|
||||
// MessageId: D3DXERR_UNSUPPORTEDFILEFORMAT
|
||||
//
|
||||
// MessageText:
|
||||
//
|
||||
// The image file format is unrecognized.
|
||||
//
|
||||
#define D3DXERR_UNSUPPORTEDFILEFORMAT ((HRESULT)0xC8770BCCL)
|
||||
|
||||
|
||||
//
|
||||
// MessageId: D3DXERR_IFLERROR
|
||||
//
|
||||
// MessageText:
|
||||
//
|
||||
// The image file loading library error.
|
||||
//
|
||||
#define D3DXERR_IFLERROR ((HRESULT)0xC8770BCDL)
|
||||
|
||||
|
||||
//
|
||||
// MessageId: D3DXERR_FAILEDGETCAPS
|
||||
//
|
||||
// MessageText:
|
||||
//
|
||||
// Could not obtain device caps.
|
||||
//
|
||||
#define D3DXERR_FAILEDGETCAPS ((HRESULT)0xC8770BCEL)
|
||||
|
||||
|
||||
//
|
||||
// MessageId: D3DXERR_CANNOTRESIZEFULLSCREEN
|
||||
//
|
||||
// MessageText:
|
||||
//
|
||||
// Resize does not work for full-screen.
|
||||
//
|
||||
#define D3DXERR_CANNOTRESIZEFULLSCREEN ((HRESULT)0xC8770BCFL)
|
||||
|
||||
|
||||
//
|
||||
// MessageId: D3DXERR_CANNOTRESIZENONWINDOWED
|
||||
//
|
||||
// MessageText:
|
||||
//
|
||||
// Resize does not work for non-windowed contexts.
|
||||
//
|
||||
#define D3DXERR_CANNOTRESIZENONWINDOWED ((HRESULT)0xC8770BD0L)
|
||||
|
||||
|
||||
//
|
||||
// MessageId: D3DXERR_FRONTBUFFERALREADYEXISTS
|
||||
//
|
||||
// MessageText:
|
||||
//
|
||||
// Front buffer already exists.
|
||||
//
|
||||
#define D3DXERR_FRONTBUFFERALREADYEXISTS ((HRESULT)0xC8770BD1L)
|
||||
|
||||
|
||||
//
|
||||
// MessageId: D3DXERR_FULLSCREENPRIMARYEXISTS
|
||||
//
|
||||
// MessageText:
|
||||
//
|
||||
// The app is using the primary in full-screen mode.
|
||||
//
|
||||
#define D3DXERR_FULLSCREENPRIMARYEXISTS ((HRESULT)0xC8770BD2L)
|
||||
|
||||
|
||||
//
|
||||
// MessageId: D3DXERR_GETDCFAILED
|
||||
//
|
||||
// MessageText:
|
||||
//
|
||||
// Could not get device context.
|
||||
//
|
||||
#define D3DXERR_GETDCFAILED ((HRESULT)0xC8770BD3L)
|
||||
|
||||
|
||||
//
|
||||
// MessageId: D3DXERR_BITBLTFAILED
|
||||
//
|
||||
// MessageText:
|
||||
//
|
||||
// Could not bitBlt.
|
||||
//
|
||||
#define D3DXERR_BITBLTFAILED ((HRESULT)0xC8770BD4L)
|
||||
|
||||
|
||||
//
|
||||
// MessageId: D3DXERR_NOTEXTURE
|
||||
//
|
||||
// MessageText:
|
||||
//
|
||||
// There is no surface backing up this texture.
|
||||
//
|
||||
#define D3DXERR_NOTEXTURE ((HRESULT)0xC8770BD5L)
|
||||
|
||||
|
||||
//
|
||||
// MessageId: D3DXERR_MIPLEVELABSENT
|
||||
//
|
||||
// MessageText:
|
||||
//
|
||||
// There is no such miplevel for this surface.
|
||||
//
|
||||
#define D3DXERR_MIPLEVELABSENT ((HRESULT)0xC8770BD6L)
|
||||
|
||||
|
||||
//
|
||||
// MessageId: D3DXERR_SURFACENOTPALETTED
|
||||
//
|
||||
// MessageText:
|
||||
//
|
||||
// The surface is not paletted.
|
||||
//
|
||||
#define D3DXERR_SURFACENOTPALETTED ((HRESULT)0xC8770BD7L)
|
||||
|
||||
|
||||
//
|
||||
// MessageId: D3DXERR_ENUMFORMATSFAILED
|
||||
//
|
||||
// MessageText:
|
||||
//
|
||||
// An error occured while enumerating surface formats.
|
||||
//
|
||||
#define D3DXERR_ENUMFORMATSFAILED ((HRESULT)0xC8770BD8L)
|
||||
|
||||
|
||||
//
|
||||
// MessageId: D3DXERR_COLORDEPTHTOOLOW
|
||||
//
|
||||
// MessageText:
|
||||
//
|
||||
// D3DX only supports color depths of 16 bit or greater.
|
||||
//
|
||||
#define D3DXERR_COLORDEPTHTOOLOW ((HRESULT)0xC8770BD9L)
|
||||
|
||||
|
||||
//
|
||||
// MessageId: D3DXERR_INVALIDFILEFORMAT
|
||||
//
|
||||
// MessageText:
|
||||
//
|
||||
// The file format is invalid.
|
||||
//
|
||||
#define D3DXERR_INVALIDFILEFORMAT ((HRESULT)0xC8770BDAL)
|
||||
|
||||
|
||||
//
|
||||
// MessageId: D3DXERR_NOMATCHFOUND
|
||||
//
|
||||
// MessageText:
|
||||
//
|
||||
// No suitable match found.
|
||||
//
|
||||
#define D3DXERR_NOMATCHFOUND ((HRESULT)0xC8770BDBL)
|
||||
|
||||
|
||||
|
||||
#endif //__D3DXERR_H__
|
||||
|
File diff suppressed because it is too large
Load Diff
File diff suppressed because it is too large
Load Diff
|
@ -0,0 +1,209 @@
|
|||
///////////////////////////////////////////////////////////////////////////
|
||||
//
|
||||
// Copyright (C) 1999 Microsoft Corporation. All Rights Reserved.
|
||||
//
|
||||
// File: d3dxshapes.h
|
||||
// Content: D3DX simple shapes
|
||||
//
|
||||
///////////////////////////////////////////////////////////////////////////
|
||||
|
||||
#ifndef __D3DXSHAPES_H__
|
||||
#define __D3DXSHAPES_H__
|
||||
|
||||
#include <d3d.h>
|
||||
#include <limits.h>
|
||||
#include "d3dxerr.h"
|
||||
|
||||
|
||||
typedef struct ID3DXSimpleShape *LPD3DXSIMPLESHAPE;
|
||||
|
||||
// {CFCD4602-EB7B-11d2-A440-00A0C90629A8}
|
||||
DEFINE_GUID( IID_ID3DXSimpleShape,
|
||||
0xcfcd4602, 0xeb7b, 0x11d2, 0xa4, 0x40, 0x0, 0xa0, 0xc9, 0x6, 0x29, 0xa8 );
|
||||
|
||||
|
||||
///////////////////////////////////////////////////////////////////////////
|
||||
// Interfaces:
|
||||
///////////////////////////////////////////////////////////////////////////
|
||||
|
||||
//-------------------------------------------------------------------------
|
||||
// ID3DXSimpleShape interface:
|
||||
//-------------------------------------------------------------------------
|
||||
|
||||
DECLARE_INTERFACE_(ID3DXSimpleShape, IUnknown)
|
||||
{
|
||||
// IUnknown methods
|
||||
STDMETHOD(QueryInterface)(THIS_ REFIID riid, LPVOID* ppvObj) PURE;
|
||||
STDMETHOD_(ULONG,AddRef)(THIS) PURE;
|
||||
STDMETHOD_(ULONG,Release)(THIS) PURE;
|
||||
|
||||
// ID3DXSimpleShape methods
|
||||
STDMETHOD_(LPDIRECT3DVERTEXBUFFER7, GetVB)(THIS) PURE;
|
||||
STDMETHOD_(DWORD, GetIndices)(THIS_ LPWORD *ppIndices) PURE;
|
||||
STDMETHOD(Draw)(THIS) PURE;
|
||||
};
|
||||
|
||||
|
||||
|
||||
///////////////////////////////////////////////////////////////////////////
|
||||
// Functions:
|
||||
///////////////////////////////////////////////////////////////////////////
|
||||
|
||||
#ifdef __cplusplus
|
||||
extern "C" {
|
||||
#endif //__cplusplus
|
||||
|
||||
|
||||
//-------------------------------------------------------------------------
|
||||
// D3DXCreatePolygon: Creates an 'n' sided polygon using the device
|
||||
// ---------------- specified. It returns a vertex buffer that can be used
|
||||
// for drawing or manipulation by the program later on.
|
||||
//
|
||||
// Params:
|
||||
// [in] LPDIRECT3DDEVICE7 pDevice: The device to create off.
|
||||
// [in] float sideSize: Length of a side.
|
||||
// [in] DWORD numTexCoords: The number of texture coordinates desired
|
||||
// in the vertex-buffer. (Default is 1)
|
||||
// D3DX_DEFAULT is a valid input.
|
||||
// [out] IDirect3DVertexBuffer7** ppVB: The output shape interface.
|
||||
//-------------------------------------------------------------------------
|
||||
HRESULT WINAPI
|
||||
D3DXCreatePolygon(LPDIRECT3DDEVICE7 pDevice,
|
||||
float sideSize,
|
||||
DWORD numSides,
|
||||
DWORD numTexCoords,
|
||||
LPD3DXSIMPLESHAPE* ppShape );
|
||||
|
||||
//-------------------------------------------------------------------------
|
||||
// D3DXCreateBox: Creates a box (cuboid) of given dimensions using the
|
||||
// ------------ device. It returns a vertex buffer that can
|
||||
// be used for drawing or manipulation by the program later on.
|
||||
//
|
||||
// Params:
|
||||
// [in] LPDIRECT3DDEVICE7 pDevice: The device to create off.
|
||||
// [in] float width: Width of the box (along x-axis)
|
||||
// [in] float height: Height of the box (along y-axis)
|
||||
// [in] float depth: Depth of the box (along z-axis)
|
||||
// [in] DWORD numTexCoords: The number of texture coordinates desired
|
||||
// in the vertex-buffer. Default is 1.
|
||||
// D3DX_DEFAULT is a valid input here.
|
||||
// [out] LPD3DXSIMPLESHAPE* ppShape: The output vertex-buffer.
|
||||
//-------------------------------------------------------------------------
|
||||
HRESULT WINAPI
|
||||
D3DXCreateBox(LPDIRECT3DDEVICE7 pDevice,
|
||||
float width,
|
||||
float height,
|
||||
float depth,
|
||||
DWORD numTexCoords,
|
||||
LPD3DXSIMPLESHAPE* ppShape );
|
||||
|
||||
//-------------------------------------------------------------------------
|
||||
// D3DXCreateCylinder: Creates a cylinder of given dimensions using the
|
||||
// ----------------- device. It returns a vertex buffer that
|
||||
// can be used for drawing or manipulation by the program
|
||||
// later on.
|
||||
//
|
||||
// Params:
|
||||
// [in] LPDIRECT3DDEVICE7 pDevice: The device to create off.
|
||||
// [in] float baseRadius: Base-radius (default is 1.0f, shd be >= 0.0f)
|
||||
// [in] float topRadius: Top-radius (default is 1.0f, shd be >= 0.0f)
|
||||
// [in] float height: Height (default is 1.0f, shd be >= 0.0f)
|
||||
// [in] DWORD numSlices: Number of slices about the main axis.
|
||||
// (default is 8) D3DX_DEFAULT is a valid input.
|
||||
// [in] DWORD numStacks: Number of stacks along the main axis.
|
||||
// (default is 8) D3DX_DEFAULT is a valid input.
|
||||
// [in] DWORD numTexCoords: The number of texture coordinates desired
|
||||
// in the vertex-buffer. Default is 1.
|
||||
// D3DX_DEFAULT is a valid input here.
|
||||
// [out] LPD3DXSIMPLESHAPE* ppShape: The output shape interface.
|
||||
//-------------------------------------------------------------------------
|
||||
HRESULT WINAPI
|
||||
D3DXCreateCylinder(LPDIRECT3DDEVICE7 pDevice,
|
||||
float baseRadius,
|
||||
float topRadius,
|
||||
float height,
|
||||
DWORD numSlices,
|
||||
DWORD numStacks,
|
||||
DWORD numTexCoords,
|
||||
LPD3DXSIMPLESHAPE* ppShape );
|
||||
|
||||
|
||||
//-------------------------------------------------------------------------
|
||||
// D3DXCreateTorus: Creates a torus of given dimensions using the
|
||||
// -------------- device specified. It returns a vertex buffer that can
|
||||
// be used for drawing or manipulation by the program later
|
||||
// on. It draws a doughnut, centered at (0, 0, 0) whose axis
|
||||
// is aligned with the z-axis. With the innerRadius used
|
||||
// as the radius of the cross-section (minor-Radius) and
|
||||
// the outerRadius used as the radius of the central 'hole'.
|
||||
//
|
||||
// Params:
|
||||
// [in] LPDIRECT3DDEVICE7 pDevice: The device to create off.
|
||||
// [in] float innerRadius: inner radius (default is 1.0f, shd be >= 0.0f)
|
||||
// [in] float outerRadius: outer radius (default is 2.0f, shd be >= 0.0f)
|
||||
// [in] DWORD numSides: Number of sides in the cross-section
|
||||
// (default is 8). D3DX_DEFAULT is a valid input.
|
||||
// [in] DWORD numRings: Number of rings making up the torus
|
||||
// (default is 8) D3DX_DEFAULT is a valid input.
|
||||
// [in] DWORD numTexCoords: The number of texture coordinates desired
|
||||
// in the vertex-buffer. Default is 1.
|
||||
// D3DX_DEFAULT is a valid input here.
|
||||
// [out] LPD3DXSIMPLESHAPE* ppShape: The output shape interface.
|
||||
//-------------------------------------------------------------------------
|
||||
HRESULT WINAPI
|
||||
D3DXCreateTorus(LPDIRECT3DDEVICE7 pDevice,
|
||||
float innerRadius,
|
||||
float outerRadius,
|
||||
DWORD numSides,
|
||||
DWORD numRings,
|
||||
DWORD numTexCoords,
|
||||
LPD3DXSIMPLESHAPE* ppShape );
|
||||
|
||||
//-------------------------------------------------------------------------
|
||||
// D3DXCreateTeapot: Creates a teapot using the device specified.
|
||||
// ---------------- It returns a vertex buffer that can be used for
|
||||
// drawing or manipulation by the program later on.
|
||||
//
|
||||
// Params:
|
||||
// [in] LPDIRECT3DDEVICE7 pDevice: The device to create off.
|
||||
// [in] DWORD numTexCoords: The number of texture coordinates desired
|
||||
// in the vertex-buffer. Default is 1.
|
||||
// D3DX_DEFAULT is a valid input here.
|
||||
// [out] LPD3DXSIMPLESHAPE* ppShape: The output shape interface.
|
||||
//-------------------------------------------------------------------------
|
||||
HRESULT WINAPI
|
||||
D3DXCreateTeapot(LPDIRECT3DDEVICE7 pDevice,
|
||||
DWORD numTexCoords,
|
||||
LPD3DXSIMPLESHAPE* ppShape);
|
||||
|
||||
//-------------------------------------------------------------------------
|
||||
// D3DXCreateSphere: Creates a cylinder of given dimensions using the
|
||||
// ---------------- device specified.
|
||||
// It returns a vertex buffer that can be used for
|
||||
// drawing or manipulation by the program later on.
|
||||
//
|
||||
// Params:
|
||||
// [in] LPDIRECT3DDEVICE7 pDevice: The device to create off.
|
||||
// [in] float radius: radius (default is 1.0f, shd be >= 0.0f)
|
||||
// [in] float height: Height (default is 1.0f, shd be >= 0.0f)
|
||||
// [in] DWORD numSlices: Number of slices about the main axis
|
||||
// (default is 8) D3DX_DEFAULT is a valid input.
|
||||
// [in] DWORD numStacks: Number of stacks along the main axis
|
||||
// (default is 8) D3DX_DEFAULT is a valid input.
|
||||
// [in] DWORD numTexCoords: The number of texture coordinates desired
|
||||
// in the vertex-buffer. Default is 1.
|
||||
// D3DX_DEFAULT is a valid input here.
|
||||
// [out] LPD3DXSIMPLESHAPE* ppShape: The output shape interface.
|
||||
//-------------------------------------------------------------------------
|
||||
HRESULT WINAPI
|
||||
D3DXCreateSphere(LPDIRECT3DDEVICE7 pDevice,
|
||||
float radius,
|
||||
DWORD numSlices,
|
||||
DWORD numStacks,
|
||||
DWORD numTexCoords,
|
||||
LPD3DXSIMPLESHAPE* ppShape);
|
||||
|
||||
#ifdef __cplusplus
|
||||
}
|
||||
#endif //__cplusplus
|
||||
#endif //__D3DXSHAPES_H__
|
|
@ -0,0 +1,321 @@
|
|||
///////////////////////////////////////////////////////////////////////////
|
||||
//
|
||||
// Copyright (C) 1999 Microsoft Corporation. All Rights Reserved.
|
||||
//
|
||||
// File: d3dxsprite.h
|
||||
// Content: D3DX sprite helper functions
|
||||
//
|
||||
// These functions allow you to use sprites with D3DX. A "sprite" is
|
||||
// loosely defined as a 2D image that you want to transfer to the
|
||||
// rendering target. The source image can be a texture created
|
||||
// with the help of the D3DX texture loader; though advanced users may
|
||||
// want to create their own. A helper function (PrepareDeviceForSprite)
|
||||
// is provided to make it easy to set up render states on a device.
|
||||
// (Again, advanced users can use their own created devices.)
|
||||
//
|
||||
// There are two general techniques for sprites; the simpler one just
|
||||
// specifies a destination rectangle and a rotation anlge. A more
|
||||
// powerful technique supports rendering to non-rectangular quads.
|
||||
//
|
||||
// Both techniques support clipping, alpha, and rotation. More
|
||||
// details are below.
|
||||
//
|
||||
///////////////////////////////////////////////////////////////////////////
|
||||
|
||||
#ifndef __D3DXSPRITE_H__
|
||||
#define __D3DXSPRITE_H__
|
||||
|
||||
#include <d3d.h>
|
||||
#include <limits.h>
|
||||
#include "d3dxerr.h"
|
||||
|
||||
#ifdef __cplusplus
|
||||
extern "C" {
|
||||
#endif
|
||||
|
||||
|
||||
//-------------------------------------------------------------------------
|
||||
// D3DXPrepareDeviceForSprite:
|
||||
//
|
||||
// Call this function to set up all the render states necessary for
|
||||
// BltSprite/WarpSprite to work correctly. (Advanced users may opt to
|
||||
// not call this function first; in which case Blt/WarpSprite functions
|
||||
// will use whatever render/texture states were set up on the device when
|
||||
// they are called.)
|
||||
//
|
||||
// Warning: This function modifies render states and may impact performance
|
||||
// negatively on some 3D hardware if it is called too often per frame.
|
||||
//
|
||||
// Warning: If the render state changes (other than through calls to
|
||||
// BltSprite or WarpSprite), you will need to call this function again before
|
||||
// calling BltSprite or WarpSprite.
|
||||
//
|
||||
// Details: This function modifies the the rendering first texture stage and
|
||||
// it modifies some renderstates for the entire device. Here is the exact
|
||||
// list:
|
||||
//
|
||||
// SetTextureStageState(0, D3DTSS_COLORARG1, D3DTA_TEXTURE);
|
||||
// SetTextureStageState(0, D3DTSS_COLOROP, D3DTOP_SELECTARG1);
|
||||
// SetTextureStageState(0, D3DTSS_ALPHAARG1, D3DTA_TEXTURE);
|
||||
// SetTextureStageState(0, D3DTSS_ALPHAARG2, D3DTA_DIFFUSE);
|
||||
// SetTextureStageState(0, D3DTSS_ALPHAOP, D3DTOP_MODULATE);
|
||||
// SetTextureStageState(0, D3DTSS_MINFILTER, D3DTFN_LINEAR);
|
||||
// SetTextureStageState(0, D3DTSS_MAGFILTER, D3DTFG_LINEAR);
|
||||
//
|
||||
// SetRenderState(D3DRENDERSTATE_SRCBLEND, D3DBLEND_SRCALPHA);
|
||||
// SetRenderState(D3DRENDERSTATE_DESTBLEND, D3DBLEND_INVSRCALPHA);
|
||||
// SetRenderState(D3DRENDERSTATE_ALPHABLENDENABLE, TRUE);
|
||||
//
|
||||
// Depending on the value of ZEnable parameter, this function will
|
||||
// will either call
|
||||
// SetRenderState(D3DRENDERSTATE_ZENABLE, FALSE);
|
||||
// - or -
|
||||
// SetRenderState(D3DRENDERSTATE_ZENABLE, TRUE);
|
||||
//
|
||||
// Parameters:
|
||||
// pd3dDevice - a pointer to the d3d device that you wish to prepare
|
||||
// for use with D3DX Sprite Services
|
||||
// ZEnable - a flag indicating whether you want the sprites to
|
||||
// check and update the Z buffer as part of rendering.
|
||||
// If ZEnable is FALSE, OR you are using
|
||||
// alpha-blending, then it is necessary to render your
|
||||
// sprites from back-to-front.
|
||||
//
|
||||
//-------------------------------------------------------------------------
|
||||
|
||||
#ifdef __cplusplus
|
||||
HRESULT WINAPI
|
||||
D3DXPrepareDeviceForSprite( LPDIRECT3DDEVICE7 pd3dDevice,
|
||||
BOOL ZEnable = FALSE);
|
||||
#else
|
||||
HRESULT WINAPI
|
||||
D3DXPrepareDeviceForSprite( LPDIRECT3DDEVICE7 pd3dDevice,
|
||||
BOOL ZEnable);
|
||||
#endif
|
||||
|
||||
|
||||
|
||||
//-------------------------------------------------------------------------
|
||||
// The D3DXDrawBasicSprite() function performs blitting of source images onto
|
||||
// a 3D rendering device. This function only calls SetTexture on the first
|
||||
// renderstage with the parameter (pd3dTexture) if that parameter is non-null.
|
||||
// This function assumes that D3DXPrepareDeviceForSprite has been called on
|
||||
// the device or that caller has in some other way correctly prepared the
|
||||
// renderstates.
|
||||
//
|
||||
// This function supports scaling, rotations, alpha-blending, and choosing
|
||||
// a source sub-rect.
|
||||
//
|
||||
// Rotation angle is specified in radians. Both rotations and scales
|
||||
// are applied around the center of the sprite; where the center of the
|
||||
// sprite is half the width/height of the sprite, plus the offset parameter.
|
||||
//
|
||||
// Use the offset parameter if you want the sprite's center to be something
|
||||
// other than the image center.
|
||||
//
|
||||
// The destination point indicates where you would like the center of
|
||||
// the sprite to draw to.
|
||||
//
|
||||
// Parameters:
|
||||
// pd3dTexture - a pointer to the surface containing the texture
|
||||
// pd3dDevice - a pointer to the d3d device to render to. It is
|
||||
// assumed that render states are set up. (See
|
||||
// D3DXPrepareDeviceForSprite)
|
||||
// ppointDest - a pointer to the target point for the sprite. The
|
||||
// components of the vector must be in screen
|
||||
// space.
|
||||
// alpha - alpha value to apply to sprite. 1.0 means totally
|
||||
// opaque; and 0.0 means totally transparent.
|
||||
// WARNING: If you are using alpha, then you should render
|
||||
// from back to front in order to avoid rendering
|
||||
// artifacts.
|
||||
// angleRad - angle of rotation around the 'center' of the rect
|
||||
// scale - a uniform scale that is applied to the source rect
|
||||
// to specify the size of the image that is rendered
|
||||
// pOffset - offset from the center of the source rect to use as the
|
||||
// center of rotation
|
||||
// pSourceRect - a rect that indicates what portion of the source
|
||||
// source texture to use. If NULL is passed, then the
|
||||
// entire source is used. If the source texture was
|
||||
// created via D3DX, then the rect should be specified
|
||||
// in the coordinates of the original image (so that you
|
||||
// don't have to worry about stretching/scaling that D3DX
|
||||
// may have done to make the image work with your current
|
||||
// 3D Device.) Note that horizontal or vertical mirroring
|
||||
// may be simply accomplished by swapping the left/right
|
||||
// or top/bottom fields of this RECT.
|
||||
//-------------------------------------------------------------------------
|
||||
|
||||
#ifdef __cplusplus
|
||||
HRESULT WINAPI
|
||||
D3DXDrawSpriteSimple(LPDIRECTDRAWSURFACE7 pd3dTexture,
|
||||
LPDIRECT3DDEVICE7 pd3dDevice,
|
||||
const D3DXVECTOR3 *ppointDest,
|
||||
float alpha = 1.0f,
|
||||
float scale = 1.0f,
|
||||
float angleRad = 0.0f,
|
||||
const D3DXVECTOR2 *pOffset = NULL,
|
||||
const RECT *pSourceRect = NULL);
|
||||
#else
|
||||
HRESULT WINAPI
|
||||
D3DXDrawSpriteSimple(LPDIRECTDRAWSURFACE7 pd3dTexture,
|
||||
LPDIRECT3DDEVICE7 pd3dDevice,
|
||||
D3DXVECTOR3 *ppointDest,
|
||||
float alpha,
|
||||
float scale,
|
||||
float angleRad,
|
||||
D3DXVECTOR2 *pOffset,
|
||||
RECT *pSourceRect);
|
||||
#endif
|
||||
|
||||
//-------------------------------------------------------------------------
|
||||
// The D3DXDrawSprite() function transforms source images onto a 3D
|
||||
// rendering device. It takes a general 4x4 matrix which is use to transform
|
||||
// the points of a default rect: (left=-.5, top=-.5, right=+.5, bottom=+.5).
|
||||
// (This default rect was chosen so that it was centered around the origin
|
||||
// to ease setting up rotations. And it was chosen to have a width/height of one
|
||||
// to ease setting up scales.)
|
||||
//
|
||||
// This function only calls SetTexture on the first
|
||||
// renderstage with the parameter (pd3dTexture) if that parameter is non-null.
|
||||
// This function assumes that D3DXPrepareDeviceForSprite has been called on
|
||||
// the device or that caller has in some other way correctly prepared the
|
||||
// renderstates.
|
||||
//
|
||||
// This function supports alpha-blending, and choosing
|
||||
// a source sub-rect. (A value of NULL for source sub-rect means the entire
|
||||
// texture is used.)
|
||||
//
|
||||
// Note that if the transformed points have a value for w (the homogenous
|
||||
// coordinate) that is not 1, then this function will invert it and pass
|
||||
// that value to D3D as the rhw field of a TLVERTEX. If the value for w is
|
||||
// zero, then it use 1 as the rhw.
|
||||
//
|
||||
// Parameters:
|
||||
// pd3dTexture - a pointer to the surface containing the texture
|
||||
// pd3dDevice - a pointer to the d3d device to render to. It is
|
||||
// assumed that render states are set up. (See
|
||||
// D3DXPrepareDeviceForSprite)
|
||||
// pMatrixTransform - 4x4 matrix that specifies the transformation
|
||||
// that will be applied to the default -.5 to +.5
|
||||
// rectangle.
|
||||
// alpha - alpha value to apply to sprite. 1.0 means totally
|
||||
// opaque; and 0.0 means totally transparent.
|
||||
// WARNING: If you are using alpha, then you should render
|
||||
// from back to front in order to avoid rendering
|
||||
// artifacts.Furthermore, you should avoid scenarios where
|
||||
// semi-transparent objects intersect.
|
||||
// pSourceRect - a rect that indicates what portion of the source
|
||||
// source texture to use. If NULL is passed, then the
|
||||
// entire source is used. If the source texture was
|
||||
// created via D3DX, then the rect should be specified
|
||||
// in the coordinates of the original image (so that you
|
||||
// don't have to worry about stretching/scaling that D3DX
|
||||
// may have done to make the image work with your current
|
||||
// 3D Device.) Note that mirroring may be simply accomplished
|
||||
// by swapping the left/right or top/bottom fields of
|
||||
// this RECT.
|
||||
//
|
||||
//-------------------------------------------------------------------------
|
||||
|
||||
#ifdef __cplusplus
|
||||
HRESULT WINAPI
|
||||
D3DXDrawSpriteTransform(LPDIRECTDRAWSURFACE7 pd3dTexture,
|
||||
LPDIRECT3DDEVICE7 pd3dDevice,
|
||||
const D3DXMATRIX *pMatrixTransform,
|
||||
float alpha = 1.0f,
|
||||
const RECT *pSourceRect = NULL);
|
||||
#else
|
||||
HRESULT WINAPI
|
||||
D3DXDrawSpriteTransform(LPDIRECTDRAWSURFACE7 pd3dTexture,
|
||||
LPDIRECT3DDEVICE7 pd3dDevice,
|
||||
D3DXMATRIX *pMatrixTransform,
|
||||
float alpha,
|
||||
RECT *pSourceRect);
|
||||
#endif
|
||||
|
||||
//-------------------------------------------------------------------------
|
||||
// The D3DXBuildSpriteTransform() function is a helper provided which
|
||||
// creates a matrix corresponding to simple properties. This matrix is
|
||||
// set up to pass directly to D3DXTransformSprite.
|
||||
//
|
||||
// Parameters:
|
||||
// pMatrix - a pointer to the result matrix
|
||||
// prectDest - a pointer to the target rectangle for the sprite
|
||||
// angleRad - angle of rotation around the 'center' of the rect
|
||||
// pOffset - offset from the center of the source rect to use as the
|
||||
// center of rotation
|
||||
//
|
||||
//-------------------------------------------------------------------------
|
||||
|
||||
#ifdef __cplusplus
|
||||
void WINAPI
|
||||
D3DXBuildSpriteTransform(D3DXMATRIX *pMatrix,
|
||||
const RECT *prectDest,
|
||||
float angleRad = 0.0f,
|
||||
const D3DXVECTOR2 *pOffset = NULL);
|
||||
#else
|
||||
void WINAPI
|
||||
D3DXBuildSpriteTransform(D3DXMATRIX *pMatrix,
|
||||
RECT *prectDest,
|
||||
float angleRad,
|
||||
D3DXVECTOR2 *pOffset);
|
||||
#endif
|
||||
|
||||
|
||||
//-------------------------------------------------------------------------
|
||||
// The D3DXDrawSprite3D() function renders a texture onto a 3D quad. The
|
||||
// quad ABCD is broken into two triangles ABC and ACD which are rendered
|
||||
// via DrawPrim.
|
||||
//
|
||||
// Parameters:
|
||||
// pd3dTexture - a pointer to the surface containing the texture
|
||||
// pd3dDevice - a pointer to the d3d device to render to. It is
|
||||
// assumed that render states are set up. (See
|
||||
// D3DXPrepareDeviceForSprite)
|
||||
// quad - array of 4 points in the following order:
|
||||
// upper-left, upper-right, lower-right, lower-left.
|
||||
// If these vectors contain a W, then this function
|
||||
// will take the reciprocal of that value to pass as
|
||||
// as the rhw (i.e. reciprocal homogenous w).
|
||||
// alpha - alpha value to apply to sprite. 1.0 means totally
|
||||
// opaque; and 0.0 means totally transparent.
|
||||
// WARNING: If you are using alpha, then you should render
|
||||
// from back to front in order to avoid rendering
|
||||
// artifacts.Furthermore, you should avoid scenarios where
|
||||
// semi-transparent objects intersect.
|
||||
// pSourceRect - a rect that indicates what portion of the source
|
||||
// source texture to use. If NULL is passed, then the
|
||||
// entire source is used. If the source texture was
|
||||
// created via D3DX, then the rect should be specified
|
||||
// in the coordinates of the original image (so that you
|
||||
// don't have to worry about stretching/scaling that D3DX
|
||||
// may have done to make the image work with your current
|
||||
// 3D Device.) Note that mirroring may be simply accomplished
|
||||
// by swapping the left/right or top/bottom fields of
|
||||
// this RECT.
|
||||
//-------------------------------------------------------------------------
|
||||
|
||||
#ifdef __cplusplus
|
||||
HRESULT WINAPI
|
||||
D3DXDrawSprite3D(LPDIRECTDRAWSURFACE7 pd3dTexture,
|
||||
LPDIRECT3DDEVICE7 pd3dDevice,
|
||||
const D3DXVECTOR4 quad[4],
|
||||
float alpha = 1.0f,
|
||||
const RECT *pSourceRect = NULL);
|
||||
#else
|
||||
HRESULT WINAPI
|
||||
D3DXDrawSprite3D(LPDIRECTDRAWSURFACE7 pd3dTexture,
|
||||
LPDIRECT3DDEVICE7 pd3dDevice,
|
||||
D3DXVECTOR4 quad[4],
|
||||
float alpha,
|
||||
RECT *pSourceRect);
|
||||
#endif
|
||||
|
||||
|
||||
|
||||
#ifdef __cplusplus
|
||||
} // extern "C"
|
||||
#endif
|
||||
|
||||
#endif // __D3DXSPRITE_H__
|
File diff suppressed because it is too large
Load Diff
|
@ -0,0 +1,218 @@
|
|||
//*********************************************************************
|
||||
//* Microsoft Windows **
|
||||
//* Copyright(c) Microsoft Corp., 1995-1997 **
|
||||
//*********************************************************************
|
||||
//
|
||||
// DDRAWEX.H
|
||||
//
|
||||
// Header file for DirectDrawEx functionality
|
||||
|
||||
#ifndef __DDRAWEXH__
|
||||
#define __DDRAWEXH__
|
||||
|
||||
#ifdef __cplusplus
|
||||
extern "C" {
|
||||
#endif
|
||||
|
||||
#include <ddraw.h>
|
||||
|
||||
// {4FD2A832-86C8-11d0-8FCA-00C04FD9189D}
|
||||
DEFINE_GUID(CLSID_DirectDrawFactory,
|
||||
0x4fd2a832, 0x86c8, 0x11d0, 0x8f, 0xca, 0x0, 0xc0, 0x4f, 0xd9, 0x18, 0x9d);
|
||||
|
||||
DEFINE_GUID(IID_IDirectDrawFactory,
|
||||
0x4fd2a833, 0x86c8, 0x11d0, 0x8f, 0xca, 0x0, 0xc0, 0x4f, 0xd9, 0x18, 0x9d);
|
||||
|
||||
#ifndef DIRECTDRAW_VERSION
|
||||
|
||||
//Functionality supported by DDrawex but not DX3
|
||||
#define DDSD_LPSURFACE 0x00000800l
|
||||
|
||||
DEFINE_GUID( IID_IDirectDrawSurface3,
|
||||
0xDA044E00,0x69B2,0x11D0,0xA1,0xD5,0x00,0xAA,0x00,0xB8,0xDF,0xBB );
|
||||
|
||||
typedef struct IDirectDrawSurface3 FAR *LPDIRECTDRAWSURFACE3;
|
||||
|
||||
#undef INTERFACE
|
||||
#define INTERFACE IDirectDrawSurface3
|
||||
DECLARE_INTERFACE_( IDirectDrawSurface3, IUnknown )
|
||||
{
|
||||
/*** IUnknown methods ***/
|
||||
STDMETHOD(QueryInterface) (THIS_ REFIID riid, LPVOID FAR * ppvObj) PURE;
|
||||
STDMETHOD_(ULONG,AddRef) (THIS) PURE;
|
||||
STDMETHOD_(ULONG,Release) (THIS) PURE;
|
||||
/*** IDirectDrawSurface methods ***/
|
||||
STDMETHOD(AddAttachedSurface)(THIS_ LPDIRECTDRAWSURFACE3) PURE;
|
||||
STDMETHOD(AddOverlayDirtyRect)(THIS_ LPRECT) PURE;
|
||||
STDMETHOD(Blt)(THIS_ LPRECT,LPDIRECTDRAWSURFACE3, LPRECT,DWORD, LPDDBLTFX) PURE;
|
||||
STDMETHOD(BltBatch)(THIS_ LPDDBLTBATCH, DWORD, DWORD ) PURE;
|
||||
STDMETHOD(BltFast)(THIS_ DWORD,DWORD,LPDIRECTDRAWSURFACE3, LPRECT,DWORD) PURE;
|
||||
STDMETHOD(DeleteAttachedSurface)(THIS_ DWORD,LPDIRECTDRAWSURFACE3) PURE;
|
||||
STDMETHOD(EnumAttachedSurfaces)(THIS_ LPVOID,LPDDENUMSURFACESCALLBACK) PURE;
|
||||
STDMETHOD(EnumOverlayZOrders)(THIS_ DWORD,LPVOID,LPDDENUMSURFACESCALLBACK) PURE;
|
||||
STDMETHOD(Flip)(THIS_ LPDIRECTDRAWSURFACE3, DWORD) PURE;
|
||||
STDMETHOD(GetAttachedSurface)(THIS_ LPDDSCAPS, LPDIRECTDRAWSURFACE3 FAR *) PURE;
|
||||
STDMETHOD(GetBltStatus)(THIS_ DWORD) PURE;
|
||||
STDMETHOD(GetCaps)(THIS_ LPDDSCAPS) PURE;
|
||||
STDMETHOD(GetClipper)(THIS_ LPDIRECTDRAWCLIPPER FAR*) PURE;
|
||||
STDMETHOD(GetColorKey)(THIS_ DWORD, LPDDCOLORKEY) PURE;
|
||||
STDMETHOD(GetDC)(THIS_ HDC FAR *) PURE;
|
||||
STDMETHOD(GetFlipStatus)(THIS_ DWORD) PURE;
|
||||
STDMETHOD(GetOverlayPosition)(THIS_ LPLONG, LPLONG ) PURE;
|
||||
STDMETHOD(GetPalette)(THIS_ LPDIRECTDRAWPALETTE FAR*) PURE;
|
||||
STDMETHOD(GetPixelFormat)(THIS_ LPDDPIXELFORMAT) PURE;
|
||||
STDMETHOD(GetSurfaceDesc)(THIS_ LPDDSURFACEDESC) PURE;
|
||||
STDMETHOD(Initialize)(THIS_ LPDIRECTDRAW, LPDDSURFACEDESC) PURE;
|
||||
STDMETHOD(IsLost)(THIS) PURE;
|
||||
STDMETHOD(Lock)(THIS_ LPRECT,LPDDSURFACEDESC,DWORD,HANDLE) PURE;
|
||||
STDMETHOD(ReleaseDC)(THIS_ HDC) PURE;
|
||||
STDMETHOD(Restore)(THIS) PURE;
|
||||
STDMETHOD(SetClipper)(THIS_ LPDIRECTDRAWCLIPPER) PURE;
|
||||
STDMETHOD(SetColorKey)(THIS_ DWORD, LPDDCOLORKEY) PURE;
|
||||
STDMETHOD(SetOverlayPosition)(THIS_ LONG, LONG ) PURE;
|
||||
STDMETHOD(SetPalette)(THIS_ LPDIRECTDRAWPALETTE) PURE;
|
||||
STDMETHOD(Unlock)(THIS_ LPVOID) PURE;
|
||||
STDMETHOD(UpdateOverlay)(THIS_ LPRECT, LPDIRECTDRAWSURFACE3,LPRECT,DWORD, LPDDOVERLAYFX) PURE;
|
||||
STDMETHOD(UpdateOverlayDisplay)(THIS_ DWORD) PURE;
|
||||
STDMETHOD(UpdateOverlayZOrder)(THIS_ DWORD, LPDIRECTDRAWSURFACE3) PURE;
|
||||
/*** Added in the v2 interface ***/
|
||||
STDMETHOD(GetDDInterface)(THIS_ LPVOID FAR *) PURE;
|
||||
STDMETHOD(PageLock)(THIS_ DWORD) PURE;
|
||||
STDMETHOD(PageUnlock)(THIS_ DWORD) PURE;
|
||||
/*** Added in the v3 interface ***/
|
||||
STDMETHOD(SetSurfaceDesc)(THIS_ LPDDSURFACEDESC, DWORD ) PURE;
|
||||
};
|
||||
#endif
|
||||
|
||||
|
||||
|
||||
|
||||
#define DDSCAPS_DATAEXCHANGE (DDSCAPS_SYSTEMMEMORY|DDSCAPS_VIDEOMEMORY)
|
||||
|
||||
#undef INTERFACE
|
||||
#define INTERFACE IDirectDrawFactory
|
||||
|
||||
DECLARE_INTERFACE_(IDirectDrawFactory, IUnknown)
|
||||
{
|
||||
/*** IUnknown methods ***/
|
||||
STDMETHOD(QueryInterface) (THIS_ REFIID riid, LPVOID FAR * ppvObj) PURE;
|
||||
STDMETHOD_(ULONG,AddRef) (THIS) PURE;
|
||||
STDMETHOD_(ULONG,Release) (THIS) PURE;
|
||||
/*** IDirectDrawFactory methods ***/
|
||||
STDMETHOD(CreateDirectDraw) (THIS_ GUID * pGUID, HWND hWnd, DWORD dwCoopLevelFlags, DWORD dwReserved, IUnknown *pUnkOuter, IDirectDraw **ppDirectDraw) PURE;
|
||||
STDMETHOD(DirectDrawEnumerate) (THIS_ LPDDENUMCALLBACK lpCallback, LPVOID lpContext) PURE;
|
||||
};
|
||||
|
||||
|
||||
|
||||
// {618F8AD4-8B7A-11d0-8FCC-00C04FD9189D}
|
||||
DEFINE_GUID(IID_IDirectDraw3,
|
||||
0x618f8ad4, 0x8b7a, 0x11d0, 0x8f, 0xcc, 0x0, 0xc0, 0x4f, 0xd9, 0x18, 0x9d);
|
||||
|
||||
typedef struct IDirectDraw3 FAR *LPDIRECTDRAW3;
|
||||
|
||||
#undef INTERFACE
|
||||
#define INTERFACE IDirectDraw3
|
||||
|
||||
DECLARE_INTERFACE_(IDirectDraw3, IUnknown)
|
||||
{
|
||||
/*** IUnknown methods ***/
|
||||
STDMETHOD(QueryInterface) (THIS_ REFIID riid, LPVOID FAR * ppvObj) PURE;
|
||||
STDMETHOD_(ULONG,AddRef) (THIS) PURE;
|
||||
STDMETHOD_(ULONG,Release) (THIS) PURE;
|
||||
/*** IDirectDraw methods ***/
|
||||
STDMETHOD(Compact)(THIS) PURE;
|
||||
STDMETHOD(CreateClipper)(THIS_ DWORD, LPDIRECTDRAWCLIPPER FAR*, IUnknown FAR * ) PURE;
|
||||
STDMETHOD(CreatePalette)(THIS_ DWORD, LPPALETTEENTRY, LPDIRECTDRAWPALETTE FAR*, IUnknown FAR * ) PURE;
|
||||
STDMETHOD(CreateSurface)(THIS_ LPDDSURFACEDESC, LPDIRECTDRAWSURFACE FAR *, IUnknown FAR *) PURE;
|
||||
STDMETHOD(DuplicateSurface)( THIS_ LPDIRECTDRAWSURFACE, LPDIRECTDRAWSURFACE FAR * ) PURE;
|
||||
STDMETHOD(EnumDisplayModes)( THIS_ DWORD, LPDDSURFACEDESC, LPVOID, LPDDENUMMODESCALLBACK ) PURE;
|
||||
STDMETHOD(EnumSurfaces)(THIS_ DWORD, LPDDSURFACEDESC, LPVOID,LPDDENUMSURFACESCALLBACK ) PURE;
|
||||
STDMETHOD(FlipToGDISurface)(THIS) PURE;
|
||||
STDMETHOD(GetCaps)( THIS_ LPDDCAPS, LPDDCAPS) PURE;
|
||||
STDMETHOD(GetDisplayMode)( THIS_ LPDDSURFACEDESC) PURE;
|
||||
STDMETHOD(GetFourCCCodes)(THIS_ LPDWORD, LPDWORD ) PURE;
|
||||
STDMETHOD(GetGDISurface)(THIS_ LPDIRECTDRAWSURFACE FAR *) PURE;
|
||||
STDMETHOD(GetMonitorFrequency)(THIS_ LPDWORD) PURE;
|
||||
STDMETHOD(GetScanLine)(THIS_ LPDWORD) PURE;
|
||||
STDMETHOD(GetVerticalBlankStatus)(THIS_ LPBOOL ) PURE;
|
||||
STDMETHOD(Initialize)(THIS_ GUID FAR *) PURE;
|
||||
STDMETHOD(RestoreDisplayMode)(THIS) PURE;
|
||||
STDMETHOD(SetCooperativeLevel)(THIS_ HWND, DWORD) PURE;
|
||||
STDMETHOD(SetDisplayMode)(THIS_ DWORD, DWORD,DWORD, DWORD, DWORD) PURE;
|
||||
STDMETHOD(WaitForVerticalBlank)(THIS_ DWORD, HANDLE ) PURE;
|
||||
/*** Added in the v2 interface ***/
|
||||
STDMETHOD(GetAvailableVidMem)(THIS_ LPDDSCAPS, LPDWORD, LPDWORD) PURE;
|
||||
/*** IDirectDraw3 methods ***/
|
||||
STDMETHOD(GetSurfaceFromDC) (THIS_ HDC, IDirectDrawSurface **) PURE;
|
||||
};
|
||||
|
||||
#if !defined(__cplusplus) || defined(CINTERFACE)
|
||||
#define IDirectDraw3_QueryInterface(p, a, b) (p)->lpVtbl->QueryInterface(p, a, b)
|
||||
#define IDirectDraw3_AddRef(p) (p)->lpVtbl->AddRef(p)
|
||||
#define IDirectDraw3_Release(p) (p)->lpVtbl->Release(p)
|
||||
#define IDirectDraw3_Compact(p) (p)->lpVtbl->Compact(p)
|
||||
#define IDirectDraw3_CreateClipper(p, a, b, c) (p)->lpVtbl->CreateClipper(p, a, b, c)
|
||||
#define IDirectDraw3_CreatePalette(p, a, b, c, d) (p)->lpVtbl->CreatePalette(p, a, b, c, d)
|
||||
#define IDirectDraw3_CreateSurface(p, a, b, c) (p)->lpVtbl->CreateSurface(p, a, b, c)
|
||||
#define IDirectDraw3_DuplicateSurface(p, a, b) (p)->lpVtbl->DuplicateSurface(p, a, b)
|
||||
#define IDirectDraw3_EnumDisplayModes(p, a, b, c, d) (p)->lpVtbl->EnumDisplayModes(p, a, b, c, d)
|
||||
#define IDirectDraw3_EnumSurfaces(p, a, b, c, d) (p)->lpVtbl->EnumSurfaces(p, a, b, c, d)
|
||||
#define IDirectDraw3_FlipToGDISurface(p) (p)->lpVtbl->FlipToGDISurface(p)
|
||||
#define IDirectDraw3_GetCaps(p, a, b) (p)->lpVtbl->GetCaps(p, a, b)
|
||||
#define IDirectDraw3_GetDisplayMode(p, a) (p)->lpVtbl->GetDisplayMode(p, a)
|
||||
#define IDirectDraw3_GetFourCCCodes(p, a, b) (p)->lpVtbl->GetFourCCCodes(p, a, b)
|
||||
#define IDirectDraw3_GetGDISurface(p, a) (p)->lpVtbl->GetGDISurface(p, a)
|
||||
#define IDirectDraw3_GetMonitorFrequency(p, a) (p)->lpVtbl->GetMonitorFrequency(p, a)
|
||||
#define IDirectDraw3_GetScanLine(p, a) (p)->lpVtbl->GetScanLine(p, a)
|
||||
#define IDirectDraw3_GetVerticalBlankStatus(p, a) (p)->lpVtbl->GetVerticalBlankStatus(p, a)
|
||||
#define IDirectDraw3_Initialize(p, a) (p)->lpVtbl->Initialize(p, a)
|
||||
#define IDirectDraw3_RestoreDisplayMode(p) (p)->lpVtbl->RestoreDisplayMode(p)
|
||||
#define IDirectDraw3_SetCooperativeLevel(p, a, b) (p)->lpVtbl->SetCooperativeLevel(p, a, b)
|
||||
#define IDirectDraw3_SetDisplayMode(p, a, b, c, d, e) (p)->lpVtbl->SetDisplayMode(p, a, b, c, d, e)
|
||||
#define IDirectDraw3_WaitForVerticalBlank(p, a, b) (p)->lpVtbl->WaitForVerticalBlank(p, a, b)
|
||||
#define IDirectDraw3_GetAvailableVidMem(p, a, b, c) (p)->lpVtbl->GetAvailableVidMem(p, a, b, c)
|
||||
#define IDirectDraw3_GetSurfaceFromDC(p, a, b) (p)->lpVtbl->GetSurfaceFromDC(p, a, b)
|
||||
#endif
|
||||
|
||||
|
||||
|
||||
/*===========================================================================
|
||||
*
|
||||
*
|
||||
* DIRECTDRAWEX RETURN CODES
|
||||
*
|
||||
* The return values from DirectDrawEx Commands and Surface that return an
|
||||
* HRESULT are codes from DirectDrawEx concerning the results of the action
|
||||
* requested by DirectDrawEx.
|
||||
*
|
||||
*==========================================================================*/
|
||||
|
||||
/*
|
||||
* An attempt was made to load ddraw.dll
|
||||
*/
|
||||
#define DDERR_LOADFAILED MAKE_DDHRESULT( 901 )
|
||||
|
||||
/*
|
||||
* Unable to determine module/os version number
|
||||
*/
|
||||
#define DDERR_BADVERSIONINFO MAKE_DDHRESULT( 902 )
|
||||
|
||||
/*
|
||||
* Unable to determine address of ddraw.dll exported symbol (DirectDrawCreate or
|
||||
* DirectDrawEnumerate).
|
||||
*/
|
||||
#define DDERR_BADPROCADDRESS MAKE_DDHRESULT( 903 )
|
||||
|
||||
/*
|
||||
* Legacy usage: do not use QI() to create D3D device objects from surface objects.
|
||||
* Use IDirect3D2::CreateDevice()
|
||||
*/
|
||||
#define DDERR_LEGACYUSAGE MAKE_DDHRESULT( 904 )
|
||||
|
||||
#ifdef __cplusplus
|
||||
}
|
||||
#endif
|
||||
|
||||
|
||||
#endif // __DDRAWEXH__
|
|
@ -0,0 +1,533 @@
|
|||
|
||||
#pragma warning( disable: 4049 ) /* more than 64k source lines */
|
||||
|
||||
/* this ALWAYS GENERATED file contains the definitions for the interfaces */
|
||||
|
||||
|
||||
/* File created by MIDL compiler version 6.00.0338 */
|
||||
/* Compiler settings for ddstream.idl:
|
||||
Oicf, W1, Zp8, env=Win32 (32b run)
|
||||
protocol : dce , ms_ext, c_ext
|
||||
error checks: allocation ref bounds_check enum stub_data
|
||||
VC __declspec() decoration level:
|
||||
__declspec(uuid()), __declspec(selectany), __declspec(novtable)
|
||||
DECLSPEC_UUID(), MIDL_INTERFACE()
|
||||
*/
|
||||
//@@MIDL_FILE_HEADING( )
|
||||
|
||||
|
||||
/* verify that the <rpcndr.h> version is high enough to compile this file*/
|
||||
#ifndef __REQUIRED_RPCNDR_H_VERSION__
|
||||
#define __REQUIRED_RPCNDR_H_VERSION__ 440
|
||||
#endif
|
||||
|
||||
#include "rpc.h"
|
||||
#include "rpcndr.h"
|
||||
|
||||
#ifndef __RPCNDR_H_VERSION__
|
||||
#error this stub requires an updated version of <rpcndr.h>
|
||||
#endif // __RPCNDR_H_VERSION__
|
||||
|
||||
#ifndef COM_NO_WINDOWS_H
|
||||
#include "windows.h"
|
||||
#include "ole2.h"
|
||||
#endif /*COM_NO_WINDOWS_H*/
|
||||
|
||||
#ifndef __ddstream_h__
|
||||
#define __ddstream_h__
|
||||
|
||||
#if defined(_MSC_VER) && (_MSC_VER >= 1020)
|
||||
#pragma once
|
||||
#endif
|
||||
|
||||
/* Forward Declarations */
|
||||
|
||||
#ifndef __IDirectDrawMediaStream_FWD_DEFINED__
|
||||
#define __IDirectDrawMediaStream_FWD_DEFINED__
|
||||
typedef interface IDirectDrawMediaStream IDirectDrawMediaStream;
|
||||
#endif /* __IDirectDrawMediaStream_FWD_DEFINED__ */
|
||||
|
||||
|
||||
#ifndef __IDirectDrawStreamSample_FWD_DEFINED__
|
||||
#define __IDirectDrawStreamSample_FWD_DEFINED__
|
||||
typedef interface IDirectDrawStreamSample IDirectDrawStreamSample;
|
||||
#endif /* __IDirectDrawStreamSample_FWD_DEFINED__ */
|
||||
|
||||
|
||||
/* header files for imported files */
|
||||
#include "unknwn.h"
|
||||
#include "mmstream.h"
|
||||
|
||||
#ifdef __cplusplus
|
||||
extern "C"{
|
||||
#endif
|
||||
|
||||
void * __RPC_USER MIDL_user_allocate(size_t);
|
||||
void __RPC_USER MIDL_user_free( void * );
|
||||
|
||||
/* interface __MIDL_itf_ddstream_0000 */
|
||||
/* [local] */
|
||||
|
||||
//
|
||||
// The following declarations within the 'if 0' block are dummy typedefs used to make
|
||||
// the ddstream.idl file build. The actual definitions are contained in DDRAW.H
|
||||
//
|
||||
#if 0
|
||||
typedef void *LPDDSURFACEDESC;
|
||||
|
||||
typedef struct tDDSURFACEDESC DDSURFACEDESC;
|
||||
|
||||
#endif
|
||||
#include <ddraw.h>
|
||||
|
||||
enum __MIDL___MIDL_itf_ddstream_0000_0001
|
||||
{ DDSFF_PROGRESSIVERENDER = 0x1
|
||||
} ;
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
extern RPC_IF_HANDLE __MIDL_itf_ddstream_0000_v0_0_c_ifspec;
|
||||
extern RPC_IF_HANDLE __MIDL_itf_ddstream_0000_v0_0_s_ifspec;
|
||||
|
||||
#ifndef __IDirectDrawMediaStream_INTERFACE_DEFINED__
|
||||
#define __IDirectDrawMediaStream_INTERFACE_DEFINED__
|
||||
|
||||
/* interface IDirectDrawMediaStream */
|
||||
/* [unique][uuid][local][object] */
|
||||
|
||||
|
||||
EXTERN_C const IID IID_IDirectDrawMediaStream;
|
||||
|
||||
#if defined(__cplusplus) && !defined(CINTERFACE)
|
||||
|
||||
MIDL_INTERFACE("F4104FCE-9A70-11d0-8FDE-00C04FD9189D")
|
||||
IDirectDrawMediaStream : public IMediaStream
|
||||
{
|
||||
public:
|
||||
virtual HRESULT STDMETHODCALLTYPE GetFormat(
|
||||
/* [out] */ DDSURFACEDESC *pDDSDCurrent,
|
||||
/* [out] */ IDirectDrawPalette **ppDirectDrawPalette,
|
||||
/* [out] */ DDSURFACEDESC *pDDSDDesired,
|
||||
/* [out] */ DWORD *pdwFlags) = 0;
|
||||
|
||||
virtual HRESULT STDMETHODCALLTYPE SetFormat(
|
||||
/* [in] */ const DDSURFACEDESC *pDDSurfaceDesc,
|
||||
/* [in] */ IDirectDrawPalette *pDirectDrawPalette) = 0;
|
||||
|
||||
virtual HRESULT STDMETHODCALLTYPE GetDirectDraw(
|
||||
/* [out] */ IDirectDraw **ppDirectDraw) = 0;
|
||||
|
||||
virtual HRESULT STDMETHODCALLTYPE SetDirectDraw(
|
||||
/* [in] */ IDirectDraw *pDirectDraw) = 0;
|
||||
|
||||
virtual HRESULT STDMETHODCALLTYPE CreateSample(
|
||||
/* [in] */ IDirectDrawSurface *pSurface,
|
||||
/* [in] */ const RECT *pRect,
|
||||
/* [in] */ DWORD dwFlags,
|
||||
/* [out] */ IDirectDrawStreamSample **ppSample) = 0;
|
||||
|
||||
virtual HRESULT STDMETHODCALLTYPE GetTimePerFrame(
|
||||
/* [out] */ STREAM_TIME *pFrameTime) = 0;
|
||||
|
||||
};
|
||||
|
||||
#else /* C style interface */
|
||||
|
||||
typedef struct IDirectDrawMediaStreamVtbl
|
||||
{
|
||||
BEGIN_INTERFACE
|
||||
|
||||
HRESULT ( STDMETHODCALLTYPE *QueryInterface )(
|
||||
IDirectDrawMediaStream * This,
|
||||
/* [in] */ REFIID riid,
|
||||
/* [iid_is][out] */ void **ppvObject);
|
||||
|
||||
ULONG ( STDMETHODCALLTYPE *AddRef )(
|
||||
IDirectDrawMediaStream * This);
|
||||
|
||||
ULONG ( STDMETHODCALLTYPE *Release )(
|
||||
IDirectDrawMediaStream * This);
|
||||
|
||||
HRESULT ( STDMETHODCALLTYPE *GetMultiMediaStream )(
|
||||
IDirectDrawMediaStream * This,
|
||||
/* [out] */ IMultiMediaStream **ppMultiMediaStream);
|
||||
|
||||
HRESULT ( STDMETHODCALLTYPE *GetInformation )(
|
||||
IDirectDrawMediaStream * This,
|
||||
/* [out] */ MSPID *pPurposeId,
|
||||
/* [out] */ STREAM_TYPE *pType);
|
||||
|
||||
HRESULT ( STDMETHODCALLTYPE *SetSameFormat )(
|
||||
IDirectDrawMediaStream * This,
|
||||
/* [in] */ IMediaStream *pStreamThatHasDesiredFormat,
|
||||
/* [in] */ DWORD dwFlags);
|
||||
|
||||
HRESULT ( STDMETHODCALLTYPE *AllocateSample )(
|
||||
IDirectDrawMediaStream * This,
|
||||
/* [in] */ DWORD dwFlags,
|
||||
/* [out] */ IStreamSample **ppSample);
|
||||
|
||||
HRESULT ( STDMETHODCALLTYPE *CreateSharedSample )(
|
||||
IDirectDrawMediaStream * This,
|
||||
/* [in] */ IStreamSample *pExistingSample,
|
||||
/* [in] */ DWORD dwFlags,
|
||||
/* [out] */ IStreamSample **ppNewSample);
|
||||
|
||||
HRESULT ( STDMETHODCALLTYPE *SendEndOfStream )(
|
||||
IDirectDrawMediaStream * This,
|
||||
DWORD dwFlags);
|
||||
|
||||
HRESULT ( STDMETHODCALLTYPE *GetFormat )(
|
||||
IDirectDrawMediaStream * This,
|
||||
/* [out] */ DDSURFACEDESC *pDDSDCurrent,
|
||||
/* [out] */ IDirectDrawPalette **ppDirectDrawPalette,
|
||||
/* [out] */ DDSURFACEDESC *pDDSDDesired,
|
||||
/* [out] */ DWORD *pdwFlags);
|
||||
|
||||
HRESULT ( STDMETHODCALLTYPE *SetFormat )(
|
||||
IDirectDrawMediaStream * This,
|
||||
/* [in] */ const DDSURFACEDESC *pDDSurfaceDesc,
|
||||
/* [in] */ IDirectDrawPalette *pDirectDrawPalette);
|
||||
|
||||
HRESULT ( STDMETHODCALLTYPE *GetDirectDraw )(
|
||||
IDirectDrawMediaStream * This,
|
||||
/* [out] */ IDirectDraw **ppDirectDraw);
|
||||
|
||||
HRESULT ( STDMETHODCALLTYPE *SetDirectDraw )(
|
||||
IDirectDrawMediaStream * This,
|
||||
/* [in] */ IDirectDraw *pDirectDraw);
|
||||
|
||||
HRESULT ( STDMETHODCALLTYPE *CreateSample )(
|
||||
IDirectDrawMediaStream * This,
|
||||
/* [in] */ IDirectDrawSurface *pSurface,
|
||||
/* [in] */ const RECT *pRect,
|
||||
/* [in] */ DWORD dwFlags,
|
||||
/* [out] */ IDirectDrawStreamSample **ppSample);
|
||||
|
||||
HRESULT ( STDMETHODCALLTYPE *GetTimePerFrame )(
|
||||
IDirectDrawMediaStream * This,
|
||||
/* [out] */ STREAM_TIME *pFrameTime);
|
||||
|
||||
END_INTERFACE
|
||||
} IDirectDrawMediaStreamVtbl;
|
||||
|
||||
interface IDirectDrawMediaStream
|
||||
{
|
||||
CONST_VTBL struct IDirectDrawMediaStreamVtbl *lpVtbl;
|
||||
};
|
||||
|
||||
|
||||
|
||||
#ifdef COBJMACROS
|
||||
|
||||
|
||||
#define IDirectDrawMediaStream_QueryInterface(This,riid,ppvObject) \
|
||||
(This)->lpVtbl -> QueryInterface(This,riid,ppvObject)
|
||||
|
||||
#define IDirectDrawMediaStream_AddRef(This) \
|
||||
(This)->lpVtbl -> AddRef(This)
|
||||
|
||||
#define IDirectDrawMediaStream_Release(This) \
|
||||
(This)->lpVtbl -> Release(This)
|
||||
|
||||
|
||||
#define IDirectDrawMediaStream_GetMultiMediaStream(This,ppMultiMediaStream) \
|
||||
(This)->lpVtbl -> GetMultiMediaStream(This,ppMultiMediaStream)
|
||||
|
||||
#define IDirectDrawMediaStream_GetInformation(This,pPurposeId,pType) \
|
||||
(This)->lpVtbl -> GetInformation(This,pPurposeId,pType)
|
||||
|
||||
#define IDirectDrawMediaStream_SetSameFormat(This,pStreamThatHasDesiredFormat,dwFlags) \
|
||||
(This)->lpVtbl -> SetSameFormat(This,pStreamThatHasDesiredFormat,dwFlags)
|
||||
|
||||
#define IDirectDrawMediaStream_AllocateSample(This,dwFlags,ppSample) \
|
||||
(This)->lpVtbl -> AllocateSample(This,dwFlags,ppSample)
|
||||
|
||||
#define IDirectDrawMediaStream_CreateSharedSample(This,pExistingSample,dwFlags,ppNewSample) \
|
||||
(This)->lpVtbl -> CreateSharedSample(This,pExistingSample,dwFlags,ppNewSample)
|
||||
|
||||
#define IDirectDrawMediaStream_SendEndOfStream(This,dwFlags) \
|
||||
(This)->lpVtbl -> SendEndOfStream(This,dwFlags)
|
||||
|
||||
|
||||
#define IDirectDrawMediaStream_GetFormat(This,pDDSDCurrent,ppDirectDrawPalette,pDDSDDesired,pdwFlags) \
|
||||
(This)->lpVtbl -> GetFormat(This,pDDSDCurrent,ppDirectDrawPalette,pDDSDDesired,pdwFlags)
|
||||
|
||||
#define IDirectDrawMediaStream_SetFormat(This,pDDSurfaceDesc,pDirectDrawPalette) \
|
||||
(This)->lpVtbl -> SetFormat(This,pDDSurfaceDesc,pDirectDrawPalette)
|
||||
|
||||
#define IDirectDrawMediaStream_GetDirectDraw(This,ppDirectDraw) \
|
||||
(This)->lpVtbl -> GetDirectDraw(This,ppDirectDraw)
|
||||
|
||||
#define IDirectDrawMediaStream_SetDirectDraw(This,pDirectDraw) \
|
||||
(This)->lpVtbl -> SetDirectDraw(This,pDirectDraw)
|
||||
|
||||
#define IDirectDrawMediaStream_CreateSample(This,pSurface,pRect,dwFlags,ppSample) \
|
||||
(This)->lpVtbl -> CreateSample(This,pSurface,pRect,dwFlags,ppSample)
|
||||
|
||||
#define IDirectDrawMediaStream_GetTimePerFrame(This,pFrameTime) \
|
||||
(This)->lpVtbl -> GetTimePerFrame(This,pFrameTime)
|
||||
|
||||
#endif /* COBJMACROS */
|
||||
|
||||
|
||||
#endif /* C style interface */
|
||||
|
||||
|
||||
|
||||
HRESULT STDMETHODCALLTYPE IDirectDrawMediaStream_GetFormat_Proxy(
|
||||
IDirectDrawMediaStream * This,
|
||||
/* [out] */ DDSURFACEDESC *pDDSDCurrent,
|
||||
/* [out] */ IDirectDrawPalette **ppDirectDrawPalette,
|
||||
/* [out] */ DDSURFACEDESC *pDDSDDesired,
|
||||
/* [out] */ DWORD *pdwFlags);
|
||||
|
||||
|
||||
void __RPC_STUB IDirectDrawMediaStream_GetFormat_Stub(
|
||||
IRpcStubBuffer *This,
|
||||
IRpcChannelBuffer *_pRpcChannelBuffer,
|
||||
PRPC_MESSAGE _pRpcMessage,
|
||||
DWORD *_pdwStubPhase);
|
||||
|
||||
|
||||
HRESULT STDMETHODCALLTYPE IDirectDrawMediaStream_SetFormat_Proxy(
|
||||
IDirectDrawMediaStream * This,
|
||||
/* [in] */ const DDSURFACEDESC *pDDSurfaceDesc,
|
||||
/* [in] */ IDirectDrawPalette *pDirectDrawPalette);
|
||||
|
||||
|
||||
void __RPC_STUB IDirectDrawMediaStream_SetFormat_Stub(
|
||||
IRpcStubBuffer *This,
|
||||
IRpcChannelBuffer *_pRpcChannelBuffer,
|
||||
PRPC_MESSAGE _pRpcMessage,
|
||||
DWORD *_pdwStubPhase);
|
||||
|
||||
|
||||
HRESULT STDMETHODCALLTYPE IDirectDrawMediaStream_GetDirectDraw_Proxy(
|
||||
IDirectDrawMediaStream * This,
|
||||
/* [out] */ IDirectDraw **ppDirectDraw);
|
||||
|
||||
|
||||
void __RPC_STUB IDirectDrawMediaStream_GetDirectDraw_Stub(
|
||||
IRpcStubBuffer *This,
|
||||
IRpcChannelBuffer *_pRpcChannelBuffer,
|
||||
PRPC_MESSAGE _pRpcMessage,
|
||||
DWORD *_pdwStubPhase);
|
||||
|
||||
|
||||
HRESULT STDMETHODCALLTYPE IDirectDrawMediaStream_SetDirectDraw_Proxy(
|
||||
IDirectDrawMediaStream * This,
|
||||
/* [in] */ IDirectDraw *pDirectDraw);
|
||||
|
||||
|
||||
void __RPC_STUB IDirectDrawMediaStream_SetDirectDraw_Stub(
|
||||
IRpcStubBuffer *This,
|
||||
IRpcChannelBuffer *_pRpcChannelBuffer,
|
||||
PRPC_MESSAGE _pRpcMessage,
|
||||
DWORD *_pdwStubPhase);
|
||||
|
||||
|
||||
HRESULT STDMETHODCALLTYPE IDirectDrawMediaStream_CreateSample_Proxy(
|
||||
IDirectDrawMediaStream * This,
|
||||
/* [in] */ IDirectDrawSurface *pSurface,
|
||||
/* [in] */ const RECT *pRect,
|
||||
/* [in] */ DWORD dwFlags,
|
||||
/* [out] */ IDirectDrawStreamSample **ppSample);
|
||||
|
||||
|
||||
void __RPC_STUB IDirectDrawMediaStream_CreateSample_Stub(
|
||||
IRpcStubBuffer *This,
|
||||
IRpcChannelBuffer *_pRpcChannelBuffer,
|
||||
PRPC_MESSAGE _pRpcMessage,
|
||||
DWORD *_pdwStubPhase);
|
||||
|
||||
|
||||
HRESULT STDMETHODCALLTYPE IDirectDrawMediaStream_GetTimePerFrame_Proxy(
|
||||
IDirectDrawMediaStream * This,
|
||||
/* [out] */ STREAM_TIME *pFrameTime);
|
||||
|
||||
|
||||
void __RPC_STUB IDirectDrawMediaStream_GetTimePerFrame_Stub(
|
||||
IRpcStubBuffer *This,
|
||||
IRpcChannelBuffer *_pRpcChannelBuffer,
|
||||
PRPC_MESSAGE _pRpcMessage,
|
||||
DWORD *_pdwStubPhase);
|
||||
|
||||
|
||||
|
||||
#endif /* __IDirectDrawMediaStream_INTERFACE_DEFINED__ */
|
||||
|
||||
|
||||
#ifndef __IDirectDrawStreamSample_INTERFACE_DEFINED__
|
||||
#define __IDirectDrawStreamSample_INTERFACE_DEFINED__
|
||||
|
||||
/* interface IDirectDrawStreamSample */
|
||||
/* [unique][uuid][local][object] */
|
||||
|
||||
|
||||
EXTERN_C const IID IID_IDirectDrawStreamSample;
|
||||
|
||||
#if defined(__cplusplus) && !defined(CINTERFACE)
|
||||
|
||||
MIDL_INTERFACE("F4104FCF-9A70-11d0-8FDE-00C04FD9189D")
|
||||
IDirectDrawStreamSample : public IStreamSample
|
||||
{
|
||||
public:
|
||||
virtual HRESULT STDMETHODCALLTYPE GetSurface(
|
||||
/* [out] */ IDirectDrawSurface **ppDirectDrawSurface,
|
||||
/* [out] */ RECT *pRect) = 0;
|
||||
|
||||
virtual HRESULT STDMETHODCALLTYPE SetRect(
|
||||
/* [in] */ const RECT *pRect) = 0;
|
||||
|
||||
};
|
||||
|
||||
#else /* C style interface */
|
||||
|
||||
typedef struct IDirectDrawStreamSampleVtbl
|
||||
{
|
||||
BEGIN_INTERFACE
|
||||
|
||||
HRESULT ( STDMETHODCALLTYPE *QueryInterface )(
|
||||
IDirectDrawStreamSample * This,
|
||||
/* [in] */ REFIID riid,
|
||||
/* [iid_is][out] */ void **ppvObject);
|
||||
|
||||
ULONG ( STDMETHODCALLTYPE *AddRef )(
|
||||
IDirectDrawStreamSample * This);
|
||||
|
||||
ULONG ( STDMETHODCALLTYPE *Release )(
|
||||
IDirectDrawStreamSample * This);
|
||||
|
||||
HRESULT ( STDMETHODCALLTYPE *GetMediaStream )(
|
||||
IDirectDrawStreamSample * This,
|
||||
/* [in] */ IMediaStream **ppMediaStream);
|
||||
|
||||
HRESULT ( STDMETHODCALLTYPE *GetSampleTimes )(
|
||||
IDirectDrawStreamSample * This,
|
||||
/* [out] */ STREAM_TIME *pStartTime,
|
||||
/* [out] */ STREAM_TIME *pEndTime,
|
||||
/* [out] */ STREAM_TIME *pCurrentTime);
|
||||
|
||||
HRESULT ( STDMETHODCALLTYPE *SetSampleTimes )(
|
||||
IDirectDrawStreamSample * This,
|
||||
/* [in] */ const STREAM_TIME *pStartTime,
|
||||
/* [in] */ const STREAM_TIME *pEndTime);
|
||||
|
||||
HRESULT ( STDMETHODCALLTYPE *Update )(
|
||||
IDirectDrawStreamSample * This,
|
||||
/* [in] */ DWORD dwFlags,
|
||||
/* [in] */ HANDLE hEvent,
|
||||
/* [in] */ PAPCFUNC pfnAPC,
|
||||
/* [in] */ DWORD_PTR dwAPCData);
|
||||
|
||||
HRESULT ( STDMETHODCALLTYPE *CompletionStatus )(
|
||||
IDirectDrawStreamSample * This,
|
||||
/* [in] */ DWORD dwFlags,
|
||||
/* [in] */ DWORD dwMilliseconds);
|
||||
|
||||
HRESULT ( STDMETHODCALLTYPE *GetSurface )(
|
||||
IDirectDrawStreamSample * This,
|
||||
/* [out] */ IDirectDrawSurface **ppDirectDrawSurface,
|
||||
/* [out] */ RECT *pRect);
|
||||
|
||||
HRESULT ( STDMETHODCALLTYPE *SetRect )(
|
||||
IDirectDrawStreamSample * This,
|
||||
/* [in] */ const RECT *pRect);
|
||||
|
||||
END_INTERFACE
|
||||
} IDirectDrawStreamSampleVtbl;
|
||||
|
||||
interface IDirectDrawStreamSample
|
||||
{
|
||||
CONST_VTBL struct IDirectDrawStreamSampleVtbl *lpVtbl;
|
||||
};
|
||||
|
||||
|
||||
|
||||
#ifdef COBJMACROS
|
||||
|
||||
|
||||
#define IDirectDrawStreamSample_QueryInterface(This,riid,ppvObject) \
|
||||
(This)->lpVtbl -> QueryInterface(This,riid,ppvObject)
|
||||
|
||||
#define IDirectDrawStreamSample_AddRef(This) \
|
||||
(This)->lpVtbl -> AddRef(This)
|
||||
|
||||
#define IDirectDrawStreamSample_Release(This) \
|
||||
(This)->lpVtbl -> Release(This)
|
||||
|
||||
|
||||
#define IDirectDrawStreamSample_GetMediaStream(This,ppMediaStream) \
|
||||
(This)->lpVtbl -> GetMediaStream(This,ppMediaStream)
|
||||
|
||||
#define IDirectDrawStreamSample_GetSampleTimes(This,pStartTime,pEndTime,pCurrentTime) \
|
||||
(This)->lpVtbl -> GetSampleTimes(This,pStartTime,pEndTime,pCurrentTime)
|
||||
|
||||
#define IDirectDrawStreamSample_SetSampleTimes(This,pStartTime,pEndTime) \
|
||||
(This)->lpVtbl -> SetSampleTimes(This,pStartTime,pEndTime)
|
||||
|
||||
#define IDirectDrawStreamSample_Update(This,dwFlags,hEvent,pfnAPC,dwAPCData) \
|
||||
(This)->lpVtbl -> Update(This,dwFlags,hEvent,pfnAPC,dwAPCData)
|
||||
|
||||
#define IDirectDrawStreamSample_CompletionStatus(This,dwFlags,dwMilliseconds) \
|
||||
(This)->lpVtbl -> CompletionStatus(This,dwFlags,dwMilliseconds)
|
||||
|
||||
|
||||
#define IDirectDrawStreamSample_GetSurface(This,ppDirectDrawSurface,pRect) \
|
||||
(This)->lpVtbl -> GetSurface(This,ppDirectDrawSurface,pRect)
|
||||
|
||||
#define IDirectDrawStreamSample_SetRect(This,pRect) \
|
||||
(This)->lpVtbl -> SetRect(This,pRect)
|
||||
|
||||
#endif /* COBJMACROS */
|
||||
|
||||
|
||||
#endif /* C style interface */
|
||||
|
||||
|
||||
|
||||
HRESULT STDMETHODCALLTYPE IDirectDrawStreamSample_GetSurface_Proxy(
|
||||
IDirectDrawStreamSample * This,
|
||||
/* [out] */ IDirectDrawSurface **ppDirectDrawSurface,
|
||||
/* [out] */ RECT *pRect);
|
||||
|
||||
|
||||
void __RPC_STUB IDirectDrawStreamSample_GetSurface_Stub(
|
||||
IRpcStubBuffer *This,
|
||||
IRpcChannelBuffer *_pRpcChannelBuffer,
|
||||
PRPC_MESSAGE _pRpcMessage,
|
||||
DWORD *_pdwStubPhase);
|
||||
|
||||
|
||||
HRESULT STDMETHODCALLTYPE IDirectDrawStreamSample_SetRect_Proxy(
|
||||
IDirectDrawStreamSample * This,
|
||||
/* [in] */ const RECT *pRect);
|
||||
|
||||
|
||||
void __RPC_STUB IDirectDrawStreamSample_SetRect_Stub(
|
||||
IRpcStubBuffer *This,
|
||||
IRpcChannelBuffer *_pRpcChannelBuffer,
|
||||
PRPC_MESSAGE _pRpcMessage,
|
||||
DWORD *_pdwStubPhase);
|
||||
|
||||
|
||||
|
||||
#endif /* __IDirectDrawStreamSample_INTERFACE_DEFINED__ */
|
||||
|
||||
|
||||
/* Additional Prototypes for ALL interfaces */
|
||||
|
||||
/* end of Additional Prototypes */
|
||||
|
||||
#ifdef __cplusplus
|
||||
}
|
||||
#endif
|
||||
|
||||
#endif
|
||||
|
||||
|
File diff suppressed because it is too large
Load Diff
|
@ -0,0 +1,739 @@
|
|||
/****************************************************************************
|
||||
*
|
||||
* Copyright (C) 1995-2000 Microsoft Corporation. All Rights Reserved.
|
||||
*
|
||||
* File: dinputd.h
|
||||
* Content: DirectInput include file for device driver implementors
|
||||
*
|
||||
****************************************************************************/
|
||||
#ifndef __DINPUTD_INCLUDED__
|
||||
#define __DINPUTD_INCLUDED__
|
||||
|
||||
#ifndef DIRECTINPUT_VERSION
|
||||
#define DIRECTINPUT_VERSION 0x0800
|
||||
#endif
|
||||
|
||||
#ifdef __cplusplus
|
||||
extern "C" {
|
||||
#endif
|
||||
|
||||
/****************************************************************************
|
||||
*
|
||||
* Interfaces
|
||||
*
|
||||
****************************************************************************/
|
||||
|
||||
#ifndef DIJ_RINGZERO
|
||||
|
||||
DEFINE_GUID(IID_IDirectInputEffectDriver, 0x02538130,0x898F,0x11D0,0x9A,0xD0,0x00,0xA0,0xC9,0xA0,0x6E,0x35);
|
||||
DEFINE_GUID(IID_IDirectInputJoyConfig, 0x1DE12AB1,0xC9F5,0x11CF,0xBF,0xC7,0x44,0x45,0x53,0x54,0x00,0x00);
|
||||
DEFINE_GUID(IID_IDirectInputPIDDriver, 0xEEC6993A,0xB3FD,0x11D2,0xA9,0x16,0x00,0xC0,0x4F,0xB9,0x86,0x38);
|
||||
|
||||
DEFINE_GUID(IID_IDirectInputJoyConfig8, 0xeb0d7dfa,0x1990,0x4f27,0xb4,0xd6,0xed,0xf2,0xee,0xc4,0xa4,0x4c);
|
||||
|
||||
#endif /* DIJ_RINGZERO */
|
||||
|
||||
|
||||
/****************************************************************************
|
||||
*
|
||||
* IDirectInputEffectDriver
|
||||
*
|
||||
****************************************************************************/
|
||||
|
||||
typedef struct DIOBJECTATTRIBUTES {
|
||||
DWORD dwFlags;
|
||||
WORD wUsagePage;
|
||||
WORD wUsage;
|
||||
} DIOBJECTATTRIBUTES, *LPDIOBJECTATTRIBUTES;
|
||||
typedef const DIOBJECTATTRIBUTES *LPCDIOBJECTATTRIBUTES;
|
||||
|
||||
typedef struct DIFFOBJECTATTRIBUTES {
|
||||
DWORD dwFFMaxForce;
|
||||
DWORD dwFFForceResolution;
|
||||
} DIFFOBJECTATTRIBUTES, *LPDIFFOBJECTATTRIBUTES;
|
||||
typedef const DIFFOBJECTATTRIBUTES *LPCDIFFOBJECTATTRIBUTES;
|
||||
|
||||
typedef struct DIOBJECTCALIBRATION {
|
||||
LONG lMin;
|
||||
LONG lCenter;
|
||||
LONG lMax;
|
||||
} DIOBJECTCALIBRATION, *LPDIOBJECTCALIBRATION;
|
||||
typedef const DIOBJECTCALIBRATION *LPCDIOBJECTCALIBRATION;
|
||||
|
||||
typedef struct DIEFFECTATTRIBUTES {
|
||||
DWORD dwEffectId;
|
||||
DWORD dwEffType;
|
||||
DWORD dwStaticParams;
|
||||
DWORD dwDynamicParams;
|
||||
DWORD dwCoords;
|
||||
} DIEFFECTATTRIBUTES, *LPDIEFFECTATTRIBUTES;
|
||||
typedef const DIEFFECTATTRIBUTES *LPCDIEFFECTATTRIBUTES;
|
||||
|
||||
typedef struct DIFFDEVICEATTRIBUTES {
|
||||
DWORD dwFlags;
|
||||
DWORD dwFFSamplePeriod;
|
||||
DWORD dwFFMinTimeResolution;
|
||||
} DIFFDEVICEATTRIBUTES, *LPDIFFDEVICEATTRIBUTES;
|
||||
typedef const DIFFDEVICEATTRIBUTES *LPCDIFFDEVICEATTRIBUTES;
|
||||
|
||||
typedef struct DIDRIVERVERSIONS {
|
||||
DWORD dwSize;
|
||||
DWORD dwFirmwareRevision;
|
||||
DWORD dwHardwareRevision;
|
||||
DWORD dwFFDriverVersion;
|
||||
} DIDRIVERVERSIONS, *LPDIDRIVERVERSIONS;
|
||||
typedef const DIDRIVERVERSIONS *LPCDIDRIVERVERSIONS;
|
||||
|
||||
typedef struct DIDEVICESTATE {
|
||||
DWORD dwSize;
|
||||
DWORD dwState;
|
||||
DWORD dwLoad;
|
||||
} DIDEVICESTATE, *LPDIDEVICESTATE;
|
||||
|
||||
#define DEV_STS_EFFECT_RUNNING DIEGES_PLAYING
|
||||
|
||||
#ifndef DIJ_RINGZERO
|
||||
|
||||
typedef struct DIHIDFFINITINFO {
|
||||
DWORD dwSize;
|
||||
LPWSTR pwszDeviceInterface;
|
||||
GUID GuidInstance;
|
||||
} DIHIDFFINITINFO, *LPDIHIDFFINITINFO;
|
||||
|
||||
#undef INTERFACE
|
||||
#define INTERFACE IDirectInputEffectDriver
|
||||
|
||||
DECLARE_INTERFACE_(IDirectInputEffectDriver, IUnknown)
|
||||
{
|
||||
/*** IUnknown methods ***/
|
||||
STDMETHOD(QueryInterface)(THIS_ REFIID riid, LPVOID * ppvObj) PURE;
|
||||
STDMETHOD_(ULONG,AddRef)(THIS) PURE;
|
||||
STDMETHOD_(ULONG,Release)(THIS) PURE;
|
||||
|
||||
/*** IDirectInputEffectDriver methods ***/
|
||||
STDMETHOD(DeviceID)(THIS_ DWORD,DWORD,DWORD,DWORD,LPVOID) PURE;
|
||||
STDMETHOD(GetVersions)(THIS_ LPDIDRIVERVERSIONS) PURE;
|
||||
STDMETHOD(Escape)(THIS_ DWORD,DWORD,LPDIEFFESCAPE) PURE;
|
||||
STDMETHOD(SetGain)(THIS_ DWORD,DWORD) PURE;
|
||||
STDMETHOD(SendForceFeedbackCommand)(THIS_ DWORD,DWORD) PURE;
|
||||
STDMETHOD(GetForceFeedbackState)(THIS_ DWORD,LPDIDEVICESTATE) PURE;
|
||||
STDMETHOD(DownloadEffect)(THIS_ DWORD,DWORD,LPDWORD,LPCDIEFFECT,DWORD) PURE;
|
||||
STDMETHOD(DestroyEffect)(THIS_ DWORD,DWORD) PURE;
|
||||
STDMETHOD(StartEffect)(THIS_ DWORD,DWORD,DWORD,DWORD) PURE;
|
||||
STDMETHOD(StopEffect)(THIS_ DWORD,DWORD) PURE;
|
||||
STDMETHOD(GetEffectStatus)(THIS_ DWORD,DWORD,LPDWORD) PURE;
|
||||
};
|
||||
|
||||
typedef struct IDirectInputEffectDriver *LPDIRECTINPUTEFFECTDRIVER;
|
||||
|
||||
#if !defined(__cplusplus) || defined(CINTERFACE)
|
||||
#define IDirectInputEffectDriver_QueryInterface(p,a,b) (p)->lpVtbl->QueryInterface(p,a,b)
|
||||
#define IDirectInputEffectDriver_AddRef(p) (p)->lpVtbl->AddRef(p)
|
||||
#define IDirectInputEffectDriver_Release(p) (p)->lpVtbl->Release(p)
|
||||
#define IDirectInputEffectDriver_DeviceID(p,a,b,c,d,e) (p)->lpVtbl->DeviceID(p,a,b,c,d,e)
|
||||
#define IDirectInputEffectDriver_GetVersions(p,a) (p)->lpVtbl->GetVersions(p,a)
|
||||
#define IDirectInputEffectDriver_Escape(p,a,b,c) (p)->lpVtbl->Escape(p,a,b,c)
|
||||
#define IDirectInputEffectDriver_SetGain(p,a,b) (p)->lpVtbl->SetGain(p,a,b)
|
||||
#define IDirectInputEffectDriver_SendForceFeedbackCommand(p,a,b) (p)->lpVtbl->SendForceFeedbackCommand(p,a,b)
|
||||
#define IDirectInputEffectDriver_GetForceFeedbackState(p,a,b) (p)->lpVtbl->GetForceFeedbackState(p,a,b)
|
||||
#define IDirectInputEffectDriver_DownloadEffect(p,a,b,c,d,e) (p)->lpVtbl->DownloadEffect(p,a,b,c,d,e)
|
||||
#define IDirectInputEffectDriver_DestroyEffect(p,a,b) (p)->lpVtbl->DestroyEffect(p,a,b)
|
||||
#define IDirectInputEffectDriver_StartEffect(p,a,b,c,d) (p)->lpVtbl->StartEffect(p,a,b,c,d)
|
||||
#define IDirectInputEffectDriver_StopEffect(p,a,b) (p)->lpVtbl->StopEffect(p,a,b)
|
||||
#define IDirectInputEffectDriver_GetEffectStatus(p,a,b,c) (p)->lpVtbl->GetEffectStatus(p,a,b,c)
|
||||
#else
|
||||
#define IDirectInputEffectDriver_QueryInterface(p,a,b) (p)->QueryInterface(a,b)
|
||||
#define IDirectInputEffectDriver_AddRef(p) (p)->AddRef()
|
||||
#define IDirectInputEffectDriver_Release(p) (p)->Release()
|
||||
#define IDirectInputEffectDriver_DeviceID(p,a,b,c,d,e) (p)->DeviceID(a,b,c,d,e)
|
||||
#define IDirectInputEffectDriver_GetVersions(p,a) (p)->GetVersions(a)
|
||||
#define IDirectInputEffectDriver_Escape(p,a,b,c) (p)->Escape(a,b,c)
|
||||
#define IDirectInputEffectDriver_SetGain(p,a,b) (p)->SetGain(a,b)
|
||||
#define IDirectInputEffectDriver_SendForceFeedbackCommand(p,a,b) (p)->SendForceFeedbackCommand(a,b)
|
||||
#define IDirectInputEffectDriver_GetForceFeedbackState(p,a,b) (p)->GetForceFeedbackState(a,b)
|
||||
#define IDirectInputEffectDriver_DownloadEffect(p,a,b,c,d,e) (p)->DownloadEffect(a,b,c,d,e)
|
||||
#define IDirectInputEffectDriver_DestroyEffect(p,a,b) (p)->DestroyEffect(a,b)
|
||||
#define IDirectInputEffectDriver_StartEffect(p,a,b,c,d) (p)->StartEffect(a,b,c,d)
|
||||
#define IDirectInputEffectDriver_StopEffect(p,a,b) (p)->StopEffect(a,b)
|
||||
#define IDirectInputEffectDriver_GetEffectStatus(p,a,b,c) (p)->GetEffectStatus(a,b,c)
|
||||
#endif
|
||||
|
||||
|
||||
#endif /* DIJ_RINGZERO */
|
||||
|
||||
|
||||
/****************************************************************************
|
||||
*
|
||||
* IDirectInputJoyConfig
|
||||
*
|
||||
****************************************************************************/
|
||||
|
||||
/****************************************************************************
|
||||
*
|
||||
* Definitions copied from the DDK
|
||||
*
|
||||
****************************************************************************/
|
||||
|
||||
#ifndef JOY_HW_NONE
|
||||
|
||||
/* pre-defined joystick types */
|
||||
#define JOY_HW_NONE 0
|
||||
#define JOY_HW_CUSTOM 1
|
||||
#define JOY_HW_2A_2B_GENERIC 2
|
||||
#define JOY_HW_2A_4B_GENERIC 3
|
||||
#define JOY_HW_2B_GAMEPAD 4
|
||||
#define JOY_HW_2B_FLIGHTYOKE 5
|
||||
#define JOY_HW_2B_FLIGHTYOKETHROTTLE 6
|
||||
#define JOY_HW_3A_2B_GENERIC 7
|
||||
#define JOY_HW_3A_4B_GENERIC 8
|
||||
#define JOY_HW_4B_GAMEPAD 9
|
||||
#define JOY_HW_4B_FLIGHTYOKE 10
|
||||
#define JOY_HW_4B_FLIGHTYOKETHROTTLE 11
|
||||
#define JOY_HW_TWO_2A_2B_WITH_Y 12
|
||||
#define JOY_HW_LASTENTRY 13
|
||||
|
||||
|
||||
/* calibration flags */
|
||||
#define JOY_ISCAL_XY 0x00000001l /* XY are calibrated */
|
||||
#define JOY_ISCAL_Z 0x00000002l /* Z is calibrated */
|
||||
#define JOY_ISCAL_R 0x00000004l /* R is calibrated */
|
||||
#define JOY_ISCAL_U 0x00000008l /* U is calibrated */
|
||||
#define JOY_ISCAL_V 0x00000010l /* V is calibrated */
|
||||
#define JOY_ISCAL_POV 0x00000020l /* POV is calibrated */
|
||||
|
||||
/* point of view constants */
|
||||
#define JOY_POV_NUMDIRS 4
|
||||
#define JOY_POVVAL_FORWARD 0
|
||||
#define JOY_POVVAL_BACKWARD 1
|
||||
#define JOY_POVVAL_LEFT 2
|
||||
#define JOY_POVVAL_RIGHT 3
|
||||
|
||||
/* Specific settings for joystick hardware */
|
||||
#define JOY_HWS_HASZ 0x00000001l /* has Z info? */
|
||||
#define JOY_HWS_HASPOV 0x00000002l /* point of view hat present */
|
||||
#define JOY_HWS_POVISBUTTONCOMBOS 0x00000004l /* pov done through combo of buttons */
|
||||
#define JOY_HWS_POVISPOLL 0x00000008l /* pov done through polling */
|
||||
#define JOY_HWS_ISYOKE 0x00000010l /* joystick is a flight yoke */
|
||||
#define JOY_HWS_ISGAMEPAD 0x00000020l /* joystick is a game pad */
|
||||
#define JOY_HWS_ISCARCTRL 0x00000040l /* joystick is a car controller */
|
||||
/* X defaults to J1 X axis */
|
||||
#define JOY_HWS_XISJ1Y 0x00000080l /* X is on J1 Y axis */
|
||||
#define JOY_HWS_XISJ2X 0x00000100l /* X is on J2 X axis */
|
||||
#define JOY_HWS_XISJ2Y 0x00000200l /* X is on J2 Y axis */
|
||||
/* Y defaults to J1 Y axis */
|
||||
#define JOY_HWS_YISJ1X 0x00000400l /* Y is on J1 X axis */
|
||||
#define JOY_HWS_YISJ2X 0x00000800l /* Y is on J2 X axis */
|
||||
#define JOY_HWS_YISJ2Y 0x00001000l /* Y is on J2 Y axis */
|
||||
/* Z defaults to J2 Y axis */
|
||||
#define JOY_HWS_ZISJ1X 0x00002000l /* Z is on J1 X axis */
|
||||
#define JOY_HWS_ZISJ1Y 0x00004000l /* Z is on J1 Y axis */
|
||||
#define JOY_HWS_ZISJ2X 0x00008000l /* Z is on J2 X axis */
|
||||
/* POV defaults to J2 Y axis, if it is not button based */
|
||||
#define JOY_HWS_POVISJ1X 0x00010000l /* pov done through J1 X axis */
|
||||
#define JOY_HWS_POVISJ1Y 0x00020000l /* pov done through J1 Y axis */
|
||||
#define JOY_HWS_POVISJ2X 0x00040000l /* pov done through J2 X axis */
|
||||
/* R defaults to J2 X axis */
|
||||
#define JOY_HWS_HASR 0x00080000l /* has R (4th axis) info */
|
||||
#define JOY_HWS_RISJ1X 0x00100000l /* R done through J1 X axis */
|
||||
#define JOY_HWS_RISJ1Y 0x00200000l /* R done through J1 Y axis */
|
||||
#define JOY_HWS_RISJ2Y 0x00400000l /* R done through J2 X axis */
|
||||
/* U & V for future hardware */
|
||||
#define JOY_HWS_HASU 0x00800000l /* has U (5th axis) info */
|
||||
#define JOY_HWS_HASV 0x01000000l /* has V (6th axis) info */
|
||||
|
||||
/* Usage settings */
|
||||
#define JOY_US_HASRUDDER 0x00000001l /* joystick configured with rudder */
|
||||
#define JOY_US_PRESENT 0x00000002l /* is joystick actually present? */
|
||||
#define JOY_US_ISOEM 0x00000004l /* joystick is an OEM defined type */
|
||||
|
||||
/* reserved for future use -> as link to next possible dword */
|
||||
#define JOY_US_RESERVED 0x80000000l /* reserved */
|
||||
|
||||
|
||||
/* Settings for TypeInfo Flags1 */
|
||||
#define JOYTYPE_ZEROGAMEENUMOEMDATA 0x00000001l /* Zero GameEnum's OEM data field */
|
||||
#define JOYTYPE_NOAUTODETECTGAMEPORT 0x00000002l /* Device does not support Autodetect gameport*/
|
||||
#define JOYTYPE_NOHIDDIRECT 0x00000004l /* Do not use HID directly for this device */
|
||||
#define JOYTYPE_DEFAULTPROPSHEET 0x80000000l /* CPL overrides custom property sheet */
|
||||
|
||||
/* Settings for TypeInfo Flags2 */
|
||||
#define JOYTYPE_DEVICEHIDE 0x00010000l /* Hide unclassified devices */
|
||||
#define JOYTYPE_MOUSEHIDE 0x00020000l /* Hide mice */
|
||||
#define JOYTYPE_KEYBHIDE 0x00040000l /* Hide keyboards */
|
||||
#define JOYTYPE_GAMEHIDE 0x00080000l /* Hide game controllers */
|
||||
#define JOYTYPE_HIDEACTIVE 0x00100000l /* Hide flags are active */
|
||||
#define JOYTYPE_INFOMASK 0x00E00000l /* Mask for type specific info */
|
||||
#define JOYTYPE_INFODEFAULT 0x00000000l /* Use default axis mappings */
|
||||
#define JOYTYPE_INFOYYPEDALS 0x00200000l /* Use Y as a combined pedals axis */
|
||||
#define JOYTYPE_INFOZYPEDALS 0x00400000l /* Use Z for accelerate, Y for brake */
|
||||
#define JOYTYPE_INFOYRPEDALS 0x00600000l /* Use Y for accelerate, R for brake */
|
||||
#define JOYTYPE_INFOZRPEDALS 0x00800000l /* Use Z for accelerate, R for brake */
|
||||
#define JOYTYPE_INFOZISSLIDER 0x00200000l /* Use Z as a slider */
|
||||
#define JOYTYPE_INFOZISZ 0x00400000l /* Use Z as Z axis */
|
||||
|
||||
/* struct for storing x,y, z, and rudder values */
|
||||
typedef struct joypos_tag {
|
||||
DWORD dwX;
|
||||
DWORD dwY;
|
||||
DWORD dwZ;
|
||||
DWORD dwR;
|
||||
DWORD dwU;
|
||||
DWORD dwV;
|
||||
} JOYPOS, FAR *LPJOYPOS;
|
||||
|
||||
/* struct for storing ranges */
|
||||
typedef struct joyrange_tag {
|
||||
JOYPOS jpMin;
|
||||
JOYPOS jpMax;
|
||||
JOYPOS jpCenter;
|
||||
} JOYRANGE,FAR *LPJOYRANGE;
|
||||
|
||||
/*
|
||||
* dwTimeout - value at which to timeout joystick polling
|
||||
* jrvRanges - range of values app wants returned for axes
|
||||
* jpDeadZone - area around center to be considered
|
||||
* as "dead". specified as a percentage
|
||||
* (0-100). Only X & Y handled by system driver
|
||||
*/
|
||||
typedef struct joyreguservalues_tag {
|
||||
DWORD dwTimeOut;
|
||||
JOYRANGE jrvRanges;
|
||||
JOYPOS jpDeadZone;
|
||||
} JOYREGUSERVALUES, FAR *LPJOYREGUSERVALUES;
|
||||
|
||||
typedef struct joyreghwsettings_tag {
|
||||
DWORD dwFlags;
|
||||
DWORD dwNumButtons;
|
||||
} JOYREGHWSETTINGS, FAR *LPJOYHWSETTINGS;
|
||||
|
||||
/* range of values returned by the hardware (filled in by calibration) */
|
||||
/*
|
||||
* jrvHardware - values returned by hardware
|
||||
* dwPOVValues - POV values returned by hardware
|
||||
* dwCalFlags - what has been calibrated
|
||||
*/
|
||||
typedef struct joyreghwvalues_tag {
|
||||
JOYRANGE jrvHardware;
|
||||
DWORD dwPOVValues[JOY_POV_NUMDIRS];
|
||||
DWORD dwCalFlags;
|
||||
} JOYREGHWVALUES, FAR *LPJOYREGHWVALUES;
|
||||
|
||||
/* hardware configuration */
|
||||
/*
|
||||
* hws - hardware settings
|
||||
* dwUsageSettings - usage settings
|
||||
* hwv - values returned by hardware
|
||||
* dwType - type of joystick
|
||||
* dwReserved - reserved for OEM drivers
|
||||
*/
|
||||
typedef struct joyreghwconfig_tag {
|
||||
JOYREGHWSETTINGS hws;
|
||||
DWORD dwUsageSettings;
|
||||
JOYREGHWVALUES hwv;
|
||||
DWORD dwType;
|
||||
DWORD dwReserved;
|
||||
} JOYREGHWCONFIG, FAR *LPJOYREGHWCONFIG;
|
||||
|
||||
/* joystick calibration info structure */
|
||||
typedef struct joycalibrate_tag {
|
||||
UINT wXbase;
|
||||
UINT wXdelta;
|
||||
UINT wYbase;
|
||||
UINT wYdelta;
|
||||
UINT wZbase;
|
||||
UINT wZdelta;
|
||||
} JOYCALIBRATE;
|
||||
typedef JOYCALIBRATE FAR *LPJOYCALIBRATE;
|
||||
|
||||
#endif
|
||||
|
||||
#ifndef DIJ_RINGZERO
|
||||
|
||||
#define MAX_JOYSTRING 256
|
||||
typedef BOOL (FAR PASCAL * LPDIJOYTYPECALLBACK)(LPCWSTR, LPVOID);
|
||||
|
||||
#ifndef MAX_JOYSTICKOEMVXDNAME
|
||||
#define MAX_JOYSTICKOEMVXDNAME 260
|
||||
#endif
|
||||
|
||||
#define DITC_REGHWSETTINGS 0x00000001
|
||||
#define DITC_CLSIDCONFIG 0x00000002
|
||||
#define DITC_DISPLAYNAME 0x00000004
|
||||
#define DITC_CALLOUT 0x00000008
|
||||
#define DITC_HARDWAREID 0x00000010
|
||||
#define DITC_FLAGS1 0x00000020
|
||||
#define DITC_FLAGS2 0x00000040
|
||||
#define DITC_MAPFILE 0x00000080
|
||||
|
||||
|
||||
|
||||
/* This structure is defined for DirectX 5.0 compatibility */
|
||||
|
||||
typedef struct DIJOYTYPEINFO_DX5 {
|
||||
DWORD dwSize;
|
||||
JOYREGHWSETTINGS hws;
|
||||
CLSID clsidConfig;
|
||||
WCHAR wszDisplayName[MAX_JOYSTRING];
|
||||
WCHAR wszCallout[MAX_JOYSTICKOEMVXDNAME];
|
||||
} DIJOYTYPEINFO_DX5, *LPDIJOYTYPEINFO_DX5;
|
||||
typedef const DIJOYTYPEINFO_DX5 *LPCDIJOYTYPEINFO_DX5;
|
||||
|
||||
/* This structure is defined for DirectX 6.1 compatibility */
|
||||
typedef struct DIJOYTYPEINFO_DX6 {
|
||||
DWORD dwSize;
|
||||
JOYREGHWSETTINGS hws;
|
||||
CLSID clsidConfig;
|
||||
WCHAR wszDisplayName[MAX_JOYSTRING];
|
||||
WCHAR wszCallout[MAX_JOYSTICKOEMVXDNAME];
|
||||
WCHAR wszHardwareId[MAX_JOYSTRING];
|
||||
DWORD dwFlags1;
|
||||
} DIJOYTYPEINFO_DX6, *LPDIJOYTYPEINFO_DX6;
|
||||
typedef const DIJOYTYPEINFO_DX6 *LPCDIJOYTYPEINFO_DX6;
|
||||
|
||||
typedef struct DIJOYTYPEINFO {
|
||||
DWORD dwSize;
|
||||
JOYREGHWSETTINGS hws;
|
||||
CLSID clsidConfig;
|
||||
WCHAR wszDisplayName[MAX_JOYSTRING];
|
||||
WCHAR wszCallout[MAX_JOYSTICKOEMVXDNAME];
|
||||
#if(DIRECTINPUT_VERSION >= 0x05b2)
|
||||
WCHAR wszHardwareId[MAX_JOYSTRING];
|
||||
DWORD dwFlags1;
|
||||
#if(DIRECTINPUT_VERSION >= 0x0800)
|
||||
DWORD dwFlags2;
|
||||
WCHAR wszMapFile[MAX_JOYSTRING];
|
||||
#endif /* DIRECTINPUT_VERSION >= 0x0800 */
|
||||
#endif /* DIRECTINPUT_VERSION >= 0x05b2 */
|
||||
} DIJOYTYPEINFO, *LPDIJOYTYPEINFO;
|
||||
typedef const DIJOYTYPEINFO *LPCDIJOYTYPEINFO;
|
||||
#define DIJC_GUIDINSTANCE 0x00000001
|
||||
#define DIJC_REGHWCONFIGTYPE 0x00000002
|
||||
#define DIJC_GAIN 0x00000004
|
||||
#define DIJC_CALLOUT 0x00000008
|
||||
#define DIJC_WDMGAMEPORT 0x00000010
|
||||
|
||||
/* This structure is defined for DirectX 5.0 compatibility */
|
||||
|
||||
typedef struct DIJOYCONFIG_DX5 {
|
||||
DWORD dwSize;
|
||||
GUID guidInstance;
|
||||
JOYREGHWCONFIG hwc;
|
||||
DWORD dwGain;
|
||||
WCHAR wszType[MAX_JOYSTRING];
|
||||
WCHAR wszCallout[MAX_JOYSTRING];
|
||||
} DIJOYCONFIG_DX5, *LPDIJOYCONFIG_DX5;
|
||||
typedef const DIJOYCONFIG_DX5 *LPCDIJOYCONFIG_DX5;
|
||||
|
||||
typedef struct DIJOYCONFIG {
|
||||
DWORD dwSize;
|
||||
GUID guidInstance;
|
||||
JOYREGHWCONFIG hwc;
|
||||
DWORD dwGain;
|
||||
WCHAR wszType[MAX_JOYSTRING];
|
||||
WCHAR wszCallout[MAX_JOYSTRING];
|
||||
#if(DIRECTINPUT_VERSION >= 0x05b2)
|
||||
GUID guidGameport;
|
||||
#endif /* DIRECTINPUT_VERSION >= 0x05b2 */
|
||||
} DIJOYCONFIG, *LPDIJOYCONFIG;
|
||||
typedef const DIJOYCONFIG *LPCDIJOYCONFIG;
|
||||
|
||||
|
||||
#define DIJU_USERVALUES 0x00000001
|
||||
#define DIJU_GLOBALDRIVER 0x00000002
|
||||
#define DIJU_GAMEPORTEMULATOR 0x00000004
|
||||
|
||||
typedef struct DIJOYUSERVALUES {
|
||||
DWORD dwSize;
|
||||
JOYREGUSERVALUES ruv;
|
||||
WCHAR wszGlobalDriver[MAX_JOYSTRING];
|
||||
WCHAR wszGameportEmulator[MAX_JOYSTRING];
|
||||
} DIJOYUSERVALUES, *LPDIJOYUSERVALUES;
|
||||
typedef const DIJOYUSERVALUES *LPCDIJOYUSERVALUES;
|
||||
|
||||
DEFINE_GUID(GUID_KeyboardClass, 0x4D36E96B,0xE325,0x11CE,0xBF,0xC1,0x08,0x00,0x2B,0xE1,0x03,0x18);
|
||||
DEFINE_GUID(GUID_MediaClass, 0x4D36E96C,0xE325,0x11CE,0xBF,0xC1,0x08,0x00,0x2B,0xE1,0x03,0x18);
|
||||
DEFINE_GUID(GUID_MouseClass, 0x4D36E96F,0xE325,0x11CE,0xBF,0xC1,0x08,0x00,0x2B,0xE1,0x03,0x18);
|
||||
DEFINE_GUID(GUID_HIDClass, 0x745A17A0,0x74D3,0x11D0,0xB6,0xFE,0x00,0xA0,0xC9,0x0F,0x57,0xDA);
|
||||
|
||||
#undef INTERFACE
|
||||
#define INTERFACE IDirectInputJoyConfig
|
||||
|
||||
DECLARE_INTERFACE_(IDirectInputJoyConfig, IUnknown)
|
||||
{
|
||||
/*** IUnknown methods ***/
|
||||
STDMETHOD(QueryInterface)(THIS_ REFIID riid, LPVOID * ppvObj) PURE;
|
||||
STDMETHOD_(ULONG,AddRef)(THIS) PURE;
|
||||
STDMETHOD_(ULONG,Release)(THIS) PURE;
|
||||
|
||||
/*** IDirectInputJoyConfig methods ***/
|
||||
STDMETHOD(Acquire)(THIS) PURE;
|
||||
STDMETHOD(Unacquire)(THIS) PURE;
|
||||
STDMETHOD(SetCooperativeLevel)(THIS_ HWND,DWORD) PURE;
|
||||
STDMETHOD(SendNotify)(THIS) PURE;
|
||||
STDMETHOD(EnumTypes)(THIS_ LPDIJOYTYPECALLBACK,LPVOID) PURE;
|
||||
STDMETHOD(GetTypeInfo)(THIS_ LPCWSTR,LPDIJOYTYPEINFO,DWORD) PURE;
|
||||
STDMETHOD(SetTypeInfo)(THIS_ LPCWSTR,LPCDIJOYTYPEINFO,DWORD) PURE;
|
||||
STDMETHOD(DeleteType)(THIS_ LPCWSTR) PURE;
|
||||
STDMETHOD(GetConfig)(THIS_ UINT,LPDIJOYCONFIG,DWORD) PURE;
|
||||
STDMETHOD(SetConfig)(THIS_ UINT,LPCDIJOYCONFIG,DWORD) PURE;
|
||||
STDMETHOD(DeleteConfig)(THIS_ UINT) PURE;
|
||||
STDMETHOD(GetUserValues)(THIS_ LPDIJOYUSERVALUES,DWORD) PURE;
|
||||
STDMETHOD(SetUserValues)(THIS_ LPCDIJOYUSERVALUES,DWORD) PURE;
|
||||
STDMETHOD(AddNewHardware)(THIS_ HWND,REFGUID) PURE;
|
||||
STDMETHOD(OpenTypeKey)(THIS_ LPCWSTR,DWORD,PHKEY) PURE;
|
||||
STDMETHOD(OpenConfigKey)(THIS_ UINT,DWORD,PHKEY) PURE;
|
||||
};
|
||||
|
||||
typedef struct IDirectInputJoyConfig *LPDIRECTINPUTJOYCONFIG;
|
||||
|
||||
#if !defined(__cplusplus) || defined(CINTERFACE)
|
||||
#define IDirectInputJoyConfig_QueryInterface(p,a,b) (p)->lpVtbl->QueryInterface(p,a,b)
|
||||
#define IDirectInputJoyConfig_AddRef(p) (p)->lpVtbl->AddRef(p)
|
||||
#define IDirectInputJoyConfig_Release(p) (p)->lpVtbl->Release(p)
|
||||
#define IDirectInputJoyConfig_Acquire(p) (p)->lpVtbl->Acquire(p)
|
||||
#define IDirectInputJoyConfig_Unacquire(p) (p)->lpVtbl->Unacquire(p)
|
||||
#define IDirectInputJoyConfig_SetCooperativeLevel(p,a,b) (p)->lpVtbl->SetCooperativeLevel(p,a,b)
|
||||
#define IDirectInputJoyConfig_SendNotify(p) (p)->lpVtbl->SendNotify(p)
|
||||
#define IDirectInputJoyConfig_EnumTypes(p,a,b) (p)->lpVtbl->EnumTypes(p,a,b)
|
||||
#define IDirectInputJoyConfig_GetTypeInfo(p,a,b,c) (p)->lpVtbl->GetTypeInfo(p,a,b,c)
|
||||
#define IDirectInputJoyConfig_SetTypeInfo(p,a,b,c) (p)->lpVtbl->SetTypeInfo(p,a,b,c)
|
||||
#define IDirectInputJoyConfig_DeleteType(p,a) (p)->lpVtbl->DeleteType(p,a)
|
||||
#define IDirectInputJoyConfig_GetConfig(p,a,b,c) (p)->lpVtbl->GetConfig(p,a,b,c)
|
||||
#define IDirectInputJoyConfig_SetConfig(p,a,b,c) (p)->lpVtbl->SetConfig(p,a,b,c)
|
||||
#define IDirectInputJoyConfig_DeleteConfig(p,a) (p)->lpVtbl->DeleteConfig(p,a)
|
||||
#define IDirectInputJoyConfig_GetUserValues(p,a,b) (p)->lpVtbl->GetUserValues(p,a,b)
|
||||
#define IDirectInputJoyConfig_SetUserValues(p,a,b) (p)->lpVtbl->SetUserValues(p,a,b)
|
||||
#define IDirectInputJoyConfig_AddNewHardware(p,a,b) (p)->lpVtbl->AddNewHardware(p,a,b)
|
||||
#define IDirectInputJoyConfig_OpenTypeKey(p,a,b,c) (p)->lpVtbl->OpenTypeKey(p,a,b,c)
|
||||
#define IDirectInputJoyConfig_OpenConfigKey(p,a,b,c) (p)->lpVtbl->OpenConfigKey(p,a,b,c)
|
||||
#else
|
||||
#define IDirectInputJoyConfig_QueryInterface(p,a,b) (p)->QueryInterface(a,b)
|
||||
#define IDirectInputJoyConfig_AddRef(p) (p)->AddRef()
|
||||
#define IDirectInputJoyConfig_Release(p) (p)->Release()
|
||||
#define IDirectInputJoyConfig_Acquire(p) (p)->Acquire()
|
||||
#define IDirectInputJoyConfig_Unacquire(p) (p)->Unacquire()
|
||||
#define IDirectInputJoyConfig_SetCooperativeLevel(p,a,b) (p)->SetCooperativeLevel(a,b)
|
||||
#define IDirectInputJoyConfig_SendNotify(p) (p)->SendNotify()
|
||||
#define IDirectInputJoyConfig_EnumTypes(p,a,b) (p)->EnumTypes(a,b)
|
||||
#define IDirectInputJoyConfig_GetTypeInfo(p,a,b,c) (p)->GetTypeInfo(a,b,c)
|
||||
#define IDirectInputJoyConfig_SetTypeInfo(p,a,b,c) (p)->SetTypeInfo(a,b,c)
|
||||
#define IDirectInputJoyConfig_DeleteType(p,a) (p)->DeleteType(a)
|
||||
#define IDirectInputJoyConfig_GetConfig(p,a,b,c) (p)->GetConfig(a,b,c)
|
||||
#define IDirectInputJoyConfig_SetConfig(p,a,b,c) (p)->SetConfig(a,b,c)
|
||||
#define IDirectInputJoyConfig_DeleteConfig(p,a) (p)->DeleteConfig(a)
|
||||
#define IDirectInputJoyConfig_GetUserValues(p,a,b) (p)->GetUserValues(a,b)
|
||||
#define IDirectInputJoyConfig_SetUserValues(p,a,b) (p)->SetUserValues(a,b)
|
||||
#define IDirectInputJoyConfig_AddNewHardware(p,a,b) (p)->AddNewHardware(a,b)
|
||||
#define IDirectInputJoyConfig_OpenTypeKey(p,a,b,c) (p)->OpenTypeKey(a,b,c)
|
||||
#define IDirectInputJoyConfig_OpenConfigKey(p,a,b,c) (p)->OpenConfigKey(a,b,c)
|
||||
#endif
|
||||
|
||||
#endif /* DIJ_RINGZERO */
|
||||
|
||||
#if(DIRECTINPUT_VERSION >= 0x0800)
|
||||
|
||||
#ifndef DIJ_RINGZERO
|
||||
|
||||
#undef INTERFACE
|
||||
#define INTERFACE IDirectInputJoyConfig8
|
||||
|
||||
DECLARE_INTERFACE_(IDirectInputJoyConfig8, IUnknown)
|
||||
{
|
||||
/*** IUnknown methods ***/
|
||||
STDMETHOD(QueryInterface)(THIS_ REFIID riid, LPVOID * ppvObj) PURE;
|
||||
STDMETHOD_(ULONG,AddRef)(THIS) PURE;
|
||||
STDMETHOD_(ULONG,Release)(THIS) PURE;
|
||||
|
||||
/*** IDirectInputJoyConfig8 methods ***/
|
||||
STDMETHOD(Acquire)(THIS) PURE;
|
||||
STDMETHOD(Unacquire)(THIS) PURE;
|
||||
STDMETHOD(SetCooperativeLevel)(THIS_ HWND,DWORD) PURE;
|
||||
STDMETHOD(SendNotify)(THIS) PURE;
|
||||
STDMETHOD(EnumTypes)(THIS_ LPDIJOYTYPECALLBACK,LPVOID) PURE;
|
||||
STDMETHOD(GetTypeInfo)(THIS_ LPCWSTR,LPDIJOYTYPEINFO,DWORD) PURE;
|
||||
STDMETHOD(SetTypeInfo)(THIS_ LPCWSTR,LPCDIJOYTYPEINFO,DWORD,LPWSTR) PURE;
|
||||
STDMETHOD(DeleteType)(THIS_ LPCWSTR) PURE;
|
||||
STDMETHOD(GetConfig)(THIS_ UINT,LPDIJOYCONFIG,DWORD) PURE;
|
||||
STDMETHOD(SetConfig)(THIS_ UINT,LPCDIJOYCONFIG,DWORD) PURE;
|
||||
STDMETHOD(DeleteConfig)(THIS_ UINT) PURE;
|
||||
STDMETHOD(GetUserValues)(THIS_ LPDIJOYUSERVALUES,DWORD) PURE;
|
||||
STDMETHOD(SetUserValues)(THIS_ LPCDIJOYUSERVALUES,DWORD) PURE;
|
||||
STDMETHOD(AddNewHardware)(THIS_ HWND,REFGUID) PURE;
|
||||
STDMETHOD(OpenTypeKey)(THIS_ LPCWSTR,DWORD,PHKEY) PURE;
|
||||
STDMETHOD(OpenAppStatusKey)(THIS_ PHKEY) PURE;
|
||||
};
|
||||
|
||||
typedef struct IDirectInputJoyConfig8 *LPDIRECTINPUTJOYCONFIG8;
|
||||
|
||||
#if !defined(__cplusplus) || defined(CINTERFACE)
|
||||
#define IDirectInputJoyConfig8_QueryInterface(p,a,b) (p)->lpVtbl->QueryInterface(p,a,b)
|
||||
#define IDirectInputJoyConfig8_AddRef(p) (p)->lpVtbl->AddRef(p)
|
||||
#define IDirectInputJoyConfig8_Release(p) (p)->lpVtbl->Release(p)
|
||||
#define IDirectInputJoyConfig8_Acquire(p) (p)->lpVtbl->Acquire(p)
|
||||
#define IDirectInputJoyConfig8_Unacquire(p) (p)->lpVtbl->Unacquire(p)
|
||||
#define IDirectInputJoyConfig8_SetCooperativeLevel(p,a,b) (p)->lpVtbl->SetCooperativeLevel(p,a,b)
|
||||
#define IDirectInputJoyConfig8_SendNotify(p) (p)->lpVtbl->SendNotify(p)
|
||||
#define IDirectInputJoyConfig8_EnumTypes(p,a,b) (p)->lpVtbl->EnumTypes(p,a,b)
|
||||
#define IDirectInputJoyConfig8_GetTypeInfo(p,a,b,c) (p)->lpVtbl->GetTypeInfo(p,a,b,c)
|
||||
#define IDirectInputJoyConfig8_SetTypeInfo(p,a,b,c,d) (p)->lpVtbl->SetTypeInfo(p,a,b,c,d)
|
||||
#define IDirectInputJoyConfig8_DeleteType(p,a) (p)->lpVtbl->DeleteType(p,a)
|
||||
#define IDirectInputJoyConfig8_GetConfig(p,a,b,c) (p)->lpVtbl->GetConfig(p,a,b,c)
|
||||
#define IDirectInputJoyConfig8_SetConfig(p,a,b,c) (p)->lpVtbl->SetConfig(p,a,b,c)
|
||||
#define IDirectInputJoyConfig8_DeleteConfig(p,a) (p)->lpVtbl->DeleteConfig(p,a)
|
||||
#define IDirectInputJoyConfig8_GetUserValues(p,a,b) (p)->lpVtbl->GetUserValues(p,a,b)
|
||||
#define IDirectInputJoyConfig8_SetUserValues(p,a,b) (p)->lpVtbl->SetUserValues(p,a,b)
|
||||
#define IDirectInputJoyConfig8_AddNewHardware(p,a,b) (p)->lpVtbl->AddNewHardware(p,a,b)
|
||||
#define IDirectInputJoyConfig8_OpenTypeKey(p,a,b,c) (p)->lpVtbl->OpenTypeKey(p,a,b,c)
|
||||
#define IDirectInputJoyConfig8_OpenAppStatusKey(p,a) (p)->lpVtbl->OpenAppStatusKey(p,a)
|
||||
#else
|
||||
#define IDirectInputJoyConfig8_QueryInterface(p,a,b) (p)->QueryInterface(a,b)
|
||||
#define IDirectInputJoyConfig8_AddRef(p) (p)->AddRef()
|
||||
#define IDirectInputJoyConfig8_Release(p) (p)->Release()
|
||||
#define IDirectInputJoyConfig8_Acquire(p) (p)->Acquire()
|
||||
#define IDirectInputJoyConfig8_Unacquire(p) (p)->Unacquire()
|
||||
#define IDirectInputJoyConfig8_SetCooperativeLevel(p,a,b) (p)->SetCooperativeLevel(a,b)
|
||||
#define IDirectInputJoyConfig8_SendNotify(p) (p)->SendNotify()
|
||||
#define IDirectInputJoyConfig8_EnumTypes(p,a,b) (p)->EnumTypes(a,b)
|
||||
#define IDirectInputJoyConfig8_GetTypeInfo(p,a,b,c) (p)->GetTypeInfo(a,b,c)
|
||||
#define IDirectInputJoyConfig8_SetTypeInfo(p,a,b,c,d) (p)->SetTypeInfo(a,b,c,d)
|
||||
#define IDirectInputJoyConfig8_DeleteType(p,a) (p)->DeleteType(a)
|
||||
#define IDirectInputJoyConfig8_GetConfig(p,a,b,c) (p)->GetConfig(a,b,c)
|
||||
#define IDirectInputJoyConfig8_SetConfig(p,a,b,c) (p)->SetConfig(a,b,c)
|
||||
#define IDirectInputJoyConfig8_DeleteConfig(p,a) (p)->DeleteConfig(a)
|
||||
#define IDirectInputJoyConfig8_GetUserValues(p,a,b) (p)->GetUserValues(a,b)
|
||||
#define IDirectInputJoyConfig8_SetUserValues(p,a,b) (p)->SetUserValues(a,b)
|
||||
#define IDirectInputJoyConfig8_AddNewHardware(p,a,b) (p)->AddNewHardware(a,b)
|
||||
#define IDirectInputJoyConfig8_OpenTypeKey(p,a,b,c) (p)->OpenTypeKey(a,b,c)
|
||||
#define IDirectInputJoyConfig8_OpenAppStatusKey(p,a) (p)->OpenAppStatusKey(a)
|
||||
#endif
|
||||
|
||||
#endif /* DIJ_RINGZERO */
|
||||
|
||||
/****************************************************************************
|
||||
*
|
||||
* Notification Messages
|
||||
*
|
||||
****************************************************************************/
|
||||
|
||||
/* RegisterWindowMessage with this to get DirectInput notification messages */
|
||||
#define DIRECTINPUT_NOTIFICATION_MSGSTRINGA "DIRECTINPUT_NOTIFICATION_MSGSTRING"
|
||||
#define DIRECTINPUT_NOTIFICATION_MSGSTRINGW L"DIRECTINPUT_NOTIFICATION_MSGSTRING"
|
||||
|
||||
#ifdef UNICODE
|
||||
#define DIRECTINPUT_NOTIFICATION_MSGSTRING DIRECTINPUT_NOTIFICATION_MSGSTRINGW
|
||||
#else
|
||||
#define DIRECTINPUT_NOTIFICATION_MSGSTRING DIRECTINPUT_NOTIFICATION_MSGSTRINGA
|
||||
#endif
|
||||
|
||||
#define DIMSGWP_NEWAPPSTART 0x00000001
|
||||
#define DIMSGWP_DX8APPSTART 0x00000002
|
||||
#define DIMSGWP_DX8MAPPERAPPSTART 0x00000003
|
||||
|
||||
#endif /* DIRECTINPUT_VERSION >= 0x0800 */
|
||||
|
||||
#define DIRECTINPUT_REGSTR_KEY_LASTAPPA "MostRecentApplication"
|
||||
#define DIRECTINPUT_REGSTR_KEY_LASTMAPAPPA "MostRecentMapperApplication"
|
||||
#define DIRECTINPUT_REGSTR_VAL_VERSIONA "Version"
|
||||
#define DIRECTINPUT_REGSTR_VAL_NAMEA "Name"
|
||||
#define DIRECTINPUT_REGSTR_VAL_IDA "Id"
|
||||
#define DIRECTINPUT_REGSTR_VAL_MAPPERA "UsesMapper"
|
||||
#define DIRECTINPUT_REGSTR_VAL_LASTSTARTA "MostRecentStart"
|
||||
|
||||
#define DIRECTINPUT_REGSTR_KEY_LASTAPPW L"MostRecentApplication"
|
||||
#define DIRECTINPUT_REGSTR_KEY_LASTMAPAPPW L"MostRecentMapperApplication"
|
||||
#define DIRECTINPUT_REGSTR_VAL_VERSIONW L"Version"
|
||||
#define DIRECTINPUT_REGSTR_VAL_NAMEW L"Name"
|
||||
#define DIRECTINPUT_REGSTR_VAL_IDW L"Id"
|
||||
#define DIRECTINPUT_REGSTR_VAL_MAPPERW L"UsesMapper"
|
||||
#define DIRECTINPUT_REGSTR_VAL_LASTSTARTW L"MostRecentStart"
|
||||
|
||||
#ifdef UNICODE
|
||||
#define DIRECTINPUT_REGSTR_KEY_LASTAPP DIRECTINPUT_REGSTR_KEY_LASTAPPW
|
||||
#define DIRECTINPUT_REGSTR_KEY_LASTMAPAPP DIRECTINPUT_REGSTR_KEY_LASTMAPAPPW
|
||||
#define DIRECTINPUT_REGSTR_VAL_VERSION DIRECTINPUT_REGSTR_VAL_VERSIONW
|
||||
#define DIRECTINPUT_REGSTR_VAL_NAME DIRECTINPUT_REGSTR_VAL_NAMEW
|
||||
#define DIRECTINPUT_REGSTR_VAL_ID DIRECTINPUT_REGSTR_VAL_IDW
|
||||
#define DIRECTINPUT_REGSTR_VAL_MAPPER DIRECTINPUT_REGSTR_VAL_MAPPERW
|
||||
#define DIRECTINPUT_REGSTR_VAL_LASTSTART DIRECTINPUT_REGSTR_VAL_LASTSTARTW
|
||||
#else
|
||||
#define DIRECTINPUT_REGSTR_KEY_LASTAPP DIRECTINPUT_REGSTR_KEY_LASTAPPA
|
||||
#define DIRECTINPUT_REGSTR_KEY_LASTMAPAPP DIRECTINPUT_REGSTR_KEY_LASTMAPAPPA
|
||||
#define DIRECTINPUT_REGSTR_VAL_VERSION DIRECTINPUT_REGSTR_VAL_VERSIONA
|
||||
#define DIRECTINPUT_REGSTR_VAL_NAME DIRECTINPUT_REGSTR_VAL_NAMEA
|
||||
#define DIRECTINPUT_REGSTR_VAL_ID DIRECTINPUT_REGSTR_VAL_IDA
|
||||
#define DIRECTINPUT_REGSTR_VAL_MAPPER DIRECTINPUT_REGSTR_VAL_MAPPERA
|
||||
#define DIRECTINPUT_REGSTR_VAL_LASTSTART DIRECTINPUT_REGSTR_VAL_LASTSTARTA
|
||||
#endif
|
||||
|
||||
|
||||
/****************************************************************************
|
||||
*
|
||||
* Return Codes
|
||||
*
|
||||
****************************************************************************/
|
||||
|
||||
#define DIERR_NOMOREITEMS \
|
||||
MAKE_HRESULT(SEVERITY_ERROR, FACILITY_WIN32, ERROR_NO_MORE_ITEMS)
|
||||
|
||||
/*
|
||||
* Device driver-specific codes.
|
||||
*/
|
||||
|
||||
#define DIERR_DRIVERFIRST 0x80040300L
|
||||
#define DIERR_DRIVERLAST 0x800403FFL
|
||||
|
||||
/*
|
||||
* Unless the specific driver has been precisely identified, no meaning
|
||||
* should be attributed to these values other than that the driver
|
||||
* originated the error. However, to illustrate the types of error that
|
||||
* may be causing the failure, the PID force feedback driver distributed
|
||||
* with DirectX 7 could return the following errors:
|
||||
*
|
||||
* DIERR_DRIVERFIRST + 1
|
||||
* The requested usage was not found.
|
||||
* DIERR_DRIVERFIRST + 2
|
||||
* The parameter block couldn't be downloaded to the device.
|
||||
* DIERR_DRIVERFIRST + 3
|
||||
* PID initialization failed.
|
||||
* DIERR_DRIVERFIRST + 4
|
||||
* The provided values couldn't be scaled.
|
||||
*/
|
||||
|
||||
|
||||
/*
|
||||
* Device installer errors.
|
||||
*/
|
||||
|
||||
/*
|
||||
* Registry entry or DLL for class installer invalid
|
||||
* or class installer not found.
|
||||
*/
|
||||
#define DIERR_INVALIDCLASSINSTALLER 0x80040400L
|
||||
|
||||
/*
|
||||
* The user cancelled the install operation.
|
||||
*/
|
||||
#define DIERR_CANCELLED 0x80040401L
|
||||
|
||||
/*
|
||||
* The INF file for the selected device could not be
|
||||
* found or is invalid or is damaged.
|
||||
*/
|
||||
#define DIERR_BADINF 0x80040402L
|
||||
|
||||
/****************************************************************************
|
||||
*
|
||||
* Map files
|
||||
*
|
||||
****************************************************************************/
|
||||
|
||||
/*
|
||||
* Delete particular data from default map file.
|
||||
*/
|
||||
#define DIDIFT_DELETE 0x01000000
|
||||
|
||||
#ifdef __cplusplus
|
||||
};
|
||||
#endif
|
||||
|
||||
#endif /* __DINPUTD_INCLUDED__ */
|
|
@ -0,0 +1,267 @@
|
|||
/*==========================================================================;
|
||||
//
|
||||
// dls1.h
|
||||
//
|
||||
//
|
||||
// Description:
|
||||
//
|
||||
// Interface defines and structures for the Instrument Collection Form
|
||||
// RIFF DLS.
|
||||
//
|
||||
//
|
||||
// Written by Sonic Foundry 1996. Released for public use.
|
||||
//
|
||||
//=========================================================================*/
|
||||
|
||||
#ifndef _INC_DLS1
|
||||
#define _INC_DLS1
|
||||
|
||||
/*//////////////////////////////////////////////////////////////////////////
|
||||
//
|
||||
//
|
||||
// Layout of an instrument collection:
|
||||
//
|
||||
//
|
||||
// RIFF [] 'DLS ' [dlid,colh,INSTLIST,WAVEPOOL,INFOLIST]
|
||||
//
|
||||
// INSTLIST
|
||||
// LIST [] 'lins'
|
||||
// LIST [] 'ins ' [dlid,insh,RGNLIST,ARTLIST,INFOLIST]
|
||||
// LIST [] 'ins ' [dlid,insh,RGNLIST,ARTLIST,INFOLIST]
|
||||
// LIST [] 'ins ' [dlid,insh,RGNLIST,ARTLIST,INFOLIST]
|
||||
//
|
||||
// RGNLIST
|
||||
// LIST [] 'lrgn'
|
||||
// LIST [] 'rgn ' [rgnh,wsmp,wlnk,ARTLIST]
|
||||
// LIST [] 'rgn ' [rgnh,wsmp,wlnk,ARTLIST]
|
||||
// LIST [] 'rgn ' [rgnh,wsmp,wlnk,ARTLIST]
|
||||
//
|
||||
// ARTLIST
|
||||
// LIST [] 'lart'
|
||||
// 'art1' level 1 Articulation connection graph
|
||||
// 'art2' level 2 Articulation connection graph
|
||||
// '3rd1' Possible 3rd party articulation structure 1
|
||||
// '3rd2' Possible 3rd party articulation structure 2 .... and so on
|
||||
//
|
||||
// WAVEPOOL
|
||||
// ptbl [] [pool table]
|
||||
// LIST [] 'wvpl'
|
||||
// [path],
|
||||
// [path],
|
||||
// LIST [] 'wave' [dlid,RIFFWAVE]
|
||||
// LIST [] 'wave' [dlid,RIFFWAVE]
|
||||
// LIST [] 'wave' [dlid,RIFFWAVE]
|
||||
// LIST [] 'wave' [dlid,RIFFWAVE]
|
||||
// LIST [] 'wave' [dlid,RIFFWAVE]
|
||||
//
|
||||
// INFOLIST
|
||||
// LIST [] 'INFO'
|
||||
// 'icmt' 'One of those crazy comments.'
|
||||
// 'icop' 'Copyright (C) 1996 Sonic Foundry'
|
||||
//
|
||||
/////////////////////////////////////////////////////////////////////////*/
|
||||
|
||||
|
||||
/*/////////////////////////////////////////////////////////////////////////
|
||||
// FOURCC's used in the DLS file
|
||||
/////////////////////////////////////////////////////////////////////////*/
|
||||
|
||||
#define FOURCC_DLS mmioFOURCC('D','L','S',' ')
|
||||
#define FOURCC_DLID mmioFOURCC('d','l','i','d')
|
||||
#define FOURCC_COLH mmioFOURCC('c','o','l','h')
|
||||
#define FOURCC_WVPL mmioFOURCC('w','v','p','l')
|
||||
#define FOURCC_PTBL mmioFOURCC('p','t','b','l')
|
||||
#define FOURCC_PATH mmioFOURCC('p','a','t','h')
|
||||
#define FOURCC_wave mmioFOURCC('w','a','v','e')
|
||||
#define FOURCC_LINS mmioFOURCC('l','i','n','s')
|
||||
#define FOURCC_INS mmioFOURCC('i','n','s',' ')
|
||||
#define FOURCC_INSH mmioFOURCC('i','n','s','h')
|
||||
#define FOURCC_LRGN mmioFOURCC('l','r','g','n')
|
||||
#define FOURCC_RGN mmioFOURCC('r','g','n',' ')
|
||||
#define FOURCC_RGNH mmioFOURCC('r','g','n','h')
|
||||
#define FOURCC_LART mmioFOURCC('l','a','r','t')
|
||||
#define FOURCC_ART1 mmioFOURCC('a','r','t','1')
|
||||
#define FOURCC_WLNK mmioFOURCC('w','l','n','k')
|
||||
#define FOURCC_WSMP mmioFOURCC('w','s','m','p')
|
||||
#define FOURCC_VERS mmioFOURCC('v','e','r','s')
|
||||
|
||||
/*/////////////////////////////////////////////////////////////////////////
|
||||
// Articulation connection graph definitions
|
||||
/////////////////////////////////////////////////////////////////////////*/
|
||||
|
||||
/* Generic Sources */
|
||||
#define CONN_SRC_NONE 0x0000
|
||||
#define CONN_SRC_LFO 0x0001
|
||||
#define CONN_SRC_KEYONVELOCITY 0x0002
|
||||
#define CONN_SRC_KEYNUMBER 0x0003
|
||||
#define CONN_SRC_EG1 0x0004
|
||||
#define CONN_SRC_EG2 0x0005
|
||||
#define CONN_SRC_PITCHWHEEL 0x0006
|
||||
|
||||
/* Midi Controllers 0-127 */
|
||||
#define CONN_SRC_CC1 0x0081
|
||||
#define CONN_SRC_CC7 0x0087
|
||||
#define CONN_SRC_CC10 0x008a
|
||||
#define CONN_SRC_CC11 0x008b
|
||||
|
||||
/* Generic Destinations */
|
||||
#define CONN_DST_NONE 0x0000
|
||||
#define CONN_DST_ATTENUATION 0x0001
|
||||
#define CONN_DST_PITCH 0x0003
|
||||
#define CONN_DST_PAN 0x0004
|
||||
|
||||
/* LFO Destinations */
|
||||
#define CONN_DST_LFO_FREQUENCY 0x0104
|
||||
#define CONN_DST_LFO_STARTDELAY 0x0105
|
||||
|
||||
/* EG1 Destinations */
|
||||
#define CONN_DST_EG1_ATTACKTIME 0x0206
|
||||
#define CONN_DST_EG1_DECAYTIME 0x0207
|
||||
#define CONN_DST_EG1_RELEASETIME 0x0209
|
||||
#define CONN_DST_EG1_SUSTAINLEVEL 0x020a
|
||||
|
||||
/* EG2 Destinations */
|
||||
#define CONN_DST_EG2_ATTACKTIME 0x030a
|
||||
#define CONN_DST_EG2_DECAYTIME 0x030b
|
||||
#define CONN_DST_EG2_RELEASETIME 0x030d
|
||||
#define CONN_DST_EG2_SUSTAINLEVEL 0x030e
|
||||
|
||||
#define CONN_TRN_NONE 0x0000
|
||||
#define CONN_TRN_CONCAVE 0x0001
|
||||
|
||||
typedef struct _DLSID {
|
||||
ULONG ulData1;
|
||||
USHORT usData2;
|
||||
USHORT usData3;
|
||||
BYTE abData4[8];
|
||||
} DLSID, FAR *LPDLSID;
|
||||
|
||||
typedef struct _DLSVERSION {
|
||||
DWORD dwVersionMS;
|
||||
DWORD dwVersionLS;
|
||||
}DLSVERSION, FAR *LPDLSVERSION;
|
||||
|
||||
|
||||
typedef struct _CONNECTION {
|
||||
USHORT usSource;
|
||||
USHORT usControl;
|
||||
USHORT usDestination;
|
||||
USHORT usTransform;
|
||||
LONG lScale;
|
||||
}CONNECTION, FAR *LPCONNECTION;
|
||||
|
||||
|
||||
/* Level 1 Articulation Data */
|
||||
|
||||
typedef struct _CONNECTIONLIST {
|
||||
ULONG cbSize; /* size of the connection list structure */
|
||||
ULONG cConnections; /* count of connections in the list */
|
||||
} CONNECTIONLIST, FAR *LPCONNECTIONLIST;
|
||||
|
||||
|
||||
|
||||
/*/////////////////////////////////////////////////////////////////////////
|
||||
// Generic type defines for regions and instruments
|
||||
/////////////////////////////////////////////////////////////////////////*/
|
||||
|
||||
typedef struct _RGNRANGE {
|
||||
USHORT usLow;
|
||||
USHORT usHigh;
|
||||
}RGNRANGE, FAR * LPRGNRANGE;
|
||||
|
||||
#define F_INSTRUMENT_DRUMS 0x80000000
|
||||
|
||||
typedef struct _MIDILOCALE {
|
||||
ULONG ulBank;
|
||||
ULONG ulInstrument;
|
||||
}MIDILOCALE, FAR *LPMIDILOCALE;
|
||||
|
||||
/*/////////////////////////////////////////////////////////////////////////
|
||||
// Header structures found in an DLS file for collection, instruments, and
|
||||
// regions.
|
||||
/////////////////////////////////////////////////////////////////////////*/
|
||||
|
||||
#define F_RGN_OPTION_SELFNONEXCLUSIVE 0x0001
|
||||
|
||||
typedef struct _RGNHEADER {
|
||||
RGNRANGE RangeKey; /* Key range */
|
||||
RGNRANGE RangeVelocity; /* Velocity Range */
|
||||
USHORT fusOptions; /* Synthesis options for this range */
|
||||
USHORT usKeyGroup; /* Key grouping for non simultaneous play */
|
||||
/* 0 = no group, 1 up is group */
|
||||
/* for Level 1 only groups 1-15 are allowed */
|
||||
}RGNHEADER, FAR *LPRGNHEADER;
|
||||
|
||||
typedef struct _INSTHEADER {
|
||||
ULONG cRegions; /* Count of regions in this instrument */
|
||||
MIDILOCALE Locale; /* Intended MIDI locale of this instrument */
|
||||
}INSTHEADER, FAR *LPINSTHEADER;
|
||||
|
||||
typedef struct _DLSHEADER {
|
||||
ULONG cInstruments; /* Count of instruments in the collection */
|
||||
}DLSHEADER, FAR *LPDLSHEADER;
|
||||
|
||||
/*////////////////////////////////////////////////////////////////////////////
|
||||
// definitions for the Wave link structure
|
||||
////////////////////////////////////////////////////////////////////////////*/
|
||||
|
||||
/* **** For level 1 only WAVELINK_CHANNEL_MONO is valid **** */
|
||||
/* ulChannel allows for up to 32 channels of audio with each bit position */
|
||||
/* specifiying a channel of playback */
|
||||
|
||||
#define WAVELINK_CHANNEL_LEFT 0x0001l
|
||||
#define WAVELINK_CHANNEL_RIGHT 0x0002l
|
||||
|
||||
#define F_WAVELINK_PHASE_MASTER 0x0001
|
||||
|
||||
typedef struct _WAVELINK { /* any paths or links are stored right after struct */
|
||||
USHORT fusOptions; /* options flags for this wave */
|
||||
USHORT usPhaseGroup; /* Phase grouping for locking channels */
|
||||
ULONG ulChannel; /* channel placement */
|
||||
ULONG ulTableIndex; /* index into the wave pool table, 0 based */
|
||||
}WAVELINK, FAR *LPWAVELINK;
|
||||
|
||||
#define POOL_CUE_NULL 0xffffffffl
|
||||
|
||||
typedef struct _POOLCUE {
|
||||
ULONG ulOffset; /* Offset to the entry in the list */
|
||||
}POOLCUE, FAR *LPPOOLCUE;
|
||||
|
||||
typedef struct _POOLTABLE {
|
||||
ULONG cbSize; /* size of the pool table structure */
|
||||
ULONG cCues; /* count of cues in the list */
|
||||
} POOLTABLE, FAR *LPPOOLTABLE;
|
||||
|
||||
/*////////////////////////////////////////////////////////////////////////////
|
||||
// Structures for the "wsmp" chunk
|
||||
////////////////////////////////////////////////////////////////////////////*/
|
||||
|
||||
#define F_WSMP_NO_TRUNCATION 0x0001l
|
||||
#define F_WSMP_NO_COMPRESSION 0x0002l
|
||||
|
||||
|
||||
typedef struct _rwsmp {
|
||||
ULONG cbSize;
|
||||
USHORT usUnityNote; /* MIDI Unity Playback Note */
|
||||
SHORT sFineTune; /* Fine Tune in log tuning */
|
||||
LONG lAttenuation; /* Overall Attenuation to be applied to data */
|
||||
ULONG fulOptions; /* Flag options */
|
||||
ULONG cSampleLoops; /* Count of Sample loops, 0 loops is one shot */
|
||||
} WSMPL, FAR *LPWSMPL;
|
||||
|
||||
|
||||
/* This loop type is a normal forward playing loop which is continually */
|
||||
/* played until the envelope reaches an off threshold in the release */
|
||||
/* portion of the volume envelope */
|
||||
|
||||
#define WLOOP_TYPE_FORWARD 0
|
||||
|
||||
typedef struct _rloop {
|
||||
ULONG cbSize;
|
||||
ULONG ulType; /* Loop Type */
|
||||
ULONG ulStart; /* Start of loop in samples */
|
||||
ULONG ulLength; /* Length of loop in samples */
|
||||
} WLOOP, FAR *LPWLOOP;
|
||||
|
||||
#endif /*_INC_DLS1 */
|
||||
|
|
@ -0,0 +1,130 @@
|
|||
/*
|
||||
|
||||
dls2.h
|
||||
|
||||
Description:
|
||||
|
||||
Interface defines and structures for the DLS2 extensions of DLS.
|
||||
|
||||
|
||||
Written by Microsoft 1998. Released for public use.
|
||||
|
||||
*/
|
||||
|
||||
#ifndef _INC_DLS2
|
||||
#define _INC_DLS2
|
||||
|
||||
/*
|
||||
FOURCC's used in the DLS2 file, in addition to DLS1 chunks
|
||||
*/
|
||||
|
||||
#define FOURCC_RGN2 mmioFOURCC('r','g','n','2')
|
||||
#define FOURCC_LAR2 mmioFOURCC('l','a','r','2')
|
||||
#define FOURCC_ART2 mmioFOURCC('a','r','t','2')
|
||||
#define FOURCC_CDL mmioFOURCC('c','d','l',' ')
|
||||
#define FOURCC_DLID mmioFOURCC('d','l','i','d')
|
||||
|
||||
/*
|
||||
Articulation connection graph definitions. These are in addition to
|
||||
the definitions in the DLS1 header.
|
||||
*/
|
||||
|
||||
/* Generic Sources (in addition to DLS1 sources. */
|
||||
#define CONN_SRC_POLYPRESSURE 0x0007 /* Polyphonic Pressure */
|
||||
#define CONN_SRC_CHANNELPRESSURE 0x0008 /* Channel Pressure */
|
||||
#define CONN_SRC_VIBRATO 0x0009 /* Vibrato LFO */
|
||||
#define CONN_SRC_MONOPRESSURE 0x000a /* MIDI Mono pressure */
|
||||
|
||||
|
||||
/* Midi Controllers */
|
||||
#define CONN_SRC_CC91 0x00db /* Reverb Send */
|
||||
#define CONN_SRC_CC93 0x00dd /* Chorus Send */
|
||||
|
||||
|
||||
/* Generic Destinations */
|
||||
#define CONN_DST_GAIN 0x0001 /* Same as CONN_DST_ ATTENUATION, but more appropriate terminology. */
|
||||
#define CONN_DST_KEYNUMBER 0x0005 /* Key Number Generator */
|
||||
|
||||
/* Audio Channel Output Destinations */
|
||||
#define CONN_DST_LEFT 0x0010 /* Left Channel Send */
|
||||
#define CONN_DST_RIGHT 0x0011 /* Right Channel Send */
|
||||
#define CONN_DST_CENTER 0x0012 /* Center Channel Send */
|
||||
#define CONN_DST_LEFTREAR 0x0013 /* Left Rear Channel Send */
|
||||
#define CONN_DST_RIGHTREAR 0x0014 /* Right Rear Channel Send */
|
||||
#define CONN_DST_LFE_CHANNEL 0x0015 /* LFE Channel Send */
|
||||
#define CONN_DST_CHORUS 0x0080 /* Chorus Send */
|
||||
#define CONN_DST_REVERB 0x0081 /* Reverb Send */
|
||||
|
||||
/* Vibrato LFO Destinations */
|
||||
#define CONN_DST_VIB_FREQUENCY 0x0114 /* Vibrato Frequency */
|
||||
#define CONN_DST_VIB_STARTDELAY 0x0115 /* Vibrato Start Delay */
|
||||
|
||||
/* EG1 Destinations */
|
||||
#define CONN_DST_EG1_DELAYTIME 0x020B /* EG1 Delay Time */
|
||||
#define CONN_DST_EG1_HOLDTIME 0x020C /* EG1 Hold Time */
|
||||
#define CONN_DST_EG1_SHUTDOWNTIME 0x020D /* EG1 Shutdown Time */
|
||||
|
||||
|
||||
/* EG2 Destinations */
|
||||
#define CONN_DST_EG2_DELAYTIME 0x030F /* EG2 Delay Time */
|
||||
#define CONN_DST_EG2_HOLDTIME 0x0310 /* EG2 Hold Time */
|
||||
|
||||
|
||||
/* Filter Destinations */
|
||||
#define CONN_DST_FILTER_CUTOFF 0x0500 /* Filter Cutoff Frequency */
|
||||
#define CONN_DST_FILTER_Q 0x0501 /* Filter Resonance */
|
||||
|
||||
|
||||
/* Transforms */
|
||||
#define CONN_TRN_CONVEX 0x0002 /* Convex Transform */
|
||||
#define CONN_TRN_SWITCH 0x0003 /* Switch Transform */
|
||||
|
||||
|
||||
/* Conditional chunk operators */
|
||||
#define DLS_CDL_AND 0x0001 /* X = X & Y */
|
||||
#define DLS_CDL_OR 0x0002 /* X = X | Y */
|
||||
#define DLS_CDL_XOR 0x0003 /* X = X ^ Y */
|
||||
#define DLS_CDL_ADD 0x0004 /* X = X + Y */
|
||||
#define DLS_CDL_SUBTRACT 0x0005 /* X = X - Y */
|
||||
#define DLS_CDL_MULTIPLY 0x0006 /* X = X * Y */
|
||||
#define DLS_CDL_DIVIDE 0x0007 /* X = X / Y */
|
||||
#define DLS_CDL_LOGICAL_AND 0x0008 /* X = X && Y */
|
||||
#define DLS_CDL_LOGICAL_OR 0x0009 /* X = X || Y */
|
||||
#define DLS_CDL_LT 0x000A /* X = (X < Y) */
|
||||
#define DLS_CDL_LE 0x000B /* X = (X <= Y) */
|
||||
#define DLS_CDL_GT 0x000C /* X = (X > Y) */
|
||||
#define DLS_CDL_GE 0x000D /* X = (X >= Y) */
|
||||
#define DLS_CDL_EQ 0x000E /* X = (X == Y) */
|
||||
#define DLS_CDL_NOT 0x000F /* X = !X */
|
||||
#define DLS_CDL_CONST 0x0010 /* 32-bit constant */
|
||||
#define DLS_CDL_QUERY 0x0011 /* 32-bit value returned from query */
|
||||
#define DLS_CDL_QUERYSUPPORTED 0x0012 /* Test to see if query is supported by synth */
|
||||
|
||||
/*
|
||||
Loop and release
|
||||
*/
|
||||
|
||||
#define WLOOP_TYPE_RELEASE 1
|
||||
|
||||
/*
|
||||
WaveLink chunk <wlnk-ck>
|
||||
*/
|
||||
|
||||
#define F_WAVELINK_MULTICHANNEL 0x0002
|
||||
|
||||
|
||||
/*
|
||||
DLSID queries for <cdl-ck>
|
||||
*/
|
||||
|
||||
DEFINE_GUID(DLSID_GMInHardware, 0x178f2f24, 0xc364, 0x11d1, 0xa7, 0x60, 0x00, 0x00, 0xf8, 0x75, 0xac, 0x12);
|
||||
DEFINE_GUID(DLSID_GSInHardware, 0x178f2f25, 0xc364, 0x11d1, 0xa7, 0x60, 0x00, 0x00, 0xf8, 0x75, 0xac, 0x12);
|
||||
DEFINE_GUID(DLSID_XGInHardware, 0x178f2f26, 0xc364, 0x11d1, 0xa7, 0x60, 0x00, 0x00, 0xf8, 0x75, 0xac, 0x12);
|
||||
DEFINE_GUID(DLSID_SupportsDLS1, 0x178f2f27, 0xc364, 0x11d1, 0xa7, 0x60, 0x00, 0x00, 0xf8, 0x75, 0xac, 0x12);
|
||||
DEFINE_GUID(DLSID_SupportsDLS2, 0xf14599e5, 0x4689, 0x11d2, 0xaf, 0xa6, 0x0, 0xaa, 0x0, 0x24, 0xd8, 0xb6);
|
||||
DEFINE_GUID(DLSID_SampleMemorySize, 0x178f2f28, 0xc364, 0x11d1, 0xa7, 0x60, 0x00, 0x00, 0xf8, 0x75, 0xac, 0x12);
|
||||
DEFINE_GUID(DLSID_ManufacturersID, 0xb03e1181, 0x8095, 0x11d2, 0xa1, 0xef, 0x0, 0x60, 0x8, 0x33, 0xdb, 0xd8);
|
||||
DEFINE_GUID(DLSID_ProductID, 0xb03e1182, 0x8095, 0x11d2, 0xa1, 0xef, 0x0, 0x60, 0x8, 0x33, 0xdb, 0xd8);
|
||||
DEFINE_GUID(DLSID_SamplePlaybackRate, 0x2a91f713, 0xa4bf, 0x11d2, 0xbb, 0xdf, 0x0, 0x60, 0x8, 0x33, 0xdb, 0xd8);
|
||||
|
||||
#endif /* _INC_DLS2 */
|
|
@ -0,0 +1,199 @@
|
|||
/************************************************************************
|
||||
* *
|
||||
* dmdls.h -- DLS download definitions for DirectMusic API's *
|
||||
* *
|
||||
* Copyright (c) 1998-1999 Microsoft Corporation *
|
||||
* *
|
||||
************************************************************************/
|
||||
|
||||
#ifndef _DMDLS_
|
||||
#define _DMDLS_
|
||||
|
||||
#include "dls1.h"
|
||||
|
||||
typedef long PCENT; /* Pitch cents */
|
||||
typedef long GCENT; /* Gain cents */
|
||||
typedef long TCENT; /* Time cents */
|
||||
typedef long PERCENT; /* Per.. cent! */
|
||||
|
||||
typedef LONGLONG REFERENCE_TIME;
|
||||
typedef REFERENCE_TIME *LPREFERENCE_TIME;
|
||||
|
||||
#ifndef MAKE_FOURCC
|
||||
#define MAKEFOURCC(ch0, ch1, ch2, ch3) \
|
||||
((DWORD)(BYTE)(ch0) | ((DWORD)(BYTE)(ch1) << 8) | \
|
||||
((DWORD)(BYTE)(ch2) << 16) | ((DWORD)(BYTE)(ch3) << 24 ))
|
||||
|
||||
|
||||
typedef DWORD FOURCC; /* a four character code */
|
||||
#endif
|
||||
|
||||
typedef struct _DMUS_DOWNLOADINFO
|
||||
{
|
||||
DWORD dwDLType; /* Instrument or Wave */
|
||||
DWORD dwDLId; /* Unique identifier to tag this download. */
|
||||
DWORD dwNumOffsetTableEntries; /* Number of index in the offset address table. */
|
||||
DWORD cbSize; /* Total size of this memory chunk. */
|
||||
} DMUS_DOWNLOADINFO;
|
||||
|
||||
#define DMUS_DOWNLOADINFO_INSTRUMENT 1
|
||||
#define DMUS_DOWNLOADINFO_WAVE 2
|
||||
#define DMUS_DOWNLOADINFO_INSTRUMENT2 3 /* New version for better DLS2 support. */
|
||||
|
||||
/* Support for oneshot and streaming wave data
|
||||
*/
|
||||
#define DMUS_DOWNLOADINFO_WAVEARTICULATION 4 /* Wave articulation data */
|
||||
#define DMUS_DOWNLOADINFO_STREAMINGWAVE 5 /* One chunk of a streaming */
|
||||
#define DMUS_DOWNLOADINFO_ONESHOTWAVE 6
|
||||
|
||||
#define DMUS_DEFAULT_SIZE_OFFSETTABLE 1
|
||||
|
||||
/* Flags for DMUS_INSTRUMENT's ulFlags member */
|
||||
|
||||
#define DMUS_INSTRUMENT_GM_INSTRUMENT (1 << 0)
|
||||
|
||||
typedef struct _DMUS_OFFSETTABLE
|
||||
{
|
||||
ULONG ulOffsetTable[DMUS_DEFAULT_SIZE_OFFSETTABLE];
|
||||
} DMUS_OFFSETTABLE;
|
||||
|
||||
typedef struct _DMUS_INSTRUMENT
|
||||
{
|
||||
ULONG ulPatch;
|
||||
ULONG ulFirstRegionIdx;
|
||||
ULONG ulGlobalArtIdx; /* If zero the instrument does not have an articulation */
|
||||
ULONG ulFirstExtCkIdx; /* If zero no 3rd party entenstion chunks associated with the instrument */
|
||||
ULONG ulCopyrightIdx; /* If zero no Copyright information associated with the instrument */
|
||||
ULONG ulFlags;
|
||||
} DMUS_INSTRUMENT;
|
||||
|
||||
typedef struct _DMUS_REGION
|
||||
{
|
||||
RGNRANGE RangeKey;
|
||||
RGNRANGE RangeVelocity;
|
||||
USHORT fusOptions;
|
||||
USHORT usKeyGroup;
|
||||
ULONG ulRegionArtIdx; /* If zero the region does not have an articulation */
|
||||
ULONG ulNextRegionIdx; /* If zero no more regions */
|
||||
ULONG ulFirstExtCkIdx; /* If zero no 3rd party entenstion chunks associated with the region */
|
||||
WAVELINK WaveLink;
|
||||
WSMPL WSMP; /* If WSMP.cSampleLoops > 1 then a WLOOP is included */
|
||||
WLOOP WLOOP[1];
|
||||
} DMUS_REGION;
|
||||
|
||||
typedef struct _DMUS_LFOPARAMS
|
||||
{
|
||||
PCENT pcFrequency;
|
||||
TCENT tcDelay;
|
||||
GCENT gcVolumeScale;
|
||||
PCENT pcPitchScale;
|
||||
GCENT gcMWToVolume;
|
||||
PCENT pcMWToPitch;
|
||||
} DMUS_LFOPARAMS;
|
||||
|
||||
typedef struct _DMUS_VEGPARAMS
|
||||
{
|
||||
TCENT tcAttack;
|
||||
TCENT tcDecay;
|
||||
PERCENT ptSustain;
|
||||
TCENT tcRelease;
|
||||
TCENT tcVel2Attack;
|
||||
TCENT tcKey2Decay;
|
||||
} DMUS_VEGPARAMS;
|
||||
|
||||
typedef struct _DMUS_PEGPARAMS
|
||||
{
|
||||
TCENT tcAttack;
|
||||
TCENT tcDecay;
|
||||
PERCENT ptSustain;
|
||||
TCENT tcRelease;
|
||||
TCENT tcVel2Attack;
|
||||
TCENT tcKey2Decay;
|
||||
PCENT pcRange;
|
||||
} DMUS_PEGPARAMS;
|
||||
|
||||
typedef struct _DMUS_MSCPARAMS
|
||||
{
|
||||
PERCENT ptDefaultPan;
|
||||
} DMUS_MSCPARAMS;
|
||||
|
||||
typedef struct _DMUS_ARTICPARAMS
|
||||
{
|
||||
DMUS_LFOPARAMS LFO;
|
||||
DMUS_VEGPARAMS VolEG;
|
||||
DMUS_PEGPARAMS PitchEG;
|
||||
DMUS_MSCPARAMS Misc;
|
||||
} DMUS_ARTICPARAMS;
|
||||
|
||||
typedef struct _DMUS_ARTICULATION /* Articulation chunk for DMUS_DOWNLOADINFO_INSTRUMENT format. */
|
||||
{
|
||||
ULONG ulArt1Idx; /* DLS Level 1 articulation chunk */
|
||||
ULONG ulFirstExtCkIdx; /* 3rd party extenstion chunks associated with the articulation */
|
||||
} DMUS_ARTICULATION;
|
||||
|
||||
typedef struct _DMUS_ARTICULATION2 /* Articulation chunk for DMUS_DOWNLOADINFO_INSTRUMENT2 format. */
|
||||
{
|
||||
ULONG ulArtIdx; /* DLS Level 1/2 articulation chunk */
|
||||
ULONG ulFirstExtCkIdx; /* 3rd party extenstion chunks associated with the articulation */
|
||||
ULONG ulNextArtIdx; /* Additional articulation chunks */
|
||||
} DMUS_ARTICULATION2;
|
||||
|
||||
#define DMUS_MIN_DATA_SIZE 4
|
||||
/* The actual number is determined by cbSize of struct _DMUS_EXTENSIONCHUNK */
|
||||
|
||||
typedef struct _DMUS_EXTENSIONCHUNK
|
||||
{
|
||||
ULONG cbSize; /* Size of extension chunk */
|
||||
ULONG ulNextExtCkIdx; /* If zero no more 3rd party entenstion chunks */
|
||||
FOURCC ExtCkID;
|
||||
BYTE byExtCk[DMUS_MIN_DATA_SIZE]; /* The actual number that follows is determined by cbSize */
|
||||
} DMUS_EXTENSIONCHUNK;
|
||||
|
||||
/* The actual number is determined by cbSize of struct _DMUS_COPYRIGHT */
|
||||
|
||||
typedef struct _DMUS_COPYRIGHT
|
||||
{
|
||||
ULONG cbSize; /* Size of copyright information */
|
||||
BYTE byCopyright[DMUS_MIN_DATA_SIZE]; /* The actual number that follows is determined by cbSize */
|
||||
} DMUS_COPYRIGHT;
|
||||
|
||||
typedef struct _DMUS_WAVEDATA
|
||||
{
|
||||
ULONG cbSize;
|
||||
BYTE byData[DMUS_MIN_DATA_SIZE];
|
||||
} DMUS_WAVEDATA;
|
||||
|
||||
typedef struct _DMUS_WAVE
|
||||
{
|
||||
ULONG ulFirstExtCkIdx; /* If zero no 3rd party entenstion chunks associated with the wave */
|
||||
ULONG ulCopyrightIdx; /* If zero no Copyright information associated with the wave */
|
||||
ULONG ulWaveDataIdx; /* Location of actual wave data. */
|
||||
WAVEFORMATEX WaveformatEx;
|
||||
} DMUS_WAVE;
|
||||
|
||||
typedef struct _DMUS_NOTERANGE *LPDMUS_NOTERANGE;
|
||||
typedef struct _DMUS_NOTERANGE
|
||||
{
|
||||
DWORD dwLowNote; /* Sets the low note for the range of MIDI note events to which the instrument responds.*/
|
||||
DWORD dwHighNote; /* Sets the high note for the range of MIDI note events to which the instrument responds.*/
|
||||
} DMUS_NOTERANGE;
|
||||
|
||||
typedef struct _DMUS_WAVEARTDL
|
||||
{
|
||||
ULONG ulDownloadIdIdx; /* Download ID's of each buffer */
|
||||
ULONG ulBus; /* Playback bus */
|
||||
ULONG ulBuffers; /* Buffers */
|
||||
ULONG ulMasterDLId; /* Download ID of master voice of slave group */
|
||||
USHORT usOptions; /* Same as DLS2 region options */
|
||||
} DMUS_WAVEARTDL,
|
||||
*LPDMUS_WAVEARTDL;
|
||||
|
||||
typedef struct _DMUS_WAVEDL
|
||||
{
|
||||
ULONG cbWaveData; /* Bytes of wave data */
|
||||
} DMUS_WAVEDL,
|
||||
*LPDMUS_WAVEDL;
|
||||
|
||||
#endif
|
||||
|
||||
|
|
@ -0,0 +1,843 @@
|
|||
/************************************************************************
|
||||
* *
|
||||
* dmerror.h -- Error code returned by DirectMusic API's *
|
||||
* *
|
||||
* Copyright (c) 1998-1999 Microsoft Corporation
|
||||
* *
|
||||
************************************************************************/
|
||||
|
||||
#ifndef _DMERROR_
|
||||
#define _DMERROR_
|
||||
|
||||
#define FACILITY_DIRECTMUSIC 0x878 /* Shared with DirectSound */
|
||||
#define DMUS_ERRBASE 0x1000 /* Make error codes human readable in hex */
|
||||
|
||||
#ifndef MAKE_HRESULT
|
||||
#define MAKE_HRESULT(sev,fac,code) \
|
||||
((HRESULT) (((unsigned long)(sev)<<31) | ((unsigned long)(fac)<<16) | ((unsigned long)(code))) )
|
||||
#endif
|
||||
|
||||
#define MAKE_DMHRESULTSUCCESS(code) MAKE_HRESULT(0, FACILITY_DIRECTMUSIC, (DMUS_ERRBASE + (code)))
|
||||
#define MAKE_DMHRESULTERROR(code) MAKE_HRESULT(1, FACILITY_DIRECTMUSIC, (DMUS_ERRBASE + (code)))
|
||||
|
||||
/* DMUS_S_PARTIALLOAD
|
||||
*
|
||||
* The object could only load partially. This can happen if some components are
|
||||
* not registered properly, such as embedded tracks and tools. This can also happen
|
||||
* if some content is missing. For example, if a segment uses a DLS collection that
|
||||
* is not in the loader's current search directory.
|
||||
*/
|
||||
#define DMUS_S_PARTIALLOAD MAKE_DMHRESULTSUCCESS(0x091)
|
||||
|
||||
/* DMUS_S_PARTIALDOWNLOAD
|
||||
*
|
||||
* Return value from IDirectMusicBand::Download() which indicates that
|
||||
* some of the instruments safely downloaded, but others failed. This usually
|
||||
* occurs when some instruments are on PChannels not supported by the performance
|
||||
* or port.
|
||||
*/
|
||||
#define DMUS_S_PARTIALDOWNLOAD MAKE_DMHRESULTSUCCESS(0x092)
|
||||
|
||||
/* DMUS_S_REQUEUE
|
||||
*
|
||||
* Return value from IDirectMusicTool::ProcessPMsg() which indicates to the
|
||||
* performance that it should cue the PMsg again automatically.
|
||||
*/
|
||||
#define DMUS_S_REQUEUE MAKE_DMHRESULTSUCCESS(0x200)
|
||||
|
||||
/* DMUS_S_FREE
|
||||
*
|
||||
* Return value from IDirectMusicTool::ProcessPMsg() which indicates to the
|
||||
* performance that it should free the PMsg automatically.
|
||||
*/
|
||||
#define DMUS_S_FREE MAKE_DMHRESULTSUCCESS(0x201)
|
||||
|
||||
/* DMUS_S_END
|
||||
*
|
||||
* Return value from IDirectMusicTrack::Play() which indicates to the
|
||||
* segment that the track has no more data after mtEnd.
|
||||
*/
|
||||
#define DMUS_S_END MAKE_DMHRESULTSUCCESS(0x202)
|
||||
|
||||
/* DMUS_S_STRING_TRUNCATED
|
||||
*
|
||||
* Returned string has been truncated to fit the buffer size.
|
||||
*/
|
||||
#define DMUS_S_STRING_TRUNCATED MAKE_DMHRESULTSUCCESS(0x210)
|
||||
|
||||
/* DMUS_S_LAST_TOOL
|
||||
*
|
||||
* Returned from IDirectMusicGraph::StampPMsg(), this indicates that the PMsg
|
||||
* is already stamped with the last tool in the graph. The returned PMsg's
|
||||
* tool pointer is now NULL.
|
||||
*/
|
||||
#define DMUS_S_LAST_TOOL MAKE_DMHRESULTSUCCESS(0x211)
|
||||
|
||||
/* DMUS_S_OVER_CHORD
|
||||
*
|
||||
* Returned from IDirectMusicPerformance::MusicToMIDI(), this indicates
|
||||
* that no note has been calculated because the music value has the note
|
||||
* at a position higher than the top note of the chord. This applies only
|
||||
* to DMUS_PLAYMODE_NORMALCHORD play mode. This success code indicates
|
||||
* that the caller should not do anything with the note. It is not meant
|
||||
* to be played against this chord.
|
||||
*/
|
||||
#define DMUS_S_OVER_CHORD MAKE_DMHRESULTSUCCESS(0x212)
|
||||
|
||||
/* DMUS_S_UP_OCTAVE
|
||||
*
|
||||
* Returned from IDirectMusicPerformance::MIDIToMusic(), and
|
||||
* IDirectMusicPerformance::MusicToMIDI(), this indicates
|
||||
* that the note conversion generated a note value that is below 0,
|
||||
* so it has been bumped up one or more octaves to be in the proper
|
||||
* MIDI range of 0 through 127.
|
||||
* Note that this is valid for MIDIToMusic() when using play modes
|
||||
* DMUS_PLAYMODE_FIXEDTOCHORD and DMUS_PLAYMODE_FIXEDTOKEY, both of
|
||||
* which store MIDI values in wMusicValue. With MusicToMIDI(), it is
|
||||
* valid for all play modes.
|
||||
* Ofcourse, DMUS_PLAYMODE_FIXED will never return this success code.
|
||||
*/
|
||||
#define DMUS_S_UP_OCTAVE MAKE_DMHRESULTSUCCESS(0x213)
|
||||
|
||||
/* DMUS_S_DOWN_OCTAVE
|
||||
*
|
||||
* Returned from IDirectMusicPerformance::MIDIToMusic(), and
|
||||
* IDirectMusicPerformance::MusicToMIDI(), this indicates
|
||||
* that the note conversion generated a note value that is above 127,
|
||||
* so it has been bumped down one or more octaves to be in the proper
|
||||
* MIDI range of 0 through 127.
|
||||
* Note that this is valid for MIDIToMusic() when using play modes
|
||||
* DMUS_PLAYMODE_FIXEDTOCHORD and DMUS_PLAYMODE_FIXEDTOKEY, both of
|
||||
* which store MIDI values in wMusicValue. With MusicToMIDI(), it is
|
||||
* valid for all play modes.
|
||||
* Ofcourse, DMUS_PLAYMODE_FIXED will never return this success code.
|
||||
*/
|
||||
#define DMUS_S_DOWN_OCTAVE MAKE_DMHRESULTSUCCESS(0x214)
|
||||
|
||||
/* DMUS_S_NOBUFFERCONTROL
|
||||
*
|
||||
* Although the audio output from the port will be routed to the
|
||||
* same device as the given DirectSound buffer, buffer controls
|
||||
* such as pan and volume will not affect the output.
|
||||
*
|
||||
*/
|
||||
#define DMUS_S_NOBUFFERCONTROL MAKE_DMHRESULTSUCCESS(0x215)
|
||||
|
||||
/* DMUS_S_GARBAGE_COLLECTED
|
||||
*
|
||||
* The requested operation was not performed because during CollectGarbage
|
||||
* the loader determined that the object had been released.
|
||||
*/
|
||||
#define DMUS_S_GARBAGE_COLLECTED MAKE_DMHRESULTSUCCESS(0x216)
|
||||
|
||||
/* DMUS_E_DRIVER_FAILED
|
||||
*
|
||||
* An unexpected error was returned from a device driver, indicating
|
||||
* possible failure of the driver or hardware.
|
||||
*/
|
||||
#define DMUS_E_DRIVER_FAILED MAKE_DMHRESULTERROR(0x0101)
|
||||
|
||||
/* DMUS_E_PORTS_OPEN
|
||||
*
|
||||
* The requested operation cannot be performed while there are
|
||||
* instantiated ports in any process in the system.
|
||||
*/
|
||||
#define DMUS_E_PORTS_OPEN MAKE_DMHRESULTERROR(0x0102)
|
||||
|
||||
/* DMUS_E_DEVICE_IN_USE
|
||||
*
|
||||
* The requested device is already in use (possibly by a non-DirectMusic
|
||||
* client) and cannot be opened again.
|
||||
*/
|
||||
#define DMUS_E_DEVICE_IN_USE MAKE_DMHRESULTERROR(0x0103)
|
||||
|
||||
/* DMUS_E_INSUFFICIENTBUFFER
|
||||
*
|
||||
* Buffer is not large enough for requested operation.
|
||||
*/
|
||||
#define DMUS_E_INSUFFICIENTBUFFER MAKE_DMHRESULTERROR(0x0104)
|
||||
|
||||
/* DMUS_E_BUFFERNOTSET
|
||||
*
|
||||
* No buffer was prepared for the download data.
|
||||
*/
|
||||
#define DMUS_E_BUFFERNOTSET MAKE_DMHRESULTERROR(0x0105)
|
||||
|
||||
/* DMUS_E_BUFFERNOTAVAILABLE
|
||||
*
|
||||
* Download failed due to inability to access or create download buffer.
|
||||
*/
|
||||
#define DMUS_E_BUFFERNOTAVAILABLE MAKE_DMHRESULTERROR(0x0106)
|
||||
|
||||
/* DMUS_E_NOTADLSCOL
|
||||
*
|
||||
* Error parsing DLS collection. File is corrupt.
|
||||
*/
|
||||
#define DMUS_E_NOTADLSCOL MAKE_DMHRESULTERROR(0x0108)
|
||||
|
||||
/* DMUS_E_INVALIDOFFSET
|
||||
*
|
||||
* Wave chunks in DLS collection file are at incorrect offsets.
|
||||
*/
|
||||
#define DMUS_E_INVALIDOFFSET MAKE_DMHRESULTERROR(0x0109)
|
||||
|
||||
/* DMUS_E_ALREADY_LOADED
|
||||
*
|
||||
* Second attempt to load a DLS collection that is currently open.
|
||||
*/
|
||||
#define DMUS_E_ALREADY_LOADED MAKE_DMHRESULTERROR(0x0111)
|
||||
|
||||
/* DMUS_E_INVALIDPOS
|
||||
*
|
||||
* Error reading wave data from DLS collection. Indicates bad file.
|
||||
*/
|
||||
#define DMUS_E_INVALIDPOS MAKE_DMHRESULTERROR(0x0113)
|
||||
|
||||
/* DMUS_E_INVALIDPATCH
|
||||
*
|
||||
* There is no instrument in the collection that matches patch number.
|
||||
*/
|
||||
#define DMUS_E_INVALIDPATCH MAKE_DMHRESULTERROR(0x0114)
|
||||
|
||||
/* DMUS_E_CANNOTSEEK
|
||||
*
|
||||
* The IStream* doesn't support Seek().
|
||||
*/
|
||||
#define DMUS_E_CANNOTSEEK MAKE_DMHRESULTERROR(0x0115)
|
||||
|
||||
/* DMUS_E_CANNOTWRITE
|
||||
*
|
||||
* The IStream* doesn't support Write().
|
||||
*/
|
||||
#define DMUS_E_CANNOTWRITE MAKE_DMHRESULTERROR(0x0116)
|
||||
|
||||
/* DMUS_E_CHUNKNOTFOUND
|
||||
*
|
||||
* The RIFF parser doesn't contain a required chunk while parsing file.
|
||||
*/
|
||||
#define DMUS_E_CHUNKNOTFOUND MAKE_DMHRESULTERROR(0x0117)
|
||||
|
||||
/* DMUS_E_INVALID_DOWNLOADID
|
||||
*
|
||||
* Invalid download id was used in the process of creating a download buffer.
|
||||
*/
|
||||
#define DMUS_E_INVALID_DOWNLOADID MAKE_DMHRESULTERROR(0x0119)
|
||||
|
||||
/* DMUS_E_NOT_DOWNLOADED_TO_PORT
|
||||
*
|
||||
* Tried to unload an object that was not downloaded or previously unloaded.
|
||||
*/
|
||||
#define DMUS_E_NOT_DOWNLOADED_TO_PORT MAKE_DMHRESULTERROR(0x0120)
|
||||
|
||||
/* DMUS_E_ALREADY_DOWNLOADED
|
||||
*
|
||||
* Buffer was already downloaded to synth.
|
||||
*/
|
||||
#define DMUS_E_ALREADY_DOWNLOADED MAKE_DMHRESULTERROR(0x0121)
|
||||
|
||||
/* DMUS_E_UNKNOWN_PROPERTY
|
||||
*
|
||||
* The specified property item was not recognized by the target object.
|
||||
*/
|
||||
#define DMUS_E_UNKNOWN_PROPERTY MAKE_DMHRESULTERROR(0x0122)
|
||||
|
||||
/* DMUS_E_SET_UNSUPPORTED
|
||||
*
|
||||
* The specified property item may not be set on the target object.
|
||||
*/
|
||||
#define DMUS_E_SET_UNSUPPORTED MAKE_DMHRESULTERROR(0x0123)
|
||||
|
||||
/* DMUS_E_GET_UNSUPPORTED
|
||||
*
|
||||
* The specified property item may not be retrieved from the target object.
|
||||
*/
|
||||
#define DMUS_E_GET_UNSUPPORTED MAKE_DMHRESULTERROR(0x0124)
|
||||
|
||||
/* DMUS_E_NOTMONO
|
||||
*
|
||||
* Wave chunk has more than one interleaved channel. DLS format requires MONO.
|
||||
*/
|
||||
#define DMUS_E_NOTMONO MAKE_DMHRESULTERROR(0x0125)
|
||||
|
||||
/* DMUS_E_BADARTICULATION
|
||||
*
|
||||
* Invalid articulation chunk in DLS collection.
|
||||
*/
|
||||
#define DMUS_E_BADARTICULATION MAKE_DMHRESULTERROR(0x0126)
|
||||
|
||||
/* DMUS_E_BADINSTRUMENT
|
||||
*
|
||||
* Invalid instrument chunk in DLS collection.
|
||||
*/
|
||||
#define DMUS_E_BADINSTRUMENT MAKE_DMHRESULTERROR(0x0127)
|
||||
|
||||
/* DMUS_E_BADWAVELINK
|
||||
*
|
||||
* Wavelink chunk in DLS collection points to invalid wave.
|
||||
*/
|
||||
#define DMUS_E_BADWAVELINK MAKE_DMHRESULTERROR(0x0128)
|
||||
|
||||
/* DMUS_E_NOARTICULATION
|
||||
*
|
||||
* Articulation missing from instrument in DLS collection.
|
||||
*/
|
||||
#define DMUS_E_NOARTICULATION MAKE_DMHRESULTERROR(0x0129)
|
||||
|
||||
/* DMUS_E_NOTPCM
|
||||
*
|
||||
* Downoaded DLS wave is not in PCM format.
|
||||
*/
|
||||
#define DMUS_E_NOTPCM MAKE_DMHRESULTERROR(0x012A)
|
||||
|
||||
/* DMUS_E_BADWAVE
|
||||
*
|
||||
* Bad wave chunk in DLS collection
|
||||
*/
|
||||
#define DMUS_E_BADWAVE MAKE_DMHRESULTERROR(0x012B)
|
||||
|
||||
/* DMUS_E_BADOFFSETTABLE
|
||||
*
|
||||
* Offset Table for download buffer has errors.
|
||||
*/
|
||||
#define DMUS_E_BADOFFSETTABLE MAKE_DMHRESULTERROR(0x012C)
|
||||
|
||||
/* DMUS_E_UNKNOWNDOWNLOAD
|
||||
*
|
||||
* Attempted to download unknown data type.
|
||||
*/
|
||||
#define DMUS_E_UNKNOWNDOWNLOAD MAKE_DMHRESULTERROR(0x012D)
|
||||
|
||||
/* DMUS_E_NOSYNTHSINK
|
||||
*
|
||||
* The operation could not be completed because no sink was connected to
|
||||
* the synthesizer.
|
||||
*/
|
||||
#define DMUS_E_NOSYNTHSINK MAKE_DMHRESULTERROR(0x012E)
|
||||
|
||||
/* DMUS_E_ALREADYOPEN
|
||||
*
|
||||
* An attempt was made to open the software synthesizer while it was already
|
||||
* open.
|
||||
* ASSERT?
|
||||
*/
|
||||
#define DMUS_E_ALREADYOPEN MAKE_DMHRESULTERROR(0x012F)
|
||||
|
||||
/* DMUS_E_ALREADYCLOSE
|
||||
*
|
||||
* An attempt was made to close the software synthesizer while it was already
|
||||
* open.
|
||||
* ASSERT?
|
||||
*/
|
||||
#define DMUS_E_ALREADYCLOSED MAKE_DMHRESULTERROR(0x0130)
|
||||
|
||||
/* DMUS_E_SYNTHNOTCONFIGURED
|
||||
*
|
||||
* The operation could not be completed because the software synth has not
|
||||
* yet been fully configured.
|
||||
* ASSERT?
|
||||
*/
|
||||
#define DMUS_E_SYNTHNOTCONFIGURED MAKE_DMHRESULTERROR(0x0131)
|
||||
|
||||
/* DMUS_E_SYNTHACTIVE
|
||||
*
|
||||
* The operation cannot be carried out while the synthesizer is active.
|
||||
*/
|
||||
#define DMUS_E_SYNTHACTIVE MAKE_DMHRESULTERROR(0x0132)
|
||||
|
||||
/* DMUS_E_CANNOTREAD
|
||||
*
|
||||
* An error occurred while attempting to read from the IStream* object.
|
||||
*/
|
||||
#define DMUS_E_CANNOTREAD MAKE_DMHRESULTERROR(0x0133)
|
||||
|
||||
/* DMUS_E_DMUSIC_RELEASED
|
||||
*
|
||||
* The operation cannot be performed because the final instance of the
|
||||
* DirectMusic object was released. Ports cannot be used after final
|
||||
* release of the DirectMusic object.
|
||||
*/
|
||||
#define DMUS_E_DMUSIC_RELEASED MAKE_DMHRESULTERROR(0x0134)
|
||||
|
||||
/* DMUS_E_BUFFER_EMPTY
|
||||
*
|
||||
* There was no data in the referenced buffer.
|
||||
*/
|
||||
#define DMUS_E_BUFFER_EMPTY MAKE_DMHRESULTERROR(0x0135)
|
||||
|
||||
/* DMUS_E_BUFFER_FULL
|
||||
*
|
||||
* There is insufficient space to insert the given event into the buffer.
|
||||
*/
|
||||
#define DMUS_E_BUFFER_FULL MAKE_DMHRESULTERROR(0x0136)
|
||||
|
||||
/* DMUS_E_PORT_NOT_CAPTURE
|
||||
*
|
||||
* The given operation could not be carried out because the port is a
|
||||
* capture port.
|
||||
*/
|
||||
#define DMUS_E_PORT_NOT_CAPTURE MAKE_DMHRESULTERROR(0x0137)
|
||||
|
||||
/* DMUS_E_PORT_NOT_RENDER
|
||||
*
|
||||
* The given operation could not be carried out because the port is a
|
||||
* render port.
|
||||
*/
|
||||
#define DMUS_E_PORT_NOT_RENDER MAKE_DMHRESULTERROR(0x0138)
|
||||
|
||||
/* DMUS_E_DSOUND_NOT_SET
|
||||
*
|
||||
* The port could not be created because no DirectSound has been specified.
|
||||
* Specify a DirectSound interface via the IDirectMusic::SetDirectSound
|
||||
* method; pass NULL to have DirectMusic manage usage of DirectSound.
|
||||
*/
|
||||
#define DMUS_E_DSOUND_NOT_SET MAKE_DMHRESULTERROR(0x0139)
|
||||
|
||||
/* DMUS_E_ALREADY_ACTIVATED
|
||||
*
|
||||
* The operation cannot be carried out while the port is active.
|
||||
*/
|
||||
#define DMUS_E_ALREADY_ACTIVATED MAKE_DMHRESULTERROR(0x013A)
|
||||
|
||||
/* DMUS_E_INVALIDBUFFER
|
||||
*
|
||||
* Invalid DirectSound buffer was handed to port.
|
||||
*/
|
||||
#define DMUS_E_INVALIDBUFFER MAKE_DMHRESULTERROR(0x013B)
|
||||
|
||||
/* DMUS_E_WAVEFORMATNOTSUPPORTED
|
||||
*
|
||||
* Invalid buffer format was handed to the synth sink.
|
||||
*/
|
||||
#define DMUS_E_WAVEFORMATNOTSUPPORTED MAKE_DMHRESULTERROR(0x013C)
|
||||
|
||||
/* DMUS_E_SYNTHINACTIVE
|
||||
*
|
||||
* The operation cannot be carried out while the synthesizer is inactive.
|
||||
*/
|
||||
#define DMUS_E_SYNTHINACTIVE MAKE_DMHRESULTERROR(0x013D)
|
||||
|
||||
/* DMUS_E_DSOUND_ALREADY_SET
|
||||
*
|
||||
* IDirectMusic::SetDirectSound has already been called. It may not be
|
||||
* changed while in use.
|
||||
*/
|
||||
#define DMUS_E_DSOUND_ALREADY_SET MAKE_DMHRESULTERROR(0x013E)
|
||||
|
||||
/* DMUS_E_INVALID_EVENT
|
||||
*
|
||||
* The given event is invalid (either it is not a valid MIDI message
|
||||
* or it makes use of running status). The event cannot be packed
|
||||
* into the buffer.
|
||||
*/
|
||||
#define DMUS_E_INVALID_EVENT MAKE_DMHRESULTERROR(0x013F)
|
||||
|
||||
/* DMUS_E_UNSUPPORTED_STREAM
|
||||
*
|
||||
* The IStream* object does not contain data supported by the loading object.
|
||||
*/
|
||||
#define DMUS_E_UNSUPPORTED_STREAM MAKE_DMHRESULTERROR(0x0150)
|
||||
|
||||
/* DMUS_E_ALREADY_INITED
|
||||
*
|
||||
* The object has already been initialized.
|
||||
*/
|
||||
#define DMUS_E_ALREADY_INITED MAKE_DMHRESULTERROR(0x0151)
|
||||
|
||||
/* DMUS_E_INVALID_BAND
|
||||
*
|
||||
* The file does not contain a valid band.
|
||||
*/
|
||||
#define DMUS_E_INVALID_BAND MAKE_DMHRESULTERROR(0x0152)
|
||||
|
||||
/* DMUS_E_TRACK_HDR_NOT_FIRST_CK
|
||||
*
|
||||
* The IStream* object's data does not have a track header as the first chunk,
|
||||
* and therefore can not be read by the segment object.
|
||||
*/
|
||||
#define DMUS_E_TRACK_HDR_NOT_FIRST_CK MAKE_DMHRESULTERROR(0x0155)
|
||||
|
||||
/* DMUS_E_TOOL_HDR_NOT_FIRST_CK
|
||||
*
|
||||
* The IStream* object's data does not have a tool header as the first chunk,
|
||||
* and therefore can not be read by the graph object.
|
||||
*/
|
||||
#define DMUS_E_TOOL_HDR_NOT_FIRST_CK MAKE_DMHRESULTERROR(0x0156)
|
||||
|
||||
/* DMUS_E_INVALID_TRACK_HDR
|
||||
*
|
||||
* The IStream* object's data contains an invalid track header (ckid is 0 and
|
||||
* fccType is NULL,) and therefore can not be read by the segment object.
|
||||
*/
|
||||
#define DMUS_E_INVALID_TRACK_HDR MAKE_DMHRESULTERROR(0x0157)
|
||||
|
||||
/* DMUS_E_INVALID_TOOL_HDR
|
||||
*
|
||||
* The IStream* object's data contains an invalid tool header (ckid is 0 and
|
||||
* fccType is NULL,) and therefore can not be read by the graph object.
|
||||
*/
|
||||
#define DMUS_E_INVALID_TOOL_HDR MAKE_DMHRESULTERROR(0x0158)
|
||||
|
||||
/* DMUS_E_ALL_TOOLS_FAILED
|
||||
*
|
||||
* The graph object was unable to load all tools from the IStream* object data.
|
||||
* This may be due to errors in the stream, or the tools being incorrectly
|
||||
* registered on the client.
|
||||
*/
|
||||
#define DMUS_E_ALL_TOOLS_FAILED MAKE_DMHRESULTERROR(0x0159)
|
||||
|
||||
/* DMUS_E_ALL_TRACKS_FAILED
|
||||
*
|
||||
* The segment object was unable to load all tracks from the IStream* object data.
|
||||
* This may be due to errors in the stream, or the tracks being incorrectly
|
||||
* registered on the client.
|
||||
*/
|
||||
#define DMUS_E_ALL_TRACKS_FAILED MAKE_DMHRESULTERROR(0x0160)
|
||||
|
||||
/* DMUS_E_NOT_FOUND
|
||||
*
|
||||
* The requested item was not contained by the object.
|
||||
*/
|
||||
#define DMUS_E_NOT_FOUND MAKE_DMHRESULTERROR(0x0161)
|
||||
|
||||
/* DMUS_E_NOT_INIT
|
||||
*
|
||||
* A required object is not initialized or failed to initialize.
|
||||
*/
|
||||
#define DMUS_E_NOT_INIT MAKE_DMHRESULTERROR(0x0162)
|
||||
|
||||
/* DMUS_E_TYPE_DISABLED
|
||||
*
|
||||
* The requested parameter type is currently disabled. Parameter types may
|
||||
* be enabled and disabled by certain calls to SetParam().
|
||||
*/
|
||||
#define DMUS_E_TYPE_DISABLED MAKE_DMHRESULTERROR(0x0163)
|
||||
|
||||
/* DMUS_E_TYPE_UNSUPPORTED
|
||||
*
|
||||
* The requested parameter type is not supported on the object.
|
||||
*/
|
||||
#define DMUS_E_TYPE_UNSUPPORTED MAKE_DMHRESULTERROR(0x0164)
|
||||
|
||||
/* DMUS_E_TIME_PAST
|
||||
*
|
||||
* The time is in the past, and the operation can not succeed.
|
||||
*/
|
||||
#define DMUS_E_TIME_PAST MAKE_DMHRESULTERROR(0x0165)
|
||||
|
||||
/* DMUS_E_TRACK_NOT_FOUND
|
||||
*
|
||||
* The requested track is not contained by the segment.
|
||||
*/
|
||||
#define DMUS_E_TRACK_NOT_FOUND MAKE_DMHRESULTERROR(0x0166)
|
||||
|
||||
/* DMUS_E_TRACK_NO_CLOCKTIME_SUPPORT
|
||||
*
|
||||
* The track does not support clock time playback or getparam.
|
||||
*/
|
||||
#define DMUS_E_TRACK_NO_CLOCKTIME_SUPPORT MAKE_DMHRESULTERROR(0x0167)
|
||||
|
||||
/* DMUS_E_NO_MASTER_CLOCK
|
||||
*
|
||||
* There is no master clock in the performance. Be sure to call
|
||||
* IDirectMusicPerformance::Init().
|
||||
*/
|
||||
#define DMUS_E_NO_MASTER_CLOCK MAKE_DMHRESULTERROR(0x0170)
|
||||
|
||||
/* DMUS_E_LOADER_NOCLASSID
|
||||
*
|
||||
* The class id field is required and missing in the DMUS_OBJECTDESC.
|
||||
*/
|
||||
#define DMUS_E_LOADER_NOCLASSID MAKE_DMHRESULTERROR(0x0180)
|
||||
|
||||
/* DMUS_E_LOADER_BADPATH
|
||||
*
|
||||
* The requested file path is invalid.
|
||||
*/
|
||||
#define DMUS_E_LOADER_BADPATH MAKE_DMHRESULTERROR(0x0181)
|
||||
|
||||
/* DMUS_E_LOADER_FAILEDOPEN
|
||||
*
|
||||
* File open failed - either file doesn't exist or is locked.
|
||||
*/
|
||||
#define DMUS_E_LOADER_FAILEDOPEN MAKE_DMHRESULTERROR(0x0182)
|
||||
|
||||
/* DMUS_E_LOADER_FORMATNOTSUPPORTED
|
||||
*
|
||||
* Search data type is not supported.
|
||||
*/
|
||||
#define DMUS_E_LOADER_FORMATNOTSUPPORTED MAKE_DMHRESULTERROR(0x0183)
|
||||
|
||||
/* DMUS_E_LOADER_FAILEDCREATE
|
||||
*
|
||||
* Unable to find or create object.
|
||||
*/
|
||||
#define DMUS_E_LOADER_FAILEDCREATE MAKE_DMHRESULTERROR(0x0184)
|
||||
|
||||
/* DMUS_E_LOADER_OBJECTNOTFOUND
|
||||
*
|
||||
* Object was not found.
|
||||
*/
|
||||
#define DMUS_E_LOADER_OBJECTNOTFOUND MAKE_DMHRESULTERROR(0x0185)
|
||||
|
||||
/* DMUS_E_LOADER_NOFILENAME
|
||||
*
|
||||
* The file name is missing from the DMUS_OBJECTDESC.
|
||||
*/
|
||||
#define DMUS_E_LOADER_NOFILENAME MAKE_DMHRESULTERROR(0x0186)
|
||||
|
||||
/* DMUS_E_INVALIDFILE
|
||||
*
|
||||
* The file requested is not a valid file.
|
||||
*/
|
||||
#define DMUS_E_INVALIDFILE MAKE_DMHRESULTERROR(0x0200)
|
||||
|
||||
/* DMUS_E_ALREADY_EXISTS
|
||||
*
|
||||
* The tool is already contained in the graph. Create a new instance.
|
||||
*/
|
||||
#define DMUS_E_ALREADY_EXISTS MAKE_DMHRESULTERROR(0x0201)
|
||||
|
||||
/* DMUS_E_OUT_OF_RANGE
|
||||
*
|
||||
* Value is out of range, for instance the requested length is longer than
|
||||
* the segment.
|
||||
*/
|
||||
#define DMUS_E_OUT_OF_RANGE MAKE_DMHRESULTERROR(0x0202)
|
||||
|
||||
/* DMUS_E_SEGMENT_INIT_FAILED
|
||||
*
|
||||
* Segment initialization failed, most likely due to a critical memory situation.
|
||||
*/
|
||||
#define DMUS_E_SEGMENT_INIT_FAILED MAKE_DMHRESULTERROR(0x0203)
|
||||
|
||||
/* DMUS_E_ALREADY_SENT
|
||||
*
|
||||
* The DMUS_PMSG has already been sent to the performance object via
|
||||
* IDirectMusicPerformance::SendPMsg().
|
||||
*/
|
||||
#define DMUS_E_ALREADY_SENT MAKE_DMHRESULTERROR(0x0204)
|
||||
|
||||
/* DMUS_E_CANNOT_FREE
|
||||
*
|
||||
* The DMUS_PMSG was either not allocated by the performance via
|
||||
* IDirectMusicPerformance::AllocPMsg(), or it was already freed via
|
||||
* IDirectMusicPerformance::FreePMsg().
|
||||
*/
|
||||
#define DMUS_E_CANNOT_FREE MAKE_DMHRESULTERROR(0x0205)
|
||||
|
||||
/* DMUS_E_CANNOT_OPEN_PORT
|
||||
*
|
||||
* The default system port could not be opened.
|
||||
*/
|
||||
#define DMUS_E_CANNOT_OPEN_PORT MAKE_DMHRESULTERROR(0x0206)
|
||||
|
||||
/* DMUS_E_CANNOT_CONVERT
|
||||
*
|
||||
* A call to MIDIToMusic() or MusicToMIDI() resulted in an error because
|
||||
* the requested conversion could not happen. This usually occurs when the
|
||||
* provided DMUS_CHORD_KEY structure has an invalid chord or scale pattern.
|
||||
*/
|
||||
#define DMUS_E_CANNOT_CONVERT MAKE_DMHRESULTERROR(0x0207)
|
||||
/* misspelling in previous versions of DirectX preserved for backward compatibility */
|
||||
#define DMUS_E_CONNOT_CONVERT DMUS_E_CANNOT_CONVERT
|
||||
|
||||
/* DMUS_E_DESCEND_CHUNK_FAIL
|
||||
*
|
||||
* DMUS_E_DESCEND_CHUNK_FAIL is returned when the end of the file
|
||||
* was reached before the desired chunk was found.
|
||||
*/
|
||||
#define DMUS_E_DESCEND_CHUNK_FAIL MAKE_DMHRESULTERROR(0x0210)
|
||||
|
||||
/* DMUS_E_NOT_LOADED
|
||||
*
|
||||
* An attempt to use this object failed because it first needs to
|
||||
* be loaded.
|
||||
*/
|
||||
#define DMUS_E_NOT_LOADED MAKE_DMHRESULTERROR(0x0211)
|
||||
|
||||
/* DMUS_E_SCRIPT_LANGUAGE_INCOMPATIBLE
|
||||
*
|
||||
* The activeX scripting engine for the script's language is not compatible with
|
||||
* DirectMusic.
|
||||
*
|
||||
*/
|
||||
#define DMUS_E_SCRIPT_LANGUAGE_INCOMPATIBLE MAKE_DMHRESULTERROR(0x0213)
|
||||
|
||||
/* DMUS_E_SCRIPT_UNSUPPORTED_VARTYPE
|
||||
*
|
||||
* A varient was used that had a type that is not supported by DirectMusic.
|
||||
*
|
||||
*/
|
||||
#define DMUS_E_SCRIPT_UNSUPPORTED_VARTYPE MAKE_DMHRESULTERROR(0x0214)
|
||||
|
||||
/* DMUS_E_SCRIPT_ERROR_IN_SCRIPT
|
||||
*
|
||||
* An error was encountered while parsing or executing the script.
|
||||
* The pErrorInfo parameter (if supplied) was filled with information about the error.
|
||||
*/
|
||||
#define DMUS_E_SCRIPT_ERROR_IN_SCRIPT MAKE_DMHRESULTERROR(0x0215)
|
||||
|
||||
/* DMUS_E_SCRIPT_CANTLOAD_OLEAUT32
|
||||
*
|
||||
* Loading of oleaut32.dll failed. VBScript and other activeX scripting languages
|
||||
* require use of oleaut32.dll. On platforms where oleaut32.dll is not present, only
|
||||
* the DirectMusicScript language, which doesn't require oleaut32.dll can be used.
|
||||
*/
|
||||
#define DMUS_E_SCRIPT_CANTLOAD_OLEAUT32 MAKE_DMHRESULTERROR(0x0216)
|
||||
|
||||
/* DMUS_E_SCRIPT_LOADSCRIPT_ERROR
|
||||
*
|
||||
* An error occured while parsing a script loaded using LoadScript. The script that
|
||||
* was loaded contains an error.
|
||||
*/
|
||||
#define DMUS_E_SCRIPT_LOADSCRIPT_ERROR MAKE_DMHRESULTERROR(0x0217)
|
||||
|
||||
/* DMUS_E_SCRIPT_INVALID_FILE
|
||||
*
|
||||
* The script file is invalid.
|
||||
*/
|
||||
#define DMUS_E_SCRIPT_INVALID_FILE MAKE_DMHRESULTERROR(0x0218)
|
||||
|
||||
/* DMUS_E_INVALID_SCRIPTTRACK
|
||||
*
|
||||
* The file contains an invalid script track.
|
||||
*/
|
||||
#define DMUS_E_INVALID_SCRIPTTRACK MAKE_DMHRESULTERROR(0x0219)
|
||||
|
||||
/* DMUS_E_SCRIPT_VARIABLE_NOT_FOUND
|
||||
*
|
||||
* The script does not contain a variable with the specified name.
|
||||
*/
|
||||
#define DMUS_E_SCRIPT_VARIABLE_NOT_FOUND MAKE_DMHRESULTERROR(0x021A)
|
||||
|
||||
/* DMUS_E_SCRIPT_ROUTINE_NOT_FOUND
|
||||
*
|
||||
* The script does not contain a routine with the specified name.
|
||||
*/
|
||||
#define DMUS_E_SCRIPT_ROUTINE_NOT_FOUND MAKE_DMHRESULTERROR(0x021B)
|
||||
|
||||
/* DMUS_E_SCRIPT_CONTENT_READONLY
|
||||
*
|
||||
* Scripts variables for content referenced or embedded in a script cannot be set.
|
||||
*/
|
||||
#define DMUS_E_SCRIPT_CONTENT_READONLY MAKE_DMHRESULTERROR(0x021C)
|
||||
|
||||
/* DMUS_E_SCRIPT_NOT_A_REFERENCE
|
||||
*
|
||||
* Attempt was made to set a script's variable by reference to a value that was
|
||||
* not an object type.
|
||||
*/
|
||||
#define DMUS_E_SCRIPT_NOT_A_REFERENCE MAKE_DMHRESULTERROR(0x021D)
|
||||
|
||||
/* DMUS_E_SCRIPT_VALUE_NOT_SUPPORTED
|
||||
*
|
||||
* Attempt was made to set a script's variable by value to an object that does
|
||||
* not support a default value property.
|
||||
*/
|
||||
#define DMUS_E_SCRIPT_VALUE_NOT_SUPPORTED MAKE_DMHRESULTERROR(0x021E)
|
||||
|
||||
/* DMUS_E_INVALID_SEGMENTTRIGGERTRACK
|
||||
*
|
||||
* The file contains an invalid segment trigger track.
|
||||
*/
|
||||
#define DMUS_E_INVALID_SEGMENTTRIGGERTRACK MAKE_DMHRESULTERROR(0x0220)
|
||||
|
||||
/* DMUS_E_INVALID_LYRICSTRACK
|
||||
*
|
||||
* The file contains an invalid lyrics track.
|
||||
*/
|
||||
#define DMUS_E_INVALID_LYRICSTRACK MAKE_DMHRESULTERROR(0x0221)
|
||||
|
||||
/* DMUS_E_INVALID_PARAMCONTROLTRACK
|
||||
*
|
||||
* The file contains an invalid parameter control track.
|
||||
*/
|
||||
#define DMUS_E_INVALID_PARAMCONTROLTRACK MAKE_DMHRESULTERROR(0x0222)
|
||||
|
||||
/* DMUS_E_AUDIOVBSCRIPT_SYNTAXERROR
|
||||
*
|
||||
* A script written in AudioVBScript could not be read because it contained a statement that
|
||||
* is not allowed by the AudioVBScript language.
|
||||
*/
|
||||
#define DMUS_E_AUDIOVBSCRIPT_SYNTAXERROR MAKE_DMHRESULTERROR(0x0223)
|
||||
|
||||
/* DMUS_E_AUDIOVBSCRIPT_RUNTIMEERROR
|
||||
*
|
||||
* A script routine written in AudioVBScript failed because an invalid operation occurred. For example,
|
||||
* adding the number 3 to a segment object would produce this error. So would attempting to call a routine
|
||||
* that doesn't exist.
|
||||
*/
|
||||
#define DMUS_E_AUDIOVBSCRIPT_RUNTIMEERROR MAKE_DMHRESULTERROR(0x0224)
|
||||
|
||||
/* DMUS_E_AUDIOVBSCRIPT_OPERATIONFAILURE
|
||||
*
|
||||
* A script routine written in AudioVBScript failed because a function outside of a script failed to complete.
|
||||
* For example, a call to PlaySegment that fails to play because of low memory would return this error.
|
||||
*/
|
||||
#define DMUS_E_AUDIOVBSCRIPT_OPERATIONFAILURE MAKE_DMHRESULTERROR(0x0225)
|
||||
|
||||
/* DMUS_E_AUDIOPATHS_NOT_VALID
|
||||
*
|
||||
* The Performance has set up some PChannels using the AssignPChannel command, which
|
||||
* makes it not capable of supporting audio paths.
|
||||
*/
|
||||
#define DMUS_E_AUDIOPATHS_NOT_VALID MAKE_DMHRESULTERROR(0x0226)
|
||||
|
||||
/* DMUS_E_AUDIOPATHS_IN_USE
|
||||
*
|
||||
* This is the inverse of the previous error.
|
||||
* The Performance has set up some audio paths, which makes is incompatible
|
||||
* with the calls to allocate pchannels, etc.
|
||||
*/
|
||||
#define DMUS_E_AUDIOPATHS_IN_USE MAKE_DMHRESULTERROR(0x0227)
|
||||
|
||||
/* DMUS_E_NO_AUDIOPATH_CONFIG
|
||||
*
|
||||
* A segment or song was asked for its embedded audio path configuration,
|
||||
* but there isn't any.
|
||||
*/
|
||||
#define DMUS_E_NO_AUDIOPATH_CONFIG MAKE_DMHRESULTERROR(0x0228)
|
||||
|
||||
/* DMUS_E_AUDIOPATH_INACTIVE
|
||||
*
|
||||
* An audiopath is inactive, perhaps because closedown was called.
|
||||
*/
|
||||
#define DMUS_E_AUDIOPATH_INACTIVE MAKE_DMHRESULTERROR(0x0229)
|
||||
|
||||
/* DMUS_E_AUDIOPATH_NOBUFFER
|
||||
*
|
||||
* An audiopath failed to create because a requested buffer could not be created.
|
||||
*/
|
||||
#define DMUS_E_AUDIOPATH_NOBUFFER MAKE_DMHRESULTERROR(0x022A)
|
||||
|
||||
/* DMUS_E_AUDIOPATH_NOPORT
|
||||
*
|
||||
* An audiopath could not be used for playback because it lacked port assignments.
|
||||
*/
|
||||
#define DMUS_E_AUDIOPATH_NOPORT MAKE_DMHRESULTERROR(0x022B)
|
||||
|
||||
/* DMUS_E_NO_AUDIOPATH
|
||||
*
|
||||
* Attempt was made to play segment in audiopath mode and there was no audiopath.
|
||||
*/
|
||||
#define DMUS_E_NO_AUDIOPATH MAKE_DMHRESULTERROR(0x022C)
|
||||
|
||||
/* DMUS_E_INVALIDCHUNK
|
||||
*
|
||||
* Invalid data was found in a RIFF file chunk.
|
||||
*/
|
||||
#define DMUS_E_INVALIDCHUNK MAKE_DMHRESULTERROR(0x022D)
|
||||
|
||||
/* DMUS_E_AUDIOPATH_NOGLOBALFXBUFFER
|
||||
*
|
||||
* Attempt was made to create an audiopath that sends to a global effects buffer which did not exist.
|
||||
*/
|
||||
#define DMUS_E_AUDIOPATH_NOGLOBALFXBUFFER MAKE_DMHRESULTERROR(0x022E)
|
||||
|
||||
/* DMUS_E_INVALID_CONTAINER_OBJECT
|
||||
*
|
||||
* The file does not contain a valid container object.
|
||||
*/
|
||||
#define DMUS_E_INVALID_CONTAINER_OBJECT MAKE_DMHRESULTERROR(0x022F)
|
||||
|
||||
#endif
|
Some files were not shown because too many files have changed in this diff Show More
Loading…
Reference in New Issue