summaryrefslogtreecommitdiff
path: root/src/lib/stream.cc
diff options
context:
space:
mode:
authorCarl Hetherington <cth@carlh.net>2012-11-19 00:07:29 +0000
committerCarl Hetherington <cth@carlh.net>2012-11-19 00:07:29 +0000
commit259ed1f1602d866640a3035341a834e937e45e79 (patch)
tree12513a92e881f1f76bb19dec535137ebc66ef7b9 /src/lib/stream.cc
parent52b840565b8be0f4933b78948bddeccfc4ba2135 (diff)
Remove unused Processor::process_begin; some docs.
Diffstat (limited to 'src/lib/stream.cc')
-rw-r--r--src/lib/stream.cc19
1 files changed, 19 insertions, 0 deletions
diff --git a/src/lib/stream.cc b/src/lib/stream.cc
index 372077cd8..4f12f41b9 100644
--- a/src/lib/stream.cc
+++ b/src/lib/stream.cc
@@ -28,6 +28,10 @@ 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 +43,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);
}
+/** 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 +78,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)
{