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:
beveloper
2003-05-23 21:50:57 +00:00
parent acd429ac89
commit 1b14f4182f
3 changed files with 3 additions and 13 deletions
@@ -15,12 +15,12 @@ MediaAddOn::MediaAddOn(image_id imid)
: BMediaAddOn(imid) : BMediaAddOn(imid)
{ {
/* Customize these parameters to match those of your node */ /* Customize these parameters to match those of your node */
fFlavorInfo.name = "VideoProducer"; fFlavorInfo.name = "Demo Video Producer";
fFlavorInfo.info = "VideoProducer"; fFlavorInfo.info = "Demo Video Producer";
fFlavorInfo.kinds = B_BUFFER_PRODUCER | B_CONTROLLABLE | B_PHYSICAL_INPUT; fFlavorInfo.kinds = B_BUFFER_PRODUCER | B_CONTROLLABLE | B_PHYSICAL_INPUT;
fFlavorInfo.flavor_flags = 0; fFlavorInfo.flavor_flags = 0;
fFlavorInfo.internal_id = 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_count = 0;
fFlavorInfo.in_format_flags = 0; fFlavorInfo.in_format_flags = 0;
fFlavorInfo.in_formats = NULL; fFlavorInfo.in_formats = NULL;
@@ -32,8 +32,6 @@
#define FIELD_RATE 30.f #define FIELD_RATE 30.f
int32 VideoProducer::fInstances = 0;
VideoProducer::VideoProducer( VideoProducer::VideoProducer(
BMediaAddOn *addon, const char *name, int32 internal_id) BMediaAddOn *addon, const char *name, int32 internal_id)
: BMediaNode(name), : BMediaNode(name),
@@ -45,10 +43,6 @@ VideoProducer::VideoProducer(
fInitStatus = B_NO_INIT; 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; fInternalID = internal_id;
fAddOn = addon; fAddOn = addon;
@@ -80,8 +74,6 @@ VideoProducer::~VideoProducer()
if (fRunning) if (fRunning)
HandleStop(); HandleStop();
} }
atomic_add(&fInstances, -1);
} }
/* BMediaNode */ /* BMediaNode */
@@ -103,8 +103,6 @@ private:
void HandleTimeWarp(bigtime_t performance_time); void HandleTimeWarp(bigtime_t performance_time);
void HandleSeek(bigtime_t performance_time); void HandleSeek(bigtime_t performance_time);
static int32 fInstances;
status_t fInitStatus; status_t fInitStatus;
int32 fInternalID; int32 fInternalID;