std::cout << "PcmTest, Play, END" << std::endl;
}
+TEST_P(EsPcmTest,
+ vdapi_basic_esplusplayer_get_low_latency_pcm_buffer_size_n_1) {
+ // mmpcmsink pipeline + no low latency
+ ASSERT_EQ(esplusplayer_open(esplayer_), ESPLUSPLAYER_ERROR_TYPE_NONE);
+ SetAppInfo(esplayer_);
+ ASSERT_TRUE(audio_reader_->SetStreamInfo(esplayer_));
+ ASSERT_EQ(esplusplayer_prepare_async(esplayer_),
+ ESPLUSPLAYER_ERROR_TYPE_NONE);
+ callback_->WaitForPrepareDone();
+
+ uint64_t frame_count = 0;
+ ASSERT_EQ(
+ esplusplayer_get_low_latency_pcm_buffer_size(esplayer_, &frame_count),
+ ESPLUSPLAYER_ERROR_TYPE_INVALID_OPERATION);
+}
+
+TEST_P(EsPcmTest,
+ vdapi_basic_esplusplayer_get_low_latency_pcm_buffer_size_n_2) {
+ //for game : omx+mmaudiosink pipeline
+ ASSERT_EQ(esplusplayer_open(esplayer_), ESPLUSPLAYER_ERROR_TYPE_NONE);
+ ASSERT_EQ(esplusplayer_set_low_latency_mode(
+ esplayer_, ESPLUSPLAYER_LOW_LATENCY_MODE_ENABLE_GAME_MODE),
+ ESPLUSPLAYER_ERROR_TYPE_NONE);
+ ASSERT_TRUE(audio_reader_->SetStreamInfo(esplayer_));
+ ASSERT_EQ(esplusplayer_prepare_async(esplayer_),
+ ESPLUSPLAYER_ERROR_TYPE_NONE);
+ callback_->WaitForPrepareDone();
+ uint64_t frame_count = 0;
+ ASSERT_EQ(
+ esplusplayer_get_low_latency_pcm_buffer_size(esplayer_, &frame_count),
+ ESPLUSPLAYER_ERROR_TYPE_INVALID_OPERATION);
+}
+
+TEST_P(EsPcmTest,
+ vdapi_basic_esplusplayer_get_low_latency_pcm_buffer_size_n_3) {
+ //for free-run : omx+mmaudiosink pipeline
+ ASSERT_EQ(esplusplayer_open(esplayer_), ESPLUSPLAYER_ERROR_TYPE_NONE);
+ ASSERT_EQ(esplusplayer_set_low_latency_mode(
+ esplayer_, ESPLUSPLAYER_LOW_LATENCY_MODE_DISABLE_SYNC),
+ ESPLUSPLAYER_ERROR_TYPE_NONE);
+ ASSERT_EQ(esplusplayer_set_low_latency_mode(
+ esplayer_, ESPLUSPLAYER_LOW_LATENCY_MODE_AUDIO),
+ ESPLUSPLAYER_ERROR_TYPE_NONE);
+ ASSERT_EQ(esplusplayer_set_low_latency_mode(
+ esplayer_, ESPLUSPLAYER_LOW_LATENCY_MODE_VIDEO),
+ ESPLUSPLAYER_ERROR_TYPE_NONE);
+ ASSERT_TRUE(audio_reader_->SetStreamInfo(esplayer_));
+ ASSERT_EQ(esplusplayer_prepare_async(esplayer_),
+ ESPLUSPLAYER_ERROR_TYPE_NONE);
+ callback_->WaitForPrepareDone();
+ uint64_t frame_count = 0;
+ ASSERT_EQ(
+ esplusplayer_get_low_latency_pcm_buffer_size(esplayer_, &frame_count),
+ ESPLUSPLAYER_ERROR_TYPE_INVALID_OPERATION);
+}
+
+TEST_P(EsPcmTest,
+ vdapi_basic_esplusplayer_get_low_latency_pcm_buffer_size_n_4) {
+ //for normal : alsasink-tv
+ ASSERT_EQ(esplusplayer_open(esplayer_), ESPLUSPLAYER_ERROR_TYPE_NONE);
+ ASSERT_TRUE(audio_reader_->SetStreamInfo(esplayer_));
+ ASSERT_EQ(esplusplayer_prepare_async(esplayer_),
+ ESPLUSPLAYER_ERROR_TYPE_NONE);
+ callback_->WaitForPrepareDone();
+ uint64_t frame_count = 0;
+ ASSERT_EQ(
+ esplusplayer_get_low_latency_pcm_buffer_size(esplayer_, &frame_count),
+ ESPLUSPLAYER_ERROR_TYPE_INVALID_OPERATION);
+}
+
INSTANTIATE_TEST_CASE_P(ESPlusplayer, EsPcmTest,
::testing::ValuesIn(es_tc::pcm_tc_list));