Commit Graph

2080 Commits

Author SHA1 Message Date
fred af2f15ae15 modified remaining fps rate declaration from int to float
- In FPS::FPS and destructor, commented out the mutex creation.
2011-04-08 14:46:38 +02:00
fred 0714ec4de4 Added and removed .cpp files since master merge.
- removed Sound.cpp
- added qLogging.cpp
- modified the Makefile.am in accordance.
2011-04-06 19:41:18 +02:00
fred 06cb4c2adc Merge branch 'master' into sound 2011-04-06 18:31:50 +02:00
fred 9ae9b42cc3 Not the big one .... necessary before merging :) 2011-04-06 18:17:11 +02:00
fred 3f4f5f1f2e Now stops encoder when closing the QJackClient
- In Qfreej:: added the getQEnc() method.

- In QJackClient destructor, now deletes the QEncoder if there is
one when deleting QJackClient.
2011-04-06 17:21:31 +02:00
fred 1135374cf9 try to manage videos which frame rate is not an integer.
- In QqWidget::QqWidget, modified the FPS to be changed in percentage.
changed actualFps and normalFps to be taken as a float.

- In FPS:: , modified to use float instead of int.

- In oggmux_add_audio, limit the ratio to +- 10% resampling, which
is a lot ..... just in case of big drift.
2011-04-06 16:45:54 +02:00
fred e245e04593 qfreej now compils with the libs compiled at the same time.
- In Qfreej.pro, now tells to link with the previously compiled
libs, located in ../src/.libs
2011-04-06 13:58:26 +02:00
fred e930b380c1 Lower the vorbis distortion.
- In oggmux_flush, now allowing re-sampling no more than 1% around
the average drift.

- In VideoEncoder::thread_loop(), un-commented shout_sync.
2011-04-05 12:18:14 +02:00
fred 1632c0b131 Sync Audio with video, re-sampling audio according to the drift
- in oggmux_init, initialised the SRC_DATA struct.
In oggmux_add_audio, resample with src_process function.
In oggmux_flush, calculate the ratio in accordance with difference
between vorbis and theora.
There is some work to do to avoid sound distortion :)
2011-03-31 23:53:12 +02:00
Jaromil a157b43aad Fix build failure with ld --no-add-needed (Closes Debian bug #606717) 2011-03-28 18:58:09 +02:00
Jaromil 5fab722dc3 Merge branch 'master' into sound 2011-03-28 18:52:34 +02:00
Pablo Martin 6b3b97f9ba fix crash to virtual method not being implemented in python class. 2011-03-28 14:13:59 +02:00
fred bfca90554d Modified encoder sample rate to sync sound with video
- in QJackClient, modified sample rate parameter when creating the AudioCollector
object. This modify the vorbis speed when streaming.
Commented out ::chgSampleRate() since it is not used

- in init_info(), use again the skeleton.

- VideoEncoder::thread_loop(), shaws the shout delay for testing.
2011-03-28 11:38:27 +02:00
fred 4cac1689a0 Now sees the stream rate.
- In VideoEncoder, added bitrate calculation to ::thread_loop().
Added the ::getStreamRate method to ask for the value.

- In QEncoder, created a QTimer which ask VideoEncoder the average
streaming bitrate in KBps every 2 seconds.
Added the Birate field in the display.
2011-03-25 20:50:02 +01:00
fred aac0c0c881 Fixed the v4l2 layer that only displays the upper half image.
- In V4L2CamLayer, multiplied by two the height parameter
in the ccvt_yuyv_bgr32 function .... tested on 3 different
v4l2 devices, and works fine. Added some devices parameter characteristics
displays.
2011-03-24 10:26:57 +01:00
fred 2e9dc3b2f8 Don't allow speed changes on a V4L2 layer
- in QqWidget, after opening the layer, if actualFps equal zero,
do not allow FPS changes management.
2011-03-16 20:22:10 +01:00
fred a2da5035e2 Have a visual landmark when changing the layer playing speed
- In QqWidget, the QSlider background colour is grey if speed is normal
and red if different from original.
2011-03-16 13:56:17 +01:00
fred d3b598728b Now can control layer speed with a slider instead of a two speed button
- In QqWidget, replaced an int by a QSlider.
2011-03-15 23:41:29 +01:00
fred c95033b7d1 Now can close a Text Layer.
- In TextLayer destructor, commented out close() method that was generated
a SEGFAULT.

- In QqWidget destructor now stop and delete the layer attached.

Text Layer can be closed and text disappears.
2011-03-15 19:45:32 +01:00
fred 459a450ede fixes bug when rotates the Layer with the middle mouse button.
- In SpecialEventGet, now test if the mouse sens have changed, so
rotates the other way.
2011-03-14 21:23:27 +01:00
fred ab65372e8a Now supports audio quality changes when streaming.
- In oggmux_init, sets back the average vorbis bit rate value
in the oggmux_info struct to be able to use it.
Now gets vorbis quality from oggmux_info. Replaced 48000 by oggmux_info
sample_rate.

- In struct oggmux_info, added aveVorBitRate to log the average audio
bit rate value, which depends on vorbis_quality.

- In OggTheoraEncoder::init, now calculates vorbis_quality so that it
is from -0.1 and 1.0 as in vorbis specification when input value is
in between 0 to 100. Added a method to get aveVorBitRate value.

- In QJackClient::init, suppressed the Jack m_SampleRate value
since it is already done by the AudioCollector constructor

- In QEncoder, now gets the bit rate from the OggTheoraEncoder after
launched.
2011-03-14 19:59:15 +01:00
fred 5a0b8560b3 Changes the method to calculate the frame rate when opening a video layer
- In VideoLayer::open, try to first use the r_frame_rate instead of the
time_base to calculate the frame rate. Frame rate was wrong (x10) on some
mp4 files (empirical).

- In QqWidget, no more need to test if fps is wrong .... I hope :)
In destructor, commented out ctx->rem_layer(qLayer); to avoid SEGFAULT
on close.
2011-03-14 15:17:48 +01:00
fred d56f28ddb9 can delete the QJackClent and re-create
- In OggTheoraEncoder, added a function to change the audio mixing
coefficient.

