static PyObject * unicap_getshutter(PyObject *self, PyObject *args) { unicap_handle_t handle = getHandle(); double dur = getduration(handle); unicap_close(handle); return PyFloat_FromDouble(dur); }
static PyObject * unicap_getadjustments(PyObject *self, PyObject *args) { unicap_handle_t handle = getHandle(); unicap_format_t format = getformat(handle); const char * formatstr = format.identifier; char adjstr[1024]; double duration = getduration(handle); snprintf(adjstr, 1024, "Format:%s;Shutter:%f",formatstr, duration ); PyObject * pystr = PyUnicode_FromString(adjstr); return pystr; }
uint4 MPlayer::gettimescale(void) { if ( m_timescale == -1 ) { double t_length ; char * t_ret ; t_ret = get_property("length") ; if ( t_ret != NULL ) { t_length = atof(t_ret); m_timescale = floor(getduration() / t_length) ; } else m_timescale = 1 ; } return m_timescale ; }