Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
V
vlc
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Redmine
Redmine
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Operations
Operations
Metrics
Environments
Analytics
Analytics
CI / CD
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
videolan
vlc
Commits
a1ea2278
Commit
a1ea2278
authored
Dec 23, 2015
by
Steve Lhomme
Committed by
Jean-Baptiste Kempf
Dec 23, 2015
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
chromecast: the default payload type we send is STRING
Signed-off-by:
Jean-Baptiste Kempf
<
jb@videolan.org
>
parent
0485d346
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
12 additions
and
19 deletions
+12
-19
modules/stream_out/chromecast/chromecast.h
modules/stream_out/chromecast/chromecast.h
+2
-2
modules/stream_out/chromecast/chromecast_ctrl.cpp
modules/stream_out/chromecast/chromecast_ctrl.cpp
+10
-17
No files found.
modules/stream_out/chromecast/chromecast.h
View file @
a1ea2278
...
@@ -115,9 +115,9 @@ private:
...
@@ -115,9 +115,9 @@ private:
int
sendMessage
(
castchannel
::
CastMessage
&
msg
);
int
sendMessage
(
castchannel
::
CastMessage
&
msg
);
void
buildMessage
(
const
std
::
string
&
namespace_
,
void
buildMessage
(
const
std
::
string
&
namespace_
,
castchannel
::
CastMessage_PayloadType
payloadType
,
const
std
::
string
&
payload
,
const
std
::
string
&
payload
,
const
std
::
string
&
destinationId
=
DEFAULT_CHOMECAST_RECEIVER
);
const
std
::
string
&
destinationId
=
DEFAULT_CHOMECAST_RECEIVER
,
castchannel
::
CastMessage_PayloadType
payloadType
=
castchannel
::
CastMessage_PayloadType_STRING
);
enum
connection_status
conn_status
;
enum
connection_status
conn_status
;
...
...
modules/stream_out/chromecast/chromecast_ctrl.cpp
View file @
a1ea2278
...
@@ -53,9 +53,9 @@
...
@@ -53,9 +53,9 @@
* @return the generated CastMessage
* @return the generated CastMessage
*/
*/
void
intf_sys_t
::
buildMessage
(
const
std
::
string
&
namespace_
,
void
intf_sys_t
::
buildMessage
(
const
std
::
string
&
namespace_
,
castchannel
::
CastMessage_PayloadType
payloadType
,
const
std
::
string
&
payload
,
const
std
::
string
&
payload
,
const
std
::
string
&
destinationId
)
const
std
::
string
&
destinationId
,
castchannel
::
CastMessage_PayloadType
payloadType
)
{
{
castchannel
::
CastMessage
msg
;
castchannel
::
CastMessage
msg
;
...
@@ -263,38 +263,34 @@ void intf_sys_t::msgAuth()
...
@@ -263,38 +263,34 @@ void intf_sys_t::msgAuth()
authMessage
.
SerializeToString
(
&
authMessageString
);
authMessage
.
SerializeToString
(
&
authMessageString
);
buildMessage
(
NAMESPACE_DEVICEAUTH
,
buildMessage
(
NAMESPACE_DEVICEAUTH
,
castchannel
::
CastMessage_PayloadType_BINARY
,
authMessageString
);
authMessageString
,
DEFAULT_CHOMECAST_RECEIVER
,
castchannel
::
CastMessage_PayloadType_BINARY
);
}
}
void
intf_sys_t
::
msgPing
()
void
intf_sys_t
::
msgPing
()
{
{
std
::
string
s
(
"{
\"
type
\"
:
\"
PING
\"
}"
);
std
::
string
s
(
"{
\"
type
\"
:
\"
PING
\"
}"
);
buildMessage
(
NAMESPACE_HEARTBEAT
,
buildMessage
(
NAMESPACE_HEARTBEAT
,
s
);
castchannel
::
CastMessage_PayloadType_STRING
,
s
);
}
}
void
intf_sys_t
::
msgPong
()
void
intf_sys_t
::
msgPong
()
{
{
std
::
string
s
(
"{
\"
type
\"
:
\"
PONG
\"
}"
);
std
::
string
s
(
"{
\"
type
\"
:
\"
PONG
\"
}"
);
buildMessage
(
NAMESPACE_HEARTBEAT
,
buildMessage
(
NAMESPACE_HEARTBEAT
,
s
);
castchannel
::
CastMessage_PayloadType_STRING
,
s
);
}
}
void
intf_sys_t
::
msgConnect
(
const
std
::
string
&
destinationId
)
void
intf_sys_t
::
msgConnect
(
const
std
::
string
&
destinationId
)
{
{
std
::
string
s
(
"{
\"
type
\"
:
\"
CONNECT
\"
}"
);
std
::
string
s
(
"{
\"
type
\"
:
\"
CONNECT
\"
}"
);
buildMessage
(
NAMESPACE_CONNECTION
,
buildMessage
(
NAMESPACE_CONNECTION
,
s
,
destinationId
);
castchannel
::
CastMessage_PayloadType_STRING
,
s
,
destinationId
);
}
}
void
intf_sys_t
::
msgReceiverClose
(
std
::
string
destinationId
)
void
intf_sys_t
::
msgReceiverClose
(
std
::
string
destinationId
)
{
{
std
::
string
s
(
"{
\"
type
\"
:
\"
CLOSE
\"
}"
);
std
::
string
s
(
"{
\"
type
\"
:
\"
CLOSE
\"
}"
);
buildMessage
(
NAMESPACE_CONNECTION
,
buildMessage
(
NAMESPACE_CONNECTION
,
s
,
destinationId
);
castchannel
::
CastMessage_PayloadType_STRING
,
s
,
destinationId
);
}
}
void
intf_sys_t
::
msgReceiverGetStatus
()
void
intf_sys_t
::
msgReceiverGetStatus
()
...
@@ -302,8 +298,7 @@ void intf_sys_t::msgReceiverGetStatus()
...
@@ -302,8 +298,7 @@ void intf_sys_t::msgReceiverGetStatus()
std
::
stringstream
ss
;
std
::
stringstream
ss
;
ss
<<
"{
\"
type
\"
:
\"
GET_STATUS
\"
}"
;
ss
<<
"{
\"
type
\"
:
\"
GET_STATUS
\"
}"
;
buildMessage
(
NAMESPACE_RECEIVER
,
buildMessage
(
NAMESPACE_RECEIVER
,
ss
.
str
());
castchannel
::
CastMessage_PayloadType_STRING
,
ss
.
str
());
}
}
void
intf_sys_t
::
msgReceiverLaunchApp
()
void
intf_sys_t
::
msgReceiverLaunchApp
()
...
@@ -313,8 +308,7 @@ void intf_sys_t::msgReceiverLaunchApp()
...
@@ -313,8 +308,7 @@ void intf_sys_t::msgReceiverLaunchApp()
<<
"
\"
appId
\"
:
\"
"
<<
APP_ID
<<
"
\"
,"
<<
"
\"
appId
\"
:
\"
"
<<
APP_ID
<<
"
\"
,"
<<
"
\"
requestId
\"
:"
<<
i_requestId
++
<<
"}"
;
<<
"
\"
requestId
\"
:"
<<
i_requestId
++
<<
"}"
;
buildMessage
(
NAMESPACE_RECEIVER
,
buildMessage
(
NAMESPACE_RECEIVER
,
ss
.
str
());
castchannel
::
CastMessage_PayloadType_STRING
,
ss
.
str
());
}
}
...
@@ -335,8 +329,7 @@ void intf_sys_t::msgPlayerLoad()
...
@@ -335,8 +329,7 @@ void intf_sys_t::msgPlayerLoad()
free
(
psz_mime
);
free
(
psz_mime
);
buildMessage
(
NAMESPACE_MEDIA
,
buildMessage
(
NAMESPACE_MEDIA
,
ss
.
str
(),
appTransportId
);
castchannel
::
CastMessage_PayloadType_STRING
,
ss
.
str
(),
appTransportId
);
}
}
/**
/**
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment