資源簡介
android 視頻播放器源碼

代碼片段和文件信息
/*
?*?Copyright?(C)?2009?The?Sipdroid?Open?Source?Project
?*?
?*?This?file?is?part?of?Sipdroid?(http://www.sipdroid.org)
?*?
?*?Sipdroid?is?free?software;?you?can?redistribute?it?and/or?modify
?*?it?under?the?terms?of?the?GNU?General?Public?License?as?published?by
?*?the?Free?Software?Foundation;?either?version?3?of?the?License?or
?*?(at?your?option)?any?later?version.
?*?
?*?This?source?code?is?distributed?in?the?hope?that?it?will?be?useful
?*?but?WITHOUT?ANY?WARRANTY;?without?even?the?implied?warranty?of
?*?MERCHANTABILITY?or?FITNESS?FOR?A?PARTICULAR?PURPOSE.??See?the
?*?GNU?General?Public?License?for?more?details.
?*?
?*?You?should?have?received?a?copy?of?the?GNU?General?Public?License
?*?along?with?this?source?code;?if?not?write?to?the?Free?Software
?*?Foundation?Inc.?59?Temple?Place?Suite?330?Boston?MA??02111-1307??USA
?*/
?
#include?
#include?
#include?
#include?
#include?
#include?
#include??
#define?LOG_TAG?“bv16“?//?text?for?log?tag?
#ifdef?__cplusplus
extern?“C“?{
#endif
#include?“typedef.h“
#include?“bvcommon.h“
#include?“bv16cnst.h“
#include?“bv16strct.h“
#include?“bv16.h“
#include?“utility.h“
#if?G192BITSTREAM
#include?“g192.h“
#else
#include?“bitpack.h“
#endif
#include?“memutil.h“?
#ifdef?__cplusplus
}
#endif
//?the?header?length?of?the?RTP?frame?(must?skip?when?en/decoding)
#define RTP_HDR_SIZE 12
//?size?of?BV16?packed?bitstream?(RFC4298)
#define BITSTREAM_SIZE 10
static?int?codec_open?=?0;
void?*enc_bs;
void?*dec_bs;
void?*enc_state;
void?*dec_state;
jshort?enc_buffer[FRSZ];
jbyte?enc_output_buffer[FRSZ];
jbyte?dec_buffer[FRSZ];
jshort?dec_output_buffer[FRSZ];
int?sizestate?sizebitstream?frsz;
static?JavaVM?*gJavaVM;
const?char?*kInterfacePath?=?“org/sipdroid/pjlib/BV16Fixedp“;
extern?“C“
JNIEXPORT?jint?JNICALL?Java_org_sipdroid_codecs_BV16_open
??(JNIEnv?*env?jobject?obj)?{
int?tmp;
if?(codec_open++?!=?0)
return?(jint)0;
????sizebitstream?=?sizeof(struct?BV16_Bit_Stream);
frsz?=?FRSZ;
???
????sizestate?=?sizeof(struct?BV16_Encoder_State);
????enc_state?=?allocWord16(0sizeof(struct?BV16_Encoder_State)/2-1);
????Reset_BV16_Encoder((struct?BV16_Encoder_State*)enc_state);
????sizestate?=?sizeof(struct?BV16_Decoder_State);
????dec_state?=?allocWord16(0sizeof(struct?BV16_Decoder_State)/2-1);
????Reset_BV16_Decoder((struct?BV16_Decoder_State*)dec_state);
????enc_bs?=?allocWord16(0sizebitstream/2-1);
????dec_bs?=?allocWord16(0sizebitstream/2-1);
return?(jint)0;
}
extern?“C“
JNIEXPORT?jint?JNICALL?Java_org_sipdroid_codecs_BV16_encode
????(JNIEnv?*env?jobject?obj?jshortArray?lin?jint?offset?jbyteArray?encoded?jint?size)?{
int?i;
unsigned?int?lin_pos?=?0;
if?(!codec_open)
return?0;
//????__android_log_print(ANDROID_LOG_DEBUG?LOG_TAG?
//????????????“encoding?frame?size:?%d\toffset:?%d\n“?size?offset);?
for?(i?=?0;?i?// __android_log_print(ANDROID_LOG_DEBUG?LOG_TAG?
//??????????
?屬性????????????大小?????日期????時間???名稱
-----------?---------??----------?-----??----
?????目錄???????????0??2013-05-13?14:22??Android客戶端源碼\
?????文件?????????289??2010-11-04?17:15??Android客戶端源碼\.classpath
?????文件?????????841??2010-11-04?17:15??Android客戶端源碼\.project
?????文件????????1148??2010-11-04?17:15??Android客戶端源碼\ADDITIONAL_TERMS.txt
?????文件????????8499??2010-11-04?17:15??Android客戶端源碼\AndroidManifest.xm
?????目錄???????????0??2013-05-13?14:22??Android客戶端源碼\assets\
?????文件???????22545??2010-11-04?17:10??Android客戶端源碼\assets\alerting
?????文件?????????219??2010-11-04?17:15??Android客戶端源碼\BUILD.txt
?????目錄???????????0??2013-05-13?14:22??Android客戶端源碼\jni\
?????文件????????9397??2010-11-04?17:10??Android客戶端源碼\jni\Android.mk
?????文件?????????331??2010-11-04?17:10??Android客戶端源碼\jni\Application.mk
?????文件????????5136??2010-11-04?17:10??Android客戶端源碼\jni\bv16_jni.cpp
?????目錄???????????0??2013-05-13?14:22??Android客戶端源碼\jni\bx16_fixedp\
?????目錄???????????0??2013-05-13?14:22??Android客戶端源碼\jni\bx16_fixedp\bv16\
?????文件????????8544??2010-11-04?17:06??Android客戶端源碼\jni\bx16_fixedp\bv16\bitpack.c
?????文件????????1892??2010-11-04?17:06??Android客戶端源碼\jni\bx16_fixedp\bv16\bitpack.h
?????文件????????8542??2010-11-04?17:06??Android客戶端源碼\jni\bx16_fixedp\bv16\bv.c
?????文件????????2036??2010-11-04?17:06??Android客戶端源碼\jni\bx16_fixedp\bv16\bv16.h
?????文件????????6070??2010-11-04?17:06??Android客戶端源碼\jni\bx16_fixedp\bv16\bv16cnst.h
?????文件????????5585??2010-11-04?17:06??Android客戶端源碼\jni\bx16_fixedp\bv16\bv16externs.h
?????文件????????3673??2010-11-04?17:06??Android客戶端源碼\jni\bx16_fixedp\bv16\bv16strct.h
?????文件???????19975??2010-11-04?17:06??Android客戶端源碼\jni\bx16_fixedp\bv16\coarptch.c
?????文件????????5434??2010-11-04?17:06??Android客戶端源碼\jni\bx16_fixedp\bv16\decoder.c
?????文件????????6800??2010-11-04?17:06??Android客戶端源碼\jni\bx16_fixedp\bv16\encoder.c
?????文件????????5556??2010-11-04?17:06??Android客戶端源碼\jni\bx16_fixedp\bv16\excdec.c
?????文件???????14963??2010-11-04?17:06??Android客戶端源碼\jni\bx16_fixedp\bv16\excquan.c
?????文件????????4990??2010-11-04?17:06??Android客戶端源碼\jni\bx16_fixedp\bv16\fineptch.c
?????文件????????4108??2010-11-04?17:06??Android客戶端源碼\jni\bx16_fixedp\bv16\g192.c
?????文件????????1850??2010-11-04?17:06??Android客戶端源碼\jni\bx16_fixedp\bv16\g192.h
?????文件????????5099??2010-11-04?17:06??Android客戶端源碼\jni\bx16_fixedp\bv16\gaindec.c
?????文件????????4892??2010-11-04?17:06??Android客戶端源碼\jni\bx16_fixedp\bv16\gainquan.c
............此處省略840個文件信息
評論
共有 條評論