Skip to content

Commit cba51d6

Browse files
committed
Load window reordered after load()
Signed-off-by: ryadav698 <[email protected]>
1 parent 28c2e7d commit cba51d6

File tree

1 file changed

+10
-5
lines changed

1 file changed

+10
-5
lines changed

test/gstTestHarness/rialto-api-test.cpp

Lines changed: 10 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -147,8 +147,8 @@ void ConfigureVideo()
147147
bool hasDrm = false;
148148
std::string mimeType;
149149
StreamFormat streamFormat;
150-
int32_t width = trackVideo.video.width;
151-
int32_t height = trackVideo.video.height;
150+
// int32_t width = trackVideo.video.width;
151+
// int32_t height = trackVideo.video.height;
152152
SegmentAlignment alignment = SegmentAlignment::AU;
153153

154154
switch( trackVideo.codec_type )
@@ -168,6 +168,10 @@ void ConfigureVideo()
168168
CodecData codecData;
169169
const char *codec_ptr = trackVideo.codec_data.c_str();
170170
codecData.data = std::vector<uint8_t>( codec_ptr, codec_ptr + trackVideo.codec_data.size() );
171+
172+
//Temp hack
173+
int32_t width = 1920;
174+
int32_t height = 1080;
171175

172176
std::unique_ptr<IMediaPipeline::MediaSourceVideo> sourceVideo =
173177
std::make_unique<IMediaPipeline::MediaSourceVideo>(
@@ -265,14 +269,15 @@ int my_main(int argc, char **argv)
265269
return -1;
266270
}
267271

272+
273+
// MUST happen before any attachSource() to create a Rialto Gstreamer player
274+
gstMediaPipeline->load(MediaType::MSE, "video/x-h265", "test://local"); // Dummy values
275+
268276
if (!gstMediaPipeline->setVideoWindow(0, 0, 1920, 1080))
269277
{
270278
fprintf(stderr, "Warning: Failed to set video window. Video may not appear.\n");
271279
}
272280

273-
// MUST happen before any attachSource() to create a Rialto Gstreamer player
274-
gstMediaPipeline->load(MediaType::MSE, "video/x-h265", "test://local"); // Dummy values
275-
276281
ConfigureAudio();
277282
ConfigureVideo();
278283
ConfigureComplete();

0 commit comments

Comments
 (0)