remove incorrectly named
[goodguy/cinelerra.git] / cinelerra-5.1 / cinelerra / cplayback.C
1
2 /*
3  * CINELERRA
4  * Copyright (C) 2008 Adam Williams <broadcast at earthling dot net>
5  *
6  * This program is free software; you can redistribute it and/or modify
7  * it under the terms of the GNU General Public License as published by
8  * the Free Software Foundation; either version 2 of the License, or
9  * (at your option) any later version.
10  *
11  * This program is distributed in the hope that it will be useful,
12  * but WITHOUT ANY WARRANTY; without even the implied warranty of
13  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
14  * GNU General Public License for more details.
15  *
16  * You should have received a copy of the GNU General Public License
17  * along with this program; if not, write to the Free Software
18  * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
19  *
20  */
21
22 #include "arender.h"
23 #include "audiodevice.h"
24 #include "cplayback.h"
25 #include "ctracking.h"
26 #include "cwindow.h"
27 #include "cwindowgui.h"
28 #include "edl.h"
29 #include "edlsession.h"
30 #include "mwindow.h"
31 #include "mwindowgui.h"
32 #include "playtransport.h"
33 #include "renderengine.h"
34 #include "trackcanvas.h"
35 #include "transportque.h"
36
37 // Playback engine for composite window
38
39 CPlayback::CPlayback(MWindow *mwindow, CWindow *cwindow, Canvas *output)
40  : PlaybackEngine(mwindow, output)
41 {
42         this->cwindow = cwindow;
43 }
44
45 int CPlayback::create_render_engine()
46 {
47         return PlaybackEngine::create_render_engine();
48 }
49
50 void CPlayback::init_cursor(int active)
51 {
52         mwindow->gui->lock_window("CPlayback::init_cursor");
53         mwindow->gui->deactivate_timeline();
54         mwindow->gui->unlock_window();
55         cwindow->playback_cursor->start_playback(tracking_position, active);
56 }
57
58 void CPlayback::init_meters()
59 {
60         AudioDevice *audio = render_engine->audio;
61         int dmix = audio && (audio->get_idmix() || audio->get_odmix());
62         cwindow->gui->meters->init_meters(dmix);
63 }
64
65 void CPlayback::stop_cursor()
66 {
67         cwindow->playback_cursor->stop_playback();
68 }
69
70
71 int CPlayback::brender_available(long position)
72 {
73         return mwindow->brender_available(position);
74 }