Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(18)

Side by Side Diff: third_party/lzma/v4_65/files/CPP/7zip/Archive/Common/CoderMixer2MT.h

Issue 624713003: Keep only base/extractor.[cc|h]. (Closed) Base URL: https://chromium.googlesource.com/external/omaha.git@master
Patch Set: Created 6 years, 2 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
OLDNEW
(Empty)
1 // CoderMixer2MT.h
2
3 #ifndef __CODER_MIXER2_MT_H
4 #define __CODER_MIXER2_MT_H
5
6 #include "CoderMixer2.h"
7 #include "../../../Common/MyCom.h"
8 #include "../../Common/StreamBinder.h"
9 #include "../../Common/VirtThread.h"
10
11 namespace NCoderMixer {
12
13 struct CCoder2: public CCoderInfo2, public CVirtThread
14 {
15 HRESULT Result;
16 CObjectVector< CMyComPtr<ISequentialInStream> > InStreams;
17 CObjectVector< CMyComPtr<ISequentialOutStream> > OutStreams;
18 CRecordVector<ISequentialInStream*> InStreamPointers;
19 CRecordVector<ISequentialOutStream*> OutStreamPointers;
20
21 CCoder2(UInt32 numInStreams, UInt32 numOutStreams);
22 void SetCoderInfo(const UInt64 **inSizes, const UInt64 **outSizes);
23 virtual void Execute();
24 void Code(ICompressProgressInfo *progress);
25 };
26
27
28 /*
29 SetBindInfo()
30 for each coder
31 AddCoder[2]()
32 SetProgressIndex(UInt32 coderIndex);
33
34 for each file
35 {
36 ReInit()
37 for each coder
38 SetCoderInfo
39 Code
40 }
41 */
42
43 class CCoderMixer2MT:
44 public ICompressCoder2,
45 public CCoderMixer2,
46 public CMyUnknownImp
47 {
48 CBindInfo _bindInfo;
49 CObjectVector<CStreamBinder> _streamBinders;
50 int _progressCoderIndex;
51
52 void AddCoderCommon();
53 HRESULT Init(ISequentialInStream **inStreams, ISequentialOutStream **outStream s);
54 HRESULT ReturnIfError(HRESULT code);
55 public:
56 CObjectVector<CCoder2> _coders;
57 MY_UNKNOWN_IMP
58
59 STDMETHOD(Code)(ISequentialInStream **inStreams,
60 const UInt64 **inSizes,
61 UInt32 numInStreams,
62 ISequentialOutStream **outStreams,
63 const UInt64 **outSizes,
64 UInt32 numOutStreams,
65 ICompressProgressInfo *progress);
66
67 HRESULT SetBindInfo(const CBindInfo &bindInfo);
68 void AddCoder(ICompressCoder *coder);
69 void AddCoder2(ICompressCoder2 *coder);
70 void SetProgressCoderIndex(int coderIndex) { _progressCoderIndex = coderIndex ; }
71
72 void ReInit();
73 void SetCoderInfo(UInt32 coderIndex, const UInt64 **inSizes, const UInt64 **ou tSizes)
74 { _coders[coderIndex].SetCoderInfo(inSizes, outSizes); }
75 UInt64 GetWriteProcessedSize(UInt32 binderIndex) const
76 { return _streamBinders[binderIndex].ProcessedSize; }
77 };
78
79 }
80 #endif
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698