PCameras.ipdl 2.1 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566
  1. /* This Source Code Form is subject to the terms of the Mozilla Public
  2. * License, v. 2.0. If a copy of the MPL was not distributed with this file,
  3. * You can obtain one at http://mozilla.org/MPL/2.0/. */
  4. include protocol PContent;
  5. include protocol PBackground;
  6. using mozilla::camera::CaptureEngine from "mozilla/media/CamerasTypes.h";
  7. namespace mozilla {
  8. namespace camera {
  9. struct CaptureCapability
  10. {
  11. int width;
  12. int height;
  13. int maxFPS;
  14. int expectedCaptureDelay;
  15. int rawType;
  16. int codecType;
  17. bool interlaced;
  18. };
  19. async protocol PCameras
  20. {
  21. manager PBackground;
  22. child:
  23. async FrameSizeChange(CaptureEngine capEngine, int cap_id, int w, int h);
  24. // transfers ownership of |buffer| from parent to child
  25. async DeliverFrame(CaptureEngine capEngine, int cap_id,
  26. Shmem buffer, size_t size, uint32_t time_stamp,
  27. int64_t ntp_time, int64_t render_time);
  28. async DeviceChange();
  29. async ReplyNumberOfCaptureDevices(int numdev);
  30. async ReplyNumberOfCapabilities(int numdev);
  31. async ReplyAllocateCaptureDevice(int numdev);
  32. async ReplyGetCaptureCapability(CaptureCapability cap);
  33. async ReplyGetCaptureDevice(nsCString device_name, nsCString device_id, bool scary);
  34. async ReplyFailure();
  35. async ReplySuccess();
  36. async __delete__();
  37. parent:
  38. async NumberOfCaptureDevices(CaptureEngine engine);
  39. async NumberOfCapabilities(CaptureEngine engine, nsCString deviceUniqueIdUTF8);
  40. async GetCaptureCapability(CaptureEngine engine, nsCString unique_idUTF8, int capability_number);
  41. async GetCaptureDevice(CaptureEngine engine, int num);
  42. async AllocateCaptureDevice(CaptureEngine engine, nsCString unique_idUTF8, nsCString origin);
  43. async ReleaseCaptureDevice(CaptureEngine engine, int numdev);
  44. async StartCapture(CaptureEngine engine, int numdev, CaptureCapability capability);
  45. async StopCapture(CaptureEngine engine, int numdev);
  46. // transfers frame back
  47. async ReleaseFrame(Shmem s);
  48. // Ask parent to delete us
  49. async AllDone();
  50. // setup camera engine
  51. async EnsureInitialized(CaptureEngine engine);
  52. };
  53. } // namespace camera
  54. } // namespace mozilla