Commit 03ae3678 authored by Eric Petit's avatar Eric Petit

BeOS enhancements by Stephan Assmus :

  - many fixes
  - added ability to open a file by dropping it onto the vlc icon
  - blanks cursor when no activity
  - added "Speed" menu
  - made nicer look similar to BeOS MediaPlayer
  - playlist now functioning
  - screen capture option
  - and more...
parent 4af142c4
......@@ -3273,7 +3273,7 @@ fi
save_CFLAGS="${save_CFLAGS} -Wno-multichar -Wno-ctor-dtor-privacy -Woverloaded-virtual"
vlc_LDFLAGS="${vlc_LDFLAGS} -lbe"
plugins_LDFLAGS="${plugins_LDFLAGS} -nostart"
beos_LDFLAGS="${beos_LDFLAGS} -lbe -lgame -lroot -ltracker -lstdc++.r4"
beos_LDFLAGS="${beos_LDFLAGS} -lbe -lgame -lroot -ltracker -ltranslation -lstdc++.r4"
ipv4_LDFLAGS="${ipv4_LDFLAGS} -lbind"
;;
x*)
......
......@@ -93,7 +93,7 @@ case x"${target_os}" in
save_CFLAGS="${save_CFLAGS} -Wno-multichar -Wno-ctor-dtor-privacy -Woverloaded-virtual"
vlc_LDFLAGS="${vlc_LDFLAGS} -lbe"
plugins_LDFLAGS="${plugins_LDFLAGS} -nostart"
beos_LDFLAGS="${beos_LDFLAGS} -lbe -lgame -lroot -ltracker -lstdc++.r4"
beos_LDFLAGS="${beos_LDFLAGS} -lbe -lgame -lroot -ltracker -ltranslation -lstdc++.r4"
ipv4_LDFLAGS="${ipv4_LDFLAGS} -lbind"
;;
x*)
......
......@@ -2,7 +2,7 @@
* Bitmaps.h
*****************************************************************************
* Copyright (C) 2001 VideoLAN
* $Id: Bitmaps.h,v 1.4.4.1 2002/09/03 12:00:24 tcastley Exp $
* $Id: Bitmaps.h,v 1.4.4.2 2002/09/29 12:04:27 titer Exp $
*
* Authors: Tony Castley <tcastley@mail.powerup.com.au>
* Stephan Aßmus <stippi@yellowbites.com>
......
......@@ -2,7 +2,7 @@
* DrawingTidbits.cpp
*****************************************************************************
* Copyright (C) 2001 VideoLAN
* $Id: DrawingTidbits.cpp,v 1.2.4.1 2002/09/03 12:00:24 tcastley Exp $
* $Id: DrawingTidbits.cpp,v 1.2.4.2 2002/09/29 12:04:27 titer Exp $
*
* Authors: Tony Castley <tcastley@mail.powerup.com.au>
* Stephan Aßmus <stippi@yellowbites.com>
......@@ -22,6 +22,8 @@
* Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111, USA.
*****************************************************************************/
#include <math.h>
#include <Bitmap.h>
#include <Debug.h>
#include <Screen.h>
......@@ -111,61 +113,247 @@ ReplaceTransparentColor(BBitmap *bitmap, rgb_color with)
bits[index] = withIndex;
}
// ycrcb_to_rgb
inline void
ycbcr_to_rgb( uint8 y, uint8 cb, uint8 cr,
uint8& r, uint8& g, uint8& b)
{
r = (uint8)max_c( 0, min_c( 255, 1.164 * ( y - 16 ) + 1.596 * ( cr - 128 ) ) );
g = (uint8)max_c( 0, min_c( 255, 1.164 * ( y - 16 ) - 0.813 * ( cr - 128 )
- 0.391 * ( cb - 128 ) ) );
b = (uint8)max_c( 0, min_c( 255, 1.164 * ( y - 16 ) + 2.018 * ( cb - 128 ) ) );
}
// this function will not produce visually pleasing results!
// we'd have to convert to Lab colorspace, do the mixing
// and convert back to RGB - in an ideal world...
//
// mix_colors
inline void
mix_colors( uint8 ra, uint8 ga, uint8 ba,
uint8 rb, uint8 gb, uint8 bb,
uint8& r, uint8& g, uint8& b, float mixLevel )
{
float mixA = ( 1.0 - mixLevel );
float mixB = mixLevel;
r = (uint8)(mixA * ra + mixB * rb);
g = (uint8)(mixA * ga + mixB * gb);
b = (uint8)(mixA * ba + mixB * bb);
}
// the algorithm used is probably pretty slow, but it should be easy
// to understand what's going on...
//
// scale_bitmap
status_t
scale_bitmap( BBitmap* bitmap, uint32 fromWidth, uint32 fromHeight )
{
status_t status = B_BAD_VALUE;
if ( bitmap && bitmap->IsValid()
&& ( bitmap->ColorSpace() == B_RGB32 || bitmap->ColorSpace() == B_RGBA32 ) )
{
status = B_MISMATCHED_VALUES;
// we only support upscaling as of now
uint32 destWidth = bitmap->Bounds().IntegerWidth() + 1;
uint32 destHeight = bitmap->Bounds().IntegerHeight() + 1;
if ( fromWidth <= destWidth && fromHeight <= destHeight )
{
status = B_OK;
uint32 bpr = bitmap->BytesPerRow();
if ( fromWidth < destWidth )
{
// scale horizontally
uint8* src = (uint8*)bitmap->Bits();
uint8* p = new uint8[fromWidth * 4]; // temp buffer
for ( uint32 y = 0; y < fromHeight; y++ )
{
// copy valid pixels into temp buffer
memcpy( p, src, fromWidth * 4 );
for ( uint32 x = 0; x < destWidth; x++ )
{
// mix colors of left and right pixels and write it back
// into the bitmap
float xPos = ( (float)x / (float)destWidth ) * (float)fromWidth;
uint32 leftIndex = (uint32)floorf( xPos ) * 4;
uint32 rightIndex = (uint32)ceilf( xPos ) * 4;
rgb_color left;
left.red = p[leftIndex + 2];
left.green = p[leftIndex + 1];
left.blue = p[leftIndex + 0];
rgb_color right;
right.red = p[rightIndex + 2];
right.green = p[rightIndex + 1];
right.blue = p[rightIndex + 0];
rgb_color mix;
mix_colors( left.red, left.green, left.blue,
right.red, right.green, right.blue,
mix.red, mix.green, mix.blue, xPos - floorf( xPos ) );
uint32 destIndex = x * 4;
src[destIndex + 2] = mix.red;
src[destIndex + 1] = mix.green;
src[destIndex + 0] = mix.blue;
}
src += bpr;
}
delete[] p;
}
if ( fromHeight < destHeight )
{
// scale vertically
uint8* src = (uint8*)bitmap->Bits();
uint8* p = new uint8[fromHeight * 3]; // temp buffer
for ( uint32 x = 0; x < destWidth; x++ )
{
// copy valid pixels into temp buffer
for ( uint32 y = 0; y < fromHeight; y++ )
{
uint32 destIndex = y * 3;
uint32 srcIndex = x * 4 + y * bpr;
p[destIndex + 0] = src[srcIndex + 0];
p[destIndex + 1] = src[srcIndex + 1];
p[destIndex + 2] = src[srcIndex + 2];
}
// do the scaling
for ( uint32 y = 0; y < destHeight; y++ )
{
// mix colors of upper and lower pixels and write it back
// into the bitmap
float yPos = ( (float)y / (float)destHeight ) * (float)fromHeight;
uint32 upperIndex = (uint32)floorf( yPos ) * 3;
uint32 lowerIndex = (uint32)ceilf( yPos ) * 3;
rgb_color upper;
upper.red = p[upperIndex + 2];
upper.green = p[upperIndex + 1];
upper.blue = p[upperIndex + 0];
rgb_color lower;
lower.red = p[lowerIndex + 2];
lower.green = p[lowerIndex + 1];
lower.blue = p[lowerIndex + 0];
rgb_color mix;
mix_colors( upper.red, upper.green, upper.blue,
lower.red, lower.green, lower.blue,
mix.red, mix.green, mix.blue, yPos - floorf( yPos ) );
uint32 destIndex = x * 4 + y * bpr;
src[destIndex + 2] = mix.red;
src[destIndex + 1] = mix.green;
src[destIndex + 0] = mix.blue;
}
}
delete[] p;
}
}
}
return status;
}
// convert_bitmap
status_t
convert_bitmap(BBitmap* inBitmap, BBitmap* outBitmap)
convert_bitmap( BBitmap* inBitmap, BBitmap* outBitmap )
{
status_t status = B_BAD_VALUE;
/* // see that we got valid bitmaps
if (inBitmap && inBitmap->IsValid()
&& outBitmap && outBitmap->IsValid())
// see that we got valid bitmaps
if ( inBitmap && inBitmap->IsValid()
&& outBitmap && outBitmap->IsValid() )
{
status = B_MISMATCHED_VALUES;
// see that bitmaps are compatible and that we support the conversion
if (inBitmap->Bounds().Width() == outBitmap->Bounds().Width()
&& inBitmap->Bounds().Height() == outBitmap->Bounds().Height()
&& (outBitmap->ColorSpace() == B_RGB32
|| outBitmap->ColorSpace() == B_RGBA32))
if ( inBitmap->Bounds().Width() <= outBitmap->Bounds().Width()
&& inBitmap->Bounds().Height() <= outBitmap->Bounds().Height()
&& ( outBitmap->ColorSpace() == B_RGB32
|| outBitmap->ColorSpace() == B_RGBA32) )
{
int32 width = inBitmap->Bounds().IntegerWidth() + 1;
int32 height = inBitmap->Bounds().IntegerHeight() + 1;
int32 srcBpr = inBitmap->BytesPerRow();
int32 dstBpr = outBitmap->BytesPerRow();
uint8* srcbits = (uint8*)inbitmap->bits();
uint8* dstbits = (uint8*)outbitmap->bits();
uint8* srcBits = (uint8*)inBitmap->Bits();
uint8* dstBits = (uint8*)outBitmap->Bits();
switch (inBitmap->ColorSpace())
{
case B_YCbCr422:
for (int32 y = 0; y < height; y ++)
// Y0[7:0] Cb0[7:0] Y1[7:0] Cr0[7:0]
// Y2[7:0] Cb2[7:0] Y3[7:0] Cr2[7:0]
for ( int32 y = 0; y < height; y++ )
{
for (int32 x = 0; x < width; x += 2)
for ( int32 x = 0; x < width; x += 2 )
{
uint8 y =
uint8 cb =
uint8 cr =
int32 srcOffset = x * 2;
int32 dstOffset = x * 4;
ycbcr_to_rgb( srcBits[srcOffset + 0],
srcBits[srcOffset + 1],
srcBits[srcOffset + 3],
dstBits[dstOffset + 2],
dstBits[dstOffset + 1],
dstBits[dstOffset + 0] );
ycbcr_to_rgb( srcBits[srcOffset + 2],
srcBits[srcOffset + 1],
srcBits[srcOffset + 3],
dstBits[dstOffset + 6],
dstBits[dstOffset + 5],
dstBits[dstOffset + 4] );
// take care of alpha
dstBits[x * 4 + 3] = 255;
dstBits[x * 4 + 7] = 255;
}
srcbits += srcBpr;
dstbits += dstBpr;
srcBits += srcBpr;
dstBits += dstBpr;
}
status = B_OK;
break;
case B_YCbCr420:
status = B_OK;
// Non-interlaced only!
// Cb0 Y0 Y1 Cb2 Y2 Y3 on even scan lines ...
// Cr0 Y0 Y1 Cr2 Y2 Y3 on odd scan lines
status = B_ERROR;
break;
case B_YUV422:
status = B_OK;
// U0[7:0] Y0[7:0] V0[7:0] Y1[7:0]
// U2[7:0] Y2[7:0] V2[7:0] Y3[7:0]
status = B_ERROR;
break;
case B_RGB32:
memcpy(dstBits, srcBits, inBitmap->BitsLength());
case B_RGBA32:
memcpy( dstBits, srcBits, inBitmap->BitsLength() );
status = B_OK;
break;
case B_RGB16:
// G[2:0],B[4:0] R[4:0],G[5:3]
for ( int32 y = 0; y < height; y ++ )
{
for ( int32 x = 0; x < width; x++ )
{
int32 srcOffset = x * 2;
int32 dstOffset = x * 4;
uint8 blue = srcBits[srcOffset + 0] & 0x1f;
uint8 green = ( srcBits[srcOffset + 0] >> 5 )
| ( ( srcBits[srcOffset + 1] & 0x07 ) << 3 );
uint8 red = srcBits[srcOffset + 1] & 0xf8;
// homogeneously scale each component to 8 bit
dstBits[dstOffset + 0] = (blue << 3) | (blue >> 2);
dstBits[dstOffset + 1] = (green << 2) | (green >> 4);
dstBits[dstOffset + 2] = red | (red >> 5);
}
srcBits += srcBpr;
dstBits += dstBpr;
}
status = B_OK;
break;
default:
//printf("unkown colorspace: %ld\n", inBitmap->ColorSpace());
status = B_MISMATCHED_VALUES;
break;
}
if ( status == B_OK )
{
if ( width < outBitmap->Bounds().IntegerWidth() + 1
|| height < outBitmap->Bounds().IntegerHeight() + 1 )
{
scale_bitmap( outBitmap, width, height );
}
}
}
}*/
}
return status;
}
......
......@@ -2,7 +2,7 @@
* DrawingTidbits.h
*****************************************************************************
* Copyright (C) 2001 VideoLAN
* $Id: DrawingTidbits.h,v 1.2.4.1 2002/09/03 12:00:25 tcastley Exp $
* $Id: DrawingTidbits.h,v 1.2.4.2 2002/09/29 12:04:27 titer Exp $
*
* Authors: Tony Castley <tcastley@mail.powerup.com.au>
* Stephan Aßmus <stippi@yellowbites.com>
......@@ -52,13 +52,23 @@ const float kDimLevel = 0.6;
void ReplaceColor(BBitmap *bitmap, rgb_color from, rgb_color to);
void ReplaceTransparentColor(BBitmap *bitmap, rgb_color with);
// function can be used to scale the upper left part of
// a bitmap to fill the entire bitmap, ie fromWidth
// and fromHeight must be smaller or equal to the bitmaps size!
// only supported colorspaces are B_RGB32 and B_RGBA32
status_t scale_bitmap( BBitmap* bitmap,
uint32 fromWidth, uint32 fromHeight );
// bitmaps need to be the same size, or this function will fail
// currently supported conversions:
// B_YCbCr422 -> B_RGB32
// B_RGB32 -> B_RGB32
// B_RGB16 -> B_RGB32
// not yet implemented conversions:
// B_YCbCr420 -> B_RGB32
// B_YUV422 -> B_RGB32
// B_RGB32 -> B_RGB32
//status_t convert_bitmap(BBitmap* inBitmap, BBitmap* outBitmap);
status_t convert_bitmap(BBitmap* inBitmap, BBitmap* outBitmap);
// dims bitmap (in place) by finding the distance of
// the color at each pixel to the provided "center" color
......
This diff is collapsed.
......@@ -2,7 +2,7 @@
* InterfaceWindow.h: BeOS interface window class prototype
*****************************************************************************
* Copyright (C) 1999, 2000, 2001 VideoLAN
* $Id: InterfaceWindow.h,v 1.12.2.3 2002/09/03 12:00:25 tcastley Exp $
* $Id: InterfaceWindow.h,v 1.12.2.4 2002/09/29 12:04:27 titer Exp $
*
* Authors: Jean-Marc Dressler <polux@via.ecp.fr>
* Tony Castley <tcastley@mail.powerup.com.au>
......@@ -38,42 +38,62 @@ class BFilePanel;
class CDMenu : public BMenu
{
public:
CDMenu(const char* name);
CDMenu( const char* name );
virtual ~CDMenu();
virtual void AttachedToWindow(void);
virtual void AttachedToWindow();
private:
int GetCD(const char* directory);
int GetCD( const char* directory );
};
class LanguageMenu : public BMenu
{
public:
LanguageMenu(const char* name,
int menu_kind,
intf_thread_t* p_interface);
LanguageMenu( const char* name,
int menu_kind,
intf_thread_t* p_interface );
virtual ~LanguageMenu();
virtual void AttachedToWindow(void);
virtual void AttachedToWindow();
private:
void _GetChannels();
intf_thread_t* p_intf;
int kind;
int GetChannels();
};
class TitleMenu : public BMenu
{
public:
TitleMenu( const char* name );
virtual ~TitleMenu();
virtual void AttachedToWindow();
};
class ChapterMenu : public BMenu
{
public:
ChapterMenu( const char* name );
virtual ~ChapterMenu();
virtual void AttachedToWindow();
};
class InterfaceWindow : public BWindow
{
public:
InterfaceWindow(BRect frame,
const char* name,
intf_thread_t* p_interface);
InterfaceWindow( BRect frame,
const char* name,
intf_thread_t* p_interface );
virtual ~InterfaceWindow();
// standard window member
virtual void FrameResized(float width, float height);
virtual void MessageReceived(BMessage* message);
// BWindow
virtual void FrameResized( float width, float height );
virtual void MessageReceived( BMessage* message );
virtual bool QuitRequested();
// InterfaceWindow
......@@ -83,28 +103,48 @@ class InterfaceWindow : public BWindow
MediaControlView* p_mediaControl;
private:
void _SetMenusEnabled(bool hasFile,
bool hasChapters = false,
bool hasTitles = false);
void _UpdatePlaylist();
void _SetMenusEnabled( bool hasFile,
bool hasChapters = false,
bool hasTitles = false );
void _UpdateSpeedMenu( int rate );
void _InputStreamChanged();
status_t _LoadSettings( BMessage* message,
const char* fileName,
const char* subFolder = NULL );
status_t _SaveSettings( BMessage* message,
const char* fileName,
const char* subFolder = NULL );
void _RestoreSettings();
void _StoreSettings();
intf_thread_t* p_intf;
bool b_empty_playlist;
BFilePanel* file_panel;
PlayListWindow* playlist_window;
BMenuItem* miOnTop;
es_descriptor_t* p_audio_es;
es_descriptor_t* p_spu_es;
input_thread_s* fInputThread;
bool fPlaylistIsEmpty;
BFilePanel* fFilePanel;
PlayListWindow* fPlaylistWindow;
BMenuBar* fMenuBar;
BMenuItem* fNextTitleMI;
BMenuItem* fPrevTitleMI;
BMenuItem* fNextChapterMI;
BMenuItem* fPrevChapterMI;
BMenuItem* fOnTopMI;
BMenuItem* fSlowerMI;
BMenuItem* fNormalMI;
BMenuItem* fFasterMI;
BMenu* fAudioMenu;
BMenu* fNavigationMenu;
BMenu* fTitleMenu;
BMenu* fChapterMenu;
BMenu* fLanguageMenu;
BMenu* fSubtitlesMenu;
BMenu* fSpeedMenu;
bigtime_t fLastUpdateTime;
BMessage* fSettings; // we keep the message arround
// for forward compatibility
};
#endif // BEOS_INTERFACE_WINDOW_H
beos_SOURCES = beos.cpp aout_beos.cpp vout_beos.cpp intf_beos.cpp InterfaceWindow.cpp DrawingTidbits.cpp TransportButton.cpp PlayListWindow.cpp MediaControlView.cpp intf_vlc_wrapper.cpp
beos_SOURCES = beos.cpp aout_beos.cpp vout_beos.cpp intf_beos.cpp InterfaceWindow.cpp DrawingTidbits.cpp TransportButton.cpp PlayListWindow.cpp MediaControlView.cpp intf_vlc_wrapper.cpp ListViews.cpp
......@@ -2,7 +2,7 @@
* MediaControlView.cpp: beos interface
*****************************************************************************
* Copyright (C) 1999, 2000, 2001 VideoLAN
* $Id: MediaControlView.cpp,v 1.7.2.2 2002/09/03 12:00:24 tcastley Exp $
* $Id: MediaControlView.cpp,v 1.7.2.3 2002/09/29 12:04:27 titer Exp $
*
* Authors: Tony Castley <tony@castley.net>
* Stephan Aßmus <stippi@yellowbites.com>
......@@ -172,7 +172,7 @@ MediaControlView::MediaControlView(BRect frame)
// Volume Slider
fVolumeSlider = new VolumeSlider(BRect(0.0, 0.0, VOLUME_MIN_WIDTH,
kVolumeSliderBitmapHeight - 1.0),
"volume slider", 0, VOLUME_MAX,
"volume slider", 1, VOLUME_MAX,
new BMessage(VOLUME_CHG));
fVolumeSlider->SetValue(VOLUME_DEFAULT);
AddChild( fVolumeSlider );
......@@ -257,10 +257,10 @@ MediaControlView::MessageReceived(BMessage* message)
case MSG_FORWARD:
break;
case MSG_SKIP_BACKWARDS:
Window()->PostMessage(PREV_CHAPTER);
Window()->PostMessage(NAVIGATE_PREV);
break;
case MSG_SKIP_FORWARD:
Window()->PostMessage(NEXT_CHAPTER);
Window()->PostMessage(NAVIGATE_NEXT);
break;
default:
BBox::MessageReceived(message);
......@@ -333,6 +333,14 @@ MediaControlView::SetEnabled(bool enabled)
fForward->SetEnabled(enabled);
}
// SetAudioEnabled
void
MediaControlView::SetAudioEnabled(bool enabled)
{
fMute->SetEnabled(enabled);
fVolumeSlider->SetEnabled(enabled);
}
// GetSeekTo
uint32
MediaControlView::GetSeekTo() const
......
......@@ -2,7 +2,7 @@
* MediaControlView.h: beos interface
*****************************************************************************
* Copyright (C) 1999, 2000, 2001 VideoLAN
* $Id: MediaControlView.h,v 1.2.4.1 2002/09/03 12:00:25 tcastley Exp $
* $Id: MediaControlView.h,v 1.2.4.2 2002/09/29 12:04:27 titer Exp $
*
* Authors: Tony Castley <tony@castley.net>
* Stephan Aßmus <stippi@yellowbites.com>
......@@ -52,6 +52,7 @@ class MediaControlView : public BBox
void SetStatus(int status, int rate);
void SetEnabled(bool enable);
void SetAudioEnabled(bool enable);
uint32 GetSeekTo() const;
uint32 GetVolume() const;
void SetSkippable(bool backward,
......
......@@ -2,7 +2,7 @@
* MsgVals.h
*****************************************************************************
* Copyright (C) 2001 VideoLAN
* $Id: MsgVals.h,v 1.9.2.3 2002/09/03 12:00:25 tcastley Exp $
* $Id: MsgVals.h,v 1.9.2.4 2002/09/29 12:04:27 titer Exp $
*
* Authors: Tony Castley <tcastley@mail.powerup.com.au>
* Stephan Aßmus <stippi@yellowbites.com>
......@@ -44,16 +44,24 @@ const uint32 SELECT_CHANNEL = 'chan';
const uint32 SELECT_SUBTITLE = 'subt';
const uint32 PREV_TITLE = 'prti';
const uint32 NEXT_TITLE = 'nxti';
const uint32 TOGGLE_TITLE = 'tgti';
const uint32 PREV_CHAPTER = 'prch';
const uint32 NEXT_CHAPTER = 'nxch';
const uint32 TOGGLE_CHAPTER = 'tgch';
const uint32 PREV_FILE = 'prfl';
const uint32 NEXT_FILE = 'nxfl';
const uint32 NAVIGATE_PREV = 'navp'; // could be chapter, title or file
const uint32 NAVIGATE_NEXT = 'navn'; // could be chapter, title or file
const uint32 TOGGLE_ON_TOP = 'ontp';
const uint32 TOGGLE_FULL_SCREEN = 'tgfs';
const uint32 RESIZE_50 = 'rshl';
const uint32 RESIZE_100 = 'rsor';
const uint32 RESIZE_200 = 'rsdb';
const uint32 RESIZE_TRUE = 'rstr';
const uint32 ASPECT_CORRECT = 'asco';
const uint32 VERT_SYNC = 'vsyn';
const uint32 WINDOW_FEEL = 'wfel';
const uint32 SCREEN_SHOT = 'scrn';
const uint32 INTERFACE_CREATED = 'ifcr'; /* see VlcApplication::MessageReceived()
* in src/misc/beos_specific.cpp */
......
This diff is collapsed.
......@@ -2,11 +2,12 @@
* PlayListWindow.h: BeOS interface window class prototype
*****************************************************************************
* Copyright (C) 1999, 2000, 2001 VideoLAN
* $Id: PlayListWindow.h,v 1.1.4.2 2002/09/03 12:00:25 tcastley Exp $
* $Id: PlayListWindow.h,v 1.1.4.3 2002/09/29 12:04:27 titer Exp $
*
* Authors: Jean-Marc Dressler <polux@via.ecp.fr>
* Tony Castley <tcastley@mail.powerup.com.au>
* Richard Shepherd <richard@rshepherd.demon.co.uk>
* Stephan Aßmus <stippi@yellowbites.com>
*
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
......@@ -28,27 +29,36 @@
#include <Window.h>
class BFilePanel;
class BListView;
class CDMenu;
class InterfaceWindow;
class PlaylistView;
class PlayListWindow : public BWindow
{
public:
static PlayListWindow *getPlayList(BRect frame, const char *name,
playlist_t *p_pl);
~PlayListWindow();
bool QuitRequested();
void ReallyQuit();
// standard window member
virtual void MessageReceived(BMessage *message);
private:
PlayListWindow( BRect frame, const char *name, playlist_t *p_pl);
playlist_t *p_playlist;
BListView *p_listview;
BFilePanel *file_panel;
public:
PlayListWindow(BRect frame,
const char* name,
playlist_t* playlist,
InterfaceWindow* mainWindow );
virtual ~PlayListWindow();
// BWindow
virtual bool QuitRequested();
virtual void MessageReceived(BMessage *message);
virtual void FrameResized(float width, float height);
// PlayListWindow
void ReallyQuit();
void UpdatePlaylist( bool rebuild = false );
private:
playlist_t* fPlaylist;
PlaylistView* fListView;
BView* fBackgroundView;
BMenuBar* fMenuBar;
InterfaceWindow* fMainWindow;
};
#endif // BEOS_PLAY_LIST_WINDOW_H
......
......@@ -2,7 +2,7 @@
* TransportButton.cpp
*****************************************************************************
* Copyright (C) 2001 VideoLAN
* $Id: TransportButton.cpp,v 1.3.4.1 2002/09/03 12:00:24 tcastley Exp $
* $Id: TransportButton.cpp,v 1.3.4.2 2002/09/29 12:04:27 titer Exp $
*
* Authors: Tony Castley <tcastley@mail.powerup.com.au>
* Stephan Aßmus <stippi@yellowbites.com>
......
......@@ -2,7 +2,7 @@
* TransportButton.h
*****************************************************************************
* Copyright (C) 2001 VideoLAN
* $Id: TransportButton.h,v 1.3.4.1 2002/09/03 12:00:25 tcastley Exp $
* $Id: TransportButton.h,v 1.3.4.2 2002/09/29 12:04:27 titer Exp $
*
* Authors: Tony Castley <tcastley@mail.powerup.com.au>
*
......
......@@ -2,7 +2,7 @@
* VideoWindow.h: BeOS video window class prototype
*****************************************************************************
* Copyright (C) 1999, 2000, 2001 VideoLAN
* $Id: VideoWindow.h,v 1.19.2.5 2002/09/03 12:00:25 tcastley Exp $
* $Id: VideoWindow.h,v 1.19.2.6 2002/09/29 12:04:27 titer Exp $
*
* Authors: Jean-Marc Dressler <polux@via.ecp.fr>
* Tony Castley <tcastley@mail.powerup.com.au>
......@@ -74,6 +74,7 @@ class VLCView : public BView
bigtime_t fLastMouseMovedTime;
bool fCursorHidden;
bool fCursorInside;
bool fIgnoreDoubleClick;
};
......@@ -130,6 +131,20 @@ private:
void _BlankBitmap(BBitmap* bitmap) const;
void _SetVideoSize(uint32 mode);
void _SaveScreenShot( BBitmap* bitmap,
char* path,
uint32 translatorID ) const;
static int32 _save_screen_shot( void* cookie );
struct screen_shot_info
{
BBitmap* bitmap;
char* path;
uint32 translatorID;
int32 width;
int32 height;
};
struct vout_thread_s *p_vout;
int32 fTrueWidth; // incomming bitmap size
......
This diff is collapsed.
......@@ -2,7 +2,7 @@
* intf_vlc_wrapper.h: BeOS plugin for vlc (derived from MacOS X port )
*****************************************************************************
* Copyright (C) 2001 VideoLAN
* $Id: intf_vlc_wrapper.h,v 1.1.2.2 2002/09/03 12:00:25 tcastley Exp $
* $Id: intf_vlc_wrapper.h,v 1.1.2.3 2002/09/29 12:04:27 titer Exp $
*
* Authors: Florian G. Pflug <fgp@phlo.org>
* Jon Lech Johansen <jon-vl@nanocrew.net>
......@@ -53,6 +53,17 @@ public:
static void playlistStop();
static void playlistNext();
static void playlistPrev();
static void playlistJumpTo( int pos );
static int playlistCurrentPos();
static int playlistSize();
static void playlistLock();
static void playlistUnlock();
static void getNavCapabilities( bool* canSkipPrev,
bool* canSkipNext );
static void navigatePrev();
static void navigateNext();
// static void channelNext();
// static void channelPrev();
static void loop();
......@@ -65,30 +76,33 @@ public:
static void set_volume(int value);
static void toggle_mute();
static bool is_muted();
static bool is_playing();
static void maxvolume();
static bool has_audio();
// static void fullscreen();
static void eject();
/* playback info */
static BString* getTimeAsString();
static float getTimeAsFloat();
static void setTimeAsFloat(float i_offset);
static void setTimeAsFloat( float i_offset );
static bool playlistPlaying();
static BList* playlistAsArray();
/* open file/disc/network */
static void openFiles(BList *o_files);
static void openDisc(BString o_type, BString o_device, int i_title, int i_chapter);
static void openNet(BString o_addr, int i_port);
static void openNetChannel(BString o_addr, int i_port);
static void openNetHTTP(BString o_addr);
static void openFiles( BList *o_files, bool replace = true );
static void openDisc( BString o_type, BString o_device,
int i_title, int i_chapter );
static void openNet( BString o_addr, int i_port );
static void openNetChannel( BString o_addr, int i_port );
static void openNetHTTP( BString o_addr );
/* menus management */
static void toggleProgram(int i_program);
static void toggleTitle(int i_title);
static void toggleChapter(int i_chapter);
static void toggleLanguage(int i_language);
static void toggleSubtitle(int i_subtitle);
static void toggleProgram( int i_program );
static void toggleTitle( int i_title );
static void toggleChapter( int i_chapter );
static void toggleLanguage( int i_language );
static void toggleSubtitle( int i_subtitle );
static void setupMenus();
};
This diff is collapsed.
......@@ -2,7 +2,7 @@
* spu_decoder.c : spu decoder thread
*****************************************************************************
* Copyright (C) 2000-2001 VideoLAN
* $Id: spu_decoder.c,v 1.24.2.4 2002/09/25 23:11:54 massiot Exp $
* $Id: spu_decoder.c,v 1.24.2.5 2002/09/29 12:04:28 titer Exp $
*
* Authors: Samuel Hocevar <sam@zoy.org>
* Rudolf Cornelissen <rag.cornelissen@inter.nl.net>
......@@ -1146,12 +1146,14 @@ static void RenderSPU( const vout_thread_t *p_vout, picture_t *p_pic,
case FOURCC_YUY2:
p_dest = p_pic->p->p_pixels +
(p_spu->i_x + p_spu->i_width +
p_vout->output.i_width * ( p_spu->i_y + p_spu->i_height )) * 2;
+ ( p_spu->i_y + p_spu->i_height ) * p_pic->p->i_pitch
// * bytes per line
+ ( p_spu->i_x + p_spu->i_width ) * 2; // * bytes per pixel
/* Draw until we reach the bottom of the subtitle */
for( i_y = p_spu->i_height * p_vout->output.i_width;
for( i_y = p_spu->i_height * p_pic->p->i_pitch / 2;
i_y ;
i_y -= p_vout->output.i_width )
i_y -= p_pic->p->i_pitch / 2 )
{
/* Draw until we reach the end of the line */
for( i_x = p_spu->i_width ; i_x ; )
......
No preview for this file type
......@@ -2,7 +2,7 @@
* beos_init.cpp: Initialization for BeOS specific features
*****************************************************************************
* Copyright (C) 1999-2001 VideoLAN
* $Id: beos_specific.cpp,v 1.18.2.1 2002/09/03 12:00:24 tcastley Exp $
* $Id: beos_specific.cpp,v 1.18.2.2 2002/09/29 12:04:28 titer Exp $
*
* Authors: Jean-Marc Dressler <polux@via.ecp.fr>
*
......@@ -131,9 +131,9 @@ char * system_GetProgramPath( void )
*****************************************************************************/
static void system_AppThread( void * args )
{
VlcApplication *BeApp = new VlcApplication("application/x-vnd.Ink-vlc");
BeApp->Run();
delete BeApp;
new VlcApplication("application/x-vnd.Ink-vlc");
be_app->Run();
delete be_app;
}
} /* extern "C" */
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment