DSCaptureUtils.h 2.2 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960
  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_DSCAPTUREUTILS_H
  19. #define PLUGIN_DSHOW_DSCAPTUREUTILS_H
  20. #include "plugin_dshow_config.h"
  21. #include "internals/DSCaptureFormat.h"
  22. #include "internals/VideoGrabberName.h"
  23. #include <vector>
  24. // --------------------------------------------------------------------------------
  25. #ifdef INCLUDE_VFW_DEVICES
  26. #define INCLUDE_CATEGORY_FLAG 0
  27. #else
  28. #define INCLUDE_CATEGORY_FLAG CDEF_DEVMON_FILTER | CDEF_DEVMON_PNP_DEVICE
  29. #endif
  30. // --------------------------------------------------------------------------------
  31. /**
  32. * \brief Fills in a vector with VideoGrabberName instances constructed from the video capture devices.
  33. * \param A pointer to the device vector to append
  34. * \return An HRESULT value
  35. */
  36. HRESULT enumerateCaptureDevices(const std::string &prefix, std::vector<VideoGrabberName> *names);
  37. /**
  38. * \brief Fills in a vector with VideoGrabberName instances constructed from the video capture devices.
  39. * \param A constant string containing a device path
  40. * \param A pointer to the filter that will contains the filter created or NULL if not the device is not found
  41. * \return An HRESULT value
  42. */
  43. HRESULT createSourceFilter(std::string *devicePath, IBaseFilter **sourceFilter);
  44. /**
  45. * \brief Fills in a vector with DSCaptureFormat instances constructed from the given video capture device.
  46. * \param An instance of a capture device
  47. * \param A pointer to the format vector to append
  48. * \return An HRESULT value
  49. */
  50. HRESULT getSupportedFormats(IBaseFilter *sourceFilter, std::vector<DSCaptureFormat> *formats);
  51. #endif