Code style cleanup / honored 80 column line length limit. Modified FireWireDVAddOn to use BObjectList.
Feel free to chime in if I missed any style violations. git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@28000 a95241bf-73f2-0310-859d-f6bbb57e9c96
This commit is contained in:
@@ -6,6 +6,8 @@
|
|||||||
*
|
*
|
||||||
*/
|
*/
|
||||||
|
|
||||||
|
#include "FireWireCard.h"
|
||||||
|
|
||||||
#include <stdlib.h>
|
#include <stdlib.h>
|
||||||
#include <stdio.h>
|
#include <stdio.h>
|
||||||
#include <string.h>
|
#include <string.h>
|
||||||
@@ -16,7 +18,6 @@
|
|||||||
#include <stdint.h>
|
#include <stdint.h>
|
||||||
#include <errno.h>
|
#include <errno.h>
|
||||||
|
|
||||||
#include "FireWireCard.h"
|
|
||||||
#include "glue.h"
|
#include "glue.h"
|
||||||
|
|
||||||
#define TAG (1<<6)
|
#define TAG (1<<6)
|
||||||
@@ -80,10 +81,10 @@ struct mpeg_pldt {
|
|||||||
|
|
||||||
|
|
||||||
FireWireCard::FireWireCard(const char* path)
|
FireWireCard::FireWireCard(const char* path)
|
||||||
: fInitStatus(B_OK)
|
: fInitStatus(B_OK),
|
||||||
, fDev(-1)
|
fDev(-1),
|
||||||
, fBuf(NULL)
|
fBuf(NULL),
|
||||||
, fPad(NULL)
|
fPad(NULL)
|
||||||
{
|
{
|
||||||
printf("FireWireCard opening %s\n", path);
|
printf("FireWireCard opening %s\n", path);
|
||||||
|
|
||||||
@@ -141,7 +142,8 @@ FireWireCard::GetBufInfo(size_t *rbufsize, int *rcount)
|
|||||||
status_t
|
status_t
|
||||||
FireWireCard::DetectRecvFn()
|
FireWireCard::DetectRecvFn()
|
||||||
{
|
{
|
||||||
char *buf, ich = TAG | CHANNEL;
|
char* buf;
|
||||||
|
char ich = TAG | CHANNEL;
|
||||||
struct fw_isochreq isoreq;
|
struct fw_isochreq isoreq;
|
||||||
struct fw_isobufreq bufreq;
|
struct fw_isobufreq bufreq;
|
||||||
int len;
|
int len;
|
||||||
@@ -398,3 +400,4 @@ next:
|
|||||||
*src = ptr;
|
*src = ptr;
|
||||||
return B_OK;
|
return B_OK;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -9,6 +9,8 @@
|
|||||||
#ifndef __FIREWIRE_CARD_H
|
#ifndef __FIREWIRE_CARD_H
|
||||||
#define __FIREWIRE_CARD_H
|
#define __FIREWIRE_CARD_H
|
||||||
|
|
||||||
|
#include <SupportDefs.h>
|
||||||
|
|
||||||
class FireWireCard
|
class FireWireCard
|
||||||
{
|
{
|
||||||
public:
|
public:
|
||||||
@@ -31,8 +33,8 @@ private:
|
|||||||
ssize_t DvRead(void** buffer);
|
ssize_t DvRead(void** buffer);
|
||||||
status_t DvExtract(void* dest, void** src, ssize_t* sizeUsed);
|
status_t DvExtract(void* dest, void** src, ssize_t* sizeUsed);
|
||||||
ssize_t MpegtsRead(void** buffer);
|
ssize_t MpegtsRead(void** buffer);
|
||||||
status_t MpegtsExtract(void *dest, void **src, ssize_t *sizeUsed);
|
status_t MpegtsExtract(void* dest, void** src,
|
||||||
|
ssize_t* sizeUsed);
|
||||||
|
|
||||||
status_t fInitStatus;
|
status_t fInitStatus;
|
||||||
int fDev;
|
int fDev;
|
||||||
@@ -45,3 +47,4 @@ private:
|
|||||||
};
|
};
|
||||||
|
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
|||||||
@@ -15,6 +15,7 @@
|
|||||||
#include <stdio.h>
|
#include <stdio.h>
|
||||||
#include <string.h>
|
#include <string.h>
|
||||||
#include <time.h>
|
#include <time.h>
|
||||||
|
|
||||||
#include <Alert.h>
|
#include <Alert.h>
|
||||||
#include <Directory.h>
|
#include <Directory.h>
|
||||||
#include <Entry.h>
|
#include <Entry.h>
|
||||||
@@ -38,11 +39,6 @@ make_media_addon(image_id id)
|
|||||||
return new FireWireDVAddOn(id);
|
return new FireWireDVAddOn(id);
|
||||||
}
|
}
|
||||||
|
|
||||||
FireWireDVAddOn::~FireWireDVAddOn()
|
|
||||||
{
|
|
||||||
CALLED();
|
|
||||||
FreeDeviceList();
|
|
||||||
}
|
|
||||||
|
|
||||||
FireWireDVAddOn::FireWireDVAddOn(image_id id)
|
FireWireDVAddOn::FireWireDVAddOn(image_id id)
|
||||||
: BMediaAddOn(id)
|
: BMediaAddOn(id)
|
||||||
@@ -51,6 +47,14 @@ FireWireDVAddOn::FireWireDVAddOn(image_id id)
|
|||||||
ScanFolder("/dev/bus/fw");
|
ScanFolder("/dev/bus/fw");
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
FireWireDVAddOn::~FireWireDVAddOn()
|
||||||
|
{
|
||||||
|
CALLED();
|
||||||
|
FreeDeviceList();
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
status_t
|
status_t
|
||||||
FireWireDVAddOn::InitCheck(const char** out_failure_text)
|
FireWireDVAddOn::InitCheck(const char** out_failure_text)
|
||||||
{
|
{
|
||||||
@@ -62,6 +66,7 @@ FireWireDVAddOn::InitCheck(const char **out_failure_text)
|
|||||||
return B_OK;
|
return B_OK;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
int32
|
int32
|
||||||
FireWireDVAddOn::CountFlavors()
|
FireWireDVAddOn::CountFlavors()
|
||||||
{
|
{
|
||||||
@@ -69,31 +74,36 @@ FireWireDVAddOn::CountFlavors()
|
|||||||
return fDeviceList.CountItems();
|
return fDeviceList.CountItems();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
status_t
|
status_t
|
||||||
FireWireDVAddOn::GetFlavorAt(int32 n, const flavor_info** out_info)
|
FireWireDVAddOn::GetFlavorAt(int32 n, const flavor_info** out_info)
|
||||||
{
|
{
|
||||||
CALLED();
|
CALLED();
|
||||||
device_info *dev = (device_info *)fDeviceList.ItemAt(n);
|
device_info* dev = fDeviceList.ItemAt(n);
|
||||||
if (!dev)
|
if (!dev)
|
||||||
return B_ERROR;
|
return B_ERROR;
|
||||||
*out_info = &dev->flavor;
|
*out_info = &dev->flavor;
|
||||||
return B_OK;
|
return B_OK;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
BMediaNode *
|
BMediaNode *
|
||||||
FireWireDVAddOn::InstantiateNodeFor(const flavor_info *info, BMessage *config, status_t *out_error)
|
FireWireDVAddOn::InstantiateNodeFor(const flavor_info* info, BMessage* config,
|
||||||
|
status_t* out_error)
|
||||||
{
|
{
|
||||||
CALLED();
|
CALLED();
|
||||||
device_info *dev = (device_info *)fDeviceList.ItemAt(info->internal_id);
|
device_info* dev = fDeviceList.ItemAt(info->internal_id);
|
||||||
if (!dev || dev->flavor.internal_id != info->internal_id) {
|
if (!dev || dev->flavor.internal_id != info->internal_id) {
|
||||||
*out_error = B_ERROR;
|
*out_error = B_ERROR;
|
||||||
return NULL;
|
return NULL;
|
||||||
}
|
}
|
||||||
*out_error = B_OK;
|
*out_error = B_OK;
|
||||||
|
|
||||||
return new FireWireDVNode(this, dev->name, dev->flavor.internal_id, dev->card);
|
return new FireWireDVNode(this, dev->name, dev->flavor.internal_id,
|
||||||
|
dev->card);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
bool
|
bool
|
||||||
FireWireDVAddOn::WantsAutoStart()
|
FireWireDVAddOn::WantsAutoStart()
|
||||||
{
|
{
|
||||||
@@ -101,13 +111,16 @@ FireWireDVAddOn::WantsAutoStart()
|
|||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
status_t
|
status_t
|
||||||
FireWireDVAddOn::AutoStart(int index, BMediaNode **outNode, int32 *outInternalID, bool *outHasMore)
|
FireWireDVAddOn::AutoStart(int index, BMediaNode** outNode,
|
||||||
|
int32* outInternalID, bool* outHasMore)
|
||||||
{
|
{
|
||||||
CALLED();
|
CALLED();
|
||||||
return B_ERROR;
|
return B_ERROR;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
void
|
void
|
||||||
FireWireDVAddOn::ScanFolder(const char* path)
|
FireWireDVAddOn::ScanFolder(const char* path)
|
||||||
{
|
{
|
||||||
@@ -130,6 +143,7 @@ FireWireDVAddOn::ScanFolder(const char *path)
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
void
|
void
|
||||||
FireWireDVAddOn::AddDevice(FireWireCard* card, const char* path)
|
FireWireDVAddOn::AddDevice(FireWireCard* card, const char* path)
|
||||||
{
|
{
|
||||||
@@ -176,8 +190,9 @@ void
|
|||||||
FireWireDVAddOn::FreeDeviceList()
|
FireWireDVAddOn::FreeDeviceList()
|
||||||
{
|
{
|
||||||
device_info* dev;
|
device_info* dev;
|
||||||
while ((dev = (device_info *)fDeviceList.RemoveItem((int32)0))) {
|
while ((dev = fDeviceList.RemoveItemAt(0L))) {
|
||||||
delete dev->card;
|
delete dev->card;
|
||||||
delete dev;
|
delete dev;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -12,8 +12,10 @@
|
|||||||
#define _FIREWIRE_DV_ADDON_H_
|
#define _FIREWIRE_DV_ADDON_H_
|
||||||
|
|
||||||
#include <MediaAddOn.h>
|
#include <MediaAddOn.h>
|
||||||
|
#include <ObjectList.h>
|
||||||
|
|
||||||
class FireWireCard;
|
class FireWireCard;
|
||||||
|
struct device_info;
|
||||||
|
|
||||||
class FireWireDVAddOn : public BMediaAddOn
|
class FireWireDVAddOn : public BMediaAddOn
|
||||||
{
|
{
|
||||||
@@ -27,19 +29,20 @@ public:
|
|||||||
|
|
||||||
status_t GetFlavorAt(int32 n, const flavor_info** out_info);
|
status_t GetFlavorAt(int32 n, const flavor_info** out_info);
|
||||||
|
|
||||||
BMediaNode *InstantiateNodeFor(const flavor_info *info, BMessage *config, status_t *out_error);
|
BMediaNode* InstantiateNodeFor(const flavor_info* info,
|
||||||
|
BMessage* config, status_t* out_error);
|
||||||
|
|
||||||
bool WantsAutoStart();
|
bool WantsAutoStart();
|
||||||
status_t AutoStart(int index, BMediaNode **outNode, int32 *outInternalID, bool *outHasMore);
|
status_t AutoStart(int index, BMediaNode** outNode,
|
||||||
|
int32* outInternalID, bool* outHasMore);
|
||||||
|
|
||||||
protected:
|
protected:
|
||||||
void ScanFolder(const char* path);
|
void ScanFolder(const char* path);
|
||||||
|
|
||||||
void AddDevice(FireWireCard* card, const char* path);
|
void AddDevice(FireWireCard* card, const char* path);
|
||||||
void FreeDeviceList();
|
void FreeDeviceList();
|
||||||
|
|
||||||
protected:
|
protected:
|
||||||
BList fDeviceList;
|
BObjectList<device_info> fDeviceList;
|
||||||
};
|
};
|
||||||
|
|
||||||
#endif
|
#endif
|
||||||
|
|||||||
@@ -8,6 +8,8 @@
|
|||||||
* Copyright (c) 2004-2007 Marcus Overhagen <[email protected]>
|
* Copyright (c) 2004-2007 Marcus Overhagen <[email protected]>
|
||||||
*/
|
*/
|
||||||
|
|
||||||
|
#include "FireWireDVNode.h"
|
||||||
|
|
||||||
#include <fcntl.h>
|
#include <fcntl.h>
|
||||||
#include <malloc.h>
|
#include <malloc.h>
|
||||||
#include <math.h>
|
#include <math.h>
|
||||||
@@ -17,18 +19,17 @@
|
|||||||
#include <sys/uio.h>
|
#include <sys/uio.h>
|
||||||
#include <unistd.h>
|
#include <unistd.h>
|
||||||
|
|
||||||
#include <MediaRoster.h>
|
#include <Autolock.h>
|
||||||
#include <Buffer.h>
|
#include <Buffer.h>
|
||||||
#include <BufferGroup.h>
|
#include <BufferGroup.h>
|
||||||
#include <ParameterWeb.h>
|
|
||||||
#include <TimeSource.h>
|
|
||||||
#include <String.h>
|
|
||||||
#include <Autolock.h>
|
|
||||||
#include <Debug.h>
|
#include <Debug.h>
|
||||||
|
|
||||||
#include <Directory.h>
|
#include <Directory.h>
|
||||||
#include <Entry.h>
|
#include <Entry.h>
|
||||||
|
#include <MediaRoster.h>
|
||||||
|
#include <ParameterWeb.h>
|
||||||
#include <Path.h>
|
#include <Path.h>
|
||||||
|
#include <TimeSource.h>
|
||||||
|
#include <String.h>
|
||||||
|
|
||||||
#include "FireWireDVNode.h"
|
#include "FireWireDVNode.h"
|
||||||
#include "FireWireCard.h"
|
#include "FireWireCard.h"
|
||||||
@@ -42,7 +43,7 @@
|
|||||||
#ifdef TRACE
|
#ifdef TRACE
|
||||||
# undef TRACE
|
# undef TRACE
|
||||||
#endif
|
#endif
|
||||||
#define TRACE_FIREWIRE_NODE
|
//#define TRACE_FIREWIRE_NODE
|
||||||
#ifdef TRACE_FIREWIRE_NODE
|
#ifdef TRACE_FIREWIRE_NODE
|
||||||
# define TRACE(x...) printf(x)
|
# define TRACE(x...) printf(x)
|
||||||
#else
|
#else
|
||||||
@@ -53,20 +54,19 @@
|
|||||||
|
|
||||||
#define M_REFRESH_PARAMETER_WEB (BTimedEventQueue::B_USER_EVENT + 1)
|
#define M_REFRESH_PARAMETER_WEB (BTimedEventQueue::B_USER_EVENT + 1)
|
||||||
|
|
||||||
FireWireDVNode::FireWireDVNode(
|
FireWireDVNode::FireWireDVNode(BMediaAddOn* addon, const char* name,
|
||||||
BMediaAddOn *addon, const char *name,
|
|
||||||
int32 internal_id, FireWireCard* card)
|
int32 internal_id, FireWireCard* card)
|
||||||
: BMediaNode(name)
|
: BMediaNode(name),
|
||||||
, BBufferProducer(B_MEDIA_ENCODED_VIDEO)
|
BBufferProducer(B_MEDIA_ENCODED_VIDEO),
|
||||||
, BControllable()
|
BControllable(),
|
||||||
, BMediaEventLooper()
|
BMediaEventLooper(),
|
||||||
, fOutputEnabledEncVideo(false)
|
fOutputEnabledEncVideo(false),
|
||||||
, fCard(card)
|
fCard(card),
|
||||||
, fCaptureThreadsActive(false)
|
fCaptureThreadsActive(false),
|
||||||
, fThreadIdCardReader(-1)
|
fThreadIdCardReader(-1),
|
||||||
, fTerminateThreads(false)
|
fTerminateThreads(false),
|
||||||
, fBufferGroupEncVideo(0)
|
fBufferGroupEncVideo(0),
|
||||||
, fCaptureActive(false)
|
fCaptureActive(false)
|
||||||
{
|
{
|
||||||
CALLED();
|
CALLED();
|
||||||
|
|
||||||
@@ -92,8 +92,6 @@ FireWireDVNode::~FireWireDVNode()
|
|||||||
|
|
||||||
|
|
||||||
/* BMediaNode */
|
/* BMediaNode */
|
||||||
|
|
||||||
|
|
||||||
BMediaAddOn*
|
BMediaAddOn*
|
||||||
FireWireDVNode::AddOn(int32* internal_id) const
|
FireWireDVNode::AddOn(int32* internal_id) const
|
||||||
{
|
{
|
||||||
@@ -134,8 +132,6 @@ FireWireDVNode::SetRunMode(run_mode mode)
|
|||||||
|
|
||||||
|
|
||||||
/* BMediaEventLooper */
|
/* BMediaEventLooper */
|
||||||
|
|
||||||
|
|
||||||
void
|
void
|
||||||
FireWireDVNode::NodeRegistered()
|
FireWireDVNode::NodeRegistered()
|
||||||
{
|
{
|
||||||
@@ -188,8 +184,6 @@ FireWireDVNode::HandleEvent(const media_timed_event *event,
|
|||||||
|
|
||||||
|
|
||||||
/* BBufferProducer */
|
/* BBufferProducer */
|
||||||
|
|
||||||
|
|
||||||
status_t
|
status_t
|
||||||
FireWireDVNode::FormatChangeRequested(const media_source& source,
|
FireWireDVNode::FormatChangeRequested(const media_source& source,
|
||||||
const media_destination& destination, media_format* io_format,
|
const media_destination& destination, media_format* io_format,
|
||||||
@@ -280,7 +274,8 @@ FireWireDVNode::FormatSuggestionRequested(
|
|||||||
|
|
||||||
|
|
||||||
status_t
|
status_t
|
||||||
FireWireDVNode::FormatProposal(const media_source &source, media_format *format)
|
FireWireDVNode::FormatProposal(const media_source& source,
|
||||||
|
media_format* format)
|
||||||
{
|
{
|
||||||
CALLED();
|
CALLED();
|
||||||
/* The connection process:
|
/* The connection process:
|
||||||
@@ -456,8 +451,6 @@ FireWireDVNode::AdditionalBufferRequested(const media_source &source,
|
|||||||
|
|
||||||
|
|
||||||
/* FireWireDVNode */
|
/* FireWireDVNode */
|
||||||
|
|
||||||
|
|
||||||
void
|
void
|
||||||
FireWireDVNode::HandleTimeWarp(bigtime_t performance_time)
|
FireWireDVNode::HandleTimeWarp(bigtime_t performance_time)
|
||||||
{
|
{
|
||||||
@@ -608,12 +601,12 @@ FireWireDVNode::card_reader_thread()
|
|||||||
//what should the start_time be?
|
//what should the start_time be?
|
||||||
hdr->start_time = TimeSource()->PerformanceTimeFor(system_time());
|
hdr->start_time = TimeSource()->PerformanceTimeFor(system_time());
|
||||||
|
|
||||||
lock.Lock();
|
fLock.Lock();
|
||||||
if (B_OK != SendBuffer(buf, fOutputEncVideo.destination)) {
|
if (B_OK != SendBuffer(buf, fOutputEncVideo.destination)) {
|
||||||
TRACE("OutVideo: sending buffer failed\n");
|
TRACE("OutVideo: sending buffer failed\n");
|
||||||
buf->Recycle();
|
buf->Recycle();
|
||||||
}
|
}
|
||||||
lock.Unlock();
|
fLock.Unlock();
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
@@ -675,7 +668,8 @@ FireWireDVNode::CreateParameterWeb()
|
|||||||
|
|
||||||
|
|
||||||
status_t
|
status_t
|
||||||
FireWireDVNode::GetParameterValue(int32 id, bigtime_t *last_change, void *value, size_t *size)
|
FireWireDVNode::GetParameterValue(int32 id, bigtime_t* last_change,
|
||||||
|
void* value, size_t* size)
|
||||||
{
|
{
|
||||||
TRACE("FireWireDVNode::GetParameterValue, id 0x%lx\n", id);
|
TRACE("FireWireDVNode::GetParameterValue, id 0x%lx\n", id);
|
||||||
//do we need Parameter for firewire dv?
|
//do we need Parameter for firewire dv?
|
||||||
@@ -684,9 +678,12 @@ FireWireDVNode::GetParameterValue(int32 id, bigtime_t *last_change, void *value,
|
|||||||
|
|
||||||
|
|
||||||
void
|
void
|
||||||
FireWireDVNode::SetParameterValue(int32 id, bigtime_t when, const void *value, size_t size)
|
FireWireDVNode::SetParameterValue(int32 id, bigtime_t when, const void* value,
|
||||||
|
size_t size)
|
||||||
{
|
{
|
||||||
TRACE("FireWireDVNode::SetParameterValue, id 0x%lx, size %ld, value 0x%lx\n", id, size, *(const int32 *)value);
|
TRACE("FireWireDVNode::SetParameterValue, id 0x%lx, size %ld, "
|
||||||
|
"value 0x%lx\n", id, size, *(const int32*)value);
|
||||||
//do we need parameter for firewire dv?
|
//do we need parameter for firewire dv?
|
||||||
TRACE("FireWireDVNode::SetParameterValue finished\n");
|
TRACE("FireWireDVNode::SetParameterValue finished\n");
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -28,7 +28,8 @@ class FireWireDVNode : public virtual BBufferProducer,
|
|||||||
public virtual BControllable, public virtual BMediaEventLooper {
|
public virtual BControllable, public virtual BMediaEventLooper {
|
||||||
public:
|
public:
|
||||||
FireWireDVNode(BMediaAddOn *addon,
|
FireWireDVNode(BMediaAddOn *addon,
|
||||||
const char *name, int32 internal_id, FireWireCard *card);
|
const char *name, int32 internal_id,
|
||||||
|
FireWireCard *card);
|
||||||
virtual ~FireWireDVNode();
|
virtual ~FireWireDVNode();
|
||||||
|
|
||||||
virtual status_t InitCheck() const { return fInitStatus; }
|
virtual status_t InitCheck() const { return fInitStatus; }
|
||||||
@@ -46,24 +47,28 @@ virtual void SetRunMode(run_mode mode);
|
|||||||
/* BMediaEventLooper */
|
/* BMediaEventLooper */
|
||||||
protected:
|
protected:
|
||||||
virtual void NodeRegistered();
|
virtual void NodeRegistered();
|
||||||
|
|
||||||
virtual void HandleEvent(const media_timed_event *event,
|
virtual void HandleEvent(const media_timed_event *event,
|
||||||
bigtime_t lateness, bool realTimeEvent = false);
|
bigtime_t lateness,
|
||||||
|
bool realTimeEvent = false);
|
||||||
|
|
||||||
/* BBufferProducer */
|
/* BBufferProducer */
|
||||||
protected:
|
protected:
|
||||||
virtual status_t FormatSuggestionRequested(media_type type, int32 quality,
|
virtual status_t FormatSuggestionRequested(media_type type,
|
||||||
media_format * format);
|
int32 quality, media_format* format);
|
||||||
virtual status_t FormatProposal(const media_source &source,
|
virtual status_t FormatProposal(const media_source &source,
|
||||||
media_format* format);
|
media_format* format);
|
||||||
virtual status_t FormatChangeRequested(const media_source &source,
|
virtual status_t FormatChangeRequested(
|
||||||
|
const media_source &source,
|
||||||
const media_destination &destination,
|
const media_destination &destination,
|
||||||
media_format *io_format, int32 *_deprecated_);
|
media_format* io_format,
|
||||||
virtual status_t GetNextOutput(int32 * cookie, media_output * out_output);
|
int32* _deprecated_);
|
||||||
|
virtual status_t GetNextOutput(int32* cookie,
|
||||||
|
media_output* out_output);
|
||||||
virtual status_t DisposeOutputCookie(int32 cookie);
|
virtual status_t DisposeOutputCookie(int32 cookie);
|
||||||
virtual status_t SetBufferGroup(const media_source& for_source,
|
virtual status_t SetBufferGroup(const media_source& for_source,
|
||||||
BBufferGroup* group);
|
BBufferGroup* group);
|
||||||
virtual status_t VideoClippingChanged(const media_source &for_source,
|
virtual status_t VideoClippingChanged(
|
||||||
|
const media_source& for_source,
|
||||||
int16 num_shorts, int16* clip_data,
|
int16 num_shorts, int16* clip_data,
|
||||||
const media_video_display_info &display,
|
const media_video_display_info &display,
|
||||||
int32* _deprecated_);
|
int32* _deprecated_);
|
||||||
@@ -71,24 +76,31 @@ virtual status_t GetLatency(bigtime_t * out_latency);
|
|||||||
virtual status_t PrepareToConnect(const media_source& what,
|
virtual status_t PrepareToConnect(const media_source& what,
|
||||||
const media_destination& where,
|
const media_destination& where,
|
||||||
media_format* format,
|
media_format* format,
|
||||||
media_source *out_source, char *out_name);
|
media_source* out_source,
|
||||||
virtual void Connect(status_t error, const media_source &source,
|
char* out_name);
|
||||||
|
virtual void Connect(status_t error,
|
||||||
|
const media_source& source,
|
||||||
const media_destination& destination,
|
const media_destination& destination,
|
||||||
const media_format & format, char *io_name);
|
const media_format& format,
|
||||||
|
char* io_name);
|
||||||
virtual void Disconnect(const media_source& what,
|
virtual void Disconnect(const media_source& what,
|
||||||
const media_destination& where);
|
const media_destination& where);
|
||||||
virtual void LateNoticeReceived(const media_source& what,
|
virtual void LateNoticeReceived(const media_source& what,
|
||||||
bigtime_t how_much, bigtime_t performance_time);
|
bigtime_t how_much,
|
||||||
virtual void EnableOutput(const media_source & what, bool enabled,
|
bigtime_t performance_time);
|
||||||
int32 * _deprecated_);
|
virtual void EnableOutput(const media_source& what,
|
||||||
virtual void AdditionalBufferRequested(const media_source & source,
|
bool enabled, int32* _deprecated_);
|
||||||
media_buffer_id prev_buffer, bigtime_t prev_time,
|
virtual void AdditionalBufferRequested(
|
||||||
|
const media_source& source,
|
||||||
|
media_buffer_id prev_buffer,
|
||||||
|
bigtime_t prev_time,
|
||||||
const media_seek_tag* prev_tag);
|
const media_seek_tag* prev_tag);
|
||||||
|
|
||||||
/* BControllable */
|
/* BControllable */
|
||||||
protected:
|
protected:
|
||||||
virtual status_t GetParameterValue(int32 id, bigtime_t *last_change,
|
virtual status_t GetParameterValue(int32 id,
|
||||||
void *value, size_t *size);
|
bigtime_t* last_change, void* value,
|
||||||
|
size_t* size);
|
||||||
virtual void SetParameterValue(int32 id, bigtime_t when,
|
virtual void SetParameterValue(int32 id, bigtime_t when,
|
||||||
const void* value, size_t size);
|
const void* value, size_t size);
|
||||||
|
|
||||||
@@ -115,31 +127,21 @@ private:
|
|||||||
void card_reader_thread();
|
void card_reader_thread();
|
||||||
|
|
||||||
status_t fInitStatus;
|
status_t fInitStatus;
|
||||||
|
|
||||||
int32 fInternalID;
|
int32 fInternalID;
|
||||||
BMediaAddOn* fAddOn;
|
BMediaAddOn* fAddOn;
|
||||||
|
|
||||||
bool fOutputEnabledEncVideo;
|
bool fOutputEnabledEncVideo;
|
||||||
|
|
||||||
media_output fOutputEncVideo;
|
media_output fOutputEncVideo;
|
||||||
|
|
||||||
media_format fDefaultFormatEncVideo;
|
media_format fDefaultFormatEncVideo;
|
||||||
|
|
||||||
FireWireCard* fCard;
|
FireWireCard* fCard;
|
||||||
|
|
||||||
bool fCaptureThreadsActive;
|
bool fCaptureThreadsActive;
|
||||||
|
|
||||||
thread_id fThreadIdCardReader;
|
thread_id fThreadIdCardReader;
|
||||||
|
|
||||||
volatile bool fTerminateThreads;
|
volatile bool fTerminateThreads;
|
||||||
|
|
||||||
BBufferGroup* fBufferGroupEncVideo;
|
BBufferGroup* fBufferGroupEncVideo;
|
||||||
|
|
||||||
BParameterWeb* fWeb;
|
BParameterWeb* fWeb;
|
||||||
|
|
||||||
bool fCaptureActive;
|
bool fCaptureActive;
|
||||||
BLocker lock;
|
BLocker fLock;
|
||||||
|
|
||||||
};
|
};
|
||||||
|
|
||||||
#endif // __FIREWIRE_DV_NODE_H
|
#endif // __FIREWIRE_DV_NODE_H
|
||||||
|
|
||||||
|
|||||||
@@ -1,8 +1,10 @@
|
|||||||
SubDir HAIKU_TOP src add-ons media media-add-ons firewire_dv ;
|
SubDir HAIKU_TOP src add-ons media media-add-ons firewire_dv ;
|
||||||
|
|
||||||
UseHeaders [ FDirName $(HAIKU_TOP) headers compatibility bsd ] : true ;
|
UseHeaders [ FDirName $(HAIKU_TOP) headers compatibility bsd ] : true ;
|
||||||
UsePrivateHeaders media ;
|
|
||||||
UsePrivateHeaders firewire ;
|
UsePrivateHeaders firewire ;
|
||||||
|
UsePrivateHeaders media ;
|
||||||
|
UsePrivateHeaders shared ;
|
||||||
|
|
||||||
Addon firewire_dv.media_addon :
|
Addon firewire_dv.media_addon :
|
||||||
FireWireCard.cpp
|
FireWireCard.cpp
|
||||||
|
|||||||
Reference in New Issue
Block a user