OLD | NEW |
1 /* | 1 /* |
2 * libjingle | 2 * libjingle |
3 * Copyright 2015 Google Inc. | 3 * Copyright 2015 Google Inc. |
4 * | 4 * |
5 * Redistribution and use in source and binary forms, with or without | 5 * Redistribution and use in source and binary forms, with or without |
6 * modification, are permitted provided that the following conditions are met: | 6 * modification, are permitted provided that the following conditions are met: |
7 * | 7 * |
8 * 1. Redistributions of source code must retain the above copyright notice, | 8 * 1. Redistributions of source code must retain the above copyright notice, |
9 * this list of conditions and the following disclaimer. | 9 * this list of conditions and the following disclaimer. |
10 * 2. Redistributions in binary form must reproduce the above copyright notice, | 10 * 2. Redistributions in binary form must reproduce the above copyright notice, |
(...skipping 49 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
60 public: | 60 public: |
61 explicit AndroidVideoCapturer( | 61 explicit AndroidVideoCapturer( |
62 const rtc::scoped_refptr<AndroidVideoCapturerDelegate>& delegate); | 62 const rtc::scoped_refptr<AndroidVideoCapturerDelegate>& delegate); |
63 virtual ~AndroidVideoCapturer(); | 63 virtual ~AndroidVideoCapturer(); |
64 | 64 |
65 // Called from JNI when the capturer has been started. | 65 // Called from JNI when the capturer has been started. |
66 void OnCapturerStarted(bool success); | 66 void OnCapturerStarted(bool success); |
67 | 67 |
68 // Called from JNI when a new frame has been captured. | 68 // Called from JNI when a new frame has been captured. |
69 // Argument |buffer| is intentionally by value, for use with rtc::Bind. | 69 // Argument |buffer| is intentionally by value, for use with rtc::Bind. |
70 void OnIncomingFrame(rtc::scoped_refptr<webrtc::VideoFrameBuffer> buffer, | 70 void OnIncomingFrame( |
71 int rotation, | 71 const rtc::scoped_refptr<webrtc::VideoFrameBuffer>& buffer, |
72 int64_t time_stamp); | 72 int rotation, |
| 73 int64_t time_stamp); |
73 | 74 |
74 // Called from JNI to request a new video format. | 75 // Called from JNI to request a new video format. |
75 void OnOutputFormatRequest(int width, int height, int fps); | 76 void OnOutputFormatRequest(int width, int height, int fps); |
76 | 77 |
77 AndroidVideoCapturerDelegate* delegate() { return delegate_.get(); } | 78 AndroidVideoCapturerDelegate* delegate() { return delegate_.get(); } |
78 | 79 |
79 // cricket::VideoCapturer implementation. | 80 // cricket::VideoCapturer implementation. |
80 bool GetBestCaptureFormat(const cricket::VideoFormat& desired, | 81 bool GetBestCaptureFormat(const cricket::VideoFormat& desired, |
81 cricket::VideoFormat* best_format) override; | 82 cricket::VideoFormat* best_format) override; |
82 | 83 |
(...skipping 15 matching lines...) Expand all Loading... |
98 | 99 |
99 class FrameFactory; | 100 class FrameFactory; |
100 FrameFactory* frame_factory_; // Owned by cricket::VideoCapturer. | 101 FrameFactory* frame_factory_; // Owned by cricket::VideoCapturer. |
101 | 102 |
102 cricket::CaptureState current_state_; | 103 cricket::CaptureState current_state_; |
103 }; | 104 }; |
104 | 105 |
105 } // namespace webrtc | 106 } // namespace webrtc |
106 | 107 |
107 #endif // TALK_APP_WEBRTC_ANDROIDVIDEOCAPTURER_H_ | 108 #endif // TALK_APP_WEBRTC_ANDROIDVIDEOCAPTURER_H_ |
OLD | NEW |