~ubuntu-branches/ubuntu/saucy/sflphone/saucy

« back to all changes in this revision

Viewing changes to sflphone-common/src/conference.cpp

  • Committer: Bazaar Package Importer
  • Author(s): Francois Marier
  • Date: 2010-12-24 16:33:55 UTC
  • mfrom: (1.1.2 upstream)
  • Revision ID: james.westby@ubuntu.com-20101224163355-tkvvikqxbrbav6up
Tags: 0.9.11-1
* New upstream release
* Add new build dependencies on libwebkit-dev and libyaml-dev

* Bump Standards-Version up to 3.9.1
* Bump debhelper compatibility to 8
* Patch another typo in the upstream code (lintian notice)

Show diffs side-by-side

added added

removed removed

Lines of Context:
34
34
#include "conference.h"
35
35
#include "manager.h"
36
36
#include "audio/audiolayer.h"
 
37
#include "audio/mainbuffer.h"
37
38
 
38
39
int Conference::count = 0;
39
40
 
54
55
    _nbParticipant = 0;
55
56
    _id = conf.append (s);
56
57
 
57
 
 
 
58
    Recordable::initRecFileName (_id);
58
59
 
59
60
}
60
61
 
157
158
    return _participants;
158
159
}
159
160
 
 
161
 
 
162
 
 
163
bool Conference::setRecording()
 
164
{
 
165
 
 
166
    bool recordStatus = Recordable::recAudio.isRecording();
 
167
 
 
168
    Recordable::recAudio.setRecording();
 
169
 
 
170
    // start recording
 
171
    if (!recordStatus) {
 
172
 
 
173
        MainBuffer *mbuffer = Manager::instance().getMainBuffer();
 
174
 
 
175
        ParticipantSet::iterator iter = _participants.begin();
 
176
 
 
177
        CallID process_id = Recordable::recorder.getRecorderID();
 
178
 
 
179
        while (iter != _participants.end()) {
 
180
            mbuffer->bindHalfDuplexOut (process_id, *iter);
 
181
            iter++;
 
182
        }
 
183
 
 
184
        mbuffer->bindHalfDuplexOut (process_id);
 
185
 
 
186
        Recordable::recorder.start();
 
187
 
 
188
    }
 
189
    // stop recording
 
190
    else {
 
191
 
 
192
        MainBuffer *mbuffer = Manager::instance().getMainBuffer();
 
193
 
 
194
        ParticipantSet::iterator iter = _participants.begin();
 
195
 
 
196
        CallID process_id = Recordable::recorder.getRecorderID();
 
197
 
 
198
        while (iter != _participants.end()) {
 
199
            mbuffer->unBindHalfDuplexOut (process_id, *iter);
 
200
            iter++;
 
201
        }
 
202
 
 
203
        mbuffer->unBindHalfDuplexOut (process_id);
 
204
 
 
205
        // Recordable::recorder.start();
 
206
 
 
207
    }
 
208
 
 
209
    return recordStatus;
 
210
 
 
211
}