Example #1
0
static void
dvb_base_bin_task (DvbBaseBin * basebin)
{
  gint pollres;

  GST_DEBUG_OBJECT (basebin, "In task");

  /* If we haven't tried to open the cam, try now */
  if (G_UNLIKELY (basebin->trycam))
    dvb_base_bin_init_cam (basebin);

  /* poll with timeout */
  pollres = gst_poll_wait (basebin->poll, GST_SECOND / 4);

  if (G_UNLIKELY (pollres == -1)) {
    gst_task_stop (basebin->task);
    return;
  }
  if (basebin->hwcam) {
    cam_device_poll (basebin->hwcam);

    if (basebin->pmtlist_changed) {
      if (cam_device_ready (basebin->hwcam)) {
        GST_DEBUG_OBJECT (basebin, "pmt list changed");
        dvb_base_bin_reset_pmtlist (basebin);
      } else {
        GST_DEBUG_OBJECT (basebin, "pmt list changed but CAM not ready");
      }
    }
  }
}
Example #2
0
static gboolean
dvb_base_bin_ts_pad_probe_cb (GstPad * pad, GstBuffer * buf, gpointer user_data)
{
  DvbBaseBin *dvbbasebin = GST_DVB_BASE_BIN (user_data);

  if (dvbbasebin->hwcam) {
    cam_device_poll (dvbbasebin->hwcam);

    if (dvbbasebin->pmtlist_changed) {
      if (cam_device_ready (dvbbasebin->hwcam)) {
        GST_DEBUG_OBJECT (dvbbasebin, "pmt list changed");
        dvb_base_bin_reset_pmtlist (dvbbasebin);
      } else {
        GST_DEBUG_OBJECT (dvbbasebin, "pmt list changed but CAM not ready");
      }
    }
  }

  return TRUE;
}
Example #3
0
static GstPadProbeReturn
dvb_base_bin_ts_pad_probe_cb (GstPad * pad, GstPadProbeInfo * info,
    gpointer user_data)
{
  DvbBaseBin *dvbbasebin = GST_DVB_BASE_BIN (user_data);

  if (dvbbasebin->hwcam) {
    cam_device_poll (dvbbasebin->hwcam);

    if (dvbbasebin->pmtlist_changed) {
      if (cam_device_ready (dvbbasebin->hwcam)) {
        GST_DEBUG_OBJECT (dvbbasebin, "pmt list changed");
        dvb_base_bin_reset_pmtlist (dvbbasebin);
      } else {
        GST_DEBUG_OBJECT (dvbbasebin, "pmt list changed but CAM not ready");
      }
    }
  }

  return GST_PAD_PROBE_OK;
}