Compare commits
No commits in common. "70bc3a47f2b0d91820220bd318a4aa12215b3504" and "211ecd1aa17e83411c591129b9e5e47f2d31ce6d" have entirely different histories.
70bc3a47f2
...
211ecd1aa1
@ -33,15 +33,17 @@
|
||||
android:required="false" />
|
||||
|
||||
<!-- Audio recording support -->
|
||||
<uses-feature
|
||||
<!-- if you want to capture audio, uncomment this. -->
|
||||
<!-- <uses-feature
|
||||
android:name="android.hardware.microphone"
|
||||
android:required="false" />
|
||||
android:required="false" /> -->
|
||||
|
||||
<!-- Camera support -->
|
||||
<!-- if you want to record video, uncomment this. -->
|
||||
<!--
|
||||
<uses-permission android:name="android.permission.CAMERA" />
|
||||
<uses-feature
|
||||
android:name="android.hardware.camera"
|
||||
android:required="false" />
|
||||
<uses-feature android:name="android.hardware.camera" />
|
||||
-->
|
||||
|
||||
<uses-permission android:name="android.permission.INTERNET" />
|
||||
|
||||
|
@ -79,35 +79,8 @@ uint64_t SDLRendererTextureUploader::upload(const uint8_t* data, uint32_t width,
|
||||
}
|
||||
}
|
||||
|
||||
// while this split *should* not needed, the opengles renderer might like this more...
|
||||
if (sdl_format == SDL_PIXELFORMAT_IYUV || sdl_format == SDL_PIXELFORMAT_YV12) {
|
||||
if (!SDL_UpdateYUVTexture(
|
||||
tex,
|
||||
nullptr,
|
||||
static_cast<const uint8_t*>(surf->pixels),
|
||||
surf->w * 1,
|
||||
static_cast<const uint8_t*>(surf->pixels) + surf->w * surf->h,
|
||||
surf->w/2 * 1,
|
||||
static_cast<const uint8_t*>(surf->pixels) + (surf->w/2) * (surf->h/2),
|
||||
surf->w/2 * 1
|
||||
)) {
|
||||
std::cerr << "SDLRTU error: tex yuv update failed " << SDL_GetError() << "\n";
|
||||
}
|
||||
} else if (sdl_format == SDL_PIXELFORMAT_NV12 || sdl_format == SDL_PIXELFORMAT_NV21) {
|
||||
if (!SDL_UpdateNVTexture(
|
||||
tex,
|
||||
nullptr,
|
||||
static_cast<const uint8_t*>(surf->pixels),
|
||||
surf->w * 1,
|
||||
static_cast<const uint8_t*>(surf->pixels) + surf->w * surf->h,
|
||||
surf->w * 1
|
||||
)) {
|
||||
std::cerr << "SDLRTU error: tex nv update failed " << SDL_GetError() << "\n";
|
||||
}
|
||||
} else {
|
||||
if (!SDL_UpdateTexture(tex, nullptr, surf->pixels, surf->pitch)) {
|
||||
std::cerr << "SDLRTU error: tex update failed " << SDL_GetError() << "\n";
|
||||
}
|
||||
if (!SDL_UpdateTexture(tex, nullptr, surf->pixels, surf->pitch)) {
|
||||
std::cerr << "SDLRTU error: tex update failed " << SDL_GetError() << "\n";
|
||||
}
|
||||
|
||||
if (need_to_lock) {
|
||||
|
Loading…
Reference in New Issue
Block a user