Merge branch 'PiP2' into PiP1

This commit is contained in:
TrueZhuanjia
2025-07-12 16:04:16 +08:00
8 changed files with 30 additions and 51 deletions
@@ -1,5 +1,5 @@
{
"originHash" : "351aaff92dec93f04a2fdd631010a46ac6509f5952cc8e4c25eac9b085626d17",
"originHash" : "f17bf6f1131c7255a75ffd6a989b69573cb49c332e612dffb429905d8d7afe72",
"pins" : [
{
"identity" : "openssl-package",
+9 -7
View File
@@ -1,8 +1,8 @@
<?xml version="1.0" encoding="UTF-8"?>
<document type="com.apple.InterfaceBuilder3.CocoaTouch.Storyboard.XIB" version="3.0" toolsVersion="23504" targetRuntime="iOS.CocoaTouch" propertyAccessControl="none" useAutolayout="YES" colorMatched="YES" initialViewController="DL0-L5-LOv">
<document type="com.apple.InterfaceBuilder3.CocoaTouch.Storyboard.XIB" version="3.0" toolsVersion="23727" targetRuntime="iOS.CocoaTouch" propertyAccessControl="none" useAutolayout="YES" colorMatched="YES" initialViewController="DL0-L5-LOv">
<device id="retina6_1" orientation="portrait" appearance="light"/>
<dependencies>
<plugIn identifier="com.apple.InterfaceBuilder.IBCocoaTouchPlugin" version="23506"/>
<plugIn identifier="com.apple.InterfaceBuilder.IBCocoaTouchPlugin" version="23721"/>
<capability name="Image references" minToolsVersion="12.0"/>
<capability name="System colors in document resources" minToolsVersion="11.0"/>
<capability name="documents saved in the Xcode 8 format" minToolsVersion="8.0"/>
@@ -13,7 +13,7 @@
<objects>
<viewController id="dgh-JZ-Q7z" customClass="MainFrameViewController" sceneMemberID="viewController">
<collectionView key="view" clipsSubviews="YES" multipleTouchEnabled="YES" contentMode="scaleToFill" dataMode="prototypes" id="Rtu-AT-Alw" customClass="AppCollectionView">
<rect key="frame" x="0.0" y="0.0" width="414" height="804"/>
<rect key="frame" x="0.0" y="0.0" width="414" height="756"/>
<autoresizingMask key="autoresizingMask" widthSizable="YES" heightSizable="YES"/>
<color key="backgroundColor" red="0.3333333432674408" green="0.3333333432674408" blue="0.3333333432674408" alpha="1" colorSpace="custom" customColorSpace="sRGB"/>
<collectionViewFlowLayout key="collectionViewLayout" minimumLineSpacing="15" minimumInteritemSpacing="15" id="YcZ-cR-3tK">
@@ -80,7 +80,7 @@
<objects>
<navigationController id="ftZ-kC-fxI" sceneMemberID="viewController">
<navigationBar key="navigationBar" contentMode="scaleToFill" barStyle="black" translucent="NO" id="0ZA-Ec-QgD">
<rect key="frame" x="0.0" y="48" width="414" height="44"/>
<rect key="frame" x="0.0" y="96" width="414" height="44"/>
<autoresizingMask key="autoresizingMask"/>
<color key="backgroundColor" red="0.66666668653488159" green="0.66666668653488159" blue="0.66666668653488159" alpha="1" colorSpace="custom" customColorSpace="sRGB"/>
<color key="barTintColor" red="0.66666668653488159" green="0.66666668653488159" blue="0.66666668653488159" alpha="1" colorSpace="custom" customColorSpace="sRGB"/>
@@ -636,12 +636,12 @@
<autoresizingMask key="autoresizingMask" widthSizable="YES" heightSizable="YES"/>
<subviews>
<tableView opaque="NO" clearsContextBeforeDrawing="NO" alpha="0.5" contentMode="scaleToFill" alwaysBounceVertical="YES" dataMode="prototypes" style="plain" separatorStyle="default" rowHeight="-1" estimatedRowHeight="-1" sectionHeaderHeight="-1" estimatedSectionHeaderHeight="-1" sectionFooterHeight="-1" estimatedSectionFooterHeight="-1" translatesAutoresizingMaskIntoConstraints="NO" id="kTH-ez-aKD">
<rect key="frame" x="80" y="48" width="692" height="325"/>
<rect key="frame" x="80" y="96" width="692" height="277"/>
<color key="backgroundColor" white="0.0" alpha="0.0" colorSpace="custom" customColorSpace="genericGamma22GrayColorSpace"/>
<color key="sectionIndexBackgroundColor" white="0.0" alpha="0.0" colorSpace="custom" customColorSpace="genericGamma22GrayColorSpace"/>
</tableView>
<navigationBar contentMode="scaleToFill" translatesAutoresizingMaskIntoConstraints="NO" id="zsA-6X-Qc5">
<rect key="frame" x="80" y="48" width="692" height="44"/>
<rect key="frame" x="80" y="96" width="692" height="44"/>
<constraints>
<constraint firstAttribute="height" constant="44" id="R90-2b-UrU"/>
</constraints>
@@ -1521,7 +1521,7 @@
</constraints>
</stackView>
<stackView opaque="NO" contentMode="scaleToFill" spacing="20" id="hvN-TZ-ziV" userLabel="pipStack">
<rect key="frame" x="278" y="1618" width="280" height="31"/>
<rect key="frame" x="382" y="1618" width="280" height="31"/>
<autoresizingMask key="autoresizingMask" flexibleMaxX="YES" flexibleMaxY="YES"/>
<subviews>
<label opaque="NO" userInteractionEnabled="NO" contentMode="left" horizontalHuggingPriority="251" verticalHuggingPriority="251" text="Enable PiP" textAlignment="natural" lineBreakMode="tailTruncation" baselineAdjustment="alignBaselines" adjustsFontSizeToFit="NO" translatesAutoresizingMaskIntoConstraints="NO" id="4Ul-P6-eUk" userLabel="pipLabel">
@@ -1586,6 +1586,8 @@
<outlet property="onscreenControllerLabel" destination="5uF-E5-hpX" id="Ntz-sT-O6S"/>
<outlet property="optimizeGamesStack" destination="Col-Dm-lwT" id="ng3-CV-HLd"/>
<outlet property="optimizeGamesSwitch" destination="zGD-yR-gUS" id="Gji-vK-txl"/>
<outlet property="pipStack" destination="hvN-TZ-ziV" id="6oL-0b-Bto"/>
<outlet property="pipSwitch" destination="mgR-dj-4gu" id="b8b-7E-wrq"/>
<outlet property="pointerVelocityDividerStack" destination="Jp2-5v-Zr0" id="0mB-RI-df8"/>
<outlet property="pointerVelocityFactorStack" destination="PAv-Ep-ZJo" id="fxb-uz-e1a"/>
<outlet property="pointerVelocityModeDividerSlider" destination="OMw-Ew-fBX" id="Yki-z6-7bh"/>
-3
View File
@@ -24,7 +24,6 @@
- (void)toggleStatsOverlay;
- (void)localMousePointerMode;
- (void)toggleMouseVisible;
- (bool)isPipActive;
@end
@@ -64,8 +63,6 @@
- (void)keyboardWillShow:(NSNotification *)notification;
- (void)keyboardWillHide;
- (bool)isPipActive;
#if !TARGET_OS_TV
- (void) updateCursorLocation:(CGPoint)location isMouse:(BOOL)isMouse;
#endif
-3
View File
@@ -364,9 +364,6 @@ static const double X1_MOUSE_SPEED_DIVISOR = 2.5;
#endif
}
- (bool)isPipActive{
return [interactionDelegate isPipActive];
}
// we'll enable on screen buttons, and disable on screen controllers for absolute touch
- (bool) isOscEnabled{
+11 -25
View File
@@ -39,21 +39,12 @@ extern int ff_isom_write_av1c(AVIOContext *pb, const uint8_t *buf, int size,
- (void)reinitializeDisplayLayer
{
CALayer *oldLayer = _displayLayer;
bool pipIsActive = [(StreamView* )_view.superview isPipActive];
NSLog(@"pipIsActive: %d, %f", pipIsActive, CACurrentMediaTime());
if (!pipIsActive) {
if (_displayLayer == nil) {
_displayLayer = [[AVSampleBufferDisplayLayer alloc] init];
_displayLayer.backgroundColor = [UIColor greenColor].CGColor;
//if(pipIsActive) [_view.layer addSublayer:_displayLayer];
_displayLayer.backgroundColor = [UIColor blackColor].CGColor;
_displayLayer.videoGravity = AVLayerVideoGravityResize;
[_view.layer addSublayer:_displayLayer];
}
//_displayLayer = [[AVSampleBufferDisplayLayer alloc] init];
//_displayLayer.backgroundColor = [UIColor blackColor].CGColor;
// Ensure the AVSampleBufferDisplayLayer is sized to preserve the aspect ratio
// of the video stream. We used to use AVLayerVideoGravityResizeAspect, but that
@@ -66,31 +57,24 @@ extern int ff_isom_write_av1c(AVIOContext *pb, const uint8_t *buf, int size,
} else {
videoSize = CGSizeMake(_view.bounds.size.width, _view.bounds.size.width / _streamAspectRatio);
}
[CATransaction begin];
[CATransaction setDisableActions:YES];
_displayLayer.position = CGPointMake(CGRectGetMidX(_view.bounds), CGRectGetMidY(_view.bounds));
_displayLayer.bounds = CGRectMake(0, 0, videoSize.width, videoSize.height);
_displayLayer.videoGravity = AVLayerVideoGravityResize;
[CATransaction commit];
// Hide the layer until we get an IDR frame. This ensures we
// can see the loading progress label as the stream is starting.
_displayLayer.hidden = YES;
if(!pipIsActive){
if (oldLayer != nil) {
// Switch out the old display layer with the new one
[_view.layer replaceSublayer:oldLayer with:_displayLayer];
}
else {
[_view.layer addSublayer:_displayLayer];
}
}
if (formatDesc != nil) {
CFRelease(formatDesc);
formatDesc = nil;
}
}
- (id)initWithView:(UIView*)view callbacks:(id<ConnectionCallbacks>)callbacks streamAspectRatio:(float)aspectRatio useFramePacing:(BOOL)useFramePacing
- (id)initWithView:(UIView* )view callbacks:(id<ConnectionCallbacks>)callbacks streamAspectRatio:(float)aspectRatio useFramePacing:(BOOL)useFramePacing
{
NSLog(@"initializing video decoder %f", CACurrentMediaTime());
self = [super init];
@@ -538,6 +522,8 @@ int DrSubmitDecodeUnit(PDECODE_UNIT decodeUnit);
if (_displayLayer.status == AVQueuedSampleBufferRenderingStatusFailed) {
Log(LOG_E, @"Display layer rendering failed: %@", _displayLayer.error);
[self->_displayLayer flushAndRemoveImage];
// Recreate the display layer. We are already on the main thread,
// so this is safe to do right here.
[self reinitializeDisplayLayer];
@@ -881,15 +881,11 @@
[self.pipController stopPictureInPicture];
}
self.pipController = nil;
[self setupPiPControllerWithRenderer:self->_streamMan.videoRenderer];
//self.pipController = nil;
//[self setupPiPControllerWithRenderer:self->_streamMan.videoRenderer];
//self->_streamMan.videoRenderer.
}
- (bool)isPipActive{
return self.pipController.isPictureInPictureActive;
}
// This fires when the home button is pressed
- (void)applicationDidEnterBackground:(UIApplication *)application {
@@ -904,6 +900,7 @@
}
#if !TARGET_OS_TV
#endif
}
+3 -3
View File
@@ -56,19 +56,19 @@
"zh-Hans" : {
"stringUnit" : {
"state" : "translated",
"value" : "启用画中画观察模式"
"value" : "画中画"
}
},
"zh-Hant" : {
"stringUnit" : {
"state" : "translated",
"value" : "啟用子母畫面觀察模式"
"value" : "啟用子母畫面"
}
},
"zh-HK" : {
"stringUnit" : {
"state" : "translated",
"value" : "啟用子母畫面觀察模式"
"value" : "啟用子母畫面"
}
}
}
+3 -3
View File
@@ -224,19 +224,19 @@
"zh-Hans" : {
"stringUnit" : {
"state" : "translated",
"value" : "启用画中画观察模式"
"value" : "画中画"
}
},
"zh-Hant" : {
"stringUnit" : {
"state" : "translated",
"value" : "啟用子母畫面觀察模式"
"value" : "啟用子母畫面"
}
},
"zh-HK" : {
"stringUnit" : {
"state" : "translated",
"value" : "啟用子母畫面觀察模式"
"value" : "啟用子母畫面"
}
}
}