OLD | NEW |
1 // Copyright 2014 The Chromium Authors. All rights reserved. | 1 // Copyright 2014 The Chromium Authors. All rights reserved. |
2 // Use of this source code is governed by a BSD-style license that can be | 2 // Use of this source code is governed by a BSD-style license that can be |
3 // found in the LICENSE file. | 3 // found in the LICENSE file. |
4 | 4 |
5 #ifndef CHROME_BROWSER_MEDIA_WEBRTC_RTP_DUMP_WRITER_H_ | 5 #ifndef CHROME_BROWSER_MEDIA_WEBRTC_RTP_DUMP_WRITER_H_ |
6 #define CHROME_BROWSER_MEDIA_WEBRTC_RTP_DUMP_WRITER_H_ | 6 #define CHROME_BROWSER_MEDIA_WEBRTC_RTP_DUMP_WRITER_H_ |
7 | 7 |
8 #include <stddef.h> | 8 #include <stddef.h> |
9 #include <stdint.h> | 9 #include <stdint.h> |
10 | 10 |
(...skipping 62 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
73 FLUSH_RESULT_FAILURE | 73 FLUSH_RESULT_FAILURE |
74 }; | 74 }; |
75 | 75 |
76 class FileThreadWorker; | 76 class FileThreadWorker; |
77 | 77 |
78 typedef base::Callback<void(bool)> FlushDoneCallback; | 78 typedef base::Callback<void(bool)> FlushDoneCallback; |
79 | 79 |
80 // Used by EndDump to cache the input and intermediate results. | 80 // Used by EndDump to cache the input and intermediate results. |
81 struct EndDumpContext { | 81 struct EndDumpContext { |
82 EndDumpContext(RtpDumpType type, const EndDumpCallback& callback); | 82 EndDumpContext(RtpDumpType type, const EndDumpCallback& callback); |
| 83 EndDumpContext(const EndDumpContext& other); |
83 ~EndDumpContext(); | 84 ~EndDumpContext(); |
84 | 85 |
85 RtpDumpType type; | 86 RtpDumpType type; |
86 bool incoming_succeeded; | 87 bool incoming_succeeded; |
87 bool outgoing_succeeded; | 88 bool outgoing_succeeded; |
88 EndDumpCallback callback; | 89 EndDumpCallback callback; |
89 }; | 90 }; |
90 | 91 |
91 // Flushes the in-memory buffer to disk. If |incoming| is true, the incoming | 92 // Flushes the in-memory buffer to disk. If |incoming| is true, the incoming |
92 // buffer will be flushed; otherwise, the outgoing buffer will be flushed. | 93 // buffer will be flushed; otherwise, the outgoing buffer will be flushed. |
(...skipping 36 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
129 scoped_ptr<FileThreadWorker> outgoing_file_thread_worker_; | 130 scoped_ptr<FileThreadWorker> outgoing_file_thread_worker_; |
130 | 131 |
131 base::ThreadChecker thread_checker_; | 132 base::ThreadChecker thread_checker_; |
132 | 133 |
133 base::WeakPtrFactory<WebRtcRtpDumpWriter> weak_ptr_factory_; | 134 base::WeakPtrFactory<WebRtcRtpDumpWriter> weak_ptr_factory_; |
134 | 135 |
135 DISALLOW_COPY_AND_ASSIGN(WebRtcRtpDumpWriter); | 136 DISALLOW_COPY_AND_ASSIGN(WebRtcRtpDumpWriter); |
136 }; | 137 }; |
137 | 138 |
138 #endif // CHROME_BROWSER_MEDIA_WEBRTC_RTP_DUMP_WRITER_H_ | 139 #endif // CHROME_BROWSER_MEDIA_WEBRTC_RTP_DUMP_WRITER_H_ |
OLD | NEW |