void _on_completed (gpointer data) { Timings* t; g_print ("\n_on_completed() called\n"); g_assert (data); t = TIMINGS (data); g_assert (t); timings_stop (t); }
gboolean _trigger_stop (gpointer data) { Timings* t; g_assert (data); t = TIMINGS (data); g_assert (t); timings_stop (t); return FALSE; }
// this is what gets called if one does g_object_unref(bla) static void timings_dispose (GObject* gobject) { Timings* t; TimingsPrivate* priv; // sanity checks g_assert (gobject); t = TIMINGS (gobject); g_assert (t); g_assert (IS_TIMINGS (t)); priv = GET_PRIVATE (t); g_assert (priv); // free any allocated resources if (priv->on_screen_timer) { g_timer_destroy (priv->on_screen_timer); priv->on_screen_timer = NULL; } if (priv->duration_timer) { g_timer_destroy (priv->duration_timer); priv->duration_timer = NULL; } if (priv->paused_timer) { g_timer_destroy (priv->paused_timer); priv->paused_timer = NULL; } if (priv->timeout_id != 0) { g_source_remove (priv->timeout_id); priv->timeout_id = 0; } if (priv->max_timeout_id != 0) { g_source_remove (priv->max_timeout_id); priv->max_timeout_id = 0; } // chain up to the parent class G_OBJECT_CLASS (timings_parent_class)->dispose (gobject); }
/* ---------------------------------------------------------------------------- */ void cVidixVideoOut::YUV(sPicBuffer *buf) { uint8_t *dst; int hi, wi; uint8_t *Py=buf->pixel[0] +(buf->edge_height)*buf->stride[0] +buf->edge_width; uint8_t *Pu=buf->pixel[1]+(buf->edge_height/2)*buf->stride[1] +buf->edge_width/2; uint8_t *Pv=buf->pixel[2]+(buf->edge_height/2)*buf->stride[2] +buf->edge_width/2; int Ystride=buf->stride[0]; int UVstride=buf->stride[1]; int Width=buf->width; int Height=buf->height; if (!videoInitialized) return; START; TIMINGS("start...\n"); SetParams(Ystride, UVstride); TIMINGS("after if, before Y\n"); // Plane Y dst = (uint8_t *) vidix_play.dga_addr + vidix_play.offsets[next_frame] + vidix_play.offset.y; Py += (Ystride * syoff); Pv += (UVstride * syoff/2); Pu += (UVstride * syoff/2); if (currentPixelFormat == 0 || currentPixelFormat == 1) { if (OSDpresent && current_osdMode==OSDMODE_SOFTWARE) { for (hi=0; hi < sheight; hi++){ AlphaBlend(dst, OsdPy+hi*OSD_FULL_WIDTH, Py + sxoff, OsdPAlphaY+hi*OSD_FULL_WIDTH, swidth); Py += Ystride; dst += dstrides.y; } // Plane U dst = (uint8_t *)vidix_play.dga_addr + vidix_play.offsets[next_frame] + vidix_play.offset.u; for (hi=0; hi < sheight/2; hi++) { AlphaBlend(dst, OsdPu+hi*OSD_FULL_WIDTH/2, Pu + sxoff/2, OsdPAlphaUV+hi*OSD_FULL_WIDTH/2, swidth/2); Pu += UVstride; dst += dstrides.y / 2; } // Plane V dst = (uint8_t *)vidix_play.dga_addr + vidix_play.offsets[next_frame] + vidix_play.offset.v; for (hi=0; hi < sheight/2; hi++) { AlphaBlend(dst, OsdPv+hi*OSD_FULL_WIDTH/2, Pv + sxoff/2, OsdPAlphaUV+hi*OSD_FULL_WIDTH/2, swidth/2); Pv += UVstride; dst += dstrides.v / 2; } } else { int chromaWidth = swidth >> 1; int chromaOffset = sxoff >> 1; Py += Ystride * cutTop * 2; Pv += UVstride * cutTop; Pu += UVstride * cutTop; dst += dstrides.y * cutTop * 2; for(hi=cutTop*2; hi < sheight-cutBottom*2; hi++) { memcpy(dst, Py+sxoff, swidth); Py += Ystride; dst += dstrides.y; } TIMINGS("Before YUV\n"); if (vidix_play.flags & VID_PLAY_INTERLEAVED_UV) { int dstStride = dstrides.v << 1; dst = (uint8_t *)vidix_play.dga_addr + vidix_play.offsets[next_frame] + vidix_play.offset.v + dstStride * cutTop; for(hi = cutTop; hi < sheight/2; hi++) { uint16_t *idst = (uint16_t *) dst; uint8_t *usrc = Pu + chromaOffset, *vsrc = Pv + chromaOffset; for(wi = 0; wi < chromaWidth; wi++) { *idst++ = ( usrc[0] << 8 ) + vsrc[0]; usrc++; vsrc++; } dst += dstStride; Pu += UVstride; Pv += UVstride; } } else { int dstStride; // Plane U dstStride = dstrides.u >> 1; dst = (uint8_t *)vidix_play.dga_addr + vidix_play.offsets[next_frame] + vidix_play.offset.u + dstStride * cutTop; for(hi=cutTop; hi < sheight/2 - cutBottom; hi++) { memcpy(dst, Pu+chromaOffset, chromaWidth); Pu += UVstride; dst += dstStride; } // Plane V dstStride = dstrides.v >> 1; dst = (uint8_t *)vidix_play.dga_addr + vidix_play.offsets[next_frame] + vidix_play.offset.v + dstStride * cutTop; for(hi=cutTop; hi < sheight/2 - cutBottom; hi++) { memcpy(dst, Pv+chromaOffset, chromaWidth); Pv += UVstride; dst += dstStride; } } } } else if (currentPixelFormat == 2) {