当前位置: 首页>>代码示例>>C++>>正文


C++ SrsAmf0Any类代码示例

本文整理汇总了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;
}
开发者ID:huhaibo,项目名称:simple-rtmp-server,代码行数:27,代码来源:srs_librtmp.cpp

示例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);
}
开发者ID:huhaibo,项目名称:simple-rtmp-server,代码行数:8,代码来源:srs_librtmp.cpp

示例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();
}
开发者ID:huhaibo,项目名称:simple-rtmp-server,代码行数:8,代码来源:srs_librtmp.cpp

示例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);
}
开发者ID:huhaibo,项目名称:simple-rtmp-server,代码行数:8,代码来源:srs_librtmp.cpp

示例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);
}
开发者ID:huhaibo,项目名称:simple-rtmp-server,代码行数:8,代码来源:srs_librtmp.cpp

示例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);
}
开发者ID:huhaibo,项目名称:simple-rtmp-server,代码行数:8,代码来源:srs_librtmp.cpp

示例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);
}
开发者ID:huhaibo,项目名称:simple-rtmp-server,代码行数:8,代码来源:srs_librtmp.cpp

示例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();
}
开发者ID:huhaibo,项目名称:simple-rtmp-server,代码行数:8,代码来源:srs_librtmp.cpp

示例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();
}
开发者ID:huhaibo,项目名称:simple-rtmp-server,代码行数:8,代码来源:srs_librtmp.cpp

示例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);
}
开发者ID:huhaibo,项目名称:simple-rtmp-server,代码行数:8,代码来源:srs_librtmp.cpp

示例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();
}
开发者ID:huhaibo,项目名称:simple-rtmp-server,代码行数:8,代码来源:srs_librtmp.cpp

示例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);
}
开发者ID:huhaibo,项目名称:simple-rtmp-server,代码行数:8,代码来源:srs_librtmp.cpp

示例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);
}
开发者ID:huhaibo,项目名称:simple-rtmp-server,代码行数:9,代码来源:srs_librtmp.cpp

示例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);
}
开发者ID:huhaibo,项目名称:simple-rtmp-server,代码行数:9,代码来源:srs_librtmp.cpp

示例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);
}
开发者ID:huhaibo,项目名称:simple-rtmp-server,代码行数:9,代码来源:srs_librtmp.cpp


注:本文中的SrsAmf0Any类示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。