summaryrefslogtreecommitdiff
path: root/include
AgeCommit message (Collapse)Author
2019-01-21libcamera: camera: Handle camera objects through shared pointersLaurent Pinchart
The Camera class is explicitly reference-counted to manage the lifetime of camera objects. Replace this open-coded implementation with usage of the std::shared_ptr<> class. This API change prevents pipeline handlers from subclassing the Camera class. This isn't deemed to be an issue. Mark the class final to make this explicit. Signed-off-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com> Reviewed-by: Jacopo Mondi <jacopo@jmondi.org> Reviewed-by: Niklas Söderlund <niklas.soderlund@ragnatech.se>
2019-01-21libcamera: camera_manager: Register cameras with the camera managerLaurent Pinchart
Cameras are listed through a double indirection, first iterating over all available pipeline handlers, and then listing the cameras they each support. To simplify the API make the pipeline handlers register the cameras with the camera manager directly, which lets the camera manager easily expose the list of all available cameras. The PipelineHandler API gets simplified as the handlers don't need to expose the list of cameras they have created. Signed-off-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com> Reviewed-by: Niklas Söderlund <niklas.soderlund@ragnatech.se> Reviewed-by: Jacopo Mondi <jacopo@jmondi.org>
2019-01-21libcamera: camera_manager: Use std::unique_ptr to store event dispatcherLaurent Pinchart
The CameraManager takes ownership of the dispatcher passed to the setEventDispatcher() function. Enforces this by using std::unique_ptr<>. Signed-off-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com> Reviewed-by: Niklas Söderlund <niklas.soderlund@ragnatech.se> Reviewed-by: Jacopo Mondi <jacopo@jmondi.org>
2019-01-17include: linux: Import V4L2 uAPI headers from Linux v4.19Kieran Bingham
Import the following files from the Linux UAPI to keep our V4L2 interface in sync: media-bus-format.h v4l2-common.h v4l2-controls.h v4l2-mediabus.h v4l2-subdev.h videodev2.h Signed-off-by: Kieran Bingham <kieran.bingham@ideasonboard.com> Reviewed-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com> Reviewed-by: Niklas Söderlund <niklas.soderlund@ragnatech.se> Signed-off-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
2019-01-16libcamera: camera_manager: Turn enumerator into a unique_ptr<>Laurent Pinchart
Convey the fact that the CameraManager class owns the DeviceEnumerator instance it creates by using std::unique_ptr<> to store the pointer. Signed-off-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com> Reviewed-by: Niklas Söderlund <niklas.soderlund@ragnatech.se>
2019-01-10libcamera: Update libcamera.hLaurent Pinchart
libcamera.h hasn't been updated with the recently added public headers event_notifier.h, signal.h and timer.h. Add them. The event_dispatcher_poll.h header, which used to be public, is now private, but hasn't been removed from libcamera.h. Remove it. Signed-off-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com> Reviewed-by: Niklas Söderlund <niklas.soderlund@ragnatech.se>
2019-01-08libcamera: Add a poll-based event dispatcherLaurent Pinchart
Provide a poll-based event dispatcher implementation as convenience for applications that don't need a custom event loop. The poll-based dispatcher is automatically instantiated if the application doesn't provide its own dispatcher. Signed-off-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
2019-01-08libcamera: Add event notification infrastructureLaurent Pinchart
Add three new classes, EventDispatcher, EventNotifier and Timer, that define APIs for file descriptor event notification and timers. The implementation of the EventDispatcher is meant to be provided to libcamera by the application. The event dispatcher is integrated twith the camera manager to implement automatic registration of timers and events. Signed-off-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com> Reviewed-by: Niklas Söderlund <niklas.soderlund@ragnatech.se> Reviewed-by: Jacopo Mondi <jacopo@jmondi.org>
2019-01-08libcamera: Add signal/slot communication mechanismLaurent Pinchart
Introduce a Signal class that allows connecting event sources (signals) to event listeners (slots) without adding any boilerplate code usually associated with the observer or listener design patterns. Signed-off-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com> Reviewed-by: Niklas Söderlund <niklas.soderlund@ragnatech.se> Reviewed-by: Jacopo Mondi <jacopo@jmondi.org>
2019-01-08libcamera: camera_manager: Make the class a singletonLaurent Pinchart
There can only be a single camera manager instance in the application. Creating it as a singleton helps avoiding mistakes. It also allows the camera manager to be used as a storage of global data, such as the future event dispatcher. Signed-off-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com> Reviewed-by: Niklas Söderlund <niklas.soderlund@ragnatech.se> Reviewed-by: Jacopo Mondi <jacopo@jmondi.org>
2019-01-04libcamera: camera_manager: Sort includes alphabeticallyLaurent Pinchart
Alphabetically sorted includes help finding where to insert new include statements, and avoiding duplicates. Signed-off-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com> Reviewed-by: Jacopo Mondi <jacopo@jmondi.org> Reviewed-by: Niklas Söderlund <niklas.soderlund@ragnatech.se>
2019-01-04libcamera: camera_manager: Remove put() methodLaurent Pinchart
The method is declared but not implemented. Remove it. Signed-off-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com> Reviewed-by: Jacopo Mondi <jacopo@jmondi.org> Reviewed-by: Niklas Söderlund <niklas.soderlund@ragnatech.se>
2019-01-02libcamera: Remove libcamera classLaurent Pinchart
The class was just a placeholder, now that we have other objects defined, remove it along with the associated test. The libcamera/libcamera.h header is kept as a shortcut to include the whole libcamera public API. Signed-off-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
2018-12-31libcamera: camera_manager: add CameraManager classNiklas Söderlund
Provide a CameraManager class which will handle listing, instancing, destruction and lifetime management of cameras. Signed-off-by: Niklas Söderlund <niklas.soderlund@ragnatech.se> Reviewed-by: Jacopo Mondi <jacopo@jmondi.org> Reviewed-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
2018-12-31libcamera: Add Camera classNiklas Söderlund
Provide a Camera class which represents our main interface to handling camera devices. This is a rework of Kieran's initial proposal and Laurent's documentation of the file changed to fit the device enumerators needs. Signed-off-by: Niklas Söderlund <niklas.soderlund@ragnatech.se> Reviewed-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com> Reviewed-by: Jacopo Mondi <jacopo@jmondi.org>
2018-12-19libcamera: include: Import media.h from Linux v4.19Jacopo Mondi
In order to avoid depending on system headers that may be outdated compared to the kernel version available at runtime, import the Linux kernel headers related to the APIs that libcamera requires a recent version of. This allows libcamera to use the latest kernel APIs even when compiled on older systems. The library must of course test at runtime whether those APIs are available and fallback to older APIs in order to support older kernels. Import media.h for the recent media controller APIs. The file is extracted verbatim from kernel v4.19. Reviewed-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com> Signed-off-by: Jacopo Mondi <jacopo@jmondi.org>
2018-12-11build: Clean up file names variablesLaurent Pinchart
The build system defines two variables, public_api and sources, that store the names of the public headers and the source files respectively. These files will need to be referenced when generating documentation from source code, so let's make the variable names more descriptive: - Rename public_api to libcamera_api and use the files() function - Rename sources to libcamera_sources - Add a libcamera_headers variable to hold the internal headers Signed-off-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
2018-12-06libcamera: Use the logger instead of coutLaurent Pinchart
Signed-off-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com> Acked-by: Kieran Bingham <kieran.bingham@ideasonboard.com>
2018-12-06Add boilerplate headers comments and include guardsLaurent Pinchart
The initial main.cpp and libcamera.h files are missing boilerplate header comments. libcamera.h is further missing include guards. Add them. Signed-off-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com> Acked-by: Kieran Bingham <kieran.bingham@ideasonboard.com>
2018-11-28meson: Replace tabs for spacesKieran Bingham
Tabs are disliked within the meson build system. Replace indentation by spaces, in all existing locations. Signed-off-by: Kieran Bingham <kieran.bingham@ideasonboard.com>
2018-11-27include: Install include filesKieran Bingham
The include directory was defined but not installed. Add it to the meson build structure to incorporate it as part of the library install. To facilitate the same include paths in our internal includes, update the structure for headers to match the install structure. Reviewed-by: Niklas Söderlund <niklas.soderlund@ragnatech.se> Reviewed-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com> Signed-off-by: Kieran Bingham <kieran.bingham@ideasonboard.com>
2018-10-24build: Provide initial meson infrastructureKieran Bingham
Define the starting points for the libcamera build using meson and ninja build components. An initial 'dummy' library class is created, and a test binary links against the shared library calling it's init_lib() function. Signed-off-by: Kieran Bingham <kieran.bingham@ideasonboard.com>
"hl ppc">#define MEDIA_ENT_F_OLD_SUBDEV_BASE 0x00020000 /* * Initial value to be used when a new entity is created * Drivers should change it to something useful. */ #define MEDIA_ENT_F_UNKNOWN MEDIA_ENT_F_BASE /* * Subdevs are initialized with MEDIA_ENT_F_V4L2_SUBDEV_UNKNOWN in order * to preserve backward compatibility. Drivers must change to the proper * subdev type before registering the entity. */ #define MEDIA_ENT_F_V4L2_SUBDEV_UNKNOWN MEDIA_ENT_F_OLD_SUBDEV_BASE /* * DVB entity functions */ #define MEDIA_ENT_F_DTV_DEMOD (MEDIA_ENT_F_BASE + 0x00001) #define MEDIA_ENT_F_TS_DEMUX (MEDIA_ENT_F_BASE + 0x00002) #define MEDIA_ENT_F_DTV_CA (MEDIA_ENT_F_BASE + 0x00003) #define MEDIA_ENT_F_DTV_NET_DECAP (MEDIA_ENT_F_BASE + 0x00004) /* * I/O entity functions */ #define MEDIA_ENT_F_IO_V4L (MEDIA_ENT_F_OLD_BASE + 1) #define MEDIA_ENT_F_IO_DTV (MEDIA_ENT_F_BASE + 0x01001) #define MEDIA_ENT_F_IO_VBI (MEDIA_ENT_F_BASE + 0x01002) #define MEDIA_ENT_F_IO_SWRADIO (MEDIA_ENT_F_BASE + 0x01003) /* * Sensor functions */ #define MEDIA_ENT_F_CAM_SENSOR (MEDIA_ENT_F_OLD_SUBDEV_BASE + 1) #define MEDIA_ENT_F_FLASH (MEDIA_ENT_F_OLD_SUBDEV_BASE + 2) #define MEDIA_ENT_F_LENS (MEDIA_ENT_F_OLD_SUBDEV_BASE + 3) /* * Digital TV, analog TV, radio and/or software defined radio tuner functions. * * It is a responsibility of the master/bridge drivers to add connectors * and links for MEDIA_ENT_F_TUNER. Please notice that some old tuners * may require the usage of separate I2C chips to decode analog TV signals, * when the master/bridge chipset doesn't have its own TV standard decoder. * On such cases, the IF-PLL staging is mapped via one or two entities: * MEDIA_ENT_F_IF_VID_DECODER and/or MEDIA_ENT_F_IF_AUD_DECODER. */ #define MEDIA_ENT_F_TUNER (MEDIA_ENT_F_OLD_SUBDEV_BASE + 5) /* * Analog TV IF-PLL decoder functions * * It is a responsibility of the master/bridge drivers to create links * for MEDIA_ENT_F_IF_VID_DECODER and MEDIA_ENT_F_IF_AUD_DECODER. */ #define MEDIA_ENT_F_IF_VID_DECODER (MEDIA_ENT_F_BASE + 0x02001) #define MEDIA_ENT_F_IF_AUD_DECODER (MEDIA_ENT_F_BASE + 0x02002) /* * Audio entity functions */ #define MEDIA_ENT_F_AUDIO_CAPTURE (MEDIA_ENT_F_BASE + 0x03001) #define MEDIA_ENT_F_AUDIO_PLAYBACK (MEDIA_ENT_F_BASE + 0x03002) #define MEDIA_ENT_F_AUDIO_MIXER (MEDIA_ENT_F_BASE + 0x03003) /* * Processing entity functions */ #define MEDIA_ENT_F_PROC_VIDEO_COMPOSER (MEDIA_ENT_F_BASE + 0x4001) #define MEDIA_ENT_F_PROC_VIDEO_PIXEL_FORMATTER (MEDIA_ENT_F_BASE + 0x4002) #define MEDIA_ENT_F_PROC_VIDEO_PIXEL_ENC_CONV (MEDIA_ENT_F_BASE + 0x4003) #define MEDIA_ENT_F_PROC_VIDEO_LUT (MEDIA_ENT_F_BASE + 0x4004) #define MEDIA_ENT_F_PROC_VIDEO_SCALER (MEDIA_ENT_F_BASE + 0x4005) #define MEDIA_ENT_F_PROC_VIDEO_STATISTICS (MEDIA_ENT_F_BASE + 0x4006) #define MEDIA_ENT_F_PROC_VIDEO_ENCODER (MEDIA_ENT_F_BASE + 0x4007) #define MEDIA_ENT_F_PROC_VIDEO_DECODER (MEDIA_ENT_F_BASE + 0x4008) /* * Switch and bridge entity functions */ #define MEDIA_ENT_F_VID_MUX (MEDIA_ENT_F_BASE + 0x5001) #define MEDIA_ENT_F_VID_IF_BRIDGE (MEDIA_ENT_F_BASE + 0x5002) /* * Video decoder/encoder functions */ #define MEDIA_ENT_F_ATV_DECODER (MEDIA_ENT_F_OLD_SUBDEV_BASE + 4) #define MEDIA_ENT_F_DV_DECODER (MEDIA_ENT_F_BASE + 0x6001) #define MEDIA_ENT_F_DV_ENCODER (MEDIA_ENT_F_BASE + 0x6002) /* Entity flags */ #define MEDIA_ENT_FL_DEFAULT (1 << 0) #define MEDIA_ENT_FL_CONNECTOR (1 << 1) /* OR with the entity id value to find the next entity */ #define MEDIA_ENT_ID_FLAG_NEXT (1 << 31) struct media_entity_desc { __u32 id; char name[32]; __u32 type; __u32 revision; __u32 flags; __u32 group_id; __u16 pads; __u16 links; __u32 reserved[4]; union { /* Node specifications */ struct { __u32 major; __u32 minor; } dev; /* * TODO: this shouldn't have been added without * actual drivers that use this. When the first real driver * appears that sets this information, special attention * should be given whether this information is 1) enough, and * 2) can deal with udev rules that rename devices. The struct * dev would not be sufficient for this since that does not * contain the subdevice information. In addition, struct dev * can only refer to a single device, and not to multiple (e.g. * pcm and mixer devices). */ struct { __u32 card; __u32 device; __u32 subdevice; } alsa; /* * DEPRECATED: previous node specifications. Kept just to * avoid breaking compilation. Use media_entity_desc.dev * instead. */ struct { __u32 major; __u32 minor; } v4l; struct { __u32 major; __u32 minor; } fb; int dvb; /* Sub-device specifications */ /* Nothing needed yet */ __u8 raw[184]; }; }; #define MEDIA_PAD_FL_SINK (1 << 0) #define MEDIA_PAD_FL_SOURCE (1 << 1) #define MEDIA_PAD_FL_MUST_CONNECT (1 << 2) struct media_pad_desc { __u32 entity; /* entity ID */ __u16 index; /* pad index */ __u32 flags; /* pad flags */ __u32 reserved[2]; }; #define MEDIA_LNK_FL_ENABLED (1 << 0) #define MEDIA_LNK_FL_IMMUTABLE (1 << 1) #define MEDIA_LNK_FL_DYNAMIC (1 << 2) #define MEDIA_LNK_FL_LINK_TYPE (0xf << 28) # define MEDIA_LNK_FL_DATA_LINK (0 << 28) # define MEDIA_LNK_FL_INTERFACE_LINK (1 << 28) struct media_link_desc { struct media_pad_desc source; struct media_pad_desc sink; __u32 flags; __u32 reserved[2]; }; struct media_links_enum { __u32 entity; /* Should have enough room for pads elements */ struct media_pad_desc *pads; /* Should have enough room for links elements */ struct media_link_desc *links; __u32 reserved[4]; }; /* Interface type ranges */ #define MEDIA_INTF_T_DVB_BASE 0x00000100 #define MEDIA_INTF_T_V4L_BASE 0x00000200 /* Interface types */ #define MEDIA_INTF_T_DVB_FE (MEDIA_INTF_T_DVB_BASE) #define MEDIA_INTF_T_DVB_DEMUX (MEDIA_INTF_T_DVB_BASE + 1) #define MEDIA_INTF_T_DVB_DVR (MEDIA_INTF_T_DVB_BASE + 2) #define MEDIA_INTF_T_DVB_CA (MEDIA_INTF_T_DVB_BASE + 3) #define MEDIA_INTF_T_DVB_NET (MEDIA_INTF_T_DVB_BASE + 4) #define MEDIA_INTF_T_V4L_VIDEO (MEDIA_INTF_T_V4L_BASE) #define MEDIA_INTF_T_V4L_VBI (MEDIA_INTF_T_V4L_BASE + 1) #define MEDIA_INTF_T_V4L_RADIO (MEDIA_INTF_T_V4L_BASE + 2) #define MEDIA_INTF_T_V4L_SUBDEV (MEDIA_INTF_T_V4L_BASE + 3) #define MEDIA_INTF_T_V4L_SWRADIO (MEDIA_INTF_T_V4L_BASE + 4) #define MEDIA_INTF_T_V4L_TOUCH (MEDIA_INTF_T_V4L_BASE + 5) /* * MC next gen API definitions */ /* * Appeared in 4.19.0. * * The media_version argument comes from the media_version field in * struct media_device_info. */ #define MEDIA_V2_ENTITY_HAS_FLAGS(media_version) \ ((media_version) >= ((4 << 16) | (19 << 8) | 0)) struct media_v2_entity { __u32 id; char name[64]; __u32 function; /* Main function of the entity */ __u32 flags; __u32 reserved[5]; } __attribute__ ((packed)); /* Should match the specific fields at media_intf_devnode */ struct media_v2_intf_devnode { __u32 major; __u32 minor; } __attribute__ ((packed)); struct media_v2_interface { __u32 id; __u32 intf_type; __u32 flags; __u32 reserved[9]; union { struct media_v2_intf_devnode devnode; __u32 raw[16]; }; } __attribute__ ((packed)); /* * Appeared in 4.19.0. * * The media_version argument comes from the media_version field in * struct media_device_info. */ #define MEDIA_V2_PAD_HAS_INDEX(media_version) \ ((media_version) >= ((4 << 16) | (19 << 8) | 0)) struct media_v2_pad { __u32 id; __u32 entity_id; __u32 flags; __u32 index; __u32 reserved[4]; } __attribute__ ((packed)); struct media_v2_link { __u32 id; __u32 source_id; __u32 sink_id; __u32 flags; __u32 reserved[6]; } __attribute__ ((packed)); struct media_v2_topology { __u64 topology_version; __u32 num_entities; __u32 reserved1; __u64 ptr_entities; __u32 num_interfaces; __u32 reserved2; __u64 ptr_interfaces; __u32 num_pads; __u32 reserved3; __u64 ptr_pads; __u32 num_links; __u32 reserved4; __u64 ptr_links; } __attribute__ ((packed)); /* ioctls */ #define MEDIA_IOC_DEVICE_INFO _IOWR('|', 0x00, struct media_device_info) #define MEDIA_IOC_ENUM_ENTITIES _IOWR('|', 0x01, struct media_entity_desc) #define MEDIA_IOC_ENUM_LINKS _IOWR('|', 0x02, struct media_links_enum) #define MEDIA_IOC_SETUP_LINK _IOWR('|', 0x03, struct media_link_desc) #define MEDIA_IOC_G_TOPOLOGY _IOWR('|', 0x04, struct media_v2_topology) #define MEDIA_IOC_REQUEST_ALLOC _IOR ('|', 0x05, int) /* * These ioctls are called on the request file descriptor as returned * by MEDIA_IOC_REQUEST_ALLOC. */ #define MEDIA_REQUEST_IOC_QUEUE _IO('|', 0x80) #define MEDIA_REQUEST_IOC_REINIT _IO('|', 0x81) /* * Legacy symbols used to avoid userspace compilation breakages. * Do not use any of this in new applications! * * Those symbols map the entity function into types and should be * used only on legacy programs for legacy hardware. Don't rely * on those for MEDIA_IOC_G_TOPOLOGY. */ #define MEDIA_ENT_TYPE_SHIFT 16 #define MEDIA_ENT_TYPE_MASK 0x00ff0000 #define MEDIA_ENT_SUBTYPE_MASK 0x0000ffff #define MEDIA_ENT_T_DEVNODE_UNKNOWN (MEDIA_ENT_F_OLD_BASE | \ MEDIA_ENT_SUBTYPE_MASK) #define MEDIA_ENT_T_DEVNODE MEDIA_ENT_F_OLD_BASE #define MEDIA_ENT_T_DEVNODE_V4L MEDIA_ENT_F_IO_V4L #define MEDIA_ENT_T_DEVNODE_FB (MEDIA_ENT_F_OLD_BASE + 2) #define MEDIA_ENT_T_DEVNODE_ALSA (MEDIA_ENT_F_OLD_BASE + 3) #define MEDIA_ENT_T_DEVNODE_DVB (MEDIA_ENT_F_OLD_BASE + 4) #define MEDIA_ENT_T_UNKNOWN MEDIA_ENT_F_UNKNOWN #define MEDIA_ENT_T_V4L2_VIDEO MEDIA_ENT_F_IO_V4L #define MEDIA_ENT_T_V4L2_SUBDEV MEDIA_ENT_F_V4L2_SUBDEV_UNKNOWN #define MEDIA_ENT_T_V4L2_SUBDEV_SENSOR MEDIA_ENT_F_CAM_SENSOR #define MEDIA_ENT_T_V4L2_SUBDEV_FLASH MEDIA_ENT_F_FLASH #define MEDIA_ENT_T_V4L2_SUBDEV_LENS MEDIA_ENT_F_LENS #define MEDIA_ENT_T_V4L2_SUBDEV_DECODER MEDIA_ENT_F_ATV_DECODER #define MEDIA_ENT_T_V4L2_SUBDEV_TUNER MEDIA_ENT_F_TUNER #define MEDIA_ENT_F_DTV_DECODER MEDIA_ENT_F_DV_DECODER /* * There is still no ALSA support in the media controller. These * defines should not have been added and we leave them here only * in case some application tries to use these defines. */ #define MEDIA_INTF_T_ALSA_BASE 0x00000300 #define MEDIA_INTF_T_ALSA_PCM_CAPTURE (MEDIA_INTF_T_ALSA_BASE) #define MEDIA_INTF_T_ALSA_PCM_PLAYBACK (MEDIA_INTF_T_ALSA_BASE + 1) #define MEDIA_INTF_T_ALSA_CONTROL (MEDIA_INTF_T_ALSA_BASE + 2) #define MEDIA_INTF_T_ALSA_COMPRESS (MEDIA_INTF_T_ALSA_BASE + 3) #define MEDIA_INTF_T_ALSA_RAWMIDI (MEDIA_INTF_T_ALSA_BASE + 4) #define MEDIA_INTF_T_ALSA_HWDEP (MEDIA_INTF_T_ALSA_BASE + 5) #define MEDIA_INTF_T_ALSA_SEQUENCER (MEDIA_INTF_T_ALSA_BASE + 6) #define MEDIA_INTF_T_ALSA_TIMER (MEDIA_INTF_T_ALSA_BASE + 7) /* Obsolete symbol for media_version, no longer used in the kernel */ #define MEDIA_API_VERSION ((0 << 16) | (1 << 8) | 0) #endif /* __LINUX_MEDIA_H */