ReactOS.org
Sign In
Sign Up
Sign In
Sign Up
Manage this list
×
Keyboard Shortcuts
Thread View
j
: Next unread message
k
: Previous unread message
j a
: Jump to all threads
j l
: Jump to MailingList overview
2024
December
November
October
September
August
July
June
May
April
March
February
January
2023
December
November
October
September
August
July
June
May
April
March
February
January
2022
December
November
October
September
August
July
June
May
April
March
February
January
2021
December
November
October
September
August
July
June
May
April
March
February
January
2020
December
November
October
September
August
July
June
May
April
March
February
January
2019
December
November
October
September
August
July
June
May
April
March
February
January
2018
December
November
October
September
August
July
June
May
April
March
February
January
2017
December
November
October
September
August
July
June
May
April
March
February
January
2016
December
November
October
September
August
July
June
May
April
March
February
January
2015
December
November
October
September
August
July
June
May
April
March
February
January
2014
December
November
October
September
August
July
June
May
April
March
February
January
2013
December
November
October
September
August
July
June
May
April
March
February
January
2012
December
November
October
September
August
July
June
May
April
March
February
January
2011
December
November
October
September
August
July
June
May
April
March
February
January
2010
December
November
October
September
August
July
June
May
April
March
February
January
2009
December
November
October
September
August
July
June
May
April
March
February
January
2008
December
November
October
September
August
July
June
May
April
March
February
January
2007
December
November
October
September
August
July
June
May
April
March
February
January
2006
December
November
October
September
August
July
June
May
April
March
February
January
2005
December
November
October
September
August
July
June
May
April
March
February
January
2004
December
November
October
September
August
July
June
May
April
March
February
List overview
Download
Ros-diffs
March 2010
----- 2024 -----
December 2024
November 2024
October 2024
September 2024
August 2024
July 2024
June 2024
May 2024
April 2024
March 2024
February 2024
January 2024
----- 2023 -----
December 2023
November 2023
October 2023
September 2023
August 2023
July 2023
June 2023
May 2023
April 2023
March 2023
February 2023
January 2023
----- 2022 -----
December 2022
November 2022
October 2022
September 2022
August 2022
July 2022
June 2022
May 2022
April 2022
March 2022
February 2022
January 2022
----- 2021 -----
December 2021
November 2021
October 2021
September 2021
August 2021
July 2021
June 2021
May 2021
April 2021
March 2021
February 2021
January 2021
----- 2020 -----
December 2020
November 2020
October 2020
September 2020
August 2020
July 2020
June 2020
May 2020
April 2020
March 2020
February 2020
January 2020
----- 2019 -----
December 2019
November 2019
October 2019
September 2019
August 2019
July 2019
June 2019
May 2019
April 2019
March 2019
February 2019
January 2019
----- 2018 -----
December 2018
November 2018
October 2018
September 2018
August 2018
July 2018
June 2018
May 2018
April 2018
March 2018
February 2018
January 2018
----- 2017 -----
December 2017
November 2017
October 2017
September 2017
August 2017
July 2017
June 2017
May 2017
April 2017
March 2017
February 2017
January 2017
----- 2016 -----
December 2016
November 2016
October 2016
September 2016
August 2016
July 2016
June 2016
May 2016
April 2016
March 2016
February 2016
January 2016
----- 2015 -----
December 2015
November 2015
October 2015
September 2015
August 2015
July 2015
June 2015
May 2015
April 2015
March 2015
February 2015
January 2015
----- 2014 -----
December 2014
November 2014
October 2014
September 2014
August 2014
July 2014
June 2014
May 2014
April 2014
March 2014
February 2014
January 2014
----- 2013 -----
December 2013
November 2013
October 2013
September 2013
August 2013
July 2013
June 2013
May 2013
April 2013
March 2013
February 2013
January 2013
----- 2012 -----
December 2012
November 2012
October 2012
September 2012
August 2012
July 2012
June 2012
May 2012
April 2012
March 2012
February 2012
January 2012
----- 2011 -----
December 2011
November 2011
October 2011
September 2011
August 2011
July 2011
June 2011
May 2011
April 2011
March 2011
February 2011
January 2011
----- 2010 -----
December 2010
November 2010
October 2010
September 2010
August 2010
July 2010
June 2010
May 2010
April 2010
March 2010
February 2010
January 2010
----- 2009 -----
December 2009
November 2009
October 2009
September 2009
August 2009
July 2009
June 2009
May 2009
April 2009
March 2009
February 2009
January 2009
----- 2008 -----
December 2008
November 2008
October 2008
September 2008
August 2008
July 2008
June 2008
May 2008
April 2008
March 2008
February 2008
January 2008
----- 2007 -----
December 2007
November 2007
October 2007
September 2007
August 2007
July 2007
June 2007
May 2007
April 2007
March 2007
February 2007
January 2007
----- 2006 -----
December 2006
November 2006
October 2006
September 2006
August 2006
July 2006
June 2006
May 2006
April 2006
March 2006
February 2006
January 2006
----- 2005 -----
December 2005
November 2005
October 2005
September 2005
August 2005
July 2005
June 2005
May 2005
April 2005
March 2005
February 2005
January 2005
----- 2004 -----
December 2004
November 2004
October 2004
September 2004
August 2004
July 2004
June 2004
May 2004
April 2004
March 2004
February 2004
ros-diffs@reactos.org
19 participants
896 discussions
Start a n
N
ew thread
[akhaldi] 45757: - Move more stuff to wdm.h - Improve Interrupt Request Level definitions - KeGetCurrentIrql : DDKAPI -> NTAPI - KeGetCurrentThread : Fix the definition, remove a redundant one and NTKERNELAPI -> NTSYSAPI
by akhaldi@svn.reactos.org
Author: akhaldi Date: Tue Mar 2 16:49:27 2010 New Revision: 45757 URL:
http://svn.reactos.org/svn/reactos?rev=45757&view=rev
Log: - Move more stuff to wdm.h - Improve Interrupt Request Level definitions - KeGetCurrentIrql : DDKAPI -> NTAPI - KeGetCurrentThread : Fix the definition, remove a redundant one and NTKERNELAPI -> NTSYSAPI Modified: branches/header-work/include/ddk/wdm.h branches/header-work/include/ddk/winddk.h Modified: branches/header-work/include/ddk/wdm.h URL:
http://svn.reactos.org/svn/reactos/branches/header-work/include/ddk/wdm.h?r…
============================================================================== --- branches/header-work/include/ddk/wdm.h [iso-8859-1] (original) +++ branches/header-work/include/ddk/wdm.h [iso-8859-1] Tue Mar 2 16:49:27 2010 @@ -962,6 +962,14 @@ #define LOCK_QUEUE_TIMER_TABLE_LOCKS (1 << (8 - LOCK_QUEUE_TIMER_LOCK_SHIFT)) #define PROCESSOR_FEATURE_MAX 64 + +#define DBG_STATUS_CONTROL_C 1 +#define DBG_STATUS_SYSRQ 2 +#define DBG_STATUS_BUGCHECK_FIRST 3 +#define DBG_STATUS_BUGCHECK_SECOND 4 +#define DBG_STATUS_FATAL 5 +#define DBG_STATUS_DEBUG_CONTROL 6 +#define DBG_STATUS_WORKER 7 typedef enum _TRACE_INFORMATION_CLASS { TraceIdClass, @@ -4873,6 +4881,10 @@ #define RTL_QUERY_REGISTRY_DIRECT 0x00000020 #define RTL_QUERY_REGISTRY_DELETE 0x00000040 +#define HASH_STRING_ALGORITHM_DEFAULT 0 +#define HASH_STRING_ALGORITHM_X65599 1 +#define HASH_STRING_ALGORITHM_INVALID 0xffffffff + typedef struct _RTL_BITMAP { ULONG SizeOfBitMap; PULONG Buffer; @@ -5920,6 +5932,72 @@ /****************************************************************************** * Executive Types * ******************************************************************************/ + +#define MAXIMUM_SUPPORTED_EXTENSION 512 + +typedef ULONG PFN_COUNT; +typedef ULONG PFN_NUMBER, *PPFN_NUMBER; +typedef LONG SPFN_NUMBER, *PSPFN_NUMBER; + +#if defined(_X86_) + +#define PASSIVE_LEVEL 0 +#define LOW_LEVEL 0 +#define APC_LEVEL 1 +#define DISPATCH_LEVEL 2 +#define CMCI_LEVEL 5 +#define PROFILE_LEVEL 27 +#define CLOCK1_LEVEL 28 +#define CLOCK2_LEVEL 28 +#define IPI_LEVEL 29 +#define POWER_LEVEL 30 +#define HIGH_LEVEL 31 +#define CLOCK_LEVEL (CLOCK2_LEVEL) + +#endif +#if defined(_AMD64_) + +#define PASSIVE_LEVEL 0 +#define LOW_LEVEL 0 +#define APC_LEVEL 1 +#define DISPATCH_LEVEL 2 +#define CMCI_LEVEL 5 +#define CLOCK_LEVEL 13 +#define IPI_LEVEL 14 +#define DRS_LEVEL 14 +#define POWER_LEVEL 14 +#define PROFILE_LEVEL 15 +#define HIGH_LEVEL 15 + +#endif +#if defined(_IA64_) + +#define PASSIVE_LEVEL 0 +#define LOW_LEVEL 0 +#define APC_LEVEL 1 +#define DISPATCH_LEVEL 2 +#define CMC_LEVEL 3 +#define DEVICE_LEVEL_BASE 4 +#define PC_LEVEL 12 +#define IPI_LEVEL 14 +#define DRS_LEVEL 14 +#define CLOCK_LEVEL 13 +#define POWER_LEVEL 15 +#define PROFILE_LEVEL 15 +#define HIGH_LEVEL 15 + +#endif + +typedef struct _KFLOATING_SAVE { + ULONG ControlWord; + ULONG StatusWord; + ULONG ErrorOffset; + ULONG ErrorSelector; + ULONG DataOffset; + ULONG DataSelector; + ULONG Cr0NpxState; + ULONG Spare1; +} KFLOATING_SAVE, *PKFLOATING_SAVE; typedef enum _KBUGCHECK_CALLBACK_REASON { KbCallbackInvalid, @@ -6826,6 +6904,49 @@ #endif // !defined(MIDL_PASS) +NTHALAPI +KIRQL +NTAPI +KeGetCurrentIrql( + VOID); + +#if defined(_M_AMD64) + +ULONG64 +__readgsqword ( + IN ULONG Offset); + +#pragma intrinsic(__readgsqword) + +FORCEINLINE +PKTHREAD +KeGetCurrentThread ( + VOID) +{ + return (struct _KTHREAD *)__readgsqword(0x188); +} + +#endif + +#if defined(_M_IX86) || defined(_M_IA64) + +NTSYSAPI +PKTHREAD +NTAPI +KeGetCurrentThread( + VOID); + +#endif + +/* +** WMI structures +*/ + +typedef VOID +(DDKAPI *WMI_NOTIFICATION_CALLBACK)( + PVOID Wnode, + PVOID Context); + #ifdef __cplusplus } Modified: branches/header-work/include/ddk/winddk.h URL:
http://svn.reactos.org/svn/reactos/branches/header-work/include/ddk/winddk.…
============================================================================== --- branches/header-work/include/ddk/winddk.h [iso-8859-1] (original) +++ branches/header-work/include/ddk/winddk.h [iso-8859-1] Tue Mar 2 16:49:27 2010 @@ -1573,14 +1573,6 @@ IN HANDLE ThreadId, IN KPROCESSOR_MODE Mode); -#define DBG_STATUS_CONTROL_C 1 -#define DBG_STATUS_SYSRQ 2 -#define DBG_STATUS_BUGCHECK_FIRST 3 -#define DBG_STATUS_BUGCHECK_SECOND 4 -#define DBG_STATUS_FATAL 5 -#define DBG_STATUS_DEBUG_CONTROL 6 -#define DBG_STATUS_WORKER 7 - typedef struct _PHYSICAL_MEMORY_RANGE { PHYSICAL_ADDRESS BaseAddress; LARGE_INTEGER NumberOfBytes; @@ -1601,27 +1593,11 @@ #define DRIVER_VERIFIER_TRACK_POOL_ALLOCATIONS 0x0008 #define DRIVER_VERIFIER_IO_CHECKING 0x0010 -#define HASH_STRING_ALGORITHM_DEFAULT 0 -#define HASH_STRING_ALGORITHM_X65599 1 -#define HASH_STRING_ALGORITHM_INVALID 0xffffffff - typedef VOID (DDKAPI *PTIMER_APC_ROUTINE)( IN PVOID TimerContext, IN ULONG TimerLowValue, IN LONG TimerHighValue); - - - -/* -** WMI structures -*/ - -typedef VOID -(DDKAPI *WMI_NOTIFICATION_CALLBACK)( - PVOID Wnode, - PVOID Context); - /* ** Architecture specific structures @@ -1641,7 +1617,6 @@ #define CONTEXT_DEBUG_REGISTERS (CONTEXT_i386|0x00000010L) #define CONTEXT_EXTENDED_REGISTERS (CONTEXT_i386|0x00000020L) #define CONTEXT_FULL (CONTEXT_CONTROL|CONTEXT_INTEGER|CONTEXT_SEGMENTS) -#define MAXIMUM_SUPPORTED_EXTENSION 512 typedef struct _FLOATING_SAVE_AREA { ULONG ControlWord; @@ -1683,24 +1658,6 @@ UCHAR ExtendedRegisters[MAXIMUM_SUPPORTED_EXTENSION]; } CONTEXT; -// -// Used to contain PFNs and PFN counts -// -typedef ULONG PFN_COUNT; -typedef ULONG PFN_NUMBER, *PPFN_NUMBER; -typedef LONG SPFN_NUMBER, *PSPFN_NUMBER; - -#define PASSIVE_LEVEL 0 -#define LOW_LEVEL 0 -#define APC_LEVEL 1 -#define DISPATCH_LEVEL 2 -#define PROFILE_LEVEL 27 -#define CLOCK1_LEVEL 28 -#define CLOCK2_LEVEL 28 -#define IPI_LEVEL 29 -#define POWER_LEVEL 30 -#define HIGH_LEVEL 31 - typedef struct _KPCR_TIB { PVOID ExceptionList; /* 00 */ PVOID StackBase; /* 04 */ @@ -1742,35 +1699,12 @@ #define KeGetPcr() PCR -typedef struct _KFLOATING_SAVE { - ULONG ControlWord; - ULONG StatusWord; - ULONG ErrorOffset; - ULONG ErrorSelector; - ULONG DataOffset; - ULONG DataSelector; - ULONG Cr0NpxState; - ULONG Spare1; -} KFLOATING_SAVE, *PKFLOATING_SAVE; - FORCEINLINE ULONG KeGetCurrentProcessorNumber(VOID) { return (ULONG)__readfsbyte(FIELD_OFFSET(KPCR, Number)); } - -NTHALAPI -KIRQL -DDKAPI -KeGetCurrentIrql( - VOID); - -NTKERNELAPI -PRKTHREAD -NTAPI -KeGetCurrentThread( - VOID); #define KI_USER_SHARED_DATA 0xffdf0000 @@ -2026,12 +1960,6 @@ typedef struct _KFLOATING_SAVE { ULONG Dummy; } KFLOATING_SAVE, *PKFLOATING_SAVE; - -NTKERNELAPI -PRKTHREAD -NTAPI -KeGetCurrentThread( - VOID); FORCEINLINE PKPCR
14 years, 9 months
1
0
0
0
[akhaldi] 45756: - Move more stuff to wdm.h - Fix REG_SET_VALUE_KEY_INFORMATION, REG_DELETE_VALUE_KEY_INFORMATION, REG_SET_INFORMATION_KEY_INFORMATION, REG_ENUMERATE_KEY_INFORMATION, REG_ENUMERATE_VALUE_KEY_INFORMATION, REG_PRE_CREATE_KEY_INFORMATION, REG_POST_CREATE_KEY_INFORMATION, REG_POST_OPERATION_INFORMATION and REG_KEY_HANDLE_CLOSE_INFORMATION definitions.
by akhaldi@svn.reactos.org
Author: akhaldi Date: Tue Mar 2 15:53:28 2010 New Revision: 45756 URL:
http://svn.reactos.org/svn/reactos?rev=45756&view=rev
Log: - Move more stuff to wdm.h - Fix REG_SET_VALUE_KEY_INFORMATION, REG_DELETE_VALUE_KEY_INFORMATION, REG_SET_INFORMATION_KEY_INFORMATION, REG_ENUMERATE_KEY_INFORMATION, REG_ENUMERATE_VALUE_KEY_INFORMATION, REG_PRE_CREATE_KEY_INFORMATION, REG_POST_CREATE_KEY_INFORMATION, REG_POST_OPERATION_INFORMATION and REG_KEY_HANDLE_CLOSE_INFORMATION definitions. Modified: branches/header-work/include/ddk/wdm.h branches/header-work/include/ddk/winddk.h Modified: branches/header-work/include/ddk/wdm.h URL:
http://svn.reactos.org/svn/reactos/branches/header-work/include/ddk/wdm.h?r…
============================================================================== --- branches/header-work/include/ddk/wdm.h [iso-8859-1] (original) +++ branches/header-work/include/ddk/wdm.h [iso-8859-1] Tue Mar 2 15:53:28 2010 @@ -2292,6 +2292,122 @@ , REG_FLUSH_KEY_INFORMATION, *PREG_FLUSH_KEY_INFORMATION #endif ; + +typedef struct _REG_SET_VALUE_KEY_INFORMATION { + PVOID Object; + PUNICODE_STRING ValueName; + ULONG TitleIndex; + ULONG Type; + PVOID Data; + ULONG DataSize; + PVOID CallContext; + PVOID ObjectContext; + PVOID Reserved; +} REG_SET_VALUE_KEY_INFORMATION, *PREG_SET_VALUE_KEY_INFORMATION; + +typedef struct _REG_DELETE_VALUE_KEY_INFORMATION { + PVOID Object; + PUNICODE_STRING ValueName; + PVOID CallContext; + PVOID ObjectContext; + PVOID Reserved; +} REG_DELETE_VALUE_KEY_INFORMATION, *PREG_DELETE_VALUE_KEY_INFORMATION; + +typedef struct _REG_SET_INFORMATION_KEY_INFORMATION { + PVOID Object; + KEY_SET_INFORMATION_CLASS KeySetInformationClass; + PVOID KeySetInformation; + ULONG KeySetInformationLength; + PVOID CallContext; + PVOID ObjectContext; + PVOID Reserved; +} REG_SET_INFORMATION_KEY_INFORMATION, *PREG_SET_INFORMATION_KEY_INFORMATION; + +typedef struct _REG_ENUMERATE_KEY_INFORMATION { + PVOID Object; + ULONG Index; + KEY_INFORMATION_CLASS KeyInformationClass; + PVOID KeyInformation; + ULONG Length; + PULONG ResultLength; + PVOID CallContext; + PVOID ObjectContext; + PVOID Reserved; +} REG_ENUMERATE_KEY_INFORMATION, *PREG_ENUMERATE_KEY_INFORMATION; + +typedef struct _REG_ENUMERATE_VALUE_KEY_INFORMATION { + PVOID Object; + ULONG Index; + KEY_VALUE_INFORMATION_CLASS KeyValueInformationClass; + PVOID KeyValueInformation; + ULONG Length; + PULONG ResultLength; + PVOID CallContext; + PVOID ObjectContext; + PVOID Reserved; +} REG_ENUMERATE_VALUE_KEY_INFORMATION, *PREG_ENUMERATE_VALUE_KEY_INFORMATION; + +typedef struct _REG_QUERY_KEY_INFORMATION { + PVOID Object; + KEY_INFORMATION_CLASS KeyInformationClass; + PVOID KeyInformation; + ULONG Length; + PULONG ResultLength; + PVOID CallContext; + PVOID ObjectContext; + PVOID Reserved; +} REG_QUERY_KEY_INFORMATION, *PREG_QUERY_KEY_INFORMATION; + +typedef struct _REG_QUERY_VALUE_KEY_INFORMATION { + PVOID Object; + PUNICODE_STRING ValueName; + KEY_VALUE_INFORMATION_CLASS KeyValueInformationClass; + PVOID KeyValueInformation; + ULONG Length; + PULONG ResultLength; + PVOID CallContext; + PVOID ObjectContext; + PVOID Reserved; +} REG_QUERY_VALUE_KEY_INFORMATION, *PREG_QUERY_VALUE_KEY_INFORMATION; + +typedef struct _REG_QUERY_MULTIPLE_VALUE_KEY_INFORMATION { + PVOID Object; + PKEY_VALUE_ENTRY ValueEntries; + ULONG EntryCount; + PVOID ValueBuffer; + PULONG BufferLength; + PULONG RequiredBufferLength; + PVOID CallContext; + PVOID ObjectContext; + PVOID Reserved; +} REG_QUERY_MULTIPLE_VALUE_KEY_INFORMATION, *PREG_QUERY_MULTIPLE_VALUE_KEY_INFORMATION; + +typedef struct _REG_PRE_CREATE_KEY_INFORMATION { + PUNICODE_STRING CompleteName; +} REG_PRE_CREATE_KEY_INFORMATION, REG_PRE_OPEN_KEY_INFORMATION,*PREG_PRE_CREATE_KEY_INFORMATION, *PREG_PRE_OPEN_KEY_INFORMATION;; + +typedef struct _REG_POST_CREATE_KEY_INFORMATION { + PUNICODE_STRING CompleteName; + PVOID Object; + NTSTATUS Status; +} REG_POST_CREATE_KEY_INFORMATION,REG_POST_OPEN_KEY_INFORMATION, *PREG_POST_CREATE_KEY_INFORMATION, *PREG_POST_OPEN_KEY_INFORMATION; + +typedef struct _REG_POST_OPERATION_INFORMATION { + PVOID Object; + NTSTATUS Status; + PVOID PreInformation; + NTSTATUS ReturnStatus; + PVOID CallContext; + PVOID ObjectContext; + PVOID Reserved; +} REG_POST_OPERATION_INFORMATION,*PREG_POST_OPERATION_INFORMATION; + +typedef struct _REG_KEY_HANDLE_CLOSE_INFORMATION { + PVOID Object; + PVOID CallContext; + PVOID ObjectContext; + PVOID Reserved; +} REG_KEY_HANDLE_CLOSE_INFORMATION, *PREG_KEY_HANDLE_CLOSE_INFORMATION; /****************************************************************************** * I/O Manager Functions * Modified: branches/header-work/include/ddk/winddk.h URL:
http://svn.reactos.org/svn/reactos/branches/header-work/include/ddk/winddk.…
============================================================================== --- branches/header-work/include/ddk/winddk.h [iso-8859-1] (original) +++ branches/header-work/include/ddk/winddk.h [iso-8859-1] Tue Mar 2 15:53:28 2010 @@ -1529,114 +1529,6 @@ ULONG SessionId; } PROCESS_SESSION_INFORMATION, *PPROCESS_SESSION_INFORMATION; -typedef struct _REG_SET_VALUE_KEY_INFORMATION -{ - PVOID Object; - PUNICODE_STRING ValueName; - ULONG TitleIndex; - ULONG Type; - PVOID Data; - ULONG DataSize; -} REG_SET_VALUE_KEY_INFORMATION, *PREG_SET_VALUE_KEY_INFORMATION; - -typedef struct _REG_DELETE_VALUE_KEY_INFORMATION -{ - PVOID Object; - PUNICODE_STRING ValueName; -} REG_DELETE_VALUE_KEY_INFORMATION, *PREG_DELETE_VALUE_KEY_INFORMATION; - -typedef struct _REG_SET_INFORMATION_KEY_INFORMATION -{ - PVOID Object; - KEY_SET_INFORMATION_CLASS KeySetInformationClass; - PVOID KeySetInformation; - ULONG KeySetInformationLength; -} REG_SET_INFORMATION_KEY_INFORMATION, *PREG_SET_INFORMATION_KEY_INFORMATION; - -typedef struct _REG_ENUMERATE_KEY_INFORMATION -{ - PVOID Object; - ULONG Index; - KEY_INFORMATION_CLASS KeyInformationClass; - PVOID KeyInformation; - ULONG Length; - PULONG ResultLength; -} REG_ENUMERATE_KEY_INFORMATION, *PREG_ENUMERATE_KEY_INFORMATION; - -typedef struct _REG_ENUMERATE_VALUE_KEY_INFORMATION -{ - PVOID Object; - ULONG Index; - KEY_VALUE_INFORMATION_CLASS KeyValueInformationClass; - PVOID KeyValueInformation; - ULONG Length; - PULONG ResultLength; -} REG_ENUMERATE_VALUE_KEY_INFORMATION, *PREG_ENUMERATE_VALUE_KEY_INFORMATION; - -typedef struct _REG_QUERY_KEY_INFORMATION -{ - PVOID Object; - KEY_INFORMATION_CLASS KeyInformationClass; - PVOID KeyInformation; - ULONG Length; - PULONG ResultLength; -} REG_QUERY_KEY_INFORMATION, *PREG_QUERY_KEY_INFORMATION; - -typedef struct _REG_QUERY_VALUE_KEY_INFORMATION -{ - PVOID Object; - PUNICODE_STRING ValueName; - KEY_VALUE_INFORMATION_CLASS KeyValueInformationClass; - PVOID KeyValueInformation; - ULONG Length; - PULONG ResultLength; -} REG_QUERY_VALUE_KEY_INFORMATION, *PREG_QUERY_VALUE_KEY_INFORMATION; - -typedef struct _REG_QUERY_MULTIPLE_VALUE_KEY_INFORMATION -{ - PVOID Object; - PKEY_VALUE_ENTRY ValueEntries; - ULONG EntryCount; - PVOID ValueBuffer; - PULONG BufferLength; - PULONG RequiredBufferLength; -} REG_QUERY_MULTIPLE_VALUE_KEY_INFORMATION, *PREG_QUERY_MULTIPLE_VALUE_KEY_INFORMATION; - -typedef struct _REG_PRE_CREATE_KEY_INFORMATION -{ - PUNICODE_STRING CompleteName; -} REG_PRE_CREATE_KEY_INFORMATION, *PREG_PRE_CREATE_KEY_INFORMATION; - -typedef struct _REG_POST_CREATE_KEY_INFORMATION -{ - PUNICODE_STRING CompleteName; - PVOID Object; - NTSTATUS Status; -} REG_POST_CREATE_KEY_INFORMATION, *PREG_POST_CREATE_KEY_INFORMATION; - -typedef struct _REG_PRE_OPEN_KEY_INFORMATION -{ - PUNICODE_STRING CompleteName; -} REG_PRE_OPEN_KEY_INFORMATION, *PREG_PRE_OPEN_KEY_INFORMATION; - -typedef struct _REG_POST_OPEN_KEY_INFORMATION -{ - PUNICODE_STRING CompleteName; - PVOID Object; - NTSTATUS Status; -} REG_POST_OPEN_KEY_INFORMATION, *PREG_POST_OPEN_KEY_INFORMATION; - -typedef struct _REG_POST_OPERATION_INFORMATION -{ - PVOID Object; - NTSTATUS Status; -} REG_POST_OPERATION_INFORMATION,*PREG_POST_OPERATION_INFORMATION; - -typedef struct _REG_KEY_HANDLE_CLOSE_INFORMATION -{ - PVOID Object; -} REG_KEY_HANDLE_CLOSE_INFORMATION, *PREG_KEY_HANDLE_CLOSE_INFORMATION; - /* ** Storage structures */
14 years, 9 months
1
0
0
0
[akhaldi] 45755: - Move more stuff to wdm.h - Group some related definitions - Add missing TRACE_INFORMATION_CLASS members - Improve REG_NOTIFY_CLASS - Fix REG_DELETE_KEY_INFORMATION
by akhaldi@svn.reactos.org
Author: akhaldi Date: Tue Mar 2 15:32:50 2010 New Revision: 45755 URL:
http://svn.reactos.org/svn/reactos?rev=45755&view=rev
Log: - Move more stuff to wdm.h - Group some related definitions - Add missing TRACE_INFORMATION_CLASS members - Improve REG_NOTIFY_CLASS - Fix REG_DELETE_KEY_INFORMATION Modified: branches/header-work/include/ddk/wdm.h branches/header-work/include/ddk/winddk.h Modified: branches/header-work/include/ddk/wdm.h URL:
http://svn.reactos.org/svn/reactos/branches/header-work/include/ddk/wdm.h?r…
============================================================================== --- branches/header-work/include/ddk/wdm.h [iso-8859-1] (original) +++ branches/header-work/include/ddk/wdm.h [iso-8859-1] Tue Mar 2 15:32:50 2010 @@ -28,7 +28,23 @@ extern "C" { #endif +#if !defined(_NTHALDLL_) && !defined(_BLDR_) + +#define NTHALAPI DECLSPEC_IMPORT + +#else + +#define NTHALAPI + +#endif + #define NTKERNELAPI DECLSPEC_IMPORT + +#if defined(_WIN64) +#define POINTER_ALIGNMENT DECLSPEC_ALIGN(8) +#else +#define POINTER_ALIGNMENT +#endif #ifdef _WIN64 #define PORT_MAXIMUM_MESSAGE_LENGTH 512 @@ -947,6 +963,21 @@ #define PROCESSOR_FEATURE_MAX 64 +typedef enum _TRACE_INFORMATION_CLASS { + TraceIdClass, + TraceHandleClass, + TraceEnableFlagsClass, + TraceEnableLevelClass, + GlobalLoggerHandleClass, + EventLoggerHandleClass, + AllLoggerHandlesClass, + TraceHandleByNameClass, + LoggerEventsLostClass, + TraceSessionSettingsClass, + LoggerEventsLoggedClass, + MaxTraceInformationClass +} TRACE_INFORMATION_CLASS; + typedef enum _KINTERRUPT_POLARITY { InterruptPolarityUnknown, InterruptActiveHigh, @@ -1384,6 +1415,8 @@ MDL_SYSTEM_VA | \ MDL_IO_SPACE) +#define FLUSH_MULTIPLE_MAXIMUM 32 + typedef struct _MDL { struct _MDL *Next; CSHORT Size; @@ -1394,6 +1427,39 @@ ULONG ByteCount; ULONG ByteOffset; } MDL, *PMDL; + +typedef enum _MEMORY_CACHING_TYPE_ORIG { + MmFrameBufferCached = 2 +} MEMORY_CACHING_TYPE_ORIG; + +typedef enum _MEMORY_CACHING_TYPE { + MmNonCached = FALSE, + MmCached = TRUE, + MmWriteCombined = MmFrameBufferCached, + MmHardwareCoherentCached, + MmNonCachedUnordered, + MmUSWCCached, + MmMaximumCacheType +} MEMORY_CACHING_TYPE; + +typedef enum _MM_PAGE_PRIORITY { + LowPagePriority, + NormalPagePriority = 16, + HighPagePriority = 32 +} MM_PAGE_PRIORITY; + +typedef enum _LOCK_OPERATION { + IoReadAccess, + IoWriteAccess, + IoModifyAccess +} LOCK_OPERATION; + +typedef enum _MM_SYSTEM_SIZE { + MmSmallSystem, + MmMediumSystem, + MmLargeSystem +} MM_SYSTEMSIZE; + /****************************************************************************** @@ -2147,6 +2213,86 @@ MaxKeySetInfoClass } KEY_SET_INFORMATION_CLASS; +typedef enum _REG_NOTIFY_CLASS { + RegNtDeleteKey, + RegNtPreDeleteKey = RegNtDeleteKey, + RegNtSetValueKey, + RegNtPreSetValueKey = RegNtSetValueKey, + RegNtDeleteValueKey, + RegNtPreDeleteValueKey = RegNtDeleteValueKey, + RegNtSetInformationKey, + RegNtPreSetInformationKey = RegNtSetInformationKey, + RegNtRenameKey, + RegNtPreRenameKey = RegNtRenameKey, + RegNtEnumerateKey, + RegNtPreEnumerateKey = RegNtEnumerateKey, + RegNtEnumerateValueKey, + RegNtPreEnumerateValueKey = RegNtEnumerateValueKey, + RegNtQueryKey, + RegNtPreQueryKey = RegNtQueryKey, + RegNtQueryValueKey, + RegNtPreQueryValueKey = RegNtQueryValueKey, + RegNtQueryMultipleValueKey, + RegNtPreQueryMultipleValueKey = RegNtQueryMultipleValueKey, + RegNtPreCreateKey, + RegNtPostCreateKey, + RegNtPreOpenKey, + RegNtPostOpenKey, + RegNtKeyHandleClose, + RegNtPreKeyHandleClose = RegNtKeyHandleClose, + RegNtPostDeleteKey, + RegNtPostSetValueKey, + RegNtPostDeleteValueKey, + RegNtPostSetInformationKey, + RegNtPostRenameKey, + RegNtPostEnumerateKey, + RegNtPostEnumerateValueKey, + RegNtPostQueryKey, + RegNtPostQueryValueKey, + RegNtPostQueryMultipleValueKey, + RegNtPostKeyHandleClose, + RegNtPreCreateKeyEx, + RegNtPostCreateKeyEx, + RegNtPreOpenKeyEx, + RegNtPostOpenKeyEx, + RegNtPreFlushKey, + RegNtPostFlushKey, + RegNtPreLoadKey, + RegNtPostLoadKey, + RegNtPreUnLoadKey, + RegNtPostUnLoadKey, + RegNtPreQueryKeySecurity, + RegNtPostQueryKeySecurity, + RegNtPreSetKeySecurity, + RegNtPostSetKeySecurity, + RegNtCallbackObjectContextCleanup, + RegNtPreRestoreKey, + RegNtPostRestoreKey, + RegNtPreSaveKey, + RegNtPostSaveKey, + RegNtPreReplaceKey, + RegNtPostReplaceKey, + MaxRegNtNotifyClass +} REG_NOTIFY_CLASS, *PREG_NOTIFY_CLASS; + +typedef NTSTATUS +(NTAPI *PEX_CALLBACK_FUNCTION)( + IN PVOID CallbackContext, + IN PVOID Argument1, + IN PVOID Argument2 +); + +typedef struct _REG_DELETE_KEY_INFORMATION { + PVOID Object; + PVOID CallContext; + PVOID ObjectContext; + PVOID Reserved; +} REG_DELETE_KEY_INFORMATION, *PREG_DELETE_KEY_INFORMATION +#if (NTDDI_VERSION >= NTDDI_VISTA) +, REG_FLUSH_KEY_INFORMATION, *PREG_FLUSH_KEY_INFORMATION +#endif +; + /****************************************************************************** * I/O Manager Functions * ******************************************************************************/ @@ -2535,6 +2681,20 @@ #define FILE_DEVICE_PMI 0x00000045 #define MAXIMUM_VOLUME_LABEL_LENGTH (32 * sizeof(WCHAR)) + +typedef struct _OBJECT_HANDLE_INFORMATION { + ULONG HandleAttributes; + ACCESS_MASK GrantedAccess; +} OBJECT_HANDLE_INFORMATION, *POBJECT_HANDLE_INFORMATION; + +typedef struct _CLIENT_ID { + HANDLE UniqueProcess; + HANDLE UniqueThread; +} CLIENT_ID, *PCLIENT_ID; + +typedef VOID +(DDKAPI *PKSTART_ROUTINE)( + IN PVOID StartContext); typedef struct _VPB { CSHORT Type; @@ -2725,7 +2885,31 @@ #define IO_REPARSE 0x0 #define IO_REMOUNT 0x1 - +typedef union _POWER_STATE { + SYSTEM_POWER_STATE SystemState; + DEVICE_POWER_STATE DeviceState; +} POWER_STATE, *PPOWER_STATE; + +typedef enum _POWER_STATE_TYPE { + SystemPowerState = 0, + DevicePowerState +} POWER_STATE_TYPE, *PPOWER_STATE_TYPE; + +typedef struct _IO_STATUS_BLOCK { + _ANONYMOUS_UNION union { + NTSTATUS Status; + PVOID Pointer; + } DUMMYUNIONNAME; + ULONG_PTR Information; +} IO_STATUS_BLOCK, *PIO_STATUS_BLOCK; + +typedef VOID +(DDKAPI *PREQUEST_POWER_COMPLETE)( + IN PDEVICE_OBJECT DeviceObject, + IN UCHAR MinorFunction, + IN POWER_STATE PowerState, + IN PVOID Context, + IN PIO_STATUS_BLOCK IoStatus); typedef struct _PCI_SLOT_NUMBER { union { @@ -2737,14 +2921,6 @@ ULONG AsULONG; } u; } PCI_SLOT_NUMBER, *PPCI_SLOT_NUMBER; - -typedef struct _IO_STATUS_BLOCK { - _ANONYMOUS_UNION union { - NTSTATUS Status; - PVOID Pointer; - } DUMMYUNIONNAME; - ULONG_PTR Information; -} IO_STATUS_BLOCK, *PIO_STATUS_BLOCK; typedef VOID (DDKAPI *PIO_APC_ROUTINE)( @@ -2971,16 +3147,6 @@ (DDKAPI *PPCI_IS_DEVICE_PRESENT_EX)( IN PVOID Context, IN PPCI_DEVICE_PRESENCE_PARAMETERS Parameters); - -typedef union _POWER_STATE { - SYSTEM_POWER_STATE SystemState; - DEVICE_POWER_STATE DeviceState; -} POWER_STATE, *PPOWER_STATE; - -typedef enum _POWER_STATE_TYPE { - SystemPowerState = 0, - DevicePowerState -} POWER_STATE_TYPE, *PPOWER_STATE_TYPE; typedef struct _BUS_INTERFACE_STANDARD { USHORT Size; Modified: branches/header-work/include/ddk/winddk.h URL:
http://svn.reactos.org/svn/reactos/branches/header-work/include/ddk/winddk.…
============================================================================== --- branches/header-work/include/ddk/winddk.h [iso-8859-1] (original) +++ branches/header-work/include/ddk/winddk.h [iso-8859-1] Tue Mar 2 15:32:50 2010 @@ -42,12 +42,6 @@ #include "intrin.h" -#if !defined(_NTHAL_) -#define NTHALAPI DECLSPEC_IMPORT -#else -#define NTHALAPI -#endif - /* Pseudo modifiers for parameters */ #ifndef IN #define IN @@ -65,12 +59,6 @@ #define CONST const #define RESTRICTED_POINTER - -#if defined(_WIN64) -#define POINTER_ALIGNMENT DECLSPEC_ALIGN(8) -#else -#define POINTER_ALIGNMENT -#endif #define DECLSPEC_ADDRSAFE @@ -1321,54 +1309,6 @@ IoQueryDeviceMaxData } IO_QUERY_DEVICE_DATA_FORMAT, *PIO_QUERY_DEVICE_DATA_FORMAT; -typedef enum _MEMORY_CACHING_TYPE_ORIG { - MmFrameBufferCached = 2 -} MEMORY_CACHING_TYPE_ORIG; - -typedef enum _MEMORY_CACHING_TYPE { - MmNonCached = FALSE, - MmCached = TRUE, - MmWriteCombined = MmFrameBufferCached, - MmHardwareCoherentCached, - MmNonCachedUnordered, - MmUSWCCached, - MmMaximumCacheType -} MEMORY_CACHING_TYPE; - -typedef enum _MM_PAGE_PRIORITY { - LowPagePriority, - NormalPagePriority = 16, - HighPagePriority = 32 -} MM_PAGE_PRIORITY; - -typedef enum _LOCK_OPERATION { - IoReadAccess, - IoWriteAccess, - IoModifyAccess -} LOCK_OPERATION; - -#define FLUSH_MULTIPLE_MAXIMUM 32 - -typedef enum _MM_SYSTEM_SIZE { - MmSmallSystem, - MmMediumSystem, - MmLargeSystem -} MM_SYSTEMSIZE; - -typedef struct _OBJECT_HANDLE_INFORMATION { - ULONG HandleAttributes; - ACCESS_MASK GrantedAccess; -} OBJECT_HANDLE_INFORMATION, *POBJECT_HANDLE_INFORMATION; - -typedef struct _CLIENT_ID { - HANDLE UniqueProcess; - HANDLE UniqueThread; -} CLIENT_ID, *PCLIENT_ID; - -typedef VOID -(DDKAPI *PKSTART_ROUTINE)( - IN PVOID StartContext); - typedef VOID (DDKAPI *PCREATE_PROCESS_NOTIFY_ROUTINE)( IN HANDLE ParentId, @@ -1588,82 +1528,6 @@ { ULONG SessionId; } PROCESS_SESSION_INFORMATION, *PPROCESS_SESSION_INFORMATION; - -typedef VOID -(DDKAPI *PREQUEST_POWER_COMPLETE)( - IN PDEVICE_OBJECT DeviceObject, - IN UCHAR MinorFunction, - IN POWER_STATE PowerState, - IN PVOID Context, - IN PIO_STATUS_BLOCK IoStatus); - -typedef enum _TRACE_INFORMATION_CLASS { - TraceIdClass, - TraceHandleClass, - TraceEnableFlagsClass, - TraceEnableLevelClass, - GlobalLoggerHandleClass, - EventLoggerHandleClass, - AllLoggerHandlesClass, - TraceHandleByNameClass -} TRACE_INFORMATION_CLASS; - -typedef enum _REG_NOTIFY_CLASS -{ - RegNtDeleteKey, - RegNtPreDeleteKey = RegNtDeleteKey, - RegNtSetValueKey, - RegNtPreSetValueKey = RegNtSetValueKey, - RegNtDeleteValueKey, - RegNtPreDeleteValueKey = RegNtDeleteValueKey, - RegNtSetInformationKey, - RegNtPreSetInformationKey = RegNtSetInformationKey, - RegNtRenameKey, - RegNtPreRenameKey = RegNtRenameKey, - RegNtEnumerateKey, - RegNtPreEnumerateKey = RegNtEnumerateKey, - RegNtEnumerateValueKey, - RegNtPreEnumerateValueKey = RegNtEnumerateValueKey, - RegNtQueryKey, - RegNtPreQueryKey = RegNtQueryKey, - RegNtQueryValueKey, - RegNtPreQueryValueKey = RegNtQueryValueKey, - RegNtQueryMultipleValueKey, - RegNtPreQueryMultipleValueKey = RegNtQueryMultipleValueKey, - RegNtPreCreateKey, - RegNtPostCreateKey, - RegNtPreOpenKey, - RegNtPostOpenKey, - RegNtKeyHandleClose, - RegNtPreKeyHandleClose = RegNtKeyHandleClose, - RegNtPostDeleteKey, - RegNtPostSetValueKey, - RegNtPostDeleteValueKey, - RegNtPostSetInformationKey, - RegNtPostRenameKey, - RegNtPostEnumerateKey, - RegNtPostEnumerateValueKey, - RegNtPostQueryKey, - RegNtPostQueryValueKey, - RegNtPostQueryMultipleValueKey, - RegNtPostKeyHandleClose, - RegNtPreCreateKeyEx, - RegNtPostCreateKeyEx, - RegNtPreOpenKeyEx, - RegNtPostOpenKeyEx -} REG_NOTIFY_CLASS, *PREG_NOTIFY_CLASS; - -typedef NTSTATUS -(NTAPI *PEX_CALLBACK_FUNCTION)( - IN PVOID CallbackContext, - IN PVOID Argument1, - IN PVOID Argument2 -); - -typedef struct _REG_DELETE_KEY_INFORMATION -{ - PVOID Object; -} REG_DELETE_KEY_INFORMATION, *PREG_DELETE_KEY_INFORMATION; typedef struct _REG_SET_VALUE_KEY_INFORMATION {
14 years, 9 months
1
0
0
0
[cwittich] 45754: [MSHTML] sync mshtml to wine 1.1.39
by cwittich@svn.reactos.org
Author: cwittich Date: Tue Mar 2 15:08:15 2010 New Revision: 45754 URL:
http://svn.reactos.org/svn/reactos?rev=45754&view=rev
Log: [MSHTML] sync mshtml to wine 1.1.39 Added: trunk/reactos/dll/win32/mshtml/It.rc (with props) trunk/reactos/dll/win32/mshtml/Uk.rc (with props) trunk/reactos/dll/win32/mshtml/htmlframe.c (with props) Modified: trunk/reactos/dll/win32/mshtml/De.rc trunk/reactos/dll/win32/mshtml/Fr.rc trunk/reactos/dll/win32/mshtml/Ja.rc trunk/reactos/dll/win32/mshtml/Lt.rc trunk/reactos/dll/win32/mshtml/No.rc trunk/reactos/dll/win32/mshtml/Si.rc trunk/reactos/dll/win32/mshtml/dispex.c trunk/reactos/dll/win32/mshtml/editor.c trunk/reactos/dll/win32/mshtml/htmlanchor.c trunk/reactos/dll/win32/mshtml/htmlbody.c trunk/reactos/dll/win32/mshtml/htmlcomment.c trunk/reactos/dll/win32/mshtml/htmldoc.c trunk/reactos/dll/win32/mshtml/htmldoc3.c trunk/reactos/dll/win32/mshtml/htmldoc5.c trunk/reactos/dll/win32/mshtml/htmlelem.c trunk/reactos/dll/win32/mshtml/htmlelem2.c trunk/reactos/dll/win32/mshtml/htmlelemcol.c trunk/reactos/dll/win32/mshtml/htmlevent.c trunk/reactos/dll/win32/mshtml/htmlevent.h trunk/reactos/dll/win32/mshtml/htmlform.c trunk/reactos/dll/win32/mshtml/htmlframebase.c trunk/reactos/dll/win32/mshtml/htmlgeneric.c trunk/reactos/dll/win32/mshtml/htmliframe.c trunk/reactos/dll/win32/mshtml/htmlimg.c trunk/reactos/dll/win32/mshtml/htmlinput.c trunk/reactos/dll/win32/mshtml/htmlnode.c trunk/reactos/dll/win32/mshtml/htmloption.c trunk/reactos/dll/win32/mshtml/htmlscript.c trunk/reactos/dll/win32/mshtml/htmlselect.c trunk/reactos/dll/win32/mshtml/htmlstyle.c trunk/reactos/dll/win32/mshtml/htmltable.c trunk/reactos/dll/win32/mshtml/htmltablerow.c trunk/reactos/dll/win32/mshtml/htmltextarea.c trunk/reactos/dll/win32/mshtml/htmlwindow.c trunk/reactos/dll/win32/mshtml/main.c trunk/reactos/dll/win32/mshtml/mshtml.inf trunk/reactos/dll/win32/mshtml/mshtml.rbuild trunk/reactos/dll/win32/mshtml/mshtml_private.h trunk/reactos/dll/win32/mshtml/mutation.c trunk/reactos/dll/win32/mshtml/nsembed.c trunk/reactos/dll/win32/mshtml/nsevents.c trunk/reactos/dll/win32/mshtml/nsio.c trunk/reactos/dll/win32/mshtml/rsrc.rc trunk/reactos/dll/win32/mshtml/script.c trunk/reactos/dll/win32/mshtml/txtrange.c trunk/reactos/dll/win32/mshtml/view.c trunk/reactos/include/psdk/mshtmdid.h trunk/reactos/include/psdk/mshtml.idl [This mail would be too long, it was shortened to contain the URLs only.] Modified: trunk/reactos/dll/win32/mshtml/De.rc URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/dll/win32/mshtml/De.rc?rev…
Modified: trunk/reactos/dll/win32/mshtml/Fr.rc URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/dll/win32/mshtml/Fr.rc?rev…
Added: trunk/reactos/dll/win32/mshtml/It.rc URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/dll/win32/mshtml/It.rc?rev…
Modified: trunk/reactos/dll/win32/mshtml/Ja.rc URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/dll/win32/mshtml/Ja.rc?rev…
Modified: trunk/reactos/dll/win32/mshtml/Lt.rc URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/dll/win32/mshtml/Lt.rc?rev…
Modified: trunk/reactos/dll/win32/mshtml/No.rc URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/dll/win32/mshtml/No.rc?rev…
Modified: trunk/reactos/dll/win32/mshtml/Si.rc URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/dll/win32/mshtml/Si.rc?rev…
Added: trunk/reactos/dll/win32/mshtml/Uk.rc URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/dll/win32/mshtml/Uk.rc?rev…
Modified: trunk/reactos/dll/win32/mshtml/dispex.c URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/dll/win32/mshtml/dispex.c?…
Modified: trunk/reactos/dll/win32/mshtml/editor.c URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/dll/win32/mshtml/editor.c?…
Modified: trunk/reactos/dll/win32/mshtml/htmlanchor.c URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/dll/win32/mshtml/htmlancho…
Modified: trunk/reactos/dll/win32/mshtml/htmlbody.c URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/dll/win32/mshtml/htmlbody.…
Modified: trunk/reactos/dll/win32/mshtml/htmlcomment.c URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/dll/win32/mshtml/htmlcomme…
Modified: trunk/reactos/dll/win32/mshtml/htmldoc.c URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/dll/win32/mshtml/htmldoc.c…
Modified: trunk/reactos/dll/win32/mshtml/htmldoc3.c URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/dll/win32/mshtml/htmldoc3.…
Modified: trunk/reactos/dll/win32/mshtml/htmldoc5.c URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/dll/win32/mshtml/htmldoc5.…
Modified: trunk/reactos/dll/win32/mshtml/htmlelem.c URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/dll/win32/mshtml/htmlelem.…
Modified: trunk/reactos/dll/win32/mshtml/htmlelem2.c URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/dll/win32/mshtml/htmlelem2…
Modified: trunk/reactos/dll/win32/mshtml/htmlelemcol.c URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/dll/win32/mshtml/htmlelemc…
Modified: trunk/reactos/dll/win32/mshtml/htmlevent.c URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/dll/win32/mshtml/htmlevent…
Modified: trunk/reactos/dll/win32/mshtml/htmlevent.h URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/dll/win32/mshtml/htmlevent…
Modified: trunk/reactos/dll/win32/mshtml/htmlform.c URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/dll/win32/mshtml/htmlform.…
Added: trunk/reactos/dll/win32/mshtml/htmlframe.c URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/dll/win32/mshtml/htmlframe…
Modified: trunk/reactos/dll/win32/mshtml/htmlframebase.c URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/dll/win32/mshtml/htmlframe…
Modified: trunk/reactos/dll/win32/mshtml/htmlgeneric.c URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/dll/win32/mshtml/htmlgener…
Modified: trunk/reactos/dll/win32/mshtml/htmliframe.c URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/dll/win32/mshtml/htmlifram…
Modified: trunk/reactos/dll/win32/mshtml/htmlimg.c URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/dll/win32/mshtml/htmlimg.c…
Modified: trunk/reactos/dll/win32/mshtml/htmlinput.c URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/dll/win32/mshtml/htmlinput…
Modified: trunk/reactos/dll/win32/mshtml/htmlnode.c URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/dll/win32/mshtml/htmlnode.…
Modified: trunk/reactos/dll/win32/mshtml/htmloption.c URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/dll/win32/mshtml/htmloptio…
Modified: trunk/reactos/dll/win32/mshtml/htmlscript.c URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/dll/win32/mshtml/htmlscrip…
Modified: trunk/reactos/dll/win32/mshtml/htmlselect.c URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/dll/win32/mshtml/htmlselec…
Modified: trunk/reactos/dll/win32/mshtml/htmlstyle.c URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/dll/win32/mshtml/htmlstyle…
Modified: trunk/reactos/dll/win32/mshtml/htmltable.c URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/dll/win32/mshtml/htmltable…
Modified: trunk/reactos/dll/win32/mshtml/htmltablerow.c URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/dll/win32/mshtml/htmltable…
Modified: trunk/reactos/dll/win32/mshtml/htmltextarea.c URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/dll/win32/mshtml/htmltexta…
Modified: trunk/reactos/dll/win32/mshtml/htmlwindow.c URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/dll/win32/mshtml/htmlwindo…
Modified: trunk/reactos/dll/win32/mshtml/main.c URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/dll/win32/mshtml/main.c?re…
Modified: trunk/reactos/dll/win32/mshtml/mshtml.inf URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/dll/win32/mshtml/mshtml.in…
Modified: trunk/reactos/dll/win32/mshtml/mshtml.rbuild URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/dll/win32/mshtml/mshtml.rb…
Modified: trunk/reactos/dll/win32/mshtml/mshtml_private.h URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/dll/win32/mshtml/mshtml_pr…
Modified: trunk/reactos/dll/win32/mshtml/mutation.c URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/dll/win32/mshtml/mutation.…
Modified: trunk/reactos/dll/win32/mshtml/nsembed.c URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/dll/win32/mshtml/nsembed.c…
Modified: trunk/reactos/dll/win32/mshtml/nsevents.c URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/dll/win32/mshtml/nsevents.…
Modified: trunk/reactos/dll/win32/mshtml/nsio.c URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/dll/win32/mshtml/nsio.c?re…
Modified: trunk/reactos/dll/win32/mshtml/rsrc.rc URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/dll/win32/mshtml/rsrc.rc?r…
Modified: trunk/reactos/dll/win32/mshtml/script.c URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/dll/win32/mshtml/script.c?…
Modified: trunk/reactos/dll/win32/mshtml/txtrange.c URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/dll/win32/mshtml/txtrange.…
Modified: trunk/reactos/dll/win32/mshtml/view.c URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/dll/win32/mshtml/view.c?re…
Modified: trunk/reactos/include/psdk/mshtmdid.h URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/include/psdk/mshtmdid.h?re…
Modified: trunk/reactos/include/psdk/mshtml.idl URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/include/psdk/mshtml.idl?re…
14 years, 9 months
1
0
0
0
[cwittich] 45753: [QUARTZ] sync quartz to wine 1.1.39
by cwittich@svn.reactos.org
Author: cwittich Date: Tue Mar 2 12:38:50 2010 New Revision: 45753 URL:
http://svn.reactos.org/svn/reactos?rev=45753&view=rev
Log: [QUARTZ] sync quartz to wine 1.1.39 Modified: trunk/reactos/dll/directx/quartz/dsoundrender.c Modified: trunk/reactos/dll/directx/quartz/dsoundrender.c URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/dll/directx/quartz/dsoundr…
============================================================================== --- trunk/reactos/dll/directx/quartz/dsoundrender.c [iso-8859-1] (original) +++ trunk/reactos/dll/directx/quartz/dsoundrender.c [iso-8859-1] Tue Mar 2 12:38:50 2010 @@ -32,6 +32,7 @@ #include "evcode.h" #include "strmif.h" #include "dsound.h" +#include "amaudio.h" #include "wine/unicode.h" #include "wine/debug.h" @@ -45,12 +46,14 @@ static const IBasicAudioVtbl IBasicAudio_Vtbl; static const IReferenceClockVtbl IReferenceClock_Vtbl; static const IMediaSeekingVtbl IMediaSeeking_Vtbl; +static const IAMDirectSoundVtbl IAMDirectSound_Vtbl; typedef struct DSoundRenderImpl { const IBaseFilterVtbl * lpVtbl; const IBasicAudioVtbl *IBasicAudio_vtbl; const IReferenceClockVtbl *IReferenceClock_vtbl; + const IAMDirectSoundVtbl *IAMDirectSound_vtbl; LONG refCount; CRITICAL_SECTION csFilter; @@ -404,6 +407,7 @@ pDSoundRender->lpVtbl = &DSoundRender_Vtbl; pDSoundRender->IBasicAudio_vtbl = &IBasicAudio_Vtbl; pDSoundRender->IReferenceClock_vtbl = &IReferenceClock_Vtbl; + pDSoundRender->IAMDirectSound_vtbl = &IAMDirectSound_Vtbl; pDSoundRender->refCount = 1; InitializeCriticalSection(&pDSoundRender->csFilter); pDSoundRender->csFilter.DebugInfo->Spare[0] = (DWORD_PTR)(__FILE__ ": DSoundRenderImpl.csFilter"); @@ -473,6 +477,8 @@ *ppv = &This->IReferenceClock_vtbl; else if (IsEqualIID(riid, &IID_IMediaSeeking)) *ppv = &This->mediaSeeking.lpVtbl; + else if (IsEqualIID(riid, &IID_IAMDirectSound)) + *ppv = &This->IAMDirectSound_vtbl; if (*ppv) { @@ -1328,3 +1334,121 @@ MediaSeekingImpl_GetRate, MediaSeekingImpl_GetPreroll }; + +/*** IUnknown methods ***/ +static HRESULT WINAPI AMDirectSound_QueryInterface(IAMDirectSound *iface, + REFIID riid, + LPVOID*ppvObj) +{ + ICOM_THIS_MULTI(DSoundRenderImpl, IAMDirectSound_vtbl, iface); + + TRACE("(%p/%p)->(%s (%p), %p)\n", This, iface, debugstr_guid(riid), riid, ppvObj); + + return DSoundRender_QueryInterface((IBaseFilter*)This, riid, ppvObj); +} + +static ULONG WINAPI AMDirectSound_AddRef(IAMDirectSound *iface) +{ + ICOM_THIS_MULTI(DSoundRenderImpl, IAMDirectSound_vtbl, iface); + + TRACE("(%p/%p)->()\n", This, iface); + + return DSoundRender_AddRef((IBaseFilter*)This); +} + +static ULONG WINAPI AMDirectSound_Release(IAMDirectSound *iface) +{ + ICOM_THIS_MULTI(DSoundRenderImpl, IAMDirectSound_vtbl, iface); + + TRACE("(%p/%p)->()\n", This, iface); + + return DSoundRender_Release((IBaseFilter*)This); +} + +/*** IAMDirectSound methods ***/ +static HRESULT WINAPI AMDirectSound_GetDirectSoundInterface(IAMDirectSound *iface, IDirectSound **ds) +{ + ICOM_THIS_MULTI(DSoundRenderImpl, IAMDirectSound_vtbl, iface); + + FIXME("(%p/%p)->(%p): stub\n", This, iface, ds); + + return E_NOTIMPL; +} + +static HRESULT WINAPI AMDirectSound_GetPrimaryBufferInterface(IAMDirectSound *iface, IDirectSoundBuffer **buf) +{ + ICOM_THIS_MULTI(DSoundRenderImpl, IAMDirectSound_vtbl, iface); + + FIXME("(%p/%p)->(%p): stub\n", This, iface, buf); + + return E_NOTIMPL; +} + +static HRESULT WINAPI AMDirectSound_GetSecondaryBufferInterface(IAMDirectSound *iface, IDirectSoundBuffer **buf) +{ + ICOM_THIS_MULTI(DSoundRenderImpl, IAMDirectSound_vtbl, iface); + + FIXME("(%p/%p)->(%p): stub\n", This, iface, buf); + + return E_NOTIMPL; +} + +static HRESULT WINAPI AMDirectSound_ReleaseDirectSoundInterface(IAMDirectSound *iface, IDirectSound *ds) +{ + ICOM_THIS_MULTI(DSoundRenderImpl, IAMDirectSound_vtbl, iface); + + FIXME("(%p/%p)->(%p): stub\n", This, iface, ds); + + return E_NOTIMPL; +} + +static HRESULT WINAPI AMDirectSound_ReleasePrimaryBufferInterface(IAMDirectSound *iface, IDirectSoundBuffer *buf) +{ + ICOM_THIS_MULTI(DSoundRenderImpl, IAMDirectSound_vtbl, iface); + + FIXME("(%p/%p)->(%p): stub\n", This, iface, buf); + + return E_NOTIMPL; +} + +static HRESULT WINAPI AMDirectSound_ReleaseSecondaryBufferInterface(IAMDirectSound *iface, IDirectSoundBuffer *buf) +{ + ICOM_THIS_MULTI(DSoundRenderImpl, IAMDirectSound_vtbl, iface); + + FIXME("(%p/%p)->(%p): stub\n", This, iface, buf); + + return E_NOTIMPL; +} + +static HRESULT WINAPI AMDirectSound_SetFocusWindow(IAMDirectSound *iface, HWND hwnd, BOOL bgsilent) +{ + ICOM_THIS_MULTI(DSoundRenderImpl, IAMDirectSound_vtbl, iface); + + FIXME("(%p/%p)->(%p,%d): stub\n", This, iface, hwnd, bgsilent); + + return E_NOTIMPL; +} + +static HRESULT WINAPI AMDirectSound_GetFocusWindow(IAMDirectSound *iface, HWND hwnd) +{ + ICOM_THIS_MULTI(DSoundRenderImpl, IAMDirectSound_vtbl, iface); + + FIXME("(%p/%p)->(%p): stub\n", This, iface, hwnd); + + return E_NOTIMPL; +} + +static const IAMDirectSoundVtbl IAMDirectSound_Vtbl = +{ + AMDirectSound_QueryInterface, + AMDirectSound_AddRef, + AMDirectSound_Release, + AMDirectSound_GetDirectSoundInterface, + AMDirectSound_GetPrimaryBufferInterface, + AMDirectSound_GetSecondaryBufferInterface, + AMDirectSound_ReleaseDirectSoundInterface, + AMDirectSound_ReleasePrimaryBufferInterface, + AMDirectSound_ReleaseSecondaryBufferInterface, + AMDirectSound_SetFocusWindow, + AMDirectSound_GetFocusWindow +};
14 years, 9 months
1
0
0
0
[cwittich] 45752: [QEDIT] sync qedit to wine 1.1.39
by cwittich@svn.reactos.org
Author: cwittich Date: Tue Mar 2 12:28:12 2010 New Revision: 45752 URL:
http://svn.reactos.org/svn/reactos?rev=45752&view=rev
Log: [QEDIT] sync qedit to wine 1.1.39 Modified: trunk/reactos/dll/directx/qedit/samplegrabber.c Modified: trunk/reactos/dll/directx/qedit/samplegrabber.c URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/dll/directx/qedit/samplegr…
============================================================================== --- trunk/reactos/dll/directx/qedit/samplegrabber.c [iso-8859-1] (original) +++ trunk/reactos/dll/directx/qedit/samplegrabber.c [iso-8859-1] Tue Mar 2 12:28:12 2010 @@ -33,18 +33,352 @@ WINE_DEFAULT_DEBUG_CHANNEL(qedit); static WCHAR const vendor_name[] = { 'W', 'i', 'n', 'e', 0 }; +static WCHAR const pin_in_name[] = { 'I', 'n', 0 }; +static WCHAR const pin_out_name[] = { 'O', 'u', 't', 0 }; + +IEnumPins *pinsenum_create(IBaseFilter *filter, IPin **pins, ULONG pinCount); +IEnumMediaTypes *mediaenum_create(AM_MEDIA_TYPE *mtype); + +/* Fixed pins enumerator, holds filter referenced */ +typedef struct _PE_Impl { + IEnumPins pe; + IBaseFilter *filter; + LONG refCount; + ULONG numPins; + ULONG index; + IPin *pins[0]; +} PE_Impl; + + +/* IEnumPins interface implementation */ + +/* IUnknown */ +static ULONG WINAPI +Fixed_IEnumPins_AddRef(IEnumPins *iface) +{ + PE_Impl *This = (PE_Impl *)iface; + ULONG refCount = InterlockedIncrement(&This->refCount); + TRACE("(%p) new ref = %u\n", This, refCount); + return refCount; +} + +/* IUnknown */ +static ULONG WINAPI +Fixed_IEnumPins_Release(IEnumPins *iface) +{ + PE_Impl *This = (PE_Impl *)iface; + ULONG refCount = InterlockedDecrement(&This->refCount); + TRACE("(%p) new ref = %u\n", This, refCount); + if (refCount == 0) + { + IBaseFilter_Release(This->filter); + CoTaskMemFree(This); + return 0; + } + return refCount; +} + +/* IUnknown */ +static HRESULT WINAPI +Fixed_IEnumPins_QueryInterface(IEnumPins *iface, REFIID riid, void **ppvObject) +{ + PE_Impl *This = (PE_Impl *)iface; + TRACE("(%p)->(%s %p)\n", This, debugstr_guid(riid), ppvObject); + + if (IsEqualIID(riid, &IID_IUnknown) || + IsEqualIID(riid, &IID_IEnumPins)) { + Fixed_IEnumPins_AddRef(iface); + *ppvObject = &(This->pins); + return S_OK; + } + *ppvObject = NULL; + WARN("(%p, %s,%p): not found\n", This, debugstr_guid(riid), ppvObject); + return E_NOINTERFACE; +} + +/* IEnumPins */ +static HRESULT WINAPI +Fixed_IEnumPins_Next(IEnumPins *iface, ULONG nPins, IPin **pins, ULONG *fetched) +{ + PE_Impl *This = (PE_Impl *)iface; + ULONG count = 0; + TRACE("(%p)->(%u, %p, %p) index = %u\n", This, nPins, pins, fetched, This->index); + if (!nPins) + return E_INVALIDARG; + if (!pins || ((nPins != 1) && !fetched)) + return E_POINTER; + while ((count < nPins) && (This->index < This->numPins)) { + IPin *pin = This->pins[This->index++]; + IPin_AddRef(pin); + pins[count++] = pin; + } + if (fetched) + *fetched = count; + return (count == nPins) ? S_OK : S_FALSE; +} + +/* IEnumPins */ +static HRESULT WINAPI +Fixed_IEnumPins_Skip(IEnumPins *iface, ULONG nPins) +{ + PE_Impl *This = (PE_Impl *)iface; + TRACE("(%p)->(%u) index = %u\n", This, nPins, This->index); + nPins += This->index; + if (nPins >= This->numPins) { + This->index = This->numPins; + return S_FALSE; + } + This->index = nPins; + return S_OK; +} + +/* IEnumPins */ +static HRESULT WINAPI +Fixed_IEnumPins_Reset(IEnumPins *iface) +{ + PE_Impl *This = (PE_Impl *)iface; + TRACE("(%p)->() index = %u\n", This, This->index); + This->index = 0; + return S_OK; +} + +/* IEnumPins */ +static HRESULT WINAPI +Fixed_IEnumPins_Clone(IEnumPins *iface, IEnumPins **pins) +{ + PE_Impl *This = (PE_Impl *)iface; + TRACE("(%p)->(%p) index = %u\n", This, pins, This->index); + if (!pins) + return E_POINTER; + *pins = pinsenum_create(This->filter, This->pins, This->numPins); + if (!*pins) + return E_OUTOFMEMORY; + ((PE_Impl *)*pins)->index = This->index; + return S_OK; +} + + +/* Virtual tables and constructor */ + +static const IEnumPinsVtbl IEnumPins_VTable = +{ + Fixed_IEnumPins_QueryInterface, + Fixed_IEnumPins_AddRef, + Fixed_IEnumPins_Release, + Fixed_IEnumPins_Next, + Fixed_IEnumPins_Skip, + Fixed_IEnumPins_Reset, + Fixed_IEnumPins_Clone, +}; + +IEnumPins *pinsenum_create(IBaseFilter *filter, IPin **pins, ULONG pinCount) +{ + ULONG len = sizeof(PE_Impl) + (pinCount * sizeof(IPin *)); + PE_Impl *obj = CoTaskMemAlloc(len); + if (obj) { + ULONG i; + ZeroMemory(obj, len); + obj->pe.lpVtbl = &IEnumPins_VTable; + obj->refCount = 1; + obj->filter = filter; + obj->numPins = pinCount; + obj->index = 0; + for (i=0; i<pinCount; i++) + obj->pins[i] = pins[i]; + IBaseFilter_AddRef(filter); + } + return &obj->pe; +} + + +/* Single media type enumerator */ +typedef struct _ME_Impl { + IEnumMediaTypes me; + LONG refCount; + BOOL past; + AM_MEDIA_TYPE mtype; +} ME_Impl; + + +/* IEnumMediaTypes interface implementation */ + +/* IUnknown */ +static ULONG WINAPI +Single_IEnumMediaTypes_AddRef(IEnumMediaTypes *iface) +{ + ME_Impl *This = (ME_Impl *)iface; + ULONG refCount = InterlockedIncrement(&This->refCount); + TRACE("(%p) new ref = %u\n", This, refCount); + return refCount; +} + +/* IUnknown */ +static ULONG WINAPI +Single_IEnumMediaTypes_Release(IEnumMediaTypes *iface) +{ + ME_Impl *This = (ME_Impl *)iface; + ULONG refCount = InterlockedDecrement(&This->refCount); + TRACE("(%p) new ref = %u\n", This, refCount); + if (refCount == 0) + { + if (This->mtype.pbFormat) + CoTaskMemFree(This->mtype.pbFormat); + CoTaskMemFree(This); + return 0; + } + return refCount; +} + +/* IUnknown */ +static HRESULT WINAPI +Single_IEnumMediaTypes_QueryInterface(IEnumMediaTypes *iface, REFIID riid, void **ppvObject) +{ + ME_Impl *This = (ME_Impl *)iface; + TRACE("(%p)->(%s %p)\n", This, debugstr_guid(riid), ppvObject); + + if (IsEqualIID(riid, &IID_IUnknown) || + IsEqualIID(riid, &IID_IEnumMediaTypes)) { + Single_IEnumMediaTypes_AddRef(iface); + *ppvObject = &(This->me); + return S_OK; + } + *ppvObject = NULL; + WARN("(%p, %s,%p): not found\n", This, debugstr_guid(riid), ppvObject); + return E_NOINTERFACE; +} + +/* IEnumMediaTypes */ +static HRESULT WINAPI +Single_IEnumMediaTypes_Next(IEnumMediaTypes *iface, ULONG nTypes, AM_MEDIA_TYPE **types, ULONG *fetched) +{ + ME_Impl *This = (ME_Impl *)iface; + ULONG count = 0; + TRACE("(%p)->(%u, %p, %p)\n", This, nTypes, types, fetched); + if (!nTypes) + return E_INVALIDARG; + if (!types || ((nTypes != 1) && !fetched)) + return E_POINTER; + if (!This->past) { + AM_MEDIA_TYPE *mtype = CoTaskMemAlloc(sizeof(AM_MEDIA_TYPE)); + *mtype = This->mtype; + if (mtype->cbFormat) { + mtype->pbFormat = CoTaskMemAlloc(mtype->cbFormat); + CopyMemory(mtype->pbFormat, This->mtype.pbFormat, mtype->cbFormat); + } + *types = mtype; + This->past = TRUE; + count = 1; + } + if (fetched) + *fetched = count; + return (count == nTypes) ? S_OK : S_FALSE; +} + +/* IEnumMediaTypes */ +static HRESULT WINAPI +Single_IEnumMediaTypes_Skip(IEnumMediaTypes *iface, ULONG nTypes) +{ + ME_Impl *This = (ME_Impl *)iface; + TRACE("(%p)->(%u)\n", This, nTypes); + if (nTypes) + This->past = TRUE; + return This->past ? S_FALSE : S_OK; +} + +/* IEnumMediaTypes */ +static HRESULT WINAPI +Single_IEnumMediaTypes_Reset(IEnumMediaTypes *iface) +{ + ME_Impl *This = (ME_Impl *)iface; + TRACE("(%p)->()\n", This); + This->past = FALSE; + return S_OK; +} + +/* IEnumMediaTypes */ +static HRESULT WINAPI +Single_IEnumMediaTypes_Clone(IEnumMediaTypes *iface, IEnumMediaTypes **me) +{ + ME_Impl *This = (ME_Impl *)iface; + TRACE("(%p)->(%p)\n", This, me); + if (!me) + return E_POINTER; + *me = mediaenum_create(&This->mtype); + if (!*me) + return E_OUTOFMEMORY; + ((ME_Impl *)*me)->past = This->past; + return S_OK; +} + + +/* Virtual tables and constructor */ + +static const IEnumMediaTypesVtbl IEnumMediaTypes_VTable = +{ + Single_IEnumMediaTypes_QueryInterface, + Single_IEnumMediaTypes_AddRef, + Single_IEnumMediaTypes_Release, + Single_IEnumMediaTypes_Next, + Single_IEnumMediaTypes_Skip, + Single_IEnumMediaTypes_Reset, + Single_IEnumMediaTypes_Clone, +}; + +IEnumMediaTypes *mediaenum_create(AM_MEDIA_TYPE *mtype) +{ + ME_Impl *obj = CoTaskMemAlloc(sizeof(ME_Impl)); + if (obj) { + ZeroMemory(obj, sizeof(ME_Impl)); + obj->me.lpVtbl = &IEnumMediaTypes_VTable; + obj->refCount = 1; + obj->past = FALSE; + obj->mtype = *mtype; + obj->mtype.pUnk = NULL; + if (mtype->cbFormat) { + obj->mtype.pbFormat = CoTaskMemAlloc(mtype->cbFormat); + CopyMemory(obj->mtype.pbFormat, mtype->pbFormat, mtype->cbFormat); + } + else + obj->mtype.pbFormat = NULL; + } + return &obj->me; +} + + +/* Sample Grabber pin implementation */ +typedef struct _SG_Pin { + const IPinVtbl* lpVtbl; + PIN_DIRECTION dir; + WCHAR const *name; + struct _SG_Impl *sg; + IPin *pair; +} SG_Pin; /* Sample Grabber filter implementation */ typedef struct _SG_Impl { const IBaseFilterVtbl* IBaseFilter_Vtbl; const ISampleGrabberVtbl* ISampleGrabber_Vtbl; + const IMemInputPinVtbl* IMemInputPin_Vtbl; /* TODO: IMediaPosition, IMediaSeeking, IQualityControl */ LONG refCount; FILTER_INFO info; FILTER_STATE state; + AM_MEDIA_TYPE mtype; + SG_Pin pin_in; + SG_Pin pin_out; IMemAllocator *allocator; IReferenceClock *refClock; + IMemInputPin *memOutput; + ISampleGrabberCB *grabberIface; + LONG grabberMethod; + LONG oneShot; } SG_Impl; + +enum { + OneShot_None, + OneShot_Wait, + OneShot_Past, +}; /* Get the SampleGrabber implementation This pointer from various interface pointers */ static inline SG_Impl *impl_from_IBaseFilter(IBaseFilter *iface) @@ -55,6 +389,11 @@ static inline SG_Impl *impl_from_ISampleGrabber(ISampleGrabber *iface) { return (SG_Impl *)((char*)iface - FIELD_OFFSET(SG_Impl, ISampleGrabber_Vtbl)); +} + +static inline SG_Impl *impl_from_IMemInputPin(IMemInputPin *iface) +{ + return (SG_Impl *)((char*)iface - FIELD_OFFSET(SG_Impl, IMemInputPin_Vtbl)); } @@ -68,6 +407,12 @@ IMemAllocator_Release(This->allocator); if (This->refClock) IReferenceClock_Release(This->refClock); + if (This->memOutput) + IMemInputPin_Release(This->memOutput); + if (This->grabberIface) + ISampleGrabberCB_Release(This->grabberIface); + if (This->mtype.pbFormat) + CoTaskMemFree(This->mtype.pbFormat); } /* Common helper AddRef called from all interfaces */ @@ -110,8 +455,11 @@ *ppvObject = &(This->ISampleGrabber_Vtbl); return S_OK; } - else if (IsEqualIID(riid, &IID_IMemInputPin)) - FIXME("IMemInputPin not implemented\n"); + else if (IsEqualIID(riid, &IID_IMemInputPin)) { + SampleGrabber_addref(This); + *ppvObject = &(This->IMemInputPin_Vtbl); + return S_OK; + } else if (IsEqualIID(riid, &IID_IMediaPosition)) FIXME("IMediaPosition not implemented\n"); else if (IsEqualIID(riid, &IID_IMediaSeeking)) @@ -123,6 +471,45 @@ return E_NOINTERFACE; } +/* Helper that calls installed sample callbacks */ +static void SampleGrabber_callback(SG_Impl *This, IMediaSample *sample) +{ + double time = 0.0; + REFERENCE_TIME tStart, tEnd; + if (SUCCEEDED(IMediaSample_GetTime(sample, &tStart, &tEnd))) + time = 1e-7 * tStart; + switch (This->grabberMethod) { + case 0: + { + ULONG ref = IMediaSample_AddRef(sample); + ISampleGrabberCB_SampleCB(This->grabberIface, time, sample); + ref = IMediaSample_Release(sample) + 1 - ref; + if (ref) + { + ERR("(%p) Callback referenced sample %p by %u\n", This, sample, ref); + /* ugly as hell but some apps are sooo buggy */ + while (ref--) + IMediaSample_Release(sample); + } + } + break; + case 1: + { + BYTE *data = 0; + long size = IMediaSample_GetActualDataLength(sample); + if (size && SUCCEEDED(IMediaSample_GetPointer(sample, &data)) && data) + ISampleGrabberCB_BufferCB(This->grabberIface, time, data, size); + } + break; + case -1: + break; + default: + FIXME("unsupported method %ld\n", (long int)This->grabberMethod); + /* do not bother us again */ + This->grabberMethod = -1; + } +} + /* SampleGrabber implementation of IBaseFilter interface */ @@ -236,10 +623,14 @@ SampleGrabber_IBaseFilter_EnumPins(IBaseFilter *iface, IEnumPins **pins) { SG_Impl *This = impl_from_IBaseFilter(iface); - FIXME("(%p)->(%p): stub\n", This, pins); + IPin *pin[2]; + TRACE("(%p)->(%p)\n", This, pins); if (!pins) return E_POINTER; - return E_OUTOFMEMORY; + pin[0] = (IPin*)&This->pin_in.lpVtbl; + pin[1] = (IPin*)&This->pin_out.lpVtbl; + *pins = pinsenum_create(iface, pin, 2); + return *pins ? S_OK : E_OUTOFMEMORY; } /* IBaseFilter */ @@ -247,9 +638,21 @@ SampleGrabber_IBaseFilter_FindPin(IBaseFilter *iface, LPCWSTR id, IPin **pin) { SG_Impl *This = impl_from_IBaseFilter(iface); - FIXME("(%p)->(%s, %p): stub\n", This, debugstr_w(id), pin); + TRACE("(%p)->(%s, %p)\n", This, debugstr_w(id), pin); if (!id || !pin) return E_POINTER; + if (!lstrcmpiW(id,pin_in_name)) + { + SampleGrabber_addref(This); + *pin = (IPin*)&(This->pin_in.lpVtbl); + return S_OK; + } + else if (!lstrcmpiW(id,pin_out_name)) + { + SampleGrabber_addref(This); + *pin = (IPin*)&(This->pin_out.lpVtbl); + return S_OK; + } *pin = NULL; return VFW_E_NOT_FOUND; } @@ -277,6 +680,7 @@ This->info.pGraph = graph; if (name) lstrcpynW(This->info.achName,name,MAX_FILTER_NAME); + This->oneShot = OneShot_None; return S_OK; } @@ -321,8 +725,9 @@ SampleGrabber_ISampleGrabber_SetOneShot(ISampleGrabber *iface, BOOL oneShot) { SG_Impl *This = impl_from_ISampleGrabber(iface); - FIXME("(%p)->(%u): stub\n", This, oneShot); - return E_NOTIMPL; + TRACE("(%p)->(%u)\n", This, oneShot); + This->oneShot = oneShot ? OneShot_Wait : OneShot_None; + return S_OK; } /* ISampleGrabber */ @@ -330,10 +735,24 @@ SampleGrabber_ISampleGrabber_SetMediaType(ISampleGrabber *iface, const AM_MEDIA_TYPE *type) { SG_Impl *This = impl_from_ISampleGrabber(iface); - FIXME("(%p)->(%p): stub\n", This, type); + TRACE("(%p)->(%p)\n", This, type); if (!type) return E_POINTER; - return E_NOTIMPL; + TRACE("Media type: %s/%s ssize: %u format: %s (%u bytes)\n", + debugstr_guid(&type->majortype), debugstr_guid(&type->subtype), + type->lSampleSize, + debugstr_guid(&type->formattype), type->cbFormat); + if (This->mtype.pbFormat) + CoTaskMemFree(This->mtype.pbFormat); + This->mtype = *type; + This->mtype.pUnk = NULL; + if (type->cbFormat) { + This->mtype.pbFormat = CoTaskMemAlloc(type->cbFormat); + CopyMemory(This->mtype.pbFormat, type->pbFormat, type->cbFormat); + } + else + This->mtype.pbFormat = NULL; + return S_OK; } /* ISampleGrabber */ @@ -341,10 +760,17 @@ SampleGrabber_ISampleGrabber_GetConnectedMediaType(ISampleGrabber *iface, AM_MEDIA_TYPE *type) { SG_Impl *This = impl_from_ISampleGrabber(iface); - FIXME("(%p)->(%p): stub\n", This, type); + TRACE("(%p)->(%p)\n", This, type); if (!type) return E_POINTER; - return E_NOTIMPL; + if (!This->pin_in.pair) + return VFW_E_NOT_CONNECTED; + *type = This->mtype; + if (type->cbFormat) { + type->pbFormat = CoTaskMemAlloc(type->cbFormat); + CopyMemory(type->pbFormat, This->mtype.pbFormat, type->cbFormat); + } + return S_OK; } /* ISampleGrabber */ @@ -383,8 +809,465 @@ SampleGrabber_ISampleGrabber_SetCallback(ISampleGrabber *iface, ISampleGrabberCB *cb, LONG whichMethod) { SG_Impl *This = impl_from_ISampleGrabber(iface); - FIXME("(%p)->(%p, %u): stub\n", This, cb, whichMethod); + TRACE("(%p)->(%p, %u)\n", This, cb, whichMethod); + if (This->grabberIface) + ISampleGrabberCB_Release(This->grabberIface); + This->grabberIface = cb; + This->grabberMethod = whichMethod; + if (cb) + ISampleGrabberCB_AddRef(cb); + return S_OK; +} + + +/* SampleGrabber implementation of IMemInputPin interface */ + +/* IUnknown */ +static HRESULT WINAPI +SampleGrabber_IMemInputPin_QueryInterface(IMemInputPin *iface, REFIID riid, void **ppvObject) +{ + return SampleGrabber_query(impl_from_IMemInputPin(iface), riid, ppvObject); +} + +/* IUnknown */ +static ULONG WINAPI +SampleGrabber_IMemInputPin_AddRef(IMemInputPin *iface) +{ + return SampleGrabber_addref(impl_from_IMemInputPin(iface)); +} + +/* IUnknown */ +static ULONG WINAPI +SampleGrabber_IMemInputPin_Release(IMemInputPin *iface) +{ + return SampleGrabber_release(impl_from_IMemInputPin(iface)); +} + +/* IMemInputPin */ +static HRESULT WINAPI +SampleGrabber_IMemInputPin_GetAllocator(IMemInputPin *iface, IMemAllocator **allocator) +{ + SG_Impl *This = impl_from_IMemInputPin(iface); + TRACE("(%p)->(%p) allocator = %p\n", This, allocator, This->allocator); + if (!allocator) + return E_POINTER; + *allocator = This->allocator; + if (!*allocator) + return VFW_E_NO_ALLOCATOR; + IMemAllocator_AddRef(*allocator); + return S_OK; +} + +/* IMemInputPin */ +static HRESULT WINAPI +SampleGrabber_IMemInputPin_NotifyAllocator(IMemInputPin *iface, IMemAllocator *allocator, BOOL readOnly) +{ + SG_Impl *This = impl_from_IMemInputPin(iface); + TRACE("(%p)->(%p, %u) allocator = %p\n", This, allocator, readOnly, This->allocator); + if (This->allocator == allocator) + return S_OK; + if (This->allocator) + IMemAllocator_Release(This->allocator); + This->allocator = allocator; + if (allocator) + IMemAllocator_AddRef(allocator); + return S_OK; +} + +/* IMemInputPin */ +static HRESULT WINAPI +SampleGrabber_IMemInputPin_GetAllocatorRequirements(IMemInputPin *iface, ALLOCATOR_PROPERTIES *props) +{ + SG_Impl *This = impl_from_IMemInputPin(iface); + FIXME("(%p)->(%p): semi-stub\n", This, props); + if (!props) + return E_POINTER; + return This->memOutput ? IMemInputPin_GetAllocatorRequirements(This->memOutput, props) : E_NOTIMPL; +} + +/* IMemInputPin */ +static HRESULT WINAPI +SampleGrabber_IMemInputPin_Receive(IMemInputPin *iface, IMediaSample *sample) +{ + SG_Impl *This = impl_from_IMemInputPin(iface); + HRESULT hr; + TRACE("(%p)->(%p) output = %p, grabber = %p\n", This, sample, This->memOutput, This->grabberIface); + if (!sample) + return E_POINTER; + if ((This->state != State_Running) || (This->oneShot == OneShot_Past)) + return S_FALSE; + if (This->grabberIface) + SampleGrabber_callback(This, sample); + hr = This->memOutput ? IMemInputPin_Receive(This->memOutput, sample) : S_OK; + if (This->oneShot == OneShot_Wait) { + This->oneShot = OneShot_Past; + hr = S_FALSE; + if (This->pin_out.pair) + IPin_EndOfStream(This->pin_out.pair); + } + return hr; +} + +/* IMemInputPin */ +static HRESULT WINAPI +SampleGrabber_IMemInputPin_ReceiveMultiple(IMemInputPin *iface, IMediaSample **samples, LONG nSamples, LONG *nProcessed) +{ + SG_Impl *This = impl_from_IMemInputPin(iface); + TRACE("(%p)->(%p, %u, %p) output = %p, grabber = %p\n", This, samples, nSamples, nProcessed, This->memOutput, This->grabberIface); + if (!samples || !nProcessed) + return E_POINTER; + if ((This->state != State_Running) || (This->oneShot == OneShot_Past)) + return S_FALSE; + if (This->grabberIface) { + LONG idx; + for (idx = 0; idx < nSamples; idx++) + SampleGrabber_callback(This, samples[idx]); + } + return This->memOutput ? IMemInputPin_ReceiveMultiple(This->memOutput, samples, nSamples, nProcessed) : S_OK; +} + +/* IMemInputPin */ +static HRESULT WINAPI +SampleGrabber_IMemInputPin_ReceiveCanBlock(IMemInputPin *iface) +{ + SG_Impl *This = impl_from_IMemInputPin(iface); + TRACE("(%p)\n", This); + return This->memOutput ? IMemInputPin_ReceiveCanBlock(This->memOutput) : S_OK; +} + + +/* SampleGrabber member pin implementation */ + +/* IUnknown */ +static ULONG WINAPI +SampleGrabber_IPin_AddRef(IPin *iface) +{ + return SampleGrabber_addref(((SG_Pin *)iface)->sg); +} + +/* IUnknown */ +static ULONG WINAPI +SampleGrabber_IPin_Release(IPin *iface) +{ + return SampleGrabber_release(((SG_Pin *)iface)->sg); +} + +/* IUnknown */ +static HRESULT WINAPI +SampleGrabber_IPin_QueryInterface(IPin *iface, REFIID riid, void **ppvObject) +{ + SG_Pin *This = (SG_Pin *)iface; + TRACE("(%p)->(%s %p)\n", This, debugstr_guid(riid), ppvObject); + + if (IsEqualIID(riid, &IID_IUnknown) || + IsEqualIID(riid, &IID_IPin)) { + SampleGrabber_addref(This->sg); + *ppvObject = This; + return S_OK; + } + else if (IsEqualIID(riid, &IID_IMemInputPin)) { + SampleGrabber_addref(This->sg); + *ppvObject = &(This->sg->IMemInputPin_Vtbl); + return S_OK; + } + *ppvObject = NULL; + WARN("(%p, %s,%p): not found\n", This, debugstr_guid(riid), ppvObject); + return E_NOINTERFACE; +} + +/* IPin - input pin */ +static HRESULT WINAPI +SampleGrabber_In_IPin_Connect(IPin *iface, IPin *receiver, const AM_MEDIA_TYPE *mtype) +{ + WARN("(%p, %p): unexpected\n", receiver, mtype); + return E_UNEXPECTED; +} + +/* IPin - output pin */ +static HRESULT WINAPI +SampleGrabber_Out_IPin_Connect(IPin *iface, IPin *receiver, const AM_MEDIA_TYPE *type) +{ + SG_Pin *This = (SG_Pin *)iface; + HRESULT hr; + TRACE("(%p)->(%p, %p)\n", This, receiver, type); + if (!receiver) + return E_POINTER; + if (This->pair) + return VFW_E_ALREADY_CONNECTED; + if (This->sg->state != State_Stopped) + return VFW_E_NOT_STOPPED; + if (type) { + TRACE("Media type: %s/%s ssize: %u format: %s (%u bytes)\n", + debugstr_guid(&type->majortype), debugstr_guid(&type->subtype), + type->lSampleSize, + debugstr_guid(&type->formattype), type->cbFormat); + if (!IsEqualGUID(&This->sg->mtype.majortype,&GUID_NULL) && + !IsEqualGUID(&This->sg->mtype.majortype,&type->majortype)) + return VFW_E_TYPE_NOT_ACCEPTED; + if (!IsEqualGUID(&This->sg->mtype.subtype,&MEDIASUBTYPE_None) && + !IsEqualGUID(&This->sg->mtype.subtype,&type->subtype)) + return VFW_E_TYPE_NOT_ACCEPTED; + if (!IsEqualGUID(&This->sg->mtype.formattype,&GUID_NULL) && + !IsEqualGUID(&This->sg->mtype.formattype,&FORMAT_None) && + !IsEqualGUID(&This->sg->mtype.formattype,&type->formattype)) + return VFW_E_TYPE_NOT_ACCEPTED; + } + else + type = &This->sg->mtype; + hr = IPin_ReceiveConnection(receiver,(IPin*)&This->lpVtbl,type); + if (FAILED(hr)) + return hr; + This->pair = receiver; + if (This->sg->memOutput) { + IMemInputPin_Release(This->sg->memOutput); + This->sg->memOutput = NULL; + } + IPin_QueryInterface(receiver,&IID_IMemInputPin,(void **)&(This->sg->memOutput)); + TRACE("(%p) Accepted IPin %p, IMemInputPin %p\n", This, receiver, This->sg->memOutput); + return S_OK; +} + +/* IPin - input pin */ +static HRESULT WINAPI +SampleGrabber_In_IPin_ReceiveConnection(IPin *iface, IPin *connector, const AM_MEDIA_TYPE *type) +{ + SG_Pin *This = (SG_Pin *)iface; + TRACE("(%p)->(%p, %p)\n", This, connector, type); + if (!connector) + return E_POINTER; + if (This->pair) + return VFW_E_ALREADY_CONNECTED; + if (This->sg->state != State_Stopped) + return VFW_E_NOT_STOPPED; + if (type) { + TRACE("Media type: %s/%s ssize: %u format: %s (%u bytes)\n", + debugstr_guid(&type->majortype), debugstr_guid(&type->subtype), + type->lSampleSize, + debugstr_guid(&type->formattype), type->cbFormat); + if (!IsEqualGUID(&This->sg->mtype.majortype,&GUID_NULL) && + !IsEqualGUID(&This->sg->mtype.majortype,&type->majortype)) + return VFW_E_TYPE_NOT_ACCEPTED; + if (!IsEqualGUID(&This->sg->mtype.subtype,&MEDIASUBTYPE_None) && + !IsEqualGUID(&This->sg->mtype.subtype,&type->subtype)) + return VFW_E_TYPE_NOT_ACCEPTED; + if (!IsEqualGUID(&This->sg->mtype.formattype,&GUID_NULL) && + !IsEqualGUID(&This->sg->mtype.formattype,&FORMAT_None) && + !IsEqualGUID(&This->sg->mtype.formattype,&type->formattype)) + return VFW_E_TYPE_NOT_ACCEPTED; + if (This->sg->mtype.pbFormat) + CoTaskMemFree(This->sg->mtype.pbFormat); + This->sg->mtype = *type; + This->sg->mtype.pUnk = NULL; + if (type->cbFormat) { + This->sg->mtype.pbFormat = CoTaskMemAlloc(type->cbFormat); + CopyMemory(This->sg->mtype.pbFormat, type->pbFormat, type->cbFormat); + } + else + This->sg->mtype.pbFormat = NULL; + } + This->pair = connector; + TRACE("(%p) Accepted IPin %p\n", This, connector); + return S_OK; +} + +/* IPin - output pin */ +static HRESULT WINAPI +SampleGrabber_Out_IPin_ReceiveConnection(IPin *iface, IPin *connector, const AM_MEDIA_TYPE *mtype) +{ + WARN("(%p, %p): unexpected\n", connector, mtype); + return E_UNEXPECTED; +} + +/* IPin - input pin */ +static HRESULT WINAPI +SampleGrabber_In_IPin_Disconnect(IPin *iface) +{ + SG_Pin *This = (SG_Pin *)iface; + TRACE("(%p)->() pair = %p\n", This, This->pair); + if (This->sg->state != State_Stopped) + return VFW_E_NOT_STOPPED; + if (This->pair) { + This->pair = NULL; + return S_OK; + } + return S_FALSE; +} + +/* IPin - output pin */ +static HRESULT WINAPI +SampleGrabber_Out_IPin_Disconnect(IPin *iface) +{ + SG_Pin *This = (SG_Pin *)iface; + TRACE("(%p)->() pair = %p\n", This, This->pair); + if (This->sg->state != State_Stopped) + return VFW_E_NOT_STOPPED; + if (This->pair) { + This->pair = NULL; + if (This->sg->memOutput) { + IMemInputPin_Release(This->sg->memOutput); + This->sg->memOutput = NULL; + } + return S_OK; + } + return S_FALSE; +} + +/* IPin */ +static HRESULT WINAPI +SampleGrabber_IPin_ConnectedTo(IPin *iface, IPin **pin) +{ + SG_Pin *This = (SG_Pin *)iface; + TRACE("(%p)->(%p) pair = %p\n", This, pin, This->pair); + if (!pin) + return E_POINTER; + *pin = This->pair; + if (*pin) { + IPin_AddRef(*pin); + return S_OK; + } + return VFW_E_NOT_CONNECTED; +} + +/* IPin */ +static HRESULT WINAPI +SampleGrabber_IPin_ConnectionMediaType(IPin *iface, AM_MEDIA_TYPE *mtype) +{ + SG_Pin *This = (SG_Pin *)iface; + TRACE("(%p)->(%p)\n", This, mtype); + if (!mtype) + return E_POINTER; + if (!This->pair) + return VFW_E_NOT_CONNECTED; + *mtype = This->sg->mtype; + if (mtype->cbFormat) { + mtype->pbFormat = CoTaskMemAlloc(mtype->cbFormat); + CopyMemory(mtype->pbFormat, This->sg->mtype.pbFormat, mtype->cbFormat); + } + return S_OK; +} + +/* IPin */ +static HRESULT WINAPI +SampleGrabber_IPin_QueryPinInfo(IPin *iface, PIN_INFO *info) +{ + SG_Pin *This = (SG_Pin *)iface; + TRACE("(%p)->(%p)\n", This, info); + if (!info) + return E_POINTER; + SampleGrabber_addref(This->sg); + info->pFilter = (IBaseFilter *)This->sg; + info->dir = This->dir; + lstrcpynW(info->achName,This->name,MAX_PIN_NAME); + return S_OK; +} + +/* IPin */ +static HRESULT WINAPI +SampleGrabber_IPin_QueryDirection(IPin *iface, PIN_DIRECTION *dir) +{ + SG_Pin *This = (SG_Pin *)iface; + TRACE("(%p)->(%p)\n", This, dir); + if (!dir) + return E_POINTER; + *dir = This->dir; + return S_OK; +} + +/* IPin */ +static HRESULT WINAPI +SampleGrabber_IPin_QueryId(IPin *iface, LPWSTR *id) +{ + SG_Pin *This = (SG_Pin *)iface; + int len; + TRACE("(%p)->(%p)\n", This, id); + if (!id) + return E_POINTER; + len = sizeof(WCHAR)*(1+lstrlenW(This->name)); + *id = CoTaskMemAlloc(len); + CopyMemory(*id, This->name, len); + return S_OK; +} + +/* IPin */ +static HRESULT WINAPI +SampleGrabber_IPin_QueryAccept(IPin *iface, const AM_MEDIA_TYPE *mtype) +{ + TRACE("(%p)\n", mtype); + return S_OK; +} + +/* IPin */ +static HRESULT WINAPI +SampleGrabber_IPin_EnumMediaTypes(IPin *iface, IEnumMediaTypes **mtypes) +{ + SG_Pin *This = (SG_Pin *)iface; + TRACE("(%p)->(%p)\n", This, mtypes); + if (!mtypes) + return E_POINTER; + *mtypes = mediaenum_create(&This->sg->mtype); + return *mtypes ? S_OK : E_OUTOFMEMORY; +} + +/* IPin - input pin */ +static HRESULT WINAPI +SampleGrabber_In_IPin_QueryInternalConnections(IPin *iface, IPin **pins, ULONG *nPins) +{ + SG_Pin *This = (SG_Pin *)iface; + TRACE("(%p)->(%p, %p) size = %u\n", This, pins, nPins, (nPins ? *nPins : 0)); + if (!nPins) + return E_POINTER; + if (*nPins) { + if (!pins) + return E_POINTER; + IPin_AddRef((IPin*)&This->sg->pin_out.lpVtbl); + *pins = (IPin*)&This->sg->pin_out.lpVtbl; + *nPins = 1; + return S_OK; + } + *nPins = 1; + return S_FALSE; +} + +/* IPin - output pin */ +static HRESULT WINAPI +SampleGrabber_Out_IPin_QueryInternalConnections(IPin *iface, IPin **pins, ULONG *nPins) +{ + WARN("(%p, %p): unexpected\n", pins, nPins); + if (nPins) + *nPins = 0; return E_NOTIMPL; +} + +/* IPin */ +static HRESULT WINAPI +SampleGrabber_IPin_EndOfStream(IPin *iface) +{ + FIXME(": stub\n"); + return S_OK; +} + +/* IPin */ +static HRESULT WINAPI +SampleGrabber_IPin_BeginFlush(IPin *iface) +{ + FIXME(": stub\n"); + return S_OK; +} + +/* IPin */ +static HRESULT WINAPI +SampleGrabber_IPin_EndFlush(IPin *iface) +{ + FIXME(": stub\n"); + return S_OK; +} + +/* IPin */ +static HRESULT WINAPI +SampleGrabber_IPin_NewSegment(IPin *iface, REFERENCE_TIME tStart, REFERENCE_TIME tStop, double rate) +{ + FIXME(": stub\n"); + return S_OK; } @@ -423,6 +1306,63 @@ SampleGrabber_ISampleGrabber_SetCallback, }; +static const IMemInputPinVtbl IMemInputPin_VTable = +{ + SampleGrabber_IMemInputPin_QueryInterface, + SampleGrabber_IMemInputPin_AddRef, + SampleGrabber_IMemInputPin_Release, + SampleGrabber_IMemInputPin_GetAllocator, + SampleGrabber_IMemInputPin_NotifyAllocator, + SampleGrabber_IMemInputPin_GetAllocatorRequirements, + SampleGrabber_IMemInputPin_Receive, + SampleGrabber_IMemInputPin_ReceiveMultiple, + SampleGrabber_IMemInputPin_ReceiveCanBlock, +}; + +static const IPinVtbl IPin_In_VTable = +{ + SampleGrabber_IPin_QueryInterface, + SampleGrabber_IPin_AddRef, + SampleGrabber_IPin_Release, + SampleGrabber_In_IPin_Connect, + SampleGrabber_In_IPin_ReceiveConnection, + SampleGrabber_In_IPin_Disconnect, + SampleGrabber_IPin_ConnectedTo, + SampleGrabber_IPin_ConnectionMediaType, + SampleGrabber_IPin_QueryPinInfo, + SampleGrabber_IPin_QueryDirection, + SampleGrabber_IPin_QueryId, + SampleGrabber_IPin_QueryAccept, + SampleGrabber_IPin_EnumMediaTypes, + SampleGrabber_In_IPin_QueryInternalConnections, + SampleGrabber_IPin_EndOfStream, + SampleGrabber_IPin_BeginFlush, + SampleGrabber_IPin_EndFlush, + SampleGrabber_IPin_NewSegment, +}; + +static const IPinVtbl IPin_Out_VTable = +{ + SampleGrabber_IPin_QueryInterface, + SampleGrabber_IPin_AddRef, + SampleGrabber_IPin_Release, + SampleGrabber_Out_IPin_Connect, + SampleGrabber_Out_IPin_ReceiveConnection, + SampleGrabber_Out_IPin_Disconnect, + SampleGrabber_IPin_ConnectedTo, + SampleGrabber_IPin_ConnectionMediaType, + SampleGrabber_IPin_QueryPinInfo, + SampleGrabber_IPin_QueryDirection, + SampleGrabber_IPin_QueryId, + SampleGrabber_IPin_QueryAccept, + SampleGrabber_IPin_EnumMediaTypes, + SampleGrabber_Out_IPin_QueryInternalConnections, + SampleGrabber_IPin_EndOfStream, + SampleGrabber_IPin_BeginFlush, + SampleGrabber_IPin_EndFlush, + SampleGrabber_IPin_NewSegment, +}; + HRESULT SampleGrabber_create(IUnknown *pUnkOuter, LPVOID *ppv) { SG_Impl* obj = NULL; @@ -442,11 +1382,29 @@ obj->refCount = 1; obj->IBaseFilter_Vtbl = &IBaseFilter_VTable; obj->ISampleGrabber_Vtbl = &ISampleGrabber_VTable; + obj->IMemInputPin_Vtbl = &IMemInputPin_VTable; + obj->pin_in.lpVtbl = &IPin_In_VTable; + obj->pin_in.dir = PINDIR_INPUT; + obj->pin_in.name = pin_in_name; + obj->pin_in.sg = obj; + obj->pin_in.pair = NULL; + obj->pin_out.lpVtbl = &IPin_Out_VTable; + obj->pin_out.dir = PINDIR_OUTPUT; + obj->pin_out.name = pin_out_name; + obj->pin_out.sg = obj; + obj->pin_out.pair = NULL; obj->info.achName[0] = 0; obj->info.pGraph = NULL; obj->state = State_Stopped; + obj->mtype.majortype = GUID_NULL; + obj->mtype.subtype = MEDIASUBTYPE_None; + obj->mtype.formattype = FORMAT_None; obj->allocator = NULL; obj->refClock = NULL; + obj->memOutput = NULL; + obj->grabberIface = NULL; + obj->grabberMethod = -1; + obj->oneShot = OneShot_None; *ppv = obj; return S_OK;
14 years, 9 months
1
0
0
0
[akhaldi] 45751: - Move more stuff to wdm.h - Fix KBUGCHECK_CALLBACK_REASON - Add missing KDPC_IMPORTANCE member
by akhaldi@svn.reactos.org
Author: akhaldi Date: Mon Mar 1 22:46:34 2010 New Revision: 45751 URL:
http://svn.reactos.org/svn/reactos?rev=45751&view=rev
Log: - Move more stuff to wdm.h - Fix KBUGCHECK_CALLBACK_REASON - Add missing KDPC_IMPORTANCE member Modified: branches/header-work/include/ddk/wdm.h branches/header-work/include/ddk/winddk.h Modified: branches/header-work/include/ddk/wdm.h URL:
http://svn.reactos.org/svn/reactos/branches/header-work/include/ddk/wdm.h?r…
============================================================================== --- branches/header-work/include/ddk/wdm.h [iso-8859-1] (original) +++ branches/header-work/include/ddk/wdm.h [iso-8859-1] Mon Mar 1 22:46:34 2010 @@ -1021,6 +1021,34 @@ WrRundown, MaximumWaitReason } KWAIT_REASON; + +typedef struct _KWAIT_BLOCK { + LIST_ENTRY WaitListEntry; + struct _KTHREAD *Thread; + PVOID Object; + struct _KWAIT_BLOCK *NextWaitBlock; + USHORT WaitKey; + UCHAR WaitType; + volatile UCHAR BlockState; + +#if defined(_WIN64) + + LONG SpareLong; + +#endif + +} KWAIT_BLOCK, *PKWAIT_BLOCK, *PRKWAIT_BLOCK; + +typedef enum _KINTERRUPT_MODE { + LevelSensitive, + Latched +} KINTERRUPT_MODE; + +#define THREAD_WAIT_OBJECTS 3 + +typedef VOID +(DDKAPI *PKINTERRUPT_ROUTINE)( + VOID); typedef enum _KD_OPTION { KD_OPTION_SET_BLOCK_ENABLE, @@ -2684,6 +2712,20 @@ } PCI_COMMON_CONFIG, *PPCI_COMMON_CONFIG; #endif + +typedef enum _CREATE_FILE_TYPE { + CreateFileTypeNone, + CreateFileTypeNamedPipe, + CreateFileTypeMailslot +} CREATE_FILE_TYPE; + +#define IO_FORCE_ACCESS_CHECK 0x001 +#define IO_NO_PARAMETER_CHECKING 0x100 + +#define IO_REPARSE 0x0 +#define IO_REMOUNT 0x1 + + typedef struct _PCI_SLOT_NUMBER { union { @@ -5597,6 +5639,75 @@ * Executive Types * ******************************************************************************/ +typedef enum _KBUGCHECK_CALLBACK_REASON { + KbCallbackInvalid, + KbCallbackReserved1, + KbCallbackSecondaryDumpData, + KbCallbackDumpIo, + KbCallbackAddPages +} KBUGCHECK_CALLBACK_REASON; + +struct _KBUGCHECK_REASON_CALLBACK_RECORD; + +typedef VOID +(DDKAPI *PKBUGCHECK_REASON_CALLBACK_ROUTINE)( + IN KBUGCHECK_CALLBACK_REASON Reason, + IN struct _KBUGCHECK_REASON_CALLBACK_RECORD *Record, + IN OUT PVOID ReasonSpecificData, + IN ULONG ReasonSpecificDataLength); + +typedef struct _KBUGCHECK_REASON_CALLBACK_RECORD { + LIST_ENTRY Entry; + PKBUGCHECK_REASON_CALLBACK_ROUTINE CallbackRoutine; + PUCHAR Component; + ULONG_PTR Checksum; + KBUGCHECK_CALLBACK_REASON Reason; + UCHAR State; +} KBUGCHECK_REASON_CALLBACK_RECORD, *PKBUGCHECK_REASON_CALLBACK_RECORD; + +typedef enum _KBUGCHECK_BUFFER_DUMP_STATE { + BufferEmpty, + BufferInserted, + BufferStarted, + BufferFinished, + BufferIncomplete +} KBUGCHECK_BUFFER_DUMP_STATE; + +typedef VOID +(DDKAPI *PKBUGCHECK_CALLBACK_ROUTINE)( + IN PVOID Buffer, + IN ULONG Length); + +typedef struct _KBUGCHECK_CALLBACK_RECORD { + LIST_ENTRY Entry; + PKBUGCHECK_CALLBACK_ROUTINE CallbackRoutine; + PVOID Buffer; + ULONG Length; + PUCHAR Component; + ULONG_PTR Checksum; + UCHAR State; +} KBUGCHECK_CALLBACK_RECORD, *PKBUGCHECK_CALLBACK_RECORD; + +typedef BOOLEAN +(DDKAPI *PNMI_CALLBACK)( + IN PVOID Context, + IN BOOLEAN Handled); + +/* + * VOID + * KeInitializeCallbackRecord( + * IN PKBUGCHECK_CALLBACK_RECORD CallbackRecord) + */ +#define KeInitializeCallbackRecord(CallbackRecord) \ + CallbackRecord->State = BufferEmpty; + +typedef enum _KDPC_IMPORTANCE { + LowImportance, + MediumImportance, + HighImportance, + MediumHighImportance +} KDPC_IMPORTANCE; + typedef enum _POOL_TYPE { NonPagedPool, PagedPool, Modified: branches/header-work/include/ddk/winddk.h URL:
http://svn.reactos.org/svn/reactos/branches/header-work/include/ddk/winddk.…
============================================================================== --- branches/header-work/include/ddk/winddk.h [iso-8859-1] (original) +++ branches/header-work/include/ddk/winddk.h [iso-8859-1] Mon Mar 1 22:46:34 2010 @@ -1241,33 +1241,6 @@ SynchronizationEvent } EVENT_TYPE; -typedef struct _KWAIT_BLOCK { - LIST_ENTRY WaitListEntry; - struct _KTHREAD * RESTRICTED_POINTER Thread; - PVOID Object; - struct _KWAIT_BLOCK * RESTRICTED_POINTER NextWaitBlock; - USHORT WaitKey; - UCHAR WaitType; - UCHAR SpareByte; -} KWAIT_BLOCK, *PKWAIT_BLOCK, *RESTRICTED_POINTER PRKWAIT_BLOCK; - -typedef enum _KINTERRUPT_MODE { - LevelSensitive, - Latched -} KINTERRUPT_MODE; - -#define THREAD_WAIT_OBJECTS 3 - -typedef VOID -(DDKAPI *PKINTERRUPT_ROUTINE)( - VOID); - -typedef enum _CREATE_FILE_TYPE { - CreateFileTypeNone, - CreateFileTypeNamedPipe, - CreateFileTypeMailslot -} CREATE_FILE_TYPE; - typedef struct _CONFIGURATION_INFORMATION { ULONG DiskCount; ULONG FloppyCount; @@ -1327,12 +1300,6 @@ MaximumType } CONFIGURATION_TYPE, *PCONFIGURATION_TYPE; -#define IO_FORCE_ACCESS_CHECK 0x001 -#define IO_NO_PARAMETER_CHECKING 0x100 - -#define IO_REPARSE 0x0 -#define IO_REMOUNT 0x1 - typedef NTSTATUS (DDKAPI *PIO_QUERY_DEVICE_ROUTINE)( IN PVOID Context, @@ -1353,73 +1320,6 @@ IoQueryDeviceComponentInformation, IoQueryDeviceMaxData } IO_QUERY_DEVICE_DATA_FORMAT, *PIO_QUERY_DEVICE_DATA_FORMAT; - -typedef enum _KBUGCHECK_CALLBACK_REASON { - KbCallbackInvalid, - KbCallbackReserved1, - KbCallbackSecondaryDumpData, - KbCallbackDumpIo, -} KBUGCHECK_CALLBACK_REASON; - -struct _KBUGCHECK_REASON_CALLBACK_RECORD; - -typedef VOID -(DDKAPI *PKBUGCHECK_REASON_CALLBACK_ROUTINE)( - IN KBUGCHECK_CALLBACK_REASON Reason, - IN struct _KBUGCHECK_REASON_CALLBACK_RECORD *Record, - IN OUT PVOID ReasonSpecificData, - IN ULONG ReasonSpecificDataLength); - -typedef struct _KBUGCHECK_REASON_CALLBACK_RECORD { - LIST_ENTRY Entry; - PKBUGCHECK_REASON_CALLBACK_ROUTINE CallbackRoutine; - PUCHAR Component; - ULONG_PTR Checksum; - KBUGCHECK_CALLBACK_REASON Reason; - UCHAR State; -} KBUGCHECK_REASON_CALLBACK_RECORD, *PKBUGCHECK_REASON_CALLBACK_RECORD; - -typedef enum _KBUGCHECK_BUFFER_DUMP_STATE { - BufferEmpty, - BufferInserted, - BufferStarted, - BufferFinished, - BufferIncomplete -} KBUGCHECK_BUFFER_DUMP_STATE; - -typedef VOID -(DDKAPI *PKBUGCHECK_CALLBACK_ROUTINE)( - IN PVOID Buffer, - IN ULONG Length); - -typedef struct _KBUGCHECK_CALLBACK_RECORD { - LIST_ENTRY Entry; - PKBUGCHECK_CALLBACK_ROUTINE CallbackRoutine; - PVOID Buffer; - ULONG Length; - PUCHAR Component; - ULONG_PTR Checksum; - UCHAR State; -} KBUGCHECK_CALLBACK_RECORD, *PKBUGCHECK_CALLBACK_RECORD; - -typedef BOOLEAN -(DDKAPI *PNMI_CALLBACK)( - IN PVOID Context, - IN BOOLEAN Handled); - -/* - * VOID - * KeInitializeCallbackRecord( - * IN PKBUGCHECK_CALLBACK_RECORD CallbackRecord) - */ -#define KeInitializeCallbackRecord(CallbackRecord) \ - CallbackRecord->State = BufferEmpty; - -typedef enum _KDPC_IMPORTANCE { - LowImportance, - MediumImportance, - HighImportance -} KDPC_IMPORTANCE; typedef enum _MEMORY_CACHING_TYPE_ORIG { MmFrameBufferCached = 2
14 years, 9 months
1
0
0
0
[akhaldi] 45750: - Move more stuff to wdm.h - Add _PCI_COMMON_HEADER - Improve _PCI_COMMON_CONFIG - Enable msc extensions
by akhaldi@svn.reactos.org
Author: akhaldi Date: Mon Mar 1 22:24:36 2010 New Revision: 45750 URL:
http://svn.reactos.org/svn/reactos?rev=45750&view=rev
Log: - Move more stuff to wdm.h - Add _PCI_COMMON_HEADER - Improve _PCI_COMMON_CONFIG - Enable msc extensions Modified: branches/header-work/ReactOS-i386.rbuild branches/header-work/include/ddk/wdm.h branches/header-work/include/ddk/winddk.h Modified: branches/header-work/ReactOS-i386.rbuild URL:
http://svn.reactos.org/svn/reactos/branches/header-work/ReactOS-i386.rbuild…
============================================================================== --- branches/header-work/ReactOS-i386.rbuild [iso-8859-1] (original) +++ branches/header-work/ReactOS-i386.rbuild [iso-8859-1] Mon Mar 1 22:24:36 2010 @@ -24,6 +24,7 @@ <compilerflag>-ftracer</compilerflag> <compilerflag>-momit-leaf-frame-pointer</compilerflag> </if> + <compilerflag>-fms-extensions</compilerflag> <compilerflag>-mpreferred-stack-boundary=2</compilerflag> <compilerflag compiler="midl">-m32 --win32</compilerflag> <compilerflag compiler="cc,cxx">-gstabs+</compilerflag> Modified: branches/header-work/include/ddk/wdm.h URL:
http://svn.reactos.org/svn/reactos/branches/header-work/include/ddk/wdm.h?r…
============================================================================== --- branches/header-work/include/ddk/wdm.h [iso-8859-1] (original) +++ branches/header-work/include/ddk/wdm.h [iso-8859-1] Mon Mar 1 22:24:36 2010 @@ -2598,8 +2598,92 @@ ULONG SharedDelete; } SHARE_ACCESS, *PSHARE_ACCESS; - - +typedef struct _PCI_COMMON_HEADER { + USHORT VendorID; + USHORT DeviceID; + USHORT Command; + USHORT Status; + UCHAR RevisionID; + UCHAR ProgIf; + UCHAR SubClass; + UCHAR BaseClass; + UCHAR CacheLineSize; + UCHAR LatencyTimer; + UCHAR HeaderType; + UCHAR BIST; + union { + struct _PCI_HEADER_TYPE_0 { + ULONG BaseAddresses[PCI_TYPE0_ADDRESSES]; + ULONG CIS; + USHORT SubVendorID; + USHORT SubSystemID; + ULONG ROMBaseAddress; + UCHAR CapabilitiesPtr; + UCHAR Reserved1[3]; + ULONG Reserved2; + UCHAR InterruptLine; + UCHAR InterruptPin; + UCHAR MinimumGrant; + UCHAR MaximumLatency; + } type0; + struct _PCI_HEADER_TYPE_1 { + ULONG BaseAddresses[PCI_TYPE1_ADDRESSES]; + UCHAR PrimaryBus; + UCHAR SecondaryBus; + UCHAR SubordinateBus; + UCHAR SecondaryLatency; + UCHAR IOBase; + UCHAR IOLimit; + USHORT SecondaryStatus; + USHORT MemoryBase; + USHORT MemoryLimit; + USHORT PrefetchBase; + USHORT PrefetchLimit; + ULONG PrefetchBaseUpper32; + ULONG PrefetchLimitUpper32; + USHORT IOBaseUpper16; + USHORT IOLimitUpper16; + UCHAR CapabilitiesPtr; + UCHAR Reserved1[3]; + ULONG ROMBaseAddress; + UCHAR InterruptLine; + UCHAR InterruptPin; + USHORT BridgeControl; + } type1; + struct _PCI_HEADER_TYPE_2 { + ULONG SocketRegistersBaseAddress; + UCHAR CapabilitiesPtr; + UCHAR Reserved; + USHORT SecondaryStatus; + UCHAR PrimaryBus; + UCHAR SecondaryBus; + UCHAR SubordinateBus; + UCHAR SecondaryLatency; + struct { + ULONG Base; + ULONG Limit; + } Range[PCI_TYPE2_ADDRESSES-1]; + UCHAR InterruptLine; + UCHAR InterruptPin; + USHORT BridgeControl; + } type2; + } u; +} PCI_COMMON_HEADER, *PPCI_COMMON_HEADER; + +#ifdef __cplusplus + +typedef struct _PCI_COMMON_CONFIG : PCI_COMMON_HEADER { + UCHAR DeviceSpecific[192]; +} PCI_COMMON_CONFIG, *PPCI_COMMON_CONFIG; + +#else + +typedef struct _PCI_COMMON_CONFIG { + PCI_COMMON_HEADER DUMMYSTRUCTNAME; + UCHAR DeviceSpecific[192]; +} PCI_COMMON_CONFIG, *PPCI_COMMON_CONFIG; + +#endif typedef struct _PCI_SLOT_NUMBER { union { Modified: branches/header-work/include/ddk/winddk.h URL:
http://svn.reactos.org/svn/reactos/branches/header-work/include/ddk/winddk.…
============================================================================== --- branches/header-work/include/ddk/winddk.h [iso-8859-1] (original) +++ branches/header-work/include/ddk/winddk.h [iso-8859-1] Mon Mar 1 22:24:36 2010 @@ -1124,80 +1124,6 @@ ULONG UserFlags; } KEY_USER_FLAGS_INFORMATION, *PKEY_USER_FLAGS_INFORMATION; -typedef struct _PCI_COMMON_CONFIG { - USHORT VendorID; - USHORT DeviceID; - USHORT Command; - USHORT Status; - UCHAR RevisionID; - UCHAR ProgIf; - UCHAR SubClass; - UCHAR BaseClass; - UCHAR CacheLineSize; - UCHAR LatencyTimer; - UCHAR HeaderType; - UCHAR BIST; - union { - struct _PCI_HEADER_TYPE_0 { - ULONG BaseAddresses[PCI_TYPE0_ADDRESSES]; - ULONG CIS; - USHORT SubVendorID; - USHORT SubSystemID; - ULONG ROMBaseAddress; - UCHAR CapabilitiesPtr; - UCHAR Reserved1[3]; - ULONG Reserved2; - UCHAR InterruptLine; - UCHAR InterruptPin; - UCHAR MinimumGrant; - UCHAR MaximumLatency; - } type0; - struct _PCI_HEADER_TYPE_1 { - ULONG BaseAddresses[PCI_TYPE1_ADDRESSES]; - UCHAR PrimaryBus; - UCHAR SecondaryBus; - UCHAR SubordinateBus; - UCHAR SecondaryLatency; - UCHAR IOBase; - UCHAR IOLimit; - USHORT SecondaryStatus; - USHORT MemoryBase; - USHORT MemoryLimit; - USHORT PrefetchBase; - USHORT PrefetchLimit; - ULONG PrefetchBaseUpper32; - ULONG PrefetchLimitUpper32; - USHORT IOBaseUpper16; - USHORT IOLimitUpper16; - UCHAR CapabilitiesPtr; - UCHAR Reserved1[3]; - ULONG ROMBaseAddress; - UCHAR InterruptLine; - UCHAR InterruptPin; - USHORT BridgeControl; - } type1; - struct _PCI_HEADER_TYPE_2 { - ULONG SocketRegistersBaseAddress; - UCHAR CapabilitiesPtr; - UCHAR Reserved; - USHORT SecondaryStatus; - UCHAR PrimaryBus; - UCHAR SecondaryBus; - UCHAR SubordinateBus; - UCHAR SecondaryLatency; - struct { - ULONG Base; - ULONG Limit; - } Range[PCI_TYPE2_ADDRESSES - 1]; - UCHAR InterruptLine; - UCHAR InterruptPin; - USHORT BridgeControl; - } type2; - } u; - UCHAR DeviceSpecific[192]; -} PCI_COMMON_CONFIG, *PPCI_COMMON_CONFIG; - - #define PCI_ADDRESS_MEMORY_SPACE 0x00000000 typedef struct _OSVERSIONINFOA {
14 years, 9 months
1
0
0
0
[janderwald] 45749: [MSDVBNP] - Fix crash when instantiating the filter with graphedt
by janderwald@svn.reactos.org
Author: janderwald Date: Mon Mar 1 21:00:26 2010 New Revision: 45749 URL:
http://svn.reactos.org/svn/reactos?rev=45749&view=rev
Log: [MSDVBNP] - Fix crash when instantiating the filter with graphedt Modified: trunk/reactos/dll/directx/msdvbnp/networkprovider.cpp trunk/reactos/dll/directx/msdvbnp/pin.cpp Modified: trunk/reactos/dll/directx/msdvbnp/networkprovider.cpp URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/dll/directx/msdvbnp/networ…
============================================================================== --- trunk/reactos/dll/directx/msdvbnp/networkprovider.cpp [iso-8859-1] (original) +++ trunk/reactos/dll/directx/msdvbnp/networkprovider.cpp [iso-8859-1] Mon Mar 1 21:00:26 2010 @@ -75,6 +75,8 @@ IN REFIID refiid, OUT PVOID* Output) { + *Output = NULL; + if (IsEqualGUID(refiid, IID_IUnknown)) { *Output = PVOID(this); @@ -359,7 +361,7 @@ WCHAR Buffer[MAX_PATH]; LPOLESTR lpstr; StringFromCLSID(riid, &lpstr); - swprintf(Buffer, L"CNetworkProvider_fnConstructor riid %s pUnknown %p", lpstr, pUnknown); + swprintf(Buffer, L"CNetworkProvider_fnConstructor riid %s pUnknown %p\n", lpstr, pUnknown); OutputDebugStringW(Buffer); #endif @@ -372,6 +374,5 @@ delete handler; return E_NOINTERFACE; } - OutputDebugStringW(L"CNetworkProvider_fnConstructor Success"); return NOERROR; } Modified: trunk/reactos/dll/directx/msdvbnp/pin.cpp URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/dll/directx/msdvbnp/pin.cp…
============================================================================== --- trunk/reactos/dll/directx/msdvbnp/pin.cpp [iso-8859-1] (original) +++ trunk/reactos/dll/directx/msdvbnp/pin.cpp [iso-8859-1] Mon Mar 1 21:00:26 2010 @@ -10,6 +10,7 @@ const GUID KSDATAFORMAT_TYPE_BDA_ANTENNA = {0x71985f41, 0x1ca1, 0x11d3, {0x9c, 0xc8, 0x0, 0xc0, 0x4f, 0x79, 0x71, 0xe0}}; const GUID GUID_NULL = {0x00000000L, 0x0000, 0x0000, {0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00}}; + class CPin : public IPin { public:
14 years, 9 months
1
0
0
0
[janderwald] 45748: [MSDVBNP] - Implement IEnumMediaTypes interface - Implement IEnumPins interface - Partly implement output pin (IPin interface) for the network provider - Implement CNetworkProvider::GetState, CNetworkProvider::SetSyncSource, CNetworkProvider::GetSyncSource, CNetworkProvider::EnumPins, CNetworkProvider::QueryFilterInfo - HACK: comment out deletion of object until reference counting has been fixed
by janderwald@svn.reactos.org
Author: janderwald Date: Mon Mar 1 19:59:42 2010 New Revision: 45748 URL:
http://svn.reactos.org/svn/reactos?rev=45748&view=rev
Log: [MSDVBNP] - Implement IEnumMediaTypes interface - Implement IEnumPins interface - Partly implement output pin (IPin interface) for the network provider - Implement CNetworkProvider::GetState, CNetworkProvider::SetSyncSource, CNetworkProvider::GetSyncSource, CNetworkProvider::EnumPins, CNetworkProvider::QueryFilterInfo - HACK: comment out deletion of object until reference counting has been fixed Added: trunk/reactos/dll/directx/msdvbnp/enum_mediatypes.cpp (with props) trunk/reactos/dll/directx/msdvbnp/enumpins.cpp (with props) trunk/reactos/dll/directx/msdvbnp/pin.cpp (with props) Modified: trunk/reactos/dll/directx/msdvbnp/msdvbnp.rbuild trunk/reactos/dll/directx/msdvbnp/networkprovider.cpp trunk/reactos/dll/directx/msdvbnp/precomp.h trunk/reactos/dll/directx/msdvbnp/scanningtuner.cpp Added: trunk/reactos/dll/directx/msdvbnp/enum_mediatypes.cpp URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/dll/directx/msdvbnp/enum_m…
============================================================================== --- trunk/reactos/dll/directx/msdvbnp/enum_mediatypes.cpp (added) +++ trunk/reactos/dll/directx/msdvbnp/enum_mediatypes.cpp [iso-8859-1] Mon Mar 1 19:59:42 2010 @@ -1,0 +1,189 @@ +/* + * COPYRIGHT: See COPYING in the top level directory + * PROJECT: ReactOS Network Provider for MPEG2 based networks + * FILE: dll/directx/msdvbnp/enum_mediatypes.cpp + * PURPOSE: IEnumMediaTypes interface + * + * PROGRAMMERS: Johannes Anderwald (janderwald(a)reactos.org) + */ +#include "precomp.h" + +class CEnumMediaTypes : public IEnumMediaTypes +{ +public: + STDMETHODIMP QueryInterface( REFIID InterfaceId, PVOID* Interface); + + STDMETHODIMP_(ULONG) AddRef() + { + InterlockedIncrement(&m_Ref); + return m_Ref; + } + STDMETHODIMP_(ULONG) Release() + { + InterlockedDecrement(&m_Ref); + if (!m_Ref) + { + //delete this; + return 0; + } + return m_Ref; + } + + HRESULT STDMETHODCALLTYPE Next(ULONG cMediaTypes, AM_MEDIA_TYPE **ppMediaTypes, ULONG *pcFetched); + HRESULT STDMETHODCALLTYPE Skip(ULONG cMediaTypes); + HRESULT STDMETHODCALLTYPE Reset(); + HRESULT STDMETHODCALLTYPE Clone(IEnumMediaTypes **ppEnum); + + + CEnumMediaTypes(ULONG MediaTypeCount, AM_MEDIA_TYPE * MediaTypes) : m_Ref(0), m_MediaTypeCount(MediaTypeCount), m_MediaTypes(MediaTypes), m_Index(0){}; + virtual ~CEnumMediaTypes(){}; + +protected: + LONG m_Ref; + ULONG m_MediaTypeCount; + AM_MEDIA_TYPE * m_MediaTypes; + ULONG m_Index; +}; + +HRESULT +STDMETHODCALLTYPE +CEnumMediaTypes::QueryInterface( + IN REFIID refiid, + OUT PVOID* Output) +{ + if (IsEqualGUID(refiid, IID_IUnknown)) + { + *Output = PVOID(this); + reinterpret_cast<IUnknown*>(*Output)->AddRef(); + return NOERROR; + } + if (IsEqualGUID(refiid, IID_IEnumMediaTypes)) + { + *Output = (IEnumMediaTypes*)(this); + reinterpret_cast<IEnumMediaTypes*>(*Output)->AddRef(); + return NOERROR; + } + + WCHAR Buffer[MAX_PATH]; + LPOLESTR lpstr; + StringFromCLSID(refiid, &lpstr); + swprintf(Buffer, L"CEnumMediaTypes::QueryInterface: NoInterface for %s\n", lpstr); + OutputDebugStringW(Buffer); + CoTaskMemFree(lpstr); + + return E_NOINTERFACE; +} + +//------------------------------------------------------------------- +// IEnumMediaTypes +// + +HRESULT +STDMETHODCALLTYPE +CEnumMediaTypes::Next( + ULONG cMediaTypes, + AM_MEDIA_TYPE **ppMediaTypes, + ULONG *pcFetched) +{ + ULONG i = 0; + AM_MEDIA_TYPE * MediaType; + + if (!ppMediaTypes) + return E_POINTER; + + if (cMediaTypes > 1 && !pcFetched) + return E_INVALIDARG; + + while(i < cMediaTypes) + { + if (m_Index + i >= m_MediaTypeCount) + break; + + MediaType = (AM_MEDIA_TYPE*)CoTaskMemAlloc(sizeof(AM_MEDIA_TYPE)); + if (!MediaType) + break; + + CopyMemory(MediaType, &m_MediaTypes[m_Index + i], sizeof(AM_MEDIA_TYPE)); + ppMediaTypes[i] = MediaType; + i++; + } + + if (pcFetched) + { + *pcFetched = i; + } + + m_Index += i; + + if (i < cMediaTypes) + return S_FALSE; + else + return S_OK; +} + +HRESULT +STDMETHODCALLTYPE +CEnumMediaTypes::Skip( + ULONG cMediaTypes) +{ + if (cMediaTypes + m_Index >= m_MediaTypeCount) + { + return S_FALSE; + } + + m_Index += cMediaTypes; + return S_OK; +} + +HRESULT +STDMETHODCALLTYPE +CEnumMediaTypes::Reset() +{ + m_Index = 0; + return S_OK; +} + +HRESULT +STDMETHODCALLTYPE +CEnumMediaTypes::Clone( + IEnumMediaTypes **ppEnum) +{ + OutputDebugStringW(L"CEnumMediaTypes::Clone : NotImplemented\n"); + return E_NOTIMPL; +} + +HRESULT +WINAPI +CEnumMediaTypes_fnConstructor( + IUnknown *pUnknown, + ULONG MediaTypeCount, + AM_MEDIA_TYPE * MediaTypes, + REFIID riid, + LPVOID * ppv) +{ + CEnumMediaTypes * handler = new CEnumMediaTypes(MediaTypeCount, MediaTypes); + +#ifdef MSDVBNP_TRACE + WCHAR Buffer[MAX_PATH]; + LPOLESTR lpstr; + StringFromCLSID(riid, &lpstr); + swprintf(Buffer, L"CEnumMediaTypes_fnConstructor riid %s pUnknown %p\n", lpstr, pUnknown); + OutputDebugStringW(Buffer); +#endif + + if (!handler) + { + CoTaskMemFree(MediaTypes); + return E_OUTOFMEMORY; + } + + if (FAILED(handler->QueryInterface(riid, ppv))) + { + /* not supported */ + delete handler; + return E_NOINTERFACE; + } + + return NOERROR; +} + Propchange: trunk/reactos/dll/directx/msdvbnp/enum_mediatypes.cpp ------------------------------------------------------------------------------ svn:eol-style = native Added: trunk/reactos/dll/directx/msdvbnp/enumpins.cpp URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/dll/directx/msdvbnp/enumpi…
============================================================================== --- trunk/reactos/dll/directx/msdvbnp/enumpins.cpp (added) +++ trunk/reactos/dll/directx/msdvbnp/enumpins.cpp [iso-8859-1] Mon Mar 1 19:59:42 2010 @@ -1,0 +1,175 @@ +/* + * COPYRIGHT: See COPYING in the top level directory + * PROJECT: ReactOS Network Provider for MPEG2 based networks + * FILE: dll/directx/msdvbnp/enumpins.cpp + * PURPOSE: IEnumPins interface + * + * PROGRAMMERS: Johannes Anderwald (janderwald(a)reactos.org) + */ +#include "precomp.h" + +class CEnumPins : public IEnumPins +{ +public: + STDMETHODIMP QueryInterface( REFIID InterfaceId, PVOID* Interface); + + STDMETHODIMP_(ULONG) AddRef() + { + InterlockedIncrement(&m_Ref); + return m_Ref; + } + STDMETHODIMP_(ULONG) Release() + { + InterlockedDecrement(&m_Ref); + if (!m_Ref) + { + //delete this; + return 0; + } + return m_Ref; + } + + + HRESULT STDMETHODCALLTYPE Next(ULONG cPins, IPin **ppPins, ULONG *pcFetched); + HRESULT STDMETHODCALLTYPE Skip(ULONG cPins); + HRESULT STDMETHODCALLTYPE Reset(); + HRESULT STDMETHODCALLTYPE Clone(IEnumPins **ppEnum); + + CEnumPins(ULONG NumPins, IPin ** pins) : m_Ref(0), m_NumPins(NumPins), m_Pins(pins), m_Index(0){}; + virtual ~CEnumPins(){}; + +protected: + LONG m_Ref; + ULONG m_NumPins; + IPin ** m_Pins; + ULONG m_Index; +}; + +HRESULT +STDMETHODCALLTYPE +CEnumPins::QueryInterface( + IN REFIID refiid, + OUT PVOID* Output) +{ + if (IsEqualGUID(refiid, IID_IUnknown)) + { + *Output = PVOID(this); + reinterpret_cast<IUnknown*>(*Output)->AddRef(); + return NOERROR; + } + if (IsEqualGUID(refiid, IID_IEnumPins)) + { + *Output = (IEnumPins*)(this); + reinterpret_cast<IEnumPins*>(*Output)->AddRef(); + return NOERROR; + } + + WCHAR Buffer[MAX_PATH]; + LPOLESTR lpstr; + StringFromCLSID(refiid, &lpstr); + swprintf(Buffer, L"CEnumPins::QueryInterface: NoInterface for %s\n", lpstr); + OutputDebugStringW(Buffer); + CoTaskMemFree(lpstr); + + return E_NOINTERFACE; +} + +HRESULT +STDMETHODCALLTYPE +CEnumPins::Next( + ULONG cPins, + IPin **ppPins, + ULONG *pcFetched) +{ + ULONG i = 0; + + if (!ppPins) + return E_POINTER; + + if (cPins > 1 && !pcFetched) + return E_INVALIDARG; + + while(i < cPins) + { + if (m_Index + i >= m_NumPins) + break; + + ppPins[i] = m_Pins[m_Index + i]; + i++; + } + + if (pcFetched) + { + *pcFetched = i; + } + + m_Index += i; + + if (i < cPins) + return S_FALSE; + else + return S_OK; +} + +HRESULT +STDMETHODCALLTYPE +CEnumPins::Skip( + ULONG cPins) +{ + if (cPins + m_Index >= m_NumPins) + { + return S_FALSE; + } + + m_Index += cPins; + return S_OK; +} + +HRESULT +STDMETHODCALLTYPE +CEnumPins::Reset() +{ + m_Index = 0; + return S_OK; +} + +HRESULT +STDMETHODCALLTYPE +CEnumPins::Clone( + IEnumPins **ppEnum) +{ + OutputDebugStringW(L"CEnumPins::Clone : NotImplemented\n"); + return E_NOTIMPL; +} + +HRESULT +WINAPI +CEnumPins_fnConstructor( + IUnknown *pUnknown, + ULONG NumPins, + IPin ** pins, + REFIID riid, + LPVOID * ppv) +{ + CEnumPins * handler = new CEnumPins(NumPins, pins); + +#ifdef MSDVBNP_TRACE + WCHAR Buffer[MAX_PATH]; + LPOLESTR lpstr; + StringFromCLSID(riid, &lpstr); + swprintf(Buffer, L"CEnumPins_fnConstructor riid %s pUnknown %p\n", lpstr, pUnknown); + OutputDebugStringW(Buffer); +#endif + + if (!handler) + return E_OUTOFMEMORY; + + if (FAILED(handler->QueryInterface(riid, ppv))) + { + /* not supported */ + delete handler; + return E_NOINTERFACE; + } + + return NOERROR; +} Propchange: trunk/reactos/dll/directx/msdvbnp/enumpins.cpp ------------------------------------------------------------------------------ svn:eol-style = native Modified: trunk/reactos/dll/directx/msdvbnp/msdvbnp.rbuild URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/dll/directx/msdvbnp/msdvbn…
============================================================================== --- trunk/reactos/dll/directx/msdvbnp/msdvbnp.rbuild [iso-8859-1] (original) +++ trunk/reactos/dll/directx/msdvbnp/msdvbnp.rbuild [iso-8859-1] Mon Mar 1 19:59:42 2010 @@ -20,9 +20,12 @@ </group> <file>classfactory.cpp</file> + <file>enum_mediatypes.cpp</file> + <file>enumpins.cpp</file> <file>msdvbnp.cpp</file> <file>msdvbnp.rc</file> <file>networkprovider.cpp</file> + <file>pin.cpp</file> <file>scanningtuner.cpp</file> </module> </group> Modified: trunk/reactos/dll/directx/msdvbnp/networkprovider.cpp URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/dll/directx/msdvbnp/networ…
============================================================================== --- trunk/reactos/dll/directx/msdvbnp/networkprovider.cpp [iso-8859-1] (original) +++ trunk/reactos/dll/directx/msdvbnp/networkprovider.cpp [iso-8859-1] Mon Mar 1 19:59:42 2010 @@ -25,7 +25,7 @@ InterlockedDecrement(&m_Ref); if (!m_Ref) { - delete this; + //delete this; return 0; } return m_Ref; @@ -58,12 +58,15 @@ HRESULT STDMETHODCALLTYPE RegisterDeviceFilter(IUnknown *pUnkFilterControl, ULONG *ppvRegisitrationContext); HRESULT STDMETHODCALLTYPE UnRegisterDeviceFilter(ULONG pvRegistrationContext); - CNetworkProvider() : m_Ref(0), m_pGraph(0){}; + CNetworkProvider() : m_Ref(0), m_pGraph(0), m_ReferenceClock(0), m_FilterState(State_Stopped) {m_Pins[0] = 0;}; virtual ~CNetworkProvider(){}; protected: LONG m_Ref; IFilterGraph *m_pGraph; + IReferenceClock * m_ReferenceClock; + FILTER_STATE m_FilterState; + IPin * m_Pins[1]; }; HRESULT @@ -92,13 +95,10 @@ return CScanningTunner_fnConstructor(NULL, refiid, Output); } - - WCHAR Buffer[MAX_PATH]; LPOLESTR lpstr; StringFromCLSID(refiid, &lpstr); - swprintf(Buffer, L"CNetworkProvider::QueryInterface: NoInterface for %s", lpstr); - DebugBreak(); + swprintf(Buffer, L"CNetworkProvider::QueryInterface: NoInterface for %s !!!\n", lpstr); OutputDebugStringW(Buffer); CoTaskMemFree(lpstr); @@ -150,8 +150,8 @@ DWORD dwMilliSecsTimeout, FILTER_STATE *State) { - OutputDebugStringW(L"CNetworkProvider::GetState : NotImplemented\n"); - return E_NOTIMPL; + *State = m_FilterState; + return S_OK; } HRESULT @@ -159,8 +159,19 @@ CNetworkProvider::SetSyncSource( IReferenceClock *pClock) { - OutputDebugStringW(L"CNetworkProvider::SetSyncSource : NotImplemented\n"); - return E_NOTIMPL; + if (pClock) + { + pClock->AddRef(); + + } + + if (m_ReferenceClock) + { + m_ReferenceClock->Release(); + } + + m_ReferenceClock = pClock; + return S_OK; } HRESULT @@ -168,8 +179,14 @@ CNetworkProvider::GetSyncSource( IReferenceClock **pClock) { - OutputDebugStringW(L"CNetworkProvider::GetSyncSource : NotImplemented\n"); - return E_NOTIMPL; + if (!pClock) + return E_POINTER; + + if (m_ReferenceClock) + m_ReferenceClock->AddRef(); + + *pClock = m_ReferenceClock; + return S_OK; } HRESULT @@ -177,8 +194,14 @@ CNetworkProvider::EnumPins( IEnumPins **ppEnum) { - OutputDebugStringW(L"CNetworkProvider::EnumPins : NotImplemented\n"); - return E_NOTIMPL; + if (m_Pins[0] == 0) + { + HRESULT hr = CPin_fnConstructor(NULL, (IBaseFilter*)this, IID_IUnknown, (void**)&m_Pins[0]); + if (FAILED(hr)) + return hr; + } + + return CEnumPins_fnConstructor(NULL, 1, m_Pins, IID_IEnumPins, (void**)ppEnum); } HRESULT @@ -196,8 +219,13 @@ CNetworkProvider::QueryFilterInfo( FILTER_INFO *pInfo) { - OutputDebugStringW(L"CNetworkProvider::QueryFilterInfo : NotImplemented\n"); - return E_NOTIMPL; + if (!pInfo) + return E_POINTER; + + pInfo->achName[0] = L'\0'; + pInfo->pGraph = m_pGraph; + + return S_OK; } HRESULT @@ -325,7 +353,6 @@ REFIID riid, LPVOID * ppv) { - // construct device control CNetworkProvider * handler = new CNetworkProvider(); #ifdef MSDVBNP_TRACE Added: trunk/reactos/dll/directx/msdvbnp/pin.cpp URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/dll/directx/msdvbnp/pin.cp…
============================================================================== --- trunk/reactos/dll/directx/msdvbnp/pin.cpp (added) +++ trunk/reactos/dll/directx/msdvbnp/pin.cpp [iso-8859-1] Mon Mar 1 19:59:42 2010 @@ -1,0 +1,260 @@ +/* + * COPYRIGHT: See COPYING in the top level directory + * PROJECT: ReactOS Network Provider for MPEG2 based networks + * FILE: dll/directx/msdvbnp/pin.cpp + * PURPOSE: IPin interface + * + * PROGRAMMERS: Johannes Anderwald (janderwald(a)reactos.org) + */ +#include "precomp.h" + +const GUID KSDATAFORMAT_TYPE_BDA_ANTENNA = {0x71985f41, 0x1ca1, 0x11d3, {0x9c, 0xc8, 0x0, 0xc0, 0x4f, 0x79, 0x71, 0xe0}}; +const GUID GUID_NULL = {0x00000000L, 0x0000, 0x0000, {0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00}}; +class CPin : public IPin +{ +public: + STDMETHODIMP QueryInterface( REFIID InterfaceId, PVOID* Interface); + + STDMETHODIMP_(ULONG) AddRef() + { + InterlockedIncrement(&m_Ref); + return m_Ref; + } + STDMETHODIMP_(ULONG) Release() + { + InterlockedDecrement(&m_Ref); + if (!m_Ref) + { + //delete this; + return 0; + } + return m_Ref; + } + + //IPin methods + HRESULT STDMETHODCALLTYPE Connect(IPin *pReceivePin, const AM_MEDIA_TYPE *pmt); + HRESULT STDMETHODCALLTYPE ReceiveConnection(IPin *pConnector, const AM_MEDIA_TYPE *pmt); + HRESULT STDMETHODCALLTYPE Disconnect(); + HRESULT STDMETHODCALLTYPE ConnectedTo(IPin **pPin); + HRESULT STDMETHODCALLTYPE ConnectionMediaType(AM_MEDIA_TYPE *pmt); + HRESULT STDMETHODCALLTYPE QueryPinInfo(PIN_INFO *pInfo); + HRESULT STDMETHODCALLTYPE QueryDirection(PIN_DIRECTION *pPinDir); + HRESULT STDMETHODCALLTYPE QueryId(LPWSTR *Id); + HRESULT STDMETHODCALLTYPE QueryAccept(const AM_MEDIA_TYPE *pmt); + HRESULT STDMETHODCALLTYPE EnumMediaTypes(IEnumMediaTypes **ppEnum); + HRESULT STDMETHODCALLTYPE QueryInternalConnections(IPin **apPin, ULONG *nPin); + HRESULT STDMETHODCALLTYPE EndOfStream(); + HRESULT STDMETHODCALLTYPE BeginFlush(); + HRESULT STDMETHODCALLTYPE EndFlush(); + HRESULT STDMETHODCALLTYPE NewSegment(REFERENCE_TIME tStart, REFERENCE_TIME tStop, double dRate); + + CPin(IBaseFilter * ParentFilter) : m_Ref(0), m_ParentFilter(ParentFilter){}; + virtual ~CPin(){}; + + static LPCWSTR PIN_ID; + +protected: + LONG m_Ref; + IBaseFilter * m_ParentFilter; +}; + + +LPCWSTR CPin::PIN_ID = L"Antenna Out"; + +HRESULT +STDMETHODCALLTYPE +CPin::QueryInterface( + IN REFIID refiid, + OUT PVOID* Output) +{ + if (IsEqualGUID(refiid, IID_IUnknown)) + { + *Output = PVOID(this); + reinterpret_cast<IUnknown*>(*Output)->AddRef(); + return NOERROR; + } + if (IsEqualGUID(refiid, IID_IPin)) + { + *Output = (IPin*)(this); + reinterpret_cast<IPin*>(*Output)->AddRef(); + return NOERROR; + } + + WCHAR Buffer[MAX_PATH]; + LPOLESTR lpstr; + StringFromCLSID(refiid, &lpstr); + swprintf(Buffer, L"CPin::QueryInterface: NoInterface for %s\n", lpstr); + OutputDebugStringW(Buffer); + CoTaskMemFree(lpstr); + + return E_NOINTERFACE; +} + +//------------------------------------------------------------------- +// IPin interface +// +HRESULT +STDMETHODCALLTYPE +CPin::Connect(IPin *pReceivePin, const AM_MEDIA_TYPE *pmt) +{ + OutputDebugStringW(L"CPin::Connect called\n"); + return E_NOTIMPL; +} + +HRESULT +STDMETHODCALLTYPE +CPin::ReceiveConnection(IPin *pConnector, const AM_MEDIA_TYPE *pmt) +{ + OutputDebugStringW(L"CPin::ReceiveConnection called\n"); + return E_NOTIMPL; +} +HRESULT +STDMETHODCALLTYPE +CPin::Disconnect( void) +{ + OutputDebugStringW(L"CPin::Disconnect called\n"); + return E_NOTIMPL; +} +HRESULT +STDMETHODCALLTYPE +CPin::ConnectedTo(IPin **pPin) +{ + OutputDebugStringW(L"CPin::ConnectedTo called\n"); + return VFW_E_NOT_CONNECTED; +} +HRESULT +STDMETHODCALLTYPE +CPin::ConnectionMediaType(AM_MEDIA_TYPE *pmt) +{ + OutputDebugStringW(L"CPin::ConnectionMediaType called\n"); + return E_NOTIMPL; +} +HRESULT +STDMETHODCALLTYPE +CPin::QueryPinInfo(PIN_INFO *pInfo) +{ + wcscpy(pInfo->achName, PIN_ID); + pInfo->dir = PINDIR_OUTPUT; + pInfo->pFilter = m_ParentFilter; + + return S_OK; +} +HRESULT +STDMETHODCALLTYPE +CPin::QueryDirection(PIN_DIRECTION *pPinDir) +{ + if (pPinDir) + { + *pPinDir = PINDIR_OUTPUT; + return S_OK; + } + + return E_POINTER; +} +HRESULT +STDMETHODCALLTYPE +CPin::QueryId(LPWSTR *Id) +{ + *Id = (LPWSTR)CoTaskMemAlloc(sizeof(PIN_ID)); + if (!*Id) + return E_OUTOFMEMORY; + + wcscpy(*Id, PIN_ID); + return S_OK; +} +HRESULT +STDMETHODCALLTYPE +CPin::QueryAccept(const AM_MEDIA_TYPE *pmt) +{ + OutputDebugStringW(L"CPin::QueryAccept called\n"); + return E_NOTIMPL; +} +HRESULT +STDMETHODCALLTYPE +CPin::EnumMediaTypes(IEnumMediaTypes **ppEnum) +{ + AM_MEDIA_TYPE *MediaType = (AM_MEDIA_TYPE*)CoTaskMemAlloc(sizeof(AM_MEDIA_TYPE)); + + if (!MediaType) + { + return E_OUTOFMEMORY; + } + + MediaType->majortype = KSDATAFORMAT_TYPE_BDA_ANTENNA; + MediaType->subtype = GUID_NULL; + MediaType->formattype = GUID_NULL; + MediaType->bFixedSizeSamples = true; + MediaType->bTemporalCompression = false; + MediaType->lSampleSize = sizeof(CHAR); + MediaType->pUnk = NULL; + MediaType->cbFormat = 0; + MediaType->pbFormat = NULL; + + return CEnumMediaTypes_fnConstructor(NULL, 1, MediaType, IID_IEnumMediaTypes, (void**)ppEnum); +} +HRESULT +STDMETHODCALLTYPE +CPin::QueryInternalConnections(IPin **apPin, ULONG *nPin) +{ + OutputDebugStringW(L"CPin::QueryInternalConnections called\n"); + return E_NOTIMPL; +} +HRESULT +STDMETHODCALLTYPE +CPin::EndOfStream( void) +{ + OutputDebugStringW(L"CPin::EndOfStream called\n"); + return E_NOTIMPL; +} +HRESULT +STDMETHODCALLTYPE +CPin::BeginFlush( void) +{ + OutputDebugStringW(L"CPin::BeginFlush called\n"); + return E_NOTIMPL; +} +HRESULT +STDMETHODCALLTYPE +CPin::EndFlush( void) +{ + OutputDebugStringW(L"CPin::EndFlush called\n"); + return E_NOTIMPL; +} +HRESULT +STDMETHODCALLTYPE +CPin::NewSegment(REFERENCE_TIME tStart, REFERENCE_TIME tStop, double dRate) +{ + OutputDebugStringW(L"CPin::NewSegment called\n"); + return E_NOTIMPL; +} + +HRESULT +WINAPI +CPin_fnConstructor( + IUnknown *pUnknown, + IBaseFilter * ParentFilter, + REFIID riid, + LPVOID * ppv) +{ + CPin * handler = new CPin(ParentFilter); + +#ifdef MSDVBNP_TRACE + WCHAR Buffer[MAX_PATH]; + LPOLESTR lpstr; + StringFromCLSID(riid, &lpstr); + swprintf(Buffer, L"CPin_fnConstructor riid %s pUnknown %p\n", lpstr, pUnknown); + OutputDebugStringW(Buffer); +#endif + + if (!handler) + return E_OUTOFMEMORY; + + if (FAILED(handler->QueryInterface(riid, ppv))) + { + /* not supported */ + delete handler; + return E_NOINTERFACE; + } + + return NOERROR; +} Propchange: trunk/reactos/dll/directx/msdvbnp/pin.cpp ------------------------------------------------------------------------------ svn:eol-style = native Modified: trunk/reactos/dll/directx/msdvbnp/precomp.h URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/dll/directx/msdvbnp/precom…
============================================================================== --- trunk/reactos/dll/directx/msdvbnp/precomp.h [iso-8859-1] (original) +++ trunk/reactos/dll/directx/msdvbnp/precomp.h [iso-8859-1] Mon Mar 1 19:59:42 2010 @@ -50,5 +50,33 @@ REFIID riid, LPVOID * ppv); +/* enumpins.cpp */ +HRESULT +WINAPI +CEnumPins_fnConstructor( + IUnknown *pUnknown, + ULONG NumPins, + IPin ** pins, + REFIID riid, + LPVOID * ppv); + +/* pin.cpp */ +HRESULT +WINAPI +CPin_fnConstructor( + IUnknown *pUnknown, + IBaseFilter * ParentFilter, + REFIID riid, + LPVOID * ppv); + +/* enum_mediatypes.cpp */ +HRESULT +WINAPI +CEnumMediaTypes_fnConstructor( + IUnknown *pUnknown, + ULONG MediaTypeCount, + AM_MEDIA_TYPE * MediaTypes, + REFIID riid, + LPVOID * ppv); #endif Modified: trunk/reactos/dll/directx/msdvbnp/scanningtuner.cpp URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/dll/directx/msdvbnp/scanni…
============================================================================== --- trunk/reactos/dll/directx/msdvbnp/scanningtuner.cpp [iso-8859-1] (original) +++ trunk/reactos/dll/directx/msdvbnp/scanningtuner.cpp [iso-8859-1] Mon Mar 1 19:59:42 2010 @@ -23,7 +23,7 @@ InterlockedDecrement(&m_Ref); if (!m_Ref) { - delete this; + //delete this; return 0; } return m_Ref; @@ -240,7 +240,6 @@ REFIID riid, LPVOID * ppv) { - // construct device control CScanningTunner * handler = new CScanningTunner(); #ifdef MSDVBNP_TRACE
14 years, 9 months
1
0
0
0
← Newer
1
...
85
86
87
88
89
90
Older →
Jump to page:
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
Results per page:
10
25
50
100
200