~ubuntu-branches/ubuntu/trusty/digikam/trusty

« back to all changes in this revision

Viewing changes to extra/kipi-plugins/videoslideshow/manager/encoderdecoder.h

  • Committer: Package Import Robot
  • Author(s): Rohan Garg
  • Date: 2012-11-26 18:24:20 UTC
  • mfrom: (1.9.1) (3.1.23 experimental)
  • Revision ID: package-import@ubuntu.com-20121126182420-qoy6z0nx4ai0wzcl
Tags: 4:3.0.0~beta3-0ubuntu1
* New upstream release
  - Add build-deps :  libhupnp-dev, libqtgstreamer-dev, libmagickcore-dev
* Merge from debian, remaining changes:
  - Make sure libqt4-opengl-dev, libgl1-mesa-dev and libglu1-mesa-dev only
    install on i386,amd64 and powerpc
  - Depend on libtiff-dev instead of libtiff4-dev
  - Drop digikam breaks/replaces kipi-plugins-common since we're past the
    LTS release now
  - digikam to recommend mplayerthumbs | ffmpegthumbs. We currently only
    have latter in the archives, even though former is also supposed to
    be part of kdemultimedia. (LP: #890059)
  - kipi-plugins to recommend www-browser rather than konqueror directly
    since 2.8 no direct usage of konqueror is present in the flickr
    plugin anymore (LP: #1011211)
  - Keep kubuntu_mysqld_executable_name.diff
  - Don't install libkipi translations
  - Keep deps on libcv-dev, libcvaux-dev
  - Keep split packaging of libraries
  - Replace icons from KDE 3 time in debian/xpm.d/*.xpm with the new
    versions (LP: #658047)
* Update debian/not-installed

Show diffs side-by-side

added added

removed removed

Lines of Context:
 
1
/** ===========================================================
 
2
 * @file
 
3
 *
 
4
 * This file is a part of digiKam project
 
5
 * <a href="http://www.digikam.org">http://www.digikam.org</a>
 
6
 *
 
7
 * @date   2012-08-01
 
8
 * @brief  encode images to video
 
9
 *
 
10
 * @author Copyright (C) 2012 by A Janardhan Reddy <annapareddyjanardhanreddy at gmail dot com>
 
11
 *
 
12
 * This program is free software; you can redistribute it
 
13
 * and/or modify it under the terms of the GNU General
 
14
 * Public License as published by the Free Software Foundation;
 
15
 * either version 2, or (at your option)
 
16
 * any later version.
 
17
 *
 
18
 * This program is distributed in the hope that it will be useful,
 
19
 * but WITHOUT ANY WARRANTY; without even the implied warranty of
 
20
 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
 
21
 * GNU General Public License for more details.
 
22
 *
 
23
 * ============================================================ */
 
24
 
 
25
#ifndef ENCODERDECODER_H
 
26
#define ENCODERDECODER_H
 
27
 
 
28
// Qt includes
 
29
 
 
30
#include <QStringList>
 
31
#include <QObject>
 
32
 
 
33
// QtGstreamer includes
 
34
 
 
35
#include <QGst/Pipeline>
 
36
#include <QGst/Utils/ApplicationSource>
 
37
 
 
38
namespace KIPIVideoSlideShowPlugin
 
39
{
 
40
 
 
41
enum AUDIO_TYPE
 
42
{
 
43
    AUDIO_MP2,
 
44
    AUDIO_MP3
 
45
};
 
46
 
 
47
enum VIDEO_TYPE
 
48
{
 
49
    VIDEO_VCD,
 
50
    VIDEO_SVCD,
 
51
    VIDEO_XVCD,
 
52
    VIDEO_DVD,
 
53
    VIDEO_AVI,
 
54
    VIDEO_OGG
 
55
};
 
56
 
 
57
enum VIDEO_FORMAT
 
58
{
 
59
    VIDEO_FORMAT_PAL,
 
60
    VIDEO_FORMAT_NTSC,
 
61
    VIDEO_FORMAT_SECAM
 
62
};
 
63
 
 
64
enum ASPECT_RATIO
 
65
{
 
66
    ASPECT_RATIO_DEFAULT,
 
67
    ASPECT_RATIO_4_3,
 
68
    ASPECT_RATIO_16_9
 
69
};
 
70
 
 
71
class EncoderDecoder : public QObject
 
72
{
 
73
    Q_OBJECT
 
74
 
 
75
public:
 
76
    EncoderDecoder();
 
77
    ~EncoderDecoder();
 
78
 
 
79
    void encodeVideo(const QString& destination, const QString& audiFile, VIDEO_FORMAT format, VIDEO_TYPE type,
 
80
                     const QString& imagePath, ASPECT_RATIO ratio);
 
81
    void cancel();
 
82
 
 
83
Q_SIGNALS:
 
84
 
 
85
    void encoderError(const QString& message);
 
86
    void finished();
 
87
 
 
88
private:
 
89
    void onBusMessage(const QGst::MessagePtr& message);
 
90
 
 
91
    //QGst::BinPtr createAudioSrcBin(QString file, AUDIO_TYPE type, int sampleRate, int bitRate);
 
92
    //QGst::BinPtr createVideoSrcBin(VIDEO_TYPE type, VIDEO_FORMAT format);
 
93
 
 
94
private:
 
95
 
 
96
    QGst::PipelinePtr              pipeline;
 
97
    QStringList                    audioPipelines;
 
98
    QStringList                    videoPipelines;
 
99
 
 
100
    QGst::Utils::ApplicationSource src;
 
101
};
 
102
 
 
103
} // namespace KIPIVideoSlideShowPlugin
 
104
 
 
105
#endif // ENCODERDECODER_H