- In QJackClient, added a slider to control mixing coefficient
between the Jack Input port and the video layer sound track.
Now deletes when closing the object.

- In Qfreej, added a function to put the QJackClient ptr to NULL;
2011-03-13 02:43:46 +01:00
fred de49fbfb85 fixed wrong Jack input speed when streamed with a mono video layer
- in OggTheoraEncoder, added a m_MixVal sound mix level coefficient.
Same change as previous commit, test how many channels there is
before copying audio data.
2011-03-12 21:16:30 +01:00
fred d174c4b219 Now streams correctly in mono.
- in OggTheoraEncoder, remove rv attribute from the class, passes
it directly to the encode_audio function.

Sound was wrong when streaming a one channel audio, and now
should be fixed :)
In ::Mux tests if there is one or two channels
2011-03-12 19:44:24 +01:00
fred 75a233b14f Work on sound for streaming, now can stream the Jack Input with a no sound layer.
- in OggTheoraEncoder::init, sets to minimum one audio channel to be
encoded if there is audio.

- in QJackClient, shows the Jack number of inputs (only one for the moment).
From the constructor tells Qfreej audio is on.

- in Qfreej:: added capability to tell it there is audio or not.
2011-03-12 17:56:05 +01:00
fred 1d4fdf3057 no more SEGFAULT on exit found .... lets see
- In QqFilterParam constructor setted WA_QuitOnClose to false
so that the filter window closes if the main window closes.

- Same for QqWidget

- Same for QEncoder

Erased some wrong delete :)
2011-03-11 15:12:41 +01:00
fred 5d076de155 Sound class deleted, files Sound.*
no more need to these class, was made only for testing.
2011-03-10 19:32:57 +01:00
Jaromil 59abcfbd91 correct --enable-qt-gui at configure help 2011-03-10 17:31:39 +01:00
Jaromil 7be65f6fdd Merge branch 'sound' 2011-03-08 10:26:05 +01:00
Jaromil c265373f2e better link to libfreej.la 2011-03-08 08:25:47 +01:00
fred 4800f14b92 Now quit much nicer
- in QqWidget, initialyse *m_qGeneLayer to NULL. Deleted some lines
commented out code.

Added a QLogger class for the future logs ... I hope

