/*
- Copyright (C) 2013 Carl Hetherington <cth@carlh.net>
+ Copyright (C) 2013-2014 Carl Hetherington <cth@carlh.net>
This program is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
*/
+/** @file src/lib/content_factory.cc
+ * @brief Methods to create content objects.
+ */
+
#include <libcxml/cxml.h>
#include "ffmpeg_content.h"
#include "image_content.h"
using std::list;
using boost::shared_ptr;
+/** Create a Content object from an XML node.
+ * @param film Film that the content will be in.
+ * @param node XML description.
+ * @param version XML state version.
+ * @param notes A list to which is added descriptions of any non-critial warnings / messages.
+ * @return Content object, or 0 if no content was recognised in the XML.
+ */
shared_ptr<Content>
content_factory (shared_ptr<const Film> film, cxml::NodePtr node, int version, list<string>& notes)
{
return content;
}
+/** Create a Content object from a file, depending on its extension.
+ * @param film Film that the content will be in.
+ * @param path File's path.
+ * @return Content object.
+ */
shared_ptr<Content>
content_factory (shared_ptr<const Film> film, boost::filesystem::path path)
{
/*
- Copyright (C) 2013 Carl Hetherington <cth@carlh.net>
+ Copyright (C) 2013-2014 Carl Hetherington <cth@carlh.net>
This program is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
*/
+/** @file src/lib/content_factory.h
+ * @brief Methods to create content objects.
+ */
+
class Film;
extern boost::shared_ptr<Content> content_factory (boost::shared_ptr<const Film>, cxml::NodePtr, int, std::list<std::string> &);
*/
/** @file src/decoder.h
- * @brief Parent class for decoders of content.
+ * @brief Decoder class.
*/
#ifndef DCPOMATIC_DECODER_H
/*
- Copyright (C) 2012-2013 Carl Hetherington <cth@carlh.net>
+ Copyright (C) 2012-2014 Carl Hetherington <cth@carlh.net>
This program is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
/*
- Copyright (C) 2012 Carl Hetherington <cth@carlh.net>
+ Copyright (C) 2012-2014 Carl Hetherington <cth@carlh.net>
This program is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
*/
-#ifndef DCPOMATIC_EXCEPTIONS_H
-#define DCPOMATIC_EXCEPTIONS_H
-
-/** @file src/exceptions.h
+/** @file src/lib/exceptions.h
* @brief Our exceptions.
*/
+#ifndef DCPOMATIC_EXCEPTIONS_H
+#define DCPOMATIC_EXCEPTIONS_H
+
#include <stdexcept>
#include <cstring>
#include <boost/exception/all.hpp>
{}
};
-/** @class NetworkError.
+/** @class NetworkError
* @brief Indicates some problem with communication on the network.
*/
class NetworkError : public StringError
{}
};
+/** @class KDMError
+ * @brief A problem with a KDM.
+ */
class KDMError : public StringError
{
public:
{}
};
+/** @class PixelFormatError
+ * @brief A problem with an unsupported pixel format.
+ */
class PixelFormatError : public StringError
{
public:
PixelFormatError (std::string o, AVPixelFormat f);
};
-/** An error that occurs while parsing a SubRip file */
+/** @class SubRipError
+ * @brief An error that occurs while parsing a SubRip file.
+ */
class SubRipError : public FileError
{
public:
SubRipError (std::string, std::string, boost::filesystem::path);
};
-/** A parent class for classes which have a need to catch and
- * re-throw exceptions. This is intended for classes
- * which run their own thread; they should do something like
+/** @class ExceptionStore
+ * @brief A parent class for classes which have a need to catch and
+ * re-throw exceptions.
+
+ * This is intended for classes which run their own thread; they should do
+ * something like
*
* void my_thread ()
* try {
/*
- Copyright (C) 2013 Carl Hetherington <cth@carlh.net>
+ Copyright (C) 2013-2014 Carl Hetherington <cth@carlh.net>
This program is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
*/
+/** @file src/lib/file_group.cc
+ * @brief FileGroup class.
+ */
+
#include <cstdio>
#include <sndfile.h>
#include "file_group.h"
using std::vector;
using std::cout;
+/** Construct a FileGroup with no files */
FileGroup::FileGroup ()
: _current_path (0)
, _current_file (0)
}
+/** Construct a FileGroup with a single file */
FileGroup::FileGroup (boost::filesystem::path p)
: _current_path (0)
, _current_file (0)
{
_paths.push_back (p);
+ ensure_open_path (0);
seek (0, SEEK_SET);
}
+/** Construct a FileGroup with multiple files */
FileGroup::FileGroup (vector<boost::filesystem::path> const & p)
: _paths (p)
, _current_path (0)
seek (0, SEEK_SET);
}
+/** Destroy a FileGroup, closing any open file */
FileGroup::~FileGroup ()
{
if (_current_file) {
return read;
}
+/** @return Combined length of all the files */
int64_t
FileGroup::length () const
{
/*
- Copyright (C) 2013 Carl Hetherington <cth@carlh.net>
+ Copyright (C) 2013-2014 Carl Hetherington <cth@carlh.net>
This program is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
*/
+/** @file src/lib/file_group.h
+ * @brief FileGroup class.
+ */
+
#ifndef DCPOMATIC_FILE_GROUP_H
#define DCPOMATIC_FILE_GROUP_H
#include <vector>
#include <boost/filesystem.hpp>
+/** @class FileGroup
+ * @brief A class to make a list of files behave like they were concatenated.
+ */
class FileGroup
{
public:
void dump (boost::shared_ptr<Log>) const;
};
-/** A wrapper for an Image which contains some pending operations; these may
+/** @class PlayerImage
+ * @brief A wrapper for an Image which contains some pending operations; these may
* not be necessary if the receiver of the PlayerImage throws it away.
*/
class PlayerImage
class Film;
class Region;
-/** @class Playlist
- * @brief A set of content files (video and audio), with knowledge of how they should be arranged into
- * a DCP.
- *
- * This class holds Content objects, and it knows how they should be arranged.
- */
-
struct ContentSorter
{
bool operator() (boost::shared_ptr<Content> a, boost::shared_ptr<Content> b);
};
+/** @class Playlist
+ * @brief A set of Content objects with knowledge of how they should be arranged into
+ * a DCP.
+ */
class Playlist : public boost::noncopyable
{
public:
/*
- Copyright (C) 2013 Carl Hetherington <cth@carlh.net>
+ Copyright (C) 2013-2014 Carl Hetherington <cth@carlh.net>
This program is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
#define DCPOMATIC_POSITION_H
/** @struct Position
- * @brief A position.
+ * @brief A position (x and y coordinates)
*/
template <class T>
class Position
using std::stringstream;
using boost::lexical_cast;
+/** Singleton instance */
UpdateChecker* UpdateChecker::_instance = 0;
static size_t
return reinterpret_cast<UpdateChecker*>(user)->write_callback (data, size, nmemb);
}
+/** Construct an UpdateChecker. This sets things up and starts a thread to
+ * do the work.
+ */
UpdateChecker::UpdateChecker ()
: _buffer (new char[BUFFER_SIZE])
, _offset (0)
delete[] _buffer;
}
+/** Start running the update check */
void
UpdateChecker::run ()
{
UpdateChecker::thread ()
{
while (1) {
+ /* Block until there is something to do */
boost::mutex::scoped_lock lock (_process_mutex);
while (_to_do == 0) {
_condition.wait (lock);
try {
_offset = 0;
+
+ /* Perform the request */
int r = curl_easy_perform (_curl);
if (r != CURLE_OK) {
set_state (FAILED);
return;
}
+
+ /* Parse the reply */
_buffer[_offset] = '\0';
stringstream s;
*/
+/** @file src/lib/update.h
+ * @brief UpdateChecker class.
+ */
+
#include <boost/signals2.hpp>
#include <boost/thread/mutex.hpp>
#include <boost/thread/condition.hpp>
#include <boost/thread.hpp>
#include <curl/curl.h>
+/** Class to check for the existance of an update for DCP-o-matic on a remote server */
class UpdateChecker
{
public:
void run ();
enum State {
- YES,
- FAILED,
- NO,
- NOT_RUN
+ YES, ///< there is an update
+ FAILED, ///< the check failed, so we don't know
+ NO, ///< there is no update
+ NOT_RUN ///< the check has not been run (yet)
};
+ /** @return state of the checker */
State state () {
boost::mutex::scoped_lock lm (_data_mutex);
return _state;
}
+ /** @return the version string of the latest stable version (if _state == YES or NO) */
std::string stable () {
boost::mutex::scoped_lock lm (_data_mutex);
return _stable;
}
+ /** @return the version string of the latest test version (if _state == YES or NO) */
std::string test () {
boost::mutex::scoped_lock lm (_data_mutex);
return _test;
}
- /** @return true if the list signal emission was the first */
+ /** @return true if the last signal emission was the first */
bool last_emit_was_first () const {
boost::mutex::scoped_lock lm (_data_mutex);
return _emits == 1;
return output;
}
+/** Get all frames which exist in the content at a given frame index.
+ * @param frame Frame index.
+ * @param accurate true to try hard to return frames at the precise time that was requested, otherwise frames nearby may be returned.
+ * @return Frames; there may be none (if there is no video there), 1 for 2D or 2 for 3D.
+ */
list<ContentVideo>
VideoDecoder::get_video (VideoFrame frame, bool accurate)
{
*/
+/** @file src/lib/video_decoder.h
+ * @brief VideoDecoder class.
+ */
+
#ifndef DCPOMATIC_VIDEO_DECODER_H
#define DCPOMATIC_VIDEO_DECODER_H
class VideoContent;
class Image;
+/** @class VideoDecoder
+ * @brief Parent for classes which decode video.
+ */
class VideoDecoder : public virtual Decoder
{
public:
/*
- Copyright (C) 2013 Carl Hetherington <cth@carlh.net>
+ Copyright (C) 2013-2014 Carl Hetherington <cth@carlh.net>
This program is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
*/
+/** @file src/lib/video_examiner.h
+ * @brief VideoExaminer class.
+ */
+
#include <dcp/types.h>
#include "types.h"
#include "video_content.h"
+/** @class VideoExaminer
+ * @brief Parent for classes which examine video sources and obtain information about them.
+ */
class VideoExaminer
{
public:
/*
- Copyright (C) 2013 Carl Hetherington <cth@carlh.net>
+ Copyright (C) 2013-2014 Carl Hetherington <cth@carlh.net>
This program is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
*/
+/** @file src/wx/audio_mapping_view.cc
+ * @brief AudioMappingView class and helpers.
+ */
+
#include <wx/wx.h>
#include <wx/renderer.h>
#include <wx/grid.h>
}
};
+/** @class ValueRenderer
+ * @brief wxGridCellRenderer for a gain value.
+ */
class ValueRenderer : public wxGridCellRenderer
{
public:
/*
- Copyright (C) 2013 Carl Hetherington <cth@carlh.net>
+ Copyright (C) 2013-2014 Carl Hetherington <cth@carlh.net>
This program is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
*/
+/** @file src/wx/audio_mapping_view.h
+ * @brief AudioMappingView class
+ *
+ * This class displays the mapping of one set of audio channels to another,
+ * with gain values on each node of the map.
+ */
+
#include <boost/signals2.hpp>
#include <wx/wx.h>
#include <wx/grid.h>
using boost::bind;
using boost::optional;
-/** Parent class for components of the timeline (e.g. a piece of content or an axis) */
+/** @class View
+ * @brief Parent class for components of the timeline (e.g. a piece of content or an axis).
+ */
class View : public boost::noncopyable
{
public:
};
-/** Parent class for views of pieces of content */
+/** @class ContentView
+ * @brief Parent class for views of pieces of content.
+ */
class ContentView : public View
{
public:
/*
- Copyright (C) 2012-2013 Carl Hetherington <cth@carlh.net>
+ Copyright (C) 2012-2014 Carl Hetherington <cth@carlh.net>
This program is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
*/
+/** @file src/lib/video_panel.h
+ * @brief VideoPanel class.
+ */
+
#include "lib/film.h"
#include "film_editor_panel.h"
#include "content_widget.h"
class wxSpinCtrl;
class wxButton;
+/** @class VideoPanel
+ * @brief The video tab of the film editor.
+ */
class VideoPanel : public FilmEditorPanel
{
public:
/*
- Copyright (C) 2012 Carl Hetherington <cth@carlh.net>
+ Copyright (C) 2012-2014 Carl Hetherington <cth@carlh.net>
This program is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
/*
- Copyright (C) 2012 Carl Hetherington <cth@carlh.net>
+ Copyright (C) 2012-2014 Carl Hetherington <cth@carlh.net>
This program is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
class wxEvtHandler;
+/** @class wxUISignaller
+ * @brief UISignaller for the wxWidgets event loop
+ */
+
class wxUISignaller : public UISignaller
{
public: