Various markup and tweaks.
[dcpomatic.git] / src / lib / stream.cc
index 372077cd8eda9b4f8648819565505c0dece695ca..e5a2bbc2b92de72ec999ff22a7aa3d710a0420ac 100644 (file)
 #include "ffmpeg_decoder.h"
 #include "external_audio_decoder.h"
 
+#include "i18n.h"
+
 using std::string;
 using std::stringstream;
 using boost::shared_ptr;
 using boost::optional;
 
+/** Construct a SubtitleStream from a value returned from to_string().
+ *  @param t String returned from to_string().
+ *  @param v State file version.
+ */
 SubtitleStream::SubtitleStream (string t, boost::optional<int>)
 {
        stringstream n (t);
@@ -39,18 +45,28 @@ SubtitleStream::SubtitleStream (string t, boost::optional<int>)
        }
 }
 
+/** @return A canonical string representation of this stream */
 string
 SubtitleStream::to_string () const
 {
-       return String::compose ("%1 %2", _id, _name);
+       return String::compose (N_("%1 %2"), _id, _name);
 }
 
+/** Create a SubtitleStream from a value returned from to_string().
+ *  @param t String returned from to_string().
+ *  @param v State file version.
+ */
 shared_ptr<SubtitleStream>
 SubtitleStream::create (string t, optional<int> v)
 {
        return shared_ptr<SubtitleStream> (new SubtitleStream (t, v));
 }
 
+/** Create an AudioStream from a string returned from to_string().
+ *  @param t String returned from to_string().
+ *  @param v State file version.
+ *  @return AudioStream, or 0.
+ */
 shared_ptr<AudioStream>
 audio_stream_factory (string t, optional<int> v)
 {
@@ -64,6 +80,11 @@ audio_stream_factory (string t, optional<int> v)
        return s;
 }
 
+/** Create a SubtitleStream from a string returned from to_string().
+ *  @param t String returned from to_string().
+ *  @param v State file version.
+ *  @return SubtitleStream, or 0.
+ */
 shared_ptr<SubtitleStream>
 subtitle_stream_factory (string t, optional<int> v)
 {