```c
std::shared_ptr<IPlayerService> MediaClient::CreatePlayerService()
{
std::lock_guard<std::mutex> lock(mutex_);
if (!IsAlived()) {
MEDIA_LOGE("media service does not exist.");
return nullptr;
}
std::shared_ptr<PlayerClient> player = PlayerClient::Create(playerProxy);
CHECK_AND_RETURN_RET_LOG(player != nullptr, nullptr, "failed to create player client.");
```c
int32_t PlayerImpl:lay()
{
CHECK_AND_RETURN_RET_LOG(playerService_ != nullptr, MSERR_INVALID_OPERATION, "player service does not exist..");
MEDIA_LOGW("KPI-TRACE: PlayerImpl Play in");
return playerService_->Play();
}
int32_t PlayerImpl:repare()
{
CHECK_AND_RETURN_RET_LOG(playerService_ != nullptr, MSERR_INVALID_OPERATION, "player service does not exist..");
MEDIA_LOGW("KPI-TRACE: PlayerImpl Prepare in");
return playerService_->Prepare();
}
int32_t PlayerImpl:repareAsync()
{
CHECK_AND_RETURN_RET_LOG(playerService_ != nullptr, MSERR_INVALID_OPERATION, "player service does not exist..");
MEDIA_LOGW("KPI-TRACE: PlayerImpl PrepareAsync in");
return playerService_->PrepareAsync();
}
```