[xiph-commits] r11871 - in trunk/oggdsf/src/lib/codecs: theora/filters/dsfTheoraEncoder vorbis/filters/dsfVorbisEncoder vorbis/libs/libOOVorbis

illiminable at svn.xiph.org illiminable at svn.xiph.org
Sun Oct 1 01:03:43 PDT 2006


Author: illiminable
Date: 2006-10-01 01:03:18 -0700 (Sun, 01 Oct 2006)
New Revision: 11871

Added:
   trunk/oggdsf/src/lib/codecs/vorbis/filters/dsfVorbisEncoder/PropsVorbisEncoder.cpp
   trunk/oggdsf/src/lib/codecs/vorbis/filters/dsfVorbisEncoder/PropsVorbisEncoder.h
   trunk/oggdsf/src/lib/codecs/vorbis/filters/dsfVorbisEncoder/dsfVorbisEncoder.aps
   trunk/oggdsf/src/lib/codecs/vorbis/filters/dsfVorbisEncoder/dsfVorbisEncoder.rc
   trunk/oggdsf/src/lib/codecs/vorbis/filters/dsfVorbisEncoder/resource.h
Modified:
   trunk/oggdsf/src/lib/codecs/theora/filters/dsfTheoraEncoder/ITheoraEncodeSettings.h
   trunk/oggdsf/src/lib/codecs/theora/filters/dsfTheoraEncoder/PropsTheoraEncoder.cpp
   trunk/oggdsf/src/lib/codecs/theora/filters/dsfTheoraEncoder/TheoraEncodeFilter.cpp
   trunk/oggdsf/src/lib/codecs/theora/filters/dsfTheoraEncoder/TheoraEncodeFilter.h
   trunk/oggdsf/src/lib/codecs/vorbis/filters/dsfVorbisEncoder/IVorbisEncodeSettings.h
   trunk/oggdsf/src/lib/codecs/vorbis/filters/dsfVorbisEncoder/VorbisEncodeFilter.cpp
   trunk/oggdsf/src/lib/codecs/vorbis/filters/dsfVorbisEncoder/VorbisEncodeFilter.h
   trunk/oggdsf/src/lib/codecs/vorbis/filters/dsfVorbisEncoder/dsfVorbisEncoder.vcproj
   trunk/oggdsf/src/lib/codecs/vorbis/filters/dsfVorbisEncoder/stdafx.h
   trunk/oggdsf/src/lib/codecs/vorbis/filters/dsfVorbisEncoder/vorbisencoderdllstuff.h
   trunk/oggdsf/src/lib/codecs/vorbis/libs/libOOVorbis/VorbisEncodeSettings.cpp
Log:
* Tidy up in the theora encoder
* Add all the plumbing for a vorbis encoder properties page

Modified: trunk/oggdsf/src/lib/codecs/theora/filters/dsfTheoraEncoder/ITheoraEncodeSettings.h
===================================================================
--- trunk/oggdsf/src/lib/codecs/theora/filters/dsfTheoraEncoder/ITheoraEncodeSettings.h	2006-10-01 04:02:53 UTC (rev 11870)
+++ trunk/oggdsf/src/lib/codecs/theora/filters/dsfTheoraEncoder/ITheoraEncodeSettings.h	2006-10-01 08:03:18 UTC (rev 11871)
@@ -1,24 +1,5 @@
 #pragma once
 
-//class ITheoraEncodeSettings
-//{
-//public:
-//	DECLARE_IUNKNOWN
-//	virtual unsigned long targetBitrate() = 0;
-//	virtual unsigned char quality() = 0;
-//	virtual unsigned long keyframeFreq() = 0;
-//
-//	virtual bool setTargetBitrate(unsigned long inBitrate) = 0;
-//	virtual bool setQuality(unsigned char inQuality) = 0;
-//	virtual bool setKeyframeFreq(unsigned long inKeyframeFreq) = 0;
-//protected:
-//	//unsigned long mTargetBitrate;
-//
-//	//unsigned char mQuality;
-//
-//	//unsigned long mKeyframeFreq;
-//	
-//};
 
 #ifndef __ITHEORAENCODESETTINGS__
 #define __ITHEORAENCODESETTINGS__

