本文整理汇总了C++中SrsAmf0Any类的典型用法代码示例。如果您正苦于以下问题:C++ SrsAmf0Any类的具体用法?C++ SrsAmf0Any怎么用?C++ SrsAmf0Any使用的例子?那么, 这里精选的类代码示例或许可以为您提供帮助。
在下文中一共展示了SrsAmf0Any类的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。
示例1: srs_amf0_parse
srs_amf0_t srs_amf0_parse(char* data, int size, int* nparsed)
{
int ret = ERROR_SUCCESS;
srs_amf0_t amf0 = NULL;
SrsStream stream;
if ((ret = stream.initialize(data, size)) != ERROR_SUCCESS) {
return amf0;
}
SrsAmf0Any* any = NULL;
if ((ret = SrsAmf0Any::discovery(&stream, &any)) != ERROR_SUCCESS) {
return amf0;
}
stream.reset();
if ((ret = any->read(&stream)) != ERROR_SUCCESS) {
srs_freep(any);
return amf0;
}
*nparsed = stream.pos();
amf0 = (srs_amf0_t)any;
return amf0;
}
示例2: srs_amf0_strict_array_property_at
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);
}
示例3: 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();
}
示例4: srs_amf0_ecma_array_property
srs_amf0_t srs_amf0_ecma_array_property(srs_amf0_t amf0, const char* name)
{
SrsAmf0Any* any = (SrsAmf0Any*)amf0;
srs_assert(any->is_ecma_array());
SrsAmf0EcmaArray* obj = (SrsAmf0EcmaArray*)amf0;
return (srs_amf0_t)obj->get_property(name);
}
示例5: srs_amf0_object_property
srs_amf0_t srs_amf0_object_property(srs_amf0_t amf0, const char* name)
{
SrsAmf0Any* any = (SrsAmf0Any*)amf0;
srs_assert(any->is_object());
SrsAmf0Object* obj = (SrsAmf0Object*)amf0;
return (srs_amf0_t)obj->get_property(name);
}
示例6: srs_amf0_object_property_value_at
srs_amf0_t srs_amf0_object_property_value_at(srs_amf0_t amf0, int index)
{
SrsAmf0Any* any = (SrsAmf0Any*)amf0;
srs_assert(any->is_object());
SrsAmf0Object* obj = (SrsAmf0Object*)amf0;
return (srs_amf0_t)obj->value_at(index);
}
示例7: srs_amf0_object_property_name_at
const char* srs_amf0_object_property_name_at(srs_amf0_t amf0, int index)
{
SrsAmf0Any* any = (SrsAmf0Any*)amf0;
srs_assert(any->is_object());
SrsAmf0Object* obj = (SrsAmf0Object*)amf0;
return obj->key_raw_at(index);
}
示例8: srs_amf0_object_clear
void srs_amf0_object_clear(srs_amf0_t amf0)
{
SrsAmf0Any* any = (SrsAmf0Any*)amf0;
srs_assert(any->is_object());
SrsAmf0Object* obj = (SrsAmf0Object*)amf0;
obj->clear();
}
示例9: srs_amf0_object_property_count
int srs_amf0_object_property_count(srs_amf0_t amf0)
{
SrsAmf0Any* any = (SrsAmf0Any*)amf0;
srs_assert(any->is_object());
SrsAmf0Object* obj = (SrsAmf0Object*)amf0;
return obj->count();
}
示例10: srs_amf0_ecma_array_property_name_at
const char* srs_amf0_ecma_array_property_name_at(srs_amf0_t amf0, int index)
{
SrsAmf0Any* any = (SrsAmf0Any*)amf0;
srs_assert(any->is_ecma_array());
SrsAmf0EcmaArray* obj = (SrsAmf0EcmaArray*)amf0;
return obj->key_raw_at(index);
}
示例11: srs_amf0_ecma_array_property_count
int srs_amf0_ecma_array_property_count(srs_amf0_t amf0)
{
SrsAmf0Any* any = (SrsAmf0Any*)amf0;
srs_assert(any->is_ecma_array());
SrsAmf0EcmaArray * obj = (SrsAmf0EcmaArray*)amf0;
return obj->count();
}
示例12: srs_amf0_ecma_array_property_value_at
srs_amf0_t srs_amf0_ecma_array_property_value_at(srs_amf0_t amf0, int index)
{
SrsAmf0Any* any = (SrsAmf0Any*)amf0;
srs_assert(any->is_ecma_array());
SrsAmf0EcmaArray* obj = (SrsAmf0EcmaArray*)amf0;
return (srs_amf0_t)obj->value_at(index);
}
示例13: srs_amf0_object_property_set
void srs_amf0_object_property_set(srs_amf0_t amf0, const char* name, srs_amf0_t value)
{
SrsAmf0Any* any = (SrsAmf0Any*)amf0;
srs_assert(any->is_object());
SrsAmf0Object* obj = (SrsAmf0Object*)amf0;
any = (SrsAmf0Any*)value;
obj->set(name, any);
}
示例14: 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);
}
示例15: srs_amf0_ecma_array_property_set
void srs_amf0_ecma_array_property_set(srs_amf0_t amf0, const char* name, srs_amf0_t value)
{
SrsAmf0Any* any = (SrsAmf0Any*)amf0;
srs_assert(any->is_ecma_array());
SrsAmf0EcmaArray* obj = (SrsAmf0EcmaArray*)amf0;
any = (SrsAmf0Any*)value;
obj->set(name, any);
}