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