CURRENT_STATUS_VIDEO360_SET_ZOOM_WITH_FOV,
CURRENT_STATUS_VIDEO360_SET_ZOOM_WITH_FOV1,
CURRENT_STATUS_VIDEO360_SET_ZOOM_WITH_FOV2,
- CURRENT_STATUS_AUDIO_CODEC_TYPE,
CURRENT_STATUS_VIDEO_CODEC_TYPE,
CURRENT_STATUS_REPLAYGAIN_ENABLE,
CURRENT_STATUS_AUDIO_OFFLOAD,
g_print("[Player_Test] prepared_cb!!!!\n");
}
-static void _audio_frame_decoded_cb_ex(player_audio_raw_data_s *audio_raw_frame, void *user_data)
-{
- player_audio_raw_data_s *audio_raw = audio_raw_frame;
-
- if (!audio_raw)
- return;
-
- g_print("[Player_Test] decoded_cb_ex! channel: %d channel_mask: %llu\n", audio_raw->channel, audio_raw->channel_mask);
-
-#if DUMP_OUTBUF
- if (audio_raw->channel_mask == 1 && fp_out1)
- fwrite((guint8 *)audio_raw->data, 1, audio_raw->size, fp_out1);
- else if (audio_raw->channel_mask == 2 && fp_out2)
- fwrite((guint8 *)audio_raw->data, 1, audio_raw->size, fp_out2);
-#endif
-}
-
static void buffering_cb(int percent, void *user_data)
{
g_print("[Player_Test] buffering_cb!!!! percent : %d\n", percent);
g_print(" ==> [Player_Test] Duration: [%d ] msec\n", duration);
}
-static void set_codec_type(int a_codec_type, int v_codec_type)
+static void set_video_codec_type(int v_codec_type)
{
int ret;
- ret = player_set_codec_type(g_player[0], PLAYER_STREAM_TYPE_AUDIO, a_codec_type);
- g_print(" ==> [Player_Test] audio codec type (%d) return: %d\n", a_codec_type, ret);
-
- ret = player_set_codec_type(g_player[0], PLAYER_STREAM_TYPE_VIDEO, v_codec_type);
+ ret = player_set_video_codec_type_ex(g_player[0], v_codec_type);
g_print(" ==> [Player_Test] video codec type (%d) return: %d\n", v_codec_type, ret);
}
static void get_codec_type(void)
{
int ret;
- player_codec_type_e atype = 0, vtype = 0;
+ player_video_codec_type_ex_e vtype = 0;
- ret = player_get_codec_type(g_player[0], PLAYER_STREAM_TYPE_AUDIO, &atype);
- g_print(" ==> [Player_Test] Audio Codec type: [%d][ret 0x%X]\n", atype, ret);
-
- ret = player_get_codec_type(g_player[0], PLAYER_STREAM_TYPE_VIDEO, &vtype);
+ ret = player_get_video_codec_type_ex(g_player[0], &vtype);
g_print(" ==> [Player_Test] Video Codec type: [%d][ret 0x%X]\n", vtype, ret);
}
-static void audio_frame_decoded_cb_ex(bool sync)
-{
- int ret;
-#if DUMP_OUTBUF
- fp_out1 = fopen("/tmp/out1.pcm", "wb");
- fp_out2 = fopen("/tmp/out2.pcm", "wb");
- if (!fp_out1 || !fp_out2) {
- g_print("File open error\n");
- return;
- }
-#endif
-
- ret = player_set_pcm_extraction_mode(g_player[0], sync, _audio_frame_decoded_cb_ex, &ret);
- g_print(" ==> [Player_Test] player_set_audio_frame_decoded_cb_ex(sync:%d) ret:%d\n", sync, ret);
-
- ret = player_set_pcm_spec(g_player[0], "F32LE", 44100, 2);
- g_print("[Player_Test] set_pcm_spec return: %d\n", ret);
-}
-
static void get_stream_info()
{
int w = 0;
g_menu_state = CURRENT_STATUS_HANDLE_NUM;
} else if (strncmp(cmd, "tr", 2) == 0) {
g_menu_state = CURRENT_STATUS_PLAYBACK_RATE;
- } else if (strncmp(cmd, "X3", 2) == 0) {
- audio_frame_decoded_cb_ex(TRUE);
- } else if (strncmp(cmd, "X4", 2) == 0) {
- audio_frame_decoded_cb_ex(FALSE);
} else if (strncmp(cmd, "X5", 2) == 0) {
g_menu_state = CURRENT_STATUS_EXPORT_PCM_OPTION;
} else if (strncmp(cmd, "ep", 2) == 0) {
} else if (strncmp(cmd, "bf", 2) == 0) {
g_menu_state = CURRENT_STATUS_SET_PRE_BUFFERING_SIZE;
} else if (strncmp(cmd, "C1", 2) == 0) {
- g_menu_state = CURRENT_STATUS_AUDIO_CODEC_TYPE;
+ g_menu_state = CURRENT_STATUS_VIDEO_CODEC_TYPE;
} else if (strncmp(cmd, "C2", 2) == 0) {
get_codec_type();
} else if (!strncmp(cmd, "si", 2)) {
g_print("[next uri] su. set next uri. \t");
g_print("gu. get next uri. \t");
g_print("sg. set gapless. \n");
- g_print("[audio_frame_decoded_cb_ex] X3. set audio_cb with sync\t");
- g_print("X4. set audio_cb with async\t");
- g_print("X5. set audio decoded cb with option\n");
+ g_print("[audio_frame_decoded_cb] X5. set audio decoded cb\n");
g_print("[video_frame_decoded_cb] ep. enable tbm surface pool\n");
g_print("[buffering] bf. set new buffering size\n");
g_print("[Video 360] si. check spherical info\t");
g_print("*** input horizontal field of view angle (1~360 deg.)\n");
} else if (g_menu_state == CURRENT_STATUS_VIDEO360_SET_ZOOM_WITH_FOV2) {
g_print("*** input vertical field of view angle (1~180 deg.)\n");
- } else if (g_menu_state == CURRENT_STATUS_AUDIO_CODEC_TYPE) {
- g_print("*** set audio codec type (1: HW, 2: SW) \n");
} else if (g_menu_state == CURRENT_STATUS_VIDEO_CODEC_TYPE) {
g_print("*** set video codec type (1: HW, 2: SW) \n");
} else if (g_menu_state == CURRENT_STATUS_REPLAYGAIN_ENABLE) {
reset_menu_state();
}
break;
- case CURRENT_STATUS_AUDIO_CODEC_TYPE:
- {
- value1 = atoi(cmd);
- g_menu_state = CURRENT_STATUS_VIDEO_CODEC_TYPE;
- }
- break;
case CURRENT_STATUS_VIDEO_CODEC_TYPE:
{
- value2 = atoi(cmd);
- set_codec_type(value1, value2);
+ value1 = atoi(cmd);
+ set_video_codec_type(value1);
reset_menu_state();
}
break;