-/**\r
- * @file\r
- * @brief The event for playback.\r
- * @interfacetype Module\r
- * @privlevel None-privilege\r
- * @privilege None\r
- * @product TV, AV, B2B\r
- * @version 1.0\r
- * @SDK_Support N\r
- * @remark This is a group of C style event related enum and structure.\r
- * @see N/A\r
- *\r
- * Copyright (c) 2018 Samsung Electronics Co., Ltd All Rights Reserved\r
- * PROPRIETARY/CONFIDENTIAL\r
- * This software is the confidential and proprietary\r
- * information of SAMSUNG ELECTRONICS ("Confidential Information"). You shall\r
- * not disclose such Confidential Information and shall use it only in\r
- * accordance with the terms of the license agreement you entered into with\r
- * SAMSUNG ELECTRONICS. SAMSUNG make no representations or warranties about the\r
- * suitability of the software, either express or implied, including but not\r
- * limited to the implied warranties of merchantability, fitness for a\r
- * particular purpose, or non-infringement. SAMSUNG shall not be liable for any\r
- * damages suffered by licensee as a result of using, modifying or distributing\r
- * this software or its derivatives.\r
- */\r
-\r
-#ifndef __PLUSPLAYER_TYPES_EVENT_H__\r
-#define __PLUSPLAYER_TYPES_EVENT_H__\r
-\r
-namespace plusplayer {\r
-/**\r
- * @brief\r
- */\r
-typedef struct {\r
- /**\r
- * @description\r
- */\r
- std::string data;\r
- /**\r
- * @description\r
- */\r
- uint64_t len;\r
-} EventMsg;\r
-\r
-/**\r
- * @brief\r
- */\r
-enum class EventType {\r
- kNone,\r
- kResolutionChanged,\r
-};\r
-\r
-} // namespace plusplayer\r
-\r
-#endif // __PLUSPLAYER_TYPES_EVENT_H__\r
+/**
+ * @file
+ * @brief The event for playback.
+ * @interfacetype Module
+ * @privlevel None-privilege
+ * @privilege None
+ * @product TV, AV, B2B
+ * @version 1.0
+ * @SDK_Support N
+ * @remark This is a group of C style event related enum and structure.
+ * @see N/A
+ *
+ * Copyright (c) 2018 Samsung Electronics Co., Ltd All Rights Reserved
+ * PROPRIETARY/CONFIDENTIAL
+ * This software is the confidential and proprietary
+ * information of SAMSUNG ELECTRONICS ("Confidential Information"). You shall
+ * not disclose such Confidential Information and shall use it only in
+ * accordance with the terms of the license agreement you entered into with
+ * SAMSUNG ELECTRONICS. SAMSUNG make no representations or warranties about the
+ * suitability of the software, either express or implied, including but not
+ * limited to the implied warranties of merchantability, fitness for a
+ * particular purpose, or non-infringement. SAMSUNG shall not be liable for any
+ * damages suffered by licensee as a result of using, modifying or distributing
+ * this software or its derivatives.
+ */
+
+#ifndef __PLUSPLAYER_TYPES_EVENT_H__
+#define __PLUSPLAYER_TYPES_EVENT_H__
+
+namespace plusplayer {
+/**
+ * @brief
+ */
+typedef struct {
+ /**
+ * @description
+ */
+ std::string data;
+ /**
+ * @description
+ */
+ uint64_t len;
+} EventMsg;
+
+/**
+ * @brief
+ */
+enum class EventType {
+ kNone,
+ kResolutionChanged,
+ kRequestedFirstRenderFrame,
+};
+
+} // namespace plusplayer
+
+#endif // __PLUSPLAYER_TYPES_EVENT_H__
CURRENT_STATUS_SELECT_TRACK,
CURRENT_STATUS_ENABLE_VIDEO_HOLE,
CURRENT_STATUS_SET_RENDER_TIME_OFFSET,
+ CURRENT_STATUS_SET_LOW_LATENCY_MODE,
};
/* for video display */
STREAM_SIGNAL(type);
}
+static void __espp_event_cb(esplusplayer_event_type type, esplusplayer_event_msg msg, void *user_data)
+{
+ g_print("__espp_event_cb(type:%d, msg:%s) \n", type, msg.data);
+}
+
static int __convert_media_format_mime_to_espp_mime(media_format_mimetype_e type)
{
g_print("media_format_mimetype(0x%x)\n", type);
else
g_print(" => esplusplayer_set_ready_to_seek_cb() success\n");
+ ret = esplusplayer_set_event_cb(g_test_h->espp_h, __espp_event_cb, g_test_h);
+ if (ret != ESPLUSPLAYER_ERROR_TYPE_NONE)
+ g_print(" => failed to esplusplayer_set_event_cb()\n");
+ else
+ g_print(" => esplusplayer_set_event_cb() success\n");
+
ret = esplusplayer_open(g_test_h->espp_h);
if (ret != ESPLUSPLAYER_ERROR_TYPE_NONE)
g_print(" => failed to esplusplayer_open()\n");
g_print(" => esplusplayer_set_render_time_offset(%d, %" PRId64 ")\n", type, time_ms);
}
+static void __test_set_low_latency_mode(int value)
+{
+ esplusplayer_low_latency_mode mode = ESPLUSPLAYER_LOW_LATENCY_MODE_NONE;
+ if (!g_test_h) {
+ g_print("test handle is NULL\n");
+ return;
+ }
+
+ switch (value)
+ {
+ case 0:
+ mode = ESPLUSPLAYER_LOW_LATENCY_MODE_NONE;
+ break;
+ case 1:
+ mode = ESPLUSPLAYER_LOW_LATENCY_MODE_DISABLE_PREROLL;
+ break;
+ default:
+ g_print("Not support low latency mode (%d)\n", value);
+ return;
+ }
+
+ int ret = esplusplayer_set_low_latency_mode(g_test_h->espp_h, mode);
+ if (ret != ESPLUSPLAYER_ERROR_TYPE_NONE)
+ g_print(" => failed to esplusplayer_set_low_latency_mode(%d)\n", mode);
+ else
+ g_print(" => esplusplayer_set_low_latency_mode(%d) success\n", mode);
+}
+
static void __test_enable_video_hole(bool value)
{
if (!g_test_h) {
g_menu_state = CURRENT_STATUS_SET_RENDER_TIME_OFFSET;
} else if (strncmp(cmd, "qp", 2) == 0) {
__test_quick_prepare();
+ } else if (strncmp(cmd, "ll", 2) == 0) {
+ g_menu_state = CURRENT_STATUS_SET_LOW_LATENCY_MODE;
} else {
g_print("unknown menu \n");
}
g_print("d.Resume\t");
g_print("e.Pause\t\t");
g_print("dt.Destroy\n");
- g_print("qp.quick prepare\n");
+ g_print("[quick] qp.quick prepare\n");
g_print("[seek] j.Seek\t\t");
g_print("[trick] tr.set playback rate\n");
g_print("[State] S.Get state\n");
g_print("[volume] f.Set Volume\t");
g_print("g.Get Volume\t");
g_print("h.Set Mute\n");
- g_print("[etc]\n");
- g_print("sr.Set render time offset\n\n");
+ g_print("[etc] ");
+ g_print("sr.Set render time offset\t");
+ g_print("ll.Set low latency mode\n\n");
g_print("-- << mediademuxer cmd >> ---------------------------------------------------------------\n");
g_print("prd.prepare demuxer\n\n");
g_print("*** Set videohole (1:enable, 0:disable)\n");
} else if (g_menu_state == CURRENT_STATUS_SET_RENDER_TIME_OFFSET) {
g_print("*** Input stream type and time offset\n");
+ } else if (g_menu_state == CURRENT_STATUS_SET_LOW_LATENCY_MODE) {
+ g_print("*** Input low latency mode (0: none, 1: disable preroll)\n");
} else {
g_print("*** Unknown status.\n");
quit_program();
}
break;
}
+ case CURRENT_STATUS_SET_LOW_LATENCY_MODE:
+ {
+ value = atoi(cmd);
+ __test_set_low_latency_mode(value);
+ reset_menu_state();
+ break;
+ }
default:
break;
}