RDK Documentation (Open Sourced RDK Components)
ip_out.h
1 /*
2  * If not stated otherwise in this file or this component's Licenses.txt file the
3  * following copyright and licenses apply:
4  *
5  * Copyright 2016 RDK Management
6  *
7  * Licensed under the Apache License, Version 2.0 (the "License");
8  * you may not use this file except in compliance with the License.
9  * You may obtain a copy of the License at
10  *
11  * http://www.apache.org/licenses/LICENSE-2.0
12  *
13  * Unless required by applicable law or agreed to in writing, software
14  * distributed under the License is distributed on an "AS IS" BASIS,
15  * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
16  * See the License for the specific language governing permissions and
17  * limitations under the License.
18 */
19 #ifndef _IP_OUT_H_
20 #define _IP_OUT_H_
21 #include "audio_capture_manager.h"
22 #include <iostream>
23 #include <list>
24 #include <map>
25 #include <fstream>
26 #include <string>
27 
29 {
30  public:
31  typedef enum
32  {
33  EXIT = 0,
34  CODE_MAX
35  } control_code_t;
36 
37  private:
38  std::string m_data_path;
39  int m_listen_fd;
40  int m_write_fd;
41  int m_control_pipe[2];
42  unsigned int m_num_connections;
43  pthread_t m_thread;
44 
45  void process_new_connection();
46 
47  public:
48  ip_out_client(q_mgr * manager);
49  ~ip_out_client();
50  virtual int data_callback(audio_buffer *buf);
51  virtual std::string get_data_path();
52  virtual std::string open_output();
53  virtual void close_output();
54  void worker_thread();
55 };
56 
57 #endif //_IP_OUT_H_
audio_capture_client
Definition: audio_capture_manager.h:219
audio_buffer
Definition: audio_buffer.h:25
q_mgr
Definition: audio_capture_manager.h:70
ip_out_client
Definition: ip_out.h:28