Skip to content

Commit

Permalink
new lib update
Browse files Browse the repository at this point in the history
  • Loading branch information
dav1977 committed Oct 14, 2020
1 parent ca2d313 commit 7e6126d
Show file tree
Hide file tree
Showing 29 changed files with 63,835 additions and 579 deletions.
Empty file.
Binary file added .vs/__project/v16/Server/sqlite3/storage.ide
Binary file not shown.
3 changes: 2 additions & 1 deletion IPTVmanager/UserClass/FileWork.cs
Original file line number Diff line number Diff line change
Expand Up @@ -287,7 +287,7 @@ void Parsing_link(string s)
}
private void WebClient_DownloadFileCompleted(object sender, System.ComponentModel.AsyncCompletedEventArgs e)
{
Debug.WriteLine("start download COMPLETED!!");
Debug.WriteLine("start download COMPLETED!! size="+ temppath.Length.ToString());
//копия
add_file_to_memory(temppath);
wait_download = false;
Expand Down Expand Up @@ -413,6 +413,7 @@ void PARSING_FILE(List<IPTVman.Model.ParamCanal> lst, string name)
}
catch (Exception ex) { MessageBox.Show("ошибка сканирования " + ex.Message.ToString()); goto exit_open; }
Debug.WriteLine("size="+ all_str);

Wait.set_ProgressBar(all_str);
//=========================================================
//ПОИСК каналов
Expand Down
21 changes: 15 additions & 6 deletions IPTVmanager/View/WindowAbout.xaml
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
xmlns:local="clr-namespace:IPTVman.ViewModel"
mc:Ignorable="d"
Background="Black" Width="500" Height="400" BorderThickness="0.0"
Background="Black" Width="536.735" Height="452.041" BorderThickness="0.0"
WindowStartupLocation="CenterScreen" Cursor="Arrow" MouseDoubleClick="Window_MouseDoubleClick" ShowInTaskbar="False"
>

Expand All @@ -14,9 +14,7 @@
<ColumnDefinition Width="0*"/>
<ColumnDefinition/>
</Grid.ColumnDefinitions>
<StackPanel Background="#01000000" Grid.ColumnSpan="2">
<Image Visibility="Visible" x:Name="logo" Source="logo_cobra.png" Height="93" Margin="221,64,44,0" RenderTransformOrigin="0.533,-3.625"/>
</StackPanel>

<Viewport3D Name="World" Grid.ColumnSpan="2">
<Viewport3D.Camera>
<OrthographicCamera Position="0,0,32" LookDirection="0,0,-32" UpDirection="0,1,0" Width="128" />
Expand All @@ -35,8 +33,19 @@


<StackPanel Background="#01000000" Grid.ColumnSpan="2">
<Label Visibility="Visible" Name="F1" DockPanel.Dock="Top" Content="**********" FontSize="36" HorizontalAlignment="Center" HorizontalContentAlignment="Center" VerticalContentAlignment="Center" VerticalAlignment="Center" RenderTransformOrigin="0.775,3.308" FontFamily="Freestyle Script" Margin="88,0,70,0" Width="334" Foreground="#FFD6BEE6" Height="51"/>
<Label Visibility="Visible" x:Name="F2" Foreground="#FFF0FDFF" Content="**********" FontSize="20" HorizontalAlignment="Center" HorizontalContentAlignment="Center" VerticalContentAlignment="Center" VerticalAlignment="Center" FontFamily="Bookman Old Style" Height="299" Margin="30,0,23,0" Width="439" MouseDoubleClick="F2_MouseDoubleClick"/>
<Label Visibility="Visible" Name="F1" DockPanel.Dock="Top" Content="" FontSize="11" HorizontalAlignment="Center" HorizontalContentAlignment="Center" VerticalContentAlignment="Center" VerticalAlignment="Center" RenderTransformOrigin="0.775,3.308" FontFamily="Arial Black" Margin="88,0,70,0" Width="334" Foreground="#FFD6BEE6" Height="51"/>
<Label Visibility="Visible" x:Name="F2" Foreground="#FFF0FDFF" Content="" FontSize="20" HorizontalAlignment="Center" HorizontalContentAlignment="Center" VerticalContentAlignment="Center" VerticalAlignment="Center" FontFamily="Bookman Old Style" Height="230" Margin="48,0,41,0" Width="440" MouseDoubleClick="F2_MouseDoubleClick"/>
<Image Visibility="Visible" x:Name="logo" Source="logo_cobra.png" Height="50" Margin="300,64,38,0" RenderTransformOrigin="0.533,-3.625">
<Image.RenderTransform>
<TransformGroup>
<ScaleTransform/>
<SkewTransform/>
<RotateTransform Angle="-0.237"/>
<TranslateTransform/>
</TransformGroup>
</Image.RenderTransform>
</Image>
</StackPanel>

