Allow Aplpha channel for Bundle (Session Group Source)

This commit is contained in:
Bruno Herbelin
2023-03-12 15:06:50 +01:00
parent bc5e1c7df9
commit 731d7e5d6b
2 changed files with 7 additions and 10 deletions

View File

@@ -181,14 +181,15 @@ void InfoVisitor::visit (SessionGroupSource& s)
uint T = s.session()->numSources();
if (T>N)
oss << " (" << std::to_string(T) << " total)";
oss << std::endl;
if (s.session()->frame()){
if (brief_) {
oss << ", RGB, " << s.session()->frame()->width() << " x " << s.session()->frame()->height();
oss << (s.session()->frame()->flags() & FrameBuffer::FrameBuffer_alpha ? "RGBA, " : "RGB, ");
oss << s.session()->frame()->width() << " x " << s.session()->frame()->height();
}
else {
oss << std::endl;
oss << "RGB" << std::endl;
oss << (s.session()->frame()->flags() & FrameBuffer::FrameBuffer_alpha ? "RGBA" : "RGB") << std::endl;
oss << s.session()->frame()->width() << " x " << s.session()->frame()->height();
}
}

View File

@@ -24,14 +24,10 @@
#include "defines.h"
#include "Log.h"
#include "FrameBuffer.h"
#include "ImageShader.h"
#include "ImageProcessingShader.h"
#include "Resource.h"
#include "Decorations.h"
#include "SearchVisitor.h"
#include "Visitor.h"
#include "Session.h"
#include "SessionCreator.h"
#include "Mixer.h"
#include "SessionSource.h"
@@ -377,7 +373,7 @@ void SessionGroupSource::init()
if ( resolution_.x > 0.f && resolution_.y > 0.f ) {
// valid resolution given to create render view
session_->setResolution( resolution_ );
session_->setResolution( resolution_, true );
// deep update to make sure reordering of sources
++View::need_deep_update_;
@@ -389,7 +385,7 @@ void SessionGroupSource::init()
texturesurface_->setTextureIndex( session_->frame()->texture() );
// create Frame buffer matching size of session
FrameBuffer *renderbuffer = new FrameBuffer( session_->frame()->resolution() );
FrameBuffer *renderbuffer = new FrameBuffer( session_->frame()->resolution(), FrameBuffer::FrameBuffer_alpha );
// set the renderbuffer of the source and attach rendering nodes
attach(renderbuffer);