Formatting
This commit is contained in:
@@ -26,7 +26,7 @@
|
||||
|
||||
GstElementDeleter::GstElementDeleter(QObject *parent) : QObject(parent) {}
|
||||
|
||||
void GstElementDeleter::DeleteElementLater(GstElement* element) {
|
||||
void GstElementDeleter::DeleteElementLater(GstElement *element) {
|
||||
metaObject()->invokeMethod(this, "DeleteElement", Qt::QueuedConnection, Q_ARG(GstElement*, element));
|
||||
}
|
||||
|
||||
|
||||
@@ -1163,7 +1163,7 @@ void GstEnginePipeline::UpdateStereoBalance() {
|
||||
|
||||
}
|
||||
|
||||
void GstEnginePipeline::SetEqualizerParams(const int preamp, const QList<int>& band_gains) {
|
||||
void GstEnginePipeline::SetEqualizerParams(const int preamp, const QList<int> &band_gains) {
|
||||
|
||||
eq_preamp_ = preamp;
|
||||
eq_band_gains_ = band_gains;
|
||||
|
||||
@@ -144,7 +144,7 @@ class GstEnginePipeline : public QObject {
|
||||
|
||||
// Static callbacks. The GstEnginePipeline instance is passed in the last argument.
|
||||
static GstPadProbeReturn EventHandoffCallback(GstPad*, GstPadProbeInfo*, gpointer);
|
||||
static void SourceSetupCallback(GstPlayBin*, GParamSpec* pspec, gpointer);
|
||||
static void SourceSetupCallback(GstPlayBin*, GParamSpec *pspec, gpointer);
|
||||
static void NewPadCallback(GstElement*, GstPad*, gpointer);
|
||||
static GstPadProbeReturn PlaybinProbe(GstPad*, GstPadProbeInfo*, gpointer);
|
||||
static GstPadProbeReturn HandoffCallback(GstPad*, GstPadProbeInfo*, gpointer);
|
||||
|
||||
@@ -35,7 +35,7 @@
|
||||
namespace {
|
||||
|
||||
template <typename T>
|
||||
std::unique_ptr<T> GetProperty(const AudioDeviceID& device_id, const AudioObjectPropertyAddress& address, UInt32* size_bytes_out = nullptr) {
|
||||
std::unique_ptr<T> GetProperty(const AudioDeviceID &device_id, const AudioObjectPropertyAddress &address, UInt32 *size_bytes_out = nullptr) {
|
||||
|
||||
UInt32 size_bytes = 0;
|
||||
OSStatus status = AudioObjectGetPropertyDataSize(device_id, &address, 0, NULL, &size_bytes);
|
||||
|
||||
@@ -76,8 +76,8 @@ class VLCEngine : public Engine::Base {
|
||||
uint position() const;
|
||||
uint length() const;
|
||||
bool CanDecode(const QUrl &url);
|
||||
void AttachCallback(libvlc_event_manager_t* em, libvlc_event_type_t type, libvlc_callback_t callback);
|
||||
static void StateChangedCallback(const libvlc_event_t* e, void* data);
|
||||
void AttachCallback(libvlc_event_manager_t *em, libvlc_event_type_t type, libvlc_callback_t callback);
|
||||
static void StateChangedCallback(const libvlc_event_t *e, void *data);
|
||||
|
||||
PluginDetailsList GetPluginList() const;
|
||||
void GetDevicesList(const QString &output) const;
|
||||
|
||||
@@ -28,38 +28,38 @@
|
||||
template <typename T>
|
||||
class VlcScopedRef {
|
||||
public:
|
||||
explicit VlcScopedRef(T* ptr);
|
||||
explicit VlcScopedRef(T *ptr);
|
||||
~VlcScopedRef();
|
||||
|
||||
operator T* () const { return ptr_; }
|
||||
operator T*() const { return ptr_; }
|
||||
operator bool () const { return ptr_; }
|
||||
T* operator ->() const { return ptr_; }
|
||||
T *operator->() const { return ptr_; }
|
||||
|
||||
private:
|
||||
VlcScopedRef(VlcScopedRef&) {}
|
||||
VlcScopedRef& operator =(const VlcScopedRef&) { return *this; }
|
||||
VlcScopedRef &operator =(const VlcScopedRef&) { return *this; }
|
||||
|
||||
T* ptr_;
|
||||
T *ptr_;
|
||||
};
|
||||
|
||||
|
||||
#define VLCSCOPEDREF_DEFINE2(type, dtor) \
|
||||
template <> void VlcScopedRef_Release<libvlc_##type##_t>(libvlc_##type##_t* ptr) { \
|
||||
template <> void VlcScopedRef_Release<libvlc_##type##_t>(libvlc_##type##_t *ptr) { \
|
||||
dtor(ptr); \
|
||||
}
|
||||
#define VLCSCOPEDREF_DEFINE(type) VLCSCOPEDREF_DEFINE2(type, libvlc_##type##_release)
|
||||
|
||||
template <typename T>
|
||||
void VlcScopedRef_Release(T* ptr);
|
||||
void VlcScopedRef_Release(T *ptr);
|
||||
|
||||
VLCSCOPEDREF_DEFINE2(instance, libvlc_release)
|
||||
VLCSCOPEDREF_DEFINE(media_player)
|
||||
VLCSCOPEDREF_DEFINE(media)
|
||||
|
||||
template <> void VlcScopedRef_Release<char>(char* ptr) { free(ptr); }
|
||||
template <> void VlcScopedRef_Release<char>(char *ptr) { free(ptr); }
|
||||
|
||||
template <typename T>
|
||||
VlcScopedRef<T>::VlcScopedRef(T* ptr)
|
||||
VlcScopedRef<T>::VlcScopedRef(T *ptr)
|
||||
: ptr_(ptr) {
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user