├── includes
├── phonon
│ ├── Mrl
│ ├── Path
│ ├── Effect
│ ├── MediaNode
│ ├── AudioOutput
│ ├── EffectWidget
│ ├── Global
│ ├── MediaObject
│ ├── MediaSource
│ ├── SeekSlider
│ ├── VideoPlayer
│ ├── VideoWidget
│ ├── VolumeSlider
│ ├── AddonInterface
│ ├── PlatformPlugin
│ ├── AudioDataOutput
│ ├── AudioOutputDevice
│ ├── AvCapture
│ ├── BackendInterface
│ ├── EffectDescription
│ ├── EffectInterface
│ ├── EffectParameter
│ ├── MediaController
│ ├── ObjectDescription
│ ├── StreamInterface
│ ├── VolumeFaderEffect
│ ├── AbstractAudioOutput
│ ├── AbstractMediaStream
│ ├── AbstractVideoOutput
│ ├── AudioCaptureDevice
│ ├── BackendCapabilities
│ ├── ObjectDescriptionData
│ ├── SubtitleDescription
│ ├── VideoCaptureDevice
│ ├── AudioChannelDescription
│ ├── AudioOutputDeviceModel
│ ├── AudioOutputInterface
│ ├── AudioOutputInterface40
│ ├── AudioOutputInterface42
│ ├── EffectDescriptionModel
│ ├── MediaObjectInterface
│ ├── ObjectDescriptionModel
│ ├── VideoWidgetInterface
│ ├── VideoWidgetInterface44
│ ├── VolumeFaderInterface
│ ├── AudioCaptureDeviceModel
│ ├── ObjectDescriptionModelData
│ ├── SubtitleDescriptionModel
│ ├── VideoCaptureDeviceModel
│ ├── VideoWidgetInterfaceLatest
│ ├── AudioChannelDescriptionModel
│ └── GlobalDescriptionContainer
└── old
│ └── Phonon
│ ├── Effect
│ ├── Path
│ ├── AudioDevice
│ ├── AudioOutput
│ ├── Global
│ ├── MediaNode
│ ├── MediaObject
│ ├── MediaSource
│ ├── SeekSlider
│ ├── VideoPlayer
│ ├── VideoWidget
│ ├── EffectWidget
│ ├── VolumeSlider
│ ├── AddonInterface
│ ├── BackendInterface
│ ├── EffectInterface
│ ├── EffectParameter
│ ├── MediaController
│ ├── PlatformPlugin
│ ├── StreamInterface
│ ├── AudioOutputDevice
│ ├── EffectDescription
│ ├── ObjectDescription
│ ├── VolumeFaderEffect
│ ├── AbstractAudioOutput
│ ├── AbstractMediaStream
│ ├── AbstractVideoOutput
│ ├── AudioDeviceEnumerator
│ ├── AudioOutputInterface
│ ├── BackendCapabilities
│ ├── MediaObjectInterface
│ ├── VideoWidgetInterface
│ ├── VolumeFaderInterface
│ ├── AudioOutputDeviceModel
│ ├── EffectDescriptionModel
│ ├── ObjectDescriptionModel
│ └── Experimental
│ ├── VideoFrame
│ ├── VideoFrame2
│ ├── Visualization
│ ├── AudioDataOutput
│ ├── VideoDataOutput
│ ├── SnapshotInterface
│ ├── AbstractVideoDataOutput
│ └── VideoDataOutputInterface
├── doc
├── DESIGN
│ ├── use-cases
│ │ ├── moviemaker.cpp
│ │ ├── speechtotext.cpp
│ │ ├── mediaplayer-audio.cpp
│ │ └── mediaplayer-video.cpp
│ ├── effects.flw
│ ├── architecture.flw
│ ├── audiodeviceconfig.flw
│ ├── effects.txt
│ ├── ClassesToBeDesigned
│ └── HowToConfigureDevices.txt
├── BUGS
├── CMakeLists.txt
└── TODO
├── .krazy
├── cmake
├── CMakeLists.txt
├── FindPhononInternal.cmake
├── COPYING-CMAKE-SCRIPTS
└── FindGLIB2.cmake
├── designer
├── images
│ ├── seekslider.png
│ ├── videoplayer.png
│ ├── videowidget.png
│ └── volumeslider.png
├── phononwidgets.qrc
├── CMakeLists.txt
└── videowidgetplugin.h
├── settings
├── listview-background.png
├── settings.qrc
├── Messages.sh
├── CMakeLists.txt
├── settings.h
├── main.cpp
├── backendselection.h
├── settings.cpp
└── settings.ui
├── .gitignore
├── phonon
├── phononconfig_p.h.in
├── Messages.sh
├── abstractvideooutput_p.cpp
├── abstractvideooutput.cpp
├── abstractaudiooutput_p.cpp
├── audiooutputinterface.cpp
├── experimental
│ ├── avwriter.cpp
│ ├── avwriter_p.h
│ ├── packet_p.h
│ ├── export.h
│ ├── backendinterface.h
│ ├── rtpreceiver.h
│ ├── snapshotinterface.h
│ ├── videowidget.h
│ ├── videodataoutput2_p.h
│ ├── videowidget.cpp
│ ├── backendcapabilities.h
│ ├── videowidget_p.h
│ ├── mediasource_p.h
│ ├── audiodataoutputinterface.h
│ ├── videodataoutputinterface.h
│ ├── backendcapabilities.cpp
│ ├── audiodataoutput_p.h
│ ├── packetpool_p.h
│ ├── avcapture_p.h
│ ├── videodataoutput_p.h
│ ├── abstractaudiodataoutput_p.h
│ ├── abstractvideodataoutput_p.h
│ ├── visualization_p.h
│ ├── CMakeLists.txt
│ ├── avcaptureinterface.h
│ ├── audiowriter.h
│ ├── objectdescription.h
│ ├── globalconfig.h
│ ├── objectdescription.cpp
│ ├── packet.cpp
│ ├── phononnamespace.h
│ ├── videodataoutput2.cpp
│ ├── abstractmediastream2_p.h
│ ├── videoframe.h
│ └── globalconfig.cpp
├── globalconfig_p.h
├── abstractvideooutput_p.h
├── abstractaudiooutput.cpp
├── audiodataoutput_p.h
├── audiodataoutputinterface.h
├── phononpimpl_p.h
├── effectparameter_p.h
├── abstractaudiooutput_p.h
├── streaminterface_p.h
├── iodevicestream_p.h
├── effect_p.h
├── phonon_export.h
├── medianodedestructionhandler_p.h
├── volumefadereffect_p.h
├── abstractaudiooutput.h
├── volumefaderinterface.h
├── backendcapabilities_p.h
├── platform_p.h
├── effectwidget_p.h
├── phononnamespace_p.h
├── medianode.h
├── mrl.cpp
├── objectdescriptionmodel_p.h
├── abstractvideooutput.h
├── effectinterface.h
├── objectdescription_p.h
├── path_p.h
└── frontendinterface_p.h
├── demos
├── CMakeLists.txt
├── simpleplayer
│ ├── CMakeLists.txt
│ ├── main.cpp
│ └── player.h
├── simplecapture
│ ├── CMakeLists.txt
│ └── main.cpp
├── metadatareader
│ ├── CMakeLists.txt
│ ├── metadatareader.h
│ ├── main.cpp
│ └── metadatareader.cpp
├── phota
│ ├── CMakeLists.txt
│ ├── phota.pro
│ ├── main.cpp
│ ├── mediacontroller.h
│ ├── mainwindow.h
│ ├── videoeffects.h
│ ├── mediacontroller.cpp
│ ├── videoeffects.cpp
│ └── mainwindow.cpp
└── cmake
│ └── FindPhonon.cmake
├── .kde-ci.yml
├── metainfo.yaml
├── .gitlab-ci.yml
└── PhononExperimentalConfig.cmake.in
/includes/phonon/Mrl:
--------------------------------------------------------------------------------
1 | #include "mrl.h"
2 |
--------------------------------------------------------------------------------
/includes/phonon/Path:
--------------------------------------------------------------------------------
1 | #include "path.h"
2 |
--------------------------------------------------------------------------------
/doc/DESIGN/use-cases/moviemaker.cpp:
--------------------------------------------------------------------------------
1 | struct
2 |
--------------------------------------------------------------------------------
/includes/phonon/Effect:
--------------------------------------------------------------------------------
1 | #include "effect.h"
2 |
--------------------------------------------------------------------------------
/includes/phonon/MediaNode:
--------------------------------------------------------------------------------
1 | #include "medianode.h"
2 |
--------------------------------------------------------------------------------
/.krazy:
--------------------------------------------------------------------------------
1 | EXCLUDE qclasses
2 | SKIP /doc
3 | SKIP /build
4 |
--------------------------------------------------------------------------------
/includes/phonon/AudioOutput:
--------------------------------------------------------------------------------
1 | #include "audiooutput.h"
2 |
--------------------------------------------------------------------------------
/includes/phonon/EffectWidget:
--------------------------------------------------------------------------------
1 | #include "effectwidget.h"
2 |
--------------------------------------------------------------------------------
/includes/phonon/Global:
--------------------------------------------------------------------------------
1 | #include "phononnamespace.h"
2 |
--------------------------------------------------------------------------------
/includes/phonon/MediaObject:
--------------------------------------------------------------------------------
1 | #include "mediaobject.h"
2 |
--------------------------------------------------------------------------------
/includes/phonon/MediaSource:
--------------------------------------------------------------------------------
1 | #include "mediasource.h"
2 |
--------------------------------------------------------------------------------
/includes/phonon/SeekSlider:
--------------------------------------------------------------------------------
1 | #include "seekslider.h"
2 |
--------------------------------------------------------------------------------
/includes/phonon/VideoPlayer:
--------------------------------------------------------------------------------
1 | #include "videoplayer.h"
2 |
--------------------------------------------------------------------------------
/includes/phonon/VideoWidget:
--------------------------------------------------------------------------------
1 | #include "videowidget.h"
2 |
--------------------------------------------------------------------------------
/includes/phonon/VolumeSlider:
--------------------------------------------------------------------------------
1 | #include "volumeslider.h"
2 |
--------------------------------------------------------------------------------
/includes/old/Phonon/Effect:
--------------------------------------------------------------------------------
1 | #include "../../phonon/effect.h"
2 |
--------------------------------------------------------------------------------
/includes/old/Phonon/Path:
--------------------------------------------------------------------------------
1 | #include "../../phonon/path.h"
2 |
--------------------------------------------------------------------------------
/includes/phonon/AddonInterface:
--------------------------------------------------------------------------------
1 | #include "addoninterface.h"
2 |
--------------------------------------------------------------------------------
/includes/phonon/PlatformPlugin:
--------------------------------------------------------------------------------
1 | #include "platformplugin.h"
2 |
--------------------------------------------------------------------------------
/includes/phonon/AudioDataOutput:
--------------------------------------------------------------------------------
1 | #include "audiodataoutput.h"
2 |
--------------------------------------------------------------------------------
/includes/phonon/AudioOutputDevice:
--------------------------------------------------------------------------------
1 | #include "objectdescription.h"
2 |
--------------------------------------------------------------------------------
/includes/phonon/AvCapture:
--------------------------------------------------------------------------------
1 | #include "experimental/avcapture.h"
2 |
--------------------------------------------------------------------------------
/includes/phonon/BackendInterface:
--------------------------------------------------------------------------------
1 | #include "backendinterface.h"
2 |
--------------------------------------------------------------------------------
/includes/phonon/EffectDescription:
--------------------------------------------------------------------------------
1 | #include "objectdescription.h"
2 |
--------------------------------------------------------------------------------
/includes/phonon/EffectInterface:
--------------------------------------------------------------------------------
1 | #include "effectinterface.h"
2 |
--------------------------------------------------------------------------------
/includes/phonon/EffectParameter:
--------------------------------------------------------------------------------
1 | #include "effectparameter.h"
2 |
--------------------------------------------------------------------------------
/includes/phonon/MediaController:
--------------------------------------------------------------------------------
1 | #include "mediacontroller.h"
2 |
--------------------------------------------------------------------------------
/includes/phonon/ObjectDescription:
--------------------------------------------------------------------------------
1 | #include "objectdescription.h"
2 |
--------------------------------------------------------------------------------
/includes/phonon/StreamInterface:
--------------------------------------------------------------------------------
1 | #include "streaminterface.h"
2 |
--------------------------------------------------------------------------------
/includes/phonon/VolumeFaderEffect:
--------------------------------------------------------------------------------
1 | #include "volumefadereffect.h"
2 |
--------------------------------------------------------------------------------
/includes/old/Phonon/AudioDevice:
--------------------------------------------------------------------------------
1 | #include "../../phonon/audiodevice.h"
2 |
--------------------------------------------------------------------------------
/includes/old/Phonon/AudioOutput:
--------------------------------------------------------------------------------
1 | #include "../../phonon/audiooutput.h"
2 |
--------------------------------------------------------------------------------
/includes/old/Phonon/Global:
--------------------------------------------------------------------------------
1 | #include "../../phonon/phononnamespace.h"
2 |
--------------------------------------------------------------------------------
/includes/old/Phonon/MediaNode:
--------------------------------------------------------------------------------
1 | #include "../../phonon/medianode.h"
2 |
--------------------------------------------------------------------------------
/includes/old/Phonon/MediaObject:
--------------------------------------------------------------------------------
1 | #include "../../phonon/mediaobject.h"
2 |
--------------------------------------------------------------------------------
/includes/old/Phonon/MediaSource:
--------------------------------------------------------------------------------
1 | #include "../../phonon/mediasource.h"
2 |
--------------------------------------------------------------------------------
/includes/old/Phonon/SeekSlider:
--------------------------------------------------------------------------------
1 | #include "../../phonon/seekslider.h"
2 |
--------------------------------------------------------------------------------
/includes/old/Phonon/VideoPlayer:
--------------------------------------------------------------------------------
1 | #include "../../phonon/videoplayer.h"
2 |
--------------------------------------------------------------------------------
/includes/old/Phonon/VideoWidget:
--------------------------------------------------------------------------------
1 | #include "../../phonon/videowidget.h"
2 |
--------------------------------------------------------------------------------
/includes/phonon/AbstractAudioOutput:
--------------------------------------------------------------------------------
1 | #include "abstractaudiooutput.h"
2 |
--------------------------------------------------------------------------------
/includes/phonon/AbstractMediaStream:
--------------------------------------------------------------------------------
1 | #include "abstractmediastream.h"
2 |
--------------------------------------------------------------------------------
/includes/phonon/AbstractVideoOutput:
--------------------------------------------------------------------------------
1 | #include "abstractvideooutput.h"
2 |
--------------------------------------------------------------------------------
/includes/phonon/AudioCaptureDevice:
--------------------------------------------------------------------------------
1 | #include "objectdescription.h"
2 |
--------------------------------------------------------------------------------
/includes/phonon/BackendCapabilities:
--------------------------------------------------------------------------------
1 | #include "backendcapabilities.h"
2 |
--------------------------------------------------------------------------------
/includes/phonon/ObjectDescriptionData:
--------------------------------------------------------------------------------
1 | #include "objectdescription.h"
2 |
--------------------------------------------------------------------------------
/includes/phonon/SubtitleDescription:
--------------------------------------------------------------------------------
1 | #include "objectdescription.h"
2 |
--------------------------------------------------------------------------------
/includes/phonon/VideoCaptureDevice:
--------------------------------------------------------------------------------
1 | #include "objectdescription.h"
2 |
--------------------------------------------------------------------------------
/includes/old/Phonon/EffectWidget:
--------------------------------------------------------------------------------
1 | #include "../../phonon/effectwidget.h"
2 |
--------------------------------------------------------------------------------
/includes/old/Phonon/VolumeSlider:
--------------------------------------------------------------------------------
1 | #include "../../phonon/volumeslider.h"
2 |
--------------------------------------------------------------------------------
/includes/phonon/AudioChannelDescription:
--------------------------------------------------------------------------------
1 | #include "objectdescription.h"
2 |
--------------------------------------------------------------------------------
/includes/phonon/AudioOutputDeviceModel:
--------------------------------------------------------------------------------
1 | #include "objectdescriptionmodel.h"
2 |
--------------------------------------------------------------------------------
/includes/phonon/AudioOutputInterface:
--------------------------------------------------------------------------------
1 | #include "audiooutputinterface.h"
2 |
--------------------------------------------------------------------------------
/includes/phonon/AudioOutputInterface40:
--------------------------------------------------------------------------------
1 | #include "audiooutputinterface.h"
2 |
--------------------------------------------------------------------------------
/includes/phonon/AudioOutputInterface42:
--------------------------------------------------------------------------------
1 | #include "audiooutputinterface.h"
2 |
--------------------------------------------------------------------------------
/includes/phonon/EffectDescriptionModel:
--------------------------------------------------------------------------------
1 | #include "objectdescriptionmodel.h"
2 |
--------------------------------------------------------------------------------
/includes/phonon/MediaObjectInterface:
--------------------------------------------------------------------------------
1 | #include "mediaobjectinterface.h"
2 |
--------------------------------------------------------------------------------
/includes/phonon/ObjectDescriptionModel:
--------------------------------------------------------------------------------
1 | #include "objectdescriptionmodel.h"
2 |
--------------------------------------------------------------------------------
/includes/phonon/VideoWidgetInterface:
--------------------------------------------------------------------------------
1 | #include "videowidgetinterface.h"
2 |
--------------------------------------------------------------------------------
/includes/phonon/VideoWidgetInterface44:
--------------------------------------------------------------------------------
1 | #include "videowidgetinterface.h"
2 |
--------------------------------------------------------------------------------
/includes/phonon/VolumeFaderInterface:
--------------------------------------------------------------------------------
1 | #include "volumefaderinterface.h"
2 |
--------------------------------------------------------------------------------
/includes/old/Phonon/AddonInterface:
--------------------------------------------------------------------------------
1 | #include "../../phonon/addoninterface.h"
2 |
--------------------------------------------------------------------------------
/includes/old/Phonon/BackendInterface:
--------------------------------------------------------------------------------
1 | #include "../../phonon/backendinterface.h"
2 |
--------------------------------------------------------------------------------
/includes/old/Phonon/EffectInterface:
--------------------------------------------------------------------------------
1 | #include "../../phonon/effectinterface.h"
2 |
--------------------------------------------------------------------------------
/includes/old/Phonon/EffectParameter:
--------------------------------------------------------------------------------
1 | #include "../../phonon/effectparameter.h"
2 |
--------------------------------------------------------------------------------
/includes/old/Phonon/MediaController:
--------------------------------------------------------------------------------
1 | #include "../../phonon/mediacontroller.h"
2 |
--------------------------------------------------------------------------------
/includes/old/Phonon/PlatformPlugin:
--------------------------------------------------------------------------------
1 | #include "../../phonon/platformplugin.h"
2 |
--------------------------------------------------------------------------------
/includes/old/Phonon/StreamInterface:
--------------------------------------------------------------------------------
1 | #include "../../phonon/streaminterface.h"
2 |
--------------------------------------------------------------------------------
/includes/phonon/AudioCaptureDeviceModel:
--------------------------------------------------------------------------------
1 | #include "objectdescriptionmodel.h"
2 |
--------------------------------------------------------------------------------
/includes/phonon/ObjectDescriptionModelData:
--------------------------------------------------------------------------------
1 | #include "objectdescriptionmodel.h"
2 |
--------------------------------------------------------------------------------
/includes/phonon/SubtitleDescriptionModel:
--------------------------------------------------------------------------------
1 | #include "objectdescriptionmodel.h"
2 |
--------------------------------------------------------------------------------
/includes/phonon/VideoCaptureDeviceModel:
--------------------------------------------------------------------------------
1 | #include "objectdescriptionmodel.h"
2 |
--------------------------------------------------------------------------------
/includes/phonon/VideoWidgetInterfaceLatest:
--------------------------------------------------------------------------------
1 | #include "videowidgetinterface.h"
2 |
--------------------------------------------------------------------------------
/includes/old/Phonon/AudioOutputDevice:
--------------------------------------------------------------------------------
1 | #include "../../phonon/objectdescription.h"
2 |
--------------------------------------------------------------------------------
/includes/old/Phonon/EffectDescription:
--------------------------------------------------------------------------------
1 | #include "../../phonon/objectdescription.h"
2 |
--------------------------------------------------------------------------------
/includes/old/Phonon/ObjectDescription:
--------------------------------------------------------------------------------
1 | #include "../../phonon/objectdescription.h"
2 |
--------------------------------------------------------------------------------
/includes/old/Phonon/VolumeFaderEffect:
--------------------------------------------------------------------------------
1 | #include "../../phonon/volumefadereffect.h"
2 |
--------------------------------------------------------------------------------
/includes/phonon/AudioChannelDescriptionModel:
--------------------------------------------------------------------------------
1 | #include "objectdescriptionmodel.h"
2 |
--------------------------------------------------------------------------------
/includes/phonon/GlobalDescriptionContainer:
--------------------------------------------------------------------------------
1 | #include "globaldescriptioncontainer.h"
2 |
--------------------------------------------------------------------------------
/doc/DESIGN/effects.flw:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/KDE/phonon/HEAD/doc/DESIGN/effects.flw
--------------------------------------------------------------------------------
/includes/old/Phonon/AbstractAudioOutput:
--------------------------------------------------------------------------------
1 | #include "../../phonon/abstractaudiooutput.h"
2 |
--------------------------------------------------------------------------------
/includes/old/Phonon/AbstractMediaStream:
--------------------------------------------------------------------------------
1 | #include "../../phonon/abstractmediastream.h"
2 |
--------------------------------------------------------------------------------
/includes/old/Phonon/AbstractVideoOutput:
--------------------------------------------------------------------------------
1 | #include "../../phonon/abstractvideooutput.h"
2 |
--------------------------------------------------------------------------------
/includes/old/Phonon/AudioDeviceEnumerator:
--------------------------------------------------------------------------------
1 | #include "../../phonon/audiodeviceenumerator.h"
2 |
--------------------------------------------------------------------------------
/includes/old/Phonon/AudioOutputInterface:
--------------------------------------------------------------------------------
1 | #include "../../phonon/audiooutputinterface.h"
2 |
--------------------------------------------------------------------------------
/includes/old/Phonon/BackendCapabilities:
--------------------------------------------------------------------------------
1 | #include "../../phonon/backendcapabilities.h"
2 |
--------------------------------------------------------------------------------
/includes/old/Phonon/MediaObjectInterface:
--------------------------------------------------------------------------------
1 | #include "../../phonon/mediaobjectinterface.h"
2 |
--------------------------------------------------------------------------------
/includes/old/Phonon/VideoWidgetInterface:
--------------------------------------------------------------------------------
1 | #include "../../phonon/videowidgetinterface.h"
2 |
--------------------------------------------------------------------------------
/includes/old/Phonon/VolumeFaderInterface:
--------------------------------------------------------------------------------
1 | #include "../../phonon/volumefaderinterface.h"
2 |
--------------------------------------------------------------------------------
/includes/old/Phonon/AudioOutputDeviceModel:
--------------------------------------------------------------------------------
1 | #include "../../phonon/objectdescriptionmodel.h"
2 |
--------------------------------------------------------------------------------
/includes/old/Phonon/EffectDescriptionModel:
--------------------------------------------------------------------------------
1 | #include "../../phonon/objectdescriptionmodel.h"
2 |
--------------------------------------------------------------------------------
/includes/old/Phonon/ObjectDescriptionModel:
--------------------------------------------------------------------------------
1 | #include "../../phonon/objectdescriptionmodel.h"
2 |
--------------------------------------------------------------------------------
/cmake/CMakeLists.txt:
--------------------------------------------------------------------------------
1 | install(FILES FindPhononInternal.cmake DESTINATION ${BUILDSYSTEM_INSTALL_DIR})
2 |
--------------------------------------------------------------------------------
/doc/DESIGN/architecture.flw:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/KDE/phonon/HEAD/doc/DESIGN/architecture.flw
--------------------------------------------------------------------------------
/includes/old/Phonon/Experimental/VideoFrame:
--------------------------------------------------------------------------------
1 | #include "../../../phonon/experimental/videoframe.h"
2 |
--------------------------------------------------------------------------------
/includes/old/Phonon/Experimental/VideoFrame2:
--------------------------------------------------------------------------------
1 | #include "../../../phonon/experimental/videoframe2.h"
2 |
--------------------------------------------------------------------------------
/designer/images/seekslider.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/KDE/phonon/HEAD/designer/images/seekslider.png
--------------------------------------------------------------------------------
/designer/images/videoplayer.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/KDE/phonon/HEAD/designer/images/videoplayer.png
--------------------------------------------------------------------------------
/designer/images/videowidget.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/KDE/phonon/HEAD/designer/images/videowidget.png
--------------------------------------------------------------------------------
/includes/old/Phonon/Experimental/Visualization:
--------------------------------------------------------------------------------
1 | #include "../../../phonon/experimental/visualization.h"
2 |
--------------------------------------------------------------------------------
/designer/images/volumeslider.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/KDE/phonon/HEAD/designer/images/volumeslider.png
--------------------------------------------------------------------------------
/doc/DESIGN/audiodeviceconfig.flw:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/KDE/phonon/HEAD/doc/DESIGN/audiodeviceconfig.flw
--------------------------------------------------------------------------------
/includes/old/Phonon/Experimental/AudioDataOutput:
--------------------------------------------------------------------------------
1 | #include "../../../phonon/experimental/audiodataoutput.h"
2 |
--------------------------------------------------------------------------------
/includes/old/Phonon/Experimental/VideoDataOutput:
--------------------------------------------------------------------------------
1 | #include "../../../phonon/experimental/videodataoutput.h"
2 |
--------------------------------------------------------------------------------
/settings/listview-background.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/KDE/phonon/HEAD/settings/listview-background.png
--------------------------------------------------------------------------------
/includes/old/Phonon/Experimental/SnapshotInterface:
--------------------------------------------------------------------------------
1 | #include "../../../phonon/experimental/snapshotinterface.h"
2 |
--------------------------------------------------------------------------------
/includes/old/Phonon/Experimental/AbstractVideoDataOutput:
--------------------------------------------------------------------------------
1 | #include "../../../phonon/experimental/abstractvideodataoutput.h"
2 |
--------------------------------------------------------------------------------
/includes/old/Phonon/Experimental/VideoDataOutputInterface:
--------------------------------------------------------------------------------
1 | #include "../../../phonon/experimental/videodataoutputinterface.h"
2 |
--------------------------------------------------------------------------------
/.gitignore:
--------------------------------------------------------------------------------
1 | .gitignore
2 | *.swp
3 | build
4 | build5
5 | apidocs
6 | b1
7 | po
8 | compile_commands.json
9 | .clangd
10 | .cache
11 |
--------------------------------------------------------------------------------
/settings/settings.qrc:
--------------------------------------------------------------------------------
1 |
2 |
3 | listview-background.png
4 |
5 |
6 |
--------------------------------------------------------------------------------
/phonon/phononconfig_p.h.in:
--------------------------------------------------------------------------------
1 | /* Phonon definitions from CMake */
2 |
3 | #ifndef PHONONCONFIG_H_P
4 | #define PHONONCONFIG_H_P
5 |
6 | #endif // PHONONCONFIG_H_P
7 |
--------------------------------------------------------------------------------
/settings/Messages.sh:
--------------------------------------------------------------------------------
1 | #!/usr/bin/env bash
2 | $EXTRACT_TR_STRINGS $(find . -name \*.cpp -o -name \*.h -o -name \*.ui -o -name \*.qml) -o $podir/phononsettings_qt.pot
3 |
--------------------------------------------------------------------------------
/cmake/FindPhononInternal.cmake:
--------------------------------------------------------------------------------
1 | message(FATAL_ERROR "Phonon >= 4.11 requires suitably new backends."
2 | "Old backends can no longer build because of changes in the cmake tech.")
3 |
--------------------------------------------------------------------------------
/phonon/Messages.sh:
--------------------------------------------------------------------------------
1 | #! /usr/bin/env bash
2 | #$EXTRACTRC `find $dirs -maxdepth 1 \( -name \*.rc -o -name \*.ui -o -name \*.ui3 -o -name \*.ui4 -o -name \*.kcfg \) ` >> rc.cpp || exit 11
3 | $EXTRACT_TR_STRINGS $(find . -maxdepth 1 -name "*.cpp" -o -name "*.h") -o $podir/libphonon_qt.pot
4 |
--------------------------------------------------------------------------------
/designer/phononwidgets.qrc:
--------------------------------------------------------------------------------
1 |
2 |
3 | images/videoplayer.png
4 | images/videowidget.png
5 | images/seekslider.png
6 | images/volumeslider.png
7 |
8 |
9 |
--------------------------------------------------------------------------------
/demos/CMakeLists.txt:
--------------------------------------------------------------------------------
1 | set(CMAKE_MODULE_PATH "${CMAKE_CURRENT_SOURCE_DIR}/cmake" ${CMAKE_MODULE_PATH})
2 | set(QT_MAJOR_VERSION 5) # only set this in here! we need it in a separate scope
3 | add_subdirectory(phota)
4 | add_subdirectory(simpleplayer)
5 | add_subdirectory(metadatareader)
6 |
7 | if (NOT PHONON_NO_CAPTURE)
8 | add_subdirectory(simplecapture)
9 | endif (NOT PHONON_NO_CAPTURE)
10 |
--------------------------------------------------------------------------------
/.kde-ci.yml:
--------------------------------------------------------------------------------
1 | Dependencies:
2 | - 'on': ['Linux/Qt6', 'Linux/Qt6Next', 'FreeBSD/Qt6', 'Windows/Qt6', 'Android/Qt6']
3 | 'require':
4 | 'frameworks/extra-cmake-modules': '@latest-kf6'
5 |
6 | - 'on': ['Linux/Qt5', 'FreeBSD/Qt5', 'Windows/Qt5', 'Android/Qt5']
7 | 'require':
8 | 'frameworks/extra-cmake-modules': '@stable'
9 |
10 | Options:
11 | require-passing-tests-on: ['Linux', 'FreeBSD', 'Windows']
12 |
--------------------------------------------------------------------------------
/demos/simpleplayer/CMakeLists.txt:
--------------------------------------------------------------------------------
1 | cmake_minimum_required(VERSION 3.5 FATAL_ERROR)
2 | project(simpleplayer)
3 |
4 | set(CMAKE_AUTOMOC TRUE)
5 |
6 | find_package(Phonon4Qt5 NO_MODULE) # Not required so it builds within phonon as well
7 |
8 | set(simpleplayer_SRCS
9 | main.cpp
10 | player.cpp
11 | )
12 |
13 | add_executable(simpleplayer ${simpleplayer_SRCS})
14 | target_link_libraries(simpleplayer Phonon::phonon4qt5 Qt5::Core Qt5::Widgets)
15 |
--------------------------------------------------------------------------------
/demos/simplecapture/CMakeLists.txt:
--------------------------------------------------------------------------------
1 | cmake_minimum_required(VERSION 3.5 FATAL_ERROR)
2 | project(simplecapture)
3 |
4 | set(CMAKE_AUTOMOC TRUE)
5 |
6 | find_package(Phonon4Qt5 NO_MODULE) # Not required so it builds within phonon as well
7 |
8 | set(simplecapture_SRCS
9 | main.cpp
10 | capture.cpp
11 | )
12 |
13 | add_executable(simplecapture ${simplecapture_SRCS})
14 | target_link_libraries(simplecapture Phonon::phonon4qt5 Qt5::Core Qt5::Widgets)
15 |
--------------------------------------------------------------------------------
/demos/metadatareader/CMakeLists.txt:
--------------------------------------------------------------------------------
1 | cmake_minimum_required(VERSION 3.5 FATAL_ERROR)
2 | project(metadatareader)
3 |
4 | set(CMAKE_AUTOMOC TRUE)
5 |
6 | find_package(Phonon4Qt5 NO_MODULE) # Not required so it builds within phonon as well
7 |
8 | set(metadatareader_SRCS
9 | main.cpp
10 | metadatareader.cpp
11 | )
12 |
13 | add_executable(metadatareader ${metadatareader_SRCS})
14 | target_link_libraries(metadatareader Phonon::phonon4qt5 Qt5::Core Qt5::Widgets)
15 |
--------------------------------------------------------------------------------
/doc/DESIGN/effects.txt:
--------------------------------------------------------------------------------
1 | If you want to write a new effect that should be usable from you Phonon
2 | application, I encourage you to use LADSPA. This plugin API was designed
3 | especially to make the effect usable for as many audio
4 | libraries/frameworks/applications as possible. The result is that your plugin
5 | can then be used by more than only one backend.
6 |
7 | It is not coincidence, that the effects API of Phonon is modeled after LADSPA,
8 | since those are the cross-framework plugins...
9 |
--------------------------------------------------------------------------------
/metainfo.yaml:
--------------------------------------------------------------------------------
1 | maintainer: sitter
2 | description: Phonon, the Qt multimedia abstraction library.
3 | platforms:
4 | - name: Linux
5 | - name: FreeBSD
6 | - name: Windows
7 | # - name: MacOSX
8 | # - name: Android
9 | release: true
10 | public_lib: true
11 | public_source_dirs:
12 | - phonon
13 | public_doc_dir: doc
14 | libraries:
15 | - qmake: phonon4qt5
16 | cmake: "Phonon::phonon4qt5"
17 | cmakename: Phonon4Qt5
18 | irc: kde-multimedia
19 | mailinglist: kde-multimedia
20 |
--------------------------------------------------------------------------------
/doc/DESIGN/ClassesToBeDesigned:
--------------------------------------------------------------------------------
1 | OSD:
2 | a class that is used for overlaying arbitrary bitmaps on the video
3 | -> useful for showing a play, pause, seek symbol, volume bar or progress bar
4 |
5 | Subtitles:
6 | There is media data with subtitles embedded (and there exist also external
7 | subtitle files). One possibility would be to add subtitle selection to the
8 | VideoPath, another to add it to the MediaProducer and a third to create a new
9 | class that operates on a MediaProducer or VideoPath.
10 |
--------------------------------------------------------------------------------
/doc/BUGS:
--------------------------------------------------------------------------------
1 | When the backend changes there's a drop in the playback. When it's in
2 | PlayingState it could time how long it takes until the playback resumes and add
3 | that time to the seek.
4 |
5 | When the backend changes the paths are not restored correctly and it crashes
6 |
7 | When a new AudioOutput is created with the same name and category it'll still cause
8 | a notification if a device fallback was necessary. One such notification per
9 | name/category or even ignoring the name sure is enough.
10 |
--------------------------------------------------------------------------------
/demos/phota/CMakeLists.txt:
--------------------------------------------------------------------------------
1 | cmake_minimum_required(VERSION 3.5 FATAL_ERROR)
2 | project(phota)
3 |
4 | set(CMAKE_AUTOMOC TRUE)
5 |
6 | find_package(Phonon4Qt5 NO_MODULE) # Not required so it builds within phonon as well
7 |
8 | set(phota_SRCS
9 | main.cpp
10 | mainwindow.cpp
11 | mediacontroller.cpp
12 | videoeffects.cpp
13 | )
14 |
15 | qt5_wrap_ui(phota_SRCS videoeffects.ui)
16 |
17 | add_executable(phota ${phota_SRCS})
18 | target_link_libraries(phota Phonon::phonon4qt5 Qt5::Core Qt5::Widgets)
19 |
--------------------------------------------------------------------------------
/demos/phota/phota.pro:
--------------------------------------------------------------------------------
1 | #-------------------------------------------------
2 | #
3 | # Project created by QtCreator 2010-08-14T18:47:04
4 | #
5 | #-------------------------------------------------
6 |
7 | QT += core gui phonon
8 |
9 | TARGET = phota
10 | TEMPLATE = app
11 |
12 |
13 | SOURCES += main.cpp \
14 | mainwindow.cpp \
15 | mediacontroller.cpp \
16 | videoeffects.cpp
17 |
18 | HEADERS += \
19 | mainwindow.h \
20 | mediacontroller.h \
21 | videoeffects.h
22 |
23 | FORMS += \
24 | videoeffects.ui
25 |
--------------------------------------------------------------------------------
/.gitlab-ci.yml:
--------------------------------------------------------------------------------
1 | # SPDX-FileCopyrightText: none
2 | # SPDX-License-Identifier: CC0-1.0
3 |
4 | include:
5 | - project: sysadmin/ci-utilities
6 | file:
7 | - /gitlab-templates/linux.yml
8 | - /gitlab-templates/linux-static.yml
9 | - /gitlab-templates/linux-qt6.yml
10 | - /gitlab-templates/linux-qt6-next.yml
11 | - /gitlab-templates/android-qt6.yml
12 | - /gitlab-templates/windows.yml
13 | - /gitlab-templates/windows-static.yml
14 | - /gitlab-templates/freebsd-qt6.yml
15 | - /gitlab-templates/windows-qt6.yml
16 |
--------------------------------------------------------------------------------
/settings/CMakeLists.txt:
--------------------------------------------------------------------------------
1 | add_definitions(-DPHONON_LIB_SONAME=\"${PHONON_LIB_SONAME}\")
2 |
3 | set(SRCS
4 | backendselection.cpp
5 | backendselection.ui
6 | devicepreference.cpp
7 | devicepreference.ui
8 | main.cpp
9 | settings.cpp
10 | settings.qrc
11 | settings.ui
12 | )
13 |
14 | ecm_create_qm_loader(SRCS phononsettings_qt)
15 |
16 | add_executable(phononsettings ${SRCS})
17 | target_link_libraries(phononsettings
18 | Phonon::phonon4qt${QT_MAJOR_VERSION}
19 | Qt${QT_MAJOR_VERSION}::Core
20 | Qt${QT_MAJOR_VERSION}::Gui
21 | Qt${QT_MAJOR_VERSION}::Widgets
22 | )
23 |
24 | install(TARGETS phononsettings ${KDE_INSTALL_TARGETS_DEFAULT_ARGS})
25 |
--------------------------------------------------------------------------------
/PhononExperimentalConfig.cmake.in:
--------------------------------------------------------------------------------
1 | # config file for phonon experimental library
2 | # This config can not be used directly. Instead find Phonon or Phonon4Qt@QT_MAJOR_VERSION@.
3 | # If the experimental config is present it will be automatically included.
4 | # If you want to make sure it is present you can specify Experimental as a
5 | # COMPONENT in find_package.
6 |
7 | @PACKAGE_INIT@
8 |
9 | include("${CMAKE_CURRENT_LIST_DIR}/PhononExperimentalTargets.cmake")
10 | set(PHONON_EXPERIMENTAL_LIBRARY Phonon::@PHONON_LIB_SONAME@experimental)
11 | set(PHONON_FOUND_EXPERIMENTAL true)
12 |
13 | # Make sure phonon itself was imported. Experimental strictly depends on Phonon!
14 | if(NOT TARGET Phonon::@PHONON_LIB_SONAME@)
15 | message(FATAL_ERROR "PhononExperimental library was found but there is no target for the primary library.")
16 | endif()
17 |
--------------------------------------------------------------------------------
/doc/DESIGN/use-cases/speechtotext.cpp:
--------------------------------------------------------------------------------
1 | class SpeechToText
2 | {
3 | Q_OBJECT
4 | public:
5 | SpeechToText();
6 |
7 | private slots:
8 | void processCaptureData();
9 |
10 | private:
11 | PcmCapture *m_capture;
12 | };
13 |
14 | SpeechToText::SpeechToText();
15 | {
16 | // imagining Phonon API that's not there yet...
17 | m_capture = new PcmCapture(Phonon::Communication, this);
18 | Q_ASSERT(qobject_cast(m_capture));
19 | Q_ASSERT(!m_capture->isOpen());
20 | // hmm, probably not good to do this:
21 | if (!m_capture->open(PcmFormat(PcmFormat::NativeByteOrder, 16, 1, 48000, PcmFormat::DisallowSoftResampling))) {
22 | // handle error possibly trying a different format
23 | // (read m_capture->errorString())
24 | return;
25 | }
26 |
27 | connect(m_capture, SIGNAL(readyRead()), SLOT(processCaptureData()));
28 | }
29 |
30 | void SpeechToText::processCaptureData()
31 | {
32 | const int toProcess = m_capture->bytesAvailable();
33 | const QByteArray =
34 | }
35 |
--------------------------------------------------------------------------------
/designer/CMakeLists.txt:
--------------------------------------------------------------------------------
1 | set(phononwidgetsplugin_SRCS
2 | phononcollection.cpp
3 | seeksliderplugin.cpp
4 | videoplayerplugin.cpp
5 | videoplayertaskmenu.cpp
6 | videowidgetplugin.cpp
7 | volumesliderplugin.cpp
8 | )
9 | if(QT_MAJOR_VERSION VERSION_EQUAL 5)
10 | qt5_add_resources(phononwidgetsplugin_SRCS phononwidgets.qrc)
11 | else()
12 | qt6_add_resources(phononwidgetsplugin_SRCS phononwidgets.qrc)
13 | endif()
14 |
15 | add_library(${PHONON_LIB_SONAME}widgets MODULE ${phononwidgetsplugin_SRCS})
16 |
17 | # Technically since 5.9 we should only need uiplugins and not designer,
18 | # in the interest of simplicity we still look for and use the designer
19 | # target though so things definitely build on <5.9
20 |
21 | if(Qt5UiPlugin_VERSION)
22 | target_link_libraries(${PHONON_LIB_SONAME}widgets Qt${QT_MAJOR_VERSION}::UiPlugin)
23 | endif()
24 |
25 | target_link_libraries(${PHONON_LIB_SONAME}widgets
26 | Phonon::${PHONON_LIB_SONAME}
27 | Qt${QT_MAJOR_VERSION}::Core
28 | Qt${QT_MAJOR_VERSION}::Gui
29 | Qt${QT_MAJOR_VERSION}::Widgets
30 | Qt${QT_MAJOR_VERSION}::Designer
31 | )
32 |
33 | install(TARGETS ${PHONON_LIB_SONAME}widgets DESTINATION ${KDE_INSTALL_QTPLUGINDIR}/designer)
34 |
--------------------------------------------------------------------------------
/doc/CMakeLists.txt:
--------------------------------------------------------------------------------
1 | set(PHONON_LOGO_PATH ${CMAKE_CURRENT_SOURCE_DIR}/phonon-logo.png)
2 | set(PHONON_DOXYGEN_OUTPUT_DIR ${CMAKE_CURRENT_BINARY_DIR})
3 |
4 | set(PHONON_BUILD_DOC_QCH "yes")
5 | set(PHONON_DOXYGEN_QHP_NAMESPACE "org.kde.phonon.${PHONON_VERSION}")
6 |
7 | set(PHONON_DOXYGEN_SRCS
8 | ${PHONON_SOURCE_DIR}/Mainpage.dox
9 | ${PHONON_SOURCE_DIR}/doc/Backend.dox
10 | ${PHONON_SOURCE_DIR}/doc/Phonon4Qt5.dox
11 | ${PHONON_SOURCE_DIR}/phonon
12 | )
13 | string(REGEX REPLACE ";" " " PHONON_DOXYGEN_SRCS "${PHONON_DOXYGEN_SRCS}")
14 |
15 | set(PHONON_DOXYGEN_EXCLUDE
16 | ${PHONON_SOURCE_DIR}/phonon/backend
17 | ${PHONON_SOURCE_DIR}/phonon/experimental
18 | )
19 | string(REGEX REPLACE ";" " " PHONON_DOXYGEN_EXCLUDE "${PHONON_DOXYGEN_EXCLUDE}")
20 |
21 |
22 | configure_file(Doxyfile.cmake.in ${CMAKE_CURRENT_BINARY_DIR}/Doxyfile)
23 |
24 | add_custom_target("html" ALL
25 | doxygen ${CMAKE_CURRENT_BINARY_DIR}/Doxyfile
26 | DEPENDS ${CMAKE_CURRENT_BINARY_DIR}/Doxyfile)
27 |
28 | add_custom_target("qch" ALL DEPENDS "html")
29 |
30 | add_custom_target("doc" ALL DEPENDS "html" "qch")
31 |
32 | INSTALL(DIRECTORY "${CMAKE_CURRENT_BINARY_DIR}/html/" DESTINATION "${KDE_INSTALL_DATAROOTDIR}/libphonon/" )
33 |
--------------------------------------------------------------------------------
/demos/cmake/FindPhonon.cmake:
--------------------------------------------------------------------------------
1 | # Find libphonon
2 | # Once done this will define
3 | #
4 | # PHONON_FOUND - system has Phonon Library
5 | # PHONON_INCLUDE_DIR - the Phonon include directory
6 | # PHONON_LIBRARY - link these to use Phonon
7 | # PHONON_VERSION - the version of the Phonon Library
8 |
9 | # Copyright (c) 2010, Harald Sitter
10 | # Copyright (c) 2008, Matthias Kretz
11 | #
12 | # Redistribution and use is allowed according to the terms of the BSD license.
13 | # For details see the accompanying COPYING-CMAKE-SCRIPTS file.
14 |
15 | if(PHONON_INCLUDE_DIR AND PHONON_LIBRARY)
16 | set(PHONON_FIND_QUIETLY TRUE)
17 |
18 | # include(FindPackageHandleStandardArgs)
19 | # find_package_handle_standard_args(Phonon DEFAULT_MSG PHONON_INCLUDE_DIR PHONON_LIBRARY)
20 |
21 | # mark_as_advanced(PHONON_INCLUDE_DIR PHONON_LIBRARY)
22 |
23 | else()
24 | find_package(Phonon NO_MODULE)
25 | if(PHONON_FOUND)
26 | set(CMAKE_MODULE_PATH ${CMAKE_MODULE_PATH} ${PHONON_BUILDSYSTEM_DIR})
27 | endif()
28 |
29 | include(FindPackageHandleStandardArgs)
30 |
31 | find_package_handle_standard_args(Phonon DEFAULT_MSG Phonon_DIR )
32 | endif(PHONON_INCLUDE_DIR AND PHONON_LIBRARY)
33 |
--------------------------------------------------------------------------------
/demos/phota/main.cpp:
--------------------------------------------------------------------------------
1 | /*
2 | Copyright (C) 2010 Jean-Baptiste Kempf
3 |
4 | This library is free software; you can redistribute it and/or
5 | modify it under the terms of the GNU Lesser General Public
6 | License as published by the Free Software Foundation; either
7 | version 2.1 of the License, or (at your option) version 3, or any
8 | later version accepted by the membership of KDE e.V. (or its
9 | successor approved by the membership of KDE e.V.), Nokia Corporation
10 | (or its successors, if any) and the KDE Free Qt Foundation, which shall
11 | act as a proxy defined in Section 6 of version 3 of the license.
12 |
13 | This library is distributed in the hope that it will be useful,
14 | but WITHOUT ANY WARRANTY; without even the implied warranty of
15 | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
16 | Lesser General Public License for more details.
17 |
18 | You should have received a copy of the GNU Lesser General Public
19 | License along with this library. If not, see .
20 | */
21 |
22 | #include
23 | #include "mainwindow.h"
24 |
25 | int main(int argc, char *argv[])
26 | {
27 | QApplication a(argc, argv);
28 | MainWindow w;
29 | w.show();
30 |
31 | return a.exec();
32 | }
33 |
--------------------------------------------------------------------------------
/settings/settings.h:
--------------------------------------------------------------------------------
1 | /*
2 | Copyright (C) 2014-2019 Harald Sitter
3 |
4 | This program is free software; you can redistribute it and/or
5 | modify it under the terms of the GNU Library General Public
6 | License as published by the Free Software Foundation; either
7 | version 2 of the License, or (at your option) version 3.
8 |
9 | This library is distributed in the hope that it will be useful,
10 | but WITHOUT ANY WARRANTY; without even the implied warranty of
11 | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
12 | Library General Public License for more details.
13 |
14 | You should have received a copy of the GNU Library General Public License
15 | along with this library; see the file COPYING.LIB. If not, write to
16 | the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
17 | Boston, MA 02110-1301, USA.
18 | */
19 |
20 | #ifndef SETTINGS_H
21 | #define SETTINGS_H
22 |
23 | #include
24 |
25 | namespace Ui {
26 | class Settings;
27 | }
28 |
29 | class Settings : public QDialog
30 | {
31 | Q_OBJECT
32 |
33 | public:
34 | explicit Settings(QWidget *parent = nullptr);
35 | ~Settings();
36 |
37 | private slots:
38 | void save();
39 |
40 | private:
41 | Ui::Settings *ui;
42 | };
43 |
44 | #endif // SETTINGS_H
45 |
--------------------------------------------------------------------------------
/doc/TODO:
--------------------------------------------------------------------------------
1 | - add a metadata function that returns a QVariant instead of a QString - useful for QImage or other binary (QByteArray) content
2 |
3 | - QImage VideoWidget::screenshot(): ordinary screenshot doesn't work with XV says Christoph. And VideoDataOutput
4 | would be major overkill.
5 |
6 | - consider whether to add a signal to notify when the information for
7 | availableAudioStreams/availableVideoStreams/availableSubtitleStreams
8 | is available
9 |
10 | - look at collaboration with other projects, e.g. pavucontrol, gsmartmix
11 |
12 | - consider Player dbus interface in MediaObject
13 |
14 | - add global setting to pause video when it's not visible
15 |
16 | - add a way to request a specific version (>=) from the Backend, so that known to be buggy Backends aren't used
17 |
18 | - Video Overlays (OSD) like: show a rectangle as a play symbol, show the position in
19 | the file as something like [IIIIIIIII------], and so on
20 |
21 | - http://bugs.kde.org/show_bug.cgi?id=147494
22 |
23 | - frame/sample precise positioning (cue in/out)
24 |
25 | - different timecode support like SMPTE
26 |
27 | - Codec interface - at least for audio
28 |
29 | - Speed factor for playback (useful mostly for audio - but video still needs to stay in sync)
30 |
31 | - tell the platform plugin which backend was loaded (if it doesn't do it itself) so that it can load KDE translations for the backend
32 |
--------------------------------------------------------------------------------
/cmake/COPYING-CMAKE-SCRIPTS:
--------------------------------------------------------------------------------
1 | Redistribution and use in source and binary forms, with or without
2 | modification, are permitted provided that the following conditions
3 | are met:
4 |
5 | 1. Redistributions of source code must retain the copyright
6 | notice, this list of conditions and the following disclaimer.
7 | 2. Redistributions in binary form must reproduce the copyright
8 | notice, this list of conditions and the following disclaimer in the
9 | documentation and/or other materials provided with the distribution.
10 | 3. The name of the author may not be used to endorse or promote products
11 | derived from this software without specific prior written permission.
12 |
13 | THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR
14 | IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES
15 | OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED.
16 | IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT,
17 | INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT
18 | NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
19 | DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
20 | THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
21 | (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF
22 | THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
23 |
--------------------------------------------------------------------------------
/phonon/abstractvideooutput_p.cpp:
--------------------------------------------------------------------------------
1 | /* This file is part of the KDE project
2 | Copyright (C) 2007 Matthias Kretz
3 |
4 | This library is free software; you can redistribute it and/or
5 | modify it under the terms of the GNU Lesser General Public
6 | License as published by the Free Software Foundation; either
7 | version 2.1 of the License, or (at your option) version 3, or any
8 | later version accepted by the membership of KDE e.V. (or its
9 | successor approved by the membership of KDE e.V.), Nokia Corporation
10 | (or its successors, if any) and the KDE Free Qt Foundation, which shall
11 | act as a proxy defined in Section 6 of version 3 of the license.
12 |
13 | This library is distributed in the hope that it will be useful,
14 | but WITHOUT ANY WARRANTY; without even the implied warranty of
15 | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
16 | Lesser General Public License for more details.
17 |
18 | You should have received a copy of the GNU Lesser General Public
19 | License along with this library. If not, see .
20 |
21 | */
22 |
23 | #include "abstractvideooutput_p.h"
24 |
25 | #ifndef QT_NO_PHONON_VIDEO
26 |
27 | namespace Phonon
28 | {
29 |
30 | bool AbstractVideoOutputPrivate::aboutToDeleteBackendObject()
31 | {
32 | return true;
33 | }
34 |
35 | } //namespace Phonon
36 |
37 | #endif //QT_NO_PHONON_VIDEO
38 |
--------------------------------------------------------------------------------
/settings/main.cpp:
--------------------------------------------------------------------------------
1 | /*
2 | Copyright (C) 2019 Harald Sitter
3 |
4 | This program is free software; you can redistribute it and/or
5 | modify it under the terms of the GNU Library General Public
6 | License as published by the Free Software Foundation; either
7 | version 2 of the License, or (at your option) version 3.
8 |
9 | This library is distributed in the hope that it will be useful,
10 | but WITHOUT ANY WARRANTY; without even the implied warranty of
11 | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
12 | Library General Public License for more details.
13 |
14 | You should have received a copy of the GNU Library General Public License
15 | along with this library; see the file COPYING.LIB. If not, write to
16 | the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
17 | Boston, MA 02110-1301, USA.
18 | */
19 |
20 | #include
21 |
22 | #include "settings.h"
23 |
24 | int main(int argc, char **argv)
25 | {
26 | QApplication app(argc, argv);
27 | #if QT_VERSION < QT_VERSION_CHECK(6, 0, 0)
28 | app.setAttribute(Qt::AA_UseHighDpiPixmaps, true);
29 | #endif
30 | app.setApplicationName(QObject::tr("Phonon Settings"));
31 | app.setApplicationVersion(QString("1.0"));
32 | app.setOrganizationDomain(QString("kde.org"));
33 | app.setOrganizationName(QString("KDE"));
34 | Settings settings;
35 | settings.show();
36 | return app.exec();
37 | }
38 |
--------------------------------------------------------------------------------
/phonon/abstractvideooutput.cpp:
--------------------------------------------------------------------------------
1 | /* This file is part of the KDE project
2 | Copyright (C) 2005 Matthias Kretz
3 |
4 | This library is free software; you can redistribute it and/or
5 | modify it under the terms of the GNU Lesser General Public
6 | License as published by the Free Software Foundation; either
7 | version 2.1 of the License, or (at your option) version 3, or any
8 | later version accepted by the membership of KDE e.V. (or its
9 | successor approved by the membership of KDE e.V.), Nokia Corporation
10 | (or its successors, if any) and the KDE Free Qt Foundation, which shall
11 | act as a proxy defined in Section 6 of version 3 of the license.
12 |
13 | This library is distributed in the hope that it will be useful,
14 | but WITHOUT ANY WARRANTY; without even the implied warranty of
15 | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
16 | Lesser General Public License for more details.
17 |
18 | You should have received a copy of the GNU Lesser General Public
19 | License along with this library. If not, see .
20 |
21 | */
22 | #include "abstractvideooutput.h"
23 | #include "abstractvideooutput_p.h"
24 |
25 | #ifndef QT_NO_PHONON_VIDEO
26 |
27 | namespace Phonon
28 | {
29 |
30 | AbstractVideoOutput::AbstractVideoOutput(AbstractVideoOutputPrivate &d)
31 | : MediaNode(d)
32 | {
33 | }
34 |
35 | } // namespace Phonon
36 |
37 | #endif //QT_NO_PHONON_VIDEO
38 |
--------------------------------------------------------------------------------
/phonon/abstractaudiooutput_p.cpp:
--------------------------------------------------------------------------------
1 | /* This file is part of the KDE project
2 | Copyright (C) 2007 Matthias Kretz
3 |
4 | This library is free software; you can redistribute it and/or
5 | modify it under the terms of the GNU Lesser General Public
6 | License as published by the Free Software Foundation; either
7 | version 2.1 of the License, or (at your option) version 3, or any
8 | later version accepted by the membership of KDE e.V. (or its
9 | successor approved by the membership of KDE e.V.), Nokia Corporation
10 | (or its successors, if any) and the KDE Free Qt Foundation, which shall
11 | act as a proxy defined in Section 6 of version 3 of the license.
12 |
13 | This library is distributed in the hope that it will be useful,
14 | but WITHOUT ANY WARRANTY; without even the implied warranty of
15 | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
16 | Lesser General Public License for more details.
17 |
18 | You should have received a copy of the GNU Lesser General Public
19 | License along with this library. If not, see .
20 |
21 | */
22 |
23 | #include "abstractaudiooutput_p.h"
24 |
25 | namespace Phonon
26 | {
27 |
28 | bool AbstractAudioOutputPrivate::aboutToDeleteBackendObject()
29 | {
30 | return true;
31 | }
32 |
33 | void AbstractAudioOutputPrivate::setupBackendObject()
34 | {
35 | Q_ASSERT(m_backendObject);
36 |
37 | // set up attributes
38 | }
39 |
40 | } // namespace Phonon
41 |
--------------------------------------------------------------------------------
/demos/simplecapture/main.cpp:
--------------------------------------------------------------------------------
1 | /* This file is part of the KDE project
2 | Copyright (C) 2011 Casian Andrei
3 |
4 | This library is free software; you can redistribute it and/or
5 | modify it under the terms of the GNU Lesser General Public
6 | License as published by the Free Software Foundation; either
7 | version 2.1 of the License, or (at your option) version 3, or any
8 | later version accepted by the membership of KDE e.V. (or its
9 | successor approved by the membership of KDE e.V.), Nokia Corporation
10 | (or its successors, if any) and the KDE Free Qt Foundation, which shall
11 | act as a proxy defined in Section 6 of version 3 of the license.
12 |
13 | This library is distributed in the hope that it will be useful,
14 | but WITHOUT ANY WARRANTY; without even the implied warranty of
15 | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
16 | Lesser General Public License for more details.
17 |
18 | You should have received a copy of the GNU Lesser General Public
19 | License along with this library. If not, see .
20 | */
21 |
22 | #include "capture.h"
23 |
24 | #include
25 | #include
26 |
27 | int main(int argc, char** argv)
28 | {
29 | QApplication app(argc, argv);
30 |
31 | app.setApplicationName("simplecapture");
32 |
33 | /*
34 | * Just create the capture window and show it.
35 | */
36 | CaptureWidget w;
37 | w.show();
38 |
39 | return app.exec();
40 | }
41 |
--------------------------------------------------------------------------------
/phonon/audiooutputinterface.cpp:
--------------------------------------------------------------------------------
1 | /* This file is part of the KDE project
2 | Copyright (C) 2008 Matthias Kretz
3 |
4 | This library is free software; you can redistribute it and/or
5 | modify it under the terms of the GNU Lesser General Public
6 | License as published by the Free Software Foundation; either
7 | version 2.1 of the License, or (at your option) version 3, or any
8 | later version accepted by the membership of KDE e.V. (or its
9 | successor approved by the membership of KDE e.V.), Nokia Corporation
10 | (or its successors, if any) and the KDE Free Qt Foundation, which shall
11 | act as a proxy defined in Section 6 of version 3 of the license.
12 |
13 | This library is distributed in the hope that it will be useful,
14 | but WITHOUT ANY WARRANTY; without even the implied warranty of
15 | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
16 | Lesser General Public License for more details.
17 |
18 | You should have received a copy of the GNU Lesser General Public
19 | License along with this library. If not, see .
20 |
21 | */
22 | #include "audiooutputinterface.h"
23 | #include
24 | #include
25 | #include
26 | #include "platform_p.h"
27 |
28 | namespace Phonon
29 | {
30 |
31 | QList > AudioOutputInterface42::deviceAccessListFor(const Phonon::AudioOutputDevice &deviceDesc) const
32 | {
33 | return Platform::deviceAccessListFor(deviceDesc);
34 | }
35 |
36 | } // namespace Phonon
37 |
--------------------------------------------------------------------------------
/phonon/experimental/avwriter.cpp:
--------------------------------------------------------------------------------
1 | /* This file is part of the KDE project
2 | Copyright (C) 2006 Matthias Kretz
3 |
4 | This library is free software; you can redistribute it and/or
5 | modify it under the terms of the GNU Lesser General Public
6 | License as published by the Free Software Foundation; either
7 | version 2.1 of the License, or (at your option) version 3, or any
8 | later version accepted by the membership of KDE e.V. (or its
9 | successor approved by the membership of KDE e.V.), Nokia Corporation
10 | (or its successors, if any) and the KDE Free Qt Foundation, which shall
11 | act as a proxy defined in Section 6 of version 3 of the license.
12 |
13 | This library is distributed in the hope that it will be useful,
14 | but WITHOUT ANY WARRANTY; without even the implied warranty of
15 | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
16 | Lesser General Public License for more details.
17 |
18 | You should have received a copy of the GNU Lesser General Public
19 | License along with this library. If not, see .
20 |
21 | */
22 |
23 | #include "avwriter.h"
24 | #include "avwriter_p.h"
25 |
26 | namespace Phonon
27 | {
28 | namespace Experimental
29 | {
30 |
31 | AvWriter::AvWriter(QObject *parent)
32 | : QObject(parent)
33 | , k_ptr(new AvWriterPrivate)
34 | {
35 | K_D(AvWriter);
36 | d->q_ptr = this;
37 | }
38 |
39 | } // namespace Experimental
40 | } // namespace Phonon
41 |
42 | #include "avwriter.moc"
43 | // vim: sw=4 ts=4
44 |
--------------------------------------------------------------------------------
/phonon/experimental/avwriter_p.h:
--------------------------------------------------------------------------------
1 | /* This file is part of the KDE project
2 | Copyright (C) 2006 Matthias Kretz
3 |
4 | This library is free software; you can redistribute it and/or
5 | modify it under the terms of the GNU Lesser General Public
6 | License as published by the Free Software Foundation; either
7 | version 2.1 of the License, or (at your option) version 3, or any
8 | later version accepted by the membership of KDE e.V. (or its
9 | successor approved by the membership of KDE e.V.), Nokia Corporation
10 | (or its successors, if any) and the KDE Free Qt Foundation, which shall
11 | act as a proxy defined in Section 6 of version 3 of the license.
12 |
13 | This library is distributed in the hope that it will be useful,
14 | but WITHOUT ANY WARRANTY; without even the implied warranty of
15 | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
16 | Lesser General Public License for more details.
17 |
18 | You should have received a copy of the GNU Lesser General Public
19 | License along with this library. If not, see .
20 |
21 | */
22 |
23 | #ifndef PHONON_AVWRITER_P_H
24 | #define PHONON_AVWRITER_P_H
25 |
26 | #include "rtpsender.h"
27 |
28 | namespace Phonon
29 | {
30 | namespace Experimental
31 | {
32 |
33 | class AvWriterPrivate
34 | {
35 | Q_DECLARE_PUBLIC(AvWriter)
36 | protected:
37 | AvWriter *q_ptr;
38 | };
39 |
40 | } // namespace Experimental
41 | } // namespace Phonon
42 |
43 | #endif // PHONON_AVWRITER_P_H
44 | // vim: sw=4 ts=4 tw=80
45 |
--------------------------------------------------------------------------------
/phonon/experimental/packet_p.h:
--------------------------------------------------------------------------------
1 | /* This file is part of the KDE project
2 | Copyright (C) 2008 Matthias Kretz
3 |
4 | This program is free software; you can redistribute it and/or
5 | modify it under the terms of the GNU Library General Public
6 | License as published by the Free Software Foundation; either
7 | version 2 of the License, or (at your option) version 3.
8 |
9 | This library is distributed in the hope that it will be useful,
10 | but WITHOUT ANY WARRANTY; without even the implied warranty of
11 | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
12 | Library General Public License for more details.
13 |
14 | You should have received a copy of the GNU Library General Public License
15 | along with this library; see the file COPYING.LIB. If not, write to
16 | the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
17 | Boston, MA 02110-1301, USA.
18 |
19 | */
20 |
21 | #ifndef PHONON_PACKET_P_H
22 | #define PHONON_PACKET_P_H
23 |
24 | #include
25 |
26 | namespace Phonon
27 | {
28 |
29 | class PacketPoolPrivate;
30 | class PacketPrivate
31 | {
32 | public:
33 | inline PacketPrivate(char *_data, PacketPoolPrivate *_pool)
34 | : ref(0), m_size(0), m_data(_data), m_pool(_pool) {}
35 | inline PacketPrivate() : ref(1), m_size(0), m_data(nullptr), m_pool(nullptr) {}
36 |
37 | QAtomicInt ref;
38 |
39 | int m_size;
40 | char *const m_data;
41 | PacketPoolPrivate *const m_pool;
42 | };
43 |
44 | } // namespace Phonon
45 |
46 | #endif // PHONON_PACKET_P_H
47 |
--------------------------------------------------------------------------------
/doc/DESIGN/HowToConfigureDevices.txt:
--------------------------------------------------------------------------------
1 | With Phonon the audio/video capture/output devices will be handled completely
2 | transparent for the applications:
3 |
4 | Applications can get a listing of available devices, show that to the user and
5 | use the selected device on either AvCapture, VideoOutput or AudioOutput. On the
6 | other hand the applications should use "the right defaults", so a central KCM
7 | defines the defaults:
8 |
9 | For every category a list of preference is created for devices. Devices that are
10 | not available anymore (external USB headset that got unplugged) are still
11 | displayed (with the name and description saved from the last time it was
12 | announced by the backend) but marked as "currently not available" with an option
13 | to remove the device permanently.
14 |
15 | Use cases:
16 | A)
17 | - plug new audio device (headset)
18 | - dialog asking the user whether he wants to configure KDE to use the new device
19 | yes -> show audio device selection dialog
20 | - user changes the device preference for the Communication category to prefer
21 | the new headset
22 | - Kopete now uses the headset for voice-chat
23 |
24 | B)
25 | - headset got broken
26 | - user looks at audio device selection dialog
27 | - headset is shown as not connected
28 | - user selects to remove the device
29 |
30 | C)
31 | - plug new webcam
32 | - dialog asking the user whether he wants to configure KDE to use the new device
33 | yes -> show video device selection dialog
34 | - user changes the device preference for the Communication category to prefer
35 | the new webcam
36 | - Kopete now uses the webcam for voice-chat
37 |
--------------------------------------------------------------------------------
/phonon/globalconfig_p.h:
--------------------------------------------------------------------------------
1 | /* This file is part of the KDE project
2 | Copyright (C) 2006-2008 Matthias Kretz
3 |
4 | This library is free software; you can redistribute it and/or
5 | modify it under the terms of the GNU Lesser General Public
6 | License as published by the Free Software Foundation; either
7 | version 2.1 of the License, or (at your option) version 3, or any
8 | later version accepted by the membership of KDE e.V. (or its
9 | successor approved by the membership of KDE e.V.), Nokia Corporation
10 | (or its successors, if any) and the KDE Free Qt Foundation, which shall
11 | act as a proxy defined in Section 6 of version 3 of the license.
12 |
13 | This library is distributed in the hope that it will be useful,
14 | but WITHOUT ANY WARRANTY; without even the implied warranty of
15 | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
16 | Lesser General Public License for more details.
17 |
18 | You should have received a copy of the GNU Lesser General Public
19 | License along with this library. If not, see .
20 |
21 | */
22 |
23 | #ifndef PHONON_GLOBALCONFIG_P_H
24 | #define PHONON_GLOBALCONFIG_P_H
25 |
26 | #include
27 |
28 | #include "phonon_export.h"
29 |
30 |
31 | namespace Phonon
32 | {
33 | class GlobalConfigPrivate
34 | {
35 | public:
36 | GlobalConfigPrivate();
37 | virtual ~GlobalConfigPrivate() {}
38 |
39 | QSettings config;
40 | };
41 | } // namespace Phonon
42 |
43 |
44 | #endif // PHONON_GLOBALCONFIG_P_H
45 |
--------------------------------------------------------------------------------
/phonon/experimental/export.h:
--------------------------------------------------------------------------------
1 | /* This file is part of the KDE project
2 | Copyright (C) 2007 Matthias Kretz
3 |
4 | This library is free software; you can redistribute it and/or
5 | modify it under the terms of the GNU Lesser General Public
6 | License as published by the Free Software Foundation; either
7 | version 2.1 of the License, or (at your option) version 3, or any
8 | later version accepted by the membership of KDE e.V. (or its
9 | successor approved by the membership of KDE e.V.), Nokia Corporation
10 | (or its successors, if any) and the KDE Free Qt Foundation, which shall
11 | act as a proxy defined in Section 6 of version 3 of the license.
12 |
13 | This library is distributed in the hope that it will be useful,
14 | but WITHOUT ANY WARRANTY; without even the implied warranty of
15 | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
16 | Lesser General Public License for more details.
17 |
18 | You should have received a copy of the GNU Lesser General Public
19 | License along with this library. If not, see .
20 |
21 | */
22 |
23 | #ifndef PHONON_EXPERIMENTAL_EXPORT_H
24 | #define PHONON_EXPERIMENTAL_EXPORT_H
25 |
26 | /* needed for KDE_EXPORT and KDE_IMPORT macros */
27 | #include
28 |
29 | #ifndef PHONONEXPERIMENTAL_EXPORT
30 | # if defined(MAKE_PHONONEXPERIMENTAL_LIB)
31 | /* We are building this library */
32 | # define PHONONEXPERIMENTAL_EXPORT Q_DECL_EXPORT
33 | # else
34 | /* We are using this library */
35 | # define PHONONEXPERIMENTAL_EXPORT Q_DECL_IMPORT
36 | # endif
37 | #endif
38 |
39 | #endif
40 |
--------------------------------------------------------------------------------
/settings/backendselection.h:
--------------------------------------------------------------------------------
1 | /*
2 | Copyright (C) 2004-2007 Matthias Kretz
3 | Copyright (C) 2011-2019 Harald Sitter
4 |
5 | This program is free software; you can redistribute it and/or
6 | modify it under the terms of the GNU Library General Public
7 | License as published by the Free Software Foundation; either
8 | version 2 of the License, or (at your option) version 3.
9 |
10 | This library is distributed in the hope that it will be useful,
11 | but WITHOUT ANY WARRANTY; without even the implied warranty of
12 | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
13 | Library General Public License for more details.
14 |
15 | You should have received a copy of the GNU Library General Public License
16 | along with this library; see the file COPYING.LIB. If not, write to
17 | the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
18 | Boston, MA 02110-1301, USA.
19 | */
20 |
21 | #ifndef BACKENDSELECTION_H
22 | #define BACKENDSELECTION_H
23 |
24 | #include "ui_backendselection.h"
25 | #include
26 | #include
27 |
28 | #include "phonon/factory_p.h"
29 |
30 | class BackendSelection : public QWidget, private Ui::BackendSelection
31 | {
32 | Q_OBJECT
33 | public:
34 | explicit BackendSelection(QWidget *parent = nullptr);
35 |
36 | void load();
37 | void save();
38 |
39 | private slots:
40 | void selectionChanged();
41 | void up();
42 | void down();
43 |
44 | private:
45 | QHash m_backends;
46 | int m_emptyPage;
47 | };
48 |
49 | #endif // BACKENDSELECTION_H
50 |
--------------------------------------------------------------------------------
/phonon/experimental/backendinterface.h:
--------------------------------------------------------------------------------
1 | /* This file is part of the KDE project
2 | Copyright (C) 2008 Matthias Kretz
3 |
4 | This library is free software; you can redistribute it and/or
5 | modify it under the terms of the GNU Lesser General Public
6 | License as published by the Free Software Foundation; either
7 | version 2.1 of the License, or (at your option) version 3, or any
8 | later version accepted by the membership of KDE e.V. (or its
9 | successor approved by the membership of KDE e.V.), Nokia Corporation
10 | (or its successors, if any) and the KDE Free Qt Foundation, which shall
11 | act as a proxy defined in Section 6 of version 3 of the license.
12 |
13 | This library is distributed in the hope that it will be useful,
14 | but WITHOUT ANY WARRANTY; without even the implied warranty of
15 | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
16 | Lesser General Public License for more details.
17 |
18 | You should have received a copy of the GNU Lesser General Public
19 | License along with this library. If not, see .
20 |
21 | */
22 | #ifndef PHONON_EXPERIMENTAL_BACKENDINTERFACE_H
23 | #define PHONON_EXPERIMENTAL_BACKENDINTERFACE_H
24 |
25 | namespace Phonon
26 | {
27 | namespace Experimental
28 | {
29 | namespace BackendInterface
30 | {
31 | enum Class {
32 | VideoDataOutputClass = 0x10000,
33 | AudioDataOutputClass,
34 | VisualizationClass,
35 | AvCaptureClass
36 | };
37 | } // namespace BackendInterface
38 | } // namespace Experimental
39 | } // namespace Phonon
40 |
41 | #endif // PHONON_EXPERIMENTAL_BACKENDINTERFACE_H
42 |
--------------------------------------------------------------------------------
/phonon/abstractvideooutput_p.h:
--------------------------------------------------------------------------------
1 | /* This file is part of the KDE project
2 | Copyright (C) 2006 Matthias Kretz
3 |
4 | This library is free software; you can redistribute it and/or
5 | modify it under the terms of the GNU Lesser General Public
6 | License as published by the Free Software Foundation; either
7 | version 2.1 of the License, or (at your option) version 3, or any
8 | later version accepted by the membership of KDE e.V. (or its
9 | successor approved by the membership of KDE e.V.), Nokia Corporation
10 | (or its successors, if any) and the KDE Free Qt Foundation, which shall
11 | act as a proxy defined in Section 6 of version 3 of the license.
12 |
13 | This library is distributed in the hope that it will be useful,
14 | but WITHOUT ANY WARRANTY; without even the implied warranty of
15 | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
16 | Lesser General Public License for more details.
17 |
18 | You should have received a copy of the GNU Lesser General Public
19 | License along with this library. If not, see .
20 |
21 | */
22 |
23 | #ifndef ABSTRACTVIDEOOUTPUT_P_H
24 | #define ABSTRACTVIDEOOUTPUT_P_H
25 |
26 | #include "abstractvideooutput.h"
27 | #include "medianode_p.h"
28 | #include "phonondefs_p.h"
29 |
30 | #ifndef QT_NO_PHONON_VIDEO
31 |
32 | namespace Phonon
33 | {
34 | class AbstractVideoOutputPrivate : public MediaNodePrivate
35 | {
36 | P_DECLARE_PUBLIC(AbstractVideoOutput)
37 | PHONON_PRIVATEABSTRACTCLASS
38 | };
39 | } //namespace Phonon
40 |
41 | #endif //QT_NO_PHONON_VIDEO
42 |
43 | #endif // ABSTRACTVIDEOOUTPUT_P_H
44 | // vim: sw=4 ts=4 tw=80
45 |
--------------------------------------------------------------------------------
/phonon/experimental/rtpreceiver.h:
--------------------------------------------------------------------------------
1 | /* This file is part of the KDE project
2 | Copyright (C) 2006 Matthias Kretz
3 |
4 | This library is free software; you can redistribute it and/or
5 | modify it under the terms of the GNU Lesser General Public
6 | License as published by the Free Software Foundation; either
7 | version 2.1 of the License, or (at your option) version 3, or any
8 | later version accepted by the membership of KDE e.V. (or its
9 | successor approved by the membership of KDE e.V.), Nokia Corporation
10 | (or its successors, if any) and the KDE Free Qt Foundation, which shall
11 | act as a proxy defined in Section 6 of version 3 of the license.
12 |
13 | This library is distributed in the hope that it will be useful,
14 | but WITHOUT ANY WARRANTY; without even the implied warranty of
15 | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
16 | Lesser General Public License for more details.
17 |
18 | You should have received a copy of the GNU Lesser General Public
19 | License along with this library. If not, see .
20 |
21 | */
22 |
23 | #ifndef PHONON_RTPRECEIVER_H
24 | #define PHONON_RTPRECEIVER_H
25 |
26 | #include "../mediaobject.h"
27 | #include "../phonondefs.h"
28 |
29 | namespace Phonon
30 | {
31 | namespace Experimental
32 | {
33 |
34 | class RtpReceiver : public MediaProducer
35 | {
36 | Q_OBJECT
37 | K_DECLARE_PRIVATE(RtpReceiver)
38 | PHONON_HEIR(VideoDataOutput)
39 | public:
40 | setUrl(const KUrl &);
41 | setBandwidth(int kiloBitPerSecond);
42 | };
43 |
44 | } // namespace Experimental
45 | } // namespace Phonon
46 |
47 | #endif // PHONON_RTPRECEIVER_H
48 |
--------------------------------------------------------------------------------
/demos/phota/mediacontroller.h:
--------------------------------------------------------------------------------
1 | /*
2 | Copyright (C) 2010 Jean-Baptiste Kempf
3 |
4 | This library is free software; you can redistribute it and/or
5 | modify it under the terms of the GNU Lesser General Public
6 | License as published by the Free Software Foundation; either
7 | version 2.1 of the License, or (at your option) version 3, or any
8 | later version accepted by the membership of KDE e.V. (or its
9 | successor approved by the membership of KDE e.V.), Nokia Corporation
10 | (or its successors, if any) and the KDE Free Qt Foundation, which shall
11 | act as a proxy defined in Section 6 of version 3 of the license.
12 |
13 | This library is distributed in the hope that it will be useful,
14 | but WITHOUT ANY WARRANTY; without even the implied warranty of
15 | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
16 | Lesser General Public License for more details.
17 |
18 | You should have received a copy of the GNU Lesser General Public
19 | License along with this library. If not, see .
20 | */
21 |
22 | #ifndef MEDIACONTROLLER_H
23 | #define MEDIACONTROLLER_H
24 |
25 | #include
26 |
27 | namespace Phonon
28 | {
29 | class MediaObject;
30 | class MediaSource;
31 | }
32 |
33 | class MediaController : public QObject
34 | {
35 | Q_OBJECT
36 | public:
37 | explicit MediaController(QObject *parent = 0);
38 |
39 | Phonon::MediaObject *mediaObject() const;
40 |
41 | public slots:
42 | void openFile();
43 | void openURL();
44 |
45 | private:
46 | Phonon::MediaObject *m_media;
47 |
48 | void playSource(const Phonon::MediaSource &);
49 | };
50 |
51 | #endif // MEDIACONTROLLER_H
52 |
--------------------------------------------------------------------------------
/phonon/experimental/snapshotinterface.h:
--------------------------------------------------------------------------------
1 | /* This file is part of the KDE project
2 | Copyright (C) 2008 Matthias Kretz
3 |
4 | This library is free software; you can redistribute it and/or
5 | modify it under the terms of the GNU Lesser General Public
6 | License as published by the Free Software Foundation; either
7 | version 2.1 of the License, or (at your option) version 3, or any
8 | later version accepted by the membership of KDE e.V. (or its
9 | successor approved by the membership of KDE e.V.), Nokia Corporation
10 | (or its successors, if any) and the KDE Free Qt Foundation, which shall
11 | act as a proxy defined in Section 6 of version 3 of the license.
12 |
13 | This library is distributed in the hope that it will be useful,
14 | but WITHOUT ANY WARRANTY; without even the implied warranty of
15 | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
16 | Lesser General Public License for more details.
17 |
18 | You should have received a copy of the GNU Lesser General Public
19 | License along with this library. If not, see .
20 |
21 | */
22 |
23 | #ifndef PHONON_EXPERIMENTAL_SNAPSHOTINTERFACE_H
24 | #define PHONON_EXPERIMENTAL_SNAPSHOTINTERFACE_H
25 |
26 | namespace Phonon
27 | {
28 | namespace Experimental
29 | {
30 |
31 | class SnapshotInterface
32 | {
33 | public:
34 | virtual ~SnapshotInterface() {}
35 |
36 | virtual QImage snapshot() const = 0;
37 | };
38 |
39 | } // namespace Experimental
40 | } // namespace Phonon
41 |
42 | Q_DECLARE_INTERFACE(Phonon::Experimental::SnapshotInterface, "0SnapshotInterface.Phonon.kde.org")
43 |
44 | #endif // PHONON_EXPERIMENTAL_SNAPSHOTINTERFACE_H
45 |
--------------------------------------------------------------------------------
/demos/phota/mainwindow.h:
--------------------------------------------------------------------------------
1 | /*
2 | Copyright (C) 2010 Jean-Baptiste Kempf
3 |
4 | This library is free software; you can redistribute it and/or
5 | modify it under the terms of the GNU Lesser General Public
6 | License as published by the Free Software Foundation; either
7 | version 2.1 of the License, or (at your option) version 3, or any
8 | later version accepted by the membership of KDE e.V. (or its
9 | successor approved by the membership of KDE e.V.), Nokia Corporation
10 | (or its successors, if any) and the KDE Free Qt Foundation, which shall
11 | act as a proxy defined in Section 6 of version 3 of the license.
12 |
13 | This library is distributed in the hope that it will be useful,
14 | but WITHOUT ANY WARRANTY; without even the implied warranty of
15 | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
16 | Lesser General Public License for more details.
17 |
18 | You should have received a copy of the GNU Lesser General Public
19 | License along with this library. If not, see .
20 | */
21 |
22 | #ifndef MAINWINDOW_H
23 | #define MAINWINDOW_H
24 |
25 | #include
26 |
27 | namespace Phonon { class VideoWidget; }
28 | class MediaController;
29 |
30 | class MainWindow : public QMainWindow
31 | {
32 | Q_OBJECT
33 | public:
34 | explicit MainWindow(QWidget *parent = 0);
35 |
36 | signals:
37 |
38 | public slots:
39 |
40 | private slots:
41 | void effectsDialog();
42 |
43 | protected:
44 | virtual void contextMenuEvent(QContextMenuEvent *e);
45 |
46 | private:
47 | MediaController *m_mediaControl;
48 | Phonon::VideoWidget *m_videoWidget;
49 | };
50 |
51 | #endif // MAINWINDOW_H
52 |
--------------------------------------------------------------------------------
/phonon/experimental/videowidget.h:
--------------------------------------------------------------------------------
1 | /* This file is part of the KDE project
2 | Copyright (C) 2008 Matthias Kretz
3 |
4 | This library is free software; you can redistribute it and/or
5 | modify it under the terms of the GNU Lesser General Public
6 | License as published by the Free Software Foundation; either
7 | version 2.1 of the License, or (at your option) version 3, or any
8 | later version accepted by the membership of KDE e.V. (or its
9 | successor approved by the membership of KDE e.V.), Nokia Corporation
10 | (or its successors, if any) and the KDE Free Qt Foundation, which shall
11 | act as a proxy defined in Section 6 of version 3 of the license.
12 |
13 | This library is distributed in the hope that it will be useful,
14 | but WITHOUT ANY WARRANTY; without even the implied warranty of
15 | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
16 | Lesser General Public License for more details.
17 |
18 | You should have received a copy of the GNU Lesser General Public
19 | License along with this library. If not, see .
20 |
21 | */
22 |
23 | #ifndef PHONON_EXPERIMENTAL_VIDEOWIDGET_H
24 | #define PHONON_EXPERIMENTAL_VIDEOWIDGET_H
25 |
26 | #include "../videowidget.h"
27 | namespace Phonon
28 | {
29 | namespace Experimental
30 | {
31 |
32 | class VideoWidgetPrivate;
33 | class VideoWidget : public Phonon::VideoWidget
34 | {
35 | P_DECLARE_PRIVATE(VideoWidget)
36 | Q_OBJECT
37 | public:
38 | VideoWidget(QWidget *parent = nullptr);
39 |
40 | QImage snapshot() const;
41 | };
42 |
43 | } // namespace Experimental
44 | } // namespace Phonon
45 |
46 | #endif // PHONON_EXPERIMENTAL_VIDEOWIDGET_H
47 |
--------------------------------------------------------------------------------
/phonon/abstractaudiooutput.cpp:
--------------------------------------------------------------------------------
1 | /* This file is part of the KDE project
2 | Copyright (C) 2005-2006 Matthias Kretz
3 |
4 | This library is free software; you can redistribute it and/or
5 | modify it under the terms of the GNU Lesser General Public
6 | License as published by the Free Software Foundation; either
7 | version 2.1 of the License, or (at your option) version 3, or any
8 | later version accepted by the membership of KDE e.V. (or its
9 | successor approved by the membership of KDE e.V.), Nokia Corporation
10 | (or its successors, if any) and the KDE Free Qt Foundation, which shall
11 | act as a proxy defined in Section 6 of version 3 of the license.
12 |
13 | This library is distributed in the hope that it will be useful,
14 | but WITHOUT ANY WARRANTY; without even the implied warranty of
15 | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
16 | Lesser General Public License for more details.
17 |
18 | You should have received a copy of the GNU Lesser General Public
19 | License along with this library. If not, see .
20 |
21 | */
22 | #include "abstractaudiooutput.h"
23 | #include "abstractaudiooutput_p.h"
24 | #include "factory_p.h"
25 |
26 | #define PHONON_CLASSNAME AbstractAudioOutput
27 |
28 | namespace Phonon
29 | {
30 |
31 | AbstractAudioOutput::AbstractAudioOutput(AbstractAudioOutputPrivate &dd, QObject *parent) : QObject(parent),
32 | MediaNode(dd)
33 | {
34 | }
35 |
36 | AbstractAudioOutput::~AbstractAudioOutput()
37 | {
38 | }
39 |
40 | } //namespace Phonon
41 |
42 | #undef PHONON_CLASSNAME
43 |
44 | #include "moc_abstractaudiooutput.cpp"
45 |
46 | // vim: sw=4 ts=4 tw=80
47 |
--------------------------------------------------------------------------------
/phonon/audiodataoutput_p.h:
--------------------------------------------------------------------------------
1 | /* This file is part of the KDE project
2 | Copyright (C) 2006 Matthias Kretz
3 |
4 | This library is free software; you can redistribute it and/or
5 | modify it under the terms of the GNU Lesser General Public
6 | License as published by the Free Software Foundation; either
7 | version 2.1 of the License, or (at your option) version 3, or any
8 | later version accepted by the membership of KDE e.V. (or its
9 | successor approved by the membership of KDE e.V.), Nokia Corporation
10 | (or its successors, if any) and the KDE Free Qt Foundation, which shall
11 | act as a proxy defined in Section 6 of version 3 of the license.
12 |
13 | This library is distributed in the hope that it will be useful,
14 | but WITHOUT ANY WARRANTY; without even the implied warranty of
15 | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
16 | Lesser General Public License for more details.
17 |
18 | You should have received a copy of the GNU Lesser General Public
19 | License along with this library. If not, see .
20 |
21 | */
22 |
23 | #ifndef AUDIODATAOUTPUT_P_H
24 | #define AUDIODATAOUTPUT_P_H
25 |
26 | #include "audiodataoutput.h"
27 | #include "abstractaudiooutput_p.h"
28 |
29 |
30 | namespace Phonon
31 | {
32 |
33 | class AudioDataOutputPrivate : public AbstractAudioOutputPrivate
34 | {
35 | P_DECLARE_PUBLIC(AudioDataOutput)
36 | PHONON_PRIVATECLASS
37 | protected:
38 | AudioDataOutputPrivate()
39 | : dataSize(512)
40 | {
41 | }
42 |
43 | int dataSize;
44 | };
45 |
46 | } // namespace Phonon
47 |
48 |
49 | #endif // AUDIODATAOUTPUT_P_H
50 | // vim: sw=4 ts=4 tw=80
51 |
--------------------------------------------------------------------------------
/phonon/experimental/videodataoutput2_p.h:
--------------------------------------------------------------------------------
1 | /* This file is part of the KDE project
2 | Copyright (C) 2008 Matthias Kretz
3 |
4 | This library is free software; you can redistribute it and/or
5 | modify it under the terms of the GNU Lesser General Public
6 | License as published by the Free Software Foundation; either
7 | version 2.1 of the License, or (at your option) version 3, or any
8 | later version accepted by the membership of KDE e.V. (or its
9 | successor approved by the membership of KDE e.V.), Nokia Corporation
10 | (or its successors, if any) and the KDE Free Qt Foundation, which shall
11 | act as a proxy defined in Section 6 of version 3 of the license.
12 |
13 | This library is distributed in the hope that it will be useful,
14 | but WITHOUT ANY WARRANTY; without even the implied warranty of
15 | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
16 | Lesser General Public License for more details.
17 |
18 | You should have received a copy of the GNU Lesser General Public
19 | License along with this library. If not, see .
20 |
21 | */
22 |
23 | #ifndef PHONON_VIDEODATAOUTPUT2_P_H
24 | #define PHONON_VIDEODATAOUTPUT2_P_H
25 |
26 | #include "videodataoutput2.h"
27 | #include "abstractvideodataoutput_p.h"
28 |
29 | namespace Phonon
30 | {
31 | namespace Experimental
32 | {
33 |
34 | class VideoDataOutput2Private : public AbstractVideoDataOutputPrivate
35 | {
36 | P_DECLARE_PUBLIC(VideoDataOutput2)
37 | PHONON_PRIVATECLASS
38 | public:
39 | QObject *qObject() override { return q_func(); }
40 | };
41 |
42 | } // namespace Experimental
43 | } // namespace Phonon
44 |
45 | #endif // PHONON_VIDEODATAOUTPUT2_P_H
46 |
--------------------------------------------------------------------------------
/phonon/experimental/videowidget.cpp:
--------------------------------------------------------------------------------
1 | /* This file is part of the KDE project
2 | Copyright (C) 2008 Matthias Kretz
3 |
4 | This library is free software; you can redistribute it and/or
5 | modify it under the terms of the GNU Lesser General Public
6 | License as published by the Free Software Foundation; either
7 | version 2.1 of the License, or (at your option) version 3, or any
8 | later version accepted by the membership of KDE e.V. (or its
9 | successor approved by the membership of KDE e.V.), Nokia Corporation
10 | (or its successors, if any) and the KDE Free Qt Foundation, which shall
11 | act as a proxy defined in Section 6 of version 3 of the license.
12 |
13 | This library is distributed in the hope that it will be useful,
14 | but WITHOUT ANY WARRANTY; without even the implied warranty of
15 | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
16 | Lesser General Public License for more details.
17 |
18 | You should have received a copy of the GNU Lesser General Public
19 | License along with this library. If not, see .
20 |
21 | */
22 |
23 | #include "videowidget.h"
24 | #include "videowidget_p.h"
25 |
26 | #include "snapshotinterface.h"
27 |
28 | namespace Phonon
29 | {
30 | namespace Experimental
31 | {
32 |
33 | VideoWidget::VideoWidget(QWidget *w)
34 | : Phonon::VideoWidget(w)
35 | {
36 | }
37 |
38 | QImage VideoWidget::snapshot() const
39 | {
40 | P_D(const Phonon::VideoWidget);
41 | SnapshotInterface *iface = qobject_cast(d->m_backendObject);
42 | if (iface) {
43 | return iface->snapshot();
44 | }
45 | return QImage();
46 | }
47 |
48 | } // namespace Experimental
49 | } // namespace Phonon
50 |
--------------------------------------------------------------------------------
/phonon/audiodataoutputinterface.h:
--------------------------------------------------------------------------------
1 | /* This file is part of the KDE project
2 | Copyright (C) 2008 Matthias Kretz
3 |
4 | This library is free software; you can redistribute it and/or
5 | modify it under the terms of the GNU Lesser General Public
6 | License as published by the Free Software Foundation; either
7 | version 2.1 of the License, or (at your option) version 3, or any
8 | later version accepted by the membership of KDE e.V. (or its
9 | successor approved by the membership of KDE e.V.), Nokia Corporation
10 | (or its successors, if any) and the KDE Free Qt Foundation, which shall
11 | act as a proxy defined in Section 6 of version 3 of the license.
12 |
13 | This library is distributed in the hope that it will be useful,
14 | but WITHOUT ANY WARRANTY; without even the implied warranty of
15 | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
16 | Lesser General Public License for more details.
17 |
18 | You should have received a copy of the GNU Lesser General Public
19 | License along with this library. If not, see .
20 |
21 | */
22 |
23 | #ifndef PHONON_AUDIODATAOUTPUTINTERFACE_H
24 | #define PHONON_AUDIODATAOUTPUTINTERFACE_H
25 |
26 |
27 | namespace Phonon
28 | {
29 |
30 | class AudioDataOutput;
31 |
32 | class AudioDataOutputInterface
33 | {
34 | public:
35 | virtual ~AudioDataOutputInterface() {}
36 |
37 | virtual AudioDataOutput *frontendObject() const = 0;
38 | virtual void setFrontendObject(AudioDataOutput *) = 0;
39 | };
40 |
41 | } // namespace Phonon
42 |
43 | Q_DECLARE_INTERFACE(Phonon::AudioDataOutputInterface, "0AudioDataOutputInterface.phonon.kde.org")
44 |
45 |
46 | #endif // PHONON_AUDIODATAOUTPUTINTERFACE_H
47 |
--------------------------------------------------------------------------------
/phonon/experimental/backendcapabilities.h:
--------------------------------------------------------------------------------
1 | /* This file is part of the KDE project
2 | Copyright (C) 2008 Matthias Kretz
3 |
4 | This library is free software; you can redistribute it and/or
5 | modify it under the terms of the GNU Lesser General Public
6 | License as published by the Free Software Foundation; either
7 | version 2.1 of the License, or (at your option) version 3, or any
8 | later version accepted by the membership of KDE e.V. (or its
9 | successor approved by the membership of KDE e.V.), Nokia Corporation
10 | (or its successors, if any) and the KDE Free Qt Foundation, which shall
11 | act as a proxy defined in Section 6 of version 3 of the license.
12 |
13 | This library is distributed in the hope that it will be useful,
14 | but WITHOUT ANY WARRANTY; without even the implied warranty of
15 | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
16 | Lesser General Public License for more details.
17 |
18 | You should have received a copy of the GNU Lesser General Public
19 | License along with this library. If not, see .
20 |
21 | */
22 | #ifndef PHONON_EXPERIMENTAL_BACKENDCAPABILITIES_H
23 | #define PHONON_EXPERIMENTAL_BACKENDCAPABILITIES_H
24 |
25 | #include "export.h"
26 | #include "objectdescription.h"
27 | #include "../backendcapabilities.h"
28 |
29 | namespace Phonon
30 | {
31 | namespace Experimental
32 | {
33 | namespace BackendCapabilities
34 | {
35 |
36 | #ifndef PHONON_NO_VIDEOCAPTURE
37 | PHONONEXPERIMENTAL_EXPORT QList availableVideoCaptureDevices();
38 | #endif
39 |
40 | } // namespace BackendCapabilities
41 | } // namespace Experimental
42 | } // namespace Phonon
43 | #endif // PHONON_EXPERIMENTAL_BACKENDCAPABILITIES_H
44 |
--------------------------------------------------------------------------------
/phonon/experimental/videowidget_p.h:
--------------------------------------------------------------------------------
1 | /* This file is part of the KDE project
2 | Copyright (C) 2008 Matthias Kretz
3 |
4 | This library is free software; you can redistribute it and/or
5 | modify it under the terms of the GNU Lesser General Public
6 | License as published by the Free Software Foundation; either
7 | version 2.1 of the License, or (at your option) version 3, or any
8 | later version accepted by the membership of KDE e.V. (or its
9 | successor approved by the membership of KDE e.V.), Nokia Corporation
10 | (or its successors, if any) and the KDE Free Qt Foundation, which shall
11 | act as a proxy defined in Section 6 of version 3 of the license.
12 |
13 | This library is distributed in the hope that it will be useful,
14 | but WITHOUT ANY WARRANTY; without even the implied warranty of
15 | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
16 | Lesser General Public License for more details.
17 |
18 | You should have received a copy of the GNU Lesser General Public
19 | License along with this library. If not, see .
20 |
21 | */
22 | #ifndef PHONON_EXPERIMENTAL_VIDEOWIDGET_P_H
23 | #define PHONON_EXPERIMENTAL_VIDEOWIDGET_P_H
24 |
25 | #include "videowidget.h"
26 | #include "../videowidget_p.h"
27 |
28 | namespace Phonon
29 | {
30 | namespace Experimental
31 | {
32 |
33 | class VideoWidgetPrivate : public Phonon::VideoWidgetPrivate
34 | {
35 | P_DECLARE_PUBLIC(VideoWidget)
36 | protected:
37 | VideoWidgetPrivate(VideoWidget *parent)
38 | : Phonon::VideoWidgetPrivate(parent)
39 | {
40 | }
41 | };
42 |
43 | } // namespace Experimental
44 | } // namespace Phonon
45 |
46 | #endif // PHONON_EXPERIMENTAL_VIDEOWIDGET_P_H
47 |
--------------------------------------------------------------------------------
/phonon/phononpimpl_p.h:
--------------------------------------------------------------------------------
1 | /*
2 | Copyright (C) 2011 Harald Sitter
3 |
4 | This library is free software; you can redistribute it and/or
5 | modify it under the terms of the GNU Lesser General Public
6 | License as published by the Free Software Foundation; either
7 | version 2.1 of the License, or (at your option) version 3, or any
8 | later version accepted by the membership of KDE e.V. (or its
9 | successor approved by the membership of KDE e.V.), Nokia Corporation
10 | (or its successors, if any) and the KDE Free Qt Foundation, which shall
11 | act as a proxy defined in Section 6 of version 3 of the license.
12 |
13 | This library is distributed in the hope that it will be useful,
14 | but WITHOUT ANY WARRANTY; without even the implied warranty of
15 | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
16 | Lesser General Public License for more details.
17 |
18 | You should have received a copy of the GNU Lesser General Public
19 | License along with this library. If not, see .
20 | */
21 |
22 | #ifndef PHONONPIMPL_P_H
23 | #define PHONONPIMPL_P_H
24 |
25 | /**
26 | * Declares and defines helpers to access a public class.
27 | */
28 | #define P_DECLARE_PUBLIC(Class) \
29 | inline Class* q_func() { return static_cast(q_ptr); } \
30 | inline const Class* q_func() const { return static_cast(q_ptr); } \
31 | friend class Class;
32 |
33 | /**
34 | * Get pointer to private class instance.
35 | * \see P_DECLARE_PRIVATE
36 | */
37 | #define P_D(Class) Class##Private *const d = k_func()
38 |
39 | /**
40 | * Get pointer to public class instance.
41 | * \see P_DECLARE_PUBLIC
42 | */
43 | #define P_Q(Class) Class *const q = q_func()
44 |
45 | #endif // PHONONPIMPL_P_H
46 |
--------------------------------------------------------------------------------
/phonon/effectparameter_p.h:
--------------------------------------------------------------------------------
1 | /* This file is part of the KDE project
2 | Copyright (C) 2006 Matthias Kretz
3 |
4 | This library is free software; you can redistribute it and/or
5 | modify it under the terms of the GNU Lesser General Public
6 | License as published by the Free Software Foundation; either
7 | version 2.1 of the License, or (at your option) version 3, or any
8 | later version accepted by the membership of KDE e.V. (or its
9 | successor approved by the membership of KDE e.V.), Nokia Corporation
10 | (or its successors, if any) and the KDE Free Qt Foundation, which shall
11 | act as a proxy defined in Section 6 of version 3 of the license.
12 |
13 | This library is distributed in the hope that it will be useful,
14 | but WITHOUT ANY WARRANTY; without even the implied warranty of
15 | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
16 | Lesser General Public License for more details.
17 |
18 | You should have received a copy of the GNU Lesser General Public
19 | License along with this library. If not, see .
20 |
21 | */
22 |
23 | #ifndef EFFECTPARAMETER_P_H
24 | #define EFFECTPARAMETER_P_H
25 |
26 | #include "effectparameter.h"
27 | #include
28 |
29 | #ifndef QT_NO_PHONON_EFFECT
30 |
31 | namespace Phonon
32 | {
33 |
34 | class EffectParameterPrivate : public QSharedData
35 | {
36 | public:
37 | int parameterId;
38 | QVariant min;
39 | QVariant max;
40 | QVariant defaultValue;
41 | QString name;
42 | QString description;
43 | QVariantList possibleValues;
44 | EffectParameter::Hints hints;
45 | };
46 |
47 | } // namespace Phonon
48 |
49 | #endif //QT_NO_PHONON_EFFECT
50 |
51 | #endif // EFFECTPARAMETER_P_H
52 | // vim: sw=4 ts=4 tw=80
53 |
--------------------------------------------------------------------------------
/demos/simpleplayer/main.cpp:
--------------------------------------------------------------------------------
1 | /* This file is part of the KDE project
2 | Copyright (C) 2010 Trever Fischer
3 |
4 | This library is free software; you can redistribute it and/or
5 | modify it under the terms of the GNU Lesser General Public
6 | License as published by the Free Software Foundation; either
7 | version 2.1 of the License, or (at your option) version 3, or any
8 | later version accepted by the membership of KDE e.V. (or its
9 | successor approved by the membership of KDE e.V.), Nokia Corporation
10 | (or its successors, if any) and the KDE Free Qt Foundation, which shall
11 | act as a proxy defined in Section 6 of version 3 of the license.
12 |
13 | This library is distributed in the hope that it will be useful,
14 | but WITHOUT ANY WARRANTY; without even the implied warranty of
15 | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
16 | Lesser General Public License for more details.
17 |
18 | You should have received a copy of the GNU Lesser General Public
19 | License along with this library. If not, see .
20 | */
21 |
22 | #include
23 |
24 | #include
25 |
26 | #include "player.h"
27 |
28 | int main(int argc, char **argv)
29 | {
30 | QApplication app(argc, argv);
31 |
32 | //On most platforms, this tells the audio system the name of the application responsible for which stream
33 | app.setApplicationName("simpleplayer");
34 |
35 | Player p;
36 | p.show();
37 |
38 | //Not passing an argument of what to play will prompt for a file inside Player::load(), called by Player::playPause()
39 | QStringList args = QApplication::arguments();
40 | if (args.size() > 1) {
41 | p.load(Phonon::Mrl(args[1]));
42 | }
43 |
44 | return app.exec();
45 | }
46 |
--------------------------------------------------------------------------------
/demos/metadatareader/metadatareader.h:
--------------------------------------------------------------------------------
1 | /* This file is part of the KDE project
2 | Copyright (C) 2011 Jakub Spiewak
3 |
4 | This library is free software; you can redistribute it and/or
5 | modify it under the terms of the GNU Lesser General Public
6 | License as published by the Free Software Foundation; either
7 | version 2.1 of the License, or (at your option) version 3, or any
8 | later version accepted by the membership of KDE e.V. (or its
9 | successor approved by the membership of KDE e.V.), Nokia Corporation
10 | (or its successors, if any) and the KDE Free Qt Foundation, which shall
11 | act as a proxy defined in Section 6 of version 3 of the license.
12 |
13 | This library is distributed in the hope that it will be useful,
14 | but WITHOUT ANY WARRANTY; without even the implied warranty of
15 | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
16 | Lesser General Public License for more details.
17 |
18 | You should have received a copy of the GNU Lesser General Public
19 | License along with this library. If not, see .
20 | */
21 |
22 | #ifndef METADATAREADER_H
23 | #define METADATAREADER_H
24 |
25 |
26 | #include
27 | #include
28 | #include
29 |
30 | namespace Phonon
31 | {
32 | class MediaObject;
33 | }
34 |
35 |
36 | class MetaDataReader: public QObject
37 | {
38 | Q_OBJECT
39 |
40 | public:
41 | MetaDataReader(QString&, QTextStream&);
42 | ~MetaDataReader();
43 |
44 |
45 | private slots:
46 | void printMetaData();
47 | void checkForError(Phonon::State, Phonon::State);
48 |
49 |
50 | signals:
51 | void quit();
52 |
53 |
54 | private:
55 | Phonon::MediaObject *mediaObj;
56 | QTextStream &textStream;
57 | };
58 |
59 |
60 | #endif //METADATAREADER_H
61 |
--------------------------------------------------------------------------------
/phonon/abstractaudiooutput_p.h:
--------------------------------------------------------------------------------
1 | /* This file is part of the KDE project
2 | Copyright (C) 2006 Matthias Kretz
3 |
4 | This library is free software; you can redistribute it and/or
5 | modify it under the terms of the GNU Lesser General Public
6 | License as published by the Free Software Foundation; either
7 | version 2.1 of the License, or (at your option) version 3, or any
8 | later version accepted by the membership of KDE e.V. (or its
9 | successor approved by the membership of KDE e.V.), Nokia Corporation
10 | (or its successors, if any) and the KDE Free Qt Foundation, which shall
11 | act as a proxy defined in Section 6 of version 3 of the license.
12 |
13 | This library is distributed in the hope that it will be useful,
14 | but WITHOUT ANY WARRANTY; without even the implied warranty of
15 | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
16 | Lesser General Public License for more details.
17 |
18 | You should have received a copy of the GNU Lesser General Public
19 | License along with this library. If not, see .
20 |
21 | */
22 |
23 | #ifndef PHONON_ABSTRACTAUDIOOUTPUT_P_H
24 | #define PHONON_ABSTRACTAUDIOOUTPUT_P_H
25 |
26 | #include "abstractaudiooutput.h"
27 | #include "medianode_p.h"
28 | #include "phonondefs_p.h"
29 |
30 | namespace Phonon
31 | {
32 | class AbstractAudioOutputPrivate : public MediaNodePrivate
33 | {
34 | P_DECLARE_PUBLIC(AbstractAudioOutput)
35 | PHONON_PRIVATEABSTRACTCLASS
36 | public:
37 | QObject *qObject() override { return q_func(); }
38 | protected:
39 | AbstractAudioOutputPrivate(CastId castId = AbstractAudioOutputPrivateType)
40 | : MediaNodePrivate(castId)
41 | {
42 | }
43 | };
44 | } //namespace Phonon
45 |
46 | #endif // PHONON_ABSTRACTAUDIOOUTPUT_P_H
47 |
--------------------------------------------------------------------------------
/demos/phota/videoeffects.h:
--------------------------------------------------------------------------------
1 | /*
2 | Copyright (C) 2010 Jean-Baptiste Kempf
3 |
4 | This library is free software; you can redistribute it and/or
5 | modify it under the terms of the GNU Lesser General Public
6 | License as published by the Free Software Foundation; either
7 | version 2.1 of the License, or (at your option) version 3, or any
8 | later version accepted by the membership of KDE e.V. (or its
9 | successor approved by the membership of KDE e.V.), Nokia Corporation
10 | (or its successors, if any) and the KDE Free Qt Foundation, which shall
11 | act as a proxy defined in Section 6 of version 3 of the license.
12 |
13 | This library is distributed in the hope that it will be useful,
14 | but WITHOUT ANY WARRANTY; without even the implied warranty of
15 | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
16 | Lesser General Public License for more details.
17 |
18 | You should have received a copy of the GNU Lesser General Public
19 | License along with this library. If not, see .
20 | */
21 |
22 | #ifndef VIDEOEFFECTS_H
23 | #define VIDEOEFFECTS_H
24 |
25 | #include
26 |
27 | namespace Ui {
28 | class VideoEffects;
29 | }
30 | namespace Phonon { class VideoWidget; }
31 |
32 | class VideoEffects : public QDialog
33 | {
34 | Q_OBJECT
35 |
36 | public:
37 | explicit VideoEffects(Phonon::VideoWidget *, QWidget *parent = 0);
38 | ~VideoEffects();
39 |
40 | private:
41 | Ui::VideoEffects *ui;
42 | Phonon::VideoWidget *videoWidget;
43 |
44 | private slots:
45 | void on_saturationSlider_valueChanged(int value);
46 | void on_hueSlider_valueChanged(int value);
47 | void on_contrastSlider_valueChanged(int value);
48 | void on_brightnessSlider_valueChanged(int value);
49 | };
50 |
51 | #endif // VIDEOEFFECTS_H
52 |
--------------------------------------------------------------------------------
/phonon/experimental/mediasource_p.h:
--------------------------------------------------------------------------------
1 | /* This file is part of the KDE project
2 | Copyright (C) 2008 Matthias Kretz
3 |
4 | This library is free software; you can redistribute it and/or
5 | modify it under the terms of the GNU Lesser General Public
6 | License as published by the Free Software Foundation; either
7 | version 2.1 of the License, or (at your option) version 3, or any
8 | later version accepted by the membership of KDE e.V. (or its
9 | successor approved by the membership of KDE e.V.), Nokia Corporation
10 | (or its successors, if any) and the KDE Free Qt Foundation, which shall
11 | act as a proxy defined in Section 6 of version 3 of the license.
12 |
13 | This library is distributed in the hope that it will be useful,
14 | but WITHOUT ANY WARRANTY; without even the implied warranty of
15 | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
16 | Lesser General Public License for more details.
17 |
18 | You should have received a copy of the GNU Lesser General Public
19 | License along with this library. If not, see .
20 |
21 | */
22 |
23 | #ifndef PHONON_EXPERIMENTAL_MEDIASOURCE_P_H
24 | #define PHONON_EXPERIMENTAL_MEDIASOURCE_P_H
25 |
26 | #include "mediasource.h"
27 | #include "../mediasource_p.h"
28 | #include "objectdescription.h"
29 |
30 | namespace Phonon
31 | {
32 | namespace Experimental
33 | {
34 |
35 | class MediaSourcePrivate : public Phonon::MediaSourcePrivate
36 | {
37 | public:
38 | MediaSourcePrivate(MediaSource::Type t)
39 | : Phonon::MediaSourcePrivate(static_cast(t))
40 | {
41 | }
42 |
43 | QList linkedSources;
44 | };
45 |
46 | } // namespace Experimental
47 | } // namespace Phonon
48 |
49 | #endif // PHONON_EXPERIMENTAL_MEDIASOURCE_P_H
50 |
--------------------------------------------------------------------------------
/cmake/FindGLIB2.cmake:
--------------------------------------------------------------------------------
1 | # - Try to find the GLIB2 libraries
2 | # Once done this will define
3 | #
4 | # GLIB2_FOUND - system has glib2
5 | # GLIB2_INCLUDE_DIR - the glib2 include directory
6 | # GLIB2_LIBRARIES - glib2 library
7 |
8 | # Copyright (c) 2008 Laurent Montel,
9 | #
10 | # Redistribution and use is allowed according to the terms of the BSD license.
11 | # For details see the accompanying COPYING-CMAKE-SCRIPTS file.
12 |
13 |
14 | if(GLIB2_INCLUDE_DIR AND GLIB2_LIBRARIES)
15 | # Already in cache, be silent
16 | set(GLIB2_FIND_QUIETLY TRUE)
17 | endif(GLIB2_INCLUDE_DIR AND GLIB2_LIBRARIES)
18 |
19 | find_package(PkgConfig)
20 | pkg_check_modules(PC_LibGLIB2 glib-2.0)
21 |
22 | find_path(GLIB2_MAIN_INCLUDE_DIR
23 | NAMES glib.h
24 | HINTS ${PC_LibGLIB2_INCLUDEDIR}
25 | PATH_SUFFIXES glib-2.0)
26 |
27 | find_library(GLIB2_LIBRARY
28 | NAMES glib-2.0
29 | HINTS ${PC_LibGLIB2_LIBDIR}
30 | )
31 |
32 | set(GLIB2_LIBRARIES ${GLIB2_LIBRARY})
33 |
34 | # search the glibconfig.h include dir under the same root where the library is found
35 | get_filename_component(glib2LibDir "${GLIB2_LIBRARIES}" PATH)
36 |
37 | find_path(GLIB2_INTERNAL_INCLUDE_DIR glibconfig.h
38 | PATH_SUFFIXES glib-2.0/include
39 | HINTS ${PC_LibGLIB2_INCLUDEDIR} "${glib2LibDir}" ${CMAKE_SYSTEM_LIBRARY_PATH})
40 |
41 | set(GLIB2_INCLUDE_DIR "${GLIB2_MAIN_INCLUDE_DIR}")
42 |
43 | # not sure if this include dir is optional or required
44 | # for now it is optional
45 | if(GLIB2_INTERNAL_INCLUDE_DIR)
46 | set(GLIB2_INCLUDE_DIR ${GLIB2_INCLUDE_DIR} "${GLIB2_INTERNAL_INCLUDE_DIR}")
47 | endif(GLIB2_INTERNAL_INCLUDE_DIR)
48 |
49 | include(FindPackageHandleStandardArgs)
50 | find_package_handle_standard_args(GLIB2 DEFAULT_MSG GLIB2_LIBRARIES GLIB2_MAIN_INCLUDE_DIR)
51 |
52 | mark_as_advanced(GLIB2_INCLUDE_DIR GLIB2_LIBRARIES)
53 |
--------------------------------------------------------------------------------
/phonon/experimental/audiodataoutputinterface.h:
--------------------------------------------------------------------------------
1 | /* This file is part of the KDE project
2 | Copyright (C) 2008 Matthias Kretz
3 |
4 | This library is free software; you can redistribute it and/or
5 | modify it under the terms of the GNU Lesser General Public
6 | License as published by the Free Software Foundation; either
7 | version 2.1 of the License, or (at your option) version 3, or any
8 | later version accepted by the membership of KDE e.V. (or its
9 | successor approved by the membership of KDE e.V.), Nokia Corporation
10 | (or its successors, if any) and the KDE Free Qt Foundation, which shall
11 | act as a proxy defined in Section 6 of version 3 of the license.
12 |
13 | This library is distributed in the hope that it will be useful,
14 | but WITHOUT ANY WARRANTY; without even the implied warranty of
15 | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
16 | Lesser General Public License for more details.
17 |
18 | You should have received a copy of the GNU Lesser General Public
19 | License along with this library. If not, see .
20 |
21 | */
22 |
23 | #ifndef PHONON_X_AUDIODATAOUTPUTINTERFACE_H
24 | #define PHONON_X_AUDIODATAOUTPUTINTERFACE_H
25 |
26 | namespace Phonon
27 | {
28 | namespace Experimental
29 | {
30 |
31 | class AbstractAudioDataOutput;
32 |
33 | class AudioDataOutputInterface
34 | {
35 | public:
36 | virtual ~AudioDataOutputInterface() {}
37 |
38 | virtual AbstractAudioDataOutput *frontendObject() const = 0;
39 | virtual void setFrontendObject(AbstractAudioDataOutput *) = 0;
40 | };
41 |
42 | } // namespace Experimental
43 | } // namespace Phonon
44 |
45 | Q_DECLARE_INTERFACE(Phonon::Experimental::AudioDataOutputInterface, "0AudioDataOutputInterface.phonon.kde.org")
46 |
47 | #endif // PHONON_X_AUDIODATAOUTPUTINTERFACE_H
48 |
--------------------------------------------------------------------------------
/phonon/experimental/videodataoutputinterface.h:
--------------------------------------------------------------------------------
1 | /* This file is part of the KDE project
2 | Copyright (C) 2008 Matthias Kretz
3 |
4 | This library is free software; you can redistribute it and/or
5 | modify it under the terms of the GNU Lesser General Public
6 | License as published by the Free Software Foundation; either
7 | version 2.1 of the License, or (at your option) version 3, or any
8 | later version accepted by the membership of KDE e.V. (or its
9 | successor approved by the membership of KDE e.V.), Nokia Corporation
10 | (or its successors, if any) and the KDE Free Qt Foundation, which shall
11 | act as a proxy defined in Section 6 of version 3 of the license.
12 |
13 | This library is distributed in the hope that it will be useful,
14 | but WITHOUT ANY WARRANTY; without even the implied warranty of
15 | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
16 | Lesser General Public License for more details.
17 |
18 | You should have received a copy of the GNU Lesser General Public
19 | License along with this library. If not, see .
20 |
21 | */
22 |
23 | #ifndef PHONON_X_VIDEODATAOUTPUTINTERFACE_H
24 | #define PHONON_X_VIDEODATAOUTPUTINTERFACE_H
25 |
26 | namespace Phonon
27 | {
28 | namespace Experimental
29 | {
30 |
31 | class AbstractVideoDataOutput;
32 |
33 | class VideoDataOutputInterface
34 | {
35 | public:
36 | virtual ~VideoDataOutputInterface() {}
37 |
38 | virtual AbstractVideoDataOutput *frontendObject() const = 0;
39 | virtual void setFrontendObject(AbstractVideoDataOutput *) = 0;
40 | };
41 |
42 | } // namespace Experimental
43 | } // namespace Phonon
44 |
45 | Q_DECLARE_INTERFACE(Phonon::Experimental::VideoDataOutputInterface, "0VideoDataOutputInterface.phonon.kde.org")
46 |
47 | #endif // PHONON_X_VIDEODATAOUTPUTINTERFACE_H
48 |
--------------------------------------------------------------------------------
/phonon/experimental/backendcapabilities.cpp:
--------------------------------------------------------------------------------
1 | /* This file is part of the KDE project
2 | Copyright (C) 2008 Matthias Kretz
3 |
4 | This program is free software; you can redistribute it and/or
5 | modify it under the terms of the GNU General Public License as
6 | published by the Free Software Foundation; either version 2 of
7 | the License or (at your option) version 3 or any later version
8 | accepted by the membership of KDE e.V. (or its successor approved
9 | by the membership of KDE e.V.), Nokia Corporation (or its successors,
10 | if any) and the KDE Free Qt Foundation, which shall act as a proxy
11 | defined in Section 14 of version 3 of the license.
12 |
13 | This program is distributed in the hope that it will be useful,
14 | but WITHOUT ANY WARRANTY; without even the implied warranty of
15 | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
16 | GNU General Public License for more details.
17 |
18 | You should have received a copy of the GNU General Public License
19 | along with this program. If not, see .
20 |
21 | */
22 | #include "backendcapabilities.h"
23 | #include "../backendcapabilities.h"
24 | #include "globalconfig.h"
25 |
26 | namespace Phonon
27 | {
28 | namespace Experimental
29 | {
30 |
31 | #ifndef PHONON_NO_VIDEOCAPTURE
32 | QList BackendCapabilities::availableVideoCaptureDevices()
33 | {
34 | QList phononList;
35 | QList experimentalList;
36 |
37 | phononList = Phonon::BackendCapabilities::availableVideoCaptureDevices();
38 | foreach (const Phonon::VideoCaptureDevice &vcd, phononList) {
39 | experimentalList << phononVcdToExperimentalVcd(vcd);
40 | }
41 |
42 | return experimentalList;
43 | }
44 | #endif
45 |
46 | } // namespace Experimental
47 | } // namespace Phonon
48 |
--------------------------------------------------------------------------------
/phonon/streaminterface_p.h:
--------------------------------------------------------------------------------
1 | /* This file is part of the KDE project
2 | Copyright (C) 2007 Matthias Kretz
3 |
4 | This library is free software; you can redistribute it and/or
5 | modify it under the terms of the GNU Lesser General Public
6 | License as published by the Free Software Foundation; either
7 | version 2.1 of the License, or (at your option) version 3, or any
8 | later version accepted by the membership of KDE e.V. (or its
9 | successor approved by the membership of KDE e.V.), Nokia Corporation
10 | (or its successors, if any) and the KDE Free Qt Foundation, which shall
11 | act as a proxy defined in Section 6 of version 3 of the license.
12 |
13 | This library is distributed in the hope that it will be useful,
14 | but WITHOUT ANY WARRANTY; without even the implied warranty of
15 | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
16 | Lesser General Public License for more details.
17 |
18 | You should have received a copy of the GNU Lesser General Public
19 | License along with this library. If not, see .
20 |
21 | */
22 |
23 | #ifndef STREAMINTERFACE_P_H
24 | #define STREAMINTERFACE_P_H
25 |
26 | #include "streaminterface.h"
27 | #include "mediasource.h"
28 |
29 | #ifndef QT_NO_PHONON_ABSTRACTMEDIASTREAM
30 |
31 | namespace Phonon
32 | {
33 | class StreamInterfacePrivate
34 | {
35 | friend class StreamInterface;
36 | public:
37 | void disconnectMediaStream();
38 |
39 | protected:
40 | inline StreamInterfacePrivate()
41 | : connected(false)
42 | {
43 | }
44 |
45 | StreamInterface *q;
46 | MediaSource mediaSource;
47 | bool connected;
48 | };
49 |
50 | } // namespace Phonon
51 |
52 | #endif // QT_NO_PHONON_ABSTRACTMEDIASTREAM
53 |
54 | #endif // STREAMINTERFACE_P_H
55 | // vim: sw=4 sts=4 et tw=100
56 |
--------------------------------------------------------------------------------
/settings/settings.cpp:
--------------------------------------------------------------------------------
1 | /*
2 | Copyright (C) 2014-2019 Harald Sitter
3 |
4 | This program is free software; you can redistribute it and/or
5 | modify it under the terms of the GNU Library General Public
6 | License as published by the Free Software Foundation; either
7 | version 2 of the License, or (at your option) version 3.
8 |
9 | This library is distributed in the hope that it will be useful,
10 | but WITHOUT ANY WARRANTY; without even the implied warranty of
11 | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
12 | Library General Public License for more details.
13 |
14 | You should have received a copy of the GNU Library General Public License
15 | along with this library; see the file COPYING.LIB. If not, write to
16 | the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
17 | Boston, MA 02110-1301, USA.
18 | */
19 |
20 | #include "settings.h"
21 | #include "ui_settings.h"
22 |
23 | #include
24 |
25 | Settings::Settings(QWidget *parent)
26 | : QDialog(parent)
27 | , ui(new Ui::Settings)
28 | {
29 | ui->setupUi(this);
30 | ui->devicePreference->load();
31 | ui->backendSelection->load();
32 |
33 | // Force first tab regardless of what the UI file wants.
34 | ui->tabs->setCurrentIndex(0);
35 |
36 | connect(ui->buttonBox, &QDialogButtonBox::accepted,
37 | this, [=] {
38 | save();
39 | qApp->quit();
40 | });
41 | connect(ui->buttonBox->button(QDialogButtonBox::Apply), &QPushButton::clicked,
42 | this, &Settings::save);
43 | connect(ui->buttonBox, &QDialogButtonBox::rejected,
44 | qApp, &QApplication::quit);
45 | }
46 |
47 | Settings::~Settings()
48 | {
49 | delete ui;
50 | }
51 |
52 | void Settings::save()
53 | {
54 | ui->devicePreference->save();
55 | ui->backendSelection->save();
56 | }
57 |
--------------------------------------------------------------------------------
/demos/metadatareader/main.cpp:
--------------------------------------------------------------------------------
1 | /* This file is part of the KDE project
2 | Copyright (C) 2011 Jakub Spiewak
3 |
4 | This library is free software; you can redistribute it and/or
5 | modify it under the terms of the GNU Lesser General Public
6 | License as published by the Free Software Foundation; either
7 | version 2.1 of the License, or (at your option) version 3, or any
8 | later version accepted by the membership of KDE e.V. (or its
9 | successor approved by the membership of KDE e.V.), Nokia Corporation
10 | (or its successors, if any) and the KDE Free Qt Foundation, which shall
11 | act as a proxy defined in Section 6 of version 3 of the license.
12 |
13 | This library is distributed in the hope that it will be useful,
14 | but WITHOUT ANY WARRANTY; without even the implied warranty of
15 | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
16 | Lesser General Public License for more details.
17 |
18 | You should have received a copy of the GNU Lesser General Public
19 | License along with this library. If not, see .
20 | */
21 |
22 | #include
23 | #include
24 | #include
25 |
26 | #include
27 |
28 | #include "metadatareader.h"
29 |
30 |
31 | int main(int argc, char **argv)
32 | {
33 | QCoreApplication app(argc, argv);
34 | app.setApplicationName("MetaDataReader");
35 |
36 | QTextStream consoleOut(stdout, QIODevice::WriteOnly);
37 |
38 | QStringList args = app.arguments();
39 | if (args.size() > 1)
40 | {
41 | MetaDataReader mdr(args[1], consoleOut);
42 | app.connect(&mdr, SIGNAL(quit()), SLOT(quit()));
43 |
44 | return app.exec();
45 | }
46 | else
47 | {
48 | consoleOut << "Usage: metadatareader " << Qt::endl;
49 | return 0;
50 | }
51 | }
52 |
--------------------------------------------------------------------------------
/phonon/experimental/audiodataoutput_p.h:
--------------------------------------------------------------------------------
1 | /* This file is part of the KDE project
2 | Copyright (C) 2006 Matthias Kretz
3 |
4 | This library is free software; you can redistribute it and/or
5 | modify it under the terms of the GNU Lesser General Public
6 | License as published by the Free Software Foundation; either
7 | version 2.1 of the License, or (at your option) version 3, or any
8 | later version accepted by the membership of KDE e.V. (or its
9 | successor approved by the membership of KDE e.V.), Nokia Corporation
10 | (or its successors, if any) and the KDE Free Qt Foundation, which shall
11 | act as a proxy defined in Section 6 of version 3 of the license.
12 |
13 | This library is distributed in the hope that it will be useful,
14 | but WITHOUT ANY WARRANTY; without even the implied warranty of
15 | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
16 | Lesser General Public License for more details.
17 |
18 | You should have received a copy of the GNU Lesser General Public
19 | License along with this library. If not, see .
20 |
21 | */
22 |
23 | #ifndef AUDIODATAOUTPUT_P_H
24 | #define AUDIODATAOUTPUT_P_H
25 |
26 | #include "audiodataoutput.h"
27 | #include "../abstractaudiooutput_p.h"
28 |
29 | namespace Phonon
30 | {
31 | namespace Experimental
32 | {
33 |
34 | class AudioDataOutputPrivate : public AbstractAudioOutputPrivate
35 | {
36 | P_DECLARE_PUBLIC(AudioDataOutput)
37 | PHONON_PRIVATECLASS
38 | protected:
39 | AudioDataOutputPrivate()
40 | : format(AudioDataOutput::IntegerFormat)
41 | , dataSize(512)
42 | {
43 | }
44 |
45 | AudioDataOutput::Format format;
46 | int dataSize;
47 | };
48 |
49 | } // namespace Experimental
50 | } // namespace Phonon
51 |
52 | #endif // AUDIODATAOUTPUT_P_H
53 | // vim: sw=4 ts=4 tw=80
54 |
--------------------------------------------------------------------------------
/phonon/experimental/packetpool_p.h:
--------------------------------------------------------------------------------
1 | /* This file is part of the KDE project
2 | Copyright (C) 2008 Matthias Kretz
3 |
4 | This program is free software; you can redistribute it and/or
5 | modify it under the terms of the GNU Library General Public
6 | License as published by the Free Software Foundation; either
7 | version 2 of the License, or (at your option) version 3.
8 |
9 | This library is distributed in the hope that it will be useful,
10 | but WITHOUT ANY WARRANTY; without even the implied warranty of
11 | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
12 | Library General Public License for more details.
13 |
14 | You should have received a copy of the GNU Library General Public License
15 | along with this library; see the file COPYING.LIB. If not, write to
16 | the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
17 | Boston, MA 02110-1301, USA.
18 |
19 | */
20 |
21 |
22 | #ifndef PHONON_PACKETPOOL_P_H
23 | #define PHONON_PACKETPOOL_P_H
24 |
25 | #include
26 |
27 | namespace Phonon
28 | {
29 |
30 | class PacketPrivate;
31 | class PacketPoolPrivate
32 | {
33 | friend class PacketPool;
34 | friend class Packet;
35 | public:
36 | ~PacketPoolPrivate();
37 |
38 | Packet acquirePacket();
39 | void releasePacket(const Packet &);
40 |
41 | protected:
42 | QAtomicInt ref;
43 |
44 | private:
45 | PacketPoolPrivate(int packetSize, int _poolSize);
46 |
47 | // C-array of PacketPrivate*
48 | PacketPrivate **freePackets;
49 | char *const packetMemory;
50 |
51 | QAtomicInt readPosition;
52 | QAtomicInt writePosition;
53 | QAtomicInt ringBufferSize;
54 |
55 | const int packetSize;
56 | const int poolSize;
57 | };
58 |
59 | } // namespace Phonon
60 |
61 | #endif // PHONON_PACKETPOOL_P_H
62 |
--------------------------------------------------------------------------------
/phonon/experimental/avcapture_p.h:
--------------------------------------------------------------------------------
1 | /* This file is part of the KDE project
2 | Copyright (C) 2006 Matthias Kretz
3 |
4 | This library is free software; you can redistribute it and/or
5 | modify it under the terms of the GNU Lesser General Public
6 | License as published by the Free Software Foundation; either
7 | version 2.1 of the License, or (at your option) version 3, or any
8 | later version accepted by the membership of KDE e.V. (or its
9 | successor approved by the membership of KDE e.V.), Nokia Corporation
10 | (or its successors, if any) and the KDE Free Qt Foundation, which shall
11 | act as a proxy defined in Section 6 of version 3 of the license.
12 |
13 | This library is distributed in the hope that it will be useful,
14 | but WITHOUT ANY WARRANTY; without even the implied warranty of
15 | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
16 | Lesser General Public License for more details.
17 |
18 | You should have received a copy of the GNU Lesser General Public
19 | License along with this library. If not, see .
20 |
21 | */
22 |
23 | #ifndef AVCAPTURE_P_H
24 | #define AVCAPTURE_P_H
25 |
26 | #ifndef NO_PHONON_AVCAPTURE
27 |
28 | #include "avcapture.h"
29 | #include "../phonondefs_p.h"
30 |
31 | namespace Phonon
32 | {
33 | namespace Experimental
34 | {
35 |
36 | class AvCapturePrivate : public MediaNodePrivate
37 | {
38 | P_DECLARE_PUBLIC(AvCapture)
39 | PHONON_PRIVATECLASS
40 | public:
41 | protected:
42 | PHONON_EXPORT void _k_stateChanged(Phonon::State, Phonon::State);
43 | protected:
44 | Phonon::AudioCaptureDevice audioCaptureDevice;
45 | Phonon::VideoCaptureDevice videoCaptureDevice;
46 | };
47 |
48 | } // namespace Experimental
49 | } // namespace Phonon
50 |
51 | #endif // NO_PHONON_AVCAPTURE
52 |
53 | #endif // AVCAPTURE_P_H
54 | // vim: sw=4 ts=4 tw=80
55 |
--------------------------------------------------------------------------------
/phonon/iodevicestream_p.h:
--------------------------------------------------------------------------------
1 | /* This file is part of the KDE project
2 | Copyright (C) 2007 Matthias Kretz
3 |
4 | This library is free software; you can redistribute it and/or
5 | modify it under the terms of the GNU Lesser General Public
6 | License as published by the Free Software Foundation; either
7 | version 2.1 of the License, or (at your option) version 3, or any
8 | later version accepted by the membership of KDE e.V. (or its
9 | successor approved by the membership of KDE e.V.), Nokia Corporation
10 | (or its successors, if any) and the KDE Free Qt Foundation, which shall
11 | act as a proxy defined in Section 6 of version 3 of the license.
12 |
13 | This library is distributed in the hope that it will be useful,
14 | but WITHOUT ANY WARRANTY; without even the implied warranty of
15 | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
16 | Lesser General Public License for more details.
17 |
18 | You should have received a copy of the GNU Lesser General Public
19 | License along with this library. If not, see .
20 |
21 | */
22 |
23 | #ifndef PHONON_IODEVICESTREAM_P_H
24 | #define PHONON_IODEVICESTREAM_P_H
25 |
26 | #include "abstractmediastream.h"
27 |
28 |
29 | #ifndef QT_NO_PHONON_ABSTRACTMEDIASTREAM
30 |
31 | class QIODevice;
32 |
33 | namespace Phonon
34 | {
35 |
36 | class IODeviceStreamPrivate;
37 | class IODeviceStream : public AbstractMediaStream
38 | {
39 | Q_OBJECT
40 | Q_DECLARE_PRIVATE(IODeviceStream)
41 | public:
42 | explicit IODeviceStream(QIODevice *ioDevice, QObject *parent = nullptr);
43 | ~IODeviceStream() override;
44 |
45 | void reset() override;
46 | void needData() override;
47 | void seekStream(qint64) override;
48 | };
49 | } // namespace Phonon
50 |
51 | #endif //QT_NO_PHONON_ABSTRACTMEDIASTREAM
52 |
53 |
54 | #endif // PHONON_IODEVICESTREAM_P_H
55 |
--------------------------------------------------------------------------------
/phonon/experimental/videodataoutput_p.h:
--------------------------------------------------------------------------------
1 | /* This file is part of the KDE project
2 | Copyright (C) 2006 Matthias Kretz
3 |
4 | This library is free software; you can redistribute it and/or
5 | modify it under the terms of the GNU Lesser General Public
6 | License as published by the Free Software Foundation; either
7 | version 2.1 of the License, or (at your option) version 3, or any
8 | later version accepted by the membership of KDE e.V. (or its
9 | successor approved by the membership of KDE e.V.), Nokia Corporation
10 | (or its successors, if any) and the KDE Free Qt Foundation, which shall
11 | act as a proxy defined in Section 6 of version 3 of the license.
12 |
13 | This library is distributed in the hope that it will be useful,
14 | but WITHOUT ANY WARRANTY; without even the implied warranty of
15 | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
16 | Lesser General Public License for more details.
17 |
18 | You should have received a copy of the GNU Lesser General Public
19 | License along with this library. If not, see .
20 |
21 | */
22 |
23 | #ifndef PHONON_VIDEODATAOUTPUT_P_H
24 | #define PHONON_VIDEODATAOUTPUT_P_H
25 |
26 | #include "videodataoutput.h"
27 | #include "../abstractvideooutput_p.h"
28 | #include "videoframe.h"
29 | #include
30 |
31 | namespace Phonon
32 | {
33 | namespace Experimental
34 | {
35 | class VideoDataOutputPrivate : public AbstractVideoOutputPrivate
36 | {
37 | P_DECLARE_PUBLIC(VideoDataOutput)
38 | PHONON_PRIVATECLASS
39 | public:
40 | QObject *qObject() override { return q_func(); }
41 | protected:
42 | VideoDataOutputPrivate()
43 | : latency(0)
44 | {
45 | }
46 |
47 | int latency;
48 | };
49 |
50 | } // namespace Experimental
51 | } // namespace Phonon
52 |
53 | #endif // PHONON_VIDEODATAOUTPUT_P_H
54 | // vim: sw=4 ts=4 tw=80
55 |
--------------------------------------------------------------------------------
/phonon/effect_p.h:
--------------------------------------------------------------------------------
1 | /* This file is part of the KDE project
2 | Copyright (C) 2006-2007 Matthias Kretz
3 |
4 | This library is free software; you can redistribute it and/or
5 | modify it under the terms of the GNU Lesser General Public
6 | License as published by the Free Software Foundation; either
7 | version 2.1 of the License, or (at your option) version 3, or any
8 | later version accepted by the membership of KDE e.V. (or its
9 | successor approved by the membership of KDE e.V.), Nokia Corporation
10 | (or its successors, if any) and the KDE Free Qt Foundation, which shall
11 | act as a proxy defined in Section 6 of version 3 of the license.
12 |
13 | This library is distributed in the hope that it will be useful,
14 | but WITHOUT ANY WARRANTY; without even the implied warranty of
15 | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
16 | Lesser General Public License for more details.
17 |
18 | You should have received a copy of the GNU Lesser General Public
19 | License along with this library. If not, see .
20 |
21 | */
22 |
23 | #ifndef EFFECT_P_H
24 | #define EFFECT_P_H
25 |
26 | #include "effect.h"
27 | #include "effectparameter.h"
28 | #include "medianode_p.h"
29 | #include
30 | #include
31 | #include "phonondefs_p.h"
32 |
33 | #ifndef QT_NO_PHONON_EFFECT
34 |
35 | namespace Phonon
36 | {
37 | class EffectPrivate : public MediaNodePrivate
38 | {
39 | P_DECLARE_PUBLIC(Effect)
40 | PHONON_PRIVATECLASS
41 | public:
42 | QObject *qObject() override { return q_func(); }
43 | protected:
44 | EffectPrivate()
45 | {
46 | }
47 |
48 | //X Effect::Type type;
49 | EffectDescription description;
50 | QHash parameterValues;
51 | };
52 | } //namespace Phonon
53 |
54 | #endif //QT_NO_PHONON_EFFECT
55 |
56 | #endif // EFFECT_P_H
57 | // vim: sw=4 ts=4 tw=80
58 |
--------------------------------------------------------------------------------
/phonon/experimental/abstractaudiodataoutput_p.h:
--------------------------------------------------------------------------------
1 | /* This file is part of the KDE project
2 | Copyright (C) 2008 Matthias Kretz
3 |
4 | This library is free software; you can redistribute it and/or
5 | modify it under the terms of the GNU Lesser General Public
6 | License as published by the Free Software Foundation; either
7 | version 2.1 of the License, or (at your option) version 3, or any
8 | later version accepted by the membership of KDE e.V. (or its
9 | successor approved by the membership of KDE e.V.), Nokia Corporation
10 | (or its successors, if any) and the KDE Free Qt Foundation, which shall
11 | act as a proxy defined in Section 6 of version 3 of the license.
12 |
13 | This library is distributed in the hope that it will be useful,
14 | but WITHOUT ANY WARRANTY; without even the implied warranty of
15 | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
16 | Lesser General Public License for more details.
17 |
18 | You should have received a copy of the GNU Lesser General Public
19 | License along with this library. If not, see .
20 |
21 | */
22 |
23 | #ifndef PHONON_X_ABSTRACTAUDIODATAOUTPUT_P_H
24 | #define PHONON_X_ABSTRACTAUDIODATAOUTPUT_P_H
25 |
26 | #include "abstractaudiodataoutput.h"
27 | #include "../medianode_p.h"
28 | #include "phonondefs_p.h"
29 |
30 | namespace Phonon
31 | {
32 | namespace Experimental
33 | {
34 |
35 | class AbstractAudioDataOutputPrivate : public Phonon::MediaNodePrivate
36 | {
37 | P_DECLARE_PUBLIC(AbstractAudioDataOutput)
38 | protected:
39 | bool aboutToDeleteBackendObject() override { return true; }
40 | void createBackendObject() override;
41 | void setupBackendObject();
42 |
43 | private:
44 | bool isRunning;
45 | QSet allowedFormats;
46 | };
47 |
48 | } // namespace Experimental
49 | } // namespace Phonon
50 |
51 | #endif // PHONON_X_ABSTRACTAUDIODATAOUTPUT_P_H
52 |
--------------------------------------------------------------------------------
/phonon/experimental/abstractvideodataoutput_p.h:
--------------------------------------------------------------------------------
1 | /* This file is part of the KDE project
2 | Copyright (C) 2008 Matthias Kretz
3 |
4 | This library is free software; you can redistribute it and/or
5 | modify it under the terms of the GNU Lesser General Public
6 | License as published by the Free Software Foundation; either
7 | version 2.1 of the License, or (at your option) version 3, or any
8 | later version accepted by the membership of KDE e.V. (or its
9 | successor approved by the membership of KDE e.V.), Nokia Corporation
10 | (or its successors, if any) and the KDE Free Qt Foundation, which shall
11 | act as a proxy defined in Section 6 of version 3 of the license.
12 |
13 | This library is distributed in the hope that it will be useful,
14 | but WITHOUT ANY WARRANTY; without even the implied warranty of
15 | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
16 | Lesser General Public License for more details.
17 |
18 | You should have received a copy of the GNU Lesser General Public
19 | License along with this library. If not, see .
20 |
21 | */
22 | #ifndef PHONON_X_ABSTRACTVIDEODATAOUTPUT_P_H
23 | #define PHONON_X_ABSTRACTVIDEODATAOUTPUT_P_H
24 |
25 | #include "abstractvideodataoutput.h"
26 | #include "../abstractvideooutput_p.h"
27 | #include
28 |
29 | namespace Phonon
30 | {
31 | namespace Experimental
32 | {
33 |
34 | class AbstractVideoDataOutputPrivate : public Phonon::AbstractVideoOutputPrivate
35 | {
36 | P_DECLARE_PUBLIC(AbstractVideoDataOutput)
37 | protected:
38 | bool aboutToDeleteBackendObject() override;
39 | void createBackendObject() override;
40 | void setupBackendObject();
41 |
42 | private:
43 | bool isRunning;
44 | QSet allowedFormats;
45 | };
46 |
47 | } // namespace Experimental
48 | } // namespace Phonon
49 |
50 | #endif // PHONON_X_ABSTRACTVIDEODATAOUTPUT_P_H
51 |
--------------------------------------------------------------------------------
/demos/phota/mediacontroller.cpp:
--------------------------------------------------------------------------------
1 | /*
2 | Copyright (C) 2010 Jean-Baptiste Kempf
3 |
4 | This library is free software; you can redistribute it and/or
5 | modify it under the terms of the GNU Lesser General Public
6 | License as published by the Free Software Foundation; either
7 | version 2.1 of the License, or (at your option) version 3, or any
8 | later version accepted by the membership of KDE e.V. (or its
9 | successor approved by the membership of KDE e.V.), Nokia Corporation
10 | (or its successors, if any) and the KDE Free Qt Foundation, which shall
11 | act as a proxy defined in Section 6 of version 3 of the license.
12 |
13 | This library is distributed in the hope that it will be useful,
14 | but WITHOUT ANY WARRANTY; without even the implied warranty of
15 | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
16 | Lesser General Public License for more details.
17 |
18 | You should have received a copy of the GNU Lesser General Public
19 | License along with this library. If not, see .
20 | */
21 |
22 | #include "mediacontroller.h"
23 |
24 | #include
25 | #include
26 |
27 | #include
28 |
29 | MediaController::MediaController(QObject *parent) :
30 | QObject(parent)
31 | {
32 | m_media = new Phonon::MediaObject(this);
33 | }
34 |
35 | Phonon::MediaObject *MediaController::mediaObject() const
36 | {
37 | return m_media;
38 | }
39 |
40 | void MediaController::openFile()
41 | {
42 | QUrl file = QUrl::fromLocalFile(QFileDialog::getOpenFileName(0, tr("Open a new file to play"), ""));
43 | if (!file.isEmpty()) {
44 | Phonon::MediaSource s(file);
45 | playSource(s);
46 | }
47 | }
48 |
49 | void MediaController::openURL()
50 | {
51 |
52 | }
53 |
54 | void MediaController::playSource(const Phonon::MediaSource &s)
55 | {
56 | m_media->setCurrentSource(s);
57 | m_media->play();
58 | }
59 |
--------------------------------------------------------------------------------
/phonon/experimental/visualization_p.h:
--------------------------------------------------------------------------------
1 | /* This file is part of the KDE project
2 | Copyright (C) 2006 Matthias Kretz
3 |
4 | This library is free software; you can redistribute it and/or
5 | modify it under the terms of the GNU Lesser General Public
6 | License as published by the Free Software Foundation; either
7 | version 2.1 of the License, or (at your option) version 3, or any
8 | later version accepted by the membership of KDE e.V. (or its
9 | successor approved by the membership of KDE e.V.), Nokia Corporation
10 | (or its successors, if any) and the KDE Free Qt Foundation, which shall
11 | act as a proxy defined in Section 6 of version 3 of the license.
12 |
13 | This library is distributed in the hope that it will be useful,
14 | but WITHOUT ANY WARRANTY; without even the implied warranty of
15 | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
16 | Lesser General Public License for more details.
17 |
18 | You should have received a copy of the GNU Lesser General Public
19 | License along with this library. If not, see .
20 |
21 | */
22 |
23 | #ifndef PHONON_VISUALIZATION_P_H
24 | #define PHONON_VISUALIZATION_P_H
25 |
26 | #include "visualization.h"
27 | #include "../medianode_p.h"
28 | #include "../medianodedestructionhandler_p.h"
29 | #include "../phonondefs_p.h"
30 |
31 | namespace Phonon
32 | {
33 | namespace Experimental
34 | {
35 | class VisualizationPrivate : public MediaNodePrivate, private MediaNodeDestructionHandler
36 | {
37 | P_DECLARE_PUBLIC(Visualization)
38 | PHONON_PRIVATECLASS
39 | public:
40 | QObject *qObject() override { return q_func(); }
41 | protected:
42 | VisualizationDescription description;
43 |
44 | private:
45 | void phononObjectDestroyed(MediaNodePrivate *) override;
46 | };
47 | } // namespace Experimental
48 | } // namespace Phonon
49 |
50 | #endif // PHONON_VISUALIZATION_P_H
51 | // vim: sw=4 ts=4 tw=80
52 |
--------------------------------------------------------------------------------
/phonon/phonon_export.h:
--------------------------------------------------------------------------------
1 | /*
2 | Copyright (C) 2007 Matthias Kretz
3 | Copyright (C) 2011 Harald Sitter
4 |
5 | This library is free software; you can redistribute it and/or
6 | modify it under the terms of the GNU Lesser General Public
7 | License as published by the Free Software Foundation; either
8 | version 2.1 of the License, or (at your option) version 3, or any
9 | later version accepted by the membership of KDE e.V. (or its
10 | successor approved by the membership of KDE e.V.), Nokia Corporation
11 | (or its successors, if any) and the KDE Free Qt Foundation, which shall
12 | act as a proxy defined in Section 6 of version 3 of the license.
13 |
14 | This library is distributed in the hope that it will be useful,
15 | but WITHOUT ANY WARRANTY; without even the implied warranty of
16 | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
17 | Lesser General Public License for more details.
18 |
19 | You should have received a copy of the GNU Lesser General Public
20 | License along with this library. If not, see .
21 | */
22 |
23 | #ifndef PHONON_EXPORT_H
24 | #define PHONON_EXPORT_H
25 |
26 | #include
27 |
28 | #ifndef PHONON_EXPORT
29 | # if defined Q_WS_WIN
30 | # ifdef MAKE_PHONON_LIB /* We are building this library */
31 | # define PHONON_EXPORT Q_DECL_EXPORT
32 | # else /* We are using this library */
33 | # define PHONON_EXPORT Q_DECL_IMPORT
34 | # endif
35 | # else /* UNIX */
36 | # ifdef MAKE_PHONON_LIB /* We are building this library */
37 | # define PHONON_EXPORT Q_DECL_EXPORT
38 | # else /* We are using this library */
39 | # define PHONON_EXPORT Q_DECL_IMPORT
40 | # endif
41 | # endif
42 | #endif
43 |
44 | #ifndef PHONON_DEPRECATED
45 | # define PHONON_DEPRECATED Q_DECL_DEPRECATED
46 | #endif
47 |
48 | #ifndef PHONON_EXPORT_DEPRECATED
49 | # define PHONON_EXPORT_DEPRECATED Q_DECL_DEPRECATED PHONON_EXPORT
50 | #endif
51 |
52 | #endif
53 |
--------------------------------------------------------------------------------
/phonon/medianodedestructionhandler_p.h:
--------------------------------------------------------------------------------
1 | /* This file is part of the KDE project
2 | Copyright (C) 2006 Matthias Kretz
3 |
4 | This library is free software; you can redistribute it and/or
5 | modify it under the terms of the GNU Lesser General Public
6 | License as published by the Free Software Foundation; either
7 | version 2.1 of the License, or (at your option) version 3, or any
8 | later version accepted by the membership of KDE e.V. (or its
9 | successor approved by the membership of KDE e.V.), Nokia Corporation
10 | (or its successors, if any) and the KDE Free Qt Foundation, which shall
11 | act as a proxy defined in Section 6 of version 3 of the license.
12 |
13 | This library is distributed in the hope that it will be useful,
14 | but WITHOUT ANY WARRANTY; without even the implied warranty of
15 | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
16 | Lesser General Public License for more details.
17 |
18 | You should have received a copy of the GNU Lesser General Public
19 | License along with this library. If not, see .
20 |
21 | */
22 |
23 | #ifndef MEDIANODEDESTRUCTIONHANDLER_P_H
24 | #define MEDIANODEDESTRUCTIONHANDLER_P_H
25 |
26 | #include
27 |
28 |
29 | namespace Phonon
30 | {
31 | /**
32 | * \internal
33 | *
34 | * Callback interface to keep track of Phonon frontend object destruction.
35 | *
36 | * \author Matthias Kretz
37 | */
38 |
39 | class MediaNodePrivate;
40 |
41 | class MediaNodeDestructionHandler
42 | {
43 | friend class MediaNodePrivate;
44 |
45 | public:
46 | virtual ~MediaNodeDestructionHandler() {}
47 | protected:
48 | /**
49 | * \internal
50 | * called from Base::~Base if this object was registered
51 | * using BasePrivate::addDestructionHandler().
52 | */
53 | virtual void phononObjectDestroyed(MediaNodePrivate *) = 0;
54 | };
55 | }
56 |
57 |
58 | #endif // MEDIANODEDESTRUCTIONHANDLER_P_H
59 |
--------------------------------------------------------------------------------
/doc/DESIGN/use-cases/mediaplayer-audio.cpp:
--------------------------------------------------------------------------------
1 | class MediaPlayer : public QMainWindow
2 | {
3 | Q_OBJECT
4 | public:
5 | MediaPlayer();
6 |
7 | private slots:
8 | void play(const QModelIndex &modelIndex);
9 | void visEffectChanged(int index);
10 |
11 | private:
12 | QColumnView m_fileView;
13 | QDirModel m_model;
14 |
15 | Phonon::MediaObject *m_media;
16 | Phonon::Visualization *m_vis;
17 | QComboBox *m_visComboBox;
18 | };
19 |
20 | MediaPlayer::MediaPlayer()
21 | : m_vis(0), m_visComboBox(0)
22 | {
23 | //setCentralWidget(&m_fileView);
24 | m_fileView.setModel(&m_model);
25 | m_fileView.setFrameStyle(QFrame::NoFrame);
26 |
27 | m_media = new MediaObject(this);
28 | AudioOutput *output = new AudioOutput(Phonon::Music, this);
29 | Phonon::createPath(m_media, output);
30 |
31 | QList list = BackendCapabilities::availableVisualizationEffects();
32 | if (!list.isEmpty()) {
33 | VideoWidget *visWidget = new VideoWidget(this);
34 | m_vis = new Visualization(this);
35 | Phonon::createPath(m_media, m_vis);
36 | Phonon::createPath(m_vis, visWidget);
37 | m_vis->setVisualization(list.first());
38 |
39 | m_visComboBox = new QComboBox(this);
40 | m_visComboBox->setModel(new VisualizationDescriptionModel(list, m_visComboBox));
41 | connect(m_visComboBox, SIGNAL(activated(int)), SLOT(visEffectChanged(int)));
42 | }
43 |
44 | connect(&m_fileView, SIGNAL(updatePreviewWidget(const QModelIndex &)), SLOT(play(const QModelIndex &)));
45 | }
46 |
47 | void MediaPlayer::play(const QModelIndex &modelIndex)
48 | {
49 | m_media->setCurrentSource(url);
50 | m_media->play();
51 | }
52 |
53 | void MediaPlayer::visEffectChanged(int index)
54 | {
55 | QList list = BackendCapabilities::availableVisualizationEffects();
56 | Q_ASSERT(index < list.size() && index >= 0);
57 | m_vis->setVisualization(list.at(index));
58 | }
59 |
60 |
61 |
--------------------------------------------------------------------------------
/phonon/volumefadereffect_p.h:
--------------------------------------------------------------------------------
1 | /* This file is part of the KDE project
2 | Copyright (C) 2006 Matthias Kretz
3 |
4 | This library is free software; you can redistribute it and/or
5 | modify it under the terms of the GNU Lesser General Public
6 | License as published by the Free Software Foundation; either
7 | version 2.1 of the License, or (at your option) version 3, or any
8 | later version accepted by the membership of KDE e.V. (or its
9 | successor approved by the membership of KDE e.V.), Nokia Corporation
10 | (or its successors, if any) and the KDE Free Qt Foundation, which shall
11 | act as a proxy defined in Section 6 of version 3 of the license.
12 |
13 | This library is distributed in the hope that it will be useful,
14 | but WITHOUT ANY WARRANTY; without even the implied warranty of
15 | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
16 | Lesser General Public License for more details.
17 |
18 | You should have received a copy of the GNU Lesser General Public
19 | License along with this library. If not, see .
20 |
21 | */
22 |
23 | #ifndef PHONON_VOLUMEFADEREFFECT_P_H
24 | #define PHONON_VOLUMEFADEREFFECT_P_H
25 |
26 | #include "effect_p.h"
27 | #include "volumefadereffect.h"
28 |
29 | #ifndef QT_NO_PHONON_VOLUMEFADEREFFECT
30 |
31 | namespace Phonon
32 | {
33 | class VolumeFaderEffectPrivate : public EffectPrivate
34 | {
35 | P_DECLARE_PUBLIC(VolumeFaderEffect)
36 | PHONON_PRIVATECLASS
37 | protected:
38 | VolumeFaderEffectPrivate()
39 | : currentVolume(1.0)
40 | , fadeCurve(VolumeFaderEffect::Fade3Decibel)
41 | {
42 | // invalid EffectDescription
43 | // ############# parameter functions are incorrect
44 | }
45 |
46 | float currentVolume;
47 | VolumeFaderEffect::FadeCurve fadeCurve;
48 | };
49 | }
50 |
51 | #endif //QT_NO_PHONON_VOLUMEFADEREFFECT
52 |
53 | #endif // PHONON_VOLUMEFADEREFFECT_P_H
54 | // vim: sw=4 ts=4 tw=80
55 |
--------------------------------------------------------------------------------
/phonon/abstractaudiooutput.h:
--------------------------------------------------------------------------------
1 | /* This file is part of the KDE project
2 | Copyright (C) 2005-2006 Matthias Kretz
3 |
4 | This library is free software; you can redistribute it and/or
5 | modify it under the terms of the GNU Lesser General Public
6 | License as published by the Free Software Foundation; either
7 | version 2.1 of the License, or (at your option) version 3, or any
8 | later version accepted by the membership of KDE e.V. (or its
9 | successor approved by the membership of KDE e.V.), Nokia Corporation
10 | (or its successors, if any) and the KDE Free Qt Foundation, which shall
11 | act as a proxy defined in Section 6 of version 3 of the license.
12 |
13 | This library is distributed in the hope that it will be useful,
14 | but WITHOUT ANY WARRANTY; without even the implied warranty of
15 | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
16 | Lesser General Public License for more details.
17 |
18 | You should have received a copy of the GNU Lesser General Public
19 | License along with this library. If not, see .
20 |
21 | */
22 | #ifndef Phonon_ABSTRACTAUDIOOUTPUTBASE_H
23 | #define Phonon_ABSTRACTAUDIOOUTPUTBASE_H
24 |
25 | #include "phonondefs.h"
26 | #include "phonon_export.h"
27 | #include "medianode.h"
28 | #include
29 |
30 |
31 | namespace Phonon
32 | {
33 | class AbstractAudioOutputPrivate;
34 |
35 | /** \class AbstractAudioOutput abstractaudiooutput.h phonon/AbstractAudioOutput
36 | * Common base class for all audio outputs.
37 | *
38 | * \see AudioOutput
39 | */
40 | class PHONON_EXPORT AbstractAudioOutput : public QObject, public MediaNode
41 | {
42 | Q_OBJECT
43 | P_DECLARE_PRIVATE(AbstractAudioOutput)
44 | protected:
45 | AbstractAudioOutput(AbstractAudioOutputPrivate &dd, QObject *parent);
46 | public:
47 | ~AbstractAudioOutput() override;
48 | };
49 | } //namespace Phonon
50 |
51 |
52 | // vim: sw=4 ts=4 tw=80
53 | #endif // Phonon_ABSTRACTAUDIOOUTPUTBASE_H
54 |
--------------------------------------------------------------------------------
/settings/settings.ui:
--------------------------------------------------------------------------------
1 |
2 |
3 | Settings
4 |
5 |
6 |
7 | 0
8 | 0
9 | 618
10 | 549
11 |
12 |
13 |
14 | Dialog
15 |
16 |
17 | -
18 |
19 |
20 | Multimedia Settings
21 |
22 |
23 |
24 | ..
25 |
26 |
27 | 0
28 |
29 |
30 |
31 | De&vice Priority
32 |
33 |
34 |
35 |
36 | Backend
37 |
38 |
39 |
40 |
41 | -
42 |
43 |
44 | QDialogButtonBox::Apply|QDialogButtonBox::Cancel|QDialogButtonBox::Ok
45 |
46 |
47 |
48 |
49 |
50 |
51 |
52 | Phonon::DevicePreference
53 | QWidget
54 |
55 | 1
56 |
57 |
58 | BackendSelection
59 | QWidget
60 |
61 | 1
62 |
63 |
64 |
65 |
66 |
67 |
--------------------------------------------------------------------------------
/demos/phota/videoeffects.cpp:
--------------------------------------------------------------------------------
1 | /*
2 | Copyright (C) 2010 Jean-Baptiste Kempf
3 |
4 | This library is free software; you can redistribute it and/or
5 | modify it under the terms of the GNU Lesser General Public
6 | License as published by the Free Software Foundation; either
7 | version 2.1 of the License, or (at your option) version 3, or any
8 | later version accepted by the membership of KDE e.V. (or its
9 | successor approved by the membership of KDE e.V.), Nokia Corporation
10 | (or its successors, if any) and the KDE Free Qt Foundation, which shall
11 | act as a proxy defined in Section 6 of version 3 of the license.
12 |
13 | This library is distributed in the hope that it will be useful,
14 | but WITHOUT ANY WARRANTY; without even the implied warranty of
15 | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
16 | Lesser General Public License for more details.
17 |
18 | You should have received a copy of the GNU Lesser General Public
19 | License along with this library. If not, see .
20 | */
21 |
22 | #include "videoeffects.h"
23 | #include "ui_videoeffects.h"
24 | #include
25 |
26 | //#include
27 | #include
28 |
29 | VideoEffects::VideoEffects(Phonon::VideoWidget *_w, QWidget *parent) :
30 | QDialog(parent),
31 | ui(new Ui::VideoEffects),
32 | videoWidget(_w)
33 | {
34 | ui->setupUi(this);
35 | assert(_w);
36 | }
37 |
38 | VideoEffects::~VideoEffects()
39 | {
40 | delete ui;
41 | }
42 |
43 | void VideoEffects::on_brightnessSlider_valueChanged(int value)
44 | {
45 | videoWidget->setBrightness(qreal(value)/100);
46 | }
47 |
48 | void VideoEffects::on_contrastSlider_valueChanged(int value)
49 | {
50 | videoWidget->setContrast(qreal(value)/100);
51 | }
52 |
53 | void VideoEffects::on_hueSlider_valueChanged(int value)
54 | {
55 | videoWidget->setHue(qreal(value)/100);
56 | }
57 |
58 | void VideoEffects::on_saturationSlider_valueChanged(int value)
59 | {
60 | videoWidget->setSaturation(qreal(value)/100);
61 | }
62 |
--------------------------------------------------------------------------------
/designer/videowidgetplugin.h:
--------------------------------------------------------------------------------
1 | /*
2 | Copyright (C) 2011 Harald Sitter
3 |
4 | This library is free software; you can redistribute it and/or
5 | modify it under the terms of the GNU Lesser General Public
6 | License as published by the Free Software Foundation; either
7 | version 2.1 of the License, or (at your option) version 3, or any
8 | later version accepted by the membership of KDE e.V. (or its
9 | successor approved by the membership of KDE e.V.), Nokia Corporation
10 | (or its successors, if any) and the KDE Free Qt Foundation, which shall
11 | act as a proxy defined in Section 6 of version 3 of the license.
12 |
13 | This library is distributed in the hope that it will be useful,
14 | but WITHOUT ANY WARRANTY; without even the implied warranty of
15 | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
16 | Lesser General Public License for more details.
17 |
18 | You should have received a copy of the GNU Lesser General Public
19 | License along with this library. If not, see .
20 | */
21 |
22 | #ifndef VIDEOWIDGET_PLUGIN_H
23 | #define VIDEOWIDGET_PLUGIN_H
24 |
25 | #include
26 |
27 | class VideoWidgetPlugin: public QObject, public QDesignerCustomWidgetInterface
28 | {
29 | Q_OBJECT
30 | Q_INTERFACES(QDesignerCustomWidgetInterface)
31 | public:
32 | explicit VideoWidgetPlugin(const QString &group, QObject *parent = nullptr);
33 |
34 | QString name() const override;
35 | QString group() const override;
36 | QString toolTip() const override;
37 | QString whatsThis() const override;
38 | QString includeFile() const override;
39 | QIcon icon() const override;
40 | bool isContainer() const override;
41 | QWidget *createWidget(QWidget *parent) override;
42 | bool isInitialized() const override;
43 | void initialize(QDesignerFormEditorInterface *core) override;
44 | QString domXml() const override;
45 |
46 | private:
47 | const QString m_group;
48 | bool m_initialized;
49 | };
50 |
51 | #endif // VIDEOWIDGET_PLUGIN_H
52 |
--------------------------------------------------------------------------------
/phonon/volumefaderinterface.h:
--------------------------------------------------------------------------------
1 | /* This file is part of the KDE project
2 | Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies).
3 |
4 | This library is free software; you can redistribute it and/or
5 | modify it under the terms of the GNU Lesser General Public
6 | License as published by the Free Software Foundation; either
7 | version 2.1 of the License, or (at your option) version 3, or any
8 | later version accepted by the membership of KDE e.V. (or its
9 | successor approved by the membership of KDE e.V.), Nokia Corporation
10 | (or its successors, if any) and the KDE Free Qt Foundation, which shall
11 | act as a proxy defined in Section 6 of version 3 of the license.
12 |
13 | This library is distributed in the hope that it will be useful,
14 | but WITHOUT ANY WARRANTY; without even the implied warranty of
15 | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
16 | Lesser General Public License for more details.
17 |
18 | You should have received a copy of the GNU Lesser General Public
19 | License along with this library. If not, see .
20 |
21 | */
22 |
23 | #ifndef PHONON_VOLUMEFADERINTERFACE_H
24 | #define PHONON_VOLUMEFADERINTERFACE_H
25 |
26 | #include "volumefadereffect.h"
27 | #include
28 |
29 |
30 | #ifndef QT_NO_PHONON_VOLUMEFADEREFFECT
31 |
32 | namespace Phonon
33 | {
34 | class VolumeFaderInterface
35 | {
36 | public:
37 | virtual ~VolumeFaderInterface() {}
38 |
39 | virtual float volume() const { return 1.0; }
40 | virtual void setVolume(float) {}
41 | virtual Phonon::VolumeFaderEffect::FadeCurve fadeCurve() const {
42 | return VolumeFaderEffect::Fade3Decibel;
43 | }
44 | virtual void setFadeCurve(Phonon::VolumeFaderEffect::FadeCurve) {}
45 | virtual void fadeTo(float, int) {}
46 | };
47 | }
48 |
49 | Q_DECLARE_INTERFACE(Phonon::VolumeFaderInterface, "VolumeFaderInterface4.phonon.kde.org")
50 |
51 | #endif //QT_NO_PHONON_VOLUMEFADEREFFECT
52 |
53 |
54 | #endif // PHONON_VOLUMEFADERINTERFACE_H
55 |
--------------------------------------------------------------------------------
/phonon/backendcapabilities_p.h:
--------------------------------------------------------------------------------
1 | /* This file is part of the KDE project
2 | Copyright (C) 2007 Matthias Kretz
3 |
4 | This library is free software; you can redistribute it and/or
5 | modify it under the terms of the GNU Lesser General Public
6 | License as published by the Free Software Foundation; either
7 | version 2.1 of the License, or (at your option) version 3, or any
8 | later version accepted by the membership of KDE e.V. (or its
9 | successor approved by the membership of KDE e.V.), Nokia Corporation
10 | (or its successors, if any) and the KDE Free Qt Foundation, which shall
11 | act as a proxy defined in Section 6 of version 3 of the license.
12 |
13 | This library is distributed in the hope that it will be useful,
14 | but WITHOUT ANY WARRANTY; without even the implied warranty of
15 | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
16 | Lesser General Public License for more details.
17 |
18 | You should have received a copy of the GNU Lesser General Public
19 | License along with this library. If not, see .
20 |
21 | */
22 |
23 | #ifndef PHONON_BACKENDCAPABILITIES_P_H
24 | #define PHONON_BACKENDCAPABILITIES_P_H
25 |
26 | #include "backendcapabilities.h"
27 | #include
28 | #include "factory_p.h"
29 |
30 | namespace Phonon
31 | {
32 | class BackendCapabilitiesPrivate : public BackendCapabilities::Notifier
33 | {
34 | public:
35 | BackendCapabilitiesPrivate()
36 | {
37 | connect(Factory::sender(), SIGNAL(backendChanged()), SIGNAL(capabilitiesChanged()));
38 | connect(Factory::sender(), SIGNAL(availableAudioOutputDevicesChanged()), SIGNAL(availableAudioOutputDevicesChanged()));
39 | connect(Factory::sender(), SIGNAL(availableAudioCaptureDevicesChanged()), SIGNAL(availableAudioCaptureDevicesChanged()));
40 | connect(Factory::sender(), SIGNAL(availableVideoCaptureDevicesChanged()), SIGNAL(availableVideoCaptureDevicesChanged()));
41 | }
42 | };
43 |
44 | } // namespace Phonon
45 |
46 | #endif // PHONON_BACKENDCAPABILITIES_P_H
47 | // vim: sw=4 sts=4 et tw=100
48 |
--------------------------------------------------------------------------------
/phonon/experimental/CMakeLists.txt:
--------------------------------------------------------------------------------
1 | ########### libphononexperimental ###############
2 | set(phononexperimental_LIB_SRCS
3 | abstractaudiodataoutput.cpp
4 | abstractvideodataoutput.cpp
5 | audiodataoutput.cpp
6 | audioformat.cpp
7 | avcapture.cpp
8 | backendcapabilities.cpp
9 | factory.cpp
10 | globalconfig.cpp
11 | mediasource.cpp
12 | objectdescription.cpp
13 | packet.cpp
14 | packetpool.cpp
15 | videodataoutput.cpp
16 | videodataoutput2.cpp
17 | videowidget.cpp
18 | visualization.cpp
19 | ../abstractaudiooutput_p.cpp
20 | ../abstractvideooutput_p.cpp
21 | )
22 |
23 | add_library(${PHONON_LIB_SONAME}experimental SHARED ${phononexperimental_LIB_SRCS})
24 | target_link_libraries(${PHONON_LIB_SONAME}experimental
25 | PUBLIC
26 | Qt${QT_MAJOR_VERSION}::Core
27 | Qt${QT_MAJOR_VERSION}::Widgets
28 | ${PHONON_LIB_SONAME}
29 | )
30 | set_target_properties(${PHONON_LIB_SONAME}experimental
31 | PROPERTIES
32 | VERSION ${PHONON_VERSION}
33 | SOVERSION ${PHONON_SOVERSION}
34 | DEFINE_SYMBOL MAKE_PHONONEXPERIMENTAL_LIB
35 | )
36 | install(TARGETS ${PHONON_LIB_SONAME}experimental EXPORT PhononExperimentalLibs${QT_MAJOR_VERSION} ${KDE_INSTALL_TARGETS_DEFAULT_ARGS})
37 | target_include_directories(${PHONON_LIB_SONAME}experimental
38 | INTERFACE "$")
39 |
40 | ########### install headers ###############
41 | install(FILES
42 | abstractaudiodataoutput.h
43 | abstractvideodataoutput.h
44 | audiodataoutput.h
45 | audiodataoutputinterface.h
46 | audioformat.h
47 | avcapture.h
48 | avcaptureinterface.h
49 | backendcapabilities.h
50 | backendinterface.h
51 | export.h
52 | mediasource.h
53 | objectdescription.h
54 | snapshotinterface.h
55 | packet.h
56 | packetpool.h
57 | phononnamespace.h
58 | videodataoutput.h
59 | videodataoutput2.h
60 | videodataoutputinterface.h
61 | videoframe.h
62 | videoframe2.h
63 | videowidget.h
64 | visualization.h
65 | globalconfig.h
66 | DESTINATION ${INCLUDE_INSTALL_DIR}/phonon/experimental COMPONENT Devel)
67 |
--------------------------------------------------------------------------------
/phonon/experimental/avcaptureinterface.h:
--------------------------------------------------------------------------------
1 | /* This file is part of the KDE project
2 | Copyright (C) 2008 Matthias Kretz
3 |
4 | This library is free software; you can redistribute it and/or
5 | modify it under the terms of the GNU Lesser General Public
6 | License as published by the Free Software Foundation; either
7 | version 2.1 of the License, or (at your option) version 3, or any
8 | later version accepted by the membership of KDE e.V. (or its
9 | successor approved by the membership of KDE e.V.), Nokia Corporation
10 | (or its successors, if any) and the KDE Free Qt Foundation, which shall
11 | act as a proxy defined in Section 6 of version 3 of the license.
12 |
13 | This library is distributed in the hope that it will be useful,
14 | but WITHOUT ANY WARRANTY; without even the implied warranty of
15 | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
16 | Lesser General Public License for more details.
17 |
18 | You should have received a copy of the GNU Lesser General Public
19 | License along with this library. If not, see .
20 |
21 | */
22 |
23 | #ifndef PHONON_EXPERIMENTAL_AVCAPTUREINTERFACE_H
24 | #define PHONON_EXPERIMENTAL_AVCAPTUREINTERFACE_H
25 |
26 | namespace Phonon
27 | {
28 | namespace Experimental
29 | {
30 |
31 | class AvCaptureInterface
32 | {
33 | public:
34 | virtual ~AvCaptureInterface() {}
35 |
36 | virtual Phonon::State state() const = 0;
37 | virtual void start() = 0;
38 | virtual void pause() = 0;
39 | virtual void stop() = 0;
40 |
41 | virtual Phonon::AudioCaptureDevice audioCaptureDevice() const = 0;
42 | virtual Phonon::VideoCaptureDevice videoCaptureDevice() const = 0;
43 | virtual void setAudioCaptureDevice(const Phonon::AudioCaptureDevice &) = 0;
44 | virtual void setVideoCaptureDevice(const Phonon::VideoCaptureDevice &) = 0;
45 | };
46 |
47 | } // namespace Experimental
48 | } // namespace Phonon
49 |
50 | Q_DECLARE_INTERFACE(Phonon::Experimental::AvCaptureInterface, "0AvCaptureInterface.Phonon.kde.org")
51 |
52 | #endif // PHONON_EXPERIMENTAL_AVCAPTUREINTERFACE_H
53 |
--------------------------------------------------------------------------------
/phonon/platform_p.h:
--------------------------------------------------------------------------------
1 | /* This file is part of the KDE project
2 | Copyright (C) 2007 Matthias Kretz
3 |
4 | This library is free software; you can redistribute it and/or
5 | modify it under the terms of the GNU Lesser General Public
6 | License as published by the Free Software Foundation; either
7 | version 2.1 of the License, or (at your option) version 3, or any
8 | later version accepted by the membership of KDE e.V. (or its
9 | successor approved by the membership of KDE e.V.), Nokia Corporation
10 | (or its successors, if any) and the KDE Free Qt Foundation, which shall
11 | act as a proxy defined in Section 6 of version 3 of the license.
12 |
13 | This library is distributed in the hope that it will be useful,
14 | but WITHOUT ANY WARRANTY; without even the implied warranty of
15 | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
16 | Lesser General Public License for more details.
17 |
18 | You should have received a copy of the GNU Lesser General Public
19 | License along with this library. If not, see .
20 |
21 | */
22 |
23 | #ifndef PHONON_PLATFORM_P_H
24 | #define PHONON_PLATFORM_P_H
25 |
26 |
27 | #include
28 | #include
29 | #include
30 | #include "phonon_export.h"
31 | #include "objectdescription.h"
32 |
33 | class QIcon;
34 | class QObject;
35 | class QUrl;
36 | class QStyle;
37 |
38 | namespace Phonon
39 | {
40 | class AbstractMediaStream;
41 |
42 | namespace Platform
43 | {
44 |
45 | void saveVolume(const QString &outputName, qreal volume);
46 | qreal loadVolume(const QString &outputName);
47 | AbstractMediaStream *createMediaStream(const QUrl &url, QObject *parent);
48 | QIcon icon(const QString &name, QStyle *style = nullptr);
49 | void notification(const char *notificationName, const QString &text,
50 | const QStringList &actions = QStringList(), QObject *receiver = nullptr,
51 | const char *actionSlot = nullptr);
52 | QString applicationName();
53 | QList > deviceAccessListFor(const Phonon::AudioOutputDevice &deviceDesc);
54 |
55 | } // namespace Platform
56 | } // namespace Phonon
57 |
58 | #endif // PHONON_PLATFORM_P_H
59 |
--------------------------------------------------------------------------------
/phonon/effectwidget_p.h:
--------------------------------------------------------------------------------
1 | /* This file is part of the KDE project
2 | Copyright (C) 2006-2007 Matthias Kretz
3 |
4 | This library is free software; you can redistribute it and/or
5 | modify it under the terms of the GNU Lesser General Public
6 | License as published by the Free Software Foundation; either
7 | version 2.1 of the License, or (at your option) version 3, or any
8 | later version accepted by the membership of KDE e.V. (or its
9 | successor approved by the membership of KDE e.V.), Nokia Corporation
10 | (or its successors, if any) and the KDE Free Qt Foundation, which shall
11 | act as a proxy defined in Section 6 of version 3 of the license.
12 |
13 | This library is distributed in the hope that it will be useful,
14 | but WITHOUT ANY WARRANTY; without even the implied warranty of
15 | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
16 | Lesser General Public License for more details.
17 |
18 | You should have received a copy of the GNU Lesser General Public
19 | License along with this library. If not, see .
20 |
21 | */
22 |
23 | #ifndef PHONON_UI_EFFECTWIDGET_P_H
24 | #define PHONON_UI_EFFECTWIDGET_P_H
25 |
26 | #include
27 |
28 | #include "effectparameter.h"
29 | #include "effectwidget.h"
30 | #include "phonondefs_p.h"
31 |
32 | #ifndef QT_NO_PHONON_EFFECTWIDGET
33 |
34 | namespace Phonon
35 | {
36 | class EffectWidgetPrivate
37 | {
38 | P_DECLARE_PUBLIC(EffectWidget)
39 | protected:
40 | EffectWidgetPrivate(Effect *effect);
41 |
42 | EffectWidget *q_ptr;
43 |
44 | private:
45 | Effect *effect;
46 | QHash parameterForObject;
47 |
48 | void _k_setToggleParameter(bool checked);
49 | void _k_setIntParameter(int value);
50 | void _k_setDoubleParameter(double value);
51 | void _k_setStringParameter(const QString &);
52 | void _k_setSliderParameter(int);
53 |
54 | void autogenerateUi();
55 | };
56 | } // namespace Phonon
57 |
58 | #endif //QT_NO_PHONON_EFFECTWIDGET
59 |
60 | #endif // PHONON_UI_EFFECTWIDGET_P_H
61 |
62 | // vim: sw=4 ts=4 tw=80
63 |
--------------------------------------------------------------------------------
/demos/phota/mainwindow.cpp:
--------------------------------------------------------------------------------
1 | /*
2 | Copyright (C) 2010 Jean-Baptiste Kempf
3 |
4 | This library is free software; you can redistribute it and/or
5 | modify it under the terms of the GNU Lesser General Public
6 | License as published by the Free Software Foundation; either
7 | version 2.1 of the License, or (at your option) version 3, or any
8 | later version accepted by the membership of KDE e.V. (or its
9 | successor approved by the membership of KDE e.V.), Nokia Corporation
10 | (or its successors, if any) and the KDE Free Qt Foundation, which shall
11 | act as a proxy defined in Section 6 of version 3 of the license.
12 |
13 | This library is distributed in the hope that it will be useful,
14 | but WITHOUT ANY WARRANTY; without even the implied warranty of
15 | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
16 | Lesser General Public License for more details.
17 |
18 | You should have received a copy of the GNU Lesser General Public
19 | License along with this library. If not, see .
20 | */
21 |
22 | #include "mainwindow.h"
23 | #include "mediacontroller.h"
24 | #include "videoeffects.h"
25 |
26 | #include
27 | #include
28 | #include
29 |
30 | #include
31 | #include
32 | #include
33 |
34 | MainWindow::MainWindow(QWidget *parent) :
35 | QMainWindow(parent)
36 | {
37 | m_videoWidget = new Phonon::VideoWidget();
38 | setCentralWidget(m_videoWidget);
39 | m_mediaControl = new MediaController(this);
40 | Phonon::createPath(m_mediaControl->mediaObject(), m_videoWidget);
41 | resize(600, 400);
42 | }
43 |
44 | void MainWindow::contextMenuEvent(QContextMenuEvent *e)
45 | {
46 | QMenu menu(tr("Control Menu"), this);
47 | menu.addAction(tr("Open a file"), m_mediaControl, SLOT(openFile()));
48 | menu.addAction(tr("Open a URL"), m_mediaControl, SLOT(openURL()));
49 | menu.addSeparator();
50 | menu.addAction(tr("Video Effects"), this, SLOT(effectsDialog()));
51 | menu.exec(e->globalPos());
52 | }
53 |
54 | void MainWindow::effectsDialog()
55 | {
56 | VideoEffects *effect = new VideoEffects(m_videoWidget, this);
57 | effect->show();
58 | }
59 |
--------------------------------------------------------------------------------
/demos/simpleplayer/player.h:
--------------------------------------------------------------------------------
1 | /* This file is part of the KDE project
2 | Copyright (C) 2010 Trever Fischer
3 |
4 | This library is free software; you can redistribute it and/or
5 | modify it under the terms of the GNU Lesser General Public
6 | License as published by the Free Software Foundation; either
7 | version 2.1 of the License, or (at your option) version 3, or any
8 | later version accepted by the membership of KDE e.V. (or its
9 | successor approved by the membership of KDE e.V.), Nokia Corporation
10 | (or its successors, if any) and the KDE Free Qt Foundation, which shall
11 | act as a proxy defined in Section 6 of version 3 of the license.
12 |
13 | This library is distributed in the hope that it will be useful,
14 | but WITHOUT ANY WARRANTY; without even the implied warranty of
15 | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
16 | Lesser General Public License for more details.
17 |
18 | You should have received a copy of the GNU Lesser General Public
19 | License along with this library. If not, see .
20 | */
21 | #ifndef PLAYER_H
22 | #define PLAYER_H
23 |
24 | #include
25 | #include
26 |
27 | class QPushButton;
28 | namespace Phonon {
29 | class MediaObject;
30 | class Mrl;
31 | }
32 |
33 | /**
34 | * @brief A simple media player widget
35 | */
36 | class Player : public QWidget {
37 |
38 | Q_OBJECT
39 |
40 | public:
41 | Player(QWidget *parent = 0, Qt::WindowFlags flag = Qt::Widget);
42 |
43 | public slots:
44 |
45 | /**
46 | * @brief Load a specific URL
47 | */
48 | void load(const Phonon::Mrl &url);
49 |
50 | /**
51 | * @brief Prompt the user for a file to load
52 | */
53 | void load();
54 |
55 | private slots:
56 |
57 | /**
58 | * @brief Updates the GUI when the underlying MediaObject changes states
59 | */
60 | void mediaStateChanged(Phonon::State newState, Phonon::State oldState);
61 |
62 | /**
63 | * @brief Plays or pauses the media, depending on current state
64 | */
65 | void playPause();
66 |
67 | private:
68 | Phonon::MediaObject *m_media;
69 | QPushButton *m_playPause;
70 | QPushButton *m_stop;
71 |
72 | };
73 |
74 | #endif //PLAYER_H
75 |
--------------------------------------------------------------------------------
/phonon/experimental/audiowriter.h:
--------------------------------------------------------------------------------
1 | /* This file is part of the KDE project
2 | Copyright (C) 2006 Matthias Kretz
3 |
4 | This library is free software; you can redistribute it and/or
5 | modify it under the terms of the GNU Lesser General Public
6 | License as published by the Free Software Foundation; either
7 | version 2.1 of the License, or (at your option) version 3, or any
8 | later version accepted by the membership of KDE e.V. (or its
9 | successor approved by the membership of KDE e.V.), Nokia Corporation
10 | (or its successors, if any) and the KDE Free Qt Foundation, which shall
11 | act as a proxy defined in Section 6 of version 3 of the license.
12 |
13 | This library is distributed in the hope that it will be useful,
14 | but WITHOUT ANY WARRANTY; without even the implied warranty of
15 | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
16 | Lesser General Public License for more details.
17 |
18 | You should have received a copy of the GNU Lesser General Public
19 | License along with this library. If not, see .
20 |
21 | */
22 |
23 | #ifndef PHONON_AUDIOWRITER_H
24 | #define PHONON_AUDIOWRITER_H
25 |
26 | #include "export.h"
27 | #include "../abstractaudiooutput.h"
28 | #include "../phonondefs.h"
29 |
30 | namespace Phonon
31 | {
32 | namespace Experimental
33 | {
34 |
35 | class AudioWriterPrivate;
36 | class PHONONEXPERIMENTAL_EXPORT AudioWriter : public AbstractAudioOutput
37 | {
38 | Q_OBJECT
39 | K_DECLARE_PRIVATE(AudioWriter)
40 | PHONON_HEIR(AudioWriter)
41 | /**
42 | * This property defines the codec to be used for encoding the audio signal.
43 | * Possible codecs can be retrieved from BackendCapabilities using the
44 | * availableAudioCodecs() function.
45 | *
46 | * The default codec is an invalid codec (audioCodec().isValid() == false)
47 | */
48 | Q_PROPERTY(AudioCodec audioCodec READ audioCodec WRITE setAudioCodec)
49 | public:
50 | AudioCodec audioCodec() const;
51 |
52 | public Q_SLOTS:
53 | setAudioCodec(AudioCodec audioCodec);
54 | // codec parameters? reuse EffectParameter class?
55 | };
56 |
57 | } // namespace Experimental
58 | } // namespace Phonon
59 |
60 | #endif // PHONON_AUDIOWRITER_H
61 | // vim: sw=4 ts=4 tw=80
62 |
--------------------------------------------------------------------------------
/phonon/phononnamespace_p.h:
--------------------------------------------------------------------------------
1 | /* This file is part of the KDE project
2 | Copyright (C) 2005-2006 Matthias Kretz
3 |
4 | This library is free software; you can redistribute it and/or
5 | modify it under the terms of the GNU Lesser General Public
6 | License as published by the Free Software Foundation; either
7 | version 2.1 of the License, or (at your option) version 3, or any
8 | later version accepted by the membership of KDE e.V. (or its
9 | successor approved by the membership of KDE e.V.), Nokia Corporation
10 | (or its successors, if any) and the KDE Free Qt Foundation, which shall
11 | act as a proxy defined in Section 6 of version 3 of the license.
12 |
13 | This library is distributed in the hope that it will be useful,
14 | but WITHOUT ANY WARRANTY; without even the implied warranty of
15 | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
16 | Lesser General Public License for more details.
17 |
18 | You should have received a copy of the GNU Lesser General Public
19 | License along with this library. If not, see .
20 | */
21 |
22 | #ifndef PHONONNAMESPACE_P_H
23 | #define PHONONNAMESPACE_P_H
24 |
25 | #include "phononnamespace.h"
26 |
27 | #include
28 |
29 | #if defined(QT_NO_DEBUG)
30 | #define pDebug if (true) {} else qDebug
31 | #else
32 | #define pDebug if (qgetenv("PHONON_DEBUG").isEmpty()) {} else qDebug
33 | #endif
34 | #define pWarning() qDebug() << "WARNING:"
35 | #define pError() qDebug() << "ERROR:"
36 | #define pFatal(message) qDebug() << "FATAL ERROR:" << message; ::abort()
37 |
38 | namespace Phonon
39 | {
40 | /**
41 | * \internal
42 | * Converts an old Category used for capture to the dedicated CaptureCategory
43 | * Only for internal compat purposes!
44 | */
45 | inline CaptureCategory categoryToCaptureCategory(Category c)
46 | {
47 | switch (c) {
48 | case NoCategory:
49 | return NoCaptureCategory;
50 | case CommunicationCategory:
51 | return CommunicationCaptureCategory;
52 | case AccessibilityCategory:
53 | return ControlCaptureCategory;
54 | default:
55 | return NoCaptureCategory;
56 | }
57 | }
58 | } // namespace Phonon
59 |
60 | // vim: sw=4 ts=4 tw=80
61 | #endif // PHONONNAMESPACE_P_H
62 |
--------------------------------------------------------------------------------
/phonon/experimental/objectdescription.h:
--------------------------------------------------------------------------------
1 | /* This file is part of the KDE project
2 | Copyright © 2008 Matthias Kretz
3 | Copyright © 2010 Harald Sitter
4 |
5 | This library is free software; you can redistribute it and/or
6 | modify it under the terms of the GNU Lesser General Public
7 | License as published by the Free Software Foundation; either
8 | version 2.1 of the License, or (at your option) version 3, or any
9 | later version accepted by the membership of KDE e.V. (or its
10 | successor approved by the membership of KDE e.V.), Nokia Corporation
11 | (or its successors, if any) and the KDE Free Qt Foundation, which shall
12 | act as a proxy defined in Section 6 of version 3 of the license.
13 |
14 | This library is distributed in the hope that it will be useful,
15 | but WITHOUT ANY WARRANTY; without even the implied warranty of
16 | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
17 | Lesser General Public License for more details.
18 |
19 | You should have received a copy of the GNU Lesser General Public
20 | License along with this library. If not, see .
21 |
22 | */
23 | #ifndef PHONON_EXPERIMENTAL_OBJECTDESCRIPTION_H
24 | #define PHONON_EXPERIMENTAL_OBJECTDESCRIPTION_H
25 |
26 | #include "../objectdescription.h"
27 |
28 | namespace Phonon
29 | {
30 | namespace Experimental
31 | {
32 |
33 | #ifndef PHONON_NO_VIDEOCAPTURE
34 |
35 | enum ObjectDescriptionType
36 | {
37 | VideoCaptureDeviceType = 0x10000
38 | };
39 |
40 | typedef Phonon::ObjectDescription(Phonon::Experimental::VideoCaptureDeviceType)> VideoCaptureDevice;
41 |
42 | VideoCaptureDevice phononVcdToExperimentalVcd(const Phonon::VideoCaptureDevice &vcd);
43 |
44 | /**
45 | * Generates a Phonon::VideoCaptureDevice from an equal object of
46 | * the Phonon::Experimental namespace.
47 | *
48 | * @arg vcd the VideoCaptureDevice to take as reference
49 | * @return a Phonon::VideoCaptureDevice instance with the same properties as the incoming vcd
50 | */
51 | Phonon::VideoCaptureDevice phononExperimentalVcdToVcd(const Phonon::Experimental::VideoCaptureDevice &vcd);
52 |
53 | #endif // PHONON_NO_VIDEOCAPTURE
54 |
55 | } // namespace Experimental
56 | } // namespace Phonon
57 |
58 | #endif // PHONON_EXPERIMENTAL_OBJECTDESCRIPTION_H
59 |
--------------------------------------------------------------------------------
/phonon/medianode.h:
--------------------------------------------------------------------------------
1 | /* This file is part of the KDE project
2 | Copyright (C) 2007 Matthias Kretz
3 | Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies).
4 |
5 | This library is free software; you can redistribute it and/or
6 | modify it under the terms of the GNU Lesser General Public
7 | License as published by the Free Software Foundation; either
8 | version 2.1 of the License, or (at your option) version 3, or any
9 | later version accepted by the membership of KDE e.V. (or its
10 | successor approved by the membership of KDE e.V.), Nokia Corporation
11 | (or its successors, if any) and the KDE Free Qt Foundation, which shall
12 | act as a proxy defined in Section 6 of version 3 of the license.
13 |
14 | This library is distributed in the hope that it will be useful,
15 | but WITHOUT ANY WARRANTY; without even the implied warranty of
16 | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
17 | Lesser General Public License for more details.
18 |
19 | You should have received a copy of the GNU Lesser General Public
20 | License along with this library. If not, see .
21 |
22 | */
23 |
24 | #ifndef PHONON_MEDIANODE_H
25 | #define PHONON_MEDIANODE_H
26 |
27 | #include "phonondefs.h"
28 | #include "phonon_export.h"
29 | #include "path.h"
30 |
31 |
32 | namespace Phonon
33 | {
34 |
35 | class Path;
36 | class MediaNodePrivate;
37 | class PHONON_EXPORT MediaNode
38 | {
39 | friend class Path;
40 | friend class PathPrivate;
41 | friend PHONON_EXPORT Path createPath(MediaNode *source, MediaNode *sink);
42 | P_DECLARE_PRIVATE(MediaNode)
43 | public:
44 | virtual ~MediaNode();
45 | /**
46 | * Tells whether the backend provides an implementation of this
47 | * class.
48 | *
49 | * \return \c true if backend provides an implementation
50 | * \return \c false if the object is not implemented by the backend
51 | */
52 | bool isValid() const;
53 |
54 | QList inputPaths() const;
55 | QList outputPaths() const;
56 |
57 | protected:
58 | MediaNode(MediaNodePrivate &dd);
59 | MediaNodePrivate *const k_ptr;
60 | };
61 |
62 | } // namespace Phonon
63 |
64 |
65 | #endif // PHONON_MEDIANODE_H
66 |
--------------------------------------------------------------------------------
/doc/DESIGN/use-cases/mediaplayer-video.cpp:
--------------------------------------------------------------------------------
1 | #include
2 |
3 | class MediaPlayer : public QMainWindow
4 | {
5 | Q_OBJECT
6 | public:
7 | MediaPlayer();
8 |
9 | private slots:
10 | void play(const QModelIndex &modelIndex);
11 | void visEffectChanged(int index);
12 |
13 | private:
14 | QColumnView m_fileView;
15 | QDirModel m_model;
16 |
17 | Phonon::MediaObject *m_media;
18 | Phonon::Visualization *m_vis;
19 | Phonon::SubtitleStreamDescriptionModel m_subtitleModel;
20 | QComboBox *m_visComboBox;
21 | };
22 |
23 | MediaPlayer::MediaPlayer()
24 | : m_vis(0), m_visComboBox(0)
25 | {
26 | //setCentralWidget(&m_fileView);
27 | m_fileView.setModel(&m_model);
28 | m_fileView.setFrameStyle(QFrame::NoFrame);
29 |
30 | m_media = new MediaObject(this);
31 |
32 | AudioPath *apath = new AudioPath(this);
33 | AudioOutput *aoutput = new AudioOutput(Phonon::Music, this);
34 | m_media->addAudioPath(apath);
35 | apath->addOutput(aoutput);
36 |
37 | VideoPath *vpath = new VideoPath(this);
38 | VideoWidget *vwidget = new VideoWidget(this);
39 | m_media->addVideoPath(vpath);
40 | vpath->addOutput(vwidget);
41 |
42 | // the following signal does not exist yet, but should, IMHO:
43 | connect(m_media, SIGNAL(availableSubtitleStreamsChanged()), SLOT(updateSubtitleSelector()));
44 |
45 | m_subtitleSelector = new QListView(this);
46 | m_subtitleSelector->setModel(&m_subtitleModel);
47 | connect(m_subtitleSelector, SIGNAL(activated(const QModelIndex &)), SLOT(changeSubtitle(const QModelIndex &)));
48 |
49 | connect(&m_fileView, SIGNAL(updatePreviewWidget(const QModelIndex &)), SLOT(play(const QModelIndex &)));
50 | }
51 |
52 | void MediaPlayer::play(const QModelIndex &modelIndex)
53 | {
54 | m_media->setCurrentSource(url);
55 | m_media->play();
56 | }
57 |
58 | void MediaPlayer::updateSubtitleSelector()
59 | {
60 | QList list = m_media->availableSubtitleStreams();
61 | m_subtitleModel.setModelData(list);
62 | }
63 |
64 | void MediaPlayer::changeSubtitle(const QModelIndex &modelIndex)
65 | {
66 | const int index = modelIndex.row();
67 | QList list = m_media->availableSubtitleStreams();
68 | Q_ASSERT(index < list.size() && index >= 0);
69 | m_media->setCurrentSubtitleStream(list.at(index));
70 | }
71 |
--------------------------------------------------------------------------------
/phonon/experimental/globalconfig.h:
--------------------------------------------------------------------------------
1 | /* This file is part of the KDE project
2 | Copyright (C) 2006-2008 Matthias Kretz
3 |
4 | This library is free software; you can redistribute it and/or
5 | modify it under the terms of the GNU Lesser General Public
6 | License as published by the Free Software Foundation; either
7 | version 2.1 of the License, or (at your option) version 3, or any
8 | later version accepted by the membership of KDE e.V. (or its
9 | successor approved by the membership of KDE e.V.), Nokia Corporation
10 | (or its successors, if any) and the KDE Free Qt Foundation, which shall
11 | act as a proxy defined in Section 6 of version 3 of the license.
12 |
13 | This library is distributed in the hope that it will be useful,
14 | but WITHOUT ANY WARRANTY; without even the implied warranty of
15 | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
16 | Lesser General Public License for more details.
17 |
18 | You should have received a copy of the GNU Lesser General Public
19 | License along with this library. If not, see .
20 |
21 | */
22 |
23 | #ifndef PHONON_EXPERIMENTAL_GLOBALCONFIG_P_H
24 | #define PHONON_EXPERIMENTAL_GLOBALCONFIG_P_H
25 |
26 | #include
27 | #include
28 |
29 | #include "export.h"
30 | #include "../globalconfig.h"
31 |
32 |
33 | namespace Phonon
34 | {
35 | namespace Experimental
36 | {
37 |
38 | class PHONONEXPERIMENTAL_EXPORT GlobalConfig : public Phonon::GlobalConfig
39 | {
40 | P_DECLARE_PRIVATE(Phonon::GlobalConfig)
41 |
42 | #ifndef PHONON_NO_VIDEOCAPTURE
43 | public:
44 | PHONON_DEPRECATED QList videoCaptureDeviceListFor(Phonon::Category category, int override = AdvancedDevicesFromSettings) const;
45 | PHONON_DEPRECATED int videoCaptureDeviceFor(Phonon::Category category, int override = AdvancedDevicesFromSettings) const;
46 | QList videoCaptureDeviceListFor(Phonon::CaptureCategory category, int override = AdvancedDevicesFromSettings) const;
47 | int videoCaptureDeviceFor(Phonon::CaptureCategory category, int override = AdvancedDevicesFromSettings) const;
48 |
49 | Q_SIGNALS:
50 | void videoCaptureDeviceConfigChanged();
51 | #endif // PHONON_NO_VIDEOCAPTURE
52 |
53 | }; // GlobalConfig class
54 |
55 | } // namespace Experimental
56 | } // namespace Phonon
57 |
58 |
59 | #endif // PHONON_EXPERIMENTAL_GLOBALCONFIG_P_H
60 |
--------------------------------------------------------------------------------
/phonon/mrl.cpp:
--------------------------------------------------------------------------------
1 | /* This file is part of the KDE project
2 | Copyright (C) 2011 Harald Sitter
3 |
4 | This library is free software; you can redistribute it and/or
5 | modify it under the terms of the GNU Lesser General Public
6 | License as published by the Free Software Foundation; either
7 | version 2.1 of the License, or (at your option) version 3, or any
8 | later version accepted by the membership of KDE e.V. (or its
9 | successor approved by the membership of KDE e.V.), Nokia Corporation
10 | (or its successors, if any) and the KDE Free Qt Foundation, which shall
11 | act as a proxy defined in Section 6 of version 3 of the license.
12 |
13 | This library is distributed in the hope that it will be useful,
14 | but WITHOUT ANY WARRANTY; without even the implied warranty of
15 | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
16 | Lesser General Public License for more details.
17 |
18 | You should have received a copy of the GNU Lesser General Public
19 | License along with this library. If not, see .
20 | */
21 |
22 | #include "mrl.h"
23 |
24 | #include
25 |
26 | namespace Phonon
27 | {
28 |
29 | Mrl::Mrl()
30 | : QUrl()
31 | {
32 | }
33 |
34 | Mrl::Mrl(const Mrl ©)
35 | : QUrl(copy)
36 | {
37 | }
38 |
39 | Mrl::Mrl(const QUrl &url)
40 | : QUrl(url)
41 | {
42 | }
43 |
44 | Mrl::Mrl(const QString &url)
45 | : QUrl(url)
46 | {
47 | }
48 |
49 | Mrl &Mrl::operator =(const Mrl ©)
50 | {
51 | QUrl::operator =(copy);
52 | return *this;
53 | }
54 |
55 | #ifndef QT_NO_URL_CAST_FROM_STRING
56 | Mrl &Mrl::operator =(const QString &url)
57 | {
58 | QUrl::operator =(url);
59 | return *this;
60 | }
61 | #endif // QT_NO_URL_CAST_FROM_STRING
62 |
63 | QByteArray Mrl::toEncoded(FormattingOptions options) const
64 | {
65 | QByteArray encodedMrl;
66 |
67 | static QByteArray encodingExclude(":/\\?=&,@");
68 | if (scheme() == QLatin1String("")) {
69 | encodedMrl = QFile::encodeName("file://" + toLocalFile()).toPercentEncoding(encodingExclude);
70 | } else if (scheme() == QLatin1String("file")) {
71 | encodedMrl = QFile::encodeName("file://" + toLocalFile()).toPercentEncoding(encodingExclude);
72 | } else {
73 | encodedMrl = QUrl::toEncoded(options);
74 | }
75 |
76 | return encodedMrl;
77 | }
78 |
79 | } // namespace Phonon
80 |
--------------------------------------------------------------------------------
/phonon/experimental/objectdescription.cpp:
--------------------------------------------------------------------------------
1 | /* This file is part of the KDE project
2 | * Copyright © 2010 Casian Andrei
3 | * Copyright © 2010 Harald Sitter
4 | *
5 | * This library is free software; you can redistribute it and/or
6 | * modify it under the terms of the GNU Lesser General Public
7 | * License as published by the Free Software Foundation; either
8 | * version 2.1 of the License, or (at your option) version 3, or any
9 | * later version accepted by the membership of KDE e.V. (or its
10 | * successor approved by the membership of KDE e.V.), Nokia Corporation
11 | * (or its successors, if any) and the KDE Free Qt Foundation, which shall
12 | * act as a proxy defined in Section 6 of version 3 of the license.
13 | *
14 | * This library is distributed in the hope that it will be useful,
15 | * but WITHOUT ANY WARRANTY; without even the implied warranty of
16 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
17 | * Lesser General Public License for more details.
18 | *
19 | * You should have received a copy of the GNU Lesser General Public
20 | * License along with this library. If not, see .
21 | *
22 | */
23 |
24 | #include "objectdescription.h"
25 |
26 | namespace Phonon
27 | {
28 |
29 | namespace Experimental
30 | {
31 |
32 | #ifndef PHONON_NO_VIDEOCAPTURE
33 |
34 | VideoCaptureDevice phononVcdToExperimentalVcd(const Phonon::VideoCaptureDevice &vcd)
35 | {
36 | QHash properties;
37 | const QList &propertyNames = vcd.propertyNames();
38 | int pi, pn = propertyNames.count();
39 | for (pi = 0; pi < pn; ++ pi)
40 | properties[propertyNames[pi]] = vcd.property(propertyNames[pi].constData());
41 |
42 | return VideoCaptureDevice(vcd.index(), properties);
43 | }
44 |
45 | Phonon::VideoCaptureDevice phononExperimentalVcdToVcd(const Phonon::Experimental::VideoCaptureDevice &vcd)
46 | {
47 | QHash properties;
48 | const QList &propertyNames = vcd.propertyNames();
49 | int pi, pn = propertyNames.count();
50 | for (pi = 0; pi < pn; ++ pi)
51 | properties[propertyNames[pi]] = vcd.property(propertyNames[pi].constData());
52 |
53 | return Phonon::VideoCaptureDevice(vcd.index(), properties);
54 | }
55 |
56 | #endif // PHONON_NO_VIDEOCAPTURE
57 |
58 | } // Experimental namespace
59 | } // Phonon namespace
60 |
--------------------------------------------------------------------------------
/phonon/experimental/packet.cpp:
--------------------------------------------------------------------------------
1 | /* This file is part of the KDE project
2 | Copyright (C) 2007-2008 Matthias Kretz
3 |
4 | This library is free software; you can redistribute it and/or
5 | modify it under the terms of the GNU Library General Public
6 | License version 2 as published by the Free Software Foundation.
7 |
8 | This library is distributed in the hope that it will be useful,
9 | but WITHOUT ANY WARRANTY; without even the implied warranty of
10 | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
11 | Library General Public License for more details.
12 |
13 | You should have received a copy of the GNU Library General Public License
14 | along with this library; see the file COPYING.LIB. If not, write to
15 | the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
16 | Boston, MA 02110-1301, USA.
17 |
18 | */
19 |
20 | #include "packet.h"
21 | #include "packet_p.h"
22 | #include "packetpool.h"
23 | #include "packetpool_p.h"
24 |
25 | namespace Phonon
26 | {
27 |
28 | Q_GLOBAL_STATIC(PacketPrivate, shared_null_packet)
29 |
30 | Packet::Packet() : d_ptr(shared_null_packet()) { d_ptr->ref.ref(); }
31 | Packet::Packet(PacketPool &pool) : d_ptr(pool.d_ptr->acquirePacket().d_ptr) { d_ptr->ref.ref(); }
32 | Packet::Packet(const Packet &rhs) : d_ptr(rhs.d_ptr) { d_ptr->ref.ref(); }
33 | Packet::Packet(PacketPrivate &dd) : d_ptr(&dd) { d_ptr->ref.ref(); }
34 | Packet &Packet::operator=(const Packet &rhs)
35 | {
36 | if (!d_ptr->ref.deref()) {
37 | Q_ASSERT(d_ptr->m_pool);
38 | d_ptr->m_pool->releasePacket(*this);
39 | }
40 | d_ptr = rhs.d_ptr;
41 | d_ptr->ref.ref();
42 | return *this;
43 | }
44 | Packet::~Packet()
45 | {
46 | if (!d_ptr->ref.deref()) {
47 | Q_ASSERT(d_ptr->m_pool);
48 | d_ptr->m_pool->releasePacket(*this);
49 | }
50 | }
51 | bool Packet::operator==(const Packet &rhs) const { return d_ptr == rhs.d_ptr; }
52 | bool Packet::operator!=(const Packet &rhs) const { return d_ptr != rhs.d_ptr; }
53 | bool Packet::isNull() const { return d_ptr->m_pool == nullptr; }
54 | const char *Packet::data() const { return d_ptr->m_data; }
55 | char *Packet::data() { return d_ptr->m_data; }
56 | int Packet::size() const { return d_ptr->m_size; }
57 | void Packet::setSize(int size) { d_ptr->m_size = size; }
58 | int Packet::capacity() const { return d_ptr->m_pool ? d_ptr->m_pool->packetSize : 0; }
59 |
60 | } // namespace Phonon
61 |
--------------------------------------------------------------------------------
/phonon/experimental/phononnamespace.h:
--------------------------------------------------------------------------------
1 | /* This file is part of the KDE project
2 | Copyright (C) 2008 Matthias Kretz
3 |
4 | This library is free software; you can redistribute it and/or
5 | modify it under the terms of the GNU Lesser General Public
6 | License as published by the Free Software Foundation; either
7 | version 2.1 of the License, or (at your option) version 3, or any
8 | later version accepted by the membership of KDE e.V. (or its
9 | successor approved by the membership of KDE e.V.), Nokia Corporation
10 | (or its successors, if any) and the KDE Free Qt Foundation, which shall
11 | act as a proxy defined in Section 6 of version 3 of the license.
12 |
13 | This library is distributed in the hope that it will be useful,
14 | but WITHOUT ANY WARRANTY; without even the implied warranty of
15 | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
16 | Lesser General Public License for more details.
17 |
18 | You should have received a copy of the GNU Lesser General Public
19 | License along with this library. If not, see .
20 |
21 | */
22 |
23 | #ifndef PHONON_X_PHONONNAMESPACE_H
24 | #define PHONON_X_PHONONNAMESPACE_H
25 |
26 | #include
27 |
28 | namespace Phonon
29 | {
30 | namespace Experimental
31 | {
32 |
33 | enum BitRate {
34 | UnknownBitRate = -1,
35 | /**
36 | * Audio Data is transported as values from -128 to 127.
37 | */
38 | Signed8Bit = 100,
39 | /**
40 | * Audio Data is transported as values from 0 to 255
41 | */
42 | Unsigned8Bit = 200,
43 | /**
44 | * Audio Data is transported as values from -2^15 to 2^15-1
45 | */
46 | Signed16Bit = 300,
47 | Signed18Bit = 400,
48 | Signed20Bit = 500,
49 | /**
50 | * Audio Data is transported as values from -2^23 to 2^23-1. The data is packed in 3
51 | * Bytes and not padded with a 0 Byte.
52 | */
53 | Signed24Bit = 600,
54 | /**
55 | * Audio Data is transported as values from -2^31 to 2^31-1
56 | */
57 | Signed32Bit = 700,
58 | /**
59 | * Audio Data is transported as values from -1.0 to 1.0
60 | */
61 | Float32Bit = 800
62 | };
63 |
64 | } // namespace Experimental
65 | } // namespace Phonon
66 |
67 | #endif // PHONON_X_PHONONNAMESPACE_H
68 |
--------------------------------------------------------------------------------
/phonon/objectdescriptionmodel_p.h:
--------------------------------------------------------------------------------
1 | /* This file is part of the KDE project
2 | Copyright (C) 2006-2007 Matthias Kretz
3 |
4 | This library is free software; you can redistribute it and/or
5 | modify it under the terms of the GNU Lesser General Public
6 | License as published by the Free Software Foundation; either
7 | version 2.1 of the License, or (at your option) version 3, or any
8 | later version accepted by the membership of KDE e.V. (or its
9 | successor approved by the membership of KDE e.V.), Nokia Corporation
10 | (or its successors, if any) and the KDE Free Qt Foundation, which shall
11 | act as a proxy defined in Section 6 of version 3 of the license.
12 |
13 | This library is distributed in the hope that it will be useful,
14 | but WITHOUT ANY WARRANTY; without even the implied warranty of
15 | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
16 | Lesser General Public License for more details.
17 |
18 | You should have received a copy of the GNU Lesser General Public
19 | License along with this library. If not, see .
20 |
21 | */
22 |
23 | #ifndef PHONON_OBJECTDESCRIPTIONMODEL_P_H
24 | #define PHONON_OBJECTDESCRIPTIONMODEL_P_H
25 |
26 | #include "objectdescriptionmodel.h"
27 | #include
28 | #include "objectdescription.h"
29 |
30 | #ifndef QT_NO_PHONON_OBJECTDESCRIPTIONMODEL
31 |
32 | namespace Phonon
33 | {
34 |
35 | class ListModelHelper : public QAbstractListModel
36 | {
37 | public:
38 | using QAbstractListModel::layoutAboutToBeChanged;
39 | using QAbstractListModel::changePersistentIndexList;
40 | using QAbstractListModel::layoutChanged;
41 | using QAbstractListModel::beginResetModel;
42 | using QAbstractListModel::endResetModel;
43 | using QAbstractListModel::beginInsertRows;
44 | using QAbstractListModel::endInsertRows;
45 | using QAbstractListModel::beginRemoveRows;
46 | using QAbstractListModel::endRemoveRows;
47 | };
48 |
49 | class ObjectDescriptionModelDataPrivate
50 | {
51 | public:
52 | ObjectDescriptionModelDataPrivate(QAbstractListModel *m) : model(reinterpret_cast(m)) {}
53 | QList > data;
54 | ListModelHelper *model;
55 | };
56 |
57 | }
58 |
59 | #endif //QT_NO_PHONON_OBJECTDESCRIPTIONMODEL
60 |
61 | #endif // PHONON_OBJECTDESCRIPTIONMODEL_P_H
62 | // vim: sw=4 ts=4 tw=80
63 |
--------------------------------------------------------------------------------
/phonon/experimental/videodataoutput2.cpp:
--------------------------------------------------------------------------------
1 | /* This file is part of the KDE project
2 | Copyright (C) 2008 Matthias Kretz
3 |
4 | This library is free software; you can redistribute it and/or
5 | modify it under the terms of the GNU Lesser General Public
6 | License as published by the Free Software Foundation; either
7 | version 2.1 of the License, or (at your option) version 3, or any
8 | later version accepted by the membership of KDE e.V. (or its
9 | successor approved by the membership of KDE e.V.), Nokia Corporation
10 | (or its successors, if any) and the KDE Free Qt Foundation, which shall
11 | act as a proxy defined in Section 6 of version 3 of the license.
12 |
13 | This library is distributed in the hope that it will be useful,
14 | but WITHOUT ANY WARRANTY; without even the implied warranty of
15 | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
16 | Lesser General Public License for more details.
17 |
18 | You should have received a copy of the GNU Lesser General Public
19 | License along with this library. If not, see .
20 |
21 | */
22 |
23 | #include "videodataoutput2.h"
24 | #include "videodataoutput2_p.h"
25 | #include "../factory_p.h"
26 | #include
27 | #include
28 |
29 | #define PHONON_CLASSNAME VideoDataOutput2
30 |
31 | namespace Phonon
32 | {
33 | namespace Experimental
34 | {
35 |
36 | VideoDataOutput2::VideoDataOutput2(QObject *parent)
37 | : QObject(parent),
38 | AbstractVideoDataOutput(*new VideoDataOutput2Private)
39 | {
40 | }
41 |
42 | void VideoDataOutput2::frameReady(const VideoFrame2 &frame)
43 | {
44 | QMetaObject::invokeMethod(this, "frameReadySignal", Qt::QueuedConnection, Q_ARG(Phonon::Experimental::VideoFrame2, frame));
45 | }
46 |
47 | void VideoDataOutput2::endOfMedia()
48 | {
49 | QMetaObject::invokeMethod(this, "endOfMediaSignal", Qt::QueuedConnection);
50 | }
51 |
52 | void VideoDataOutput2Private::createBackendObject()
53 | {
54 | AbstractVideoDataOutputPrivate::createBackendObject();
55 | }
56 |
57 | bool VideoDataOutput2Private::aboutToDeleteBackendObject()
58 | {
59 | return AbstractVideoDataOutputPrivate::aboutToDeleteBackendObject();
60 | }
61 |
62 | void VideoDataOutput2Private::setupBackendObject()
63 | {
64 | AbstractVideoDataOutputPrivate::setupBackendObject();
65 | }
66 |
67 | } // namespace Experimental
68 | } // namespace Phonon
69 |
70 | #undef PHONON_CLASSNAME
71 | // vim: sw=4 ts=4 tw=80
72 |
--------------------------------------------------------------------------------
/phonon/abstractvideooutput.h:
--------------------------------------------------------------------------------
1 | /* This file is part of the KDE project
2 | Copyright (C) 2005-2006 Matthias Kretz
3 |
4 | This library is free software; you can redistribute it and/or
5 | modify it under the terms of the GNU Lesser General Public
6 | License as published by the Free Software Foundation; either
7 | version 2.1 of the License, or (at your option) version 3, or any
8 | later version accepted by the membership of KDE e.V. (or its
9 | successor approved by the membership of KDE e.V.), Nokia Corporation
10 | (or its successors, if any) and the KDE Free Qt Foundation, which shall
11 | act as a proxy defined in Section 6 of version 3 of the license.
12 |
13 | This library is distributed in the hope that it will be useful,
14 | but WITHOUT ANY WARRANTY; without even the implied warranty of
15 | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
16 | Lesser General Public License for more details.
17 |
18 | You should have received a copy of the GNU Lesser General Public
19 | License along with this library. If not, see .
20 |
21 | */
22 | #ifndef Phonon_ABSTRACTVIDEOOUTPUTBASE_H
23 | #define Phonon_ABSTRACTVIDEOOUTPUTBASE_H
24 |
25 | #include "phonondefs.h"
26 | #include "phonon_export.h"
27 | #include "medianode.h"
28 | #include
29 |
30 |
31 | #ifndef QT_NO_PHONON_VIDEO
32 |
33 | class QString;
34 |
35 | namespace Phonon
36 | {
37 |
38 | namespace Experimental
39 | {
40 | class Visualization;
41 | class VisualizationPrivate;
42 | } // namespace Experimental
43 |
44 | class AbstractVideoOutputPrivate;
45 |
46 | /** \class AbstractVideoOutput abstractvideooutput.h phonon/AbstractVideoOutput
47 | * \brief Common base class for all video outputs.
48 | *
49 | * \see VideoWidget
50 | */
51 | class PHONON_EXPORT AbstractVideoOutput : public MediaNode
52 | {
53 | friend class Experimental::Visualization;
54 | friend class Experimental::VisualizationPrivate;
55 | P_DECLARE_PRIVATE(AbstractVideoOutput)
56 | protected:
57 | /**
58 | * \internal
59 | * Constructor that is called from derived classes.
60 | *
61 | * \param d the private object
62 | */
63 | AbstractVideoOutput(AbstractVideoOutputPrivate &d);
64 | };
65 | } //namespace Phonon
66 |
67 | #endif //QT_NO_PHONON_VIDEO
68 |
69 |
70 | #endif // Phonon_ABSTRACTVIDEOOUTPUTBASE_H
71 |
--------------------------------------------------------------------------------
/phonon/effectinterface.h:
--------------------------------------------------------------------------------
1 | /* This file is part of the KDE project
2 | Copyright (C) 2006-2008 Matthias Kretz
3 |
4 | This library is free software; you can redistribute it and/or
5 | modify it under the terms of the GNU Lesser General Public
6 | License as published by the Free Software Foundation; either
7 | version 2.1 of the License, or (at your option) version 3, or any
8 | later version accepted by the membership of KDE e.V. (or its
9 | successor approved by the membership of KDE e.V.), Nokia Corporation
10 | (or its successors, if any) and the KDE Free Qt Foundation, which shall
11 | act as a proxy defined in Section 6 of version 3 of the license.
12 |
13 | This library is distributed in the hope that it will be useful,
14 | but WITHOUT ANY WARRANTY; without even the implied warranty of
15 | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
16 | Lesser General Public License for more details.
17 |
18 | You should have received a copy of the GNU Lesser General Public
19 | License along with this library. If not, see .
20 |
21 | */
22 |
23 | #ifndef PHONON_EFFECTINTERFACE_H
24 | #define PHONON_EFFECTINTERFACE_H
25 |
26 | #include "phononnamespace.h"
27 | #include
28 |
29 |
30 | #ifndef QT_NO_PHONON_EFFECT
31 |
32 | namespace Phonon
33 | {
34 | class EffectParameter;
35 | /** \class EffectInterface effectinterface.h phonon/EffectInterface
36 | * \short Interface for Effect objects
37 | *
38 | * \author Matthias Kretz
39 | */
40 | class EffectInterface
41 | {
42 | public:
43 | virtual ~EffectInterface() {}
44 | /**
45 | * Returns the EffectParameter objects to describe the parameters of this effect.
46 | */
47 | virtual QList parameters() const = 0;
48 | /**
49 | * Returns the value for the selected parameter.
50 | */
51 | virtual QVariant parameterValue(const EffectParameter &) const = 0;
52 | /**
53 | * Sets the value for the selected parameter.
54 | */
55 | virtual void setParameterValue(const EffectParameter &, const QVariant &newValue) = 0;
56 | };
57 | } //namespace Phonon
58 |
59 | Q_DECLARE_INTERFACE(Phonon::EffectInterface, "EffectInterface0.phonon.kde.org")
60 |
61 | #endif //QT_NO_PHONON_EFFECT
62 |
63 |
64 | #endif // PHONON_EFFECTINTERFACE_H
65 |
--------------------------------------------------------------------------------
/phonon/experimental/abstractmediastream2_p.h:
--------------------------------------------------------------------------------
1 | /* This file is part of the KDE project
2 | Copyright (C) 2007 Matthias Kretz
3 |
4 | This library is free software; you can redistribute it and/or
5 | modify it under the terms of the GNU Lesser General Public
6 | License as published by the Free Software Foundation; either
7 | version 2.1 of the License, or (at your option) version 3, or any
8 | later version accepted by the membership of KDE e.V. (or its
9 | successor approved by the membership of KDE e.V.), Nokia Corporation
10 | (or its successors, if any) and the KDE Free Qt Foundation, which shall
11 | act as a proxy defined in Section 6 of version 3 of the license.
12 |
13 | This library is distributed in the hope that it will be useful,
14 | but WITHOUT ANY WARRANTY; without even the implied warranty of
15 | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
16 | Lesser General Public License for more details.
17 |
18 | You should have received a copy of the GNU Lesser General Public
19 | License along with this library. If not, see .
20 |
21 | */
22 |
23 | #ifndef ABSTRACTMEDIASTREAM2_P_H
24 | #define ABSTRACTMEDIASTREAM2_P_H
25 |
26 | #include "phonon_export.h"
27 | #include "abstractmediastream2.h"
28 | #include "abstractmediastream_p.h"
29 | #include "mediaobject_p.h"
30 |
31 | #include "medianodedestructionhandler_p.h"
32 | #include "streameventqueue_p.h"
33 |
34 | class MediaObjectPrivate;
35 | class QAbstractEventDispatcher;
36 |
37 | namespace Phonon
38 | {
39 | class PHONON_EXPORT AbstractMediaStream2Private : public AbstractMediaStreamPrivate, private LockFreeQueueBase::DataReadyHandler
40 | {
41 | friend class MediaObject;
42 | friend class MediaSourcePrivate;
43 | Q_DECLARE_PUBLIC(AbstractMediaStream2)
44 | protected:
45 | AbstractMediaStream2Private();
46 | ~AbstractMediaStream2Private();
47 |
48 | virtual void setStreamSize(qint64 newSize);
49 | virtual void setStreamSeekable(bool s);
50 | virtual void writeData(const QByteArray &data);
51 | virtual void endOfData();
52 | virtual void dataReady();
53 | void _k_handleStreamEvent();
54 |
55 | StreamEventQueue *streamEventQueue;
56 | QAbstractEventDispatcher *eventDispatcher;
57 | int connectReset;
58 | bool firstConnect;
59 | };
60 | } // namespace Phonon
61 |
62 | #endif // ABSTRACTMEDIASTREAM2_P_H
63 | // vim: sw=4 sts=4 et tw=100
64 |
--------------------------------------------------------------------------------
/phonon/objectdescription_p.h:
--------------------------------------------------------------------------------
1 | /* This file is part of the KDE project
2 | Copyright (C) 2006-2007 Matthias Kretz
3 |
4 | This library is free software; you can redistribute it and/or
5 | modify it under the terms of the GNU Lesser General Public
6 | License as published by the Free Software Foundation; either
7 | version 2.1 of the License, or (at your option) version 3, or any
8 | later version accepted by the membership of KDE e.V. (or its
9 | successor approved by the membership of KDE e.V.), Nokia Corporation
10 | (or its successors, if any) and the KDE Free Qt Foundation, which shall
11 | act as a proxy defined in Section 6 of version 3 of the license.
12 |
13 | This library is distributed in the hope that it will be useful,
14 | but WITHOUT ANY WARRANTY; without even the implied warranty of
15 | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
16 | Lesser General Public License for more details.
17 |
18 | You should have received a copy of the GNU Lesser General Public
19 | License along with this library. If not, see .
20 |
21 | */
22 |
23 | #ifndef PHONON_OBJECTDESCRIPTION_P_H
24 | #define PHONON_OBJECTDESCRIPTION_P_H
25 |
26 | #include
27 | #include
28 | #include
29 | #include "phononnamespace_p.h"
30 |
31 | namespace Phonon
32 | {
33 | class ObjectDescriptionPrivate
34 | {
35 | public:
36 | ObjectDescriptionPrivate(int _index, const QHash &_properties)
37 | : index(_index),
38 | name(_properties["name"].toString()),
39 | description(_properties["description"].toString()),
40 | properties(_properties)
41 | {
42 | }
43 |
44 | bool operator==(const ObjectDescriptionPrivate &rhs) const
45 | {
46 | if (index == rhs.index && (name != rhs.name || description != rhs.description))
47 | pError() << "Same index (" << index <<
48 | "), but different name/description. This is a bug in the Phonon backend.";
49 | return index == rhs.index;// && name == rhs.name && description == rhs.description;
50 | }
51 |
52 | int index;
53 | QString name, description;
54 | QHash properties;
55 | };
56 | } // namespace Phonon
57 |
58 | #endif // PHONON_OBJECTDESCRIPTION_P_H
59 | // vim: sw=4 ts=4 tw=80
60 |
--------------------------------------------------------------------------------
/phonon/path_p.h:
--------------------------------------------------------------------------------
1 | /* This file is part of the KDE project
2 | Copyright (C) 2007 Matthias Kretz
3 |
4 | This library is free software; you can redistribute it and/or
5 | modify it under the terms of the GNU Lesser General Public
6 | License as published by the Free Software Foundation; either
7 | version 2.1 of the License, or (at your option) version 3, or any
8 | later version accepted by the membership of KDE e.V. (or its
9 | successor approved by the membership of KDE e.V.), Nokia Corporation
10 | (or its successors, if any) and the KDE Free Qt Foundation, which shall
11 | act as a proxy defined in Section 6 of version 3 of the license.
12 |
13 | This library is distributed in the hope that it will be useful,
14 | but WITHOUT ANY WARRANTY; without even the implied warranty of
15 | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
16 | Lesser General Public License for more details.
17 |
18 | You should have received a copy of the GNU Lesser General Public
19 | License along with this library. If not, see .
20 |
21 | */
22 |
23 | #ifndef PATH_P_H
24 | #define PATH_P_H
25 |
26 | #include "path.h"
27 | #include
28 | #include
29 | #include
30 | #include "effect.h"
31 | #include "medianodedestructionhandler_p.h"
32 |
33 | class QObject;
34 |
35 | namespace Phonon
36 | {
37 |
38 | class MediaNode;
39 | typedef QPair QObjectPair;
40 |
41 |
42 | class PathPrivate : public QSharedData, private MediaNodeDestructionHandler
43 | {
44 | friend class Path;
45 | public:
46 | PathPrivate()
47 | : sourceNode(nullptr), sinkNode(nullptr)
48 | #ifndef QT_NO_PHONON_EFFECT
49 | , effectsParent(nullptr)
50 | #endif //QT_NO_PHONON_EFFECT
51 | {
52 | }
53 |
54 | ~PathPrivate() override;
55 |
56 | MediaNode *sourceNode;
57 | MediaNode *sinkNode;
58 |
59 | protected:
60 | void phononObjectDestroyed(MediaNodePrivate *) override;
61 |
62 | #ifndef QT_NO_PHONON_EFFECT
63 | QObject *effectsParent; // used as parent for Effects created in insertEffect
64 | QList effects;
65 | #endif
66 | private:
67 | bool executeTransaction( const QList &disconnections, const QList &connections);
68 | #ifndef QT_NO_PHONON_EFFECT
69 | bool removeEffect(Effect *effect);
70 | #endif
71 | };
72 |
73 | } // namespace Phonon
74 |
75 | #endif // PATH_P_H
76 |
--------------------------------------------------------------------------------
/phonon/experimental/videoframe.h:
--------------------------------------------------------------------------------
1 | /* This file is part of the KDE project
2 | Copyright (C) 2006 Matthias Kretz
3 |
4 | This library is free software; you can redistribute it and/or
5 | modify it under the terms of the GNU Lesser General Public
6 | License as published by the Free Software Foundation; either
7 | version 2.1 of the License, or (at your option) version 3, or any
8 | later version accepted by the membership of KDE e.V. (or its
9 | successor approved by the membership of KDE e.V.), Nokia Corporation
10 | (or its successors, if any) and the KDE Free Qt Foundation, which shall
11 | act as a proxy defined in Section 6 of version 3 of the license.
12 |
13 | This library is distributed in the hope that it will be useful,
14 | but WITHOUT ANY WARRANTY; without even the implied warranty of
15 | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
16 | Lesser General Public License for more details.
17 |
18 | You should have received a copy of the GNU Lesser General Public
19 | License along with this library. If not, see .
20 |
21 | */
22 |
23 | #ifndef PHONON_EXPERIMENTAL_VIDEOFRAME_H
24 | #define PHONON_EXPERIMENTAL_VIDEOFRAME_H
25 |
26 | #include "export.h"
27 | #include "videodataoutput.h"
28 |
29 | namespace Phonon
30 | {
31 | namespace Experimental
32 | {
33 | /**
34 | * \brief A single video frame.
35 | *
36 | * This simple class contains the data of a frame and metadata describing
37 | * how to interpret the data.
38 | *
39 | * \author Matthias Kretz
40 | */
41 | struct PHONONEXPERIMENTAL_EXPORT VideoFrame
42 | {
43 | enum Format {
44 | Format_YUV422,
45 | Format_YUV420,
46 | Format_RGBA8
47 | //Format_RGBA8_Premultiplied,
48 | //Format_RGBA16F,
49 | //Format_RGBA32F,
50 | //Colorspace_XVYCC
51 | };
52 | //Qt::HANDLE handle() const;
53 |
54 | QByteArray data;
55 | /**
56 | * The width of the video frame in pixels.
57 | */
58 | int width;
59 | /**
60 | * The height of the video frame in pixels.
61 | */
62 | int height;
63 | /**
64 | * Colorspace of the frame
65 | */
66 | Format colorspace;
67 | };
68 | } // namespace Experimental
69 | } // namespace Phonon
70 |
71 | // vim: sw=4 ts=4 tw=80
72 | #endif // PHONON_EXPERIMENTAL_VIDEOFRAME_H
73 |
--------------------------------------------------------------------------------
/demos/metadatareader/metadatareader.cpp:
--------------------------------------------------------------------------------
1 | /* This file is part of the KDE project
2 | Copyright (C) 2011 Jakub Spiewak
3 |
4 | This library is free software; you can redistribute it and/or
5 | modify it under the terms of the GNU Lesser General Public
6 | License as published by the Free Software Foundation; either
7 | version 2.1 of the License, or (at your option) version 3, or any
8 | later version accepted by the membership of KDE e.V. (or its
9 | successor approved by the membership of KDE e.V.), Nokia Corporation
10 | (or its successors, if any) and the KDE Free Qt Foundation, which shall
11 | act as a proxy defined in Section 6 of version 3 of the license.
12 |
13 | This library is distributed in the hope that it will be useful,
14 | but WITHOUT ANY WARRANTY; without even the implied warranty of
15 | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
16 | Lesser General Public License for more details.
17 |
18 | You should have received a copy of the GNU Lesser General Public
19 | License along with this library. If not, see .
20 | */
21 |
22 | #include "metadatareader.h"
23 |
24 | #include
25 |
26 |
27 | MetaDataReader::MetaDataReader(QString &file, QTextStream &out):
28 | textStream(out)
29 | {
30 | mediaObj = new Phonon::MediaObject(this);
31 |
32 | connect(mediaObj, SIGNAL(metaDataChanged()), this, SLOT(printMetaData()));
33 | connect(mediaObj, SIGNAL(stateChanged(Phonon::State,Phonon::State)), SLOT(checkForError(Phonon::State,Phonon::State)));
34 |
35 | mediaObj->setCurrentSource(QUrl::fromLocalFile(file));
36 | }
37 |
38 |
39 | MetaDataReader::~MetaDataReader()
40 | {
41 | }
42 |
43 |
44 | void MetaDataReader::printMetaData()
45 | {
46 | textStream << "Meta data of file " << mediaObj->currentSource().fileName() << ":\n";
47 |
48 | typedef QMultiMap MetaDataMap;
49 | MetaDataMap metaData = mediaObj->metaData();
50 |
51 | for(MetaDataMap::iterator it=metaData.begin(); it!=metaData.end(); ++it)
52 | {
53 | textStream << it.key() << ": " << it.value() << '\n';
54 | }
55 |
56 | textStream.flush();
57 | quit();
58 | }
59 |
60 |
61 | void MetaDataReader::checkForError(Phonon::State state, Phonon::State)
62 | {
63 | if(state == Phonon::ErrorState)
64 | {
65 | textStream << "Error: unable to read meta data of " << mediaObj->currentSource().fileName() << Qt::endl;
66 | quit();
67 | }
68 | }
69 |
--------------------------------------------------------------------------------
/phonon/frontendinterface_p.h:
--------------------------------------------------------------------------------
1 | /* This file is part of the KDE project
2 | Copyright (C) 2007 Matthias Kretz
3 |
4 | This library is free software; you can redistribute it and/or
5 | modify it under the terms of the GNU Lesser General Public
6 | License as published by the Free Software Foundation; either
7 | version 2.1 of the License, or (at your option) version 3, or any
8 | later version accepted by the membership of KDE e.V. (or its
9 | successor approved by the membership of KDE e.V.), Nokia Corporation
10 | (or its successors, if any) and the KDE Free Qt Foundation, which shall
11 | act as a proxy defined in Section 6 of version 3 of the license.
12 |
13 | This library is distributed in the hope that it will be useful,
14 | but WITHOUT ANY WARRANTY; without even the implied warranty of
15 | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
16 | Lesser General Public License for more details.
17 |
18 | You should have received a copy of the GNU Lesser General Public
19 | License along with this library. If not, see .
20 |
21 | */
22 |
23 | #ifndef PHONON_FRONTENDINTERFACEPRIVATE_H
24 | #define PHONON_FRONTENDINTERFACEPRIVATE_H
25 |
26 | #include "addoninterface.h"
27 | #include "mediaobject_p.h"
28 | #include "phononnamespace_p.h"
29 | #include
30 |
31 | #ifndef QT_NO_PHONON_MEDIACONTROLLER
32 |
33 | namespace Phonon
34 | {
35 | class FrontendInterfacePrivate
36 | {
37 | public:
38 | FrontendInterfacePrivate(MediaObject *mp) : media(mp) {
39 | Q_ASSERT(media);
40 | MediaObjectPrivate *d = media->k_func();
41 | d->interfaceList << this;
42 | }
43 | virtual ~FrontendInterfacePrivate() {
44 | if (media) {
45 | MediaObjectPrivate *d = media->k_func();
46 | d->interfaceList << this;
47 | }
48 | }
49 | virtual void backendObjectChanged(QObject *iface) = 0;
50 | void _backendObjectChanged() {
51 | pDebug() << Q_FUNC_INFO;
52 | QObject *x = media->k_ptr->backendObject();
53 | if (x) {
54 | backendObjectChanged(x);
55 | }
56 | }
57 | AddonInterface *iface() { return qobject_cast(media->k_ptr->backendObject()); }
58 | QPointer media;
59 | };
60 | } // namespace Phonon
61 |
62 | #endif //QT_NO_PHONON_MEDIACONTROLLER
63 |
64 | #endif // PHONON_FRONTENDINTERFACEPRIVATE_H
65 |
--------------------------------------------------------------------------------
/phonon/experimental/globalconfig.cpp:
--------------------------------------------------------------------------------
1 | /* This file is part of the KDE project
2 | Copyright (C) 2006-2008 Matthias Kretz
3 |
4 | This library is free software; you can redistribute it and/or
5 | modify it under the terms of the GNU Lesser General Public
6 | License as published by the Free Software Foundation; either
7 | version 2.1 of the License, or (at your option) version 3, or any
8 | later version accepted by the membership of KDE e.V. (or its
9 | successor approved by the membership of KDE e.V.), Nokia Corporation
10 | (or its successors, if any) and the KDE Free Qt Foundation, which shall
11 | act as a proxy defined in Section 6 of version 3 of the license.
12 |
13 | This library is distributed in the hope that it will be useful,
14 | but WITHOUT ANY WARRANTY; without even the implied warranty of
15 | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
16 | Lesser General Public License for more details.
17 |
18 | You should have received a copy of the GNU Lesser General Public
19 | License along with this library. If not, see .
20 |
21 | */
22 |
23 | #include "globalconfig.h"
24 | #include "../globalconfig_p.h"
25 |
26 | #include "../factory_p.h"
27 | #include "../phonondefs_p.h"
28 | #include "../backendinterface.h"
29 | #include "../qsettingsgroup_p.h"
30 | #include "../platformplugin.h"
31 | #include "pulsesupport.h"
32 |
33 | #include
34 | #include
35 |
36 | namespace Phonon
37 | {
38 | namespace Experimental
39 | {
40 |
41 | #ifndef PHONON_NO_VIDEOCAPTURE
42 | QList GlobalConfig::videoCaptureDeviceListFor(Category category, int override) const
43 | {
44 | Q_UNUSED(category);
45 | return Phonon::GlobalConfig::videoCaptureDeviceListFor(Phonon::NoCaptureCategory, override);
46 | }
47 |
48 | int GlobalConfig::videoCaptureDeviceFor(Category category, int override) const
49 | {
50 | Q_UNUSED(category);
51 | return Phonon::GlobalConfig::videoCaptureDeviceFor(Phonon::NoCaptureCategory, override);
52 | }
53 |
54 | QList< int > GlobalConfig::videoCaptureDeviceListFor(CaptureCategory category, int override) const
55 | {
56 | return Phonon::GlobalConfig::videoCaptureDeviceListFor(category, override);
57 | }
58 |
59 | int Experimental::GlobalConfig::videoCaptureDeviceFor(CaptureCategory category, int override) const
60 | {
61 | return Phonon::GlobalConfig::videoCaptureDeviceFor(category, override);
62 | }
63 |
64 | #endif // PHONON_NO_VIDEOCAPTURE
65 |
66 | } // namespace Experimental
67 | } // namespace Phonon
68 |
--------------------------------------------------------------------------------