History

add new API as DecodeFrameNoDelay for immediate decoding, which will be recommended decoding method for h.264 bitstream

huili2 committed 11 years ago

Commit e3e52081 parent d2d4ab86 files · +97 −66Browse files

Showing the changes to test/api/cpp_interface_test.cpp (1 of 6 files). Show all

Unified · Split

test/api/cpp_interface_test.cpp+10−5
@@ -77,29 +77,34 @@ struct SVCDecoderImpl : public ISVCDecoder { · 76 unmodified lines
77 EXPECT_TRUE (gThis == this);77 EXPECT_TRUE (gThis == this);
78 return static_cast<DECODING_STATE> (3);78 return static_cast<DECODING_STATE> (3);
79 }79 }
80 virtual DECODING_STATE EXTAPI DecodeFrame2 (const unsigned char* pSrc,80 virtual DECODING_STATE EXTAPI DecodeFrameNoDelay (const unsigned char* pSrc,
81 const int iSrcLen, unsigned char** ppDst, SBufferInfo* pDstInfo) {81 const int iSrcLen, unsigned char** ppDst, SBufferInfo* pDstInfo) {
82 EXPECT_TRUE (gThis == this);82 EXPECT_TRUE (gThis == this);
83 return static_cast<DECODING_STATE> (4);83 return static_cast<DECODING_STATE> (4);
84 }84 }
85 virtual DECODING_STATE EXTAPI DecodeFrame2 (const unsigned char* pSrc,
86 const int iSrcLen, unsigned char** ppDst, SBufferInfo* pDstInfo) {
87 EXPECT_TRUE (gThis == this);
88 return static_cast<DECODING_STATE> (5);
89 }
85 virtual DECODING_STATE EXTAPI DecodeFrameEx (const unsigned char* pSrc,90 virtual DECODING_STATE EXTAPI DecodeFrameEx (const unsigned char* pSrc,
86 const int iSrcLen, unsigned char* pDst, int iDstStride,91 const int iSrcLen, unsigned char* pDst, int iDstStride,
87 int& iDstLen, int& iWidth, int& iHeight, int& iColorFormat) {92 int& iDstLen, int& iWidth, int& iHeight, int& iColorFormat) {
88 EXPECT_TRUE (gThis == this);93 EXPECT_TRUE (gThis == this);
89 return static_cast<DECODING_STATE> (5);94 return static_cast<DECODING_STATE> (6);
90 }95 }
91 virtual DECODING_STATE EXTAPI DecodeParser (const unsigned char* pSrc,96 virtual DECODING_STATE EXTAPI DecodeParser (const unsigned char* pSrc,
92 const int iSrcLen, SParserBsInfo* pDstInfo) {97 const int iSrcLen, SParserBsInfo* pDstInfo) {
93 EXPECT_TRUE (gThis == this);98 EXPECT_TRUE (gThis == this);
94 return static_cast<DECODING_STATE> (6);99 return static_cast<DECODING_STATE> (7);
95 }100 }
96 virtual long EXTAPI SetOption (DECODER_OPTION eOptionId, void* pOption) {101 virtual long EXTAPI SetOption (DECODER_OPTION eOptionId, void* pOption) {
97 EXPECT_TRUE (gThis == this);102 EXPECT_TRUE (gThis == this);
98 return 7;103 return static_cast<DECODING_STATE> (8);
99 }104 }
100 virtual long EXTAPI GetOption (DECODER_OPTION eOptionId, void* pOption) {105 virtual long EXTAPI GetOption (DECODER_OPTION eOptionId, void* pOption) {
101 EXPECT_TRUE (gThis == this);106 EXPECT_TRUE (gThis == this);
102 return 8;107 return static_cast<DECODING_STATE> (9);
103 }108 }
104};109};
105 110

Keyboard shortcuts

General

Show keyboard shortcuts
?
Focus the current search
/

Issues and pull requests

Open filters
f

Issues, pull requests and Inbox

Select next item
j↓
Select previous item
k↑
Open selected item
Enter
Dismiss filters or clear selection
Esc

Repository code

Go to file
t