Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(67)

Side by Side Diff: talk/app/webrtc/androidvideocapturer.h

Issue 1308953004: AndroidVideoCapturer: Delegate framerate choice to VideoCapturerAndroid.java (Closed) Base URL: https://chromium.googlesource.com/external/webrtc.git@master
Patch Set: return true Created 5 years, 3 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
« no previous file with comments | « no previous file | talk/app/webrtc/androidvideocapturer.cc » ('j') | talk/app/webrtc/videosource.cc » ('J')
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
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 58 matching lines...) Expand 10 before | Expand all | Expand 10 after
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(rtc::scoped_refptr<webrtc::VideoFrameBuffer> buffer,
71 int rotation, 71 int rotation,
72 int64 time_stamp); 72 int64 time_stamp);
73 73
74 // Called from JNI to request a new video format. 74 // Called from JNI to request a new video format.
75 void OnOutputFormatRequest(int width, int height, int fps); 75 void OnOutputFormatRequest(int width, int height, int fps);
76 76
77 AndroidVideoCapturerDelegate* delegate() { return delegate_.get(); } 77 AndroidVideoCapturerDelegate* delegate() { return delegate_.get(); }
78 78
79 // cricket::VideoCapturer implementation.
80 bool GetBestCaptureFormat(const cricket::VideoFormat& desired,
81 cricket::VideoFormat* best_format) override;
82
79 private: 83 private:
80 // cricket::VideoCapturer implementation. 84 // cricket::VideoCapturer implementation.
81 // Video frames will be delivered using 85 // Video frames will be delivered using
82 // cricket::VideoCapturer::SignalFrameCaptured on the thread that calls Start. 86 // cricket::VideoCapturer::SignalFrameCaptured on the thread that calls Start.
83 cricket::CaptureState Start( 87 cricket::CaptureState Start(
84 const cricket::VideoFormat& capture_format) override; 88 const cricket::VideoFormat& capture_format) override;
85 void Stop() override; 89 void Stop() override;
86 bool IsRunning() override; 90 bool IsRunning() override;
87 bool IsScreencast() const override { return false; } 91 bool IsScreencast() const override { return false; }
88 bool GetPreferredFourccs(std::vector<uint32>* fourccs) override; 92 bool GetPreferredFourccs(std::vector<uint32>* fourccs) override;
89 93
90 bool running_; 94 bool running_;
91 rtc::scoped_refptr<AndroidVideoCapturerDelegate> delegate_; 95 rtc::scoped_refptr<AndroidVideoCapturerDelegate> delegate_;
92 96
93 rtc::ThreadChecker thread_checker_; 97 rtc::ThreadChecker thread_checker_;
94 98
95 class FrameFactory; 99 class FrameFactory;
96 FrameFactory* frame_factory_; // Owned by cricket::VideoCapturer. 100 FrameFactory* frame_factory_; // Owned by cricket::VideoCapturer.
97 101
98 cricket::CaptureState current_state_; 102 cricket::CaptureState current_state_;
99 }; 103 };
100 104
101 } // namespace webrtc 105 } // namespace webrtc
102 106
103 #endif // TALK_APP_WEBRTC_ANDROIDVIDEOCAPTURER_H_ 107 #endif // TALK_APP_WEBRTC_ANDROIDVIDEOCAPTURER_H_
OLDNEW
« no previous file with comments | « no previous file | talk/app/webrtc/androidvideocapturer.cc » ('j') | talk/app/webrtc/videosource.cc » ('J')

Powered by Google App Engine
This is Rietveld 408576698