Changeset 561 for trunk/src/3rdparty/phonon/ds9/fakesource.cpp
- Timestamp:
- Feb 11, 2010, 11:19:06 PM (15 years ago)
- Location:
- trunk
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk
-
Property svn:mergeinfo
set to (toggle deleted branches)
/branches/vendor/nokia/qt/4.6.1 merged eligible /branches/vendor/nokia/qt/current merged eligible /branches/vendor/trolltech/qt/current 3-149
-
Property svn:mergeinfo
set to (toggle deleted branches)
-
trunk/src/3rdparty/phonon/ds9/fakesource.cpp
r2 r561 30 30 { 31 31 static WAVEFORMATEX g_defaultWaveFormat = {WAVE_FORMAT_PCM, 2, 44100, 176400, 4, 16, 0}; 32 static BITMAPINFOHEADER g_defautBitmapHeader = { sizeof(BITMAPINFOHEADER), 1, 1, 1, 0, 0, 0, 0, 0, 0, 0}; 33 static VIDEOINFOHEADER2 g_defaultVideoInfo = { { 0, 0, 0, 0 }, { 0, 0, 0, 0 }, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0}; 32 static VIDEOINFOHEADER2 g_defaultVideoInfo = { { 0, 0, 0, 0 }, { 0, 0, 0, 0 }, 0, 0, 0, 0, 0, 0, 0, {0}, 0, {sizeof(BITMAPINFOHEADER), 1, 1, 1, 0, 0, 0, 0, 0, 0, 0} }; 33 34 static const AM_MEDIA_TYPE g_fakeAudioType = {MEDIATYPE_Audio, MEDIASUBTYPE_PCM, 0, 0, 2, FORMAT_WaveFormatEx, 0, sizeof(WAVEFORMATEX), reinterpret_cast<BYTE*>(&g_defaultWaveFormat)}; 35 static const AM_MEDIA_TYPE g_fakeVideoType = {MEDIATYPE_Video, MEDIASUBTYPE_RGB32, TRUE, FALSE, 0, FORMAT_VideoInfo2, 0, sizeof(VIDEOINFOHEADER2), reinterpret_cast<BYTE*>(&g_defaultVideoInfo)}; 34 36 35 37 class FakePin : public QPin … … 129 131 void FakeSource::createFakeAudioPin() 130 132 { 131 AM_MEDIA_TYPE mt; 132 qMemSet(&mt, 0, sizeof(AM_MEDIA_TYPE)); 133 mt.majortype = MEDIATYPE_Audio; 134 mt.subtype = MEDIASUBTYPE_PCM; 135 mt.formattype = FORMAT_WaveFormatEx; 136 mt.lSampleSize = 2; 137 138 //fake the format (stereo 44.1 khz stereo 16 bits) 139 mt.cbFormat = sizeof(WAVEFORMATEX); 140 mt.pbFormat = reinterpret_cast<BYTE*>(&g_defaultWaveFormat); 141 142 new FakePin(this, mt); 133 new FakePin(this, g_fakeAudioType); 143 134 } 144 135 145 136 void FakeSource::createFakeVideoPin() 146 137 { 147 AM_MEDIA_TYPE mt; 148 qMemSet(&mt, 0, sizeof(AM_MEDIA_TYPE)); 149 mt.majortype = MEDIATYPE_Video; 150 mt.subtype = MEDIASUBTYPE_RGB32; 151 mt.formattype = FORMAT_VideoInfo2; 152 mt.bFixedSizeSamples = 1; 153 154 g_defaultVideoInfo.bmiHeader = g_defautBitmapHeader; 155 156 //fake the format 157 mt.cbFormat = sizeof(VIDEOINFOHEADER2); 158 mt.pbFormat = reinterpret_cast<BYTE*>(&g_defaultVideoInfo); 159 160 new FakePin(this, mt); 138 new FakePin(this, g_fakeVideoType); 161 139 } 162 140
Note:
See TracChangeset
for help on using the changeset viewer.