diff options
Diffstat (limited to 'WebCore/platform/graphics/gtk')
9 files changed, 181 insertions, 180 deletions
diff --git a/WebCore/platform/graphics/gtk/FontGtk.cpp b/WebCore/platform/graphics/gtk/FontGtk.cpp index 6561f02..ee86f96 100644 --- a/WebCore/platform/graphics/gtk/FontGtk.cpp +++ b/WebCore/platform/graphics/gtk/FontGtk.cpp @@ -44,12 +44,6 @@ #include <pango/pangofc-fontmap.h> #endif -#if !defined(PANGO_VERSION_CHECK) -// PANGO_VERSION_CHECK() and pango_layout_get_line_readonly() appeared in 1.5.2 -#define pango_layout_get_line_readonly pango_layout_get_line -#define PANGO_VERSION_CHECK(major,minor,micro) 0 -#endif - namespace WebCore { #define IS_HIGH_SURROGATE(u) ((UChar)(u) >= (UChar)0xd800 && (UChar)(u) <= (UChar)0xdbff) diff --git a/WebCore/platform/graphics/gtk/FontPlatformData.h b/WebCore/platform/graphics/gtk/FontPlatformData.h index ae1f134..2a65f1e 100644 --- a/WebCore/platform/graphics/gtk/FontPlatformData.h +++ b/WebCore/platform/graphics/gtk/FontPlatformData.h @@ -42,6 +42,8 @@ namespace WebCore { +class String; + class FontPlatformData { public: FontPlatformData(WTF::HashTableDeletedValueType) @@ -107,6 +109,10 @@ public: #endif }; +#ifndef NDEBUG + String description() const; +#endif + #if defined(USE_FREETYPE) FcPattern* m_pattern; FcFontSet* m_fallbacks; diff --git a/WebCore/platform/graphics/gtk/FontPlatformDataGtk.cpp b/WebCore/platform/graphics/gtk/FontPlatformDataGtk.cpp index f0f0dd5..f2c5f0c 100644 --- a/WebCore/platform/graphics/gtk/FontPlatformDataGtk.cpp +++ b/WebCore/platform/graphics/gtk/FontPlatformDataGtk.cpp @@ -259,4 +259,11 @@ bool FontPlatformData::operator==(const FontPlatformData& other) const return FcPatternEqual(m_pattern, other.m_pattern); } +#ifndef NDEBUG +String FontPlatformData::description() const +{ + return String(); +} +#endif + } diff --git a/WebCore/platform/graphics/gtk/FontPlatformDataPango.cpp b/WebCore/platform/graphics/gtk/FontPlatformDataPango.cpp index 88bf427..9ea6811 100644 --- a/WebCore/platform/graphics/gtk/FontPlatformDataPango.cpp +++ b/WebCore/platform/graphics/gtk/FontPlatformDataPango.cpp @@ -34,10 +34,6 @@ #include <pango/pango.h> #include <pango/pangocairo.h> -#if !defined(PANGO_VERSION_CHECK) -#define PANGO_VERSION_CHECK(major,minor,micro) 0 -#endif - // Use cairo-ft i a recent enough Pango version isn't available #if !PANGO_VERSION_CHECK(1,18,0) #include <cairo-ft.h> @@ -113,14 +109,14 @@ FontPlatformData::FontPlatformData(const FontDescription& fontDescription, const cairo_font_face_t* face = cairo_ft_font_face_create_for_pattern(fcfont->font_pattern); double size; if (FcPatternGetDouble(fcfont->font_pattern, FC_PIXEL_SIZE, 0, &size) != FcResultMatch) - size = 12.0; + size = 12.0; cairo_matrix_t fontMatrix; cairo_matrix_init_scale(&fontMatrix, size, size); cairo_font_options_t* fontOptions; if (pango_cairo_context_get_font_options(m_context)) - fontOptions = cairo_font_options_copy(pango_cairo_context_get_font_options(m_context)); + fontOptions = cairo_font_options_copy(pango_cairo_context_get_font_options(m_context)); else - fontOptions = cairo_font_options_create(); + fontOptions = cairo_font_options_create(); cairo_matrix_t ctm; cairo_matrix_init_identity(&ctm); m_scaledFont = cairo_scaled_font_create(face, &fontMatrix, &ctm, fontOptions); @@ -279,4 +275,11 @@ bool FontPlatformData::operator==(const FontPlatformData& other) const return result; } +#ifndef NDEBUG +String FontPlatformData::description() const +{ + return String(); +} +#endif + } diff --git a/WebCore/platform/graphics/gtk/MediaPlayerPrivateGStreamer.cpp b/WebCore/platform/graphics/gtk/MediaPlayerPrivateGStreamer.cpp index 8dd1333..4e4bda9 100644 --- a/WebCore/platform/graphics/gtk/MediaPlayerPrivateGStreamer.cpp +++ b/WebCore/platform/graphics/gtk/MediaPlayerPrivateGStreamer.cpp @@ -24,7 +24,6 @@ #if ENABLE(VIDEO) #include "MediaPlayerPrivateGStreamer.h" -#include "VideoSinkGStreamer.h" #include "CString.h" #include "GraphicsContext.h" @@ -34,10 +33,9 @@ #include "MediaPlayer.h" #include "NotImplemented.h" #include "ScrollView.h" +#include "VideoSinkGStreamer.h" #include "Widget.h" -#include <wtf/GOwnPtr.h> -#include <gdk/gdkx.h> #include <gst/base/gstbasesrc.h> #include <gst/gst.h> #include <gst/interfaces/mixer.h> @@ -45,6 +43,7 @@ #include <gst/video/video.h> #include <limits> #include <math.h> +#include <wtf/GOwnPtr.h> using namespace std; @@ -52,8 +51,7 @@ namespace WebCore { gboolean mediaPlayerPrivateErrorCallback(GstBus* bus, GstMessage* message, gpointer data) { - if (GST_MESSAGE_TYPE(message) == GST_MESSAGE_ERROR) - { + if (GST_MESSAGE_TYPE(message) == GST_MESSAGE_ERROR) { GOwnPtr<GError> err; GOwnPtr<gchar> debug; @@ -71,8 +69,7 @@ gboolean mediaPlayerPrivateErrorCallback(GstBus* bus, GstMessage* message, gpoin gboolean mediaPlayerPrivateEOSCallback(GstBus* bus, GstMessage* message, gpointer data) { - if (GST_MESSAGE_TYPE(message) == GST_MESSAGE_EOS) - { + if (GST_MESSAGE_TYPE(message) == GST_MESSAGE_EOS) { LOG_VERBOSE(Media, "End of Stream"); MediaPlayerPrivate* mp = reinterpret_cast<MediaPlayerPrivate*>(data); mp->didEnd(); @@ -82,8 +79,7 @@ gboolean mediaPlayerPrivateEOSCallback(GstBus* bus, GstMessage* message, gpointe gboolean mediaPlayerPrivateStateCallback(GstBus* bus, GstMessage* message, gpointer data) { - if (GST_MESSAGE_TYPE(message) == GST_MESSAGE_STATE_CHANGED) - { + if (GST_MESSAGE_TYPE(message) == GST_MESSAGE_STATE_CHANGED) { MediaPlayerPrivate* mp = reinterpret_cast<MediaPlayerPrivate*>(data); mp->updateStates(); } @@ -92,8 +88,7 @@ gboolean mediaPlayerPrivateStateCallback(GstBus* bus, GstMessage* message, gpoin gboolean mediaPlayerPrivateBufferingCallback(GstBus* bus, GstMessage* message, gpointer data) { - if (GST_MESSAGE_TYPE(message) == GST_MESSAGE_BUFFERING) - { + if (GST_MESSAGE_TYPE(message) == GST_MESSAGE_BUFFERING) { gint percent = 0; gst_message_parse_buffering(message, &percent); LOG_VERBOSE(Media, "Buffering %d", percent); @@ -106,8 +101,8 @@ static void mediaPlayerPrivateRepaintCallback(WebKitVideoSink*, MediaPlayerPriva playerPrivate->repaint(); } -MediaPlayerPrivateInterface* MediaPlayerPrivate::create(MediaPlayer* player) -{ +MediaPlayerPrivateInterface* MediaPlayerPrivate::create(MediaPlayer* player) +{ return new MediaPlayerPrivate(player); } @@ -137,7 +132,7 @@ MediaPlayerPrivate::MediaPlayerPrivate(MediaPlayer* player) static bool gstInitialized = false; // FIXME: We should pass the arguments from the command line if (!gstInitialized) { - gst_init(0, NULL); + gst_init(0, 0); gstInitialized = true; } @@ -229,7 +224,7 @@ float MediaPlayerPrivate::currentTime() const GstQuery* query = gst_query_new_position(GST_FORMAT_TIME); if (gst_element_query(m_playBin, query)) { gint64 position; - gst_query_parse_position(query, NULL, &position); + gst_query_parse_position(query, 0, &position); ret = (float) (position / 1000000000.0); LOG_VERBOSE(Media, "Position %" GST_TIME_FORMAT, GST_TIME_ARGS(position)); } else { @@ -277,7 +272,7 @@ void MediaPlayerPrivate::setEndTime(float time) GST_FORMAT_TIME, (GstSeekFlags)(GST_SEEK_FLAG_FLUSH | GST_SEEK_FLAG_ACCURATE), GST_SEEK_TYPE_SET, start, - GST_SEEK_TYPE_SET, end )) + GST_SEEK_TYPE_SET, end)) LOG_VERBOSE(Media, "Seek to %f failed", time); } } @@ -345,9 +340,9 @@ void MediaPlayerPrivate::setMuted(bool b) if (b) { g_object_get(G_OBJECT(m_playBin), "volume", &m_volume, NULL); g_object_set(G_OBJECT(m_playBin), "volume", (double)0.0, NULL); - } else { + } else g_object_set(G_OBJECT(m_playBin), "volume", m_volume, NULL); - } + } void MediaPlayerPrivate::setRate(float rate) @@ -465,10 +460,10 @@ void MediaPlayerPrivate::updateStates() if (!m_playBin) return; - GstStateChangeReturn ret = gst_element_get_state (m_playBin, + GstStateChangeReturn ret = gst_element_get_state(m_playBin, &state, &pending, 250 * GST_NSECOND); - switch(ret) { + switch (ret) { case GST_STATE_CHANGE_SUCCESS: LOG_VERBOSE(Media, "State: %s, pending: %s", gst_element_state_get_name(state), @@ -476,14 +471,14 @@ void MediaPlayerPrivate::updateStates() if (state == GST_STATE_READY) { m_readyState = MediaPlayer::HaveEnoughData; - } else if (state == GST_STATE_PAUSED) { + } else if (state == GST_STATE_PAUSED) m_readyState = MediaPlayer::HaveEnoughData; - } + m_networkState = MediaPlayer::Loaded; g_object_get(m_playBin, "source", &m_source, NULL); if (!m_source) - LOG_VERBOSE(Media, "m_source is NULL"); + LOG_VERBOSE(Media, "m_source is 0"); break; case GST_STATE_CHANGE_ASYNC: LOG_VERBOSE(Media, "Async: State: %s, pending: %s", @@ -498,9 +493,9 @@ void MediaPlayerPrivate::updateStates() gst_element_state_get_name(pending)); if (state == GST_STATE_READY) { m_readyState = MediaPlayer::HaveFutureData; - } else if (state == GST_STATE_PAUSED) { + } else if (state == GST_STATE_PAUSED) m_readyState = MediaPlayer::HaveCurrentData; - } + m_networkState = MediaPlayer::Loading; break; default: @@ -614,7 +609,7 @@ MediaPlayer::SupportsType MediaPlayerPrivate::supportsType(const String& type, c { // FIXME: query the engine to see what types are supported notImplemented(); - return type == "video/x-theora+ogg" ? (!codecs.isEmpty() ? MediaPlayer::MayBeSupported : MediaPlayer::IsSupported) : MediaPlayer::IsNotSupported; + return type == "video/x-theora+ogg" ? (codecs.isEmpty() ? MediaPlayer::MayBeSupported : MediaPlayer::IsSupported) : MediaPlayer::IsNotSupported; } void MediaPlayerPrivate::createGSTPlayBin(String url) @@ -632,7 +627,7 @@ void MediaPlayerPrivate::createGSTPlayBin(String url) g_object_set(G_OBJECT(m_playBin), "uri", url.utf8().data(), NULL); - GstElement* audioSink = gst_element_factory_make("gconfaudiosink", NULL); + GstElement* audioSink = gst_element_factory_make("gconfaudiosink", 0); m_videoSink = webkit_video_sink_new(m_surface); g_object_set(m_playBin, "audio-sink", audioSink, NULL); diff --git a/WebCore/platform/graphics/gtk/MediaPlayerPrivateGStreamer.h b/WebCore/platform/graphics/gtk/MediaPlayerPrivateGStreamer.h index 628f0ac..8842f84 100644 --- a/WebCore/platform/graphics/gtk/MediaPlayerPrivateGStreamer.h +++ b/WebCore/platform/graphics/gtk/MediaPlayerPrivateGStreamer.h @@ -27,7 +27,8 @@ #include "MediaPlayerPrivate.h" #include "Timer.h" -#include <gtk/gtk.h> +#include <cairo.h> +#include <glib.h> typedef struct _GstElement GstElement; typedef struct _GstMessage GstMessage; @@ -44,96 +45,93 @@ namespace WebCore { gboolean mediaPlayerPrivateEOSCallback(GstBus* bus, GstMessage* message, gpointer data); gboolean mediaPlayerPrivateStateCallback(GstBus* bus, GstMessage* message, gpointer data); - class MediaPlayerPrivate : public MediaPlayerPrivateInterface - { - friend gboolean mediaPlayerPrivateErrorCallback(GstBus* bus, GstMessage* message, gpointer data); - friend gboolean mediaPlayerPrivateEOSCallback(GstBus* bus, GstMessage* message, gpointer data); - friend gboolean mediaPlayerPrivateStateCallback(GstBus* bus, GstMessage* message, gpointer data); - - public: - - static void registerMediaEngine(MediaEngineRegistrar); - ~MediaPlayerPrivate(); - - IntSize naturalSize() const; - bool hasVideo() const; - - void load(const String &url); - void cancelLoad(); - - void play(); - void pause(); - - bool paused() const; - bool seeking() const; - - float duration() const; - float currentTime() const; - void seek(float); - void setEndTime(float); - - void setRate(float); - void setVolume(float); - void setMuted(bool); - - int dataRate() const; - - MediaPlayer::NetworkState networkState() const; - MediaPlayer::ReadyState readyState() const; - - float maxTimeBuffered() const; - float maxTimeSeekable() const; - unsigned bytesLoaded() const; - bool totalBytesKnown() const; - unsigned totalBytes() const; - - void setVisible(bool); - void setSize(const IntSize&); - - void loadStateChanged(); - void rateChanged(); - void sizeChanged(); - void timeChanged(); - void volumeChanged(); - void didEnd(); - void loadingFailed(); - - void repaint(); - void paint(GraphicsContext*, const IntRect&); - - private: - - MediaPlayerPrivate(MediaPlayer*); - static MediaPlayerPrivateInterface* create(MediaPlayer* player); - - static void getSupportedTypes(HashSet<String>&); - static MediaPlayer::SupportsType supportsType(const String& type, const String& codecs); - static bool isAvailable() { return true; } - - void updateStates(); - void cancelSeek(); - void endPointTimerFired(Timer<MediaPlayerPrivate>*); - float maxTimeLoaded() const; - void startEndPointTimerIfNeeded(); - - void createGSTPlayBin(String url); - - private: - MediaPlayer* m_player; - GstElement* m_playBin; - GstElement* m_videoSink; - GstElement* m_source; - float m_rate; - float m_endTime; - bool m_isEndReached; - double m_volume; - MediaPlayer::NetworkState m_networkState; - MediaPlayer::ReadyState m_readyState; - bool m_startedPlaying; - mutable bool m_isStreaming; - IntSize m_size; - bool m_visible; - cairo_surface_t* m_surface; + class MediaPlayerPrivate : public MediaPlayerPrivateInterface { + friend gboolean mediaPlayerPrivateErrorCallback(GstBus* bus, GstMessage* message, gpointer data); + friend gboolean mediaPlayerPrivateEOSCallback(GstBus* bus, GstMessage* message, gpointer data); + friend gboolean mediaPlayerPrivateStateCallback(GstBus* bus, GstMessage* message, gpointer data); + + public: + static void registerMediaEngine(MediaEngineRegistrar); + ~MediaPlayerPrivate(); + + IntSize naturalSize() const; + bool hasVideo() const; + + void load(const String &url); + void cancelLoad(); + + void play(); + void pause(); + + bool paused() const; + bool seeking() const; + + float duration() const; + float currentTime() const; + void seek(float); + void setEndTime(float); + + void setRate(float); + void setVolume(float); + void setMuted(bool); + + int dataRate() const; + + MediaPlayer::NetworkState networkState() const; + MediaPlayer::ReadyState readyState() const; + + float maxTimeBuffered() const; + float maxTimeSeekable() const; + unsigned bytesLoaded() const; + bool totalBytesKnown() const; + unsigned totalBytes() const; + + void setVisible(bool); + void setSize(const IntSize&); + + void loadStateChanged(); + void rateChanged(); + void sizeChanged(); + void timeChanged(); + void volumeChanged(); + void didEnd(); + void loadingFailed(); + + void repaint(); + void paint(GraphicsContext*, const IntRect&); + + private: + MediaPlayerPrivate(MediaPlayer*); + static MediaPlayerPrivateInterface* create(MediaPlayer* player); + + static void getSupportedTypes(HashSet<String>&); + static MediaPlayer::SupportsType supportsType(const String& type, const String& codecs); + static bool isAvailable() { return true; } + + void updateStates(); + void cancelSeek(); + void endPointTimerFired(Timer<MediaPlayerPrivate>*); + float maxTimeLoaded() const; + void startEndPointTimerIfNeeded(); + + void createGSTPlayBin(String url); + + private: + MediaPlayer* m_player; + GstElement* m_playBin; + GstElement* m_videoSink; + GstElement* m_source; + float m_rate; + float m_endTime; + bool m_isEndReached; + double m_volume; + MediaPlayer::NetworkState m_networkState; + MediaPlayer::ReadyState m_readyState; + bool m_startedPlaying; + mutable bool m_isStreaming; + IntSize m_size; + bool m_visible; + cairo_surface_t* m_surface; }; } diff --git a/WebCore/platform/graphics/gtk/SimpleFontDataGtk.cpp b/WebCore/platform/graphics/gtk/SimpleFontDataGtk.cpp index 6684108..a77c1cf 100644 --- a/WebCore/platform/graphics/gtk/SimpleFontDataGtk.cpp +++ b/WebCore/platform/graphics/gtk/SimpleFontDataGtk.cpp @@ -99,7 +99,7 @@ bool SimpleFontData::containsCharacters(const UChar* characters, int length) con if (!face) return false; - for (unsigned i = 0; i < length; i++) { + for (int i = 0; i < length; i++) { if (FcFreeTypeCharIndex(face, characters[i]) == 0) { cairo_ft_scaled_font_unlock_face(m_platformData.m_scaledFont); return false; diff --git a/WebCore/platform/graphics/gtk/VideoSinkGStreamer.cpp b/WebCore/platform/graphics/gtk/VideoSinkGStreamer.cpp index 436841c..f049998 100644 --- a/WebCore/platform/graphics/gtk/VideoSinkGStreamer.cpp +++ b/WebCore/platform/graphics/gtk/VideoSinkGStreamer.cpp @@ -40,10 +40,10 @@ GST_DEBUG_CATEGORY_STATIC(webkit_video_sink_debug); #define GST_CAT_DEFAULT webkit_video_sink_debug static GstElementDetails webkit_video_sink_details = - GST_ELEMENT_DETAILS((gchar*) "WebKit video sink", - (gchar*) "Sink/Video", - (gchar*) "Sends video data from a GStreamer pipeline to a Cairo surface", - (gchar*) "Alp Toker <alp@atoker.com>"); + GST_ELEMENT_DETAILS((gchar*) "WebKit video sink", + (gchar*) "Sink/Video", + (gchar*) "Sends video data from a GStreamer pipeline to a Cairo surface", + (gchar*) "Alp Toker <alp@atoker.com>"); enum { REPAINT_REQUESTED, @@ -70,10 +70,10 @@ struct _WebKitVideoSinkPrivate { }; #define _do_init(bla) \ - GST_DEBUG_CATEGORY_INIT (webkit_video_sink_debug, \ - "webkitsink", \ - 0, \ - "webkit video sink") + GST_DEBUG_CATEGORY_INIT(webkit_video_sink_debug, \ + "webkitsink", \ + 0, \ + "webkit video sink") GST_BOILERPLATE_FULL(WebKitVideoSink, webkit_video_sink, @@ -110,11 +110,11 @@ webkit_video_sink_idle_func(gpointer data) return FALSE; buffer = (GstBuffer*)g_async_queue_try_pop(priv->async_queue); - if (buffer == NULL || G_UNLIKELY(!GST_IS_BUFFER(buffer))) + if (!buffer || G_UNLIKELY(!GST_IS_BUFFER(buffer))) return FALSE; // TODO: consider priv->rgb_ordering? - cairo_surface_t* src = cairo_image_surface_create_for_data(GST_BUFFER_DATA(buffer), CAIRO_FORMAT_RGB24, priv->width, priv->height, (4 * priv->width + 3) & ~ 3); + cairo_surface_t* src = cairo_image_surface_create_for_data(GST_BUFFER_DATA(buffer), CAIRO_FORMAT_RGB24, priv->width, priv->height, (4 * priv->width + 3) & ~3); // TODO: We copy the data twice right now. This could be easily improved. cairo_t* cr = cairo_create(priv->surface); @@ -139,7 +139,7 @@ webkit_video_sink_render(GstBaseSink* bsink, GstBuffer* buffer) WebKitVideoSinkPrivate* priv = sink->priv; g_async_queue_push(priv->async_queue, gst_buffer_ref(buffer)); - g_idle_add_full(G_PRIORITY_HIGH_IDLE, webkit_video_sink_idle_func, sink, NULL); + g_idle_add_full(G_PRIORITY_HIGH_IDLE, webkit_video_sink_idle_func, sink, 0); return GST_FLOW_OK; } @@ -168,7 +168,7 @@ webkit_video_sink_set_caps(GstBaseSink* bsink, GstCaps* caps) ret = gst_structure_get_int(structure, "width", &width); ret &= gst_structure_get_int(structure, "height", &height); fps = gst_structure_get_value(structure, "framerate"); - ret &= (fps != NULL); + ret &= (fps != 0); par = gst_structure_get_value(structure, "pixel-aspect-ratio"); @@ -202,12 +202,12 @@ webkit_video_sink_dispose(GObject* object) if (priv->surface) { cairo_surface_destroy(priv->surface); - priv->surface = NULL; + priv->surface = 0; } if (priv->async_queue) { g_async_queue_unref(priv->async_queue); - priv->async_queue = NULL; + priv->async_queue = 0; } G_OBJECT_CLASS(parent_class)->dispose(object); @@ -260,7 +260,7 @@ webkit_video_sink_stop(GstBaseSink* base_sink) g_async_queue_lock(priv->async_queue); /* Remove all remaining objects from the queue */ - while(GstBuffer* buffer = (GstBuffer*)g_async_queue_try_pop_unlocked(priv->async_queue)) + while (GstBuffer* buffer = (GstBuffer*)g_async_queue_try_pop_unlocked(priv->async_queue)) gst_buffer_unref(buffer); g_async_queue_unlock(priv->async_queue); @@ -291,8 +291,8 @@ webkit_video_sink_class_init(WebKitVideoSinkClass* klass) G_TYPE_FROM_CLASS(klass), (GSignalFlags)(G_SIGNAL_RUN_LAST | G_SIGNAL_ACTION), 0, - NULL, - NULL, + 0, + 0, g_cclosure_marshal_VOID__VOID, G_TYPE_NONE, 0); @@ -314,7 +314,7 @@ webkit_video_sink_class_init(WebKitVideoSinkClass* klass) GstElement* webkit_video_sink_new(cairo_surface_t* surface) { - return (GstElement*)g_object_new(WEBKIT_TYPE_VIDEO_SINK, "surface", surface, NULL); + return (GstElement*)g_object_new(WEBKIT_TYPE_VIDEO_SINK, "surface", surface, 0); } void diff --git a/WebCore/platform/graphics/gtk/VideoSinkGStreamer.h b/WebCore/platform/graphics/gtk/VideoSinkGStreamer.h index 2a706fb..be2c94c 100644 --- a/WebCore/platform/graphics/gtk/VideoSinkGStreamer.h +++ b/WebCore/platform/graphics/gtk/VideoSinkGStreamer.h @@ -29,54 +29,52 @@ G_BEGIN_DECLS #define WEBKIT_TYPE_VIDEO_SINK webkit_video_sink_get_type() #define WEBKIT_VIDEO_SINK(obj) \ - (G_TYPE_CHECK_INSTANCE_CAST ((obj), \ - WEBKIT_TYPE_VIDEO_SINK, WebKitVideoSink)) + (G_TYPE_CHECK_INSTANCE_CAST((obj), \ + WEBKIT_TYPE_VIDEO_SINK, WebKitVideoSink)) #define WEBKIT_VIDEO_SINK_CLASS(klass) \ - (G_TYPE_CHECK_CLASS_CAST ((klass), \ - WEBKIT_TYPE_VIDEO_SINK, WebKitVideoSinkClass)) + (G_TYPE_CHECK_CLASS_CAST((klass), \ + WEBKIT_TYPE_VIDEO_SINK, WebKitVideoSinkClass)) #define WEBKIT_IS_VIDEO_SINK(obj) \ - (G_TYPE_CHECK_INSTANCE_TYPE ((obj), \ - WEBKIT_TYPE_VIDEO_SINK)) + (G_TYPE_CHECK_INSTANCE_TYPE((obj), \ + WEBKIT_TYPE_VIDEO_SINK)) #define WEBKIT_IS_VIDEO_SINK_CLASS(klass) \ - (G_TYPE_CHECK_CLASS_TYPE ((klass), \ - WEBKIT_TYPE_VIDEO_SINK)) + (G_TYPE_CHECK_CLASS_TYPE((klass), \ + WEBKIT_TYPE_VIDEO_SINK)) #define WEBKIT_VIDEO_SINK_GET_CLASS(obj) \ - (G_TYPE_INSTANCE_GET_CLASS ((obj), \ - WEBKIT_TYPE_VIDEO_SINK, WebKitVideoSinkClass)) + (G_TYPE_INSTANCE_GET_CLASS((obj), \ + WEBKIT_TYPE_VIDEO_SINK, WebKitVideoSinkClass)) typedef struct _WebKitVideoSink WebKitVideoSink; typedef struct _WebKitVideoSinkClass WebKitVideoSinkClass; typedef struct _WebKitVideoSinkPrivate WebKitVideoSinkPrivate; -struct _WebKitVideoSink -{ - /*< private >*/ - GstBaseSink parent; - WebKitVideoSinkPrivate *priv; +struct _WebKitVideoSink { + /*< private >*/ + GstBaseSink parent; + WebKitVideoSinkPrivate *priv; }; -struct _WebKitVideoSinkClass -{ - /*< private >*/ - GstBaseSinkClass parent_class; - - /* Future padding */ - void (* _webkit_reserved1) (void); - void (* _webkit_reserved2) (void); - void (* _webkit_reserved3) (void); - void (* _webkit_reserved4) (void); - void (* _webkit_reserved5) (void); - void (* _webkit_reserved6) (void); +struct _WebKitVideoSinkClass { + /*< private >*/ + GstBaseSinkClass parent_class; + + /* Future padding */ + void (* _webkit_reserved1)(void); + void (* _webkit_reserved2)(void); + void (* _webkit_reserved3)(void); + void (* _webkit_reserved4)(void); + void (* _webkit_reserved5)(void); + void (* _webkit_reserved6)(void); }; -GType webkit_video_sink_get_type (void) G_GNUC_CONST; -GstElement *webkit_video_sink_new (cairo_surface_t *surface); +GType webkit_video_sink_get_type(void) G_GNUC_CONST; +GstElement *webkit_video_sink_new(cairo_surface_t *surface); -void webkit_video_sink_set_surface (WebKitVideoSink *sink, cairo_surface_t *surface); +void webkit_video_sink_set_surface(WebKitVideoSink *sink, cairo_surface_t *surface); G_END_DECLS |