[vlc-devel] [PATCH 5/5] chromecast: add an experimental sout module that connects to a ChromeCast device and streams using the HTTP access output

Rémi Denis-Courmont remi at remlab.net
Wed Aug 20 18:29:07 CEST 2014


Le mercredi 20 août 2014, 18:08:56 Adrien Maglo a écrit :
> Hello Rémi,
> 
> 
> Thank you for your review.
> 
> Le 20/08/2014 11:48, Rémi Denis-Courmont a écrit :
> >> +struct sout_stream_sys_t
> >> +{
> >> +    sout_stream_sys_t()
> >> +        : i_received(0), i_status(CHROMECAST_DISCONNECTED),
> >> +          b_threadStarted(false), b_pingSent(false),
> >> +          p_mux(NULL), p_access(NULL)
> >> +    {
> >> +        atomic_init(&ab_error, false);
> >> +    }
> >> +
> >> +    vlc_url_t url;
> >> +    string serverIP;
> >> +
> >> +    int i_sock_fd;
> >> +    vlc_tls_creds_t *p_creds;
> >> +    vlc_tls_t *p_tls;
> >> +
> >> +    vlc_thread_t chromecastThread;
> >> +
> >> +    unsigned i_received;
> >> +    char p_packet[PACKET_MAX_LEN];
> >> +    unsigned i_requestId;
> >> +    string appTransportId;
> >> +
> >> +    queue<CastMessage> messagesToSend;
> >> +
> >> +    int i_status;
> >> +    bool b_threadStarted;
> >> +    bool b_pingSent;
> >> +    atomic_bool ab_error;
> >> +    vlc_mutex_t loadCommandMutex;
> >> +    vlc_cond_t loadCommandCond;
> >> +
> >> +    char *psz_mux;
> >> +    sout_mux_t* p_mux;
> >> +    sout_access_out_t *p_access;
> > 
> > There is the standard output if you want to hook a muxer to an access out.
> 
> Sure, I copied some code from the standard sout. I thought that creating
> a new sout would be a good idea to allow usages such as the one given in
> example in my first mail.

I fail to see what's the point in copying the standard code, while you can 
simply reuse standard underneath.

> > Indeed at least b_threadStarted is always true across entry points, so
> > useless.
> 
> Actually, b_threadStarted is initialized to false by the
> sout_stream_sys_t constructor.

It's always true at the return, therefore it is useless.

-- 
Rémi Denis-Courmont
http://www.remlab.net/




More information about the vlc-devel mailing list