|
887 | 887 | <li><a href="#features">Features</a></li> |
888 | 888 | <li><a href="#pipelines">Pipelines</a></li> |
889 | 889 | <li><a href="#install">Install</a></li> |
| 890 | + <li><a href="#custom-plugins">Extend</a></li> |
890 | 891 | <li><a href="https://github.com/collabora/gst-python-ml" class="nav-btn-ghost">GitHub</a></li> |
891 | 892 | <li><a href="#install" class="nav-btn-green">Get Started</a></li> |
892 | 893 | </ul> |
@@ -941,7 +942,7 @@ <h3>12</h3> |
941 | 942 | <p>ML Engines</p> |
942 | 943 | </div> |
943 | 944 | <div class="stat-cell"> |
944 | | - <h3>35+</h3> |
| 945 | + <h3>39</h3> |
945 | 946 | <p>GStreamer Elements</p> |
946 | 947 | </div> |
947 | 948 | <div class="stat-cell"> |
@@ -1669,6 +1670,57 @@ <h2 class="section-title">Up and Running in Minutes</h2> |
1669 | 1670 | </div> |
1670 | 1671 | </section> |
1671 | 1672 |
|
| 1673 | +<!-- ═══ CUSTOM PLUGINS ═══ --> |
| 1674 | +<section id="custom-plugins"> |
| 1675 | + <div class="section-inner"> |
| 1676 | + <span class="section-label">Extensibility</span> |
| 1677 | + <h2 class="section-title">Build Your Own Plugins</h2> |
| 1678 | + <p class="section-desc">Create custom GStreamer elements that inherit from gst-python-ml base classes. Full access to the engine abstraction, model loading, and pipeline integration.</p> |
| 1679 | + |
| 1680 | + <div class="code-block fade-in" style="margin-top: 40px;"> |
| 1681 | + <div class="code-header"> |
| 1682 | + <span>my_plugins/python/my_detector.py</span> |
| 1683 | + </div> |
| 1684 | +<pre><span class="kw">from</span> base_objectdetector <span class="kw">import</span> BaseObjectDetector |
| 1685 | +<span class="kw">from</span> gi.repository <span class="kw">import</span> GObject, Gst |
| 1686 | + |
| 1687 | +<span class="kw">class</span> <span class="str">MyDetector</span>(BaseObjectDetector): |
| 1688 | + __gstmetadata__ = ( |
| 1689 | + <span class="str">"My Custom Detector"</span>, <span class="str">"Video/Filter"</span>, |
| 1690 | + <span class="str">"A custom object detector"</span>, <span class="str">"Your Name"</span>, |
| 1691 | + ) |
| 1692 | + |
| 1693 | +GObject.type_register(MyDetector) |
| 1694 | +__gstelementfactory__ = (<span class="str">"my_detector"</span>, Gst.Rank.NONE, MyDetector)</pre> |
| 1695 | + </div> |
| 1696 | + |
| 1697 | + <div class="code-block fade-in" style="margin-top: 24px;"> |
| 1698 | + <div class="code-header"> |
| 1699 | + <span>Environment Setup</span> |
| 1700 | + </div> |
| 1701 | +<pre><span class="cmt"># Framework first (provides base classes on sys.path), custom second</span> |
| 1702 | +<span class="kw">export</span> GST_PLUGIN_PATH=<span class="str">$HOME/src/gst-python-ml/plugins:$HOME/my_plugins:$GST_PLUGIN_PATH</span> |
| 1703 | +<span class="kw">export</span> PYTHONPATH=<span class="str">$HOME/my_plugins/python:$PYTHONPATH</span> |
| 1704 | + |
| 1705 | +<span class="cmt"># Verify your element</span> |
| 1706 | +gst-inspect-1.0 my_detector</pre> |
| 1707 | + </div> |
| 1708 | + |
| 1709 | + <div class="pipeline-grid fade-in" style="margin-top: 40px;"> |
| 1710 | + <div class="pipeline-card"> |
| 1711 | + <span class="pipe-tag">Base Classes</span> |
| 1712 | + <h3>Available for Inheritance</h3> |
| 1713 | + <p><code>BaseObjectDetector</code> · <code>BaseTransform</code> · <code>BaseClassifier</code> · <code>BaseCaption</code> · <code>BaseLLM</code> · <code>BaseTranscribe</code> · <code>BaseTranslate</code> · <code>BaseTTS</code> · <code>BaseSeparate</code></p> |
| 1714 | + </div> |
| 1715 | + <div class="pipeline-card"> |
| 1716 | + <span class="pipe-tag">Inherited Features</span> |
| 1717 | + <h3>Zero Boilerplate</h3> |
| 1718 | + <p>Engine selection · model loading · device management · buffer handling · metadata propagation · all GObject properties</p> |
| 1719 | + </div> |
| 1720 | + </div> |
| 1721 | + </div> |
| 1722 | +</section> |
| 1723 | + |
1672 | 1724 | <!-- ═══ DEPLOYMENT ═══ --> |
1673 | 1725 | <section id="deploy"> |
1674 | 1726 | <div class="section-inner"> |
|
0 commit comments