Allow 5 concurrent instances for testing,
changed name to indicate that this is a demo. git-svn-id: file:///srv/svn/repos/haiku/trunk/current@3291 a95241bf-73f2-0310-859d-f6bbb57e9c96
This commit is contained in:
@@ -15,12 +15,12 @@ MediaAddOn::MediaAddOn(image_id imid)
|
||||
: BMediaAddOn(imid)
|
||||
{
|
||||
/* Customize these parameters to match those of your node */
|
||||
fFlavorInfo.name = "VideoProducer";
|
||||
fFlavorInfo.info = "VideoProducer";
|
||||
fFlavorInfo.name = "Demo Video Producer";
|
||||
fFlavorInfo.info = "Demo Video Producer";
|
||||
fFlavorInfo.kinds = B_BUFFER_PRODUCER | B_CONTROLLABLE | B_PHYSICAL_INPUT;
|
||||
fFlavorInfo.flavor_flags = 0;
|
||||
fFlavorInfo.internal_id = 0;
|
||||
fFlavorInfo.possible_count = 1;
|
||||
fFlavorInfo.possible_count = 5; // limited to 5 instances (just for testing)
|
||||
fFlavorInfo.in_format_count = 0;
|
||||
fFlavorInfo.in_format_flags = 0;
|
||||
fFlavorInfo.in_formats = NULL;
|
||||
|
||||
@@ -32,8 +32,6 @@
|
||||
|
||||
#define FIELD_RATE 30.f
|
||||
|
||||
int32 VideoProducer::fInstances = 0;
|
||||
|
||||
VideoProducer::VideoProducer(
|
||||
BMediaAddOn *addon, const char *name, int32 internal_id)
|
||||
: BMediaNode(name),
|
||||
@@ -45,10 +43,6 @@ VideoProducer::VideoProducer(
|
||||
|
||||
fInitStatus = B_NO_INIT;
|
||||
|
||||
/* Only allow one instance of the node to exist at any time */
|
||||
if (atomic_add(&fInstances, 1) != 0)
|
||||
return;
|
||||
|
||||
fInternalID = internal_id;
|
||||
fAddOn = addon;
|
||||
|
||||
@@ -80,8 +74,6 @@ VideoProducer::~VideoProducer()
|
||||
if (fRunning)
|
||||
HandleStop();
|
||||
}
|
||||
|
||||
atomic_add(&fInstances, -1);
|
||||
}
|
||||
|
||||
/* BMediaNode */
|
||||
|
||||
@@ -103,8 +103,6 @@ private:
|
||||
void HandleTimeWarp(bigtime_t performance_time);
|
||||
void HandleSeek(bigtime_t performance_time);
|
||||
|
||||
static int32 fInstances;
|
||||
|
||||
status_t fInitStatus;
|
||||
|
||||
int32 fInternalID;
|
||||
|
||||
Reference in New Issue
Block a user