• [Gstreamer] 所有类的根 --- GstElement


    前言:

    GstElement 是 Gstreamer 的最基础类,几乎所有的 Gstreamer 类都继承于此,它包装了GObject 同时提供了通用能力。

    GstElement的属性:

    None

    GstElement 是不可实例化的类,也是没有外在属性的类,无法通过 g_object_set 来对其设置属性。

    GstElement 的成员变量:

    1. struct _GstElement
    2. {
    3. GstObject object;
    4. /*< public >*/ /* with LOCK */
    5. GRecMutex state_lock;
    6. /* element state */
    7. GCond state_cond;
    8. guint32 state_cookie;
    9. GstState target_state;
    10. GstState current_state;
    11. GstState next_state;
    12. GstState pending_state;
    13. GstStateChangeReturn last_return;
    14. GstBus *bus;
    15. /* allocated clock */
    16. GstClock *clock;
    17. GstClockTimeDiff base_time; /* NULL/READY: 0 - PAUSED: current time - PLAYING: difference to clock */
    18. GstClockTime start_time;
    19. /* element pads, these lists can only be iterated while holding
    20. * the LOCK or checking the cookie after each LOCK. */
    21. guint16 numpads;
    22. GList *pads;
    23. guint16 numsrcpads;
    24. GList *srcpads;
    25. guint16 numsinkpads;
    26. GList *sinkpads;
    27. guint32 pads_cookie;
    28. /* with object LOCK */
    29. GList *contexts;
    30. /*< private >*/
    31. gpointer _gst_reserved[GST_PADDING-1];
    32. };

    base_time:

    the time of the clock right before the element is set to PLAYING. Subtracting @base_time from the current clock time in the PLAYING state will yield the running_time against the clock.

    记录设置 PLAYING 状态前的那一时刻,近似为当前 ELEMENT 在 PLAYING 状态的开始时间点,用当前时钟值减去这个值无限近似于当前 ELEMENT 已经运行了多久。

  • 相关阅读:
    B站韩顺平的正则表达式学习
    vue3中函数必须有返回值么?
    matlab运行CLBP程序为什么没有图?
    sublime
    Asp-Net-Core学习笔记:gRPC快速入门
    死锁的成因和对应的解决方案
    CSS伪类使用详解
    自然语言处理NLP
    Linux线程
    Redis的String常用命令
  • 原文地址:https://blog.csdn.net/ykun089/article/details/134338100