Skip to content

Commit

Permalink
Recordings: add aux
Browse files Browse the repository at this point in the history
  • Loading branch information
hannemann committed May 24, 2015
1 parent 93af8e5 commit 25ac74f
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 0 deletions.
5 changes: 5 additions & 0 deletions recordings.cpp
Expand Up @@ -396,6 +396,7 @@ void operator<<= (cxxtools::SerializationInfo& si, const SerRecording& p)
si.addMember("event_start_time") <<= p.EventStartTime;
si.addMember("event_duration") <<= p.EventDuration;
si.addMember("additional_media") <<= p.AdditionalMedia;
si.addMember("aux") <<= p.Aux;
}

RecordingList::RecordingList(ostream *out, bool _read_marks)
Expand Down Expand Up @@ -491,6 +492,9 @@ void JsonRecordingList::addRecording(cRecording* recording, int nr)
serRecording.EventStartTime = eventStartTime;
serRecording.EventDuration = eventDuration;

const char* aux = recording->Info()->Aux();
serRecording.Aux = (aux != NULL ? StringExtension::UTF8Decode(aux) : empty);

SerMarks serMarks;
if (read_marks) {
serMarks.marks = VdrMarks::get()->readMarks(recording);
Expand Down Expand Up @@ -588,6 +592,7 @@ void XmlRecordingList::addRecording(cRecording* recording, int nr)
s->write(cString::sprintf(" <param name=\"event_description\">%s</param>\n", StringExtension::encodeToXml(eventDescription).c_str()));
s->write(cString::sprintf(" <param name=\"event_start_time\">%i</param>\n", eventStartTime));
s->write(cString::sprintf(" <param name=\"event_duration\">%i</param>\n", eventDuration));
s->write(cString::sprintf(" <param name=\"aux\">%s</param>\n", StringExtension::encodeToXml(recording->Info()->Aux()).c_str()));


sc.getMedia(recording, s);
Expand Down
1 change: 1 addition & 0 deletions recordings.h
Expand Up @@ -64,6 +64,7 @@ struct SerRecording
cxxtools::String EventDescription;
int EventStartTime;
int EventDuration;
cxxtools::String Aux;
struct SerAdditionalMedia AdditionalMedia;
};

Expand Down

0 comments on commit 25ac74f

Please sign in to comment.