1 /* 2 * Copyright (c) 2010 The WebM project authors. All Rights Reserved. 3 * 4 * Use of this source code is governed by a BSD-style license 5 * that can be found in the LICENSE file in the root of the source 6 * tree. An additional intellectual property rights grant can be found 7 * in the file PATENTS. All contributing project authors may 8 * be found in the AUTHORS file in the root of the source tree. 9 */ 10 11 12 #if !defined(VFWSETTING_HPP) 13 #define VFWSETTING_HPP 14 //______________________________________________________________________________ 15 // 16 // VFWSetting.hpp 17 // 18 19 #include "four_cc.hpp" 20 #include <iosfwd> 21 22 namespace vpxvp 23 { 24 25 //-------------------------------------- 26 class VFWSetting 27 { 28 friend std::ostream& operator<<(std::ostream& os, const VFWSetting& vfws); 29 30 public: 31 32 enum Mode 33 { 34 m_setting, 35 m_config 36 }; 37 38 enum 39 { 40 header_size = 8, 41 Size = 16 42 }; 43 44 VFWSetting(four_cc fcc); 45 ~VFWSetting(); 46 47 four_cc fcc() const; 48 Mode mode() const; 49 50 int setting() const; 51 int value() const; 52 void setting_value(int i_setting, int i_value); // Sets mode to m_setting 53 54 long size() const; 55 const void* data() const; 56 int data(const void* p_data, unsigned long ul_size); 57 58 private: 59 60 VFWSetting(const VFWSetting& vfws); // Not implemented 61 VFWSetting& operator=(const VFWSetting& vfws); // Not implemented 62 63 int extract_(const void* p_data, unsigned long ul_size); 64 void update_() const; 65 66 four_cc m_fcc; 67 Mode m_mode; 68 int m_i_setting; 69 int m_i_value; 70 71 mutable unsigned char m_p_data[Size]; 72 }; 73 74 } // namespace vpxvp 75 76 #endif // VFWSETTING_HPP 77