Doxygen Book
gsttensor_repo.c File Reference

tensor repo file for NNStreamer, the GStreamer plugin for neural networks More...

#include "gsttensor_repo.h"
Include dependency graph for gsttensor_repo.c:

Go to the source code of this file.

Macros

#define DBG   FALSE
 
#define GST_REPO_LOCK()   (g_mutex_lock(&_repo.repo_lock))
 Macro for Lock & Cond. More...
 
#define GST_REPO_UNLOCK()   (g_mutex_unlock(&_repo.repo_lock))
 
#define GST_REPO_WAIT()   (g_cond_wait(&_repo.repo_cond, &_repo.repo_lock))
 
#define GST_REPO_BROADCAST()   (g_cond_broadcast (&_repo.repo_cond))
 

Functions

static void gst_tensor_repo_release_repodata (gpointer data)
 Internal function to release repo data. More...
 
GstTensorRepoDatagst_tensor_repo_get_repodata (guint nth)
 Getter to get nth GstTensorRepoData. More...
 
gboolean gst_tensor_repo_set_changed (guint o_nth, guint nth, gboolean is_sink)
 Set the changing status of repo. More...
 
gboolean gst_tensor_repo_add_repodata (guint nth, gboolean is_sink)
 Add GstTensorRepoData into repo. More...
 
gboolean gst_tensor_repo_set_buffer (guint nth, GstBuffer *buffer, GstCaps *caps)
 Push GstBuffer into repo. More...
 
gboolean gst_tensor_repo_check_eos (guint nth)
 Check EOS (End-of-Stream) of slot. More...
 
gboolean gst_tensor_repo_check_changed (guint nth, guint *newid, gboolean is_sink)
 Check repo data is changed. More...
 
gboolean gst_tensor_repo_set_eos (guint nth)
 Set EOS (End-of-Stream) of slot. More...
 
GstBuffer * gst_tensor_repo_get_buffer (guint nth, gboolean *eos, guint *newid, GstCaps **caps)
 Get GstTensorRepoData from repo. More...
 
gboolean gst_tensor_repo_remove_repodata (guint nth)
 Remove nth GstTensorRepoData from GstTensorRepo. More...
 
void gst_tensor_repo_init (void)
 GstTensorRepo initialization. More...
 
gboolean gst_tensor_repo_wait (void)
 Wait for finish of initialization. More...
 

Variables

static GstTensorRepo _repo = {.num_data = 0,.initialized = FALSE }
 tensor repo global variable with init. More...
 

Detailed Description

tensor repo file for NNStreamer, the GStreamer plugin for neural networks

NNStreamer Tensor Repo Header's Contents Copyright (C) 2018 Jijoong Moon jijoo.nosp@m.ng.m.nosp@m.oon@s.nosp@m.amsu.nosp@m.ng.co.nosp@m.m

This library is free software; you can redistribute it and/or modify it under the terms of the GNU 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 WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Library General Public License for more details.

Date
17 Nov 2018
See also
https://github.com/nnstreamer/nnstreamer
Author
Jijoong Moon jijoo.nosp@m.ng.m.nosp@m.oon@s.nosp@m.amsu.nosp@m.ng.co.nosp@m.m
Bug:
No known bugs except for NYI items

Definition in file gsttensor_repo.c.

Macro Definition Documentation

◆ DBG

#define DBG   FALSE

Definition at line 29 of file gsttensor_repo.c.

◆ GST_REPO_BROADCAST

#define GST_REPO_BROADCAST ( )    (g_cond_broadcast (&_repo.repo_cond))

Definition at line 43 of file gsttensor_repo.c.

◆ GST_REPO_LOCK

#define GST_REPO_LOCK ( )    (g_mutex_lock(&_repo.repo_lock))

Macro for Lock & Cond.

Definition at line 40 of file gsttensor_repo.c.

◆ GST_REPO_UNLOCK

#define GST_REPO_UNLOCK ( )    (g_mutex_unlock(&_repo.repo_lock))

Definition at line 41 of file gsttensor_repo.c.

◆ GST_REPO_WAIT

#define GST_REPO_WAIT ( )    (g_cond_wait(&_repo.repo_cond, &_repo.repo_lock))

Definition at line 42 of file gsttensor_repo.c.

Function Documentation

◆ gst_tensor_repo_add_repodata()

gboolean gst_tensor_repo_add_repodata ( guint  nth,
gboolean  is_sink 
)

Add GstTensorRepoData into repo.

Definition at line 129 of file gsttensor_repo.c.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ gst_tensor_repo_check_changed()

gboolean gst_tensor_repo_check_changed ( guint  nth,
guint *  newid,
gboolean  is_sink 
)

Check repo data is changed.

Definition at line 255 of file gsttensor_repo.c.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ gst_tensor_repo_check_eos()

gboolean gst_tensor_repo_check_eos ( guint  nth)

Check EOS (End-of-Stream) of slot.

Definition at line 236 of file gsttensor_repo.c.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ gst_tensor_repo_get_buffer()

GstBuffer* gst_tensor_repo_get_buffer ( guint  nth,
gboolean *  eos,
guint *  newid,
GstCaps **  caps 
)

Get GstTensorRepoData from repo.

Definition at line 309 of file gsttensor_repo.c.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ gst_tensor_repo_get_repodata()

GstTensorRepoData* gst_tensor_repo_get_repodata ( guint  nth)

Getter to get nth GstTensorRepoData.

Definition at line 74 of file gsttensor_repo.c.

Here is the caller graph for this function:

◆ gst_tensor_repo_init()

void gst_tensor_repo_init ( void  )

GstTensorRepo initialization.

Definition at line 386 of file gsttensor_repo.c.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ gst_tensor_repo_release_repodata()

static void gst_tensor_repo_release_repodata ( gpointer  data)
static

Internal function to release repo data.

Definition at line 49 of file gsttensor_repo.c.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ gst_tensor_repo_remove_repodata()

gboolean gst_tensor_repo_remove_repodata ( guint  nth)

Remove nth GstTensorRepoData from GstTensorRepo.

Definition at line 357 of file gsttensor_repo.c.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ gst_tensor_repo_set_buffer()

gboolean gst_tensor_repo_set_buffer ( guint  nth,
GstBuffer *  buffer,
GstCaps *  caps 
)

Push GstBuffer into repo.

Definition at line 193 of file gsttensor_repo.c.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ gst_tensor_repo_set_changed()

gboolean gst_tensor_repo_set_changed ( guint  o_nth,
guint  nth,
gboolean  is_sink 
)

Set the changing status of repo.

Definition at line 91 of file gsttensor_repo.c.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ gst_tensor_repo_set_eos()

gboolean gst_tensor_repo_set_eos ( guint  nth)

Set EOS (End-of-Stream) of slot.

Definition at line 287 of file gsttensor_repo.c.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ gst_tensor_repo_wait()

gboolean gst_tensor_repo_wait ( void  )

Wait for finish of initialization.

Wait for the repo initialization.

Definition at line 406 of file gsttensor_repo.c.

Here is the caller graph for this function:

Variable Documentation

◆ _repo

GstTensorRepo _repo = {.num_data = 0,.initialized = FALSE }
static

tensor repo global variable with init.

Definition at line 35 of file gsttensor_repo.c.