Skip to content
Permalink
Browse files

Also added FORMAT_UVCH264Video support to manual connection format de…

…tails dialog; updates #285
  • Loading branch information...
roman380 committed Dec 10, 2015
1 parent a041590 commit af235b5bac494535e02be826ba3e27f3e57e5f7e
Showing with 19 additions and 6 deletions.
  1. +18 −5 src/dsutil.cpp
  2. +1 −1 src/guid_list.cpp
@@ -2175,11 +2175,24 @@ namespace DSUtil
if (mediaType.pbFormat)
{
const BITMAPINFOHEADER* bmi = NULL;
if(mediaType.formattype == FORMAT_VideoInfo && mediaType.cbFormat >= sizeof(VIDEOINFOHEADER))
bmi = &((const VIDEOINFOHEADER*)mediaType.pbFormat)->bmiHeader;
else if( (mediaType.formattype == FORMAT_VideoInfo2 || mediaType.formattype == FORMAT_MPEG2_VIDEO)
&& mediaType.cbFormat >= sizeof(VIDEOINFOHEADER2) )
bmi = &((const VIDEOINFOHEADER2*)mediaType.pbFormat)->bmiHeader;
if(mediaType.formattype == FORMAT_VideoInfo && mediaType.cbFormat >= sizeof (VIDEOINFOHEADER))
bmi = &((const VIDEOINFOHEADER*) mediaType.pbFormat)->bmiHeader;
else
if((mediaType.formattype == FORMAT_VideoInfo2 || mediaType.formattype == FORMAT_MPEG2_VIDEO) && mediaType.cbFormat >= sizeof (VIDEOINFOHEADER2))
bmi = &((const VIDEOINFOHEADER2*) mediaType.pbFormat)->bmiHeader;
#if _MSC_VER >= 1800 // Visual Studio 2013
else
if(mediaType.formattype == FORMAT_UVCH264Video && mediaType.cbFormat >= offsetof(KS_H264VIDEOINFO, bMaxCodecConfigDelay))
{
const KS_H264VIDEOINFO* pH264VideoInfo = (const KS_H264VIDEOINFO*) mediaType.pbFormat;
formatDetails.Format(_T("%4d x %4d"),
pH264VideoInfo->wWidth, pH264VideoInfo->wHeight);
if(pH264VideoInfo->dwFrameInterval > 0)
formatDetails.AppendFormat(_T(", %.2f fps"), 1E7 / pH264VideoInfo->dwFrameInterval);
formatDetails.AppendFormat(_T(", profile 0x%04X, level %d"),
pH264VideoInfo->wProfile, pH264VideoInfo->bLevelIDC);
}
#endif // _MSC_VER

if(bmi != NULL)
{
@@ -256,7 +256,7 @@ GRAPHSTUDIO_NAMESPACE_START // cf stdafx.h for explanation
KNOWN(FORMAT_UVCH264Video),
KNOWN(FORMAT_JPEGImage),
KNOWN(FORMAT_Image),
#endif
#endif // _MSC_VER

// Wave formats
KNOWN(KSDATAFORMAT_SUBTYPE_PCM),

0 comments on commit af235b5

Please sign in to comment.
You can’t perform that action at this time.