-
Notifications
You must be signed in to change notification settings - Fork 4
Expand file tree
/
Copy pathmain.cpp
More file actions
81 lines (74 loc) · 1.85 KB
/
main.cpp
File metadata and controls
81 lines (74 loc) · 1.85 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
/*!
* project_name EBU Player
* \file main.cpp
* \brief EBU Player main file
* \details In this file, we instanciate all required class
* \authors Marco Dos Santos Oliveira
* \version 0.1
* \date 20 august 2012
* \copyright This software is published in MPLv2.0
*
*/
/*!
*
* \mainpage EBU Player Documentation
This is the documentation of the EBU Player
*
*/
#ifdef __unix__
#include "playerWindow.hpp"
#endif
#ifdef _WIN32
#include "stdafx.h"
#include <windows.h>
int main (int argc, char **argv);
int WINAPI WinMain
(
HINSTANCE hInstance,
HINSTANCE hPrevInstance,
LPSTR lpCmdLine,
int nCmdShow
)
{
return main (__argc, __argv);
}
#endif
/**
* @fn int main (int argc, char *argv[])
* @brief This function loads the player design (all windows design).
* @brief \n \n
* @param[in] argc : Optional.
* @param[in] argv : Optional.
* @return nothing if all is right or gtkmm-critical error/segmentation fault
* @note This function and his documentation must be completed
*/
int main (int argc, char *argv[]) {
//Glib::RefPtr<Gtk::Application> app = Gtk::Application::create(argc, argv, "org.gtkmm.example");
Gtk::Main app(argc, argv);
//Load the Glade file and instiate its widgets:
Glib::RefPtr<Gtk::Builder> refBuilder = Gtk::Builder::create();
try
{
refBuilder->add_from_file("ebu-mxf-enc-windows.glade");
}
catch(const Glib::FileError& err)
{
std::cerr << "FileError: " << err.what() << std::endl;
return 1;
}
catch(const Glib::MarkupError& err)
{
std::cerr << "MarkupError: " << err.what() << std::endl;
return 1;
}
catch(const Gtk::BuilderError& err)
{
std::cerr << "BuilderError: " << err.what() << std::endl;
return 1;
}
playerWindow* mplayer;
refBuilder->get_widget_derived("PLAYER-EBU-MXF-ENCODER",mplayer);
Gtk::Main::run( *mplayer );
delete mplayer;
return 0;
}