westeros-compositor.cpp
/**
 * WstCompositorSetVpcBridge
 *
 * Specify if the embedded compositor instance should establish a VPC
 * (Video Path Control) bridge with another compositor instance.  A
 * VPC bridge will allow control over video path and positioning to be
 * extended to higher level compositors from a nested ebedded compositor.
 */
WstCompositorSetVpcBridge
Specify if the embedded compositor instance should establish a VPC
(Video Path Control) bridge with another compositor instance.  A
VPC bridge will allow control over video path and positioning to be
extended to higher level compositors from a nested ebedded compositor.
WstCompositorSetVpcBridge Specify if the embedded compositor instance should establish a VPC ( Video Path Control ) bridge with another compositor instance . A VPC bridge will allow control over video path and positioning to be extended to higher level compositors from a nested ebedded compositor .
bool WstCompositorSetVpcBridge( WstCompositor *wctx, char *displayName )
{
   bool result= false;
   if ( wctx && wctx->ctx )
   {
      WstContext *ctx= wctx->ctx;
      if ( wctx->isVirtual )
      {
         sprintf( wctx->lastErrorDetail,
                  "Invalid argument.  Cannot set vpc bridge for virtual embedded compositor" );
         goto exit;
      }
      if ( ctx->running )
      {
         sprintf( wctx->lastErrorDetail,
                  "Bad state.  Cannot set VPC bridge while compositor is running" );
         goto exit;
      }
      if ( !ctx->isEmbedded )
      {
         sprintf( wctx->lastErrorDetail,
                  "Error.  Cannot set VPC bridge on non-embedded compositor" );
         goto exit;
      }
      pthread_mutex_lock( &ctx->mutex );
      ctx->hasVpcBridge= (displayName != 0);
      if ( ctx->hasVpcBridge )
      {
         ctx->nestedDisplayName= strdup(displayName);
      }
      pthread_mutex_unlock( &ctx->mutex );
      result= true;
   }
exit:
   return result;
}
bool WstCompositorSetVpcBridge ( WstCompositor * wctx , char * displayName ) { bool result = false ; if ( wctx && wctx -> ctx ) { WstContext * ctx = wctx -> ctx ; if ( wctx -> isVirtual ) { sprintf ( wctx -> lastErrorDetail , " " ) ; goto exit ; } if ( ctx -> running ) { sprintf ( wctx -> lastErrorDetail , " " ) ; goto exit ; } if ( ! ctx -> isEmbedded ) { sprintf ( wctx -> lastErrorDetail , " " ) ; goto exit ; } pthread_mutex_lock ( & ctx -> mutex ) ; ctx -> hasVpcBridge = ( displayName != 0 ) ; if ( ctx -> hasVpcBridge ) { ctx -> nestedDisplayName = strdup ( displayName ) ; } pthread_mutex_unlock ( & ctx -> mutex ) ; result = true ; } exit : return result ; }
WstCompositorSetVpcBridge
 Specify if the embedded compositor instance should establish a VPC
 (Video Path Control) bridge with another compositor instance.
WstCompositorSetVpcBridge Specify if the embedded compositor instance should establish a VPC ( Video Path Control ) bridge with another compositor instance .