small api changes
git-svn-id: file:///srv/svn/repos/haiku/trunk/current@6439 a95241bf-73f2-0310-859d-f6bbb57e9c96
This commit is contained in:
@@ -21,7 +21,7 @@ public:
|
|||||||
Decoder();
|
Decoder();
|
||||||
virtual ~Decoder();
|
virtual ~Decoder();
|
||||||
|
|
||||||
virtual void GetCodecInfo(media_codec_info &codecInfo) = 0;
|
virtual void GetCodecInfo(media_codec_info *codecInfo) = 0;
|
||||||
|
|
||||||
// Setup get's called with the info data from Reader::GetStreamInfo
|
// Setup get's called with the info data from Reader::GetStreamInfo
|
||||||
virtual status_t Setup(media_format *ioEncodedFormat, const void *infoBuffer, int32 infoSize) = 0;
|
virtual status_t Setup(media_format *ioEncodedFormat, const void *infoBuffer, int32 infoSize) = 0;
|
||||||
|
|||||||
@@ -7,7 +7,7 @@
|
|||||||
#include <Locker.h>
|
#include <Locker.h>
|
||||||
|
|
||||||
status_t _CreateReader(Reader **reader, int32 *streamCount, media_file_format *mff, BDataIO *source);
|
status_t _CreateReader(Reader **reader, int32 *streamCount, media_file_format *mff, BDataIO *source);
|
||||||
status_t _CreateDecoder(Decoder **decoder, media_codec_info *mci, const media_format *format);
|
status_t _CreateDecoder(Decoder **decoder, const media_format *format);
|
||||||
|
|
||||||
void _DestroyReader(Reader *reader);
|
void _DestroyReader(Reader *reader);
|
||||||
void _DestroyDecoder(Decoder *decoder);
|
void _DestroyDecoder(Decoder *decoder);
|
||||||
|
|||||||
@@ -253,7 +253,7 @@ BMediaDecoder::GetDecoderInfo(media_codec_info *outInfo) const
|
|||||||
return fInitStatus;
|
return fInitStatus;
|
||||||
|
|
||||||
if (fDecoder != NULL)
|
if (fDecoder != NULL)
|
||||||
fDecoder->GetCodecInfo(*outInfo);
|
fDecoder->GetCodecInfo(outInfo);
|
||||||
else {
|
else {
|
||||||
strcpy(outInfo->short_name, "unknown");
|
strcpy(outInfo->short_name, "unknown");
|
||||||
strcpy(outInfo->pretty_name, "unknown");
|
strcpy(outInfo->pretty_name, "unknown");
|
||||||
|
|||||||
@@ -189,7 +189,7 @@ MediaExtractor::CreateDecoder(int32 stream, Decoder **decoder, media_codec_info
|
|||||||
return res;
|
return res;
|
||||||
}
|
}
|
||||||
|
|
||||||
res = _CreateDecoder(decoder, mci, &fStreamInfo[stream].encodedFormat);
|
res = _CreateDecoder(decoder, &fStreamInfo[stream].encodedFormat);
|
||||||
if (res != B_OK) {
|
if (res != B_OK) {
|
||||||
printf("MediaExtractor::CreateDecoder failed for stream %ld\n", stream);
|
printf("MediaExtractor::CreateDecoder failed for stream %ld\n", stream);
|
||||||
return res;
|
return res;
|
||||||
@@ -202,6 +202,9 @@ MediaExtractor::CreateDecoder(int32 stream, Decoder **decoder, media_codec_info
|
|||||||
printf("MediaExtractor::CreateDecoder Setup failed for stream %ld: %ld (%s)\n",
|
printf("MediaExtractor::CreateDecoder Setup failed for stream %ld: %ld (%s)\n",
|
||||||
stream, res, strerror(res));
|
stream, res, strerror(res));
|
||||||
}
|
}
|
||||||
|
|
||||||
|
(*decoder)->GetCodecInfo(mci);
|
||||||
|
|
||||||
return res;
|
return res;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -75,7 +75,7 @@ _CreateReader(Reader **reader, int32 *streamCount, media_file_format *mff, BData
|
|||||||
|
|
||||||
|
|
||||||
status_t
|
status_t
|
||||||
_CreateDecoder(Decoder **_decoder, media_codec_info *codecInfo, const media_format *format)
|
_CreateDecoder(Decoder **_decoder, const media_format *format)
|
||||||
{
|
{
|
||||||
printf("_CreateDecoder enter\n");
|
printf("_CreateDecoder enter\n");
|
||||||
|
|
||||||
@@ -106,8 +106,6 @@ _CreateDecoder(Decoder **_decoder, media_codec_info *codecInfo, const media_form
|
|||||||
return B_ERROR;
|
return B_ERROR;
|
||||||
}
|
}
|
||||||
|
|
||||||
(*_decoder)->GetCodecInfo(*codecInfo);
|
|
||||||
|
|
||||||
printf("_CreateDecoder leave\n");
|
printf("_CreateDecoder leave\n");
|
||||||
|
|
||||||
return B_OK;
|
return B_OK;
|
||||||
|
|||||||
Reference in New Issue
Block a user