aboutsummaryrefslogtreecommitdiffstats
path: root/contrib
diff options
context:
space:
mode:
authorMauro Carvalho Chehab <mchehab@osg.samsung.com>2015-09-06 13:05:09 -0300
committerMauro Carvalho Chehab <mchehab@osg.samsung.com>2016-01-25 08:00:23 -0200
commit79c21fb5d75fa88415e48ed40bbb9cc700aa271d (patch)
treecbfe17b7d3cef028942a2724dddcbd382a063e5e /contrib
parent0d2044ede0d2753fe40a0032357d02ca8ff80b2a (diff)
mc_nextgen_test: Update to print the entity functions
Signed-off-by: Mauro Carvalho Chehab <mchehab@osg.samsung.com>
Diffstat (limited to 'contrib')
-rw-r--r--contrib/test/mc_nextgen_test.c46
1 files changed, 43 insertions, 3 deletions
diff --git a/contrib/test/mc_nextgen_test.c b/contrib/test/mc_nextgen_test.c
index 3ec42850..1befb849 100644
--- a/contrib/test/mc_nextgen_test.c
+++ b/contrib/test/mc_nextgen_test.c
@@ -154,6 +154,7 @@ static inline const char *gobj_type(uint32_t id)
return "unknown";
}
}
+
static inline const char *intf_type(uint32_t intf_type)
{
switch (intf_type) {
@@ -194,6 +195,44 @@ static inline const char *intf_type(uint32_t intf_type)
}
};
+static inline const char *ent_function(uint32_t function)
+{
+ switch (function) {
+ case MEDIA_ENT_F_DTV_DEMOD:
+ return "DTV demod";
+ case MEDIA_ENT_F_MPEG_TS_DEMUX:
+ return "MPEG-TS demux";
+ case MEDIA_ENT_F_DTV_CA:
+ return "DTV CA";
+ case MEDIA_ENT_F_DTV_NET_DECAP:
+ return "DTV Network decap";
+ case MEDIA_ENT_F_CONN_RF:
+ return "RF connector";
+ case MEDIA_ENT_F_CONN_SVIDEO:
+ return "S-Video connector";
+ case MEDIA_ENT_F_CONN_COMPOSITE:
+ return "Composite connector";
+ case MEDIA_ENT_F_CONN_TEST:
+ return "Test connector";
+ case MEDIA_ENT_F_IO:
+ return "I/O";
+ case MEDIA_ENT_F_CAM_SENSOR:
+ return "Camera Sensor";
+ case MEDIA_ENT_F_FLASH:
+ return "Flash LED/light";
+ case MEDIA_ENT_F_LENS:
+ return "Lens";
+ case MEDIA_ENT_F_ATV_DECODER:
+ return "ATV decoder";
+ case MEDIA_ENT_F_TUNER:
+ return "tuner";
+ case MEDIA_ENT_F_V4L2_SUBDEV_UNKNOWN:
+ return "unknown V4L2 subdev";
+ default:
+ return "unknown";
+ }
+}
+
/* Ancilary function to produce an human readable ID for an object */
static char *objname(uint32_t id, char delimiter)
@@ -388,8 +427,9 @@ static void media_show_entities(struct media_controller *mc)
}
obj = objname(entity->id, '#');
- show(YELLOW, 0, "entity %s: %s, %d pad(s)",
- obj, entity->name, num_pads);
+ show(YELLOW, 0, "entity %s: '%s' %s, %d pad(s)",
+ obj, ent_function(entity->function),
+ entity->name, num_pads);
if (num_sinks)
show(YELLOW, 0,", %d sink(s)", num_sinks);
if (num_sources)
@@ -659,7 +699,7 @@ static void media_show_graphviz(struct media_controller *mc)
printf("} | ");
}
obj = objname(entity->id, '_');
- printf("%s\\n%s", obj, entity->name);
+ printf("%s\\n%s\\n%s", obj, ent_function(entity->function), entity->name);
free(obj);
/* Print the source pads */
if (!gobj || gobj->num_pad_sources) {

Privacy Policy