📄 cxcopyprotectprop.h
字号:
/*+++ *******************************************************************\
*
* Copyright and Disclaimer:
*
* ---------------------------------------------------------------
* This software is provided "AS IS" without warranty of any kind,
* either expressed or implied, including but not limited to the
* implied warranties of noninfringement, merchantability and/or
* fitness for a particular purpose.
* ---------------------------------------------------------------
*
* Copyright (c) 2008 Conexant Systems, Inc.
* All rights reserved.
*
\******************************************************************* ---*/
#ifndef _CX_COPY_PROTECT_PROP_H_
#define _CX_COPY_PROTECT_PROP_H_
extern "C"
{
#include <wdm.h>
}
#include <windef.h>
#include <ks.h>
#include <ksmedia.h>
#include "CxCopyProtect.h"
typedef enum{
CP_METHOD_FLAG_MPEG_STREAM = 0, // not implemented yet
CP_METHOD_USE_LOWER_BITRATE = 1, // not implemented yet
CP_METHOD_NO_OUTPUT_ON_PIN = 2, // not implemented yet
CP_METHOD_FLASH = 3,
CP_METHOD_BLACK = 4,
CP_METHOD_NONE = 0xfe,
CP_METHOD_USE_DEFAULT = 0xff
} COPY_PROTECT_METHOD;
//Input buffers have a KSPROPERTY in front of the input buffer.
//Output buffers are just the buffer.
//The following macro defines a type with the KSPROPERTY in front
// of another type.
#define PROPERTY_STRUCT(type) \
typedef struct _PROPERTY_##type \
{ \
KSPROPERTY property; \
type data; \
}PROPERTY_##type,*PPROPERTY_##type
/////////////////////////////////////////////////////////////////////////////////////////
//Class CxCopyProtectProp
//
// This is a collection of static functions that handle the CXFALCON control properties
//
class IVideoDecoder;
class CxCopyProtectProp
{
//Structure definitions for input buffers. They need a KSPROPERTY at the beginning.
PROPERTY_STRUCT(DWORD);
public:
CxCopyProtectProp(IVideoDecoder* p_decoder, COPY_PROTECT_METHOD copy_protect_method);
~CxCopyProtectProp();
//////////////////////////////////////////////////////
//Static DDK entry points for the CXCOPY_PROTECT property set
static NTSTATUS static_getStatus(
PIRP p_irp,
PPROPERTY_DWORD p_request,
PDWORD p_data);
static NTSTATUS static_getCopyMacrovision(
PIRP p_irp,
PPROPERTY_DWORD p_request,
PKS_COPY_MACROVISION p_copy_macrovision);
static VOID static_cpProc(CxCopyProtectProp* p_copy_protect_prop);
VOID cpProc();
NTSTATUS startCpThread();
VOID stopCpThread();
VOID checkCopyProtection();
protected:
VOID cpBlack(DWORD cp_status);
VOID cpFlash(DWORD cp_status);
VOID videoMute();
VOID videoUnmute();
private:
IVideoDecoder* _p_decoder;
PVOID _scramble_thread_object;
KEVENT _scramble_event_object;
DWORD _cp_count;
COPY_PROTECT_METHOD _method;
BOOLEAN _video_muted;
};
#define cpDefault(x) cpFlash(x) // use cpFlash as default
#endif
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -