/*
- 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
*/
+/** @file src/lib/analyse_audio_job.h
+ * @brief AnalyseAudioJob class.
+ */
+
#include "job.h"
#include "audio_analysis.h"
#include "types.h"
class AudioBuffers;
class AudioContent;
+/** @class AnalyseAudioJob
+ * @brief A job to analyse the audio of a piece of AudioContent and make a note of its
+ * broad peak and RMS levels.
+ *
+ * After computing the peak and RMS levels over the length of the content, the job
+ * will write a file to Content::audio_analysis_path.
+ */
class AnalyseAudioJob : public Job
{
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
*/
+/** @file src/lib/audio_analysis.h
+ * @brief AudioAnalysis and AudioPoint classes.
+ */
+
#ifndef DCPOMATIC_AUDIO_ANALYSIS_H
#define DCPOMATIC_AUDIO_ANALYSIS_H
#include <list>
#include <boost/filesystem.hpp>
+/** @class AudioPoint
+ * @brief A single point of an audio analysis for one portion of one channel.
+ */
class AudioPoint
{
public:
float _data[COUNT];
};
+/** @class AudioAnalysis
+ * @brief An analysis of the audio data in a piece of AudioContent.
+ *
+ * This is a set of AudioPoints for each channel. The AudioPoints
+ * each represent some measurement of the audio over a portion of the
+ * content. For example each AudioPoint may give the RMS level of
+ * a 1-minute portion of the audio.
+ */
class AudioAnalysis : public boost::noncopyable
{
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
*/
-#ifndef DVDOMATIC_AUDIO_BUFFERS_H
-#define DVDOMATIC_AUDIO_BUFFERS_H
+/** @file src/lib/audio_buffers.h
+ * @brief AudioBuffers class.
+ */
+
+#ifndef DCPOMATIC_AUDIO_BUFFERS_H
+#define DCPOMATIC_AUDIO_BUFFERS_H
#include <boost/shared_ptr.hpp>
return s.str ();
}
+/** Construct a ScopedTemporary. A temporary filename is decided but the file is not opened
+ * until ::open() is called.
+ */
ScopedTemporary::ScopedTemporary ()
: _open (0)
{
_file = boost::filesystem::temp_directory_path() / boost::filesystem::unique_path ();
}
+/** Close and delete the temporary file */
ScopedTemporary::~ScopedTemporary ()
{
close ();
boost::filesystem::remove (_file, ec);
}
+/** @return temporary filename */
char const *
ScopedTemporary::c_str () const
{
return _file.string().c_str ();
}
+/** Open the temporary file.
+ * @return File's FILE pointer.
+ */
FILE*
ScopedTemporary::open (char const * params)
{
return _open;
}
+/** Close the file */
void
ScopedTemporary::close ()
{
char* _old;
};
+/** @class ScopedTemporary
+ * @brief A temporary file which is deleted when the ScopedTemporary object goes out of scope.
+ */
class ScopedTemporary
{
public:
ScopedTemporary ();
~ScopedTemporary ();
+ /** @return temporary filename */
boost::filesystem::path file () const {
return _file;
}
-
+
char const * c_str () const;
FILE* open (char const *);
void close ();
{ wxCMD_LINE_NONE, "", "", "", wxCmdLineParamType (0), 0 }
};
+/** @class App
+ * @brief The magic App class for wxWidgets.
+ */
class App : public wxApp
{
bool OnInit ()
/*
- 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/about_dialog.cc
+ * @brief The "about DCP-o-matic" dialogue box.
+ */
+
#include <wx/notebook.h>
#include <wx/hyperlink.h>
#include "lib/version.h"
SetSizerAndFit (overall_sizer);
}
+/** Add a section of credits.
+ * @param name Name of section.
+ * @param credits List of names.
+ */
void
AboutDialog::add_section (wxString name, wxArrayString credits)
{
/*
- 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/about_dialog.h
+ * @brief The "about DCP-o-matic" dialogue box.
+ */
+
#include <wx/wx.h>
class wxNotebook;
+/** @class AboutDialog
+ * @brief The "about DCP-o-matic" dialogue box.
+ */
class AboutDialog : public wxDialog
{
public:
private:
void add_section (wxString, wxArrayString);
- wxNotebook* _notebook;
+ wxNotebook* _notebook; ///< notebook used to keep each list of names for the credits
};
using std::list;
using std::cout;
+/** @struct Case
+ * @brief A test case for pixel_formats_test.
+ */
struct Case
{
Case (AVPixelFormat f, int c, int l0, int l1, int l2, float b0, float b1, float b2)