\hypertarget{tensor__filter_8c}{}\doxysection{nnstreamer/tensor\+\_\+filter/tensor\+\_\+filter.c File Reference}
\label{tensor__filter_8c}\index{nnstreamer/tensor\_filter/tensor\_filter.c@{nnstreamer/tensor\_filter/tensor\_filter.c}}


G\+Streamer plugin to use general neural network frameworks as filters.  


{\ttfamily \#include $<$string.\+h$>$}\newline
{\ttfamily \#include $<$nnstreamer\+\_\+util.\+h$>$}\newline
{\ttfamily \#include \char`\"{}tensor\+\_\+filter.\+h\char`\"{}}\newline
Include dependency graph for tensor\+\_\+filter.\+c\+:
\nopagebreak
\begin{figure}[H]
\begin{center}
\leavevmode
\includegraphics[width=350pt]{tensor__filter_8c__incl}
\end{center}
\end{figure}
\doxysubsection*{Classes}
\begin{DoxyCompactItemize}
\item 
struct \mbox{\hyperlink{struct__FilterTransformData}{\+\_\+\+Filter\+Transform\+Data}}
\begin{DoxyCompactList}\small\item\em Internal data structure for tensor\+\_\+filter transform data. \end{DoxyCompactList}\end{DoxyCompactItemize}
\doxysubsection*{Macros}
\begin{DoxyCompactItemize}
\item 
\#define \mbox{\hyperlink{tensor__filter_8c_a1acabfc6df7815d855b344258609c7c6}{E\+V\+E\+N\+T\+\_\+\+N\+A\+M\+E\+\_\+\+U\+P\+D\+A\+T\+E\+\_\+\+M\+O\+D\+EL}}~\char`\"{}evt\+\_\+update\+\_\+model\char`\"{}
\item 
\#define \mbox{\hyperlink{tensor__filter_8c_adef911caed7c65a1643062817f4a59d7}{G\+S\+T\+\_\+\+C\+A\+T\+\_\+\+D\+E\+F\+A\+U\+LT}}~gst\+\_\+tensor\+\_\+filter\+\_\+debug
\item 
\#define \mbox{\hyperlink{tensor__filter_8c_afa7151d60b0634a4060b866259a425f9}{T\+F\+\_\+\+M\+O\+D\+E\+L\+N\+A\+ME}}(\mbox{\hyperlink{gsttensor__srciio_8c_ad143acf0919ab4b62947be3f2f168a91}{prop}})~((\mbox{\hyperlink{gsttensor__srciio_8c_ad143acf0919ab4b62947be3f2f168a91}{prop}})-\/$>$model\+\_\+files ? ((\mbox{\hyperlink{gsttensor__srciio_8c_ad143acf0919ab4b62947be3f2f168a91}{prop}})-\/$>$model\+\_\+files\mbox{[}0\mbox{]}) \+: \char`\"{}\mbox{[}No Model File\mbox{]}\char`\"{})
\item 
\#define \mbox{\hyperlink{tensor__filter_8c_aa2d8b0bc5c1225ba8d7f84e235c1cf0d}{C\+A\+P\+S\+\_\+\+S\+T\+R\+I\+NG}}~\mbox{\hyperlink{tensor__typedef_8h_a284951c7aec77ea34d1c0279d5a5b4a0}{G\+S\+T\+\_\+\+T\+E\+N\+S\+O\+R\+\_\+\+C\+A\+P\+\_\+\+D\+E\+F\+A\+U\+LT}} \char`\"{};\char`\"{} \mbox{\hyperlink{tensor__typedef_8h_a23fa98afadf9e35f428d8d56b739b233}{G\+S\+T\+\_\+\+T\+E\+N\+S\+O\+R\+S\+\_\+\+C\+A\+P\+\_\+\+M\+A\+KE}} (\char`\"{}\{ static, flexible \}\char`\"{})
\begin{DoxyCompactList}\small\item\em Default caps string for both sink and source pad. \end{DoxyCompactList}\item 
\#define \mbox{\hyperlink{tensor__filter_8c_a0c2da03bee53e742d6b8c4ce7d1e85e0}{gst\+\_\+tensor\+\_\+filter\+\_\+parent\+\_\+class}}~parent\+\_\+class
\item 
\#define \mbox{\hyperlink{tensor__filter_8c_aabbfbbd2f4b382672d53366b228f63db}{L\+A\+T\+E\+N\+C\+Y\+\_\+\+R\+E\+P\+O\+R\+T\+\_\+\+H\+E\+A\+D\+R\+O\+OM}}~0.\+05
\begin{DoxyCompactList}\small\item\em Headroom (extra duration) added to actual latency estimate reported to L\+A\+T\+E\+N\+CY query, to limit number of updates when tracking the maximum value -\/ arbitrarily set to 5\%. \end{DoxyCompactList}\item 
\#define \mbox{\hyperlink{tensor__filter_8c_aa166c06f12dff0bfd19dbea6970585fa}{L\+A\+T\+E\+N\+C\+Y\+\_\+\+R\+E\+P\+O\+R\+T\+\_\+\+T\+H\+R\+E\+S\+H\+O\+LD}}~0.\+25
\begin{DoxyCompactList}\small\item\em Threshold deciding when tracking latency estimate that current value is sufficiently lower than reported value so that a notification update is necessary -\/ arbitrarily set to 25\%. \end{DoxyCompactList}\item 
\#define \mbox{\hyperlink{tensor__filter_8c_a06bb1fa9e4aae69e51fc60ab3bfeab44}{T\+H\+R\+E\+S\+H\+O\+L\+D\+\_\+\+D\+R\+O\+P\+\_\+\+O\+LD}}~(2000)
\item 
\#define \mbox{\hyperlink{tensor__filter_8c_a5bd7e5ebda4418d86d1460a504792b68}{T\+H\+R\+E\+S\+H\+O\+L\+D\+\_\+\+C\+A\+C\+H\+E\+\_\+\+O\+LD}}~(1000)
\end{DoxyCompactItemize}
\doxysubsection*{Typedefs}
\begin{DoxyCompactItemize}
\item 
typedef struct \mbox{\hyperlink{struct__FilterTransformData}{\+\_\+\+Filter\+Transform\+Data}} \mbox{\hyperlink{tensor__filter_8c_ac238b44af3ba2965bf5790935401a58b}{Filter\+Transform\+Data}}
\begin{DoxyCompactList}\small\item\em Internal data structure for tensor\+\_\+filter transform data. \end{DoxyCompactList}\end{DoxyCompactItemize}
\doxysubsection*{Functions}
\begin{DoxyCompactItemize}
\item 
\mbox{\hyperlink{tensor__filter_8c_a56af4a48d64291db80839c03e88d0002}{G\+S\+T\+\_\+\+D\+E\+B\+U\+G\+\_\+\+C\+A\+T\+E\+G\+O\+R\+Y\+\_\+\+S\+T\+A\+T\+IC}} (gst\+\_\+tensor\+\_\+filter\+\_\+debug)
\item 
\mbox{\hyperlink{tensor__filter_8c_aa35cd00686e62e9f265d1f6369b6aec4}{G\+\_\+\+D\+E\+F\+I\+N\+E\+\_\+\+T\+Y\+PE}} (\mbox{\hyperlink{tensor__filter_8h_a197b091651b97cbce82d3b27a5c10b88}{Gst\+Tensor\+Filter}}, gst\+\_\+tensor\+\_\+filter, G\+S\+T\+\_\+\+T\+Y\+P\+E\+\_\+\+B\+A\+S\+E\+\_\+\+T\+R\+A\+N\+S\+F\+O\+RM)
\item 
static void \mbox{\hyperlink{tensor__filter_8c_a67ad721491d62420348da9de33bcff59}{gst\+\_\+tensor\+\_\+filter\+\_\+set\+\_\+property}} (G\+Object $\ast$object, guint prop\+\_\+id, const G\+Value $\ast$value, G\+Param\+Spec $\ast$pspec)
\begin{DoxyCompactList}\small\item\em Setter for tensor\+\_\+filter properties. \end{DoxyCompactList}\item 
static void \mbox{\hyperlink{tensor__filter_8c_a5fe841bb13a3d1a6409cba93d2632cfe}{gst\+\_\+tensor\+\_\+filter\+\_\+get\+\_\+property}} (G\+Object $\ast$object, guint prop\+\_\+id, G\+Value $\ast$value, G\+Param\+Spec $\ast$pspec)
\begin{DoxyCompactList}\small\item\em Getter for tensor\+\_\+filter properties. \end{DoxyCompactList}\item 
static void \mbox{\hyperlink{tensor__filter_8c_ad13ce1d93921dd277d7298d957300acb}{gst\+\_\+tensor\+\_\+filter\+\_\+finalize}} (G\+Object $\ast$object)
\begin{DoxyCompactList}\small\item\em Function to finalize instance. \end{DoxyCompactList}\item 
static Gst\+Flow\+Return \mbox{\hyperlink{tensor__filter_8c_a30bfa834d93d6d9651275e92c79cabd9}{gst\+\_\+tensor\+\_\+filter\+\_\+transform}} (Gst\+Base\+Transform $\ast$trans, Gst\+Buffer $\ast$inbuf, Gst\+Buffer $\ast$outbuf)
\begin{DoxyCompactList}\small\item\em non-\/ip transform. required vmethod of Gst\+Base\+Transform. \end{DoxyCompactList}\item 
static Gst\+Caps $\ast$ \mbox{\hyperlink{tensor__filter_8c_a8f485b3d8ed42bb5652d2cf2b2f0b77c}{gst\+\_\+tensor\+\_\+filter\+\_\+transform\+\_\+caps}} (Gst\+Base\+Transform $\ast$trans, Gst\+Pad\+Direction direction, Gst\+Caps $\ast$caps, Gst\+Caps $\ast$filter)
\begin{DoxyCompactList}\small\item\em configure tensor-\/srcpad cap from \char`\"{}proposed\char`\"{} cap. \end{DoxyCompactList}\item 
static Gst\+Caps $\ast$ \mbox{\hyperlink{tensor__filter_8c_a31b85515cad23ecec3bad2392fa901f5}{gst\+\_\+tensor\+\_\+filter\+\_\+fixate\+\_\+caps}} (Gst\+Base\+Transform $\ast$trans, Gst\+Pad\+Direction direction, Gst\+Caps $\ast$caps, Gst\+Caps $\ast$othercaps)
\begin{DoxyCompactList}\small\item\em fixate caps. required vmethod of Gst\+Base\+Transform. \end{DoxyCompactList}\item 
static gboolean \mbox{\hyperlink{tensor__filter_8c_a192ba1d693b39dde520e3077f37f5e0f}{gst\+\_\+tensor\+\_\+filter\+\_\+set\+\_\+caps}} (Gst\+Base\+Transform $\ast$trans, Gst\+Caps $\ast$incaps, Gst\+Caps $\ast$outcaps)
\begin{DoxyCompactList}\small\item\em set caps. required vmethod of Gst\+Base\+Transform. \end{DoxyCompactList}\item 
static gboolean \mbox{\hyperlink{tensor__filter_8c_a2ba305d840864774aaffb14a9ee60f1e}{gst\+\_\+tensor\+\_\+filter\+\_\+query}} (Gst\+Base\+Transform $\ast$trans, Gst\+Pad\+Direction direction, Gst\+Query $\ast$query)
\begin{DoxyCompactList}\small\item\em query handling, optional vmethod of Gst\+Base\+Transform. \end{DoxyCompactList}\item 
static gboolean \mbox{\hyperlink{tensor__filter_8c_a286f500286a4e237264677095e2daf90}{gst\+\_\+tensor\+\_\+filter\+\_\+transform\+\_\+size}} (Gst\+Base\+Transform $\ast$trans, Gst\+Pad\+Direction direction, Gst\+Caps $\ast$caps, gsize size, Gst\+Caps $\ast$othercaps, gsize $\ast$othersize)
\begin{DoxyCompactList}\small\item\em Tell the framework the required size of buffer based on the info of the other side pad. optional vmethod of Base\+Transform. \end{DoxyCompactList}\item 
static gboolean \mbox{\hyperlink{tensor__filter_8c_a3e18f9fb0dc76f35b3fcbad22a1b0830}{gst\+\_\+tensor\+\_\+filter\+\_\+start}} (Gst\+Base\+Transform $\ast$trans)
\begin{DoxyCompactList}\small\item\em Called when the element starts processing. optional vmethod of Base\+Transform. \end{DoxyCompactList}\item 
static gboolean \mbox{\hyperlink{tensor__filter_8c_aee484febebf76321eef8a7fd1241f7fa}{gst\+\_\+tensor\+\_\+filter\+\_\+stop}} (Gst\+Base\+Transform $\ast$trans)
\begin{DoxyCompactList}\small\item\em Called when the element stops processing. optional vmethod of Base\+Transform. \end{DoxyCompactList}\item 
static gboolean \mbox{\hyperlink{tensor__filter_8c_adea189e2a9d5d8afb5b8b63590808169}{gst\+\_\+tensor\+\_\+filter\+\_\+sink\+\_\+event}} (Gst\+Base\+Transform $\ast$trans, Gst\+Event $\ast$event)
\begin{DoxyCompactList}\small\item\em Event handler for sink pad of tensor filter. \end{DoxyCompactList}\item 
static gboolean \mbox{\hyperlink{tensor__filter_8c_a2e51680785fd053d30ec9e80b6d69975}{gst\+\_\+tensor\+\_\+filter\+\_\+src\+\_\+event}} (Gst\+Base\+Transform $\ast$trans, Gst\+Event $\ast$event)
\begin{DoxyCompactList}\small\item\em Event handler for src pad of tensor filter. \end{DoxyCompactList}\item 
static void \mbox{\hyperlink{tensor__filter_8c_a7d40351340e3d6ef839e8aa5d3e8ecbf}{gst\+\_\+tensor\+\_\+filter\+\_\+class\+\_\+init}} (\mbox{\hyperlink{tensor__filter_8h_ae4fad538a1d32e8c5884c2b23ddee6ea}{Gst\+Tensor\+Filter\+Class}} $\ast$klass)
\begin{DoxyCompactList}\small\item\em initialize the tensor\+\_\+filter\textquotesingle{}s class \end{DoxyCompactList}\item 
static void \mbox{\hyperlink{tensor__filter_8c_acbd2e6976ea088b2e261acf6adc89e49}{gst\+\_\+tensor\+\_\+filter\+\_\+init}} (\mbox{\hyperlink{tensor__filter_8h_a197b091651b97cbce82d3b27a5c10b88}{Gst\+Tensor\+Filter}} $\ast$self)
\begin{DoxyCompactList}\small\item\em initialize the new element instantiate pads and add them to element set pad callback functions initialize instance structure \end{DoxyCompactList}\item 
static gsize \mbox{\hyperlink{tensor__filter_8c_afe4b5e29828237036a5c8dc6b1861759}{gst\+\_\+tensor\+\_\+filter\+\_\+get\+\_\+tensor\+\_\+size}} (\mbox{\hyperlink{tensor__filter_8h_a197b091651b97cbce82d3b27a5c10b88}{Gst\+Tensor\+Filter}} $\ast$self, guint index, gboolean is\+\_\+input)
\begin{DoxyCompactList}\small\item\em Calculate tensor buffer size. \end{DoxyCompactList}\item 
static void \mbox{\hyperlink{tensor__filter_8c_afaa5b8a2815aba726680d28fff6f7da0}{gst\+\_\+tensor\+\_\+filter\+\_\+destroy\+\_\+notify}} (void $\ast$\mbox{\hyperlink{gsttensor__if_8c_a3c9cc8d6e8da85fef51da4c7115b97f6}{data}})
\begin{DoxyCompactList}\small\item\em Free the data allocated for tensor transform. \end{DoxyCompactList}\item 
static Gst\+Memory $\ast$ \mbox{\hyperlink{tensor__filter_8c_a79a9928f5846adc13ae2abecdb190f76}{gst\+\_\+tensor\+\_\+filter\+\_\+get\+\_\+wrapped\+\_\+mem}} (\mbox{\hyperlink{tensor__filter_8h_a197b091651b97cbce82d3b27a5c10b88}{Gst\+Tensor\+Filter}} $\ast$self, gpointer \mbox{\hyperlink{gsttensor__if_8c_a3c9cc8d6e8da85fef51da4c7115b97f6}{data}}, gsize size)
\begin{DoxyCompactList}\small\item\em Allocate new memory block from given data. \end{DoxyCompactList}\item 
static void \mbox{\hyperlink{tensor__filter_8c_a744e8bfd00209c404eebc4b067e54181}{prepare\+\_\+statistics}} (\mbox{\hyperlink{tensor__filter__common_8h_a1008ddabc82c64e2305fd7465cceee80}{Gst\+Tensor\+Filter\+Private}} $\ast$priv)
\begin{DoxyCompactList}\small\item\em Prepare statistics for performance profiling (e.\+g, latency, throughput) \end{DoxyCompactList}\item 
static void \mbox{\hyperlink{tensor__filter_8c_acb089c8e1ac4234dcf27dc8482381bb2}{accumulate\+\_\+latency}} (void $\ast$\mbox{\hyperlink{gsttensor__if_8c_a3c9cc8d6e8da85fef51da4c7115b97f6}{data}}, void $\ast$user\+\_\+data)
\begin{DoxyCompactList}\small\item\em Helper function to accumulate latencies. \end{DoxyCompactList}\item 
static void \mbox{\hyperlink{tensor__filter_8c_aec33d75954150957b3bcbedeab1c818a}{record\+\_\+statistics}} (\mbox{\hyperlink{tensor__filter__common_8h_a1008ddabc82c64e2305fd7465cceee80}{Gst\+Tensor\+Filter\+Private}} $\ast$priv)
\begin{DoxyCompactList}\small\item\em Record statistics for performance profiling (e.\+g, latency, throughput) \end{DoxyCompactList}\item 
static void \mbox{\hyperlink{tensor__filter_8c_a4584136b10db7d244c4f4b4c7ea56cc2}{track\+\_\+latency}} (\mbox{\hyperlink{tensor__filter_8h_a197b091651b97cbce82d3b27a5c10b88}{Gst\+Tensor\+Filter}} $\ast$self)
\begin{DoxyCompactList}\small\item\em Track estimated latency and notify pipeline when it changes. Latency estimates may be a bit jittery. On the principle we want to inform pipeline with the latency from longest inference. However, first inference may take much longer, or model filter configuration may change. Therefore any change of more than 10\% (arbitrary value) to a lower latency is also reported to pipeline. Notification is done sending L\+A\+T\+E\+N\+CY message to bus. Upon receipt, application will initiate a pipeline latency probe via L\+A\+T\+E\+N\+CY query. \end{DoxyCompactList}\item 
static gboolean \mbox{\hyperlink{tensor__filter_8c_ac319904d5b1d8e179e9c33905034bc80}{gst\+\_\+tensor\+\_\+filter\+\_\+check\+\_\+throttling\+\_\+delay}} (Gst\+Base\+Transform $\ast$trans, Gst\+Buffer $\ast$inbuf)
\begin{DoxyCompactList}\small\item\em Check throttling delay and send qos overflow event to upstream elements. \end{DoxyCompactList}\item 
static Gst\+Flow\+Return \mbox{\hyperlink{tensor__filter_8c_a10dc7457a208af1495fecd00768116e8}{\+\_\+gst\+\_\+tensor\+\_\+filter\+\_\+transform\+\_\+validate}} (Gst\+Base\+Transform $\ast$trans, Gst\+Buffer $\ast$inbuf, Gst\+Buffer $\ast$outbuf)
\begin{DoxyCompactList}\small\item\em Check input parameters for gst\+\_\+tensor\+\_\+filter\+\_\+transform ();. \end{DoxyCompactList}\item 
static void \mbox{\hyperlink{tensor__filter_8c_a83534dd8fe3af1cf821fbff5c17306fa}{\+\_\+gst\+\_\+tensor\+\_\+filter\+\_\+release\+\_\+mem\+\_\+until\+\_\+idx}} (\mbox{\hyperlink{tensor__filter_8c_ac238b44af3ba2965bf5790935401a58b}{Filter\+Transform\+Data}} $\ast$trans\+\_\+data, guint end\+\_\+index)
\begin{DoxyCompactList}\small\item\em Internal function to release mem and unmap info with index. \end{DoxyCompactList}\item 
static gsize \mbox{\hyperlink{tensor__filter_8c_abd45d87a0d22923f7195f856a9fe8661}{\+\_\+gst\+\_\+tensor\+\_\+filter\+\_\+convert\+\_\+meta}} (\mbox{\hyperlink{tensor__filter_8c_ac238b44af3ba2965bf5790935401a58b}{Filter\+Transform\+Data}} $\ast$trans\+\_\+data, \mbox{\hyperlink{structGstTensorsInfo}{Gst\+Tensors\+Info}} $\ast$info, guint idx)
\begin{DoxyCompactList}\small\item\em Internal function to convert tensor meta and get header size of flexible tensor. \end{DoxyCompactList}\item 
static \mbox{\hyperlink{tensor__filter_8c_ac238b44af3ba2965bf5790935401a58b}{Filter\+Transform\+Data}} $\ast$ \mbox{\hyperlink{tensor__filter_8c_a6776ed3281fd00916356345b66b12f3e}{\+\_\+gst\+\_\+tensor\+\_\+filter\+\_\+transform\+\_\+get\+\_\+all\+\_\+input\+\_\+data}} (Gst\+Base\+Transform $\ast$trans, Gst\+Buffer $\ast$buf)
\begin{DoxyCompactList}\small\item\em Internal function to get input tensors. \end{DoxyCompactList}\item 
static \mbox{\hyperlink{structGstTensorMemory}{Gst\+Tensor\+Memory}} $\ast$ \mbox{\hyperlink{tensor__filter_8c_a4922f1313914ee50ab658f9aa106ba5c}{\+\_\+gst\+\_\+tensor\+\_\+filter\+\_\+transform\+\_\+get\+\_\+invoke\+\_\+tensors}} (Gst\+Base\+Transform $\ast$trans, \mbox{\hyperlink{tensor__filter_8c_ac238b44af3ba2965bf5790935401a58b}{Filter\+Transform\+Data}} $\ast$trans\+\_\+data)
\begin{DoxyCompactList}\small\item\em Internal function to get invoke tensors. \end{DoxyCompactList}\item 
static \mbox{\hyperlink{tensor__filter_8c_ac238b44af3ba2965bf5790935401a58b}{Filter\+Transform\+Data}} $\ast$ \mbox{\hyperlink{tensor__filter_8c_afb5b5068cfa6ac98b566235e640d294a}{\+\_\+gst\+\_\+tensor\+\_\+filter\+\_\+transform\+\_\+get\+\_\+output\+\_\+data}} (Gst\+Base\+Transform $\ast$trans)
\begin{DoxyCompactList}\small\item\em Internal function to get output tensors. \end{DoxyCompactList}\item 
static Gst\+Flow\+Return \mbox{\hyperlink{tensor__filter_8c_a8cafd67abda1eecf36817286c8064c4c}{\+\_\+gst\+\_\+tensor\+\_\+filter\+\_\+transform\+\_\+prepare\+\_\+output\+\_\+tensors}} (Gst\+Base\+Transform $\ast$trans, \mbox{\hyperlink{tensor__filter_8c_ac238b44af3ba2965bf5790935401a58b}{Filter\+Transform\+Data}} $\ast$trans\+\_\+data)
\begin{DoxyCompactList}\small\item\em Internal function to get output tensors. \end{DoxyCompactList}\item 
static Gst\+Flow\+Return \mbox{\hyperlink{tensor__filter_8c_a3c91a62dacc09189547a15733486d157}{\+\_\+gst\+\_\+tensor\+\_\+filter\+\_\+transform\+\_\+check\+\_\+invoke\+\_\+result}} (Gst\+Base\+Transform $\ast$trans, \mbox{\hyperlink{tensor__filter_8c_ac238b44af3ba2965bf5790935401a58b}{Filter\+Transform\+Data}} $\ast$in\+\_\+trans\+\_\+data, \mbox{\hyperlink{tensor__filter_8c_ac238b44af3ba2965bf5790935401a58b}{Filter\+Transform\+Data}} $\ast$out\+\_\+trans\+\_\+data, gint invoke\+\_\+res)
\begin{DoxyCompactList}\small\item\em Internal function to check the invoke result. \end{DoxyCompactList}\item 
static void \mbox{\hyperlink{tensor__filter_8c_a4dec4c1984c151f46c1fd7d2d96ab979}{\+\_\+gst\+\_\+tensor\+\_\+filter\+\_\+transform\+\_\+update\+\_\+outbuf}} (Gst\+Base\+Transform $\ast$trans, \mbox{\hyperlink{tensor__filter_8c_ac238b44af3ba2965bf5790935401a58b}{Filter\+Transform\+Data}} $\ast$in\+\_\+trans\+\_\+data, \mbox{\hyperlink{tensor__filter_8c_ac238b44af3ba2965bf5790935401a58b}{Filter\+Transform\+Data}} $\ast$out\+\_\+trans\+\_\+data, Gst\+Buffer $\ast$outbuf)
\begin{DoxyCompactList}\small\item\em Internal function to make output buffer. \end{DoxyCompactList}\item 
static gboolean \mbox{\hyperlink{tensor__filter_8c_a2a0e831045c64854bff08c3e4eec8607}{gst\+\_\+tensor\+\_\+filter\+\_\+watchdog\+\_\+trigger}} (gpointer ptr)
\begin{DoxyCompactList}\small\item\em Called when there is no input within suspend time specified by the user. \end{DoxyCompactList}\item 
static gboolean \mbox{\hyperlink{tensor__filter_8c_acf67e29369a7da3b603726a68b6048e6}{gst\+\_\+tensor\+\_\+filter\+\_\+configure\+\_\+tensor}} (\mbox{\hyperlink{tensor__filter_8h_a197b091651b97cbce82d3b27a5c10b88}{Gst\+Tensor\+Filter}} $\ast$self, const Gst\+Caps $\ast$incaps)
\begin{DoxyCompactList}\small\item\em Configure input and output tensor info from incaps. \end{DoxyCompactList}\end{DoxyCompactItemize}
\doxysubsection*{Variables}
\begin{DoxyCompactItemize}
\item 
static Gst\+Static\+Pad\+Template \mbox{\hyperlink{tensor__filter_8c_a7c3b88a6174b442587875b361d888720}{sink\+\_\+factory}}
\begin{DoxyCompactList}\small\item\em The capabilities of the inputs. \end{DoxyCompactList}\item 
static Gst\+Static\+Pad\+Template \mbox{\hyperlink{tensor__filter_8c_a506c90b87594a5e6111c8b5f6ca85473}{src\+\_\+factory}}
\begin{DoxyCompactList}\small\item\em The capabilities of the outputs. \end{DoxyCompactList}\end{DoxyCompactItemize}


\doxysubsection{Detailed Description}
G\+Streamer plugin to use general neural network frameworks as filters. 

G\+Streamer Tensor\+\_\+\+Filter Copyright (C) 2005 Thomas Vander Stichele \href{mailto:thomas@apestaart.org}{\texttt{ thomas@apestaart.\+org}} Copyright (C) 2005 Ronald S. Bultje \href{mailto:rbultje@ronald.bitfreak.net}{\texttt{ rbultje@ronald.\+bitfreak.\+net}} Copyright (C) 2018 Myung\+Joo Ham \href{mailto:myungjoo.ham@samsung.com}{\texttt{ myungjoo.\+ham@samsung.\+com}}

This library is free software; you can redistribute it and/or modify it under the terms of the G\+NU Library General Public License as published by the Free Software Foundation; version 2.\+1 of the License.

This library is distributed in the hope that it will be useful, but W\+I\+T\+H\+O\+UT A\+NY W\+A\+R\+R\+A\+N\+TY; without even the implied warranty of M\+E\+R\+C\+H\+A\+N\+T\+A\+B\+I\+L\+I\+TY or F\+I\+T\+N\+E\+SS F\+OR A P\+A\+R\+T\+I\+C\+U\+L\+AR P\+U\+R\+P\+O\+SE. See the G\+NU Library General Public License for more details.

\begin{DoxyDate}{Date}
24 May 2018 
\end{DoxyDate}
\begin{DoxySeeAlso}{See also}
\href{http://github.com/nnstreamer/nnstreamer}{\texttt{ http\+://github.\+com/nnstreamer/nnstreamer}} 
\end{DoxySeeAlso}
\begin{DoxyAuthor}{Author}
Myung\+Joo Ham \href{mailto:myungjoo.ham@samsung.com}{\texttt{ myungjoo.\+ham@samsung.\+com}} 
\end{DoxyAuthor}
\begin{DoxyRefDesc}{Bug}
\item[\mbox{\hyperlink{bug__bug000103}{Bug}}]No known bugs except for N\+YI items \end{DoxyRefDesc}
\begin{DoxyRefDesc}{Todo}
\item[\mbox{\hyperlink{todo__todo000054}{Todo}}]set priority among properties 

logic for dynamic properties(like model change)\end{DoxyRefDesc}


This is the main plugin for per-\/\+N\+N-\/framework plugins. Specific implementations for each NN framework must be written in each framework specific files; e.\+g., tensor\+\_\+filter\+\_\+tensorflow\+\_\+lite.\+c 

\doxysubsection{Macro Definition Documentation}
\mbox{\Hypertarget{tensor__filter_8c_aa2d8b0bc5c1225ba8d7f84e235c1cf0d}\label{tensor__filter_8c_aa2d8b0bc5c1225ba8d7f84e235c1cf0d}} 
\index{tensor\_filter.c@{tensor\_filter.c}!CAPS\_STRING@{CAPS\_STRING}}
\index{CAPS\_STRING@{CAPS\_STRING}!tensor\_filter.c@{tensor\_filter.c}}
\doxysubsubsection{\texorpdfstring{CAPS\_STRING}{CAPS\_STRING}}
{\footnotesize\ttfamily \#define C\+A\+P\+S\+\_\+\+S\+T\+R\+I\+NG~\mbox{\hyperlink{tensor__typedef_8h_a284951c7aec77ea34d1c0279d5a5b4a0}{G\+S\+T\+\_\+\+T\+E\+N\+S\+O\+R\+\_\+\+C\+A\+P\+\_\+\+D\+E\+F\+A\+U\+LT}} \char`\"{};\char`\"{} \mbox{\hyperlink{tensor__typedef_8h_a23fa98afadf9e35f428d8d56b739b233}{G\+S\+T\+\_\+\+T\+E\+N\+S\+O\+R\+S\+\_\+\+C\+A\+P\+\_\+\+M\+A\+KE}} (\char`\"{}\{ static, flexible \}\char`\"{})}



Default caps string for both sink and source pad. 



Definition at line 87 of file tensor\+\_\+filter.\+c.

\mbox{\Hypertarget{tensor__filter_8c_a1acabfc6df7815d855b344258609c7c6}\label{tensor__filter_8c_a1acabfc6df7815d855b344258609c7c6}} 
\index{tensor\_filter.c@{tensor\_filter.c}!EVENT\_NAME\_UPDATE\_MODEL@{EVENT\_NAME\_UPDATE\_MODEL}}
\index{EVENT\_NAME\_UPDATE\_MODEL@{EVENT\_NAME\_UPDATE\_MODEL}!tensor\_filter.c@{tensor\_filter.c}}
\doxysubsubsection{\texorpdfstring{EVENT\_NAME\_UPDATE\_MODEL}{EVENT\_NAME\_UPDATE\_MODEL}}
{\footnotesize\ttfamily \#define E\+V\+E\+N\+T\+\_\+\+N\+A\+M\+E\+\_\+\+U\+P\+D\+A\+T\+E\+\_\+\+M\+O\+D\+EL~\char`\"{}evt\+\_\+update\+\_\+model\char`\"{}}

S\+E\+C\+T\+I\+ON\+:element-\/tensor\+\_\+filter

A plugin that invokes neural network models and their framework or an independent shared object implementing \mbox{\hyperlink{tensor__filter__custom_8h}{tensor\+\_\+filter\+\_\+custom.\+h}}. The input and output are always in the format of other/tensor or other/tensors.

$<$refsect2$>$ $<$title$>$Example launch line$<$/title$>$ $\vert$\mbox{[} gst-\/launch -\/v -\/m fakesrc ! tensor\+\_\+filter framework=tensorflow-\/lite, model=./inception\+\_\+v3.pb, input=3\+:224\+:224, output=1000 ! fakesink silent=T\+R\+UE \mbox{]}$\vert$ $<$/refsect2$>$

If input is other/tensor C array input\mbox{[}1\mbox{]}\mbox{[}224\mbox{]}\mbox{[}224\mbox{]}\mbox{[}3\mbox{]} and output is other/tensor C array output\mbox{[}1\mbox{]}\mbox{[}1\mbox{]}\mbox{[}1\mbox{]}\mbox{[}1000\mbox{]}

The current QoS policy\+: In a nnstreamer pipeline, the QoS is currently satisfied by adjusting a input or output framerate, initiated by \textquotesingle{}tensor\+\_\+rate\textquotesingle{} element. When \textquotesingle{}tensor\+\_\+filter\textquotesingle{} receives a throttling QoS event from the \textquotesingle{}tensor\+\_\+rate\textquotesingle{} element, it compares the average processing latency and throttling delay, and takes the maximum value as the threshold to drop incoming frames by checking a buffer timestamp. In this way, \textquotesingle{}tensor filter\textquotesingle{} can avoid unnecessary calculation and adjust a framerate, effectively reducing resource utilizations. Even in the case of receiving QoS events from multiple downstream pipelines (e.\+g., tee), \textquotesingle{}tensor\+\_\+filter\textquotesingle{} takes the minimum value as the throttling delay for downstream pipeline with more tight QoS requirement. Lastly, \textquotesingle{}tensor\+\_\+filter\textquotesingle{} also sends QoS events to upstream elements (e.\+g., tensor\+\_\+converter, tensor\+\_\+src) to possibly reduce incoming framerates, which is a better solution than dropping framerates. \begin{DoxyRefDesc}{Todo}
\item[\mbox{\hyperlink{todo__todo000055}{Todo}}]rename \& move this to better location \end{DoxyRefDesc}


Definition at line 76 of file tensor\+\_\+filter.\+c.

\mbox{\Hypertarget{tensor__filter_8c_adef911caed7c65a1643062817f4a59d7}\label{tensor__filter_8c_adef911caed7c65a1643062817f4a59d7}} 
\index{tensor\_filter.c@{tensor\_filter.c}!GST\_CAT\_DEFAULT@{GST\_CAT\_DEFAULT}}
\index{GST\_CAT\_DEFAULT@{GST\_CAT\_DEFAULT}!tensor\_filter.c@{tensor\_filter.c}}
\doxysubsubsection{\texorpdfstring{GST\_CAT\_DEFAULT}{GST\_CAT\_DEFAULT}}
{\footnotesize\ttfamily \#define G\+S\+T\+\_\+\+C\+A\+T\+\_\+\+D\+E\+F\+A\+U\+LT~gst\+\_\+tensor\+\_\+filter\+\_\+debug}



Definition at line 79 of file tensor\+\_\+filter.\+c.

\mbox{\Hypertarget{tensor__filter_8c_a0c2da03bee53e742d6b8c4ce7d1e85e0}\label{tensor__filter_8c_a0c2da03bee53e742d6b8c4ce7d1e85e0}} 
\index{tensor\_filter.c@{tensor\_filter.c}!gst\_tensor\_filter\_parent\_class@{gst\_tensor\_filter\_parent\_class}}
\index{gst\_tensor\_filter\_parent\_class@{gst\_tensor\_filter\_parent\_class}!tensor\_filter.c@{tensor\_filter.c}}
\doxysubsubsection{\texorpdfstring{gst\_tensor\_filter\_parent\_class}{gst\_tensor\_filter\_parent\_class}}
{\footnotesize\ttfamily \#define gst\+\_\+tensor\+\_\+filter\+\_\+parent\+\_\+class~parent\+\_\+class}



Definition at line 105 of file tensor\+\_\+filter.\+c.

\mbox{\Hypertarget{tensor__filter_8c_aabbfbbd2f4b382672d53366b228f63db}\label{tensor__filter_8c_aabbfbbd2f4b382672d53366b228f63db}} 
\index{tensor\_filter.c@{tensor\_filter.c}!LATENCY\_REPORT\_HEADROOM@{LATENCY\_REPORT\_HEADROOM}}
\index{LATENCY\_REPORT\_HEADROOM@{LATENCY\_REPORT\_HEADROOM}!tensor\_filter.c@{tensor\_filter.c}}
\doxysubsubsection{\texorpdfstring{LATENCY\_REPORT\_HEADROOM}{LATENCY\_REPORT\_HEADROOM}}
{\footnotesize\ttfamily \#define L\+A\+T\+E\+N\+C\+Y\+\_\+\+R\+E\+P\+O\+R\+T\+\_\+\+H\+E\+A\+D\+R\+O\+OM~0.\+05}



Headroom (extra duration) added to actual latency estimate reported to L\+A\+T\+E\+N\+CY query, to limit number of updates when tracking the maximum value -\/ arbitrarily set to 5\%. 



Definition at line 113 of file tensor\+\_\+filter.\+c.

\mbox{\Hypertarget{tensor__filter_8c_aa166c06f12dff0bfd19dbea6970585fa}\label{tensor__filter_8c_aa166c06f12dff0bfd19dbea6970585fa}} 
\index{tensor\_filter.c@{tensor\_filter.c}!LATENCY\_REPORT\_THRESHOLD@{LATENCY\_REPORT\_THRESHOLD}}
\index{LATENCY\_REPORT\_THRESHOLD@{LATENCY\_REPORT\_THRESHOLD}!tensor\_filter.c@{tensor\_filter.c}}
\doxysubsubsection{\texorpdfstring{LATENCY\_REPORT\_THRESHOLD}{LATENCY\_REPORT\_THRESHOLD}}
{\footnotesize\ttfamily \#define L\+A\+T\+E\+N\+C\+Y\+\_\+\+R\+E\+P\+O\+R\+T\+\_\+\+T\+H\+R\+E\+S\+H\+O\+LD~0.\+25}



Threshold deciding when tracking latency estimate that current value is sufficiently lower than reported value so that a notification update is necessary -\/ arbitrarily set to 25\%. 



Definition at line 120 of file tensor\+\_\+filter.\+c.

\mbox{\Hypertarget{tensor__filter_8c_afa7151d60b0634a4060b866259a425f9}\label{tensor__filter_8c_afa7151d60b0634a4060b866259a425f9}} 
\index{tensor\_filter.c@{tensor\_filter.c}!TF\_MODELNAME@{TF\_MODELNAME}}
\index{TF\_MODELNAME@{TF\_MODELNAME}!tensor\_filter.c@{tensor\_filter.c}}
\doxysubsubsection{\texorpdfstring{TF\_MODELNAME}{TF\_MODELNAME}}
{\footnotesize\ttfamily \#define T\+F\+\_\+\+M\+O\+D\+E\+L\+N\+A\+ME(\begin{DoxyParamCaption}\item[{}]{\mbox{\hyperlink{gsttensor__srciio_8c_ad143acf0919ab4b62947be3f2f168a91}{prop}} }\end{DoxyParamCaption})~((\mbox{\hyperlink{gsttensor__srciio_8c_ad143acf0919ab4b62947be3f2f168a91}{prop}})-\/$>$model\+\_\+files ? ((\mbox{\hyperlink{gsttensor__srciio_8c_ad143acf0919ab4b62947be3f2f168a91}{prop}})-\/$>$model\+\_\+files\mbox{[}0\mbox{]}) \+: \char`\"{}\mbox{[}No Model File\mbox{]}\char`\"{})}



Definition at line 81 of file tensor\+\_\+filter.\+c.

\mbox{\Hypertarget{tensor__filter_8c_a5bd7e5ebda4418d86d1460a504792b68}\label{tensor__filter_8c_a5bd7e5ebda4418d86d1460a504792b68}} 
\index{tensor\_filter.c@{tensor\_filter.c}!THRESHOLD\_CACHE\_OLD@{THRESHOLD\_CACHE\_OLD}}
\index{THRESHOLD\_CACHE\_OLD@{THRESHOLD\_CACHE\_OLD}!tensor\_filter.c@{tensor\_filter.c}}
\doxysubsubsection{\texorpdfstring{THRESHOLD\_CACHE\_OLD}{THRESHOLD\_CACHE\_OLD}}
{\footnotesize\ttfamily \#define T\+H\+R\+E\+S\+H\+O\+L\+D\+\_\+\+C\+A\+C\+H\+E\+\_\+\+O\+LD~(1000)}



Definition at line 406 of file tensor\+\_\+filter.\+c.

\mbox{\Hypertarget{tensor__filter_8c_a06bb1fa9e4aae69e51fc60ab3bfeab44}\label{tensor__filter_8c_a06bb1fa9e4aae69e51fc60ab3bfeab44}} 
\index{tensor\_filter.c@{tensor\_filter.c}!THRESHOLD\_DROP\_OLD@{THRESHOLD\_DROP\_OLD}}
\index{THRESHOLD\_DROP\_OLD@{THRESHOLD\_DROP\_OLD}!tensor\_filter.c@{tensor\_filter.c}}
\doxysubsubsection{\texorpdfstring{THRESHOLD\_DROP\_OLD}{THRESHOLD\_DROP\_OLD}}
{\footnotesize\ttfamily \#define T\+H\+R\+E\+S\+H\+O\+L\+D\+\_\+\+D\+R\+O\+P\+\_\+\+O\+LD~(2000)}



Definition at line 405 of file tensor\+\_\+filter.\+c.



\doxysubsection{Typedef Documentation}
\mbox{\Hypertarget{tensor__filter_8c_ac238b44af3ba2965bf5790935401a58b}\label{tensor__filter_8c_ac238b44af3ba2965bf5790935401a58b}} 
\index{tensor\_filter.c@{tensor\_filter.c}!FilterTransformData@{FilterTransformData}}
\index{FilterTransformData@{FilterTransformData}!tensor\_filter.c@{tensor\_filter.c}}
\doxysubsubsection{\texorpdfstring{FilterTransformData}{FilterTransformData}}
{\footnotesize\ttfamily typedef struct \mbox{\hyperlink{struct__FilterTransformData}{\+\_\+\+Filter\+Transform\+Data}} \mbox{\hyperlink{tensor__filter_8c_ac238b44af3ba2965bf5790935401a58b}{Filter\+Transform\+Data}}}



Internal data structure for tensor\+\_\+filter transform data. 



\doxysubsection{Function Documentation}
\mbox{\Hypertarget{tensor__filter_8c_abd45d87a0d22923f7195f856a9fe8661}\label{tensor__filter_8c_abd45d87a0d22923f7195f856a9fe8661}} 
\index{tensor\_filter.c@{tensor\_filter.c}!\_gst\_tensor\_filter\_convert\_meta@{\_gst\_tensor\_filter\_convert\_meta}}
\index{\_gst\_tensor\_filter\_convert\_meta@{\_gst\_tensor\_filter\_convert\_meta}!tensor\_filter.c@{tensor\_filter.c}}
\doxysubsubsection{\texorpdfstring{\_gst\_tensor\_filter\_convert\_meta()}{\_gst\_tensor\_filter\_convert\_meta()}}
{\footnotesize\ttfamily static gsize \+\_\+gst\+\_\+tensor\+\_\+filter\+\_\+convert\+\_\+meta (\begin{DoxyParamCaption}\item[{\mbox{\hyperlink{tensor__filter_8c_ac238b44af3ba2965bf5790935401a58b}{Filter\+Transform\+Data}} $\ast$}]{trans\+\_\+data,  }\item[{\mbox{\hyperlink{structGstTensorsInfo}{Gst\+Tensors\+Info}} $\ast$}]{info,  }\item[{guint}]{idx }\end{DoxyParamCaption})\hspace{0.3cm}{\ttfamily [static]}}



Internal function to convert tensor meta and get header size of flexible tensor. 



Definition at line 684 of file tensor\+\_\+filter.\+c.

Here is the call graph for this function\+:
\nopagebreak
\begin{figure}[H]
\begin{center}
\leavevmode
\includegraphics[width=350pt]{tensor__filter_8c_abd45d87a0d22923f7195f856a9fe8661_cgraph}
\end{center}
\end{figure}
Here is the caller graph for this function\+:
\nopagebreak
\begin{figure}[H]
\begin{center}
\leavevmode
\includegraphics[width=350pt]{tensor__filter_8c_abd45d87a0d22923f7195f856a9fe8661_icgraph}
\end{center}
\end{figure}
\mbox{\Hypertarget{tensor__filter_8c_a83534dd8fe3af1cf821fbff5c17306fa}\label{tensor__filter_8c_a83534dd8fe3af1cf821fbff5c17306fa}} 
\index{tensor\_filter.c@{tensor\_filter.c}!\_gst\_tensor\_filter\_release\_mem\_until\_idx@{\_gst\_tensor\_filter\_release\_mem\_until\_idx}}
\index{\_gst\_tensor\_filter\_release\_mem\_until\_idx@{\_gst\_tensor\_filter\_release\_mem\_until\_idx}!tensor\_filter.c@{tensor\_filter.c}}
\doxysubsubsection{\texorpdfstring{\_gst\_tensor\_filter\_release\_mem\_until\_idx()}{\_gst\_tensor\_filter\_release\_mem\_until\_idx()}}
{\footnotesize\ttfamily static void \+\_\+gst\+\_\+tensor\+\_\+filter\+\_\+release\+\_\+mem\+\_\+until\+\_\+idx (\begin{DoxyParamCaption}\item[{\mbox{\hyperlink{tensor__filter_8c_ac238b44af3ba2965bf5790935401a58b}{Filter\+Transform\+Data}} $\ast$}]{trans\+\_\+data,  }\item[{guint}]{end\+\_\+index }\end{DoxyParamCaption})\hspace{0.3cm}{\ttfamily [static]}}



Internal function to release mem and unmap info with index. 



Definition at line 667 of file tensor\+\_\+filter.\+c.

Here is the caller graph for this function\+:
\nopagebreak
\begin{figure}[H]
\begin{center}
\leavevmode
\includegraphics[width=350pt]{tensor__filter_8c_a83534dd8fe3af1cf821fbff5c17306fa_icgraph}
\end{center}
\end{figure}
\mbox{\Hypertarget{tensor__filter_8c_a3c91a62dacc09189547a15733486d157}\label{tensor__filter_8c_a3c91a62dacc09189547a15733486d157}} 
\index{tensor\_filter.c@{tensor\_filter.c}!\_gst\_tensor\_filter\_transform\_check\_invoke\_result@{\_gst\_tensor\_filter\_transform\_check\_invoke\_result}}
\index{\_gst\_tensor\_filter\_transform\_check\_invoke\_result@{\_gst\_tensor\_filter\_transform\_check\_invoke\_result}!tensor\_filter.c@{tensor\_filter.c}}
\doxysubsubsection{\texorpdfstring{\_gst\_tensor\_filter\_transform\_check\_invoke\_result()}{\_gst\_tensor\_filter\_transform\_check\_invoke\_result()}}
{\footnotesize\ttfamily static Gst\+Flow\+Return \+\_\+gst\+\_\+tensor\+\_\+filter\+\_\+transform\+\_\+check\+\_\+invoke\+\_\+result (\begin{DoxyParamCaption}\item[{Gst\+Base\+Transform $\ast$}]{trans,  }\item[{\mbox{\hyperlink{tensor__filter_8c_ac238b44af3ba2965bf5790935401a58b}{Filter\+Transform\+Data}} $\ast$}]{in\+\_\+trans\+\_\+data,  }\item[{\mbox{\hyperlink{tensor__filter_8c_ac238b44af3ba2965bf5790935401a58b}{Filter\+Transform\+Data}} $\ast$}]{out\+\_\+trans\+\_\+data,  }\item[{gint}]{invoke\+\_\+res }\end{DoxyParamCaption})\hspace{0.3cm}{\ttfamily [static]}}



Internal function to check the invoke result. 



Definition at line 936 of file tensor\+\_\+filter.\+c.

Here is the caller graph for this function\+:
\nopagebreak
\begin{figure}[H]
\begin{center}
\leavevmode
\includegraphics[width=350pt]{tensor__filter_8c_a3c91a62dacc09189547a15733486d157_icgraph}
\end{center}
\end{figure}
\mbox{\Hypertarget{tensor__filter_8c_a6776ed3281fd00916356345b66b12f3e}\label{tensor__filter_8c_a6776ed3281fd00916356345b66b12f3e}} 
\index{tensor\_filter.c@{tensor\_filter.c}!\_gst\_tensor\_filter\_transform\_get\_all\_input\_data@{\_gst\_tensor\_filter\_transform\_get\_all\_input\_data}}
\index{\_gst\_tensor\_filter\_transform\_get\_all\_input\_data@{\_gst\_tensor\_filter\_transform\_get\_all\_input\_data}!tensor\_filter.c@{tensor\_filter.c}}
\doxysubsubsection{\texorpdfstring{\_gst\_tensor\_filter\_transform\_get\_all\_input\_data()}{\_gst\_tensor\_filter\_transform\_get\_all\_input\_data()}}
{\footnotesize\ttfamily static \mbox{\hyperlink{tensor__filter_8c_ac238b44af3ba2965bf5790935401a58b}{Filter\+Transform\+Data}}$\ast$ \+\_\+gst\+\_\+tensor\+\_\+filter\+\_\+transform\+\_\+get\+\_\+all\+\_\+input\+\_\+data (\begin{DoxyParamCaption}\item[{Gst\+Base\+Transform $\ast$}]{trans,  }\item[{Gst\+Buffer $\ast$}]{buf }\end{DoxyParamCaption})\hspace{0.3cm}{\ttfamily [static]}}



Internal function to get input tensors. 



Definition at line 707 of file tensor\+\_\+filter.\+c.

Here is the call graph for this function\+:
\nopagebreak
\begin{figure}[H]
\begin{center}
\leavevmode
\includegraphics[width=350pt]{tensor__filter_8c_a6776ed3281fd00916356345b66b12f3e_cgraph}
\end{center}
\end{figure}
Here is the caller graph for this function\+:
\nopagebreak
\begin{figure}[H]
\begin{center}
\leavevmode
\includegraphics[width=350pt]{tensor__filter_8c_a6776ed3281fd00916356345b66b12f3e_icgraph}
\end{center}
\end{figure}
\mbox{\Hypertarget{tensor__filter_8c_a4922f1313914ee50ab658f9aa106ba5c}\label{tensor__filter_8c_a4922f1313914ee50ab658f9aa106ba5c}} 
\index{tensor\_filter.c@{tensor\_filter.c}!\_gst\_tensor\_filter\_transform\_get\_invoke\_tensors@{\_gst\_tensor\_filter\_transform\_get\_invoke\_tensors}}
\index{\_gst\_tensor\_filter\_transform\_get\_invoke\_tensors@{\_gst\_tensor\_filter\_transform\_get\_invoke\_tensors}!tensor\_filter.c@{tensor\_filter.c}}
\doxysubsubsection{\texorpdfstring{\_gst\_tensor\_filter\_transform\_get\_invoke\_tensors()}{\_gst\_tensor\_filter\_transform\_get\_invoke\_tensors()}}
{\footnotesize\ttfamily static \mbox{\hyperlink{structGstTensorMemory}{Gst\+Tensor\+Memory}}$\ast$ \+\_\+gst\+\_\+tensor\+\_\+filter\+\_\+transform\+\_\+get\+\_\+invoke\+\_\+tensors (\begin{DoxyParamCaption}\item[{Gst\+Base\+Transform $\ast$}]{trans,  }\item[{\mbox{\hyperlink{tensor__filter_8c_ac238b44af3ba2965bf5790935401a58b}{Filter\+Transform\+Data}} $\ast$}]{trans\+\_\+data }\end{DoxyParamCaption})\hspace{0.3cm}{\ttfamily [static]}}



Internal function to get invoke tensors. 



Definition at line 754 of file tensor\+\_\+filter.\+c.

Here is the call graph for this function\+:
\nopagebreak
\begin{figure}[H]
\begin{center}
\leavevmode
\includegraphics[width=350pt]{tensor__filter_8c_a4922f1313914ee50ab658f9aa106ba5c_cgraph}
\end{center}
\end{figure}
Here is the caller graph for this function\+:
\nopagebreak
\begin{figure}[H]
\begin{center}
\leavevmode
\includegraphics[width=350pt]{tensor__filter_8c_a4922f1313914ee50ab658f9aa106ba5c_icgraph}
\end{center}
\end{figure}
\mbox{\Hypertarget{tensor__filter_8c_afb5b5068cfa6ac98b566235e640d294a}\label{tensor__filter_8c_afb5b5068cfa6ac98b566235e640d294a}} 
\index{tensor\_filter.c@{tensor\_filter.c}!\_gst\_tensor\_filter\_transform\_get\_output\_data@{\_gst\_tensor\_filter\_transform\_get\_output\_data}}
\index{\_gst\_tensor\_filter\_transform\_get\_output\_data@{\_gst\_tensor\_filter\_transform\_get\_output\_data}!tensor\_filter.c@{tensor\_filter.c}}
\doxysubsubsection{\texorpdfstring{\_gst\_tensor\_filter\_transform\_get\_output\_data()}{\_gst\_tensor\_filter\_transform\_get\_output\_data()}}
{\footnotesize\ttfamily static \mbox{\hyperlink{tensor__filter_8c_ac238b44af3ba2965bf5790935401a58b}{Filter\+Transform\+Data}}$\ast$ \+\_\+gst\+\_\+tensor\+\_\+filter\+\_\+transform\+\_\+get\+\_\+output\+\_\+data (\begin{DoxyParamCaption}\item[{Gst\+Base\+Transform $\ast$}]{trans }\end{DoxyParamCaption})\hspace{0.3cm}{\ttfamily [static]}}



Internal function to get output tensors. 



Definition at line 836 of file tensor\+\_\+filter.\+c.

Here is the call graph for this function\+:
\nopagebreak
\begin{figure}[H]
\begin{center}
\leavevmode
\includegraphics[width=350pt]{tensor__filter_8c_afb5b5068cfa6ac98b566235e640d294a_cgraph}
\end{center}
\end{figure}
Here is the caller graph for this function\+:
\nopagebreak
\begin{figure}[H]
\begin{center}
\leavevmode
\includegraphics[width=350pt]{tensor__filter_8c_afb5b5068cfa6ac98b566235e640d294a_icgraph}
\end{center}
\end{figure}
\mbox{\Hypertarget{tensor__filter_8c_a8cafd67abda1eecf36817286c8064c4c}\label{tensor__filter_8c_a8cafd67abda1eecf36817286c8064c4c}} 
\index{tensor\_filter.c@{tensor\_filter.c}!\_gst\_tensor\_filter\_transform\_prepare\_output\_tensors@{\_gst\_tensor\_filter\_transform\_prepare\_output\_tensors}}
\index{\_gst\_tensor\_filter\_transform\_prepare\_output\_tensors@{\_gst\_tensor\_filter\_transform\_prepare\_output\_tensors}!tensor\_filter.c@{tensor\_filter.c}}
\doxysubsubsection{\texorpdfstring{\_gst\_tensor\_filter\_transform\_prepare\_output\_tensors()}{\_gst\_tensor\_filter\_transform\_prepare\_output\_tensors()}}
{\footnotesize\ttfamily static Gst\+Flow\+Return \+\_\+gst\+\_\+tensor\+\_\+filter\+\_\+transform\+\_\+prepare\+\_\+output\+\_\+tensors (\begin{DoxyParamCaption}\item[{Gst\+Base\+Transform $\ast$}]{trans,  }\item[{\mbox{\hyperlink{tensor__filter_8c_ac238b44af3ba2965bf5790935401a58b}{Filter\+Transform\+Data}} $\ast$}]{trans\+\_\+data }\end{DoxyParamCaption})\hspace{0.3cm}{\ttfamily [static]}}



Internal function to get output tensors. 



Definition at line 870 of file tensor\+\_\+filter.\+c.

Here is the call graph for this function\+:
\nopagebreak
\begin{figure}[H]
\begin{center}
\leavevmode
\includegraphics[width=350pt]{tensor__filter_8c_a8cafd67abda1eecf36817286c8064c4c_cgraph}
\end{center}
\end{figure}
Here is the caller graph for this function\+:
\nopagebreak
\begin{figure}[H]
\begin{center}
\leavevmode
\includegraphics[width=350pt]{tensor__filter_8c_a8cafd67abda1eecf36817286c8064c4c_icgraph}
\end{center}
\end{figure}
\mbox{\Hypertarget{tensor__filter_8c_a4dec4c1984c151f46c1fd7d2d96ab979}\label{tensor__filter_8c_a4dec4c1984c151f46c1fd7d2d96ab979}} 
\index{tensor\_filter.c@{tensor\_filter.c}!\_gst\_tensor\_filter\_transform\_update\_outbuf@{\_gst\_tensor\_filter\_transform\_update\_outbuf}}
\index{\_gst\_tensor\_filter\_transform\_update\_outbuf@{\_gst\_tensor\_filter\_transform\_update\_outbuf}!tensor\_filter.c@{tensor\_filter.c}}
\doxysubsubsection{\texorpdfstring{\_gst\_tensor\_filter\_transform\_update\_outbuf()}{\_gst\_tensor\_filter\_transform\_update\_outbuf()}}
{\footnotesize\ttfamily static void \+\_\+gst\+\_\+tensor\+\_\+filter\+\_\+transform\+\_\+update\+\_\+outbuf (\begin{DoxyParamCaption}\item[{Gst\+Base\+Transform $\ast$}]{trans,  }\item[{\mbox{\hyperlink{tensor__filter_8c_ac238b44af3ba2965bf5790935401a58b}{Filter\+Transform\+Data}} $\ast$}]{in\+\_\+trans\+\_\+data,  }\item[{\mbox{\hyperlink{tensor__filter_8c_ac238b44af3ba2965bf5790935401a58b}{Filter\+Transform\+Data}} $\ast$}]{out\+\_\+trans\+\_\+data,  }\item[{Gst\+Buffer $\ast$}]{outbuf }\end{DoxyParamCaption})\hspace{0.3cm}{\ttfamily [static]}}



Internal function to make output buffer. 



Definition at line 976 of file tensor\+\_\+filter.\+c.

Here is the call graph for this function\+:
\nopagebreak
\begin{figure}[H]
\begin{center}
\leavevmode
\includegraphics[width=350pt]{tensor__filter_8c_a4dec4c1984c151f46c1fd7d2d96ab979_cgraph}
\end{center}
\end{figure}
Here is the caller graph for this function\+:
\nopagebreak
\begin{figure}[H]
\begin{center}
\leavevmode
\includegraphics[width=350pt]{tensor__filter_8c_a4dec4c1984c151f46c1fd7d2d96ab979_icgraph}
\end{center}
\end{figure}
\mbox{\Hypertarget{tensor__filter_8c_a10dc7457a208af1495fecd00768116e8}\label{tensor__filter_8c_a10dc7457a208af1495fecd00768116e8}} 
\index{tensor\_filter.c@{tensor\_filter.c}!\_gst\_tensor\_filter\_transform\_validate@{\_gst\_tensor\_filter\_transform\_validate}}
\index{\_gst\_tensor\_filter\_transform\_validate@{\_gst\_tensor\_filter\_transform\_validate}!tensor\_filter.c@{tensor\_filter.c}}
\doxysubsubsection{\texorpdfstring{\_gst\_tensor\_filter\_transform\_validate()}{\_gst\_tensor\_filter\_transform\_validate()}}
{\footnotesize\ttfamily static Gst\+Flow\+Return \+\_\+gst\+\_\+tensor\+\_\+filter\+\_\+transform\+\_\+validate (\begin{DoxyParamCaption}\item[{Gst\+Base\+Transform $\ast$}]{trans,  }\item[{Gst\+Buffer $\ast$}]{inbuf,  }\item[{Gst\+Buffer $\ast$}]{outbuf }\end{DoxyParamCaption})\hspace{0.3cm}{\ttfamily [static]}}



Check input parameters for gst\+\_\+tensor\+\_\+filter\+\_\+transform ();. 

This is fatal; if framework is not configured until this stage, it means that an extension is missing or not configured. We need readable messages for non-\/developers

Definition at line 593 of file tensor\+\_\+filter.\+c.

Here is the call graph for this function\+:
\nopagebreak
\begin{figure}[H]
\begin{center}
\leavevmode
\includegraphics[width=350pt]{tensor__filter_8c_a10dc7457a208af1495fecd00768116e8_cgraph}
\end{center}
\end{figure}
Here is the caller graph for this function\+:
\nopagebreak
\begin{figure}[H]
\begin{center}
\leavevmode
\includegraphics[width=350pt]{tensor__filter_8c_a10dc7457a208af1495fecd00768116e8_icgraph}
\end{center}
\end{figure}
\mbox{\Hypertarget{tensor__filter_8c_acb089c8e1ac4234dcf27dc8482381bb2}\label{tensor__filter_8c_acb089c8e1ac4234dcf27dc8482381bb2}} 
\index{tensor\_filter.c@{tensor\_filter.c}!accumulate\_latency@{accumulate\_latency}}
\index{accumulate\_latency@{accumulate\_latency}!tensor\_filter.c@{tensor\_filter.c}}
\doxysubsubsection{\texorpdfstring{accumulate\_latency()}{accumulate\_latency()}}
{\footnotesize\ttfamily static void accumulate\+\_\+latency (\begin{DoxyParamCaption}\item[{void $\ast$}]{data,  }\item[{void $\ast$}]{user\+\_\+data }\end{DoxyParamCaption})\hspace{0.3cm}{\ttfamily [static]}}



Helper function to accumulate latencies. 



Definition at line 397 of file tensor\+\_\+filter.\+c.

Here is the caller graph for this function\+:
\nopagebreak
\begin{figure}[H]
\begin{center}
\leavevmode
\includegraphics[width=350pt]{tensor__filter_8c_acb089c8e1ac4234dcf27dc8482381bb2_icgraph}
\end{center}
\end{figure}
\mbox{\Hypertarget{tensor__filter_8c_aa35cd00686e62e9f265d1f6369b6aec4}\label{tensor__filter_8c_aa35cd00686e62e9f265d1f6369b6aec4}} 
\index{tensor\_filter.c@{tensor\_filter.c}!G\_DEFINE\_TYPE@{G\_DEFINE\_TYPE}}
\index{G\_DEFINE\_TYPE@{G\_DEFINE\_TYPE}!tensor\_filter.c@{tensor\_filter.c}}
\doxysubsubsection{\texorpdfstring{G\_DEFINE\_TYPE()}{G\_DEFINE\_TYPE()}}
{\footnotesize\ttfamily G\+\_\+\+D\+E\+F\+I\+N\+E\+\_\+\+T\+Y\+PE (\begin{DoxyParamCaption}\item[{\mbox{\hyperlink{tensor__filter_8h_a197b091651b97cbce82d3b27a5c10b88}{Gst\+Tensor\+Filter}}}]{,  }\item[{gst\+\_\+tensor\+\_\+filter}]{,  }\item[{G\+S\+T\+\_\+\+T\+Y\+P\+E\+\_\+\+B\+A\+S\+E\+\_\+\+T\+R\+A\+N\+S\+F\+O\+RM}]{ }\end{DoxyParamCaption})}

\mbox{\Hypertarget{tensor__filter_8c_a56af4a48d64291db80839c03e88d0002}\label{tensor__filter_8c_a56af4a48d64291db80839c03e88d0002}} 
\index{tensor\_filter.c@{tensor\_filter.c}!GST\_DEBUG\_CATEGORY\_STATIC@{GST\_DEBUG\_CATEGORY\_STATIC}}
\index{GST\_DEBUG\_CATEGORY\_STATIC@{GST\_DEBUG\_CATEGORY\_STATIC}!tensor\_filter.c@{tensor\_filter.c}}
\doxysubsubsection{\texorpdfstring{GST\_DEBUG\_CATEGORY\_STATIC()}{GST\_DEBUG\_CATEGORY\_STATIC()}}
{\footnotesize\ttfamily G\+S\+T\+\_\+\+D\+E\+B\+U\+G\+\_\+\+C\+A\+T\+E\+G\+O\+R\+Y\+\_\+\+S\+T\+A\+T\+IC (\begin{DoxyParamCaption}\item[{gst\+\_\+tensor\+\_\+filter\+\_\+debug}]{ }\end{DoxyParamCaption})}

\mbox{\Hypertarget{tensor__filter_8c_ac319904d5b1d8e179e9c33905034bc80}\label{tensor__filter_8c_ac319904d5b1d8e179e9c33905034bc80}} 
\index{tensor\_filter.c@{tensor\_filter.c}!gst\_tensor\_filter\_check\_throttling\_delay@{gst\_tensor\_filter\_check\_throttling\_delay}}
\index{gst\_tensor\_filter\_check\_throttling\_delay@{gst\_tensor\_filter\_check\_throttling\_delay}!tensor\_filter.c@{tensor\_filter.c}}
\doxysubsubsection{\texorpdfstring{gst\_tensor\_filter\_check\_throttling\_delay()}{gst\_tensor\_filter\_check\_throttling\_delay()}}
{\footnotesize\ttfamily static gboolean gst\+\_\+tensor\+\_\+filter\+\_\+check\+\_\+throttling\+\_\+delay (\begin{DoxyParamCaption}\item[{Gst\+Base\+Transform $\ast$}]{trans,  }\item[{Gst\+Buffer $\ast$}]{inbuf }\end{DoxyParamCaption})\hspace{0.3cm}{\ttfamily [static]}}



Check throttling delay and send qos overflow event to upstream elements. 

Send qos overflow event to upstream elements. Upstream elements (e.\+g., tensor\+\_\+src, tensor\+\_\+converter) may handle this.

Definition at line 536 of file tensor\+\_\+filter.\+c.

Here is the caller graph for this function\+:
\nopagebreak
\begin{figure}[H]
\begin{center}
\leavevmode
\includegraphics[width=350pt]{tensor__filter_8c_ac319904d5b1d8e179e9c33905034bc80_icgraph}
\end{center}
\end{figure}
\mbox{\Hypertarget{tensor__filter_8c_a7d40351340e3d6ef839e8aa5d3e8ecbf}\label{tensor__filter_8c_a7d40351340e3d6ef839e8aa5d3e8ecbf}} 
\index{tensor\_filter.c@{tensor\_filter.c}!gst\_tensor\_filter\_class\_init@{gst\_tensor\_filter\_class\_init}}
\index{gst\_tensor\_filter\_class\_init@{gst\_tensor\_filter\_class\_init}!tensor\_filter.c@{tensor\_filter.c}}
\doxysubsubsection{\texorpdfstring{gst\_tensor\_filter\_class\_init()}{gst\_tensor\_filter\_class\_init()}}
{\footnotesize\ttfamily static void gst\+\_\+tensor\+\_\+filter\+\_\+class\+\_\+init (\begin{DoxyParamCaption}\item[{\mbox{\hyperlink{tensor__filter_8h_ae4fad538a1d32e8c5884c2b23ddee6ea}{Gst\+Tensor\+Filter\+Class}} $\ast$}]{klass }\end{DoxyParamCaption})\hspace{0.3cm}{\ttfamily [static]}}



initialize the tensor\+\_\+filter\textquotesingle{}s class 



Definition at line 169 of file tensor\+\_\+filter.\+c.

Here is the call graph for this function\+:
\nopagebreak
\begin{figure}[H]
\begin{center}
\leavevmode
\includegraphics[width=350pt]{tensor__filter_8c_a7d40351340e3d6ef839e8aa5d3e8ecbf_cgraph}
\end{center}
\end{figure}
\mbox{\Hypertarget{tensor__filter_8c_acf67e29369a7da3b603726a68b6048e6}\label{tensor__filter_8c_acf67e29369a7da3b603726a68b6048e6}} 
\index{tensor\_filter.c@{tensor\_filter.c}!gst\_tensor\_filter\_configure\_tensor@{gst\_tensor\_filter\_configure\_tensor}}
\index{gst\_tensor\_filter\_configure\_tensor@{gst\_tensor\_filter\_configure\_tensor}!tensor\_filter.c@{tensor\_filter.c}}
\doxysubsubsection{\texorpdfstring{gst\_tensor\_filter\_configure\_tensor()}{gst\_tensor\_filter\_configure\_tensor()}}
{\footnotesize\ttfamily static gboolean gst\+\_\+tensor\+\_\+filter\+\_\+configure\+\_\+tensor (\begin{DoxyParamCaption}\item[{\mbox{\hyperlink{tensor__filter_8h_a197b091651b97cbce82d3b27a5c10b88}{Gst\+Tensor\+Filter}} $\ast$}]{self,  }\item[{const Gst\+Caps $\ast$}]{incaps }\end{DoxyParamCaption})\hspace{0.3cm}{\ttfamily [static]}}



Configure input and output tensor info from incaps. 


\begin{DoxyParams}{Parameters}
{\em self} & \char`\"{}this\char`\"{} pointer \\
\hline
{\em incaps} & received caps for sink pad \\
\hline
\end{DoxyParams}
\begin{DoxyReturn}{Returns}
T\+R\+UE if fully configured 
\end{DoxyReturn}
Gst\+Tensor\+Filter has to parse the tensor dimension and type from NN model.
\begin{DoxyEnumerate}
\item Call functions get\+Input\+Dimension and get\+Output\+Dimension to get the dimension and type.
\item If these functions are not defined, call set\+Input\+Dimension with parsed info from caps.
\item If set-\/prop configured dimension, verify the dimension with fw callbacks.
\end{DoxyEnumerate}

Check configuration from caps. If true, fully configured tensor info from caps.

if set-\/property called and already has info, verify it!

If incoming tensor is flexible, we cannot validate tensor info here. Need to compare buffer size in transform().

\begin{DoxyRefDesc}{Todo}
\item[\mbox{\hyperlink{todo__todo000056}{Todo}}]We do not support this (flexible tensor for flexible input model). Cap-\/negotiation of the current tensor-\/filter requires either side of \char`\"{}model / set-\/property\char`\"{} or \char`\"{}incoming gstcaps\char`\"{} to be static/explicit. Ideally, this should support flexible tensor for flexible input model, leaving the negotiation to other elements, but we didn\textquotesingle{}t implement it yet. \end{DoxyRefDesc}


call set\+Input\+Dimension if output tensor is not configured

if set-\/property called and already has info, verify it!

\begin{DoxyRefDesc}{Todo}
\item[\mbox{\hyperlink{todo__todo000057}{Todo}}]framerate of output tensors How can we update the framerate? Gst\+Tensor\+Filter cannot assure the framerate. Simply set the framerate of out-\/tensor from incaps. \end{DoxyRefDesc}


already configured, compare to old.

Definition at line 1207 of file tensor\+\_\+filter.\+c.

Here is the call graph for this function\+:
\nopagebreak
\begin{figure}[H]
\begin{center}
\leavevmode
\includegraphics[width=350pt]{tensor__filter_8c_acf67e29369a7da3b603726a68b6048e6_cgraph}
\end{center}
\end{figure}
Here is the caller graph for this function\+:
\nopagebreak
\begin{figure}[H]
\begin{center}
\leavevmode
\includegraphics[width=350pt]{tensor__filter_8c_acf67e29369a7da3b603726a68b6048e6_icgraph}
\end{center}
\end{figure}
\mbox{\Hypertarget{tensor__filter_8c_afaa5b8a2815aba726680d28fff6f7da0}\label{tensor__filter_8c_afaa5b8a2815aba726680d28fff6f7da0}} 
\index{tensor\_filter.c@{tensor\_filter.c}!gst\_tensor\_filter\_destroy\_notify@{gst\_tensor\_filter\_destroy\_notify}}
\index{gst\_tensor\_filter\_destroy\_notify@{gst\_tensor\_filter\_destroy\_notify}!tensor\_filter.c@{tensor\_filter.c}}
\doxysubsubsection{\texorpdfstring{gst\_tensor\_filter\_destroy\_notify()}{gst\_tensor\_filter\_destroy\_notify()}}
{\footnotesize\ttfamily static void gst\+\_\+tensor\+\_\+filter\+\_\+destroy\+\_\+notify (\begin{DoxyParamCaption}\item[{void $\ast$}]{data }\end{DoxyParamCaption})\hspace{0.3cm}{\ttfamily [static]}}



Free the data allocated for tensor transform. 

default function for tensor filter framework if not provided by the framework. The data is in G\+Ptr\+Array -\/ first element is private data of framework and second element is the data to be freed. 

Definition at line 357 of file tensor\+\_\+filter.\+c.

Here is the call graph for this function\+:
\nopagebreak
\begin{figure}[H]
\begin{center}
\leavevmode
\includegraphics[width=350pt]{tensor__filter_8c_afaa5b8a2815aba726680d28fff6f7da0_cgraph}
\end{center}
\end{figure}
Here is the caller graph for this function\+:
\nopagebreak
\begin{figure}[H]
\begin{center}
\leavevmode
\includegraphics[width=350pt]{tensor__filter_8c_afaa5b8a2815aba726680d28fff6f7da0_icgraph}
\end{center}
\end{figure}
\mbox{\Hypertarget{tensor__filter_8c_ad13ce1d93921dd277d7298d957300acb}\label{tensor__filter_8c_ad13ce1d93921dd277d7298d957300acb}} 
\index{tensor\_filter.c@{tensor\_filter.c}!gst\_tensor\_filter\_finalize@{gst\_tensor\_filter\_finalize}}
\index{gst\_tensor\_filter\_finalize@{gst\_tensor\_filter\_finalize}!tensor\_filter.c@{tensor\_filter.c}}
\doxysubsubsection{\texorpdfstring{gst\_tensor\_filter\_finalize()}{gst\_tensor\_filter\_finalize()}}
{\footnotesize\ttfamily static void gst\+\_\+tensor\+\_\+filter\+\_\+finalize (\begin{DoxyParamCaption}\item[{G\+Object $\ast$}]{object }\end{DoxyParamCaption})\hspace{0.3cm}{\ttfamily [static]}}



Function to finalize instance. 



Definition at line 249 of file tensor\+\_\+filter.\+c.

Here is the call graph for this function\+:
\nopagebreak
\begin{figure}[H]
\begin{center}
\leavevmode
\includegraphics[width=350pt]{tensor__filter_8c_ad13ce1d93921dd277d7298d957300acb_cgraph}
\end{center}
\end{figure}
Here is the caller graph for this function\+:
\nopagebreak
\begin{figure}[H]
\begin{center}
\leavevmode
\includegraphics[width=350pt]{tensor__filter_8c_ad13ce1d93921dd277d7298d957300acb_icgraph}
\end{center}
\end{figure}
\mbox{\Hypertarget{tensor__filter_8c_a31b85515cad23ecec3bad2392fa901f5}\label{tensor__filter_8c_a31b85515cad23ecec3bad2392fa901f5}} 
\index{tensor\_filter.c@{tensor\_filter.c}!gst\_tensor\_filter\_fixate\_caps@{gst\_tensor\_filter\_fixate\_caps}}
\index{gst\_tensor\_filter\_fixate\_caps@{gst\_tensor\_filter\_fixate\_caps}!tensor\_filter.c@{tensor\_filter.c}}
\doxysubsubsection{\texorpdfstring{gst\_tensor\_filter\_fixate\_caps()}{gst\_tensor\_filter\_fixate\_caps()}}
{\footnotesize\ttfamily static Gst\+Caps $\ast$ gst\+\_\+tensor\+\_\+filter\+\_\+fixate\+\_\+caps (\begin{DoxyParamCaption}\item[{Gst\+Base\+Transform $\ast$}]{trans,  }\item[{Gst\+Pad\+Direction}]{direction,  }\item[{Gst\+Caps $\ast$}]{caps,  }\item[{Gst\+Caps $\ast$}]{othercaps }\end{DoxyParamCaption})\hspace{0.3cm}{\ttfamily [static]}}



fixate caps. required vmethod of Gst\+Base\+Transform. 

Removes no-\/used-\/variable warning for priv in when D\+BG is set

To get the out-\/caps, Gst\+Tensor\+Filter has to parse tensor info from NN model.

Definition at line 1528 of file tensor\+\_\+filter.\+c.

Here is the call graph for this function\+:
\nopagebreak
\begin{figure}[H]
\begin{center}
\leavevmode
\includegraphics[width=350pt]{tensor__filter_8c_a31b85515cad23ecec3bad2392fa901f5_cgraph}
\end{center}
\end{figure}
Here is the caller graph for this function\+:
\nopagebreak
\begin{figure}[H]
\begin{center}
\leavevmode
\includegraphics[width=350pt]{tensor__filter_8c_a31b85515cad23ecec3bad2392fa901f5_icgraph}
\end{center}
\end{figure}
\mbox{\Hypertarget{tensor__filter_8c_a5fe841bb13a3d1a6409cba93d2632cfe}\label{tensor__filter_8c_a5fe841bb13a3d1a6409cba93d2632cfe}} 
\index{tensor\_filter.c@{tensor\_filter.c}!gst\_tensor\_filter\_get\_property@{gst\_tensor\_filter\_get\_property}}
\index{gst\_tensor\_filter\_get\_property@{gst\_tensor\_filter\_get\_property}!tensor\_filter.c@{tensor\_filter.c}}
\doxysubsubsection{\texorpdfstring{gst\_tensor\_filter\_get\_property()}{gst\_tensor\_filter\_get\_property()}}
{\footnotesize\ttfamily static void gst\+\_\+tensor\+\_\+filter\+\_\+get\+\_\+property (\begin{DoxyParamCaption}\item[{G\+Object $\ast$}]{object,  }\item[{guint}]{prop\+\_\+id,  }\item[{G\+Value $\ast$}]{value,  }\item[{G\+Param\+Spec $\ast$}]{pspec }\end{DoxyParamCaption})\hspace{0.3cm}{\ttfamily [static]}}



Getter for tensor\+\_\+filter properties. 



Definition at line 330 of file tensor\+\_\+filter.\+c.

Here is the call graph for this function\+:
\nopagebreak
\begin{figure}[H]
\begin{center}
\leavevmode
\includegraphics[width=350pt]{tensor__filter_8c_a5fe841bb13a3d1a6409cba93d2632cfe_cgraph}
\end{center}
\end{figure}
Here is the caller graph for this function\+:
\nopagebreak
\begin{figure}[H]
\begin{center}
\leavevmode
\includegraphics[width=350pt]{tensor__filter_8c_a5fe841bb13a3d1a6409cba93d2632cfe_icgraph}
\end{center}
\end{figure}
\mbox{\Hypertarget{tensor__filter_8c_afe4b5e29828237036a5c8dc6b1861759}\label{tensor__filter_8c_afe4b5e29828237036a5c8dc6b1861759}} 
\index{tensor\_filter.c@{tensor\_filter.c}!gst\_tensor\_filter\_get\_tensor\_size@{gst\_tensor\_filter\_get\_tensor\_size}}
\index{gst\_tensor\_filter\_get\_tensor\_size@{gst\_tensor\_filter\_get\_tensor\_size}!tensor\_filter.c@{tensor\_filter.c}}
\doxysubsubsection{\texorpdfstring{gst\_tensor\_filter\_get\_tensor\_size()}{gst\_tensor\_filter\_get\_tensor\_size()}}
{\footnotesize\ttfamily static gsize gst\+\_\+tensor\+\_\+filter\+\_\+get\+\_\+tensor\+\_\+size (\begin{DoxyParamCaption}\item[{\mbox{\hyperlink{tensor__filter_8h_a197b091651b97cbce82d3b27a5c10b88}{Gst\+Tensor\+Filter}} $\ast$}]{self,  }\item[{guint}]{index,  }\item[{gboolean}]{is\+\_\+input }\end{DoxyParamCaption})\hspace{0.3cm}{\ttfamily [static]}}



Calculate tensor buffer size. 


\begin{DoxyParams}{Parameters}
{\em self} & \char`\"{}this\char`\"{} pointer \\
\hline
{\em index} & index of tensors \\
\hline
\end{DoxyParams}
\begin{DoxyReturn}{Returns}
tensor buffer size 
\end{DoxyReturn}


Definition at line 277 of file tensor\+\_\+filter.\+c.

Here is the call graph for this function\+:
\nopagebreak
\begin{figure}[H]
\begin{center}
\leavevmode
\includegraphics[width=350pt]{tensor__filter_8c_afe4b5e29828237036a5c8dc6b1861759_cgraph}
\end{center}
\end{figure}
Here is the caller graph for this function\+:
\nopagebreak
\begin{figure}[H]
\begin{center}
\leavevmode
\includegraphics[width=350pt]{tensor__filter_8c_afe4b5e29828237036a5c8dc6b1861759_icgraph}
\end{center}
\end{figure}
\mbox{\Hypertarget{tensor__filter_8c_a79a9928f5846adc13ae2abecdb190f76}\label{tensor__filter_8c_a79a9928f5846adc13ae2abecdb190f76}} 
\index{tensor\_filter.c@{tensor\_filter.c}!gst\_tensor\_filter\_get\_wrapped\_mem@{gst\_tensor\_filter\_get\_wrapped\_mem}}
\index{gst\_tensor\_filter\_get\_wrapped\_mem@{gst\_tensor\_filter\_get\_wrapped\_mem}!tensor\_filter.c@{tensor\_filter.c}}
\doxysubsubsection{\texorpdfstring{gst\_tensor\_filter\_get\_wrapped\_mem()}{gst\_tensor\_filter\_get\_wrapped\_mem()}}
{\footnotesize\ttfamily static Gst\+Memory$\ast$ gst\+\_\+tensor\+\_\+filter\+\_\+get\+\_\+wrapped\+\_\+mem (\begin{DoxyParamCaption}\item[{\mbox{\hyperlink{tensor__filter_8h_a197b091651b97cbce82d3b27a5c10b88}{Gst\+Tensor\+Filter}} $\ast$}]{self,  }\item[{gpointer}]{data,  }\item[{gsize}]{size }\end{DoxyParamCaption})\hspace{0.3cm}{\ttfamily [static]}}



Allocate new memory block from given data. 

tensor-\/filter should send event to sub-\/plugin when memory is freed. 

Definition at line 372 of file tensor\+\_\+filter.\+c.

Here is the call graph for this function\+:
\nopagebreak
\begin{figure}[H]
\begin{center}
\leavevmode
\includegraphics[width=350pt]{tensor__filter_8c_a79a9928f5846adc13ae2abecdb190f76_cgraph}
\end{center}
\end{figure}
Here is the caller graph for this function\+:
\nopagebreak
\begin{figure}[H]
\begin{center}
\leavevmode
\includegraphics[width=350pt]{tensor__filter_8c_a79a9928f5846adc13ae2abecdb190f76_icgraph}
\end{center}
\end{figure}
\mbox{\Hypertarget{tensor__filter_8c_acbd2e6976ea088b2e261acf6adc89e49}\label{tensor__filter_8c_acbd2e6976ea088b2e261acf6adc89e49}} 
\index{tensor\_filter.c@{tensor\_filter.c}!gst\_tensor\_filter\_init@{gst\_tensor\_filter\_init}}
\index{gst\_tensor\_filter\_init@{gst\_tensor\_filter\_init}!tensor\_filter.c@{tensor\_filter.c}}
\doxysubsubsection{\texorpdfstring{gst\_tensor\_filter\_init()}{gst\_tensor\_filter\_init()}}
{\footnotesize\ttfamily static void gst\+\_\+tensor\+\_\+filter\+\_\+init (\begin{DoxyParamCaption}\item[{\mbox{\hyperlink{tensor__filter_8h_a197b091651b97cbce82d3b27a5c10b88}{Gst\+Tensor\+Filter}} $\ast$}]{self }\end{DoxyParamCaption})\hspace{0.3cm}{\ttfamily [static]}}



initialize the new element instantiate pads and add them to element set pad callback functions initialize instance structure 



Definition at line 234 of file tensor\+\_\+filter.\+c.

Here is the call graph for this function\+:
\nopagebreak
\begin{figure}[H]
\begin{center}
\leavevmode
\includegraphics[width=350pt]{tensor__filter_8c_acbd2e6976ea088b2e261acf6adc89e49_cgraph}
\end{center}
\end{figure}
\mbox{\Hypertarget{tensor__filter_8c_a2ba305d840864774aaffb14a9ee60f1e}\label{tensor__filter_8c_a2ba305d840864774aaffb14a9ee60f1e}} 
\index{tensor\_filter.c@{tensor\_filter.c}!gst\_tensor\_filter\_query@{gst\_tensor\_filter\_query}}
\index{gst\_tensor\_filter\_query@{gst\_tensor\_filter\_query}!tensor\_filter.c@{tensor\_filter.c}}
\doxysubsubsection{\texorpdfstring{gst\_tensor\_filter\_query()}{gst\_tensor\_filter\_query()}}
{\footnotesize\ttfamily static gboolean gst\+\_\+tensor\+\_\+filter\+\_\+query (\begin{DoxyParamCaption}\item[{Gst\+Base\+Transform $\ast$}]{trans,  }\item[{Gst\+Pad\+Direction}]{direction,  }\item[{Gst\+Query $\ast$}]{query }\end{DoxyParamCaption})\hspace{0.3cm}{\ttfamily [static]}}



query handling, optional vmethod of Gst\+Base\+Transform. 



Definition at line 1623 of file tensor\+\_\+filter.\+c.

Here is the caller graph for this function\+:
\nopagebreak
\begin{figure}[H]
\begin{center}
\leavevmode
\includegraphics[width=350pt]{tensor__filter_8c_a2ba305d840864774aaffb14a9ee60f1e_icgraph}
\end{center}
\end{figure}
\mbox{\Hypertarget{tensor__filter_8c_a192ba1d693b39dde520e3077f37f5e0f}\label{tensor__filter_8c_a192ba1d693b39dde520e3077f37f5e0f}} 
\index{tensor\_filter.c@{tensor\_filter.c}!gst\_tensor\_filter\_set\_caps@{gst\_tensor\_filter\_set\_caps}}
\index{gst\_tensor\_filter\_set\_caps@{gst\_tensor\_filter\_set\_caps}!tensor\_filter.c@{tensor\_filter.c}}
\doxysubsubsection{\texorpdfstring{gst\_tensor\_filter\_set\_caps()}{gst\_tensor\_filter\_set\_caps()}}
{\footnotesize\ttfamily static gboolean gst\+\_\+tensor\+\_\+filter\+\_\+set\+\_\+caps (\begin{DoxyParamCaption}\item[{Gst\+Base\+Transform $\ast$}]{trans,  }\item[{Gst\+Caps $\ast$}]{incaps,  }\item[{Gst\+Caps $\ast$}]{outcaps }\end{DoxyParamCaption})\hspace{0.3cm}{\ttfamily [static]}}



set caps. required vmethod of Gst\+Base\+Transform. 

compare output tensor

Definition at line 1563 of file tensor\+\_\+filter.\+c.

Here is the call graph for this function\+:
\nopagebreak
\begin{figure}[H]
\begin{center}
\leavevmode
\includegraphics[width=350pt]{tensor__filter_8c_a192ba1d693b39dde520e3077f37f5e0f_cgraph}
\end{center}
\end{figure}
Here is the caller graph for this function\+:
\nopagebreak
\begin{figure}[H]
\begin{center}
\leavevmode
\includegraphics[width=350pt]{tensor__filter_8c_a192ba1d693b39dde520e3077f37f5e0f_icgraph}
\end{center}
\end{figure}
\mbox{\Hypertarget{tensor__filter_8c_a67ad721491d62420348da9de33bcff59}\label{tensor__filter_8c_a67ad721491d62420348da9de33bcff59}} 
\index{tensor\_filter.c@{tensor\_filter.c}!gst\_tensor\_filter\_set\_property@{gst\_tensor\_filter\_set\_property}}
\index{gst\_tensor\_filter\_set\_property@{gst\_tensor\_filter\_set\_property}!tensor\_filter.c@{tensor\_filter.c}}
\doxysubsubsection{\texorpdfstring{gst\_tensor\_filter\_set\_property()}{gst\_tensor\_filter\_set\_property()}}
{\footnotesize\ttfamily static void gst\+\_\+tensor\+\_\+filter\+\_\+set\+\_\+property (\begin{DoxyParamCaption}\item[{G\+Object $\ast$}]{object,  }\item[{guint}]{prop\+\_\+id,  }\item[{const G\+Value $\ast$}]{value,  }\item[{G\+Param\+Spec $\ast$}]{pspec }\end{DoxyParamCaption})\hspace{0.3cm}{\ttfamily [static]}}



Setter for tensor\+\_\+filter properties. 



Definition at line 304 of file tensor\+\_\+filter.\+c.

Here is the call graph for this function\+:
\nopagebreak
\begin{figure}[H]
\begin{center}
\leavevmode
\includegraphics[width=350pt]{tensor__filter_8c_a67ad721491d62420348da9de33bcff59_cgraph}
\end{center}
\end{figure}
Here is the caller graph for this function\+:
\nopagebreak
\begin{figure}[H]
\begin{center}
\leavevmode
\includegraphics[width=350pt]{tensor__filter_8c_a67ad721491d62420348da9de33bcff59_icgraph}
\end{center}
\end{figure}
\mbox{\Hypertarget{tensor__filter_8c_adea189e2a9d5d8afb5b8b63590808169}\label{tensor__filter_8c_adea189e2a9d5d8afb5b8b63590808169}} 
\index{tensor\_filter.c@{tensor\_filter.c}!gst\_tensor\_filter\_sink\_event@{gst\_tensor\_filter\_sink\_event}}
\index{gst\_tensor\_filter\_sink\_event@{gst\_tensor\_filter\_sink\_event}!tensor\_filter.c@{tensor\_filter.c}}
\doxysubsubsection{\texorpdfstring{gst\_tensor\_filter\_sink\_event()}{gst\_tensor\_filter\_sink\_event()}}
{\footnotesize\ttfamily static gboolean gst\+\_\+tensor\+\_\+filter\+\_\+sink\+\_\+event (\begin{DoxyParamCaption}\item[{Gst\+Base\+Transform $\ast$}]{trans,  }\item[{Gst\+Event $\ast$}]{event }\end{DoxyParamCaption})\hspace{0.3cm}{\ttfamily [static]}}



Event handler for sink pad of tensor filter. 


\begin{DoxyParams}{Parameters}
{\em trans} & \char`\"{}this\char`\"{} pointer \\
\hline
{\em event} & a passed event object \\
\hline
\end{DoxyParams}
\begin{DoxyReturn}{Returns}
T\+R\+UE if there is no error. 
\end{DoxyReturn}
other events are handled in the default event handler

Definition at line 1723 of file tensor\+\_\+filter.\+c.

Here is the caller graph for this function\+:
\nopagebreak
\begin{figure}[H]
\begin{center}
\leavevmode
\includegraphics[width=350pt]{tensor__filter_8c_adea189e2a9d5d8afb5b8b63590808169_icgraph}
\end{center}
\end{figure}
\mbox{\Hypertarget{tensor__filter_8c_a2e51680785fd053d30ec9e80b6d69975}\label{tensor__filter_8c_a2e51680785fd053d30ec9e80b6d69975}} 
\index{tensor\_filter.c@{tensor\_filter.c}!gst\_tensor\_filter\_src\_event@{gst\_tensor\_filter\_src\_event}}
\index{gst\_tensor\_filter\_src\_event@{gst\_tensor\_filter\_src\_event}!tensor\_filter.c@{tensor\_filter.c}}
\doxysubsubsection{\texorpdfstring{gst\_tensor\_filter\_src\_event()}{gst\_tensor\_filter\_src\_event()}}
{\footnotesize\ttfamily static gboolean gst\+\_\+tensor\+\_\+filter\+\_\+src\+\_\+event (\begin{DoxyParamCaption}\item[{Gst\+Base\+Transform $\ast$}]{trans,  }\item[{Gst\+Event $\ast$}]{event }\end{DoxyParamCaption})\hspace{0.3cm}{\ttfamily [static]}}



Event handler for src pad of tensor filter. 


\begin{DoxyParams}{Parameters}
{\em trans} & \char`\"{}this\char`\"{} pointer \\
\hline
{\em event} & a passed event object \\
\hline
\end{DoxyParams}
\begin{DoxyReturn}{Returns}
T\+R\+UE if there is no error. 
\end{DoxyReturn}
other events are handled in the default event handler

Definition at line 1764 of file tensor\+\_\+filter.\+c.

Here is the caller graph for this function\+:
\nopagebreak
\begin{figure}[H]
\begin{center}
\leavevmode
\includegraphics[width=350pt]{tensor__filter_8c_a2e51680785fd053d30ec9e80b6d69975_icgraph}
\end{center}
\end{figure}
\mbox{\Hypertarget{tensor__filter_8c_a3e18f9fb0dc76f35b3fcbad22a1b0830}\label{tensor__filter_8c_a3e18f9fb0dc76f35b3fcbad22a1b0830}} 
\index{tensor\_filter.c@{tensor\_filter.c}!gst\_tensor\_filter\_start@{gst\_tensor\_filter\_start}}
\index{gst\_tensor\_filter\_start@{gst\_tensor\_filter\_start}!tensor\_filter.c@{tensor\_filter.c}}
\doxysubsubsection{\texorpdfstring{gst\_tensor\_filter\_start()}{gst\_tensor\_filter\_start()}}
{\footnotesize\ttfamily static gboolean gst\+\_\+tensor\+\_\+filter\+\_\+start (\begin{DoxyParamCaption}\item[{Gst\+Base\+Transform $\ast$}]{trans }\end{DoxyParamCaption})\hspace{0.3cm}{\ttfamily [static]}}



Called when the element starts processing. optional vmethod of Base\+Transform. 


\begin{DoxyParams}{Parameters}
{\em trans} & \char`\"{}this\char`\"{} pointer \\
\hline
\end{DoxyParams}
\begin{DoxyReturn}{Returns}
T\+R\+UE if there is no error. 
\end{DoxyReturn}


Definition at line 1802 of file tensor\+\_\+filter.\+c.

Here is the call graph for this function\+:
\nopagebreak
\begin{figure}[H]
\begin{center}
\leavevmode
\includegraphics[width=350pt]{tensor__filter_8c_a3e18f9fb0dc76f35b3fcbad22a1b0830_cgraph}
\end{center}
\end{figure}
Here is the caller graph for this function\+:
\nopagebreak
\begin{figure}[H]
\begin{center}
\leavevmode
\includegraphics[width=350pt]{tensor__filter_8c_a3e18f9fb0dc76f35b3fcbad22a1b0830_icgraph}
\end{center}
\end{figure}
\mbox{\Hypertarget{tensor__filter_8c_aee484febebf76321eef8a7fd1241f7fa}\label{tensor__filter_8c_aee484febebf76321eef8a7fd1241f7fa}} 
\index{tensor\_filter.c@{tensor\_filter.c}!gst\_tensor\_filter\_stop@{gst\_tensor\_filter\_stop}}
\index{gst\_tensor\_filter\_stop@{gst\_tensor\_filter\_stop}!tensor\_filter.c@{tensor\_filter.c}}
\doxysubsubsection{\texorpdfstring{gst\_tensor\_filter\_stop()}{gst\_tensor\_filter\_stop()}}
{\footnotesize\ttfamily static gboolean gst\+\_\+tensor\+\_\+filter\+\_\+stop (\begin{DoxyParamCaption}\item[{Gst\+Base\+Transform $\ast$}]{trans }\end{DoxyParamCaption})\hspace{0.3cm}{\ttfamily [static]}}



Called when the element stops processing. optional vmethod of Base\+Transform. 


\begin{DoxyParams}{Parameters}
{\em trans} & \char`\"{}this\char`\"{} pointer \\
\hline
\end{DoxyParams}
\begin{DoxyReturn}{Returns}
T\+R\+UE if there is no error. 
\end{DoxyReturn}


Definition at line 1836 of file tensor\+\_\+filter.\+c.

Here is the call graph for this function\+:
\nopagebreak
\begin{figure}[H]
\begin{center}
\leavevmode
\includegraphics[width=350pt]{tensor__filter_8c_aee484febebf76321eef8a7fd1241f7fa_cgraph}
\end{center}
\end{figure}
Here is the caller graph for this function\+:
\nopagebreak
\begin{figure}[H]
\begin{center}
\leavevmode
\includegraphics[width=350pt]{tensor__filter_8c_aee484febebf76321eef8a7fd1241f7fa_icgraph}
\end{center}
\end{figure}
\mbox{\Hypertarget{tensor__filter_8c_a30bfa834d93d6d9651275e92c79cabd9}\label{tensor__filter_8c_a30bfa834d93d6d9651275e92c79cabd9}} 
\index{tensor\_filter.c@{tensor\_filter.c}!gst\_tensor\_filter\_transform@{gst\_tensor\_filter\_transform}}
\index{gst\_tensor\_filter\_transform@{gst\_tensor\_filter\_transform}!tensor\_filter.c@{tensor\_filter.c}}
\doxysubsubsection{\texorpdfstring{gst\_tensor\_filter\_transform()}{gst\_tensor\_filter\_transform()}}
{\footnotesize\ttfamily static Gst\+Flow\+Return gst\+\_\+tensor\+\_\+filter\+\_\+transform (\begin{DoxyParamCaption}\item[{Gst\+Base\+Transform $\ast$}]{trans,  }\item[{Gst\+Buffer $\ast$}]{inbuf,  }\item[{Gst\+Buffer $\ast$}]{outbuf }\end{DoxyParamCaption})\hspace{0.3cm}{\ttfamily [static]}}



non-\/ip transform. required vmethod of Gst\+Base\+Transform. 

Reset suspend timeout

Set suspend timeout

Definition at line 1097 of file tensor\+\_\+filter.\+c.

Here is the call graph for this function\+:
\nopagebreak
\begin{figure}[H]
\begin{center}
\leavevmode
\includegraphics[width=350pt]{tensor__filter_8c_a30bfa834d93d6d9651275e92c79cabd9_cgraph}
\end{center}
\end{figure}
Here is the caller graph for this function\+:
\nopagebreak
\begin{figure}[H]
\begin{center}
\leavevmode
\includegraphics[width=350pt]{tensor__filter_8c_a30bfa834d93d6d9651275e92c79cabd9_icgraph}
\end{center}
\end{figure}
\mbox{\Hypertarget{tensor__filter_8c_a8f485b3d8ed42bb5652d2cf2b2f0b77c}\label{tensor__filter_8c_a8f485b3d8ed42bb5652d2cf2b2f0b77c}} 
\index{tensor\_filter.c@{tensor\_filter.c}!gst\_tensor\_filter\_transform\_caps@{gst\_tensor\_filter\_transform\_caps}}
\index{gst\_tensor\_filter\_transform\_caps@{gst\_tensor\_filter\_transform\_caps}!tensor\_filter.c@{tensor\_filter.c}}
\doxysubsubsection{\texorpdfstring{gst\_tensor\_filter\_transform\_caps()}{gst\_tensor\_filter\_transform\_caps()}}
{\footnotesize\ttfamily static Gst\+Caps $\ast$ gst\+\_\+tensor\+\_\+filter\+\_\+transform\+\_\+caps (\begin{DoxyParamCaption}\item[{Gst\+Base\+Transform $\ast$}]{trans,  }\item[{Gst\+Pad\+Direction}]{direction,  }\item[{Gst\+Caps $\ast$}]{caps,  }\item[{Gst\+Caps $\ast$}]{filter }\end{DoxyParamCaption})\hspace{0.3cm}{\ttfamily [static]}}



configure tensor-\/srcpad cap from \char`\"{}proposed\char`\"{} cap. 

@trans (\char`\"{}this\char`\"{} pointer) @direction (why do we need this?) @caps sinkpad cap (if direction G\+S\+T\+\_\+\+P\+A\+D\+\_\+\+S\+I\+NK) @filter this element\textquotesingle{}s cap (don\textquotesingle{}t know specifically.)

Be careful not to fix/set caps at this stage. Negotiation not completed yet. Gst\+Tensor\+Filter has to parse the tensor dimension and type from NN model. In this stage, in-\/caps may not be fixed yet. To get the tensor info and generate pad-\/caps, call get\+Input\+Dimension and get\+Output\+Dimension. If these functions are not defined, we have to call set\+Input\+Dimension, and then it will fully configure the tensor info.

\begin{DoxyRefDesc}{Todo}
\item[\mbox{\hyperlink{todo__todo000058}{Todo}}]how to set the framerate of output tensors \end{DoxyRefDesc}


\begin{DoxyRefDesc}{Todo}
\item[\mbox{\hyperlink{todo__todo000059}{Todo}}]We do not have a testcase hitting here. Thus, we do not ensure the validity here. However, according to gstreamer doxygen entry, if filter is given, that\textquotesingle{}s not to be ignored. For now, we assume that if caps-\/size is 0, filter is \char`\"{}\+A\+N\+Y\char`\"{}. \end{DoxyRefDesc}


Definition at line 1405 of file tensor\+\_\+filter.\+c.

Here is the call graph for this function\+:
\nopagebreak
\begin{figure}[H]
\begin{center}
\leavevmode
\includegraphics[width=350pt]{tensor__filter_8c_a8f485b3d8ed42bb5652d2cf2b2f0b77c_cgraph}
\end{center}
\end{figure}
Here is the caller graph for this function\+:
\nopagebreak
\begin{figure}[H]
\begin{center}
\leavevmode
\includegraphics[width=350pt]{tensor__filter_8c_a8f485b3d8ed42bb5652d2cf2b2f0b77c_icgraph}
\end{center}
\end{figure}
\mbox{\Hypertarget{tensor__filter_8c_a286f500286a4e237264677095e2daf90}\label{tensor__filter_8c_a286f500286a4e237264677095e2daf90}} 
\index{tensor\_filter.c@{tensor\_filter.c}!gst\_tensor\_filter\_transform\_size@{gst\_tensor\_filter\_transform\_size}}
\index{gst\_tensor\_filter\_transform\_size@{gst\_tensor\_filter\_transform\_size}!tensor\_filter.c@{tensor\_filter.c}}
\doxysubsubsection{\texorpdfstring{gst\_tensor\_filter\_transform\_size()}{gst\_tensor\_filter\_transform\_size()}}
{\footnotesize\ttfamily static gboolean gst\+\_\+tensor\+\_\+filter\+\_\+transform\+\_\+size (\begin{DoxyParamCaption}\item[{Gst\+Base\+Transform $\ast$}]{trans,  }\item[{Gst\+Pad\+Direction}]{direction,  }\item[{Gst\+Caps $\ast$}]{caps,  }\item[{gsize}]{size,  }\item[{Gst\+Caps $\ast$}]{othercaps,  }\item[{gsize $\ast$}]{othersize }\end{DoxyParamCaption})\hspace{0.3cm}{\ttfamily [static]}}



Tell the framework the required size of buffer based on the info of the other side pad. optional vmethod of Base\+Transform. 

We cannot directly get the value from size value, we need to review the pad-\/caps. This is called when non-\/ip mode is used. Internal Logic Error. Cannot proceed without configured pipeline

Consider multi-\/tensors. Set each memory block in transform()

Definition at line 1694 of file tensor\+\_\+filter.\+c.

Here is the call graph for this function\+:
\nopagebreak
\begin{figure}[H]
\begin{center}
\leavevmode
\includegraphics[width=347pt]{tensor__filter_8c_a286f500286a4e237264677095e2daf90_cgraph}
\end{center}
\end{figure}
Here is the caller graph for this function\+:
\nopagebreak
\begin{figure}[H]
\begin{center}
\leavevmode
\includegraphics[width=350pt]{tensor__filter_8c_a286f500286a4e237264677095e2daf90_icgraph}
\end{center}
\end{figure}
\mbox{\Hypertarget{tensor__filter_8c_a2a0e831045c64854bff08c3e4eec8607}\label{tensor__filter_8c_a2a0e831045c64854bff08c3e4eec8607}} 
\index{tensor\_filter.c@{tensor\_filter.c}!gst\_tensor\_filter\_watchdog\_trigger@{gst\_tensor\_filter\_watchdog\_trigger}}
\index{gst\_tensor\_filter\_watchdog\_trigger@{gst\_tensor\_filter\_watchdog\_trigger}!tensor\_filter.c@{tensor\_filter.c}}
\doxysubsubsection{\texorpdfstring{gst\_tensor\_filter\_watchdog\_trigger()}{gst\_tensor\_filter\_watchdog\_trigger()}}
{\footnotesize\ttfamily static gboolean gst\+\_\+tensor\+\_\+filter\+\_\+watchdog\+\_\+trigger (\begin{DoxyParamCaption}\item[{gpointer}]{ptr }\end{DoxyParamCaption})\hspace{0.3cm}{\ttfamily [static]}}



Called when there is no input within suspend time specified by the user. 



Definition at line 1083 of file tensor\+\_\+filter.\+c.

Here is the call graph for this function\+:
\nopagebreak
\begin{figure}[H]
\begin{center}
\leavevmode
\includegraphics[width=350pt]{tensor__filter_8c_a2a0e831045c64854bff08c3e4eec8607_cgraph}
\end{center}
\end{figure}
Here is the caller graph for this function\+:
\nopagebreak
\begin{figure}[H]
\begin{center}
\leavevmode
\includegraphics[width=350pt]{tensor__filter_8c_a2a0e831045c64854bff08c3e4eec8607_icgraph}
\end{center}
\end{figure}
\mbox{\Hypertarget{tensor__filter_8c_a744e8bfd00209c404eebc4b067e54181}\label{tensor__filter_8c_a744e8bfd00209c404eebc4b067e54181}} 
\index{tensor\_filter.c@{tensor\_filter.c}!prepare\_statistics@{prepare\_statistics}}
\index{prepare\_statistics@{prepare\_statistics}!tensor\_filter.c@{tensor\_filter.c}}
\doxysubsubsection{\texorpdfstring{prepare\_statistics()}{prepare\_statistics()}}
{\footnotesize\ttfamily static void prepare\+\_\+statistics (\begin{DoxyParamCaption}\item[{\mbox{\hyperlink{tensor__filter__common_8h_a1008ddabc82c64e2305fd7465cceee80}{Gst\+Tensor\+Filter\+Private}} $\ast$}]{priv }\end{DoxyParamCaption})\hspace{0.3cm}{\ttfamily [static]}}



Prepare statistics for performance profiling (e.\+g, latency, throughput) 



Definition at line 388 of file tensor\+\_\+filter.\+c.

Here is the caller graph for this function\+:
\nopagebreak
\begin{figure}[H]
\begin{center}
\leavevmode
\includegraphics[width=350pt]{tensor__filter_8c_a744e8bfd00209c404eebc4b067e54181_icgraph}
\end{center}
\end{figure}
\mbox{\Hypertarget{tensor__filter_8c_aec33d75954150957b3bcbedeab1c818a}\label{tensor__filter_8c_aec33d75954150957b3bcbedeab1c818a}} 
\index{tensor\_filter.c@{tensor\_filter.c}!record\_statistics@{record\_statistics}}
\index{record\_statistics@{record\_statistics}!tensor\_filter.c@{tensor\_filter.c}}
\doxysubsubsection{\texorpdfstring{record\_statistics()}{record\_statistics()}}
{\footnotesize\ttfamily static void record\+\_\+statistics (\begin{DoxyParamCaption}\item[{\mbox{\hyperlink{tensor__filter__common_8h_a1008ddabc82c64e2305fd7465cceee80}{Gst\+Tensor\+Filter\+Private}} $\ast$}]{priv }\end{DoxyParamCaption})\hspace{0.3cm}{\ttfamily [static]}}



Record statistics for performance profiling (e.\+g, latency, throughput) 

statistics values are monotonously increasing. to avoid potential overflow, let\textquotesingle{}s cache old values and subtract them from the statistics if some threshold is exceeded.

Definition at line 412 of file tensor\+\_\+filter.\+c.

Here is the call graph for this function\+:
\nopagebreak
\begin{figure}[H]
\begin{center}
\leavevmode
\includegraphics[width=328pt]{tensor__filter_8c_aec33d75954150957b3bcbedeab1c818a_cgraph}
\end{center}
\end{figure}
Here is the caller graph for this function\+:
\nopagebreak
\begin{figure}[H]
\begin{center}
\leavevmode
\includegraphics[width=350pt]{tensor__filter_8c_aec33d75954150957b3bcbedeab1c818a_icgraph}
\end{center}
\end{figure}
\mbox{\Hypertarget{tensor__filter_8c_a4584136b10db7d244c4f4b4c7ea56cc2}\label{tensor__filter_8c_a4584136b10db7d244c4f4b4c7ea56cc2}} 
\index{tensor\_filter.c@{tensor\_filter.c}!track\_latency@{track\_latency}}
\index{track\_latency@{track\_latency}!tensor\_filter.c@{tensor\_filter.c}}
\doxysubsubsection{\texorpdfstring{track\_latency()}{track\_latency()}}
{\footnotesize\ttfamily static void track\+\_\+latency (\begin{DoxyParamCaption}\item[{\mbox{\hyperlink{tensor__filter_8h_a197b091651b97cbce82d3b27a5c10b88}{Gst\+Tensor\+Filter}} $\ast$}]{self }\end{DoxyParamCaption})\hspace{0.3cm}{\ttfamily [static]}}



Track estimated latency and notify pipeline when it changes. Latency estimates may be a bit jittery. On the principle we want to inform pipeline with the latency from longest inference. However, first inference may take much longer, or model filter configuration may change. Therefore any change of more than 10\% (arbitrary value) to a lower latency is also reported to pipeline. Notification is done sending L\+A\+T\+E\+N\+CY message to bus. Upon receipt, application will initiate a pipeline latency probe via L\+A\+T\+E\+N\+CY query. 



Definition at line 503 of file tensor\+\_\+filter.\+c.

Here is the caller graph for this function\+:
\nopagebreak
\begin{figure}[H]
\begin{center}
\leavevmode
\includegraphics[width=350pt]{tensor__filter_8c_a4584136b10db7d244c4f4b4c7ea56cc2_icgraph}
\end{center}
\end{figure}


\doxysubsection{Variable Documentation}
\mbox{\Hypertarget{tensor__filter_8c_a7c3b88a6174b442587875b361d888720}\label{tensor__filter_8c_a7c3b88a6174b442587875b361d888720}} 
\index{tensor\_filter.c@{tensor\_filter.c}!sink\_factory@{sink\_factory}}
\index{sink\_factory@{sink\_factory}!tensor\_filter.c@{tensor\_filter.c}}
\doxysubsubsection{\texorpdfstring{sink\_factory}{sink\_factory}}
{\footnotesize\ttfamily Gst\+Static\+Pad\+Template sink\+\_\+factory\hspace{0.3cm}{\ttfamily [static]}}

{\bfseries Initial value\+:}
\begin{DoxyCode}{0}
\DoxyCodeLine{= GST\_STATIC\_PAD\_TEMPLATE (\textcolor{stringliteral}{"sink"},}
\DoxyCodeLine{    GST\_PAD\_SINK,}
\DoxyCodeLine{    GST\_PAD\_ALWAYS,}
\DoxyCodeLine{    GST\_STATIC\_CAPS (\mbox{\hyperlink{tensor__filter_8c_aa2d8b0bc5c1225ba8d7f84e235c1cf0d}{CAPS\_STRING}}))}

\end{DoxyCode}


The capabilities of the inputs. 



Definition at line 92 of file tensor\+\_\+filter.\+c.

\mbox{\Hypertarget{tensor__filter_8c_a506c90b87594a5e6111c8b5f6ca85473}\label{tensor__filter_8c_a506c90b87594a5e6111c8b5f6ca85473}} 
\index{tensor\_filter.c@{tensor\_filter.c}!src\_factory@{src\_factory}}
\index{src\_factory@{src\_factory}!tensor\_filter.c@{tensor\_filter.c}}
\doxysubsubsection{\texorpdfstring{src\_factory}{src\_factory}}
{\footnotesize\ttfamily Gst\+Static\+Pad\+Template src\+\_\+factory\hspace{0.3cm}{\ttfamily [static]}}

{\bfseries Initial value\+:}
\begin{DoxyCode}{0}
\DoxyCodeLine{= GST\_STATIC\_PAD\_TEMPLATE (\textcolor{stringliteral}{"src"},}
\DoxyCodeLine{    GST\_PAD\_SRC,}
\DoxyCodeLine{    GST\_PAD\_ALWAYS,}
\DoxyCodeLine{    GST\_STATIC\_CAPS (\mbox{\hyperlink{tensor__filter_8c_aa2d8b0bc5c1225ba8d7f84e235c1cf0d}{CAPS\_STRING}}))}

\end{DoxyCode}


The capabilities of the outputs. 



Definition at line 100 of file tensor\+\_\+filter.\+c.

