[vlc-commits] dshow: implement ACCESS_GET_CONTENT_TYPE

Rémi Denis-Courmont git at videolan.org
Sat Jul 25 17:10:39 CEST 2015


vlc | branch: master | Rémi Denis-Courmont <remi at remlab.net> | Sat Jul 25 17:53:32 2015 +0300| [ecd3ace21f59da290a79decd671656206d468390] | committer: Rémi Denis-Courmont

dshow: implement ACCESS_GET_CONTENT_TYPE

> http://git.videolan.org/gitweb.cgi/vlc.git/?a=commit;h=ecd3ace21f59da290a79decd671656206d468390
---

 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..c70449b 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_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