Enabling mjpg for Windows.
BUG=306 TEST=ViE loopback call on windows with resolution 960x720 Review URL: https://webrtc-codereview.appspot.com/411003 git-svn-id: http://webrtc.googlecode.com/svn/trunk@1770 4adac7df-926f-26a2-2b94-8c16560cd09d
This commit is contained in:
parent
1bb1da4c30
commit
b4556cd29a
@ -18,9 +18,6 @@
|
||||
|
||||
#define DELETE_RESET(p) { delete (p) ; (p) = NULL ;}
|
||||
|
||||
// TODO(mflodman) Remove WEBRTC_MJPEG when MJPG->I420 conversion is available.
|
||||
// #define WEBRTC_MJPEG
|
||||
|
||||
namespace webrtc
|
||||
{
|
||||
namespace videocapturemodule
|
||||
@ -139,7 +136,6 @@ CaptureInputPin::GetMediaType (IN int iPosition, OUT CMediaType * pmt)
|
||||
pmt->SetSubtype(&MEDIASUBTYPE_UYVY);
|
||||
}
|
||||
break;
|
||||
#ifdef WEBRTC_MJPEG
|
||||
case 4:
|
||||
{
|
||||
pvi->bmiHeader.biCompression = MAKEFOURCC('M','J','P','G');
|
||||
@ -151,7 +147,6 @@ CaptureInputPin::GetMediaType (IN int iPosition, OUT CMediaType * pmt)
|
||||
pmt->SetSubtype(&MEDIASUBTYPE_MJPG);
|
||||
}
|
||||
break;
|
||||
#endif
|
||||
default :
|
||||
return VFW_S_NO_MORE_ITEMS;
|
||||
}
|
||||
@ -198,14 +193,12 @@ CaptureInputPin::CheckMediaType ( IN const CMediaType * pMediaType)
|
||||
pvi->bmiHeader.biWidth,pvi->bmiHeader.biHeight,
|
||||
pvi->bmiHeader.biCompression);
|
||||
|
||||
#ifdef WEBRTC_MJPEG
|
||||
if(*SubType == MEDIASUBTYPE_MJPG
|
||||
&& pvi->bmiHeader.biCompression == MAKEFOURCC('M','J','P','G'))
|
||||
{
|
||||
_resultingCapability.rawType = kVideoMJPEG;
|
||||
return S_OK; // This format is acceptable.
|
||||
}
|
||||
#endif
|
||||
if(*SubType == MEDIASUBTYPE_I420
|
||||
&& pvi->bmiHeader.biCompression == MAKEFOURCC('I','4','2','0'))
|
||||
{
|
||||
@ -256,14 +249,12 @@ CaptureInputPin::CheckMediaType ( IN const CMediaType * pMediaType)
|
||||
_resultingCapability.width = pvi->bmiHeader.biWidth;
|
||||
_resultingCapability.height = abs(pvi->bmiHeader.biHeight);
|
||||
|
||||
#ifdef WEBRTC_MJPEG
|
||||
if(*SubType == MEDIASUBTYPE_MJPG
|
||||
&& pvi->bmiHeader.biCompression == MAKEFOURCC('M','J','P','G'))
|
||||
{
|
||||
_resultingCapability.rawType = kVideoMJPEG;
|
||||
return S_OK; // This format is acceptable.
|
||||
}
|
||||
#endif
|
||||
if(*SubType == MEDIASUBTYPE_I420
|
||||
&& pvi->bmiHeader.biCompression == MAKEFOURCC('I','4','2','0'))
|
||||
{
|
||||
|
@ -17,9 +17,6 @@
|
||||
#define abs(a) (a>=0?a:-a)
|
||||
#endif
|
||||
|
||||
// TODO(mflodman) Remove WEBRTC_MJPEG when MJPG->I420 conversion is available.
|
||||
// #define WEBRTC_MJPEG
|
||||
|
||||
namespace webrtc
|
||||
{
|
||||
namespace videocapturemodule
|
||||
@ -196,11 +193,6 @@ WebRtc_Word32 DeviceInfoImpl::GetBestMatchedCapability(
|
||||
VideoCaptureCapability& capability = *static_cast<VideoCaptureCapability*>
|
||||
(item->GetItem());
|
||||
|
||||
//#ifndef WEBRTC_MJPEG
|
||||
// if (capability.rawType == kVideoMJPEG)
|
||||
// continue;
|
||||
//#endif
|
||||
|
||||
const WebRtc_Word32 diffWidth = capability.width - requested.width;
|
||||
const WebRtc_Word32 diffHeight = capability.height - requested.height;
|
||||
const WebRtc_Word32 diffFrameRate = capability.maxFPS - requested.maxFPS;
|
||||
|
Loading…
Reference in New Issue
Block a user