Ignore:
Timestamp:
Feb 11, 2010, 11:19:06 PM (15 years ago)
Author:
Dmitry A. Kuminov
Message:

trunk: Merged in qt 4.6.1 sources.

Location:
trunk
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • trunk

  • trunk/src/3rdparty/phonon/ds9/fakesource.cpp

    r2 r561  
    3030    {
    3131        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)};
    3436
    3537        class FakePin : public QPin
     
    129131        void FakeSource::createFakeAudioPin()
    130132        {
    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);
    143134        }
    144135
    145136        void FakeSource::createFakeVideoPin()
    146137        {
    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);
    161139        }
    162140
Note: See TracChangeset for help on using the changeset viewer.