1
0

comp_interface.h 2.6 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283848586878889
  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. /****************************************************************************
  12. *
  13. * Module Title : COMP_INTERFACE.H
  14. *
  15. * Description : Interface to video codec demo compressor DLL
  16. *
  17. *
  18. *****************************************************************************
  19. */
  20. #ifndef COMP_INTERFACE_H
  21. #define COMP_INTERFACE_H
  22. #define INC_WIN_HEADER 1
  23. #include <windows.h>
  24. #include "codec_common_interface.h"
  25. #include "type_aliases.h"
  26. /* Command interface to compressor. */
  27. /* Settings Control */
  28. typedef enum
  29. { C_FRAME_SIZE,
  30. C_QUALITY, // Quality trade off value (0 best to 15 worst)
  31. C_DATA_RATE,
  32. C_FRAME_RATE,
  33. C_FORCE_BASE_FRAME, // Forces a key frame
  34. C_RESYNCH_VIDEO, // Forces video to re-synch
  35. C_SETUP_GRABBER,
  36. C_RESET_FRAME_COUNTER, // Relates to stats - may be removed
  37. /* Specialist test facilities. */
  38. C_ON_LINE, // Test function soon to be removed
  39. C_INTER_PREDICTION, // Test code soon to be removed
  40. C_MOTION_COMP, // Test code soon to be removed
  41. C_EXT_SRC, // Test code soon to be removed
  42. } C_SETTING;
  43. typedef enum
  44. {
  45. LOCAL_NORMAL,
  46. LOCAL_GF,
  47. } LOCAL_DISP_MODE;
  48. typedef struct
  49. {
  50. UINT32 CompTime;
  51. UINT32 MeanCompTime;
  52. UINT32 PPTime;
  53. UINT32 MeanPPTime;
  54. } COMP_TIMINGS;
  55. #ifdef __cplusplus
  56. extern "C"
  57. {
  58. #endif
  59. typedef struct CP_INSTANCE * xCP_INST;
  60. extern BOOL CCONV StartEncoder( xCP_INST cpi, UINT32 FrameSize, UINT32 TargetRate, UINT32 Quality );
  61. extern int CCONV GetCompressorSetting ( xCP_INST cpi, C_SETTING Setting );
  62. extern void CCONV ChangeCompressorSetting ( xCP_INST cpi, C_SETTING Setting, int Value );
  63. extern INT32 CCONV GetVideoData( xCP_INST cpi, UINT8 * VideoBufferPtr );
  64. extern BOOL CCONV StopEncoder(xCP_INST cpi );
  65. extern BOOL CCONV GetFrameDetails( xCP_INST cpi, UINT32 * FrameNumber, UINT32 * FrameSize );
  66. extern void CCONV GetStillFrame( xCP_INST cpi, BOOL FullStill );
  67. extern void CCONV ResumeVideo(xCP_INST cpi);
  68. extern xCP_INST CreateCPInstance(void);
  69. extern void DeleteCPInstance(xCP_INST *cpi);
  70. #ifdef _cplusplus
  71. }
  72. #endif
  73. #endif