MCPcopy Create free account
hub / github.com/cisco/openh264 / BaseThreadDecoderTest

Class BaseThreadDecoderTest

test/BaseThreadDecoderTest.h:11–56  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

9#include "utils/BufferedData.h"
10
11class BaseThreadDecoderTest {
12 public:
13 struct Plane {
14 const uint8_t* data;
15 int width;
16 int height;
17 int stride;
18 };
19
20 struct Frame {
21 Plane y;
22 Plane u;
23 Plane v;
24 };
25
26 typedef enum tagDecodeStatus {
27 OpenFile,
28 Decoding,
29 EndOfStream,
30 End
31 } eDecodeStatus;
32
33 struct Callback {
34 virtual void onDecodeFrame (const Frame& frame) = 0;
35 };
36
37 BaseThreadDecoderTest();
38 int32_t SetUp();
39 void TearDown();
40 bool ThreadDecodeFile (const char* fileName, Callback* cbk);
41
42 bool Open (const char* fileName);
43 ISVCDecoder* decoder_;
44
45 private:
46 void DecodeFrame (const uint8_t* src, size_t sliceSize, Callback* cbk);
47 void FlushFrame (Callback* cbk);
48
49 std::ifstream file_;
50 SBufferInfo sBufInfo;
51 uint8_t* pData[3];
52 uint64_t uiTimeStamp;
53 FILE* pYuvFile;
54 bool bEnableYuvDumpTest;
55 eDecodeStatus decodeStatus_;
56};
57
58#endif //__BASETHREADDECODERTEST_H__

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected