1
0

vfw_comp_interface.h 2.7 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105
  1. //==========================================================================
  2. //
  3. // THIS CODE AND INFORMATION IS PROVIDED "AS IS" WITHOUT WARRANTY OF ANY
  4. // KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE
  5. // IMPLIED WARRANTIES OF MERCHANTABILITY AND/OR FITNESS FOR A PARTICULAR
  6. // PURPOSE.
  7. //
  8. // Copyright (c) 1999 - 2001 On2 Technologies Inc. All Rights Reserved.
  9. //
  10. //--------------------------------------------------------------------------
  11. #if !defined(VFW_COMP_INTERFACE_H)
  12. #define VFW_COMP_INTERFACE_H
  13. /****************************************************************************
  14. *
  15. * Module Title : VFW_COMP_INTERFACE.H
  16. *
  17. * Description : Interface to video codec demo compressor DLL
  18. *
  19. *
  20. *****************************************************************************
  21. */
  22. #include "codec_common_interface.h"
  23. #include "type_aliases.h"
  24. /* Command interface to compressor. */
  25. /* Settings Control */
  26. typedef enum
  27. {
  28. C_SET_KEY_FRAME,
  29. C_SET_FIXED_Q,
  30. C_SET_FIRSTPASS_FILE,
  31. C_SET_NODROPS
  32. } C_SETTING;
  33. typedef enum
  34. {
  35. MAINTAIN_ASPECT_RATIO = 0x0,
  36. SCALE_TO_FIT = 0x1,
  37. CENTER = 0x2,
  38. OTHER = 0x3
  39. } SCALE_MODE;
  40. typedef struct
  41. {
  42. UINT32 FrameSize;
  43. UINT32 TargetBitRate;
  44. UINT32 FrameRate;
  45. UINT32 KeyFrameFrequency;
  46. UINT32 KeyFrameDataTarget;
  47. UINT32 Quality;
  48. BOOL AllowDF;
  49. BOOL QuickCompress;
  50. BOOL AutoKeyFrameEnabled;
  51. INT32 AutoKeyFrameThreshold;
  52. UINT32 MinimumDistanceToKeyFrame;
  53. INT32 ForceKeyFrameEvery;
  54. INT32 NoiseSensitivity;
  55. } COMP_CONFIG;
  56. #ifndef YUVINPUTBUFFERCONFIG
  57. #define YUVINPUTBUFFERCONFIG
  58. typedef struct
  59. {
  60. int YWidth;
  61. int YHeight;
  62. int YStride;
  63. int UVWidth;
  64. int UVHeight;
  65. int UVStride;
  66. char * YBuffer;
  67. char * UBuffer;
  68. char * VBuffer;
  69. } YUV_INPUT_BUFFER_CONFIG;
  70. #endif
  71. #ifdef __cplusplus
  72. extern "C"
  73. {
  74. #endif
  75. typedef struct CP_INSTANCE * xCP_INST;
  76. extern BOOL CCONV StartEncoder( xCP_INST *cpi, COMP_CONFIG * CompConfig );
  77. extern void CCONV ChangeCompressorSetting ( xCP_INST cpi, C_SETTING Setting, int Value );
  78. extern void CCONV ChangeEncoderConfig ( xCP_INST cpi, COMP_CONFIG * CompConfig );
  79. extern UINT32 CCONV EncodeFrame( xCP_INST cpi, unsigned char * InBmpIPtr, unsigned char * InBmpPtr, unsigned char * OutPutPtr, unsigned int * is_key );
  80. extern UINT32 CCONV EncodeFrameYuv( xCP_INST cpi, YUV_INPUT_BUFFER_CONFIG * YuvInputData, unsigned char * OutPutPtr, unsigned int * is_key );
  81. extern BOOL CCONV StopEncoder( xCP_INST *cpi);
  82. extern void VPEInitLibrary(void);
  83. extern void VPEDeInitLibrary(void);
  84. extern const char * CCONV VP31E_GetVersionNumber(void);
  85. #ifdef __cplusplus
  86. }
  87. #endif
  88. #endif // VFW_COMP_INTERFACE_H