DSBufferWriter.h 1.7 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748
  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_DSBUFFERWRITTER_H
  19. #define PLUGIN_DSHOW_DSBUFFERWRITTER_H
  20. /*
  21. // TODO: do it only once
  22. #if !defined(TDSHOW_DEFINE_GUID) && !defined(_WIN32_WCE)
  23. #define TDSHOW_DEFINE_GUID(name, l, w1, w2, b1, b2, b3, b4, b5, b6, b7, b8) \
  24. EXTERN_C const GUID DECLSPEC_SELECTANY name \
  25. = { l, w1, w2, { b1, b2, b3, b4, b5, b6, b7, b8 } }
  26. #elif !defined(TDSHOW_DEFINE_GUID) && defined(_WIN32_WCE)
  27. #define TDSHOW_DEFINE_GUID(name, l, w1, w2, b1, b2, b3, b4, b5, b6, b7, b8) \
  28. EXTERN_C const GUID __declspec(selectany) name \
  29. = { l, w1, w2, { b1, b2, b3, b4, b5, b6, b7, b8 } }
  30. #endif
  31. // {27AD9929-E4E7-423b-8BDD-8AF5AC894DE0}
  32. TDSHOW_DEFINE_GUID(IID_DSBufferWriter,
  33. 0x27ad9929, 0xe4e7, 0x423b, 0x8b, 0xdd, 0x8a, 0xf5, 0xac, 0x89, 0x4d, 0xe0);
  34. */
  35. class DSBufferWriter
  36. #ifndef _WIN32_WCE
  37. : public IUnknown
  38. #endif
  39. {
  40. public:
  41. virtual void setBuffer (void* pBuffer, int size) = 0;
  42. virtual HRESULT setImageFormat(UINT width, UINT height/*, GUID subType, UINT fps*/) = 0;
  43. };
  44. #endif