blob: be0223cd69e0da571594c4ba4ea6e034e59377a1 [file] [log] [blame]
Wind Yuan78ec1f72015-01-26 16:25:59 +08001/*
2 * analyzer_loader.h - analyzer loader
3 *
4 * Copyright (c) 2015 Intel Corporation
5 *
6 * Licensed under the Apache License, Version 2.0 (the "License");
7 * you may not use this file except in compliance with the License.
8 * You may obtain a copy of the License at
9 *
10 * http://www.apache.org/licenses/LICENSE-2.0
11 *
12 * Unless required by applicable law or agreed to in writing, software
13 * distributed under the License is distributed on an "AS IS" BASIS,
14 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
15 * See the License for the specific language governing permissions and
16 * limitations under the License.
17 *
18 * Author: Wind Yuan <feng.yuan@intel.com>
19 */
20
21#ifndef XCAM_ANALYZER_LOADER_H
22#define XCAM_ANALYZER_LOADER_H
23
Wind Yuan29a49f52015-01-26 17:57:37 +080024#include <base/xcam_common.h>
25#include <base/xcam_3a_description.h>
Wind Yuan78ec1f72015-01-26 16:25:59 +080026#include "xcam_utils.h"
27#include "x3a_analyzer.h"
Wind Yuan78ec1f72015-01-26 16:25:59 +080028
29namespace XCam {
30
31class AnalyzerLoader
32{
33public:
34 AnalyzerLoader (const char *lib_path);
35 ~AnalyzerLoader ();
36
37 SmartPtr<X3aAnalyzer> load_analyzer ();
38
39private:
40 bool open_handle ();
41 XCam3ADescription *get_symbol (const char *symbol);
42 bool close_handle ();
43 void convert_results (XCam3aResultHead *from, uint32_t num_of_from, X3aResultList &to);
44
45 XCAM_DEAD_COPY(AnalyzerLoader);
46
47private:
48 char *_path;
49 void *_handle;
50};
51
52};
53
54#endif //XCAM_ANALYZER_LOADER_H