Comments.
authorCarl Hetherington <cth@carlh.net>
Fri, 2 May 2014 19:06:58 +0000 (20:06 +0100)
committerCarl Hetherington <cth@carlh.net>
Fri, 2 May 2014 19:06:58 +0000 (20:06 +0100)
21 files changed:
src/lib/content_factory.cc
src/lib/content_factory.h
src/lib/decoder.h
src/lib/exceptions.cc
src/lib/exceptions.h
src/lib/file_group.cc
src/lib/file_group.h
src/lib/player.h
src/lib/playlist.h
src/lib/position.h
src/lib/update.cc
src/lib/update.h
src/lib/video_decoder.cc
src/lib/video_decoder.h
src/lib/video_examiner.h
src/wx/audio_mapping_view.cc
src/wx/audio_mapping_view.h
src/wx/timeline.cc
src/wx/video_panel.h
src/wx/wx_ui_signaller.cc
src/wx/wx_ui_signaller.h

index 092efd7903d7dba9219c483c57a03307d6733945..789496d08e043c7d911ce2991eff4f689b3e4e68 100644 (file)
@@ -1,5 +1,5 @@
 /*
-    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"
@@ -28,6 +32,13 @@ using std::string;
 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)
 {
@@ -48,6 +59,11 @@ content_factory (shared_ptr<const Film> film, cxml::NodePtr node, int version, l
        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)
 {
index 2eeebbc9f8924c9ebb45c04df47bfdbefa9de22c..fae7648eabfa8910baa7157a695cca1035dba2cc 100644 (file)
@@ -1,5 +1,5 @@
 /*
-    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> &);
index 38556c8188a3932a319c5c3c3a7e463fa0fde435..0ec73ba91f47147af16b057dcef31004a0b75c47 100644 (file)
@@ -18,7 +18,7 @@
 */
 
 /** @file  src/decoder.h
- *  @brief Parent class for decoders of content.
+ *  @brief Decoder class.
  */
 
 #ifndef DCPOMATIC_DECODER_H
index e05ac4ff04b3fdebb5617129f5c9a0eb6c9dc10e..4d9ccc95c7fa7c11d09d83663caab10ed3010d1d 100644 (file)
@@ -1,5 +1,5 @@
 /*
-    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
index 213be6186d523a713a0a3f167f77127e0047164e..38452ffc02b7c0867596cb55787a77c29eeafc01 100644 (file)
@@ -1,5 +1,5 @@
 /*
-    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>
@@ -205,7 +205,7 @@ public:
        {}
 };
 
-/** @class NetworkError.
+/** @class NetworkError
  *  @brief Indicates some problem with communication on the network.
  */
 class NetworkError : public StringError
@@ -216,6 +216,9 @@ public:
        {}
 };
 
