1#ifndef _DARWIN_AVC_INFO_H_
2#define _DARWIN_AVC_INFO_H_
4#include "libmythbase/mythconfig.h"
13#include <IOKit/IOKitLib.h>
14#include <IOKit/firewire/IOFireWireLib.h>
15#include <IOKit/firewire/IOFireWireLibIsoch.h>
16#include <IOKit/firewire/IOFireWireFamilyCommon.h>
17#include <IOKit/avc/IOFireWireAVCLib.h>
27class DarwinAVCInfo :
public AVCInfo
30 DarwinAVCInfo() =
default;
33 IONotificationPortRef notify_port,
34 CFRunLoopRef &thread_cf_ref, io_object_t obj);
36 bool OpenPort(CFRunLoopRef &thread_cf_ref);
39 bool OpenAVCInterface(CFRunLoopRef &thread_cf_ref);
40 void CloseAVCInterface(
void);
42 bool OpenDeviceInterface(CFRunLoopRef &thread_cf_ref);
43 void CloseDeviceInterface(
void);
46 const std::vector<uint8_t> &cmd,
47 std::vector<uint8_t> &result,
48 int retry_cnt)
override;
50 bool GetDeviceNodes(
int &local_node,
int &remote_node);
52 bool IsAVCInterfaceOpen(
void)
const {
return avc_handle; }
53 bool IsPortOpen(
void)
const {
return fw_handle; }
56 io_service_t fw_node_ref {0};
57 io_service_t fw_device_ref {0};
58 io_service_t fw_service_ref {0};
59 io_service_t avc_service_ref {0};
61 io_object_t fw_device_notifier_ref {0};
63 IOFireWireAVCLibUnitInterface **avc_handle {
nullptr};
64 IOFireWireLibDeviceRef fw_handle {
nullptr};
66using avcinfo_list_t = QMap<uint64_t,DarwinAVCInfo*>;
virtual bool SendAVCCommand(const std::vector< uint8_t > &, std::vector< uint8_t > &, int)