DSBaseCaptureGraph.h 1.9 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364
  1. /* Copyright (C) 2014 Mamadou DIOP
  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_DSBASECAPTUREGRAPH_H
  19. #define PLUGIN_DSHOW_DSBASECAPTUREGRAPH_H
  20. #include "plugin_dshow_config.h"
  21. #include <vector>
  22. #include <control.h>
  23. #include "internals/DSCaptureFormat.h"
  24. #if defined(_WIN32_WCE)
  25. # include <internals/wince/DSSampleGrabber.h>
  26. # include <internals/wince/DSNullFilter.h>
  27. # include <internals/wince/DSISampleGrabberCB.h>
  28. #else
  29. # include <qedit.h>
  30. #endif
  31. class DSBaseCaptureGraph
  32. {
  33. public:
  34. #if defined(_WIN32_WCE)
  35. DSBaseCaptureGraph(DSISampleGrabberCB* callback, HRESULT *hr) {}
  36. #else
  37. DSBaseCaptureGraph(ISampleGrabberCB* callback, HRESULT *hr) {}
  38. #endif
  39. virtual ~DSBaseCaptureGraph() {}
  40. virtual std::vector<DSCaptureFormat> *getFormats() = 0;
  41. virtual HRESULT setSource(const std::string &devicePath) = 0;
  42. virtual HRESULT setParameters(DSCaptureFormat *format, int framerate) = 0;
  43. virtual HRESULT connect() = 0;
  44. virtual HRESULT disconnect() = 0;
  45. virtual HRESULT start() = 0;
  46. virtual HRESULT stop() = 0;
  47. virtual HRESULT pause() = 0;
  48. virtual bool isRunning() = 0;
  49. virtual bool isPaused() = 0;
  50. virtual std::string getDeviceId() const = 0;
  51. virtual HRESULT getConnectedMediaType(AM_MEDIA_TYPE *mediaType) = 0;
  52. };
  53. #endif /* PLUGIN_DSHOW_DSBASECAPTUREGRAPH_H */