Skip to content

Commit 898dca0

Browse files
committed
【macOS】AudioRendering Embed
1 parent 6b24fae commit 898dca0

File tree

11 files changed

+390
-185
lines changed

11 files changed

+390
-185
lines changed

Example/Common/4.Movie Player/0x33/MR0x33ViewController.h

Lines changed: 0 additions & 30 deletions
This file was deleted.
Lines changed: 142 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,142 @@
1+
<?xml version="1.0" encoding="UTF-8"?>
2+
<document type="com.apple.InterfaceBuilder3.CocoaTouch.XIB" version="3.0" toolsVersion="22505" targetRuntime="iOS.CocoaTouch" propertyAccessControl="none" useAutolayout="YES" useTraitCollections="YES" useSafeAreas="YES" colorMatched="YES">
3+
<device id="retina6_1" orientation="landscape" appearance="light"/>
4+
<dependencies>
5+
<deployment identifier="iOS"/>
6+
<plugIn identifier="com.apple.InterfaceBuilder.IBCocoaTouchPlugin" version="22504"/>
7+
<capability name="Safe area layout guides" minToolsVersion="9.0"/>
8+
<capability name="System colors in document resources" minToolsVersion="11.0"/>
9+
<capability name="documents saved in the Xcode 8 format" minToolsVersion="8.0"/>
10+
</dependencies>
11+
<objects>
12+
<placeholder placeholderIdentifier="IBFilesOwner" id="-1" userLabel="File's Owner" customClass="MRVideoEmbedViewController">
13+
<connections>
14+
<outlet property="audioFmtSegCtrl" destination="jGI-4a-7Ui" id="TJp-n0-QGp"/>
15+
<outlet property="audioSampleSegCtrl" destination="yUv-Ko-4g7" id="N3j-0a-kzU"/>
16+
<outlet property="indicatorView" destination="c3R-Bl-JJX" id="yKj-QY-vs2"/>
17+
<outlet property="inputField" destination="adM-9N-T8H" id="D4J-Im-qjS"/>
18+
<outlet property="scalingSegCtrl" destination="4wY-d2-CZN" id="l91-Kg-h6z"/>
19+
<outlet property="videoFmtSegCtrl" destination="bf0-wm-lum" id="XEf-Vo-gJH"/>
20+
<outlet property="videoRendererContainer" destination="5SN-5f-aGY" id="vtN-VX-dhV"/>
21+
</connections>
22+
</placeholder>
23+
<placeholder placeholderIdentifier="IBFirstResponder" id="-2" customClass="UIResponder"/>
24+
<view clearsContextBeforeDrawing="NO" contentMode="scaleToFill" id="i5M-Pr-FkT">
25+
<rect key="frame" x="0.0" y="0.0" width="896" height="414"/>
26+
<autoresizingMask key="autoresizingMask" widthSizable="YES" heightSizable="YES"/>
27+
<subviews>
28+
<stackView opaque="NO" contentMode="scaleToFill" insetsLayoutMarginsFromSafeArea="NO" distribution="fillProportionally" alignment="center" translatesAutoresizingMaskIntoConstraints="NO" id="eBw-Qp-cGp">
29+
<rect key="frame" x="53" y="0.0" width="795" height="35"/>
30+
<subviews>
31+
<label opaque="NO" userInteractionEnabled="NO" contentMode="left" horizontalHuggingPriority="1000" verticalHuggingPriority="251" horizontalCompressionResistancePriority="1000" text=" 视频地址:" textAlignment="natural" lineBreakMode="tailTruncation" baselineAdjustment="alignBaselines" adjustsFontSizeToFit="NO" translatesAutoresizingMaskIntoConstraints="NO" id="HxB-hT-CpN">
32+
<rect key="frame" x="0.0" y="7.5" width="87" height="20.5"/>
33+
<fontDescription key="fontDescription" type="system" pointSize="17"/>
34+
<nil key="textColor"/>
35+
<nil key="highlightedColor"/>
36+
</label>
37+
<textField opaque="NO" contentMode="scaleToFill" contentHorizontalAlignment="left" contentVerticalAlignment="center" borderStyle="roundedRect" placeholder="请输入视频地址" textAlignment="natural" minimumFontSize="17" clearButtonMode="whileEditing" translatesAutoresizingMaskIntoConstraints="NO" id="adM-9N-T8H">
38+
<rect key="frame" x="87" y="0.5" width="371.5" height="34"/>
39+
<fontDescription key="fontDescription" type="system" pointSize="14"/>
40+
<textInputTraits key="textInputTraits"/>
41+
</textField>
42+
<button opaque="NO" contentMode="scaleToFill" horizontalCompressionResistancePriority="1000" contentHorizontalAlignment="center" contentVerticalAlignment="center" buttonType="system" lineBreakMode="middleTruncation" translatesAutoresizingMaskIntoConstraints="NO" id="jcr-Pk-Dnu">
43+
<rect key="frame" x="458.5" y="0.5" width="336.5" height="34.5"/>
44+
<state key="normal" title="Button"/>
45+
<buttonConfiguration key="configuration" style="plain" title="查看">
46+
<color key="baseForegroundColor" systemColor="labelColor"/>
47+
</buttonConfiguration>
48+
<connections>
49+
<action selector="go:" destination="-1" eventType="touchUpInside" id="v7e-9d-NBj"/>
50+
</connections>
51+
</button>
52+
</subviews>
53+
<constraints>
54+
<constraint firstAttribute="height" constant="35" id="X7M-h3-1ft"/>
55+
</constraints>
56+
</stackView>
57+
<view contentMode="scaleToFill" translatesAutoresizingMaskIntoConstraints="NO" id="5SN-5f-aGY">
58+
<rect key="frame" x="48" y="35" width="800" height="358"/>
59+
<color key="backgroundColor" systemColor="systemBackgroundColor"/>
60+
</view>
61+
<stackView opaque="NO" contentMode="scaleToFill" axis="vertical" distribution="fillProportionally" alignment="top" translatesAutoresizingMaskIntoConstraints="NO" id="FIC-Ab-vpl">
62+
<rect key="frame" x="53" y="40" width="552" height="124"/>
63+
<subviews>
64+
<segmentedControl opaque="NO" contentMode="scaleToFill" contentHorizontalAlignment="left" contentVerticalAlignment="top" segmentControlStyle="plain" selectedSegmentIndex="0" translatesAutoresizingMaskIntoConstraints="NO" id="bf0-wm-lum" customClass="MRSegmentedControl">
65+
<rect key="frame" x="0.0" y="0.0" width="552" height="32"/>
66+
<segments>
67+
<segment title="BGRA"/>
68+
<segment title="BGR0"/>
69+
<segment title="RGBA"/>
70+
<segment title="RGBA0"/>
71+
<segment title="NV12"/>
72+
<segment title="NV21"/>
73+
<segment title="YUV420P"/>
74+
</segments>
75+
<connections>
76+
<action selector="onSelectVideoFormat:" destination="-1" eventType="valueChanged" id="1bc-sX-Upu"/>
77+
</connections>
78+
</segmentedControl>
79+
<segmentedControl opaque="NO" contentMode="scaleToFill" contentHorizontalAlignment="left" contentVerticalAlignment="top" segmentControlStyle="plain" selectedSegmentIndex="2" translatesAutoresizingMaskIntoConstraints="NO" id="4wY-d2-CZN" customClass="MRSegmentedControl">
80+
<rect key="frame" x="0.0" y="31" width="365" height="32"/>
81+
<segments>
82+
<segment title="Scale To Fill"/>
83+
<segment title="Scale Aspect Fill"/>
84+
<segment title="Scale Aspect Fit"/>
85+
</segments>
86+
<connections>
87+
<action selector="onSelectedVideMode:" destination="-1" eventType="valueChanged" id="LXc-4u-kLu"/>
88+
</connections>
89+
</segmentedControl>
90+
<segmentedControl opaque="NO" contentMode="scaleToFill" contentHorizontalAlignment="left" contentVerticalAlignment="top" segmentControlStyle="plain" translatesAutoresizingMaskIntoConstraints="NO" id="jGI-4a-7Ui" customClass="MRSegmentedControl">
91+
<rect key="frame" x="0.0" y="62" width="101" height="32"/>
92+
<segments>
93+
<segment title="S16"/>
94+
<segment title="S16P"/>
95+
</segments>
96+
<connections>
97+
<action selector="onSelectAudioFmt:" destination="-1" eventType="valueChanged" id="0TD-JO-GiO"/>
98+
</connections>
99+
</segmentedControl>
100+
<segmentedControl opaque="NO" contentMode="scaleToFill" contentHorizontalAlignment="left" contentVerticalAlignment="top" segmentControlStyle="plain" selectedSegmentIndex="0" translatesAutoresizingMaskIntoConstraints="NO" id="yUv-Ko-4g7" customClass="MRSegmentedControl">
101+
<rect key="frame" x="0.0" y="93" width="123" height="32"/>
102+
<segments>
103+
<segment title="44100"/>
104+
<segment title="48000"/>
105+
</segments>
106+
<connections>
107+
<action selector="onSelectSampleRate:" destination="-1" eventType="valueChanged" id="vp0-hC-dAp"/>
108+
</connections>
109+
</segmentedControl>
110+
</subviews>
111+
</stackView>
112+
<activityIndicatorView hidden="YES" opaque="NO" contentMode="scaleToFill" horizontalHuggingPriority="750" verticalHuggingPriority="750" hidesWhenStopped="YES" style="large" translatesAutoresizingMaskIntoConstraints="NO" id="c3R-Bl-JJX">
113+
<rect key="frame" x="429.5" y="188.5" width="37" height="37"/>
114+
</activityIndicatorView>
115+
</subviews>
116+
<viewLayoutGuide key="safeArea" id="Q5M-cg-NOt"/>
117+
<color key="backgroundColor" systemColor="systemBackgroundColor"/>
118+
<constraints>
119+
<constraint firstItem="Q5M-cg-NOt" firstAttribute="trailing" secondItem="eBw-Qp-cGp" secondAttribute="trailing" id="1HZ-FW-4Jo"/>
120+
<constraint firstItem="Q5M-cg-NOt" firstAttribute="trailing" secondItem="5SN-5f-aGY" secondAttribute="trailing" id="4LU-HR-Cgo"/>
121+
<constraint firstItem="c3R-Bl-JJX" firstAttribute="centerY" secondItem="i5M-Pr-FkT" secondAttribute="centerY" id="5jc-5T-TEF"/>
122+
<constraint firstItem="eBw-Qp-cGp" firstAttribute="leading" secondItem="Q5M-cg-NOt" secondAttribute="leading" constant="5" id="AkW-KK-t72"/>
123+
<constraint firstItem="eBw-Qp-cGp" firstAttribute="top" secondItem="Q5M-cg-NOt" secondAttribute="top" id="AmG-lN-znM"/>
124+
<constraint firstItem="5SN-5f-aGY" firstAttribute="leading" secondItem="Q5M-cg-NOt" secondAttribute="leading" id="QGO-76-ftk"/>
125+
<constraint firstItem="FIC-Ab-vpl" firstAttribute="top" secondItem="eBw-Qp-cGp" secondAttribute="bottom" constant="5" id="iTj-Dv-G9H"/>
126+
<constraint firstItem="5SN-5f-aGY" firstAttribute="top" secondItem="eBw-Qp-cGp" secondAttribute="bottom" id="ki7-F4-cPf"/>
127+
<constraint firstItem="c3R-Bl-JJX" firstAttribute="centerX" secondItem="i5M-Pr-FkT" secondAttribute="centerX" id="t8U-WM-7LF"/>
128+
<constraint firstItem="FIC-Ab-vpl" firstAttribute="leading" secondItem="Q5M-cg-NOt" secondAttribute="leading" constant="5" id="vA7-b0-3Fw"/>
129+
<constraint firstItem="Q5M-cg-NOt" firstAttribute="bottom" secondItem="5SN-5f-aGY" secondAttribute="bottom" id="zqG-Aq-EvD"/>
130+
</constraints>
131+
<point key="canvasLocation" x="132" y="48"/>
132+
</view>
133+
</objects>
134+
<resources>
135+
<systemColor name="labelColor">
136+
<color white="0.0" alpha="1" colorSpace="custom" customColorSpace="genericGamma22GrayColorSpace"/>
137+
</systemColor>
138+
<systemColor name="systemBackgroundColor">
139+
<color white="1" alpha="1" colorSpace="custom" customColorSpace="genericGamma22GrayColorSpace"/>
140+
</systemColor>
141+
</resources>
142+
</document>
Lines changed: 18 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,18 @@
1+
//
2+
// MRAudioEmbedViewController.h
3+
// FFmpegTutorial-macOS
4+
//
5+
// Created by qianlongxu on 2022/7/20.
6+
// Copyright © 2022 Matt Reach's Awesome FFmpeg Tutotial. All rights reserved.
7+
//
8+
// 创建视频渲染线程,将视频渲染的相关逻辑封装到播放器内
9+
10+
#import "MRCrossPlatformUtil.h"
11+
12+
NS_ASSUME_NONNULL_BEGIN
13+
14+
@interface MRAudioEmbedViewController : MRBaseViewController
15+
16+
@end
17+
18+
NS_ASSUME_NONNULL_END

0 commit comments

Comments
 (0)