Permalink
Browse files

Merge branch 'master' of git@github.com:xbmc/xbmc

  • Loading branch information...
2 parents 1d18af5 + 73fb882 commit 8e98a4c25ea0b6d4e1779cc034265257f9f4f24e Phaeodaria committed Jan 28, 2011
Showing with 147 additions and 108 deletions.
  1. +2 −2 README.armel
  2. +2 −2 README.linux
  3. +2 −2 README.osx
  4. +2 −2 README.ubuntu
  5. +1 −0 XBMC.xcodeproj/project.pbxproj
  6. 0 {xbmc/cores/dvdplayer/Codecs → lib}/ffmpeg/.gitignore
  7. 0 ...dplayer/Codecs → lib}/ffmpeg/patches/0038-fixed-bitstream-mode-improperly-set.-Ticket-10981.patch
  8. 0 ...ayer/Codecs → lib}/ffmpeg/patches/0039-Add-av_popcount-to-libavutil-common.h-and-bump-minor.patch
  9. 0 .../dvdplayer/Codecs → lib}/ffmpeg/patches/0040-added-export-DTS-profile-information-in-ffmpeg.patch
  10. 0 ...es/dvdplayer/Codecs → lib}/ffmpeg/patches/0041-Add-av_get_profile_name-to-get-profile-names.patch
  11. 0 {xbmc/cores/dvdplayer/Codecs → lib}/ffmpeg/patches/0042-Show-profile-in-avcodec_string.patch
  12. 0 ...dvdplayer/Codecs → lib}/ffmpeg/patches/0043-h264-add-profile-names-for-the-existing-defines.patch
  13. 0 {xbmc/cores/dvdplayer/Codecs → lib}/ffmpeg/patches/0044-aacenc-add-recognized-profiles-array.patch
  14. 0 {xbmc/cores/dvdplayer/Codecs → lib}/ffmpeg/patches/0045-libfaac-add-recognized-profiles-array.patch
  15. 0 {xbmc/cores/dvdplayer/Codecs → lib}/ffmpeg/patches/0046-dca-add-profile-names.patch
  16. 0 ...ayer/Codecs → lib}/ffmpeg/patches/0047-dca-consider-a-stream-with-XXCh-X96-in-ExSS-as-DTS-H.patch
  17. +9 −9 xbmc/cores/VideoRenderers/WinRenderer.cpp
  18. +4 −4 xbmc/cores/VideoRenderers/WinRenderer.h
  19. +14 −4 xbmc/cores/dvdplayer/DVDCodecs/Video/DVDVideoCodecVDA.cpp
  20. +71 −0 xbmc/filesystem/DllHDHomeRun.h
  21. +24 −19 xbmc/filesystem/HDHomeRun.cpp
  22. +4 −49 xbmc/filesystem/HDHomeRun.h
  23. +0 −3 xbmc/filesystem/MythFile.h
  24. +0 −11 xbmc/filesystem/NptXbmcFile.cpp
  25. +1 −0 xbmc/guilib/GUIBorderedImage.cpp
  26. +10 −1 xbmc/guilib/GUITextLayout.cpp
  27. +1 −0 xbmc/guilib/GUIToggleButtonControl.cpp
