houxiao
2017-02-28 6331c55a780455e8fe5a039ef8781a0abafbd6ba
android argb

git-svn-id: http://192.168.1.226/svn/proxy@120 454eff88-639b-444f-9e54-f578c98de674
3个文件已修改
19 ■■■■ 已修改文件
RtspFace/PL_AVFrameBGRA.cpp 16 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
RtspFace/PL_AVFrameBGRA.h 1 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
RtspFace/main.cpp 2 ●●● 补丁 | 查看 | 原始文档 | blame | 历史
RtspFace/PL_AVFrameBGRA.cpp
@@ -160,9 +160,9 @@
        in->buffSize = src_width * src_height * 4; // #todo use ret value?
    }
    else if (in->config.convertTo == PL_AVFrameBGRA_Config::I420_TO_ARGB8888)
    else if (in->config.convertTo == PL_AVFrameBGRA_Config::I420_TO_RGBA8888)
    {
        libyuv::I420ToARGB(src_y, src_width,
        libyuv::I420ToRGBA(src_y, src_width,
                            src_u, SUBSAMPLE(src_width, 2), 
                            src_v, SUBSAMPLE(src_width, 2), 
                            in->buffer, 4 * src_width, 
@@ -190,12 +190,12 @@
    in->lastFrame.pts = frame->pts;
    //#test
    //static size_t f=0;
    //char fname[50];
    //sprintf(fname, "%u.argb", ++f);
    //FILE * pFile = fopen (fname,"wb");
    //fwrite (in->buffer , sizeof(char), in->buffSize, pFile);
    //fclose(pFile);
    static size_t f=0;
    char fname[50];
    sprintf(fname, "%u.rgba", ++f);
    FILE * pFile = fopen (fname,"wb");
    fwrite (in->buffer , sizeof(char), in->buffSize, pFile);
    fclose(pFile);
    return true;
}
RtspFace/PL_AVFrameBGRA.h
@@ -9,6 +9,7 @@
    {
        I420_TO_BGRA8888,
        I420_TO_ARGB8888,
        I420_TO_RGBA8888,
        I420_TO_ARGB4444,
        I420_TO_RGB565
    } convertTo;
RtspFace/main.cpp
@@ -90,7 +90,7 @@
    
    {
        PL_AVFrameBGRA_Config config;
        config.convertTo = PL_AVFrameBGRA_Config::I420_TO_ARGB8888;
        config.convertTo = PL_AVFrameBGRA_Config::I420_TO_RGBA8888;
        PL_AVFrameBGRA* ple = (PL_AVFrameBGRA*)pipeLine.push_elem("PL_AVFrameBGRA");
        bool ret = ple->init(&config);
        if (!ret)