video_renderer.h 1.6 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344
  1. /*
  2. * Copyright (c) 2013 The WebRTC project authors. All Rights Reserved.
  3. *
  4. * Use of this source code is governed by a BSD-style license
  5. * that can be found in the LICENSE file in the root of the source
  6. * tree. An additional intellectual property rights grant can be found
  7. * in the file PATENTS. All contributing project authors may
  8. * be found in the AUTHORS file in the root of the source tree.
  9. */
  10. #ifndef TEST_VIDEO_RENDERER_H_
  11. #define TEST_VIDEO_RENDERER_H_
  12. #include <stddef.h>
  13. #include "api/video/video_sink_interface.h"
  14. namespace webrtc {
  15. class VideoFrame;
  16. namespace test {
  17. class VideoRenderer : public rtc::VideoSinkInterface<VideoFrame> {
  18. public:
  19. // Creates a platform-specific renderer if possible, or a null implementation
  20. // if failing.
  21. static VideoRenderer* Create(const char* window_title,
  22. size_t width,
  23. size_t height);
  24. // Returns a renderer rendering to a platform specific window if possible,
  25. // NULL if none can be created.
  26. // Creates a platform-specific renderer if possible, returns NULL if a
  27. // platform renderer could not be created. This occurs, for instance, when
  28. // running without an X environment on Linux.
  29. static VideoRenderer* CreatePlatformRenderer(const char* window_title,
  30. size_t width,
  31. size_t height);
  32. virtual ~VideoRenderer() {}
  33. protected:
  34. VideoRenderer() {}
  35. };
  36. } // namespace test
  37. } // namespace webrtc
  38. #endif // TEST_VIDEO_RENDERER_H_