| 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 56 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 67 | 67 |
| 68 // Called from JNI when the capturer has been started. | 68 // Called from JNI when the capturer has been started. |
| 69 void OnCapturerStarted(bool success); | 69 void OnCapturerStarted(bool success); |
| 70 | 70 |
| 71 // Called from JNI when a new frame has been captured. | 71 // Called from JNI when a new frame has been captured. |
| 72 void OnIncomingFrame(void* video_frame, | 72 void OnIncomingFrame(void* video_frame, |
| 73 int length, | 73 int length, |
| 74 int rotation, | 74 int rotation, |
| 75 int64 time_stamp); | 75 int64 time_stamp); |
| 76 | 76 |
| 77 // Called from JNI to request a new video format. |
| 78 void OnOutputFormatRequest(int width, int height, int fps); |
| 79 |
| 77 AndroidVideoCapturerDelegate* delegate() { return delegate_.get(); } | 80 AndroidVideoCapturerDelegate* delegate() { return delegate_.get(); } |
| 78 | 81 |
| 79 private: | 82 private: |
| 80 // cricket::VideoCapturer implementation. | 83 // cricket::VideoCapturer implementation. |
| 81 // Video frames will be delivered using | 84 // Video frames will be delivered using |
| 82 // cricket::VideoCapturer::SignalFrameCaptured on the thread that calls Start. | 85 // cricket::VideoCapturer::SignalFrameCaptured on the thread that calls Start. |
| 83 cricket::CaptureState Start( | 86 cricket::CaptureState Start( |
| 84 const cricket::VideoFormat& capture_format) override; | 87 const cricket::VideoFormat& capture_format) override; |
| 85 void Stop() override; | 88 void Stop() override; |
| 86 bool IsRunning() override; | 89 bool IsRunning() override; |
| 87 bool IsScreencast() const override { return false; } | 90 bool IsScreencast() const override { return false; } |
| 88 bool GetPreferredFourccs(std::vector<uint32>* fourccs) override; | 91 bool GetPreferredFourccs(std::vector<uint32>* fourccs) override; |
| 89 | 92 |
| 90 bool running_; | 93 bool running_; |
| 91 rtc::scoped_refptr<AndroidVideoCapturerDelegate> delegate_; | 94 rtc::scoped_refptr<AndroidVideoCapturerDelegate> delegate_; |
| 92 | 95 |
| 93 rtc::ThreadChecker thread_checker_; | 96 rtc::ThreadChecker thread_checker_; |
| 94 | 97 |
| 95 class FrameFactory; | 98 class FrameFactory; |
| 96 FrameFactory* frame_factory_; // Owned by cricket::VideoCapturer. | 99 FrameFactory* frame_factory_; // Owned by cricket::VideoCapturer. |
| 97 | 100 |
| 98 cricket::CaptureState current_state_; | 101 cricket::CaptureState current_state_; |
| 99 }; | 102 }; |
| 100 | 103 |
| 101 } // namespace webrtc | 104 } // namespace webrtc |
| 102 | 105 |
| 103 #endif // TALK_APP_WEBRTC_ANDROIDVIDEOCAPTURER_H_ | 106 #endif // TALK_APP_WEBRTC_ANDROIDVIDEOCAPTURER_H_ |
| OLD | NEW |