</Grid>
</Window>
4 changes: 2 additions & 2 deletions IPTVmanager/View/WindowAbout.xaml.cs
Original file line number Diff line number Diff line change
Expand Up @@ -96,8 +96,8 @@ private void OnFrame(object sender, EventArgs e)
frameCount = 0;
// this.FrameRateLabel.Content = "FPS: " + frameRate.ToString() + " Particles: " + pm.ActiveParticleCount.ToString();

this.F1.Content = "IPTVmanager by COBRA";
this.F2.Content = "Press any key to open links";
this.F1.Content = "IPTVmanager by github.com/dav1977";
this.F2.Content = "yandex money 410015510109786";

}

Expand Down
20 changes: 18 additions & 2 deletions VLC player/App.config
Original file line number Diff line number Diff line change
@@ -1,6 +1,22 @@
<?xml version="1.0" encoding="utf-8"?>
<?xml version="1.0" encoding="utf-8"?>
<configuration>
<startup>
<supportedRuntime version="v4.0" sku=".NETFramework,Version=v4.6.1"/>
<supportedRuntime version="v4.0" sku=".NETFramework,Version=v4.6.1" />
</startup>
<runtime>
<assemblyBinding xmlns="urn:schemas-microsoft-com:asm.v1">
<dependentAssembly>
<assemblyIdentity name="System.Diagnostics.DiagnosticSource" publicKeyToken="cc7b13ffcd2ddd51" culture="neutral" />
<bindingRedirect oldVersion="0.0.0.0-4.0.1.0" newVersion="4.0.1.0" />
</dependentAssembly>
<dependentAssembly>
<assemblyIdentity name="System.Memory" publicKeyToken="cc7b13ffcd2ddd51" culture="neutral" />
<bindingRedirect oldVersion="0.0.0.0-4.0.1.1" newVersion="4.0.1.1" />
</dependentAssembly>
<dependentAssembly>
<assemblyIdentity name="System.Runtime.CompilerServices.Unsafe" publicKeyToken="b03f5f7f11d50a3a" culture="neutral" />
<bindingRedirect oldVersion="0.0.0.0-4.0.6.0" newVersion="4.0.6.0" />
</dependentAssembly>
</assemblyBinding>
</runtime>
</configuration>
2 changes: 2 additions & 0 deletions VLC player/DataModel/data.cs
Original file line number Diff line number Diff line change
Expand Up @@ -29,12 +29,14 @@ static class data
public static WCFSERVER _server;
public static string url = "";
public static string name = "";
public static string infosteam = "";
public static bool mode_radio = false;
public static bool mode_scan = false;
public static string title = "";
public static string buff = "";
public static string scanURL = "init";
public static bool exit_programm = false;
public static bool startTMRmanag= false;
public static string DefaultPath = AppDomain.CurrentDomain.BaseDirectory + "playersettings.xml";

