Added some new functions which seem to be required for Xentronics SampleStudio Pro.

Added missing license to implementation files.


git-svn-id: file:///srv/svn/repos/haiku/trunk/current@8590 a95241bf-73f2-0310-859d-f6bbb57e9c96
This commit is contained in:
beveloper
2004-08-16 12:44:00 +00:00
parent 1b19c97c63
commit e4d07a3e71
4 changed files with 189 additions and 33 deletions
+18 -6
View File
@@ -55,14 +55,19 @@ public:
BMediaFile( BDataIO * source,
int32 flags); // BFile is a BDataIO
// these two constructors are for read-write access
// these three constructors are for read-write access
BMediaFile(const entry_ref *ref, // these two are write-only
const media_file_format * mfi,
int32 flags=0);
BMediaFile(BDataIO *destination, // BFile is a BDataIO
const media_file_format * mfi,
int32 flags=0);
BMediaFile(const media_file_format * mfi, // set file later using SetTo()
int32 flags=0);
status_t SetTo(const entry_ref *ref);
status_t SetTo(BDataIO *destination); // BFile is a BDataIO
virtual ~BMediaFile();
status_t InitCheck() const;
@@ -92,9 +97,9 @@ public:
// Create and add a track to the media file
BMediaTrack *CreateTrack(media_format *mf, const media_codec_info *mci);
BMediaTrack *CreateTrack(media_format *mf, const media_codec_info *mci, uint32 flags=0);
// Create and add a raw track to the media file (it has no encoder)
BMediaTrack *CreateTrack(media_format *mf);
BMediaTrack *CreateTrack(media_format *mf, uint32 flags=0);
// Lets you set the copyright info for the entire file
status_t AddCopyright(const char *data);
@@ -109,16 +114,23 @@ public:
status_t CloseFile(void);
// This is for controlling file format parameters
BParameterWeb *Web();
// returns a copy of the parameter web
status_t GetParameterWeb(BParameterWeb** outWeb);
status_t GetParameterValue(int32 id, void *valu, size_t *size);
status_t SetParameterValue(int32 id, const void *valu, size_t size);
BView *GetParameterView();
// For the future...
virtual status_t Perform(int32 selector, void * data);
private:
// deprecated, but for R5 compatibility
BParameterWeb *Web();
// Does nothing, returns B_ERROR, for Zeta compatiblity only
status_t ControlFile(int32 selector, void * io_data, size_t size);
BPrivate::media::MediaExtractor *fExtractor;
int32 _reserved_BMediaFile_was_fExtractorID;
int32 fTrackNum;
+9 -6
View File
@@ -81,7 +81,7 @@ public:
// The data returned through ReadFrames() will be in the format that's
// returned by this function.
status_t DecodedFormat(media_format *inout_format, int32 flags = 0);
status_t DecodedFormat(media_format *inout_format, uint32 flags = 0);
// CountFrames and Duration return the total number of frame and the
// total duration (expressed in microseconds) of a track.
@@ -177,7 +177,8 @@ public:
status_t Flush();
// These are for controlling the underlying encoder and track parameters
BParameterWeb *Web();
// returns a copy of the parameter web
status_t GetParameterWeb(BParameterWeb** outWeb);
status_t GetParameterValue(int32 id, void *valu, size_t *size);
status_t SetParameterValue(int32 id, const void *valu, size_t size);
BView *GetParameterView();
@@ -196,6 +197,12 @@ virtual status_t Perform(int32 selector, void * data);
private:
friend class BMediaFile;
// deprecated, but for BeOS R5 compatibility
BParameterWeb *Web();
// Does nothing, returns B_ERROR, for Zeta compatiblity only
status_t ControlCodec(int32 selector, void *io_data, size_t size);
// for read-only access to a track
BMediaTrack(BPrivate::media::MediaExtractor *extractor, int32 stream);
@@ -206,10 +213,6 @@ private:
BPrivate::media::Encoder *encoder,
media_codec_info *mci);
#ifdef __BUILDING_MEDIA_TRACK_CPP
status_t DecodedFormat(media_format *inout_format);
#endif
void SetupWorkaround();
bool SetupFormatTranslation(const media_format &from, media_format *to);