Modified: trunk/oggdsf/src/lib/codecs/theora/filters/dsfTheoraEncoder/PropsTheoraEncoder.cpp
===================================================================
--- trunk/oggdsf/src/lib/codecs/theora/filters/dsfTheoraEncoder/PropsTheoraEncoder.cpp	2006-10-01 04:02:53 UTC (rev 11870)
+++ trunk/oggdsf/src/lib/codecs/theora/filters/dsfTheoraEncoder/PropsTheoraEncoder.cpp	2006-10-01 08:03:18 UTC (rev 11871)
@@ -1,8 +1,12 @@
 #include "stdafx.h"
 #include "propstheoraencoder.h"
 
-PropsTheoraEncoder::PropsTheoraEncoder(LPUNKNOWN inUnk, HRESULT* outHR)
-	:	CBasePropertyPage(NAME("illiminable Directshow Filters"), inUnk, IDD_THEORA_ENCODE_SETTINGS, IDS_THEORA_ENC_PROPS_STRING)
+PropsTheoraEncoder::PropsTheoraEncoder(     LPUNKNOWN inUnk
+                                        ,   HRESULT* outHR)
+	:	CBasePropertyPage(      NAME("illiminable Theora Encoder")
+                            ,   inUnk
+                            ,   IDD_THEORA_ENCODE_SETTINGS
+                            ,   IDS_THEORA_ENC_PROPS_STRING)
 	,	mTheoraEncodeSettings(NULL)
 
 {
@@ -20,44 +24,8 @@
     return new PropsTheoraEncoder(inUnk, outHR);
 }
 
