Instrument Neutral Distributed Interface INDI  2.0.2
v4l2_decode.cpp
Go to the documentation of this file.
1 /*
2  Copyright (C) 2005 by Jasem Mutlaq <mutlaqja@ikarustech.com>
3  Copyright (C) 2014 by geehalel <geehalel@gmail.com>
4 
5  V4L2 Decode
6 
7  This library is free software; you can redistribute it and/or
8  modify it under the terms of the GNU Lesser General Public
9  License as published by the Free Software Foundation; either
10  version 2.1 of the License, or (at your option) any later version.
11 
12  This library is distributed in the hope that it will be useful,
13  but WITHOUT ANY WARRANTY; without even the implied warranty of
14  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
15  Lesser General Public License for more details.
16 
17  You should have received a copy of the GNU Lesser General Public
18  License along with this library; if not, write to the Free Software
19  Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
20 
21 */
22 
23 #include "v4l2_decode.h"
24 #include "v4l2_builtin_decoder.h"
25 
27 {
28 }
29 
31 {
32 }
33 
34 const char *V4L2_Decoder::getName()
35 {
36  return name;
37 }
38 
40 {
41  decoder_list.push_back(new V4L2_Builtin_Decoder());
43 }
44 
46 {
47  std::vector<V4L2_Decoder *>::iterator it;
48  for (it = decoder_list.begin(); it != decoder_list.end(); it++)
49  {
50  delete (*it);
51  }
52  decoder_list.clear();
53 }
54 
55 std::vector<V4L2_Decoder *> V4L2_Decode::getDecoderList()
56 {
57  return decoder_list;
58 }
59 
61 {
62  return current_decoder;
63 }
65 {
66  return default_decoder;
67 };
69 {
70  current_decoder = decoder;
71 };
V4L2_Decoder * current_decoder
Definition: v4l2_decode.h:75
V4L2_Decoder * getDefaultDecoder()
Definition: v4l2_decode.cpp:64
std::vector< V4L2_Decoder * > decoder_list
Definition: v4l2_decode.h:74
V4L2_Decoder * getDecoder()
Definition: v4l2_decode.cpp:60
std::vector< V4L2_Decoder * > getDecoderList()
Definition: v4l2_decode.cpp:55
void setDecoder(V4L2_Decoder *decoder)
Definition: v4l2_decode.cpp:68
V4L2_Decoder * default_decoder
Definition: v4l2_decode.h:76
virtual ~V4L2_Decoder()
Definition: v4l2_decode.cpp:30
const char * name
Definition: v4l2_decode.h:60
virtual const char * getName()
Definition: v4l2_decode.cpp:34