1 /*
2  * This file is part of Wireless Display Software for Linux OS
3  *
4  * Copyright (C) 2014 Intel Corporation.
5  *
6  * Contact: Alexander Kanavin <alex.kanavin@gmail.com>
7  *
8  * This library is free software; you can redistribute it and/or
9  * modify it under the terms of the GNU Lesser General Public
10  * License as published by the Free Software Foundation; either
11  * version 2.1 of the License, or (at your option) any later version.
12  *
13  * This library is distributed in the hope that it will be useful,
14  * but WITHOUT ANY WARRANTY; without even the implied warranty of
15  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
16  * Lesser General Public License for more details.
17  *
18  * You should have received a copy of the GNU Lesser General Public
19  * License along with this library; if not, write to the Free Software
20  * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
21  * 02110-1301 USA
22  */
23 
24 #ifndef MIRAC_GST_TEST_SOURCE_HPP
25 #define MIRAC_GST_TEST_SOURCE_HPP
26 
27 #include <gst/gst.h>
28 
29 enum wfd_test_stream_t {WFD_TEST_AUDIO, WFD_TEST_VIDEO, WFD_TEST_BOTH, WFD_DESKTOP, WFD_UNKNOWN_STREAM};
30 
31 
32 class MiracGstTestSource
33 {
34 public:
35     MiracGstTestSource(wfd_test_stream_t wfd_stream, std::string hostname, int port);
36     ~MiracGstTestSource ();
37 
38     void SetState(GstState state);
39     GstState GetState() const;
40 
41     int UdpSourcePort();
42 
43 private:
44     GstElement* gst_elem;
45     guint bus_watch_id;
46 };
47 
48 #endif
49