video_mixer: fix build and crash, add to image
Change-Id: I3c58538666313e74134fb6f1f5fc0c697b213cca Reviewed-on: https://review.haiku-os.org/c/haiku/+/3033 Reviewed-by: Adrien Destugues <[email protected]> Tested-by: Commit checker robot <[email protected]>
This commit is contained in:
@@ -224,6 +224,7 @@ SYSTEM_ADD_ONS_MEDIA += [ FFilterByBuildFeatures
|
|||||||
opensound.media_addon
|
opensound.media_addon
|
||||||
tone_producer_demo.media_addon
|
tone_producer_demo.media_addon
|
||||||
usb_webcam.media_addon
|
usb_webcam.media_addon
|
||||||
|
video_mixer.media_addon
|
||||||
video_producer_demo.media_addon
|
video_producer_demo.media_addon
|
||||||
video_window_demo.media_addon
|
video_window_demo.media_addon
|
||||||
vst_host.media_addon
|
vst_host.media_addon
|
||||||
|
|||||||
@@ -54,7 +54,7 @@ BufferMixer::Merge(BBuffer *input, BBuffer *output) {
|
|||||||
|
|
||||||
uint8 *source = (uint8 *)input->Data();
|
uint8 *source = (uint8 *)input->Data();
|
||||||
uint8 *destination = (uint8 *)output->Data();
|
uint8 *destination = (uint8 *)output->Data();
|
||||||
uint32 size = input->Header()->size_used / 4;
|
uint32 size = input->Header()->size_used / 4;
|
||||||
uint8 alpha = 0;
|
uint8 alpha = 0;
|
||||||
uint8 c1, c2, c3;
|
uint8 c1, c2, c3;
|
||||||
|
|
||||||
|
|||||||
@@ -13,7 +13,7 @@ for architectureObject in [ MultiArchSubDirSetup ] {
|
|||||||
VideoMixerAddOn.cpp
|
VideoMixerAddOn.cpp
|
||||||
CpuCapabilities.cpp
|
CpuCapabilities.cpp
|
||||||
BufferMixer.cpp
|
BufferMixer.cpp
|
||||||
yuvrgb.nasm
|
# yuvrgb.nasm
|
||||||
: be media [ TargetLibsupc++ ] [ TargetLibstdc++ ]
|
: be media [ TargetLibsupc++ ] [ TargetLibstdc++ ]
|
||||||
;
|
;
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -40,7 +40,7 @@ VideoMixerAddOn::~VideoMixerAddOn()
|
|||||||
VideoMixerAddOn::VideoMixerAddOn(image_id image) :
|
VideoMixerAddOn::VideoMixerAddOn(image_id image) :
|
||||||
BMediaAddOn(image)
|
BMediaAddOn(image)
|
||||||
{
|
{
|
||||||
PRINT("VideoMixerAddOn::VideoMixerAddOn\n");
|
PRINT(("VideoMixerAddOn::VideoMixerAddOn\n"));
|
||||||
refCount = 0;
|
refCount = 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -51,13 +51,13 @@ VideoMixerAddOn::VideoMixerAddOn(image_id image) :
|
|||||||
status_t VideoMixerAddOn::InitCheck(
|
status_t VideoMixerAddOn::InitCheck(
|
||||||
const char **out_failure_text)
|
const char **out_failure_text)
|
||||||
{
|
{
|
||||||
PRINT("VideoMixerAddOn::InitCheck\n");
|
PRINT(("VideoMixerAddOn::InitCheck\n"));
|
||||||
return B_OK;
|
return B_OK;
|
||||||
}
|
}
|
||||||
|
|
||||||
int32 VideoMixerAddOn::CountFlavors()
|
int32 VideoMixerAddOn::CountFlavors()
|
||||||
{
|
{
|
||||||
PRINT("VideoMixerAddOn::CountFlavors\n");
|
PRINT(("VideoMixerAddOn::CountFlavors\n"));
|
||||||
return 1;
|
return 1;
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -65,7 +65,7 @@ status_t VideoMixerAddOn::GetFlavorAt(
|
|||||||
int32 n,
|
int32 n,
|
||||||
const flavor_info **out_info)
|
const flavor_info **out_info)
|
||||||
{
|
{
|
||||||
PRINT("VideoMixerAddOn::GetFlavorAt\n");
|
PRINT(("VideoMixerAddOn::GetFlavorAt\n"));
|
||||||
if (n != 0) {
|
if (n != 0) {
|
||||||
fprintf(stderr,"<- B_BAD_INDEX\n");
|
fprintf(stderr,"<- B_BAD_INDEX\n");
|
||||||
return B_BAD_INDEX;
|
return B_BAD_INDEX;
|
||||||
@@ -81,22 +81,22 @@ BMediaNode * VideoMixerAddOn::InstantiateNodeFor(
|
|||||||
BMessage * config,
|
BMessage * config,
|
||||||
status_t * out_error)
|
status_t * out_error)
|
||||||
{
|
{
|
||||||
PRINT("VideoMixerAddOn::InstantiateNodeFor\n");
|
PRINT(("VideoMixerAddOn::InstantiateNodeFor\n"));
|
||||||
VideoMixerNode *node = new VideoMixerNode(info, config, this);
|
VideoMixerNode *node = new VideoMixerNode(info, config, this);
|
||||||
if (node == NULL) {
|
if (node == NULL) {
|
||||||
*out_error = B_NO_MEMORY;
|
*out_error = B_NO_MEMORY;
|
||||||
fprintf(stderr,"<- B_NO_MEMORY\n");
|
fprintf(stderr,"<- B_NO_MEMORY\n");
|
||||||
} else {
|
} else {
|
||||||
*out_error = node->InitCheck();
|
*out_error = node->InitCheck();
|
||||||
}
|
}
|
||||||
return node;
|
return node;
|
||||||
}
|
}
|
||||||
|
|
||||||
status_t VideoMixerAddOn::GetConfigurationFor(
|
status_t VideoMixerAddOn::GetConfigurationFor(
|
||||||
BMediaNode * your_node,
|
BMediaNode * your_node,
|
||||||
BMessage * into_message)
|
BMessage * into_message)
|
||||||
{
|
{
|
||||||
PRINT("VideoMixerAddOn::GetConfigurationFor\n");
|
PRINT(("VideoMixerAddOn::GetConfigurationFor\n"));
|
||||||
VideoMixerNode *node = dynamic_cast<VideoMixerNode *>(your_node);
|
VideoMixerNode *node = dynamic_cast<VideoMixerNode *>(your_node);
|
||||||
if (node == NULL) {
|
if (node == NULL) {
|
||||||
fprintf(stderr,"<- B_BAD_TYPE\n");
|
fprintf(stderr,"<- B_BAD_TYPE\n");
|
||||||
@@ -107,7 +107,7 @@ status_t VideoMixerAddOn::GetConfigurationFor(
|
|||||||
|
|
||||||
bool VideoMixerAddOn::WantsAutoStart()
|
bool VideoMixerAddOn::WantsAutoStart()
|
||||||
{
|
{
|
||||||
PRINT("VideoMixerAddOn::WantsAutoStart\n");
|
PRINT(("VideoMixerAddOn::WantsAutoStart\n"));
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -117,7 +117,7 @@ status_t VideoMixerAddOn::AutoStart(
|
|||||||
int32 *out_internal_id,
|
int32 *out_internal_id,
|
||||||
bool *out_has_more)
|
bool *out_has_more)
|
||||||
{
|
{
|
||||||
PRINT("VideoMixerAddOn::AutoStart\n");
|
PRINT(("VideoMixerAddOn::AutoStart\n"));
|
||||||
return B_OK;
|
return B_OK;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -25,7 +25,7 @@ using std::vector;
|
|||||||
|
|
||||||
VideoMixerNode::~VideoMixerNode(void)
|
VideoMixerNode::~VideoMixerNode(void)
|
||||||
{
|
{
|
||||||
fprintf(stderr,"VideoMixerNode::~VideoMixerNode\n");
|
fprintf(stderr, "VideoMixerNode::~VideoMixerNode\n");
|
||||||
// Stop the BMediaEventLooper thread
|
// Stop the BMediaEventLooper thread
|
||||||
Quit();
|
Quit();
|
||||||
}
|
}
|
||||||
@@ -39,7 +39,7 @@ VideoMixerNode::VideoMixerNode(
|
|||||||
BBufferProducer(B_MEDIA_RAW_VIDEO), // Raw video buffers out
|
BBufferProducer(B_MEDIA_RAW_VIDEO), // Raw video buffers out
|
||||||
BMediaEventLooper()
|
BMediaEventLooper()
|
||||||
{
|
{
|
||||||
fprintf(stderr,"VideoMixerNode::VideoMixerNode\n");
|
fprintf(stderr, "VideoMixerNode::VideoMixerNode\n");
|
||||||
// keep our creator around for AddOn calls later
|
// keep our creator around for AddOn calls later
|
||||||
fAddOn = addOn;
|
fAddOn = addOn;
|
||||||
// NULL out our latency estimates
|
// NULL out our latency estimates
|
||||||
@@ -65,7 +65,7 @@ VideoMixerNode::VideoMixerNode(
|
|||||||
|
|
||||||
void VideoMixerNode::NodeRegistered(void)
|
void VideoMixerNode::NodeRegistered(void)
|
||||||
{
|
{
|
||||||
fprintf(stderr,"VideoMixerNode::NodeRegistered\n");
|
fprintf(stderr, "VideoMixerNode::NodeRegistered\n");
|
||||||
|
|
||||||
// for every node created so far set to this Node;
|
// for every node created so far set to this Node;
|
||||||
for (uint32 i=0;i<fConnectedInputs.size();i++) {
|
for (uint32 i=0;i<fConnectedInputs.size();i++) {
|
||||||
@@ -93,8 +93,8 @@ VideoMixerNode::CreateInput(uint32 inputID) {
|
|||||||
ClearInput(input);
|
ClearInput(input);
|
||||||
|
|
||||||
// don't overwrite available space, and be sure to terminate
|
// don't overwrite available space, and be sure to terminate
|
||||||
sprintf(input->name, "VideoMixer Input %ld", inputID);
|
sprintf(input->name, "VideoMixer Input %" B_PRIu32, inputID);
|
||||||
|
|
||||||
return input;
|
return input;
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -154,14 +154,14 @@ VideoMixerNode::GetInput(const int32 id) {
|
|||||||
|
|
||||||
status_t VideoMixerNode::InitCheck(void) const
|
status_t VideoMixerNode::InitCheck(void) const
|
||||||
{
|
{
|
||||||
fprintf(stderr,"VideoMixerNode::InitCheck\n");
|
fprintf(stderr, "VideoMixerNode::InitCheck\n");
|
||||||
return fInitCheckStatus;
|
return fInitCheckStatus;
|
||||||
}
|
}
|
||||||
|
|
||||||
status_t VideoMixerNode::GetConfigurationFor(
|
status_t VideoMixerNode::GetConfigurationFor(
|
||||||
BMessage *into_message)
|
BMessage *into_message)
|
||||||
{
|
{
|
||||||
fprintf(stderr,"VideoMixerNode::GetConfigurationFor\n");
|
fprintf(stderr, "VideoMixerNode::GetConfigurationFor\n");
|
||||||
return B_OK;
|
return B_OK;
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -172,7 +172,7 @@ status_t VideoMixerNode::GetConfigurationFor(
|
|||||||
BMediaAddOn *VideoMixerNode::AddOn(
|
BMediaAddOn *VideoMixerNode::AddOn(
|
||||||
int32 *internal_id) const
|
int32 *internal_id) const
|
||||||
{
|
{
|
||||||
fprintf(stderr,"VideoMixerNode::AddOn\n");
|
fprintf(stderr, "VideoMixerNode::AddOn\n");
|
||||||
// BeBook says this only gets called if we were in an add-on.
|
// BeBook says this only gets called if we were in an add-on.
|
||||||
if (fAddOn != NULL) {
|
if (fAddOn != NULL) {
|
||||||
// If we get a null pointer then we just won't write.
|
// If we get a null pointer then we just won't write.
|
||||||
@@ -185,7 +185,7 @@ BMediaAddOn *VideoMixerNode::AddOn(
|
|||||||
|
|
||||||
void VideoMixerNode::Start(bigtime_t performance_time)
|
void VideoMixerNode::Start(bigtime_t performance_time)
|
||||||
{
|
{
|
||||||
fprintf(stderr,"VideoMixerNode::Start(pt=%lld)\n", performance_time);
|
fprintf(stderr, "VideoMixerNode::Start(pt=%" B_PRIdBIGTIME ")\n", performance_time);
|
||||||
BMediaEventLooper::Start(performance_time);
|
BMediaEventLooper::Start(performance_time);
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -194,9 +194,11 @@ void VideoMixerNode::Stop(
|
|||||||
bool immediate)
|
bool immediate)
|
||||||
{
|
{
|
||||||
if (immediate) {
|
if (immediate) {
|
||||||
fprintf(stderr,"VideoMixerNode::Stop(pt=%lld,<immediate>)\n", performance_time);
|
fprintf(stderr, "VideoMixerNode::Stop(pt=%" B_PRIdBIGTIME ",<immediate>)\n",
|
||||||
|
performance_time);
|
||||||
} else {
|
} else {
|
||||||
fprintf(stderr,"VideoMixerNode::Stop(pt=%lld,<scheduled>)\n", performance_time);
|
fprintf(stderr, "VideoMixerNode::Stop(pt=%" B_PRIdBIGTIME ",<scheduled>)\n",
|
||||||
|
performance_time);
|
||||||
}
|
}
|
||||||
BMediaEventLooper::Stop(performance_time, immediate);
|
BMediaEventLooper::Stop(performance_time, immediate);
|
||||||
}
|
}
|
||||||
@@ -205,13 +207,14 @@ void VideoMixerNode::Seek(
|
|||||||
bigtime_t media_time,
|
bigtime_t media_time,
|
||||||
bigtime_t performance_time)
|
bigtime_t performance_time)
|
||||||
{
|
{
|
||||||
fprintf(stderr,"VideoMixerNode::Seek(mt=%lld,pt=%lld)\n", media_time,performance_time);
|
fprintf(stderr, "VideoMixerNode::Seek(mt=%" B_PRIdBIGTIME ",pt=%" B_PRIdBIGTIME ")\n",
|
||||||
|
media_time, performance_time);
|
||||||
BMediaEventLooper::Seek(media_time, performance_time);
|
BMediaEventLooper::Seek(media_time, performance_time);
|
||||||
}
|
}
|
||||||
|
|
||||||
void VideoMixerNode::SetRunMode(run_mode mode)
|
void VideoMixerNode::SetRunMode(run_mode mode)
|
||||||
{
|
{
|
||||||
fprintf(stderr,"VideoMixerNode::SetRunMode(%i)\n", mode);
|
fprintf(stderr, "VideoMixerNode::SetRunMode(%i)\n", mode);
|
||||||
BMediaEventLooper::SetRunMode(mode);
|
BMediaEventLooper::SetRunMode(mode);
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -219,20 +222,21 @@ void VideoMixerNode::TimeWarp(
|
|||||||
bigtime_t at_real_time,
|
bigtime_t at_real_time,
|
||||||
bigtime_t to_performance_time)
|
bigtime_t to_performance_time)
|
||||||
{
|
{
|
||||||
fprintf(stderr,"VideoMixerNode::TimeWarp(rt=%lld,pt=%lld)\n", at_real_time, to_performance_time);
|
fprintf(stderr, "VideoMixerNode::TimeWarp(rt=%" B_PRIdBIGTIME ",pt=%" B_PRIdBIGTIME ")\n",
|
||||||
|
at_real_time, to_performance_time);
|
||||||
BMediaEventLooper::TimeWarp(at_real_time, to_performance_time);
|
BMediaEventLooper::TimeWarp(at_real_time, to_performance_time);
|
||||||
}
|
}
|
||||||
|
|
||||||
void VideoMixerNode::Preroll(void)
|
void VideoMixerNode::Preroll(void)
|
||||||
{
|
{
|
||||||
fprintf(stderr,"VideoMixerNode::Preroll\n");
|
fprintf(stderr, "VideoMixerNode::Preroll\n");
|
||||||
// XXX:Performance opportunity
|
// XXX:Performance opportunity
|
||||||
BMediaNode::Preroll();
|
BMediaNode::Preroll();
|
||||||
}
|
}
|
||||||
|
|
||||||
void VideoMixerNode::SetTimeSource(BTimeSource *time_source)
|
void VideoMixerNode::SetTimeSource(BTimeSource *time_source)
|
||||||
{
|
{
|
||||||
fprintf(stderr,"VideoMixerNode::SetTimeSource\n");
|
fprintf(stderr, "VideoMixerNode::SetTimeSource\n");
|
||||||
BMediaNode::SetTimeSource(time_source);
|
BMediaNode::SetTimeSource(time_source);
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -241,7 +245,7 @@ status_t VideoMixerNode::HandleMessage(
|
|||||||
const void *data,
|
const void *data,
|
||||||
size_t size)
|
size_t size)
|
||||||
{
|
{
|
||||||
fprintf(stderr,"VideoMixerNode::HandleMessage\n");
|
fprintf(stderr, "VideoMixerNode::HandleMessage\n");
|
||||||
status_t status = B_OK;
|
status_t status = B_OK;
|
||||||
switch (message) {
|
switch (message) {
|
||||||
// no special messages for now
|
// no special messages for now
|
||||||
@@ -267,13 +271,13 @@ status_t VideoMixerNode::HandleMessage(
|
|||||||
|
|
||||||
status_t VideoMixerNode::RequestCompleted(const media_request_info &info)
|
status_t VideoMixerNode::RequestCompleted(const media_request_info &info)
|
||||||
{
|
{
|
||||||
fprintf(stderr,"VideoMixerNode::RequestCompleted\n");
|
fprintf(stderr, "VideoMixerNode::RequestCompleted\n");
|
||||||
return BMediaNode::RequestCompleted(info);
|
return BMediaNode::RequestCompleted(info);
|
||||||
}
|
}
|
||||||
|
|
||||||
status_t VideoMixerNode::DeleteHook(BMediaNode *node)
|
status_t VideoMixerNode::DeleteHook(BMediaNode *node)
|
||||||
{
|
{
|
||||||
fprintf(stderr,"VideoMixerNode::DeleteHook\n");
|
fprintf(stderr, "VideoMixerNode::DeleteHook\n");
|
||||||
return BMediaEventLooper::DeleteHook(node);
|
return BMediaEventLooper::DeleteHook(node);
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -281,7 +285,7 @@ status_t VideoMixerNode::GetNodeAttributes(
|
|||||||
media_node_attribute *outAttributes,
|
media_node_attribute *outAttributes,
|
||||||
size_t inMaxCount)
|
size_t inMaxCount)
|
||||||
{
|
{
|
||||||
fprintf(stderr,"VideoMixerNode::GetNodeAttributes\n");
|
fprintf(stderr, "VideoMixerNode::GetNodeAttributes\n");
|
||||||
return BMediaNode::GetNodeAttributes(outAttributes, inMaxCount);
|
return BMediaNode::GetNodeAttributes(outAttributes, inMaxCount);
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -289,7 +293,7 @@ status_t VideoMixerNode::AddTimer(
|
|||||||
bigtime_t at_performance_time,
|
bigtime_t at_performance_time,
|
||||||
int32 cookie)
|
int32 cookie)
|
||||||
{
|
{
|
||||||
fprintf(stderr,"VideoMixerNode::AddTimer\n");
|
fprintf(stderr, "VideoMixerNode::AddTimer\n");
|
||||||
return BMediaEventLooper::AddTimer(at_performance_time, cookie);
|
return BMediaEventLooper::AddTimer(at_performance_time, cookie);
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -301,12 +305,12 @@ status_t VideoMixerNode::AddTimer(
|
|||||||
|
|
||||||
void VideoMixerNode::GetFlavor(flavor_info *outInfo, int32 id)
|
void VideoMixerNode::GetFlavor(flavor_info *outInfo, int32 id)
|
||||||
{
|
{
|
||||||
fprintf(stderr,"VideoMixerNode::GetFlavor\n");
|
fprintf(stderr, "VideoMixerNode::GetFlavor\n");
|
||||||
|
|
||||||
if (outInfo != NULL) {
|
if (outInfo != NULL) {
|
||||||
outInfo->internal_id = id;
|
outInfo->internal_id = id;
|
||||||
strcpy(outInfo->name, "Haiku VideoMixer");
|
outInfo->name = strdup("Haiku VideoMixer");
|
||||||
strcpy(outInfo->info, "A VideoMixerNode node mixes multiple video"
|
outInfo->info = strdup("A VideoMixerNode node mixes multiple video"
|
||||||
" streams into a single stream.");
|
" streams into a single stream.");
|
||||||
outInfo->kinds = B_BUFFER_CONSUMER | B_BUFFER_PRODUCER;
|
outInfo->kinds = B_BUFFER_CONSUMER | B_BUFFER_PRODUCER;
|
||||||
outInfo->flavor_flags = B_FLAVOR_IS_LOCAL;
|
outInfo->flavor_flags = B_FLAVOR_IS_LOCAL;
|
||||||
@@ -324,7 +328,7 @@ void VideoMixerNode::GetFlavor(flavor_info *outInfo, int32 id)
|
|||||||
|
|
||||||
void VideoMixerNode::GetInputFormat(media_format *outFormat)
|
void VideoMixerNode::GetInputFormat(media_format *outFormat)
|
||||||
{
|
{
|
||||||
fprintf(stderr,"VideoMixerNode::GetInputFormat\n");
|
fprintf(stderr, "VideoMixerNode::GetInputFormat\n");
|
||||||
|
|
||||||
if (outFormat != NULL) {
|
if (outFormat != NULL) {
|
||||||
outFormat->type = B_MEDIA_RAW_VIDEO;
|
outFormat->type = B_MEDIA_RAW_VIDEO;
|
||||||
@@ -336,7 +340,7 @@ void VideoMixerNode::GetInputFormat(media_format *outFormat)
|
|||||||
|
|
||||||
void VideoMixerNode::GetOutputFormat(media_format *outFormat)
|
void VideoMixerNode::GetOutputFormat(media_format *outFormat)
|
||||||
{
|
{
|
||||||
fprintf(stderr,"VideoMixerNode::GetOutputFormat\n");
|
fprintf(stderr, "VideoMixerNode::GetOutputFormat\n");
|
||||||
if (outFormat != NULL) {
|
if (outFormat != NULL) {
|
||||||
outFormat->type = B_MEDIA_RAW_VIDEO;
|
outFormat->type = B_MEDIA_RAW_VIDEO;
|
||||||
outFormat->require_flags = B_MEDIA_MAUI_UNDEFINED_FLAGS;
|
outFormat->require_flags = B_MEDIA_MAUI_UNDEFINED_FLAGS;
|
||||||
@@ -349,6 +353,6 @@ void VideoMixerNode::GetOutputFormat(media_format *outFormat)
|
|||||||
|
|
||||||
status_t VideoMixerNode::AddRequirements(media_format *format)
|
status_t VideoMixerNode::AddRequirements(media_format *format)
|
||||||
{
|
{
|
||||||
fprintf(stderr,"VideoMixerNode::AddRequirements\n");
|
fprintf(stderr, "VideoMixerNode::AddRequirements\n");
|
||||||
return B_OK;
|
return B_OK;
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -38,21 +38,21 @@ status_t VideoMixerNode::AcceptFormat(
|
|||||||
|
|
||||||
AddRequirements(format);
|
AddRequirements(format);
|
||||||
|
|
||||||
return B_OK;
|
return B_OK;
|
||||||
}
|
}
|
||||||
|
|
||||||
status_t VideoMixerNode::GetNextInput(
|
status_t VideoMixerNode::GetNextInput(
|
||||||
int32 *cookie,
|
int32 *cookie,
|
||||||
media_input *out_input)
|
media_input *out_input)
|
||||||
{
|
{
|
||||||
fprintf(stderr,"VideoMixerNode(BBufferConsumer)::GetNextInput (%ld)\n",*cookie);
|
fprintf(stderr, "VideoMixerNode(BBufferConsumer)::GetNextInput (%" B_PRId32 ")\n", *cookie);
|
||||||
|
|
||||||
// Cookie 0 is the connecting input, all others are connected inputs
|
// Cookie 0 is the connecting input, all others are connected inputs
|
||||||
if (uint32(*cookie) == fConnectedInputs.size()) {
|
if (uint32(*cookie) == fConnectedInputs.size()) {
|
||||||
*out_input = fInitialInput;
|
*out_input = fInitialInput;
|
||||||
} else {
|
} else {
|
||||||
out_input = GetInput(*cookie);
|
out_input = GetInput(*cookie);
|
||||||
|
|
||||||
if (out_input == NULL) {
|
if (out_input == NULL) {
|
||||||
fprintf(stderr,"<- B_ERROR (no more inputs)\n");
|
fprintf(stderr,"<- B_ERROR (no more inputs)\n");
|
||||||
return B_ERROR;
|
return B_ERROR;
|
||||||
@@ -168,17 +168,17 @@ status_t VideoMixerNode::Connected(
|
|||||||
|
|
||||||
// compute the latency or just guess
|
// compute the latency or just guess
|
||||||
fInternalLatency = 500; // just a guess
|
fInternalLatency = 500; // just a guess
|
||||||
fprintf(stderr," internal latency guessed = %lld\n", fInternalLatency);
|
fprintf(stderr, " internal latency guessed = %" B_PRIdBIGTIME "\n", fInternalLatency);
|
||||||
|
|
||||||
SetEventLatency(fInternalLatency);
|
SetEventLatency(fInternalLatency);
|
||||||
|
|
||||||
// record the agreed upon values
|
// record the agreed upon values
|
||||||
input->destination = where;
|
input->destination = where;
|
||||||
input->source = producer;
|
input->source = producer;
|
||||||
input->format = with_format;
|
input->format = with_format;
|
||||||
|
|
||||||
*out_input = *input;
|
*out_input = *input;
|
||||||
|
|
||||||
// Reset the Initial Input
|
// Reset the Initial Input
|
||||||
ClearInput(&fInitialInput);
|
ClearInput(&fInitialInput);
|
||||||
fInitialInput.destination.id = fConnectedInputs.size();
|
fInitialInput.destination.id = fConnectedInputs.size();
|
||||||
|
|||||||
@@ -49,7 +49,7 @@ void VideoMixerNode::HandleEvent(
|
|||||||
HandleParameter(event,lateness,realTimeEvent);
|
HandleParameter(event,lateness,realTimeEvent);
|
||||||
break;
|
break;
|
||||||
default:
|
default:
|
||||||
fprintf(stderr," unknown event type: %ld\n",event->type);
|
fprintf(stderr, " unknown event type: %" B_PRId32 "\n", event->type);
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -60,12 +60,12 @@ void VideoMixerNode::CleanUpEvent(
|
|||||||
{
|
{
|
||||||
BMediaEventLooper::CleanUpEvent(event);
|
BMediaEventLooper::CleanUpEvent(event);
|
||||||
}
|
}
|
||||||
|
|
||||||
/* called from Offline mode to determine the current time of the node */
|
/* called from Offline mode to determine the current time of the node */
|
||||||
/* update your internal information whenever it changes */
|
/* update your internal information whenever it changes */
|
||||||
bigtime_t VideoMixerNode::OfflineTime()
|
bigtime_t VideoMixerNode::OfflineTime()
|
||||||
{
|
{
|
||||||
fprintf(stderr,"VideoMixerNode(BMediaEventLooper)::OfflineTime\n");
|
fprintf(stderr, "VideoMixerNode(BMediaEventLooper)::OfflineTime\n");
|
||||||
return BMediaEventLooper::OfflineTime();
|
return BMediaEventLooper::OfflineTime();
|
||||||
// XXX: do something else?
|
// XXX: do something else?
|
||||||
}
|
}
|
||||||
@@ -85,7 +85,7 @@ status_t VideoMixerNode::HandleStart(
|
|||||||
bigtime_t lateness,
|
bigtime_t lateness,
|
||||||
bool realTimeEvent)
|
bool realTimeEvent)
|
||||||
{
|
{
|
||||||
fprintf(stderr,"VideoMixerNode(BMediaEventLooper)::HandleStart()\n");
|
fprintf(stderr, "VideoMixerNode(BMediaEventLooper)::HandleStart()\n");
|
||||||
if (RunState() != B_STARTED) {
|
if (RunState() != B_STARTED) {
|
||||||
media_timed_event firstBufferEvent(event->event_time, BTimedEventQueue::B_HANDLE_BUFFER);
|
media_timed_event firstBufferEvent(event->event_time, BTimedEventQueue::B_HANDLE_BUFFER);
|
||||||
HandleEvent(&firstBufferEvent, 0, false);
|
HandleEvent(&firstBufferEvent, 0, false);
|
||||||
@@ -99,16 +99,17 @@ status_t VideoMixerNode::HandleSeek(
|
|||||||
bigtime_t lateness,
|
bigtime_t lateness,
|
||||||
bool realTimeEvent)
|
bool realTimeEvent)
|
||||||
{
|
{
|
||||||
fprintf(stderr,"VideoMixerNode(BMediaEventLooper)::HandleSeek(t=%lld,d=%ld,bd=%lld)\n",event->event_time, event->data, event->bigdata);
|
fprintf(stderr, "VideoMixerNode(BMediaEventLooper)::HandleSeek(t=%" B_PRIdBIGTIME ",d=%"
|
||||||
|
B_PRId32 ",bd=%" B_PRId64 ")\n", event->event_time, event->data, event->bigdata);
|
||||||
return B_OK;
|
return B_OK;
|
||||||
}
|
}
|
||||||
|
|
||||||
status_t VideoMixerNode::HandleWarp(
|
status_t VideoMixerNode::HandleWarp(
|
||||||
const media_timed_event *event,
|
const media_timed_event *event,
|
||||||
bigtime_t lateness,
|
bigtime_t lateness,
|
||||||
bool realTimeEvent)
|
bool realTimeEvent)
|
||||||
{
|
{
|
||||||
fprintf(stderr,"VideoMixerNode(BMediaEventLooper)::HandleWarp\n");
|
fprintf(stderr, "VideoMixerNode(BMediaEventLooper)::HandleWarp\n");
|
||||||
return B_OK;
|
return B_OK;
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -117,9 +118,10 @@ status_t VideoMixerNode::HandleStop(
|
|||||||
bigtime_t lateness,
|
bigtime_t lateness,
|
||||||
bool realTimeEvent)
|
bool realTimeEvent)
|
||||||
{
|
{
|
||||||
fprintf(stderr,"VideoMixerNode(BMediaEventLooper)::HandleStop\n");
|
fprintf(stderr, "VideoMixerNode(BMediaEventLooper)::HandleStop\n");
|
||||||
// flush the queue so downstreamers don't get any more
|
// flush the queue so downstreamers don't get any more
|
||||||
EventQueue()->FlushEvents(0, BTimedEventQueue::B_ALWAYS, true, BTimedEventQueue::B_HANDLE_BUFFER);
|
EventQueue()->FlushEvents(0, BTimedEventQueue::B_ALWAYS, true,
|
||||||
|
BTimedEventQueue::B_HANDLE_BUFFER);
|
||||||
return B_OK;
|
return B_OK;
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -127,27 +129,27 @@ status_t VideoMixerNode::HandleBuffer(
|
|||||||
const media_timed_event *event,
|
const media_timed_event *event,
|
||||||
bigtime_t lateness,
|
bigtime_t lateness,
|
||||||
bool realTimeEvent)
|
bool realTimeEvent)
|
||||||
{
|
{
|
||||||
if (event->type != BTimedEventQueue::B_HANDLE_BUFFER) {
|
if (event->type != BTimedEventQueue::B_HANDLE_BUFFER) {
|
||||||
fprintf(stderr,"HandleBuffer called on non buffer event type\n");
|
fprintf(stderr, "HandleBuffer called on non buffer event type\n");
|
||||||
return B_BAD_VALUE;
|
return B_BAD_VALUE;
|
||||||
}
|
}
|
||||||
|
|
||||||
BBuffer *buffer = const_cast<BBuffer*>((BBuffer*)event->pointer);
|
BBuffer *buffer = const_cast<BBuffer*>((BBuffer*)event->pointer);
|
||||||
if (buffer == NULL) {
|
if (buffer == NULL) {
|
||||||
fprintf(stderr,"NO BUFFER PASSED\n");
|
fprintf(stderr, "NO BUFFER PASSED\n");
|
||||||
return B_BAD_VALUE;
|
return B_BAD_VALUE;
|
||||||
}
|
}
|
||||||
|
|
||||||
media_input *input = GetInput(buffer->Header()->destination);
|
media_input *input = GetInput(buffer->Header()->destination);
|
||||||
|
|
||||||
if (input == NULL) {
|
if (input == NULL) {
|
||||||
fprintf(stderr,"<- B_MEDIA_BAD_DESTINATION\n");
|
fprintf(stderr, "<- B_MEDIA_BAD_DESTINATION\n");
|
||||||
return B_MEDIA_BAD_DESTINATION;
|
return B_MEDIA_BAD_DESTINATION;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (fOutput.format.u.raw_video == media_raw_video_format::wildcard) {
|
if (fOutput.format.u.raw_video == media_raw_video_format::wildcard) {
|
||||||
fprintf(stderr,"<- B_MEDIA_NOT_CONNECTED\n");
|
fprintf(stderr, "<- B_MEDIA_NOT_CONNECTED\n");
|
||||||
return B_MEDIA_NOT_CONNECTED;
|
return B_MEDIA_NOT_CONNECTED;
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -170,7 +172,7 @@ status_t VideoMixerNode::HandleDataStatus(
|
|||||||
bigtime_t lateness,
|
bigtime_t lateness,
|
||||||
bool realTimeEvent)
|
bool realTimeEvent)
|
||||||
{
|
{
|
||||||
fprintf(stderr,"VideoMixerNode(BMediaEventLooper)::HandleDataStatus");
|
fprintf(stderr, "VideoMixerNode(BMediaEventLooper)::HandleDataStatus");
|
||||||
SendDataStatus(event->data, fOutput.destination, event->event_time);
|
SendDataStatus(event->data, fOutput.destination, event->event_time);
|
||||||
return B_OK;
|
return B_OK;
|
||||||
}
|
}
|
||||||
@@ -180,6 +182,6 @@ status_t VideoMixerNode::HandleParameter(
|
|||||||
bigtime_t lateness,
|
bigtime_t lateness,
|
||||||
bool realTimeEvent)
|
bool realTimeEvent)
|
||||||
{
|
{
|
||||||
fprintf(stderr,"VideoMixerNode(BMediaEventLooper)::HandleParameter");
|
fprintf(stderr, "VideoMixerNode(BMediaEventLooper)::HandleParameter");
|
||||||
return B_OK;
|
return B_OK;
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -27,7 +27,7 @@ status_t VideoMixerNode::FormatSuggestionRequested(
|
|||||||
int32 quality,
|
int32 quality,
|
||||||
media_format * format)
|
media_format * format)
|
||||||
{
|
{
|
||||||
fprintf(stderr,"VideoMixerNode(BBufferProducer)::FormatSuggestionRequested\n");
|
fprintf(stderr, "VideoMixerNode(BBufferProducer)::FormatSuggestionRequested\n");
|
||||||
|
|
||||||
if (format->type == B_MEDIA_NO_TYPE) {
|
if (format->type == B_MEDIA_NO_TYPE) {
|
||||||
format->type = B_MEDIA_RAW_VIDEO;
|
format->type = B_MEDIA_RAW_VIDEO;
|
||||||
@@ -49,7 +49,7 @@ status_t VideoMixerNode::FormatProposal(
|
|||||||
const media_source &output_source,
|
const media_source &output_source,
|
||||||
media_format *format)
|
media_format *format)
|
||||||
{
|
{
|
||||||
fprintf(stderr,"VideoMixerNode(BBufferProducer)::FormatProposal\n");
|
fprintf(stderr, "VideoMixerNode(BBufferProducer)::FormatProposal\n");
|
||||||
|
|
||||||
fOutput.source = output_source;
|
fOutput.source = output_source;
|
||||||
|
|
||||||
@@ -81,11 +81,11 @@ status_t VideoMixerNode::FormatChangeRequested(
|
|||||||
media_format *io_format,
|
media_format *io_format,
|
||||||
int32 * _deprecated_)
|
int32 * _deprecated_)
|
||||||
{
|
{
|
||||||
fprintf(stderr,"VideoMixerNode(BBufferProducer)::FormatChangeRequested\n");
|
fprintf(stderr, "VideoMixerNode(BBufferProducer)::FormatChangeRequested\n");
|
||||||
|
|
||||||
if (fOutput.source != source) {
|
if (fOutput.source != source) {
|
||||||
// we don't have that output
|
// we don't have that output
|
||||||
fprintf(stderr,"<- B_MEDIA_BAD_SOURCE\n");
|
fprintf(stderr, "<- B_MEDIA_BAD_SOURCE\n");
|
||||||
return B_MEDIA_BAD_SOURCE;
|
return B_MEDIA_BAD_SOURCE;
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -99,11 +99,11 @@ status_t VideoMixerNode::GetNextOutput( /* cookie starts as 0 */
|
|||||||
int32 *cookie,
|
int32 *cookie,
|
||||||
media_output *out_output)
|
media_output *out_output)
|
||||||
{
|
{
|
||||||
fprintf(stderr,"VideoMixerNode(BBufferProducer)::GetNextOutput (%ld)\n",*cookie);
|
fprintf(stderr, "VideoMixerNode(BBufferProducer)::GetNextOutput (%" B_PRId32 ")\n", *cookie);
|
||||||
|
|
||||||
// only 1 output
|
// only 1 output
|
||||||
if (*cookie != 0) {
|
if (*cookie != 0) {
|
||||||
fprintf(stderr,"<- B_ERROR (no more outputs)\n");
|
fprintf(stderr, "<- B_ERROR (no more outputs)\n");
|
||||||
return B_ERROR;
|
return B_ERROR;
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -115,7 +115,7 @@ status_t VideoMixerNode::GetNextOutput( /* cookie starts as 0 */
|
|||||||
|
|
||||||
status_t VideoMixerNode::DisposeOutputCookie(int32 cookie)
|
status_t VideoMixerNode::DisposeOutputCookie(int32 cookie)
|
||||||
{
|
{
|
||||||
fprintf(stderr,"VideoMixerNode(BBufferProducer)::DisposeOutputCookie\n");
|
fprintf(stderr, "VideoMixerNode(BBufferProducer)::DisposeOutputCookie\n");
|
||||||
// nothing to do since our cookies are part of the vector iterator
|
// nothing to do since our cookies are part of the vector iterator
|
||||||
return B_OK;
|
return B_OK;
|
||||||
}
|
}
|
||||||
@@ -124,11 +124,11 @@ status_t VideoMixerNode::SetBufferGroup(
|
|||||||
const media_source & for_source,
|
const media_source & for_source,
|
||||||
BBufferGroup * group)
|
BBufferGroup * group)
|
||||||
{
|
{
|
||||||
fprintf(stderr,"VideoMixerNode(BBufferProducer)::SetBufferGroup\n");
|
fprintf(stderr, "VideoMixerNode(BBufferProducer)::SetBufferGroup\n");
|
||||||
|
|
||||||
if (fOutput.source != for_source) {
|
if (fOutput.source != for_source) {
|
||||||
// we don't have that output
|
// we don't have that output
|
||||||
fprintf(stderr,"<- B_MEDIA_BAD_SOURCE\n");
|
fprintf(stderr, "<- B_MEDIA_BAD_SOURCE\n");
|
||||||
return B_MEDIA_BAD_SOURCE;
|
return B_MEDIA_BAD_SOURCE;
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -156,9 +156,9 @@ status_t VideoMixerNode::VideoClippingChanged(
|
|||||||
status_t VideoMixerNode::GetLatency(
|
status_t VideoMixerNode::GetLatency(
|
||||||
bigtime_t *out_latency)
|
bigtime_t *out_latency)
|
||||||
{
|
{
|
||||||
fprintf(stderr,"VideoMixerNode(BBufferProducer)::GetLatency\n");
|
fprintf(stderr, "VideoMixerNode(BBufferProducer)::GetLatency\n");
|
||||||
if (out_latency == NULL) {
|
if (out_latency == NULL) {
|
||||||
fprintf(stderr,"<- B_BAD_VALUE\n");
|
fprintf(stderr, "<- B_BAD_VALUE\n");
|
||||||
return B_BAD_VALUE;
|
return B_BAD_VALUE;
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -173,11 +173,11 @@ status_t VideoMixerNode::PrepareToConnect(
|
|||||||
media_source *out_source,
|
media_source *out_source,
|
||||||
char *out_name)
|
char *out_name)
|
||||||
{
|
{
|
||||||
fprintf(stderr,"VideoMixerNode(BBufferProducer)::PrepareToConnect\n");
|
fprintf(stderr, "VideoMixerNode(BBufferProducer)::PrepareToConnect\n");
|
||||||
|
|
||||||
if (fOutput.source != what) {
|
if (fOutput.source != what) {
|
||||||
// we don't have that output
|
// we don't have that output
|
||||||
fprintf(stderr,"<- B_MEDIA_BAD_SOURCE\n");
|
fprintf(stderr, "<- B_MEDIA_BAD_SOURCE\n");
|
||||||
return B_MEDIA_BAD_SOURCE;
|
return B_MEDIA_BAD_SOURCE;
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -196,16 +196,16 @@ void VideoMixerNode::Connect(
|
|||||||
const media_format &format,
|
const media_format &format,
|
||||||
char *io_name)
|
char *io_name)
|
||||||
{
|
{
|
||||||
fprintf(stderr,"VideoMixerNode(BBufferProducer)::Connect\n");
|
fprintf(stderr, "VideoMixerNode(BBufferProducer)::Connect\n");
|
||||||
|
|
||||||
if (fOutput.source != source) {
|
if (fOutput.source != source) {
|
||||||
// we don't have that output
|
// we don't have that output
|
||||||
fprintf(stderr,"<- B_MEDIA_BAD_SOURCE\n");
|
fprintf(stderr, "<- B_MEDIA_BAD_SOURCE\n");
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (error != B_OK) {
|
if (error != B_OK) {
|
||||||
fprintf(stderr,"<- error already\n");
|
fprintf(stderr, "<- error already\n");
|
||||||
fOutput.destination = media_destination::null;
|
fOutput.destination = media_destination::null;
|
||||||
fOutput.format.u.raw_video = media_raw_video_format::wildcard;
|
fOutput.format.u.raw_video = media_raw_video_format::wildcard;
|
||||||
return;
|
return;
|
||||||
@@ -238,25 +238,25 @@ void VideoMixerNode::Connect(
|
|||||||
}
|
}
|
||||||
|
|
||||||
void VideoMixerNode::ComputeInternalLatency() {
|
void VideoMixerNode::ComputeInternalLatency() {
|
||||||
fprintf(stderr,"VideoMixerNode(BBufferProducer)::ComputeInternalLatency\n");
|
fprintf(stderr, "VideoMixerNode(BBufferProducer)::ComputeInternalLatency\n");
|
||||||
fInternalLatency = 100; // just guess
|
fInternalLatency = 100; // just guess
|
||||||
fprintf(stderr," internal latency guessed = %lld\n",fInternalLatency);
|
fprintf(stderr, " internal latency guessed = %" B_PRIdBIGTIME "\n", fInternalLatency);
|
||||||
}
|
}
|
||||||
|
|
||||||
void VideoMixerNode::Disconnect(
|
void VideoMixerNode::Disconnect(
|
||||||
const media_source & what,
|
const media_source & what,
|
||||||
const media_destination & where)
|
const media_destination & where)
|
||||||
{
|
{
|
||||||
fprintf(stderr,"VideoMixerNode(BBufferProducer)::Disconnect\n");
|
fprintf(stderr, "VideoMixerNode(BBufferProducer)::Disconnect\n");
|
||||||
|
|
||||||
if (fOutput.source != what) {
|
if (fOutput.source != what) {
|
||||||
// we don't have that output
|
// we don't have that output
|
||||||
fprintf(stderr,"<- B_MEDIA_BAD_SOURCE\n");
|
fprintf(stderr, "<- B_MEDIA_BAD_SOURCE\n");
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (fOutput.destination != where) {
|
if (fOutput.destination != where) {
|
||||||
fprintf(stderr,"<- B_MEDIA_BAD_DESTINATION\n");
|
fprintf(stderr, "<- B_MEDIA_BAD_DESTINATION\n");
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -269,11 +269,11 @@ void VideoMixerNode::LateNoticeReceived(
|
|||||||
bigtime_t how_much,
|
bigtime_t how_much,
|
||||||
bigtime_t performance_time)
|
bigtime_t performance_time)
|
||||||
{
|
{
|
||||||
fprintf(stderr,"VideoMixerNode(BBufferProducer)::LateNoticeReceived\n");
|
fprintf(stderr, "VideoMixerNode(BBufferProducer)::LateNoticeReceived\n");
|
||||||
|
|
||||||
if (fOutput.source != what) {
|
if (fOutput.source != what) {
|
||||||
// we don't have that output
|
// we don't have that output
|
||||||
fprintf(stderr,"<- B_MEDIA_BAD_SOURCE\n");
|
fprintf(stderr, "<- B_MEDIA_BAD_SOURCE\n");
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -295,7 +295,7 @@ void VideoMixerNode::LateNoticeReceived(
|
|||||||
// XXX: should we really drop buffers? just for that output?
|
// XXX: should we really drop buffers? just for that output?
|
||||||
break;
|
break;
|
||||||
default:
|
default:
|
||||||
fprintf(stderr,"VideoMixerNode::LateNoticeReceived with unexpected run mode.\n");
|
fprintf(stderr, "VideoMixerNode::LateNoticeReceived with unexpected run mode.\n");
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -305,17 +305,17 @@ void VideoMixerNode::EnableOutput(
|
|||||||
bool enabled,
|
bool enabled,
|
||||||
int32 *_deprecated_)
|
int32 *_deprecated_)
|
||||||
{
|
{
|
||||||
fprintf(stderr,"VideoMixerNode(BBufferProducer)::EnableOutput\n");
|
fprintf(stderr, "VideoMixerNode(BBufferProducer)::EnableOutput\n");
|
||||||
|
|
||||||
if (fOutput.source != what) {
|
if (fOutput.source != what) {
|
||||||
// we don't have that output
|
// we don't have that output
|
||||||
fprintf(stderr,"<- B_MEDIA_BAD_SOURCE\n");
|
fprintf(stderr, "<- B_MEDIA_BAD_SOURCE\n");
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
status_t status = B_OK;
|
status_t status = B_OK;
|
||||||
if (status != B_OK) {
|
if (status != B_OK) {
|
||||||
fprintf(stderr," error in itr->EnableOutput\n");
|
fprintf(stderr, " error in itr->EnableOutput\n");
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -333,18 +333,18 @@ void VideoMixerNode::AdditionalBufferRequested( // used to be Reserved 0
|
|||||||
bigtime_t prev_time,
|
bigtime_t prev_time,
|
||||||
const media_seek_tag * prev_tag)
|
const media_seek_tag * prev_tag)
|
||||||
{
|
{
|
||||||
fprintf(stderr,"VideoMixerNode(BBufferProducer)::AdditionalBufferRequested\n");
|
fprintf(stderr, "VideoMixerNode(BBufferProducer)::AdditionalBufferRequested\n");
|
||||||
|
|
||||||
if (fOutput.source != source) {
|
if (fOutput.source != source) {
|
||||||
// we don't have that output
|
// we don't have that output
|
||||||
fprintf(stderr,"<- B_MEDIA_BAD_SOURCE\n");
|
fprintf(stderr, "<- B_MEDIA_BAD_SOURCE\n");
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
// BBuffer * buffer;
|
// BBuffer * buffer;
|
||||||
// status_t status = itr->AdditionalBufferRequested(prev_buffer, prev_time, prev_tag);
|
// status_t status = itr->AdditionalBufferRequested(prev_buffer, prev_time, prev_tag);
|
||||||
// if (status != B_OK) {
|
// if (status != B_OK) {
|
||||||
// fprintf(stderr," itr->AdditionalBufferRequested returned an error.\n");
|
// fprintf(stderr, " itr->AdditionalBufferRequested returned an error.\n");
|
||||||
// }
|
// }
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -354,16 +354,16 @@ void VideoMixerNode::LatencyChanged(
|
|||||||
bigtime_t new_latency,
|
bigtime_t new_latency,
|
||||||
uint32 flags)
|
uint32 flags)
|
||||||
{
|
{
|
||||||
fprintf(stderr,"VideoMixerNode(BBufferProducer)::LatencyChanged\n");
|
fprintf(stderr, "VideoMixerNode(BBufferProducer)::LatencyChanged\n");
|
||||||
|
|
||||||
if (fOutput.source != source) {
|
if (fOutput.source != source) {
|
||||||
// we don't have that output
|
// we don't have that output
|
||||||
fprintf(stderr,"<- B_MEDIA_BAD_SOURCE\n");
|
fprintf(stderr, "<- B_MEDIA_BAD_SOURCE\n");
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (fOutput.destination != destination) {
|
if (fOutput.destination != destination) {
|
||||||
fprintf(stderr,"<- B_MEDIA_BAD_DESTINATION\n");
|
fprintf(stderr, "<- B_MEDIA_BAD_DESTINATION\n");
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user