@@ -37,9 +37,6 @@ namespace Plugin {
3737 );
3838 }
3939
40- static Core::ProxyPoolType<Web::Response> responseFactory (4 );
41- static Core::ProxyPoolType<Web::JSONBodyType<JsonData::PlayerInfo::CodecsData>> jsonResponseFactory (4 );
42-
4340 /* virtual */ const string PlayerInfo::Initialize (PluginHost::IShell* service)
4441 {
4542 ASSERT (service != nullptr );
@@ -141,58 +138,6 @@ namespace Plugin {
141138 return (string ());
142139 }
143140
144- /* virtual */ void PlayerInfo::Inbound (Web::Request& /* request */ )
145- {
146- }
147-
148- /* virtual */ Core::ProxyType<Web::Response> PlayerInfo::Process (const Web::Request& request)
149- {
150- ASSERT (_skipURL <= request.Path .length ());
151-
152- Core::ProxyType<Web::Response> result (PluginHost::IFactories::Instance ().Response ());
153-
154- // By default, we assume everything works..
155- result->ErrorCode = Web::STATUS_OK;
156- result->Message = " OK" ;
157-
158- // <GET> - currently, only the GET command is supported, returning system info
159- if (request.Verb == Web::Request::HTTP_GET) {
160-
161- Core::ProxyType<Web::JSONBodyType<JsonData::PlayerInfo::CodecsData>> response (jsonResponseFactory.Element ());
162-
163- Core::TextSegmentIterator index (Core::TextFragment (request.Path , _skipURL, static_cast <uint32_t >(request.Path .length ()) - _skipURL), false , ' /' );
164-
165- // Always skip the first one, it is an empty part because we start with a '/' if there are more parameters.
166- index.Next ();
167-
168- Info (*response);
169- result->ContentType = Web::MIMETypes::MIME_JSON;
170- result->Body (Core::ProxyType<Web::IBody>(response));
171- } else {
172- result->ErrorCode = Web::STATUS_BAD_REQUEST;
173- result->Message = _T (" Unsupported request for the [PlayerInfo] service." );
174- }
175-
176- return result;
177- }
178-
179- void PlayerInfo::Info (JsonData::PlayerInfo::CodecsData& playerInfo) const
180- {
181- Core::JSON::EnumType<JsonData::PlayerInfo::CodecsData::AudiocodecsType> audioCodec;
182- _audioCodecs->Reset (0 );
183- Exchange::IPlayerProperties::AudioCodec audio;
184- while (_audioCodecs->Next (audio) == true ) {
185- playerInfo.Audio .Add (audioCodec = static_cast <JsonData::PlayerInfo::CodecsData::AudiocodecsType>(audio));
186- }
187-
188- Core::JSON::EnumType<JsonData::PlayerInfo::CodecsData::VideocodecsType> videoCodec;
189- Exchange::IPlayerProperties::VideoCodec video;
190- _videoCodecs->Reset (0 );
191- while (_videoCodecs->Next (video) == true ) {
192- playerInfo.Video .Add (videoCodec = static_cast <JsonData::PlayerInfo::CodecsData::VideocodecsType>(video));
193- }
194- }
195-
196141 void PlayerInfo::Deactivated (RPC::IRemoteConnection* connection)
197142 {
198143 // This can potentially be called on a socket thread, so the deactivation (wich in turn kills this object) must be done
0 commit comments