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
a459a47b
Commit
a459a47b
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: rename msg methods according to the receiver
Signed-off-by:
Jean-Baptiste Kempf
<
jb@videolan.org
>
parent
7f041788
Changes
3
Show whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
17 additions
and
15 deletions
+17
-15
modules/stream_out/chromecast/cast.cpp
modules/stream_out/chromecast/cast.cpp
+7
-7
modules/stream_out/chromecast/chromecast.h
modules/stream_out/chromecast/chromecast.h
+6
-4
modules/stream_out/chromecast/chromecast_ctrl.cpp
modules/stream_out/chromecast/chromecast_ctrl.cpp
+4
-4
No files found.
modules/stream_out/chromecast/cast.cpp
View file @
a459a47b
...
@@ -314,10 +314,10 @@ static void Close(vlc_object_t *p_this)
...
@@ -314,10 +314,10 @@ static void Close(vlc_object_t *p_this)
case
CHROMECAST_MEDIA_LOAD_SENT
:
case
CHROMECAST_MEDIA_LOAD_SENT
:
case
CHROMECAST_APP_STARTED
:
case
CHROMECAST_APP_STARTED
:
// Generate the close messages.
// Generate the close messages.
p_sys
->
p_intf
->
msgClose
(
p_sys
->
p_intf
->
appTransportId
);
p_sys
->
p_intf
->
msg
Receiver
Close
(
p_sys
->
p_intf
->
appTransportId
);
// ft
// ft
case
CHROMECAST_AUTHENTICATED
:
case
CHROMECAST_AUTHENTICATED
:
p_sys
->
p_intf
->
msgClose
(
"receiver-0"
);
p_sys
->
p_intf
->
msg
Receiver
Close
(
"receiver-0"
);
// Send the just added close messages.
// Send the just added close messages.
sendMessages
(
p_stream
);
sendMessages
(
p_stream
);
// ft
// ft
...
@@ -597,7 +597,7 @@ static int processMessage(sout_stream_t *p_stream, const castchannel::CastMessag
...
@@ -597,7 +597,7 @@ static int processMessage(sout_stream_t *p_stream, const castchannel::CastMessag
vlc_mutex_locker
locker
(
&
p_sys
->
lock
);
vlc_mutex_locker
locker
(
&
p_sys
->
lock
);
p_sys
->
i_status
=
CHROMECAST_AUTHENTICATED
;
p_sys
->
i_status
=
CHROMECAST_AUTHENTICATED
;
p_sys
->
p_intf
->
msgConnect
(
"receiver-0"
);
p_sys
->
p_intf
->
msgConnect
(
"receiver-0"
);
p_sys
->
p_intf
->
msg
Launch
();
p_sys
->
p_intf
->
msg
ReceiverLaunchApp
();
}
}
}
}
else
if
(
namespace_
==
"urn:x-cast:com.google.cast.tp.heartbeat"
)
else
if
(
namespace_
==
"urn:x-cast:com.google.cast.tp.heartbeat"
)
...
@@ -653,7 +653,7 @@ static int processMessage(sout_stream_t *p_stream, const castchannel::CastMessag
...
@@ -653,7 +653,7 @@ static int processMessage(sout_stream_t *p_stream, const castchannel::CastMessag
{
{
p_sys
->
i_status
=
CHROMECAST_APP_STARTED
;
p_sys
->
i_status
=
CHROMECAST_APP_STARTED
;
p_sys
->
p_intf
->
msgConnect
(
p_sys
->
p_intf
->
appTransportId
);
p_sys
->
p_intf
->
msgConnect
(
p_sys
->
p_intf
->
appTransportId
);
p_sys
->
p_intf
->
msgLoad
();
p_sys
->
p_intf
->
msg
Player
Load
();
p_sys
->
i_status
=
CHROMECAST_MEDIA_LOAD_SENT
;
p_sys
->
i_status
=
CHROMECAST_MEDIA_LOAD_SENT
;
vlc_cond_signal
(
&
p_sys
->
loadCommandCond
);
vlc_cond_signal
(
&
p_sys
->
loadCommandCond
);
}
}
...
@@ -666,7 +666,7 @@ static int processMessage(sout_stream_t *p_stream, const castchannel::CastMessag
...
@@ -666,7 +666,7 @@ static int processMessage(sout_stream_t *p_stream, const castchannel::CastMessag
case
CHROMECAST_APP_STARTED
:
case
CHROMECAST_APP_STARTED
:
case
CHROMECAST_MEDIA_LOAD_SENT
:
case
CHROMECAST_MEDIA_LOAD_SENT
:
msg_Warn
(
p_stream
,
"app is no longer present. closing"
);
msg_Warn
(
p_stream
,
"app is no longer present. closing"
);
p_sys
->
p_intf
->
msgClose
(
p_sys
->
p_intf
->
appTransportId
);
p_sys
->
p_intf
->
msg
Receiver
Close
(
p_sys
->
p_intf
->
appTransportId
);
p_sys
->
i_status
=
CHROMECAST_CONNECTION_DEAD
;
p_sys
->
i_status
=
CHROMECAST_CONNECTION_DEAD
;
// ft
// ft
default:
default:
...
@@ -699,7 +699,7 @@ static int processMessage(sout_stream_t *p_stream, const castchannel::CastMessag
...
@@ -699,7 +699,7 @@ static int processMessage(sout_stream_t *p_stream, const castchannel::CastMessag
else
if
(
type
==
"LOAD_FAILED"
)
else
if
(
type
==
"LOAD_FAILED"
)
{
{
msg_Err
(
p_stream
,
"Media load failed"
);
msg_Err
(
p_stream
,
"Media load failed"
);
p_sys
->
p_intf
->
msgClose
(
p_sys
->
p_intf
->
appTransportId
);
p_sys
->
p_intf
->
msg
Receiver
Close
(
p_sys
->
p_intf
->
appTransportId
);
vlc_mutex_lock
(
&
p_sys
->
lock
);
vlc_mutex_lock
(
&
p_sys
->
lock
);
p_sys
->
i_status
=
CHROMECAST_CONNECTION_DEAD
;
p_sys
->
i_status
=
CHROMECAST_CONNECTION_DEAD
;
vlc_mutex_unlock
(
&
p_sys
->
lock
);
vlc_mutex_unlock
(
&
p_sys
->
lock
);
...
@@ -791,7 +791,7 @@ static void* chromecastThread(void* p_data)
...
@@ -791,7 +791,7 @@ static void* chromecastThread(void* p_data)
if
(
b_pingTimeout
)
if
(
b_pingTimeout
)
{
{
p_sys
->
p_intf
->
msgPing
();
p_sys
->
p_intf
->
msgPing
();
p_sys
->
p_intf
->
msgStatus
();
p_sys
->
p_intf
->
msg
ReceiverGet
Status
();
}
}
if
(
b_msgReceived
)
if
(
b_msgReceived
)
...
...
modules/stream_out/chromecast/chromecast.h
View file @
a459a47b
...
@@ -57,13 +57,15 @@ struct intf_sys_t
...
@@ -57,13 +57,15 @@ struct intf_sys_t
std
::
string
appTransportId
;
std
::
string
appTransportId
;
void
msgAuth
();
void
msgAuth
();
void
msgClose
(
std
::
string
destinationId
);
void
msg
Receiver
Close
(
std
::
string
destinationId
);
void
msgPing
();
void
msgPing
();
void
msgPong
();
void
msgPong
();
void
msgConnect
(
std
::
string
destinationId
);
void
msgConnect
(
std
::
string
destinationId
);
void
msgLaunch
();
void
msgLoad
();
void
msgReceiverLaunchApp
();
void
msgStatus
();
void
msgReceiverGetStatus
();
void
msgPlayerLoad
();
std
::
queue
<
castchannel
::
CastMessage
>
messagesToSend
;
std
::
queue
<
castchannel
::
CastMessage
>
messagesToSend
;
unsigned
i_requestId
;
unsigned
i_requestId
;
...
...
modules/stream_out/chromecast/chromecast_ctrl.cpp
View file @
a459a47b
...
@@ -126,7 +126,7 @@ void intf_sys_t::msgConnect(std::string destinationId)
...
@@ -126,7 +126,7 @@ void intf_sys_t::msgConnect(std::string destinationId)
}
}
void
intf_sys_t
::
msgClose
(
std
::
string
destinationId
)
void
intf_sys_t
::
msg
Receiver
Close
(
std
::
string
destinationId
)
{
{
std
::
string
s
(
"{
\"
type
\"
:
\"
CLOSE
\"
}"
);
std
::
string
s
(
"{
\"
type
\"
:
\"
CLOSE
\"
}"
);
castchannel
::
CastMessage
msg
=
buildMessage
(
"urn:x-cast:com.google.cast.tp.connection"
,
castchannel
::
CastMessage
msg
=
buildMessage
(
"urn:x-cast:com.google.cast.tp.connection"
,
...
@@ -135,7 +135,7 @@ void intf_sys_t::msgClose(std::string destinationId)
...
@@ -135,7 +135,7 @@ void intf_sys_t::msgClose(std::string destinationId)
messagesToSend
.
push
(
msg
);
messagesToSend
.
push
(
msg
);
}
}
void
intf_sys_t
::
msgStatus
()
void
intf_sys_t
::
msg
ReceiverGet
Status
()
{
{
std
::
stringstream
ss
;
std
::
stringstream
ss
;
ss
<<
"{
\"
type
\"
:
\"
GET_STATUS
\"
}"
;
ss
<<
"{
\"
type
\"
:
\"
GET_STATUS
\"
}"
;
...
@@ -146,7 +146,7 @@ void intf_sys_t::msgStatus()
...
@@ -146,7 +146,7 @@ void intf_sys_t::msgStatus()
messagesToSend
.
push
(
msg
);
messagesToSend
.
push
(
msg
);
}
}
void
intf_sys_t
::
msg
Launch
()
void
intf_sys_t
::
msg
ReceiverLaunchApp
()
{
{
std
::
stringstream
ss
;
std
::
stringstream
ss
;
ss
<<
"{
\"
type
\"
:
\"
LAUNCH
\"
,"
ss
<<
"{
\"
type
\"
:
\"
LAUNCH
\"
,"
...
@@ -160,7 +160,7 @@ void intf_sys_t::msgLaunch()
...
@@ -160,7 +160,7 @@ void intf_sys_t::msgLaunch()
}
}
void
intf_sys_t
::
msgLoad
()
void
intf_sys_t
::
msg
Player
Load
()
{
{
char
*
psz_mime
=
var_GetNonEmptyString
(
p_stream
,
SOUT_CFG_PREFIX
"mime"
);
char
*
psz_mime
=
var_GetNonEmptyString
(
p_stream
,
SOUT_CFG_PREFIX
"mime"
);
if
(
psz_mime
==
NULL
)
if
(
psz_mime
==
NULL
)
...
...
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