DSDisplayOverlay.h 1.7 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768
  1. /* Copyright (C) 2011-2013 Doubango Telecom <http://www.doubango.org>
  2. *
  3. * This file is part of Open Source Doubango Framework.
  4. *
  5. * DOUBANGO is free software: you can redistribute it and/or modify
  6. * it under the terms of the GNU General Public License as published by
  7. * the Free Software Foundation, either version 3 of the License, or
  8. * (at your option) any later version.
  9. *
  10. * DOUBANGO is distributed in the hope that it will be useful,
  11. * but WITHOUT ANY WARRANTY; without even the implied warranty of
  12. * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
  13. * GNU General Public License for more details.
  14. *
  15. * You should have received a copy of the GNU General Public License
  16. * along with DOUBANGO.
  17. */
  18. #ifndef PLUGIN_DSHOW_DSDISPLAYOVERLAY_H
  19. #define PLUGIN_DSHOW_DSDISPLAYOVERLAY_H
  20. #include "plugin_dshow_config.h"
  21. #include <strmif.h>
  22. #if defined(VMR9) || defined(VMR9_WINDOWLESS)
  23. #include <D3D9.h>
  24. #include <D3Dx9.h>
  25. #include <vmr9.h>
  26. #endif
  27. class DSDisplayGraph;
  28. class DSDisplayOverlay
  29. {
  30. public:
  31. DSDisplayOverlay();
  32. virtual ~DSDisplayOverlay();
  33. void attach(HWND parent, DSDisplayGraph *graph);
  34. void detach();
  35. void show(int value);
  36. void update();
  37. private:
  38. void internalUpdate();
  39. private:
  40. HWND window;
  41. DSDisplayGraph *displayGraph;
  42. int ticks;
  43. #if defined(VMR)
  44. HDC hdcBmp;
  45. HBITMAP hbmOld;
  46. VMRALPHABITMAP alphaBitmap;
  47. float alphaStep;
  48. #elif defined(VMR9) || defined(VMR9_WINDOWLESS)
  49. IDirect3D9 *direct3D;
  50. IDirect3DDevice9 *direct3DDevice;
  51. IDirect3DSurface9 *direct3DSurface;
  52. D3DXIMAGE_INFO overlayInfo;
  53. VMR9AlphaBitmap alphaBitmap;
  54. float alphaStep;
  55. #endif
  56. };
  57. #endif