zoukankan      html  css  js  c++  java
  • Android ICS中录制视频和播放视频的角度问题

    MPEG4Writer.cpp 
    void MPEG4Writer::writeCompositionMatrix(int degrees)

    MPEG4Extractor.cpp
    status_t MPEG4Extractor::parseTrackHeader(off64_t data_offset, off64_t data_size) 

    {

        ......

        uint32_t rotationDegrees;

        static const int32_t kFixedOne = 0x10000;
        if (a00 == kFixedOne && a01 == 0 && a10 == 0 && a11 == kFixedOne) {
            // Identity, no rotation
            rotationDegrees = 0;
        } else if (a00 == 0 && a01 == kFixedOne && a10 == -kFixedOne && a11 == 0) {
            rotationDegrees = 90;
        } else if (a00 == 0 && a01 == -kFixedOne && a10 == kFixedOne && a11 == 0) {
            rotationDegrees = 270;
        } else if (a00 == -kFixedOne && a01 == 0 && a10 == 0 && a11 == -kFixedOne) {
            rotationDegrees = 180;
        } else {
            LOGW("We only support 0,90,180,270 degree rotation matrices");
            rotationDegrees = 0;
        }


        if (rotationDegrees != 0) {
            mLastTrack->meta->setInt32(kKeyRotation, rotationDegrees);
        }

        ......
    }

  • 相关阅读:
    Spring-MVC
    Spring与MyBatis整合(哇,快来看,他写的真好,简单易懂哎)
    Spring事务终极版...
    JdbcTemplate(增删改查以及以注释实现增删改查)
    AOP进阶
    MyBatis增删改查
    JSP的数据交互
    JSP数据交互
    JSP中9大内置对象
    动态网页开发基础
  • 原文地址:https://www.cnblogs.com/eustoma/p/2415800.html
Copyright © 2011-2022 走看看