本文整理汇总了C++中SrsAmf0Any::is_strict_array方法的典型用法代码示例。如果您正苦于以下问题:C++ SrsAmf0Any::is_strict_array方法的具体用法?C++ SrsAmf0Any::is_strict_array怎么用?C++ SrsAmf0Any::is_strict_array使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类SrsAmf0Any
的用法示例。
在下文中一共展示了SrsAmf0Any::is_strict_array方法的5个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。
示例1: return
srs_amf0_t srs_amf0_strict_array_property_at(srs_amf0_t amf0, int index)
{
SrsAmf0Any* any = (SrsAmf0Any*)amf0;
srs_assert(any->is_strict_array());
SrsAmf0StrictArray* obj = (SrsAmf0StrictArray*)amf0;
return (srs_amf0_t)obj->at(index);
}
示例2: srs_amf0_strict_array_property_count
int srs_amf0_strict_array_property_count(srs_amf0_t amf0)
{
SrsAmf0Any* any = (SrsAmf0Any*)amf0;
srs_assert(any->is_strict_array());
SrsAmf0StrictArray * obj = (SrsAmf0StrictArray*)amf0;
return obj->count();
}
示例3: srs_amf0_strict_array_append
void srs_amf0_strict_array_append(srs_amf0_t amf0, srs_amf0_t value)
{
SrsAmf0Any* any = (SrsAmf0Any*)amf0;
srs_assert(any->is_strict_array());
SrsAmf0StrictArray* obj = (SrsAmf0StrictArray*)amf0;
any = (SrsAmf0Any*)value;
obj->append(any);
}
示例4:
amf0_bool srs_amf0_is_strict_array(srs_amf0_t amf0)
{
SrsAmf0Any* any = (SrsAmf0Any*)amf0;
return any->is_strict_array();
}
示例5: TEST
VOID TEST(AMF0Test, ApiAnyAssert)
{
SrsStream s;
SrsAmf0Any* o = NULL;
char buf[1024];
memset(buf, 0, sizeof(buf));
EXPECT_EQ(ERROR_SUCCESS, s.initialize(buf, sizeof(buf)));
// read any
if (true) {
s.reset();
s.current()[0] = 0x12;
EXPECT_NE(ERROR_SUCCESS, srs_amf0_read_any(&s, &o));
EXPECT_TRUE(NULL == o);
srs_freep(o);
}
// any convert
if (true) {
o = SrsAmf0Any::str();
SrsAutoFree(SrsAmf0Any, o);
EXPECT_TRUE(o->is_string());
}
if (true) {
o = SrsAmf0Any::number();
SrsAutoFree(SrsAmf0Any, o);
EXPECT_TRUE(o->is_number());
}
if (true) {
o = SrsAmf0Any::boolean();
SrsAutoFree(SrsAmf0Any, o);
EXPECT_TRUE(o->is_boolean());
}
if (true) {
o = SrsAmf0Any::null();
SrsAutoFree(SrsAmf0Any, o);
EXPECT_TRUE(o->is_null());
}
if (true) {
o = SrsAmf0Any::undefined();
SrsAutoFree(SrsAmf0Any, o);
EXPECT_TRUE(o->is_undefined());
}
if (true) {
o = SrsAmf0Any::object();
SrsAutoFree(SrsAmf0Any, o);
EXPECT_TRUE(o->is_object());
}
if (true) {
o = SrsAmf0Any::ecma_array();
SrsAutoFree(SrsAmf0Any, o);
EXPECT_TRUE(o->is_ecma_array());
}
if (true) {
o = SrsAmf0Any::strict_array();
SrsAutoFree(SrsAmf0Any, o);
EXPECT_TRUE(o->is_strict_array());
}
// empty object
if (true) {
o = SrsAmf0Any::object();
SrsAutoFree(SrsAmf0Any, o);
s.reset();
EXPECT_EQ(ERROR_SUCCESS, o->write(&s));
EXPECT_EQ(1+3, s.pos());
}
// empty ecma array
if (true) {
o = SrsAmf0Any::ecma_array();
SrsAutoFree(SrsAmf0Any, o);
s.reset();
EXPECT_EQ(ERROR_SUCCESS, o->write(&s));
EXPECT_EQ(1+4+3, s.pos());
}
// strict array
if (true) {
o = SrsAmf0Any::strict_array();
SrsAutoFree(SrsAmf0Any, o);
s.reset();
EXPECT_EQ(ERROR_SUCCESS, o->write(&s));
EXPECT_EQ(1+4, s.pos());
}
}