Initial WebM release
[libvpx.git] / vp8 / common / vfwsetting.hpp
blobe352e7a1907a56b155c5057151c6cf8f0cd661f7
1 /*
2 * Copyright (c) 2010 The VP8 project authors. All Rights Reserved.
4 * Use of this source code is governed by a BSD-style license and patent
5 * grant that can be found in the LICENSE file in the root of the source
6 * tree. All contributing project authors may be found in the AUTHORS
7 * file in the root of the source tree.
8 */
11 #if !defined(VFWSETTING_HPP)
12 #define VFWSETTING_HPP
13 //______________________________________________________________________________
15 // VFWSetting.hpp
18 #include "four_cc.hpp"
19 #include <iosfwd>
21 namespace vpxvp
24 //--------------------------------------
25 class VFWSetting
27 friend std::ostream& operator<<(std::ostream& os, const VFWSetting& vfws);
29 public:
31 enum Mode
33 m_setting,
34 m_config
37 enum
39 header_size = 8,
40 Size = 16
43 VFWSetting(four_cc fcc);
44 ~VFWSetting();
46 four_cc fcc() const;
47 Mode mode() const;
49 int setting() const;
50 int value() const;
51 void setting_value(int i_setting, int i_value); // Sets mode to m_setting
53 long size() const;
54 const void* data() const;
55 int data(const void* p_data, unsigned long ul_size);
57 private:
59 VFWSetting(const VFWSetting& vfws); // Not implemented
60 VFWSetting& operator=(const VFWSetting& vfws); // Not implemented
62 int extract_(const void* p_data, unsigned long ul_size);
63 void update_() const;
65 four_cc m_fcc;
66 Mode m_mode;
67 int m_i_setting;
68 int m_i_value;
70 mutable unsigned char m_p_data[Size];
73 } // namespace vpxvp
75 #endif // VFWSETTING_HPP