summaryrefslogtreecommitdiff
path: root/avstream/avscamera/sys/CameraProfile.h
blob: fd2f1fe45d8448ad07778ba89629590a2dbfd87b (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
/**************************************************************************

    AvsCam - An AVStream Simulated Camera Device.

    Copyright (c) 2014, Microsoft Corporation.

    File:

        CameraProfile.h

    Abstract:

        This file contains the helper class CExtendedProfile.

    History:

        created 3/19/2015

**************************************************************************/

//
//  Helper class for CameraProfile
//
class CExtendedProfile : public CExtendedHeader
{
public:
    KSCAMERA_EXTENDEDPROP_PROFILE   m_Profile;

public:
    CExtendedProfile( ULONGLONG flags=0, ULONG result=STATUS_SUCCESS )
        : CExtendedHeader( flags, result )
    {
        Size = sizeof(*this);
        m_Profile.ProfileId = KSCAMERAPROFILE_Legacy;
        m_Profile.Index = 0;
        m_Profile.Reserved = 0;
    }

    CExtendedProfile( KSCAMERA_EXTENDEDPROP_HEADER &hdr )
        : CExtendedHeader(hdr)
    {
        Size = sizeof(*this);
        m_Profile.ProfileId = KSCAMERAPROFILE_Legacy;
        m_Profile.Index = 0;
        m_Profile.Reserved = 0;
    }

    bool isValid()
    {
        return CExtendedHeader::isValid() && (Size >= sizeof(*this));
    }
};