17
17
// le jack output port que l'on veut enregistrer
18
m_audio = new AudioCollector("metro:120_bpm", 1024, 48000);
18
m_audio = new AudioCollector("metro:120_bpm", 1024, 48000); //
19
//m_audio = new AudioCollector("", 1024, 48000);
19
20
// m_audio = new AudioCollector("MPlayer [13728]:out_0", 1024, 48000);
20
21
// m_audio = new AudioCollector("system:capture_1", 1024, 48000);
21
//m_audio = new AudioCollector("freej:Out0", 1024, 48000);
23
m_freej->screen->add_audio(m_audio->Jack);
23
m_freej->screen->add_audio(m_audio->Jack); //
27
27
m_enc = new OggTheoraEncoder();
30
m_enc->video_quality = 14;
31
m_enc->video_bitrate = 1000000;
32
m_enc->audio_quality = 6;
34
m_enc->use_audio = true;
35
m_enc->audio = m_audio;
30
m_enc->video_quality = 10;
31
m_enc->video_bitrate = 100000;
32
m_enc->audio_quality = 1;
33
m_enc->audio_bitrate = 48000;
35
m_enc->use_audio = true; //
36
// m_enc->use_audio = false;
37
m_enc->audio = m_audio; //
41
//if(shout_set_host(m_enc->ice, "skimeuzac.com"))
42
//qDebug() << "shout_set_host: " << shout_get_error(m_enc->ice);
44
if(shout_set_host(m_enc->ice, "localhost"))
45
qDebug() << "shout_set_host: " << shout_get_error(m_enc->ice);
47
if(shout_set_port(m_enc->ice, 8000))
48
qDebug() << "shout_set_port: " << shout_get_error(m_enc->ice);
50
if(shout_set_name(m_enc->ice, "qfreej streaming test"))
51
qDebug() << "shout_set_title: " << shout_get_error(m_enc->ice);
53
if(shout_set_user(m_enc->ice, "source"))
54
qDebug() << "shout_set_user: " << shout_get_error(m_enc->ice);
56
if(shout_set_password(m_enc->ice, "test!"))
57
qDebug() << "shout_set_pass: " << shout_get_error(m_enc->ice);
59
if(shout_set_mount(m_enc->ice, "freejcpp.ogg"))
60
qDebug() << "shout_set_mount: " << shout_get_error(m_enc->ice);
38
62
m_freej->add_encoder(m_enc);
39
m_enc->set_filedump("Video/dump.ogg");
64
if( shout_open(m_enc->ice) == SHOUTERR_SUCCESS ) {
66
qDebug() << "streaming on url: http://" << shout_get_host(m_enc->ice) << ":" \
67
<< shout_get_port(m_enc->ice) << shout_get_mount(m_enc->ice);
69
m_enc->write_to_stream = true;
72
qDebug() << "error connecting to server " << shout_get_host(m_enc->ice) << ":" \
73
<< shout_get_error(m_enc->ice);
75
m_enc->write_to_stream = false;
79
m_enc->set_filedump("Video/dump.ogg");
40
80
qDebug() << "fps :" << m_freej->fps.get();