GNUnet  0.10.x
gnunet_gst_def.h
Go to the documentation of this file.
1 /*
2  This file is part of GNUnet.
3  Copyright (C) 2016 GNUnet e.V.
4 
5  GNUnet is free software: you can redistribute it and/or modify it
6  under the terms of the GNU Affero General Public License as published
7  by the Free Software Foundation, either version 3 of the License,
8  or (at your option) any later version.
9 
10  GNUnet is distributed in the hope that it will be useful, but
11  WITHOUT ANY WARRANTY; without even the implied warranty of
12  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
13  Affero General Public License for more details.
14 
15  You should have received a copy of the GNU Affero General Public License
16  along with this program. If not, see <http://www.gnu.org/licenses/>.
17 
18  SPDX-License-Identifier: AGPL3.0-or-later
19 */
26 #include <getopt.h>
27 #include <string.h>
28 #include <stdio.h>
29 #include <ctype.h>
30 #include <stdlib.h>
31 #include <unistd.h>
32 #include <time.h>
33 #include <regex.h>
34 
35 
36 #include "platform.h"
37 #include "gnunet_util_lib.h"
38 #include "gnunet_protocols.h"
39 //#include "gnunet/conversation.h" doesn't get installed
40 #include "conversation.h"
41 #include "gnunet_constants.h"
42 #include "gnunet_core_service.h"
43 #include "gnunet_common.h"
44 
45 /*
46 #include <gst/gst.h>
47 #include <gst/audio/gstaudiobasesrc.h>
48 #include <gst/app/gstappsrc.h>
49 */
50 
51 /* huh
52 #include <glib-2.0/glib.h>
53 
54 #include <gstreamer-1.0/gst/gst.h>
55 #include <gstreamer-1.0/gst/pbutils/pbutils.h>
56 #include <gstreamer-1.0/gst/video/videooverlay.h>
57 #include <gstreamer-1.0/gst/audio/gstaudiobasesrc.h>
58 #include <gstreamer-1.0/gst/app/gstappsrc.h>
59 */
60 
61 #include <gst/gst.h>
62 #include <gst/audio/gstaudiobasesrc.h>
63 #include <gst/app/gstappsrc.h>
64 #include <glib.h>
65 #include <gst/app/gstappsink.h>
66 
67 // sockets
68 #ifndef MINGW
69 #if HAVE_NETINET_IN_H
70 #include <netinet/in.h>
71 #endif
72 #include <sys/socket.h>
73 #include <arpa/inet.h>
74 #include <netdb.h>
75 #endif
76 
77 #include <sys/types.h>
78 #include <fcntl.h>
79 
80 
81 //glib stuff
82 //#include <glib.h>
83 #include <glib-2.0/glib/gprintf.h>
84 //#include <glib-unix.h>
85 
86 // static struct AudioMessage *audio_message;
87 
88 
89 
92  //general
93  GstPipeline *pipeline;
94 
95  // things
98  GstElement *appsrc;
99  GstElement *appsink;
100  //settings
103  int usertp;
104  int pure_ogg;
105  char *jack_pp_in;
106  char *jack_pp_out;
107 };
108 
109 
110 
111 
112 #define DEBUG_READ_PURE_OGG 1
113 #define DEBUG_RECORD_PURE_OGG 1
114 
115 
119 #define MAXLINE 4096
120 
125 #define BUFFER_TIME 1000
126 
131 #define LATENCY_TIME 1000
132 
133 
139 #define OPUS_CHANNELS 1
140 
144 #define MAX_PAYLOAD_SIZE (1024 / OPUS_CHANNELS)
145 
151 #define OPUS_FRAME_SIZE 40
152 
156 #define PACKET_LOSS_PERCENTAGE 1
157 
162 #define INBAND_FEC_MODE 1
163 
168 #define BUFFER_TIME 1000 /* 1ms */
169 
174 #define LATENCY_TIME 1000 /* 1ms */
175 
181 #define OGG_MAX_DELAY 0
182 
188 #define OGG_MAX_PAGE_DELAY 0
189 
190 #define SAMPLING_RATE 48000
191 
192 enum {
198 };
199 
200 enum {
203 };
204 
205 enum {
208 };
209 
210 enum {
213 };
214 
215 enum {
218 };
struct AudioMessage * audio_message
GstPipeline * pipeline
constants for network protocols
Message to transmit the audio (between client and helpers).
Definition: conversation.h:55
Handle to a message stream tokenizer.
Definition: mst.c:43
struct GNUNET_MessageStreamTokenizer * stdin_mst
GstElement * appsrc
GstElement * appsink
commonly used definitions; globals in this file are exempt from the rule that the module name ("commo...