+/** @class KDMError
+ *  @brief A problem with a KDM.
+ */
 class KDMError : public StringError
 {
 public:
@@ -224,22 +227,30 @@ 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 {
index 9d042554c5b8c0649385456895d0358d813a7b0c..54ec8280c0a6830da2a671137dc7a4f45336b61b 100644 (file)
@@ -1,5 +1,5 @@
 /*
-    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"
@@ -26,6 +30,7 @@
 using std::vector;
 using std::cout;
 
+/** Construct a FileGroup with no files */
 FileGroup::FileGroup ()
        : _current_path (0)
        , _current_file (0)
@@ -33,14 +38,17 @@ FileGroup::FileGroup ()
 
 }
 
+/** 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)
@@ -50,6 +58,7 @@ FileGroup::FileGroup (vector<boost::filesystem::path> const & p)
        seek (0, SEEK_SET);
 }
 
+/** Destroy a FileGroup, closing any open file */
 FileGroup::~FileGroup ()
 {
        if (_current_file) {
@@ -160,6 +169,7 @@ FileGroup::read (uint8_t* buffer, int amount) const
        return read;
 }
 
+/** @return Combined length of all the files */
 int64_t
 FileGroup::length () const
 {
index 65091c93646ac410c7f83b2c1a6d90dc1ef70e3a..5a65de96f7584e3afdab1ad71fd928f5df3b3005 100644 (file)
@@ -1,5 +1,5 @@
 /*
-    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:
index 9151d20c5ac163d4a1ed882374782af96cd2eb2a..e47cf53a1f00df21baed32027d65c50d675cee47 100644 (file)
@@ -75,7 +75,8 @@ 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
index 444eb9ae5ebb5ae1aac34932440025c92c3f8b43..4295a3e3512da7de78a1444a5194f826e763a89f 100644 (file)
@@ -38,18 +38,15 @@ class Job;
 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:
index f9bd0987cdb5ed3e2688ed63bf0d5cfdbbf1597d..d68fcb1af9a02aa6cf1a3cb0e452e5718c7f4aa2 100644 (file)
@@ -1,5 +1,5 @@
 /*
-    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
@@ -21,7 +21,7 @@
 #define DCPOMATIC_POSITION_H
 
 /** @struct Position
- *  @brief A position.
+ *  @brief A position (x and y coordinates)
  */
 template <class T>
 class Position
index a98ee5b5d6bd8b52331831a1a101e0ccf0e21f20..019db8e761ea619c26848ec822c16b517f363ea1 100644 (file)
@@ -34,6 +34,7 @@ using std::string;
 using std::stringstream;
 using boost::lexical_cast;
 
+/** Singleton instance */
 UpdateChecker* UpdateChecker::_instance = 0;
 
 static size_t
@@ -42,6 +43,9 @@ write_callback_wrapper (void* data, size_t size, size_t nmemb, void* user)
        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)
@@ -73,6 +77,7 @@ UpdateChecker::~UpdateChecker ()
        delete[] _buffer;
 }
 
+/** Start running the update check */
 void
 UpdateChecker::run ()
 {
@@ -85,6 +90,7 @@ void
 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);
@@ -94,12 +100,16 @@ UpdateChecker::thread ()
                
                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;
index e96ccec3119903a76af0c26ee1a0a1af41ba49d7..c86adb8736adad074625f8b7a73dd47ae1eb666e 100644 (file)
 
 */
 
+/** @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:
@@ -32,28 +37,31 @@ 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;
index 146120fe1adda6c930e04cd44968fed493bc4a1a..1b6da8a91133a387b62813054cfd8bb2baf506eb 100644 (file)
@@ -53,6 +53,11 @@ VideoDecoder::decoded_video (VideoFrame frame)
        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)
 {
index 685b72bc8683ad72b8b3b96feca365899eeeb779..145baa40b0ca115acda97f8b33376d8712890193 100644 (file)
 
 */
 
+/** @file  src/lib/video_decoder.h
+ *  @brief VideoDecoder class.
+ */
+
 #ifndef DCPOMATIC_VIDEO_DECODER_H
 #define DCPOMATIC_VIDEO_DECODER_H
 
@@ -30,6 +34,9 @@
 class VideoContent;
 class Image;
 
+/** @class VideoDecoder
+ *  @brief Parent for classes which decode video.
+ */
 class VideoDecoder : public virtual Decoder
 {
 public:
index d4897213beb69634d1b777b955e4d0b9efa9a44b..87e9a04288a20fb13018391ad4c124a58b757e05 100644 (file)
@@ -1,5 +1,5 @@
 /*
-    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:
index 52303ac14b2e9b94996bbf8950f42e3bf4458abc..be1bd67b9cd4d0a388f85e5030363352cf0d7cb3 100644 (file)
@@ -1,5 +1,5 @@
 /*
-    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>
@@ -52,6 +56,9 @@ public:
        }
 };
 
+/** @class ValueRenderer
+ *  @brief wxGridCellRenderer for a gain value.
+ */
 class ValueRenderer : public wxGridCellRenderer
 {
 public:
index 26f1746e09bbeb9c73d86a6c1ce761bc36efa81c..3d8db0cffb2a7bd94b08da1fd5a82e696154c7af 100644 (file)
@@ -1,5 +1,5 @@
 /*
-    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>
index 185abefeb8b5e6c1041c937d02f491c9de00ea3f..d5643b556db5747c7e80099165217886435f0b87 100644 (file)
@@ -35,7 +35,9 @@ using boost::dynamic_pointer_cast;
 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:
@@ -76,7 +78,9 @@ private:
 };
 
 
-/** Parent class for views of pieces of content */
+/** @class ContentView
+ *  @brief Parent class for views of pieces of content.
+ */
 class ContentView : public View
 {
 public:
index 99633491d835ea9948538ad696459035e5f16876..4331a97128bea83daba8749ec4d1f6a73f7da532 100644 (file)
@@ -1,5 +1,5 @@
 /*
-    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"
@@ -26,6 +30,9 @@ class wxStaticText;
 class wxSpinCtrl;
 class wxButton;
 
+/** @class VideoPanel
+ *  @brief The video tab of the film editor.
+ */
 class VideoPanel : public FilmEditorPanel
 {
 public:
index f306319608a0e194d5128b8f490d600179df4bfc..8fc6670d6befe69fd2558ae0e05081444c845acd 100644 (file)
@@ -1,5 +1,5 @@
 /*
-    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
index f7df6fca48a9044f2df8e91f6b4582637cce5687..63f2049cd2ed4ca7ca118a7069002055520fa870 100644 (file)
@@ -1,5 +1,5 @@
 /*
-    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: