| Index: media/cast/test/sender.cc
|
| diff --git a/media/cast/test/sender.cc b/media/cast/test/sender.cc
|
| index 16f55dcd234e0a69e2705d7a741c7a8ffe28f768..0ec130f759aff9497ee099c752f0816b235ce0ee 100644
|
| --- a/media/cast/test/sender.cc
|
| +++ b/media/cast/test/sender.cc
|
| @@ -19,6 +19,7 @@
|
| #include "media/cast/logging/log_serializer.h"
|
| #include "media/cast/logging/logging_defines.h"
|
| #include "media/cast/logging/proto/raw_events.pb.h"
|
| +#include "media/cast/logging/stats_serializer.h"
|
| #include "media/cast/test/utility/audio_utility.h"
|
| #include "media/cast/test/utility/input_builder.h"
|
| #include "media/cast/test/utility/video_utility.h"
|
| @@ -382,6 +383,28 @@ void WriteLogsToFileAndStopSubscribing(
|
| &(*serialized_string)[0], 1, serialized_string->size(), log_file.get());
|
| if (ret != serialized_string->size())
|
| VLOG(1) << "Failed to write logs to file.";
|
| +
|
| + scoped_ptr<std::string> audio_stats_json(new std::string);
|
| + bool success = media::cast::SerializeStats(
|
| + cast_environment->Logging()->GetFrameStatsData(media::cast::AUDIO_EVENT),
|
| + cast_environment->Logging()->GetPacketStatsData(media::cast::AUDIO_EVENT),
|
| + audio_stats_json.get());
|
| +
|
| + // We can write this string to a file if needed.
|
| + if (success)
|
| + VLOG(0) << "Audio stats JSON string: " << *audio_stats_json;
|
| + else
|
| + VLOG(1) << "Failed to write audio stats JSON string.";
|
| +
|
| + scoped_ptr<std::string> video_stats_json(new std::string);
|
| + success = media::cast::SerializeStats(
|
| + cast_environment->Logging()->GetFrameStatsData(media::cast::VIDEO_EVENT),
|
| + cast_environment->Logging()->GetPacketStatsData(media::cast::VIDEO_EVENT),
|
| + video_stats_json.get());
|
| + if (success)
|
| + VLOG(0) << "Video stats JSON string: " << *video_stats_json;
|
| + else
|
| + VLOG(1) << "Failed to write video stats JSON string.";
|
| }
|
|
|
| } // namespace
|
|
|