~ubuntu-branches/ubuntu/wily/sflphone/wily

« back to all changes in this revision

Viewing changes to daemon/src/video/video_camera.h

  • Committer: Package Import Robot
  • Author(s): Jonathan Riddell
  • Date: 2015-01-07 14:51:16 UTC
  • mfrom: (4.3.5 sid)
  • Revision ID: package-import@ubuntu.com-20150107145116-yxnafinf4lrdvrmx
Tags: 1.4.1-0.1ubuntu1
* Merge with Debian, remaining changes:
 - Drop soprano, nepomuk build-dep
* Drop ubuntu patches, now upstream

Show diffs side-by-side

added added

removed removed

Lines of Context:
1
 
/*
2
 
 *  Copyright (C) 2011-2013 Savoir-Faire Linux Inc.
3
 
 *
4
 
 *  Author: Tristan Matthews <tristan.matthews@savoirfairelinux.com>
5
 
 *  Author: Guillaume Roguez <Guillaume.Roguez@savoirfairelinux.com>
6
 
 *
7
 
 *  This program is free software; you can redistribute it and/or modify
8
 
 *  it under the terms of the GNU General Public License as published by
9
 
 *  the Free Software Foundation; either version 3 of the License, or
10
 
 *  (at your option) any later version.
11
 
 *
12
 
 *  This program 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
15
 
 *  GNU General Public License for more details.
16
 
 *
17
 
 *  You should have received a copy of the GNU General Public License
18
 
 *  along with this program; if not, write to the Free Software
19
 
 *  Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301 USA.
20
 
 *
21
 
 *  Additional permission under GNU GPL version 3 section 7:
22
 
 *
23
 
 *  If you modify this program, or any covered work, by linking or
24
 
 *  combining it with the OpenSSL project's OpenSSL library (or a
25
 
 *  modified version of that library), containing parts covered by the
26
 
 *  terms of the OpenSSL or SSLeay licenses, Savoir-Faire Linux Inc.
27
 
 *  grants you additional permission to convey the resulting work.
28
 
 *  Corresponding Source for a non-source form of such a combination
29
 
 *  shall include the source code for the parts of OpenSSL used as well
30
 
 *  as that of the covered work.
31
 
 */
32
 
 
33
 
#ifndef __VIDEO_CAMERA_H__
34
 
#define __VIDEO_CAMERA_H__
35
 
 
36
 
#include "noncopyable.h"
37
 
#include "shm_sink.h"
38
 
#include "video_decoder.h"
39
 
#include "sflthread.h"
40
 
 
41
 
#include <string>
42
 
#include <map>
43
 
 
44
 
 
45
 
namespace sfl_video {
46
 
using std::string;
47
 
 
48
 
class VideoCamera :
49
 
    public VideoGenerator,
50
 
    public SFLThread
51
 
{
52
 
public:
53
 
    VideoCamera(const std::map<string, string> &args);
54
 
    ~VideoCamera();
55
 
 
56
 
    // as VideoGenerator
57
 
    int getWidth() const;
58
 
    int getHeight() const;
59
 
    int getPixelFormat() const;
60
 
 
61
 
private:
62
 
    NON_COPYABLE(VideoCamera);
63
 
 
64
 
    std::string id_;
65
 
    std::map<string, string> args_;
66
 
    VideoDecoder *decoder_;
67
 
    SHMSink sink_;
68
 
    int sinkWidth_;
69
 
    int sinkHeight_;
70
 
 
71
 
    // as SFLThread
72
 
    bool setup();
73
 
    void process();
74
 
    void cleanup();
75
 
 
76
 
    static int interruptCb(void *ctx);
77
 
    bool captureFrame();
78
 
};
79
 
 
80
 
}
81
 
 
82
 
#endif // __VIDEO_CAMERA_H__