[vlc-commits] dshow: implement ACCESS_GET_CONTENT_TYPE
Rémi Denis-Courmont
git at videolan.org
Sat Jul 25 17:18:14 CEST 2015
vlc | branch: master | Rémi Denis-Courmont <remi at remlab.net> | Sat Jul 25 17:53:32 2015 +0300| [2ff8049f8eb9cad6ae46b182b437881555343dd7] | committer: Rémi Denis-Courmont
dshow: implement ACCESS_GET_CONTENT_TYPE
> http://git.videolan.org/gitweb.cgi/vlc.git/?a=commit;h=2ff8049f8eb9cad6ae46b182b437881555343dd7
---
modules/access/dshow/dshow.cpp | 15 +++++++++++++++
1 file changed, 15 insertions(+)
diff --git a/modules/access/dshow/dshow.cpp b/modules/access/dshow/dshow.cpp
index e8cc75c..c83b716 100644
--- a/modules/access/dshow/dshow.cpp
+++ b/modules/access/dshow/dshow.cpp
@@ -1933,6 +1933,21 @@ static int AccessControl( access_t *p_access, int i_query, va_list args )
INT64_C(1000) * var_InheritInteger( p_access, "live-caching" );
break;
+ case ACCESS_GET_CONTENT_TYPE:
+ {
+ dshow_stream_t *p_stream = p_access->p_sys->pp_streams[0];
+ char **type = va_arg( args, char ** );
+
+ /* Check if we need to force demuxers */
+ if( p_stream->i_fourcc == VLC_CODEC_DV )
+ *type = strdup( "video/dv" );
+ else if( p_stream->i_fourcc == VLC_CODEC_MPGV )
+ *type = strdup( "video/mpeg" );
+ else
+ return VLC_EGENERIC;
+ break;
+ }
+
default:
return VLC_EGENERIC;
}
More information about the vlc-commits
mailing list