[vlc-commits] Chromecast: move some code to a header
Steve Lhomme
git at videolan.org
Fri Dec 18 15:38:06 CET 2015
vlc | branch: master | Steve Lhomme <robUx4 at videolabs.io> | Fri Dec 18 12:50:25 2015 +0100| [ed5ea7b2860cab17f45379235d4d2995e5cc4025] | committer: Jean-Baptiste Kempf
Chromecast: move some code to a header
Signed-off-by: Jean-Baptiste Kempf <jb at videolan.org>
> http://git.videolan.org/gitweb.cgi/vlc.git/?a=commit;h=ed5ea7b2860cab17f45379235d4d2995e5cc4025
---
modules/stream_out/chromecast/cast.cpp | 16 ++--------
modules/stream_out/chromecast/chromecast.h | 48 ++++++++++++++++++++++++++++
2 files changed, 50 insertions(+), 14 deletions(-)
diff --git a/modules/stream_out/chromecast/cast.cpp b/modules/stream_out/chromecast/cast.cpp
index b8f2cb9..5fa57bf 100644
--- a/modules/stream_out/chromecast/cast.cpp
+++ b/modules/stream_out/chromecast/cast.cpp
@@ -29,12 +29,12 @@
# include "config.h"
#endif
+#include "chromecast.h"
+
#ifdef HAVE_POLL
# include <poll.h>
#endif
-#include <vlc_common.h>
-#include <vlc_plugin.h>
#include <vlc_sout.h>
#include <vlc_tls.h>
#include <vlc_url.h>
@@ -47,21 +47,9 @@
#include <google/protobuf/io/zero_copy_stream_impl.h>
#include <google/protobuf/io/coded_stream.h>
-#include "cast_channel.pb.h"
#include "../../misc/webservices/json.h"
-// Status
-enum
-{
- CHROMECAST_DISCONNECTED,
- CHROMECAST_TLS_CONNECTED,
- CHROMECAST_AUTHENTICATED,
- CHROMECAST_APP_STARTED,
- CHROMECAST_MEDIA_LOAD_SENT,
- CHROMECAST_CONNECTION_DEAD,
-};
-
#define PACKET_MAX_LEN 10 * 1024
#define PACKET_HEADER_LEN 4
diff --git a/modules/stream_out/chromecast/chromecast.h b/modules/stream_out/chromecast/chromecast.h
new file mode 100644
index 0000000..f1d0a66
--- /dev/null
+++ b/modules/stream_out/chromecast/chromecast.h
@@ -0,0 +1,48 @@
+/*****************************************************************************
+ * chromecast.cpp: Chromecast module for vlc
+ *****************************************************************************
+ * Copyright © 2014-2015 VideoLAN
+ *
+ * Authors: Adrien Maglo <magsoft at videolan.org>
+ * Jean-Baptiste Kempf <jb at videolan.org>
+ * Steve Lhomme <robux4 at videolabs.io>
+ *
+ * This program is free software; you can redistribute it and/or modify it
+ * under the terms of the GNU Lesser General Public License as published by
+ * the Free Software Foundation; either version 2.1 of the License, or
+ * (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public License
+ * along with this program; if not, write to the Free Software Foundation,
+ * Inc., 51 Franklin Street, Fifth Floor, Boston MA 02110-1301, USA.
+ *****************************************************************************/
+
+/*****************************************************************************
+ * Preamble
+ *****************************************************************************/
+
+#ifndef VLC_CHROMECAST_H
+#define VLC_CHROMECAST_H
+
+#include <vlc_common.h>
+#include <vlc_plugin.h>
+
+#include "cast_channel.pb.h"
+
+// Status
+enum
+{
+ CHROMECAST_DISCONNECTED,
+ CHROMECAST_TLS_CONNECTED,
+ CHROMECAST_AUTHENTICATED,
+ CHROMECAST_APP_STARTED,
+ CHROMECAST_MEDIA_LOAD_SENT,
+ CHROMECAST_CONNECTION_DEAD,
+};
+
+#endif /* VLC_CHROMECAST_H */
More information about the vlc-commits
mailing list