Sayonara Player
PipelineProbes.h
1 /* PipelineProbes.h */
2 
3 /* Copyright (C) 2011-2016 Lucio Carreras
4  *
5  * This file is part of sayonara player
6  *
7  * This program is free software: you can redistribute it and/or modify
8  * it under the terms of the GNU General Public License as published by
9  * the Free Software Foundation, either version 3 of the License, or
10  * (at your option) any later version.
11 
12  * This program is distributed in the hope that it will be useful,
13  * but WITHOUT ANY WARRANTY; without even the implied warranty of
14  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
15  * GNU General Public License for more details.
16 
17  * You should have received a copy of the GNU General Public License
18  * along with this program. If not, see <http://www.gnu.org/licenses/>.
19  */
20 
21 
22 
23 #ifndef PIPELINEPROBES_H
24 #define PIPELINEPROBES_H
25 
26 #include <gst/gst.h>
27 #include <QString>
28 
29 
31 {
32  GstElement* queue=nullptr;
33  GstElement* sink=nullptr;
34  gchar* filename=nullptr;
35 
36  bool active;
37  int probe_id;
38  bool busy;
39  bool has_empty_filename;
40 
42  probe_id=0;
43  busy = false;
44  active = false;
45  has_empty_filename = true;
46  }
47 
49  if(filename){
50  free(filename);
51  filename = nullptr;
52  }
53  }
54 };
55 
56 
57 namespace Probing {
58 
59 
60  GstPadProbeReturn
61  level_probed(GstPad *pad, GstPadProbeInfo *info, gpointer user_data);
62 
63  GstPadProbeReturn
64  spectrum_probed(GstPad *pad, GstPadProbeInfo *info, gpointer user_data);
65 
66  GstPadProbeReturn
67  lame_probed(GstPad *pad, GstPadProbeInfo *info, gpointer user_data);
68 
69  void handle_probe(bool* active, GstElement* queue, gulong* probe_id, GstPadProbeCallback callback);
70 
71 
72  GstPadProbeReturn
73  stream_recorder_probed(GstPad *pad, GstPadProbeInfo *info, gpointer user_data);
74  void handle_stream_recorder_probe(StreamRecorderData* data, GstPadProbeCallback callback);
75 
76 }
77 
78 #endif // PIPELINEPROBES_H
Definition: PipelineProbes.h:30
Definition: PipelineProbes.h:57