-//LRESULT PropsTheoraEncoder::addNumberToCombo(int inComboID, int inNum) {
-//	char locStrBuff[16];
-//	itoa(inNum, (char*)&locStrBuff, 10);
-//	return SendDlgItemMessage(m_Dlg, IDC_COMBO_BITRATE, CB_ADDSTRING, NOT_USED, (LPARAM)&locStrBuff);
-//
-//}
-//
-//void PropsTheoraEncoder::SetupBitrateCombo() {
-//	addNumberToCombo(IDC_COMBO_BITRATE, 64000);
-//	addNumberToCombo(IDC_COMBO_BITRATE, 96000);
-//	addNumberToCombo(IDC_COMBO_BITRATE, 128000);
-//	addNumberToCombo(IDC_COMBO_BITRATE, 192000);
-//	addNumberToCombo(IDC_COMBO_BITRATE, 256000);
-//	addNumberToCombo(IDC_COMBO_BITRATE, 384000);
-//	addNumberToCombo(IDC_COMBO_BITRATE, 512000);
-//	addNumberToCombo(IDC_COMBO_BITRATE, 768000);
-//	addNumberToCombo(IDC_COMBO_BITRATE, 1024000);
-//	addNumberToCombo(IDC_COMBO_BITRATE, 1536000);
-//	addNumberToCombo(IDC_COMBO_BITRATE, 2000000);
-//
-//}
-//
-//void PropsTheoraEncoder::SetupKeyframeFreqCombo() {
-//	
-//	addNumberToCombo(IDC_COMBO_LOG_KEYFRAME_FREQ, 1);
-//	addNumberToCombo(IDC_COMBO_LOG_KEYFRAME_FREQ, 2);
-//	addNumberToCombo(IDC_COMBO_LOG_KEYFRAME_FREQ, 3);
-//	addNumberToCombo(IDC_COMBO_LOG_KEYFRAME_FREQ, 4);
-//	addNumberToCombo(IDC_COMBO_LOG_KEYFRAME_FREQ, 5);
-//	addNumberToCombo(IDC_COMBO_LOG_KEYFRAME_FREQ, 6);
-//	addNumberToCombo(IDC_COMBO_LOG_KEYFRAME_FREQ, 7);
-//	addNumberToCombo(IDC_COMBO_LOG_KEYFRAME_FREQ, 8);
-//	addNumberToCombo(IDC_COMBO_LOG_KEYFRAME_FREQ, 9);
-//	addNumberToCombo(IDC_COMBO_LOG_KEYFRAME_FREQ, 10);
-//
-//}
-
-unsigned long PropsTheoraEncoder::log2(unsigned long inNum) {
+unsigned long PropsTheoraEncoder::log2(unsigned long inNum) 
+{
 	unsigned long ret = 0;
 	while (inNum != 0) {
 		inNum>>=1;
@@ -66,7 +34,8 @@
 	return ret - 1;
 }
 
-unsigned long PropsTheoraEncoder::pow2(unsigned long inNum) {
+unsigned long PropsTheoraEncoder::pow2(unsigned long inNum) 
+{
 	return 1 << (inNum);
 }
 

Modified: trunk/oggdsf/src/lib/codecs/theora/filters/dsfTheoraEncoder/TheoraEncodeFilter.cpp
===================================================================
--- trunk/oggdsf/src/lib/codecs/theora/filters/dsfTheoraEncoder/TheoraEncodeFilter.cpp	2006-10-01 04:02:53 UTC (rev 11870)
+++ trunk/oggdsf/src/lib/codecs/theora/filters/dsfTheoraEncoder/TheoraEncodeFilter.cpp	2006-10-01 08:03:18 UTC (rev 11871)
@@ -319,7 +319,8 @@
 }
 
 //SpecifyPropertyPages Implementation
-STDMETHODIMP TheoraEncodeFilter::GetPages(CAUUID* outPropPages) {
+STDMETHODIMP TheoraEncodeFilter::GetPages(CAUUID* outPropPages) 
+{
 	if (outPropPages == NULL) return E_POINTER;
 
 	const int NUM_PROP_PAGES = 1;

Modified: trunk/oggdsf/src/lib/codecs/theora/filters/dsfTheoraEncoder/TheoraEncodeFilter.h
===================================================================
--- trunk/oggdsf/src/lib/codecs/theora/filters/dsfTheoraEncoder/TheoraEncodeFilter.h	2006-10-01 04:02:53 UTC (rev 11870)
+++ trunk/oggdsf/src/lib/codecs/theora/filters/dsfTheoraEncoder/TheoraEncodeFilter.h	2006-10-01 08:03:18 UTC (rev 11871)
@@ -100,7 +100,7 @@
 
 	
 	//SpecifyPropertyPages Implementation
-	STDMETHODIMP TheoraEncodeFilter::GetPages(CAUUID* outPropPages);
+	STDMETHODIMP GetPages(CAUUID* outPropPages);
 
 protected:
 

Modified: trunk/oggdsf/src/lib/codecs/vorbis/filters/dsfVorbisEncoder/IVorbisEncodeSettings.h
===================================================================
--- trunk/oggdsf/src/lib/codecs/vorbis/filters/dsfVorbisEncoder/IVorbisEncodeSettings.h	2006-10-01 04:02:53 UTC (rev 11870)
+++ trunk/oggdsf/src/lib/codecs/vorbis/filters/dsfVorbisEncoder/IVorbisEncodeSettings.h	2006-10-01 08:03:18 UTC (rev 11871)
@@ -7,16 +7,21 @@
 extern "C" {
 #endif
 
+#include "VorbisEncodeSettings.h"
 
 DECLARE_INTERFACE_(IVorbisEncodeSettings, IUnknown) {
 
-	//virtual STDMETHODIMP_(unsigned long) targetBitrate() PURE;
-	//virtual STDMETHODIMP_(bool) setTargetBitrate(unsigned long inBitrate) PURE;
+	//virtual STDMETHODIMP_(bool) setQuality(signed char inQuality) PURE;
+	virtual STDMETHODIMP_(VorbisEncodeSettings) getEncoderSettings() PURE;
 	
-	virtual STDMETHODIMP_(signed char) quality() PURE;
-	virtual STDMETHODIMP_(bool) setQuality(signed char inQuality) PURE;
+
+    virtual STDMETHODIMP_(bool) setQuality(int inQuality) PURE;
+    virtual STDMETHODIMP_(bool) setBitrateQualityMode(int inBitrate) PURE;
+    virtual STDMETHODIMP_(bool) setManaged(int inBitrate, int inMinBitrate, int inMaxBitrate) PURE;
 };
 
+
+
 #ifdef __cplusplus
 }
 #endif

Added: trunk/oggdsf/src/lib/codecs/vorbis/filters/dsfVorbisEncoder/PropsVorbisEncoder.cpp
===================================================================
--- trunk/oggdsf/src/lib/codecs/vorbis/filters/dsfVorbisEncoder/PropsVorbisEncoder.cpp	2006-10-01 04:02:53 UTC (rev 11870)
+++ trunk/oggdsf/src/lib/codecs/vorbis/filters/dsfVorbisEncoder/PropsVorbisEncoder.cpp	2006-10-01 08:03:18 UTC (rev 11871)
@@ -0,0 +1,79 @@
+#include "StdAfx.h"
+#include "PropsVorbisEncoder.h"
+
+PropsVorbisEncoder::PropsVorbisEncoder(     LPUNKNOWN inUnk
+                                        ,   HRESULT* outHR)
+	:	CBasePropertyPage(      NAME("illiminable Vorbis Encoder")
+                            ,   inUnk
+                            ,   IDD_VORBIS_ENCODE_SETTINGS
+                            ,   IDS_VORBIS_ENC_PROPS_STRING)
+{
+}
+
+PropsVorbisEncoder::~PropsVorbisEncoder(void)
+{
+}
+
+CUnknown* WINAPI PropsVorbisEncoder::CreateInstance(LPUNKNOWN inUnk, HRESULT* outHR)
+{
+    return new PropsVorbisEncoder(inUnk, outHR);
+}
+
+HRESULT PropsVorbisEncoder::OnActivate(void)
+{
+    //TODO::: Setup everything
+    return S_OK;
+}
+HRESULT PropsVorbisEncoder::OnConnect(IUnknown *pUnk)
+{
+	if (mVorbisEncodeSettings != NULL) {
+		//mTheoraEncodeSettings->Release();
+		mVorbisEncodeSettings = NULL;
+	}
+
+    HRESULT locHR;
+    // Query pUnk for the filter's custom interface.
+    locHR = pUnk->QueryInterface(IID_IVorbisEncodeSettings, (void**)(&mVorbisEncodeSettings));
+    return locHR;
+}
+HRESULT PropsVorbisEncoder::OnDisconnect(void)
+{
+	if (mVorbisEncodeSettings != NULL) {
+		//mTheoraEncodeSettings->Release();
+		mVorbisEncodeSettings = NULL;
+	}
+    return S_OK;
+}
+INT_PTR PropsVorbisEncoder::OnReceiveMessage(HWND hwnd,  UINT uMsg, WPARAM wParam, LPARAM lParam)
+{
+    // Did not handle the message.
+    return CBasePropertyPage::OnReceiveMessage(hwnd, uMsg, wParam, lParam);
+}
+HRESULT PropsVorbisEncoder::OnApplyChanges(void)
+{
+	if (mVorbisEncodeSettings == NULL) {
+		return E_POINTER;
+	}
+    //TODO::: Apply the settings.
+
+	SetClean();
+    return S_OK;
+}
+
+void PropsVorbisEncoder::SetDirty()
+{
+    m_bDirty = TRUE;
+    if (m_pPageSite)
+    {
+        m_pPageSite->OnStatusChange(PROPPAGESTATUS_DIRTY);
+    }
+}
+
+void PropsVorbisEncoder::SetClean()
+{
+    m_bDirty = FALSE;
+    if (m_pPageSite)
+    {
+        m_pPageSite->OnStatusChange(PROPPAGESTATUS_CLEAN);
+    }
+}
\ No newline at end of file

Added: trunk/oggdsf/src/lib/codecs/vorbis/filters/dsfVorbisEncoder/PropsVorbisEncoder.h
===================================================================
--- trunk/oggdsf/src/lib/codecs/vorbis/filters/dsfVorbisEncoder/PropsVorbisEncoder.h	2006-10-01 04:02:53 UTC (rev 11870)
+++ trunk/oggdsf/src/lib/codecs/vorbis/filters/dsfVorbisEncoder/PropsVorbisEncoder.h	2006-10-01 08:03:18 UTC (rev 11871)
@@ -0,0 +1,28 @@
+#pragma once
+
+#include "resource.h"
+
+#include <commctrl.h>
+
+class PropsVorbisEncoder
+    :	public CBasePropertyPage
+{
+public:
+    PropsVorbisEncoder(LPUNKNOWN inUnk, HRESULT* outHR);
+    virtual ~PropsVorbisEncoder(void);
+
+	static CUnknown* WINAPI CreateInstance(LPUNKNOWN inUnk, HRESULT* outHR);
+
+	//CBasePropertyPage Virtual Overrides
+	HRESULT OnActivate(void);
+	HRESULT OnConnect(IUnknown *pUnk);
+	HRESULT OnDisconnect(void);
+	INT_PTR OnReceiveMessage(HWND hwnd,  UINT uMsg, WPARAM wParam, LPARAM lParam);
+	HRESULT OnApplyChanges(void);
+
+protected:
+	void SetDirty();
+	void SetClean();
+
+    IVorbisEncodeSettings* mVorbisEncodeSettings;
+};

Modified: trunk/oggdsf/src/lib/codecs/vorbis/filters/dsfVorbisEncoder/VorbisEncodeFilter.cpp
===================================================================
--- trunk/oggdsf/src/lib/codecs/vorbis/filters/dsfVorbisEncoder/VorbisEncodeFilter.cpp	2006-10-01 04:02:53 UTC (rev 11870)
+++ trunk/oggdsf/src/lib/codecs/vorbis/filters/dsfVorbisEncoder/VorbisEncodeFilter.cpp	2006-10-01 08:03:18 UTC (rev 11871)
@@ -77,6 +77,10 @@
 		*ppv = (IVorbisEncodeSettings*)this;
 		((IUnknown*)*ppv)->AddRef();
 		return NOERROR;
+	} else if (riid == IID_ISpecifyPropertyPages) {
+		*ppv = (ISpecifyPropertyPages*)this;
+		((IUnknown*)*ppv)->AddRef();
+		return NOERROR;
 	}
 	return AbstractTransformFilter::NonDelegatingQueryInterface(riid, ppv);
 }
@@ -115,25 +119,62 @@
 	return true;
 }
 
+STDMETHODIMP_(VorbisEncodeSettings) VorbisEncodeFilter::getEncoderSettings()
+{
+    return ((VorbisEncodeInputPin*)mInputPin)->mEncoderSettings;
+}
+	
+STDMETHODIMP_(bool) VorbisEncodeFilter::setQuality(int inQuality)
+{
+    return ((VorbisEncodeInputPin*)mInputPin)->mEncoderSettings.setQuality(inQuality);  
+}
 
-STDMETHODIMP_(signed char) VorbisEncodeFilter::quality() 
+STDMETHODIMP_(bool) VorbisEncodeFilter::setBitrateQualityMode(int inBitrate)
 {
-	//return (signed char)( ((VorbisEncodeInputPin*)mInputPin)->mVorbisQuality * 100 );
-    return (signed char)( ((VorbisEncodeInputPin*)mInputPin)->mEncoderSettings.mQuality );
+    return ((VorbisEncodeInputPin*)mInputPin)->mEncoderSettings.setBitrateQualityMode(inBitrate);
 }
 
+STDMETHODIMP_(bool) VorbisEncodeFilter::setManaged(int inBitrate, int inMinBitrate, int inMaxBitrate)
+{
+    return ((VorbisEncodeInputPin*)mInputPin)->mEncoderSettings.setManaged(inBitrate, inMinBitrate, inMaxBitrate);
+}
 
-STDMETHODIMP_(bool) VorbisEncodeFilter::setQuality(signed char inQuality) 
+//SpecifyPropertyPages Implementation
+STDMETHODIMP VorbisEncodeFilter::GetPages(CAUUID* outPropPages) 
 {
-	
-	if ((inQuality >= 0) && (inQuality < 100)) {
-		
-		//((VorbisEncodeInputPin*)mInputPin)->mVorbisQuality = (float)inQuality/(float)100;
-        ((VorbisEncodeInputPin*)mInputPin)->mEncoderSettings.setQuality(inQuality);
-		
-		return true;
-	} else {
-		
-		return false;
-	}
+	if (outPropPages == NULL) return E_POINTER;
+
+	const int NUM_PROP_PAGES = 1;
+    outPropPages->cElems = NUM_PROP_PAGES;
+    outPropPages->pElems = (GUID*)(CoTaskMemAlloc(sizeof(GUID) * NUM_PROP_PAGES));
+    if (outPropPages->pElems == NULL) 
+    {
+        return E_OUTOFMEMORY;
+    }
+
+	outPropPages->pElems[0] = CLSID_PropsVorbisEncoder;
+    
+    return S_OK;
+
 }
+//STDMETHODIMP_(signed char) VorbisEncodeFilter::quality() 
+//{
+//	//return (signed char)( ((VorbisEncodeInputPin*)mInputPin)->mVorbisQuality * 100 );
+//    return (signed char)( ((VorbisEncodeInputPin*)mInputPin)->mEncoderSettings.mQuality );
+//}
+//
+//
+//STDMETHODIMP_(bool) VorbisEncodeFilter::setQuality(signed char inQuality) 
+//{
+//	
+//	if ((inQuality >= 0) && (inQuality < 100)) {
+//		
+//		//((VorbisEncodeInputPin*)mInputPin)->mVorbisQuality = (float)inQuality/(float)100;
+//        ((VorbisEncodeInputPin*)mInputPin)->mEncoderSettings.setQuality(inQuality);
+//		
+//		return true;
+//	} else {
+//		
+//		return false;
+//	}
+//}

Modified: trunk/oggdsf/src/lib/codecs/vorbis/filters/dsfVorbisEncoder/VorbisEncodeFilter.h
===================================================================
--- trunk/oggdsf/src/lib/codecs/vorbis/filters/dsfVorbisEncoder/VorbisEncodeFilter.h	2006-10-01 04:02:53 UTC (rev 11870)
+++ trunk/oggdsf/src/lib/codecs/vorbis/filters/dsfVorbisEncoder/VorbisEncodeFilter.h	2006-10-01 08:03:18 UTC (rev 11871)
@@ -46,6 +46,7 @@
 class VorbisEncodeFilter
 	:	public AbstractTransformFilter
 	,	public IVorbisEncodeSettings
+    ,	public ISpecifyPropertyPages
 {
 public:
 	//Friend Classes
@@ -63,12 +64,21 @@
 	//COM Creator function
 	static CUnknown* WINAPI VorbisEncodeFilter::CreateInstance(LPUNKNOWN pUnk, HRESULT *pHr);
 
-	/// Returns the quality setting for vorbis
-	virtual STDMETHODIMP_(signed char) quality();
+    /// ISpecifyPropertyPages::GetPages Implementation
+	STDMETHODIMP GetPages(CAUUID* outPropPages);
 
-	/// Set the quality for vorbis encoding, between 0 and 99 inclusive (equiv to 0.0 to 0.99)
-	virtual STDMETHODIMP_(bool) setQuality(signed char inQuality);
+	/// Returns the encoder setting for vorbis
+	virtual STDMETHODIMP_(VorbisEncodeSettings) getEncoderSettings();
+	
+    /// Sets the quality
+    virtual STDMETHODIMP_(bool) setQuality(int inQuality);
 
+    /// Sets the bitrate via quality mode
+    virtual STDMETHODIMP_(bool) setBitrateQualityMode(int inBitrate);
+
+    /// Sets the  managed bitrate constraints
+    virtual STDMETHODIMP_(bool) setManaged(int inBitrate, int inMinBitrate, int inMaxBitrate);
+
 protected:
 	//Implementation of pure virtuals from AbstractTransformFilter
 	virtual bool ConstructPins();

Added: trunk/oggdsf/src/lib/codecs/vorbis/filters/dsfVorbisEncoder/dsfVorbisEncoder.aps
===================================================================
(Binary files differ)


Property changes on: trunk/oggdsf/src/lib/codecs/vorbis/filters/dsfVorbisEncoder/dsfVorbisEncoder.aps
___________________________________________________________________
Name: svn:mime-type
   + application/octet-stream

Added: trunk/oggdsf/src/lib/codecs/vorbis/filters/dsfVorbisEncoder/dsfVorbisEncoder.rc
===================================================================
--- trunk/oggdsf/src/lib/codecs/vorbis/filters/dsfVorbisEncoder/dsfVorbisEncoder.rc	2006-10-01 04:02:53 UTC (rev 11870)
+++ trunk/oggdsf/src/lib/codecs/vorbis/filters/dsfVorbisEncoder/dsfVorbisEncoder.rc	2006-10-01 08:03:18 UTC (rev 11871)
@@ -0,0 +1,118 @@
+// Microsoft Visual C++ generated resource script.
+//
+#include "resource.h"
+
+#define APSTUDIO_READONLY_SYMBOLS
+/////////////////////////////////////////////////////////////////////////////
+//
+// Generated from the TEXTINCLUDE 2 resource.
+//
+#include "afxres.h"
+
+/////////////////////////////////////////////////////////////////////////////
+#undef APSTUDIO_READONLY_SYMBOLS
+
+/////////////////////////////////////////////////////////////////////////////
+// English (U.S.) resources
+
+#if !defined(AFX_RESOURCE_DLL) || defined(AFX_TARG_ENU)
+#ifdef _WIN32
+LANGUAGE LANG_ENGLISH, SUBLANG_ENGLISH_US
+#pragma code_page(1252)
+#endif //_WIN32
+
+#ifdef APSTUDIO_INVOKED
+/////////////////////////////////////////////////////////////////////////////
+//
+// TEXTINCLUDE
+//
+
+1 TEXTINCLUDE 
+BEGIN
+    "resource.h\0"
+END
+
+2 TEXTINCLUDE 
+BEGIN
+    "#include ""afxres.h""\r\n"
+    "\0"
+END
+
+3 TEXTINCLUDE 
+BEGIN
+    "\r\n"
+    "\0"
+END
+
+#endif    // APSTUDIO_INVOKED
+
+
+/////////////////////////////////////////////////////////////////////////////
+//
+// Dialog
+//
+
+IDD_VORBIS_ENCODE_SETTINGS DIALOGEX 0, 0, 210, 154
+STYLE DS_SETFONT | WS_CHILD | WS_BORDER
+FONT 8, "MS Sans Serif", 400, 0, 0x0
+BEGIN
+    LTEXT           "TODO: layout property page",IDC_STATIC,60,73,90,8
+END
+
+
+/////////////////////////////////////////////////////////////////////////////
+//
+// DESIGNINFO
+//
+
+#ifdef APSTUDIO_INVOKED
+GUIDELINES DESIGNINFO 
+BEGIN
+    IDD_VORBIS_ENCODE_SETTINGS, DIALOG
+    BEGIN
+        LEFTMARGIN, 7
+        RIGHTMARGIN, 203
+        TOPMARGIN, 7
+        BOTTOMMARGIN, 147
+    END
+END
+#endif    // APSTUDIO_INVOKED
+
+#endif    // English (U.S.) resources
+/////////////////////////////////////////////////////////////////////////////
+
+
+/////////////////////////////////////////////////////////////////////////////
+// English (Australia) resources
+
+#if !defined(AFX_RESOURCE_DLL) || defined(AFX_TARG_ENA)
+#ifdef _WIN32
+LANGUAGE LANG_ENGLISH, SUBLANG_ENGLISH_AUS
+#pragma code_page(1252)
+#endif //_WIN32
+
+/////////////////////////////////////////////////////////////////////////////
+//
+// String Table
+//
+
+STRINGTABLE 
+BEGIN
+    IDS_VORBIS_ENC_PROPS_STRING "Vorbis Encode Settings"
+END
+
+#endif    // English (Australia) resources
+/////////////////////////////////////////////////////////////////////////////
+
+
+
+#ifndef APSTUDIO_INVOKED
+/////////////////////////////////////////////////////////////////////////////
+//
+// Generated from the TEXTINCLUDE 3 resource.
+//
+
+
+/////////////////////////////////////////////////////////////////////////////
+#endif    // not APSTUDIO_INVOKED
+

Modified: trunk/oggdsf/src/lib/codecs/vorbis/filters/dsfVorbisEncoder/dsfVorbisEncoder.vcproj
===================================================================
--- trunk/oggdsf/src/lib/codecs/vorbis/filters/dsfVorbisEncoder/dsfVorbisEncoder.vcproj	2006-10-01 04:02:53 UTC (rev 11870)
+++ trunk/oggdsf/src/lib/codecs/vorbis/filters/dsfVorbisEncoder/dsfVorbisEncoder.vcproj	2006-10-01 08:03:18 UTC (rev 11871)
@@ -1285,6 +1285,10 @@
 			Filter="cpp;c;cxx;def;odl;idl;hpj;bat;asm"
 			>
 			<File
+				RelativePath=".\PropsVorbisEncoder.cpp"
+				>
+			</File>
+			<File
 				RelativePath="stdafx.cpp"
 				>
 				<FileConfiguration
@@ -1442,6 +1446,14 @@
 				>
 			</File>
 			<File
+				RelativePath=".\PropsVorbisEncoder.h"
+				>
+			</File>
+			<File
+				RelativePath=".\resource.h"
+				>
+			</File>
+			<File
 				RelativePath="stdafx.h"
 				>
 			</File>
@@ -1466,6 +1478,10 @@
 			Name="Resource Files"
 			Filter="rc;ico;cur;bmp;dlg;rc2;rct;bin;rgs;gif;jpg;jpeg;jpe"
 			>
+			<File
+				RelativePath=".\dsfVorbisEncoder.rc"
+				>
+			</File>
 		</Filter>
 		<File
 			RelativePath="ReadMe.txt"

Added: trunk/oggdsf/src/lib/codecs/vorbis/filters/dsfVorbisEncoder/resource.h
===================================================================
--- trunk/oggdsf/src/lib/codecs/vorbis/filters/dsfVorbisEncoder/resource.h	2006-10-01 04:02:53 UTC (rev 11870)
+++ trunk/oggdsf/src/lib/codecs/vorbis/filters/dsfVorbisEncoder/resource.h	2006-10-01 08:03:18 UTC (rev 11871)
@@ -0,0 +1,17 @@
+//{{NO_DEPENDENCIES}}
+// Microsoft Visual C++ generated include file.
+// Used by dsfVorbisEncoder.rc
+//
+#define IDS_VORBIS_ENC_PROPS_STRING     101
+#define IDD_VORBIS_ENCODE_SETTINGS      106
+
+// Next default values for new objects
+// 
+#ifdef APSTUDIO_INVOKED
+#ifndef APSTUDIO_READONLY_SYMBOLS
+#define _APS_NEXT_RESOURCE_VALUE        102
+#define _APS_NEXT_COMMAND_VALUE         40001
+#define _APS_NEXT_CONTROL_VALUE         1001
+#define _APS_NEXT_SYMED_VALUE           101
+#endif
+#endif

Modified: trunk/oggdsf/src/lib/codecs/vorbis/filters/dsfVorbisEncoder/stdafx.h
===================================================================
--- trunk/oggdsf/src/lib/codecs/vorbis/filters/dsfVorbisEncoder/stdafx.h	2006-10-01 04:02:53 UTC (rev 11870)
+++ trunk/oggdsf/src/lib/codecs/vorbis/filters/dsfVorbisEncoder/stdafx.h	2006-10-01 08:03:18 UTC (rev 11871)
@@ -40,4 +40,6 @@
 // Windows Header Files:
 #include <windows.h>
 
+#include "vorbisencoderdllstuff.h"
+
 // TODO: reference additional headers your program requires here

Modified: trunk/oggdsf/src/lib/codecs/vorbis/filters/dsfVorbisEncoder/vorbisencoderdllstuff.h
===================================================================
--- trunk/oggdsf/src/lib/codecs/vorbis/filters/dsfVorbisEncoder/vorbisencoderdllstuff.h	2006-10-01 04:02:53 UTC (rev 11870)
+++ trunk/oggdsf/src/lib/codecs/vorbis/filters/dsfVorbisEncoder/vorbisencoderdllstuff.h	2006-10-01 08:03:18 UTC (rev 11871)
@@ -31,6 +31,10 @@
 
 #pragma once
 
+#include <streams.h>
+#include <pullpin.h>
+#include <initguid.h>
+
 struct sVorbisFormatBlock {
 	unsigned long vorbisVersion;
 	unsigned long samplesPerSec;
@@ -53,7 +57,11 @@
 #define LIBOOOGG_API __declspec(dllimport)
 #endif
 
+// {A538F05F-DC08-4bf9-994F-18A86CCA6CC4}
+DEFINE_GUID(CLSID_PropsVorbisEncoder, 
+0xa538f05f, 0xdc08, 0x4bf9, 0x99, 0x4f, 0x18, 0xa8, 0x6c, 0xca, 0x6c, 0xc4);
 
+
 // {5C94FE86-B93B-467f-BFC3-BD6C91416F9B}
 DEFINE_GUID(CLSID_VorbisEncodeFilter, 
 0x5c94fe86, 0xb93b, 0x467f, 0xbf, 0xc3, 0xbd, 0x6c, 0x91, 0x41, 0x6f, 0x9b);

Modified: trunk/oggdsf/src/lib/codecs/vorbis/libs/libOOVorbis/VorbisEncodeSettings.cpp
===================================================================
--- trunk/oggdsf/src/lib/codecs/vorbis/libs/libOOVorbis/VorbisEncodeSettings.cpp	2006-10-01 04:02:53 UTC (rev 11870)
+++ trunk/oggdsf/src/lib/codecs/vorbis/libs/libOOVorbis/VorbisEncodeSettings.cpp	2006-10-01 08:03:18 UTC (rev 11871)
@@ -49,6 +49,8 @@
     mMaxBitrate = 0;
     mQuality = 30;
     mIsQualitySet = true;
+
+    //TODO::: Do we want to do this?
     mNumChannels = 0;
     mSampleRate = 0;
 
@@ -77,6 +79,7 @@
 
 bool VorbisEncodeSettings::setBitrateQualityMode(int inBitrate)
 {
+    //TODO::: Can set hard min max too apparently
     if (inBitrate > 0) {
         mMinBitrate = -1;
         mMaxBitrate = -1;



More information about the commits mailing list