[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Gnash-commit] /srv/bzr/gnash/trunk r11768: Tabs to spaces.
From: |
Benjamin Wolsey |
Subject: |
[Gnash-commit] /srv/bzr/gnash/trunk r11768: Tabs to spaces. |
Date: |
Mon, 18 Jan 2010 12:31:02 +0100 |
User-agent: |
Bazaar (2.0.2) |
------------------------------------------------------------
revno: 11768 [merge]
committer: Benjamin Wolsey <address@hidden>
branch nick: trunk
timestamp: Mon 2010-01-18 12:31:02 +0100
message:
Tabs to spaces.
modified:
libmedia/MediaHandler.cpp
libmedia/MediaHandler.h
=== modified file 'libmedia/MediaHandler.cpp'
--- a/libmedia/MediaHandler.cpp 2010-01-01 17:48:26 +0000
+++ b/libmedia/MediaHandler.cpp 2010-01-18 09:26:03 +0000
@@ -41,25 +41,25 @@
bool
MediaHandler::isFLV(IOChannel& stream) throw (IOException)
{
- char head[4] = {0, 0, 0, 0};
- stream.seek(0);
- size_t actuallyRead = stream.read(head, 3);
- stream.seek(0);
+ char head[4] = {0, 0, 0, 0};
+ stream.seek(0);
+ size_t actuallyRead = stream.read(head, 3);
+ stream.seek(0);
- if (actuallyRead < 3)
- {
- throw IOException(_("MediaHandler::isFLV: Could not read 3
bytes "
+ if (actuallyRead < 3)
+ {
+ throw IOException(_("MediaHandler::isFLV: Could not read 3 bytes "
"from input stream"));
- }
+ }
if (!std::equal(head, head + 3, "FLV")) return false;
- return true;
+ return true;
}
std::auto_ptr<MediaParser>
MediaHandler::createMediaParser(std::auto_ptr<IOChannel> stream)
{
- std::auto_ptr<MediaParser> parser;
+ std::auto_ptr<MediaParser> parser;
try {
if (!isFLV(*stream))
@@ -74,10 +74,10 @@
return parser;
}
- parser.reset( new FLVParser(stream) );
- assert(! stream.get() ); // TODO: when ownership will be transferred...
+ parser.reset( new FLVParser(stream) );
+ assert(!stream.get()); // TODO: when ownership will be transferred...
- return parser;
+ return parser;
}
std::auto_ptr<AudioDecoder>
=== modified file 'libmedia/MediaHandler.h'
--- a/libmedia/MediaHandler.h 2010-01-01 17:48:26 +0000
+++ b/libmedia/MediaHandler.h 2010-01-18 09:26:03 +0000
@@ -32,15 +32,15 @@
// Forward declarations
namespace gnash {
- class IOChannel;
- namespace media {
- class VideoDecoder;
- class AudioDecoder;
- class AudioInfo;
- class VideoInfo;
+ class IOChannel;
+ namespace media {
+ class VideoDecoder;
+ class AudioDecoder;
+ class AudioInfo;
+ class VideoInfo;
class VideoInput;
class AudioInput;
- }
+ }
}
namespace gnash {
@@ -66,49 +66,49 @@
{
public:
- virtual ~MediaHandler() {}
-
- /// Return currently registered MediaHandler, possibly null.
- static MediaHandler* get()
- {
- return _handler.get();
- }
-
- /// Register a MediaHandler to use
- static void set(std::auto_ptr<MediaHandler> mh)
- {
- _handler = mh;
- }
-
- /// Return an appropriate MediaParser for given input
- //
- /// @param stream
- /// Input stream, ownership transferred
- ///
- /// @return 0 if no parser could be created for the input
- ///
- /// NOTE: the default implementation returns an FLVParser for FLV input
- /// or 0 for others.
- ///
- virtual std::auto_ptr<MediaParser>
+ virtual ~MediaHandler() {}
+
+ /// Return currently registered MediaHandler, possibly null.
+ static MediaHandler* get()
+ {
+ return _handler.get();
+ }
+
+ /// Register a MediaHandler to use
+ static void set(std::auto_ptr<MediaHandler> mh)
+ {
+ _handler = mh;
+ }
+
+ /// Return an appropriate MediaParser for given input
+ //
+ /// @param stream
+ /// Input stream, ownership transferred
+ ///
+ /// @return 0 if no parser could be created for the input
+ ///
+ /// NOTE: the default implementation returns an FLVParser for FLV input
+ /// or 0 for others.
+ ///
+ virtual std::auto_ptr<MediaParser>
createMediaParser(std::auto_ptr<IOChannel> stream);
- /// Create a VideoDecoder for decoding what's specified in the VideoInfo
- //
- /// @param info VideoInfo class with all the info needed to decode
- /// the sound correctly.
+ /// Create a VideoDecoder for decoding what's specified in the VideoInfo
+ //
+ /// @param info VideoInfo class with all the info needed to decode
+ /// the sound correctly.
/// @return Will always return a valid VideoDecoder or throw a
/// gnash::MediaException if a fatal error occurs.
- virtual std::auto_ptr<VideoDecoder>
+ virtual std::auto_ptr<VideoDecoder>
createVideoDecoder(const VideoInfo& info)=0;
- /// Create an AudioDecoder for decoding what's specified in the
AudioInfo
- //
- /// @param info AudioInfo class with all the info needed to decode
- /// the sound correctly.
+ /// Create an AudioDecoder for decoding what's specified in the AudioInfo
+ //
+ /// @param info AudioInfo class with all the info needed to decode
+ /// the sound correctly.
/// @return Will always return a valid AudioDecoder or throw a
/// gnash::MediaException if a fatal error occurs.
- virtual std::auto_ptr<AudioDecoder>
+ virtual std::auto_ptr<AudioDecoder>
createAudioDecoder(const AudioInfo& info)=0;
/// Create an VideoConverter for converting between color spaces.
@@ -162,16 +162,16 @@
///
std::auto_ptr<AudioDecoder> createFlashAudioDecoder(const AudioInfo& info);
- /// Return true if input stream is an FLV
+ /// Return true if input stream is an FLV
//
/// If this cannot read the necessary 3 bytes, it throws an IOException.
- bool isFLV(IOChannel& stream) throw (IOException);
+ bool isFLV(IOChannel& stream) throw (IOException);
- MediaHandler() {}
+ MediaHandler() {}
private:
- static std::auto_ptr<MediaHandler> _handler;
+ static std::auto_ptr<MediaHandler> _handler;
};
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- [Gnash-commit] /srv/bzr/gnash/trunk r11768: Tabs to spaces.,
Benjamin Wolsey <=