Gstreamer를 사용하여 한 번에 여러 개의 RTSP 스트림을 재생해야하는 응용 프로그램에서 작업하고 있습니다. 두 번째 스트림, 첫 번째 스트림 정지 및 두 번째 게임이 시작되고, 몇 회의 후, 멈추고 앱이 다운됩니다. 여기Gstreamer가 한 번에 여러 스트림을 재생하지 못합니다.
는 APP의 스크린 샷보기
에게 스트림이며,이 스크린 샷은 APP 내가이
가 Gstreamer.framework를 업데이트 충돌 할 때, 검색 및 다른 solutions.but 아무것도
을 일하지 시도다음은 스트림을 파이프 라이닝하기위한 코드 샘플입니다.
viewDidLoad에있는#import "VideoViewController.h"
#import "GStreamerBackend.h"
#import <UIKit/UIKit.h>
@interface VideoViewController() {
GStreamerBackend *gst_backend;
GStreamerBackend *gst_backend1;
int media_width; /* Width of the clip */
int media_height; /* height ofthe clip */
Boolean dragging_slider; /* Whether the time slider is being dragged or not */
Boolean is_local_media; /* Whether this clip is stored locally or is being streamed */
Boolean is_playing_desired; /* Whether the user asked to go to PLAYING */
}
는 :
여기url1= my first url
url2=my second URL
나는 나의 2 스트림을 초기화합니다.
gst_backend = [[GStreamerBackend alloc] init:self videoView:video_view];
gst_backend1 = [[GStreamerBackend alloc] init:self videoView:video_view1];
이 대리자 메서드가 호출됩니다 :
는-(void) gstreamerInitialized
{
dispatch_async(dispatch_get_main_queue(), ^{
firstInit=YES;
play_button.enabled = TRUE;
pause_button.enabled = TRUE;
message_label.text = @"Ready";
[gst_backend setUri:uri];
[gst_backend1 setUri:uri2];
//is_local_media = [uri hasPrefix:@"file://"];
//is_playing_desired = NO;
[gst_backend1 play];
[gst_backend play];
});
}
나는 문제가 검색 경로에 생각합니다.
나는 아이폰 OS 구현에 대해 잘 모른다 GStreamer의 장점 중 하나이지만 Linux 구현에서 염두에 두어야 할 사항 중 하나는 프로세스 당 하나의 파이프 라인 만 가질 수 있다는 것입니다. 두 부분으로 된 파이프 라인을 만들기 위해 GStreamerBackend보다 낮은 레벨을 사용해야 할 수도 있습니다. 그러나 디코드 요소가 두 개의 동시 디코드를 즉시 지원하지 않을 수도 있다는 점을 고려해야합니다. – mpr
나가는 스트림을 제어 할 수있는 경우 고려해야 할 또 다른 사항은 응용 프로그램을 랩핑하여 다시 인코딩 할 수 있다는 것입니다. iOS 기기로의 단일 스트림. – mpr