1 // Copyright 1999, Be Incorporated. All Rights Reserved.
2 // Copyright 2000-2004, Jun Suzuki. All Rights Reserved.
3 // Copyright 2007, Stephan Aßmus. All Rights Reserved.
4 // This file may be used under the terms of the Be Sample Code License.
5 #include "MediaEncoderWindow.h"
14 #undef B_TRANSLATION_CONTEXT
15 #define B_TRANSLATION_CONTEXT "MediaConverter-EncoderWindow"
18 MediaEncoderWindow::MediaEncoderWindow(BRect frame
, BView
* view
)
19 : BWindow(frame
, B_TRANSLATE("Encoder parameters"), B_DOCUMENT_WINDOW_LOOK
,
20 B_MODAL_APP_WINDOW_FEEL
,
21 B_NOT_RESIZABLE
| B_NOT_ZOOMABLE
| B_ASYNCHRONOUS_CONTROLS
)
23 // create and acquire the quit semaphore
24 fQuitSem
= create_sem(0, "encoder_view");
28 ResizeTo(fView
->Bounds().Width(), fView
->Bounds().Height());
32 MediaEncoderWindow::~MediaEncoderWindow()
34 // The view must continue to exist until conversion complete.
41 MediaEncoderWindow::MessageReceived(BMessage
*msg
)
47 MediaEncoderWindow::QuitRequested()
54 MediaEncoderWindow::Go()
58 // wait until window is quit
59 while (acquire_sem(fQuitSem
) == B_INTERRUPTED
)