> add warning about the limited lifetime of MirError
I don't think a warning is enough. The shared error subtly limits the interface to only one screencast in flight at any time. Another example with async requests:
void callback(buffer, error, context)
{
// It's not safe to access error here!
}
We either need to fix the shared error problem so that concurrent requests can work safely, or, alternatively, explicitly disallow concurrent requests (e.g. abort() if detected).
> add warning about the limited lifetime of MirError
I don't think a warning is enough. The shared error subtly limits the interface to only one screencast in flight at any time. Another example with async requests:
void callback(buffer, error, context)
{
// It's not safe to access error here!
}
mir_screencast_ capture_ to_buffer( buffer1, callback); capture_ to_buffer( buffer2, callback);
mir_screencast_
We either need to fix the shared error problem so that concurrent requests can work safely, or, alternatively, explicitly disallow concurrent requests (e.g. abort() if detected).