blob: 5907da207eac0e2360ff393e2c2fc54813e91103 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
|
// Copyright 2013 The Chromium Authors. All rights reserved.
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
#ifndef MEDIA_CAST_TEST_LINUX_OUTPUT_WINDOW_H_
#define MEDIA_CAST_TEST_LINUX_OUTPUT_WINDOW_H_
#include <X11/Xlib.h>
#include <X11/Xutil.h>
#include <sys/ipc.h>
#include <sys/shm.h>
#include <X11/extensions/XShm.h>
#include <string>
#include "base/memory/ref_counted.h"
#include "base/memory/scoped_ptr.h"
namespace media {
class VideoFrame;
}
namespace media {
namespace cast {
namespace test {
class LinuxOutputWindow {
public:
LinuxOutputWindow(int x_pos,
int y_pos,
int width,
int height,
const std::string& name);
virtual ~LinuxOutputWindow();
void RenderFrame(const scoped_refptr<media::VideoFrame>& video_frame);
private:
void CreateWindow(int x_pos,
int y_pos,
int width,
int height,
const std::string& name);
Display* display_;
Window window_;
XShmSegmentInfo shminfo_;
GC gc_;
XImage* image_;
};
} // namespace test
} // namespace cast
} // namespace media
#endif // MEDIA_CAST_TEST_LINUX_OUTPUT_WINDOW_H_
|