aboutsummaryrefslogtreecommitdiffstats
path: root/utils/common/media-info.cpp
AgeCommit message (Collapse)AuthorFilesLines
2018-12-13Add property compliance supportprops2Hans Verkuil1-0/+76
Signed-off-by: Hans Verkuil <hverkuil-cisco@xs4all.nl>
2018-11-29media-info: fix more checks around radio interfacesHans Verkuil1-14/+29
Radio interfaces do not link to an entity, so link/entity checking should be skipped. Commit dce0945e8220 tried to fix this, but it was incomplete. This change completely skips the link and entity checks of an interface since radio interfaces are completely stand-alone at the moment. Signed-off-by: Hans Verkuil <hverkuil-cisco@xs4all.nl>
2018-11-26media-info: use hex to log IDs, fix radio interface checkHans Verkuil1-4/+4
In two places an object ID was printed in decimal instead of hex. Change this to hex to consistency. The interface check was also wrong: radio devices do not have a link to an entity since the actual audio signal goes via alsa or an external loopback cable. Signed-off-by: Hans Verkuil <hverkuil-cisco@xs4all.nl>
2018-11-26media-info: add bus_info arg to mi_get_media_fd()Hans Verkuil1-1/+9
Some drivers might have multiple media devices, and in that case you have to select the right one based on the bus_info. Currently this is only the case for the vivid driver if it creates multiple instances. Signed-off-by: Hans Verkuil <hverkuil-cisco@xs4all.nl>
2018-09-15cec/media/v4l2-info+v4l-stream: GPL-2.0 -> LGPL-2.1Hans Verkuil1-1/+1
Change the license for these sources and headers to LGPL-2.1 from GPL-2.0 since that allows them to be used in libraries. Signed-off-by: Hans Verkuil <hans.verkuil@cisco.com>
2018-07-25media-info.cpp: show new pad index and entity flags fieldsHans Verkuil1-4/+10
Support the new fields (if media_version is new enough). Signed-off-by: Hans Verkuil <hans.verkuil@cisco.com>
2018-07-25media-info.cpp: support new functionsHans Verkuil1-1/+4
Support the new Digital Video and codec functions. Signed-off-by: Hans Verkuil <hans.verkuil@cisco.com>
2018-07-02media-info: various improvementsHans Verkuil1-15/+32
- consistently use the mi_ prefix for the exported functions - add missing MEDIA_TYPE_DTV_CA - add mi_func_requires_intf() and test for this in v4l2-compliance Signed-off-by: Hans Verkuil <hans.verkuil@cisco.com>
2018-07-01v4l2-compliance: show data link flagsHans Verkuil1-1/+1
Show the data link flags. Interface link flags are not shown since they are always the same. Drop the unwanted "Entity Link" messages. Signed-off-by: Hans Verkuil <hans.verkuil@cisco.com>
2018-07-01v4l2-compliance: improve the output of unknown legacy typesHans Verkuil1-5/+7
Instead of text like this: Entity: 0x00000003 (Name: 'vicodec-enc-proc', Type: Unknown legacy device node type (0001ffff)) just print this: Entity: 0x00000003 (Name: 'vicodec-enc-proc', Type: Unknown Device Node) Signed-off-by: Hans Verkuil <hans.verkuil@cisco.com>
2018-06-23media-info: add new helper functionsHans Verkuil1-4/+54
Add a helper to obtain the dev_t from a file descriptor: int mi_get_dev_t_from_fd(int fd, dev_t *dev); Add a helper to return the device node path from a dev_t: std::string mi_get_devpath_from_dev_t(dev_t dev); Signed-off-by: Hans Verkuil <hans.verkuil@cisco.com>
2018-02-23media-info: add MEDIA_ENT_F_DTV_DECODER supportHans Verkuil1-0/+1
Add support for this new function. Signed-off-by: Hans Verkuil <hans.verkuil@cisco.com>
2018-02-09media-info: don't add 'FAIL'/'WARNING' if is_invalid == NULLHans Verkuil1-11/+24
It is confusing to see these 'FAIL'/'WARNING' prefixes in v4l2-ctl. Only show them if the caller is actually interested in whether the function is valid or not. Signed-off-by: Hans Verkuil <hans.verkuil@cisco.com>
2018-02-08v4l2-compliance: improve media info testHans Verkuil1-11/+19
- don't fail when an unknown function ID is detected, make it a warning since it is more likely that v4l2-compliance hasn't been updated. - clarify what 'test MC information' actually refers to and also fail it when the returned topology infomation is inconsistent. Signed-off-by: Hans Verkuil <hans.verkuil@cisco.com>
2018-02-07v4l2-compliance: more stringent type/function testsHans Verkuil1-0/+13
Make sure the old legacy bases are not used for any new functions. Signed-off-by: Hans Verkuil <hans.verkuil@cisco.com>
2018-02-07v4l-utils: add SPDX license tagsHans Verkuil1-13/+1
Replace existing licenses with SPDX license tags for those files authored by Cisco. Signed-off-by: Hans Verkuil <hans.verkuil@cisco.com>
2018-02-07v4l2-compliance: test media informationHans Verkuil1-26/+36
Test if the media information is correct. I.e. no UNKNOWN functions are reported through G_TOPOLOGY. Signed-off-by: Hans Verkuil <hans.verkuil@cisco.com>
2018-02-05media-info: use .c_str for ifstream constructorHans Verkuil1-2/+2
Needed for pre-C++11 compilers that do not understand std::string as constructor argument. Signed-off-by: Hans Verkuil <hans.verkuil@cisco.com> Reported-by: Tim Harvey <tharvey@gateworks.com>
2018-02-04v4l2-compliance: add -M option to test all /dev/mediaX interfacesHans Verkuil1-0/+89
Add a new -M option to test all interfaces defines in the media controller. Also moved v4l2_type back from v4l2-info to media-info since the media device defines more than just v4l2 interfaces. It makes more sense to put this in media-info. Signed-off-by: Hans Verkuil <hans.verkuil@cisco.com>
2018-02-04v4l2-compliance/v4l2-ctl: more device detection improvementsHans Verkuil1-16/+19
More improvements in detecting the type of a device. Also fix a bug introduced in commit ce29414c85 ("v4l2-ctl/v4l2-compliance: reuse media info code") that broke the v4l-subdev tests in v4l2-compliance. Signed-off-by: Hans Verkuil <hans.verkuil@cisco.com>
2018-02-04v4l2-info: move mi_is_subdevice() to v4l2-info.cppHans Verkuil1-63/+12
The mi_is_subdevice() is v4l2 specific, so it belongs in v4l2-info.cpp, not in media-info.cpp. Move and rename to v4l2_is_subdevice accordingly. Signed-off-by: Hans Verkuil <hans.verkuil@cisco.com>
2018-02-04v4l2-ctl/v4l2-compliance: reuse media info codeHans Verkuil1-0/+472
The code that displays the media information for an interface is now centralized in common/media-info.cpp and used by both v4l2-ctl and v4l2-compliance. In addition, this code now uses G_TOPOLOGY if available. Signed-off-by: Hans Verkuil <hans.verkuil@cisco.com>

Privacy Policy