Lines Matching refs:format

62 void OH_AVFormat_Destroy(struct OH_AVFormat *format)  in OH_AVFormat_Destroy()  argument
64 delete format; in OH_AVFormat_Destroy()
78 bool OH_AVFormat_SetIntValue(struct OH_AVFormat *format, const char *key, int32_t value) in OH_AVFormat_SetIntValue() argument
80 FALSE_RETURN_V_MSG_E(format != nullptr, false, "input format is nullptr!"); in OH_AVFormat_SetIntValue()
81 FALSE_RETURN_V_MSG_E(format->magic_ == MFMagic::MFMAGIC_FORMAT, false, "magic error!"); in OH_AVFormat_SetIntValue()
84 return format->format_.PutIntValue(key, value); in OH_AVFormat_SetIntValue()
87 bool OH_AVFormat_SetLongValue(struct OH_AVFormat *format, const char *key, int64_t value) in OH_AVFormat_SetLongValue() argument
89 FALSE_RETURN_V_MSG_E(format != nullptr, false, "input format is nullptr!"); in OH_AVFormat_SetLongValue()
90 FALSE_RETURN_V_MSG_E(format->magic_ == MFMagic::MFMAGIC_FORMAT, false, "magic error!"); in OH_AVFormat_SetLongValue()
93 return format->format_.PutLongValue(key, value); in OH_AVFormat_SetLongValue()
96 bool OH_AVFormat_SetFloatValue(struct OH_AVFormat *format, const char *key, float value) in OH_AVFormat_SetFloatValue() argument
98 FALSE_RETURN_V_MSG_E(format != nullptr, false, "input format is nullptr!"); in OH_AVFormat_SetFloatValue()
99 FALSE_RETURN_V_MSG_E(format->magic_ == MFMagic::MFMAGIC_FORMAT, false, "magic error!"); in OH_AVFormat_SetFloatValue()
102 return format->format_.PutFloatValue(key, value); in OH_AVFormat_SetFloatValue()
105 bool OH_AVFormat_SetDoubleValue(struct OH_AVFormat *format, const char *key, double value) in OH_AVFormat_SetDoubleValue() argument
107 FALSE_RETURN_V_MSG_E(format != nullptr, false, "input format is nullptr!"); in OH_AVFormat_SetDoubleValue()
108 FALSE_RETURN_V_MSG_E(format->magic_ == MFMagic::MFMAGIC_FORMAT, false, "magic error!"); in OH_AVFormat_SetDoubleValue()
111 return format->format_.PutDoubleValue(key, value); in OH_AVFormat_SetDoubleValue()
114 bool OH_AVFormat_SetStringValue(struct OH_AVFormat *format, const char *key, const char *value) in OH_AVFormat_SetStringValue() argument
116 FALSE_RETURN_V_MSG_E(format != nullptr, false, "input format is nullptr!"); in OH_AVFormat_SetStringValue()
117 FALSE_RETURN_V_MSG_E(format->magic_ == MFMagic::MFMAGIC_FORMAT, false, "magic error!"); in OH_AVFormat_SetStringValue()
121 return format->format_.PutStringValue(key, value); in OH_AVFormat_SetStringValue()
124 bool OH_AVFormat_SetBuffer(struct OH_AVFormat *format, const char *key, const uint8_t *addr, size_t… in OH_AVFormat_SetBuffer() argument
126 FALSE_RETURN_V_MSG_E(format != nullptr, false, "input format is nullptr!"); in OH_AVFormat_SetBuffer()
127 FALSE_RETURN_V_MSG_E(format->magic_ == MFMagic::MFMAGIC_FORMAT, false, "magic error!"); in OH_AVFormat_SetBuffer()
132 return format->format_.PutBuffer(key, addr, size); in OH_AVFormat_SetBuffer()
135 bool OH_AVFormat_GetIntValue(struct OH_AVFormat *format, const char *key, int32_t *out) in OH_AVFormat_GetIntValue() argument
137 FALSE_RETURN_V_MSG_E(format != nullptr, false, "input format is nullptr!"); in OH_AVFormat_GetIntValue()
138 FALSE_RETURN_V_MSG_E(format->magic_ == MFMagic::MFMAGIC_FORMAT, false, "magic error!"); in OH_AVFormat_GetIntValue()
142 return format->format_.GetIntValue(key, *out); in OH_AVFormat_GetIntValue()
145 bool OH_AVFormat_GetLongValue(struct OH_AVFormat *format, const char *key, int64_t *out) in OH_AVFormat_GetLongValue() argument
147 FALSE_RETURN_V_MSG_E(format != nullptr, false, "input format is nullptr!"); in OH_AVFormat_GetLongValue()
148 FALSE_RETURN_V_MSG_E(format->magic_ == MFMagic::MFMAGIC_FORMAT, false, "magic error!"); in OH_AVFormat_GetLongValue()
152 return format->format_.GetLongValue(key, *out); in OH_AVFormat_GetLongValue()
155 bool OH_AVFormat_GetFloatValue(struct OH_AVFormat *format, const char *key, float *out) in OH_AVFormat_GetFloatValue() argument
157 FALSE_RETURN_V_MSG_E(format != nullptr, false, "input format is nullptr!"); in OH_AVFormat_GetFloatValue()
158 FALSE_RETURN_V_MSG_E(format->magic_ == MFMagic::MFMAGIC_FORMAT, false, "magic error!"); in OH_AVFormat_GetFloatValue()
162 return format->format_.GetFloatValue(key, *out); in OH_AVFormat_GetFloatValue()
165 bool OH_AVFormat_GetDoubleValue(struct OH_AVFormat *format, const char *key, double *out) in OH_AVFormat_GetDoubleValue() argument
167 FALSE_RETURN_V_MSG_E(format != nullptr, false, "input format is nullptr!"); in OH_AVFormat_GetDoubleValue()
168 FALSE_RETURN_V_MSG_E(format->magic_ == MFMagic::MFMAGIC_FORMAT, false, "magic error!"); in OH_AVFormat_GetDoubleValue()
172 return format->format_.GetDoubleValue(key, *out); in OH_AVFormat_GetDoubleValue()
175 bool OH_AVFormat_GetStringValue(struct OH_AVFormat *format, const char *key, const char **out) in OH_AVFormat_GetStringValue() argument
177 FALSE_RETURN_V_MSG_E(format != nullptr, false, "input format is nullptr!"); in OH_AVFormat_GetStringValue()
178 FALSE_RETURN_V_MSG_E(format->magic_ == MFMagic::MFMAGIC_FORMAT, false, "magic error!"); in OH_AVFormat_GetStringValue()
182 if (format->outString_ != nullptr) { in OH_AVFormat_GetStringValue()
183 free(format->outString_); in OH_AVFormat_GetStringValue()
184 format->outString_ = nullptr; in OH_AVFormat_GetStringValue()
188 bool ret = format->format_.GetStringValue(key, str); in OH_AVFormat_GetStringValue()
194 format->outString_ = static_cast<char *>(malloc((bufLength + 1) * sizeof(char))); in OH_AVFormat_GetStringValue()
195 FALSE_RETURN_V_MSG_E(format->outString_ != nullptr, false, "malloc out string nullptr!"); in OH_AVFormat_GetStringValue()
197 if (strcpy_s(format->outString_, bufLength + 1, str.c_str()) != EOK) { in OH_AVFormat_GetStringValue()
199 free(format->outString_); in OH_AVFormat_GetStringValue()
200 format->outString_ = nullptr; in OH_AVFormat_GetStringValue()
204 *out = format->outString_; in OH_AVFormat_GetStringValue()
208 bool OH_AVFormat_GetBuffer(struct OH_AVFormat *format, const char *key, uint8_t **addr, size_t *siz… in OH_AVFormat_GetBuffer() argument
210 FALSE_RETURN_V_MSG_E(format != nullptr, false, "input format is nullptr!"); in OH_AVFormat_GetBuffer()
211 FALSE_RETURN_V_MSG_E(format->magic_ == MFMagic::MFMAGIC_FORMAT, false, "magic error!"); in OH_AVFormat_GetBuffer()
216 return format->format_.GetBuffer(key, addr, *size); in OH_AVFormat_GetBuffer()
219 const char *OH_AVFormat_DumpInfo(struct OH_AVFormat *format) in OH_AVFormat_DumpInfo() argument
221 FALSE_RETURN_V_MSG_E(format != nullptr, nullptr, "input format is nullptr!"); in OH_AVFormat_DumpInfo()
222 if (format->dumpInfo_ != nullptr) { in OH_AVFormat_DumpInfo()
223 free(format->dumpInfo_); in OH_AVFormat_DumpInfo()
224 format->dumpInfo_ = nullptr; in OH_AVFormat_DumpInfo()
226 std::string info = format->format_.Stringify(); in OH_AVFormat_DumpInfo()
231 format->dumpInfo_ = static_cast<char *>(malloc((bufLength + 1) * sizeof(char))); in OH_AVFormat_DumpInfo()
232 FALSE_RETURN_V_MSG_E(format->dumpInfo_ != nullptr, nullptr, "malloc dump info nullptr!"); in OH_AVFormat_DumpInfo()
233 if (strcpy_s(format->dumpInfo_, bufLength + 1, info.c_str()) != EOK) { in OH_AVFormat_DumpInfo()
235 free(format->dumpInfo_); in OH_AVFormat_DumpInfo()
236 format->dumpInfo_ = nullptr; in OH_AVFormat_DumpInfo()
238 return format->dumpInfo_; in OH_AVFormat_DumpInfo()