[Reform] Apply Coding Style
authorreview-bot <reviewbot@samsung.com>
Tue, 1 Aug 2023 06:52:03 +0000 (15:52 +0900)
committerreview-bot <reviewbot@samsung.com>
Tue, 1 Aug 2023 06:52:03 +0000 (15:52 +0900)
src/esplusplayer/include_internal/esplayer/esplayer.h
src/esplusplayer/src/esplayer.cpp
src/esplusplayer/src/esplusplayer_capi.cpp
ut/src/esplusplayer/ut_basic.cpp

index 8824c32..a7d1af9 100644 (file)
@@ -149,7 +149,8 @@ class EsPlayer : public EsPlusPlayer {
   bool GetDecodingTime(StreamType type, int32_t* time_in_milliseconds) override;
   bool SetVideoStreamRotationInfo(const VideoRotation& rotation) override;
   bool GetVideoStreamRotationInfo(VideoRotation* rotation) override;
-  bool SetSimpleMixOutBufferLevel(const PlayerSimpleMixOutBufferLevel level) override;
+  bool SetSimpleMixOutBufferLevel(
+      const PlayerSimpleMixOutBufferLevel level) override;
 
  private:
   using SubmitPacketOperator =
@@ -250,8 +251,10 @@ class EsPlayer : public EsPlusPlayer {
     void BufferStatus_(const TrackType& type, const BufferStatus& status);
     void OnMediaPacketVideoDecoded(const DecodedVideoPacket& packet);
     void OnMediaPacketGetTbmBufPtr(void** ptr, bool is_scale_change);
-    void OnDecoderInputBufferTime(const TrackType& type, const DecoderBufferTime &time);
-    void OnDecoderOutputBufferTime(const TrackType& type, const DecoderBufferTime &time);
+    void OnDecoderInputBufferTime(const TrackType& type,
+                                  const DecoderBufferTime& time);
+    void OnDecoderOutputBufferTime(const TrackType& type,
+                                   const DecoderBufferTime& time);
 
    private:
     EsPlayer* handler_ = nullptr;
index 9e612d8..4999d2f 100755 (executable)
@@ -1723,15 +1723,15 @@ bool EsPlayer::Flush(const StreamType& type) {
 bool EsPlayer::SetBufferSize(const BufferOption& option, uint64_t size) {
   TrackType track_type = kTrackTypeMax;
   switch (option) {
-    case BufferOption::kBufferAudioMaxByteSize: /* FALL THROUGH */
+    case BufferOption::kBufferAudioMaxByteSize:      /* FALL THROUGH */
     case BufferOption::kBufferAudioMinByteThreshold: /* FALL THROUGH */
-    case BufferOption::kBufferAudioMaxTimeSize: /* FALL THROUGH */
+    case BufferOption::kBufferAudioMaxTimeSize:      /* FALL THROUGH */
     case BufferOption::kBufferAudioMinTimeThreshold:
       track_type = kTrackTypeAudio;
       break;
-    case BufferOption::kBufferVideoMaxByteSize: /* FALL THROUGH */
+    case BufferOption::kBufferVideoMaxByteSize:      /* FALL THROUGH */
     case BufferOption::kBufferVideoMinByteThreshold: /* FALL THROUGH */
-    case BufferOption::kBufferVideoMaxTimeSize: /* FALL THROUGH */
+    case BufferOption::kBufferVideoMaxTimeSize:      /* FALL THROUGH */
     case BufferOption::kBufferVideoMinTimeThreshold:
       track_type = kTrackTypeVideo;
       break;
@@ -1748,8 +1748,7 @@ bool EsPlayer::SetBufferSize(const BufferOption& option, uint64_t size) {
       track_util::GetActiveTrack(track_, track_type, &activated_track);
   EsState state = state_manager_.GetState();
   if ((state < EsState::kIdle) || (state > EsState::kIdle && is_activated)) {
-    LOG_ERROR_P(this,
-                "Invalid State [state:%d] or stream is activated [%d],",
+    LOG_ERROR_P(this, "Invalid State [state:%d] or stream is activated [%d],",
                 state_manager_.GetStateEnum(), is_activated);
     return false;
   }
index 60164d9..78c12b9 100644 (file)
@@ -206,8 +206,6 @@ class listener_bridge : public esplusplayer::EsEventListener {
     LOG_LEAVE
   }
 
-
-
   virtual void OnError(const ErrorType& error_code, UserData userdata) {
     LOG_ENTER
     LOG_INFO("error code : %x", static_cast<int>(error_code));
@@ -274,11 +272,11 @@ class listener_bridge : public esplusplayer::EsEventListener {
   virtual void OnReadyToSeek(const StreamType& type, const uint64_t offset,
                              UserData userdata) {
     LOG_ENTER
-    LOG_INFO("offset : %" PRId64"", offset);
+    LOG_INFO("offset : %" PRId64 "", offset);
     std::unique_lock<std::mutex> lock(this->multi_seek_control.lock);
     if (this->multi_seek_control.is_offset_valid == false ||
         this->multi_seek_control.offset != offset) {
-      LOG_ERROR("Invalid offset:%" PRId64"", this->multi_seek_control.offset);
+      LOG_ERROR("Invalid offset:%" PRId64 "", this->multi_seek_control.offset);
       return;
     }
     if (this->ready_to_seek_cb_)
@@ -390,30 +388,34 @@ class listener_bridge : public esplusplayer::EsEventListener {
   }
 
   virtual void OnVideoFrameDropped(const uint64_t& count, UserData userdata) {
-    LOG_ERROR("count: %" PRId64"", count);
+    LOG_ERROR("count: %" PRId64 "", count);
     if (this->video_frame_dropped_cb_)
       this->video_frame_dropped_cb_(count, video_frame_dropped_cb_userdata_);
   }
 
-  virtual void OnDecoderInputBufferTime(const StreamType& type, const DecoderBufferTime& time) {
+  virtual void OnDecoderInputBufferTime(const StreamType& type,
+                                        const DecoderBufferTime& time) {
     if (this->decoder_input_buffer_time_cb_) {
       esplusplayer_decoder_buffer_time decoder_buffer_time;
       decoder_buffer_time.pts = time.pts;
       decoder_buffer_time.system_time = time.system_time;
       this->decoder_input_buffer_time_cb_(
-          static_cast<esplusplayer_stream_type>(type), decoder_buffer_time, decoder_input_buffer_time_cb_userdata_);
+          static_cast<esplusplayer_stream_type>(type), decoder_buffer_time,
+          decoder_input_buffer_time_cb_userdata_);
     }
   }
 
-  virtual void OnDecoderOutputBufferTime(const StreamType& type, const DecoderBufferTime& time) {
+  virtual void OnDecoderOutputBufferTime(const StreamType& type,
+                                         const DecoderBufferTime& time) {
     if (this->decoder_output_buffer_time_cb_) {
       esplusplayer_decoder_buffer_time decoder_buffer_time;
       decoder_buffer_time.pts = time.pts;
       decoder_buffer_time.system_time = time.system_time;
       this->decoder_output_buffer_time_cb_(
-          static_cast<esplusplayer_stream_type>(type), decoder_buffer_time, decoder_output_buffer_time_cb_userdata_);
+          static_cast<esplusplayer_stream_type>(type), decoder_buffer_time,
+          decoder_output_buffer_time_cb_userdata_);
     }
- }
 }
 
  private:
   static void DecodedPacketDeleter(esplusplayer_decoded_video_packet* packet) {
@@ -469,10 +471,8 @@ class listener_bridge : public esplusplayer::EsEventListener {
   void* audio_high_latency_cb_userdata_ = nullptr;
   esplusplayer_video_frame_dropped_cb video_frame_dropped_cb_ = nullptr;
   void* video_frame_dropped_cb_userdata_ = nullptr;
-  esplusplayer_decoder_buffer_time_cb decoder_input_buffer_time_cb_ =
-      nullptr;
-  esplusplayer_decoder_buffer_time_cb decoder_output_buffer_time_cb_ =
-      nullptr;
+  esplusplayer_decoder_buffer_time_cb decoder_input_buffer_time_cb_ = nullptr;
+  esplusplayer_decoder_buffer_time_cb decoder_output_buffer_time_cb_ = nullptr;
   void* decoder_input_buffer_time_cb_userdata_ = nullptr;
   void* decoder_output_buffer_time_cb_userdata_ = nullptr;
 
@@ -561,13 +561,13 @@ class listener_bridge : public esplusplayer::EsEventListener {
       esplusplayer_video_frame_dropped_cb video_frame_dropped_cb,
       void* userdata);
   friend int esplusplayer_set_decoder_input_buffer_time_cb(
-    esplusplayer_handle handle,
-    esplusplayer_decoder_buffer_time_cb decoder_buffer_time_cb,
-    void* userdata);
+      esplusplayer_handle handle,
+      esplusplayer_decoder_buffer_time_cb decoder_buffer_time_cb,
+      void* userdata);
   friend int esplusplayer_set_decoder_output_buffer_time_cb(
-    esplusplayer_handle handle,
-    esplusplayer_decoder_buffer_time_cb decoder_buffer_time_cb,
-    void* userdata);
+      esplusplayer_handle handle,
+      esplusplayer_decoder_buffer_time_cb decoder_buffer_time_cb,
+      void* userdata);
 };
 
 #define ES_DUMP 0
@@ -826,7 +826,9 @@ convert_get_decoded_video_frame_status_(
     case esplusplayer::GetDecodedVideoFrameStatus::kUnknown: {
       return ESPLUSPLAYER_GET_DECVIDEOFRAME_STATUS_UNKNOWN;
     }
-    default: { return ESPLUSPLAYER_GET_DECVIDEOFRAME_STATUS_UNKNOWN; }
+    default: {
+      return ESPLUSPLAYER_GET_DECVIDEOFRAME_STATUS_UNKNOWN;
+    }
   }
   return ESPLUSPLAYER_GET_DECVIDEOFRAME_STATUS_UNKNOWN;
 }
@@ -1011,7 +1013,7 @@ int esplusplayer_set_app_info(esplusplayer_handle handle,
 }
 
 int esplusplayer_set_app_info_ex(esplusplayer_handle handle,
-                              const esplusplayer_app_info_ex* app_info) {
+                                 const esplusplayer_app_info_ex* app_info) {
   LOG_ENTER_P(cast_(handle))
   if (is_null_(handle)) return ESPLUSPLAYER_ERROR_TYPE_INVALID_PARAMETER;
   if (app_info == nullptr) return ESPLUSPLAYER_ERROR_TYPE_INVALID_PARAMETER;
@@ -1117,14 +1119,12 @@ int esplusplayer_set_display_roi(esplusplayer_handle handle, int x, int y,
   return convert_return_type_(cast_(handle)->SetDisplayRoi(roi));
 }
 
-int esplusplayer_set_stretch_mode(esplusplayer_handle handle,
-                                  int mode) {
+int esplusplayer_set_stretch_mode(esplusplayer_handle handle, int mode) {
   LOG_ENTER_P(cast_(handle))
   if (is_null_(handle)) return ESPLUSPLAYER_ERROR_TYPE_INVALID_PARAMETER;
   LOG_INFO_P(cast_(handle), "stretch mode : %d", static_cast<int>(mode));
 
-  return convert_return_type_(
-      cast_(handle)->SetStretchMode(mode));
+  return convert_return_type_(cast_(handle)->SetStretchMode(mode));
 }
 
 int esplusplayer_set_video_roi(esplusplayer_handle handle, double scale_x,
@@ -2307,18 +2307,20 @@ int esplusplayer_set_timeunit_type(esplusplayer_handle handle,
   return convert_return_type_(ret);
 }
 
-int esplusplayer_set_video_stream_rotation_info(esplusplayer_handle handle,
-                                   const esplusplayer_video_stream_rotation_type rotation) {
+int esplusplayer_set_video_stream_rotation_info(
+    esplusplayer_handle handle,
+    const esplusplayer_video_stream_rotation_type rotation) {
   LOG_ENTER_P(cast_(handle))
   if (is_null_(handle)) return ESPLUSPLAYER_ERROR_TYPE_INVALID_PARAMETER;
   LOG_INFO_P(cast_(handle), "video stream rotation type : %d",
              static_cast<int>(rotation));
-  return convert_return_type_(
-      cast_(handle)->SetVideoStreamRotationInfo(static_cast<VideoRotation>(rotation)));
+  return convert_return_type_(cast_(handle)->SetVideoStreamRotationInfo(
+      static_cast<VideoRotation>(rotation)));
 }
 
-int esplusplayer_get_video_stream_rotation_info(esplusplayer_handle handle,
-                                   esplusplayer_video_stream_rotation_type* rotation) {
+int esplusplayer_get_video_stream_rotation_info(
+    esplusplayer_handle handle,
+    esplusplayer_video_stream_rotation_type* rotation) {
   LOG_ENTER_P(cast_(handle))
   if (is_null_(handle) || is_null_(rotation))
     return ESPLUSPLAYER_ERROR_TYPE_INVALID_PARAMETER;
index d8c0096..60598cf 100644 (file)
@@ -440,17 +440,17 @@ TEST_P(EsBasicTest, vdapi_basic_esplusplayer_active_deactivate_p_1) {
       ESPLUSPLAYER_ERROR_TYPE_NONE);
   ASSERT_TRUE(video_reader_->SetStreamInfo(esplayer_));
   esplusplayer_audio_stream_info audio_stream1;
-   audio_stream1.codec_data = nullptr;
-   audio_stream1.codec_data_length = 0;
-   audio_stream1.mime_type = ESPLUSPLAYER_AUDIO_MIME_TYPE_PCM_S16LE;
-   audio_stream1.bitrate = 0;
-   audio_stream1.sample_rate = 48000;
-   audio_stream1.channels = 2;
-   
-   esplusplayer_set_audio_stream_info(esplayer_, &audio_stream1);
-   
-
-  esplusplayer_set_low_latency_mode(esplayer_, ESPLUSPLAYER_LOW_LATENCY_MODE_DISABLE_PREROLL);
+  audio_stream1.codec_data = nullptr;
+  audio_stream1.codec_data_length = 0;
+  audio_stream1.mime_type = ESPLUSPLAYER_AUDIO_MIME_TYPE_PCM_S16LE;
+  audio_stream1.bitrate = 0;
+  audio_stream1.sample_rate = 48000;
+  audio_stream1.channels = 2;
+
+  esplusplayer_set_audio_stream_info(esplayer_, &audio_stream1);
+
+  esplusplayer_set_low_latency_mode(
+      esplayer_, ESPLUSPLAYER_LOW_LATENCY_MODE_DISABLE_PREROLL);
   ASSERT_EQ(esplusplayer_prepare_async(esplayer_),
             ESPLUSPLAYER_ERROR_TYPE_NONE);
   callback_->WaitForPrepareDone();
@@ -466,11 +466,10 @@ TEST_P(EsBasicTest, vdapi_basic_esplusplayer_active_deactivate_p_1) {
   audio_stream.bitrate = 448;
   audio_stream.sample_rate = 48000;
   audio_stream.channels = 6;
-  
-  esplusplayer_set_audio_stream_info(esplayer_, &audio_stream);
 
+  esplusplayer_set_audio_stream_info(esplayer_, &audio_stream);
 
-  //audio_reader_->ResetReader();
+  // audio_reader_->ResetReader();
   ASSERT_EQ(esplusplayer_activate(esplayer_, ESPLUSPLAYER_STREAM_TYPE_AUDIO),
             ESPLUSPLAYER_ERROR_TYPE_NONE);
 
@@ -485,100 +484,100 @@ TEST_P(EsBasicTest, vdapi_basic_esplusplayer_set_buffer_size_p) {
       esplusplayer_set_display(esplayer_, ESPLUSPLAYER_DISPLAY_TYPE_OVERLAY,
                                window_->Window()),
       ESPLUSPLAYER_ERROR_TYPE_NONE);
-  
-  ASSERT_EQ(esplusplayer_set_buffer_size(esplayer_,
-                               ESPLUSPLAYER_BUFFER_AUDIO_MAX_BYTE_SIZE, 1024*15),
-      ESPLUSPLAYER_ERROR_TYPE_NONE);
-  ASSERT_EQ(esplusplayer_set_buffer_size(esplayer_,
-                               ESPLUSPLAYER_BUFFER_VIDEO_MAX_BYTE_SIZE, 1024*15),
-      ESPLUSPLAYER_ERROR_TYPE_NONE);
-  ASSERT_EQ(esplusplayer_set_buffer_size(esplayer_,
-                               ESPLUSPLAYER_BUFFER_AUDIO_MAX_TIME_SIZE, 3000),
-      ESPLUSPLAYER_ERROR_TYPE_NONE);
-  ASSERT_EQ(esplusplayer_set_buffer_size(esplayer_,
-                               ESPLUSPLAYER_BUFFER_VIDEO_MAX_TIME_SIZE, 3000),
-      ESPLUSPLAYER_ERROR_TYPE_NONE);
-  ASSERT_EQ(esplusplayer_set_buffer_size(esplayer_,
-                               ESPLUSPLAYER_BUFFER_AUDIO_MIN_BYTE_THRESHOLD, 1024),
-      ESPLUSPLAYER_ERROR_TYPE_NONE);
-  ASSERT_EQ(esplusplayer_set_buffer_size(esplayer_,
-                               ESPLUSPLAYER_BUFFER_VIDEO_MIN_BYTE_THRESHOLD, 1024),
-      ESPLUSPLAYER_ERROR_TYPE_NONE);
-  ASSERT_EQ(esplusplayer_set_buffer_size(esplayer_,
-                               ESPLUSPLAYER_BUFFER_AUDIO_MIN_TIME_THRESHOLD, 1000),
-      ESPLUSPLAYER_ERROR_TYPE_NONE);
-  ASSERT_EQ(esplusplayer_set_buffer_size(esplayer_,
-                               ESPLUSPLAYER_BUFFER_VIDEO_MIN_TIME_THRESHOLD, 1000),
-      ESPLUSPLAYER_ERROR_TYPE_NONE);
-  
+
+  ASSERT_EQ(esplusplayer_set_buffer_size(
+                esplayer_, ESPLUSPLAYER_BUFFER_AUDIO_MAX_BYTE_SIZE, 1024 * 15),
+            ESPLUSPLAYER_ERROR_TYPE_NONE);
+  ASSERT_EQ(esplusplayer_set_buffer_size(
+                esplayer_, ESPLUSPLAYER_BUFFER_VIDEO_MAX_BYTE_SIZE, 1024 * 15),
+            ESPLUSPLAYER_ERROR_TYPE_NONE);
+  ASSERT_EQ(esplusplayer_set_buffer_size(
+                esplayer_, ESPLUSPLAYER_BUFFER_AUDIO_MAX_TIME_SIZE, 3000),
+            ESPLUSPLAYER_ERROR_TYPE_NONE);
+  ASSERT_EQ(esplusplayer_set_buffer_size(
+                esplayer_, ESPLUSPLAYER_BUFFER_VIDEO_MAX_TIME_SIZE, 3000),
+            ESPLUSPLAYER_ERROR_TYPE_NONE);
+  ASSERT_EQ(esplusplayer_set_buffer_size(
+                esplayer_, ESPLUSPLAYER_BUFFER_AUDIO_MIN_BYTE_THRESHOLD, 1024),
+            ESPLUSPLAYER_ERROR_TYPE_NONE);
+  ASSERT_EQ(esplusplayer_set_buffer_size(
+                esplayer_, ESPLUSPLAYER_BUFFER_VIDEO_MIN_BYTE_THRESHOLD, 1024),
+            ESPLUSPLAYER_ERROR_TYPE_NONE);
+  ASSERT_EQ(esplusplayer_set_buffer_size(
+                esplayer_, ESPLUSPLAYER_BUFFER_AUDIO_MIN_TIME_THRESHOLD, 1000),
+            ESPLUSPLAYER_ERROR_TYPE_NONE);
+  ASSERT_EQ(esplusplayer_set_buffer_size(
+                esplayer_, ESPLUSPLAYER_BUFFER_VIDEO_MIN_TIME_THRESHOLD, 1000),
+            ESPLUSPLAYER_ERROR_TYPE_NONE);
+
   ASSERT_TRUE(video_reader_->SetStreamInfo(esplayer_));
   ASSERT_TRUE(audio_reader_->SetStreamInfo(esplayer_));
   ASSERT_EQ(esplusplayer_prepare_async(esplayer_),
             ESPLUSPLAYER_ERROR_TYPE_NONE);
   callback_->WaitForPrepareDone();
 
-  ASSERT_EQ(esplusplayer_set_buffer_size(esplayer_,
-                               ESPLUSPLAYER_BUFFER_AUDIO_MAX_BYTE_SIZE, 1024*15),
-      ESPLUSPLAYER_ERROR_TYPE_INVALID_OPERATION);
-  ASSERT_EQ(esplusplayer_set_buffer_size(esplayer_,
-                               ESPLUSPLAYER_BUFFER_VIDEO_MAX_BYTE_SIZE, 1024*15),
-      ESPLUSPLAYER_ERROR_TYPE_INVALID_OPERATION);
-  ASSERT_EQ(esplusplayer_set_buffer_size(esplayer_,
-                               ESPLUSPLAYER_BUFFER_AUDIO_MAX_TIME_SIZE, 3000),
-      ESPLUSPLAYER_ERROR_TYPE_INVALID_OPERATION);
-  ASSERT_EQ(esplusplayer_set_buffer_size(esplayer_,
-                               ESPLUSPLAYER_BUFFER_VIDEO_MAX_TIME_SIZE, 3000),
-      ESPLUSPLAYER_ERROR_TYPE_INVALID_OPERATION);
-  ASSERT_EQ(esplusplayer_set_buffer_size(esplayer_,
-                               ESPLUSPLAYER_BUFFER_AUDIO_MIN_BYTE_THRESHOLD, 1024),
-      ESPLUSPLAYER_ERROR_TYPE_INVALID_OPERATION);
-  ASSERT_EQ(esplusplayer_set_buffer_size(esplayer_,
-                               ESPLUSPLAYER_BUFFER_VIDEO_MIN_BYTE_THRESHOLD, 1024),
-      ESPLUSPLAYER_ERROR_TYPE_INVALID_OPERATION);
-  ASSERT_EQ(esplusplayer_set_buffer_size(esplayer_,
-                               ESPLUSPLAYER_BUFFER_AUDIO_MIN_TIME_THRESHOLD, 1000),
-      ESPLUSPLAYER_ERROR_TYPE_INVALID_OPERATION);
-  ASSERT_EQ(esplusplayer_set_buffer_size(esplayer_,
-                               ESPLUSPLAYER_BUFFER_VIDEO_MIN_TIME_THRESHOLD, 1000),
-      ESPLUSPLAYER_ERROR_TYPE_INVALID_OPERATION);
+  ASSERT_EQ(esplusplayer_set_buffer_size(
+                esplayer_, ESPLUSPLAYER_BUFFER_AUDIO_MAX_BYTE_SIZE, 1024 * 15),
+            ESPLUSPLAYER_ERROR_TYPE_INVALID_OPERATION);
+  ASSERT_EQ(esplusplayer_set_buffer_size(
+                esplayer_, ESPLUSPLAYER_BUFFER_VIDEO_MAX_BYTE_SIZE, 1024 * 15),
+            ESPLUSPLAYER_ERROR_TYPE_INVALID_OPERATION);
+  ASSERT_EQ(esplusplayer_set_buffer_size(
+                esplayer_, ESPLUSPLAYER_BUFFER_AUDIO_MAX_TIME_SIZE, 3000),
+            ESPLUSPLAYER_ERROR_TYPE_INVALID_OPERATION);
+  ASSERT_EQ(esplusplayer_set_buffer_size(
+                esplayer_, ESPLUSPLAYER_BUFFER_VIDEO_MAX_TIME_SIZE, 3000),
+            ESPLUSPLAYER_ERROR_TYPE_INVALID_OPERATION);
+  ASSERT_EQ(esplusplayer_set_buffer_size(
+                esplayer_, ESPLUSPLAYER_BUFFER_AUDIO_MIN_BYTE_THRESHOLD, 1024),
+            ESPLUSPLAYER_ERROR_TYPE_INVALID_OPERATION);
+  ASSERT_EQ(esplusplayer_set_buffer_size(
+                esplayer_, ESPLUSPLAYER_BUFFER_VIDEO_MIN_BYTE_THRESHOLD, 1024),
+            ESPLUSPLAYER_ERROR_TYPE_INVALID_OPERATION);
+  ASSERT_EQ(esplusplayer_set_buffer_size(
+                esplayer_, ESPLUSPLAYER_BUFFER_AUDIO_MIN_TIME_THRESHOLD, 1000),
+            ESPLUSPLAYER_ERROR_TYPE_INVALID_OPERATION);
+  ASSERT_EQ(esplusplayer_set_buffer_size(
+                esplayer_, ESPLUSPLAYER_BUFFER_VIDEO_MIN_TIME_THRESHOLD, 1000),
+            ESPLUSPLAYER_ERROR_TYPE_INVALID_OPERATION);
 
   ASSERT_EQ(esplusplayer_start(esplayer_), ESPLUSPLAYER_ERROR_TYPE_NONE);
   std::this_thread::sleep_for(std::chrono::seconds(3));
-  
+
   ASSERT_EQ(esplusplayer_deactivate(esplayer_, ESPLUSPLAYER_STREAM_TYPE_AUDIO),
             ESPLUSPLAYER_ERROR_TYPE_NONE);
-  
-  ASSERT_EQ(esplusplayer_set_buffer_size(esplayer_,
-                               ESPLUSPLAYER_BUFFER_AUDIO_MAX_BYTE_SIZE, 1024*15),
-      ESPLUSPLAYER_ERROR_TYPE_NONE);
-  ASSERT_EQ(esplusplayer_set_buffer_size(esplayer_,
-                               ESPLUSPLAYER_BUFFER_AUDIO_MAX_TIME_SIZE, 3000),
-      ESPLUSPLAYER_ERROR_TYPE_NONE);
-  ASSERT_EQ(esplusplayer_set_buffer_size(esplayer_,
-                               ESPLUSPLAYER_BUFFER_AUDIO_MIN_BYTE_THRESHOLD, 1024),
-      ESPLUSPLAYER_ERROR_TYPE_NONE);
-  ASSERT_EQ(esplusplayer_set_buffer_size(esplayer_,
-                               ESPLUSPLAYER_BUFFER_AUDIO_MIN_TIME_THRESHOLD, 1000),
-      ESPLUSPLAYER_ERROR_TYPE_NONE);
-  
+
+  ASSERT_EQ(esplusplayer_set_buffer_size(
+                esplayer_, ESPLUSPLAYER_BUFFER_AUDIO_MAX_BYTE_SIZE, 1024 * 15),
+            ESPLUSPLAYER_ERROR_TYPE_NONE);
+  ASSERT_EQ(esplusplayer_set_buffer_size(
+                esplayer_, ESPLUSPLAYER_BUFFER_AUDIO_MAX_TIME_SIZE, 3000),
+            ESPLUSPLAYER_ERROR_TYPE_NONE);
+  ASSERT_EQ(esplusplayer_set_buffer_size(
+                esplayer_, ESPLUSPLAYER_BUFFER_AUDIO_MIN_BYTE_THRESHOLD, 1024),
+            ESPLUSPLAYER_ERROR_TYPE_NONE);
+  ASSERT_EQ(esplusplayer_set_buffer_size(
+                esplayer_, ESPLUSPLAYER_BUFFER_AUDIO_MIN_TIME_THRESHOLD, 1000),
+            ESPLUSPLAYER_ERROR_TYPE_NONE);
+
   ASSERT_TRUE(audio_reader_->SetStreamInfo(esplayer_));
   audio_reader_->ResetReader();
   ASSERT_EQ(esplusplayer_activate(esplayer_, ESPLUSPLAYER_STREAM_TYPE_AUDIO),
             ESPLUSPLAYER_ERROR_TYPE_NONE);
-  
-  ASSERT_EQ(esplusplayer_set_buffer_size(esplayer_,
-                               ESPLUSPLAYER_BUFFER_AUDIO_MAX_BYTE_SIZE, 1024*15),
-      ESPLUSPLAYER_ERROR_TYPE_INVALID_OPERATION);
-  ASSERT_EQ(esplusplayer_set_buffer_size(esplayer_,
-                               ESPLUSPLAYER_BUFFER_AUDIO_MAX_TIME_SIZE, 3000),
-      ESPLUSPLAYER_ERROR_TYPE_INVALID_OPERATION);
-  ASSERT_EQ(esplusplayer_set_buffer_size(esplayer_,
-                               ESPLUSPLAYER_BUFFER_AUDIO_MIN_BYTE_THRESHOLD, 1024),
-      ESPLUSPLAYER_ERROR_TYPE_INVALID_OPERATION);
-  ASSERT_EQ(esplusplayer_set_buffer_size(esplayer_,
-                               ESPLUSPLAYER_BUFFER_AUDIO_MIN_TIME_THRESHOLD, 1000),
-      ESPLUSPLAYER_ERROR_TYPE_INVALID_OPERATION);
-  
+
+  ASSERT_EQ(esplusplayer_set_buffer_size(
+                esplayer_, ESPLUSPLAYER_BUFFER_AUDIO_MAX_BYTE_SIZE, 1024 * 15),
+            ESPLUSPLAYER_ERROR_TYPE_INVALID_OPERATION);
+  ASSERT_EQ(esplusplayer_set_buffer_size(
+                esplayer_, ESPLUSPLAYER_BUFFER_AUDIO_MAX_TIME_SIZE, 3000),
+            ESPLUSPLAYER_ERROR_TYPE_INVALID_OPERATION);
+  ASSERT_EQ(esplusplayer_set_buffer_size(
+                esplayer_, ESPLUSPLAYER_BUFFER_AUDIO_MIN_BYTE_THRESHOLD, 1024),
+            ESPLUSPLAYER_ERROR_TYPE_INVALID_OPERATION);
+  ASSERT_EQ(esplusplayer_set_buffer_size(
+                esplayer_, ESPLUSPLAYER_BUFFER_AUDIO_MIN_TIME_THRESHOLD, 1000),
+            ESPLUSPLAYER_ERROR_TYPE_INVALID_OPERATION);
+
   std::cout << "BasicTest, Play, END" << std::endl;
 }