[xiph-commits] r8785 - in trunk/oggdsf: scripts/new reg scripts
src/lib/codecs/cmml/libCMMLTagsDotNET
src/lib/codecs/theora/filters/dsfTheoraDecoder
src/lib/codecs/theora/filters/dsfTheoraEncoder
src/lib/core/directshow/dsfAnxMux src/lib/core/ogg/libOOOgg
src/lib/player/libDSPlayDotNET
illiminable at motherfish-iii.xiph.org
illiminable at motherfish-iii.xiph.org
Wed Jan 26 02:45:23 PST 2005
Author: illiminable
Date: 2005-01-26 02:45:04 -0800 (Wed, 26 Jan 2005)
New Revision: 8785
Added:
trunk/oggdsf/scripts/new reg scripts/mm_medlib_anx.reg
Modified:
trunk/oggdsf/src/lib/codecs/cmml/libCMMLTagsDotNET/ClipTag.cpp
trunk/oggdsf/src/lib/codecs/theora/filters/dsfTheoraDecoder/TheoraDecodeFilter.cpp
trunk/oggdsf/src/lib/codecs/theora/filters/dsfTheoraEncoder/TheoraEncodeInputPin.cpp
trunk/oggdsf/src/lib/core/directshow/dsfAnxMux/AnxMuxInputPin.cpp
trunk/oggdsf/src/lib/core/ogg/libOOOgg/OggPaginator.cpp
trunk/oggdsf/src/lib/core/ogg/libOOOgg/OggPaginatorSettings.cpp
trunk/oggdsf/src/lib/player/libDSPlayDotNET/DSPlay.cpp
Log:
* Add a filename check to dsplay
* Gaurd against null pointers for clip tag
* Fix offsetting problem for theora encoder for RGB conversions
* Enforce 1 pack per page for cmml stream
* Modigfy paginator so 0 maxpacksperpage means don't use this field.
* Paginator settings maxPacksperpage now defaults to 0
* Add annodex wmp registration script
Added: trunk/oggdsf/scripts/new reg scripts/mm_medlib_anx.reg
===================================================================
(Binary files differ)
Property changes on: trunk/oggdsf/scripts/new reg scripts/mm_medlib_anx.reg
___________________________________________________________________
Name: svn:mime-type
+ application/octet-stream
Modified: trunk/oggdsf/src/lib/codecs/cmml/libCMMLTagsDotNET/ClipTag.cpp
===================================================================
--- trunk/oggdsf/src/lib/codecs/cmml/libCMMLTagsDotNET/ClipTag.cpp 2005-01-24 05:28:05 UTC (rev 8784)
+++ trunk/oggdsf/src/lib/codecs/cmml/libCMMLTagsDotNET/ClipTag.cpp 2005-01-26 10:45:04 UTC (rev 8785)
@@ -115,13 +115,25 @@
Wrappers::releaseWStr( tc );
}
void ClipTag::setAnchor(AnchorTag* inAnchor) {
- getMe()->setAnchor(inAnchor->getMe()->clone());
+ if (inAnchor != NULL) {
+ getMe()->setAnchor(inAnchor->getMe()->clone());
+ } else {
+ getMe()->setAnchor(NULL);
+ }
}
void ClipTag::setImage(ImageTag* inImage) {
- getMe()->setImage(inImage->getMe()->clone());
+ if (inImage != NULL) {
+ getMe()->setImage(inImage->getMe()->clone());
+ } else {
+ getMe()->setImage(NULL);
+ }
}
void ClipTag::setDesc(DescTag* inDesc) {
- getMe()->setDesc(inDesc->getMe()->clone());
+ if (inDesc != NULL) {
+ getMe()->setDesc(inDesc->getMe()->clone());
+ } else {
+ getMe()->setDesc(NULL);
+ }
}
void ClipTag::setStart(String* inStart) {
Modified: trunk/oggdsf/src/lib/codecs/theora/filters/dsfTheoraDecoder/TheoraDecodeFilter.cpp
===================================================================
--- trunk/oggdsf/src/lib/codecs/theora/filters/dsfTheoraDecoder/TheoraDecodeFilter.cpp 2005-01-24 05:28:05 UTC (rev 8784)
+++ trunk/oggdsf/src/lib/codecs/theora/filters/dsfTheoraDecoder/TheoraDecodeFilter.cpp 2005-01-26 10:45:04 UTC (rev 8785)
@@ -149,11 +149,15 @@
((inOutputMediaType->majortype == MEDIATYPE_Video) && (inOutputMediaType->subtype == MEDIASUBTYPE_YV12) && (inOutputMediaType->formattype == FORMAT_VideoInfo)
)) {
VIDEOINFOHEADER* locVideoHeader = (VIDEOINFOHEADER*)inOutputMediaType->Format();
- mHeight = (unsigned long)abs(locVideoHeader->bmiHeader.biHeight);
- mWidth = (unsigned long)abs(locVideoHeader->bmiHeader.biWidth);
-
- return S_OK;
+ // if ((locVideoHeader->bmiHeader.biHeight == mTheoraFormatInfo->pictureHeight) && (locVideoHeader->bmiHeader.biWidth == mTheoraFormatInfo->pictureWidth)) {
+
+ mHeight = (unsigned long)abs(locVideoHeader->bmiHeader.biHeight);
+ mWidth = (unsigned long)abs(locVideoHeader->bmiHeader.biWidth);
+ return S_OK;
+ // } else {
+ // return S_FALSE;
+ // }
} else {
return S_FALSE;
}
Modified: trunk/oggdsf/src/lib/codecs/theora/filters/dsfTheoraEncoder/TheoraEncodeInputPin.cpp
===================================================================
--- trunk/oggdsf/src/lib/codecs/theora/filters/dsfTheoraEncoder/TheoraEncodeInputPin.cpp 2005-01-24 05:28:05 UTC (rev 8784)
+++ trunk/oggdsf/src/lib/codecs/theora/filters/dsfTheoraEncoder/TheoraEncodeInputPin.cpp 2005-01-26 10:45:04 UTC (rev 8785)
@@ -843,7 +843,7 @@
char* locUUpto = mYUV.u;
char* locVUpto = mYUV.v;
//Pointer to the same pixel on next line
- char* locDestNextLine = locYUpto + (mWidth); //View only... don't delete
+ char* locDestNextLine = locYUpto + (mYUV.y_stride); //View only... don't delete
int temp = 0;
@@ -851,17 +851,39 @@
for (unsigned long line = 0; line < mHeight; line += 2) {
//debugLog<<"Encode AYUV To YV12 : ++ Line = "<<line<<endl;
+ //Ensures the current destination buffer skips a line ie points to line 2, 4, 6 etc
+ locYUpto = (mYUV.y + (line * mYUV.y_stride));
+ //Ensures the nextlinedest skips a
+ locDestNextLine = locYUpto + (mYUV.y_stride);
+
+ //locUUpto = (mYUV.u + ((line/2) * mYUV.uv_stride));
+ //locVUpto = (mYUV.v + ((line/2) * mYUV.uv_stride));
+
ASSERT (locSourceUptoPtr == (inBuf + (line * (mWidth * PIXEL_BYTE_SIZE))));
ASSERT (locSourceNextLine == locSourceUptoPtr + (mWidth * PIXEL_BYTE_SIZE));
- ASSERT (locYUpto == (mYUV.y + (line * mWidth)));
- ASSERT (locDestNextLine == locYUpto + (mWidth));
+ ASSERT (locYUpto == (mYUV.y + (line * mYUV.y_stride)));
+ ASSERT (locDestNextLine == locYUpto + (mYUV.y_stride));
+ //Pad out the start of the line if needed
+ if (mXOffset != 0) {
+ memset((void*)locYUpto, 0, mXOffset);
+ memset((void*)locDestNextLine, 0, mXOffset);
+ memset((void*)locUUpto, 0, mXOffset/2);
+ memset((void*)locVUpto, 0, mXOffset/2);
+ locYUpto += mXOffset;
+ locDestNextLine += mXOffset;
+ locUUpto += (mXOffset/2);
+ locVUpto += (mXOffset/2);
+ }
//Columns also done 2 at a time
for (unsigned long col = 0; col < mWidth; col += 2) {
//debugLog<<"Encode AYUV To YV12 : ++++++ Col = "<<col<<endl;
+
+
+
// v u y a v u y a
//SourceUpto ^
//NextUpto ^
@@ -986,10 +1008,8 @@
//Ensures nextlinesource is one line ahead of the main source.
locSourceNextLine += (mWidth * PIXEL_BYTE_SIZE);
- //Ensures the current destination buffer skips a line ie points to line 2, 4, 6 etc
- locYUpto = locDestNextLine;
- //Ensures the nextlinedest skips a
- locDestNextLine += (mWidth);
+
+
}
return 0;
}
@@ -1299,7 +1319,7 @@
//Set offset values... no longer centred... all the offset is at the bottom left of the image (ie very start of memory image)
//Difference between the outframe dimensions and the inner picture dimensions
mTheoraInfo.offset_x = mXOffset
- = (mWidth - mTheoraInfo.frame_width);
+ = (mTheoraInfo.width - mTheoraInfo.frame_width);
mTheoraInfo.offset_y = mYOffset
= (mHeight - mTheoraInfo.frame_height);
Modified: trunk/oggdsf/src/lib/core/directshow/dsfAnxMux/AnxMuxInputPin.cpp
===================================================================
--- trunk/oggdsf/src/lib/core/directshow/dsfAnxMux/AnxMuxInputPin.cpp 2005-01-24 05:28:05 UTC (rev 8784)
+++ trunk/oggdsf/src/lib/core/directshow/dsfAnxMux/AnxMuxInputPin.cpp 2005-01-26 10:45:04 UTC (rev 8785)
@@ -177,6 +177,7 @@
}
mPaginator.setNumHeaders(locNumHeaders);
+ mPaginator.parameters()->mMaxPacksPerPage = 1;
mMuxStream->setNumHeaders(locNumHeaders);
Modified: trunk/oggdsf/src/lib/core/ogg/libOOOgg/OggPaginator.cpp
===================================================================
--- trunk/oggdsf/src/lib/core/ogg/libOOOgg/OggPaginator.cpp 2005-01-24 05:28:05 UTC (rev 8784)
+++ trunk/oggdsf/src/lib/core/ogg/libOOOgg/OggPaginator.cpp 2005-01-26 10:45:04 UTC (rev 8785)
@@ -295,7 +295,7 @@
//
//Every header gets it's own page.
- if (((mPacketCount < mSettings->mNumHeaders) || (mPacketCount >= mSettings->mMaxPacksPerPage)) && (mPendingPageHasData)) {
+ if (((mPacketCount < mSettings->mNumHeaders) || ((mSettings->mMaxPacksPerPage != 0) && (mPacketCount >= mSettings->mMaxPacksPerPage))) && (mPendingPageHasData)) {
debugLog<<"addPacketToPage : Cond Deliv : Packet Count = "<<mPacketCount<<endl;
debugLog<<"addPacketToPage : Cond Deliv : Num Headers = "<<mSettings->mNumHeaders<<endl;
debugLog<<"addPacketToPage : Cond Deliv : Max Pack per page = "<<mSettings->mMaxPacksPerPage<<endl;
Modified: trunk/oggdsf/src/lib/core/ogg/libOOOgg/OggPaginatorSettings.cpp
===================================================================
--- trunk/oggdsf/src/lib/core/ogg/libOOOgg/OggPaginatorSettings.cpp 2005-01-24 05:28:05 UTC (rev 8784)
+++ trunk/oggdsf/src/lib/core/ogg/libOOOgg/OggPaginatorSettings.cpp 2005-01-26 10:45:04 UTC (rev 8785)
@@ -38,7 +38,7 @@
, mTargetPageSize(4096)
, mMinPageSize(4096)
, mNumHeaders(0)
- , mMaxPacksPerPage(1)
+ , mMaxPacksPerPage(0)
{
}
Modified: trunk/oggdsf/src/lib/player/libDSPlayDotNET/DSPlay.cpp
===================================================================
--- trunk/oggdsf/src/lib/player/libDSPlayDotNET/DSPlay.cpp 2005-01-24 05:28:05 UTC (rev 8784)
+++ trunk/oggdsf/src/lib/player/libDSPlayDotNET/DSPlay.cpp 2005-01-26 10:45:04 UTC (rev 8785)
@@ -236,6 +236,9 @@
ULONG numRef = 0;
//
+ if (!File::Exists(inFileName)) {
+ return false;
+ }
FileInfo* locFileInfo = new FileInfo(inFileName);
mFileSize = locFileInfo->Length;
More information about the commits
mailing list