32{
34
36
37
38
39
40
41
42
43
45
46
47
48
50
51
52
53
54gst_init (&argc, &argv);
55
56 gst->
pipeline = GST_PIPELINE (gst_pipeline_new (
"gnunet-media-helper"));
57
58#ifdef IS_SPEAKER
60 printf ("this is the speaker \n");
61#endif
62#ifdef IS_MIC
64 printf ("this is the microphone \n");
65#endif
67 {
69
73 gst_element_link_many (gnunetsrc,
decoder,
sink, NULL);
74 }
76 {
78
80
82
83 gst_bin_add_many (GST_BIN (gst->
pipeline),
source, encoder, gnunetsink,
84 NULL);
85 gst_element_link_many (
source, encoder, gnunetsink, NULL);
86 }
87
88
89
90
92
93 gst_element_set_state (GST_ELEMENT (gst->
pipeline), GST_STATE_PLAYING);
94
95
96
97
98
99
100
102
103
104
105
107 {
108 GMainLoop *loop;
109 loop = g_main_loop_new (NULL, FALSE);
110
111 g_main_loop_run (loop);
112
113
114
115
116
117
118
119}
121 {
122 while (1)
123 {
124
126 }
127 }
128 g_print ("Returned, stopping playback\n");
129
130
131 gst_element_set_state (GST_ELEMENT (gst->
pipeline), GST_STATE_NULL);
133
134 return 0;
135}
static GstElement * source
Appsrc instance into which we write data for the pipeline.
static GstElement * decoder
static uint32_t type
Type string converted to DNS type value.
void gg_load_configuration(GNUNET_gstData *d)
GstBin * get_app(GNUNET_gstData *d, int type)
void pl_graph(GstElement *pipeline)
void gg_setup_gst_bus(GNUNET_gstData *d)
int gnunet_read(GNUNET_gstData *d)
GstBin * get_coder(GNUNET_gstData *d, int type)
GstBin * get_audiobin(GNUNET_gstData *d, int type)