[vlc-devel] [vlc-commits] chromecast: use vlc_tls_Read() and simplify

Rémi Denis-Courmont remi at remlab.net
Sun Feb 26 16:42:38 CET 2017


Le sunnuntaina 26. helmikuuta 2017, 12.10.03 EET Rémi Denis-Courmont a écrit :
> vlc | branch: master | Rémi Denis-Courmont <remi at remlab.net> | Sun Feb 26
> 13:08:58 2017 +0200| [4a6bd2bda79d26db0837de0bd7a1da040fe0b6c4] |
> committer: Rémi Denis-Courmont
> 
> chromecast: use vlc_tls_Read() and simplify
> 
> No (dys)functional changes.
> 
> > http://git.videolan.org/gitweb.cgi/vlc.git/?a=commit;h=4a6bd2bda79d26db083
> > 7de0bd7a1da040fe0b6c4
> ---
> 
>  .../chromecast/chromecast_communication.cpp        | 44
> ++++++---------------- 1 file changed, 11 insertions(+), 33 deletions(-)
> 
> diff --git a/modules/stream_out/chromecast/chromecast_communication.cpp
> b/modules/stream_out/chromecast/chromecast_communication.cpp index
> 3d0068d..01b60f7 100644
> --- a/modules/stream_out/chromecast/chromecast_communication.cpp
> +++ b/modules/stream_out/chromecast/chromecast_communication.cpp
> @@ -124,7 +124,6 @@ void ChromecastCommunication::buildMessage(const
> std::string & namespace_, */
>  ssize_t ChromecastCommunication::recvPacket( uint8_t *p_data )
>  {
> -    uint32_t i_received = 0;
>      ssize_t i_payloadSize = -1;
>      struct pollfd ufd[1];
>      ufd[0].fd = m_sock_fd;

AFAICT, I did not change the semantics, only delegated a loop to a core 
function and propagated constant values.

Andrien´s original code was not handling TLS buffering correctly, and assumed 
Linux-only thread cancellation semantics. But at least it looked like it was 
trying to receive data with a timeout. I cannot really make sense of the 
current code. 

-- 
雷米‧德尼-库尔蒙
https://www.remlab.net/



More information about the vlc-devel mailing list