View
@@ -135,9 +135,9 @@ If you dont succeed, or want to do it manually, follow the next step instead.
3. Getting the source code
-----------------------------------------------------------------------------
- $ sudo apt-get install subversion
+ $ sudo apt-get install git-core
$ cd /scratchbox/users/<username>/home/<username>/
- $ svn checkout https://xbmc.svn.sourceforge.net/svnroot/xbmc/branches/xbmc_on_arm
+ $ git clone git://github.com/xbmc/xbmc.git
-----------------------------------------------------------------------------
View
@@ -23,11 +23,11 @@ character itself should NOT be typed as part of the command.
2. Getting the source code
-----------------------------------------------------------------------------
-You will have to grab the source code of course. First install the subversion
+You will have to grab the source code of course. First install the git
package provided by your distribution. Then from a terminal, type:
$ cd $HOME
- $ svn checkout http://xbmc.svn.sourceforge.net/svnroot/xbmc/trunk xbmc
+ $ git clone git://github.com/xbmc/xbmc.git xbmc
-----------------------------------------------------------------------------
3. Installing the required libraries and headers
View
@@ -35,7 +35,7 @@ character itself should NOT be typed as part of the command.
-----------------------------------------------------------------------------
$ cd $HOME
- $ svn checkout https://xbmc.svn.sourceforge.net/svnroot/xbmc/trunk
+ $ git clone git://github.com/xbmc/xbmc.git xbmc
-----------------------------------------------------------------------------
3.0 Install XCODE
@@ -158,7 +158,7 @@ first. This is a simple step and involves the following:
The configure operation will setup the build environment for codecs and
internal libraries that are used by XBMC. This step is required for both Xcode
and command-line building. The "make clean" ensures that there are no stale
-binaries from svn that might cause problems The last step will pre-build
+binaries from git that might cause problems. The last step will pre-build
the majority of the codecs and libs:
View
@@ -22,9 +22,9 @@ character itself should NOT be typed as part of the command.
2. Getting the source code
-----------------------------------------------------------------------------
- # sudo apt-get install subversion
+ # sudo apt-get install git-core
# cd $HOME
- # svn checkout http://xbmc.svn.sourceforge.net/svnroot/xbmc/trunk xbmc
+ # git clone git://github.com/xbmc/xbmc.git xbmc
-----------------------------------------------------------------------------
3. Installing the required Ubuntu packages
@@ -7193,6 +7193,7 @@
isa = PBXProject;
buildConfigurationList = 1DEB924B08733DCA0010E9CD /* Build configuration list for PBXProject "XBMC" */;
compatibilityVersion = "Xcode 2.4";
+ developmentRegion = English;
hasScannedForEncodings = 1;
knownRegions = (
English,
@@ -665,12 +665,12 @@ void CWinRenderer::Render(DWORD flags)
CSingleLock lock(g_graphicsContext);
if (m_renderMethod == RENDER_SW)
- RenderSW(flags);
+ RenderSW();
else if (m_renderMethod == RENDER_PS)
- RenderPS(flags);
+ RenderPS();
}
-void CWinRenderer::RenderSW(DWORD flags)
+void CWinRenderer::RenderSW()
{
// 1. convert yuv to rgb
m_sw_scale_ctx = m_dllSwScale->sws_getCachedContext(m_sw_scale_ctx,
@@ -851,20 +851,20 @@ void CWinRenderer::ScaleFixedPipeline()
pD3DDev->SetTexture(0, NULL);
}
-void CWinRenderer::RenderPS(DWORD flags)
+void CWinRenderer::RenderPS()
{
if (!m_bUseHQScaler)
{
- Stage1(flags);
+ Stage1();
}
else
{
- Stage1(flags);
- Stage2(flags);
+ Stage1();
+ Stage2();
}
}
-void CWinRenderer::Stage1(DWORD flags)
+void CWinRenderer::Stage1()
{
if (!m_bUseHQScaler)
{
@@ -900,7 +900,7 @@ void CWinRenderer::Stage1(DWORD flags)
}
}
-void CWinRenderer::Stage2(DWORD flags)
+void CWinRenderer::Stage2()
{
m_scalerShader->Render(m_IntermediateTarget, m_sourceWidth, m_sourceHeight, m_sourceRect, m_destRect);
}
@@ -199,10 +199,10 @@ class CWinRenderer : public CBaseRenderer
protected:
virtual void Render(DWORD flags);
- void RenderSW(DWORD flags);
- void RenderPS(DWORD flags);
- void Stage1(DWORD flags);
- void Stage2(DWORD flags);
+ void RenderSW();
+ void RenderPS();
+ void Stage1();
+ void Stage2();
void ScaleFixedPipeline();
void CopyAlpha(int w, int h, unsigned char* src, unsigned char *srca, int srcstride, unsigned char* dst, unsigned char* dsta, int dststride);
virtual void ManageTextures();
@@ -504,6 +504,7 @@ bool CDVDVideoCodecVDA::Open(CDVDStreamInfo &hints, CDVDCodecOptions &options)
return false;
}
+ // setup the decoder configuration dict
CFMutableDictionaryRef decoderConfiguration = CFDictionaryCreateMutable(
kCFAllocatorDefault, 4, &kCFTypeDictionaryKeyCallBacks, &kCFTypeDictionaryValueCallBacks);
@@ -516,17 +517,25 @@ bool CDVDVideoCodecVDA::Open(CDVDStreamInfo &hints, CDVDCodecOptions &options)
CFDictionarySetValue(decoderConfiguration, m_dll->Get_kVDADecoderConfiguration_SourceFormat(), avcFormat);
CFDictionarySetValue(decoderConfiguration, m_dll->Get_kVDADecoderConfiguration_avcCData(), avcCData);
- // release our retained object refs
+ // release the retained object refs, decoderConfiguration owns them now
CFRelease(avcWidth);
CFRelease(avcHeight);
CFRelease(avcFormat);
CFRelease(avcCData);
- // create the VDADecoder object using defaulted '2vuy' video format buffers.
+ // setup the destination image buffer dict, vda will output this pict format
+ CFMutableDictionaryRef destinationImageBufferAttributes = CFDictionaryCreateMutable(
+ kCFAllocatorDefault, 1, &kCFTypeDictionaryKeyCallBacks, &kCFTypeDictionaryValueCallBacks);
+
+ OSType cvPixelFormatType = kCVPixelFormatType_422YpCbCr8;
+ CFNumberRef pixelFormat = CFNumberCreate(kCFAllocatorDefault, kCFNumberSInt32Type, &cvPixelFormatType);
+ CFDictionarySetValue(destinationImageBufferAttributes, kCVPixelBufferPixelFormatTypeKey, pixelFormat);
+
+ // create the VDADecoder object
OSStatus status;
try
{
- status = m_dll->VDADecoderCreate(decoderConfiguration, NULL,
+ status = m_dll->VDADecoderCreate(decoderConfiguration, destinationImageBufferAttributes,
(VDADecoderOutputCallback *)VDADecoderCallback, this, (VDADecoder*)&m_vda_decoder);
}
catch (...)
@@ -535,6 +544,7 @@ bool CDVDVideoCodecVDA::Open(CDVDStreamInfo &hints, CDVDCodecOptions &options)
status = kVDADecoderDecoderFailedErr;
}
CFRelease(decoderConfiguration);
+ CFRelease(destinationImageBufferAttributes);
if (status != kVDADecoderNoErr)
{
CLog::Log(LOGNOTICE, "%s - VDADecoder Codec failed to open, status(%d), profile(%d), level(%d)",
@@ -669,7 +679,7 @@ int CDVDVideoCodecVDA::Decode(BYTE* pData, int iSize, double dts, double pts)
// TODO: queue depth is related to the number of reference frames in encoded h.264.
// so we need to buffer until we get N ref frames + 1.
- if (m_queue_depth < 16)
+ if (m_queue_depth < 4)
{
return VC_BUFFER;
}
@@ -0,0 +1,71 @@
+#pragma once
+/*
+ * Copyright (C) 2005-2008 Team XBMC
+ * http://www.xbmc.org
+ *
+ * This Program is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation; either version 2, or (at your option)
+ * any later version.
+ *
+ * This Program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with XBMC; see the file COPYING. If not, write to
+ * the Free Software Foundation, 675 Mass Ave, Cambridge, MA 02139, USA.
+ * http://www.gnu.org/copyleft/gpl.html
+ *
+ */
+
+#include "DynamicDll.h"
+#include "lib/libhdhomerun/hdhomerun.h"
+
+class DllHdHomeRunInterface
+{
+public:
+ virtual ~DllHdHomeRunInterface() {}
+ virtual int discover_find_devices_custom(uint32_t target_ip, uint32_t device_type, uint32_t device_id, struct hdhomerun_discover_device_t result_list[], int max_count)=0;
+ virtual struct hdhomerun_device_t* device_create_from_str(const char *device_str, struct hdhomerun_debug_t *dbg)=0;
+ virtual void device_destroy(struct hdhomerun_device_t *hd)=0;
+ virtual int device_stream_start(struct hdhomerun_device_t *hd)=0;
+ virtual uint8_t* device_stream_recv(struct hdhomerun_device_t *hd, size_t max_size, size_t* pactual_size)=0;
+ virtual void device_stream_stop(struct hdhomerun_device_t *hd)=0;
+ virtual int device_set_tuner_channel(struct hdhomerun_device_t *hd, const char *channel)=0;
+ virtual int device_set_tuner_program(struct hdhomerun_device_t *hd, const char *program)=0;
+ virtual int device_set_tuner_from_str(struct hdhomerun_device_t *hd, const char *tuner_str)=0;
+ virtual void device_set_tuner(struct hdhomerun_device_t *hd, unsigned int tuner)=0;
+ virtual int device_get_tuner_status(struct hdhomerun_device_t *hd, char **pstatus_str, struct hdhomerun_tuner_status_t *status)=0;
+};
+
+class DllHdHomeRun : public DllDynamic, public DllHdHomeRunInterface
+{
+ DECLARE_DLL_WRAPPER(DllHdHomeRun, DLL_PATH_LIBHDHOMERUN)
+ DEFINE_METHOD5(int, discover_find_devices_custom, (uint32_t p1, uint32_t p2, uint32_t p3, struct hdhomerun_discover_device_t p4[], int p5))
+ DEFINE_METHOD2(struct hdhomerun_device_t*, device_create_from_str, (const char* p1, struct hdhomerun_debug_t *p2))
+ DEFINE_METHOD1(void, device_destroy, (struct hdhomerun_device_t* p1))
+ DEFINE_METHOD1(int, device_stream_start, (struct hdhomerun_device_t* p1))
+ DEFINE_METHOD3(uint8_t*, device_stream_recv, (struct hdhomerun_device_t* p1, size_t p2, size_t* p3))
+ DEFINE_METHOD1(void, device_stream_stop, (struct hdhomerun_device_t* p1))
+ DEFINE_METHOD2(int, device_set_tuner_channel, (struct hdhomerun_device_t *p1, const char *p2))
+ DEFINE_METHOD2(int, device_set_tuner_program, (struct hdhomerun_device_t *p1, const char *p2))
+ DEFINE_METHOD2(int, device_set_tuner_from_str, (struct hdhomerun_device_t *p1, const char *p2))
+ DEFINE_METHOD2(void, device_set_tuner, (struct hdhomerun_device_t *p1, unsigned int p2))
+ DEFINE_METHOD3(int, device_get_tuner_status, (struct hdhomerun_device_t *p1, char **p2, struct hdhomerun_tuner_status_t *p3));
+ BEGIN_METHOD_RESOLVE()
+ RESOLVE_METHOD_RENAME(hdhomerun_discover_find_devices_custom, discover_find_devices_custom)
+ RESOLVE_METHOD_RENAME(hdhomerun_device_create_from_str, device_create_from_str)
+ RESOLVE_METHOD_RENAME(hdhomerun_device_destroy, device_destroy)
+ RESOLVE_METHOD_RENAME(hdhomerun_device_stream_start, device_stream_start)
+ RESOLVE_METHOD_RENAME(hdhomerun_device_stream_recv, device_stream_recv)
+ RESOLVE_METHOD_RENAME(hdhomerun_device_stream_stop, device_stream_stop)
+ RESOLVE_METHOD_RENAME(hdhomerun_device_set_tuner_channel, device_set_tuner_channel)
+ RESOLVE_METHOD_RENAME(hdhomerun_device_set_tuner_program, device_set_tuner_program)
+ RESOLVE_METHOD_RENAME(hdhomerun_device_set_tuner_from_str, device_set_tuner_from_str)
+ RESOLVE_METHOD_RENAME(hdhomerun_device_set_tuner, device_set_tuner)
+ RESOLVE_METHOD_RENAME(hdhomerun_device_get_tuner_status, device_get_tuner_status)
+ END_METHOD_RESOLVE()
+};
+
@@ -22,6 +22,7 @@
#include "system.h"
#include "URL.h"
#include "FileItem.h"
+#include "DllHDHomeRun.h"
#include "HDHomeRun.h"
#include "utils/TimeUtils.h"
#include "utils/log.h"
@@ -67,17 +68,19 @@ class CUrlOptions
CDirectoryHomeRun::CDirectoryHomeRun()
{
- m_dll.Load();
+ m_pdll = new DllHdHomeRun;
+ m_pdll->Load();
}
CDirectoryHomeRun::~CDirectoryHomeRun()
{
- m_dll.Unload();
+ m_pdll->Unload();
+ delete m_pdll;
}
bool CDirectoryHomeRun::GetDirectory(const CStdString& strPath, CFileItemList &items)
{
- if(!m_dll.IsLoaded())
+ if(!m_pdll->IsLoaded())
return false;
CURL url(strPath);
@@ -87,7 +90,7 @@ bool CDirectoryHomeRun::GetDirectory(const CStdString& strPath, CFileItemList &i
// no hostname, list all available devices
int target_ip = 0;
struct hdhomerun_discover_device_t result_list[64];
- int count = m_dll.discover_find_devices_custom(target_ip, HDHOMERUN_DEVICE_TYPE_TUNER, HDHOMERUN_DEVICE_ID_WILDCARD, result_list, 64);
+ int count = m_pdll->discover_find_devices_custom(target_ip, HDHOMERUN_DEVICE_TYPE_TUNER, HDHOMERUN_DEVICE_ID_WILDCARD, result_list, 64);
if (count < 0)
return false;
@@ -116,16 +119,16 @@ bool CDirectoryHomeRun::GetDirectory(const CStdString& strPath, CFileItemList &i
}
else
{
- hdhomerun_device_t* device = m_dll.device_create_from_str(url.GetHostName().c_str(), NULL);
+ hdhomerun_device_t* device = m_pdll->device_create_from_str(url.GetHostName().c_str(), NULL);
if(!device)
return false;
- m_dll.device_set_tuner_from_str(device, url.GetFileName().c_str());
+ m_pdll->device_set_tuner_from_str(device, url.GetFileName().c_str());
hdhomerun_tuner_status_t status;
- if(!m_dll.device_get_tuner_status(device, NULL, &status))
+ if(!m_pdll->device_get_tuner_status(device, NULL, &status))
{
- m_dll.device_destroy(device);
+ m_pdll->device_destroy(device);
return true;
}
@@ -141,7 +144,7 @@ bool CDirectoryHomeRun::GetDirectory(const CStdString& strPath, CFileItemList &i
item->SetLabelPreformated(true);
items.Add(item);
- m_dll.device_destroy(device);
+ m_pdll->device_destroy(device);
return true;
}
@@ -155,12 +158,14 @@ bool CDirectoryHomeRun::GetDirectory(const CStdString& strPath, CFileItemList &i
CFileHomeRun::CFileHomeRun()
{
m_device = NULL;
- m_dll.Load();
+ m_pdll = new DllHdHomeRun;
+ m_pdll->Load();
}
CFileHomeRun::~CFileHomeRun()
{
Close();
+ delete m_pdll;
}
bool CFileHomeRun::Exists(const CURL& url)
@@ -202,26 +207,26 @@ int64_t CFileHomeRun::GetLength()
bool CFileHomeRun::Open(const CURL &url)
{
- if(!m_dll.IsLoaded())
+ if(!m_pdll->IsLoaded())
return false;
- m_device = m_dll.device_create_from_str(url.GetHostName().c_str(), NULL);
+ m_device = m_pdll->device_create_from_str(url.GetHostName().c_str(), NULL);
if(!m_device)
return false;
- m_dll.device_set_tuner_from_str(m_device, url.GetFileName().c_str());
+ m_pdll->device_set_tuner_from_str(m_device, url.GetFileName().c_str());
CUrlOptions options(url.GetOptions().Mid(1));
CUrlOptions::iterator it;
if( (it = options.find("channel")) != options.end() )
- m_dll.device_set_tuner_channel(m_device, it->second.c_str());
+ m_pdll->device_set_tuner_channel(m_device, it->second.c_str());
if( (it = options.find("program")) != options.end() )
- m_dll.device_set_tuner_program(m_device, it->second.c_str());
+ m_pdll->device_set_tuner_program(m_device, it->second.c_str());
// start streaming from selected device and tuner
- if( m_dll.device_stream_start(m_device) <= 0 )
+ if( m_pdll->device_stream_start(m_device) <= 0 )
return false;
return true;
@@ -242,7 +247,7 @@ unsigned int CFileHomeRun::Read(void* lpBuf, int64_t uiBufSize)
while(1)
{
datasize = (size_t) uiBufSize;
- uint8_t* ptr = m_dll.device_stream_recv(m_device, datasize, &datasize);
+ uint8_t* ptr = m_pdll->device_stream_recv(m_device, datasize, &datasize);
if(ptr)
{
memcpy(lpBuf, ptr, datasize);
@@ -261,8 +266,8 @@ void CFileHomeRun::Close()
{
if(m_device)
{
- m_dll.device_stream_stop(m_device);
- m_dll.device_destroy(m_device);
+ m_pdll->device_stream_stop(m_device);
+ m_pdll->device_destroy(m_device);
m_device = NULL;
}
}
Oops, something went wrong.

0 comments on commit 8e98a4c

Please sign in to comment.