Skip to content

Commit e542e76

Browse files
Googlerjwcullen
authored andcommitted
Add skeleton for DualCart16ParameterData.
This change introduces the `DualCart16ParameterData` class, which inherits from `ParameterData`. It includes skeleton implementations for `ReadAndValidate`, `Write`, and `Print` methods, all of which currently return `UnimplementedError`. PiperOrigin-RevId: 844486193
1 parent 7658dc3 commit e542e76

File tree

3 files changed

+87
-0
lines changed

3 files changed

+87
-0
lines changed

iamf/obu/BUILD

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -117,6 +117,19 @@ cc_library(
117117
],
118118
)
119119

120+
cc_library(
121+
name = "dual_cart16_parameter_data",
122+
srcs = ["dual_cart16_parameter_data.cc"],
123+
hdrs = ["dual_cart16_parameter_data.h"],
124+
deps = [
125+
":parameter_data",
126+
"//iamf/common:read_bit_buffer",
127+
"//iamf/common:write_bit_buffer",
128+
"@abseil-cpp//absl/log:absl_log",
129+
"@abseil-cpp//absl/status",
130+
],
131+
)
132+
120133
cc_library(
121134
name = "dual_cart8_parameter_data",
122135
srcs = ["dual_cart8_parameter_data.cc"],
Lines changed: 22 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,22 @@
1+
#include "iamf/obu/dual_cart16_parameter_data.h"
2+
3+
#include "absl/log/absl_log.h"
4+
#include "absl/status/status.h"
5+
#include "iamf/common/read_bit_buffer.h"
6+
#include "iamf/common/write_bit_buffer.h"
7+
8+
namespace iamf_tools {
9+
10+
absl::Status DualCart16ParameterData::ReadAndValidate(ReadBitBuffer& rb) {
11+
return absl::UnimplementedError("ReadAndValidate is not implemented yet.");
12+
}
13+
14+
absl::Status DualCart16ParameterData::Write(WriteBitBuffer& wb) const {
15+
return absl::UnimplementedError("Write is not implemented yet.");
16+
}
17+
18+
void DualCart16ParameterData::Print() const {
19+
ABSL_LOG(INFO) << "DualCart16ParameterData printing is not implemented yet:";
20+
}
21+
22+
} // namespace iamf_tools
Lines changed: 52 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,52 @@
1+
/*
2+
* Copyright (c) 2025, Alliance for Open Media. All rights reserved
3+
*
4+
* This source code is subject to the terms of the BSD 3-Clause Clear License
5+
* and the Alliance for Open Media Patent License 1.0. If the BSD 3-Clause Clear
6+
* License was not distributed with this source code in the LICENSE file, you
7+
* can obtain it at www.aomedia.org/license/software-license/bsd-3-c-c. If the
8+
* Alliance for Open Media Patent License 1.0 was not distributed with this
9+
* source code in the PATENTS file, you can obtain it at
10+
* www.aomedia.org/license/patent.
11+
*/
12+
#ifndef OBU_DUAL_CART16_PARAMETER_DATA_H_
13+
#define OBU_DUAL_CART16_PARAMETER_DATA_H_
14+
15+
#include "absl/status/status.h"
16+
#include "iamf/common/read_bit_buffer.h"
17+
#include "iamf/common/write_bit_buffer.h"
18+
#include "iamf/obu/parameter_data.h"
19+
20+
namespace iamf_tools {
21+
22+
struct DualCart16ParameterData : public ParameterData {
23+
DualCart16ParameterData() = default;
24+
25+
/*!\brief Overridden destructor.
26+
*/
27+
~DualCart16ParameterData() override = default;
28+
29+
bool friend operator==(const DualCart16ParameterData& lhs,
30+
const DualCart16ParameterData& rhs) = default;
31+
32+
/*!\brief Reads and validates a `DualCart16ParameterData` from a buffer.
33+
*
34+
* \param rb Buffer to read from.
35+
* \return `absl::OkStatus()` if successful. A specific status on failure.
36+
*/
37+
absl::Status ReadAndValidate(ReadBitBuffer& rb) override;
38+
39+
/*!\brief Validates and writes to a buffer.
40+
*
41+
* \param wb Buffer to write to.
42+
* \return `absl::OkStatus()` if successful. A specific status on failure.
43+
*/
44+
absl::Status Write(WriteBitBuffer& wb) const override;
45+
46+
/*!\brief Prints the DualCart16 parameter data.
47+
*/
48+
void Print() const override;
49+
};
50+
} // namespace iamf_tools
51+
52+
#endif // OBU_DUAL_CART16_PARAMETER_DATA_H_

0 commit comments

Comments
 (0)