Merge lp:~morphis/aethercast/cleanup-things into lp:aethercast
- cleanup-things
- Merge into trunk
Status: | Merged |
---|---|
Approved by: | Alfonso Sanchez-Beato |
Approved revision: | 152 |
Merged at revision: | 147 |
Proposed branch: | lp:~morphis/aethercast/cleanup-things |
Merge into: | lp:aethercast |
Diff against target: |
14424 lines (+2699/-2682) 244 files modified
src/CMakeLists.txt (+104/-103) src/ac/android/h264encoder.cpp (+21/-21) src/ac/android/h264encoder.h (+19/-19) src/ac/basesourcemediamanager.cpp (+15/-15) src/ac/basesourcemediamanager.h (+4/-4) src/ac/common/executable.h (+6/-6) src/ac/common/executor.h (+6/-6) src/ac/common/executorfactory.h (+10/-10) src/ac/common/executorpool.cpp (+3/-3) src/ac/common/executorpool.h (+11/-11) src/ac/common/threadedexecutor.cpp (+10/-10) src/ac/common/threadedexecutor.h (+6/-6) src/ac/common/threadedexecutorfactory.cpp (+4/-4) src/ac/common/threadedexecutorfactory.h (+7/-7) src/ac/config.h.in (+3/-3) src/ac/controller.cpp (+18/-0) src/ac/controller.h (+9/-9) src/ac/dbus/controllerskeleton.cpp (+59/-56) src/ac/dbus/controllerskeleton.h (+19/-16) src/ac/dbus/errors.cpp (+5/-3) src/ac/dbus/errors.h (+10/-8) src/ac/dbus/helpers.cpp (+11/-9) src/ac/dbus/helpers.h (+10/-10) src/ac/dbus/networkdeviceskeleton.cpp (+22/-21) src/ac/dbus/networkdeviceskeleton.h (+12/-12) src/ac/forwardingcontroller.cpp (+16/-16) src/ac/forwardingcontroller.h (+11/-11) src/ac/forwardingnetworkdevice.cpp (+2/-2) src/ac/forwardingnetworkdevice.h (+2/-2) src/ac/glib_wrapper.h (+2/-2) src/ac/gobject_deleter.h (+2/-2) src/ac/ip_v4_address.h (+1/-1) src/ac/keep_alive.h (+1/-1) src/ac/logger.cpp (+15/-15) src/ac/logger.h (+11/-18) src/ac/mac_address.h (+1/-1) src/ac/main.cpp (+2/-2) src/ac/mediamanagerfactory.cpp (+27/-26) src/ac/mediamanagerfactory.h (+8/-8) src/ac/mir/screencast.cpp (+15/-15) src/ac/mir/screencast.h (+10/-10) src/ac/mir/sourcemediamanager.cpp (+39/-39) src/ac/mir/sourcemediamanager.h (+37/-37) src/ac/mir/streamrenderer.cpp (+12/-12) src/ac/mir/streamrenderer.h (+21/-21) src/ac/network/stream.cpp (+1/-1) src/ac/network/stream.h (+11/-11) src/ac/network/types.h (+4/-4) src/ac/network/udpstream.cpp (+15/-15) src/ac/network/udpstream.h (+9/-9) src/ac/networkdevice.cpp (+2/-2) src/ac/networkdevice.h (+2/-2) src/ac/networkmanager.cpp (+2/-2) src/ac/networkmanager.h (+4/-4) src/ac/networkmanagerfactory.cpp (+15/-15) src/ac/networkmanagerfactory.h (+3/-3) src/ac/networkutils.cpp (+9/-9) src/ac/networkutils.h (+6/-6) src/ac/non_copyable.h (+1/-1) src/ac/report/logging/encoderreport.cpp (+20/-20) src/ac/report/logging/encoderreport.h (+12/-12) src/ac/report/logging/loggingreportfactory.cpp (+7/-7) src/ac/report/logging/loggingreportfactory.h (+8/-8) src/ac/report/logging/packetizerreport.cpp (+7/-7) src/ac/report/logging/packetizerreport.h (+10/-10) src/ac/report/logging/rendererreport.cpp (+7/-7) src/ac/report/logging/rendererreport.h (+10/-10) src/ac/report/logging/senderreport.cpp (+7/-7) src/ac/report/logging/senderreport.h (+10/-10) src/ac/report/lttng/encoderreport.cpp (+18/-18) src/ac/report/lttng/encoderreport.h (+13/-13) src/ac/report/lttng/encoderreport_tp.h (+10/-10) src/ac/report/lttng/lttngreportfactory.cpp (+7/-7) src/ac/report/lttng/lttngreportfactory.h (+8/-8) src/ac/report/lttng/packetizerreport.cpp (+5/-5) src/ac/report/lttng/packetizerreport.h (+10/-10) src/ac/report/lttng/packetizerreport_tp.h (+10/-10) src/ac/report/lttng/rendererreport.cpp (+6/-6) src/ac/report/lttng/rendererreport.h (+10/-10) src/ac/report/lttng/rendererreport_tp.h (+10/-10) src/ac/report/lttng/senderreport.cpp (+5/-5) src/ac/report/lttng/senderreport.h (+10/-10) src/ac/report/lttng/senderreport_tp.h (+10/-10) src/ac/report/lttng/tracepointprovider.cpp (+3/-3) src/ac/report/lttng/tracepointprovider.h (+6/-6) src/ac/report/lttng/utils.h (+5/-5) src/ac/report/null/encoderreport.cpp (+12/-12) src/ac/report/null/encoderreport.h (+11/-11) src/ac/report/null/nullreportfactory.cpp (+7/-7) src/ac/report/null/nullreportfactory.h (+8/-8) src/ac/report/null/packetizerreport.cpp (+3/-3) src/ac/report/null/packetizerreport.h (+10/-10) src/ac/report/null/rendererreport.cpp (+3/-3) src/ac/report/null/rendererreport.h (+10/-10) src/ac/report/null/senderreport.cpp (+6/-6) src/ac/report/null/senderreport.h (+10/-10) src/ac/report/reportfactory.cpp (+10/-10) src/ac/report/reportfactory.h (+12/-12) src/ac/scoped_gobject.h (+3/-3) src/ac/service.cpp (+86/-85) src/ac/service.h (+30/-31) src/ac/shared_gobject.h (+3/-3) src/ac/sourceclient.cpp (+52/-52) src/ac/sourceclient.h (+18/-20) src/ac/sourcemanager.cpp (+29/-29) src/ac/sourcemanager.h (+16/-17) src/ac/streaming/mediasender.cpp (+12/-12) src/ac/streaming/mediasender.h (+19/-19) src/ac/streaming/mpegtspacketizer.cpp (+41/-41) src/ac/streaming/mpegtspacketizer.h (+11/-11) src/ac/streaming/packetizer.h (+10/-10) src/ac/streaming/rtpsender.cpp (+7/-7) src/ac/streaming/rtpsender.h (+18/-18) src/ac/streaming/transportsender.cpp (+3/-3) src/ac/streaming/transportsender.h (+12/-12) src/ac/systemcontroller.cpp (+6/-6) src/ac/systemcontroller.h (+4/-4) src/ac/types.cpp (+3/-3) src/ac/types.h (+2/-2) src/ac/ubuntu/systemcontroller.cpp (+4/-4) src/ac/ubuntu/systemcontroller.h (+9/-9) src/ac/ubuntu/unity.cpp (+2/-2) src/ac/ubuntu/unity.h (+4/-4) src/ac/ubuntu/unitydisplaylock.cpp (+17/-17) src/ac/ubuntu/unitydisplaylock.h (+11/-11) src/ac/utils.cpp (+6/-6) src/ac/utils.h (+4/-4) src/ac/video/baseencoder.cpp (+6/-6) src/ac/video/baseencoder.h (+14/-14) src/ac/video/buffer.cpp (+4/-4) src/ac/video/buffer.h (+11/-11) src/ac/video/bufferproducer.h (+9/-9) src/ac/video/bufferqueue.cpp (+9/-9) src/ac/video/bufferqueue.h (+12/-12) src/ac/video/displayoutput.cpp (+3/-3) src/ac/video/displayoutput.h (+4/-4) src/ac/video/encoderreport.h (+12/-12) src/ac/video/h264analyzer.cpp (+4/-4) src/ac/video/h264analyzer.h (+4/-4) src/ac/video/packetizerreport.h (+10/-10) src/ac/video/rendererreport.h (+10/-10) src/ac/video/senderreport.h (+10/-10) src/ac/video/utils.cpp (+5/-5) src/ac/video/utils.h (+8/-8) src/ac/video/utils_from_android.cpp (+2/-2) src/ac/video/videoformat.cpp (+22/-22) src/ac/video/videoformat.h (+4/-4) src/client/application.cpp (+3/-3) src/client/application.h (+3/-3) src/client/main.cpp (+1/-1) src/gdbus/CMakeLists.txt (+0/-4) src/w11tng/dhcpclient.cpp (+11/-11) src/w11tng/dhcpclient.h (+9/-9) src/w11tng/dhcpleaseparser.cpp (+10/-10) src/w11tng/dhcpleaseparser.h (+6/-6) src/w11tng/dhcpserver.cpp (+18/-18) src/w11tng/dhcpserver.h (+7/-7) src/w11tng/filemonitor.cpp (+6/-6) src/w11tng/filemonitor.h (+4/-4) src/w11tng/hostname1stub.cpp (+10/-10) src/w11tng/hostname1stub.h (+3/-3) src/w11tng/interfaceselector.cpp (+11/-11) src/w11tng/interfaceselector.h (+3/-3) src/w11tng/interfacestub.cpp (+6/-6) src/w11tng/interfacestub.h (+7/-7) src/w11tng/managerstub.cpp (+20/-20) src/w11tng/managerstub.h (+5/-5) src/w11tng/networkdevice.cpp (+11/-11) src/w11tng/networkdevice.h (+16/-16) src/w11tng/networkmanager.cpp (+73/-73) src/w11tng/networkmanager.h (+12/-12) src/w11tng/p2pdevicestub.cpp (+58/-58) src/w11tng/p2pdevicestub.h (+7/-7) src/w11tng/peerstub.cpp (+14/-14) src/w11tng/peerstub.h (+9/-9) src/w11tng/processexecutor.cpp (+9/-9) src/w11tng/processexecutor.h (+3/-3) src/w11tng/rfkillmanager.cpp (+7/-7) src/w11tng/rfkillmanager.h (+3/-3) src/w11tng/wififirmwareloader.cpp (+5/-5) src/w11tng/wififirmwareloader.h (+1/-1) tests/CMakeLists.txt (+1/-2) tests/ac/CMakeLists.txt (+2/-5) tests/ac/acceptance_tests/CMakeLists.txt (+1/-1) tests/ac/acceptance_tests/service_tests.cpp (+5/-5) tests/ac/android/h264encoder_tests.cpp (+49/-49) tests/ac/android/mockencoderreport.h (+8/-8) tests/ac/android/mockmedia.cpp (+3/-3) tests/ac/android/mockmedia.h (+4/-4) tests/ac/common/executorpool_tests.cpp (+14/-14) tests/ac/common/threadedexecutor_tests.cpp (+7/-7) tests/ac/common/threadedexecutorfactory_tests.cpp (+5/-5) tests/ac/dbus/CMakeLists.txt (+2/-0) tests/ac/dbus/controllerskeleton_tests.cpp (+27/-27) tests/ac/dbus/networkdeviceskeleton_tests.cpp (+8/-8) tests/ac/forwardingcontroller_tests.cpp (+25/-25) tests/ac/forwardingnetworkdevice_tests.cpp (+7/-7) tests/ac/integration_tests/config.h.in (+4/-4) tests/ac/integration_tests/test_stream_performance.cpp (+31/-31) tests/ac/mediamanagerfactory_tests.cpp (+9/-9) tests/ac/mir/mockmir.cpp (+3/-3) tests/ac/mir/mockmir.h (+4/-4) tests/ac/mir/screencast_tests.cpp (+36/-36) tests/ac/mir/sourcemediamanager_tests.cpp (+40/-40) tests/ac/mir/streamrenderer_tests.cpp (+23/-23) tests/ac/mock_network_device.h (+6/-6) tests/ac/networkdevice_tests.cpp (+2/-2) tests/ac/networkmanagerfactory_tests.cpp (+6/-6) tests/ac/networkutils_tests.cpp (+4/-4) tests/ac/report/reportfactory_tests.cpp (+9/-9) tests/ac/streaming/mediasender_tests.cpp (+31/-31) tests/ac/streaming/mpegtspacketizer_tests.cpp (+31/-31) tests/ac/streaming/rtpsender_tests.cpp (+35/-35) tests/ac/video/buffer_tests.cpp (+7/-7) tests/ac/video/h264analyzer_tests.cpp (+5/-5) tests/ac/video/videoformat_tests.cpp (+19/-19) tests/common/benchmark.cpp (+10/-10) tests/common/benchmark.h (+4/-4) tests/common/dbusfixture.cpp (+12/-12) tests/common/dbusfixture.h (+1/-1) tests/common/dbusnameowner.cpp (+3/-3) tests/common/dbusnameowner.h (+6/-6) tests/common/glibhelpers.cpp (+5/-5) tests/common/glibhelpers.h (+3/-3) tests/common/statistics.cpp (+3/-3) tests/common/statistics.h (+12/-12) tests/common/virtualnetwork.cpp (+2/-2) tests/common/virtualnetwork.h (+4/-4) tests/scoped_gobject_tests.cpp (+3/-3) tests/utilities_tests.cpp (+10/-10) tests/w11tng/baseskeleton.cpp (+2/-2) tests/w11tng/baseskeleton.h (+5/-5) tests/w11tng/dhcp_tests.cpp (+8/-8) tests/w11tng/dhcpleaseparser_tests.cpp (+3/-3) tests/w11tng/interfaceselector_tests.cpp (+15/-15) tests/w11tng/interfacestub_tests.cpp (+6/-6) tests/w11tng/p2pdeviceskeleton.cpp (+10/-10) tests/w11tng/p2pdeviceskeleton.h (+2/-2) tests/w11tng/p2pdevicestub_tests.cpp (+14/-14) tests/w11tng/peerstub_tests.cpp (+5/-5) tools/mirscreencast_to_stream.cpp (+6/-6) tools/mpegts_muxer.cpp (+16/-16) tools/simplesource.cpp (+6/-6) tools/simplesource.h (+5/-5) |
To merge this branch: | bzr merge lp:~morphis/aethercast/cleanup-things |
Related bugs: |
Reviewer | Review Type | Date Requested | Status |
---|---|---|---|
Alfonso Sanchez-Beato | Approve | ||
Review via email: mp+295320@code.launchpad.net |
Commit message
Cleanup various things
* use ac prefix rather than mcs
* move dbus things into specific subfolder
* adjust logger and include statements
Description of the change
- 149. By Simon Fels
-
Merge branch 'trunk'
- 150. By Simon Fels
-
Merge trunk
Alfonso Sanchez-Beato (alfonsosanchezbeato) wrote : | # |
Simon Fels (morphis) wrote : | # |
Thanks for spotting the missing conversions from mcs to ac. Fixed all of those.
INFO and AC_INFO both exists to avoid namespace clashes. Fixed the incorrect AC_INFO being used in src/ac/
- 151. By Simon Fels
-
Fix review comments
Alfonso Sanchez-Beato (alfonsosanchezbeato) wrote : | # |
Thanks for the changes.
It should be possible to use AC_TRACE, AC_DEBUG, etc. macros everywhere without collisions. So I do not think that is a reason strong enough to have two types of macros. Somebody approaching this code for the first time will wonder why there are two types of print macros and if they behave in a different way. I would really prefer having just one type unless there is a strong reason for this, and I think this refactoring is the right moment to do so.
- 152. By Simon Fels
-
Use AC_* log method everywhere
Alfonso Sanchez-Beato (alfonsosanchezbeato) wrote : | # |
Looks great
Preview Diff
1 | === modified file 'src/CMakeLists.txt' |
2 | --- src/CMakeLists.txt 2016-04-27 07:37:30 +0000 |
3 | +++ src/CMakeLists.txt 2016-06-07 08:21:39 +0000 |
4 | @@ -7,115 +7,116 @@ |
5 | set(DHCP_SERVER_PATH "/usr/sbin/dhcpd") |
6 | set(DHCP_CLIENT_PATH "/sbin/dhclient") |
7 | |
8 | -configure_file(mcs/config.h.in mcs/config.h @ONLY) |
9 | +configure_file(ac/config.h.in ac/config.h @ONLY) |
10 | configure_file(w11tng/config.h.in w11tng/config.h @ONLY) |
11 | |
12 | set(HEADERS |
13 | - mcs/glib_wrapper.h |
14 | - |
15 | - mcs/ip_v4_address.h |
16 | - mcs/keep_alive.h |
17 | - mcs/mac_address.h |
18 | - mcs/shared_gobject.h |
19 | - mcs/keep_alive.h |
20 | - mcs/config.h |
21 | - |
22 | - mcs/common/executable.h |
23 | - mcs/common/executor.h |
24 | - mcs/common/executorfactory.h |
25 | - |
26 | - mcs/network/types.h |
27 | - |
28 | - mcs/report/lttng/utils.h |
29 | - mcs/report/lttng/encoderreport_tp.h |
30 | - mcs/report/lttng/rendererreport_tp.h |
31 | - mcs/report/lttng/packetizerreport_tp.h |
32 | - mcs/report/lttng/senderreport_tp.h |
33 | - |
34 | - mcs/video/encoderreport.h |
35 | - mcs/video/rendererreport.h |
36 | - mcs/video/packetizerreport.h |
37 | - mcs/video/senderreport.h |
38 | - mcs/video/bufferproducer.h |
39 | - |
40 | - mcs/streaming/packetizer.h |
41 | + ac/glib_wrapper.h |
42 | + |
43 | + ac/ip_v4_address.h |
44 | + ac/keep_alive.h |
45 | + ac/mac_address.h |
46 | + ac/shared_gobject.h |
47 | + ac/keep_alive.h |
48 | + ac/config.h |
49 | + |
50 | + ac/common/executable.h |
51 | + ac/common/executor.h |
52 | + ac/common/executorfactory.h |
53 | + |
54 | + ac/network/types.h |
55 | + |
56 | + ac/report/lttng/utils.h |
57 | + ac/report/lttng/encoderreport_tp.h |
58 | + ac/report/lttng/rendererreport_tp.h |
59 | + ac/report/lttng/packetizerreport_tp.h |
60 | + ac/report/lttng/senderreport_tp.h |
61 | + |
62 | + ac/video/encoderreport.h |
63 | + ac/video/rendererreport.h |
64 | + ac/video/packetizerreport.h |
65 | + ac/video/senderreport.h |
66 | + ac/video/bufferproducer.h |
67 | + |
68 | + ac/streaming/packetizer.h |
69 | |
70 | w11tng/config.h |
71 | ) |
72 | |
73 | set(SOURCES |
74 | - mcs/types.cpp |
75 | - mcs/utils.cpp |
76 | - mcs/networkutils.cpp |
77 | - mcs/mediamanagerfactory.cpp |
78 | - mcs/basesourcemediamanager.cpp |
79 | - mcs/logger.cpp |
80 | - mcs/forwardingmiracastcontroller.cpp |
81 | - mcs/forwardingnetworkdevice.cpp |
82 | - mcs/miracastcontroller.cpp |
83 | - mcs/miracastcontrollerskeleton.cpp |
84 | - mcs/miracastservice.cpp |
85 | - mcs/miracastsourcemanager.cpp |
86 | - mcs/miracastsourceclient.cpp |
87 | - mcs/networkmanager.cpp |
88 | - mcs/networkmanagerfactory.cpp |
89 | - mcs/networkdevice.cpp |
90 | - mcs/dbushelpers.cpp |
91 | - mcs/networkdeviceskeleton.cpp |
92 | - mcs/dbuserrors.cpp |
93 | - |
94 | - mcs/common/executorpool.cpp |
95 | - mcs/common/threadedexecutor.cpp |
96 | - mcs/common/threadedexecutorfactory.cpp |
97 | - |
98 | - mcs/network/stream.cpp |
99 | - mcs/network/udpstream.cpp |
100 | - |
101 | - mcs/report/reportfactory.cpp |
102 | - mcs/report/reportfactory.h |
103 | - |
104 | - mcs/report/null/nullreportfactory.cpp |
105 | - mcs/report/null/encoderreport.cpp |
106 | - mcs/report/null/rendererreport.cpp |
107 | - mcs/report/null/packetizerreport.cpp |
108 | - mcs/report/null/senderreport.cpp |
109 | - mcs/report/logging/loggingreportfactory.cpp |
110 | - mcs/report/logging/encoderreport.cpp |
111 | - mcs/report/logging/rendererreport.cpp |
112 | - mcs/report/logging/packetizerreport.cpp |
113 | - mcs/report/logging/senderreport.cpp |
114 | - mcs/report/lttng/lttngreportfactory.cpp |
115 | - mcs/report/lttng/tracepointprovider.cpp |
116 | - mcs/report/lttng/encoderreport.cpp |
117 | - mcs/report/lttng/rendererreport.cpp |
118 | - mcs/report/lttng/packetizerreport.cpp |
119 | - mcs/report/lttng/senderreport.cpp |
120 | - |
121 | - mcs/video/videoformat.cpp |
122 | - mcs/video/buffer.cpp |
123 | - mcs/video/bufferqueue.cpp |
124 | - mcs/video/utils.cpp |
125 | - mcs/video/utils_from_android.cpp |
126 | - mcs/video/baseencoder.cpp |
127 | - mcs/video/h264analyzer.cpp |
128 | - mcs/video/displayoutput.cpp |
129 | - |
130 | - mcs/streaming/transportsender.cpp |
131 | - mcs/streaming/mpegtspacketizer.cpp |
132 | - mcs/streaming/rtpsender.cpp |
133 | - mcs/streaming/mediasender.cpp |
134 | - |
135 | - mcs/mir/sourcemediamanager.cpp |
136 | - mcs/mir/screencast.cpp |
137 | - mcs/mir/streamrenderer.cpp |
138 | - |
139 | - mcs/android/h264encoder.cpp |
140 | - |
141 | - mcs/systemcontroller.cpp |
142 | - |
143 | - mcs/ubuntu/unity.cpp |
144 | - mcs/ubuntu/systemcontroller.cpp |
145 | - mcs/ubuntu/unitydisplaylock.cpp |
146 | + ac/types.cpp |
147 | + ac/utils.cpp |
148 | + ac/networkutils.cpp |
149 | + ac/mediamanagerfactory.cpp |
150 | + ac/basesourcemediamanager.cpp |
151 | + ac/logger.cpp |
152 | + ac/forwardingcontroller.cpp |
153 | + ac/forwardingnetworkdevice.cpp |
154 | + ac/controller.cpp |
155 | + ac/service.cpp |
156 | + ac/sourcemanager.cpp |
157 | + ac/sourceclient.cpp |
158 | + ac/networkmanager.cpp |
159 | + ac/networkmanagerfactory.cpp |
160 | + ac/networkdevice.cpp |
161 | + |
162 | + ac/dbus/helpers.cpp |
163 | + ac/dbus/errors.cpp |
164 | + ac/dbus/controllerskeleton.cpp |
165 | + ac/dbus/networkdeviceskeleton.cpp |
166 | + |
167 | + ac/common/executorpool.cpp |
168 | + ac/common/threadedexecutor.cpp |
169 | + ac/common/threadedexecutorfactory.cpp |
170 | + |
171 | + ac/network/stream.cpp |
172 | + ac/network/udpstream.cpp |
173 | + |
174 | + ac/report/reportfactory.cpp |
175 | + ac/report/reportfactory.h |
176 | + |
177 | + ac/report/null/nullreportfactory.cpp |
178 | + ac/report/null/encoderreport.cpp |
179 | + ac/report/null/rendererreport.cpp |
180 | + ac/report/null/packetizerreport.cpp |
181 | + ac/report/null/senderreport.cpp |
182 | + ac/report/logging/loggingreportfactory.cpp |
183 | + ac/report/logging/encoderreport.cpp |
184 | + ac/report/logging/rendererreport.cpp |
185 | + ac/report/logging/packetizerreport.cpp |
186 | + ac/report/logging/senderreport.cpp |
187 | + ac/report/lttng/lttngreportfactory.cpp |
188 | + ac/report/lttng/tracepointprovider.cpp |
189 | + ac/report/lttng/encoderreport.cpp |
190 | + ac/report/lttng/rendererreport.cpp |
191 | + ac/report/lttng/packetizerreport.cpp |
192 | + ac/report/lttng/senderreport.cpp |
193 | + |
194 | + ac/video/videoformat.cpp |
195 | + ac/video/buffer.cpp |
196 | + ac/video/bufferqueue.cpp |
197 | + ac/video/utils.cpp |
198 | + ac/video/utils_from_android.cpp |
199 | + ac/video/baseencoder.cpp |
200 | + ac/video/h264analyzer.cpp |
201 | + ac/video/displayoutput.cpp |
202 | + |
203 | + ac/streaming/transportsender.cpp |
204 | + ac/streaming/mpegtspacketizer.cpp |
205 | + ac/streaming/rtpsender.cpp |
206 | + ac/streaming/mediasender.cpp |
207 | + |
208 | + ac/mir/sourcemediamanager.cpp |
209 | + ac/mir/screencast.cpp |
210 | + ac/mir/streamrenderer.cpp |
211 | + |
212 | + ac/android/h264encoder.cpp |
213 | + |
214 | + ac/systemcontroller.cpp |
215 | + |
216 | + ac/ubuntu/unity.cpp |
217 | + ac/ubuntu/systemcontroller.cpp |
218 | + ac/ubuntu/unitydisplaylock.cpp |
219 | |
220 | w11tng/networkmanager.cpp |
221 | w11tng/rfkillmanager.cpp |
222 | @@ -178,7 +179,7 @@ |
223 | -ldl |
224 | ) |
225 | |
226 | -add_library(aethercast-lttng SHARED mcs/report/lttng/tracepoints.c) |
227 | +add_library(aethercast-lttng SHARED ac/report/lttng/tracepoints.c) |
228 | target_link_libraries(aethercast-lttng |
229 | ${LTTNG_UST_LIBRARIES} |
230 | ) |
231 | @@ -187,7 +188,7 @@ |
232 | LIBRARY DESTINATION ${AETHERCAST_TRACEPOINT_LIB_INSTALL_DIR} |
233 | ) |
234 | |
235 | -add_executable(aethercast mcs/main.cpp) |
236 | +add_executable(aethercast ac/main.cpp) |
237 | target_link_libraries(aethercast aethercast-core) |
238 | |
239 | install( |
240 | |
241 | === added directory 'src/ac' |
242 | === added directory 'src/ac/android' |
243 | === renamed file 'src/mcs/android/h264encoder.cpp' => 'src/ac/android/h264encoder.cpp' |
244 | --- src/mcs/android/h264encoder.cpp 2016-04-22 12:58:47 +0000 |
245 | +++ src/ac/android/h264encoder.cpp 2016-06-07 08:21:39 +0000 |
246 | @@ -25,10 +25,10 @@ |
247 | |
248 | #include <boost/concept_check.hpp> |
249 | |
250 | -#include "mcs/logger.h" |
251 | -#include "mcs/keep_alive.h" |
252 | +#include "ac/logger.h" |
253 | +#include "ac/keep_alive.h" |
254 | |
255 | -#include "mcs/android/h264encoder.h" |
256 | +#include "ac/android/h264encoder.h" |
257 | |
258 | namespace { |
259 | static constexpr const char *kEncoderThreadName{"H264Encoder"}; |
260 | @@ -78,7 +78,7 @@ |
261 | static constexpr const char *kFormatKeyPrependSpsPpstoIdrFrames{"prepend-sps-pps-to-idr-frames"}; |
262 | } |
263 | |
264 | -namespace mcs { |
265 | +namespace ac { |
266 | namespace android { |
267 | |
268 | class MediaSourceBuffer : public video::Buffer |
269 | @@ -157,7 +157,7 @@ |
270 | source_format_(nullptr), |
271 | encoder_(nullptr), |
272 | running_(false), |
273 | - input_queue_(mcs::video::BufferQueue::Create()), |
274 | + input_queue_(ac::video::BufferQueue::Create()), |
275 | start_time_(-1ll), |
276 | frame_count_(0) { |
277 | } |
278 | @@ -179,7 +179,7 @@ |
279 | if (encoder_) |
280 | return false; |
281 | |
282 | - MCS_DEBUG("configuring with %dx%d@%d", config.width, config.height, config.framerate); |
283 | + AC_DEBUG("configuring with %dx%d@%d", config.width, config.height, config.framerate); |
284 | |
285 | auto format = media_message_create(); |
286 | if (!format) |
287 | @@ -229,14 +229,14 @@ |
288 | |
289 | auto source = media_source_create(); |
290 | if (!source) { |
291 | - MCS_ERROR("Failed to create media input source for encoder"); |
292 | + AC_ERROR("Failed to create media input source for encoder"); |
293 | media_message_release(format); |
294 | return false; |
295 | } |
296 | |
297 | auto source_format = media_meta_data_create(); |
298 | if (!source_format) { |
299 | - MCS_ERROR("Failed to create media meta data for encoder source"); |
300 | + AC_ERROR("Failed to create media meta data for encoder source"); |
301 | media_message_release(format); |
302 | media_source_release(source); |
303 | return false; |
304 | @@ -282,7 +282,7 @@ |
305 | // needed. |
306 | encoder_ = media_codec_source_create(format, source, 0); |
307 | if (!encoder_) { |
308 | - MCS_ERROR("Failed to create encoder instance"); |
309 | + AC_ERROR("Failed to create encoder instance"); |
310 | media_meta_data_release(source_format); |
311 | media_message_release(format); |
312 | media_source_release(source); |
313 | @@ -293,7 +293,7 @@ |
314 | format_ = format; |
315 | source_format_ = source_format; |
316 | |
317 | - MCS_DEBUG("Configured encoder succesfully"); |
318 | + AC_DEBUG("Configured encoder succesfully"); |
319 | |
320 | return true; |
321 | } |
322 | @@ -308,7 +308,7 @@ |
323 | running_ = true; |
324 | |
325 | if (!media_codec_source_start(encoder_)) { |
326 | - MCS_ERROR("Failed to start encoder"); |
327 | + AC_ERROR("Failed to start encoder"); |
328 | running_ = false; |
329 | return false; |
330 | } |
331 | @@ -322,7 +322,7 @@ |
332 | boost::ignore_unused_variable_warning(meta); |
333 | boost::ignore_unused_variable_warning(user_data); |
334 | |
335 | - MCS_DEBUG(""); |
336 | + AC_DEBUG(""); |
337 | |
338 | return 0; |
339 | } |
340 | @@ -330,7 +330,7 @@ |
341 | int H264Encoder::OnSourceStop(void *user_data) { |
342 | boost::ignore_unused_variable_warning(user_data); |
343 | |
344 | - MCS_DEBUG(""); |
345 | + AC_DEBUG(""); |
346 | |
347 | return 0; |
348 | } |
349 | @@ -338,14 +338,14 @@ |
350 | int H264Encoder::OnSourcePause(void *user_data) { |
351 | boost::ignore_unused_variable_warning(user_data); |
352 | |
353 | - MCS_DEBUG(""); |
354 | + AC_DEBUG(""); |
355 | |
356 | return 0; |
357 | } |
358 | |
359 | -MediaBufferWrapper* H264Encoder::PackBuffer(const mcs::video::Buffer::Ptr &input_buffer, const mcs::TimestampUs ×tamp) { |
360 | +MediaBufferWrapper* H264Encoder::PackBuffer(const ac::video::Buffer::Ptr &input_buffer, const ac::TimestampUs ×tamp) { |
361 | if (!input_buffer->NativeHandle()) { |
362 | - MCS_WARNING("Ignoring buffer without native handle"); |
363 | + AC_WARNING("Ignoring buffer without native handle"); |
364 | return nullptr; |
365 | } |
366 | |
367 | @@ -424,7 +424,7 @@ |
368 | } |
369 | |
370 | if (iter == thiz->pending_buffers_.end()) { |
371 | - MCS_WARNING("Didn't remember returned buffer!?"); |
372 | + AC_WARNING("Didn't remember returned buffer!?"); |
373 | return; |
374 | } |
375 | |
376 | @@ -456,13 +456,13 @@ |
377 | |
378 | bool H264Encoder::Execute() { |
379 | if (!running_) { |
380 | - MCS_ERROR("Tried to execute encoder while not started"); |
381 | + AC_ERROR("Tried to execute encoder while not started"); |
382 | return false; |
383 | } |
384 | |
385 | MediaBufferWrapper *buffer = nullptr; |
386 | if (!media_codec_source_read(encoder_, &buffer)) { |
387 | - MCS_ERROR("Failed to read a new buffer from encoder"); |
388 | + AC_ERROR("Failed to read a new buffer from encoder"); |
389 | return false; |
390 | } |
391 | |
392 | @@ -512,7 +512,7 @@ |
393 | if (!encoder_) |
394 | return; |
395 | |
396 | - MCS_DEBUG(""); |
397 | + AC_DEBUG(""); |
398 | |
399 | media_codec_source_request_idr_frame(encoder_); |
400 | } |
401 | @@ -522,4 +522,4 @@ |
402 | } |
403 | |
404 | } // namespace android |
405 | -} // namespace mcs |
406 | +} // namespace ac |
407 | |
408 | === renamed file 'src/mcs/android/h264encoder.h' => 'src/ac/android/h264encoder.h' |
409 | --- src/mcs/android/h264encoder.h 2016-04-22 12:58:11 +0000 |
410 | +++ src/ac/android/h264encoder.h 2016-06-07 08:21:39 +0000 |
411 | @@ -15,24 +15,24 @@ |
412 | * |
413 | */ |
414 | |
415 | -#ifndef MCS_ANDORID_ENCODER_H_ |
416 | -#define MCS_ANDORID_ENCODER_H_ |
417 | +#ifndef AC_ANDORID_ENCODER_H_ |
418 | +#define AC_ANDORID_ENCODER_H_ |
419 | |
420 | #include <memory> |
421 | #include <thread> |
422 | |
423 | #include <hybris/media/media_codec_source_layer.h> |
424 | |
425 | -#include "mcs/non_copyable.h" |
426 | -#include "mcs/utils.h" |
427 | - |
428 | -#include "mcs/common/executable.h" |
429 | - |
430 | -#include "mcs/video/baseencoder.h" |
431 | -#include "mcs/video/encoderreport.h" |
432 | -#include "mcs/video/bufferqueue.h" |
433 | - |
434 | -namespace mcs { |
435 | +#include "ac/non_copyable.h" |
436 | +#include "ac/utils.h" |
437 | + |
438 | +#include "ac/common/executable.h" |
439 | + |
440 | +#include "ac/video/baseencoder.h" |
441 | +#include "ac/video/encoderreport.h" |
442 | +#include "ac/video/bufferqueue.h" |
443 | + |
444 | +namespace ac { |
445 | namespace android { |
446 | |
447 | class H264Encoder : public video::BaseEncoder { |
448 | @@ -47,14 +47,14 @@ |
449 | |
450 | bool Configure(const BaseEncoder::Config &config) override; |
451 | |
452 | - void QueueBuffer(const mcs::video::Buffer::Ptr &buffer) override; |
453 | + void QueueBuffer(const ac::video::Buffer::Ptr &buffer) override; |
454 | |
455 | bool Running() const override { return running_; } |
456 | BaseEncoder::Config Configuration() const override; |
457 | |
458 | void SendIDRFrame() override; |
459 | |
460 | - // From mcs::common::Executable |
461 | + // From ac::common::Executable |
462 | bool Start() override; |
463 | bool Stop() override; |
464 | bool Execute() override; |
465 | @@ -65,7 +65,7 @@ |
466 | |
467 | bool DoesBufferContainCodecConfig(MediaBufferWrapper *buffer); |
468 | |
469 | - MediaBufferWrapper* PackBuffer(const mcs::video::Buffer::Ptr &input_buffer, const mcs::TimestampUs ×tamp); |
470 | + MediaBufferWrapper* PackBuffer(const ac::video::Buffer::Ptr &input_buffer, const ac::TimestampUs ×tamp); |
471 | |
472 | private: |
473 | static int OnSourceRead(MediaBufferWrapper **buffer, void *user_data); |
474 | @@ -77,7 +77,7 @@ |
475 | |
476 | private: |
477 | struct BufferItem { |
478 | - mcs::video::Buffer::Ptr buffer; |
479 | + ac::video::Buffer::Ptr buffer; |
480 | MediaBufferWrapper *media_buffer; |
481 | }; |
482 | |
483 | @@ -88,13 +88,13 @@ |
484 | MediaMetaDataWrapper *source_format_; |
485 | MediaCodecSourceWrapper *encoder_; |
486 | bool running_; |
487 | - mcs::video::BufferQueue::Ptr input_queue_; |
488 | + ac::video::BufferQueue::Ptr input_queue_; |
489 | std::vector<BufferItem> pending_buffers_; |
490 | - mcs::TimestampUs start_time_; |
491 | + ac::TimestampUs start_time_; |
492 | uint32_t frame_count_; |
493 | }; |
494 | |
495 | } // namespace android |
496 | -} // namespace mcs |
497 | +} // namespace ac |
498 | |
499 | #endif |
500 | |
501 | === renamed file 'src/mcs/basesourcemediamanager.cpp' => 'src/ac/basesourcemediamanager.cpp' |
502 | --- src/mcs/basesourcemediamanager.cpp 2016-05-05 17:29:14 +0000 |
503 | +++ src/ac/basesourcemediamanager.cpp 2016-06-07 08:21:39 +0000 |
504 | @@ -17,15 +17,15 @@ |
505 | |
506 | #include <iostream> |
507 | |
508 | -#include "mcs/logger.h" |
509 | -#include "mcs/basesourcemediamanager.h" |
510 | -#include "mcs/video/videoformat.h" |
511 | +#include "ac/logger.h" |
512 | +#include "ac/basesourcemediamanager.h" |
513 | +#include "ac/video/videoformat.h" |
514 | |
515 | namespace { |
516 | static unsigned int next_session_id = 0; |
517 | } |
518 | |
519 | -namespace mcs { |
520 | +namespace ac { |
521 | BaseSourceMediaManager::BaseSourceMediaManager() : |
522 | session_id_(++next_session_id) { |
523 | } |
524 | @@ -80,9 +80,9 @@ |
525 | wds::H264VideoCodec codec1(wds::CBP, wds::k3_1, cea_rr, vesa_rr, hh_rr); |
526 | codecs.push_back(codec1); |
527 | |
528 | - DEBUG("Video codecs supported by us:"); |
529 | + AC_DEBUG("Video codecs supported by us:"); |
530 | for (auto c : codecs) |
531 | - mcs::video::DumpVideoCodec(c); |
532 | + ac::video::DumpVideoCodec(c); |
533 | } |
534 | |
535 | return codecs; |
536 | @@ -91,12 +91,12 @@ |
537 | bool BaseSourceMediaManager::InitOptimalVideoFormat(const wds::NativeVideoFormat& sink_native_format, |
538 | const std::vector<wds::H264VideoCodec>& sink_supported_codecs) { |
539 | |
540 | - DEBUG("Sink native resolution:"); |
541 | - mcs::video::DumpNativeFormat(sink_native_format); |
542 | + AC_DEBUG("Sink native resolution:"); |
543 | + ac::video::DumpNativeFormat(sink_native_format); |
544 | |
545 | - DEBUG("Sink supports the following codecs:"); |
546 | + AC_DEBUG("Sink supports the following codecs:"); |
547 | for (auto sink_codec : sink_supported_codecs) { |
548 | - mcs::video::DumpVideoCodec(sink_codec); |
549 | + ac::video::DumpVideoCodec(sink_codec); |
550 | } |
551 | |
552 | bool success = false; |
553 | @@ -111,12 +111,12 @@ |
554 | format_.rate_resolution = wds::CEA1280x720p30; |
555 | |
556 | if (!success) { |
557 | - MCS_ERROR("Failed to select proper video format"); |
558 | + AC_ERROR("Failed to select proper video format"); |
559 | return false; |
560 | } |
561 | |
562 | - DEBUG("Found optimal video format:"); |
563 | - mcs::video::DumpVideoFormat(format_); |
564 | + AC_DEBUG("Found optimal video format:"); |
565 | + ac::video::DumpVideoFormat(format_); |
566 | |
567 | return Configure(); |
568 | } |
569 | @@ -139,10 +139,10 @@ |
570 | } |
571 | |
572 | void BaseSourceMediaManager::SendIDRPicture() { |
573 | - WARNING("Unimplemented IDR picture request"); |
574 | + AC_WARNING("Unimplemented IDR picture request"); |
575 | } |
576 | |
577 | std::string BaseSourceMediaManager::GetSessionId() const { |
578 | return std::to_string(session_id_); |
579 | } |
580 | -} // namespace mcs |
581 | +} // namespace ac |
582 | |
583 | === renamed file 'src/mcs/basesourcemediamanager.h' => 'src/ac/basesourcemediamanager.h' |
584 | --- src/mcs/basesourcemediamanager.h 2016-05-05 17:29:14 +0000 |
585 | +++ src/ac/basesourcemediamanager.h 2016-06-07 08:21:39 +0000 |
586 | @@ -22,13 +22,13 @@ |
587 | |
588 | #include <wds/media_manager.h> |
589 | |
590 | -#include "mcs/non_copyable.h" |
591 | +#include "ac/non_copyable.h" |
592 | |
593 | -namespace mcs { |
594 | +namespace ac { |
595 | class BaseSourceMediaManager : public wds::SourceMediaManager |
596 | { |
597 | public: |
598 | - class Delegate : public mcs::NonCopyable { |
599 | + class Delegate : public ac::NonCopyable { |
600 | public: |
601 | virtual void OnSourceNetworkError() = 0; |
602 | }; |
603 | @@ -64,5 +64,5 @@ |
604 | wds::AudioCodec audio_codec_; |
605 | unsigned int session_id_; |
606 | }; |
607 | -} // namespace mcs |
608 | +} // namespace ac |
609 | #endif |
610 | |
611 | === added directory 'src/ac/common' |
612 | === renamed file 'src/mcs/common/executable.h' => 'src/ac/common/executable.h' |
613 | --- src/mcs/common/executable.h 2016-03-14 11:09:02 +0000 |
614 | +++ src/ac/common/executable.h 2016-06-07 08:21:39 +0000 |
615 | @@ -15,18 +15,18 @@ |
616 | * |
617 | */ |
618 | |
619 | -#ifndef MCS_COMMON_EXECUTABLE_H_ |
620 | -#define MCS_COMMON_EXECUTABLE_H_ |
621 | +#ifndef AC_COMMON_EXECUTABLE_H_ |
622 | +#define AC_COMMON_EXECUTABLE_H_ |
623 | |
624 | #include <memory> |
625 | #include <string> |
626 | |
627 | -#include "mcs/non_copyable.h" |
628 | +#include "ac/non_copyable.h" |
629 | |
630 | -namespace mcs { |
631 | +namespace ac { |
632 | namespace common { |
633 | |
634 | -class Executable : public mcs::NonCopyable { |
635 | +class Executable : public ac::NonCopyable { |
636 | public: |
637 | typedef std::shared_ptr<Executable> Ptr; |
638 | |
639 | @@ -44,6 +44,6 @@ |
640 | }; |
641 | |
642 | } // namespace common |
643 | -} // namespace mcs |
644 | +} // namespace ac |
645 | |
646 | #endif |
647 | |
648 | === renamed file 'src/mcs/common/executor.h' => 'src/ac/common/executor.h' |
649 | --- src/mcs/common/executor.h 2016-03-07 11:05:18 +0000 |
650 | +++ src/ac/common/executor.h 2016-06-07 08:21:39 +0000 |
651 | @@ -15,17 +15,17 @@ |
652 | * |
653 | */ |
654 | |
655 | -#ifndef MCS_COMMON_EXECUTOR_H_ |
656 | -#define MCS_COMMON_EXECUTOR_H_ |
657 | +#ifndef AC_COMMON_EXECUTOR_H_ |
658 | +#define AC_COMMON_EXECUTOR_H_ |
659 | |
660 | #include <memory> |
661 | |
662 | -#include "mcs/non_copyable.h" |
663 | +#include "ac/non_copyable.h" |
664 | |
665 | -namespace mcs { |
666 | +namespace ac { |
667 | namespace common { |
668 | |
669 | -class Executor : public mcs::NonCopyable { |
670 | +class Executor : public ac::NonCopyable { |
671 | public: |
672 | typedef std::shared_ptr<Executor> Ptr; |
673 | |
674 | @@ -38,6 +38,6 @@ |
675 | }; |
676 | |
677 | } // namespace common |
678 | -} // namespace mcs |
679 | +} // namespace ac |
680 | |
681 | #endif |
682 | |
683 | === renamed file 'src/mcs/common/executorfactory.h' => 'src/ac/common/executorfactory.h' |
684 | --- src/mcs/common/executorfactory.h 2016-03-14 11:09:02 +0000 |
685 | +++ src/ac/common/executorfactory.h 2016-06-07 08:21:39 +0000 |
686 | @@ -15,20 +15,20 @@ |
687 | * |
688 | */ |
689 | |
690 | -#ifndef MCS_COMMON_EXECUTORFACTORY_H_ |
691 | -#define MCS_COMMON_EXECUTORFACTORY_H_ |
692 | +#ifndef AC_COMMON_EXECUTORFACTORY_H_ |
693 | +#define AC_COMMON_EXECUTORFACTORY_H_ |
694 | |
695 | #include <memory> |
696 | |
697 | -#include "mcs/non_copyable.h" |
698 | - |
699 | -#include "mcs/common/executable.h" |
700 | -#include "mcs/common/executor.h" |
701 | - |
702 | -namespace mcs { |
703 | +#include "ac/non_copyable.h" |
704 | + |
705 | +#include "ac/common/executable.h" |
706 | +#include "ac/common/executor.h" |
707 | + |
708 | +namespace ac { |
709 | namespace common { |
710 | |
711 | -class ExecutorFactory : public mcs::NonCopyable { |
712 | +class ExecutorFactory : public ac::NonCopyable { |
713 | public: |
714 | typedef std::shared_ptr<ExecutorFactory> Ptr; |
715 | |
716 | @@ -39,6 +39,6 @@ |
717 | }; |
718 | |
719 | } // namespace common |
720 | -} // namespace mcs |
721 | +} // namespace ac |
722 | |
723 | #endif |
724 | |
725 | === renamed file 'src/mcs/common/executorpool.cpp' => 'src/ac/common/executorpool.cpp' |
726 | --- src/mcs/common/executorpool.cpp 2016-03-30 08:13:42 +0000 |
727 | +++ src/ac/common/executorpool.cpp 2016-06-07 08:21:39 +0000 |
728 | @@ -15,9 +15,9 @@ |
729 | * |
730 | */ |
731 | |
732 | -#include "mcs/common/executorpool.h" |
733 | +#include "ac/common/executorpool.h" |
734 | |
735 | -namespace mcs { |
736 | +namespace ac { |
737 | namespace common { |
738 | |
739 | ExecutorPool::ExecutorPool(const ExecutorFactory::Ptr &factory, const size_t &size) : |
740 | @@ -84,4 +84,4 @@ |
741 | } |
742 | |
743 | } // namespace common |
744 | -} // namespace mcs |
745 | +} // namespace ac |
746 | |
747 | === renamed file 'src/mcs/common/executorpool.h' => 'src/ac/common/executorpool.h' |
748 | --- src/mcs/common/executorpool.h 2016-03-30 08:13:42 +0000 |
749 | +++ src/ac/common/executorpool.h 2016-06-07 08:21:39 +0000 |
750 | @@ -15,24 +15,24 @@ |
751 | * |
752 | */ |
753 | |
754 | -#ifndef MCS_COMMON_EXECUTORPOOL_H_ |
755 | -#define MCS_COMMON_EXECUTORPOOL_H_ |
756 | +#ifndef AC_COMMON_EXECUTORPOOL_H_ |
757 | +#define AC_COMMON_EXECUTORPOOL_H_ |
758 | |
759 | #include <cstddef> |
760 | |
761 | #include <vector> |
762 | |
763 | -#include "mcs/non_copyable.h" |
764 | - |
765 | -#include "mcs/common/executor.h" |
766 | -#include "mcs/common/executorfactory.h" |
767 | -#include "mcs/common/executable.h" |
768 | - |
769 | -namespace mcs { |
770 | +#include "ac/non_copyable.h" |
771 | + |
772 | +#include "ac/common/executor.h" |
773 | +#include "ac/common/executorfactory.h" |
774 | +#include "ac/common/executable.h" |
775 | + |
776 | +namespace ac { |
777 | namespace common { |
778 | |
779 | |
780 | -class ExecutorPool : public mcs::NonCopyable { |
781 | +class ExecutorPool : public ac::NonCopyable { |
782 | public: |
783 | ExecutorPool(const ExecutorFactory::Ptr &factory, const size_t &size); |
784 | ~ExecutorPool(); |
785 | @@ -57,6 +57,6 @@ |
786 | }; |
787 | |
788 | } // namespace common |
789 | -} // namespace mcs |
790 | +} // namespace ac |
791 | |
792 | #endif |
793 | |
794 | === renamed file 'src/mcs/common/threadedexecutor.cpp' => 'src/ac/common/threadedexecutor.cpp' |
795 | --- src/mcs/common/threadedexecutor.cpp 2016-03-14 11:09:02 +0000 |
796 | +++ src/ac/common/threadedexecutor.cpp 2016-06-07 08:21:39 +0000 |
797 | @@ -15,12 +15,12 @@ |
798 | * |
799 | */ |
800 | |
801 | -#include "mcs/utils.h" |
802 | -#include "mcs/logger.h" |
803 | - |
804 | -#include "mcs/common/threadedexecutor.h" |
805 | - |
806 | -namespace mcs { |
807 | +#include "ac/utils.h" |
808 | +#include "ac/logger.h" |
809 | + |
810 | +#include "ac/common/threadedexecutor.h" |
811 | + |
812 | +namespace ac { |
813 | namespace common { |
814 | |
815 | |
816 | @@ -35,8 +35,8 @@ |
817 | |
818 | void ThreadedExecutor::ThreadWorker() { |
819 | if (executable_->Name().length() > 0) { |
820 | - mcs::Utils::SetThreadName(executable_->Name()); |
821 | - MCS_DEBUG("Started threaded executor %s", executable_->Name()); |
822 | + ac::Utils::SetThreadName(executable_->Name()); |
823 | + AC_DEBUG("Started threaded executor %s", executable_->Name()); |
824 | } |
825 | |
826 | while (running_) { |
827 | @@ -64,7 +64,7 @@ |
828 | return false; |
829 | |
830 | if (!executable_->Stop()) |
831 | - MCS_ERROR("Failed to stop exutable"); |
832 | + AC_ERROR("Failed to stop exutable"); |
833 | |
834 | thread_.join(); |
835 | |
836 | @@ -76,4 +76,4 @@ |
837 | } |
838 | |
839 | } // namespace common |
840 | -} // namespace mcs |
841 | +} // namespace ac |
842 | |
843 | === renamed file 'src/mcs/common/threadedexecutor.h' => 'src/ac/common/threadedexecutor.h' |
844 | --- src/mcs/common/threadedexecutor.h 2016-03-14 11:09:02 +0000 |
845 | +++ src/ac/common/threadedexecutor.h 2016-06-07 08:21:39 +0000 |
846 | @@ -15,17 +15,17 @@ |
847 | * |
848 | */ |
849 | |
850 | -#ifndef MCS_COMMON_THREADEDEXECUTOR_H_ |
851 | -#define MCS_COMMON_THREADEDEXECUTOR_H_ |
852 | +#ifndef AC_COMMON_THREADEDEXECUTOR_H_ |
853 | +#define AC_COMMON_THREADEDEXECUTOR_H_ |
854 | |
855 | #include <atomic> |
856 | #include <memory> |
857 | #include <thread> |
858 | |
859 | -#include "mcs/common/executor.h" |
860 | -#include "mcs/common/executable.h" |
861 | +#include "ac/common/executor.h" |
862 | +#include "ac/common/executable.h" |
863 | |
864 | -namespace mcs { |
865 | +namespace ac { |
866 | namespace common { |
867 | |
868 | class ThreadedExecutor : public Executor { |
869 | @@ -49,6 +49,6 @@ |
870 | }; |
871 | |
872 | } // namespace common |
873 | -} // namespace mcs |
874 | +} // namespace ac |
875 | |
876 | #endif |
877 | |
878 | === renamed file 'src/mcs/common/threadedexecutorfactory.cpp' => 'src/ac/common/threadedexecutorfactory.cpp' |
879 | --- src/mcs/common/threadedexecutorfactory.cpp 2016-03-14 11:09:02 +0000 |
880 | +++ src/ac/common/threadedexecutorfactory.cpp 2016-06-07 08:21:39 +0000 |
881 | @@ -15,10 +15,10 @@ |
882 | * |
883 | */ |
884 | |
885 | -#include "mcs/common/threadedexecutorfactory.h" |
886 | -#include "mcs/common/threadedexecutor.h" |
887 | +#include "ac/common/threadedexecutorfactory.h" |
888 | +#include "ac/common/threadedexecutor.h" |
889 | |
890 | -namespace mcs { |
891 | +namespace ac { |
892 | namespace common { |
893 | |
894 | Executor::Ptr ThreadedExecutorFactory::Create(const Executable::Ptr &executable) { |
895 | @@ -26,4 +26,4 @@ |
896 | } |
897 | |
898 | } // namespace common |
899 | -} // namespace mcs |
900 | +} // namespace ac |
901 | |
902 | === renamed file 'src/mcs/common/threadedexecutorfactory.h' => 'src/ac/common/threadedexecutorfactory.h' |
903 | --- src/mcs/common/threadedexecutorfactory.h 2016-03-14 11:09:02 +0000 |
904 | +++ src/ac/common/threadedexecutorfactory.h 2016-06-07 08:21:39 +0000 |
905 | @@ -15,12 +15,12 @@ |
906 | * |
907 | */ |
908 | |
909 | -#ifndef MCS_COMMON_THREADEDEXECUTORFACTORY_H_ |
910 | -#define MCS_COMMON_THREADEDEXECUTORFACTORY_H_ |
911 | - |
912 | -#include "mcs/common/executorfactory.h" |
913 | - |
914 | -namespace mcs { |
915 | +#ifndef AC_COMMON_THREADEDEXECUTORFACTORY_H_ |
916 | +#define AC_COMMON_THREADEDEXECUTORFACTORY_H_ |
917 | + |
918 | +#include "ac/common/executorfactory.h" |
919 | + |
920 | +namespace ac { |
921 | namespace common { |
922 | |
923 | class ThreadedExecutorFactory : public ExecutorFactory { |
924 | @@ -29,6 +29,6 @@ |
925 | }; |
926 | |
927 | } // namespace common |
928 | -} // namespace mcs |
929 | +} // namespace ac |
930 | |
931 | #endif |
932 | |
933 | === renamed file 'src/mcs/config.h.in' => 'src/ac/config.h.in' |
934 | --- src/mcs/config.h.in 2016-04-27 07:37:30 +0000 |
935 | +++ src/ac/config.h.in 2016-06-07 08:21:39 +0000 |
936 | @@ -15,10 +15,10 @@ |
937 | * |
938 | */ |
939 | |
940 | -#ifndef MCS_CONFIG_H_ |
941 | -#define MCS_CONFIG_H_ |
942 | +#ifndef AC_CONFIG_H_ |
943 | +#define AC_CONFIG_H_ |
944 | |
945 | -namespace mcs { |
946 | +namespace ac { |
947 | // FIXME(morphis) Make both paths be configured from cmake with the |
948 | // correct system defaults. |
949 | constexpr const char* kRuntimePath{"/run/aethercast"}; |
950 | |
951 | === added file 'src/ac/controller.cpp' |
952 | --- src/ac/controller.cpp 1970-01-01 00:00:00 +0000 |
953 | +++ src/ac/controller.cpp 2016-06-07 08:21:39 +0000 |
954 | @@ -0,0 +1,18 @@ |
955 | +/* |
956 | + * Copyright (C) 2015 Canonical, Ltd. |
957 | + * |
958 | + * This program is free software: you can redistribute it and/or modify it |
959 | + * under the terms of the GNU General Public License version 3, as published |
960 | + * by the Free Software Foundation. |
961 | + * |
962 | + * This program is distributed in the hope that it will be useful, but |
963 | + * WITHOUT ANY WARRANTY; without even the implied warranties of |
964 | + * MERCHANTABILITY, SATISFACTORY QUALITY, or FITNESS FOR A PARTICULAR |
965 | + * PURPOSE. See the GNU General Public License for more details. |
966 | + * |
967 | + * You should have received a copy of the GNU General Public License along |
968 | + * with this program. If not, see <http://www.gnu.org/licenses/>. |
969 | + * |
970 | + */ |
971 | + |
972 | +#include "controller.h" |
973 | |
974 | === renamed file 'src/mcs/miracastcontroller.h' => 'src/ac/controller.h' |
975 | --- src/mcs/miracastcontroller.h 2016-04-27 07:37:30 +0000 |
976 | +++ src/ac/controller.h 2016-06-07 08:21:39 +0000 |
977 | @@ -15,8 +15,8 @@ |
978 | * |
979 | */ |
980 | |
981 | -#ifndef MIRACAST_CONTROLLER_H_ |
982 | -#define MIRACAST_CONTROLLER_H_ |
983 | +#ifndef AC_CONTROLLER_H_ |
984 | +#define AC_CONTROLLER_H_ |
985 | |
986 | #include <chrono> |
987 | #include <memory> |
988 | @@ -26,13 +26,13 @@ |
989 | #include "non_copyable.h" |
990 | #include "types.h" |
991 | |
992 | -namespace mcs { |
993 | -class MiracastController : private mcs::NonCopyable |
994 | +namespace ac { |
995 | +class Controller : private ac::NonCopyable |
996 | { |
997 | public: |
998 | - typedef std::shared_ptr<MiracastController> Ptr; |
999 | + typedef std::shared_ptr<Controller> Ptr; |
1000 | |
1001 | - class Delegate : private mcs::NonCopyable { |
1002 | + class Delegate : private ac::NonCopyable { |
1003 | public: |
1004 | virtual ~Delegate() { } |
1005 | |
1006 | @@ -54,7 +54,7 @@ |
1007 | |
1008 | virtual void DisconnectAll(ResultCallback callback) = 0; |
1009 | |
1010 | - virtual mcs::Error Scan(const std::chrono::seconds &timeout = std::chrono::seconds{30}) = 0; |
1011 | + virtual ac::Error Scan(const std::chrono::seconds &timeout = std::chrono::seconds{30}) = 0; |
1012 | |
1013 | virtual NetworkDeviceState State() const = 0; |
1014 | virtual std::vector<NetworkManager::Capability> Capabilities() const = 0; |
1015 | @@ -64,7 +64,7 @@ |
1016 | virtual Error SetEnabled(bool enabled) = 0; |
1017 | |
1018 | protected: |
1019 | - MiracastController() = default; |
1020 | + Controller() = default; |
1021 | }; |
1022 | -} // namespace mcs |
1023 | +} // namespace ac |
1024 | #endif |
1025 | |
1026 | === added directory 'src/ac/dbus' |
1027 | === renamed file 'src/mcs/miracastcontrollerskeleton.cpp' => 'src/ac/dbus/controllerskeleton.cpp' |
1028 | --- src/mcs/miracastcontrollerskeleton.cpp 2016-04-27 07:37:30 +0000 |
1029 | +++ src/ac/dbus/controllerskeleton.cpp 2016-06-07 08:21:39 +0000 |
1030 | @@ -19,33 +19,35 @@ |
1031 | |
1032 | #include <boost/concept_check.hpp> |
1033 | |
1034 | -#include "mcs/glib_wrapper.h" |
1035 | - |
1036 | -#include "mcs/miracastcontrollerskeleton.h" |
1037 | -#include "mcs/keep_alive.h" |
1038 | -#include "mcs/utils.h" |
1039 | -#include "mcs/dbushelpers.h" |
1040 | -#include "mcs/logger.h" |
1041 | -#include "mcs/dbuserrors.h" |
1042 | +#include "ac/glib_wrapper.h" |
1043 | + |
1044 | +#include "ac/keep_alive.h" |
1045 | +#include "ac/utils.h" |
1046 | +#include "ac/logger.h" |
1047 | + |
1048 | +#include "ac/dbus/controllerskeleton.h" |
1049 | +#include "ac/dbus/errors.h" |
1050 | +#include "ac/dbus/helpers.h" |
1051 | |
1052 | namespace { |
1053 | -constexpr const char *kManagerSkeletonInstanceKey{"miracast-controller-skeleton"}; |
1054 | -} |
1055 | - |
1056 | -namespace mcs { |
1057 | -std::shared_ptr<MiracastControllerSkeleton> MiracastControllerSkeleton::create(const std::shared_ptr<MiracastController> &controller) { |
1058 | - return std::shared_ptr<MiracastControllerSkeleton>(new MiracastControllerSkeleton(controller))->FinalizeConstruction(); |
1059 | -} |
1060 | - |
1061 | -MiracastControllerSkeleton::MiracastControllerSkeleton(const std::shared_ptr<MiracastController> &controller) : |
1062 | - ForwardingMiracastController(controller), |
1063 | +constexpr const char *kManagerSkeletonInstanceKey{"controller-skeleton"}; |
1064 | +} |
1065 | + |
1066 | +namespace ac { |
1067 | +namespace dbus { |
1068 | +std::shared_ptr<ControllerSkeleton> ControllerSkeleton::Create(const std::shared_ptr<Controller> &controller) { |
1069 | + return std::shared_ptr<ControllerSkeleton>(new ControllerSkeleton(controller))->FinalizeConstruction(); |
1070 | +} |
1071 | + |
1072 | +ControllerSkeleton::ControllerSkeleton(const std::shared_ptr<Controller> &controller) : |
1073 | + ForwardingController(controller), |
1074 | manager_obj_(nullptr), |
1075 | bus_connection_(nullptr), |
1076 | bus_id_(0), |
1077 | object_manager_(nullptr) { |
1078 | } |
1079 | |
1080 | -MiracastControllerSkeleton::~MiracastControllerSkeleton() { |
1081 | +ControllerSkeleton::~ControllerSkeleton() { |
1082 | if (bus_id_ > 0) |
1083 | g_bus_unown_name(bus_id_); |
1084 | |
1085 | @@ -55,11 +57,11 @@ |
1086 | // as we own the object emitting those signals. |
1087 | } |
1088 | |
1089 | -void MiracastControllerSkeleton::SyncProperties() { |
1090 | +void ControllerSkeleton::SyncProperties() { |
1091 | aethercast_interface_manager_set_state(manager_obj_.get(), |
1092 | NetworkDevice::StateToStr(State()).c_str()); |
1093 | |
1094 | - auto capabilities = DBusHelpers::GenerateCapabilities(Capabilities()); |
1095 | + auto capabilities = Helpers::GenerateCapabilities(Capabilities()); |
1096 | |
1097 | aethercast_interface_manager_set_capabilities(manager_obj_.get(), capabilities); |
1098 | |
1099 | @@ -69,7 +71,7 @@ |
1100 | aethercast_interface_manager_set_enabled(manager_obj_.get(), Enabled()); |
1101 | } |
1102 | |
1103 | -void MiracastControllerSkeleton::OnStateChanged(NetworkDeviceState state) { |
1104 | +void ControllerSkeleton::OnStateChanged(NetworkDeviceState state) { |
1105 | if (!manager_obj_) |
1106 | return; |
1107 | |
1108 | @@ -77,15 +79,15 @@ |
1109 | NetworkDevice::StateToStr(State()).c_str()); |
1110 | } |
1111 | |
1112 | -std::string MiracastControllerSkeleton::GenerateDevicePath(const NetworkDevice::Ptr &device) const { |
1113 | +std::string ControllerSkeleton::GenerateDevicePath(const NetworkDevice::Ptr &device) const { |
1114 | std::string address = device->Address(); |
1115 | std::replace(address.begin(), address.end(), ':', '_'); |
1116 | // FIXME using kManagerPath doesn't seem to work. Fails at link time ... |
1117 | - return mcs::Utils::Sprintf("/org/aethercast/dev_%s", address.c_str()); |
1118 | + return ac::Utils::Sprintf("/org/aethercast/dev_%s", address.c_str()); |
1119 | } |
1120 | |
1121 | -void MiracastControllerSkeleton::OnDeviceFound(const NetworkDevice::Ptr &device) { |
1122 | - DEBUG("device %s", device->Address().c_str()); |
1123 | +void ControllerSkeleton::OnDeviceFound(const NetworkDevice::Ptr &device) { |
1124 | + AC_DEBUG("device %s", device->Address().c_str()); |
1125 | |
1126 | auto path = GenerateDevicePath(device); |
1127 | auto adapter = NetworkDeviceSkeleton::Create(bus_connection_, path , device, shared_from_this()); |
1128 | @@ -94,7 +96,7 @@ |
1129 | g_dbus_object_manager_server_export(object_manager_.get(), adapter->DBusObject()); |
1130 | } |
1131 | |
1132 | -void MiracastControllerSkeleton::OnDeviceLost(const NetworkDevice::Ptr &device) { |
1133 | +void ControllerSkeleton::OnDeviceLost(const NetworkDevice::Ptr &device) { |
1134 | auto iter = devices_.find(device->Address()); |
1135 | if (iter == devices_.end()) |
1136 | return; |
1137 | @@ -104,7 +106,7 @@ |
1138 | devices_.erase(iter); |
1139 | } |
1140 | |
1141 | -void MiracastControllerSkeleton::OnDeviceChanged(const NetworkDevice::Ptr &peer) { |
1142 | +void ControllerSkeleton::OnDeviceChanged(const NetworkDevice::Ptr &peer) { |
1143 | auto iter = devices_.find(peer->Address()); |
1144 | if (iter == devices_.end()) |
1145 | return; |
1146 | @@ -112,7 +114,7 @@ |
1147 | iter->second->SyncProperties(); |
1148 | } |
1149 | |
1150 | -void MiracastControllerSkeleton::OnChanged() { |
1151 | +void ControllerSkeleton::OnChanged() { |
1152 | SyncProperties(); |
1153 | } |
1154 | |
1155 | @@ -125,7 +127,7 @@ |
1156 | return hyphen_name; |
1157 | } |
1158 | |
1159 | -gboolean MiracastControllerSkeleton::OnSetProperty(GDBusConnection *connection, const gchar *sender, |
1160 | +gboolean ControllerSkeleton::OnSetProperty(GDBusConnection *connection, const gchar *sender, |
1161 | const gchar *object_path, const gchar *interface_name, |
1162 | const gchar *property_name, GVariant *variant, |
1163 | GError **error, gpointer user_data) { |
1164 | @@ -149,7 +151,7 @@ |
1165 | if (inst && hyphen_name == "enabled" && |
1166 | g_variant_is_of_type(variant, G_VARIANT_TYPE_BOOLEAN)) { |
1167 | |
1168 | - auto thiz = static_cast<WeakKeepAlive<MiracastControllerSkeleton>*>(inst)->GetInstance().lock(); |
1169 | + auto thiz = static_cast<WeakKeepAlive<ControllerSkeleton>*>(inst)->GetInstance().lock(); |
1170 | if (!thiz) { |
1171 | g_set_error(error, AETHERCAST_ERROR, AETHERCAST_ERROR_INVALID_STATE, "Invalid state"); |
1172 | return FALSE; |
1173 | @@ -170,29 +172,29 @@ |
1174 | return TRUE; |
1175 | } |
1176 | |
1177 | -void MiracastControllerSkeleton::OnNameAcquired(GDBusConnection *connection, const gchar *name, gpointer user_data) { |
1178 | - auto inst = static_cast<SharedKeepAlive<MiracastControllerSkeleton>*>(user_data)->ShouldDie(); |
1179 | +void ControllerSkeleton::OnNameAcquired(GDBusConnection *connection, const gchar *name, gpointer user_data) { |
1180 | + auto inst = static_cast<SharedKeepAlive<ControllerSkeleton>*>(user_data)->ShouldDie(); |
1181 | |
1182 | inst->manager_obj_.reset(aethercast_interface_manager_skeleton_new()); |
1183 | g_object_set_data(G_OBJECT(inst->manager_obj_.get()), kManagerSkeletonInstanceKey, |
1184 | - new WeakKeepAlive<MiracastControllerSkeleton>(inst)); |
1185 | + new WeakKeepAlive<ControllerSkeleton>(inst)); |
1186 | |
1187 | // We override the property setter method of the skeleton's vtable |
1188 | // here to apply some more policy decisions when the user sets |
1189 | // specific properties which are state dependent. |
1190 | auto vtable = g_dbus_interface_skeleton_get_vtable(G_DBUS_INTERFACE_SKELETON(inst->manager_obj_.get())); |
1191 | - vtable->set_property = &MiracastControllerSkeleton::OnSetProperty; |
1192 | + vtable->set_property = &ControllerSkeleton::OnSetProperty; |
1193 | |
1194 | g_signal_connect_data(inst->manager_obj_.get(), "handle-scan", |
1195 | - G_CALLBACK(&MiracastControllerSkeleton::OnHandleScan), |
1196 | - new WeakKeepAlive<MiracastControllerSkeleton>(inst), |
1197 | - [](gpointer data, GClosure *) { delete static_cast<WeakKeepAlive<MiracastControllerSkeleton>*>(data); }, |
1198 | + G_CALLBACK(&ControllerSkeleton::OnHandleScan), |
1199 | + new WeakKeepAlive<ControllerSkeleton>(inst), |
1200 | + [](gpointer data, GClosure *) { delete static_cast<WeakKeepAlive<ControllerSkeleton>*>(data); }, |
1201 | GConnectFlags(0)); |
1202 | |
1203 | g_signal_connect_data(inst->manager_obj_.get(), "handle-disconnect-all", |
1204 | - G_CALLBACK(&MiracastControllerSkeleton::OnHandleDisconnectAll), |
1205 | - new WeakKeepAlive<MiracastControllerSkeleton>(inst), |
1206 | - [](gpointer data, GClosure *) { delete static_cast<WeakKeepAlive<MiracastControllerSkeleton>*>(data); }, |
1207 | + G_CALLBACK(&ControllerSkeleton::OnHandleDisconnectAll), |
1208 | + new WeakKeepAlive<ControllerSkeleton>(inst), |
1209 | + [](gpointer data, GClosure *) { delete static_cast<WeakKeepAlive<ControllerSkeleton>*>(data); }, |
1210 | GConnectFlags(0)); |
1211 | |
1212 | inst->SyncProperties(); |
1213 | @@ -203,13 +205,13 @@ |
1214 | inst->object_manager_.reset(g_dbus_object_manager_server_new(kManagerPath)); |
1215 | g_dbus_object_manager_server_set_connection(inst->object_manager_.get(), connection); |
1216 | |
1217 | - INFO("Registered bus name %s", name); |
1218 | + AC_INFO("Registered bus name %s", name); |
1219 | } |
1220 | |
1221 | -gboolean MiracastControllerSkeleton::OnHandleScan(AethercastInterfaceManager *skeleton, |
1222 | +gboolean ControllerSkeleton::OnHandleScan(AethercastInterfaceManager *skeleton, |
1223 | GDBusMethodInvocation *invocation, gpointer user_data) { |
1224 | boost::ignore_unused_variable_warning(skeleton); |
1225 | - auto inst = static_cast<WeakKeepAlive<MiracastControllerSkeleton>*>(user_data)->GetInstance().lock(); |
1226 | + auto inst = static_cast<WeakKeepAlive<ControllerSkeleton>*>(user_data)->GetInstance().lock(); |
1227 | |
1228 | if (not inst) { |
1229 | g_dbus_method_invocation_return_error(invocation, AETHERCAST_ERROR, |
1230 | @@ -217,12 +219,12 @@ |
1231 | return TRUE; |
1232 | } |
1233 | |
1234 | - INFO("Scanning for remote devices"); |
1235 | + AC_INFO("Scanning for remote devices"); |
1236 | |
1237 | const auto error = inst->Scan(); |
1238 | - if (error != mcs::Error::kNone) { |
1239 | + if (error != ac::Error::kNone) { |
1240 | g_dbus_method_invocation_return_error(invocation, AETHERCAST_ERROR, |
1241 | - AethercastErrorFromError(error), "%s", mcs::ErrorToString(error).c_str()); |
1242 | + AethercastErrorFromError(error), "%s", ac::ErrorToString(error).c_str()); |
1243 | return TRUE; |
1244 | } |
1245 | |
1246 | @@ -231,10 +233,10 @@ |
1247 | return TRUE; |
1248 | } |
1249 | |
1250 | -gboolean MiracastControllerSkeleton::OnHandleDisconnectAll(AethercastInterfaceManager *skeleton, |
1251 | +gboolean ControllerSkeleton::OnHandleDisconnectAll(AethercastInterfaceManager *skeleton, |
1252 | GDBusMethodInvocation *invocation, gpointer user_data) { |
1253 | boost::ignore_unused_variable_warning(skeleton); |
1254 | - const auto inst = static_cast<WeakKeepAlive<MiracastControllerSkeleton>*>(user_data)->GetInstance().lock(); |
1255 | + const auto inst = static_cast<WeakKeepAlive<ControllerSkeleton>*>(user_data)->GetInstance().lock(); |
1256 | |
1257 | if (not inst) { |
1258 | g_dbus_method_invocation_return_error(invocation, AETHERCAST_ERROR, |
1259 | @@ -245,10 +247,10 @@ |
1260 | g_object_ref(invocation); |
1261 | auto inv = make_shared_gobject(invocation); |
1262 | |
1263 | - inst->DisconnectAll([inv](mcs::Error error) { |
1264 | + inst->DisconnectAll([inv](ac::Error error) { |
1265 | if (error != Error::kNone) { |
1266 | g_dbus_method_invocation_return_error(inv.get(), AETHERCAST_ERROR, |
1267 | - AethercastErrorFromError(error), "%s", mcs::ErrorToString(error).c_str()); |
1268 | + AethercastErrorFromError(error), "%s", ac::ErrorToString(error).c_str()); |
1269 | return; |
1270 | } |
1271 | |
1272 | @@ -258,23 +260,24 @@ |
1273 | return TRUE; |
1274 | } |
1275 | |
1276 | -std::shared_ptr<MiracastControllerSkeleton> MiracastControllerSkeleton::FinalizeConstruction() { |
1277 | +std::shared_ptr<ControllerSkeleton> ControllerSkeleton::FinalizeConstruction() { |
1278 | auto sp = shared_from_this(); |
1279 | |
1280 | GError *error = nullptr; |
1281 | bus_connection_ = make_shared_gobject(g_bus_get_sync(G_BUS_TYPE_SYSTEM, nullptr, &error)); |
1282 | if (!bus_connection_) { |
1283 | - ERROR("Failed to connect with system bus: %s", error->message); |
1284 | + AC_ERROR("Failed to connect with system bus: %s", error->message); |
1285 | g_error_free(error); |
1286 | return sp; |
1287 | } |
1288 | |
1289 | bus_id_ = g_bus_own_name(G_BUS_TYPE_SYSTEM, kBusName, G_BUS_NAME_OWNER_FLAGS_NONE, |
1290 | - nullptr, &MiracastControllerSkeleton::OnNameAcquired, nullptr, new SharedKeepAlive<MiracastControllerSkeleton>{sp}, nullptr); |
1291 | + nullptr, &ControllerSkeleton::OnNameAcquired, nullptr, new SharedKeepAlive<ControllerSkeleton>{sp}, nullptr); |
1292 | if (bus_id_ == 0) |
1293 | - WARNING("Failed to register bus name"); |
1294 | + AC_WARNING("Failed to register bus name"); |
1295 | |
1296 | SetDelegate(sp); |
1297 | return sp; |
1298 | } |
1299 | -} // namespace mcs |
1300 | +} // namespace dbus |
1301 | +} // namespace ac |
1302 | |
1303 | === renamed file 'src/mcs/miracastcontrollerskeleton.h' => 'src/ac/dbus/controllerskeleton.h' |
1304 | --- src/mcs/miracastcontrollerskeleton.h 2016-04-27 07:37:30 +0000 |
1305 | +++ src/ac/dbus/controllerskeleton.h 2016-06-07 08:21:39 +0000 |
1306 | @@ -15,8 +15,8 @@ |
1307 | * |
1308 | */ |
1309 | |
1310 | -#ifndef MIRACASTSERVICEADAPTOR_H_ |
1311 | -#define MIRACASTSERVICEADAPTOR_H_ |
1312 | +#ifndef AC_CONTROLLERSKELETON_H_ |
1313 | +#define AC_CONTROLLERSKELETON_H_ |
1314 | |
1315 | extern "C" { |
1316 | // Ignore all warnings coming from the external headers as we don't |
1317 | @@ -31,23 +31,24 @@ |
1318 | #include <memory> |
1319 | #include <unordered_map> |
1320 | |
1321 | -#include "scoped_gobject.h" |
1322 | - |
1323 | -#include "forwardingmiracastcontroller.h" |
1324 | -#include "networkdeviceskeleton.h" |
1325 | - |
1326 | -namespace mcs { |
1327 | -class MiracastControllerSkeleton : public std::enable_shared_from_this<MiracastControllerSkeleton>, |
1328 | - public ForwardingMiracastController, |
1329 | - public MiracastController::Delegate { |
1330 | +#include "ac/scoped_gobject.h" |
1331 | +#include "ac/forwardingcontroller.h" |
1332 | + |
1333 | +#include "ac/dbus/networkdeviceskeleton.h" |
1334 | + |
1335 | +namespace ac { |
1336 | +namespace dbus { |
1337 | +class ControllerSkeleton : public std::enable_shared_from_this<ControllerSkeleton>, |
1338 | + public ForwardingController, |
1339 | + public Controller::Delegate { |
1340 | public: |
1341 | static constexpr const char *kBusName{"org.aethercast"}; |
1342 | static constexpr const char *kManagerPath{"/org/aethercast"}; |
1343 | static constexpr const char *kManagerIface{"org.aethercast.Manager"}; |
1344 | |
1345 | - static std::shared_ptr<MiracastControllerSkeleton> create(const std::shared_ptr<MiracastController> &controller); |
1346 | + static std::shared_ptr<ControllerSkeleton> Create(const std::shared_ptr<Controller> &controller); |
1347 | |
1348 | - ~MiracastControllerSkeleton(); |
1349 | + ~ControllerSkeleton(); |
1350 | |
1351 | void OnStateChanged(NetworkDeviceState state) override; |
1352 | void OnDeviceFound(const NetworkDevice::Ptr &device) override; |
1353 | @@ -70,8 +71,8 @@ |
1354 | const gchar *property_name, GVariant *variant, |
1355 | GError **error, gpointer user_data); |
1356 | |
1357 | - MiracastControllerSkeleton(const std::shared_ptr<MiracastController> &controller); |
1358 | - std::shared_ptr<MiracastControllerSkeleton> FinalizeConstruction(); |
1359 | + ControllerSkeleton(const std::shared_ptr<Controller> &controller); |
1360 | + std::shared_ptr<ControllerSkeleton> FinalizeConstruction(); |
1361 | |
1362 | void SyncProperties(); |
1363 | |
1364 | @@ -84,5 +85,7 @@ |
1365 | ScopedGObject<GDBusObjectManagerServer> object_manager_; |
1366 | std::unordered_map<std::string,NetworkDeviceSkeleton::Ptr> devices_; |
1367 | }; |
1368 | -} // namespace mcs |
1369 | +} // namespace dbus |
1370 | +} // namespace ac |
1371 | + |
1372 | #endif |
1373 | |
1374 | === renamed file 'src/mcs/dbuserrors.cpp' => 'src/ac/dbus/errors.cpp' |
1375 | --- src/mcs/dbuserrors.cpp 2016-04-29 07:57:47 +0000 |
1376 | +++ src/ac/dbus/errors.cpp 2016-06-07 08:21:39 +0000 |
1377 | @@ -15,9 +15,10 @@ |
1378 | * |
1379 | */ |
1380 | |
1381 | -#include "mcs/dbuserrors.h" |
1382 | +#include "ac/dbus/errors.h" |
1383 | |
1384 | -namespace mcs { |
1385 | +namespace ac { |
1386 | +namespace dbus { |
1387 | |
1388 | static const GDBusErrorEntry kAethercastErrorEntries[] = { |
1389 | { AETHERCAST_ERROR_FAILED, "org.aethercast.Error.Failed" }, |
1390 | @@ -61,4 +62,5 @@ |
1391 | return AETHERCAST_ERROR_FAILED; |
1392 | } |
1393 | |
1394 | -} // namespace mcs |
1395 | +} // namespace dbus |
1396 | +} // namespace ac |
1397 | |
1398 | === renamed file 'src/mcs/dbuserrors.h' => 'src/ac/dbus/errors.h' |
1399 | --- src/mcs/dbuserrors.h 2016-04-25 14:51:48 +0000 |
1400 | +++ src/ac/dbus/errors.h 2016-06-07 08:21:39 +0000 |
1401 | @@ -15,13 +15,14 @@ |
1402 | * |
1403 | */ |
1404 | |
1405 | -#ifndef MCS_DBUSERRORS_H_ |
1406 | -#define MCS_DBUSERRORS_H_ |
1407 | - |
1408 | -#include "mcs/types.h" |
1409 | -#include "mcs/glib_wrapper.h" |
1410 | - |
1411 | -namespace mcs { |
1412 | +#ifndef AC_DBUSERRORS_H_ |
1413 | +#define AC_DBUSERRORS_H_ |
1414 | + |
1415 | +#include "ac/types.h" |
1416 | +#include "ac/glib_wrapper.h" |
1417 | + |
1418 | +namespace ac { |
1419 | +namespace dbus { |
1420 | |
1421 | #define AETHERCAST_ERROR (aethercast_error_quark()) |
1422 | GQuark aethercast_error_quark(void); |
1423 | @@ -39,6 +40,7 @@ |
1424 | |
1425 | AethercastError AethercastErrorFromError(const Error &error); |
1426 | |
1427 | -} // namespace mcs |
1428 | +} // namespace dbus |
1429 | +} // namespace ac |
1430 | |
1431 | #endif |
1432 | |
1433 | === renamed file 'src/mcs/dbushelpers.cpp' => 'src/ac/dbus/helpers.cpp' |
1434 | --- src/mcs/dbushelpers.cpp 2016-01-21 13:25:31 +0000 |
1435 | +++ src/ac/dbus/helpers.cpp 2016-06-07 08:21:39 +0000 |
1436 | @@ -15,11 +15,12 @@ |
1437 | * |
1438 | */ |
1439 | |
1440 | -#include "dbushelpers.h" |
1441 | - |
1442 | -namespace mcs { |
1443 | - |
1444 | -gchar** DBusHelpers::GenerateDeviceCapabilities(const std::vector<NetworkDeviceRole> &roles) { |
1445 | +#include "ac/dbus/helpers.h" |
1446 | + |
1447 | +namespace ac { |
1448 | +namespace dbus { |
1449 | + |
1450 | +gchar** Helpers::GenerateDeviceCapabilities(const std::vector<NetworkDeviceRole> &roles) { |
1451 | gchar **capabilities = g_new0(gchar*, roles.size() + 1); |
1452 | int n = 0; |
1453 | for (auto role : roles) |
1454 | @@ -28,7 +29,7 @@ |
1455 | return capabilities; |
1456 | } |
1457 | |
1458 | -gchar** DBusHelpers::GenerateCapabilities(const std::vector<NetworkManager::Capability> &capabilities) { |
1459 | +gchar** Helpers::GenerateCapabilities(const std::vector<NetworkManager::Capability> &capabilities) { |
1460 | gchar** out_capabilities = g_new0(gchar*, capabilities.size() + 1); |
1461 | int n = 0; |
1462 | for (auto capability : capabilities) { |
1463 | @@ -39,7 +40,7 @@ |
1464 | return out_capabilities; |
1465 | } |
1466 | |
1467 | -void DBusHelpers::ParseDictionary(GVariant *properties, std::function<void(std::string, GVariant*)> callback, const std::string &key_filter) { |
1468 | +void Helpers::ParseDictionary(GVariant *properties, std::function<void(std::string, GVariant*)> callback, const std::string &key_filter) { |
1469 | if (!callback || !properties) |
1470 | return; |
1471 | |
1472 | @@ -61,7 +62,7 @@ |
1473 | } |
1474 | } |
1475 | |
1476 | -void DBusHelpers::ParseArray(GVariant *array, std::function<void(GVariant*)> callback) { |
1477 | +void Helpers::ParseArray(GVariant *array, std::function<void(GVariant*)> callback) { |
1478 | if (!callback || !array) |
1479 | return; |
1480 | |
1481 | @@ -71,7 +72,8 @@ |
1482 | } |
1483 | } |
1484 | |
1485 | -} // namespace mcs |
1486 | +} // namespace dbus |
1487 | +} // namespace ac |
1488 | |
1489 | |
1490 | |
1491 | |
1492 | === renamed file 'src/mcs/dbushelpers.h' => 'src/ac/dbus/helpers.h' |
1493 | --- src/mcs/dbushelpers.h 2016-03-23 09:03:50 +0000 |
1494 | +++ src/ac/dbus/helpers.h 2016-06-07 08:21:39 +0000 |
1495 | @@ -20,20 +20,20 @@ |
1496 | |
1497 | #include <functional> |
1498 | |
1499 | -#include "mcs/glib_wrapper.h" |
1500 | - |
1501 | -#include "mcs/networkmanager.h" |
1502 | -#include "mcs/scoped_gobject.h" |
1503 | - |
1504 | -namespace mcs { |
1505 | - |
1506 | -struct DBusHelpers { |
1507 | +#include "ac/glib_wrapper.h" |
1508 | + |
1509 | +#include "ac/networkmanager.h" |
1510 | +#include "ac/scoped_gobject.h" |
1511 | + |
1512 | +namespace ac { |
1513 | +namespace dbus { |
1514 | +struct Helpers { |
1515 | static gchar** GenerateCapabilities(const std::vector<NetworkManager::Capability> &capabilities); |
1516 | static gchar** GenerateDeviceCapabilities(const std::vector<NetworkDeviceRole> &roles); |
1517 | static void ParseDictionary(GVariant *properties, std::function<void(std::string, GVariant*)> callback, const std::string &key_filter = ""); |
1518 | static void ParseArray(GVariant *array, std::function<void(GVariant*)> callback); |
1519 | }; |
1520 | - |
1521 | -} // namespace mcs |
1522 | +} // namespace dbus |
1523 | +} // namespace ac |
1524 | |
1525 | #endif |
1526 | |
1527 | === renamed file 'src/mcs/networkdeviceskeleton.cpp' => 'src/ac/dbus/networkdeviceskeleton.cpp' |
1528 | --- src/mcs/networkdeviceskeleton.cpp 2016-04-25 14:51:48 +0000 |
1529 | +++ src/ac/dbus/networkdeviceskeleton.cpp 2016-06-07 08:21:39 +0000 |
1530 | @@ -18,20 +18,21 @@ |
1531 | #include <algorithm> |
1532 | #include <boost/concept_check.hpp> |
1533 | |
1534 | -#include "mcs/networkdeviceskeleton.h" |
1535 | -#include "mcs/utils.h" |
1536 | -#include "mcs/keep_alive.h" |
1537 | -#include "mcs/logger.h" |
1538 | -#include "mcs/dbushelpers.h" |
1539 | -#include "mcs/dbuserrors.h" |
1540 | - |
1541 | -namespace mcs { |
1542 | - |
1543 | -NetworkDeviceSkeleton::Ptr NetworkDeviceSkeleton::Create(const SharedGObject<GDBusConnection> &connection, const std::string &path, const NetworkDevice::Ptr &device, const MiracastController::Ptr &controller) { |
1544 | +#include "ac/utils.h" |
1545 | +#include "ac/keep_alive.h" |
1546 | +#include "ac/logger.h" |
1547 | + |
1548 | +#include "ac/dbus/networkdeviceskeleton.h" |
1549 | +#include "ac/dbus/helpers.h" |
1550 | +#include "ac/dbus/errors.h" |
1551 | + |
1552 | +namespace ac { |
1553 | +namespace dbus { |
1554 | +NetworkDeviceSkeleton::Ptr NetworkDeviceSkeleton::Create(const SharedGObject<GDBusConnection> &connection, const std::string &path, const NetworkDevice::Ptr &device, const Controller::Ptr &controller) { |
1555 | return std::shared_ptr<NetworkDeviceSkeleton>(new NetworkDeviceSkeleton(connection, path, device, controller))->FinalizeConstruction(); |
1556 | } |
1557 | |
1558 | -NetworkDeviceSkeleton::NetworkDeviceSkeleton(const SharedGObject<GDBusConnection> &connection, const std::string &path, const NetworkDevice::Ptr &device, const MiracastController::Ptr &controller) : |
1559 | +NetworkDeviceSkeleton::NetworkDeviceSkeleton(const SharedGObject<GDBusConnection> &connection, const std::string &path, const NetworkDevice::Ptr &device, const Controller::Ptr &controller) : |
1560 | ForwardingNetworkDevice(device), |
1561 | connection_(connection), |
1562 | object_(make_shared_gobject(aethercast_interface_object_skeleton_new(path.c_str()))), |
1563 | @@ -53,7 +54,7 @@ |
1564 | SyncProperties(); |
1565 | |
1566 | if (!object_) |
1567 | - ERROR("Failed to create object for device %s", Address()); |
1568 | + AC_ERROR("Failed to create object for device %s", Address()); |
1569 | else |
1570 | aethercast_interface_object_skeleton_set_device(object_.get(), device_iface_.get()); |
1571 | |
1572 | @@ -65,7 +66,7 @@ |
1573 | aethercast_interface_device_set_name(device_iface_.get(), Name().c_str()); |
1574 | aethercast_interface_device_set_state(device_iface_.get(), NetworkDevice::StateToStr(State()).c_str()); |
1575 | |
1576 | - auto capabilities = DBusHelpers::GenerateDeviceCapabilities(SupportedRoles()); |
1577 | + auto capabilities = Helpers::GenerateDeviceCapabilities(SupportedRoles()); |
1578 | aethercast_interface_device_set_capabilities(device_iface_.get(), capabilities); |
1579 | g_strfreev(capabilities); |
1580 | } |
1581 | @@ -78,8 +79,8 @@ |
1582 | return path_; |
1583 | } |
1584 | |
1585 | -// TODO(tvoss,morphis): Refactor mcs::NetworkDevice to have Connect/Disconnect defined on its interfaces. |
1586 | -// It feels quite dirty to require both an instance of mcs::NetworkDevice and mcs::MiracastController to |
1587 | +// TODO(tvoss,morphis): Refactor ac::NetworkDevice to have Connect/Disconnect defined on its interfaces. |
1588 | +// It feels quite dirty to require both an instance of ac::NetworkDevice and ac::Controller to |
1589 | // implement the connect/disconnect calls coming in via the bus. The complication then is the async handling of |
1590 | // the invocation, as we will likely have to reach out to WPASupplicant for example (which is dispatched via the same |
1591 | // event loop as we are). In addition, we should not start littering our public interfaces by handing down callbacks. |
1592 | @@ -100,10 +101,10 @@ |
1593 | g_object_ref(invocation); |
1594 | auto inv = make_shared_gobject(invocation); |
1595 | |
1596 | - inst->controller_->Connect(inst->Fwd(), [inv](mcs::Error error) { |
1597 | + inst->controller_->Connect(inst->Fwd(), [inv](ac::Error error) { |
1598 | if (error != Error::kNone) { |
1599 | g_dbus_method_invocation_return_error(inv.get(), AETHERCAST_ERROR, |
1600 | - AethercastErrorFromError(error), "%s", mcs::ErrorToString(error).c_str()); |
1601 | + AethercastErrorFromError(error), "%s", ac::ErrorToString(error).c_str()); |
1602 | return; |
1603 | } |
1604 | |
1605 | @@ -129,10 +130,10 @@ |
1606 | g_object_ref(invocation); |
1607 | auto inv = make_shared_gobject(invocation); |
1608 | |
1609 | - inst->controller_->Disconnect(inst->Fwd(), [inv](mcs::Error error) { |
1610 | + inst->controller_->Disconnect(inst->Fwd(), [inv](ac::Error error) { |
1611 | if (error != Error::kNone) { |
1612 | g_dbus_method_invocation_return_error(inv.get(), AETHERCAST_ERROR, |
1613 | - AethercastErrorFromError(error), "%s", mcs::ErrorToString(error).c_str()); |
1614 | + AethercastErrorFromError(error), "%s", ac::ErrorToString(error).c_str()); |
1615 | return; |
1616 | } |
1617 | |
1618 | @@ -141,5 +142,5 @@ |
1619 | |
1620 | return TRUE; |
1621 | } |
1622 | - |
1623 | -} // namespace mcs |
1624 | +} // namespace dbus |
1625 | +} // namespace ac |
1626 | |
1627 | === renamed file 'src/mcs/networkdeviceskeleton.h' => 'src/ac/dbus/networkdeviceskeleton.h' |
1628 | --- src/mcs/networkdeviceskeleton.h 2016-03-23 15:06:56 +0000 |
1629 | +++ src/ac/dbus/networkdeviceskeleton.h 2016-06-07 08:21:39 +0000 |
1630 | @@ -28,19 +28,19 @@ |
1631 | #pragma GCC diagnostic pop |
1632 | } |
1633 | |
1634 | -#include "forwardingnetworkdevice.h" |
1635 | -#include "miracastcontroller.h" |
1636 | -#include "scoped_gobject.h" |
1637 | -#include "shared_gobject.h" |
1638 | - |
1639 | -namespace mcs { |
1640 | - |
1641 | +#include "ac/forwardingnetworkdevice.h" |
1642 | +#include "ac/controller.h" |
1643 | +#include "ac/scoped_gobject.h" |
1644 | +#include "ac/shared_gobject.h" |
1645 | + |
1646 | +namespace ac { |
1647 | +namespace dbus { |
1648 | class NetworkDeviceSkeleton : public std::enable_shared_from_this<NetworkDeviceSkeleton>, |
1649 | public ForwardingNetworkDevice { |
1650 | public: |
1651 | typedef std::shared_ptr<NetworkDeviceSkeleton> Ptr; |
1652 | |
1653 | - static NetworkDeviceSkeleton::Ptr Create(const SharedGObject<GDBusConnection> &connection, const std::string &path, const NetworkDevice::Ptr &device, const MiracastController::Ptr &controller); |
1654 | + static NetworkDeviceSkeleton::Ptr Create(const SharedGObject<GDBusConnection> &connection, const std::string &path, const NetworkDevice::Ptr &device, const Controller::Ptr &controller); |
1655 | |
1656 | GDBusObjectSkeleton* DBusObject() const; |
1657 | std::string Path() const; |
1658 | @@ -54,7 +54,7 @@ |
1659 | gpointer user_data); |
1660 | |
1661 | private: |
1662 | - NetworkDeviceSkeleton(const SharedGObject<GDBusConnection> &connection, const std::string &path, const NetworkDevice::Ptr &device, const MiracastController::Ptr &service); |
1663 | + NetworkDeviceSkeleton(const SharedGObject<GDBusConnection> &connection, const std::string &path, const NetworkDevice::Ptr &device, const Controller::Ptr &service); |
1664 | |
1665 | std::shared_ptr<NetworkDeviceSkeleton> FinalizeConstruction(); |
1666 | |
1667 | @@ -62,10 +62,10 @@ |
1668 | SharedGObject<GDBusConnection> connection_; |
1669 | SharedGObject<AethercastInterfaceObjectSkeleton> object_; |
1670 | std::string path_; |
1671 | - MiracastController::Ptr controller_; |
1672 | + Controller::Ptr controller_; |
1673 | ScopedGObject<AethercastInterfaceDevice> device_iface_; |
1674 | }; |
1675 | - |
1676 | -} // namespace mcs |
1677 | +} // namespace dbus |
1678 | +} // namespace ac |
1679 | |
1680 | #endif |
1681 | |
1682 | === renamed file 'src/mcs/forwardingmiracastcontroller.cpp' => 'src/ac/forwardingcontroller.cpp' |
1683 | --- src/mcs/forwardingmiracastcontroller.cpp 2016-04-27 07:37:30 +0000 |
1684 | +++ src/ac/forwardingcontroller.cpp 2016-06-07 08:21:39 +0000 |
1685 | @@ -15,58 +15,58 @@ |
1686 | * |
1687 | */ |
1688 | |
1689 | -#include "forwardingmiracastcontroller.h" |
1690 | - |
1691 | #include <stdexcept> |
1692 | |
1693 | -namespace mcs { |
1694 | -ForwardingMiracastController::ForwardingMiracastController(const MiracastController::Ptr& fwd) : fwd_{fwd} { |
1695 | +#include "ac/forwardingcontroller.h" |
1696 | + |
1697 | +namespace ac { |
1698 | +ForwardingController::ForwardingController(const Controller::Ptr& fwd) : fwd_{fwd} { |
1699 | if (not fwd_) { |
1700 | - throw std::logic_error{"Cannot operate without a valid MiracastController instance."}; |
1701 | + throw std::logic_error{"Cannot operate without a valid controller instance."}; |
1702 | } |
1703 | } |
1704 | |
1705 | -void ForwardingMiracastController::SetDelegate(const std::weak_ptr<MiracastController::Delegate> &delegate) { |
1706 | +void ForwardingController::SetDelegate(const std::weak_ptr<Controller::Delegate> &delegate) { |
1707 | fwd_->SetDelegate(delegate); |
1708 | } |
1709 | |
1710 | -void ForwardingMiracastController::ResetDelegate() { |
1711 | +void ForwardingController::ResetDelegate() { |
1712 | fwd_->ResetDelegate(); |
1713 | } |
1714 | |
1715 | -void ForwardingMiracastController::Connect(const NetworkDevice::Ptr &device, ResultCallback callback) { |
1716 | +void ForwardingController::Connect(const NetworkDevice::Ptr &device, ResultCallback callback) { |
1717 | fwd_->Connect(device, callback); |
1718 | } |
1719 | |
1720 | -void ForwardingMiracastController::Disconnect(const NetworkDevice::Ptr &device, ResultCallback callback) { |
1721 | +void ForwardingController::Disconnect(const NetworkDevice::Ptr &device, ResultCallback callback) { |
1722 | fwd_->Disconnect(device, callback); |
1723 | } |
1724 | |
1725 | -void ForwardingMiracastController::DisconnectAll(ResultCallback callback) { |
1726 | +void ForwardingController::DisconnectAll(ResultCallback callback) { |
1727 | fwd_->DisconnectAll(callback); |
1728 | } |
1729 | |
1730 | -mcs::Error ForwardingMiracastController::Scan(const std::chrono::seconds &timeout) { |
1731 | +ac::Error ForwardingController::Scan(const std::chrono::seconds &timeout) { |
1732 | return fwd_->Scan(timeout); |
1733 | } |
1734 | |
1735 | -NetworkDeviceState ForwardingMiracastController::State() const { |
1736 | +NetworkDeviceState ForwardingController::State() const { |
1737 | return fwd_->State(); |
1738 | } |
1739 | |
1740 | -std::vector<NetworkManager::Capability> ForwardingMiracastController::Capabilities() const { |
1741 | +std::vector<NetworkManager::Capability> ForwardingController::Capabilities() const { |
1742 | return fwd_->Capabilities(); |
1743 | } |
1744 | |
1745 | -bool ForwardingMiracastController::Scanning() const { |
1746 | +bool ForwardingController::Scanning() const { |
1747 | return fwd_->Scanning(); |
1748 | } |
1749 | |
1750 | -bool ForwardingMiracastController::Enabled() const { |
1751 | +bool ForwardingController::Enabled() const { |
1752 | return fwd_->Enabled(); |
1753 | } |
1754 | |
1755 | -Error ForwardingMiracastController::SetEnabled(bool enabled) { |
1756 | +Error ForwardingController::SetEnabled(bool enabled) { |
1757 | return fwd_->SetEnabled(enabled); |
1758 | } |
1759 | } |
1760 | |
1761 | === renamed file 'src/mcs/forwardingmiracastcontroller.h' => 'src/ac/forwardingcontroller.h' |
1762 | --- src/mcs/forwardingmiracastcontroller.h 2016-04-27 07:37:30 +0000 |
1763 | +++ src/ac/forwardingcontroller.h 2016-06-07 08:21:39 +0000 |
1764 | @@ -15,16 +15,16 @@ |
1765 | * |
1766 | */ |
1767 | |
1768 | -#ifndef FORWARDING_MIRACAST_CONTROLLER_H_ |
1769 | -#define FORWARDING_MIRACAST_CONTROLLER_H_ |
1770 | - |
1771 | -#include "miracastcontroller.h" |
1772 | - |
1773 | -namespace mcs { |
1774 | -class ForwardingMiracastController : public MiracastController |
1775 | +#ifndef AC_FORWARDING_MIRACAST_CONTROLLER_H_ |
1776 | +#define AC_FORWARDING_MIRACAST_CONTROLLER_H_ |
1777 | + |
1778 | +#include "ac/controller.h" |
1779 | + |
1780 | +namespace ac { |
1781 | +class ForwardingController : public Controller |
1782 | { |
1783 | public: |
1784 | - explicit ForwardingMiracastController(const MiracastController::Ptr& fwd); |
1785 | + explicit ForwardingController(const Controller::Ptr& fwd); |
1786 | |
1787 | virtual void SetDelegate(const std::weak_ptr<Delegate> &delegate) override; |
1788 | virtual void ResetDelegate() override; |
1789 | @@ -34,7 +34,7 @@ |
1790 | |
1791 | virtual void DisconnectAll(ResultCallback callback) override; |
1792 | |
1793 | - virtual mcs::Error Scan(const std::chrono::seconds &timeout = std::chrono::seconds{30}) override; |
1794 | + virtual ac::Error Scan(const std::chrono::seconds &timeout = std::chrono::seconds{30}) override; |
1795 | |
1796 | virtual NetworkDeviceState State() const override; |
1797 | virtual std::vector<NetworkManager::Capability> Capabilities() const override; |
1798 | @@ -44,7 +44,7 @@ |
1799 | virtual Error SetEnabled(bool enabled) override; |
1800 | |
1801 | private: |
1802 | - MiracastController::Ptr fwd_; |
1803 | + Controller::Ptr fwd_; |
1804 | }; |
1805 | -} // namespace mcs |
1806 | +} // namespace ac |
1807 | #endif |
1808 | |
1809 | === renamed file 'src/mcs/forwardingnetworkdevice.cpp' => 'src/ac/forwardingnetworkdevice.cpp' |
1810 | --- src/mcs/forwardingnetworkdevice.cpp 2015-12-16 08:04:35 +0000 |
1811 | +++ src/ac/forwardingnetworkdevice.cpp 2016-06-07 08:21:39 +0000 |
1812 | @@ -17,7 +17,7 @@ |
1813 | |
1814 | #include "forwardingnetworkdevice.h" |
1815 | |
1816 | -namespace mcs { |
1817 | +namespace ac { |
1818 | |
1819 | ForwardingNetworkDevice::ForwardingNetworkDevice(const NetworkDevice::Ptr& fwd) : fwd_(fwd) { |
1820 | if (not fwd_) { |
1821 | @@ -48,4 +48,4 @@ |
1822 | const NetworkDevice::Ptr& ForwardingNetworkDevice::Fwd() const { |
1823 | return fwd_; |
1824 | } |
1825 | -} // namespace mcs |
1826 | +} // namespace ac |
1827 | |
1828 | === renamed file 'src/mcs/forwardingnetworkdevice.h' => 'src/ac/forwardingnetworkdevice.h' |
1829 | --- src/mcs/forwardingnetworkdevice.h 2015-12-16 08:04:35 +0000 |
1830 | +++ src/ac/forwardingnetworkdevice.h 2016-06-07 08:21:39 +0000 |
1831 | @@ -20,7 +20,7 @@ |
1832 | |
1833 | #include "networkdevice.h" |
1834 | |
1835 | -namespace mcs { |
1836 | +namespace ac { |
1837 | |
1838 | class ForwardingNetworkDevice : public NetworkDevice { |
1839 | public: |
1840 | @@ -38,5 +38,5 @@ |
1841 | private: |
1842 | NetworkDevice::Ptr fwd_; |
1843 | }; |
1844 | -} // namespace mcs |
1845 | +} // namespace ac |
1846 | #endif |
1847 | |
1848 | === renamed file 'src/mcs/glib_wrapper.h' => 'src/ac/glib_wrapper.h' |
1849 | --- src/mcs/glib_wrapper.h 2016-03-23 15:06:56 +0000 |
1850 | +++ src/ac/glib_wrapper.h 2016-06-07 08:21:39 +0000 |
1851 | @@ -15,8 +15,8 @@ |
1852 | * |
1853 | */ |
1854 | |
1855 | -#ifndef MCS_GLIBWRAPPER_H_ |
1856 | -#define MCS_GLIBWRAPPER_H_ |
1857 | +#ifndef AC_GLIBWRAPPER_H_ |
1858 | +#define AC_GLIBWRAPPER_H_ |
1859 | |
1860 | // Ignore all warnings coming from the external GLib headers as |
1861 | // we don't control them and also don't want to get any warnings |
1862 | |
1863 | === renamed file 'src/mcs/gobject_deleter.h' => 'src/ac/gobject_deleter.h' |
1864 | --- src/mcs/gobject_deleter.h 2016-01-07 17:12:38 +0000 |
1865 | +++ src/ac/gobject_deleter.h 2016-06-07 08:21:39 +0000 |
1866 | @@ -19,9 +19,9 @@ |
1867 | |
1868 | #include <glib-object.h> |
1869 | |
1870 | -#include <mcs/logger.h> |
1871 | +#include <ac/logger.h> |
1872 | |
1873 | -namespace mcs { |
1874 | +namespace ac { |
1875 | // A GObjectDeleter considers T to be a GObject and |
1876 | // provides an operator() that decrements the reference |
1877 | // count of an instance of T. |
1878 | |
1879 | === renamed file 'src/mcs/ip_v4_address.h' => 'src/ac/ip_v4_address.h' |
1880 | --- src/mcs/ip_v4_address.h 2015-12-02 22:05:26 +0000 |
1881 | +++ src/ac/ip_v4_address.h 2016-06-07 08:21:39 +0000 |
1882 | @@ -20,7 +20,7 @@ |
1883 | |
1884 | #include <boost/asio/ip/address_v4.hpp> |
1885 | |
1886 | -namespace mcs { |
1887 | +namespace ac { |
1888 | using IpV4Address = boost::asio::ip::address_v4; |
1889 | } |
1890 | |
1891 | |
1892 | === renamed file 'src/mcs/keep_alive.h' => 'src/ac/keep_alive.h' |
1893 | --- src/mcs/keep_alive.h 2015-12-03 09:03:48 +0000 |
1894 | +++ src/ac/keep_alive.h 2016-06-07 08:21:39 +0000 |
1895 | @@ -19,7 +19,7 @@ |
1896 | |
1897 | #include <memory> |
1898 | |
1899 | -namespace mcs { |
1900 | +namespace ac { |
1901 | namespace detail { |
1902 | template<typename T, template<typename> class Ptr> |
1903 | class KeepAlive { |
1904 | |
1905 | === renamed file 'src/mcs/logger.cpp' => 'src/ac/logger.cpp' |
1906 | --- src/mcs/logger.cpp 2016-03-23 09:03:50 +0000 |
1907 | +++ src/ac/logger.cpp 2016-06-07 08:21:39 +0000 |
1908 | @@ -30,17 +30,17 @@ |
1909 | |
1910 | namespace { |
1911 | namespace attrs { |
1912 | -BOOST_LOG_ATTRIBUTE_KEYWORD(Severity, "mcs::Severity", mcs::Logger::Severity) |
1913 | -BOOST_LOG_ATTRIBUTE_KEYWORD(Location, "Location", mcs::Logger::Location) |
1914 | +BOOST_LOG_ATTRIBUTE_KEYWORD(Severity, "ac::Severity", ac::Logger::Severity) |
1915 | +BOOST_LOG_ATTRIBUTE_KEYWORD(Location, "Location", ac::Logger::Location) |
1916 | BOOST_LOG_ATTRIBUTE_KEYWORD(Timestamp, "Timestamp", boost::posix_time::ptime) |
1917 | } |
1918 | |
1919 | -struct BoostLogLogger : public mcs::Logger { |
1920 | +struct BoostLogLogger : public ac::Logger { |
1921 | BoostLogLogger() : |
1922 | initialized_(false) { |
1923 | } |
1924 | |
1925 | - void Init(const mcs::Logger::Severity &severity = mcs::Logger::Severity::kWarning) override { |
1926 | + void Init(const ac::Logger::Severity &severity = ac::Logger::Severity::kWarning) override { |
1927 | if (initialized_) |
1928 | return; |
1929 | |
1930 | @@ -92,16 +92,16 @@ |
1931 | bool initialized_; |
1932 | }; |
1933 | |
1934 | -std::shared_ptr<mcs::Logger>& MutableInstance() { |
1935 | - static std::shared_ptr<mcs::Logger> instance{new BoostLogLogger()}; |
1936 | +std::shared_ptr<ac::Logger>& MutableInstance() { |
1937 | + static std::shared_ptr<ac::Logger> instance{new BoostLogLogger()}; |
1938 | return instance; |
1939 | } |
1940 | |
1941 | -void SetInstance(const std::shared_ptr<mcs::Logger>& logger) { |
1942 | +void SetInstance(const std::shared_ptr<ac::Logger>& logger) { |
1943 | MutableInstance() = logger; |
1944 | } |
1945 | } |
1946 | -namespace mcs { |
1947 | +namespace ac { |
1948 | void Logger::Trace(const std::string& message, const boost::optional<Location>& location) { |
1949 | Log(Severity::kTrace, message, location); |
1950 | } |
1951 | @@ -126,14 +126,14 @@ |
1952 | Log(Severity::kFatal, message, location); |
1953 | } |
1954 | |
1955 | -std::ostream& operator<<(std::ostream& strm, mcs::Logger::Severity severity) { |
1956 | +std::ostream& operator<<(std::ostream& strm, ac::Logger::Severity severity) { |
1957 | switch (severity) { |
1958 | - case mcs::Logger::Severity::kTrace: return strm << "TT"; |
1959 | - case mcs::Logger::Severity::kDebug: return strm << "DD"; |
1960 | - case mcs::Logger::Severity::kInfo: return strm << "II"; |
1961 | - case mcs::Logger::Severity::kWarning: return strm << "WW"; |
1962 | - case mcs::Logger::Severity::kError: return strm << "EE"; |
1963 | - case mcs::Logger::Severity::kFatal: return strm << "FF"; |
1964 | + case ac::Logger::Severity::kTrace: return strm << "TT"; |
1965 | + case ac::Logger::Severity::kDebug: return strm << "DD"; |
1966 | + case ac::Logger::Severity::kInfo: return strm << "II"; |
1967 | + case ac::Logger::Severity::kWarning: return strm << "WW"; |
1968 | + case ac::Logger::Severity::kError: return strm << "EE"; |
1969 | + case ac::Logger::Severity::kFatal: return strm << "FF"; |
1970 | default: return strm << static_cast<uint>(severity); |
1971 | } |
1972 | } |
1973 | |
1974 | === renamed file 'src/mcs/logger.h' => 'src/ac/logger.h' |
1975 | --- src/mcs/logger.h 2016-02-29 12:05:03 +0000 |
1976 | +++ src/ac/logger.h 2016-06-07 08:21:39 +0000 |
1977 | @@ -25,10 +25,10 @@ |
1978 | |
1979 | #include <string> |
1980 | |
1981 | -namespace mcs { |
1982 | +namespace ac { |
1983 | // A Logger enables persisting of messages describing & explaining the |
1984 | // state of the system. |
1985 | -class Logger : public mcs::NonCopyable { |
1986 | +class Logger : public ac::NonCopyable { |
1987 | public: |
1988 | // Severity enumerates all known severity levels |
1989 | // applicable to log messages. |
1990 | @@ -48,7 +48,7 @@ |
1991 | std::uint32_t line; // The line in file that resulted in the log message. |
1992 | }; |
1993 | |
1994 | - virtual void Init(const mcs::Logger::Severity &severity = mcs::Logger::Severity::kWarning) = 0; |
1995 | + virtual void Init(const ac::Logger::Severity &severity = ac::Logger::Severity::kWarning) = 0; |
1996 | |
1997 | virtual void Log(Severity severity, const std::string &message, const boost::optional<Location>& location) = 0; |
1998 | |
1999 | @@ -100,25 +100,18 @@ |
2000 | // operator<< inserts location into out. |
2001 | std::ostream& operator<<(std::ostream& out, const Logger::Location &location); |
2002 | |
2003 | -// Log returns the mcs-wide configured logger instance. |
2004 | +// Log returns the ac-wide configured logger instance. |
2005 | // Save to call before/after main. |
2006 | Logger& Log(); |
2007 | -// SetLog installs the given logger as mcs-wide default logger. |
2008 | +// SetLog installs the given logger as ac-wide default logger. |
2009 | void SetLogger(const std::shared_ptr<Logger>& logger); |
2010 | - |
2011 | -#define TRACE(...) Log().Tracef(Logger::Location{__FILE__, __FUNCTION__, __LINE__}, __VA_ARGS__) |
2012 | -#define DEBUG(...) Log().Debugf(Logger::Location{__FILE__, __FUNCTION__, __LINE__}, __VA_ARGS__) |
2013 | -#define INFO(...) Log().Infof(Logger::Location{__FILE__, __FUNCTION__, __LINE__}, __VA_ARGS__) |
2014 | -#define WARNING(...) Log().Warningf(Logger::Location{__FILE__, __FUNCTION__, __LINE__}, __VA_ARGS__) |
2015 | -#define ERROR(...) Log().Errorf(Logger::Location{__FILE__, __FUNCTION__, __LINE__}, __VA_ARGS__) |
2016 | -#define FATAL(...) Log().Fatalf(Logger::Location{__FILE__, __FUNCTION__, __LINE__}, __VA_ARGS__) |
2017 | } |
2018 | |
2019 | -#define MCS_TRACE(...) mcs::Log().Tracef(mcs::Logger::Location{__FILE__, __FUNCTION__, __LINE__}, __VA_ARGS__) |
2020 | -#define MCS_DEBUG(...) mcs::Log().Debugf(mcs::Logger::Location{__FILE__, __FUNCTION__, __LINE__}, __VA_ARGS__) |
2021 | -#define MCS_INFO(...) mcs::Log().Infof(mcs::Logger::Location{__FILE__, __FUNCTION__, __LINE__}, __VA_ARGS__) |
2022 | -#define MCS_WARNING(...) mcs::Log().Warningf(mcs::Logger::Location{__FILE__, __FUNCTION__, __LINE__}, __VA_ARGS__) |
2023 | -#define MCS_ERROR(...) mcs::Log().Errorf(mcs::Logger::Location{__FILE__, __FUNCTION__, __LINE__}, __VA_ARGS__) |
2024 | -#define MCS_FATAL(...) mcs::Log().Fatalf(mcs::Logger::Location{__FILE__, __FUNCTION__, __LINE__}, __VA_ARGS__) |
2025 | +#define AC_TRACE(...) ac::Log().Tracef(ac::Logger::Location{__FILE__, __FUNCTION__, __LINE__}, __VA_ARGS__) |
2026 | +#define AC_DEBUG(...) ac::Log().Debugf(ac::Logger::Location{__FILE__, __FUNCTION__, __LINE__}, __VA_ARGS__) |
2027 | +#define AC_INFO(...) ac::Log().Infof(ac::Logger::Location{__FILE__, __FUNCTION__, __LINE__}, __VA_ARGS__) |
2028 | +#define AC_WARNING(...) ac::Log().Warningf(ac::Logger::Location{__FILE__, __FUNCTION__, __LINE__}, __VA_ARGS__) |
2029 | +#define AC_ERROR(...) ac::Log().Errorf(ac::Logger::Location{__FILE__, __FUNCTION__, __LINE__}, __VA_ARGS__) |
2030 | +#define AC_FATAL(...) ac::Log().Fatalf(ac::Logger::Location{__FILE__, __FUNCTION__, __LINE__}, __VA_ARGS__) |
2031 | |
2032 | #endif |
2033 | |
2034 | === renamed file 'src/mcs/mac_address.h' => 'src/ac/mac_address.h' |
2035 | --- src/mcs/mac_address.h 2015-12-03 07:08:33 +0000 |
2036 | +++ src/ac/mac_address.h 2016-06-07 08:21:39 +0000 |
2037 | @@ -20,7 +20,7 @@ |
2038 | |
2039 | #include <string> |
2040 | |
2041 | -namespace mcs { |
2042 | +namespace ac { |
2043 | using MacAddress = std::string; |
2044 | } |
2045 | |
2046 | |
2047 | === renamed file 'src/mcs/main.cpp' => 'src/ac/main.cpp' |
2048 | --- src/mcs/main.cpp 2015-12-03 16:41:00 +0000 |
2049 | +++ src/ac/main.cpp 2016-06-07 08:21:39 +0000 |
2050 | @@ -15,8 +15,8 @@ |
2051 | * |
2052 | */ |
2053 | |
2054 | -#include "miracastservice.h" |
2055 | +#include "service.h" |
2056 | |
2057 | int main(int argc, char **argv) { |
2058 | - return mcs::MiracastService::Main(mcs::MiracastService::MainOptions::FromCommandLine(argc, argv)); |
2059 | + return ac::Service::Main(ac::Service::MainOptions::FromCommandLine(argc, argv)); |
2060 | } |
2061 | |
2062 | === renamed file 'src/mcs/mediamanagerfactory.cpp' => 'src/ac/mediamanagerfactory.cpp' |
2063 | --- src/mcs/mediamanagerfactory.cpp 2016-04-06 07:52:19 +0000 |
2064 | +++ src/ac/mediamanagerfactory.cpp 2016-06-07 08:21:39 +0000 |
2065 | @@ -17,59 +17,60 @@ |
2066 | |
2067 | #include <string.h> |
2068 | |
2069 | -#include "logger.h" |
2070 | -#include "mediamanagerfactory.h" |
2071 | -#include "mir/sourcemediamanager.h" |
2072 | -#include "utils.h" |
2073 | -#include "logging.h" |
2074 | - |
2075 | -#include "mcs/common/threadedexecutorfactory.h" |
2076 | - |
2077 | -#include "mcs/report/reportfactory.h" |
2078 | - |
2079 | -#include "mcs/network/udpstream.h" |
2080 | - |
2081 | -#include "mcs/android/h264encoder.h" |
2082 | - |
2083 | -namespace mcs { |
2084 | +#include "ac/logger.h" |
2085 | +#include "ac/mediamanagerfactory.h" |
2086 | +#include "ac/utils.h" |
2087 | +#include "ac/logger.h" |
2088 | + |
2089 | +#include "ac/mir/sourcemediamanager.h" |
2090 | + |
2091 | +#include "ac/common/threadedexecutorfactory.h" |
2092 | + |
2093 | +#include "ac/report/reportfactory.h" |
2094 | + |
2095 | +#include "ac/network/udpstream.h" |
2096 | + |
2097 | +#include "ac/android/h264encoder.h" |
2098 | + |
2099 | +namespace ac { |
2100 | |
2101 | void NullSourceMediaManager::Play() { |
2102 | - WARNING("NullSourceMediaManager: Not implemented"); |
2103 | + AC_WARNING("NullSourceMediaManager: Not implemented"); |
2104 | } |
2105 | |
2106 | void NullSourceMediaManager::Pause() { |
2107 | - WARNING("NullSourceMediaManager: Not implemented"); |
2108 | + AC_WARNING("NullSourceMediaManager: Not implemented"); |
2109 | } |
2110 | |
2111 | void NullSourceMediaManager::Teardown() { |
2112 | - WARNING("NullSourceMediaManager: Not implemented"); |
2113 | + AC_WARNING("NullSourceMediaManager: Not implemented"); |
2114 | } |
2115 | |
2116 | bool NullSourceMediaManager::IsPaused() const { |
2117 | - WARNING("NullSourceMediaManager: Not implemented"); |
2118 | + AC_WARNING("NullSourceMediaManager: Not implemented"); |
2119 | return false; |
2120 | } |
2121 | |
2122 | bool NullSourceMediaManager::Configure() { |
2123 | - WARNING("NullSourceMediaManager: Not implemented"); |
2124 | + AC_WARNING("NullSourceMediaManager: Not implemented"); |
2125 | return false; |
2126 | } |
2127 | |
2128 | std::shared_ptr<BaseSourceMediaManager> MediaManagerFactory::CreateSource(const std::string &remote_address, |
2129 | - const mcs::network::Stream::Ptr &output_stream) { |
2130 | + const ac::network::Stream::Ptr &output_stream) { |
2131 | std::string type = Utils::GetEnvValue("MIRACAST_SOURCE_TYPE"); |
2132 | if (type.length() == 0) |
2133 | type = "mir"; |
2134 | |
2135 | - DEBUG("Creating source media manager of type %s", type.c_str()); |
2136 | + AC_DEBUG("Creating source media manager of type %s", type.c_str()); |
2137 | |
2138 | if (type == "mir") { |
2139 | const auto executor_factory = std::make_shared<common::ThreadedExecutorFactory>(); |
2140 | const auto report_factory = report::ReportFactory::Create(); |
2141 | - const auto screencast = std::make_shared<mcs::mir::Screencast>(); |
2142 | - const auto encoder = mcs::android::H264Encoder::Create(report_factory->CreateEncoderReport()); |
2143 | + const auto screencast = std::make_shared<ac::mir::Screencast>(); |
2144 | + const auto encoder = ac::android::H264Encoder::Create(report_factory->CreateEncoderReport()); |
2145 | |
2146 | - return std::make_shared<mcs::mir::SourceMediaManager>( |
2147 | + return std::make_shared<ac::mir::SourceMediaManager>( |
2148 | remote_address, |
2149 | executor_factory, |
2150 | screencast, |
2151 | @@ -80,4 +81,4 @@ |
2152 | |
2153 | return std::make_shared<NullSourceMediaManager>(); |
2154 | } |
2155 | -} // namespace mcs |
2156 | +} // namespace ac |
2157 | |
2158 | === renamed file 'src/mcs/mediamanagerfactory.h' => 'src/ac/mediamanagerfactory.h' |
2159 | --- src/mcs/mediamanagerfactory.h 2016-04-06 07:52:19 +0000 |
2160 | +++ src/ac/mediamanagerfactory.h 2016-06-07 08:21:39 +0000 |
2161 | @@ -20,12 +20,12 @@ |
2162 | |
2163 | #include <memory> |
2164 | |
2165 | -#include "mcs/basesourcemediamanager.h" |
2166 | - |
2167 | -#include "mcs/network/types.h" |
2168 | -#include "mcs/network/stream.h" |
2169 | - |
2170 | -namespace mcs { |
2171 | +#include "ac/basesourcemediamanager.h" |
2172 | + |
2173 | +#include "ac/network/types.h" |
2174 | +#include "ac/network/stream.h" |
2175 | + |
2176 | +namespace ac { |
2177 | |
2178 | // Only here to make unit testing easier for the factory class |
2179 | class NullSourceMediaManager : public BaseSourceMediaManager { |
2180 | @@ -42,7 +42,7 @@ |
2181 | class MediaManagerFactory { |
2182 | public: |
2183 | static std::shared_ptr<BaseSourceMediaManager> CreateSource(const std::string &remote_address, |
2184 | - const mcs::network::Stream::Ptr &output_stream); |
2185 | + const ac::network::Stream::Ptr &output_stream); |
2186 | }; |
2187 | -} // namespace mcs |
2188 | +} // namespace ac |
2189 | #endif |
2190 | |
2191 | === added directory 'src/ac/mir' |
2192 | === renamed file 'src/mcs/mir/screencast.cpp' => 'src/ac/mir/screencast.cpp' |
2193 | --- src/mcs/mir/screencast.cpp 2016-04-29 05:46:17 +0000 |
2194 | +++ src/ac/mir/screencast.cpp 2016-06-07 08:21:39 +0000 |
2195 | @@ -17,15 +17,15 @@ |
2196 | |
2197 | #include <boost/concept_check.hpp> |
2198 | |
2199 | -#include "mcs/logger.h" |
2200 | -#include "mcs/mir/screencast.h" |
2201 | +#include "ac/logger.h" |
2202 | +#include "ac/mir/screencast.h" |
2203 | |
2204 | namespace { |
2205 | static constexpr const char *kMirSocket{"/run/mir_socket"}; |
2206 | static constexpr const char *kMirConnectionName{"aethercast screencast client"}; |
2207 | } |
2208 | |
2209 | -namespace mcs { |
2210 | +namespace ac { |
2211 | namespace mir { |
2212 | |
2213 | Screencast::Screencast() : |
2214 | @@ -35,7 +35,7 @@ |
2215 | } |
2216 | |
2217 | Screencast::~Screencast() { |
2218 | - MCS_DEBUG(""); |
2219 | + AC_DEBUG(""); |
2220 | |
2221 | if (screencast_) |
2222 | mir_screencast_release_sync(screencast_); |
2223 | @@ -49,23 +49,23 @@ |
2224 | return false; |
2225 | |
2226 | if (output.mode != video::DisplayOutput::Mode::kExtend) { |
2227 | - MCS_ERROR("Unsupported display output mode specified '%s'", output.mode); |
2228 | + AC_ERROR("Unsupported display output mode specified '%s'", output.mode); |
2229 | return false; |
2230 | } |
2231 | |
2232 | - MCS_DEBUG("Setting up screencast [%s %dx%d]", output.mode, |
2233 | + AC_DEBUG("Setting up screencast [%s %dx%d]", output.mode, |
2234 | output.width, output.height); |
2235 | |
2236 | connection_ = mir_connect_sync(kMirSocket, kMirConnectionName); |
2237 | if (!mir_connection_is_valid(connection_)) { |
2238 | - MCS_ERROR("Failed to connect to Mir server: %s", |
2239 | + AC_ERROR("Failed to connect to Mir server: %s", |
2240 | mir_connection_get_error_message(connection_)); |
2241 | return false; |
2242 | } |
2243 | |
2244 | const auto config = mir_connection_create_display_config(connection_); |
2245 | if (!config) { |
2246 | - MCS_ERROR("Failed to create display configuration: %s", |
2247 | + AC_ERROR("Failed to create display configuration: %s", |
2248 | mir_connection_get_error_message(connection_)); |
2249 | return false; |
2250 | } |
2251 | @@ -85,7 +85,7 @@ |
2252 | } |
2253 | |
2254 | if (!active_output) { |
2255 | - MCS_ERROR("Failed to find a suitable display output"); |
2256 | + AC_ERROR("Failed to find a suitable display output"); |
2257 | return false; |
2258 | } |
2259 | |
2260 | @@ -93,7 +93,7 @@ |
2261 | |
2262 | auto spec = mir_create_screencast_spec(connection_); |
2263 | if (!spec) { |
2264 | - ERROR("Failed to create Mir screencast specification: %s", |
2265 | + AC_ERROR("Failed to create Mir screencast specification: %s", |
2266 | mir_screencast_get_error_message(screencast_)); |
2267 | return false; |
2268 | } |
2269 | @@ -114,7 +114,7 @@ |
2270 | |
2271 | output_.refresh_rate = display_mode->refresh_rate; |
2272 | |
2273 | - MCS_INFO("Selected output ID %i [(%ix%i)+(%ix%i)] orientation %d", |
2274 | + AC_INFO("Selected output ID %i [(%ix%i)+(%ix%i)] orientation %d", |
2275 | output_index, |
2276 | display_mode->vertical_resolution, |
2277 | display_mode->horizontal_resolution, |
2278 | @@ -126,7 +126,7 @@ |
2279 | mir_connection_get_available_surface_formats(connection_, &pixel_format, |
2280 | 1, &num_pixel_formats); |
2281 | if (num_pixel_formats == 0) { |
2282 | - MCS_ERROR("Failed to find suitable pixel format: %s", |
2283 | + AC_ERROR("Failed to find suitable pixel format: %s", |
2284 | mir_connection_get_error_message(connection_)); |
2285 | return false; |
2286 | } |
2287 | @@ -138,14 +138,14 @@ |
2288 | screencast_ = mir_screencast_create_sync(spec); |
2289 | mir_screencast_spec_release(spec); |
2290 | if (!mir_screencast_is_valid(screencast_)) { |
2291 | - ERROR("Failed to create Mir screencast: %s", |
2292 | + AC_ERROR("Failed to create Mir screencast: %s", |
2293 | mir_screencast_get_error_message(screencast_)); |
2294 | return false; |
2295 | } |
2296 | |
2297 | buffer_stream_ = mir_screencast_get_buffer_stream(screencast_); |
2298 | if (!buffer_stream_) { |
2299 | - MCS_ERROR("Failed to setup Mir buffer stream"); |
2300 | + AC_ERROR("Failed to setup Mir buffer stream"); |
2301 | return false; |
2302 | } |
2303 | |
2304 | @@ -174,4 +174,4 @@ |
2305 | return reinterpret_cast<void*>(buffer); |
2306 | } |
2307 | } // namespace mir |
2308 | -} // namespace mcs |
2309 | +} // namespace ac |
2310 | |
2311 | === renamed file 'src/mcs/mir/screencast.h' => 'src/ac/mir/screencast.h' |
2312 | --- src/mcs/mir/screencast.h 2016-04-28 13:49:00 +0000 |
2313 | +++ src/ac/mir/screencast.h 2016-06-07 08:21:39 +0000 |
2314 | @@ -15,8 +15,8 @@ |
2315 | * |
2316 | */ |
2317 | |
2318 | -#ifndef MCS_MIR_CONNECTOR_H_ |
2319 | -#define MCS_MIR_CONNECTOR_H_ |
2320 | +#ifndef AC_MIR_CONNECTOR_H_ |
2321 | +#define AC_MIR_CONNECTOR_H_ |
2322 | |
2323 | #include <memory> |
2324 | |
2325 | @@ -24,21 +24,21 @@ |
2326 | #include <mir_toolkit/mir_screencast.h> |
2327 | #include <mir_toolkit/mir_buffer_stream.h> |
2328 | |
2329 | -#include "mcs/non_copyable.h" |
2330 | - |
2331 | -#include "mcs/video/bufferproducer.h" |
2332 | - |
2333 | -namespace mcs { |
2334 | +#include "ac/non_copyable.h" |
2335 | + |
2336 | +#include "ac/video/bufferproducer.h" |
2337 | + |
2338 | +namespace ac { |
2339 | namespace mir { |
2340 | |
2341 | -class Screencast : public mcs::video::BufferProducer { |
2342 | +class Screencast : public ac::video::BufferProducer { |
2343 | public: |
2344 | explicit Screencast(); |
2345 | ~Screencast(); |
2346 | |
2347 | bool Setup(const video::DisplayOutput &output) override; |
2348 | |
2349 | - // From mcs::video::BufferProducer |
2350 | + // From ac::video::BufferProducer |
2351 | void SwapBuffers() override; |
2352 | void* CurrentBuffer() const override; |
2353 | video::DisplayOutput OutputMode() const override; |
2354 | @@ -51,6 +51,6 @@ |
2355 | }; |
2356 | |
2357 | } // namespace mir |
2358 | -} // namespace mcs |
2359 | +} // namespace ac |
2360 | |
2361 | #endif |
2362 | |
2363 | === renamed file 'src/mcs/mir/sourcemediamanager.cpp' => 'src/ac/mir/sourcemediamanager.cpp' |
2364 | --- src/mcs/mir/sourcemediamanager.cpp 2016-05-06 13:08:10 +0000 |
2365 | +++ src/ac/mir/sourcemediamanager.cpp 2016-06-07 08:21:39 +0000 |
2366 | @@ -15,40 +15,40 @@ |
2367 | * |
2368 | */ |
2369 | |
2370 | -#include "mcs/logger.h" |
2371 | -#include "mcs/keep_alive.h" |
2372 | - |
2373 | -#include "mcs/common/threadedexecutor.h" |
2374 | -#include "mcs/common/threadedexecutorfactory.h" |
2375 | - |
2376 | -#include "mcs/network/udpstream.h" |
2377 | - |
2378 | -#include "mcs/report/reportfactory.h" |
2379 | - |
2380 | -#include "mcs/video/videoformat.h" |
2381 | -#include "mcs/video/displayoutput.h" |
2382 | - |
2383 | -#include "mcs/streaming/mpegtspacketizer.h" |
2384 | -#include "mcs/streaming/rtpsender.h" |
2385 | - |
2386 | -#include "mcs/mir/sourcemediamanager.h" |
2387 | - |
2388 | -#include "mcs/android/h264encoder.h" |
2389 | +#include "ac/logger.h" |
2390 | +#include "ac/keep_alive.h" |
2391 | + |
2392 | +#include "ac/common/threadedexecutor.h" |
2393 | +#include "ac/common/threadedexecutorfactory.h" |
2394 | + |
2395 | +#include "ac/network/udpstream.h" |
2396 | + |
2397 | +#include "ac/report/reportfactory.h" |
2398 | + |
2399 | +#include "ac/video/videoformat.h" |
2400 | +#include "ac/video/displayoutput.h" |
2401 | + |
2402 | +#include "ac/streaming/mpegtspacketizer.h" |
2403 | +#include "ac/streaming/rtpsender.h" |
2404 | + |
2405 | +#include "ac/mir/sourcemediamanager.h" |
2406 | + |
2407 | +#include "ac/android/h264encoder.h" |
2408 | |
2409 | namespace { |
2410 | // Number of milliseconds was choosen by measurement |
2411 | static constexpr std::chrono::milliseconds kStreamDelayOnPlay{300}; |
2412 | } |
2413 | |
2414 | -namespace mcs { |
2415 | +namespace ac { |
2416 | namespace mir { |
2417 | |
2418 | SourceMediaManager::SourceMediaManager(const std::string &remote_address, |
2419 | - const mcs::common::ExecutorFactory::Ptr &executor_factory, |
2420 | - const mcs::video::BufferProducer::Ptr &producer, |
2421 | - const mcs::video::BaseEncoder::Ptr &encoder, |
2422 | - const mcs::network::Stream::Ptr &output_stream, |
2423 | - const mcs::report::ReportFactory::Ptr &report_factory) : |
2424 | + const ac::common::ExecutorFactory::Ptr &executor_factory, |
2425 | + const ac::video::BufferProducer::Ptr &producer, |
2426 | + const ac::video::BaseEncoder::Ptr &encoder, |
2427 | + const ac::network::Stream::Ptr &output_stream, |
2428 | + const ac::report::ReportFactory::Ptr &report_factory) : |
2429 | state_(State::Stopped), |
2430 | remote_address_(remote_address), |
2431 | producer_(producer), |
2432 | @@ -65,22 +65,22 @@ |
2433 | } |
2434 | |
2435 | bool SourceMediaManager::Configure() { |
2436 | - auto rr = mcs::video::ExtractRateAndResolution(format_); |
2437 | + auto rr = ac::video::ExtractRateAndResolution(format_); |
2438 | |
2439 | if (!output_stream_->Connect(remote_address_, sink_port1_)) |
2440 | return false; |
2441 | |
2442 | - MCS_DEBUG("dimensions: %dx%d@%d", rr.width, rr.height, rr.framerate); |
2443 | + AC_DEBUG("dimensions: %dx%d@%d", rr.width, rr.height, rr.framerate); |
2444 | |
2445 | video::DisplayOutput output{video::DisplayOutput::Mode::kExtend, rr.width, rr.height, rr.framerate}; |
2446 | |
2447 | if (!producer_->Setup(output)) { |
2448 | - MCS_ERROR("Failed to setup buffer producer"); |
2449 | + AC_ERROR("Failed to setup buffer producer"); |
2450 | return false; |
2451 | } |
2452 | |
2453 | int profile = 0, level = 0, constraint = 0; |
2454 | - mcs::video::ExtractProfileLevel(format_, &profile, &level, &constraint); |
2455 | + ac::video::ExtractProfileLevel(format_, &profile, &level, &constraint); |
2456 | |
2457 | auto config = encoder_->DefaultConfiguration(); |
2458 | config.width = rr.width; |
2459 | @@ -91,21 +91,21 @@ |
2460 | config.constraint_set = constraint; |
2461 | |
2462 | if (!encoder_->Configure(config)) { |
2463 | - MCS_ERROR("Failed to configure encoder"); |
2464 | + AC_ERROR("Failed to configure encoder"); |
2465 | return false; |
2466 | } |
2467 | |
2468 | - renderer_ = std::make_shared<mcs::mir::StreamRenderer>( |
2469 | + renderer_ = std::make_shared<ac::mir::StreamRenderer>( |
2470 | producer_, encoder_, report_factory_->CreateRendererReport()); |
2471 | |
2472 | - auto rtp_sender = std::make_shared<mcs::streaming::RTPSender>( |
2473 | + auto rtp_sender = std::make_shared<ac::streaming::RTPSender>( |
2474 | output_stream_, report_factory_->CreateSenderReport()); |
2475 | rtp_sender->SetDelegate(shared_from_this()); |
2476 | |
2477 | - const auto mpegts_packetizer = mcs::streaming::MPEGTSPacketizer::Create( |
2478 | + const auto mpegts_packetizer = ac::streaming::MPEGTSPacketizer::Create( |
2479 | report_factory_->CreatePacketizerReport()); |
2480 | |
2481 | - sender_ = std::make_shared<mcs::streaming::MediaSender>( |
2482 | + sender_ = std::make_shared<ac::streaming::MediaSender>( |
2483 | mpegts_packetizer, |
2484 | rtp_sender, |
2485 | config); |
2486 | @@ -134,7 +134,7 @@ |
2487 | } |
2488 | |
2489 | gboolean SourceMediaManager::OnStartPipeline(gpointer user_data) { |
2490 | - auto thiz = static_cast<mcs::WeakKeepAlive<SourceMediaManager>*>(user_data)->GetInstance().lock(); |
2491 | + auto thiz = static_cast<ac::WeakKeepAlive<SourceMediaManager>*>(user_data)->GetInstance().lock(); |
2492 | if (!thiz) |
2493 | return FALSE; |
2494 | |
2495 | @@ -148,7 +148,7 @@ |
2496 | if (!IsPaused()) |
2497 | return; |
2498 | |
2499 | - MCS_DEBUG(""); |
2500 | + AC_DEBUG(""); |
2501 | |
2502 | CancelDelayTimeout(); |
2503 | |
2504 | @@ -176,7 +176,7 @@ |
2505 | |
2506 | CancelDelayTimeout(); |
2507 | |
2508 | - MCS_DEBUG(""); |
2509 | + AC_DEBUG(""); |
2510 | |
2511 | pipeline_.Stop(); |
2512 | |
2513 | @@ -187,7 +187,7 @@ |
2514 | if (state_ == State::Stopped) |
2515 | return; |
2516 | |
2517 | - MCS_DEBUG(""); |
2518 | + AC_DEBUG(""); |
2519 | |
2520 | CancelDelayTimeout(); |
2521 | |
2522 | @@ -213,4 +213,4 @@ |
2523 | } |
2524 | |
2525 | } // namespace mir |
2526 | -} // namespace mcs |
2527 | +} // namespace ac |
2528 | |
2529 | === renamed file 'src/mcs/mir/sourcemediamanager.h' => 'src/ac/mir/sourcemediamanager.h' |
2530 | --- src/mcs/mir/sourcemediamanager.h 2016-05-06 13:08:10 +0000 |
2531 | +++ src/ac/mir/sourcemediamanager.h 2016-06-07 08:21:39 +0000 |
2532 | @@ -15,36 +15,36 @@ |
2533 | * |
2534 | */ |
2535 | |
2536 | -#ifndef MCS_MIR_SOURCEMEDIAMANAGERNEXT_H_ |
2537 | -#define MCS_MIR_SOURCEMEDIAMANAGERNEXT_H_ |
2538 | +#ifndef AC_MIR_SOURCEMEDIAMANAGERNEXT_H_ |
2539 | +#define AC_MIR_SOURCEMEDIAMANAGERNEXT_H_ |
2540 | |
2541 | #include <memory> |
2542 | |
2543 | -#include "mcs/glib_wrapper.h" |
2544 | - |
2545 | -#include "mcs/basesourcemediamanager.h" |
2546 | - |
2547 | -#include "mcs/common/executor.h" |
2548 | -#include "mcs/common/threadedexecutor.h" |
2549 | -#include "mcs/common/executorpool.h" |
2550 | - |
2551 | -#include "mcs/report/reportfactory.h" |
2552 | - |
2553 | -#include "mcs/network/stream.h" |
2554 | - |
2555 | -#include "mcs/video/baseencoder.h" |
2556 | - |
2557 | -#include "mcs/streaming/mediasender.h" |
2558 | - |
2559 | -#include "mcs/mir/screencast.h" |
2560 | -#include "mcs/mir/streamrenderer.h" |
2561 | - |
2562 | -namespace mcs { |
2563 | +#include "ac/glib_wrapper.h" |
2564 | + |
2565 | +#include "ac/basesourcemediamanager.h" |
2566 | + |
2567 | +#include "ac/common/executor.h" |
2568 | +#include "ac/common/threadedexecutor.h" |
2569 | +#include "ac/common/executorpool.h" |
2570 | + |
2571 | +#include "ac/report/reportfactory.h" |
2572 | + |
2573 | +#include "ac/network/stream.h" |
2574 | + |
2575 | +#include "ac/video/baseencoder.h" |
2576 | + |
2577 | +#include "ac/streaming/mediasender.h" |
2578 | + |
2579 | +#include "ac/mir/screencast.h" |
2580 | +#include "ac/mir/streamrenderer.h" |
2581 | + |
2582 | +namespace ac { |
2583 | namespace mir { |
2584 | |
2585 | class SourceMediaManager : public std::enable_shared_from_this<SourceMediaManager>, |
2586 | - public mcs::BaseSourceMediaManager, |
2587 | - public mcs::streaming::TransportSender::Delegate { |
2588 | + public ac::BaseSourceMediaManager, |
2589 | + public ac::streaming::TransportSender::Delegate { |
2590 | public: |
2591 | typedef std::shared_ptr<SourceMediaManager> Ptr; |
2592 | |
2593 | @@ -55,11 +55,11 @@ |
2594 | }; |
2595 | |
2596 | SourceMediaManager(const std::string &remote_address, |
2597 | - const mcs::common::ExecutorFactory::Ptr &executor_factory, |
2598 | - const mcs::video::BufferProducer::Ptr &producer, |
2599 | - const mcs::video::BaseEncoder::Ptr &encoder, |
2600 | - const mcs::network::Stream::Ptr &output_stream, |
2601 | - const mcs::report::ReportFactory::Ptr &report_factory); |
2602 | + const ac::common::ExecutorFactory::Ptr &executor_factory, |
2603 | + const ac::video::BufferProducer::Ptr &producer, |
2604 | + const ac::video::BaseEncoder::Ptr &encoder, |
2605 | + const ac::network::Stream::Ptr &output_stream, |
2606 | + const ac::report::ReportFactory::Ptr &report_factory); |
2607 | |
2608 | ~SourceMediaManager(); |
2609 | |
2610 | @@ -85,17 +85,17 @@ |
2611 | private: |
2612 | State state_; |
2613 | std::string remote_address_; |
2614 | - mcs::video::BufferProducer::Ptr producer_; |
2615 | - mcs::video::BaseEncoder::Ptr encoder_; |
2616 | - mcs::network::Stream::Ptr output_stream_; |
2617 | - mcs::report::ReportFactory::Ptr report_factory_; |
2618 | - mcs::mir::StreamRenderer::Ptr renderer_; |
2619 | - mcs::streaming::MediaSender::Ptr sender_; |
2620 | - mcs::common::ExecutorPool pipeline_; |
2621 | + ac::video::BufferProducer::Ptr producer_; |
2622 | + ac::video::BaseEncoder::Ptr encoder_; |
2623 | + ac::network::Stream::Ptr output_stream_; |
2624 | + ac::report::ReportFactory::Ptr report_factory_; |
2625 | + ac::mir::StreamRenderer::Ptr renderer_; |
2626 | + ac::streaming::MediaSender::Ptr sender_; |
2627 | + ac::common::ExecutorPool pipeline_; |
2628 | guint delay_timeout_; |
2629 | }; |
2630 | |
2631 | } // namespace mir |
2632 | -} // namespace mcs |
2633 | +} // namespace ac |
2634 | |
2635 | #endif |
2636 | |
2637 | === renamed file 'src/mcs/mir/streamrenderer.cpp' => 'src/ac/mir/streamrenderer.cpp' |
2638 | --- src/mcs/mir/streamrenderer.cpp 2016-03-30 08:13:42 +0000 |
2639 | +++ src/ac/mir/streamrenderer.cpp 2016-06-07 08:21:39 +0000 |
2640 | @@ -20,17 +20,17 @@ |
2641 | |
2642 | #include <boost/concept_check.hpp> |
2643 | |
2644 | -#include "mcs/logger.h" |
2645 | +#include "ac/logger.h" |
2646 | |
2647 | -#include "mcs/mir/screencast.h" |
2648 | -#include "mcs/mir/streamrenderer.h" |
2649 | +#include "ac/mir/screencast.h" |
2650 | +#include "ac/mir/streamrenderer.h" |
2651 | |
2652 | namespace { |
2653 | static constexpr const char *kStreamRendererThreadName{"StreamRenderer"}; |
2654 | static constexpr unsigned int kNumBufferSlots{2}; |
2655 | } |
2656 | |
2657 | -namespace mcs { |
2658 | +namespace ac { |
2659 | namespace mir { |
2660 | |
2661 | StreamRenderer::StreamRenderer(const video::BufferProducer::Ptr &buffer_producer, |
2662 | @@ -41,7 +41,7 @@ |
2663 | encoder_(encoder), |
2664 | width_(buffer_producer->OutputMode().width), |
2665 | height_(buffer_producer->OutputMode().height), |
2666 | - input_buffers_(mcs::video::BufferQueue::Create(BufferSlots())), |
2667 | + input_buffers_(ac::video::BufferQueue::Create(BufferSlots())), |
2668 | target_iteration_time_((1. / encoder_->Configuration().framerate) * std::micro::den) { |
2669 | } |
2670 | |
2671 | @@ -50,7 +50,7 @@ |
2672 | } |
2673 | |
2674 | bool StreamRenderer::Execute() { |
2675 | - mcs::TimestampUs iteration_start_time = mcs::Utils::GetNowUs(); |
2676 | + ac::TimestampUs iteration_start_time = ac::Utils::GetNowUs(); |
2677 | |
2678 | // Wait until we have free slots again and all buffers we produced |
2679 | // went through the pipeline. |
2680 | @@ -65,13 +65,13 @@ |
2681 | |
2682 | const auto native_buffer = buffer_producer_->CurrentBuffer(); |
2683 | |
2684 | - auto buffer = mcs::video::Buffer::Create(native_buffer); |
2685 | + auto buffer = ac::video::Buffer::Create(native_buffer); |
2686 | buffer->SetDelegate(shared_from_this()); |
2687 | |
2688 | // FIXME: at optimum we would get the timestamp directly supplied |
2689 | // from our producer but as long as that isn't available we don't |
2690 | // have any other chance and need to do it here. |
2691 | - buffer->SetTimestamp(mcs::Utils::GetNowUs()); |
2692 | + buffer->SetTimestamp(ac::Utils::GetNowUs()); |
2693 | |
2694 | input_buffers_->Push(buffer); |
2695 | |
2696 | @@ -81,8 +81,8 @@ |
2697 | |
2698 | // Calculate how long we have to wait until we can render the next |
2699 | // frame to keep our framerate constant. |
2700 | - mcs::TimestampUs iteration_time = mcs::Utils::GetNowUs() - iteration_start_time; |
2701 | - mcs::TimestampUs sleep_time = target_iteration_time_ - iteration_time; |
2702 | + ac::TimestampUs iteration_time = ac::Utils::GetNowUs() - iteration_start_time; |
2703 | + ac::TimestampUs sleep_time = target_iteration_time_ - iteration_time; |
2704 | if (sleep_time > 0) |
2705 | std::this_thread::sleep_for(std::chrono::microseconds(sleep_time)); |
2706 | |
2707 | @@ -100,7 +100,7 @@ |
2708 | } |
2709 | |
2710 | bool StreamRenderer::Start() { |
2711 | - MCS_DEBUG("Everything successfully setup; Starting recording now %dx%d@%d", |
2712 | + AC_DEBUG("Everything successfully setup; Starting recording now %dx%d@%d", |
2713 | width_, height_, encoder_->Configuration().framerate); |
2714 | |
2715 | return true; |
2716 | @@ -119,4 +119,4 @@ |
2717 | } |
2718 | |
2719 | } // namespace mir |
2720 | -} // namespace mcs |
2721 | +} // namespace ac |
2722 | |
2723 | === renamed file 'src/mcs/mir/streamrenderer.h' => 'src/ac/mir/streamrenderer.h' |
2724 | --- src/mcs/mir/streamrenderer.h 2016-03-17 09:23:29 +0000 |
2725 | +++ src/ac/mir/streamrenderer.h 2016-06-07 08:21:39 +0000 |
2726 | @@ -15,29 +15,29 @@ |
2727 | * |
2728 | */ |
2729 | |
2730 | -#ifndef MCS_MIR_STREAMRENDERER_H_ |
2731 | -#define MCS_MIR_STREAMRENDERER_H_ |
2732 | +#ifndef AC_MIR_STREAMRENDERER_H_ |
2733 | +#define AC_MIR_STREAMRENDERER_H_ |
2734 | |
2735 | #include <memory> |
2736 | #include <thread> |
2737 | #include <mutex> |
2738 | #include <queue> |
2739 | |
2740 | -#include "mcs/common/executable.h" |
2741 | - |
2742 | -#include "mcs/mir/streamrenderer.h" |
2743 | -#include "mcs/mir/screencast.h" |
2744 | - |
2745 | -#include "mcs/video/baseencoder.h" |
2746 | -#include "mcs/video/bufferqueue.h" |
2747 | -#include "mcs/video/bufferproducer.h" |
2748 | -#include "mcs/video/rendererreport.h" |
2749 | - |
2750 | -namespace mcs { |
2751 | +#include "ac/common/executable.h" |
2752 | + |
2753 | +#include "ac/mir/streamrenderer.h" |
2754 | +#include "ac/mir/screencast.h" |
2755 | + |
2756 | +#include "ac/video/baseencoder.h" |
2757 | +#include "ac/video/bufferqueue.h" |
2758 | +#include "ac/video/bufferproducer.h" |
2759 | +#include "ac/video/rendererreport.h" |
2760 | + |
2761 | +namespace ac { |
2762 | namespace mir { |
2763 | class StreamRenderer : public std::enable_shared_from_this<StreamRenderer>, |
2764 | - public mcs::common::Executable, |
2765 | - public mcs::video::Buffer::Delegate { |
2766 | + public ac::common::Executable, |
2767 | + public ac::video::Buffer::Delegate { |
2768 | public: |
2769 | static constexpr unsigned int kNumTextures{2}; |
2770 | |
2771 | @@ -50,10 +50,10 @@ |
2772 | |
2773 | std::uint32_t BufferSlots() const; |
2774 | |
2775 | - // From mcs::video::Buffer::Delegate |
2776 | - void OnBufferFinished(const mcs::video::Buffer::Ptr &buffer); |
2777 | + // From ac::video::Buffer::Delegate |
2778 | + void OnBufferFinished(const ac::video::Buffer::Ptr &buffer); |
2779 | |
2780 | - // From mcs::common::Executable |
2781 | + // From ac::common::Executable |
2782 | bool Start() override; |
2783 | bool Stop() override; |
2784 | bool Execute() override; |
2785 | @@ -65,10 +65,10 @@ |
2786 | video::BaseEncoder::Ptr encoder_; |
2787 | unsigned int width_; |
2788 | unsigned int height_; |
2789 | - mcs::video::BufferQueue::Ptr input_buffers_; |
2790 | - mcs::TimestampUs target_iteration_time_; |
2791 | + ac::video::BufferQueue::Ptr input_buffers_; |
2792 | + ac::TimestampUs target_iteration_time_; |
2793 | }; |
2794 | } // namespace mir |
2795 | -} // namespace mcs |
2796 | +} // namespace ac |
2797 | |
2798 | #endif |
2799 | |
2800 | === added directory 'src/ac/network' |
2801 | === renamed file 'src/mcs/network/stream.cpp' => 'src/ac/network/stream.cpp' |
2802 | --- src/mcs/network/stream.cpp 2016-04-22 08:17:23 +0000 |
2803 | +++ src/ac/network/stream.cpp 2016-06-07 08:21:39 +0000 |
2804 | @@ -15,4 +15,4 @@ |
2805 | * |
2806 | */ |
2807 | |
2808 | -#include "mcs/network/stream.h" |
2809 | +#include "ac/network/stream.h" |
2810 | |
2811 | === renamed file 'src/mcs/network/stream.h' => 'src/ac/network/stream.h' |
2812 | --- src/mcs/network/stream.h 2016-05-10 12:04:37 +0000 |
2813 | +++ src/ac/network/stream.h 2016-06-07 08:21:39 +0000 |
2814 | @@ -15,20 +15,20 @@ |
2815 | * |
2816 | */ |
2817 | |
2818 | -#ifndef MCS_NETWORK_STREAM_H_ |
2819 | -#define MCS_NETWORK_STREAM_H_ |
2820 | +#ifndef AC_NETWORK_STREAM_H_ |
2821 | +#define AC_NETWORK_STREAM_H_ |
2822 | |
2823 | #include <memory> |
2824 | |
2825 | -#include "mcs/non_copyable.h" |
2826 | -#include "mcs/utils.h" |
2827 | - |
2828 | -#include "mcs/network/types.h" |
2829 | - |
2830 | -namespace mcs { |
2831 | +#include "ac/non_copyable.h" |
2832 | +#include "ac/utils.h" |
2833 | + |
2834 | +#include "ac/network/types.h" |
2835 | + |
2836 | +namespace ac { |
2837 | namespace network { |
2838 | |
2839 | -class Stream : public mcs::NonCopyable { |
2840 | +class Stream : public ac::NonCopyable { |
2841 | public: |
2842 | typedef std::shared_ptr<Stream> Ptr; |
2843 | |
2844 | @@ -41,7 +41,7 @@ |
2845 | virtual bool Connect(const std::string &address, const Port &port) = 0; |
2846 | |
2847 | virtual Error Write(const uint8_t *data, unsigned int size, |
2848 | - const mcs::TimestampUs ×tamp = 0) = 0; |
2849 | + const ac::TimestampUs ×tamp = 0) = 0; |
2850 | |
2851 | virtual Port LocalPort() const = 0; |
2852 | |
2853 | @@ -56,6 +56,6 @@ |
2854 | }; |
2855 | |
2856 | } // namespace network |
2857 | -} // namespace mcs |
2858 | +} // namespace ac |
2859 | |
2860 | #endif |
2861 | |
2862 | === renamed file 'src/mcs/network/types.h' => 'src/ac/network/types.h' |
2863 | --- src/mcs/network/types.h 2016-03-10 13:53:16 +0000 |
2864 | +++ src/ac/network/types.h 2016-06-07 08:21:39 +0000 |
2865 | @@ -15,17 +15,17 @@ |
2866 | * |
2867 | */ |
2868 | |
2869 | -#ifndef MCS_NETWORK_TYPES_H_ |
2870 | -#define MCS_NETWORK_TYPES_H_ |
2871 | +#ifndef AC_NETWORK_TYPES_H_ |
2872 | +#define AC_NETWORK_TYPES_H_ |
2873 | |
2874 | #include <cstdint> |
2875 | |
2876 | -namespace mcs { |
2877 | +namespace ac { |
2878 | namespace network { |
2879 | |
2880 | typedef std::uint16_t Port; |
2881 | |
2882 | } // namespace network |
2883 | -} // namespace mcs |
2884 | +} // namespace ac |
2885 | |
2886 | #endif |
2887 | |
2888 | === renamed file 'src/mcs/network/udpstream.cpp' => 'src/ac/network/udpstream.cpp' |
2889 | --- src/mcs/network/udpstream.cpp 2016-05-10 12:04:37 +0000 |
2890 | +++ src/ac/network/udpstream.cpp 2016-06-07 08:21:39 +0000 |
2891 | @@ -31,10 +31,10 @@ |
2892 | |
2893 | #include <boost/concept_check.hpp> |
2894 | |
2895 | -#include "mcs/logger.h" |
2896 | -#include "mcs/networkutils.h" |
2897 | +#include "ac/logger.h" |
2898 | +#include "ac/networkutils.h" |
2899 | |
2900 | -#include "mcs/network/udpstream.h" |
2901 | +#include "ac/network/udpstream.h" |
2902 | |
2903 | namespace { |
2904 | static constexpr unsigned int kUdpTxBufferSize = 256 * 1024; |
2905 | @@ -42,7 +42,7 @@ |
2906 | static constexpr unsigned int kMaxUDPPacketSize = 1472; |
2907 | } |
2908 | |
2909 | -namespace mcs { |
2910 | +namespace ac { |
2911 | namespace network { |
2912 | |
2913 | UdpStream::UdpStream() : |
2914 | @@ -56,17 +56,17 @@ |
2915 | } |
2916 | |
2917 | bool UdpStream::Connect(const std::string &address, const Port &port) { |
2918 | - MCS_DEBUG("Connected with remote on %s:%d", address, port); |
2919 | + AC_DEBUG("Connected with remote on %s:%d", address, port); |
2920 | |
2921 | socket_ = ::socket(AF_INET, SOCK_DGRAM, 0); |
2922 | if (socket_ < 0) { |
2923 | - MCS_ERROR("Failed to create socket: %s (%d)", ::strerror(errno), errno); |
2924 | + AC_ERROR("Failed to create socket: %s (%d)", ::strerror(errno), errno); |
2925 | return false; |
2926 | } |
2927 | |
2928 | int value = kUdpTxBufferSize; |
2929 | if (::setsockopt(socket_, SOL_SOCKET, SO_SNDBUF, &value, sizeof(value)) < 0) { |
2930 | - MCS_ERROR("Failed to set socket transmit buffer size: %s (%d)", ::strerror(errno), errno); |
2931 | + AC_ERROR("Failed to set socket transmit buffer size: %s (%d)", ::strerror(errno), errno); |
2932 | return false; |
2933 | } |
2934 | |
2935 | @@ -77,7 +77,7 @@ |
2936 | addr.sin_port = htons(local_port_); |
2937 | |
2938 | if (::bind(socket_, reinterpret_cast<const struct sockaddr*>(&addr), sizeof(addr)) < 0) { |
2939 | - MCS_ERROR("Failed to bind socket to address: %s (%d)", ::strerror(errno), errno); |
2940 | + AC_ERROR("Failed to bind socket to address: %s (%d)", ::strerror(errno), errno); |
2941 | return false; |
2942 | } |
2943 | |
2944 | @@ -88,14 +88,14 @@ |
2945 | |
2946 | struct hostent *ent = gethostbyname(address.c_str()); |
2947 | if (!ent) { |
2948 | - MCS_ERROR("Failed to resolve remote address"); |
2949 | + AC_ERROR("Failed to resolve remote address"); |
2950 | return false; |
2951 | } |
2952 | |
2953 | remote_addr.sin_addr.s_addr = *(in_addr_t*) ent->h_addr; |
2954 | |
2955 | if (::connect(socket_, reinterpret_cast<const struct sockaddr*>(&remote_addr), sizeof(remote_addr)) < 0) { |
2956 | - MCS_ERROR("Failed to connect to remote: %s (%d)", ::strerror(errno), errno); |
2957 | + AC_ERROR("Failed to connect to remote: %s (%d)", ::strerror(errno), errno); |
2958 | return false; |
2959 | } |
2960 | |
2961 | @@ -103,7 +103,7 @@ |
2962 | } |
2963 | |
2964 | Stream::Error UdpStream::Write(const uint8_t *data, unsigned int size, |
2965 | - const mcs::TimestampUs ×tamp) { |
2966 | + const ac::TimestampUs ×tamp) { |
2967 | |
2968 | boost::ignore_unused_variable_warning(timestamp); |
2969 | |
2970 | @@ -123,7 +123,7 @@ |
2971 | case EHOSTUNREACH: |
2972 | case ENETUNREACH: |
2973 | case ENETDOWN: |
2974 | - MCS_DEBUG("Trying to resend due to a possible congested socket (errno %d)", errno); |
2975 | + AC_DEBUG("Trying to resend due to a possible congested socket (errno %d)", errno); |
2976 | bytes_sent = ::send(socket_, data, size, 0); |
2977 | break; |
2978 | default: |
2979 | @@ -132,11 +132,11 @@ |
2980 | } |
2981 | |
2982 | if (bytes_sent < 0) { |
2983 | - MCS_ERROR("Failed to send packet to remote: %s (%d)", ::strerror(-errno), errno); |
2984 | + AC_ERROR("Failed to send packet to remote: %s (%d)", ::strerror(-errno), errno); |
2985 | return Error::kFailed; |
2986 | } |
2987 | else if (bytes_sent == 0) { |
2988 | - MCS_ERROR("Remote has closed connection: %s (%d)", ::strerror(-errno), errno); |
2989 | + AC_ERROR("Remote has closed connection: %s (%d)", ::strerror(-errno), errno); |
2990 | return Error::kRemoteClosedConnection; |
2991 | } |
2992 | |
2993 | @@ -152,4 +152,4 @@ |
2994 | } |
2995 | |
2996 | } // namespace network |
2997 | -} // namespace mcs |
2998 | +} // namespace ac |
2999 | |
3000 | === renamed file 'src/mcs/network/udpstream.h' => 'src/ac/network/udpstream.h' |
3001 | --- src/mcs/network/udpstream.h 2016-05-10 12:04:37 +0000 |
3002 | +++ src/ac/network/udpstream.h 2016-06-07 08:21:39 +0000 |
3003 | @@ -15,16 +15,16 @@ |
3004 | * |
3005 | */ |
3006 | |
3007 | -#ifndef MCS_NETWORK_UDPSTREAM_H_ |
3008 | -#define MCS_NETWORK_UDPSTREAM_H_ |
3009 | +#ifndef AC_NETWORK_UDPSTREAM_H_ |
3010 | +#define AC_NETWORK_UDPSTREAM_H_ |
3011 | |
3012 | #include <memory> |
3013 | |
3014 | -#include "mcs/non_copyable.h" |
3015 | - |
3016 | -#include "mcs/network/stream.h" |
3017 | - |
3018 | -namespace mcs { |
3019 | +#include "ac/non_copyable.h" |
3020 | + |
3021 | +#include "ac/network/stream.h" |
3022 | + |
3023 | +namespace ac { |
3024 | namespace network { |
3025 | |
3026 | class UdpStream : public Stream { |
3027 | @@ -35,7 +35,7 @@ |
3028 | bool Connect(const std::string &address, const Port &port) override; |
3029 | |
3030 | Error Write(const uint8_t *data, unsigned int size, |
3031 | - const mcs::TimestampUs ×tamp = 0) override; |
3032 | + const ac::TimestampUs ×tamp = 0) override; |
3033 | |
3034 | Port LocalPort() const override; |
3035 | |
3036 | @@ -47,6 +47,6 @@ |
3037 | }; |
3038 | |
3039 | } // namespace network |
3040 | -} // namespace mcs |
3041 | +} // namespace ac |
3042 | |
3043 | #endif |
3044 | |
3045 | === renamed file 'src/mcs/networkdevice.cpp' => 'src/ac/networkdevice.cpp' |
3046 | --- src/mcs/networkdevice.cpp 2016-01-16 13:33:12 +0000 |
3047 | +++ src/ac/networkdevice.cpp 2016-06-07 08:21:39 +0000 |
3048 | @@ -17,7 +17,7 @@ |
3049 | |
3050 | #include "networkdevice.h" |
3051 | |
3052 | -namespace mcs { |
3053 | +namespace ac { |
3054 | std::string NetworkDevice::StateToStr(NetworkDeviceState state) { |
3055 | switch (state) { |
3056 | case kIdle: |
3057 | @@ -56,4 +56,4 @@ |
3058 | return State() == kConfiguration || |
3059 | State() == kAssociation; |
3060 | } |
3061 | -} // namespace mcs |
3062 | +} // namespace ac |
3063 | |
3064 | === renamed file 'src/mcs/networkdevice.h' => 'src/ac/networkdevice.h' |
3065 | --- src/mcs/networkdevice.h 2015-12-16 08:04:35 +0000 |
3066 | +++ src/ac/networkdevice.h 2016-06-07 08:21:39 +0000 |
3067 | @@ -26,7 +26,7 @@ |
3068 | #include "mac_address.h" |
3069 | #include "non_copyable.h" |
3070 | |
3071 | -namespace mcs { |
3072 | +namespace ac { |
3073 | enum NetworkDeviceState { |
3074 | kIdle, |
3075 | kFailure, |
3076 | @@ -59,5 +59,5 @@ |
3077 | protected: |
3078 | NetworkDevice() = default; |
3079 | }; |
3080 | -} // namespace mcs |
3081 | +} // namespace ac |
3082 | #endif |
3083 | |
3084 | === renamed file 'src/mcs/networkmanager.cpp' => 'src/ac/networkmanager.cpp' |
3085 | --- src/mcs/networkmanager.cpp 2016-01-21 13:25:31 +0000 |
3086 | +++ src/ac/networkmanager.cpp 2016-06-07 08:21:39 +0000 |
3087 | @@ -17,7 +17,7 @@ |
3088 | |
3089 | #include "networkmanager.h" |
3090 | |
3091 | -namespace mcs { |
3092 | +namespace ac { |
3093 | std::string NetworkManager::CapabilityToStr(Capability capability) { |
3094 | if (capability == Capability::kSink) |
3095 | return "sink"; |
3096 | @@ -25,4 +25,4 @@ |
3097 | return "source"; |
3098 | return ""; |
3099 | } |
3100 | -} // namespace mcs |
3101 | +} // namespace ac |
3102 | |
3103 | === renamed file 'src/mcs/networkmanager.h' => 'src/ac/networkmanager.h' |
3104 | --- src/mcs/networkmanager.h 2016-04-27 07:37:30 +0000 |
3105 | +++ src/ac/networkmanager.h 2016-06-07 08:21:39 +0000 |
3106 | @@ -28,12 +28,12 @@ |
3107 | #include "networkdevice.h" |
3108 | #include "non_copyable.h" |
3109 | |
3110 | -namespace mcs { |
3111 | -class NetworkManager : private mcs::NonCopyable { |
3112 | +namespace ac { |
3113 | +class NetworkManager : private ac::NonCopyable { |
3114 | public: |
3115 | typedef std::shared_ptr<NetworkManager> Ptr; |
3116 | |
3117 | - class Delegate : private mcs::NonCopyable { |
3118 | + class Delegate : private ac::NonCopyable { |
3119 | public: |
3120 | virtual void OnDeviceFound(const NetworkDevice::Ptr &peer) = 0; |
3121 | virtual void OnDeviceLost(const NetworkDevice::Ptr &peer) = 0; |
3122 | @@ -74,5 +74,5 @@ |
3123 | protected: |
3124 | NetworkManager() = default; |
3125 | }; |
3126 | -} // namespace mcs |
3127 | +} // namespace ac |
3128 | #endif |
3129 | |
3130 | === renamed file 'src/mcs/networkmanagerfactory.cpp' => 'src/ac/networkmanagerfactory.cpp' |
3131 | --- src/mcs/networkmanagerfactory.cpp 2016-04-27 07:37:30 +0000 |
3132 | +++ src/ac/networkmanagerfactory.cpp 2016-06-07 08:21:39 +0000 |
3133 | @@ -24,62 +24,62 @@ |
3134 | #include "logger.h" |
3135 | #include "utils.h" |
3136 | |
3137 | -namespace mcs { |
3138 | +namespace ac { |
3139 | |
3140 | void NullNetworkManager::SetDelegate(Delegate * delegate) { |
3141 | - ERROR("Not implemented"); |
3142 | + AC_ERROR("Not implemented"); |
3143 | } |
3144 | |
3145 | bool NullNetworkManager::Setup() { |
3146 | - ERROR("Not implemented"); |
3147 | + AC_ERROR("Not implemented"); |
3148 | return false; |
3149 | } |
3150 | |
3151 | void NullNetworkManager::Release() { |
3152 | - ERROR("Not implemented"); |
3153 | + AC_ERROR("Not implemented"); |
3154 | } |
3155 | |
3156 | void NullNetworkManager::Scan(const std::chrono::seconds &timeout) { |
3157 | - ERROR("Not implemented"); |
3158 | + AC_ERROR("Not implemented"); |
3159 | } |
3160 | |
3161 | bool NullNetworkManager::Connect(const NetworkDevice::Ptr &device) { |
3162 | - ERROR("Not implemented"); |
3163 | + AC_ERROR("Not implemented"); |
3164 | return false; |
3165 | } |
3166 | |
3167 | bool NullNetworkManager::Disconnect(const NetworkDevice::Ptr &device) { |
3168 | - ERROR("Not implemented"); |
3169 | + AC_ERROR("Not implemented"); |
3170 | return false; |
3171 | } |
3172 | |
3173 | std::vector<NetworkDevice::Ptr> NullNetworkManager::Devices() const { |
3174 | - ERROR("Not implemented"); |
3175 | + AC_ERROR("Not implemented"); |
3176 | return std::vector<NetworkDevice::Ptr>(); |
3177 | } |
3178 | |
3179 | IpV4Address NullNetworkManager::LocalAddress() const { |
3180 | - ERROR("Not implemented"); |
3181 | + AC_ERROR("Not implemented"); |
3182 | return IpV4Address(); |
3183 | } |
3184 | |
3185 | bool NullNetworkManager::Running() const { |
3186 | - ERROR("Not implemented"); |
3187 | + AC_ERROR("Not implemented"); |
3188 | return false; |
3189 | } |
3190 | |
3191 | bool NullNetworkManager::Scanning() const { |
3192 | - ERROR("Not implemented"); |
3193 | + AC_ERROR("Not implemented"); |
3194 | return false; |
3195 | } |
3196 | |
3197 | bool NullNetworkManager::Ready() const { |
3198 | - ERROR("Not implemented"); |
3199 | + AC_ERROR("Not implemented"); |
3200 | return false; |
3201 | } |
3202 | |
3203 | void NullNetworkManager::SetCapabilities(const std::vector<Capability> &capabilities) { |
3204 | - ERROR("Not implemented"); |
3205 | + AC_ERROR("Not implemented"); |
3206 | } |
3207 | |
3208 | std::vector<NetworkManager::Capability> NullNetworkManager::Capabilities() const { |
3209 | @@ -89,7 +89,7 @@ |
3210 | NetworkManager::Ptr NetworkManagerFactory::Create(const std::string &type) { |
3211 | auto final_type = type.length() > 0 ? type : Utils::GetEnvValue("AETHERCAST_NETWORK_MANAGER"); |
3212 | |
3213 | - DEBUG("Creating network manager of type %s", final_type.length() > 0 ? final_type : "w11tng"); |
3214 | + AC_DEBUG("Creating network manager of type %s", final_type.length() > 0 ? final_type : "w11tng"); |
3215 | |
3216 | // We will always default to the w11t implementation if no invalid |
3217 | // type is specified. |
3218 | @@ -99,4 +99,4 @@ |
3219 | return std::make_shared<NullNetworkManager>(); |
3220 | } |
3221 | |
3222 | -} // namespace mcs |
3223 | +} // namespace ac |
3224 | |
3225 | === renamed file 'src/mcs/networkmanagerfactory.h' => 'src/ac/networkmanagerfactory.h' |
3226 | --- src/mcs/networkmanagerfactory.h 2016-04-27 07:37:30 +0000 |
3227 | +++ src/ac/networkmanagerfactory.h 2016-06-07 08:21:39 +0000 |
3228 | @@ -20,10 +20,10 @@ |
3229 | |
3230 | #include "networkmanager.h" |
3231 | |
3232 | -namespace mcs { |
3233 | +namespace ac { |
3234 | |
3235 | // Only here to make unit testing easier for the factory class |
3236 | -class NullNetworkManager : public mcs::NetworkManager { |
3237 | +class NullNetworkManager : public ac::NetworkManager { |
3238 | public: |
3239 | void SetDelegate(Delegate * delegate) override; |
3240 | |
3241 | @@ -49,6 +49,6 @@ |
3242 | static NetworkManager::Ptr Create(const std::string &type = ""); |
3243 | }; |
3244 | |
3245 | -} // namespace mcs |
3246 | +} // namespace ac |
3247 | |
3248 | #endif |
3249 | |
3250 | === renamed file 'src/mcs/networkutils.cpp' => 'src/ac/networkutils.cpp' |
3251 | --- src/mcs/networkutils.cpp 2016-05-10 12:04:37 +0000 |
3252 | +++ src/ac/networkutils.cpp 2016-06-07 08:21:39 +0000 |
3253 | @@ -40,10 +40,10 @@ |
3254 | |
3255 | #include <random> |
3256 | |
3257 | -#include "mcs/glib_wrapper.h" |
3258 | -#include "mcs/logger.h" |
3259 | -#include "mcs/networkutils.h" |
3260 | -#include "mcs/logger.h" |
3261 | +#include "ac/glib_wrapper.h" |
3262 | +#include "ac/logger.h" |
3263 | +#include "ac/networkutils.h" |
3264 | +#include "ac/logger.h" |
3265 | |
3266 | namespace { |
3267 | static constexpr size_t kDriverCommandReplySize{1024}; |
3268 | @@ -73,7 +73,7 @@ |
3269 | } |
3270 | } |
3271 | |
3272 | -namespace mcs { |
3273 | +namespace ac { |
3274 | const network::Port NetworkUtils::kMinUserPort{1024}; |
3275 | const network::Port NetworkUtils::kMaxUserPort{65534}; |
3276 | |
3277 | @@ -262,7 +262,7 @@ |
3278 | addr = (struct sockaddr_in *)&addr_ifr.ifr_addr; |
3279 | addr->sin_family = AF_INET; |
3280 | if (ioctl(sk, SIOCSIFADDR, &addr_ifr) < 0) |
3281 | - WARNING("Could not clear IPv4 address of interface with index %d", index); |
3282 | + AC_WARNING("Could not clear IPv4 address of interface with index %d", index); |
3283 | |
3284 | done: |
3285 | close(sk); |
3286 | @@ -320,11 +320,11 @@ |
3287 | return ret; |
3288 | } |
3289 | |
3290 | -mcs::network::Port NetworkUtils::PickRandomPort() { |
3291 | +ac::network::Port NetworkUtils::PickRandomPort() { |
3292 | std::random_device rd; |
3293 | std::mt19937 generator(rd()); |
3294 | std::uniform_int_distribution<> distribution(kMinUserPort, kMaxUserPort); |
3295 | - return static_cast<mcs::network::Port>(distribution(generator)); |
3296 | + return static_cast<ac::network::Port>(distribution(generator)); |
3297 | } |
3298 | |
3299 | -} // namespace mcs |
3300 | +} // namespace ac |
3301 | |
3302 | === renamed file 'src/mcs/networkutils.h' => 'src/ac/networkutils.h' |
3303 | --- src/mcs/networkutils.h 2016-05-10 12:04:37 +0000 |
3304 | +++ src/ac/networkutils.h 2016-06-07 08:21:39 +0000 |
3305 | @@ -20,14 +20,14 @@ |
3306 | |
3307 | #include <string> |
3308 | |
3309 | -#include "mcs/network/types.h" |
3310 | +#include "ac/network/types.h" |
3311 | |
3312 | -namespace mcs { |
3313 | +namespace ac { |
3314 | class NetworkUtils |
3315 | { |
3316 | public: |
3317 | - static const mcs::network::Port kMinUserPort; |
3318 | - static const mcs::network::Port kMaxUserPort; |
3319 | + static const ac::network::Port kMinUserPort; |
3320 | + static const ac::network::Port kMaxUserPort; |
3321 | |
3322 | static int RetrieveInterfaceIndex(const char *name); |
3323 | static std::string RetrieveInterfaceName(int index); |
3324 | @@ -37,7 +37,7 @@ |
3325 | static int ResetInterface(int index); |
3326 | static int BytesAvailableToRead(int fd); |
3327 | static int SendDriverPrivateCommand(const std::string &ifname, const std::string &cmd); |
3328 | - static mcs::network::Port PickRandomPort(); |
3329 | + static ac::network::Port PickRandomPort(); |
3330 | }; |
3331 | -} // namespace mcs |
3332 | +} // namespace ac |
3333 | #endif |
3334 | |
3335 | === renamed file 'src/mcs/non_copyable.h' => 'src/ac/non_copyable.h' |
3336 | --- src/mcs/non_copyable.h 2015-12-01 08:42:48 +0000 |
3337 | +++ src/ac/non_copyable.h 2016-06-07 08:21:39 +0000 |
3338 | @@ -18,7 +18,7 @@ |
3339 | #ifndef NON_COPYABLE_H_ |
3340 | #define NON_COPYABLE_H_ |
3341 | |
3342 | -namespace mcs { |
3343 | +namespace ac { |
3344 | // The alert reader might wonder why we don't use boost::noncopyable. The reason |
3345 | // is simple: We would like to have a convenient virtual d'tor available. |
3346 | struct NonCopyable { |
3347 | |
3348 | === added directory 'src/ac/report' |
3349 | === added directory 'src/ac/report/logging' |
3350 | === renamed file 'src/mcs/report/logging/encoderreport.cpp' => 'src/ac/report/logging/encoderreport.cpp' |
3351 | --- src/mcs/report/logging/encoderreport.cpp 2016-03-08 08:48:09 +0000 |
3352 | +++ src/ac/report/logging/encoderreport.cpp 2016-06-07 08:21:39 +0000 |
3353 | @@ -15,34 +15,34 @@ |
3354 | * |
3355 | */ |
3356 | |
3357 | -#include "mcs/logger.h" |
3358 | - |
3359 | -#include "mcs/report/logging/encoderreport.h" |
3360 | - |
3361 | -namespace mcs { |
3362 | +#include "ac/logger.h" |
3363 | + |
3364 | +#include "ac/report/logging/encoderreport.h" |
3365 | + |
3366 | +namespace ac { |
3367 | namespace report { |
3368 | namespace logging { |
3369 | |
3370 | void EncoderReport::Started() { |
3371 | - MCS_TRACE(""); |
3372 | + AC_TRACE(""); |
3373 | } |
3374 | |
3375 | void EncoderReport::Stopped() { |
3376 | - MCS_TRACE(""); |
3377 | -} |
3378 | - |
3379 | -void EncoderReport::BeganFrame(const mcs::TimestampUs ×tamp) { |
3380 | - MCS_TRACE("timestamp %lld", timestamp); |
3381 | -} |
3382 | - |
3383 | -void EncoderReport::FinishedFrame(const mcs::TimestampUs ×tamp) { |
3384 | - MCS_TRACE("timestamp %lld", timestamp); |
3385 | -} |
3386 | - |
3387 | -void EncoderReport::ReceivedInputBuffer(const mcs::TimestampUs ×tamp) { |
3388 | - MCS_TRACE("timestamp %lld", timestamp); |
3389 | + AC_TRACE(""); |
3390 | +} |
3391 | + |
3392 | +void EncoderReport::BeganFrame(const ac::TimestampUs ×tamp) { |
3393 | + AC_TRACE("timestamp %lld", timestamp); |
3394 | +} |
3395 | + |
3396 | +void EncoderReport::FinishedFrame(const ac::TimestampUs ×tamp) { |
3397 | + AC_TRACE("timestamp %lld", timestamp); |
3398 | +} |
3399 | + |
3400 | +void EncoderReport::ReceivedInputBuffer(const ac::TimestampUs ×tamp) { |
3401 | + AC_TRACE("timestamp %lld", timestamp); |
3402 | } |
3403 | |
3404 | } // namespace logging |
3405 | } // namespace report |
3406 | -} // namespace mcs |
3407 | +} // namespace ac |
3408 | |
3409 | === renamed file 'src/mcs/report/logging/encoderreport.h' => 'src/ac/report/logging/encoderreport.h' |
3410 | --- src/mcs/report/logging/encoderreport.h 2016-03-08 08:48:09 +0000 |
3411 | +++ src/ac/report/logging/encoderreport.h 2016-06-07 08:21:39 +0000 |
3412 | @@ -15,17 +15,17 @@ |
3413 | * |
3414 | */ |
3415 | |
3416 | -#ifndef MCS_REPORT_LOGGING_ENCODERREPORT_H_ |
3417 | -#define MCS_REPORT_LOGGING_ENCODERREPORT_H_ |
3418 | +#ifndef AC_REPORT_LOGGING_ENCODERREPORT_H_ |
3419 | +#define AC_REPORT_LOGGING_ENCODERREPORT_H_ |
3420 | |
3421 | #include <memory> |
3422 | |
3423 | -#include "mcs/non_copyable.h" |
3424 | -#include "mcs/utils.h" |
3425 | - |
3426 | -#include "mcs/video/encoderreport.h" |
3427 | - |
3428 | -namespace mcs { |
3429 | +#include "ac/non_copyable.h" |
3430 | +#include "ac/utils.h" |
3431 | + |
3432 | +#include "ac/video/encoderreport.h" |
3433 | + |
3434 | +namespace ac { |
3435 | namespace report { |
3436 | namespace logging { |
3437 | |
3438 | @@ -33,13 +33,13 @@ |
3439 | public: |
3440 | void Started(); |
3441 | void Stopped(); |
3442 | - void BeganFrame(const mcs::TimestampUs ×tamp); |
3443 | - void FinishedFrame(const mcs::TimestampUs ×tamp); |
3444 | - void ReceivedInputBuffer(const mcs::TimestampUs ×tamp); |
3445 | + void BeganFrame(const ac::TimestampUs ×tamp); |
3446 | + void FinishedFrame(const ac::TimestampUs ×tamp); |
3447 | + void ReceivedInputBuffer(const ac::TimestampUs ×tamp); |
3448 | }; |
3449 | |
3450 | } // namespace logging |
3451 | } // namespace report |
3452 | -} // namespace mcs |
3453 | +} // namespace ac |
3454 | |
3455 | #endif |
3456 | |
3457 | === renamed file 'src/mcs/report/logging/loggingreportfactory.cpp' => 'src/ac/report/logging/loggingreportfactory.cpp' |
3458 | --- src/mcs/report/logging/loggingreportfactory.cpp 2016-03-07 11:28:32 +0000 |
3459 | +++ src/ac/report/logging/loggingreportfactory.cpp 2016-06-07 08:21:39 +0000 |
3460 | @@ -15,13 +15,13 @@ |
3461 | * |
3462 | */ |
3463 | |
3464 | -#include "mcs/report/logging/loggingreportfactory.h" |
3465 | -#include "mcs/report/logging/encoderreport.h" |
3466 | -#include "mcs/report/logging/rendererreport.h" |
3467 | -#include "mcs/report/logging/packetizerreport.h" |
3468 | -#include "mcs/report/logging/senderreport.h" |
3469 | +#include "ac/report/logging/loggingreportfactory.h" |
3470 | +#include "ac/report/logging/encoderreport.h" |
3471 | +#include "ac/report/logging/rendererreport.h" |
3472 | +#include "ac/report/logging/packetizerreport.h" |
3473 | +#include "ac/report/logging/senderreport.h" |
3474 | |
3475 | -namespace mcs { |
3476 | +namespace ac { |
3477 | namespace report { |
3478 | |
3479 | std::shared_ptr<video::EncoderReport> LoggingReportFactory::CreateEncoderReport() { |
3480 | @@ -41,4 +41,4 @@ |
3481 | } |
3482 | |
3483 | } // namespace report |
3484 | -} // namespace mcs |
3485 | +} // namespace ac |
3486 | |
3487 | === renamed file 'src/mcs/report/logging/loggingreportfactory.h' => 'src/ac/report/logging/loggingreportfactory.h' |
3488 | --- src/mcs/report/logging/loggingreportfactory.h 2016-03-07 11:28:32 +0000 |
3489 | +++ src/ac/report/logging/loggingreportfactory.h 2016-06-07 08:21:39 +0000 |
3490 | @@ -15,16 +15,16 @@ |
3491 | * |
3492 | */ |
3493 | |
3494 | -#ifndef MCS_REPORT_LOGGINGREPORTFACTORY_H_ |
3495 | -#define MCS_REPORT_LOGGINGREPORTFACTORY_H_ |
3496 | +#ifndef AC_REPORT_LOGGINGREPORTFACTORY_H_ |
3497 | +#define AC_REPORT_LOGGINGREPORTFACTORY_H_ |
3498 | |
3499 | #include <memory> |
3500 | |
3501 | -#include "mcs/non_copyable.h" |
3502 | - |
3503 | -#include "mcs/report/reportfactory.h" |
3504 | - |
3505 | -namespace mcs { |
3506 | +#include "ac/non_copyable.h" |
3507 | + |
3508 | +#include "ac/report/reportfactory.h" |
3509 | + |
3510 | +namespace ac { |
3511 | namespace report { |
3512 | |
3513 | class LoggingReportFactory : public ReportFactory { |
3514 | @@ -36,6 +36,6 @@ |
3515 | }; |
3516 | |
3517 | } // namespace report |
3518 | -} // namespace mcs |
3519 | +} // namespace ac |
3520 | |
3521 | #endif |
3522 | |
3523 | === renamed file 'src/mcs/report/logging/packetizerreport.cpp' => 'src/ac/report/logging/packetizerreport.cpp' |
3524 | --- src/mcs/report/logging/packetizerreport.cpp 2016-03-08 08:48:09 +0000 |
3525 | +++ src/ac/report/logging/packetizerreport.cpp 2016-06-07 08:21:39 +0000 |
3526 | @@ -15,18 +15,18 @@ |
3527 | * |
3528 | */ |
3529 | |
3530 | -#include "mcs/logger.h" |
3531 | - |
3532 | -#include "mcs/report/logging/packetizerreport.h" |
3533 | - |
3534 | -namespace mcs { |
3535 | +#include "ac/logger.h" |
3536 | + |
3537 | +#include "ac/report/logging/packetizerreport.h" |
3538 | + |
3539 | +namespace ac { |
3540 | namespace report { |
3541 | namespace logging { |
3542 | |
3543 | void PacketizerReport::PacketizedFrame(const TimestampUs ×tamp) { |
3544 | - MCS_TRACE("timestamp %lld", timestamp); |
3545 | + AC_TRACE("timestamp %lld", timestamp); |
3546 | } |
3547 | |
3548 | } // namespace logging |
3549 | } // namespace report |
3550 | -} // namespace mcs |
3551 | +} // namespace ac |
3552 | |
3553 | === renamed file 'src/mcs/report/logging/packetizerreport.h' => 'src/ac/report/logging/packetizerreport.h' |
3554 | --- src/mcs/report/logging/packetizerreport.h 2016-03-08 08:48:09 +0000 |
3555 | +++ src/ac/report/logging/packetizerreport.h 2016-06-07 08:21:39 +0000 |
3556 | @@ -15,27 +15,27 @@ |
3557 | * |
3558 | */ |
3559 | |
3560 | -#ifndef MCS_REPORT_LOGGING_PACKETIZERREPORT_H_ |
3561 | -#define MCS_REPORT_LOGGING_PACKETIZERREPORT_H_ |
3562 | +#ifndef AC_REPORT_LOGGING_PACKETIZERREPORT_H_ |
3563 | +#define AC_REPORT_LOGGING_PACKETIZERREPORT_H_ |
3564 | |
3565 | #include <memory> |
3566 | |
3567 | -#include "mcs/non_copyable.h" |
3568 | -#include "mcs/utils.h" |
3569 | - |
3570 | -#include "mcs/video/packetizerreport.h" |
3571 | - |
3572 | -namespace mcs { |
3573 | +#include "ac/non_copyable.h" |
3574 | +#include "ac/utils.h" |
3575 | + |
3576 | +#include "ac/video/packetizerreport.h" |
3577 | + |
3578 | +namespace ac { |
3579 | namespace report { |
3580 | namespace logging { |
3581 | |
3582 | class PacketizerReport : public video::PacketizerReport { |
3583 | public: |
3584 | - void PacketizedFrame(const mcs::TimestampUs ×tamp); |
3585 | + void PacketizedFrame(const ac::TimestampUs ×tamp); |
3586 | }; |
3587 | |
3588 | } // namespace logging |
3589 | } // namespace report |
3590 | -} // namespace mcs |
3591 | +} // namespace ac |
3592 | |
3593 | #endif |
3594 | |
3595 | === renamed file 'src/mcs/report/logging/rendererreport.cpp' => 'src/ac/report/logging/rendererreport.cpp' |
3596 | --- src/mcs/report/logging/rendererreport.cpp 2016-03-08 08:48:09 +0000 |
3597 | +++ src/ac/report/logging/rendererreport.cpp 2016-06-07 08:21:39 +0000 |
3598 | @@ -15,11 +15,11 @@ |
3599 | * |
3600 | */ |
3601 | |
3602 | -#include "mcs/logger.h" |
3603 | - |
3604 | -#include "mcs/report/logging/rendererreport.h" |
3605 | - |
3606 | -namespace mcs { |
3607 | +#include "ac/logger.h" |
3608 | + |
3609 | +#include "ac/report/logging/rendererreport.h" |
3610 | + |
3611 | +namespace ac { |
3612 | namespace report { |
3613 | namespace logging { |
3614 | |
3615 | @@ -27,9 +27,9 @@ |
3616 | } |
3617 | |
3618 | void RendererReport::FinishedFrame(const TimestampUs ×tamp) { |
3619 | - MCS_TRACE("timestamp %lld", timestamp); |
3620 | + AC_TRACE("timestamp %lld", timestamp); |
3621 | } |
3622 | |
3623 | } // namespace logging |
3624 | } // namespace report |
3625 | -} // namespace mcs |
3626 | +} // namespace ac |
3627 | |
3628 | === renamed file 'src/mcs/report/logging/rendererreport.h' => 'src/ac/report/logging/rendererreport.h' |
3629 | --- src/mcs/report/logging/rendererreport.h 2016-03-08 08:48:09 +0000 |
3630 | +++ src/ac/report/logging/rendererreport.h 2016-06-07 08:21:39 +0000 |
3631 | @@ -15,28 +15,28 @@ |
3632 | * |
3633 | */ |
3634 | |
3635 | -#ifndef MCS_REPORT_LOGGING_RENDERERREPORT_H_ |
3636 | -#define MCS_REPORT_LOGGING_RENDERERREPORT_H_ |
3637 | +#ifndef AC_REPORT_LOGGING_RENDERERREPORT_H_ |
3638 | +#define AC_REPORT_LOGGING_RENDERERREPORT_H_ |
3639 | |
3640 | #include <memory> |
3641 | |
3642 | -#include "mcs/non_copyable.h" |
3643 | -#include "mcs/utils.h" |
3644 | - |
3645 | -#include "mcs/video/rendererreport.h" |
3646 | - |
3647 | -namespace mcs { |
3648 | +#include "ac/non_copyable.h" |
3649 | +#include "ac/utils.h" |
3650 | + |
3651 | +#include "ac/video/rendererreport.h" |
3652 | + |
3653 | +namespace ac { |
3654 | namespace report { |
3655 | namespace logging { |
3656 | |
3657 | class RendererReport : public video::RendererReport { |
3658 | public: |
3659 | void BeganFrame(); |
3660 | - void FinishedFrame(const mcs::TimestampUs ×tamp); |
3661 | + void FinishedFrame(const ac::TimestampUs ×tamp); |
3662 | }; |
3663 | |
3664 | } // namespace logging |
3665 | } // namespace report |
3666 | -} // namespace mcs |
3667 | +} // namespace ac |
3668 | |
3669 | #endif |
3670 | |
3671 | === renamed file 'src/mcs/report/logging/senderreport.cpp' => 'src/ac/report/logging/senderreport.cpp' |
3672 | --- src/mcs/report/logging/senderreport.cpp 2016-03-08 08:48:09 +0000 |
3673 | +++ src/ac/report/logging/senderreport.cpp 2016-06-07 08:21:39 +0000 |
3674 | @@ -15,18 +15,18 @@ |
3675 | * |
3676 | */ |
3677 | |
3678 | -#include "mcs/logger.h" |
3679 | - |
3680 | -#include "mcs/report/logging/senderreport.h" |
3681 | - |
3682 | -namespace mcs { |
3683 | +#include "ac/logger.h" |
3684 | + |
3685 | +#include "ac/report/logging/senderreport.h" |
3686 | + |
3687 | +namespace ac { |
3688 | namespace report { |
3689 | namespace logging { |
3690 | |
3691 | void SenderReport::SentPacket(const TimestampUs ×tamp, const size_t &size) { |
3692 | - MCS_TRACE("timestamp %lld size %d", timestamp, size); |
3693 | + AC_TRACE("timestamp %lld size %d", timestamp, size); |
3694 | } |
3695 | |
3696 | } // namespace logging |
3697 | } // namespace report |
3698 | -} // namespace mcs |
3699 | +} // namespace ac |
3700 | |
3701 | === renamed file 'src/mcs/report/logging/senderreport.h' => 'src/ac/report/logging/senderreport.h' |
3702 | --- src/mcs/report/logging/senderreport.h 2016-03-08 08:48:09 +0000 |
3703 | +++ src/ac/report/logging/senderreport.h 2016-06-07 08:21:39 +0000 |
3704 | @@ -15,27 +15,27 @@ |
3705 | * |
3706 | */ |
3707 | |
3708 | -#ifndef MCS_REPORT_LOGGING_SENDERREPORT_H_ |
3709 | -#define MCS_REPORT_LOGGING_SENDERREPORT_H_ |
3710 | +#ifndef AC_REPORT_LOGGING_SENDERREPORT_H_ |
3711 | +#define AC_REPORT_LOGGING_SENDERREPORT_H_ |
3712 | |
3713 | #include <memory> |
3714 | |
3715 | -#include "mcs/non_copyable.h" |
3716 | -#include "mcs/utils.h" |
3717 | - |
3718 | -#include "mcs/video/senderreport.h" |
3719 | - |
3720 | -namespace mcs { |
3721 | +#include "ac/non_copyable.h" |
3722 | +#include "ac/utils.h" |
3723 | + |
3724 | +#include "ac/video/senderreport.h" |
3725 | + |
3726 | +namespace ac { |
3727 | namespace report { |
3728 | namespace logging { |
3729 | |
3730 | class SenderReport : public video::SenderReport { |
3731 | public: |
3732 | - void SentPacket(const mcs::TimestampUs ×tamp, const size_t &size); |
3733 | + void SentPacket(const ac::TimestampUs ×tamp, const size_t &size); |
3734 | }; |
3735 | |
3736 | } // namespace logging |
3737 | } // namespace report |
3738 | -} // namespace mcs |
3739 | +} // namespace ac |
3740 | |
3741 | #endif |
3742 | |
3743 | === added directory 'src/ac/report/lttng' |
3744 | === renamed file 'src/mcs/report/lttng/encoderreport.cpp' => 'src/ac/report/lttng/encoderreport.cpp' |
3745 | --- src/mcs/report/lttng/encoderreport.cpp 2016-03-08 08:48:09 +0000 |
3746 | +++ src/ac/report/lttng/encoderreport.cpp 2016-06-07 08:21:39 +0000 |
3747 | @@ -15,36 +15,36 @@ |
3748 | * |
3749 | */ |
3750 | |
3751 | -#include "mcs/report/lttng/encoderreport.h" |
3752 | +#include "ac/report/lttng/encoderreport.h" |
3753 | |
3754 | #define TRACEPOINT_DEFINE |
3755 | #define TRACEPOINT_PROBE_DYNAMIC_LINKAGE |
3756 | -#include "mcs/report/lttng/encoderreport_tp.h" |
3757 | +#include "ac/report/lttng/encoderreport_tp.h" |
3758 | |
3759 | -namespace mcs { |
3760 | +namespace ac { |
3761 | namespace report { |
3762 | namespace lttng { |
3763 | |
3764 | void EncoderReport::Started() { |
3765 | - mcs_tracepoint(aethercast_encoder, started, 0); |
3766 | + ac_tracepoint(aethercast_encoder, started, 0); |
3767 | } |
3768 | |
3769 | void EncoderReport::Stopped() { |
3770 | - mcs_tracepoint(aethercast_encoder, stopped, 0); |
3771 | -} |
3772 | - |
3773 | -void EncoderReport::BeganFrame(const mcs::TimestampUs ×tamp) { |
3774 | - mcs_tracepoint(aethercast_encoder, began_frame, timestamp); |
3775 | -} |
3776 | - |
3777 | -void EncoderReport::FinishedFrame(const mcs::TimestampUs ×tamp) { |
3778 | - mcs_tracepoint(aethercast_encoder, finished_frame, timestamp); |
3779 | -} |
3780 | - |
3781 | -void EncoderReport::ReceivedInputBuffer(const mcs::TimestampUs ×tamp) { |
3782 | - mcs_tracepoint(aethercast_encoder, received_input_buffer, timestamp); |
3783 | + ac_tracepoint(aethercast_encoder, stopped, 0); |
3784 | +} |
3785 | + |
3786 | +void EncoderReport::BeganFrame(const ac::TimestampUs ×tamp) { |
3787 | + ac_tracepoint(aethercast_encoder, began_frame, timestamp); |
3788 | +} |
3789 | + |
3790 | +void EncoderReport::FinishedFrame(const ac::TimestampUs ×tamp) { |
3791 | + ac_tracepoint(aethercast_encoder, finished_frame, timestamp); |
3792 | +} |
3793 | + |
3794 | +void EncoderReport::ReceivedInputBuffer(const ac::TimestampUs ×tamp) { |
3795 | + ac_tracepoint(aethercast_encoder, received_input_buffer, timestamp); |
3796 | } |
3797 | |
3798 | } // namespace logging |
3799 | } // namespace report |
3800 | -} // namespace mcs |
3801 | +} // namespace ac |
3802 | |
3803 | === renamed file 'src/mcs/report/lttng/encoderreport.h' => 'src/ac/report/lttng/encoderreport.h' |
3804 | --- src/mcs/report/lttng/encoderreport.h 2016-03-08 08:48:09 +0000 |
3805 | +++ src/ac/report/lttng/encoderreport.h 2016-06-07 08:21:39 +0000 |
3806 | @@ -15,18 +15,18 @@ |
3807 | * |
3808 | */ |
3809 | |
3810 | -#ifndef MCS_REPORT_LTTNG_ENCODERREPORT_H_ |
3811 | -#define MCS_REPORT_LTTNG_ENCODERREPORT_H_ |
3812 | +#ifndef AC_REPORT_LTTNG_ENCODERREPORT_H_ |
3813 | +#define AC_REPORT_LTTNG_ENCODERREPORT_H_ |
3814 | |
3815 | #include <memory> |
3816 | |
3817 | -#include "mcs/non_copyable.h" |
3818 | - |
3819 | -#include "mcs/video/encoderreport.h" |
3820 | - |
3821 | -#include "mcs/report/lttng/tracepointprovider.h" |
3822 | - |
3823 | -namespace mcs { |
3824 | +#include "ac/non_copyable.h" |
3825 | + |
3826 | +#include "ac/video/encoderreport.h" |
3827 | + |
3828 | +#include "ac/report/lttng/tracepointprovider.h" |
3829 | + |
3830 | +namespace ac { |
3831 | namespace report { |
3832 | namespace lttng { |
3833 | |
3834 | @@ -34,9 +34,9 @@ |
3835 | public: |
3836 | void Started(); |
3837 | void Stopped(); |
3838 | - void BeganFrame(const mcs::TimestampUs ×tamp); |
3839 | - void FinishedFrame(const mcs::TimestampUs ×tamp); |
3840 | - void ReceivedInputBuffer(const mcs::TimestampUs ×tamp); |
3841 | + void BeganFrame(const ac::TimestampUs ×tamp); |
3842 | + void FinishedFrame(const ac::TimestampUs ×tamp); |
3843 | + void ReceivedInputBuffer(const ac::TimestampUs ×tamp); |
3844 | |
3845 | private: |
3846 | TracepointProvider tp_; |
3847 | @@ -44,6 +44,6 @@ |
3848 | |
3849 | } // namespace lttng |
3850 | } // namespace report |
3851 | -} // namespace mcs |
3852 | +} // namespace ac |
3853 | |
3854 | #endif |
3855 | |
3856 | === renamed file 'src/mcs/report/lttng/encoderreport_tp.h' => 'src/ac/report/lttng/encoderreport_tp.h' |
3857 | --- src/mcs/report/lttng/encoderreport_tp.h 2016-03-07 11:28:32 +0000 |
3858 | +++ src/ac/report/lttng/encoderreport_tp.h 2016-06-07 08:21:39 +0000 |
3859 | @@ -19,16 +19,16 @@ |
3860 | #define TRACEPOINT_PROVIDER aethercast_encoder |
3861 | |
3862 | #undef TRACEPOINT_INCLUDE |
3863 | -#define TRACEPOINT_INCLUDE "mcs/report/lttng/encoderreport_tp.h" |
3864 | - |
3865 | -#if !defined(MCS_REPORT_LTTNG_ENCODERREPORT_TP_H_) || defined(TRACEPOINT_HEADER_MULTI_READ) |
3866 | -#define MCS_REPORT_LTTNG_ENCODERREPORT_TP_H_ |
3867 | - |
3868 | -#include "mcs/report/lttng/utils.h" |
3869 | - |
3870 | -MCS_LTTNG_VOID_TRACE_CLASS(TRACEPOINT_PROVIDER) |
3871 | - |
3872 | -#define ENCODER_TRACE_POINT(name) MCS_LTTNG_VOID_TRACE_POINT(TRACEPOINT_PROVIDER, name) |
3873 | +#define TRACEPOINT_INCLUDE "ac/report/lttng/encoderreport_tp.h" |
3874 | + |
3875 | +#if !defined(AC_REPORT_LTTNG_ENCODERREPORT_TP_H_) || defined(TRACEPOINT_HEADER_MULTI_READ) |
3876 | +#define AC_REPORT_LTTNG_ENCODERREPORT_TP_H_ |
3877 | + |
3878 | +#include "ac/report/lttng/utils.h" |
3879 | + |
3880 | +AC_LTTNG_VOID_TRACE_CLASS(TRACEPOINT_PROVIDER) |
3881 | + |
3882 | +#define ENCODER_TRACE_POINT(name) AC_LTTNG_VOID_TRACE_POINT(TRACEPOINT_PROVIDER, name) |
3883 | |
3884 | ENCODER_TRACE_POINT(started) |
3885 | ENCODER_TRACE_POINT(stopped) |
3886 | |
3887 | === renamed file 'src/mcs/report/lttng/lttngreportfactory.cpp' => 'src/ac/report/lttng/lttngreportfactory.cpp' |
3888 | --- src/mcs/report/lttng/lttngreportfactory.cpp 2016-03-07 11:28:32 +0000 |
3889 | +++ src/ac/report/lttng/lttngreportfactory.cpp 2016-06-07 08:21:39 +0000 |
3890 | @@ -15,13 +15,13 @@ |
3891 | * |
3892 | */ |
3893 | |
3894 | -#include "mcs/report/lttng/lttngreportfactory.h" |
3895 | -#include "mcs/report/lttng/encoderreport.h" |
3896 | -#include "mcs/report/lttng/rendererreport.h" |
3897 | -#include "mcs/report/lttng/packetizerreport.h" |
3898 | -#include "mcs/report/lttng/senderreport.h" |
3899 | +#include "ac/report/lttng/lttngreportfactory.h" |
3900 | +#include "ac/report/lttng/encoderreport.h" |
3901 | +#include "ac/report/lttng/rendererreport.h" |
3902 | +#include "ac/report/lttng/packetizerreport.h" |
3903 | +#include "ac/report/lttng/senderreport.h" |
3904 | |
3905 | -namespace mcs { |
3906 | +namespace ac { |
3907 | namespace report { |
3908 | |
3909 | std::shared_ptr<video::EncoderReport> LttngReportFactory::CreateEncoderReport() { |
3910 | @@ -41,4 +41,4 @@ |
3911 | } |
3912 | |
3913 | } // namespace report |
3914 | -} // namespace mcs |
3915 | +} // namespace ac |
3916 | |
3917 | === renamed file 'src/mcs/report/lttng/lttngreportfactory.h' => 'src/ac/report/lttng/lttngreportfactory.h' |
3918 | --- src/mcs/report/lttng/lttngreportfactory.h 2016-03-07 11:28:32 +0000 |
3919 | +++ src/ac/report/lttng/lttngreportfactory.h 2016-06-07 08:21:39 +0000 |
3920 | @@ -15,16 +15,16 @@ |
3921 | * |
3922 | */ |
3923 | |
3924 | -#ifndef MCS_REPORT_LTTNGREPORTFACTORY_H_ |
3925 | -#define MCS_REPORT_LTTNGREPORTFACTORY_H_ |
3926 | +#ifndef AC_REPORT_LTTNGREPORTFACTORY_H_ |
3927 | +#define AC_REPORT_LTTNGREPORTFACTORY_H_ |
3928 | |
3929 | #include <memory> |
3930 | |
3931 | -#include "mcs/non_copyable.h" |
3932 | - |
3933 | -#include "mcs/report/reportfactory.h" |
3934 | - |
3935 | -namespace mcs { |
3936 | +#include "ac/non_copyable.h" |
3937 | + |
3938 | +#include "ac/report/reportfactory.h" |
3939 | + |
3940 | +namespace ac { |
3941 | namespace report { |
3942 | |
3943 | class LttngReportFactory : public ReportFactory { |
3944 | @@ -36,6 +36,6 @@ |
3945 | }; |
3946 | |
3947 | } // namespace report |
3948 | -} // namespace mcs |
3949 | +} // namespace ac |
3950 | |
3951 | #endif |
3952 | |
3953 | === renamed file 'src/mcs/report/lttng/packetizerreport.cpp' => 'src/ac/report/lttng/packetizerreport.cpp' |
3954 | --- src/mcs/report/lttng/packetizerreport.cpp 2016-03-08 08:48:09 +0000 |
3955 | +++ src/ac/report/lttng/packetizerreport.cpp 2016-06-07 08:21:39 +0000 |
3956 | @@ -15,20 +15,20 @@ |
3957 | * |
3958 | */ |
3959 | |
3960 | -#include "mcs/report/lttng/packetizerreport.h" |
3961 | +#include "ac/report/lttng/packetizerreport.h" |
3962 | |
3963 | #define TRACEPOINT_DEFINE |
3964 | #define TRACEPOINT_PROBE_DYNAMIC_LINKAGE |
3965 | -#include "mcs/report/lttng/packetizerreport_tp.h" |
3966 | +#include "ac/report/lttng/packetizerreport_tp.h" |
3967 | |
3968 | -namespace mcs { |
3969 | +namespace ac { |
3970 | namespace report { |
3971 | namespace lttng { |
3972 | |
3973 | void PacketizerReport::PacketizedFrame(const TimestampUs ×tamp) { |
3974 | - mcs_tracepoint(aethercast_packetizer, packetized_frame, timestamp); |
3975 | + ac_tracepoint(aethercast_packetizer, packetized_frame, timestamp); |
3976 | } |
3977 | |
3978 | } // namespace lttng |
3979 | } // namespace report |
3980 | -} // namespace mcs |
3981 | +} // namespace ac |
3982 | |
3983 | === renamed file 'src/mcs/report/lttng/packetizerreport.h' => 'src/ac/report/lttng/packetizerreport.h' |
3984 | --- src/mcs/report/lttng/packetizerreport.h 2016-03-08 08:48:09 +0000 |
3985 | +++ src/ac/report/lttng/packetizerreport.h 2016-06-07 08:21:39 +0000 |
3986 | @@ -15,27 +15,27 @@ |
3987 | * |
3988 | */ |
3989 | |
3990 | -#ifndef MCS_REPORT_LTTNG_PACKETIZERREPORT_H_ |
3991 | -#define MCS_REPORT_LTTNG_PACKETIZERREPORT_H_ |
3992 | +#ifndef AC_REPORT_LTTNG_PACKETIZERREPORT_H_ |
3993 | +#define AC_REPORT_LTTNG_PACKETIZERREPORT_H_ |
3994 | |
3995 | #include <memory> |
3996 | |
3997 | -#include "mcs/non_copyable.h" |
3998 | -#include "mcs/utils.h" |
3999 | - |
4000 | -#include "mcs/video/packetizerreport.h" |
4001 | - |
4002 | -namespace mcs { |
4003 | +#include "ac/non_copyable.h" |
4004 | +#include "ac/utils.h" |
4005 | + |
4006 | +#include "ac/video/packetizerreport.h" |
4007 | + |
4008 | +namespace ac { |
4009 | namespace report { |
4010 | namespace lttng { |
4011 | |
4012 | class PacketizerReport : public video::PacketizerReport { |
4013 | public: |
4014 | - void PacketizedFrame(const mcs::TimestampUs ×tamp); |
4015 | + void PacketizedFrame(const ac::TimestampUs ×tamp); |
4016 | }; |
4017 | |
4018 | } // namespace lttng |
4019 | } // namespace report |
4020 | -} // namespace mcs |
4021 | +} // namespace ac |
4022 | |
4023 | #endif |
4024 | |
4025 | === renamed file 'src/mcs/report/lttng/packetizerreport_tp.h' => 'src/ac/report/lttng/packetizerreport_tp.h' |
4026 | --- src/mcs/report/lttng/packetizerreport_tp.h 2016-03-07 11:28:32 +0000 |
4027 | +++ src/ac/report/lttng/packetizerreport_tp.h 2016-06-07 08:21:39 +0000 |
4028 | @@ -19,16 +19,16 @@ |
4029 | #define TRACEPOINT_PROVIDER aethercast_packetizer |
4030 | |
4031 | #undef TRACEPOINT_INCLUDE |
4032 | -#define TRACEPOINT_INCLUDE "mcs/report/lttng/packetizerreport_tp.h" |
4033 | - |
4034 | -#if !defined(MCS_REPORT_LTTNG_PACKETIZERREPORT_TP_H_) || defined(TRACEPOINT_HEADER_MULTI_READ) |
4035 | -#define MCS_REPORT_LTTNG_PACKETIZERREPORT_TP_H_ |
4036 | - |
4037 | -#include "mcs/report/lttng/utils.h" |
4038 | - |
4039 | -MCS_LTTNG_VOID_TRACE_CLASS(TRACEPOINT_PROVIDER) |
4040 | - |
4041 | -#define ENCODER_TRACE_POINT(name) MCS_LTTNG_VOID_TRACE_POINT(TRACEPOINT_PROVIDER, name) |
4042 | +#define TRACEPOINT_INCLUDE "ac/report/lttng/packetizerreport_tp.h" |
4043 | + |
4044 | +#if !defined(AC_REPORT_LTTNG_PACKETIZERREPORT_TP_H_) || defined(TRACEPOINT_HEADER_MULTI_READ) |
4045 | +#define AC_REPORT_LTTNG_PACKETIZERREPORT_TP_H_ |
4046 | + |
4047 | +#include "ac/report/lttng/utils.h" |
4048 | + |
4049 | +AC_LTTNG_VOID_TRACE_CLASS(TRACEPOINT_PROVIDER) |
4050 | + |
4051 | +#define ENCODER_TRACE_POINT(name) AC_LTTNG_VOID_TRACE_POINT(TRACEPOINT_PROVIDER, name) |
4052 | |
4053 | TRACEPOINT_EVENT( |
4054 | TRACEPOINT_PROVIDER, |
4055 | |
4056 | === renamed file 'src/mcs/report/lttng/rendererreport.cpp' => 'src/ac/report/lttng/rendererreport.cpp' |
4057 | --- src/mcs/report/lttng/rendererreport.cpp 2016-03-08 08:48:09 +0000 |
4058 | +++ src/ac/report/lttng/rendererreport.cpp 2016-06-07 08:21:39 +0000 |
4059 | @@ -15,24 +15,24 @@ |
4060 | * |
4061 | */ |
4062 | |
4063 | -#include "mcs/report/lttng/rendererreport.h" |
4064 | +#include "ac/report/lttng/rendererreport.h" |
4065 | |
4066 | #define TRACEPOINT_DEFINE |
4067 | #define TRACEPOINT_PROBE_DYNAMIC_LINKAGE |
4068 | -#include "mcs/report/lttng/rendererreport_tp.h" |
4069 | +#include "ac/report/lttng/rendererreport_tp.h" |
4070 | |
4071 | -namespace mcs { |
4072 | +namespace ac { |
4073 | namespace report { |
4074 | namespace lttng { |
4075 | |
4076 | void RendererReport::BeganFrame() { |
4077 | - mcs_tracepoint(aethercast_renderer, began_frame, 0); |
4078 | + ac_tracepoint(aethercast_renderer, began_frame, 0); |
4079 | } |
4080 | |
4081 | void RendererReport::FinishedFrame(const TimestampUs ×tamp) { |
4082 | - mcs_tracepoint(aethercast_renderer, finished_frame, timestamp); |
4083 | + ac_tracepoint(aethercast_renderer, finished_frame, timestamp); |
4084 | } |
4085 | |
4086 | } // namespace lttng |
4087 | } // namespace report |
4088 | -} // namespace mcs |
4089 | +} // namespace ac |
4090 | |
4091 | === renamed file 'src/mcs/report/lttng/rendererreport.h' => 'src/ac/report/lttng/rendererreport.h' |
4092 | --- src/mcs/report/lttng/rendererreport.h 2016-03-08 08:48:09 +0000 |
4093 | +++ src/ac/report/lttng/rendererreport.h 2016-06-07 08:21:39 +0000 |
4094 | @@ -15,28 +15,28 @@ |
4095 | * |
4096 | */ |
4097 | |
4098 | -#ifndef MCS_REPORT_LTTNG_RENDERERREPORT_H_ |
4099 | -#define MCS_REPORT_LTTNG_RENDERERREPORT_H_ |
4100 | +#ifndef AC_REPORT_LTTNG_RENDERERREPORT_H_ |
4101 | +#define AC_REPORT_LTTNG_RENDERERREPORT_H_ |
4102 | |
4103 | #include <memory> |
4104 | |
4105 | -#include "mcs/non_copyable.h" |
4106 | -#include "mcs/utils.h" |
4107 | - |
4108 | -#include "mcs/video/rendererreport.h" |
4109 | - |
4110 | -namespace mcs { |
4111 | +#include "ac/non_copyable.h" |
4112 | +#include "ac/utils.h" |
4113 | + |
4114 | +#include "ac/video/rendererreport.h" |
4115 | + |
4116 | +namespace ac { |
4117 | namespace report { |
4118 | namespace lttng { |
4119 | |
4120 | class RendererReport : public video::RendererReport { |
4121 | public: |
4122 | void BeganFrame(); |
4123 | - void FinishedFrame(const mcs::TimestampUs ×tamp); |
4124 | + void FinishedFrame(const ac::TimestampUs ×tamp); |
4125 | }; |
4126 | |
4127 | } // namespace lttng |
4128 | } // namespace report |
4129 | -} // namespace mcs |
4130 | +} // namespace ac |
4131 | |
4132 | #endif |
4133 | |
4134 | === renamed file 'src/mcs/report/lttng/rendererreport_tp.h' => 'src/ac/report/lttng/rendererreport_tp.h' |
4135 | --- src/mcs/report/lttng/rendererreport_tp.h 2016-03-07 11:28:32 +0000 |
4136 | +++ src/ac/report/lttng/rendererreport_tp.h 2016-06-07 08:21:39 +0000 |
4137 | @@ -19,16 +19,16 @@ |
4138 | #define TRACEPOINT_PROVIDER aethercast_renderer |
4139 | |
4140 | #undef TRACEPOINT_INCLUDE |
4141 | -#define TRACEPOINT_INCLUDE "mcs/report/lttng/rendererreport_tp.h" |
4142 | - |
4143 | -#if !defined(MCS_REPORT_LTTNG_RENDERERREPORT_TP_H_) || defined(TRACEPOINT_HEADER_MULTI_READ) |
4144 | -#define MCS_REPORT_LTTNG_RENDERERREPORT_TP_H_ |
4145 | - |
4146 | -#include "mcs/report/lttng/utils.h" |
4147 | - |
4148 | -MCS_LTTNG_VOID_TRACE_CLASS(TRACEPOINT_PROVIDER) |
4149 | - |
4150 | -#define ENCODER_TRACE_POINT(name) MCS_LTTNG_VOID_TRACE_POINT(TRACEPOINT_PROVIDER, name) |
4151 | +#define TRACEPOINT_INCLUDE "ac/report/lttng/rendererreport_tp.h" |
4152 | + |
4153 | +#if !defined(AC_REPORT_LTTNG_RENDERERREPORT_TP_H_) || defined(TRACEPOINT_HEADER_MULTI_READ) |
4154 | +#define AC_REPORT_LTTNG_RENDERERREPORT_TP_H_ |
4155 | + |
4156 | +#include "ac/report/lttng/utils.h" |
4157 | + |
4158 | +AC_LTTNG_VOID_TRACE_CLASS(TRACEPOINT_PROVIDER) |
4159 | + |
4160 | +#define ENCODER_TRACE_POINT(name) AC_LTTNG_VOID_TRACE_POINT(TRACEPOINT_PROVIDER, name) |
4161 | |
4162 | ENCODER_TRACE_POINT(began_frame) |
4163 | |
4164 | |
4165 | === renamed file 'src/mcs/report/lttng/senderreport.cpp' => 'src/ac/report/lttng/senderreport.cpp' |
4166 | --- src/mcs/report/lttng/senderreport.cpp 2016-03-08 08:48:09 +0000 |
4167 | +++ src/ac/report/lttng/senderreport.cpp 2016-06-07 08:21:39 +0000 |
4168 | @@ -15,20 +15,20 @@ |
4169 | * |
4170 | */ |
4171 | |
4172 | -#include "mcs/report/lttng/senderreport.h" |
4173 | +#include "ac/report/lttng/senderreport.h" |
4174 | |
4175 | #define TRACEPOINT_DEFINE |
4176 | #define TRACEPOINT_PROBE_DYNAMIC_LINKAGE |
4177 | -#include "mcs/report/lttng/senderreport_tp.h" |
4178 | +#include "ac/report/lttng/senderreport_tp.h" |
4179 | |
4180 | -namespace mcs { |
4181 | +namespace ac { |
4182 | namespace report { |
4183 | namespace lttng { |
4184 | |
4185 | void SenderReport::SentPacket(const TimestampUs ×tamp, const size_t &size) { |
4186 | - mcs_tracepoint(aethercast_sender, sent_packet, timestamp, size); |
4187 | + ac_tracepoint(aethercast_sender, sent_packet, timestamp, size); |
4188 | } |
4189 | |
4190 | } // namespace lttng |
4191 | } // namespace report |
4192 | -} // namespace mcs |
4193 | +} // namespace ac |
4194 | |
4195 | === renamed file 'src/mcs/report/lttng/senderreport.h' => 'src/ac/report/lttng/senderreport.h' |
4196 | --- src/mcs/report/lttng/senderreport.h 2016-03-08 08:48:09 +0000 |
4197 | +++ src/ac/report/lttng/senderreport.h 2016-06-07 08:21:39 +0000 |
4198 | @@ -15,27 +15,27 @@ |
4199 | * |
4200 | */ |
4201 | |
4202 | -#ifndef MCS_REPORT_LTTNG_SENDERREPORT_H_ |
4203 | -#define MCS_REPORT_LTTNG_SENDERREPORT_H_ |
4204 | +#ifndef AC_REPORT_LTTNG_SENDERREPORT_H_ |
4205 | +#define AC_REPORT_LTTNG_SENDERREPORT_H_ |
4206 | |
4207 | #include <memory> |
4208 | |
4209 | -#include "mcs/non_copyable.h" |
4210 | -#include "mcs/utils.h" |
4211 | - |
4212 | -#include "mcs/video/senderreport.h" |
4213 | - |
4214 | -namespace mcs { |
4215 | +#include "ac/non_copyable.h" |
4216 | +#include "ac/utils.h" |
4217 | + |
4218 | +#include "ac/video/senderreport.h" |
4219 | + |
4220 | +namespace ac { |
4221 | namespace report { |
4222 | namespace lttng { |
4223 | |
4224 | class SenderReport : public video::SenderReport { |
4225 | public: |
4226 | - void SentPacket(const mcs::TimestampUs ×tamp, const size_t &size); |
4227 | + void SentPacket(const ac::TimestampUs ×tamp, const size_t &size); |
4228 | }; |
4229 | |
4230 | } // namespace lttng |
4231 | } // namespace report |
4232 | -} // namespace mcs |
4233 | +} // namespace ac |
4234 | |
4235 | #endif |
4236 | |
4237 | === renamed file 'src/mcs/report/lttng/senderreport_tp.h' => 'src/ac/report/lttng/senderreport_tp.h' |
4238 | --- src/mcs/report/lttng/senderreport_tp.h 2016-03-07 11:28:32 +0000 |
4239 | +++ src/ac/report/lttng/senderreport_tp.h 2016-06-07 08:21:39 +0000 |
4240 | @@ -19,16 +19,16 @@ |
4241 | #define TRACEPOINT_PROVIDER aethercast_sender |
4242 | |
4243 | #undef TRACEPOINT_INCLUDE |
4244 | -#define TRACEPOINT_INCLUDE "mcs/report/lttng/senderreport_tp.h" |
4245 | - |
4246 | -#if !defined(MCS_REPORT_LTTNG_SENDERREPORT_TP_H_) || defined(TRACEPOINT_HEADER_MULTI_READ) |
4247 | -#define MCS_REPORT_LTTNG_SENDERREPORT_TP_H_ |
4248 | - |
4249 | -#include "mcs/report/lttng/utils.h" |
4250 | - |
4251 | -MCS_LTTNG_VOID_TRACE_CLASS(TRACEPOINT_PROVIDER) |
4252 | - |
4253 | -#define ENCODER_TRACE_POINT(name) MCS_LTTNG_VOID_TRACE_POINT(TRACEPOINT_PROVIDER, name) |
4254 | +#define TRACEPOINT_INCLUDE "ac/report/lttng/senderreport_tp.h" |
4255 | + |
4256 | +#if !defined(AC_REPORT_LTTNG_SENDERREPORT_TP_H_) || defined(TRACEPOINT_HEADER_MULTI_READ) |
4257 | +#define AC_REPORT_LTTNG_SENDERREPORT_TP_H_ |
4258 | + |
4259 | +#include "ac/report/lttng/utils.h" |
4260 | + |
4261 | +AC_LTTNG_VOID_TRACE_CLASS(TRACEPOINT_PROVIDER) |
4262 | + |
4263 | +#define ENCODER_TRACE_POINT(name) AC_LTTNG_VOID_TRACE_POINT(TRACEPOINT_PROVIDER, name) |
4264 | |
4265 | TRACEPOINT_EVENT( |
4266 | TRACEPOINT_PROVIDER, |
4267 | |
4268 | === renamed file 'src/mcs/report/lttng/tracepointprovider.cpp' => 'src/ac/report/lttng/tracepointprovider.cpp' |
4269 | --- src/mcs/report/lttng/tracepointprovider.cpp 2016-03-04 11:16:27 +0000 |
4270 | +++ src/ac/report/lttng/tracepointprovider.cpp 2016-06-07 08:21:39 +0000 |
4271 | @@ -19,7 +19,7 @@ |
4272 | |
4273 | #include <boost/throw_exception.hpp> |
4274 | |
4275 | -#include "mcs/report/lttng/tracepointprovider.h" |
4276 | +#include "ac/report/lttng/tracepointprovider.h" |
4277 | |
4278 | namespace |
4279 | { |
4280 | @@ -44,7 +44,7 @@ |
4281 | } |
4282 | } |
4283 | |
4284 | -namespace mcs { |
4285 | +namespace ac { |
4286 | namespace report { |
4287 | namespace lttng { |
4288 | |
4289 | @@ -58,4 +58,4 @@ |
4290 | |
4291 | } // namespace lttng |
4292 | } // namespace report |
4293 | -} // namespace mcs |
4294 | +} // namespace ac |
4295 | |
4296 | === renamed file 'src/mcs/report/lttng/tracepointprovider.h' => 'src/ac/report/lttng/tracepointprovider.h' |
4297 | --- src/mcs/report/lttng/tracepointprovider.h 2016-03-04 11:16:27 +0000 |
4298 | +++ src/ac/report/lttng/tracepointprovider.h 2016-06-07 08:21:39 +0000 |
4299 | @@ -15,18 +15,18 @@ |
4300 | * |
4301 | */ |
4302 | |
4303 | -#ifndef MCS_REPORT_LTTNG_TRACEPOINTPROVIDER_H_ |
4304 | -#define MCS_REPORT_LTTNG_TRACEPOINTPROVIDER_H_ |
4305 | +#ifndef AC_REPORT_LTTNG_TRACEPOINTPROVIDER_H_ |
4306 | +#define AC_REPORT_LTTNG_TRACEPOINTPROVIDER_H_ |
4307 | |
4308 | #include <memory> |
4309 | |
4310 | -#include "mcs/non_copyable.h" |
4311 | +#include "ac/non_copyable.h" |
4312 | |
4313 | -namespace mcs { |
4314 | +namespace ac { |
4315 | namespace report { |
4316 | namespace lttng { |
4317 | |
4318 | -class TracepointProvider : public mcs::NonCopyable { |
4319 | +class TracepointProvider : public ac::NonCopyable { |
4320 | public: |
4321 | TracepointProvider(); |
4322 | virtual ~TracepointProvider(); |
4323 | @@ -37,6 +37,6 @@ |
4324 | |
4325 | } // namespace lttng |
4326 | } // namespace report |
4327 | -} // namespace mcs |
4328 | +} // namespace ac |
4329 | |
4330 | #endif |
4331 | |
4332 | === renamed file 'src/mcs/report/lttng/tracepoints.c' => 'src/ac/report/lttng/tracepoints.c' |
4333 | === renamed file 'src/mcs/report/lttng/utils.h' => 'src/ac/report/lttng/utils.h' |
4334 | --- src/mcs/report/lttng/utils.h 2016-03-04 11:16:27 +0000 |
4335 | +++ src/ac/report/lttng/utils.h 2016-06-07 08:21:39 +0000 |
4336 | @@ -19,14 +19,14 @@ |
4337 | #include <lttng/tracepoint.h> |
4338 | #include <stdint.h> |
4339 | |
4340 | -#ifndef MCS_REPORT_LTTNG_UTILS_H_ |
4341 | -#define MCS_REPORT_LTTNG_UTILS_H_ |
4342 | +#ifndef AC_REPORT_LTTNG_UTILS_H_ |
4343 | +#define AC_REPORT_LTTNG_UTILS_H_ |
4344 | |
4345 | -#define MCS_LTTNG_VOID_TRACE_CLASS(comp) \ |
4346 | +#define AC_LTTNG_VOID_TRACE_CLASS(comp) \ |
4347 | TRACEPOINT_EVENT_CLASS(comp, dummy_event, TP_ARGS(int,empty), TP_FIELDS(ctf_integer(int,empty,empty))) |
4348 | -#define MCS_LTTNG_VOID_TRACE_POINT(comp, name) \ |
4349 | +#define AC_LTTNG_VOID_TRACE_POINT(comp, name) \ |
4350 | TRACEPOINT_EVENT_INSTANCE(comp, dummy_event, name, TP_ARGS(int,empty)) |
4351 | |
4352 | -#define mcs_tracepoint(c, ...) tracepoint(c, __VA_ARGS__) |
4353 | +#define ac_tracepoint(c, ...) tracepoint(c, __VA_ARGS__) |
4354 | |
4355 | #endif |
4356 | |
4357 | === added directory 'src/ac/report/null' |
4358 | === renamed file 'src/mcs/report/null/encoderreport.cpp' => 'src/ac/report/null/encoderreport.cpp' |
4359 | --- src/mcs/report/null/encoderreport.cpp 2016-03-08 08:48:09 +0000 |
4360 | +++ src/ac/report/null/encoderreport.cpp 2016-06-07 08:21:39 +0000 |
4361 | @@ -17,9 +17,9 @@ |
4362 | |
4363 | #include <boost/concept_check.hpp> |
4364 | |
4365 | -#include "mcs/report/null/encoderreport.h" |
4366 | +#include "ac/report/null/encoderreport.h" |
4367 | |
4368 | -namespace mcs { |
4369 | +namespace ac { |
4370 | namespace report { |
4371 | namespace null { |
4372 | |
4373 | @@ -29,18 +29,18 @@ |
4374 | void EncoderReport::Stopped() { |
4375 | } |
4376 | |
4377 | -void EncoderReport::BeganFrame(const mcs::TimestampUs ×tamp) { |
4378 | - boost::ignore_unused_variable_warning(timestamp); |
4379 | -} |
4380 | - |
4381 | -void EncoderReport::FinishedFrame(const mcs::TimestampUs ×tamp) { |
4382 | - boost::ignore_unused_variable_warning(timestamp); |
4383 | -} |
4384 | - |
4385 | -void EncoderReport::ReceivedInputBuffer(const mcs::TimestampUs ×tamp) { |
4386 | +void EncoderReport::BeganFrame(const ac::TimestampUs ×tamp) { |
4387 | + boost::ignore_unused_variable_warning(timestamp); |
4388 | +} |
4389 | + |
4390 | +void EncoderReport::FinishedFrame(const ac::TimestampUs ×tamp) { |
4391 | + boost::ignore_unused_variable_warning(timestamp); |
4392 | +} |
4393 | + |
4394 | +void EncoderReport::ReceivedInputBuffer(const ac::TimestampUs ×tamp) { |
4395 | boost::ignore_unused_variable_warning(timestamp); |
4396 | } |
4397 | |
4398 | } // namespace null |
4399 | } // namespace report |
4400 | -} // namespace mcs |
4401 | +} // namespace ac |
4402 | |
4403 | === renamed file 'src/mcs/report/null/encoderreport.h' => 'src/ac/report/null/encoderreport.h' |
4404 | --- src/mcs/report/null/encoderreport.h 2016-03-08 08:48:09 +0000 |
4405 | +++ src/ac/report/null/encoderreport.h 2016-06-07 08:21:39 +0000 |
4406 | @@ -15,16 +15,16 @@ |
4407 | * |
4408 | */ |
4409 | |
4410 | -#ifndef MCS_REPORT_NULL_ENCODERREPORT_H_ |
4411 | -#define MCS_REPORT_NULL_ENCODERREPORT_H_ |
4412 | +#ifndef AC_REPORT_NULL_ENCODERREPORT_H_ |
4413 | +#define AC_REPORT_NULL_ENCODERREPORT_H_ |
4414 | |
4415 | #include <memory> |
4416 | |
4417 | -#include "mcs/non_copyable.h" |
4418 | - |
4419 | -#include "mcs/video/encoderreport.h" |
4420 | - |
4421 | -namespace mcs { |
4422 | +#include "ac/non_copyable.h" |
4423 | + |
4424 | +#include "ac/video/encoderreport.h" |
4425 | + |
4426 | +namespace ac { |
4427 | namespace report { |
4428 | namespace null { |
4429 | |
4430 | @@ -32,13 +32,13 @@ |
4431 | public: |
4432 | void Started(); |
4433 | void Stopped(); |
4434 | - void BeganFrame(const mcs::TimestampUs ×tamp); |
4435 | - void FinishedFrame(const mcs::TimestampUs ×tamp); |
4436 | - void ReceivedInputBuffer(const mcs::TimestampUs ×tamp); |
4437 | + void BeganFrame(const ac::TimestampUs ×tamp); |
4438 | + void FinishedFrame(const ac::TimestampUs ×tamp); |
4439 | + void ReceivedInputBuffer(const ac::TimestampUs ×tamp); |
4440 | }; |
4441 | |
4442 | } // namespace null |
4443 | } // namespace report |
4444 | -} // namespace mcs |
4445 | +} // namespace ac |
4446 | |
4447 | #endif |
4448 | |
4449 | === renamed file 'src/mcs/report/null/nullreportfactory.cpp' => 'src/ac/report/null/nullreportfactory.cpp' |
4450 | --- src/mcs/report/null/nullreportfactory.cpp 2016-03-07 11:28:32 +0000 |
4451 | +++ src/ac/report/null/nullreportfactory.cpp 2016-06-07 08:21:39 +0000 |
4452 | @@ -15,13 +15,13 @@ |
4453 | * |
4454 | */ |
4455 | |
4456 | -#include "mcs/report/null/nullreportfactory.h" |
4457 | -#include "mcs/report/null/encoderreport.h" |
4458 | -#include "mcs/report/null/rendererreport.h" |
4459 | -#include "mcs/report/null/packetizerreport.h" |
4460 | -#include "mcs/report/null/senderreport.h" |
4461 | +#include "ac/report/null/nullreportfactory.h" |
4462 | +#include "ac/report/null/encoderreport.h" |
4463 | +#include "ac/report/null/rendererreport.h" |
4464 | +#include "ac/report/null/packetizerreport.h" |
4465 | +#include "ac/report/null/senderreport.h" |
4466 | |
4467 | -namespace mcs { |
4468 | +namespace ac { |
4469 | namespace report { |
4470 | |
4471 | std::shared_ptr<video::EncoderReport> NullReportFactory::CreateEncoderReport() { |
4472 | @@ -41,4 +41,4 @@ |
4473 | } |
4474 | |
4475 | } // namespace report |
4476 | -} // namespace mcs |
4477 | +} // namespace ac |
4478 | |
4479 | === renamed file 'src/mcs/report/null/nullreportfactory.h' => 'src/ac/report/null/nullreportfactory.h' |
4480 | --- src/mcs/report/null/nullreportfactory.h 2016-03-07 11:28:32 +0000 |
4481 | +++ src/ac/report/null/nullreportfactory.h 2016-06-07 08:21:39 +0000 |
4482 | @@ -15,16 +15,16 @@ |
4483 | * |
4484 | */ |
4485 | |
4486 | -#ifndef MCS_REPORT_NULLREPORTFACTORY_H_ |
4487 | -#define MCS_REPORT_NULLREPORTFACTORY_H_ |
4488 | +#ifndef AC_REPORT_NULLREPORTFACTORY_H_ |
4489 | +#define AC_REPORT_NULLREPORTFACTORY_H_ |
4490 | |
4491 | #include <memory> |
4492 | |
4493 | -#include "mcs/non_copyable.h" |
4494 | - |
4495 | -#include "mcs/report/reportfactory.h" |
4496 | - |
4497 | -namespace mcs { |
4498 | +#include "ac/non_copyable.h" |
4499 | + |
4500 | +#include "ac/report/reportfactory.h" |
4501 | + |
4502 | +namespace ac { |
4503 | namespace report { |
4504 | |
4505 | class NullReportFactory : public ReportFactory { |
4506 | @@ -36,6 +36,6 @@ |
4507 | }; |
4508 | |
4509 | } // namespace report |
4510 | -} // namespace mcs |
4511 | +} // namespace ac |
4512 | |
4513 | #endif |
4514 | |
4515 | === renamed file 'src/mcs/report/null/packetizerreport.cpp' => 'src/ac/report/null/packetizerreport.cpp' |
4516 | --- src/mcs/report/null/packetizerreport.cpp 2016-03-23 13:09:04 +0000 |
4517 | +++ src/ac/report/null/packetizerreport.cpp 2016-06-07 08:21:39 +0000 |
4518 | @@ -17,9 +17,9 @@ |
4519 | |
4520 | #include <boost/concept_check.hpp> |
4521 | |
4522 | -#include "mcs/report/null/packetizerreport.h" |
4523 | +#include "ac/report/null/packetizerreport.h" |
4524 | |
4525 | -namespace mcs { |
4526 | +namespace ac { |
4527 | namespace report { |
4528 | namespace null { |
4529 | |
4530 | @@ -29,4 +29,4 @@ |
4531 | |
4532 | } // namespace null |
4533 | } // namespace report |
4534 | -} // namespace mcs |
4535 | +} // namespace ac |
4536 | |
4537 | === renamed file 'src/mcs/report/null/packetizerreport.h' => 'src/ac/report/null/packetizerreport.h' |
4538 | --- src/mcs/report/null/packetizerreport.h 2016-03-08 08:48:09 +0000 |
4539 | +++ src/ac/report/null/packetizerreport.h 2016-06-07 08:21:39 +0000 |
4540 | @@ -15,27 +15,27 @@ |
4541 | * |
4542 | */ |
4543 | |
4544 | -#ifndef MCS_REPORT_NULL_PACKETIZERREPORT_H_ |
4545 | -#define MCS_REPORT_NULL_PACKETIZERREPORT_H_ |
4546 | +#ifndef AC_REPORT_NULL_PACKETIZERREPORT_H_ |
4547 | +#define AC_REPORT_NULL_PACKETIZERREPORT_H_ |
4548 | |
4549 | #include <memory> |
4550 | |
4551 | -#include "mcs/non_copyable.h" |
4552 | -#include "mcs/utils.h" |
4553 | - |
4554 | -#include "mcs/video/packetizerreport.h" |
4555 | - |
4556 | -namespace mcs { |
4557 | +#include "ac/non_copyable.h" |
4558 | +#include "ac/utils.h" |
4559 | + |
4560 | +#include "ac/video/packetizerreport.h" |
4561 | + |
4562 | +namespace ac { |
4563 | namespace report { |
4564 | namespace null { |
4565 | |
4566 | class PacketizerReport : public video::PacketizerReport { |
4567 | public: |
4568 | - void PacketizedFrame(const mcs::TimestampUs ×tamp); |
4569 | + void PacketizedFrame(const ac::TimestampUs ×tamp); |
4570 | }; |
4571 | |
4572 | } // namespace null |
4573 | } // namespace report |
4574 | -} // namespace mcs |
4575 | +} // namespace ac |
4576 | |
4577 | #endif |
4578 | |
4579 | === renamed file 'src/mcs/report/null/rendererreport.cpp' => 'src/ac/report/null/rendererreport.cpp' |
4580 | --- src/mcs/report/null/rendererreport.cpp 2016-03-23 13:09:04 +0000 |
4581 | +++ src/ac/report/null/rendererreport.cpp 2016-06-07 08:21:39 +0000 |
4582 | @@ -17,9 +17,9 @@ |
4583 | |
4584 | #include <boost/concept_check.hpp> |
4585 | |
4586 | -#include "mcs/report/null/rendererreport.h" |
4587 | +#include "ac/report/null/rendererreport.h" |
4588 | |
4589 | -namespace mcs { |
4590 | +namespace ac { |
4591 | namespace report { |
4592 | namespace null { |
4593 | |
4594 | @@ -32,4 +32,4 @@ |
4595 | |
4596 | } // namespace null |
4597 | } // namespace report |
4598 | -} // namespace mcs |
4599 | +} // namespace ac |
4600 | |
4601 | === renamed file 'src/mcs/report/null/rendererreport.h' => 'src/ac/report/null/rendererreport.h' |
4602 | --- src/mcs/report/null/rendererreport.h 2016-03-08 08:48:09 +0000 |
4603 | +++ src/ac/report/null/rendererreport.h 2016-06-07 08:21:39 +0000 |
4604 | @@ -15,28 +15,28 @@ |
4605 | * |
4606 | */ |
4607 | |
4608 | -#ifndef MCS_REPORT_NULL_RENDERERREPORT_H_ |
4609 | -#define MCS_REPORT_NULL_RENDERERREPORT_H_ |
4610 | +#ifndef AC_REPORT_NULL_RENDERERREPORT_H_ |
4611 | +#define AC_REPORT_NULL_RENDERERREPORT_H_ |
4612 | |
4613 | #include <memory> |
4614 | |
4615 | -#include "mcs/non_copyable.h" |
4616 | -#include "mcs/utils.h" |
4617 | - |
4618 | -#include "mcs/video/rendererreport.h" |
4619 | - |
4620 | -namespace mcs { |
4621 | +#include "ac/non_copyable.h" |
4622 | +#include "ac/utils.h" |
4623 | + |
4624 | +#include "ac/video/rendererreport.h" |
4625 | + |
4626 | +namespace ac { |
4627 | namespace report { |
4628 | namespace null { |
4629 | |
4630 | class RendererReport : public video::RendererReport { |
4631 | public: |
4632 | void BeganFrame(); |
4633 | - void FinishedFrame(const mcs::TimestampUs ×tamp); |
4634 | + void FinishedFrame(const ac::TimestampUs ×tamp); |
4635 | }; |
4636 | |
4637 | } // namespace null |
4638 | } // namespace report |
4639 | -} // namespace mcs |
4640 | +} // namespace ac |
4641 | |
4642 | #endif |
4643 | |
4644 | === renamed file 'src/mcs/report/null/senderreport.cpp' => 'src/ac/report/null/senderreport.cpp' |
4645 | --- src/mcs/report/null/senderreport.cpp 2016-03-23 13:09:04 +0000 |
4646 | +++ src/ac/report/null/senderreport.cpp 2016-06-07 08:21:39 +0000 |
4647 | @@ -17,11 +17,11 @@ |
4648 | |
4649 | #include <boost/concept_check.hpp> |
4650 | |
4651 | -#include "mcs/logger.h" |
4652 | - |
4653 | -#include "mcs/report/null/senderreport.h" |
4654 | - |
4655 | -namespace mcs { |
4656 | +#include "ac/logger.h" |
4657 | + |
4658 | +#include "ac/report/null/senderreport.h" |
4659 | + |
4660 | +namespace ac { |
4661 | namespace report { |
4662 | namespace null { |
4663 | |
4664 | @@ -32,4 +32,4 @@ |
4665 | |
4666 | } // namespace null |
4667 | } // namespace report |
4668 | -} // namespace mcs |
4669 | +} // namespace ac |
4670 | |
4671 | === renamed file 'src/mcs/report/null/senderreport.h' => 'src/ac/report/null/senderreport.h' |
4672 | --- src/mcs/report/null/senderreport.h 2016-03-08 08:48:09 +0000 |
4673 | +++ src/ac/report/null/senderreport.h 2016-06-07 08:21:39 +0000 |
4674 | @@ -15,27 +15,27 @@ |
4675 | * |
4676 | */ |
4677 | |
4678 | -#ifndef MCS_REPORT_NULL_SENDERREPORT_H_ |
4679 | -#define MCS_REPORT_NULL_SENDERREPORT_H_ |
4680 | +#ifndef AC_REPORT_NULL_SENDERREPORT_H_ |
4681 | +#define AC_REPORT_NULL_SENDERREPORT_H_ |
4682 | |
4683 | #include <memory> |
4684 | |
4685 | -#include "mcs/non_copyable.h" |
4686 | -#include "mcs/utils.h" |
4687 | - |
4688 | -#include "mcs/video/senderreport.h" |
4689 | - |
4690 | -namespace mcs { |
4691 | +#include "ac/non_copyable.h" |
4692 | +#include "ac/utils.h" |
4693 | + |
4694 | +#include "ac/video/senderreport.h" |
4695 | + |
4696 | +namespace ac { |
4697 | namespace report { |
4698 | namespace null { |
4699 | |
4700 | class SenderReport : public video::SenderReport { |
4701 | public: |
4702 | - void SentPacket(const mcs::TimestampUs ×tamp, const size_t &size); |
4703 | + void SentPacket(const ac::TimestampUs ×tamp, const size_t &size); |
4704 | }; |
4705 | |
4706 | } // namespace null |
4707 | } // namespace report |
4708 | -} // namespace mcs |
4709 | +} // namespace ac |
4710 | |
4711 | #endif |
4712 | |
4713 | === renamed file 'src/mcs/report/reportfactory.cpp' => 'src/ac/report/reportfactory.cpp' |
4714 | --- src/mcs/report/reportfactory.cpp 2016-03-17 15:31:21 +0000 |
4715 | +++ src/ac/report/reportfactory.cpp 2016-06-07 08:21:39 +0000 |
4716 | @@ -15,18 +15,18 @@ |
4717 | * |
4718 | */ |
4719 | |
4720 | -#include "mcs/utils.h" |
4721 | - |
4722 | -#include "mcs/report/reportfactory.h" |
4723 | -#include "mcs/report/null/nullreportfactory.h" |
4724 | -#include "mcs/report/logging/loggingreportfactory.h" |
4725 | -#include "mcs/report/lttng/lttngreportfactory.h" |
4726 | - |
4727 | -namespace mcs { |
4728 | +#include "ac/utils.h" |
4729 | + |
4730 | +#include "ac/report/reportfactory.h" |
4731 | +#include "ac/report/null/nullreportfactory.h" |
4732 | +#include "ac/report/logging/loggingreportfactory.h" |
4733 | +#include "ac/report/lttng/lttngreportfactory.h" |
4734 | + |
4735 | +namespace ac { |
4736 | namespace report { |
4737 | |
4738 | ReportFactory::Ptr ReportFactory::Create() { |
4739 | - std::string type = mcs::Utils::GetEnvValue("AETHERCAST_REPORT_TYPE"); |
4740 | + std::string type = ac::Utils::GetEnvValue("AETHERCAST_REPORT_TYPE"); |
4741 | |
4742 | if (type == "log") |
4743 | return std::make_shared<LoggingReportFactory>(); |
4744 | @@ -37,4 +37,4 @@ |
4745 | } |
4746 | |
4747 | } // namespace report |
4748 | -} // namespace mcs |
4749 | +} // namespace ac |
4750 | |
4751 | === renamed file 'src/mcs/report/reportfactory.h' => 'src/ac/report/reportfactory.h' |
4752 | --- src/mcs/report/reportfactory.h 2016-03-17 15:31:21 +0000 |
4753 | +++ src/ac/report/reportfactory.h 2016-06-07 08:21:39 +0000 |
4754 | @@ -15,22 +15,22 @@ |
4755 | * |
4756 | */ |
4757 | |
4758 | -#ifndef MCS_REPORT_REPORTFACTORY_H_ |
4759 | -#define MCS_REPORT_REPORTFACTORY_H_ |
4760 | +#ifndef AC_REPORT_REPORTFACTORY_H_ |
4761 | +#define AC_REPORT_REPORTFACTORY_H_ |
4762 | |
4763 | #include <memory> |
4764 | |
4765 | -#include "mcs/non_copyable.h" |
4766 | - |
4767 | -#include "mcs/video/encoderreport.h" |
4768 | -#include "mcs/video/rendererreport.h" |
4769 | -#include "mcs/video/packetizerreport.h" |
4770 | -#include "mcs/video/senderreport.h" |
4771 | - |
4772 | -namespace mcs { |
4773 | +#include "ac/non_copyable.h" |
4774 | + |
4775 | +#include "ac/video/encoderreport.h" |
4776 | +#include "ac/video/rendererreport.h" |
4777 | +#include "ac/video/packetizerreport.h" |
4778 | +#include "ac/video/senderreport.h" |
4779 | + |
4780 | +namespace ac { |
4781 | namespace report { |
4782 | |
4783 | -class ReportFactory : public mcs::NonCopyable { |
4784 | +class ReportFactory : public ac::NonCopyable { |
4785 | public: |
4786 | typedef std::shared_ptr<ReportFactory> Ptr; |
4787 | |
4788 | @@ -43,6 +43,6 @@ |
4789 | }; |
4790 | |
4791 | } // namespace report |
4792 | -} // namespace mcs |
4793 | +} // namespace ac |
4794 | |
4795 | #endif |
4796 | |
4797 | === renamed file 'src/mcs/scoped_gobject.h' => 'src/ac/scoped_gobject.h' |
4798 | --- src/mcs/scoped_gobject.h 2016-03-23 09:03:50 +0000 |
4799 | +++ src/ac/scoped_gobject.h 2016-06-07 08:21:39 +0000 |
4800 | @@ -20,10 +20,10 @@ |
4801 | |
4802 | #include <memory> |
4803 | |
4804 | -#include "mcs/glib_wrapper.h" |
4805 | -#include "mcs/gobject_deleter.h" |
4806 | +#include "ac/glib_wrapper.h" |
4807 | +#include "ac/gobject_deleter.h" |
4808 | |
4809 | -namespace mcs { |
4810 | +namespace ac { |
4811 | // A ScopedGObject instance handles raw GObject instances |
4812 | // and automatically cleans them up on destruction. |
4813 | template<typename T> |
4814 | |
4815 | === renamed file 'src/mcs/miracastservice.cpp' => 'src/ac/service.cpp' |
4816 | --- src/mcs/miracastservice.cpp 2016-04-27 12:30:28 +0000 |
4817 | +++ src/ac/service.cpp 2016-06-07 08:21:39 +0000 |
4818 | @@ -30,14 +30,15 @@ |
4819 | |
4820 | #include <wds/logging.h> |
4821 | |
4822 | -#include "mcs/config.h" |
4823 | -#include "keep_alive.h" |
4824 | -#include "logger.h" |
4825 | -#include "miracastservice.h" |
4826 | -#include "miracastcontrollerskeleton.h" |
4827 | -#include "networkmanagerfactory.h" |
4828 | -#include "types.h" |
4829 | -#include "logging.h" |
4830 | +#include "ac/config.h" |
4831 | +#include "ac/keep_alive.h" |
4832 | +#include "ac/logger.h" |
4833 | +#include "ac/service.h" |
4834 | +#include "ac/networkmanagerfactory.h" |
4835 | +#include "ac/types.h" |
4836 | +#include "ac/logger.h" |
4837 | + |
4838 | +#include "ac/dbus/controllerskeleton.h" |
4839 | |
4840 | namespace { |
4841 | // TODO(morphis, tvoss): Expose the port as a construction-time parameter. |
4842 | @@ -47,7 +48,7 @@ |
4843 | const std::int16_t kProcessPriorityUrgentDisplay{-8}; |
4844 | |
4845 | // SafeLog serves as integration point to the wds::LogSystem world. |
4846 | -template <mcs::Logger::Severity severity> |
4847 | +template <ac::Logger::Severity severity> |
4848 | void SafeLog (const char *format, ...) |
4849 | { |
4850 | static constexpr const std::size_t kBufferSize{256}; |
4851 | @@ -56,12 +57,12 @@ |
4852 | va_list args; |
4853 | va_start(args, format); |
4854 | std::vsnprintf(buffer, kBufferSize, format, args); |
4855 | - mcs::Log().Log(severity, std::string{buffer}, boost::optional<mcs::Logger::Location>{}); |
4856 | + ac::Log().Log(severity, std::string{buffer}, boost::optional<ac::Logger::Location>{}); |
4857 | va_end (args); |
4858 | } |
4859 | } |
4860 | -namespace mcs { |
4861 | -MiracastService::MainOptions MiracastService::MainOptions::FromCommandLine(int argc, char** argv) { |
4862 | +namespace ac { |
4863 | +Service::MainOptions Service::MainOptions::FromCommandLine(int argc, char** argv) { |
4864 | static gboolean option_debug{FALSE}; |
4865 | static gboolean option_version{FALSE}; |
4866 | |
4867 | @@ -88,14 +89,14 @@ |
4868 | return MainOptions{option_debug == TRUE, option_version == TRUE}; |
4869 | } |
4870 | |
4871 | -int MiracastService::Main(const MiracastService::MainOptions &options) { |
4872 | +int Service::Main(const Service::MainOptions &options) { |
4873 | if (options.print_version) { |
4874 | - std::printf("%d.%d\n", MiracastService::kVersionMajor, MiracastService::kVersionMinor); |
4875 | + std::printf("%d.%d\n", Service::kVersionMajor, Service::kVersionMinor); |
4876 | return 0; |
4877 | } |
4878 | |
4879 | if (options.debug) |
4880 | - mcs::Log().Init(mcs::Logger::Severity::kDebug); |
4881 | + ac::Log().Init(ac::Logger::Severity::kDebug); |
4882 | |
4883 | struct Runtime { |
4884 | static gboolean OnSignalRaised(gpointer user_data) { |
4885 | @@ -105,7 +106,7 @@ |
4886 | // things a small amount of time to perform their shutdown jobs. |
4887 | thiz->service->Shutdown(); |
4888 | |
4889 | - MCS_DEBUG("Exiting"); |
4890 | + AC_DEBUG("Exiting"); |
4891 | |
4892 | g_timeout_add_seconds(kShutdownGracePreriod.count(), [](gpointer user_data) { |
4893 | auto thiz = static_cast<Runtime*>(user_data); |
4894 | @@ -126,10 +127,10 @@ |
4895 | g_unix_signal_add(SIGTERM, OnSignalRaised, this); |
4896 | |
4897 | // Redirect all wds logging to our own. |
4898 | - wds::LogSystem::set_vlog_func(SafeLog<mcs::Logger::Severity::kTrace>); |
4899 | - wds::LogSystem::set_log_func(SafeLog<mcs::Logger::Severity::kInfo>); |
4900 | - wds::LogSystem::set_warning_func(SafeLog<mcs::Logger::Severity::kWarning>); |
4901 | - wds::LogSystem::set_error_func(SafeLog<mcs::Logger::Severity::kError>); |
4902 | + wds::LogSystem::set_vlog_func(SafeLog<ac::Logger::Severity::kTrace>); |
4903 | + wds::LogSystem::set_log_func(SafeLog<ac::Logger::Severity::kInfo>); |
4904 | + wds::LogSystem::set_warning_func(SafeLog<ac::Logger::Severity::kWarning>); |
4905 | + wds::LogSystem::set_error_func(SafeLog<ac::Logger::Severity::kError>); |
4906 | |
4907 | // Redirect all g* logging to our own. |
4908 | g_log_set_default_handler([](const gchar *domain, GLogLevelFlags log_level, const gchar *msg, gpointer) { |
4909 | @@ -162,8 +163,8 @@ |
4910 | // Raise our process priority to be as fast as possible |
4911 | setpriority(PRIO_PROCESS, 0, kProcessPriorityUrgentDisplay); |
4912 | |
4913 | - service = mcs::MiracastService::Create(); |
4914 | - mcsa = mcs::MiracastControllerSkeleton::create(service); |
4915 | + service = ac::Service::Create(); |
4916 | + controller_skeleton = ac::dbus::ControllerSkeleton::Create(service); |
4917 | } |
4918 | |
4919 | ~Runtime() { |
4920 | @@ -175,8 +176,8 @@ |
4921 | } |
4922 | |
4923 | GMainLoop *ml = g_main_loop_new(nullptr, FALSE); |
4924 | - mcs::MiracastService::Ptr service; |
4925 | - mcs::MiracastControllerSkeleton::Ptr mcsa; |
4926 | + ac::Service::Ptr service; |
4927 | + ac::dbus::ControllerSkeleton::Ptr controller_skeleton; |
4928 | } rt; |
4929 | |
4930 | rt.Run(); |
4931 | @@ -184,12 +185,12 @@ |
4932 | return 0; |
4933 | } |
4934 | |
4935 | -std::shared_ptr<MiracastService> MiracastService::Create() { |
4936 | - auto sp = std::shared_ptr<MiracastService>{new MiracastService{}}; |
4937 | +std::shared_ptr<Service> Service::Create() { |
4938 | + auto sp = std::shared_ptr<Service>{new Service{}}; |
4939 | return sp->FinalizeConstruction(); |
4940 | } |
4941 | |
4942 | -MiracastService::MiracastService() : |
4943 | +Service::Service() : |
4944 | current_state_(kIdle), |
4945 | scan_timeout_source_(0), |
4946 | supported_roles_({kSource}), |
4947 | @@ -198,10 +199,10 @@ |
4948 | CreateRuntimeDirectory(); |
4949 | } |
4950 | |
4951 | -std::shared_ptr<MiracastService> MiracastService::FinalizeConstruction() { |
4952 | - system_controller_ = mcs::SystemController::CreatePlatformDefault(); |
4953 | +std::shared_ptr<Service> Service::FinalizeConstruction() { |
4954 | + system_controller_ = ac::SystemController::CreatePlatformDefault(); |
4955 | |
4956 | - network_manager_ = mcs::NetworkManagerFactory::Create(); |
4957 | + network_manager_ = ac::NetworkManagerFactory::Create(); |
4958 | network_manager_->SetDelegate(this); |
4959 | network_manager_->SetCapabilities({NetworkManager::Capability::kSource}); |
4960 | |
4961 | @@ -210,13 +211,13 @@ |
4962 | return shared_from_this(); |
4963 | } |
4964 | |
4965 | -MiracastService::~MiracastService() { |
4966 | +Service::~Service() { |
4967 | if (scan_timeout_source_ > 0) |
4968 | g_source_remove(scan_timeout_source_); |
4969 | } |
4970 | |
4971 | -void MiracastService::CreateRuntimeDirectory() { |
4972 | - boost::filesystem::path runtime_dir(mcs::kRuntimePath); |
4973 | +void Service::CreateRuntimeDirectory() { |
4974 | + boost::filesystem::path runtime_dir(ac::kRuntimePath); |
4975 | |
4976 | if (boost::filesystem::is_directory(runtime_dir)) |
4977 | boost::filesystem::remove_all(runtime_dir); |
4978 | @@ -224,8 +225,8 @@ |
4979 | boost::filesystem::create_directory(runtime_dir); |
4980 | } |
4981 | |
4982 | -void MiracastService::LoadState() { |
4983 | - boost::filesystem::path state_dir(mcs::kStateDir); |
4984 | +void Service::LoadState() { |
4985 | + boost::filesystem::path state_dir(ac::kStateDir); |
4986 | |
4987 | if (!boost::filesystem::is_directory(state_dir)) |
4988 | return; |
4989 | @@ -234,54 +235,54 @@ |
4990 | SetEnabled(boost::filesystem::exists(enabled_path)); |
4991 | } |
4992 | |
4993 | -void MiracastService::SaveState() { |
4994 | - boost::filesystem::path state_dir(mcs::kStateDir); |
4995 | +void Service::SaveState() { |
4996 | + boost::filesystem::path state_dir(ac::kStateDir); |
4997 | |
4998 | if (!boost::filesystem::is_directory(state_dir)) |
4999 | boost::filesystem::create_directory(state_dir); |
5000 |
Looks good, just two comments:
1.- Use of trace macros seems inconsistent. I see ERROR, DEBUG, and then AC_INFO. Please use one convention in a consistent way. Even more, I would prefer to remove duplicate macros in Logger class.
2.- I still see some instances of 'mcs':
src/ac/config.h.in
18:#ifndef MCS_CONFIG_H_
19:#define MCS_CONFIG_H_
src/ac/ report/ lttng/senderrep ort.cpp aethercast_ sender, sent_packet, timestamp, size);
29: mcs_tracepoint(
src/ac/ report/ lttng/encoderre port.cpp aethercast_ encoder, started, 0); aethercast_ encoder, stopped, 0); aethercast_ encoder, began_frame, timestamp); aethercast_ encoder, finished_frame, timestamp); aethercast_ encoder, received_ input_buffer, timestamp);
29: mcs_tracepoint(
33: mcs_tracepoint(
37: mcs_tracepoint(
41: mcs_tracepoint(
45: mcs_tracepoint(
src/ac/ report/ lttng/utils. h
30:#define mcs_tracepoint(c, ...) tracepoint(c, __VA_ARGS__)
src/ac/ report/ lttng/packetize rreport. cpp aethercast_ packetizer, packetized_frame, timestamp);
29: mcs_tracepoint(
src/ac/ report/ lttng/rendererr eport.cpp aethercast_ renderer, began_frame, 0); aethercast_ renderer, finished_frame, timestamp);
29: mcs_tracepoint(
33: mcs_tracepoint(
src/ac/ video/utils. cpp
39:} // mcs
src/ac/ video/utils. h
31:} // mcs
src/ac/logger.h
103:// Log returns the mcs-wide configured logger instance.
106:// SetLog installs the given logger as mcs-wide default logger.
tests/CMakeList s.txt SOURCE_ DIR}/src/ mcs
13: ${CMAKE_
src/gdbus/ CMakeLists. txt MAKE_DIRECTORY ${CMAKE_ CURRENT_ BINARY_ DIR}/mcs)
3:file(
tests/ac/ CMakeLists. txt SOURCE_ DIR}/src/ mcs SOURCE_ DIR}/src/ mcs/w11t/ gdhcp
9: ${CMAKE_
10: ${CMAKE_
tests/ac/ integration_ tests/config. h.in INTEGRATION_ CONFIG_ H_ INTEGRATION_ CONFIG_ H_
18:#ifndef MCS_TESTS_
19:#define MCS_TESTS_
27:} // namespace mcs
tests/common/ dbusfixture. cpp system- ";
100: config_path += "/mcs-dbus-