Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 3 additions & 1 deletion DeviceInfo/DeviceInfoImplementation.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -74,8 +74,9 @@ namespace Plugin {
uint32_t DeviceInfoImplementation::AudioOutputs(Exchange::IDeviceAudioCapabilities::IAudioOutputIterator*& audioOutputs) const
{
AudioOutputList audioOutputList;
audioOutputList.reserve(_audioOutputMap.size());

std::transform(_audioOutputMap.begin(), _audioOutputMap.end(), std::front_inserter(audioOutputList),
std::transform(_audioOutputMap.begin(), _audioOutputMap.end(), std::back_inserter(audioOutputList),
[](decltype(_audioOutputMap)::value_type const &pair) {
return pair.first;
});
Expand Down Expand Up @@ -114,6 +115,7 @@ namespace Plugin {
uint32_t DeviceInfoImplementation::VideoOutputs(Exchange::IDeviceVideoCapabilities::IVideoOutputIterator*& videoOutputs) const
{
VideoOutputList videoOutputList;
videoOutputList.reserve(_videoOutputMap.size());

std::transform(_videoOutputMap.begin(), _videoOutputMap.end(), std::back_inserter(videoOutputList),
[](decltype(_videoOutputMap)::value_type const &pair) {
Expand Down
4 changes: 2 additions & 2 deletions DeviceInfo/DeviceInfoImplementation.h
Original file line number Diff line number Diff line change
Expand Up @@ -151,7 +151,7 @@ namespace Plugin {
std::list<IDeviceAudioCapabilities::MS12Profile> MS12Profiles;
};
using AudioOutputMap = std::map<Exchange::IDeviceAudioCapabilities::AudioOutput, AudioOutputCapability>;
using AudioOutputList = std::list<Exchange::IDeviceAudioCapabilities::AudioOutput>;
using AudioOutputList = std::vector<Exchange::IDeviceAudioCapabilities::AudioOutput>;
using AudioOutputIteratorImplementation = RPC::IteratorType<Exchange::IDeviceAudioCapabilities::IAudioOutputIterator>;

struct VideoOutputCapability {
Expand All @@ -160,7 +160,7 @@ namespace Plugin {
IDeviceVideoCapabilities::CopyProtection CopyProtection;
};
using VideoOutputMap = std::map<Exchange::IDeviceVideoCapabilities::VideoOutput, VideoOutputCapability>;
using VideoOutputList = std::list<Exchange::IDeviceVideoCapabilities::VideoOutput>;
using VideoOutputList = std::vector<Exchange::IDeviceVideoCapabilities::VideoOutput>;
using VideoOutputIteratorImplementation = RPC::IteratorType<Exchange::IDeviceVideoCapabilities::IVideoOutputIterator>;

public:
Expand Down
10 changes: 7 additions & 3 deletions DisplayInfo/DeviceSettings/PlatformImplementation.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -584,7 +584,9 @@ class DisplayInfoImplementation :

uint32_t Colorimetry(IColorimetryIterator*& colorimetry /* @out */) const override
{
std::list<Exchange::IDisplayProperties::ColorimetryType> colorimetryCaps;
std::vector<Exchange::IDisplayProperties::ColorimetryType> colorimetryCaps;
colorimetryCaps.reserve(8);

vector<uint8_t> edidVec;
uint32_t ret = GetEdidBytes(edidVec);
if (ret == Core::ERROR_NONE)
Expand Down Expand Up @@ -665,7 +667,8 @@ class DisplayInfoImplementation :
// @return HDRType: array of HDR formats
uint32_t TVCapabilities(IHDRIterator*& type /* out */) const override
{
std::list<Exchange::IHDRProperties::HDRType> hdrCapabilities;
std::vector<Exchange::IHDRProperties::HDRType> hdrCapabilities;
hdrCapabilities.reserve(4);

int capabilities = static_cast<int>(dsHDRSTANDARD_NONE);
try
Expand Down Expand Up @@ -699,7 +702,8 @@ class DisplayInfoImplementation :
// @return HDRType: array of HDR formats
uint32_t STBCapabilities(IHDRIterator*& type /* out */) const override
{
std::list<Exchange::IHDRProperties::HDRType> hdrCapabilities;
std::vector<Exchange::IHDRProperties::HDRType> hdrCapabilities;
hdrCapabilities.reserve(4);

int capabilities = static_cast<int>(dsHDRSTANDARD_NONE);
try
Expand Down
2 changes: 1 addition & 1 deletion MessageControl/MessageControl.h
Original file line number Diff line number Diff line change
Expand Up @@ -432,7 +432,7 @@ namespace Plugin {

Core::hresult Controls(const string& module, Exchange::IMessageControl::IControlIterator*& controls) const override
{
std::list<Exchange::IMessageControl::Control> list;
std::vector<Exchange::IMessageControl::Control> list;
Messaging::MessageUnit::Iterator index;
_client.Controls(index, module);

Expand Down
8 changes: 6 additions & 2 deletions PlayerInfo/DeviceSettings/PlatformImplementation.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -459,6 +459,8 @@ class PlayerInfoImplementation : public Exchange::IPlayerProperties, public Exch
{"audio/x-vorbis", Exchange::IPlayerProperties::AUDIO_VORBIS_OGG},
{"audio/x-wav", Exchange::IPlayerProperties::AUDIO_WAV},
};
_audioCodecs.reserve(audioCaps.size());

if (GstUtils::GstRegistryCheckElementsForMediaTypes(audioCaps, _audioCodecs) != true) {
TRACE(Trace::Warning, (_T("There is no Audio Codec support available")));
}
Expand All @@ -477,14 +479,16 @@ class PlayerInfoImplementation : public Exchange::IPlayerProperties, public Exch
{"video/x-vp9", Exchange::IPlayerProperties::VideoCodec::VIDEO_VP9},
{"video/x-vp10", Exchange::IPlayerProperties::VideoCodec::VIDEO_VP10}
};
_videoCodecs.reserve(videoCaps.size());

if (GstUtils::GstRegistryCheckElementsForMediaTypes(videoCaps, _videoCodecs) != true) {
TRACE(Trace::Warning, (_T("There is no Video Codec support available")));
}
}

private:
std::list<Exchange::IPlayerProperties::AudioCodec> _audioCodecs;
std::list<Exchange::IPlayerProperties::VideoCodec> _videoCodecs;
std::vector<Exchange::IPlayerProperties::AudioCodec> _audioCodecs;
std::vector<Exchange::IPlayerProperties::VideoCodec> _videoCodecs;
std::map<string, Exchange::IPlayerProperties::PlaybackResolution> _resolutions =
{
{"480i24", RESOLUTION_480I24},
Expand Down
8 changes: 6 additions & 2 deletions PlayerInfo/GStreamer/PlatformImplementation.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -170,6 +170,8 @@ class PlayerInfoImplementation : public Exchange::IPlayerProperties {
{"audio/x-vorbis", Exchange::IPlayerProperties::AudioCodec::AUDIO_VORBIS_OGG},
{"audio/x-wav", Exchange::IPlayerProperties::AudioCodec::AUDIO_WAV},
};
_audioCodecs.reserve(audioCaps.size());

if (GstUtils::GstRegistryCheckElementsForMediaTypes(audioCaps, _audioCodecs) != true) {
TRACE(Trace::Warning, (_T("There is no Audio Codec support available")));
}
Expand All @@ -185,14 +187,16 @@ class PlayerInfoImplementation : public Exchange::IPlayerProperties {
{"video/x-vp9", Exchange::IPlayerProperties::VideoCodec::VIDEO_VP9},
{"video/x-vp10", Exchange::IPlayerProperties::VideoCodec::VIDEO_VP10}
};
_videoCodecs.reserve(videoCaps.size());

if (GstUtils::GstRegistryCheckElementsForMediaTypes(videoCaps, _videoCodecs) != true) {
TRACE(Trace::Warning, (_T("There is no Video Codec support available")));
}
}

private:
std::list<Exchange::IPlayerProperties::AudioCodec> _audioCodecs;
std::list<Exchange::IPlayerProperties::VideoCodec> _videoCodecs;
std::vector<Exchange::IPlayerProperties::AudioCodec> _audioCodecs;
std::vector<Exchange::IPlayerProperties::VideoCodec> _videoCodecs;
#if DOLBY_SUPPORT
Exchange::Dolby::IOutput* _dolbyOut;
#endif
Expand Down
3 changes: 2 additions & 1 deletion WebKitBrowser/WebKitBrowser.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -331,7 +331,8 @@ namespace Plugin {
Core::JSON::ArrayType<Core::JSON::String> array;
array.FromString(languagesList);

std::list<string> list;
std::vector<string> list;
list.reserve(array.Length());
auto iterator = array.Elements();

while (iterator.Next() == true) {
Expand Down
Loading