public static void UpdateLIST()
Expand Down
116 changes: 70 additions & 46 deletions VLC player/MainWindow.xaml.cs
Original file line number Diff line number Diff line change
Expand Up @@ -23,23 +23,24 @@ namespace IPTVman.ViewModel
/// </summary>
public partial class Player : Window
{
//Application.StartupPath
public static Window header;
IMediaPlayerFactory m_factory;
IVideoPlayer m_player;
IMedia m_media;
System.Windows.Forms.Panel p;
Panel p;
public static int timer_off = 0;
int timer_ct = 0;
int ct_update_tags = 0;
//string media_info = "";
string play_link;
Task taskPLAY, taskBASS;
DispatcherTimer timerDOWNLOAD = new DispatcherTimer();


public Player()
{
header = this;
InitializeComponent();

if (!data.mode_scan)
{
this.Activate();
Expand Down Expand Up @@ -69,12 +70,12 @@ public Player()
if (data.mode_radio) data.title = data.name;

//data.mode_scan = true;
//scan();
//return;
////scan();
////return;

//data.url = "http://newairhost.com:8034/listen.ram";
//data.name = "test";
//data.mode_radio = true;
data.url = @"https://air2.radiorecord.ru:9003/chil_320";// http://air.radiorecord.ru:8102/mdl_320";
data.name = "test";
data.mode_radio = true;

if (data.mode_radio)
{
Expand All @@ -88,6 +89,13 @@ public Player()
{
l2.Content = "";
}));


timerDOWNLOAD.Interval = new TimeSpan(0, 0, 0, 0, 50);
timerDOWNLOAD.Tick += timerDLD_Tick;
//timerDOWNLOAD.Start();


}
else
{
Expand Down Expand Up @@ -166,21 +174,28 @@ void reset()
bool loc = false;
bool mode_init_bass = false;

Task task1;
public static CancellationTokenSource cts1 = new CancellationTokenSource();
public static CancellationToken cancellationToken;
bool loktimer = false;
string en = "";
string lastPRINT = "";
bool CLOSE_PROGRAMM = false;

private async void timer_Tick(object sender, EventArgs e)
private void timer_Tick(object sender, EventArgs e)
{

if (CLOSE_PROGRAMM)
{
Thread.Sleep(1000);
this.Close();
}

if (data.startTMRmanag && !timerDOWNLOAD.IsEnabled)
timerDOWNLOAD.Start();
if (!data.startTMRmanag && timerDOWNLOAD.IsEnabled)
timerDOWNLOAD.Stop();


if (loktimer) return;
if (data.mode_scan)
{
Expand Down Expand Up @@ -218,35 +233,32 @@ private async void timer_Tick(object sender, EventArgs e)
if (mode_init_bass)
{
if (data.mode_radio) this.Title = data.title;
//this.Title = data.name + " " + data.url;

}
else
{
ct_update_tags++;
if (ct_update_tags > 30)
{
ct_update_tags = 0;
//taskTAG = Task.Factory.StartNew(() =>
//{
string bitr = "?";
string s1 = data._bass.get_tags(data.url, ref bitr);
string s2 = "";
//ct_update_tags = 0;

if (bitr == "?" || bitr == "0") s2 = data.name;
else s2 = data.name + " [" + bitr + " кбит/с ]";
//string bitr = "?";
//string s1 = data._bass.get_tags(data.url, ref bitr);
//string s2 = "";

l1.Dispatcher.Invoke(new Action(() =>
{
l1.Content = s2;
}));
//if (bitr == "?" || bitr == "0") s2 = data.name;
//else s2 = data.name + " [" + bitr + " кбит/с ]";

l1.Dispatcher.Invoke(new Action(() =>
{
l1.Content = data._bass.TitleAndArtist;
}));

//l2.Dispatcher.Invoke(new Action(() =>
//{
// l2.Content = data._bass.Status;
//}));

l2.Dispatcher.Invoke(new Action(() =>
{
l2.Content = s1;
}));
//}
}
}
}

if (timer_off != 0)
Expand All @@ -272,27 +284,27 @@ private async void timer_Tick(object sender, EventArgs e)
{
if (!WinPOP.init_ok)
{
taskBASS = Task.Factory.StartNew(() =>
{
mode_init_bass = true;
data._bass = new AudioBass();
data._bass.init();
data._bass.create_stream(data.url, data.mode_radio, this);
mode_init_bass = false;
taskBASS = Task.Factory.StartNew(() =>
{
mode_init_bass = true;
data._bass = new AudioBass();
data._bass.init();

data._bass.SET_All_Param_VST();

if (data.mode_radio)
{
data._bass.playStream();
}
data._bass.create_stream(data.url, data.mode_radio, this);
mode_init_bass = false;

});
}
data._bass.updPlay();



});
}
}
catch (Exception ex)
{ System.Windows.MessageBox.Show("Ошибка библиотеки bass " + ex.ToString()); }
{
System.Windows.MessageBox.Show("Ошибка библиотеки bass " + ex.ToString());
}

}

Expand Down Expand Up @@ -335,8 +347,20 @@ private async void timer_Tick(object sender, EventArgs e)
loc = false;
}


private void timerDLD_Tick(object sender, EventArgs e)
{

if (data._bass != null) data._bass.TickBASSmanage();
l2.Dispatcher.Invoke(new Action(() =>
{
l2.Content = data._bass.Status;
}));
}



void Events_PlayerStopped(object sender, EventArgs e)
void Events_PlayerStopped(object sender, EventArgs e)
{
//this.Dispatcher.BeginInvoke(new Action(delegate
//{
Expand Down
Loading

0 comments on commit 7e6126d

Please sign in to comment.