コード例 #1
0
ファイル: video.go プロジェクト: Jmend25/boxeebox-xbmc
func Flush() {
	log.Printf("%128s: %02d", "ismd_vidrend_set_flush_policy", C.ismd_vidrend_set_flush_policy(m_video_render, C.ISMD_VIDREND_FLUSH_POLICY_REPEAT_FRAME))
	SetState(C.ISMD_DEV_STATE_PAUSE)

	log.Printf("%128s: %02d", "ismd_dev_flush", C.ismd_dev_flush(m_viddec))
	log.Printf("%128s: %02d", "ismd_dev_flush", C.ismd_dev_flush(m_video_proc))
	log.Printf("%128s: %02d", "ismd_dev_flush", C.ismd_dev_flush(m_video_render))
}
コード例 #2
0
ファイル: video.go プロジェクト: Jmend25/boxeebox-xbmc
func Init(codec_type C.ismd_codec_type_t, plane C.gdl_plane_id_t) {

	C.gdl_plane_reset(plane)
	C.gdl_plane_config_begin(plane)

	var policy C.gdl_vid_policy_t = C.GDL_VID_POLICY_RESIZE

	C.gdl_plane_set_attr(C.GDL_PLANE_VID_MISMATCH_POLICY, unsafe.Pointer(&policy))
	C.gdl_plane_config_end(C.GDL_FALSE)

	log.Printf("%128s: %02d", "ismd_clock_alloc", C.ismd_clock_alloc(C.ISMD_CLOCK_TYPE_FIXED, &m_main_clock))
	log.Printf("%128s: %02d", "ismd_clock_make_primary", C.ismd_clock_make_primary(m_main_clock))
	log.Printf("%128s: %02d", "ismd_viddec_open", C.ismd_viddec_open(codec_type, &m_viddec))
	log.Printf("%128s: %02d", "ismd_viddec_get_input_port", C.ismd_viddec_get_input_port(m_viddec, &m_viddec_input_port))
	log.Printf("%128s: %02d", "ismd_viddec_get_output_port", C.ismd_viddec_get_output_port(m_viddec, &m_viddec_output_port))
	log.Printf("%128s: %02d", "ismd_viddec_set_pts_interpolation_policy", C.ismd_viddec_set_pts_interpolation_policy(m_viddec, C.ISMD_VIDDEC_INTERPOLATE_MISSING_PTS, 0))
	log.Printf("%128s: %02d", "ismd_viddec_set_max_frames_to_decode", C.ismd_viddec_set_max_frames_to_decode(m_viddec, C.ISMD_VIDDEC_ALL_FRAMES))
	log.Printf("%128s: %02d", "ismd_vidpproc_open", C.ismd_vidpproc_open(&m_video_proc))
	log.Printf("%128s: %02d", "ismd_vidpproc_set_scaling_policy", C.ismd_vidpproc_set_scaling_policy(m_video_proc, C.SCALE_TO_FIT))
	log.Printf("%128s: %02d", "ismd_vidpproc_get_input_port", C.ismd_vidpproc_get_input_port(m_video_proc, &m_video_input_port_proc))
	log.Printf("%128s: %02d", "ismd_vidpproc_get_output_port", C.ismd_vidpproc_get_output_port(m_video_proc, &m_video_output_port_proc))
	log.Printf("%128s: %02d", "ismd_vidpproc_pan_scan_disable", C.ismd_vidpproc_pan_scan_disable(m_video_proc))
	log.Printf("%128s: %02d", "ismd_vidpproc_gaussian_enable", C.ismd_vidpproc_gaussian_enable(m_video_proc))
	log.Printf("%128s: %02d", "ismd_vidpproc_deringing_enable", C.ismd_vidpproc_deringing_enable(m_video_proc))
	log.Printf("%128s: %02d", "ismd_vidrend_open", C.ismd_vidrend_open(&m_video_render))
	log.Printf("%128s: %02d", "ismd_vidrend_get_input_port", C.ismd_vidrend_get_input_port(m_video_render, &m_video_input_port_renderer))
	log.Printf("%128s: %02d", "ismd_dev_set_clock", C.ismd_dev_set_clock(m_video_render, m_main_clock))
	log.Printf("%128s: %02d", "ismd_clock_set_vsync_pipe", C.ismd_clock_set_vsync_pipe(m_main_clock, 0))

	const width = 1920
	const height = 1080
	log.Printf("%128s: %02d", "ismd_vidpproc_set_dest_params2", C.ismd_vidpproc_set_dest_params(m_video_proc, width, height, width, height))
	log.Printf("%128s: %02d", "ismd_vidrend_set_video_plane", C.ismd_vidrend_set_video_plane(m_video_render, C.uint(plane)))
	log.Printf("%128s: %02d", "ismd_vidrend_set_flush_policy", C.ismd_vidrend_set_flush_policy(m_video_render, C.ISMD_VIDREND_FLUSH_POLICY_REPEAT_FRAME))
	log.Printf("%128s: %02d", "ismd_vidrend_set_stop_policy", C.ismd_vidrend_set_stop_policy(m_video_render, C.ISMD_VIDREND_STOP_POLICY_DISPLAY_BLACK))
	log.Printf("%128s: %02d", "ismd_vidrend_enable_max_hold_time", C.ismd_vidrend_enable_max_hold_time(m_video_render, 30, 1))
	log.Printf("%128s: %02d", "ismd_port_connect", C.ismd_port_connect(m_viddec_output_port, m_video_input_port_proc))
	log.Printf("%128s: %02d", "ismd_port_connect", C.ismd_port_connect(m_video_output_port_proc, m_video_input_port_renderer))

	SetState(C.ISMD_DEV_STATE_PAUSE)
}