summaryrefslogtreecommitdiffstats
path: root/m_property.c
diff options
context:
space:
mode:
authoralbeu <albeu@b3059339-0415-0410-9bf9-f77b7e298cf2>2007-05-29 22:14:41 +0000
committeralbeu <albeu@b3059339-0415-0410-9bf9-f77b7e298cf2>2007-05-29 22:14:41 +0000
commitc5362c72da7dcd82e061bbd2e9242a9cd3a86229 (patch)
treef6647b08468492eed6ad55db861c154a7878bfeb /m_property.c
parent1654c2bd80110fea2c2665b1a8499c7ee8eefd2a (diff)
downloadmpv-c5362c72da7dcd82e061bbd2e9242a9cd3a86229.tar.bz2
mpv-c5362c72da7dcd82e061bbd2e9242a9cd3a86229.tar.xz
Make all the info available via the metadata API available via properties.
git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@23412 b3059339-0415-0410-9bf9-f77b7e298cf2
Diffstat (limited to 'm_property.c')
-rw-r--r--m_property.c12
1 files changed, 12 insertions, 0 deletions
diff --git a/m_property.c b/m_property.c
index 61d2ac33df..20d5bbdbe7 100644
--- a/m_property.c
+++ b/m_property.c
@@ -331,3 +331,15 @@ int m_property_string_ro(m_option_t* prop,int action,void* arg,char* str) {
}
return M_PROPERTY_NOT_IMPLEMENTED;
}
+
+int m_property_bitrate(m_option_t* prop,int action,void* arg,int rate) {
+ switch(action) {
+ case M_PROPERTY_PRINT:
+ if (!arg)
+ return M_PROPERTY_ERROR;
+ *(char**)arg = malloc (16);
+ sprintf(*(char**)arg, "%d kbps", rate*8/1000);
+ return M_PROPERTY_OK;
+ }
+ return m_property_int_ro(prop, action, arg, rate);
+}