[Bug 731008] New: gst-python: Implement TIME_ARGS helper

GStreamer (bugzilla.gnome.org) bugzilla at gnome.org
Fri May 30 11:12:18 PDT 2014


https://bugzilla.gnome.org/show_bug.cgi?id=731008
  GStreamer | gst-python | git

           Summary: gst-python: Implement TIME_ARGS helper
    Classification: Platform
           Product: GStreamer
           Version: git
        OS/Version: Linux
            Status: UNCONFIRMED
          Severity: normal
          Priority: Normal
         Component: gst-python
        AssignedTo: gstreamer-bugs at lists.freedesktop.org
        ReportedBy: nicolas.dufresne at collabora.co.uk
         QAContact: gstreamer-bugs at lists.freedesktop.org
     GNOME version: ---


This helper cannot be translated as it's an expanding C macro. But we could
implement it, it should look like

def TIME_ARGS(time):
  if (time == Gst.CLOCK_TIME_NONE):
    return (99, 99, 99, 999999999)
  else:
    return (time / (Gst.SECOND * 60 * 60), time / (Gst.SECOND * 60) % 60, time
/ Gst.SECOND % 60, time % Gst.SECOND)

And could be used like this:
print ("Allo %s %" + Gst.TIME_FORMAT + "\n") % (("toto",) +
Gst.TIME_ARGS(time))

Would that make sense for Python or is there something better ?

-- 
Configure bugmail: https://bugzilla.gnome.org/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the QA contact for the bug.
You are the assignee for the bug.


More information about the gstreamer-bugs mailing list