NVIDIA DeepStream SDK API Reference

7.0 Release
deepstream_asr_app.h
Go to the documentation of this file.
1 /*
2  * SPDX-FileCopyrightText: Copyright (c) 2020-2022 NVIDIA CORPORATION & AFFILIATES. All rights reserved.
3  * SPDX-License-Identifier: LicenseRef-NvidiaProprietary
4  *
5  * NVIDIA CORPORATION, its affiliates and licensors retain all intellectual
6  * property and proprietary rights in and to this material, related
7  * documentation and any modifications thereto. Any use, reproduction,
8  * disclosure or distribution of this material and related documentation
9  * without an express license agreement from NVIDIA CORPORATION or
10  * its affiliates is strictly prohibited.
11  */
12 
13 #ifndef __DEEPSTREAM_ASR_APP_H_
14 #define __DEEPSTREAM_ASR_APP_H_
15 
16 #include <gst/gst.h>
17 #include <glib.h>
18 #include <stdio.h>
19 #include <stdlib.h>
21 
22 #define CHECK_PTR(ptr) \
23  if(ptr == NULL) \
24  { \
25  return -1; \
26  }
27 
28 typedef struct __StreamCtx
29 {
30  gchar *uri;
31  guint stream_id;
32  guint has_audio;
33  guint bus_id;
34  GstElement *asr_pipeline;
35  int eos_received;
37  FILE *FP_asr;
38 } StreamCtx;
39 
40 typedef struct __AppCtx
41 {
42  guint num_sources;
43  StreamCtx *sctx;
45 } AppCtx;
46 
47 
48 int create_pipeline(AppCtx *appctx, int stream_num, StreamCtx *sctx);
49 int start_pipeline(int stream_num, StreamCtx *sctx);
50 int destroy_pipeline(StreamCtx *sctx);
51 
52 guint get_num_sources (gchar *cfg_file_path);
53 gboolean parse_config_file (AppCtx *appctx, gchar *config_file);
54 
55 G_BEGIN_DECLS
56 
57 guint get_num_sources_yaml (gchar *cfg_file_path);
58 gboolean parse_config_file_yaml (AppCtx *appctx, gchar *config_file);
59 
60 G_END_DECLS
61 #endif
__AppCtx::app_config
NvDsAppConfig app_config
Definition: deepstream_asr_tts_app.h:115
__StreamCtx::asr_pipeline
GstElement * asr_pipeline
Definition: deepstream_asr_tts_app.h:95
AppCtx
REST server application context.
Definition: nvds_appctx_server.h:46
parse_config_file_yaml
gboolean parse_config_file_yaml(AppCtx *appctx, gchar *config_file)
__AppCtx::num_sources
guint num_sources
Definition: deepstream_asr_tts_app.h:104
__StreamCtx::eos_received
int eos_received
Definition: deepstream_asr_tts_app.h:97
deepstream_asr_config_file_parser.h
__StreamCtx::stream_id
guint stream_id
Definition: deepstream_asr_tts_app.h:92
__StreamCtx
Definition: deepstream_asr_tts_app.h:89
start_pipeline
int start_pipeline(int stream_num, StreamCtx *sctx)
get_num_sources_yaml
G_BEGIN_DECLS guint get_num_sources_yaml(gchar *cfg_file_path)
create_pipeline
int create_pipeline(AppCtx *appctx, int stream_num, StreamCtx *sctx)
get_num_sources
guint get_num_sources(gchar *cfg_file_path)
__StreamCtx::FP_asr
FILE * FP_asr
Definition: deepstream_asr_tts_app.h:99
__NvDsAppConfig
Definition: deepstream_asr_tts_config_file_parser.h:26
StreamCtx
struct __StreamCtx StreamCtx
parse_config_file
gboolean parse_config_file(AppCtx *appctx, gchar *config_file)
__StreamCtx::bus_id
guint bus_id
Definition: deepstream_asr_tts_app.h:94
__NvDsAudioConfig
Definition: deepstream_asr_tts_config_file_parser.h:20
__AppCtx::sctx
StreamCtx * sctx
Definition: deepstream_asr_tts_app.h:105
__StreamCtx::audio_config
NvDsAudioConfig audio_config
Definition: deepstream_asr_tts_app.h:98
destroy_pipeline
int destroy_pipeline(StreamCtx *sctx)
__StreamCtx::uri
gchar * uri
Definition: deepstream_asr_tts_app.h:91
AppCtx
struct __AppCtx AppCtx
__StreamCtx::has_audio
guint has_audio
Definition: deepstream_asr_tts_app.h:93
__AppCtx
Definition: deepstream_asr_tts_app.h:102