| 222 | } |
| 223 | |
| 224 | UInt64 AMFWriter::beginObjectArray(UInt32 size) { |
| 225 | _levels.push_back(_amf3); // endObject |
| 226 | if(!_amf3) { |
| 227 | if (amf0) |
| 228 | WARN("Mixed object in AMF0 are not supported, switch to AMF3"); |
| 229 | packet.write8(AMF_AVMPLUS_OBJECT); |
| 230 | _amf3=true; |
| 231 | } |
| 232 | _levels.push_back(_amf3); // endArray |
| 233 | packet.write8(AMF3_ARRAY); |
| 234 | packet.write7BitValue((size << 1) | 1); |
| 235 | _references.emplace_back(AMF3_ARRAY); |
| 236 | return (_references.size()<<1) | 1; |
| 237 | } |
| 238 | |
| 239 | UInt64 AMFWriter::beginMap(Exception& ex, UInt32 size,bool weakKeys) { |
| 240 | _levels.push_back(_amf3); |