void CDVDDemuxSMD::Stop() { if(!m_bStarted) return; CLog::Log(LOGINFO, "CDVDDemuxSMD::Stop"); SetSpeed(DVD_PLAYSPEED_PAUSE); if(m_nAudioPID != -1) RemovePidFilter(m_nAudioPID); if(m_nVideoPID != -1) RemovePidFilter(m_nVideoPID); const std::vector<DvbTunerPtr>& tuners = DVBManager::GetInstance().GetTuners(); if (tuners[0]->GetTunerType() == DvbTuner::TUNER_TYPE_DVBT) RemovePidFilter(EIT_PID); m_nAudioPID = -1; m_nVideoPID = -1; CDemuxStreamVideo* st = (CDemuxStreamVideo *)m_streams[VIDEO_STREAM]; st->iWidth = 0; st->iHeight = 0; SetState(DEMUX_STATE_IDLE); m_bFirstFrame = false; m_bStarted = false; m_lastPatStopWatch.Reset(); gdl_flip(GDL_VIDEO_PLANE, GDL_SURFACE_INVALID, GDL_FLIP_ASYNC); }
static void IntelCE_SetCursor(void *pvCursor) { stCursor* cursor = (stCursor*)pvCursor; // Copy the cursor onto the plane for (int currentRow = 0; currentRow < GDL_CURSOR_HEIGHT; currentRow++) { memcpy(cursorPlaneBuffer+(currentRow*cursorPlanePitch), cursor->pData+(currentRow*GDL_CURSOR_WIDTH), GDL_CURSOR_WIDTH); } gdl_flip(GDL_PLANE_ID_IAP_B,destination_surface_info.id, GDL_FLIP_ASYNC); }
// Initializes a plane for the graphics to be rendered to static gdl_ret_t setup_plane(gdl_plane_id_t plane) { gdl_pixel_format_t pixelFormat = GDL_PF_ARGB_8; gdl_color_space_t colorSpace = GDL_COLOR_SPACE_RGB; gdl_color_t gdl_color; gdl_palette_t pal; gdl_rectangle_t srcRect; gdl_rectangle_t dstRect; gdl_ret_t rc = GDL_SUCCESS; dstRect.origin.x = 0; dstRect.origin.y = 0; dstRect.width = GDL_CURSOR_WIDTH; dstRect.height = GDL_CURSOR_HEIGHT; srcRect.origin.x = 0; srcRect.origin.y = 0; srcRect.width = GDL_CURSOR_WIDTH; srcRect.height = GDL_CURSOR_HEIGHT; rc = gdl_plane_reset(plane); if (GDL_SUCCESS == rc) { rc = gdl_plane_config_begin(plane); } if (GDL_SUCCESS == rc) { rc = gdl_plane_set_attr(GDL_PLANE_SRC_COLOR_SPACE, &colorSpace); } if (GDL_SUCCESS == rc) { rc = gdl_plane_set_attr(GDL_PLANE_PIXEL_FORMAT, &pixelFormat); } if (GDL_SUCCESS == rc) { rc = gdl_plane_set_attr(GDL_PLANE_DST_RECT, &dstRect); } if (GDL_SUCCESS == rc) { rc = gdl_plane_set_attr(GDL_PLANE_SRC_RECT, &srcRect); } if (GDL_SUCCESS == rc) { rc = gdl_plane_config_end(GDL_FALSE); } else { gdl_plane_config_end(GDL_TRUE); } if (GDL_SUCCESS != rc) { qCritical("GDL configuration failed! GDL error code is 0x%x\n", rc); } rc = gdl_alloc_surface(GDL_PF_ARGB_8, GDL_CURSOR_WIDTH, GDL_CURSOR_HEIGHT, 0, &destination_surface_info); CHECK_GDL_RC(rc, "Failed "); // Black pal.data[0].a = 0xff; pal.data[0].r_y = 0x00; pal.data[0].g_u = 0x00; pal.data[0].b_v = 0x00; // White pal.data[1].a = 0xff; pal.data[1].r_y = 0xff; pal.data[1].g_u = 0xff; pal.data[1].b_v = 0xff; // Transparent background pal.data[2].a = 0x00; pal.data[2].r_y = 0x00; pal.data[2].g_u = 0x00; pal.data[2].b_v = 0x00; pal.length = 3; rc = gdl_set_palette(destination_surface_info.id, &pal); CHECK_GDL_RC(rc, "Failed "); rc = gdl_map_surface(destination_surface_info.id, &cursorPlaneBuffer, &cursorPlanePitch); CHECK_GDL_RC(rc, "Failed "); /* The CLUT index */ gdl_color.alpha_index = 0; rc = gdl_clear_surface(destination_surface_info.id, &gdl_color); CHECK_GDL_RC(rc,"Failed "); rc = gdl_flip(plane,destination_surface_info.id, GDL_FLIP_ASYNC); CHECK_GDL_RC(rc,"Failed "); return rc; }