1. 程式人生 > >thinkvd dvd and video converter

thinkvd dvd and video converter

在開發thinkvd軟體中,用的是SDL,實際應用中遇到了不少問題,有時想把它換掉。

今天又遇到兩個比較麻煩的問題:

1。多視窗時,其中一個視窗圖象不顯示

2。記憶體洩漏,每次播放都會增加0.3--0.5M。

問題一:

在SDL函式SDL_Texture *SDL_CreateTexture(Uint32 format, int access, int w, int h)中

texture = (SDL_Texture *) SDL_calloc(2, sizeof(*texture));

若連續createTexture時,有時返回同一指標,它是呼叫了

void *dlcalloc(size_t n_elements, size_t elem_size)

{

    void *mem;

    size_t req = 0;

    if (n_elements != 0) {

        req = n_elements * elem_size;

        if (((n_elements | elem_size) & ~(size_t) 0xffff) &&

            (req / n_elements != elem_size))

            req = MAX_SIZE_T;   /* force downstream failure on overflow */

    }

    mem = dlmalloc(req);

    if (mem != 0 && calloc_must_clear(mem2chunk(mem)))

        memset(mem, 0, req);

    return mem;

}

為什麼有時是同一指標,原因不明。出現的概率比較小,於是採用了儘可以少呼叫SDL_CreateTexture方法來解決.

問題二:記憶體洩漏

這個問題一直就知道,以前用的是固定播放視窗,問題不嚴重,此次改用了可更改播放視窗大小,問題就顯現出來的。反覆播放多次,應用程式記憶體很快就達到100M以上。

反覆跟蹤測試,先排除了createTexture記憶體洩漏問題,再看createWindow相關的,最後發現呼叫dx9的IDirect3DDevice9_Release(data->device);沒有釋放掉, 跟蹤方法是用它在分配記憶體的位置後面呼叫,看是否能正常釋放

thinkvd dvd and convert converter mpeg video sdl ppt c++

相關推薦

thinkvd dvd and video converter

在開發thinkvd軟體中,用的是SDL,實際應用中遇到了不少問題,有時想把它換掉。 今天又遇到兩個比較麻煩的問題: 1。多視窗時,其中一個視窗圖象不顯示 2。記憶體洩漏,每次播放都會增加0.3--0.5M。 問題一: 在SDL函式SDL_Texture *SDL_Crea

thinvd dvd and video 1.9.6更新日誌

/**  2011-01-20 **************************************/1。rmvb轉換音視訊同步問題2。刪除正在轉換的記錄程式崩潰3。刪除新增加的記錄關閉程式時崩潰4。轉換完成之後自動顯示為輸出檔案5。轉換或暫停時,profileCom

thinvd dvd and video 2011.02.08更新日誌

1。重新寫了dvd解碼,主要解決原來的結構定義不合理,維護不方便,改進了解析不同格式的dvd能力, seek定位問題, chapter或cell帶discontinue,支援純音訊的dvd。2。播放時中seek存在馬賽克或綠屏畫面問題 3.  帶start_time轉換開始畫

Freemake Video Converter視頻轉換軟件下載地址及去廣告

刪除 http ges exe als ima tar targe sources 下載地址:http://download.freemake.net/FreemakeOriginals2/LS/FreemakeVideoConverterFull.exe 去片頭及片尾廣

Compositing Text and Video in After Effects 在After Effects中合成文字和視訊 Lynda課程中文字幕

Compositing Text and Video in After Effects 中文字幕 在After Effects中合成文字和視訊 中文字幕Compositing Text and Video in After Effects 瞭解使用After Effects製作的真

coursera——Image and Video Processing

最近一直在刷coursera上的Image and Video Processing(https://www.coursera.org/learn/image-processing/home/welcome),收穫還可以,主要是掌握了影象的一些去噪、修復、邊緣分割思想,最重要的啟發主要還

Compositing Text and Video in After Effects 在After Effects中合成文字和視訊 Lynda課程中文字幕

Compositing Text and Video in After Effects 中文字幕 在After Effects中合成文字和視訊 中文字幕Compositing Text and Video in After Effects 瞭解使用After

Coursera : Image and Video Processing學習筆記

之前軟體杯做OCR識別,圖片預處理比較的難搞的情況就是,那種在光照不均勻的環境(或者閃光燈)下導致影象呈現由光照中心由亮變暗的亮度不均勻影象的處理辦法,使用基於滑動視窗的區域性二值化

《Optimized contrast enhancement for real-time image and video dehazin》論文C++復現

前言 \quad 本文提出了一種針對含有霧的影象和視訊快速、完善的去霧演算法。觀察發現有霧的影象普遍具有低對比度,我們通過增強對比度來

Freemake Video Converter(視訊轉換器)v4.1.10.137官方中文版

freemake video converter是一套相當方便好用的免費視訊轉換器,支援了市面上大多數的影音圖片格式,能將影片、照片、音樂轉成avi,wmv, mp4, 3gp, dvd, mp3,或是行動裝置的格式(如ipod,iphone, ipad, psp, xbox, blackberry

online meetings and video conferencing

Amazon Chime is a communications service that transforms online meetings with a secure, easy-to-use application that you can trust. Amazon Chime

最新論文閱讀(21)--Real-Time Single Image and Video Super-Resolution Using an Efficient Sub-Pixel Convoluti

Real-Time Single Image and Video Super-Resolution Using an Efficient Sub-Pixel Convolutional Neural Network - 2016年9月 - 超解析度 -

視頻顯著性檢測-----Predicting Video Saliency using Object-to-Motion CNN and Two-layer Convolutional LSTM

layer lin -- 分享圖片 組合 object idt red 9.png 幀內顯著性檢測: 將卷積網絡的多層特征進行組合通過unsampling 得到粗顯著性預測; 幀間顯著性檢測: (粗檢測結果+新卷積網絡的特征圖,最後+之前卷積網絡的卷積特征輸入到LST

CVPR 2017:See the Forest for the Trees: Joint Spatial and Temporal Recurrent Neural Networks for Video-based Person Re-identification

network 測試 eee 分享 The 因此 進行 最大 變化 [1] Z. Zhou, Y. Huang, W. Wang, L. Wang, T. Tan, Ieee, See the Forest for the Trees: Joint Spatial and

Optical Flow Guided Feature A Fast and Robust Motion Representation for Video Action Recognition論文解讀

Optical Flow Guided Feature A Fast and Robust Motion Representation for Video Action Recognition論文解讀 1. Abstract 2. 論文解讀 3

DAVIS2016-A Benchmark Dataset and Evaluation Methodology for Video Object Segmentation

專案網址:https://davischallenge.org/davis2016/code.html 稠密標註的視訊目標分割資料集 可以用於半監督和無監督的方法檢驗 可以用於目標分割問題,也可以用於運動檢測問題 有訓練集,但測試集包含訓練集 後續會更新如何使用該

Fast and accurate object detection in high resolution 4K and 8K video using GPUs 論文筆記

文章目錄 一、基本資訊 二、研究背景 三、創新點 3.1 概述 3.2 詳解 3.2.1 問題分析 3.2.2 Attention pipeline 3.2.3 Implementation

Comparing Golang and Understanding Value Types Vilnius DevDays Video

I have edited the video I recorded during the conference where I presented Comparing Golang and Understanding Value Types. The conference was DevDays V

Optical Flow Guided Feature: A Fast and Robust Motion Representation for Video Action Recognition 翻譯

                   光流引導特徵:視訊動作識別的快速魯棒運動表示