AAC ADTS流解析总结
这里列出Android里将aac编码器输出的音频帧加上ADTS头的代码:
+ int tmpFd; + tmpFd = ::open("/data/src.aac", O_WRONLY | O_APPEND ); + if ( tmpFd < 0 ) { + LOGE("No dump decode file %s",strerror(errno)); + } + else + { + unsigned char adts_hdr[7] = {0xff, 0xf9, 0x5c, 0x80, 0x00,0x1f, 0xfc}; + + adts_hdr[3] = 0x80 | ((mConfig->inputBufferCurrentLength >> 11) & 3); + adts_hdr[4] = (mConfig->inputBufferCurrentLength >> 3) & 0xff; + adts_hdr[5] = ((mConfig->inputBufferCurrentLength & 7) << 5) | 0x1f; + + ::write(tmpFd,adts_hdr, 7); + ::write(tmpFd,(const char *)mConfig->pInputBuffer , mConfig->inputBufferCurrentLength); + ::close(tmpFd); + } AAC参考知识: http://blog.csdn.net/axdc_qa_team/article/details/4271043 (除协议外,非常详细的文章) http://blog.csdn.net/jay100500/article/details/52955232 (adts协议) http://blog.csdn.net/leixiaohua1020/article/details/11822537 //aac header http://yeyingxian.blog.163.com/blog/static/344712420134485613752/ https://wiki.multimedia.cx/index.php?title=MPEG-4_Audio 本文转自 曾永刚 51CTO博客,原文链接:http://blog.51cto.com/zyg0227/1952766 |

低调大师中文资讯倾力打造互联网数据资讯、行业资源、电子商务、移动互联网、网络营销平台。
持续更新报道IT业界、互联网、市场资讯、驱动更新,是最及时权威的产业资讯及硬件资讯报道平台。
转载内容版权归作者及来源网站所有,本站原创内容转载请注明来源。
-
上一篇
mobiscroll-2.17.1demo及源文件
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 <!DOCTYPEhtml> < html lang = "en" > < head &g...
-
下一篇
Android Studio2.2.3 通过JNI引用ffmpeg库小结
修改步骤: 首先通过NDK14编译出libffmpeg.so ,将include目录取出 通过AS建立基于jni的工程项目,将include目录放到cpp下;创建jniLibs/armeabi目录,将libffmpeg.so放到里边 3.配置CMakeLists.txt 添加如下: #addtheffmpeglib include_directories(${CMAKE_CURRENT_SOURCE_DIR}/src/main/cpp/include) add_library(ffmpeg-libSHAREDIMPORTED) set_target_properties(ffmpeg-libPROPERTIESIMPORTED_LOCATION${CMAKE_CURRENT_SOURCE_DIR}/src/main/jniLibs/armeabi/libffmpeg.so) target_link_libraries(native-lib ffmpeg-lib#ffmpeglib android#usetheandroidloglib ${log-lib}) 4.配置build.g...
相关文章
文章评论
共有0条评论来说两句吧...