btrfs: Attempt to fix GCC2 build.
[haiku.git] / src / apps / mediaplayer / media_node_framework / PlaybackLOAdapter.cpp
blob67341235ba6741b0784cce50c0a3528a34321e68
1 /*
2 * Copyright (c) 2000-2008, Ingo Weinhold <ingo_weinhold@gmx.de>,
3 * Copyright (c) 2000-2008, Stephan Aßmus <superstippi@gmx.de>,
4 * All Rights Reserved. Distributed under the terms of the MIT license.
5 */
6 #include <Message.h>
8 #include "PlaybackLOAdapter.h"
11 PlaybackLOAdapter::PlaybackLOAdapter(BHandler* handler)
12 : AbstractLOAdapter(handler)
17 PlaybackLOAdapter::PlaybackLOAdapter(const BMessenger& messenger)
18 : AbstractLOAdapter(messenger)
23 PlaybackLOAdapter::~PlaybackLOAdapter()
28 void
29 PlaybackLOAdapter::PlayModeChanged(int32 mode)
31 BMessage message(MSG_PLAYBACK_PLAY_MODE_CHANGED);
32 message.AddInt32("play mode", mode);
33 DeliverMessage(message);
37 void
38 PlaybackLOAdapter::LoopModeChanged(int32 mode)
40 BMessage message(MSG_PLAYBACK_LOOP_MODE_CHANGED);
41 message.AddInt32("loop mode", mode);
42 DeliverMessage(message);
46 void
47 PlaybackLOAdapter::LoopingEnabledChanged(bool enabled)
49 BMessage message(MSG_PLAYBACK_LOOPING_ENABLED_CHANGED);
50 message.AddBool("looping enabled", enabled);
51 DeliverMessage(message);
55 void
56 PlaybackLOAdapter::VideoBoundsChanged(BRect bounds)
58 BMessage message(MSG_PLAYBACK_VIDEO_BOUNDS_CHANGED);
59 message.AddRect("video bounds", bounds);
60 DeliverMessage(message);
64 void
65 PlaybackLOAdapter::FramesPerSecondChanged(float fps)
67 BMessage message(MSG_PLAYBACK_FPS_CHANGED);
68 message.AddFloat("fps", fps);
69 DeliverMessage(message);
73 void
74 PlaybackLOAdapter::CurrentFrameChanged(double frame)
76 BMessage message(MSG_PLAYBACK_CURRENT_FRAME_CHANGED);
77 message.AddDouble("current frame", frame);
78 DeliverMessage(message);
82 void
83 PlaybackLOAdapter::SpeedChanged(float speed)
85 BMessage message(MSG_PLAYBACK_SPEED_CHANGED);
86 message.AddFloat("speed", speed);
87 DeliverMessage(message);
91 void
92 PlaybackLOAdapter::FrameDropped()
94 DeliverMessage(MSG_PLAYBACK_FRAME_DROPPED);