- in Qfreej, now connects Exit from the menu to the close() method
inherited by QWidget. Commented out setAttribute(Qt::WA_DeleteOnClose);
to avoid SEGFAULT.
2011-03-08 01:44:51 +01:00
Jaromil b885296376 full path in qt4 built sources 2011-03-07 20:31:02 +01:00
Jaromil b341c8c8ac using BUILT_SOURCES to pre-build uic and moc stuff for qt4 2011-03-07 19:45:49 +01:00
Jaromil 56f08fe5f3 exclude subdir qt if qt-gui is not enabled 2011-03-07 13:11:26 +01:00
Jaromil bd507680e5 generate qt ui files with uic 2011-03-07 03:08:39 +01:00
Jaromil 89ece0bccb fix include path 2011-03-07 02:33:13 +01:00
Jaromil 793140c683 Merge branch 'sound' 2011-03-07 01:38:26 +01:00
Jaromil c0419a5507 fix qfreej build with autotools 2011-03-07 01:38:08 +01:00
fred bab260ffbf can change video and icecast parameters
- in QEncoder, moved creation of the OggTheoraEncoder object to
be able to take parameters changes into account.
Does not matter anymore in which order you open the QJackClient or the
QEncoder.
You can close to stop encoding and create again the QEncoder to
stream again, and change parameters if you want.

- in OggTheoraEncoder::init, now take audio channels from the JackClient.
Deletes some comments
2011-03-07 00:26:20 +01:00
Jaromil bae69200f8 build qfreej with autotools 2011-03-07 00:13:33 +01:00
fred 320c483c75 Now can stream through icecast
- In QEncoder, now delete the encoder when clicking STOP button.
Opens it again to stream again.
Don't stream audio if QJackClient created after QEncoder
(as OggtheoraEncoder initialises his parameters in his constuctor,
and say no sound if there is no AudioCollector created ...normal)
Now can stream to an icecast server, dump to a file, or both.

- in QJackClient, records if it was launched before QEncoder or not.

- in Qfreej, replaced the Encode name in menu by Stream
2011-03-06 14:33:36 +01:00
Jaromil 019e382f09 cleanup to compile also qt gui 2011-03-05 14:55:55 +01:00
Jaromil cb336bc9fe cleanup after merge of sound branch by fredd_99 2011-03-05 14:32:27 +01:00
Jaromil efcf77bd39 Merge branch 'trunk' into sound 2011-03-05 14:26:41 +01:00
fred e31ddff988 Now can dump in a file with control on audio from the graphic interface
- in QqWidget now creates as many Jack Output ports as there is in
the VideoLayer when QJackClient is launched and none already exists.

- QEncoder no longer herits from OggTheoraEncoder. It can move
in the future. Now deletes on close. Better communication with
QJackClient.

- in QJackClient, now can add Jack Outputs. Now creates the
AudioCollector needed for encoding. Better communication with
QEncoder.

- in JackClient::Process, controls if an encoder running before
filling the encoders ring buffers.

- in JSyncThread::_run, commented out me->_running = true, because
this variable can be accessed from the outside of the thread and
cause problems if stopping a JSyncThread just after created it.
Caused qfreej to hang up when opening creating QEncoder.

- in oggmux_close added some verifications on close to avoid SEGFAULT

- in VideoEncoder destructor, also added verifications.
2011-03-05 01:31:22 +01:00
fred 51be74acb6 Now can dump audio and video by the main menu application
In the new AudioCollector constructor, now passes the JackClient in
parameter to be stored.
In JackClient::Process now test if an encoder is connected
before filling the encoder ring buffer.
In OggTheoraEncoder::init now tels Jack there is an encoder.*
Now dumps, but with a big delay between audio and video.
2011-03-03 14:18:00 +01:00
fred b1943ae661 QEncoder class created.
Added an AudioCollector constructor that only creates buffers.
Added a filedump_close() method in VideoEncoder class.
In Qfreej setted m_QJack as private.
The results doesn't dump yet ;)
2011-02-28 21:09:38 +01:00
fred 0630d9d12f writes in the audio ring buffer encoder only if there is an encoder
In QqWidget, creates the Jack audio output ports if jack is
connected.
In JackClient::, added a variable to know if there is need to put
audio in the encoder ring buffer.
In ViewPort::add_audio, now returns true if succeeded.
2011-02-27 18:28:59 +01:00
Jaromil 0d685f60a5 fix to spelling errors reported by lintian 2011-02-25 21:27:47 +01:00