mirror of
https://github.com/moonlight-stream/moonlight-embedded.git
synced 2026-06-17 06:11:36 +00:00
Fix compilation errors video output
This commit is contained in:
+16
-6
@@ -17,6 +17,8 @@
|
|||||||
* along with Moonlight; if not, see <http://www.gnu.org/licenses/>.
|
* along with Moonlight; if not, see <http://www.gnu.org/licenses/>.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
|
#include "../video.h"
|
||||||
|
|
||||||
#include "vpu_io.h"
|
#include "vpu_io.h"
|
||||||
#include "vpu_lib.h"
|
#include "vpu_lib.h"
|
||||||
|
|
||||||
@@ -154,27 +156,27 @@ static int decoder_renderer_submit_decode_unit(PDECODE_UNIT decodeUnit) {
|
|||||||
|
|
||||||
Uint32 target_addr = mem_desc.virt_uaddr + (pa_write_ptr - mem_desc.phy_addr);
|
Uint32 target_addr = mem_desc.virt_uaddr + (pa_write_ptr - mem_desc.phy_addr);
|
||||||
|
|
||||||
if ( (target_addr + data_len) > mem_desc.virt_uaddr + STREAM_BUF_SIZE) {
|
if ( (target_addr + entry->length) > mem_desc.virt_uaddr + STREAM_BUF_SIZE) {
|
||||||
int room = mem_desc.virt_uaddr + STREAM_BUF_SIZE - target_addr;
|
int room = mem_desc.virt_uaddr + STREAM_BUF_SIZE - target_addr;
|
||||||
memcpy((void *)target_addr, indata, room);
|
memcpy((void *)target_addr, entry->data, room);
|
||||||
memcpy((void *)mem_desc.virt_uaddr, indata + room, data_len - room);
|
memcpy((void *)mem_desc.virt_uaddr, entry->data + room, entry->length - room);
|
||||||
} else {
|
} else {
|
||||||
memcpy((void *)target_addr, indata, data_len);
|
memcpy((void *)target_addr, entry->data, entry->length);
|
||||||
}
|
}
|
||||||
vpu_DecUpdateBitstreamBuffer(handle, data_len);
|
vpu_DecUpdateBitstreamBuffer(handle, entry->length);
|
||||||
}
|
}
|
||||||
|
|
||||||
if (!initialized) {
|
if (!initialized) {
|
||||||
initialized = true;
|
initialized = true;
|
||||||
|
|
||||||
vpu_DecSetEscSeqInit(handle, 1);
|
vpu_DecSetEscSeqInit(handle, 1);
|
||||||
|
DecInitialInfo initinfo = {0};
|
||||||
if (vpu_DecGetInitialInfo(handle, &initinfo) != RETCODE_SUCCESS) {
|
if (vpu_DecGetInitialInfo(handle, &initinfo) != RETCODE_SUCCESS) {
|
||||||
fprintf(stderr, "Can't get initial info\n");
|
fprintf(stderr, "Can't get initial info\n");
|
||||||
exit(EXIT_FAILURE);
|
exit(EXIT_FAILURE);
|
||||||
}
|
}
|
||||||
vpu_DecSetEscSeqInit(handle, 0);
|
vpu_DecSetEscSeqInit(handle, 0);
|
||||||
|
|
||||||
DecInitialInfo initinfo = {0};
|
|
||||||
int regfbcount = initinfo.minFrameBufferCount + 2;
|
int regfbcount = initinfo.minFrameBufferCount + 2;
|
||||||
threshold = regfbcount - initinfo.minFrameBufferCount;
|
threshold = regfbcount - initinfo.minFrameBufferCount;
|
||||||
int picWidth = ((initinfo.picWidth + 15) & ~15);
|
int picWidth = ((initinfo.picWidth + 15) & ~15);
|
||||||
@@ -427,3 +429,11 @@ static void decoder_renderer_release() {
|
|||||||
IOFreePhyMem(&mem_desc);
|
IOFreePhyMem(&mem_desc);
|
||||||
vpu_UnInit();
|
vpu_UnInit();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
DECODER_RENDERER_CALLBACKS decoder_callbacks = {
|
||||||
|
.setup = decoder_renderer_setup,
|
||||||
|
.start = decoder_renderer_start,
|
||||||
|
.stop = decoder_renderer_stop,
|
||||||
|
.release = decoder_renderer_release,
|
||||||
|
.submitDecodeUnit = decoder_renderer_submit_decode_unit,
|
||||||
|
};
|
||||||
|
|||||||
+1
-1
@@ -28,7 +28,7 @@ SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
|||||||
// Video decode on Raspberry Pi using OpenMAX IL though the ilcient helper library
|
// Video decode on Raspberry Pi using OpenMAX IL though the ilcient helper library
|
||||||
// Based upon video decode example from the Raspberry Pi firmware
|
// Based upon video decode example from the Raspberry Pi firmware
|
||||||
|
|
||||||
#include "video.h"
|
#include "../video.h"
|
||||||
|
|
||||||
#include "bcm_host.h"
|
#include "bcm_host.h"
|
||||||
#include "ilclient.h"
|
#include "ilclient.h"
|
||||||
|
|||||||
Reference in New Issue
Block a user