* @details It is a object to draw video frame on.
* Data type is pointer.
* @since_tizen 3.0
+ * @remarks This parameter must be set in main thread of application.
+ * Otherwise, media_streamer_node_set_param() will return #MEDIA_STREAMER_ERROR_INVALID_OPERATION by internal restriction.
+ * To avoid #MEDIA_STREAMER_ERROR_INVALID_OPERATION in sub thread, ecore_thread_main_loop_begin() and
+ * ecore_thread_main_loop_end() can be used, but deadlock can be also occurred if main thread is busy.
* @see media_streamer_node_get_params()
+ * @see ecore_thread_main_loop_begin()
+ * @see ecore_thread_main_loop_end()
*/
#define MEDIA_STREAMER_PARAM_DISPLAY "display"
APPEND_NODE(video_converter);
media_streamer_node_create_sink(MEDIA_STREAMER_NODE_SINK_TYPE_OVERLAY, &video_sink);
- media_streamer_node_add(current_media_streamer, video_sink);
+
+ /*
+ * MEDIA_STREAMER_PARAM_DISPLAY should be set in main thread of application.
+ * Otherwise, it will return MEDIA_STREAMER_ERROR_INVALID_OPERATION by internal restriction.
+ * To avoid MEDIA_STREAMER_ERROR_INVALID_OPERATION in sub thread, ecore_thread_main_loop_begin() and
+ * ecore_thread_main_loop_end() can be used, but deadlock can be also occurred if main thread is busy.
+ */
+ ecore_thread_main_loop_begin();
media_streamer_node_set_param(video_sink, MEDIA_STREAMER_PARAM_DISPLAY, (void*)ad.win);
+ ecore_thread_main_loop_end();
+
media_streamer_node_set_param(video_sink, MEDIA_STREAMER_PARAM_DISPLAY_GEOMETRY_METHOD, "1");
+ media_streamer_node_add(current_media_streamer, video_sink);
APPEND_NODE(video_sink);
media_streamer_node_link(node , src_pad_name, video_converter, "sink");