1 /* 2 * FireWire DV media addon for Haiku 3 * 4 * Copyright (c) 2008, JiSheng Zhang (jszhang3@mail.ustc.edu.cn) 5 * Distributed under the terms of the MIT License. 6 * 7 * Based on DVB media addon 8 * Copyright (c) 2004-2007 Marcus Overhagen <marcus@overhagen.de> 9 */ 10 #ifndef _FIREWIRE_DV_ADDON_H_ 11 #define _FIREWIRE_DV_ADDON_H_ 12 13 14 #include <MediaAddOn.h> 15 #include <ObjectList.h> 16 17 18 class FireWireCard; 19 struct device_info; 20 21 22 class FireWireDVAddOn : public BMediaAddOn { 23 public: 24 FireWireDVAddOn(image_id id); 25 ~FireWireDVAddOn(); 26 27 status_t InitCheck(const char** out_failure_text); 28 29 int32 CountFlavors(); 30 31 status_t GetFlavorAt(int32 n, const flavor_info** out_info); 32 33 BMediaNode* InstantiateNodeFor(const flavor_info* info, 34 BMessage* config, status_t* out_error); 35 36 bool WantsAutoStart(); 37 status_t AutoStart(int index, BMediaNode** outNode, 38 int32* outInternalID, bool* outHasMore); 39 40 protected: 41 void ScanFolder(const char* path); 42 void AddDevice(FireWireCard* card, const char* path); 43 void FreeDeviceList(); 44 45 protected: 46 BObjectList<device_info> fDeviceList; 47 }; 48 49 #endif 50